UNPKG

@vismaux/ngx-nordic-cool

Version:
3,667 lines 262 kB
import * as i0 from '@angular/core';
import { Injectable, LOCALE_ID, Inject, EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Output, forwardRef, NgModule, Directive, RendererStyleFlags2, TemplateRef, ContentChild, ViewChild, Optional, Self, ContentChildren, HostListener, Host, ViewContainerRef, HostBinding, InjectionToken, SkipSelf, Injector } from '@angular/core';
import * as i6 from '@angular/cdk/a11y';
import { A11yModule } from '@angular/cdk/a11y';
import * as i1$3 from '@angular/common';
import { formatDate, CommonModule } from '@angular/common';
import * as i1$1 from '@angular/cdk/overlay';
import { OverlayModule } from '@angular/cdk/overlay';
import * as i2 from '@angular/forms';
import { NG_VALUE_ACCESSOR, NG_VALIDATORS, FormsModule, NgControl, FormControl, FormGroupDirective, ReactiveFormsModule } from '@angular/forms';
import * as i1 from '@ng-bootstrap/ng-bootstrap';
import { NgbDatepickerModule } from '@ng-bootstrap/ng-bootstrap';
import * as i1$2 from '@ng-select/ng-select';
import { NgSelectComponent, NgSelectModule } from '@ng-select/ng-select';
import { Subject, fromEvent, BehaviorSubject, race, Subscription, Observable, isObservable } from 'rxjs';
import { filter, takeUntil, map, distinctUntilChanged, skip, take, debounceTime } from 'rxjs/operators';
import * as i1$4 from '@angular/router';
import { RouterModule, ResolveStart } from '@angular/router';
import { trigger, state, style, transition, animate } from '@angular/animations';
import * as i1$5 from '@angular/cdk/layout';
import { hasModifierKey, ESCAPE } from '@angular/cdk/keycodes';
import * as i2$2 from '@angular/cdk/portal';
import { ComponentPortal, CdkPortalOutlet, PortalModule } from '@angular/cdk/portal';
import * as i2$1 from '@angular/cdk/accordion';
import { CdkAccordionItem, CdkAccordion, CdkAccordionModule } from '@angular/cdk/accordion';
import * as i1$6 from '@angular/cdk/collections';

function isInteger(value) {
    return (typeof value === 'number' && isFinite(value) && Math.floor(value) === value);
}

function NC_DATE_ADAPTER_FACTORY() {
    return new NcDateStructAdapter();
}
/**
 * An abstract service that does the conversion between the internal datepicker `NcDateStruct` model and
 * any provided user date model `D`, ex. a string, a native date, etc.
 *
 * The default datepicker implementation assumes we use `NcDateStruct` as a user model.
 */
class NcDateAdapter {
}
NcDateAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDateAdapter, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
NcDateAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDateAdapter, providedIn: 'root', useFactory: NC_DATE_ADAPTER_FACTORY });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDateAdapter, decorators: [{
            type: Injectable,
            args: [{
                    providedIn: 'root',
                    useFactory: NC_DATE_ADAPTER_FACTORY,
                }]
        }] });
class NcDateStructAdapter extends NcDateAdapter {
    fromModel(date) {
        return date &&
            isInteger(date.year) &&
            isInteger(date.month) &&
            isInteger(date.day)
            ? { year: date.year, month: date.month, day: date.day }
            : null;
    }
    toModel(date) {
        return date &&
            isInteger(date.year) &&
            isInteger(date.month) &&
            isInteger(date.day)
            ? { year: date.year, month: date.month, day: date.day }
            : null;
    }
}
NcDateStructAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDateStructAdapter, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
NcDateStructAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDateStructAdapter });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDateStructAdapter, decorators: [{
            type: Injectable
        }] });

function NC_DATEPICKER_PARSER_FORMATTER_FACTORY(localeId) {
    return new NcDateParserFormatterDefault(localeId);
}
/**
 * Converts between the internal `NcDateStruct` model presentation and a `string` that is displayed in the
 * input element.
 *
 * When user types something in the input this service attempts to parse it into a `NcDateStruct` object.
 * And vice versa, when users selects a date in the calendar with the mouse, it must be displayed as a `string`
 * in the input.
 *
 * Default implementation uses the ISO 8601 format, but you can provide another implementation via DI
 * to use an alternative string format or a custom parsing logic.
 */
class NcDateParserFormatter {
}
NcDateParserFormatter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDateParserFormatter, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
NcDateParserFormatter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDateParserFormatter, providedIn: 'root', useFactory: NC_DATEPICKER_PARSER_FORMATTER_FACTORY, deps: [{ token: LOCALE_ID }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDateParserFormatter, decorators: [{
            type: Injectable,
            args: [{
                    providedIn: 'root',
                    useFactory: NC_DATEPICKER_PARSER_FORMATTER_FACTORY,
                    deps: [LOCALE_ID],
                }]
        }] });
const DATE_INPUT_FORMATS = {
    'en-US': ['M/d/yy', 'M/d/yyyy', 'M.d.yy', 'M.d.yyyy', 'M-d-yy', 'M-d-yyyy'],
    'en-GB': ['d/M/yy', 'd/M/yyyy', 'd.M.yy', 'd.M.yyyy', 'd-M-yy', 'd-M-yyyy'],
    'da-dK': ['d.M.yy', 'd.M.yyyy', 'd/M/yy', 'd/M/yyyy', 'd-M-yy', 'd-M-yyyy'],
    'fi-FI': ['d.M.yy', 'd.M.yyyy', 'd/M/yy', 'd/M/yyyy', 'd-M-yy', 'd-M-yyyy'],
    'nb-NO': ['d.M.yy', 'd.M.yyyy', 'd/M/yy', 'd/M/yyyy', 'd-M-yy', 'd-M-yyyy'],
    'sv-SE': [
        'yy-M-d',
        'yyyy-M-d',
        'yy/M/d',
        'yyyy/M/d',
        'yy.M.d',
        'yyyy.M.d',
        'yyMMdd',
        'yyyyMMdd',
    ],
};
const DATE_OUTPUT_FORMATS = {
    'en-US': 'MM/dd/yyyy',
    'en-GB': 'dd/MM/yyyy',
    'da-DK': 'dd.MM.yyyy',
    'fi-FI': 'dd.MM.yyyy',
    'nb-NO': 'dd.MM.yyyy',
    'sv-SE': 'yyyy-MM-dd',
};
class NcDateParserFormatterDefault extends NcDateParserFormatter {
    constructor(locale) {
        super();
        this.locale = locale;
    }
    parse(value) {
        let config = DATE_INPUT_FORMATS[this.locale];
        if (!config) {
            this.printUnkownLocaleWarning();
            config = DATE_INPUT_FORMATS['en-GB'];
        }
        for (const format of config) {
            const regexp = this.dateFormatToRegexp(format);
            const match = value.match(regexp);
            if (match) {
                const yearIndex = format.indexOf('y');
                const monthIndex = format.indexOf('M');
                const dayIndex = format.indexOf('d');
                const sortedIndexes = [yearIndex, monthIndex, dayIndex].sort();
                const yearGroup = sortedIndexes.indexOf(yearIndex) + 1;
                const monthGroup = sortedIndexes.indexOf(monthIndex) + 1;
                const dayGroup = sortedIndexes.indexOf(dayIndex) + 1;
                const year = this.addYearPadding(+match[yearGroup]);
                const month = +match[monthGroup];
                const day = +match[dayGroup];
                return { year, month, day };
            }
        }
        return null;
    }
    format(date) {
        if (!date) {
            return '';
        }
        const utcDate = new Date(Date.UTC(date.year, date.month - 1, date.day));
        let format = DATE_OUTPUT_FORMATS[this.locale];
        if (!format) {
            this.printUnkownLocaleWarning();
            format = DATE_OUTPUT_FORMATS['en-GB'];
        }
        return formatDate(utcDate, format, this.locale);
    }
    dateFormatToRegexp(format) {
        const pattern = '^' +
            format
                // / to \/
                .replace(/\//g, '\\/')
                // . to \.
                .replace(/\./g, '\\.')
                .replace(/(d+)/, '(\\d{1,2})')
                .replace(/(yyyy)/, '(\\d{4})')
                .replace(/(yy)/, '(\\d{2})')
                .replace(/(M+)/, '(\\d{1,2})') +
            '$';
        return new RegExp(pattern);
    }
    addYearPadding(year) {
        if (year < 100) {
            return 2000 + year;
        }
        return year;
    }
    printUnkownLocaleWarning() {
        console.warn(`Default datepicker parser-formatter does not have predefined formats for "${this.locale}" locale. Please provide custom 'NgbDateParserFormatter' class. Now defaults to "en-GB".`);
    }
}
NcDateParserFormatterDefault.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDateParserFormatterDefault, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Injectable });
NcDateParserFormatterDefault.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDateParserFormatterDefault });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDateParserFormatterDefault, decorators: [{
            type: Injectable
        }], ctorParameters: function () {
        return [{ type: undefined, decorators: [{
                        type: Inject,
                        args: [LOCALE_ID]
                    }] }];
    } });

class NcDateNativeAdapter extends NcDateAdapter {
    /**
     * Converts a native `Date` to a `NcDateStruct`.
     */
    fromModel(date) {
        return date instanceof Date && !isNaN(date.getTime())
            ? this._fromNativeDate(date)
            : null;
    }
    /**
     * Converts a `NcDateStruct` to a native `Date`.
     */
    toModel(date) {
        return date &&
            isInteger(date.year) &&
            isInteger(date.month) &&
            isInteger(date.day)
            ? this._toNativeDate(date)
            : null;
    }
    _fromNativeDate(date) {
        return {
            year: date.getFullYear(),
            month: date.getMonth() + 1,
            day: date.getDate(),
        };
    }
    _toNativeDate(date) {
        const jsDate = new Date(date.year, date.month - 1, date.day, 12);
        // avoid 30 -> 1930 conversion
        jsDate.setFullYear(date.year);
        return jsDate;
    }
}
NcDateNativeAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDateNativeAdapter, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
NcDateNativeAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDateNativeAdapter });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDateNativeAdapter, decorators: [{
            type: Injectable
        }] });

class NcDateNativeUTCAdapter extends NcDateNativeAdapter {
    _fromNativeDate(date) {
        return {
            year: date.getUTCFullYear(),
            month: date.getUTCMonth() + 1,
            day: date.getUTCDate(),
        };
    }
    _toNativeDate(date) {
        const jsDate = new Date(Date.UTC(date.year, date.month - 1, date.day));
        // avoid 30 -> 1930 conversion
        jsDate.setUTCFullYear(date.year);
        return jsDate;
    }
}
NcDateNativeUTCAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDateNativeUTCAdapter, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
NcDateNativeUTCAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDateNativeUTCAdapter });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDateNativeUTCAdapter, decorators: [{
            type: Injectable
        }] });

class NcDateNativeUtcIsoAdapter extends NcDateAdapter {
    /**
     * Converts a ISO 8601 date string to a `NcDateStruct`.
     */
    fromModel(dateString) {
        if (dateString === null) {
            return null;
        }
        const date = new Date(dateString);
        return date instanceof Date && !isNaN(date.getTime())
            ? this._fromNativeDate(date)
            : null;
    }
    /**
     * Converts a `NcDateStruct` to a ISO 8601 date string.
     */
    toModel(dateStruct) {
        return dateStruct &&
            isInteger(dateStruct.year) &&
            isInteger(dateStruct.month) &&
            isInteger(dateStruct.day)
            ? this._toNativeDate(dateStruct)
            : null;
    }
    _fromNativeDate(date) {
        return {
            year: date.getUTCFullYear(),
            month: date.getUTCMonth() + 1,
            day: date.getUTCDate(),
        };
    }
    _toNativeDate(date) {
        const jsDate = new Date(Date.UTC(date.year, date.month - 1, date.day));
        // avoid 30 -> 1930 conversion
        jsDate.setUTCFullYear(date.year);
        return jsDate.toISOString();
    }
}
NcDateNativeUtcIsoAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDateNativeUtcIsoAdapter, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
NcDateNativeUtcIsoAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDateNativeUtcIsoAdapter });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDateNativeUtcIsoAdapter, decorators: [{
            type: Injectable
        }] });

class NcDatepickerComponent {
    constructor(adapter) {
        this.adapter = adapter;
        this.showWeekNumbers = true;
        this.dateSelect = new EventEmitter();
    }
    set value(value) {
        this._valueNative = this.adapter.fromModel(value);
    }
    set startDate(value) {
        this._startDateNative = this.adapter.fromModel(value);
    }
    set minDate(value) {
        this._minDateNative = this.adapter.fromModel(value);
    }
    set maxDate(value) {
        this._maxDateNative = this.adapter.fromModel(value);
    }
    /** @ignore */
    get valueNative() {
        return this._valueNative;
    }
    /** @ignore */
    get startDateNative() {
        var _a;
        return (_a = this._startDateNative) !== null && _a !== void 0 ? _a : this._valueNative;
    }
    /** @ignore */
    get minDateNative() {
        return this._minDateNative;
    }
    /** @ignore */
    get maxDateNative() {
        return this._maxDateNative;
    }
    /** @ignore */
    onDateSelect(dateStruct) {
        this.dateSelect.emit(this.adapter.toModel(dateStruct));
    }
}
NcDatepickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDatepickerComponent, deps: [{ token: NcDateAdapter }], target: i0.ɵɵFactoryTarget.Component });
NcDatepickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: NcDatepickerComponent, selector: "nc-datepicker", inputs: { showWeekNumbers: "showWeekNumbers", firstDayOfWeek: "firstDayOfWeek", value: "value", startDate: "startDate", minDate: "minDate", maxDate: "maxDate" }, outputs: { dateSelect: "dateSelect" }, exportAs: ["ncDatepicker"], ngImport: i0, template: "<ngb-datepicker\n  [weekdays]=\"true\"\n  [showWeekNumbers]=\"showWeekNumbers\"\n  [firstDayOfWeek]=\"firstDayOfWeek\"\n  [minDate]=\"minDateNative\"\n  [maxDate]=\"maxDateNative\"\n  [startDate]=\"startDateNative\"\n  [ngModel]=\"valueNative\"\n  (dateSelect)=\"onDateSelect($event)\"\n></ngb-datepicker>\n", styles: ["ngb-datepicker{padding:15px 20px!important;background:var(--datepicker-popup-bg);border-radius:0!important;border:0!important}ngb-datepicker ngb-datepicker-navigation .ngb-dp-arrow{width:auto;height:auto}ngb-datepicker ngb-datepicker-navigation .ngb-dp-arrow:not(.right){padding-right:15px}ngb-datepicker ngb-datepicker-navigation .ngb-dp-arrow.right{padding-left:15px}ngb-datepicker ngb-datepicker-navigation .ngb-dp-arrow.right button .ngb-dp-navigation-chevron{width:10px!important;height:6px!important;transform:rotate(-90deg)!important}ngb-datepicker ngb-datepicker-navigation .ngb-dp-arrow button{margin:0;width:30px!important;height:30px!important;outline:none!important;cursor:pointer;padding:0!important}ngb-datepicker ngb-datepicker-navigation .ngb-dp-arrow .ngb-dp-navigation-chevron{width:10px!important;height:6px!important;margin:auto;border:0;transform:rotate(90deg)!important;-webkit-mask:url(\"data:image/svg+xml,%3Csvg width%3D%2210%22 height%3D%226%22 viewBox%3D%220 0 10 6%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0D%3Cpath d%3D%22M1 1L5 5L9 1%22 stroke%3D%22%23252626%22 stroke-width%3D%222%22 stroke-linecap%3D%22round%22 stroke-linejoin%3D%22round%22%2F%3E%0D%3C%2Fsvg%3E%0D\") no-repeat;mask:url(\"data:image/svg+xml,%3Csvg width%3D%2210%22 height%3D%226%22 viewBox%3D%220 0 10 6%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0D%3Cpath d%3D%22M1 1L5 5L9 1%22 stroke%3D%22%23252626%22 stroke-width%3D%222%22 stroke-linecap%3D%22round%22 stroke-linejoin%3D%22round%22%2F%3E%0D%3C%2Fsvg%3E%0D\") no-repeat;background-color:var(--caret-primary-bg)}ngb-datepicker ngb-datepicker-navigation .custom-select{border-color:transparent;min-width:0;box-shadow:none;font-size:1.4rem;height:3rem;background-position:right .5rem top 1.2rem;padding-right:2rem}ngb-datepicker ngb-datepicker-navigation .custom-select:focus{z-index:unset!important}ngb-datepicker .ngb-dp-header{margin-bottom:15px}ngb-datepicker .ngb-dp-weekdays{border-bottom:none}ngb-datepicker .ngb-dp-week{padding-left:0!important;padding-right:0!important}ngb-datepicker .ngb-dp-week:nth-child(2) .ngb-dp-week-number,ngb-datepicker .ngb-dp-week:nth-child(2) .ngb-dp-day{padding-top:5px;height:35px}ngb-datepicker .ngb-dp-week .ngb-dp-weekday:nth-child(2),ngb-datepicker .ngb-dp-week .ngb-dp-day:nth-child(2){width:35px;padding-left:5px}ngb-datepicker .ngb-dp-showweek,ngb-datepicker .ngb-dp-week-number{padding:0 5px;width:35px!important;height:30px;border-right:1px solid var(--datepicker-border-color);color:var(--datepicker-nonclickable-text-color);line-height:30px;font-style:normal;text-align:left}ngb-datepicker .ngb-dp-weekday{width:30px;height:15px;letter-spacing:1px;font:1.2rem/1.2 OpenSansFallback,Open Sans,sans-serif;color:var(--datepicker-nonclickable-text-color)}ngb-datepicker .ngb-dp-day{width:auto;height:auto;outline:none;color:var(--datepicker-item-text)}ngb-datepicker .ngb-dp-day:not(.disabled):focus{outline:none}ngb-datepicker .ngb-dp-day:not(.disabled):focus>div:not(.bg-primary){background-color:var(--datepicker-item-selected-bg);color:var(--datepicker-item-text);border-color:var(--datepicker-item-selected-focus-border)}ngb-datepicker .ngb-dp-day:not(.disabled):focus>div.bg-primary{box-shadow:inset 0 0 0 2px #fff}ngb-datepicker .ngb-dp-day:not(.disabled)>div:not(.bg-primary):hover{background-color:var(--datepicker-item-hover-bg)}ngb-datepicker .ngb-dp-day>div{width:30px;height:30px;border-radius:50%;border:2px solid transparent;line-height:26px;text-align:center}ngb-datepicker .ngb-dp-day>div.outside{color:var(--datepicker-nonclickable-text-color);opacity:1}ngb-datepicker .ngb-dp-day>div.bg-primary{background-color:var(--datepicker-item-selected-bg)!important;border-color:var(--datepicker-item-selected-bg);color:var(--datepicker-item-selected-text)}ngb-datepicker .ngb-dp-day.disabled>div{color:var(--neutral-50)}ngb-datepicker .ngb-dp-day.ngb-dp-today>div:not(.bg-primary){border-color:var(--datepicker-item-today-border)}\n"], components: [{ type: i1.NgbDatepicker, selector: "ngb-datepicker", inputs: ["dayTemplate", "dayTemplateData", "displayMonths", "firstDayOfWeek", "footerTemplate", "markDisabled", "maxDate", "minDate", "navigation", "outsideDays", "showWeekNumbers", "startDate", "weekdays"], outputs: ["navigate", "dateSelect"], exportAs: ["ngbDatepicker"] }], directives: [{ type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDatepickerComponent, decorators: [{
            type: Component,
            args: [{ selector: 'nc-datepicker', exportAs: 'ncDatepicker', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ngb-datepicker\n  [weekdays]=\"true\"\n  [showWeekNumbers]=\"showWeekNumbers\"\n  [firstDayOfWeek]=\"firstDayOfWeek\"\n  [minDate]=\"minDateNative\"\n  [maxDate]=\"maxDateNative\"\n  [startDate]=\"startDateNative\"\n  [ngModel]=\"valueNative\"\n  (dateSelect)=\"onDateSelect($event)\"\n></ngb-datepicker>\n", styles: ["ngb-datepicker{padding:15px 20px!important;background:var(--datepicker-popup-bg);border-radius:0!important;border:0!important}ngb-datepicker ngb-datepicker-navigation .ngb-dp-arrow{width:auto;height:auto}ngb-datepicker ngb-datepicker-navigation .ngb-dp-arrow:not(.right){padding-right:15px}ngb-datepicker ngb-datepicker-navigation .ngb-dp-arrow.right{padding-left:15px}ngb-datepicker ngb-datepicker-navigation .ngb-dp-arrow.right button .ngb-dp-navigation-chevron{width:10px!important;height:6px!important;transform:rotate(-90deg)!important}ngb-datepicker ngb-datepicker-navigation .ngb-dp-arrow button{margin:0;width:30px!important;height:30px!important;outline:none!important;cursor:pointer;padding:0!important}ngb-datepicker ngb-datepicker-navigation .ngb-dp-arrow .ngb-dp-navigation-chevron{width:10px!important;height:6px!important;margin:auto;border:0;transform:rotate(90deg)!important;-webkit-mask:url(\"data:image/svg+xml,%3Csvg width%3D%2210%22 height%3D%226%22 viewBox%3D%220 0 10 6%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0D%3Cpath d%3D%22M1 1L5 5L9 1%22 stroke%3D%22%23252626%22 stroke-width%3D%222%22 stroke-linecap%3D%22round%22 stroke-linejoin%3D%22round%22%2F%3E%0D%3C%2Fsvg%3E%0D\") no-repeat;mask:url(\"data:image/svg+xml,%3Csvg width%3D%2210%22 height%3D%226%22 viewBox%3D%220 0 10 6%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0D%3Cpath d%3D%22M1 1L5 5L9 1%22 stroke%3D%22%23252626%22 stroke-width%3D%222%22 stroke-linecap%3D%22round%22 stroke-linejoin%3D%22round%22%2F%3E%0D%3C%2Fsvg%3E%0D\") no-repeat;background-color:var(--caret-primary-bg)}ngb-datepicker ngb-datepicker-navigation .custom-select{border-color:transparent;min-width:0;box-shadow:none;font-size:1.4rem;height:3rem;background-position:right .5rem top 1.2rem;padding-right:2rem}ngb-datepicker ngb-datepicker-navigation .custom-select:focus{z-index:unset!important}ngb-datepicker .ngb-dp-header{margin-bottom:15px}ngb-datepicker .ngb-dp-weekdays{border-bottom:none}ngb-datepicker .ngb-dp-week{padding-left:0!important;padding-right:0!important}ngb-datepicker .ngb-dp-week:nth-child(2) .ngb-dp-week-number,ngb-datepicker .ngb-dp-week:nth-child(2) .ngb-dp-day{padding-top:5px;height:35px}ngb-datepicker .ngb-dp-week .ngb-dp-weekday:nth-child(2),ngb-datepicker .ngb-dp-week .ngb-dp-day:nth-child(2){width:35px;padding-left:5px}ngb-datepicker .ngb-dp-showweek,ngb-datepicker .ngb-dp-week-number{padding:0 5px;width:35px!important;height:30px;border-right:1px solid var(--datepicker-border-color);color:var(--datepicker-nonclickable-text-color);line-height:30px;font-style:normal;text-align:left}ngb-datepicker .ngb-dp-weekday{width:30px;height:15px;letter-spacing:1px;font:1.2rem/1.2 OpenSansFallback,Open Sans,sans-serif;color:var(--datepicker-nonclickable-text-color)}ngb-datepicker .ngb-dp-day{width:auto;height:auto;outline:none;color:var(--datepicker-item-text)}ngb-datepicker .ngb-dp-day:not(.disabled):focus{outline:none}ngb-datepicker .ngb-dp-day:not(.disabled):focus>div:not(.bg-primary){background-color:var(--datepicker-item-selected-bg);color:var(--datepicker-item-text);border-color:var(--datepicker-item-selected-focus-border)}ngb-datepicker .ngb-dp-day:not(.disabled):focus>div.bg-primary{box-shadow:inset 0 0 0 2px #fff}ngb-datepicker .ngb-dp-day:not(.disabled)>div:not(.bg-primary):hover{background-color:var(--datepicker-item-hover-bg)}ngb-datepicker .ngb-dp-day>div{width:30px;height:30px;border-radius:50%;border:2px solid transparent;line-height:26px;text-align:center}ngb-datepicker .ngb-dp-day>div.outside{color:var(--datepicker-nonclickable-text-color);opacity:1}ngb-datepicker .ngb-dp-day>div.bg-primary{background-color:var(--datepicker-item-selected-bg)!important;border-color:var(--datepicker-item-selected-bg);color:var(--datepicker-item-selected-text)}ngb-datepicker .ngb-dp-day.disabled>div{color:var(--neutral-50)}ngb-datepicker .ngb-dp-day.ngb-dp-today>div:not(.bg-primary){border-color:var(--datepicker-item-today-border)}\n"] }]
        }], ctorParameters: function () { return [{ type: NcDateAdapter }]; }, propDecorators: { showWeekNumbers: [{
                type: Input
            }], firstDayOfWeek: [{
                type: Input
            }], value: [{
                type: Input
            }], startDate: [{
                type: Input
            }], minDate: [{
                type: Input
            }], maxDate: [{
                type: Input
            }], dateSelect: [{
                type: Output
            }] } });

class NcDatepickerInputComponent {
    constructor(elRef, cdRef, calendar, adapter, parserFormatter) {
        this.elRef = elRef;
        this.cdRef = cdRef;
        this.calendar = calendar;
        this.adapter = adapter;
        this.parserFormatter = parserFormatter;
        /** @ignore */
        this.inputValue = '';
        this.showWeekNumbers = true;
        this.placeholder = '';
        this.dateChanged = new EventEmitter();
        this.dateInput = new EventEmitter();
        this.touched = new EventEmitter();
    }
    set value(value) {
        this._value = value;
        this._valueNative = this.adapter.fromModel(value);
        this.updateViewValue();
    }
    /** @ignore */
    get value() {
        return this._value;
    }
    /** @ignore */
    ngOnChanges(changes) {
        if (changes.minDate || changes.maxDate) {
            if (this._onValidatorChange) {
                this._onValidatorChange();
            }
        }
    }
    toggle() {
        this.isOpen = !this.isOpen;
        this.cdRef.markForCheck();
    }
    open() {
        this.isOpen = true;
        this.cdRef.markForCheck();
    }
    close() {
        this.isOpen = false;
        this.cdRef.markForCheck();
    }
    /** @ignore */
    onManualDateChange(value, updateView = false) {
        var _a;
        if (value !== this.inputValue) {
            this.inputValue = value;
            this._valueNative = this.parserFormatter.parse(value);
            this._value = this.adapter.toModel(this._valueNative);
            this.dateInput.emit(this._value);
            if (this._onChange) {
                this._onChange((_a = this._value) !== null && _a !== void 0 ? _a : (value || null));
            }
        }
        if (updateView) {
            this.dateChanged.emit(this._value);
            if (this._valueNative) {
                this.updateViewValue();
                this.cdRef.markForCheck();
            }
        }
    }
    /** @ignore */
    onDateSelect(date) {
        this.value = date;
        if (this._onChange) {
            this._onChange(date);
        }
        this.dateInput.emit(date);
        this.dateChanged.emit(date);
        this.onTouched();
        this.isOpen = false;
        this.cdRef.markForCheck();
    }
    /** @ignore */
    onTouched() {
        if (this._onTouched) {
            this._onTouched();
        }
        this.touched.emit();
    }
    setToday() {
        const today = this.adapter.toModel(this.calendar.getToday());
        this.onDateSelect(today);
    }
    focusInput() {
        this.elRef.nativeElement.querySelector('input').focus();
    }
    /** @ignore */
    writeValue(value) {
        this.value = value;
        this.cdRef.markForCheck();
    }
    /** @ignore */
    registerOnChange(fn) {
        this._onChange = fn;
    }
    /** @ignore */
    registerOnTouched(fn) {
        this._onTouched = fn;
    }
    /** @ignore */
    setDisabledState(isDisabled) {
        this.disabled = isDisabled;
        this.cdRef.markForCheck();
    }
    /** @ignore */
    validate(control) {
        const { value } = control;
        if (value !== null) {
            if (this._valueNative === null) {
                return { dateFormat: { actual: control.value } };
            }
            if (this.minDate) {
                const minDateNative = this.adapter.fromModel(this.minDate);
                if (this.dateBefore(this._valueNative, minDateNative)) {
                    return { minDate: { actual: this._value, min: this.minDate } };
                }
            }
            if (this.maxDate) {
                const maxDateNative = this.adapter.fromModel(this.maxDate);
                if (this.dateAfter(this._valueNative, maxDateNative)) {
                    return { maxDate: { actual: this._value, max: this.maxDate } };
                }
            }
        }
        return null;
    }
    /** @ignore */
    registerOnValidatorChange(fn) {
        this._onValidatorChange = fn;
    }
    /** @ignore */
    updateViewValue() {
        this.inputValue = this.parserFormatter.format(this._valueNative);
    }
    /** @ignore */
    dateBefore(currValue, beforeValue) {
        return (new Date(currValue.year, currValue.month - 1, currValue.day) <
            new Date(beforeValue.year, beforeValue.month - 1, beforeValue.day));
    }
    /** @ignore */
    dateAfter(currValue, afterValue) {
        return (new Date(currValue.year, currValue.month - 1, currValue.day) >
            new Date(afterValue.year, afterValue.month - 1, afterValue.day));
    }
}
NcDatepickerInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDatepickerInputComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.NgbCalendar }, { token: NcDateAdapter }, { token: NcDateParserFormatter }], target: i0.ɵɵFactoryTarget.Component });
NcDatepickerInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: NcDatepickerInputComponent, selector: "nc-datepicker-input", inputs: { showWeekNumbers: "showWeekNumbers", firstDayOfWeek: "firstDayOfWeek", minDate: "minDate", maxDate: "maxDate", placeholder: "placeholder", inputId: "inputId", disabled: "disabled", startDate: "startDate", value: "value", ariaLabel: ["aria-label", "ariaLabel"], ariaLabelledby: ["aria-labelledby", "ariaLabelledby"] }, outputs: { dateChanged: "dateChanged", dateInput: "dateInput", touched: "touched" }, host: { properties: { "attr.aria-label": "null", "attr.aria-labelledby": "null" } }, providers: [
        {
            provide: NG_VALUE_ACCESSOR,
            useExisting: forwardRef(() => NcDatepickerInputComponent),
            multi: true,
        },
        {
            provide: NG_VALIDATORS,
            useExisting: forwardRef(() => NcDatepickerInputComponent),
            multi: true,
        },
    ], usesOnChanges: true, ngImport: i0, template: "<input\n  [attr.id]=\"inputId\"\n  type=\"text\"\n  autocomplete=\"off\"\n  [placeholder]=\"placeholder\"\n  [disabled]=\"disabled\"\n  [value]=\"inputValue\"\n  (blur)=\"onTouched()\"\n  (input)=\"onManualDateChange($any($event.target).value)\"\n  (change)=\"onManualDateChange($any($event.target).value, true)\"\n  [attr.aria-label]=\"ariaLabel\"\n  [attr.aria-labelledby]=\"ariaLabelledby\"\n  cdkOverlayOrigin\n  #trigger=\"cdkOverlayOrigin\"\n/>\n\n<button\n  type=\"button\"\n  class=\"nc-datepicker-trigger-btn\"\n  (click)=\"open()\"\n  i18n-aria-label=\"@@nc-datepicker-button\"\n  aria-label=\"Calendar\"\n  [disabled]=\"disabled\"\n  tabindex=\"-1\"\n>\n  <span class=\"vismaicon vismaicon-datepicker\"></span>\n</button>\n\n<ng-template\n  cdkConnectedOverlay\n  [cdkConnectedOverlayOrigin]=\"trigger\"\n  [cdkConnectedOverlayOpen]=\"isOpen\"\n  (overlayOutsideClick)=\"close()\"\n  (detach)=\"close()\"\n>\n  <div\n    class=\"nc-datepicker-wrapper\"\n    cdkTrapFocus\n    [cdkTrapFocusAutoCapture]=\"true\"\n    role=\"dialog\"\n    [attr.aria-label]=\"ariaLabel\"\n    [attr.aria-labelledby]=\"ariaLabelledby\"\n  >\n    <nc-datepicker\n      [showWeekNumbers]=\"showWeekNumbers\"\n      [firstDayOfWeek]=\"firstDayOfWeek\"\n      [minDate]=\"minDate\"\n      [maxDate]=\"maxDate\"\n      [startDate]=\"startDate\"\n      [value]=\"value\"\n      (dateSelect)=\"onDateSelect($event)\"\n    ></nc-datepicker>\n\n    <div class=\"nc-datepicker-footer\">\n      <button\n        class=\"nc-datepicker-today-btn\"\n        (click)=\"setToday()\"\n        i18n=\"@@nc-datepicker-today\"\n      >\n        Today\n      </button>\n    </div>\n  </div>\n</ng-template>\n", styles: ["nc-datepicker-input{display:inline-block;position:relative}nc-datepicker-input input[type=text]{margin:0;width:100%;padding-right:30px}nc-datepicker-input .nc-datepicker-trigger-btn{background-color:transparent;position:absolute;top:1px;right:1px;border:0;height:30px;width:30px;padding:2px 0;cursor:pointer}nc-datepicker-input .nc-datepicker-trigger-btn:disabled{cursor:default}nc-datepicker-input .nc-datepicker-trigger-btn:focus{outline:none}nc-datepicker-input .nc-datepicker-trigger-btn .vismaicon{top:1px}.form-group nc-datepicker-input{width:100%}.form-group nc-datepicker-input input{float:none}.nc-datepicker-wrapper{background:var(--datepicker-popup-bg);box-shadow:var(--datepicker-popup-shadow)}.nc-datepicker-footer{text-align:center;padding-bottom:20px}.nc-datepicker-today-btn{background:transparent;border-radius:15px;width:auto;padding:4px 15px;cursor:pointer}.nc-datepicker-today-btn.nc-datepicker-today-btn{color:var(--datepicker-today-btn-text);border:2px solid var(--datepicker-today-btn-border)}.nc-datepicker-today-btn.nc-datepicker-today-btn:hover{background:var(--button-hover-bg)}.nc-datepicker-today-btn.nc-datepicker-today-btn:focus{outline:none;box-shadow:inset 0 0 0 1px var(--anchor-focus-outline)}\n"], components: [{ type: NcDatepickerComponent, selector: "nc-datepicker", inputs: ["showWeekNumbers", "firstDayOfWeek", "value", "startDate", "minDate", "maxDate"], outputs: ["dateSelect"], exportAs: ["ncDatepicker"] }], directives: [{ type: i1$1.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { type: i1$1.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayPositions", "cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayTransformOriginOn"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { type: i6.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDatepickerInputComponent, decorators: [{
            type: Component,
            args: [{ selector: 'nc-datepicker-input', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
                        {
                            provide: NG_VALUE_ACCESSOR,
                            useExisting: forwardRef(() => NcDatepickerInputComponent),
                            multi: true,
                        },
                        {
                            provide: NG_VALIDATORS,
                            useExisting: forwardRef(() => NcDatepickerInputComponent),
                            multi: true,
                        },
                    ], host: {
                        '[attr.aria-label]': 'null',
                        '[attr.aria-labelledby]': 'null',
                    }, template: "<input\n  [attr.id]=\"inputId\"\n  type=\"text\"\n  autocomplete=\"off\"\n  [placeholder]=\"placeholder\"\n  [disabled]=\"disabled\"\n  [value]=\"inputValue\"\n  (blur)=\"onTouched()\"\n  (input)=\"onManualDateChange($any($event.target).value)\"\n  (change)=\"onManualDateChange($any($event.target).value, true)\"\n  [attr.aria-label]=\"ariaLabel\"\n  [attr.aria-labelledby]=\"ariaLabelledby\"\n  cdkOverlayOrigin\n  #trigger=\"cdkOverlayOrigin\"\n/>\n\n<button\n  type=\"button\"\n  class=\"nc-datepicker-trigger-btn\"\n  (click)=\"open()\"\n  i18n-aria-label=\"@@nc-datepicker-button\"\n  aria-label=\"Calendar\"\n  [disabled]=\"disabled\"\n  tabindex=\"-1\"\n>\n  <span class=\"vismaicon vismaicon-datepicker\"></span>\n</button>\n\n<ng-template\n  cdkConnectedOverlay\n  [cdkConnectedOverlayOrigin]=\"trigger\"\n  [cdkConnectedOverlayOpen]=\"isOpen\"\n  (overlayOutsideClick)=\"close()\"\n  (detach)=\"close()\"\n>\n  <div\n    class=\"nc-datepicker-wrapper\"\n    cdkTrapFocus\n    [cdkTrapFocusAutoCapture]=\"true\"\n    role=\"dialog\"\n    [attr.aria-label]=\"ariaLabel\"\n    [attr.aria-labelledby]=\"ariaLabelledby\"\n  >\n    <nc-datepicker\n      [showWeekNumbers]=\"showWeekNumbers\"\n      [firstDayOfWeek]=\"firstDayOfWeek\"\n      [minDate]=\"minDate\"\n      [maxDate]=\"maxDate\"\n      [startDate]=\"startDate\"\n      [value]=\"value\"\n      (dateSelect)=\"onDateSelect($event)\"\n    ></nc-datepicker>\n\n    <div class=\"nc-datepicker-footer\">\n      <button\n        class=\"nc-datepicker-today-btn\"\n        (click)=\"setToday()\"\n        i18n=\"@@nc-datepicker-today\"\n      >\n        Today\n      </button>\n    </div>\n  </div>\n</ng-template>\n", styles: ["nc-datepicker-input{display:inline-block;position:relative}nc-datepicker-input input[type=text]{margin:0;width:100%;padding-right:30px}nc-datepicker-input .nc-datepicker-trigger-btn{background-color:transparent;position:absolute;top:1px;right:1px;border:0;height:30px;width:30px;padding:2px 0;cursor:pointer}nc-datepicker-input .nc-datepicker-trigger-btn:disabled{cursor:default}nc-datepicker-input .nc-datepicker-trigger-btn:focus{outline:none}nc-datepicker-input .nc-datepicker-trigger-btn .vismaicon{top:1px}.form-group nc-datepicker-input{width:100%}.form-group nc-datepicker-input input{float:none}.nc-datepicker-wrapper{background:var(--datepicker-popup-bg);box-shadow:var(--datepicker-popup-shadow)}.nc-datepicker-footer{text-align:center;padding-bottom:20px}.nc-datepicker-today-btn{background:transparent;border-radius:15px;width:auto;padding:4px 15px;cursor:pointer}.nc-datepicker-today-btn.nc-datepicker-today-btn{color:var(--datepicker-today-btn-text);border:2px solid var(--datepicker-today-btn-border)}.nc-datepicker-today-btn.nc-datepicker-today-btn:hover{background:var(--button-hover-bg)}.nc-datepicker-today-btn.nc-datepicker-today-btn:focus{outline:none;box-shadow:inset 0 0 0 1px var(--anchor-focus-outline)}\n"] }]
        }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.NgbCalendar }, { type: NcDateAdapter }, { type: NcDateParserFormatter }]; }, propDecorators: { showWeekNumbers: [{
                type: Input
            }], firstDayOfWeek: [{
                type: Input
            }], minDate: [{
                type: Input
            }], maxDate: [{
                type: Input
            }], placeholder: [{
                type: Input
            }], inputId: [{
                type: Input
            }], disabled: [{
                type: Input
            }], startDate: [{
                type: Input
            }], value: [{
                type: Input
            }], ariaLabel: [{
                type: Input,
                args: ['aria-label']
            }], ariaLabelledby: [{
                type: Input,
                args: ['aria-labelledby']
            }], dateChanged: [{
                type: Output
            }], dateInput: [{
                type: Output
            }], touched: [{
                type: Output
            }] } });

class NcDatepickerModule {
}
NcDatepickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NcDatepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDatepickerModule, declarations: [NcDatepickerInputComponent, NcDatepickerComponent], imports: [CommonModule,
        FormsModule,
        NgbDatepickerModule,
        OverlayModule,
        A11yModule], exports: [NcDatepickerInputComponent, NcDatepickerComponent] });
NcDatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDatepickerModule, imports: [[
            CommonModule,
            FormsModule,
            NgbDatepickerModule,
            OverlayModule,
            A11yModule,
        ]] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDatepickerModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [
                        CommonModule,
                        FormsModule,
                        NgbDatepickerModule,
                        OverlayModule,
                        A11yModule,
                    ],
                    declarations: [NcDatepickerInputComponent, NcDatepickerComponent],
                    exports: [NcDatepickerInputComponent, NcDatepickerComponent],
                }]
        }] });

class SelectValueAccessor {
    constructor(cdRef) {
        this.cdRef = cdRef;
    }
    writeValue(value) {
        this.value = value;
        if (this.cdRef) {
            this.cdRef.markForCheck();
        }
    }
    registerOnChange(fn) {
        this.change = fn;
    }
    registerOnTouched(fn) {
        this.touched = fn;
    }
    setDisabledState(isDisabled) {
        this.disabled = isDisabled;
        if (this.cdRef) {
            this.cdRef.markForCheck();
        }
    }
    onChange(value) {
        this.value = value;
        if (this.change) {
            this.change(value);
        }
        this.onTouched();
    }
    onTouched() {
        if (this.touched) {
            this.touched();
        }
    }
}

class NcOptionTemplateDirective {
    constructor(template) {
        this.template = template;
    }
}
NcOptionTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcOptionTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
NcOptionTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.3", type: NcOptionTemplateDirective, selector: "[ncOptionTmp]", ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcOptionTemplateDirective, decorators: [{
            type: Directive,
            args: [{ selector: '[ncOptionTmp]' }]
        }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
class NcOptGroupTemplateDirective {
    constructor(template) {
        this.template = template;
    }
}
NcOptGroupTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcOptGroupTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
NcOptGroupTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.3", type: NcOptGroupTemplateDirective, selector: "[ncOptGroupTmp]", ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcOptGroupTemplateDirective, decorators: [{
            type: Directive,
            args: [{ selector: '[ncOptGroupTmp]' }]
        }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
class NcLabelTemplateDirective {
    constructor(template) {
        this.template = template;
    }
}
NcLabelTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcLabelTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
NcLabelTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.3", type: NcLabelTemplateDirective, selector: "[ncLabelTmp]", ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcLabelTemplateDirective, decorators: [{
            type: Directive,
            args: [{ selector: '[ncLabelTmp]' }]
        }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
class NcMultiLabelTemplateDirective {
    constructor(template) {
        this.template = template;
    }
}
NcMultiLabelTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcMultiLabelTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
NcMultiLabelTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.3", type: NcMultiLabelTemplateDirective, selector: "[ncMultiLabelTmp]", ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcMultiLabelTemplateDirective, decorators: [{
            type: Directive,
            args: [{ selector: '[ncMultiLabelTmp]' }]
        }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
class NcHeaderTemplateDirective {
    constructor(template) {
        this.template = template;
    }
}
NcHeaderTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcHeaderTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
NcHeaderTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.3", type: NcHeaderTemplateDirective, selector: "[ncHeaderTmp]", ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcHeaderTemplateDirective, decorators: [{
            type: Directive,
            args: [{ selector: '[ncHeaderTmp]' }]
        }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
class NcFooterTemplateDirective {
    constructor(template) {
        this.template = template;
    }
}
NcFooterTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcFooterTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
NcFooterTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.3", type: NcFooterTemplateDirective, selector: "[ncFooterTmp]", ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcFooterTemplateDirective, decorators: [{
            type: Directive,
            args: [{ selector: '[ncFooterTmp]' }]
        }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
class NcNotFoundTemplateDirective {
    constructor(template) {
        this.template = template;
    }
}
NcNotFoundTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcNotFoundTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
NcNotFoundTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.3", type: NcNotFoundTemplateDirective, selector: "[ncNotfoundTmp]", ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcNotFoundTemplateDirective, decorators: [{
            type: Directive,
            args: [{ selector: '[ncNotfoundTmp]' }]
        }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
class NcTypeToSearchTemplateDirective {
    constructor(template) {
        this.template = template;
    }
}
NcTypeToSearchTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcTypeToSearchTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
NcTypeToSearchTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.3", type: NcTypeToSearchTemplateDirective, selector: "[ncTypeToSearchTmp]", ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcTypeToSearchTemplateDirective, decorators: [{
            type: Directive,
            args: [{ selector: '[ncTypeToSearchTmp]' }]
        }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
class NcLoadingTextTemplateDirective {
    constructor(template) {
        this.template = template;
    }
}
NcLoadingTextTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcLoadingTextTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
NcLoadingTextTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.3", type: NcLoadingTextTemplateDirective, selector: "[ncLoadingTextTmp]", ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcLoadingTextTemplateDirective, decorators: [{
            type: Directive,
            args: [{ selector: '[ncLoadingTextTmp]' }]
        }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
class NcTagTemplateDirective {
    constructor(template) {
        this.template = template;
    }
}
NcTagTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcTagTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
NcTagTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.3", type: NcTagTemplateDirective, selector: "[ncTagTmp]", ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcTagTemplateDirective, decorators: [{
            type: Directive,
            args: [{ selector: '[ncTagTmp]' }]
        }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });

class NcOptionHighlightDirective {
    constructor(elementRef, renderer) {
        this.elementRef = elementRef;
        this.renderer = renderer;
    }
    ngOnChanges() {
        if (this.canHighlight) {
            this.highlightLabel();
        }
    }
    ngAfterViewInit() {
        this.label = this.element.innerHTML;
        if (this.canHighlight) {
            this.highlightLabel();
        }
    }
    get element() {
        return this.elementRef.nativeElement;
    }
    escapeRegExp(str) {
        return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
    }
    highlightLabel() {
        const label = this.label;
        if (!this.term) {
            this.setInnerHtml(label);
            return;
        }
        const alternationString = this.escapeRegExp(this.term).replace(' ', '|');
        const termRegex = new RegExp(alternationString, 'gi');
        this.setInnerHtml(label.replace(termRegex, `<span role="mark" class="nc-highlighted">$&</span>`));
    }
    get canHighlight() {
        return this.isDefined(this.term) && this.isDefined(this.label);
    }
    setInnerHtml(html) {
        this.renderer.setProperty(this.elementRef.nativeElement, 'innerHTML', html);
    }
    isDefined(value) {
        return value !== undefined && value !== null;
    }
}
NcOptionHighlightDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcOptionHighlightDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
NcOptionHighlightDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.3", type: NcOptionHighlightDirective, selector: "[ncOptionHighlight]", inputs: { term: ["ncOptionHighlight", "term"] }, usesOnChanges: true, ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcOptionHighlightDirective, decorators: [{
            type: Directive,
            args: [{
                    selector: '[ncOptionHighlight]',
                }]
        }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { term: [{
                type: Input,
                args: ['ncOptionHighlight']
            }] } });

class NcSelectComponent extends SelectValueAccessor {
    constructor(cdRef, renderer, ngZone) {
        super(cdRef);
        this.cdRef = cdRef;
        this.renderer = renderer;
        this.ngZone = ngZone;
        this.destroyed$ = new Subject();
        this.multiple = false;
        this.loading = false;
        this.clearOnBackspace = true;
        this.markFirst = true;
        this.openOnEnter = true;
        this.selectOnTab = false;
        this.addTag = false;
        this.dropdownPosition = 'auto';
        this.bufferAmount = 4;
        this.selectableGroup = false;
        this.selectableGroupAsModel = true;
        this.searchFn = null;
        // Custom inputs
        this.autoPanelWidth = false;
        this.blurEvent = new EventEmitter();
        this.focusEvent = new EventEmitter();
        this.changeEvent = new EventEmitter();
        this.openEvent = new EventEmitter();
        this.closeEvent = new EventEmitter();
        this.searchEvent = new EventEmitter();
        this.clearEvent = new EventEmitter();
        this.addEvent = new EventEmitter();
        this.removeEvent = new EventEmitter();
        this.scrollEvent = new EventEmitter();
        this.scrollToEndEvent = new EventEmitter();
    }
    set disabledBinding(value) {
        this.disabled = value;
    }
    set valueBinding(value) {
        this.value = value;
    }
    get searchTerm() {
        return this.ngSelect.searchTerm;
    }
    ngOnInit() {
        if (this.multiple) {
            this.closeOnSelect = this.defaultValue(this.closeOnSelect, false);
            this.hideSelected = this.defaultValue(this.hideSelected, true);
        }
        else {
            this.closeOnSelect = this.defaultValue(this.closeOnSelect, true);
            this.hideSelected = this.defaultValue(this.hideSelected, false);
        }
        this.clearable = this.defaultValue(this.clearable, true);
        this.ngZone.runOutsideAngular(() => {
            fromEvent(document, 'mouseup')
                .pipe(filter((event) => {
                if (!this.ngSelect.isOpen) {
                    return false;
                }
                const dropdownPanelElement = this.ngSelect.dropdownPanel
                    .scrollElementRef.nativeElement.parentElement;
                return [dropdownPanelElement, this.ngSelect.element].every((el) => !el.contains(event.target));
            }), takeUntil(this.destroyed$))
                .subscribe(() => this.ngZone.run(() => this.ngSelect.close()));
        });
    }
    ngOnDestroy() {
        this.destroyed$.next();
        this.destroyed$.unsubscribe();
    }
    onOpen(event) {
        if (this.autoPanelWidth) {
            Promise.resolve().then(() => {
                const dropdownPanelEl = this.ngSelect.dropdownPanel.scrollElementRef
                    .nativeElement;
                dropdownPanelEl.parentElement.classList.add('ng-select-auto-panel-width');
                const max = this.getDropdownPanelMaxWidth();
                this.renderer.setStyle(dropdownPanelEl, 'max-width', max + 'px', RendererStyleFlags2.Important);
            });
        }
        this.openEvent.emit(event);
    }
    onChange(value) {
        super.onChange(value);
        this.changeEvent.emit(value);
    }
    onClose() {
        super.onTouched();
        this.closeEvent.emit();
    }
    focus() {
        this.ngSelect.focus();
    }
    filter(term) {
        this.ngSelect.filter(term);
    }
    defaultValue(original, value) {
        return original !== undefined ? original : value;
    }
    getDropdownPanelMaxWidth() {
        const rightPadding = 10;
        const maxWidthLimit = this.ngSelect.element.clientWidth * 2;
        const clientRect = this.ngSelect.element.getBoundingClientRect();
        return Math.min(maxWidthLimit, document.body.clientWidth - clientRect.left - rightPadding);
    }
}
NcSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcSelectComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
NcSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: NcSelectComponent, selector: "nc-select", inputs: { items: "items", clearable: "clearable", multiple: "multiple", loading: "loading", placeholder: "placeholder", bindLabel: "bindLabel", bindValue: "bindValue", hideSelected: "hideSelected", appendTo: "appendTo", clearSearchOnAdd: "clearSearchOnAdd", clearOnBackspace: "clearOnBackspace", markFirst: "markFirst", isOpen: "isOpen", closeOnSelect: "closeOnSelect", maxSelectedItems: "maxSelectedItems", openOnEnter: "openOnEnter", selectOnTab: "selectOnTab", addTag: "addTag", dropdownPosition: "dropdownPosition", groupBy: "groupBy", groupValue: "groupValue", typeahead: "typeahead", virtualScroll: "virtualScroll", bufferAmount: "bufferAmount", selectableGroup: "selectableGroup", selectableGroupAsModel: "selectableGroupAsModel", searchFn: "searchFn", labelForId: "labelForId", autoPanelWidth: "autoPanelWidth", disabledBinding: ["disabled", "disabledBinding"], valueBinding: ["value", "valueBinding"] }, outputs: { blurEvent: "blur", focusEvent: "focus", changeEvent: "change", openEvent: "open", closeEvent: "close", searchEvent: "search", clearEvent: "clear", addEvent: "add", removeEvent: "remove", scrollEvent: "scroll", scrollToEndEvent: "scrollToEnd" }, providers: [
        {
            provide: NG_VALUE_ACCESSOR,
            useExisting: forwardRef(() => NcSelectComponent),
            multi: true,
        },
    ], queries: [{ propertyName: "optionTemplate", first: true, predicate: NcOptionTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "optgroupTemplate", first: true, predicate: NcOptGroupTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "labelTemplate", first: true, predicate: NcLabelTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "multiLabelTemplate", first: true, predicate: NcMultiLabelTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "headerTemplate", first: true, predicate: NcHeaderTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "footerTemplate", first: true, predicate: NcFooterTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "notFoundTemplate", first: true, predicate: NcNotFoundTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "typeToSearchTemplate", first: true, predicate: NcTypeToSearchTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "loadingTextTemplate", first: true, predicate: NcLoadingTextTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "tagTemplate", first: true, predicate: NcTagTemplateDirective, descendants: true, read: TemplateRef }], viewQueries: [{ propertyName: "ngSelect", first: true, predicate: NgSelectComponent, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ng-select\n  [class.ng-select-loading]=\"loading\"\n  [class.ng-select-clearable]=\"clearable\"\n  [items]=\"items\"\n  [ngModel]=\"value\"\n  (ngModelChange)=\"onChange($event)\"\n  [clearable]=\"clearable\"\n  [searchable]=\"true\"\n  [multiple]=\"multiple\"\n  [loading]=\"loading\"\n  [placeholder]=\"placeholder\"\n  [bindLabel]=\"bindLabel\"\n  [bindValue]=\"bindValue\"\n  [hideSelected]=\"hideSelected\"\n  [appendTo]=\"appendTo\"\n  [clearSearchOnAdd]=\"clearSearchOnAdd\"\n  [addTag]=\"addTag\"\n  [clearOnBackspace]=\"clearOnBackspace\"\n  [markFirst]=\"markFirst\"\n  [isOpen]=\"isOpen\"\n  [closeOnSelect]=\"closeOnSelect\"\n  [maxSelectedItems]=\"maxSelectedItems\"\n  [openOnEnter]=\"openOnEnter\"\n  [selectOnTab]=\"selectOnTab\"\n  [dropdownPosition]=\"dropdownPosition\"\n  [groupBy]=\"groupBy\"\n  [groupValue]=\"groupValue\"\n  [typeahead]=\"typeahead\"\n  [virtualScroll]=\"virtualScroll\"\n  [bufferAmount]=\"bufferAmount\"\n  [selectableGroup]=\"selectableGroup\"\n  [selectableGroupAsModel]=\"selectableGroupAsModel\"\n  [searchFn]=\"searchFn\"\n  [labelForId]=\"labelForId\"\n  [disabled]=\"disabled\"\n  (blur)=\"blurEvent.emit($event)\"\n  (focus)=\"focusEvent.emit($event)\"\n  (open)=\"onOpen($event)\"\n  (close)=\"onClose()\"\n  (search)=\"searchEvent.emit($event)\"\n  (clear)=\"clearEvent.emit($event)\"\n  (add)=\"addEvent.emit($event)\"\n  (remove)=\"removeEvent.emit($event)\"\n  (scroll)=\"scrollEvent.emit($event)\"\n  (scrollToEnd)=\"scrollToEndEvent.emit($event)\"\n>\n  <ng-template\n    ng-option-tmp\n    let-item=\"item\"\n    let-item$=\"item$\"\n    let-index=\"index\"\n    let-searchTerm=\"searchTerm\"\n  >\n    <ng-template\n      [ngTemplateOutlet]=\"optionTemplate || defaultOptionTemplate\"\n      [ngTemplateOutletContext]=\"{\n        item: item,\n        item$: item$,\n        index: index,\n        searchTerm: searchTerm\n      }\"\n    ></ng-template>\n  </ng-template>\n\n  <ng-container *ngIf=\"headerTemplate\">\n    <ng-template ng-header-tmp let-searchTerm=\"searchTerm\">\n      <ng-template\n        [ngTemplateOutlet]=\"headerTemplate\"\n        [ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\"\n      >\n      </ng-template>\n    </ng-template>\n  </ng-container>\n\n  <ng-container *ngIf=\"labelTemplate\">\n    <ng-template\n      ng-label-tmp\n      let-item=\"item\"\n      let-clear=\"clear\"\n      let-label=\"label\"\n    >\n      <ng-template\n        [ngTemplateOutlet]=\"labelTemplate\"\n        [ngTemplateOutletContext]=\"{ item: item, clear: clear, label: label }\"\n      ></ng-template>\n    </ng-template>\n  </ng-container>\n\n  <ng-container *ngIf=\"footerTemplate\">\n    <ng-template ng-footer-tmp let-searchTerm=\"searchTerm\">\n      <ng-template\n        [ngTemplateOutlet]=\"footerTemplate\"\n        [ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\"\n      >\n      </ng-template>\n    </ng-template>\n  </ng-container>\n\n  <ng-container *ngIf=\"notFoundTemplate\">\n    <ng-template ng-notfound-tmp let-searchTerm=\"searchTerm\">\n      <ng-template\n        [ngTemplateOutlet]=\"notFoundTemplate\"\n        [ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\"\n      >\n      </ng-template>\n    </ng-template>\n  </ng-container>\n\n  <ng-container *ngIf=\"loadingTextTemplate\">\n    <ng-template ng-loadingtext-tmp let-searchTerm=\"searchTerm\">\n      <ng-template\n        [ngTemplateOutlet]=\"loadingTextTemplate\"\n        [ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\"\n      >\n      </ng-template>\n    </ng-template>\n  </ng-container>\n\n  <ng-container *ngIf=\"tagTemplate\">\n    <ng-template ng-loadingtext-tmp let-searchTerm=\"searchTerm\">\n      <ng-template\n        [ngTemplateOutlet]=\"tagTemplate\"\n        [ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\"\n      >\n      </ng-template>\n    </ng-template>\n  </ng-container>\n\n  <ng-container *ngIf=\"typeToSearchTemplate\">\n    <ng-template ng-typetosearch-tmp>\n      <ng-template [ngTemplateOutlet]=\"typeToSearchTemplate\"></ng-template>\n    </ng-template>\n  </ng-container>\n\n  <ng-container *ngIf=\"multiLabelTemplate\">\n    <ng-template ng-multi-label-tmp let-items=\"items\" let-clear=\"clear\">\n      <ng-template\n        [ngTemplateOutlet]=\"multiLabelTemplate\"\n        [ngTemplateOutletContext]=\"{ items: items, clear: clear }\"\n      >\n      </ng-template>\n    </ng-template>\n  </ng-container>\n\n  <ng-container *ngIf=\"optgroupTemplate\">\n    <ng-template\n      ng-optgroup-tmp\n      let-item=\"item\"\n      let-item$=\"item$\"\n      let-index=\"index\"\n      let-searchTerm=\"searchTerm\"\n    >\n      <ng-template\n        [ngTemplateOutlet]=\"optgroupTemplate\"\n        [ngTemplateOutletContext]=\"{\n          item: item,\n          item$: item$,\n          index: index,\n          searchTerm: searchTerm\n        }\"\n      ></ng-template>\n    </ng-template>\n  </ng-container>\n</ng-select>\n\n<ng-template\n  #defaultOptionTemplate\n  let-item$=\"item$\"\n  let-searchTerm=\"searchTerm\"\n>\n  <span class=\"ng-option-label\" [ncOptionHighlight]=\"searchTerm\">{{\n    item$.label\n  }}</span>\n</ng-template>\n", styles: ["nc-select{display:block}.ng-select{text-align:left}.ng-select.ng-select-disabled>.ng-select-container{border-color:var(--input-disabled-border-color);color:var(--input-disabled-text-color)}.ng-select.ng-select-disabled>.ng-select-container .ng-value-container .ng-placeholder{color:var(--input-disabled-text-color)}.ng-select.ng-select-disabled .ng-arrow-wrapper .ng-arrow{background-color:var(--icon-disabled-bg)}.ng-select:not(.ng-select-disabled):not(.ng-select-opened):not(.ng-select-focused) .ng-select-container:hover{box-shadow:0 2px 4px 0 var(--input-hover-shadow-color);border-color:var(--input-hover-border-color);background-color:var(--input-hover-bg)}.ng-select .ng-arrow-wrapper{width:24px;height:24px}.ng-select .ng-arrow-wrapper .ng-arrow{display:inline-block;position:absolute!important;left:0;right:0;top:0;bottom:0;margin:auto;width:16px!important;height:16px!important;-webkit-mask:url(\"data:image/svg+xml,%3Csvg width%3D%2216%22 height%3D%2216%22 viewBox%3D%220 0 16 16%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0D%3Cpath fill-rule%3D%22evenodd%22 clip-rule%3D%22evenodd%22 d%3D%22M13 3H2V5H13V3ZM2 8V6H8.70551C9.40388 5.679 10.181 5.5 11 5.5C12.576 5.5 13.9972 6.16289 15 7.22506V3C15 1.89543 14.1046 1 13 1H2C0.895431 1 0 1.89543 0 3V11C0 12.1046 0.89543 13 2 13H5.87494C5.63286 12.3801 5.5 11.7056 5.5 11H2L2 9H5.87494C6.01259 8.64754 6.18555 8.31275 6.38947 8H2ZM11 13C12.1046 13 13 12.1046 13 11C13 9.89543 12.1046 9 11 9C9.89543 9 9 9.89543 9 11C9 12.1046 9.89543 13 11 13ZM11 15C11.7418 15 12.4365 14.7981 13.032 14.4462L14.2929 15.7071C14.6834 16.0976 15.3166 16.0976 15.7071 15.7071C16.0976 15.3166 16.0976 14.6834 15.7071 14.2929L14.4462 13.032C14.7981 12.4365 15 11.7418 15 11C15 8.79086 13.2091 7 11 7C8.79086 7 7 8.79086 7 11C7 13.2091 8.79086 15 11 15Z%22 fill%3D%22%230087E0%22%2F%3E%0D%3C%2Fsvg%3E%0D\") no-repeat;mask:url(\"data:image/svg+xml,%3Csvg width%3D%2216%22 height%3D%2216%22 viewBox%3D%220 0 16 16%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0D%3Cpath fill-rule%3D%22evenodd%22 clip-rule%3D%22evenodd%22 d%3D%22M13 3H2V5H13V3ZM2 8V6H8.70551C9.40388 5.679 10.181 5.5 11 5.5C12.576 5.5 13.9972 6.16289 15 7.22506V3C15 1.89543 14.1046 1 13 1H2C0.895431 1 0 1.89543 0 3V11C0 12.1046 0.89543 13 2 13H5.87494C5.63286 12.3801 5.5 11.7056 5.5 11H2L2 9H5.87494C6.01259 8.64754 6.18555 8.31275 6.38947 8H2ZM11 13C12.1046 13 13 12.1046 13 11C13 9.89543 12.1046 9 11 9C9.89543 9 9 9.89543 9 11C9 12.1046 9.89543 13 11 13ZM11 15C11.7418 15 12.4365 14.7981 13.032 14.4462L14.2929 15.7071C14.6834 16.0976 15.3166 16.0976 15.7071 15.7071C16.0976 15.3166 16.0976 14.6834 15.7071 14.2929L14.4462 13.032C14.7981 12.4365 15 11.7418 15 11C15 8.79086 13.2091 7 11 7C8.79086 7 7 8.79086 7 11C7 13.2091 8.79086 15 11 15Z%22 fill%3D%22%230087E0%22%2F%3E%0D%3C%2Fsvg%3E%0D\") no-repeat;background-color:var(--icon-bg)}.ng-select:not(.ng-select-disabled){cursor:pointer}.ng-select:not(.ng-select-disabled) .ng-arrow-wrapper:hover .ng-arrow{background-color:var(--icon-hover-bg)}.ng-select.ng-select-clearable .ng-select-container.ng-has-value .ng-arrow-wrapper{display:none}.ng-select.ng-select-opened>.ng-select-container,.ng-select.ng-select-focused>.ng-select-container{border-color:var(--button-focus-border-color);box-shadow:inset 0 0 0 1px var(--button-focus-border-color),0 2px 4px 0 var(--button-focus-shadow-color)}.ng-select .ng-has-value .ng-placeholder{display:none}.ng-select .ng-select-container{background:var(--input-bg);padding-right:3px;border:1px solid var(--input-border-color);min-height:32px;align-items:center}.ng-select .ng-select-container .ng-value-container{align-items:center;padding-left:10px}.ng-select .ng-select-container .ng-value-container .ng-placeholder{font-style:italic;color:var(--input-placeholder-color)}.ng-select.ng-select-single.ng-select-loading .ng-select-container .ng-value-container .ng-input{padding-right:75px}.ng-select.ng-select-single .ng-select-container{height:32px}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input{top:0;left:0;padding-left:10px;padding-right:50px}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input input{height:28px;padding:0}.ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value .ng-value-label{padding-right:5px}.ng-select.ng-select-multiple .ng-select-container .ng-value-container{padding-top:4px;padding-left:7px}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{line-height:18px;font-size:.9em;position:relative;margin-bottom:4px;background-color:#dceefa;border-radius:2px;margin-right:5px}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled .ng-value-label{padding-left:5px}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-label{display:inline-block;padding:1px 22px 1px 5px}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon{position:absolute;display:inline-block;padding:1px 5px;right:0;color:#0087e0;font-size:14px}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input{padding:0 0 3px 3px}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input input{height:13px;padding-left:0;padding-right:0}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{top:5px;padding-bottom:5px;padding-left:3px}.ng-select .ng-clear-wrapper{width:24px!important;height:24px!important}.ng-select .ng-clear-wrapper .ng-clear{display:block;position:absolute;width:9px;height:9px;top:50%;left:50%;transform:translate(-50%,-50%);overflow:hidden;text-indent:-9999px;background:url(\"data:image/svg+xml,%3Csvg width%3D%228%22 height%3D%228%22 viewBox%3D%220 0 8 8%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0D%3Cpath d%3D%22M1 1L7 7M7 1L1 7%22 stroke%3D%22%236A6C6D%22 stroke-width%3D%222%22 stroke-linecap%3D%22round%22%2F%3E%0D%3C%2Fsvg%3E%0D\") no-repeat transparent}.ng-select .ng-spinner-zone{padding:5px 5px 0 0}.ng-select .ng-spinner-loader{width:24px!important;height:24px!important;border-radius:0!important;margin-right:0!important;position:relative!important;text-indent:0!important;border:0!important;transform:none!important;-webkit-animation:none!important;animation:none!important;background-image:url(\"data:image/svg+xml,%3Csvg version%3D%221.0%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2248px%22 height%3D%2248px%22 viewBox%3D%220 0 48 48%22%3E%3Cstyle type%3D%22text%2Fcss%22%3E.a%7Bfill%3Aurl(%23g)%7D%3C%2Fstyle%3E%3Cg%3E%3ClinearGradient id%3D%22g%22 gradientUnits%3D%22userSpaceOnUse%22 x1%3D%2216.72%22 y1%3D%2216.97%22 x2%3D%2248%22 y2%3D%2216.97%22%3E%3Cstop offset%3D%220%22 style%3D%22stop-color%3A%23007aca%3Bstop-opacity%3A0%22%2F%3E%3Cstop offset%3D%221%22 style%3D%22stop-color%3A%23007aca%22%2F%3E%3C%2FlinearGradient%3E%3Cpath id%3D%22p%22 class%3D%22a%22 d%3D%22M43.1%2C33.9c-0.4%2C0-0.8-0.1-1.2-0.2c-2.1-0.7-3.3-2.9-2.6-5c0.5-1.5%2C0.7-3.1%2C0.7-4.8 c0-8.8-7.2-16-16-16c-0.9%2C0-1.8%2C0.1-2.6%2C0.2c-2.2%2C0.4-4.2-1.1-4.6-3.3c-0.4-2.2%2C1.1-4.2%2C3.3-4.6C21.4%2C0.1%2C22.7%2C0%2C24%2C0 c13.2%2C0%2C24%2C10.8%2C24%2C24c0%2C2.4-0.4%2C4.8-1.1%2C7.1C46.4%2C32.8%2C44.8%2C33.9%2C43.1%2C33.9z%22%3E%3CanimateTransform attributeName%3D%22transform%22 type%3D%22rotate%22 repeatCount%3D%22indefinite%22 dur%3D%221s%22 keyTimes%3D%220%3B1%22 values%3D%220 24 24%3B360 24 24%22%2F%3E%3C%2Fpath%3E%3C%2Fg%3E%3C%2Fsvg%3E\")!important;background-size:17px;background-repeat:no-repeat;background-position:4px 4px}.ng-select.ng-select-disabled .ng-spinner-loader{background-image:url(\"data:image/svg+xml,%3Csvg version%3D%221.0%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2248px%22 height%3D%2248px%22 viewBox%3D%220 0 48 48%22%3E%3Cstyle type%3D%22text%2Fcss%22%3E.a%7Bfill%3Aurl(%23g)%7D%3C%2Fstyle%3E%3Cg%3E%3ClinearGradient id%3D%22g%22 gradientUnits%3D%22userSpaceOnUse%22 x1%3D%2216.72%22 y1%3D%2216.97%22 x2%3D%2248%22 y2%3D%2216.97%22%3E%3Cstop offset%3D%220%22 style%3D%22stop-color%3A%23959799%3Bstop-opacity%3A0%22%2F%3E%3Cstop offset%3D%221%22 style%3D%22stop-color%3A%23959799%22%2F%3E%3C%2FlinearGradient%3E%3Cpath id%3D%22p%22 class%3D%22a%22 d%3D%22M43.1%2C33.9c-0.4%2C0-0.8-0.1-1.2-0.2c-2.1-0.7-3.3-2.9-2.6-5c0.5-1.5%2C0.7-3.1%2C0.7-4.8 c0-8.8-7.2-16-16-16c-0.9%2C0-1.8%2C0.1-2.6%2C0.2c-2.2%2C0.4-4.2-1.1-4.6-3.3c-0.4-2.2%2C1.1-4.2%2C3.3-4.6C21.4%2C0.1%2C22.7%2C0%2C24%2C0 c13.2%2C0%2C24%2C10.8%2C24%2C24c0%2C2.4-0.4%2C4.8-1.1%2C7.1C46.4%2C32.8%2C44.8%2C33.9%2C43.1%2C33.9z%22%3E%3CanimateTransform attributeName%3D%22transform%22 type%3D%22rotate%22 repeatCount%3D%22indefinite%22 dur%3D%221s%22 keyTimes%3D%220%3B1%22 values%3D%220 24 24%3B360 24 24%22%2F%3E%3C%2Fpath%3E%3C%2Fg%3E%3C%2Fsvg%3E\")!important}.ng-dropdown-panel{background-color:var(--dropdown-menu-bg);box-shadow:0 5px 10px 0 var(--dropdown-menu-shadow-color);left:0;min-width:100%}.ng-dropdown-panel.ng-select-bottom{top:100%}.ng-dropdown-panel.ng-select-top{bottom:100%}.ng-dropdown-panel .ng-dropdown-header{border-bottom:1px solid #f0f2f5;padding:5px 7px}.ng-dropdown-panel .ng-dropdown-footer{border-top:1px solid #f0f2f5;padding:5px 7px}.ng-dropdown-panel .ng-dropdown-panel-items{margin-bottom:1px;max-height:224px!important}.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup{-webkit-user-select:none;-moz-user-select:none;user-select:none;padding:8px 10px;font-weight:500;cursor:pointer}.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup.ng-option-disabled{cursor:default}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option{background-color:var(--dropdown-menu-bg);color:var(--dropdown-menu-text-color);padding:4px 10px}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-selected,.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-marked{background-color:var(--dropdown-menu-hover-bg)}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-disabled{color:var(--button-disabled-text-color)}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-child{padding-left:22px}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .ng-tag-label{font-weight:400;padding-right:5px}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .nc-highlighted{font-weight:400!important;text-decoration:none!important;background-color:#ffeacc}.ng-select-auto-panel-width.ng-dropdown-panel{width:auto!important}.has-error .ng-select .ng-select-container{border-color:#d93644!important;box-shadow:none!important}.has-error .ng-select.ng-select-focused .ng-select-container{box-shadow:inset 0 0 0 1px #d93644!important}\n"], components: [{ type: i1$2.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }], directives: [{ type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i1$2.NgOptionTemplateDirective, selector: "[ng-option-tmp]" }, { type: i1$3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$2.NgHeaderTemplateDirective, selector: "[ng-header-tmp]" }, { type: i1$2.NgLabelTemplateDirective, selector: "[ng-label-tmp]" }, { type: i1$2.NgFooterTemplateDirective, selector: "[ng-footer-tmp]" }, { type: i1$2.NgNotFoundTemplateDirective, selector: "[ng-notfound-tmp]" }, { type: i1$2.NgLoadingTextTemplateDirective, selector: "[ng-loadingtext-tmp]" }, { type: i1$2.NgTypeToSearchTemplateDirective, selector: "[ng-typetosearch-tmp]" }, { type: i1$2.NgMultiLabelTemplateDirective, selector: "[ng-multi-label-tmp]" }, { type: i1$2.NgOptgroupTemplateDirective, selector: "[ng-optgroup-tmp]" }, { type: NcOptionHighlightDirective, selector: "[ncOptionHighlight]", inputs: ["ncOptionHighlight"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcSelectComponent, decorators: [{
            type: Component,
            args: [{ selector: 'nc-select', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
                        {
                            provide: NG_VALUE_ACCESSOR,
                            useExisting: forwardRef(() => NcSelectComponent),
                            multi: true,
                        },
                    ], template: "<ng-select\n  [class.ng-select-loading]=\"loading\"\n  [class.ng-select-clearable]=\"clearable\"\n  [items]=\"items\"\n  [ngModel]=\"value\"\n  (ngModelChange)=\"onChange($event)\"\n  [clearable]=\"clearable\"\n  [searchable]=\"true\"\n  [multiple]=\"multiple\"\n  [loading]=\"loading\"\n  [placeholder]=\"placeholder\"\n  [bindLabel]=\"bindLabel\"\n  [bindValue]=\"bindValue\"\n  [hideSelected]=\"hideSelected\"\n  [appendTo]=\"appendTo\"\n  [clearSearchOnAdd]=\"clearSearchOnAdd\"\n  [addTag]=\"addTag\"\n  [clearOnBackspace]=\"clearOnBackspace\"\n  [markFirst]=\"markFirst\"\n  [isOpen]=\"isOpen\"\n  [closeOnSelect]=\"closeOnSelect\"\n  [maxSelectedItems]=\"maxSelectedItems\"\n  [openOnEnter]=\"openOnEnter\"\n  [selectOnTab]=\"selectOnTab\"\n  [dropdownPosition]=\"dropdownPosition\"\n  [groupBy]=\"groupBy\"\n  [groupValue]=\"groupValue\"\n  [typeahead]=\"typeahead\"\n  [virtualScroll]=\"virtualScroll\"\n  [bufferAmount]=\"bufferAmount\"\n  [selectableGroup]=\"selectableGroup\"\n  [selectableGroupAsModel]=\"selectableGroupAsModel\"\n  [searchFn]=\"searchFn\"\n  [labelForId]=\"labelForId\"\n  [disabled]=\"disabled\"\n  (blur)=\"blurEvent.emit($event)\"\n  (focus)=\"focusEvent.emit($event)\"\n  (open)=\"onOpen($event)\"\n  (close)=\"onClose()\"\n  (search)=\"searchEvent.emit($event)\"\n  (clear)=\"clearEvent.emit($event)\"\n  (add)=\"addEvent.emit($event)\"\n  (remove)=\"removeEvent.emit($event)\"\n  (scroll)=\"scrollEvent.emit($event)\"\n  (scrollToEnd)=\"scrollToEndEvent.emit($event)\"\n>\n  <ng-template\n    ng-option-tmp\n    let-item=\"item\"\n    let-item$=\"item$\"\n    let-index=\"index\"\n    let-searchTerm=\"searchTerm\"\n  >\n    <ng-template\n      [ngTemplateOutlet]=\"optionTemplate || defaultOptionTemplate\"\n      [ngTemplateOutletContext]=\"{\n        item: item,\n        item$: item$,\n        index: index,\n        searchTerm: searchTerm\n      }\"\n    ></ng-template>\n  </ng-template>\n\n  <ng-container *ngIf=\"headerTemplate\">\n    <ng-template ng-header-tmp let-searchTerm=\"searchTerm\">\n      <ng-template\n        [ngTemplateOutlet]=\"headerTemplate\"\n        [ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\"\n      >\n      </ng-template>\n    </ng-template>\n  </ng-container>\n\n  <ng-container *ngIf=\"labelTemplate\">\n    <ng-template\n      ng-label-tmp\n      let-item=\"item\"\n      let-clear=\"clear\"\n      let-label=\"label\"\n    >\n      <ng-template\n        [ngTemplateOutlet]=\"labelTemplate\"\n        [ngTemplateOutletContext]=\"{ item: item, clear: clear, label: label }\"\n      ></ng-template>\n    </ng-template>\n  </ng-container>\n\n  <ng-container *ngIf=\"footerTemplate\">\n    <ng-template ng-footer-tmp let-searchTerm=\"searchTerm\">\n      <ng-template\n        [ngTemplateOutlet]=\"footerTemplate\"\n        [ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\"\n      >\n      </ng-template>\n    </ng-template>\n  </ng-container>\n\n  <ng-container *ngIf=\"notFoundTemplate\">\n    <ng-template ng-notfound-tmp let-searchTerm=\"searchTerm\">\n      <ng-template\n        [ngTemplateOutlet]=\"notFoundTemplate\"\n        [ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\"\n      >\n      </ng-template>\n    </ng-template>\n  </ng-container>\n\n  <ng-container *ngIf=\"loadingTextTemplate\">\n    <ng-template ng-loadingtext-tmp let-searchTerm=\"searchTerm\">\n      <ng-template\n        [ngTemplateOutlet]=\"loadingTextTemplate\"\n        [ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\"\n      >\n      </ng-template>\n    </ng-template>\n  </ng-container>\n\n  <ng-container *ngIf=\"tagTemplate\">\n    <ng-template ng-loadingtext-tmp let-searchTerm=\"searchTerm\">\n      <ng-template\n        [ngTemplateOutlet]=\"tagTemplate\"\n        [ngTemplateOutletContext]=\"{ searchTerm: searchTerm }\"\n      >\n      </ng-template>\n    </ng-template>\n  </ng-container>\n\n  <ng-container *ngIf=\"typeToSearchTemplate\">\n    <ng-template ng-typetosearch-tmp>\n      <ng-template [ngTemplateOutlet]=\"typeToSearchTemplate\"></ng-template>\n    </ng-template>\n  </ng-container>\n\n  <ng-container *ngIf=\"multiLabelTemplate\">\n    <ng-template ng-multi-label-tmp let-items=\"items\" let-clear=\"clear\">\n      <ng-template\n        [ngTemplateOutlet]=\"multiLabelTemplate\"\n        [ngTemplateOutletContext]=\"{ items: items, clear: clear }\"\n      >\n      </ng-template>\n    </ng-template>\n  </ng-container>\n\n  <ng-container *ngIf=\"optgroupTemplate\">\n    <ng-template\n      ng-optgroup-tmp\n      let-item=\"item\"\n      let-item$=\"item$\"\n      let-index=\"index\"\n      let-searchTerm=\"searchTerm\"\n    >\n      <ng-template\n        [ngTemplateOutlet]=\"optgroupTemplate\"\n        [ngTemplateOutletContext]=\"{\n          item: item,\n          item$: item$,\n          index: index,\n          searchTerm: searchTerm\n        }\"\n      ></ng-template>\n    </ng-template>\n  </ng-container>\n</ng-select>\n\n<ng-template\n  #defaultOptionTemplate\n  let-item$=\"item$\"\n  let-searchTerm=\"searchTerm\"\n>\n  <span class=\"ng-option-label\" [ncOptionHighlight]=\"searchTerm\">{{\n    item$.label\n  }}</span>\n</ng-template>\n", styles: ["nc-select{display:block}.ng-select{text-align:left}.ng-select.ng-select-disabled>.ng-select-container{border-color:var(--input-disabled-border-color);color:var(--input-disabled-text-color)}.ng-select.ng-select-disabled>.ng-select-container .ng-value-container .ng-placeholder{color:var(--input-disabled-text-color)}.ng-select.ng-select-disabled .ng-arrow-wrapper .ng-arrow{background-color:var(--icon-disabled-bg)}.ng-select:not(.ng-select-disabled):not(.ng-select-opened):not(.ng-select-focused) .ng-select-container:hover{box-shadow:0 2px 4px 0 var(--input-hover-shadow-color);border-color:var(--input-hover-border-color);background-color:var(--input-hover-bg)}.ng-select .ng-arrow-wrapper{width:24px;height:24px}.ng-select .ng-arrow-wrapper .ng-arrow{display:inline-block;position:absolute!important;left:0;right:0;top:0;bottom:0;margin:auto;width:16px!important;height:16px!important;-webkit-mask:url(\"data:image/svg+xml,%3Csvg width%3D%2216%22 height%3D%2216%22 viewBox%3D%220 0 16 16%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0D%3Cpath fill-rule%3D%22evenodd%22 clip-rule%3D%22evenodd%22 d%3D%22M13 3H2V5H13V3ZM2 8V6H8.70551C9.40388 5.679 10.181 5.5 11 5.5C12.576 5.5 13.9972 6.16289 15 7.22506V3C15 1.89543 14.1046 1 13 1H2C0.895431 1 0 1.89543 0 3V11C0 12.1046 0.89543 13 2 13H5.87494C5.63286 12.3801 5.5 11.7056 5.5 11H2L2 9H5.87494C6.01259 8.64754 6.18555 8.31275 6.38947 8H2ZM11 13C12.1046 13 13 12.1046 13 11C13 9.89543 12.1046 9 11 9C9.89543 9 9 9.89543 9 11C9 12.1046 9.89543 13 11 13ZM11 15C11.7418 15 12.4365 14.7981 13.032 14.4462L14.2929 15.7071C14.6834 16.0976 15.3166 16.0976 15.7071 15.7071C16.0976 15.3166 16.0976 14.6834 15.7071 14.2929L14.4462 13.032C14.7981 12.4365 15 11.7418 15 11C15 8.79086 13.2091 7 11 7C8.79086 7 7 8.79086 7 11C7 13.2091 8.79086 15 11 15Z%22 fill%3D%22%230087E0%22%2F%3E%0D%3C%2Fsvg%3E%0D\") no-repeat;mask:url(\"data:image/svg+xml,%3Csvg width%3D%2216%22 height%3D%2216%22 viewBox%3D%220 0 16 16%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0D%3Cpath fill-rule%3D%22evenodd%22 clip-rule%3D%22evenodd%22 d%3D%22M13 3H2V5H13V3ZM2 8V6H8.70551C9.40388 5.679 10.181 5.5 11 5.5C12.576 5.5 13.9972 6.16289 15 7.22506V3C15 1.89543 14.1046 1 13 1H2C0.895431 1 0 1.89543 0 3V11C0 12.1046 0.89543 13 2 13H5.87494C5.63286 12.3801 5.5 11.7056 5.5 11H2L2 9H5.87494C6.01259 8.64754 6.18555 8.31275 6.38947 8H2ZM11 13C12.1046 13 13 12.1046 13 11C13 9.89543 12.1046 9 11 9C9.89543 9 9 9.89543 9 11C9 12.1046 9.89543 13 11 13ZM11 15C11.7418 15 12.4365 14.7981 13.032 14.4462L14.2929 15.7071C14.6834 16.0976 15.3166 16.0976 15.7071 15.7071C16.0976 15.3166 16.0976 14.6834 15.7071 14.2929L14.4462 13.032C14.7981 12.4365 15 11.7418 15 11C15 8.79086 13.2091 7 11 7C8.79086 7 7 8.79086 7 11C7 13.2091 8.79086 15 11 15Z%22 fill%3D%22%230087E0%22%2F%3E%0D%3C%2Fsvg%3E%0D\") no-repeat;background-color:var(--icon-bg)}.ng-select:not(.ng-select-disabled){cursor:pointer}.ng-select:not(.ng-select-disabled) .ng-arrow-wrapper:hover .ng-arrow{background-color:var(--icon-hover-bg)}.ng-select.ng-select-clearable .ng-select-container.ng-has-value .ng-arrow-wrapper{display:none}.ng-select.ng-select-opened>.ng-select-container,.ng-select.ng-select-focused>.ng-select-container{border-color:var(--button-focus-border-color);box-shadow:inset 0 0 0 1px var(--button-focus-border-color),0 2px 4px 0 var(--button-focus-shadow-color)}.ng-select .ng-has-value .ng-placeholder{display:none}.ng-select .ng-select-container{background:var(--input-bg);padding-right:3px;border:1px solid var(--input-border-color);min-height:32px;align-items:center}.ng-select .ng-select-container .ng-value-container{align-items:center;padding-left:10px}.ng-select .ng-select-container .ng-value-container .ng-placeholder{font-style:italic;color:var(--input-placeholder-color)}.ng-select.ng-select-single.ng-select-loading .ng-select-container .ng-value-container .ng-input{padding-right:75px}.ng-select.ng-select-single .ng-select-container{height:32px}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input{top:0;left:0;padding-left:10px;padding-right:50px}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input input{height:28px;padding:0}.ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value .ng-value-label{padding-right:5px}.ng-select.ng-select-multiple .ng-select-container .ng-value-container{padding-top:4px;padding-left:7px}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{line-height:18px;font-size:.9em;position:relative;margin-bottom:4px;background-color:#dceefa;border-radius:2px;margin-right:5px}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled .ng-value-label{padding-left:5px}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-label{display:inline-block;padding:1px 22px 1px 5px}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon{position:absolute;display:inline-block;padding:1px 5px;right:0;color:#0087e0;font-size:14px}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input{padding:0 0 3px 3px}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input input{height:13px;padding-left:0;padding-right:0}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{top:5px;padding-bottom:5px;padding-left:3px}.ng-select .ng-clear-wrapper{width:24px!important;height:24px!important}.ng-select .ng-clear-wrapper .ng-clear{display:block;position:absolute;width:9px;height:9px;top:50%;left:50%;transform:translate(-50%,-50%);overflow:hidden;text-indent:-9999px;background:url(\"data:image/svg+xml,%3Csvg width%3D%228%22 height%3D%228%22 viewBox%3D%220 0 8 8%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0D%3Cpath d%3D%22M1 1L7 7M7 1L1 7%22 stroke%3D%22%236A6C6D%22 stroke-width%3D%222%22 stroke-linecap%3D%22round%22%2F%3E%0D%3C%2Fsvg%3E%0D\") no-repeat transparent}.ng-select .ng-spinner-zone{padding:5px 5px 0 0}.ng-select .ng-spinner-loader{width:24px!important;height:24px!important;border-radius:0!important;margin-right:0!important;position:relative!important;text-indent:0!important;border:0!important;transform:none!important;-webkit-animation:none!important;animation:none!important;background-image:url(\"data:image/svg+xml,%3Csvg version%3D%221.0%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2248px%22 height%3D%2248px%22 viewBox%3D%220 0 48 48%22%3E%3Cstyle type%3D%22text%2Fcss%22%3E.a%7Bfill%3Aurl(%23g)%7D%3C%2Fstyle%3E%3Cg%3E%3ClinearGradient id%3D%22g%22 gradientUnits%3D%22userSpaceOnUse%22 x1%3D%2216.72%22 y1%3D%2216.97%22 x2%3D%2248%22 y2%3D%2216.97%22%3E%3Cstop offset%3D%220%22 style%3D%22stop-color%3A%23007aca%3Bstop-opacity%3A0%22%2F%3E%3Cstop offset%3D%221%22 style%3D%22stop-color%3A%23007aca%22%2F%3E%3C%2FlinearGradient%3E%3Cpath id%3D%22p%22 class%3D%22a%22 d%3D%22M43.1%2C33.9c-0.4%2C0-0.8-0.1-1.2-0.2c-2.1-0.7-3.3-2.9-2.6-5c0.5-1.5%2C0.7-3.1%2C0.7-4.8 c0-8.8-7.2-16-16-16c-0.9%2C0-1.8%2C0.1-2.6%2C0.2c-2.2%2C0.4-4.2-1.1-4.6-3.3c-0.4-2.2%2C1.1-4.2%2C3.3-4.6C21.4%2C0.1%2C22.7%2C0%2C24%2C0 c13.2%2C0%2C24%2C10.8%2C24%2C24c0%2C2.4-0.4%2C4.8-1.1%2C7.1C46.4%2C32.8%2C44.8%2C33.9%2C43.1%2C33.9z%22%3E%3CanimateTransform attributeName%3D%22transform%22 type%3D%22rotate%22 repeatCount%3D%22indefinite%22 dur%3D%221s%22 keyTimes%3D%220%3B1%22 values%3D%220 24 24%3B360 24 24%22%2F%3E%3C%2Fpath%3E%3C%2Fg%3E%3C%2Fsvg%3E\")!important;background-size:17px;background-repeat:no-repeat;background-position:4px 4px}.ng-select.ng-select-disabled .ng-spinner-loader{background-image:url(\"data:image/svg+xml,%3Csvg version%3D%221.0%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2248px%22 height%3D%2248px%22 viewBox%3D%220 0 48 48%22%3E%3Cstyle type%3D%22text%2Fcss%22%3E.a%7Bfill%3Aurl(%23g)%7D%3C%2Fstyle%3E%3Cg%3E%3ClinearGradient id%3D%22g%22 gradientUnits%3D%22userSpaceOnUse%22 x1%3D%2216.72%22 y1%3D%2216.97%22 x2%3D%2248%22 y2%3D%2216.97%22%3E%3Cstop offset%3D%220%22 style%3D%22stop-color%3A%23959799%3Bstop-opacity%3A0%22%2F%3E%3Cstop offset%3D%221%22 style%3D%22stop-color%3A%23959799%22%2F%3E%3C%2FlinearGradient%3E%3Cpath id%3D%22p%22 class%3D%22a%22 d%3D%22M43.1%2C33.9c-0.4%2C0-0.8-0.1-1.2-0.2c-2.1-0.7-3.3-2.9-2.6-5c0.5-1.5%2C0.7-3.1%2C0.7-4.8 c0-8.8-7.2-16-16-16c-0.9%2C0-1.8%2C0.1-2.6%2C0.2c-2.2%2C0.4-4.2-1.1-4.6-3.3c-0.4-2.2%2C1.1-4.2%2C3.3-4.6C21.4%2C0.1%2C22.7%2C0%2C24%2C0 c13.2%2C0%2C24%2C10.8%2C24%2C24c0%2C2.4-0.4%2C4.8-1.1%2C7.1C46.4%2C32.8%2C44.8%2C33.9%2C43.1%2C33.9z%22%3E%3CanimateTransform attributeName%3D%22transform%22 type%3D%22rotate%22 repeatCount%3D%22indefinite%22 dur%3D%221s%22 keyTimes%3D%220%3B1%22 values%3D%220 24 24%3B360 24 24%22%2F%3E%3C%2Fpath%3E%3C%2Fg%3E%3C%2Fsvg%3E\")!important}.ng-dropdown-panel{background-color:var(--dropdown-menu-bg);box-shadow:0 5px 10px 0 var(--dropdown-menu-shadow-color);left:0;min-width:100%}.ng-dropdown-panel.ng-select-bottom{top:100%}.ng-dropdown-panel.ng-select-top{bottom:100%}.ng-dropdown-panel .ng-dropdown-header{border-bottom:1px solid #f0f2f5;padding:5px 7px}.ng-dropdown-panel .ng-dropdown-footer{border-top:1px solid #f0f2f5;padding:5px 7px}.ng-dropdown-panel .ng-dropdown-panel-items{margin-bottom:1px;max-height:224px!important}.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup{-webkit-user-select:none;-moz-user-select:none;user-select:none;padding:8px 10px;font-weight:500;cursor:pointer}.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup.ng-option-disabled{cursor:default}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option{background-color:var(--dropdown-menu-bg);color:var(--dropdown-menu-text-color);padding:4px 10px}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-selected,.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-marked{background-color:var(--dropdown-menu-hover-bg)}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-disabled{color:var(--button-disabled-text-color)}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-child{padding-left:22px}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .ng-tag-label{font-weight:400;padding-right:5px}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .nc-highlighted{font-weight:400!important;text-decoration:none!important;background-color:#ffeacc}.ng-select-auto-panel-width.ng-dropdown-panel{width:auto!important}.has-error .ng-select .ng-select-container{border-color:#d93644!important;box-shadow:none!important}.has-error .ng-select.ng-select-focused .ng-select-container{box-shadow:inset 0 0 0 1px #d93644!important}\n"] }]
        }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: i0.NgZone }]; }, propDecorators: { items: [{
                type: Input
            }], clearable: [{
                type: Input
            }], multiple: [{
                type: Input
            }], loading: [{
                type: Input
            }], placeholder: [{
                type: Input
            }], bindLabel: [{
                type: Input
            }], bindValue: [{
                type: Input
            }], hideSelected: [{
                type: Input
            }], appendTo: [{
                type: Input
            }], clearSearchOnAdd: [{
                type: Input
            }], clearOnBackspace: [{
                type: Input
            }], markFirst: [{
                type: Input
            }], isOpen: [{
                type: Input
            }], closeOnSelect: [{
                type: Input
            }], maxSelectedItems: [{
                type: Input
            }], openOnEnter: [{
                type: Input
            }], selectOnTab: [{
                type: Input
            }], addTag: [{
                type: Input
            }], dropdownPosition: [{
                type: Input
            }], groupBy: [{
                type: Input
            }], groupValue: [{
                type: Input
            }], typeahead: [{
                type: Input
            }], virtualScroll: [{
                type: Input
            }], bufferAmount: [{
                type: Input
            }], selectableGroup: [{
                type: Input
            }], selectableGroupAsModel: [{
                type: Input
            }], searchFn: [{
                type: Input
            }], labelForId: [{
                type: Input
            }], autoPanelWidth: [{
                type: Input
            }], disabledBinding: [{
                type: Input,
                args: ['disabled']
            }], valueBinding: [{
                type: Input,
                args: ['value']
            }], blurEvent: [{
                type: Output,
                args: ['blur']
            }], focusEvent: [{
                type: Output,
                args: ['focus']
            }], changeEvent: [{
                type: Output,
                args: ['change']
            }], openEvent: [{
                type: Output,
                args: ['open']
            }], closeEvent: [{
                type: Output,
                args: ['close']
            }], searchEvent: [{
                type: Output,
                args: ['search']
            }], clearEvent: [{
                type: Output,
                args: ['clear']
            }], addEvent: [{
                type: Output,
                args: ['add']
            }], removeEvent: [{
                type: Output,
                args: ['remove']
            }], scrollEvent: [{
                type: Output,
                args: ['scroll']
            }], scrollToEndEvent: [{
                type: Output,
                args: ['scrollToEnd']
            }], optionTemplate: [{
                type: ContentChild,
                args: [NcOptionTemplateDirective, { read: TemplateRef }]
            }], optgroupTemplate: [{
                type: ContentChild,
                args: [NcOptGroupTemplateDirective, { read: TemplateRef }]
            }], labelTemplate: [{
                type: ContentChild,
                args: [NcLabelTemplateDirective, { read: TemplateRef }]
            }], multiLabelTemplate: [{
                type: ContentChild,
                args: [NcMultiLabelTemplateDirective, { read: TemplateRef }]
            }], headerTemplate: [{
                type: ContentChild,
                args: [NcHeaderTemplateDirective, { read: TemplateRef }]
            }], footerTemplate: [{
                type: ContentChild,
                args: [NcFooterTemplateDirective, { read: TemplateRef }]
            }], notFoundTemplate: [{
                type: ContentChild,
                args: [NcNotFoundTemplateDirective, { read: TemplateRef }]
            }], typeToSearchTemplate: [{
                type: ContentChild,
                args: [NcTypeToSearchTemplateDirective, { read: TemplateRef }]
            }], loadingTextTemplate: [{
                type: ContentChild,
                args: [NcLoadingTextTemplateDirective, { read: TemplateRef }]
            }], tagTemplate: [{
                type: ContentChild,
                args: [NcTagTemplateDirective, { read: TemplateRef }]
            }], ngSelect: [{
                type: ViewChild,
                args: [NgSelectComponent, { static: true }]
            }] } });

class NcSelectModule {
}
NcSelectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NcSelectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcSelectModule, declarations: [NcSelectComponent,
        NcOptionTemplateDirective,
        NcOptGroupTemplateDirective,
        NcLabelTemplateDirective,
        NcMultiLabelTemplateDirective,
        NcHeaderTemplateDirective,
        NcFooterTemplateDirective,
        NcNotFoundTemplateDirective,
        NcTypeToSearchTemplateDirective,
        NcLoadingTextTemplateDirective,
        NcTagTemplateDirective,
        NcOptionHighlightDirective], imports: [CommonModule, FormsModule, NgSelectModule], exports: [NcSelectComponent,
        NcOptionTemplateDirective,
        NcOptGroupTemplateDirective,
        NcLabelTemplateDirective,
        NcMultiLabelTemplateDirective,
        NcHeaderTemplateDirective,
        NcFooterTemplateDirective,
        NcNotFoundTemplateDirective,
        NcTypeToSearchTemplateDirective,
        NcLoadingTextTemplateDirective,
        NcTagTemplateDirective,
        NcOptionHighlightDirective] });
NcSelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcSelectModule, providers: [], imports: [[CommonModule, FormsModule, NgSelectModule]] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcSelectModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [CommonModule, FormsModule, NgSelectModule],
                    exports: [
                        NcSelectComponent,
                        NcOptionTemplateDirective,
                        NcOptGroupTemplateDirective,
                        NcLabelTemplateDirective,
                        NcMultiLabelTemplateDirective,
                        NcHeaderTemplateDirective,
                        NcFooterTemplateDirective,
                        NcNotFoundTemplateDirective,
                        NcTypeToSearchTemplateDirective,
                        NcLoadingTextTemplateDirective,
                        NcTagTemplateDirective,
                        NcOptionHighlightDirective,
                    ],
                    declarations: [
                        NcSelectComponent,
                        NcOptionTemplateDirective,
                        NcOptGroupTemplateDirective,
                        NcLabelTemplateDirective,
                        NcMultiLabelTemplateDirective,
                        NcHeaderTemplateDirective,
                        NcFooterTemplateDirective,
                        NcNotFoundTemplateDirective,
                        NcTypeToSearchTemplateDirective,
                        NcLoadingTextTemplateDirective,
                        NcTagTemplateDirective,
                        NcOptionHighlightDirective,
                    ],
                    providers: [],
                }]
        }] });

const accordion = trigger('accordion', [
    state('collapsed, void', style({ height: '0', padding: '0', visibility: 'hidden' })),
    state('expanded', style({ height: '*', visibility: 'visible' })),
    transition('expanded <=> collapsed, void => collapsed', [
        animate('225ms ease-out'),
    ]),
]);

var animations = /*#__PURE__*/Object.freeze({
    __proto__: null,
    accordion: accordion
});

class NcISidebarItem {
}
class NcSidebarItemComponent extends NcISidebarItem {
    constructor(activeRouterLink, router, cdRef) {
        super();
        this.activeRouterLink = activeRouterLink;
        this.router = router;
        this.cdRef = cdRef;
        this.click = new EventEmitter();
    }
    get activeDirty() {
        const activeDirty = this._activeDirty;
        this._activeDirty = false;
        return activeDirty;
    }
    get hasRouterLink() {
        return !!this.routerLink && !!this.router;
    }
    set active(value) {
        this._active = value;
        this._activeDirty = value;
    }
    get active() {
        var _a;
        return (_a = this._active) !== null && _a !== void 0 ? _a : this._routerLinkActive;
    }
    ngDoCheck() {
        // Currently, no other way to get the new value of activeRouterLink.isActive
        this.checkActiveLink();
    }
    checkActiveLink() {
        var _a, _b, _c;
        if (this._routerLinkActive !== ((_a = this.activeRouterLink) === null || _a === void 0 ? void 0 : _a.isActive)) {
            this._routerLinkActive = (_b = this.activeRouterLink) === null || _b === void 0 ? void 0 : _b.isActive;
            this._activeDirty = !!((_c = this.activeRouterLink) === null || _c === void 0 ? void 0 : _c.isActive);
            this.cdRef.detectChanges();
        }
    }
}
NcSidebarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcSidebarItemComponent, deps: [{ token: i1$4.RouterLinkActive, optional: true, self: true }, { token: i1$4.Router, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
NcSidebarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: NcSidebarItemComponent, selector: "nc-sidebar-item", inputs: { routerLink: "routerLink", disabled: "disabled", href: "href", active: "active" }, outputs: { click: "click" }, providers: [{ provide: NcISidebarItem, useExisting: NcSidebarItemComponent }], viewQueries: [{ propertyName: "contentTpl", first: true, predicate: TemplateRef, descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-template>\n  <li [class.active]=\"active\" [class.disabled]=\"disabled\">\n    <a *ngIf=\"!hasRouterLink\" [attr.href]=\"href\" (click)=\"click.emit($event)\">\n      <ng-template [ngTemplateOutlet]=\"content\"></ng-template>\n    </a>\n\n    <a *ngIf=\"hasRouterLink\" [routerLink]=\"routerLink\">\n      <ng-template [ngTemplateOutlet]=\"content\"></ng-template>\n    </a>\n\n    <ng-template #content><ng-content></ng-content></ng-template>\n  </li>\n</ng-template>\n", directives: [{ type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i1$4.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcSidebarItemComponent, decorators: [{
            type: Component,
            args: [{ selector: 'nc-sidebar-item', providers: [{ provide: NcISidebarItem, useExisting: NcSidebarItemComponent }], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template>\n  <li [class.active]=\"active\" [class.disabled]=\"disabled\">\n    <a *ngIf=\"!hasRouterLink\" [attr.href]=\"href\" (click)=\"click.emit($event)\">\n      <ng-template [ngTemplateOutlet]=\"content\"></ng-template>\n    </a>\n\n    <a *ngIf=\"hasRouterLink\" [routerLink]=\"routerLink\">\n      <ng-template [ngTemplateOutlet]=\"content\"></ng-template>\n    </a>\n\n    <ng-template #content><ng-content></ng-content></ng-template>\n  </li>\n</ng-template>\n" }]
        }], ctorParameters: function () {
        return [{ type: i1$4.RouterLinkActive, decorators: [{
                        type: Optional
                    }, {
                        type: Self
                    }] }, { type: i1$4.Router, decorators: [{
                        type: Optional
                    }] }, { type: i0.ChangeDetectorRef }];
    }, propDecorators: { routerLink: [{
                type: Input
            }], disabled: [{
                type: Input
            }], href: [{
                type: Input
            }], active: [{
                type: Input
            }], click: [{
                type: Output
            }], contentTpl: [{
                type: ViewChild,
                args: [TemplateRef]
            }] } });

class NcSidebarComponent {
    constructor(cdRef) {
        this.cdRef = cdRef;
        this.hiddenMenuChange = new EventEmitter();
    }
    ngAfterContentInit() {
        this.sidebarItems.changes.subscribe(() => this.cdRef.markForCheck());
    }
    ngAfterViewInit() {
        this.cdRef.detectChanges();
    }
    toggleMenu() {
        this.hiddenMenu = !this.hiddenMenu;
        this.hiddenMenuChange.emit(this.hiddenMenu);
    }
}
NcSidebarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcSidebarComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
NcSidebarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: NcSidebarComponent, selector: "nc-sidebar", inputs: { accordion: "accordion", hiddenMenu: "hiddenMenu", secondary: "secondary" }, outputs: { hiddenMenuChange: "hiddenMenuChange" }, queries: [{ propertyName: "sidebarItems", predicate: NcISidebarItem }], exportAs: ["ncSidebar"], ngImport: i0, template: "<div\n  class=\"vertical-nav\"\n  [class.vertical-nav-secondary]=\"secondary\"\n  [class.hidden-menu]=\"hiddenMenu\"\n>\n  <ul>\n    <ng-container\n      *ngFor=\"let item of sidebarItems\"\n      [ngTemplateOutlet]=\"item.contentTpl\"\n    ></ng-container>\n\n    <li class=\"show-nav\">\n      <a (click)=\"toggleMenu()\"></a>\n    </li>\n  </ul>\n</div>\n", styles: [":host{display:block;height:100%}.vertical-nav{position:relative;top:unset;height:100%;padding-bottom:0}.vertical-nav>ul{height:100%;padding-bottom:0}\n"], directives: [{ type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcSidebarComponent, decorators: [{
            type: Component,
            args: [{ selector: 'nc-sidebar', exportAs: 'ncSidebar', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n  class=\"vertical-nav\"\n  [class.vertical-nav-secondary]=\"secondary\"\n  [class.hidden-menu]=\"hiddenMenu\"\n>\n  <ul>\n    <ng-container\n      *ngFor=\"let item of sidebarItems\"\n      [ngTemplateOutlet]=\"item.contentTpl\"\n    ></ng-container>\n\n    <li class=\"show-nav\">\n      <a (click)=\"toggleMenu()\"></a>\n    </li>\n  </ul>\n</div>\n", styles: [":host{display:block;height:100%}.vertical-nav{position:relative;top:unset;height:100%;padding-bottom:0}.vertical-nav>ul{height:100%;padding-bottom:0}\n"] }]
        }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { accordion: [{
                type: Input
            }], hiddenMenu: [{
                type: Input
            }], secondary: [{
                type: Input
            }], hiddenMenuChange: [{
                type: Output
            }], sidebarItems: [{
                type: ContentChildren,
                args: [NcISidebarItem]
            }] } });

class NcSidebarGroupComponent extends NcISidebarItem {
    constructor(sidebar, cdRef) {
        super();
        this.sidebar = sidebar;
        this.cdRef = cdRef;
        this.destroyed$ = new Subject();
    }
    set isOpen(value) {
        this._isOpen = value;
        if (value && this.sidebar.accordion) {
            this.closeOtherGroups();
        }
    }
    get isOpen() {
        return this._isOpen;
    }
    ngAfterContentChecked() {
        var _a;
        this.sidebarItems.changes
            .pipe(takeUntil(this.destroyed$))
            .subscribe(() => this.cdRef.detectChanges());
        const hasActiveDirtyItem = (_a = this.sidebarItems) === null || _a === void 0 ? void 0 : _a.some((i) => i.activeDirty);
        if (hasActiveDirtyItem && !this.isOpen) {
            this.toggle();
        }
    }
    ngOnDestroy() {
        this.destroyed$.next();
        this.destroyed$.complete();
    }
    toggle() {
        this.isOpen = !this.isOpen;
        this.cdRef.detectChanges();
    }
    closeOtherGroups() {
        var _a;
        (_a = this.sidebar.sidebarItems) === null || _a === void 0 ? void 0 : _a.filter((item) => item instanceof NcSidebarGroupComponent && item !== this).forEach((item) => (item.isOpen = false));
    }
}
NcSidebarGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcSidebarGroupComponent, deps: [{ token: NcSidebarComponent }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
NcSidebarGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: NcSidebarGroupComponent, selector: "nc-sidebar-group", inputs: { disabled: "disabled", isOpen: "isOpen" }, providers: [
        { provide: NcISidebarItem, useExisting: NcSidebarGroupComponent },
    ], queries: [{ propertyName: "sidebarItems", predicate: NcSidebarItemComponent }], viewQueries: [{ propertyName: "contentTpl", first: true, predicate: TemplateRef, descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-template>\n  <li [class.active]=\"isOpen\" [class.disabled]=\"disabled\">\n    <a (click)=\"toggle(); $event.preventDefault()\" href=\"\" draggable=\"false\">\n      <ng-content></ng-content>\n    </a>\n\n    <ul [@accordion]=\"isOpen ? 'expanded' : 'collapsed'\">\n      <ng-container *ngFor=\"let item of sidebarItems\">\n        <ng-container\n          *ngIf=\"item !== $any(this)\"\n          [ngTemplateOutlet]=\"item.contentTpl\"\n        ></ng-container>\n      </ng-container>\n    </ul>\n  </li>\n</ng-template>\n", styles: ["ul{overflow:hidden;display:block!important}\n"], directives: [{ type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], animations: [accordion], changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcSidebarGroupComponent, decorators: [{
            type: Component,
            args: [{ selector: 'nc-sidebar-group', providers: [
                        { provide: NcISidebarItem, useExisting: NcSidebarGroupComponent },
                    ], changeDetection: ChangeDetectionStrategy.OnPush, animations: [accordion], template: "<ng-template>\n  <li [class.active]=\"isOpen\" [class.disabled]=\"disabled\">\n    <a (click)=\"toggle(); $event.preventDefault()\" href=\"\" draggable=\"false\">\n      <ng-content></ng-content>\n    </a>\n\n    <ul [@accordion]=\"isOpen ? 'expanded' : 'collapsed'\">\n      <ng-container *ngFor=\"let item of sidebarItems\">\n        <ng-container\n          *ngIf=\"item !== $any(this)\"\n          [ngTemplateOutlet]=\"item.contentTpl\"\n        ></ng-container>\n      </ng-container>\n    </ul>\n  </li>\n</ng-template>\n", styles: ["ul{overflow:hidden;display:block!important}\n"] }]
        }], ctorParameters: function () { return [{ type: NcSidebarComponent }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { disabled: [{
                type: Input
            }], isOpen: [{
                type: Input
            }], contentTpl: [{
                type: ViewChild,
                args: [TemplateRef]
            }], sidebarItems: [{
                type: ContentChildren,
                args: [NcSidebarItemComponent]
            }] } });

class NcSidebarModule {
}
NcSidebarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcSidebarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NcSidebarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcSidebarModule, declarations: [NcSidebarComponent,
        NcSidebarGroupComponent,
        NcSidebarItemComponent], imports: [CommonModule, RouterModule], exports: [NcSidebarComponent,
        NcSidebarGroupComponent,
        NcSidebarItemComponent] });
NcSidebarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcSidebarModule, imports: [[CommonModule, RouterModule]] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcSidebarModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [CommonModule, RouterModule],
                    declarations: [
                        NcSidebarComponent,
                        NcSidebarGroupComponent,
                        NcSidebarItemComponent,
                    ],
                    exports: [
                        NcSidebarComponent,
                        NcSidebarGroupComponent,
                        NcSidebarItemComponent,
                    ],
                }]
        }] });

/**
 * An alert is a short and attention-grabbing message providing feedback about some important aspect of the service which may need to be handled by the user.
 * Read more about alerts in the [UX Guidelines](https://ux.visma.com/weblibrary/latest/development/documentation/docs/alerts.php).
 */
class NcAlertComponent {
    constructor() {
        this.type = 'info';
        this.size = 'md';
        this.dismissable = false;
        this.dismiss = new EventEmitter();
    }
    get isDismissable() {
        return this.dismissable === '' || this.dismissable === true;
    }
}
NcAlertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
NcAlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: NcAlertComponent, selector: "nc-alert", inputs: { type: "type", size: "size", dismissable: "dismissable" }, outputs: { dismiss: "dismiss" }, ngImport: i0, template: "<div\n  class=\"alert\"\n  [class.alert-sm]=\"size === 'sm'\"\n  [class.alert-dismissable]=\"isDismissable\"\n  [ngClass]=\"'alert-' + type\"\n  role=\"alert\"\n>\n  <button\n    *ngIf=\"isDismissable\"\n    type=\"button\"\n    class=\"close\"\n    i18n-aria-label=\"@@nc-alert-close\"\n    aria-label=\"Close\"\n    (click)=\"dismiss.emit()\"\n  ></button>\n  <div>\n    <span\n      class=\"vismaicon vismaicon vismaicon-filled\"\n      [class.vismaicon-sm]=\"size === 'sm'\"\n      [ngClass]=\"'vismaicon-' + type\"\n      aria-hidden=\"true\"\n    ></span>\n    <ng-content></ng-content>\n  </div>\n</div>\n", directives: [{ type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcAlertComponent, decorators: [{
            type: Component,
            args: [{ selector: 'nc-alert', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n  class=\"alert\"\n  [class.alert-sm]=\"size === 'sm'\"\n  [class.alert-dismissable]=\"isDismissable\"\n  [ngClass]=\"'alert-' + type\"\n  role=\"alert\"\n>\n  <button\n    *ngIf=\"isDismissable\"\n    type=\"button\"\n    class=\"close\"\n    i18n-aria-label=\"@@nc-alert-close\"\n    aria-label=\"Close\"\n    (click)=\"dismiss.emit()\"\n  ></button>\n  <div>\n    <span\n      class=\"vismaicon vismaicon vismaicon-filled\"\n      [class.vismaicon-sm]=\"size === 'sm'\"\n      [ngClass]=\"'vismaicon-' + type\"\n      aria-hidden=\"true\"\n    ></span>\n    <ng-content></ng-content>\n  </div>\n</div>\n" }]
        }], propDecorators: { type: [{
                type: Input
            }], size: [{
                type: Input
            }], dismissable: [{
                type: Input
            }], dismiss: [{
                type: Output
            }] } });

class NcAlertModule {
}
NcAlertModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcAlertModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NcAlertModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcAlertModule, declarations: [NcAlertComponent], imports: [CommonModule], exports: [NcAlertComponent] });
NcAlertModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcAlertModule, imports: [[CommonModule]] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcAlertModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [CommonModule],
                    declarations: [NcAlertComponent],
                    exports: [NcAlertComponent],
                }]
        }] });

class NcSpinnerComponent {
    constructor() {
        this.type = 'default';
        this.color = 'blue';
        this.size = 'medium';
    }
    get spinnerClass() {
        return `spinner-${this.type}-${this.color}`;
    }
}
NcSpinnerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcSpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
NcSpinnerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: NcSpinnerComponent, selector: "nc-spinner", inputs: { type: "type", color: "color", size: "size" }, ngImport: i0, template: "<span\n  class=\"spinner\"\n  [ngClass]=\"spinnerClass\"\n  [class.spinner-sm]=\"size === 'small'\"\n  [class.spinner-xs]=\"size === 'extra-small'\"\n  [class.spinner-custom]=\"size === 'custom'\"\n  role=\"status\"\n></span>\n", styles: [":host{display:inline-block}:host .spinner.spinner-custom{width:100%;height:100%}\n"], directives: [{ type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcSpinnerComponent, decorators: [{
            type: Component,
            args: [{ selector: 'nc-spinner', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\n  class=\"spinner\"\n  [ngClass]=\"spinnerClass\"\n  [class.spinner-sm]=\"size === 'small'\"\n  [class.spinner-xs]=\"size === 'extra-small'\"\n  [class.spinner-custom]=\"size === 'custom'\"\n  role=\"status\"\n></span>\n", styles: [":host{display:inline-block}:host .spinner.spinner-custom{width:100%;height:100%}\n"] }]
        }], propDecorators: { type: [{
                type: Input
            }], color: [{
                type: Input
            }], size: [{
                type: Input
            }] } });

class NcSpinnerModule {
}
NcSpinnerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcSpinnerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NcSpinnerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcSpinnerModule, declarations: [NcSpinnerComponent], imports: [CommonModule], exports: [NcSpinnerComponent] });
NcSpinnerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcSpinnerModule, imports: [[CommonModule]] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcSpinnerModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [CommonModule],
                    declarations: [NcSpinnerComponent],
                    exports: [NcSpinnerComponent],
                }]
        }] });

class NcNavbarService {
    constructor(breakpointObserver) {
        this.breakpointObserver = breakpointObserver;
        this.isMobile$ = this.breakpointObserver
            .observe('(max-width: 768px)')
            .pipe(map(({ matches }) => matches));
        this.isTablet$ = this.breakpointObserver
            .observe('(max-width: 992px)')
            .pipe(map(({ matches }) => matches));
    }
    isMobile() {
        return this.breakpointObserver.isMatched('(max-width: 768px)');
    }
}
NcNavbarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcNavbarService, deps: [{ token: i1$5.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Injectable });
NcNavbarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcNavbarService });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcNavbarService, decorators: [{
            type: Injectable
        }], ctorParameters: function () { return [{ type: i1$5.BreakpointObserver }]; } });

class NcDropdownToggleDirective {
    constructor(elRef) {
        this.elRef = elRef;
    }
}
NcDropdownToggleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDropdownToggleDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
NcDropdownToggleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.3", type: NcDropdownToggleDirective, selector: "[ncDropdownToggle]", ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDropdownToggleDirective, decorators: [{
            type: Directive,
            args: [{
                    selector: '[ncDropdownToggle]',
                }]
        }], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });

class NcDropdownDirective {
    constructor() {
        this.isOpenSubject = new BehaviorSubject(false);
        this.isOpen$ = this.isOpenSubject.asObservable();
    }
    handleKeyDown(event) {
        if (event.key === 'Escape' && !hasModifierKey(event)) {
            event.preventDefault();
            this.close();
            // Don't allow the event to propagate if we've already handled it, or it may
            // end up reaching other overlays that were opened earlier.
            event.stopPropagation();
        }
    }
    set isOpen(value) {
        if (value === this.isOpen) {
            return;
        }
        this.isOpenSubject.next(value);
    }
    get isOpen() {
        return this.isOpenSubject.getValue();
    }
    toggle() {
        this.isOpen = !this.isOpen;
    }
    close() {
        this.isOpen = false;
    }
    open() {
        this.isOpen = true;
    }
}
NcDropdownDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDropdownDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
NcDropdownDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.3", type: NcDropdownDirective, selector: "[ncDropdown]", inputs: { isOpen: "isOpen" }, host: { listeners: { "keydown": "handleKeyDown($event)" } }, queries: [{ propertyName: "toggler", first: true, predicate: NcDropdownToggleDirective, descendants: true }], exportAs: ["ncDropdown"], ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDropdownDirective, decorators: [{
            type: Directive,
            args: [{
                    selector: '[ncDropdown]',
                    exportAs: 'ncDropdown',
                }]
        }], propDecorators: { toggler: [{
                type: ContentChild,
                args: [NcDropdownToggleDirective]
            }], handleKeyDown: [{
                type: HostListener,
                args: ['keydown', ['$event']]
            }], isOpen: [{
                type: Input
            }] } });

class NcDropdownItemDirective {
    constructor(implicitDropdown) {
        this.implicitDropdown = implicitDropdown;
    }
    get dropdown() {
        return this.explicitDropdown || this.implicitDropdown;
    }
    onClick() {
        var _a;
        (_a = this.dropdown) === null || _a === void 0 ? void 0 : _a.close();
    }
}
NcDropdownItemDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDropdownItemDirective, deps: [{ token: NcDropdownDirective, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
NcDropdownItemDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.3", type: NcDropdownItemDirective, selector: "[ncDropdownItem]", inputs: { explicitDropdown: ["ncDropdownItem", "explicitDropdown"] }, host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDropdownItemDirective, decorators: [{
            type: Directive,
            args: [{
                    selector: '[ncDropdownItem]',
                }]
        }], ctorParameters: function () {
        return [{ type: NcDropdownDirective, decorators: [{
                        type: Optional
                    }] }];
    }, propDecorators: { explicitDropdown: [{
                type: Input,
                args: ['ncDropdownItem']
            }], onClick: [{
                type: HostListener,
                args: ['click']
            }] } });

class NcNavbarBrandOptionComponent {
    constructor(navbarService) {
        this.navbarService = navbarService;
        this.click = new EventEmitter();
        /** @ignore */
        this.isMobile$ = this.navbarService.isMobile$;
    }
}
NcNavbarBrandOptionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcNavbarBrandOptionComponent, deps: [{ token: NcNavbarService }], target: i0.ɵɵFactoryTarget.Component });
NcNavbarBrandOptionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: NcNavbarBrandOptionComponent, selector: "nc-navbar-brand-option", inputs: { active: "active", label: "label", href: "href", logoUrl: "logoUrl" }, outputs: { click: "click" }, viewQueries: [{ propertyName: "content", first: true, predicate: TemplateRef, descendants: true }], ngImport: i0, template: "<ng-template let-dropdown=\"dropdown\">\n  <a\n    role=\"menuitem\"\n    class=\"app-item\"\n    [class.active]=\"active\"\n    [attr.href]=\"href\"\n    [attr.aria-current]=\"active\"\n    [attr.aria-label]=\"label\"\n    [ncDropdownItem]=\"dropdown\"\n    (click)=\"click.emit($event)\"\n  >\n    <img\n      *ngIf=\"logoUrl && (isMobile$ | async) === false\"\n      [src]=\"logoUrl\"\n      [alt]=\"label\"\n      class=\"img-inline\"\n    />\n    {{ label }}</a\n  >\n</ng-template>\n", directives: [{ type: NcDropdownItemDirective, selector: "[ncDropdownItem]", inputs: ["ncDropdownItem"] }, { type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i1$3.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcNavbarBrandOptionComponent, decorators: [{
            type: Component,
            args: [{ selector: 'nc-navbar-brand-option', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template let-dropdown=\"dropdown\">\n  <a\n    role=\"menuitem\"\n    class=\"app-item\"\n    [class.active]=\"active\"\n    [attr.href]=\"href\"\n    [attr.aria-current]=\"active\"\n    [attr.aria-label]=\"label\"\n    [ncDropdownItem]=\"dropdown\"\n    (click)=\"click.emit($event)\"\n  >\n    <img\n      *ngIf=\"logoUrl && (isMobile$ | async) === false\"\n      [src]=\"logoUrl\"\n      [alt]=\"label\"\n      class=\"img-inline\"\n    />\n    {{ label }}</a\n  >\n</ng-template>\n" }]
        }], ctorParameters: function () { return [{ type: NcNavbarService }]; }, propDecorators: { active: [{
                type: Input
            }], label: [{
                type: Input
            }], href: [{
                type: Input
            }], logoUrl: [{
                type: Input
            }], click: [{
                type: Output
            }], content: [{
                type: ViewChild,
                args: [TemplateRef]
            }] } });

class NcNavbarComponent {
    constructor(navbarService) {
        this.navbarService = navbarService;
        this.type = 'default';
        /** @ignore */
        this.isMobile$ = this.navbarService.isMobile$;
        /** @ignore */
        this.isTablet$ = this.navbarService.isTablet$;
    }
    /** @ignore */
    isMobile() {
        return this.navbarService.isMobile();
    }
}
NcNavbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcNavbarComponent, deps: [{ token: NcNavbarService }], target: i0.ɵɵFactoryTarget.Component });
NcNavbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: NcNavbarComponent, selector: "nc-navbar", inputs: { type: "type" }, queries: [{ propertyName: "brandOptions", predicate: NcNavbarBrandOptionComponent, descendants: true }], exportAs: ["ncNavbar"], ngImport: i0, template: "<header [class]=\"'navbar navbar-' + type\" [class.is-mobile]=\"isMobile$ | async\">\n  <nav class=\"collapse navbar-collapse\">\n    <ng-container *ngIf=\"(isMobile$ | async) === false\">\n      <ng-content select=\"nc-navbar-brand\"></ng-content>\n    </ng-container>\n\n    <ng-content select=\"nc-navbar-menu\"></ng-content>\n    <ng-content select=\"nc-navbar-right-menu\"></ng-content>\n  </nav>\n</header>\n", styles: ["header{display:flex;position:relative}header>nav{flex:1;min-width:0;position:static;display:flex}\n"], directives: [{ type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i1$3.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcNavbarComponent, decorators: [{
            type: Component,
            args: [{ selector: 'nc-navbar', changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'ncNavbar', template: "<header [class]=\"'navbar navbar-' + type\" [class.is-mobile]=\"isMobile$ | async\">\n  <nav class=\"collapse navbar-collapse\">\n    <ng-container *ngIf=\"(isMobile$ | async) === false\">\n      <ng-content select=\"nc-navbar-brand\"></ng-content>\n    </ng-container>\n\n    <ng-content select=\"nc-navbar-menu\"></ng-content>\n    <ng-content select=\"nc-navbar-right-menu\"></ng-content>\n  </nav>\n</header>\n", styles: ["header{display:flex;position:relative}header>nav{flex:1;min-width:0;position:static;display:flex}\n"] }]
        }], ctorParameters: function () { return [{ type: NcNavbarService }]; }, propDecorators: { type: [{
                type: Input
            }], brandOptions: [{
                type: ContentChildren,
                args: [NcNavbarBrandOptionComponent, { descendants: true }]
            }] } });

function registerOutsideClick(clickHandler, excludedElements, destroyed$, ngZone) {
    function containsExcludedElement(element) {
        return excludedElements.some((el) => el.contains(element));
    }
    ngZone.runOutsideAngular(() => {
        fromEvent(document, 'mouseup')
            .pipe(filter((event) => !containsExcludedElement(event.target)), takeUntil(destroyed$))
            .subscribe((event) => ngZone.run(() => clickHandler(event)));
    });
}

class NcDropdownMenuDirective {
    constructor(dropdown, el, cdRef, ngZone) {
        this.dropdown = dropdown;
        this.el = el;
        this.cdRef = cdRef;
        this.ngZone = ngZone;
        this.destroyed$ = new Subject();
    }
    ngAfterViewInit() {
        this.dropdown.isOpen$
            .pipe(distinctUntilChanged(), filter((isOpen) => isOpen), takeUntil(this.destroyed$))
            .subscribe(() => {
            const closed$ = this.dropdown.isOpen$.pipe(skip(1), take(1));
            registerOutsideClick(() => {
                this.dropdown.close();
                this.cdRef.markForCheck();
            }, [this.el.nativeElement, this.dropdown.toggler.elRef.nativeElement], race(closed$, this.destroyed$), this.ngZone);
        });
    }
    ngOnDestroy() {
        this.destroyed$.next();
    }
}
NcDropdownMenuDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDropdownMenuDirective, deps: [{ token: NcDropdownDirective }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
NcDropdownMenuDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.3", type: NcDropdownMenuDirective, selector: "[ncDropdownMenu]", ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDropdownMenuDirective, decorators: [{
            type: Directive,
            args: [{
                    selector: '[ncDropdownMenu]',
                }]
        }], ctorParameters: function () { return [{ type: NcDropdownDirective }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }]; } });

class NcNavbarBrandComponent {
    constructor(navbar, cdRef) {
        this.navbar = navbar;
        this.cdRef = cdRef;
        this.destroyed$ = new Subject();
    }
    ngAfterContentInit() {
        this.navbar.brandOptions.changes
            .pipe(takeUntil(this.destroyed$))
            .subscribe(() => this.cdRef.markForCheck());
    }
    ngOnDestroy() {
        this.destroyed$.next();
    }
}
NcNavbarBrandComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcNavbarBrandComponent, deps: [{ token: NcNavbarComponent, host: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
NcNavbarBrandComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: NcNavbarBrandComponent, selector: "nc-navbar-brand", ngImport: i0, template: "<div class=\"navbar-header\">\n  <div\n    ncDropdown\n    #dropdown=\"ncDropdown\"\n    class=\"navbar-brand dropdown\"\n    [class.open]=\"dropdown.isOpen$ | async\"\n  >\n    <a\n      ncDropdownToggle\n      id=\"nc-navbar-brand-menu\"\n      (click)=\"navbar.brandOptions.length > 0 && dropdown.toggle()\"\n      [class.dropdown-toggle]=\"navbar.brandOptions.length > 0\"\n      [attr.aria-expanded]=\"dropdown.isOpen$ | async\"\n      [attr.aria-haspopup]=\"navbar.brandOptions.length > 0\"\n      role=\"button\"\n      href=\"javascript: void(0)\"\n    >\n      <ng-content></ng-content>\n      <span class=\"caret\"></span>\n    </a>\n    <ul\n      ncDropdownMenu\n      role=\"menu\"\n      class=\"dropdown-menu\"\n      aria-labelledby=\"nc-navbar-brand-menu\"\n    >\n      <li *ngFor=\"let brandOption of navbar.brandOptions\" role=\"none\">\n        <ng-template\n          [ngTemplateOutlet]=\"brandOption.content\"\n          [ngTemplateOutletContext]=\"{ dropdown: dropdown }\"\n        ></ng-template>\n      </li>\n    </ul>\n  </div>\n</div>\n", directives: [{ type: NcDropdownDirective, selector: "[ncDropdown]", inputs: ["isOpen"], exportAs: ["ncDropdown"] }, { type: NcDropdownToggleDirective, selector: "[ncDropdownToggle]" }, { type: NcDropdownMenuDirective, selector: "[ncDropdownMenu]" }, { type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i1$3.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcNavbarBrandComponent, decorators: [{
            type: Component,
            args: [{ selector: 'nc-navbar-brand', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"navbar-header\">\n  <div\n    ncDropdown\n    #dropdown=\"ncDropdown\"\n    class=\"navbar-brand dropdown\"\n    [class.open]=\"dropdown.isOpen$ | async\"\n  >\n    <a\n      ncDropdownToggle\n      id=\"nc-navbar-brand-menu\"\n      (click)=\"navbar.brandOptions.length > 0 && dropdown.toggle()\"\n      [class.dropdown-toggle]=\"navbar.brandOptions.length > 0\"\n      [attr.aria-expanded]=\"dropdown.isOpen$ | async\"\n      [attr.aria-haspopup]=\"navbar.brandOptions.length > 0\"\n      role=\"button\"\n      href=\"javascript: void(0)\"\n    >\n      <ng-content></ng-content>\n      <span class=\"caret\"></span>\n    </a>\n    <ul\n      ncDropdownMenu\n      role=\"menu\"\n      class=\"dropdown-menu\"\n      aria-labelledby=\"nc-navbar-brand-menu\"\n    >\n      <li *ngFor=\"let brandOption of navbar.brandOptions\" role=\"none\">\n        <ng-template\n          [ngTemplateOutlet]=\"brandOption.content\"\n          [ngTemplateOutletContext]=\"{ dropdown: dropdown }\"\n        ></ng-template>\n      </li>\n    </ul>\n  </div>\n</div>\n" }]
        }], ctorParameters: function () {
        return [{ type: NcNavbarComponent, decorators: [{
                        type: Host
                    }] }, { type: i0.ChangeDetectorRef }];
    } });

class NcNavbarMenuItemComponent {
    constructor(
    /** @ignore */
    elRef, 
    /** @ignore */
    cdRef, 
    /** @ignore */
    routerLinkActive) {
        this.elRef = elRef;
        this.cdRef = cdRef;
        this.routerLinkActive = routerLinkActive;
        this._routerLinkActive = null;
        this.active = null;
        this.click = new EventEmitter();
    }
    get isActive() {
        var _a, _b;
        return (_b = (_a = this.active) !== null && _a !== void 0 ? _a : this._routerLinkActive) !== null && _b !== void 0 ? _b : false;
    }
    ngDoCheck() {
        if (this.routerLinkActive &&
            this.routerLinkActive.isActive !== this._routerLinkActive) {
            this._routerLinkActive = this.routerLinkActive.isActive;
            /**
             * `detectChanges` is needed to avoid `ExpressionChangedAfterItHasBeenCheckedError`,
             * as `routerLinkActive.isActive` changes its value during the `navbar-menu-item` initialization.
             */
            this.cdRef.detectChanges();
        }
    }
}
NcNavbarMenuItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcNavbarMenuItemComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1$4.RouterLinkActive, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
NcNavbarMenuItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: NcNavbarMenuItemComponent, selector: "nc-navbar-menu-item", inputs: { active: "active", label: "label", href: "href" }, outputs: { click: "click" }, queries: [{ propertyName: "labelTmp", first: true, predicate: TemplateRef, descendants: true }], viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true, read: TemplateRef }], ngImport: i0, template: "<ng-template #content let-dropdown=\"dropdown\" let-virtual=\"virtual\">\n  <li role=\"none\" [class.active]=\"isActive\" [class.virtual]=\"virtual\">\n    <a\n      class=\"nav-item\"\n      [attr.role]=\"virtual ? 'none' : 'menuitem'\"\n      (click)=\"click.emit($event)\"\n      [attr.href]=\"href\"\n      [attr.aria-current]=\"isActive\"\n      [ncDropdownItem]=\"dropdown\"\n    >\n      <ng-container\n        [ngTemplateOutlet]=\"labelTmp ?? defaultLabelTmp\"\n      ></ng-container>\n      <ng-template #defaultLabelTmp>{{ label }}</ng-template>\n    </a>\n  </li>\n</ng-template>\n", styles: ["a{white-space:nowrap}.virtual{position:absolute!important;left:0px;visibility:hidden}\n"], directives: [{ type: NcDropdownItemDirective, selector: "[ncDropdownItem]", inputs: ["ncDropdownItem"] }, { type: i1$3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcNavbarMenuItemComponent, decorators: [{
            type: Component,
            args: [{ selector: 'nc-navbar-menu-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template #content let-dropdown=\"dropdown\" let-virtual=\"virtual\">\n  <li role=\"none\" [class.active]=\"isActive\" [class.virtual]=\"virtual\">\n    <a\n      class=\"nav-item\"\n      [attr.role]=\"virtual ? 'none' : 'menuitem'\"\n      (click)=\"click.emit($event)\"\n      [attr.href]=\"href\"\n      [attr.aria-current]=\"isActive\"\n      [ncDropdownItem]=\"dropdown\"\n    >\n      <ng-container\n        [ngTemplateOutlet]=\"labelTmp ?? defaultLabelTmp\"\n      ></ng-container>\n      <ng-template #defaultLabelTmp>{{ label }}</ng-template>\n    </a>\n  </li>\n</ng-template>\n", styles: ["a{white-space:nowrap}.virtual{position:absolute!important;left:0px;visibility:hidden}\n"] }]
        }], ctorParameters: function () {
        return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$4.RouterLinkActive, decorators: [{
                        type: Optional
                    }, {
                        type: Self
                    }] }];
    }, propDecorators: { active: [{
                type: Input
            }], label: [{
                type: Input
            }], href: [{
                type: Input
            }], click: [{
                type: Output
            }], content: [{
                type: ViewChild,
                args: ['content', { read: TemplateRef }]
            }], labelTmp: [{
                type: ContentChild,
                args: [TemplateRef]
            }] } });

const MORE_ITEM_WIDTH = 100;
class NcNavbarMenuComponent {
    constructor(navbar, elRef, cdRef, ngZone) {
        this.navbar = navbar;
        this.elRef = elRef;
        this.cdRef = cdRef;
        this.ngZone = ngZone;
        this.resized$ = new Subject();
        this.destroyed$ = new Subject();
        this.menuItemsWidths = [];
        this.hiddenMenuItems = [];
        this.brandOptionsOpen = false;
    }
    get anyHiddenMenuItem() {
        return this.hiddenMenuItems.some((i) => i);
    }
    get activeBrandOption() {
        return this.navbar.brandOptions.find((n) => n.active);
    }
    ngAfterViewInit() {
        this.rerenderMenuItems();
        // Re-render menu items whenever projection changes
        this.menuItems.changes
            .pipe(takeUntil(this.destroyed$))
            .subscribe(() => this.rerenderMenuItems());
        // Re-render menu items in case styles completes to load AFTER the initialization of this menu.
        // Ref issue: #28
        fromEvent(window, 'load')
            .pipe(takeUntil(this.destroyed$))
            .subscribe(() => this.rerenderMenuItems());
        // Attach resize observer if available,
        // otherwise user will have to use `checkResponsiveness` manually.
        if (typeof window !== 'undefined' && window.ResizeObserver) {
            this.resizeObserver = new window.ResizeObserver(() => this.resized$.next());
            this.resizeObserver.observe(this.elRef.nativeElement);
            this.resized$
                .pipe(debounceTime(100), takeUntil(this.destroyed$))
                .subscribe(() => {
                this.ngZone.run(() => this.checkResponsiveness());
            });
        }
    }
    ngOnDestroy() {
        this.destroyed$.next();
        if (this.resizeObserver) {
            this.resizeObserver.unobserve(this.elRef.nativeElement);
        }
    }
    checkResponsiveness() {
        if (this.navbar.isMobile()) {
            return;
        }
        let changed = false;
        // Check if everything fits well
        const availableWidth = this.elRef.nativeElement.offsetWidth;
        const totalMenuItemsWidth = this.menuItemsWidths.reduce((a, b) => a + b, 0);
        let takenWidth = totalMenuItemsWidth;
        if (availableWidth > takenWidth) {
            this.menuItems.forEach((_, i) => {
                if (this.hiddenMenuItems[i]) {
                    this.hiddenMenuItems[i] = false;
                    changed = true;
                }
            });
        }
        else {
            takenWidth = MORE_ITEM_WIDTH;
            // Go trough menu items and add ones that fit
            this.menuItems.forEach((_, i) => {
                const totalTaken = takenWidth + this.menuItemsWidths[i];
                const doesNotFit = totalTaken > availableWidth;
                if (this.hiddenMenuItems[i] !== doesNotFit) {
                    this.hiddenMenuItems[i] = doesNotFit;
                    changed = true;
                }
                if (!doesNotFit) {
                    takenWidth += this.menuItemsWidths[i];
                }
            });
        }
        if (changed) {
            this.cdRef.detectChanges();
        }
    }
    rerenderMenuItems() {
        // Reset cached widths
        this.menuItemsWidths = [];
        this.hiddenMenuItems = [];
        // Needed for ngTemplateOutlet
        this.cdRef.detectChanges();
        // Must wait for the menu items to be painted so that the menu can properly
        // calculate the correct visibility based on the size of the item content.
        Promise.resolve().then(() => {
            this.cacheMenuWidths();
            this.checkResponsiveness();
        });
    }
    toggleBrandOptions() {
        this.brandOptionsOpen = !this.brandOptionsOpen;
        this.cdRef.detectChanges();
    }
    cacheMenuWidths() {
        const items = this.elRef.nativeElement.querySelectorAll('ul.first-level > li.virtual > a.nav-item');
        this.menuItemsWidths = Array.from(items).map((e) => e.offsetWidth);
    }
}
NcNavbarMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcNavbarMenuComponent, deps: [{ token: NcNavbarComponent, host: true }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
NcNavbarMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: NcNavbarMenuComponent, selector: "nc-navbar-menu", queries: [{ propertyName: "menuItems", predicate: NcNavbarMenuItemComponent }], ngImport: i0, template: "<ul class=\"nav first-level\" role=\"menubar\">\n  <!--\n    \"Virtual\" menu items that are always hidden.\n    Used for measurement.\n  -->\n  <ng-container\n    *ngFor=\"let item of menuItems; let i = index\"\n    [ngTemplateOutlet]=\"item.content\"\n    [ngTemplateOutletContext]=\"{ virtual: true }\"\n  ></ng-container>\n\n  <!-- Main menu bar that is visible only for desktop -->\n  <ng-container *ngIf=\"(navbar.isMobile$ | async) === false\">\n    <ng-container *ngFor=\"let item of menuItems; let i = index\">\n      <ng-container\n        *ngIf=\"!hiddenMenuItems[i]\"\n        [ngTemplateOutlet]=\"item.content\"\n      ></ng-container>\n    </ng-container>\n  </ng-container>\n\n  <!-- \"More\" button for opening the hidden menu (visible in both desktop and mobile) -->\n  <li\n    *ngIf=\"(navbar.isMobile$ | async) || anyHiddenMenuItem\"\n    role=\"none\"\n    ncDropdown\n    #dropdown=\"ncDropdown\"\n    class=\"menudrop dropdown\"\n    [class.open]=\"dropdown.isOpen$ | async\"\n  >\n    <a\n      id=\"nc-navbar-more-menu\"\n      ncDropdownToggle\n      role=\"menuitem\"\n      class=\"dropdown-toggle\"\n      data-toggle=\"dropdown\"\n      [attr.aria-expanded]=\"dropdown.isOpen$ | async\"\n      [attr.aria-haspopup]=\"(navbar.isMobile$ | async) || anyHiddenMenuItem\"\n      (click)=\"dropdown.toggle()\"\n      href=\"javascript: void(0)\"\n    >\n      <span [class.hidden]=\"(navbar.isMobile$ | async) === false\" i18n\n        >Menu</span\n      >\n      <i class=\"icon-align-justify\"></i>\n    </a>\n\n    <ul\n      ncDropdownMenu\n      class=\"dropdown-menu dropdown-menu-right\"\n      role=\"menu\"\n      aria-labelledby=\"nc-navbar-more-menu\"\n    >\n      <!-- Brand information that's visible only for mobile -->\n      <ng-container\n        *ngIf=\"(navbar.isMobile$ | async) && navbar.brandOptions.length > 0\"\n      >\n        <li role=\"none\" class=\"navbar-brand\" [class.is-open]=\"brandOptionsOpen\">\n          <a\n            class=\"dropdown-toggle dropped-apps-toggle\"\n            tabindex=\"-1\"\n            role=\"button\"\n            [attr.aria-expanded]=\"brandOptionsOpen\"\n            (click)=\"toggleBrandOptions()\"\n            >{{ activeBrandOption?.label }}<span class=\"caret\"></span\n          ></a>\n        </li>\n\n        <ng-container *ngIf=\"brandOptionsOpen\">\n          <li\n            role=\"none\"\n            *ngFor=\"let brandOption of navbar.brandOptions\"\n            [class.active]=\"brandOption.active\"\n          >\n            <ng-container\n              *ngIf=\"!brandOption.active\"\n              [ngTemplateOutlet]=\"brandOption.content\"\n            ></ng-container>\n          </li>\n        </ng-container>\n      </ng-container>\n\n      <!-- Hidden menu options that didn't fit in the main menu bar -->\n      <ng-container *ngIf=\"!brandOptionsOpen\">\n        <ng-container *ngFor=\"let item of menuItems; let i = index\">\n          <ng-container\n            *ngIf=\"(navbar.isMobile$ | async) || hiddenMenuItems[i]\"\n            [ngTemplateOutlet]=\"item.content\"\n            [ngTemplateOutletContext]=\"{ dropdown: dropdown }\"\n          ></ng-container>\n        </ng-container>\n      </ng-container>\n    </ul>\n  </li>\n</ul>\n", styles: [":host{display:block;min-width:0;flex:1}:host>ul{display:flex}:host>ul>li{float:none!important}:host>ul>li>a{white-space:nowrap}:host .hidden{display:none}\n"], directives: [{ type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: NcDropdownDirective, selector: "[ncDropdown]", inputs: ["isOpen"], exportAs: ["ncDropdown"] }, { type: NcDropdownToggleDirective, selector: "[ncDropdownToggle]" }, { type: NcDropdownMenuDirective, selector: "[ncDropdownMenu]" }], pipes: { "async": i1$3.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcNavbarMenuComponent, decorators: [{
            type: Component,
            args: [{ selector: 'nc-navbar-menu', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ul class=\"nav first-level\" role=\"menubar\">\n  <!--\n    \"Virtual\" menu items that are always hidden.\n    Used for measurement.\n  -->\n  <ng-container\n    *ngFor=\"let item of menuItems; let i = index\"\n    [ngTemplateOutlet]=\"item.content\"\n    [ngTemplateOutletContext]=\"{ virtual: true }\"\n  ></ng-container>\n\n  <!-- Main menu bar that is visible only for desktop -->\n  <ng-container *ngIf=\"(navbar.isMobile$ | async) === false\">\n    <ng-container *ngFor=\"let item of menuItems; let i = index\">\n      <ng-container\n        *ngIf=\"!hiddenMenuItems[i]\"\n        [ngTemplateOutlet]=\"item.content\"\n      ></ng-container>\n    </ng-container>\n  </ng-container>\n\n  <!-- \"More\" button for opening the hidden menu (visible in both desktop and mobile) -->\n  <li\n    *ngIf=\"(navbar.isMobile$ | async) || anyHiddenMenuItem\"\n    role=\"none\"\n    ncDropdown\n    #dropdown=\"ncDropdown\"\n    class=\"menudrop dropdown\"\n    [class.open]=\"dropdown.isOpen$ | async\"\n  >\n    <a\n      id=\"nc-navbar-more-menu\"\n      ncDropdownToggle\n      role=\"menuitem\"\n      class=\"dropdown-toggle\"\n      data-toggle=\"dropdown\"\n      [attr.aria-expanded]=\"dropdown.isOpen$ | async\"\n      [attr.aria-haspopup]=\"(navbar.isMobile$ | async) || anyHiddenMenuItem\"\n      (click)=\"dropdown.toggle()\"\n      href=\"javascript: void(0)\"\n    >\n      <span [class.hidden]=\"(navbar.isMobile$ | async) === false\" i18n\n        >Menu</span\n      >\n      <i class=\"icon-align-justify\"></i>\n    </a>\n\n    <ul\n      ncDropdownMenu\n      class=\"dropdown-menu dropdown-menu-right\"\n      role=\"menu\"\n      aria-labelledby=\"nc-navbar-more-menu\"\n    >\n      <!-- Brand information that's visible only for mobile -->\n      <ng-container\n        *ngIf=\"(navbar.isMobile$ | async) && navbar.brandOptions.length > 0\"\n      >\n        <li role=\"none\" class=\"navbar-brand\" [class.is-open]=\"brandOptionsOpen\">\n          <a\n            class=\"dropdown-toggle dropped-apps-toggle\"\n            tabindex=\"-1\"\n            role=\"button\"\n            [attr.aria-expanded]=\"brandOptionsOpen\"\n            (click)=\"toggleBrandOptions()\"\n            >{{ activeBrandOption?.label }}<span class=\"caret\"></span\n          ></a>\n        </li>\n\n        <ng-container *ngIf=\"brandOptionsOpen\">\n          <li\n            role=\"none\"\n            *ngFor=\"let brandOption of navbar.brandOptions\"\n            [class.active]=\"brandOption.active\"\n          >\n            <ng-container\n              *ngIf=\"!brandOption.active\"\n              [ngTemplateOutlet]=\"brandOption.content\"\n            ></ng-container>\n          </li>\n        </ng-container>\n      </ng-container>\n\n      <!-- Hidden menu options that didn't fit in the main menu bar -->\n      <ng-container *ngIf=\"!brandOptionsOpen\">\n        <ng-container *ngFor=\"let item of menuItems; let i = index\">\n          <ng-container\n            *ngIf=\"(navbar.isMobile$ | async) || hiddenMenuItems[i]\"\n            [ngTemplateOutlet]=\"item.content\"\n            [ngTemplateOutletContext]=\"{ dropdown: dropdown }\"\n          ></ng-container>\n        </ng-container>\n      </ng-container>\n    </ul>\n  </li>\n</ul>\n", styles: [":host{display:block;min-width:0;flex:1}:host>ul{display:flex}:host>ul>li{float:none!important}:host>ul>li>a{white-space:nowrap}:host .hidden{display:none}\n"] }]
        }], ctorParameters: function () {
        return [{ type: NcNavbarComponent, decorators: [{
                        type: Host
                    }] }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }];
    }, propDecorators: { menuItems: [{
                type: ContentChildren,
                args: [NcNavbarMenuItemComponent]
            }] } });

class NcNavbarRightMenuComponent {
}
NcNavbarRightMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcNavbarRightMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
NcNavbarRightMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: NcNavbarRightMenuComponent, selector: "nc-navbar-right-menu", ngImport: i0, template: "<ul class=\"nav navbar-nav navbar-right first-level\">\n  <ng-content></ng-content>\n</ul>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcNavbarRightMenuComponent, decorators: [{
            type: Component,
            args: [{ selector: 'nc-navbar-right-menu', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ul class=\"nav navbar-nav navbar-right first-level\">\n  <ng-content></ng-content>\n</ul>\n" }]
        }] });

class NcOutsideClickDirective {
    constructor(el, ngZone) {
        this.el = el;
        this.ngZone = ngZone;
        this.destroyed$ = new Subject();
        this.excludedElements = [];
        this.outsideClick = new EventEmitter();
    }
    ngAfterViewInit() {
        registerOutsideClick(() => this.outsideClick.emit(), [this.el.nativeElement, ...this.excludedElements], this.destroyed$, this.ngZone);
    }
    ngOnDestroy() {
        this.destroyed$.next();
    }
}
NcOutsideClickDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcOutsideClickDirective, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
NcOutsideClickDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.3", type: NcOutsideClickDirective, selector: "[ncOutsideClick]", inputs: { excludedElements: ["ncOutsideClickExcluded", "excludedElements"] }, outputs: { outsideClick: "ncOutsideClick" }, ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcOutsideClickDirective, decorators: [{
            type: Directive,
            args: [{
                    selector: '[ncOutsideClick]',
                }]
        }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { excludedElements: [{
                type: Input,
                args: ['ncOutsideClickExcluded']
            }], outsideClick: [{
                type: Output,
                args: ['ncOutsideClick']
            }] } });

class NcDropdownModule {
}
NcDropdownModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDropdownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NcDropdownModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDropdownModule, declarations: [NcDropdownDirective,
        NcDropdownMenuDirective,
        NcOutsideClickDirective,
        NcDropdownToggleDirective,
        NcDropdownItemDirective], imports: [CommonModule], exports: [NcDropdownDirective,
        NcDropdownMenuDirective,
        NcOutsideClickDirective,
        NcDropdownToggleDirective,
        NcDropdownItemDirective] });
NcDropdownModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDropdownModule, imports: [[CommonModule]] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcDropdownModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [CommonModule],
                    declarations: [
                        NcDropdownDirective,
                        NcDropdownMenuDirective,
                        NcOutsideClickDirective,
                        NcDropdownToggleDirective,
                        NcDropdownItemDirective,
                    ],
                    exports: [
                        NcDropdownDirective,
                        NcDropdownMenuDirective,
                        NcOutsideClickDirective,
                        NcDropdownToggleDirective,
                        NcDropdownItemDirective,
                    ],
                }]
        }] });

class NcNavbarModule {
}
NcNavbarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcNavbarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NcNavbarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcNavbarModule, declarations: [NcNavbarComponent,
        NcNavbarBrandComponent,
        NcNavbarBrandOptionComponent,
        NcNavbarMenuComponent,
        NcNavbarMenuItemComponent,
        NcNavbarRightMenuComponent], imports: [CommonModule, NcDropdownModule], exports: [NcDropdownModule,
        NcNavbarComponent,
        NcNavbarBrandComponent,
        NcNavbarBrandOptionComponent,
        NcNavbarMenuComponent,
        NcNavbarMenuItemComponent,
        NcNavbarRightMenuComponent] });
NcNavbarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcNavbarModule, providers: [NcNavbarService], imports: [[CommonModule, NcDropdownModule], NcDropdownModule] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcNavbarModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [CommonModule, NcDropdownModule],
                    declarations: [
                        NcNavbarComponent,
                        NcNavbarBrandComponent,
                        NcNavbarBrandOptionComponent,
                        NcNavbarMenuComponent,
                        NcNavbarMenuItemComponent,
                        NcNavbarRightMenuComponent,
                    ],
                    exports: [
                        NcDropdownModule,
                        NcNavbarComponent,
                        NcNavbarBrandComponent,
                        NcNavbarBrandOptionComponent,
                        NcNavbarMenuComponent,
                        NcNavbarMenuItemComponent,
                        NcNavbarRightMenuComponent,
                    ],
                    providers: [NcNavbarService],
                }]
        }] });

class NcTabTitleDirective {
}
NcTabTitleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcTabTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
NcTabTitleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.3", type: NcTabTitleDirective, selector: "ng-template[ncTabTitle]", ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcTabTitleDirective, decorators: [{
            type: Directive,
            args: [{ selector: 'ng-template[ncTabTitle]' }]
        }] });
class NcTabContentDirective {
}
NcTabContentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcTabContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
NcTabContentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.3", type: NcTabContentDirective, selector: "ng-template[ncTabContent]", ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcTabContentDirective, decorators: [{
            type: Directive,
            args: [{ selector: 'ng-template[ncTabContent]' }]
        }] });
class NcTabComponent {
    constructor() {
        this.disabled = false;
    }
    get contentTpl() {
        return this.explicitContent || this.implicitContent;
    }
}
NcTabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcTabComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
NcTabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: NcTabComponent, selector: "nc-tab", inputs: { title: "title", disabled: "disabled" }, queries: [{ propertyName: "explicitContent", first: true, predicate: NcTabContentDirective, descendants: true, read: TemplateRef, static: true }, { propertyName: "titleTpl", first: true, predicate: NcTabTitleDirective, descendants: true, read: TemplateRef, static: true }], viewQueries: [{ propertyName: "implicitContent", first: true, predicate: TemplateRef, descendants: true, static: true }], ngImport: i0, template: "<ng-template><ng-content></ng-content></ng-template>\n" });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcTabComponent, decorators: [{
            type: Component,
            args: [{ selector: 'nc-tab', template: "<ng-template><ng-content></ng-content></ng-template>\n" }]
        }], propDecorators: { title: [{
                type: Input
            }], disabled: [{
                type: Input
            }], explicitContent: [{
                type: ContentChild,
                args: [NcTabContentDirective, { read: TemplateRef, static: true }]
            }], implicitContent: [{
                type: ViewChild,
                args: [TemplateRef, { static: true }]
            }], titleTpl: [{
                type: ContentChild,
                args: [NcTabTitleDirective, { read: TemplateRef, static: true }]
            }] } });

class NcTabChangeEvent {
}
class NcTabsetComponent {
    constructor(cdRef) {
        this.cdRef = cdRef;
        this.indexToSelect = 0;
        this.selectedIndexChange = new EventEmitter(true);
        this.selectedTabChange = new EventEmitter(true);
    }
    set selectedIndex(value) {
        if (this._selectedIndex === value) {
            return;
        }
        this.selectTab(value, false);
    }
    get selectedIndex() {
        return this._selectedIndex;
    }
    ngAfterContentInit() {
        if (!this.selectedTab) {
            this.selectTab(this.indexToSelect);
        }
        this.tabs.changes.subscribe(() => {
            this.selectTab(this.selectedIndex, true);
            this.cdRef.markForCheck();
        });
    }
    selectTab(index, broadcastEvent = false) {
        var _a;
        if (!((_a = this.tabs) === null || _a === void 0 ? void 0 : _a.length)) {
            this.indexToSelect = index;
            return;
        }
        const clampedTabIndex = this.clampTabIndex(index);
        const tabAtIndex = this.tabs.find((_, i) => i === clampedTabIndex);
        if (tabAtIndex.disabled) {
            return;
        }
        if (clampedTabIndex !== this.selectedIndex) {
            this._selectedIndex = clampedTabIndex;
            if (broadcastEvent) {
                this.selectedIndexChange.emit(clampedTabIndex);
            }
        }
        if (tabAtIndex !== this.selectedTab) {
            this.selectedTab = tabAtIndex;
            if (broadcastEvent) {
                this.selectedTabChange.emit({
                    index: clampedTabIndex,
                    tab: tabAtIndex,
                });
            }
        }
    }
    clampTabIndex(index) {
        // Note the `|| 0`, which ensures that values like NaN can't get through
        return Math.min(this.tabs.length - 1, Math.max(index || 0, 0));
    }
}
NcTabsetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcTabsetComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
NcTabsetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: NcTabsetComponent, selector: "nc-tabset", inputs: { justified: "justified", selectedIndex: "selectedIndex" }, outputs: { selectedIndexChange: "selectedIndexChange", selectedTabChange: "selectedTabChange" }, queries: [{ propertyName: "tabs", predicate: NcTabComponent }], ngImport: i0, template: "<ul class=\"nav nav-tabs hide-tabdrop\" [class.nav-justified]=\"justified\">\n  <li\n    *ngFor=\"let tab of tabs; let i = index\"\n    class=\"nav-item\"\n    [class.disabled]=\"tab.disabled\"\n    [class.active]=\"i === selectedIndex\"\n    role=\"presentation\"\n  >\n    <a\n      role=\"tab\"\n      href=\"\"\n      [tabindex]=\"tab.disabled ? -1 : undefined\"\n      (click)=\"selectTab(i, true); $event.preventDefault()\"\n    >\n      <ng-template [ngIf]=\"!tab.titleTpl\">{{ tab.title }}</ng-template>\n      <ng-template [ngTemplateOutlet]=\"tab.titleTpl\"></ng-template>\n    </a>\n  </li>\n</ul>\n\n<div class=\"tab-content\">\n  <ng-template [ngTemplateOutlet]=\"selectedTab?.contentTpl\"></ng-template>\n</div>\n", styles: [":host{display:block}\n"], directives: [{ type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcTabsetComponent, decorators: [{
            type: Component,
            args: [{ selector: 'nc-tabset', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ul class=\"nav nav-tabs hide-tabdrop\" [class.nav-justified]=\"justified\">\n  <li\n    *ngFor=\"let tab of tabs; let i = index\"\n    class=\"nav-item\"\n    [class.disabled]=\"tab.disabled\"\n    [class.active]=\"i === selectedIndex\"\n    role=\"presentation\"\n  >\n    <a\n      role=\"tab\"\n      href=\"\"\n      [tabindex]=\"tab.disabled ? -1 : undefined\"\n      (click)=\"selectTab(i, true); $event.preventDefault()\"\n    >\n      <ng-template [ngIf]=\"!tab.titleTpl\">{{ tab.title }}</ng-template>\n      <ng-template [ngTemplateOutlet]=\"tab.titleTpl\"></ng-template>\n    </a>\n  </li>\n</ul>\n\n<div class=\"tab-content\">\n  <ng-template [ngTemplateOutlet]=\"selectedTab?.contentTpl\"></ng-template>\n</div>\n", styles: [":host{display:block}\n"] }]
        }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { justified: [{
                type: Input
            }], selectedIndex: [{
                type: Input
            }], selectedIndexChange: [{
                type: Output
            }], selectedTabChange: [{
                type: Output
            }], tabs: [{
                type: ContentChildren,
                args: [NcTabComponent]
            }] } });

class NcTabsetModule {
}
NcTabsetModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcTabsetModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NcTabsetModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcTabsetModule, declarations: [NcTabsetComponent,
        NcTabComponent,
        NcTabTitleDirective,
        NcTabContentDirective], imports: [CommonModule], exports: [NcTabsetComponent,
        NcTabComponent,
        NcTabTitleDirective,
        NcTabContentDirective] });
NcTabsetModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcTabsetModule, imports: [[CommonModule]] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcTabsetModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [CommonModule],
                    exports: [
                        NcTabsetComponent,
                        NcTabComponent,
                        NcTabTitleDirective,
                        NcTabContentDirective,
                    ],
                    declarations: [
                        NcTabsetComponent,
                        NcTabComponent,
                        NcTabTitleDirective,
                        NcTabContentDirective,
                    ],
                }]
        }] });

class NcTooltipComponent {
    constructor(cdRef) {
        this.cdRef = cdRef;
        this.mouseLeaveSubject = new Subject();
        this.afterMouseLeave = () => this.mouseLeaveSubject.asObservable();
        this.mouseOver = false;
    }
    set content(content) {
        if (content instanceof TemplateRef) {
            this.template = content;
        }
        else {
            this.text = content;
        }
    }
    get inlineStyle() {
        if (!this.position || !this.offset) {
            return '';
        }
        return `--offset-${this.position}: -${this.offset}px;`;
    }
    handleMouseEnter() {
        this.mouseOver = true;
    }
    handleMouseLeave() {
        this.mouseOver = false;
        this.mouseLeaveSubject.next();
    }
    _markForCheck() {
        this.cdRef.markForCheck();
    }
    projectComponent(componentType) {
        return this.contentContainerRef.createComponent(componentType).instance;
    }
}
NcTooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcTooltipComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
NcTooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: NcTooltipComponent, selector: "nc-tooltip", inputs: { content: "content", position: "position", offset: "offset", style: "style" }, host: { listeners: { "mouseenter": "handleMouseEnter()", "mouseleave": "handleMouseLeave()" }, properties: { "attr.style": "this.inlineStyle" } }, viewQueries: [{ propertyName: "contentContainerRef", first: true, predicate: ["content"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<div\n  class=\"tooltip in\"\n  [class.tooltip-error]=\"style === 'error'\"\n  [ngClass]=\"position\"\n  @fadeIn\n>\n  <div class=\"tooltip-arrow\"></div>\n  <div #content class=\"tooltip-inner\">\n    <ng-container *ngIf=\"text\">{{ text }}</ng-container>\n    <ng-container *ngIf=\"template\" [ngTemplateOutlet]=\"template\"></ng-container>\n  </div>\n</div>\n", styles: [".tooltip{position:relative}.tooltip:after{content:\"\";position:absolute;left:0px;left:calc(var(--offset-right, 11px) - 11px);right:0px;right:calc(var(--offset-left, 11px) - 11px);bottom:0px;bottom:calc(var(--offset-top, 11px) - 11px);top:0px;top:calc(var(--offset-bottom, 11px) - 11px)}\n"], directives: [{ type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], animations: [
        trigger('fadeIn', [
            transition(':enter', [
                style({ opacity: '0' }),
                animate('200ms ease-out', style({ opacity: '1' })),
            ]),
        ]),
    ], changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcTooltipComponent, decorators: [{
            type: Component,
            args: [{ selector: 'nc-tooltip', changeDetection: ChangeDetectionStrategy.OnPush, animations: [
                        trigger('fadeIn', [
                            transition(':enter', [
                                style({ opacity: '0' }),
                                animate('200ms ease-out', style({ opacity: '1' })),
                            ]),
                        ]),
                    ], template: "<div\n  class=\"tooltip in\"\n  [class.tooltip-error]=\"style === 'error'\"\n  [ngClass]=\"position\"\n  @fadeIn\n>\n  <div class=\"tooltip-arrow\"></div>\n  <div #content class=\"tooltip-inner\">\n    <ng-container *ngIf=\"text\">{{ text }}</ng-container>\n    <ng-container *ngIf=\"template\" [ngTemplateOutlet]=\"template\"></ng-container>\n  </div>\n</div>\n", styles: [".tooltip{position:relative}.tooltip:after{content:\"\";position:absolute;left:0px;left:calc(var(--offset-right, 11px) - 11px);right:0px;right:calc(var(--offset-left, 11px) - 11px);bottom:0px;bottom:calc(var(--offset-top, 11px) - 11px);top:0px;top:calc(var(--offset-bottom, 11px) - 11px)}\n"] }]
        }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { contentContainerRef: [{
                type: ViewChild,
                args: ['content', { read: ViewContainerRef, static: true }]
            }], content: [{
                type: Input
            }], position: [{
                type: Input
            }], offset: [{
                type: Input
            }], style: [{
                type: Input
            }], inlineStyle: [{
                type: HostBinding,
                args: ['attr.style']
            }], handleMouseEnter: [{
                type: HostListener,
                args: ['mouseenter']
            }], handleMouseLeave: [{
                type: HostListener,
                args: ['mouseleave']
            }] } });

class NcTooltipDirective {
    constructor(elementRef, overlay, ngZone) {
        this.elementRef = elementRef;
        this.overlay = overlay;
        this.ngZone = ngZone;
        /** @ignore */
        this.destroyed$ = new Subject();
        /** @ignore */
        this._content = null;
        /** @ignore */
        this._placement = 'right';
        /** @ignore */
        this._offset = 15;
        /** @ignore */
        this.mouseOver = false;
    }
    set content(value) {
        var _a, _b;
        if (value === this._content) {
            return;
        }
        this._content = value;
        // Hide tooltip with empty content
        if (!this._content && ((_a = this.overlayRef) === null || _a === void 0 ? void 0 : _a.hasAttached())) {
            this.hide();
            return;
        }
        // Update the content in case tooltip is already opened
        if ((_b = this.overlayRef) === null || _b === void 0 ? void 0 : _b.hasAttached()) {
            this.tooltipInstance.content = this._content;
            this.tooltipInstance._markForCheck();
        }
    }
    get content() {
        return this._content;
    }
    set style(value) {
        var _a;
        if (value === this._style) {
            return;
        }
        this._style = value;
        // Update the content in case tooltip is already opened
        if ((_a = this.overlayRef) === null || _a === void 0 ? void 0 : _a.hasAttached()) {
            this.tooltipInstance.style = this._style;
            this.tooltipInstance._markForCheck();
        }
    }
    get style() {
        return this._style;
    }
    set offset(value) {
        if (value === undefined) {
            return;
        }
        if (this._offset === value) {
            return;
        }
        this._offset = value;
        this.updateTooltipPlacement();
    }
    get offset() {
        return this._offset;
    }
    set placement(value) {
        if (this._placement === value) {
            return;
        }
        this._placement = value;
        this.updateTooltipPlacement();
    }
    get placement() {
        return this._placement;
    }
    /** @ignore */
    ngOnDestroy() {
        var _a, _b;
        this.destroyed$.next();
        this.destroyed$.complete();
        (_a = this.overlayRef) === null || _a === void 0 ? void 0 : _a.detach();
        (_b = this.overlayRef) === null || _b === void 0 ? void 0 : _b.dispose();
    }
    show() {
        var _a, _b;
        if ((_a = this.overlayRef) === null || _a === void 0 ? void 0 : _a.hasAttached()) {
            return;
        }
        const overlayRef = this.createOverlay();
        this.tooltipPortal =
            (_b = this.tooltipPortal) !== null && _b !== void 0 ? _b : new ComponentPortal(NcTooltipComponent);
        this.tooltipInstanceDestroyed$ = new Subject();
        this.tooltipInstance = overlayRef.attach(this.tooltipPortal).instance;
        this.tooltipInstance.content = this.content;
        this.tooltipInstance.style = this.style;
        this.tooltipInstance
            .afterMouseLeave()
            .pipe(takeUntil(this.tooltipInstanceDestroyed$))
            .subscribe(() => setTimeout(() => this.softHide()));
        // Tell the instance current position (left, right, top, bottom)
        this.currentPosition$
            .pipe(takeUntil(this.tooltipInstanceDestroyed$))
            .subscribe((position) => {
            this.ngZone.run(() => {
                this.tooltipInstance.position = position;
                this.tooltipInstance.offset = this.offset;
                this.tooltipInstance._markForCheck();
            });
        });
    }
    hide() {
        var _a;
        if (!((_a = this.overlayRef) === null || _a === void 0 ? void 0 : _a.hasAttached())) {
            return;
        }
        this.overlayRef.detach();
        this.tooltipInstanceDestroyed$.next();
        this.tooltipInstanceDestroyed$.complete();
        this.tooltipInstance = null;
    }
    toggle() {
        var _a;
        if (!((_a = this.overlayRef) === null || _a === void 0 ? void 0 : _a.hasAttached())) {
            this.show();
            return;
        }
        this.hide();
    }
    /** @ignore */
    projectComponent(componentType) {
        if (!this.tooltipInstance) {
            throw new Error(`Trying to project content into a tooltip that is not yet created.`);
        }
        return this.tooltipInstance.projectComponent(componentType);
    }
    /** @ignore */
    handleMouseEnter() {
        if (this.disabled) {
            return;
        }
        this.mouseOver = true;
        this.show();
    }
    /** @ignore */
    handleMouseLeave() {
        if (this.disabled) {
            return;
        }
        this.mouseOver = false;
        setTimeout(() => this.softHide());
    }
    /**
     * closes only if mouse is not over the host element nor the tooltip itself
     * @ignore
     */
    softHide() {
        var _a;
        if (!this.mouseOver && !((_a = this.tooltipInstance) === null || _a === void 0 ? void 0 : _a.mouseOver)) {
            this.hide();
        }
    }
    /** @ignore */
    createOverlay() {
        if (this.overlayRef) {
            return this.overlayRef;
        }
        const positionStrategy = this.overlay
            .position()
            .flexibleConnectedTo(this.elementRef);
        this.currentPosition$ = positionStrategy.positionChanges.pipe(map((pos) => pos.connectionPair.panelClass));
        const scrollStrategy = this.overlay.scrollStrategies.reposition();
        this.overlayRef = this.overlay.create({ positionStrategy, scrollStrategy });
        this.overlayRef
            .keydownEvents()
            .pipe(takeUntil(this.destroyed$))
            .subscribe((event) => {
            var _a;
            if (((_a = this.overlayRef) === null || _a === void 0 ? void 0 : _a.hasAttached()) &&
                event.keyCode === ESCAPE &&
                !hasModifierKey(event)) {
                this.hide();
            }
        });
        this.updatePosition();
        return this.overlayRef;
    }
    /** @ignore */
    updateTooltipPlacement() {
        if (this.overlayRef) {
            this.updatePosition();
            this.overlayRef.updatePosition();
        }
    }
    /** @ignore */
    updatePosition() {
        const position = this.overlayRef.getConfig()
            .positionStrategy;
        const positions = this.getPositions(this._placement);
        position.withPositions(positions);
    }
    /** @ignore */
    getPositions(preferredPlacement) {
        const right = {
            originX: 'end',
            originY: 'center',
            overlayX: 'start',
            overlayY: 'center',
            offsetX: this.offset,
            panelClass: 'right',
        };
        const left = {
            originX: 'start',
            originY: 'center',
            overlayX: 'end',
            overlayY: 'center',
            offsetX: -this.offset,
            panelClass: 'left',
        };
        const top = {
            originX: 'center',
            originY: 'top',
            overlayX: 'center',
            overlayY: 'bottom',
            offsetY: -this.offset,
            panelClass: 'top',
        };
        const bottom = {
            originX: 'center',
            originY: 'bottom',
            overlayX: 'center',
            overlayY: 'top',
            offsetY: this.offset,
            panelClass: 'bottom',
        };
        switch (preferredPlacement) {
            case 'right':
                return [right, left, bottom, top];
            case 'left':
                return [left, right, bottom, top];
            case 'top':
                return [top, bottom, right, left];
            case 'bottom':
                return [bottom, top, right, left];
            default:
                throw new SyntaxError(`"${preferredPlacement}" value for 'placement' property is not supported. Available options: after, before, top, bottom, left or right.`);
        }
    }
}
NcTooltipDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcTooltipDirective, deps: [{ token: i0.ElementRef }, { token: i1$1.Overlay }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
NcTooltipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.3", type: NcTooltipDirective, selector: "[ncTooltip]", inputs: { content: ["ncTooltip", "content"], style: ["ncTooltipStyle", "style"], disabled: ["ncTooltipDisabled", "disabled"], offset: ["ncTooltipOffsetSize", "offset"], placement: "placement" }, host: { listeners: { "mouseenter": "handleMouseEnter()", "mouseleave": "handleMouseLeave()" } }, exportAs: ["ncTooltip"], ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcTooltipDirective, decorators: [{
            type: Directive,
            args: [{
                    selector: '[ncTooltip]',
                    exportAs: 'ncTooltip',
                }]
        }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.Overlay }, { type: i0.NgZone }]; }, propDecorators: { content: [{
                type: Input,
                args: ['ncTooltip']
            }], style: [{
                type: Input,
                args: ['ncTooltipStyle']
            }], disabled: [{
                type: Input,
                args: ['ncTooltipDisabled']
            }], offset: [{
                type: Input,
                args: ['ncTooltipOffsetSize']
            }], placement: [{
                type: Input
            }], handleMouseEnter: [{
                type: HostListener,
                args: ['mouseenter']
            }], handleMouseLeave: [{
                type: HostListener,
                args: ['mouseleave']
            }] } });

class NcTooltipModule {
}
NcTooltipModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcTooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NcTooltipModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcTooltipModule, declarations: [NcTooltipDirective, NcTooltipComponent], imports: [CommonModule, OverlayModule], exports: [NcTooltipDirective, NcTooltipComponent] });
NcTooltipModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcTooltipModule, imports: [[CommonModule, OverlayModule]] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcTooltipModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [CommonModule, OverlayModule],
                    declarations: [NcTooltipDirective, NcTooltipComponent],
                    exports: [NcTooltipDirective, NcTooltipComponent],
                }]
        }] });

class NcPillComponent {
}
NcPillComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcPillComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
NcPillComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: NcPillComponent, selector: "nc-pill", inputs: { disabled: "disabled", value: "value" }, viewQueries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true, static: true }], ngImport: i0, template: "<ng-template><ng-content></ng-content></ng-template>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcPillComponent, decorators: [{
            type: Component,
            args: [{ selector: 'nc-pill', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template><ng-content></ng-content></ng-template>\n" }]
        }], propDecorators: { disabled: [{
                type: Input
            }], value: [{
                type: Input
            }], templateRef: [{
                type: ViewChild,
                args: [TemplateRef, { static: true }]
            }] } });

class NcPillsComponent {
    constructor() {
        this.color = 'default';
        this.ariaLabel = null;
        this.ariaLabelledby = null;
        this.selectedChange = new EventEmitter();
    }
    /** @ignore */
    select(value) {
        this.selected = value;
        this.selectedChange.emit(value);
    }
}
NcPillsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcPillsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
NcPillsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: NcPillsComponent, selector: "nc-pills", inputs: { color: "color", selected: "selected", ariaLabel: ["aria-label", "ariaLabel"], ariaLabelledby: ["aria-labelledby", "ariaLabelledby"] }, outputs: { selectedChange: "selectedChange" }, host: { properties: { "attr.aria-label": "null", "attr.aria-labelledby": "null" } }, queries: [{ propertyName: "pills", predicate: NcPillComponent }], ngImport: i0, template: "<div\n  role=\"group\"\n  class=\"nav nav-pills\"\n  [class.nav-pills-primary]=\"color === 'primary'\"\n  [attr.aria-label]=\"ariaLabel\"\n  [attr.aria-labelledby]=\"ariaLabelledby\"\n>\n  <button\n    *ngFor=\"let pill of pills\"\n    type=\"button\"\n    [class.active]=\"pill.value === selected\"\n    [attr.aria-pressed]=\"pill.value === selected\"\n    [disabled]=\"pill.disabled\"\n    (click)=\"select(pill.value)\"\n  >\n    <ng-template [ngTemplateOutlet]=\"pill.templateRef\"></ng-template>\n  </button>\n</div>\n", directives: [{ type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcPillsComponent, decorators: [{
            type: Component,
            args: [{ selector: 'nc-pills', changeDetection: ChangeDetectionStrategy.OnPush, host: {
                        '[attr.aria-label]': 'null',
                        '[attr.aria-labelledby]': 'null',
                    }, template: "<div\n  role=\"group\"\n  class=\"nav nav-pills\"\n  [class.nav-pills-primary]=\"color === 'primary'\"\n  [attr.aria-label]=\"ariaLabel\"\n  [attr.aria-labelledby]=\"ariaLabelledby\"\n>\n  <button\n    *ngFor=\"let pill of pills\"\n    type=\"button\"\n    [class.active]=\"pill.value === selected\"\n    [attr.aria-pressed]=\"pill.value === selected\"\n    [disabled]=\"pill.disabled\"\n    (click)=\"select(pill.value)\"\n  >\n    <ng-template [ngTemplateOutlet]=\"pill.templateRef\"></ng-template>\n  </button>\n</div>\n" }]
        }], propDecorators: { color: [{
                type: Input
            }], selected: [{
                type: Input
            }], ariaLabel: [{
                type: Input,
                args: ['aria-label']
            }], ariaLabelledby: [{
                type: Input,
                args: ['aria-labelledby']
            }], selectedChange: [{
                type: Output
            }], pills: [{
                type: ContentChildren,
                args: [NcPillComponent]
            }] } });

class NcPillsModule {
}
NcPillsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcPillsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NcPillsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcPillsModule, declarations: [NcPillsComponent, NcPillComponent], imports: [CommonModule], exports: [NcPillsComponent, NcPillComponent] });
NcPillsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcPillsModule, imports: [[CommonModule]] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcPillsModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [CommonModule],
                    declarations: [NcPillsComponent, NcPillComponent],
                    exports: [NcPillsComponent, NcPillComponent],
                }]
        }] });

const CHECKBOX_CONTROL_VALUE_ACCESSOR = {
    provide: NG_VALUE_ACCESSOR,
    useExisting: forwardRef(() => NcCheckboxComponent),
    multi: true,
};
// Increasing integer for generating unique ids for checkbox components.
// Inspired by @angular/components
let nextUniqueId$2 = 0;
class NcCheckboxComponent {
    constructor(cdRef, injector) {
        this.cdRef = cdRef;
        this.injector = injector;
        /** @ignore */
        this._uniqueId = `nc-checkbox-${++nextUniqueId$2}`;
        /** @ignore */
        this._checked = false;
        /** @ignore */
        this._disabled = false;
        /** @ignore */
        this._indeterminate = false;
        this.change = new EventEmitter();
        this.indeterminateChange = new EventEmitter();
    }
    get name() {
        var _a, _b;
        const ngControl = this.injector.get(NgControl, null);
        return (_a = this._name) !== null && _a !== void 0 ? _a : (_b = ngControl === null || ngControl === void 0 ? void 0 : ngControl.name) === null || _b === void 0 ? void 0 : _b.toString();
    }
    set name(value) {
        if (value !== this._name) {
            this._name = value;
            this.cdRef.markForCheck();
        }
    }
    get id() {
        var _a;
        return (_a = this._id) !== null && _a !== void 0 ? _a : this._uniqueId;
    }
    set id(value) {
        if (value !== this._id) {
            this._id = value;
            this.cdRef.markForCheck();
        }
    }
    get checked() {
        return this._checked;
    }
    set checked(value) {
        if (value !== this.checked) {
            this._checked = value;
            this.cdRef.markForCheck();
        }
    }
    get disabled() {
        return this._disabled;
    }
    set disabled(value) {
        if (value !== this.disabled) {
            this._disabled = value;
            this.cdRef.markForCheck();
        }
    }
    get indeterminate() {
        return this._indeterminate;
    }
    set indeterminate(value) {
        if (value !== this._indeterminate) {
            this._indeterminate = value;
            this.cdRef.markForCheck();
        }
    }
    /** @ignore */
    onInputChange(event) {
        // We always have to stop propagation on the change event.
        // Otherwise the change event, from the input element, will bubble up and
        // emit its event object to the `change` output.
        event.stopPropagation();
        if (this.disabled) {
            return;
        }
        this.checked = !this.checked;
        this.updateModel();
    }
    /** @ignore */
    onBlur() {
        if (this._onTouched) {
            this._onTouched();
        }
    }
    /** @ignore */
    registerOnChange(fn) {
        this._onModelChanged = fn;
    }
    /** @ignore */
    registerOnTouched(fn) {
        this._onTouched = fn;
    }
    /** @ignore */
    writeValue(value) {
        this.checked = !!value;
    }
    /** @ignore */
    setDisabledState(isDisabled) {
        this.disabled = isDisabled;
    }
    /** @ignore */
    updateModel() {
        if (this._onModelChanged) {
            this._onModelChanged(this.checked);
        }
        this.change.emit(this.checked);
    }
}
NcCheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcCheckboxComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
NcCheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: NcCheckboxComponent, selector: "nc-checkbox", inputs: { value: "value", name: "name", id: "id", checked: "checked", disabled: "disabled", indeterminate: "indeterminate" }, outputs: { change: "change", indeterminateChange: "indeterminateChange" }, providers: [CHECKBOX_CONTROL_VALUE_ACCESSOR], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<div class=\"checkbox\" [class.disabled]=\"disabled\">\n  <input\n    type=\"checkbox\"\n    [id]=\"id + '-checkbox'\"\n    [name]=\"name\"\n    [checked]=\"checked\"\n    [indeterminate]=\"indeterminate\"\n    [disabled]=\"disabled\"\n    [attr.value]=\"value\"\n    (change)=\"onInputChange($event)\"\n    (blur)=\"onBlur()\"\n  />\n  <label [for]=\"id + '-checkbox'\"><ng-content></ng-content></label>\n</div>\n", styles: [".checkbox{display:block}.checkbox>label{display:block;padding-left:5px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcCheckboxComponent, decorators: [{
            type: Component,
            args: [{ selector: 'nc-checkbox', changeDetection: ChangeDetectionStrategy.OnPush, providers: [CHECKBOX_CONTROL_VALUE_ACCESSOR], template: "<div class=\"checkbox\" [class.disabled]=\"disabled\">\n  <input\n    type=\"checkbox\"\n    [id]=\"id + '-checkbox'\"\n    [name]=\"name\"\n    [checked]=\"checked\"\n    [indeterminate]=\"indeterminate\"\n    [disabled]=\"disabled\"\n    [attr.value]=\"value\"\n    (change)=\"onInputChange($event)\"\n    (blur)=\"onBlur()\"\n  />\n  <label [for]=\"id + '-checkbox'\"><ng-content></ng-content></label>\n</div>\n", styles: [".checkbox{display:block}.checkbox>label{display:block;padding-left:5px}\n"] }]
        }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.Injector }]; }, propDecorators: { value: [{
                type: Input
            }], change: [{
                type: Output
            }], indeterminateChange: [{
                type: Output
            }], inputElement: [{
                type: ViewChild,
                args: ['input']
            }], name: [{
                type: Input
            }], id: [{
                type: Input
            }], checked: [{
                type: Input
            }], disabled: [{
                type: Input
            }], indeterminate: [{
                type: Input
            }] } });

class NcCheckboxModule {
}
NcCheckboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NcCheckboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcCheckboxModule, declarations: [NcCheckboxComponent], imports: [CommonModule], exports: [NcCheckboxComponent] });
NcCheckboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcCheckboxModule, imports: [[CommonModule]] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcCheckboxModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [CommonModule],
                    declarations: [NcCheckboxComponent],
                    exports: [NcCheckboxComponent],
                }]
        }] });

/**
 * Provider Expression that allows nc-radio-group to register as a ControlValueAccessor.
 * This allows it to support [(ngModel)] and ngControl.
 */
const RADIO_CONTROL_VALUE_ACCESSOR = {
    provide: NG_VALUE_ACCESSOR,
    useExisting: forwardRef(() => NcRadioGroupComponent),
    multi: true,
};
// Increasing integer for generating unique ids for radio components.
let nextUniqueId$1 = 0;
class NcRadioGroupComponent {
    constructor(cdRef) {
        this.cdRef = cdRef;
        this._uniqueId = `nc-radio-group-${nextUniqueId$1++}`;
        this._disabled = false;
        /** Name of the radio button group. All radio buttons inside this group will use this name. */
        this.name = this._uniqueId;
        /**
         * Event emitted when the group value changes.
         * Change events are only emitted when the value changes due to user interaction with
         * a radio button (the same behavior as `<input type="radio">`).
         */
        this.valueChange = new EventEmitter();
    }
    /**
     * Value for the radio-group. Should equal the value of the selected radio button if there is
     * a corresponding radio button with a matching value. If there is not such a corresponding
     * radio button, this value persists to be applied in case a new radio button is added with a
     * matching value.
     */
    get value() {
        return this._value;
    }
    set value(value) {
        if (value !== this._value) {
            this._value = value;
            this.cdRef.markForCheck();
        }
    }
    /** Whether the radio group is disabled */
    get disabled() {
        return this._disabled;
    }
    set disabled(value) {
        if (value !== this._disabled) {
            this._disabled = value;
            this.cdRef.markForCheck();
        }
    }
    /** @ignore */
    registerOnChange(fn) {
        this._onModelChanged = fn;
    }
    /** @ignore */
    registerOnTouched(fn) {
        this._onTouched = fn;
    }
    /** @ignore */
    writeValue(value) {
        this.value = value;
    }
    /** @ignore */
    setDisabledState(isDisabled) {
        this.disabled = isDisabled;
    }
    /** @ignore */
    onValueChange(value) {
        if (this.value === value) {
            return;
        }
        this._value = value;
        this.valueChange.emit(value);
        if (this._onModelChanged) {
            this._onModelChanged(this.value);
        }
    }
    /** @ignore */
    onBlur() {
        if (this._onTouched) {
            this._onTouched();
        }
    }
}
NcRadioGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcRadioGroupComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
NcRadioGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: NcRadioGroupComponent, selector: "nc-radio-group", inputs: { name: "name", value: "value", disabled: "disabled" }, outputs: { valueChange: "valueChange" }, providers: [RADIO_CONTROL_VALUE_ACCESSOR], ngImport: i0, template: "<ng-content></ng-content>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcRadioGroupComponent, decorators: [{
            type: Component,
            args: [{ selector: 'nc-radio-group', changeDetection: ChangeDetectionStrategy.OnPush, providers: [RADIO_CONTROL_VALUE_ACCESSOR], template: "<ng-content></ng-content>\n" }]
        }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { name: [{
                type: Input
            }], value: [{
                type: Input
            }], disabled: [{
                type: Input
            }], valueChange: [{
                type: Output
            }] } });

// Increasing integer for generating unique ids for radio components.
let nextUniqueId = 0;
class NcRadioComponent {
    constructor(cdRef, radioGroup) {
        this.cdRef = cdRef;
        this.radioGroup = radioGroup;
        this._uniqueId = `nc-radio-${++nextUniqueId}`;
        this._checked = false;
        this._disabled = false;
        this._groupDisabled = false;
        /**
         * Event emitted when the group value changes.
         * Change events are only emitted when the value changes due to user interaction with
         * a radio button (the same behavior as `<input type="radio">`).
         */
        this.change = new EventEmitter();
    }
    /** Name of the radio button group. All radio buttons inside this group will use this name. */
    get name() {
        var _a, _b, _c;
        return (_c = (_b = (_a = this.radioGroup) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : this._name) !== null && _c !== void 0 ? _c : this._uniqueId;
    }
    set name(value) {
        if (value !== this._name) {
            this._name = value;
            this.cdRef.markForCheck();
        }
    }
    /** The unique ID for the radio button. */
    get id() {
        var _a;
        return (_a = this._inputId) !== null && _a !== void 0 ? _a : this._uniqueId;
    }
    set id(value) {
        if (value !== this._inputId) {
            this._inputId = value;
            this.cdRef.markForCheck();
        }
    }
    /** Whether this radio button is checked. */
    get checked() {
        return this._checked;
    }
    set checked(value) {
        if (value !== this.checked) {
            this._checked = value;
            this.cdRef.markForCheck();
        }
    }
    /** Whether this radio button is disabled. */
    get disabled() {
        return this._groupDisabled || this._disabled;
    }
    set disabled(value) {
        if (value !== this.disabled) {
            this._disabled = value;
            this.cdRef.markForCheck();
        }
    }
    /** @ignore */
    get inputId() {
        return (this.id || this._uniqueId) + '-input';
    }
    /** @ignore */
    ngDoCheck() {
        var _a, _b, _c;
        const shouldBeChecked = ((_a = this.radioGroup) === null || _a === void 0 ? void 0 : _a.value) === this.value;
        if (this.radioGroup && this.checked !== shouldBeChecked) {
            this.checked = shouldBeChecked;
            this.cdRef.markForCheck();
        }
        if (((_b = this.radioGroup) === null || _b === void 0 ? void 0 : _b.disabled) !== this._groupDisabled) {
            this._groupDisabled = (_c = this.radioGroup) === null || _c === void 0 ? void 0 : _c.disabled;
            this.cdRef.markForCheck();
        }
    }
    /** @ignore */
    onInputChange(event) {
        var _a;
        // We always have to stop propagation on the change event.
        // Otherwise the change event, from the input element, will bubble up and
        // emit its event object to the `change` output.
        event.stopPropagation();
        if (this.disabled) {
            return;
        }
        this.change.emit(this.value);
        (_a = this.radioGroup) === null || _a === void 0 ? void 0 : _a.onValueChange(this.value);
    }
    /** @ignore */
    onBlur() {
        var _a;
        (_a = this.radioGroup) === null || _a === void 0 ? void 0 : _a.onBlur();
    }
}
NcRadioComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcRadioComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: NcRadioGroupComponent, optional: true }], target: i0.ɵɵFactoryTarget.Component });
NcRadioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: NcRadioComponent, selector: "nc-radio", inputs: { value: "value", name: "name", id: "id", checked: "checked", disabled: "disabled" }, outputs: { change: "change" }, ngImport: i0, template: "<div class=\"radio\" [class.disabled]=\"disabled\">\n  <input\n    type=\"radio\"\n    [attr.id]=\"inputId\"\n    [name]=\"name\"\n    [checked]=\"checked\"\n    [disabled]=\"disabled\"\n    [attr.value]=\"value\"\n    (change)=\"onInputChange($event)\"\n    (blur)=\"onBlur()\"\n  />\n  <label [attr.for]=\"inputId\"><ng-content></ng-content></label>\n</div>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcRadioComponent, decorators: [{
            type: Component,
            args: [{ selector: 'nc-radio', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"radio\" [class.disabled]=\"disabled\">\n  <input\n    type=\"radio\"\n    [attr.id]=\"inputId\"\n    [name]=\"name\"\n    [checked]=\"checked\"\n    [disabled]=\"disabled\"\n    [attr.value]=\"value\"\n    (change)=\"onInputChange($event)\"\n    (blur)=\"onBlur()\"\n  />\n  <label [attr.for]=\"inputId\"><ng-content></ng-content></label>\n</div>\n" }]
        }], ctorParameters: function () {
        return [{ type: i0.ChangeDetectorRef }, { type: NcRadioGroupComponent, decorators: [{
                        type: Optional
                    }] }];
    }, propDecorators: { value: [{
                type: Input
            }], name: [{
                type: Input
            }], id: [{
                type: Input
            }], checked: [{
                type: Input
            }], disabled: [{
                type: Input
            }], change: [{
                type: Output
            }] } });

class NcRadioModule {
}
NcRadioModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcRadioModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NcRadioModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcRadioModule, declarations: [NcRadioComponent, NcRadioGroupComponent], imports: [CommonModule], exports: [NcRadioComponent, NcRadioGroupComponent] });
NcRadioModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcRadioModule, imports: [[CommonModule]] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcRadioModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [CommonModule],
                    declarations: [NcRadioComponent, NcRadioGroupComponent],
                    exports: [NcRadioComponent, NcRadioGroupComponent],
                }]
        }] });

const NC_COLLAPSIBLE_LIST = new InjectionToken('NcCollapsibleList');

class NcExpansionPanelComponent extends CdkAccordionItem {
    constructor(collapsibleList, cdRef, expansionDispatcher) {
        super(collapsibleList, cdRef, expansionDispatcher);
    }
    get headerId() {
        return this.id + '-header';
    }
    get panelId() {
        return this.id + '-panel';
    }
}
NcExpansionPanelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcExpansionPanelComponent, deps: [{ token: NC_COLLAPSIBLE_LIST, skipSelf: true }, { token: i0.ChangeDetectorRef }, { token: i1$6.UniqueSelectionDispatcher }], target: i0.ɵɵFactoryTarget.Component });
NcExpansionPanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: NcExpansionPanelComponent, selector: "nc-expansion-panel", viewQueries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ng-template>\n  <div class=\"panel panel-default\">\n    <div class=\"panel-heading\" [attr.id]=\"headerId\">\n      <h4 class=\"panel-title\">\n        <a\n          (click)=\"toggle()\"\n          [class.collapsed]=\"!expanded\"\n          data-toggle=\"collapse\"\n          [attr.aria-expanded]=\"expanded\"\n          [attr.aria-controls]=\"panelId\"\n          role=\"button\"\n        >\n          <ng-content select=\"nc-panel-title\"></ng-content>\n          <span class=\"caret caret-large-blue\"></span>\n        </a>\n      </h4>\n    </div>\n\n    <div\n      [attr.id]=\"panelId\"\n      class=\"panel-collapse\"\n      [@accordion]=\"expanded ? 'expanded' : 'collapsed'\"\n      [class.expanded]=\"expanded\"\n      [attr.aria-labelledby]=\"headerId\"\n    >\n      <div class=\"panel-body\">\n        <ng-content></ng-content>\n      </div>\n    </div>\n  </div>\n</ng-template>\n", styles: [".panel>.panel-heading .collapsed{margin-bottom:0}.panel>.panel-collapse.ng-animating{overflow:hidden}.panel>.panel-collapse>.panel-body{padding-top:18px;padding-bottom:0}\n"], animations: [accordion], changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcExpansionPanelComponent, decorators: [{
            type: Component,
            args: [{ selector: 'nc-expansion-panel', changeDetection: ChangeDetectionStrategy.OnPush, animations: [accordion], template: "<ng-template>\n  <div class=\"panel panel-default\">\n    <div class=\"panel-heading\" [attr.id]=\"headerId\">\n      <h4 class=\"panel-title\">\n        <a\n          (click)=\"toggle()\"\n          [class.collapsed]=\"!expanded\"\n          data-toggle=\"collapse\"\n          [attr.aria-expanded]=\"expanded\"\n          [attr.aria-controls]=\"panelId\"\n          role=\"button\"\n        >\n          <ng-content select=\"nc-panel-title\"></ng-content>\n          <span class=\"caret caret-large-blue\"></span>\n        </a>\n      </h4>\n    </div>\n\n    <div\n      [attr.id]=\"panelId\"\n      class=\"panel-collapse\"\n      [@accordion]=\"expanded ? 'expanded' : 'collapsed'\"\n      [class.expanded]=\"expanded\"\n      [attr.aria-labelledby]=\"headerId\"\n    >\n      <div class=\"panel-body\">\n        <ng-content></ng-content>\n      </div>\n    </div>\n  </div>\n</ng-template>\n", styles: [".panel>.panel-heading .collapsed{margin-bottom:0}.panel>.panel-collapse.ng-animating{overflow:hidden}.panel>.panel-collapse>.panel-body{padding-top:18px;padding-bottom:0}\n"] }]
        }], ctorParameters: function () {
        return [{ type: i2$1.CdkAccordion, decorators: [{
                        type: SkipSelf
                    }, {
                        type: Inject,
                        args: [NC_COLLAPSIBLE_LIST]
                    }] }, { type: i0.ChangeDetectorRef }, { type: i1$6.UniqueSelectionDispatcher }];
    }, propDecorators: { templateRef: [{
                type: ViewChild,
                args: [TemplateRef, { static: true }]
            }] } });

class NcCollapsibleListComponent extends CdkAccordion {
}
NcCollapsibleListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcCollapsibleListComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
NcCollapsibleListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: NcCollapsibleListComponent, selector: "nc-collapsible-list", providers: [
        { provide: NC_COLLAPSIBLE_LIST, useExisting: NcCollapsibleListComponent },
    ], queries: [{ propertyName: "panels", predicate: NcExpansionPanelComponent }], usesInheritance: true, ngImport: i0, template: "<div class=\"panel-group\" role=\"tablist\">\n  <ng-container\n    *ngFor=\"let panel of panels\"\n    [ngTemplateOutlet]=\"panel.templateRef\"\n  ></ng-container>\n</div>\n", styles: [".panel-group{padding-bottom:18px}\n"], directives: [{ type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcCollapsibleListComponent, decorators: [{
            type: Component,
            args: [{ selector: 'nc-collapsible-list', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
                        { provide: NC_COLLAPSIBLE_LIST, useExisting: NcCollapsibleListComponent },
                    ], template: "<div class=\"panel-group\" role=\"tablist\">\n  <ng-container\n    *ngFor=\"let panel of panels\"\n    [ngTemplateOutlet]=\"panel.templateRef\"\n  ></ng-container>\n</div>\n", styles: [".panel-group{padding-bottom:18px}\n"] }]
        }], propDecorators: { panels: [{
                type: ContentChildren,
                args: [NcExpansionPanelComponent]
            }] } });

class NcPanelTitleComponent {
}
NcPanelTitleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcPanelTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
NcPanelTitleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: NcPanelTitleComponent, selector: "nc-panel-title", ngImport: i0, template: "<ng-content></ng-content>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcPanelTitleComponent, decorators: [{
            type: Component,
            args: [{ selector: 'nc-panel-title', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>\n" }]
        }] });

class NcCollapsibleListModule {
}
NcCollapsibleListModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcCollapsibleListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NcCollapsibleListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcCollapsibleListModule, declarations: [NcCollapsibleListComponent,
        NcExpansionPanelComponent,
        NcPanelTitleComponent], imports: [CommonModule, CdkAccordionModule], exports: [NcCollapsibleListComponent,
        NcExpansionPanelComponent,
        NcPanelTitleComponent] });
NcCollapsibleListModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcCollapsibleListModule, imports: [[CommonModule, CdkAccordionModule]] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcCollapsibleListModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [CommonModule, CdkAccordionModule],
                    declarations: [
                        NcCollapsibleListComponent,
                        NcExpansionPanelComponent,
                        NcPanelTitleComponent,
                    ],
                    exports: [
                        NcCollapsibleListComponent,
                        NcExpansionPanelComponent,
                        NcPanelTitleComponent,
                    ],
                }]
        }] });

class NcLightDarkSwitchComponent {
    constructor() {
        this.isDark = false;
        this.darkChange = new EventEmitter();
    }
}
NcLightDarkSwitchComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcLightDarkSwitchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
NcLightDarkSwitchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: NcLightDarkSwitchComponent, selector: "nc-light-dark-switch", inputs: { isDark: "isDark" }, outputs: { darkChange: "darkChange" }, ngImport: i0, template: "<label class=\"switch switch-label light-dark-toggle\">\n  <b class=\"light\" i18n=\"@@nc-light-mode\">Light mode</b>\n  <input\n    type=\"checkbox\"\n    name=\"option\"\n    [checked]=\"isDark\"\n    (change)=\"darkChange.emit($any($event.target).checked)\"\n  />\n  <span class=\"togglemark\"><b class=\"details\"></b></span>\n  <b class=\"dark\" i18n=\"@@nc-dark-mode\">Dark mode</b>\n</label>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcLightDarkSwitchComponent, decorators: [{
            type: Component,
            args: [{ selector: 'nc-light-dark-switch', changeDetection: ChangeDetectionStrategy.OnPush, template: "<label class=\"switch switch-label light-dark-toggle\">\n  <b class=\"light\" i18n=\"@@nc-light-mode\">Light mode</b>\n  <input\n    type=\"checkbox\"\n    name=\"option\"\n    [checked]=\"isDark\"\n    (change)=\"darkChange.emit($any($event.target).checked)\"\n  />\n  <span class=\"togglemark\"><b class=\"details\"></b></span>\n  <b class=\"dark\" i18n=\"@@nc-dark-mode\">Dark mode</b>\n</label>\n" }]
        }], propDecorators: { isDark: [{
                type: Input
            }], darkChange: [{
                type: Output
            }] } });

class NcLightDarkSwitchModule {
}
NcLightDarkSwitchModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcLightDarkSwitchModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NcLightDarkSwitchModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcLightDarkSwitchModule, declarations: [NcLightDarkSwitchComponent], imports: [CommonModule], exports: [NcLightDarkSwitchComponent] });
NcLightDarkSwitchModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcLightDarkSwitchModule, imports: [[CommonModule]] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcLightDarkSwitchModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [CommonModule],
                    declarations: [NcLightDarkSwitchComponent],
                    exports: [NcLightDarkSwitchComponent],
                }]
        }] });

class NcErrorDirective {
    constructor(templateRef) {
        this.templateRef = templateRef;
    }
}
NcErrorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcErrorDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
NcErrorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.3", type: NcErrorDirective, selector: "ng-template[ncError]", inputs: { errorKey: ["ncError", "errorKey"] }, ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcErrorDirective, decorators: [{
            type: Directive,
            args: [{ selector: 'ng-template[ncError]' }]
        }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; }, propDecorators: { errorKey: [{
                type: Input,
                args: ['ncError']
            }] } });

class NcErrorsComponent {
    constructor(renderer, elRef) {
        this.renderer = renderer;
        this.elRef = elRef;
        this.destroyed$ = new Subject();
        this.errorsSubject = new BehaviorSubject({});
        this.errors$ = this.errorsSubject.asObservable();
        this.getErrors = () => this.errorsSubject.getValue();
    }
    ngOnInit() {
        /**
         * This is an virtual component only needed to pass-through the error list,
         * no actual component is needed in the DOM, therefore `hidden` attribute is set.
         */
        this.renderer.setAttribute(this.elRef.nativeElement, 'hidden', '');
    }
    ngAfterContentInit() {
        this.errorsSubject.next(this.getMappedErrors());
        this.errors.changes
            .pipe(map(() => this.getMappedErrors()), takeUntil(this.destroyed$))
            .subscribe(this.errorsSubject);
    }
    ngOnDestroy() {
        this.destroyed$.next();
        this.destroyed$.unsubscribe();
    }
    getMappedErrors() {
        return this.errors.reduce((errors, error) => (Object.assign(Object.assign({}, errors), { [error.errorKey]: error.templateRef })), {});
    }
}
NcErrorsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcErrorsComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
NcErrorsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: NcErrorsComponent, selector: "nc-errors", queries: [{ propertyName: "errors", predicate: NcErrorDirective }], exportAs: ["ncErrors"], ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcErrorsComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'nc-errors',
                    exportAs: 'ncErrors',
                    template: '',
                    changeDetection: ChangeDetectionStrategy.OnPush,
                }]
        }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { errors: [{
                type: ContentChildren,
                args: [NcErrorDirective]
            }] } });

class NcGlobalErrorMessagesService {
    constructor() {
        this.errorMessagesSubject = new BehaviorSubject({});
        this.errorMessages$ = this.errorMessagesSubject.asObservable();
        this.getErrorMessages = () => this.errorMessagesSubject.getValue();
    }
    registerErrorMessages(messages) {
        const currentMessages = this.getErrorMessages();
        this.errorMessagesSubject.next(Object.assign(Object.assign({}, currentMessages), messages));
    }
}
NcGlobalErrorMessagesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcGlobalErrorMessagesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
NcGlobalErrorMessagesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcGlobalErrorMessagesService, providedIn: 'root' });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcGlobalErrorMessagesService, decorators: [{
            type: Injectable,
            args: [{ providedIn: 'root' }]
        }] });

class NcGlobalErrorsComponent {
    constructor(renderer, elRef, globalErrors) {
        this.renderer = renderer;
        this.elRef = elRef;
        this.globalErrors = globalErrors;
        this.destroyed$ = new Subject();
    }
    ngOnInit() {
        /**
         * This is an virtual component only needed to pass-through the error list,
         * no actual component is needed in the DOM, therefore `hidden` attribute is set.
         */
        this.renderer.setAttribute(this.elRef.nativeElement, 'hidden', '');
    }
    ngAfterContentInit() {
        this.updateGlobalErrorMessages();
        this.errors.changes
            .pipe(takeUntil(this.destroyed$))
            .subscribe(() => this.updateGlobalErrorMessages());
    }
    ngOnDestroy() {
        this.destroyed$.next();
        this.destroyed$.unsubscribe();
    }
    updateGlobalErrorMessages() {
        const messages = this.errors.reduce((errors, error) => (Object.assign(Object.assign({}, errors), { [error.errorKey]: error.templateRef })), {});
        this.globalErrors.registerErrorMessages(messages);
    }
}
NcGlobalErrorsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcGlobalErrorsComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: NcGlobalErrorMessagesService }], target: i0.ɵɵFactoryTarget.Component });
NcGlobalErrorsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: NcGlobalErrorsComponent, selector: "nc-global-errors", queries: [{ propertyName: "errors", predicate: NcErrorDirective }], ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcGlobalErrorsComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'nc-global-errors',
                    template: '',
                    changeDetection: ChangeDetectionStrategy.OnPush,
                }]
        }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: NcGlobalErrorMessagesService }]; }, propDecorators: { errors: [{
                type: ContentChildren,
                args: [NcErrorDirective]
            }] } });

class NcErrorTooltipContentComponent {
    constructor(cd, globalErrorMessagesService) {
        this.cd = cd;
        this.globalErrorMessagesService = globalErrorMessagesService;
        this.destroyed$ = new Subject();
        this.errors = {};
        this.errorMessages = {};
        this.globalErrorMessages = {};
    }
    ngOnInit() {
        this.globalErrorMessagesService.errorMessages$
            .pipe(takeUntil(this.destroyed$))
            .subscribe((messages) => {
            this.globalErrorMessages = messages;
            this.cd.markForCheck();
        });
    }
    ngOnDestroy() {
        this.destroyed$.next();
        this.destroyed$.unsubscribe();
    }
    get errorKeys() {
        return Object.keys(this.errors);
    }
}
NcErrorTooltipContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcErrorTooltipContentComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: NcGlobalErrorMessagesService }], target: i0.ɵɵFactoryTarget.Component });
NcErrorTooltipContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: NcErrorTooltipContentComponent, selector: "nc-error-tooltip-content", inputs: { errors: "errors", errorMessages: "errorMessages", errorMessageId: "errorMessageId" }, ngImport: i0, template: "<div [attr.id]=\"errorMessageId\" aria-live=\"assertive\">\n  <div *ngFor=\"let errKey of errorKeys\">\n    <ng-template\n      *ngIf=\"errorMessages[errKey]\"\n      [ngTemplateOutlet]=\"errorMessages[errKey]\"\n      [ngTemplateOutletContext]=\"{\n        $implicit: errors[errKey],\n        error: errors[errKey]\n      }\"\n    ></ng-template>\n\n    <ng-template\n      *ngIf=\"!errorMessages[errKey] && globalErrorMessages[errKey]\"\n      [ngTemplateOutlet]=\"globalErrorMessages[errKey]\"\n      [ngTemplateOutletContext]=\"{\n        $implicit: errors[errKey],\n        error: errors[errKey]\n      }\"\n    ></ng-template>\n\n    <ng-container\n      *ngIf=\"!errorMessages[errKey] && !globalErrorMessages[errKey]\"\n    >\n      Validation error: *{{ errKey }}*.\n    </ng-container>\n  </div>\n</div>\n", directives: [{ type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcErrorTooltipContentComponent, decorators: [{
            type: Component,
            args: [{ selector: 'nc-error-tooltip-content', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [attr.id]=\"errorMessageId\" aria-live=\"assertive\">\n  <div *ngFor=\"let errKey of errorKeys\">\n    <ng-template\n      *ngIf=\"errorMessages[errKey]\"\n      [ngTemplateOutlet]=\"errorMessages[errKey]\"\n      [ngTemplateOutletContext]=\"{\n        $implicit: errors[errKey],\n        error: errors[errKey]\n      }\"\n    ></ng-template>\n\n    <ng-template\n      *ngIf=\"!errorMessages[errKey] && globalErrorMessages[errKey]\"\n      [ngTemplateOutlet]=\"globalErrorMessages[errKey]\"\n      [ngTemplateOutletContext]=\"{\n        $implicit: errors[errKey],\n        error: errors[errKey]\n      }\"\n    ></ng-template>\n\n    <ng-container\n      *ngIf=\"!errorMessages[errKey] && !globalErrorMessages[errKey]\"\n    >\n      Validation error: *{{ errKey }}*.\n    </ng-container>\n  </div>\n</div>\n" }]
        }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: NcGlobalErrorMessagesService }]; }, propDecorators: { errors: [{
                type: Input
            }], errorMessages: [{
                type: Input
            }], errorMessageId: [{
                type: Input
            }] } });

// Increasing integer for generating unique ids for error message component.
let nextErrorMessageId = 0;
class NcErrorTooltipDirective extends NcTooltipDirective {
    constructor(elRef, overlay, ngZone, implicitNgControl, ngForm, controlContainer) {
        super(elRef, overlay, ngZone);
        this.implicitNgControl = implicitNgControl;
        this.ngForm = ngForm;
        this.controlContainer = controlContainer;
        this.inFocus = false;
        this.formSubmitted = false;
        this.contentInstance = null;
        this._errorMessages = {};
        this.errorMessagesSub = new Subscription();
        this.errorMessageId = `nc-error-message-${++nextErrorMessageId}`;
        this.errorMessages = '';
        this.customErrors = null;
        this.disabled = true;
        this.style = 'error';
        this.content = '';
    }
    ngOnInit() {
        var _a;
        if (!this.ngControl) {
            throw new Error(`[ncErrorTooltip] only works with angular form controls. Make sure [(ngModel)] or [formControl] is used.`);
        }
        this.ngControl.statusChanges
            .pipe(takeUntil(this.destroyed$))
            .subscribe(() => this.checkTooltipState());
        (_a = this.formContainer) === null || _a === void 0 ? void 0 : _a.ngSubmit.pipe(takeUntil(this.destroyed$)).subscribe(() => {
            this.formSubmitted = true;
            this.checkTooltipState();
        });
    }
    ngDoCheck() {
        if (this.formContainer &&
            this.formContainer.submitted !== this.formSubmitted) {
            // `NgForm` doesn't provide `reset` observable,
            // so this must be manually checked on every change-detection run ;(
            this.formSubmitted = this.formContainer.submitted;
            this.checkTooltipState();
        }
    }
    ngOnChanges(changes) {
        var _a;
        this.checkTooltipState();
        if (changes['errorMessages']) {
            (_a = this.errorMessagesSub) === null || _a === void 0 ? void 0 : _a.unsubscribe();
            if (this.errorMessages instanceof NcErrorsComponent) {
                this.errorMessagesSub = this.errorMessages.errors$
                    .pipe(takeUntil(this.destroyed$))
                    .subscribe((errorMessages) => {
                    this._errorMessages = errorMessages;
                    this.updateErrorMessages();
                });
            }
            else {
                this._errorMessages = {};
                this.updateErrorMessages();
            }
        }
    }
    onFocus() {
        this.inFocus = true;
        this.checkTooltipState();
    }
    onBlur() {
        this.inFocus = false;
        this.checkTooltipState();
    }
    hide() {
        // overriding this method to prevent default tooltip closing behaviour
    }
    get ngControl() {
        if (this.explicitNgControl instanceof NgControl ||
            this.explicitNgControl instanceof FormControl) {
            return this.explicitNgControl;
        }
        return this.implicitNgControl;
    }
    get formContainer() {
        if (this.controlContainer &&
            this.controlContainer.formDirective instanceof FormGroupDirective) {
            return this.controlContainer.formDirective;
        }
        return this.ngForm;
    }
    checkTooltipState() {
        var _a;
        const hasCustomError = Object.values((_a = this.customErrors) !== null && _a !== void 0 ? _a : {}).some((e) => e !== null && e !== undefined);
        this.hasError =
            (this.ngControl.invalid || hasCustomError) &&
                ((this.ngControl.touched && this.ngControl.dirty) || this.formSubmitted);
        const shouldBeVisible = this.hasError && this.inFocus;
        if (shouldBeVisible) {
            this.show();
            this.createContentInstance();
            this.updateErrorMessages();
        }
        else {
            super.hide();
            this.contentInstance = null;
        }
    }
    createContentInstance() {
        if (!this.contentInstance) {
            this.contentInstance = this.projectComponent(NcErrorTooltipContentComponent);
            this.contentInstance.errorMessageId = this.errorMessageId;
        }
        return this.contentInstance;
    }
    updateErrorMessages() {
        if (!this.contentInstance) {
            return;
        }
        this.contentInstance.errors = this.getErrors();
        this.contentInstance.errorMessages = this._errorMessages;
        this.contentInstance.cd.detectChanges();
    }
    getErrors() {
        var _a;
        const customErrors = Object.entries((_a = this.customErrors) !== null && _a !== void 0 ? _a : {}).reduce((l, [key, err]) => err !== null && err !== undefined ? Object.assign(Object.assign({}, l), { [key]: err }) : l, {});
        return Object.assign(Object.assign({}, this.ngControl.errors), customErrors);
    }
}
NcErrorTooltipDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcErrorTooltipDirective, deps: [{ token: i0.ElementRef }, { token: i1$1.Overlay }, { token: i0.NgZone }, { token: i2.NgControl, optional: true }, { token: i2.NgForm, optional: true }, { token: i2.ControlContainer, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
NcErrorTooltipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.3", type: NcErrorTooltipDirective, selector: "[ncErrorTooltip]", inputs: { errorMessages: ["ncErrorTooltip", "errorMessages"], explicitNgControl: ["ncErrorTooltipControl", "explicitNgControl"], customErrors: ["ncErrorTooltipCustom", "customErrors"] }, host: { listeners: { "focusin": "onFocus()", "focusout": "onBlur()" }, properties: { "attr.aria-invalid": "this.hasError", "class.has-error": "this.hasError", "attr.aria-errormessage": "this.errorMessageId" } }, exportAs: ["ncErrorTooltip"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcErrorTooltipDirective, decorators: [{
            type: Directive,
            args: [{
                    selector: '[ncErrorTooltip]',
                    exportAs: 'ncErrorTooltip',
                }]
        }], ctorParameters: function () {
        return [{ type: i0.ElementRef }, { type: i1$1.Overlay }, { type: i0.NgZone }, { type: i2.NgControl, decorators: [{
                        type: Optional
                    }] }, { type: i2.NgForm, decorators: [{
                        type: Optional
                    }] }, { type: i2.ControlContainer, decorators: [{
                        type: Optional
                    }] }];
    }, propDecorators: { hasError: [{
                type: HostBinding,
                args: ['attr.aria-invalid']
            }, {
                type: HostBinding,
                args: ['class.has-error']
            }], errorMessageId: [{
                type: HostBinding,
                args: ['attr.aria-errormessage']
            }], errorMessages: [{
                type: Input,
                args: ['ncErrorTooltip']
            }], explicitNgControl: [{
                type: Input,
                args: ['ncErrorTooltipControl']
            }], customErrors: [{
                type: Input,
                args: ['ncErrorTooltipCustom']
            }], onFocus: [{
                type: HostListener,
                args: ['focusin']
            }], onBlur: [{
                type: HostListener,
                args: ['focusout']
            }] } });

class NcErrorTooltipModule {
}
NcErrorTooltipModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcErrorTooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NcErrorTooltipModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcErrorTooltipModule, declarations: [NcErrorTooltipDirective,
        NcErrorTooltipContentComponent,
        NcErrorsComponent,
        NcErrorDirective,
        NcGlobalErrorsComponent], imports: [CommonModule, OverlayModule, ReactiveFormsModule], exports: [NcErrorTooltipDirective,
        NcErrorsComponent,
        NcErrorDirective,
        NcGlobalErrorsComponent] });
NcErrorTooltipModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcErrorTooltipModule, imports: [[CommonModule, OverlayModule, ReactiveFormsModule]] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcErrorTooltipModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [CommonModule, OverlayModule, ReactiveFormsModule],
                    declarations: [
                        NcErrorTooltipDirective,
                        NcErrorTooltipContentComponent,
                        NcErrorsComponent,
                        NcErrorDirective,
                        NcGlobalErrorsComponent,
                    ],
                    exports: [
                        NcErrorTooltipDirective,
                        NcErrorsComponent,
                        NcErrorDirective,
                        NcGlobalErrorsComponent,
                    ],
                }]
        }] });

class NordicCoolModule {
}
NordicCoolModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NordicCoolModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NordicCoolModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NordicCoolModule, exports: [NcDatepickerModule,
        NcSelectModule,
        NcSidebarModule,
        NcSpinnerModule,
        NcNavbarModule,
        NcDropdownModule,
        NcTabsetModule,
        NcTooltipModule,
        NcPillsModule,
        NcCheckboxModule,
        NcRadioModule,
        NcCollapsibleListModule,
        NcAlertModule,
        NcLightDarkSwitchModule,
        NcErrorTooltipModule] });
NordicCoolModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NordicCoolModule, imports: [NcDatepickerModule,
        NcSelectModule,
        NcSidebarModule,
        NcSpinnerModule,
        NcNavbarModule,
        NcDropdownModule,
        NcTabsetModule,
        NcTooltipModule,
        NcPillsModule,
        NcCheckboxModule,
        NcRadioModule,
        NcCollapsibleListModule,
        NcAlertModule,
        NcLightDarkSwitchModule,
        NcErrorTooltipModule] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NordicCoolModule, decorators: [{
            type: NgModule,
            args: [{
                    exports: [
                        NcDatepickerModule,
                        NcSelectModule,
                        NcSidebarModule,
                        NcSpinnerModule,
                        NcNavbarModule,
                        NcDropdownModule,
                        NcTabsetModule,
                        NcTooltipModule,
                        NcPillsModule,
                        NcCheckboxModule,
                        NcRadioModule,
                        NcCollapsibleListModule,
                        NcAlertModule,
                        NcLightDarkSwitchModule,
                        NcErrorTooltipModule,
                    ],
                }]
        }] });

class NcModalOptions {
}
class NcModalRef {
    constructor(overlayRef, options) {
        this.overlayRef = overlayRef;
        /** @ignore */
        this.closeSubject = new Subject();
        this.closed$ = this.closeSubject.asObservable();
        overlayRef
            .keydownEvents()
            .pipe(filter((event) => options.closeOnEscape &&
            event.key === 'Escape' &&
            !hasModifierKey(event)))
            .subscribe((event) => {
            event.preventDefault();
            this.softClose();
        });
        if (options.closeOnOutsideClick) {
            overlayRef.backdropClick().subscribe(() => this.softClose());
        }
    }
    close(result) {
        if (!this.overlayRef.hasAttached()) {
            return;
        }
        this.overlayRef.dispose();
        this.closeSubject.next(result);
        this.closeSubject.complete();
    }
    afterClosed({ closeOnUnsubscribe } = { closeOnUnsubscribe: true }) {
        return new Observable((observer) => {
            this.closeSubject.subscribe(observer);
            return () => closeOnUnsubscribe && this.close();
        });
    }
    /** @ignore */
    softClose() {
        if (typeof this.componentInstance.onSoftClose !== 'function') {
            this.close();
        }
        const shouldClose = this.componentInstance.onSoftClose();
        if (typeof shouldClose === 'boolean' && shouldClose) {
            this.close();
        }
        if (isObservable(shouldClose)) {
            shouldClose
                .pipe(takeUntil(this.closed$))
                .subscribe((result) => result && this.close());
        }
    }
}

class NcModalContainerComponent {
    constructor() { }
    attachComponentPortal(component, data) {
        const { instance } = this.portalOutlet.attachComponentPortal(component);
        instance.data = data;
        return instance;
    }
}
NcModalContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcModalContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
NcModalContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: NcModalContainerComponent, selector: "nc-modal-container", inputs: { options: "options" }, viewQueries: [{ propertyName: "portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }], ngImport: i0, template: "<div\n  class=\"modal fade in\"\n  [attr.role]=\"options.role\"\n  [attr.aria-labelledby]=\"options.labelledBy\"\n  [attr.aria-describedby]=\"options.describedBy\"\n  [class.modal-info]=\"options.type === 'info'\"\n  [class.modal-help]=\"options.type === 'help'\"\n  [class.modal-success]=\"options.type === 'success'\"\n  [class.modal-warning]=\"options.type === 'warning'\"\n  [class.modal-error]=\"options.type === 'error'\"\n>\n  <div\n    class=\"modal-dialog\"\n    [class.modal-sm]=\"options.size === 'sm'\"\n    [class.modal-lg]=\"options.size === 'lg'\"\n    [class.modal-xl]=\"options.size === 'xl'\"\n    [class.modal-full]=\"options.size === 'full'\"\n  >\n    <div\n      class=\"modal-content\"\n      [cdkTrapFocus]=\"true\"\n      [cdkTrapFocusAutoCapture]=\"true\"\n    >\n      <ng-template cdkPortalOutlet></ng-template>\n    </div>\n  </div>\n</div>\n", styles: [".modal{pointer-events:none;background:none}.modal .modal-dialog{pointer-events:auto}\n"], directives: [{ type: i6.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { type: i2$2.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcModalContainerComponent, decorators: [{
            type: Component,
            args: [{ selector: 'nc-modal-container', template: "<div\n  class=\"modal fade in\"\n  [attr.role]=\"options.role\"\n  [attr.aria-labelledby]=\"options.labelledBy\"\n  [attr.aria-describedby]=\"options.describedBy\"\n  [class.modal-info]=\"options.type === 'info'\"\n  [class.modal-help]=\"options.type === 'help'\"\n  [class.modal-success]=\"options.type === 'success'\"\n  [class.modal-warning]=\"options.type === 'warning'\"\n  [class.modal-error]=\"options.type === 'error'\"\n>\n  <div\n    class=\"modal-dialog\"\n    [class.modal-sm]=\"options.size === 'sm'\"\n    [class.modal-lg]=\"options.size === 'lg'\"\n    [class.modal-xl]=\"options.size === 'xl'\"\n    [class.modal-full]=\"options.size === 'full'\"\n  >\n    <div\n      class=\"modal-content\"\n      [cdkTrapFocus]=\"true\"\n      [cdkTrapFocusAutoCapture]=\"true\"\n    >\n      <ng-template cdkPortalOutlet></ng-template>\n    </div>\n  </div>\n</div>\n", styles: [".modal{pointer-events:none;background:none}.modal .modal-dialog{pointer-events:auto}\n"] }]
        }], ctorParameters: function () { return []; }, propDecorators: { options: [{
                type: Input
            }], portalOutlet: [{
                type: ViewChild,
                args: [CdkPortalOutlet, { static: true }]
            }] } });

const DEFAULT_MODAL_OPTIONS = {
    size: 'md',
    role: 'dialog',
    closeOnEscape: true,
    closeOnOutsideClick: true,
    closeOnNavigation: true,
};
class NcModalService {
    constructor(overlay, injector, router, defaultOptions, parentModalService) {
        this.overlay = overlay;
        this.injector = injector;
        this.router = router;
        this.defaultOptions = defaultOptions;
        this.parentModalService = parentModalService;
        /** @ignore */
        this.openModalsAtThisLevel = [];
    }
    get activeModals() {
        return this.parentModalService
            ? this.parentModalService.activeModals
            : this.openModalsAtThisLevel;
    }
    open(component, data, options) {
        options = this.applyDefaultOptions(options, this.defaultOptions);
        const overlayRef = this.createOverlay();
        const container = this.attachContainer(overlayRef, options);
        return this.attachContent(component, data, container, overlayRef, options);
    }
    closeAll() {
        while (this.activeModals.length > 0) {
            this.activeModals.pop().close();
        }
    }
    /** @ignore */
    attachContainer(overlayRef, options) {
        const containerPortal = new ComponentPortal(NcModalContainerComponent, null, this.injector);
        const { instance } = overlayRef.attach(containerPortal);
        instance.options = options;
        return instance;
    }
    /** @ignore */
    attachContent(component, data, container, overlayRef, options) {
        const modalRef = new NcModalRef(overlayRef, options);
        const injector = this.createInjector(modalRef);
        const componentPortal = new ComponentPortal(component, null, injector);
        const componentInstance = container.attachComponentPortal(componentPortal, data);
        modalRef.componentInstance = componentInstance;
        this.activeModals.push(modalRef);
        modalRef.afterClosed({ closeOnUnsubscribe: false }).subscribe(() => {
            const index = this.activeModals.indexOf(modalRef);
            if (index > -1) {
                this.activeModals.splice(index, 1);
            }
        });
        if (options.closeOnNavigation && this.router) {
            this.router.events
                .pipe(filter((event) => event instanceof ResolveStart), takeUntil(modalRef.closed$))
                .subscribe(() => modalRef.close());
        }
        return modalRef;
    }
    /** @ignore */
    createOverlay() {
        const positionStrategy = this.overlay.position().global();
        const scrollStrategy = this.overlay.scrollStrategies.block();
        return this.overlay.create({
            positionStrategy,
            scrollStrategy,
            hasBackdrop: true,
            disposeOnNavigation: false,
        });
    }
    /** @ignore */
    createInjector(modalRef) {
        return Injector.create({
            parent: this.injector,
            providers: [{ provide: NcModalRef, useValue: modalRef }],
        });
    }
    /** @ignore */
    applyDefaultOptions(options, defaultOptions) {
        return Object.assign(Object.assign(Object.assign({}, DEFAULT_MODAL_OPTIONS), (defaultOptions !== null && defaultOptions !== void 0 ? defaultOptions : {})), (options !== null && options !== void 0 ? options : {}));
    }
}
NcModalService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcModalService, deps: [{ token: i1$1.Overlay }, { token: i0.Injector }, { token: i1$4.Router, optional: true }, { token: NcModalOptions, optional: true }, { token: NcModalService, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Injectable });
NcModalService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcModalService });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcModalService, decorators: [{
            type: Injectable
        }], ctorParameters: function () {
        return [{ type: i1$1.Overlay }, { type: i0.Injector }, { type: i1$4.Router, decorators: [{
                        type: Optional
                    }] }, { type: NcModalOptions, decorators: [{
                        type: Optional
                    }] }, { type: NcModalService, decorators: [{
                        type: Optional
                    }, {
                        type: SkipSelf
                    }] }];
    } });

class NcModalComponent {
    /**
     * "Soft close" hook which is called whenever the modal is being closed
     * by "Escape" key or Backdrop click.
     * Return true to permit closing. False - to refuse.
     */
    onSoftClose() {
        return true;
    }
}

class NcModalCloseDirective {
    constructor(modalRef) {
        this.modalRef = modalRef;
    }
    onClick() {
        this.modalRef.close(this.modalResult);
    }
}
NcModalCloseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcModalCloseDirective, deps: [{ token: NcModalRef }], target: i0.ɵɵFactoryTarget.Directive });
NcModalCloseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.3", type: NcModalCloseDirective, selector: "[ncModalClose]", inputs: { modalResult: ["ncModalClose", "modalResult"] }, host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcModalCloseDirective, decorators: [{
            type: Directive,
            args: [{
                    selector: '[ncModalClose]',
                }]
        }], ctorParameters: function () { return [{ type: NcModalRef }]; }, propDecorators: { modalResult: [{
                type: Input,
                args: ['ncModalClose']
            }], onClick: [{
                type: HostListener,
                args: ['click']
            }] } });

class NcModalModule {
}
NcModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NcModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcModalModule, declarations: [NcModalContainerComponent, NcModalCloseDirective], imports: [CommonModule, OverlayModule, PortalModule, A11yModule], exports: [NcModalCloseDirective] });
NcModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcModalModule, providers: [NcModalService], imports: [[CommonModule, OverlayModule, PortalModule, A11yModule]] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: NcModalModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [CommonModule, OverlayModule, PortalModule, A11yModule],
                    declarations: [NcModalContainerComponent, NcModalCloseDirective],
                    exports: [NcModalCloseDirective],
                    providers: [NcModalService],
                }]
        }] });

/*
 * Public API Surface of nordic-cool
 */

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

export { CHECKBOX_CONTROL_VALUE_ACCESSOR, DATE_INPUT_FORMATS, DATE_OUTPUT_FORMATS, DEFAULT_MODAL_OPTIONS, NC_DATEPICKER_PARSER_FORMATTER_FACTORY, NC_DATE_ADAPTER_FACTORY, NcAlertComponent, NcAlertModule, NcCheckboxComponent, NcCheckboxModule, NcCollapsibleListComponent, NcCollapsibleListModule, NcDateAdapter, NcDateNativeAdapter, NcDateNativeUTCAdapter, NcDateNativeUtcIsoAdapter, NcDateParserFormatter, NcDateParserFormatterDefault, NcDateStructAdapter, NcDatepickerComponent, NcDatepickerInputComponent, NcDatepickerModule, NcDropdownDirective, NcDropdownItemDirective, NcDropdownMenuDirective, NcDropdownModule, NcDropdownToggleDirective, NcErrorDirective, NcErrorTooltipDirective, NcErrorTooltipModule, NcErrorsComponent, NcExpansionPanelComponent, NcFooterTemplateDirective, NcGlobalErrorMessagesService, NcGlobalErrorsComponent, NcHeaderTemplateDirective, NcISidebarItem, NcLabelTemplateDirective, NcLightDarkSwitchComponent, NcLightDarkSwitchModule, NcLoadingTextTemplateDirective, NcModalCloseDirective, NcModalComponent, NcModalModule, NcModalOptions, NcModalRef, NcModalService, NcMultiLabelTemplateDirective, NcNavbarBrandComponent, NcNavbarBrandOptionComponent, NcNavbarComponent, NcNavbarMenuComponent, NcNavbarMenuItemComponent, NcNavbarModule, NcNavbarRightMenuComponent, NcNotFoundTemplateDirective, NcOptGroupTemplateDirective, NcOptionHighlightDirective, NcOptionTemplateDirective, NcOutsideClickDirective, NcPanelTitleComponent, NcPillComponent, NcPillsComponent, NcPillsModule, NcRadioComponent, NcRadioGroupComponent, NcRadioModule, NcSelectComponent, NcSelectModule, NcSidebarComponent, NcSidebarGroupComponent, NcSidebarItemComponent, NcSidebarModule, NcSpinnerComponent, NcSpinnerModule, NcTabChangeEvent, NcTabComponent, NcTabContentDirective, NcTabTitleDirective, NcTabsetComponent, NcTabsetModule, NcTagTemplateDirective, NcTooltipComponent, NcTooltipDirective, NcTooltipModule, NcTypeToSearchTemplateDirective, NordicCoolModule, RADIO_CONTROL_VALUE_ACCESSOR, SelectValueAccessor, registerOutsideClick };
//# sourceMappingURL=vismaux-ngx-nordic-cool.mjs.map