import { __awaiter } from "tslib";
import { AIMSClient, AlActingAccountChangedEvent, AlActingAccountResolvedEvent, AlInsightLocations, AlLocatorService, AlSession, AlSessionEndedEvent, AlSessionStartedEvent, AlSubscriptionGroup, } from '@al/core';
import { Component, EventEmitter, NgZone, Output, QueryList, ViewChild, ViewChildren, } from '@angular/core';
import { ConfirmationService, } from 'primeng-lts/api';
import { AlNavigationService } from '../../services/al-navigation.service';
import { AlNavigationContextChanged, } from '../../types/navigation.types';
import { AlTrackingMetricEventName, AlTrackingMetricEventCategory } from '@al/ng-generic-components';
import { NgSelectComponent } from '@ng-select/ng-select';
import * as i0 from "@angular/core";
import * as i1 from "../../services/al-navigation.service";
import * as i2 from "primeng-lts/api";
import * as i3 from "@angular/common";
import * as i4 from "primeng-lts/menu";
import * as i5 from "@ng-select/ng-select";
import * as i6 from "@angular/forms";
import * as i7 from "primeng-lts/inputtext";
import * as i8 from "primeng-lts/tooltip";
import * as i9 from "primeng-lts/progressspinner";
const _c0 = ["accountSelector"];
const _c1 = ["filterInput"];
function AlArchipeligo19AppHeaderComponent_div_6_ng_template_8_div_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 21);
    i0.ɵɵelement(1, "p-progressSpinner");
    i0.ɵɵelementStart(2, "i");
    i0.ɵɵtext(3, "Loading...");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} }
function AlArchipeligo19AppHeaderComponent_div_6_ng_template_8_Template(rf, ctx) { if (rf & 1) {
    const _r10 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 17);
    i0.ɵɵelementStart(1, "input", 18, 19);
    i0.ɵɵlistener("input", function AlArchipeligo19AppHeaderComponent_div_6_ng_template_8_Template_input_input_1_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r9 = i0.ɵɵnextContext(2); return ctx_r9.filterAccounts($event); });
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(3, AlArchipeligo19AppHeaderComponent_div_6_ng_template_8_div_3_Template, 4, 0, "div", 20);
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("ngIf", ctx_r3.loadingManagedAccounts);
} }
function AlArchipeligo19AppHeaderComponent_div_6_ng_template_9_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 22);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const searchTerm_r11 = ctx.searchTerm;
    const ctx_r4 = i0.ɵɵnextContext(2);
    i0.ɵɵstyleProp("display", ctx_r4.loadingManagedAccounts ? "none" : "block");
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" No matches found for \"", searchTerm_r11, "\" ");
} }
function AlArchipeligo19AppHeaderComponent_div_6_ng_template_10_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 23);
    i0.ɵɵelementStart(1, "div", 24);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "div", 25);
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const account_r12 = ctx.item;
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(account_r12.name);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1("(", account_r12.id, ")");
} }
function AlArchipeligo19AppHeaderComponent_div_6_ng_container_11_div_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r15 = i0.ɵɵnextContext(3);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", ctx_r15.datacenter.currentRegion, " (US) ");
} }
function AlArchipeligo19AppHeaderComponent_div_6_ng_container_11_div_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r16 = i0.ɵɵnextContext(3);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", ctx_r16.datacenter.currentRegion, " (UK) ");
} }
const _c2 = function () { return { "width": "180px" }; };
function AlArchipeligo19AppHeaderComponent_div_6_ng_container_11_Template(rf, ctx) { if (rf & 1) {
    const _r18 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "p-menu", 26, 27);
    i0.ɵɵlistener("onHide", function AlArchipeligo19AppHeaderComponent_div_6_ng_container_11_Template_p_menu_onHide_1_listener() { i0.ɵɵrestoreView(_r18); const ctx_r17 = i0.ɵɵnextContext(2); return ctx_r17.expandedDatacenterMenu = false; })("onShow", function AlArchipeligo19AppHeaderComponent_div_6_ng_container_11_Template_p_menu_onShow_1_listener() { i0.ɵɵrestoreView(_r18); const ctx_r19 = i0.ɵɵnextContext(2); return ctx_r19.expandedDatacenterMenu = true; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "button", 28);
    i0.ɵɵlistener("click", function AlArchipeligo19AppHeaderComponent_div_6_ng_container_11_Template_button_click_3_listener($event) { i0.ɵɵrestoreView(_r18); const _r14 = i0.ɵɵreference(2); return _r14.toggle($event); });
    i0.ɵɵtemplate(4, AlArchipeligo19AppHeaderComponent_div_6_ng_container_11_div_4_Template, 2, 1, "div", 16);
    i0.ɵɵtemplate(5, AlArchipeligo19AppHeaderComponent_div_6_ng_container_11_div_5_Template, 2, 1, "div", 16);
    i0.ɵɵelement(6, "i", 10);
    i0.ɵɵelementEnd();
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r6 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵstyleMap(i0.ɵɵpureFunction0(9, _c2));
    i0.ɵɵproperty("popup", true)("model", ctx_r6.datacenter.selectableRegions)("showTransitionOptions", "0ms")("hideTransitionOptions", "0ms");
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("ngIf", ctx_r6.datacenter.currentResidency === "US");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r6.datacenter.currentResidency === "EMEA");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngClass", ctx_r6.expandedDatacenterMenu ? "pi pi-caret-up" : "pi pi-caret-down");
} }
const _c3 = function () { return { "right": "0px", "width": "280px" }; };
function AlArchipeligo19AppHeaderComponent_div_6_Template(rf, ctx) { if (rf & 1) {
    const _r22 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 6);
    i0.ɵɵelementStart(1, "p-menu", 7, 8);
    i0.ɵɵlistener("onHide", function AlArchipeligo19AppHeaderComponent_div_6_Template_p_menu_onHide_1_listener() { i0.ɵɵrestoreView(_r22); const ctx_r21 = i0.ɵɵnextContext(); return ctx_r21.expandedUserMenu = false; })("onShow", function AlArchipeligo19AppHeaderComponent_div_6_Template_p_menu_onShow_1_listener() { i0.ɵɵrestoreView(_r22); const ctx_r23 = i0.ɵɵnextContext(); return ctx_r23.expandedUserMenu = true; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "button", 9);
    i0.ɵɵlistener("click", function AlArchipeligo19AppHeaderComponent_div_6_Template_button_click_3_listener($event) { i0.ɵɵrestoreView(_r22); const _r1 = i0.ɵɵreference(2); return _r1.toggle($event); });
    i0.ɵɵtext(4);
    i0.ɵɵelement(5, "i", 10);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(6, "ng-select", 11, 12);
    i0.ɵɵlistener("ngModelChange", function AlArchipeligo19AppHeaderComponent_div_6_Template_ng_select_ngModelChange_6_listener($event) { i0.ɵɵrestoreView(_r22); const ctx_r25 = i0.ɵɵnextContext(); return ctx_r25.actingAccountId = $event; })("change", function AlArchipeligo19AppHeaderComponent_div_6_Template_ng_select_change_6_listener() { i0.ɵɵrestoreView(_r22); const ctx_r26 = i0.ɵɵnextContext(); return ctx_r26.onAccountChanged(); })("open", function AlArchipeligo19AppHeaderComponent_div_6_Template_ng_select_open_6_listener() { i0.ɵɵrestoreView(_r22); const ctx_r27 = i0.ɵɵnextContext(); return ctx_r27.onOpenAccountSelector(); });
    i0.ɵɵtemplate(8, AlArchipeligo19AppHeaderComponent_div_6_ng_template_8_Template, 4, 1, "ng-template", 13);
    i0.ɵɵtemplate(9, AlArchipeligo19AppHeaderComponent_div_6_ng_template_9_Template, 2, 3, "ng-template", 14);
    i0.ɵɵtemplate(10, AlArchipeligo19AppHeaderComponent_div_6_ng_template_10_Template, 5, 2, "ng-template", 15);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(11, AlArchipeligo19AppHeaderComponent_div_6_ng_container_11_Template, 7, 10, "ng-container", 16);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵstyleMap(i0.ɵɵpureFunction0(16, _c3));
    i0.ɵɵproperty("popup", true)("showTransitionOptions", "0ms")("hideTransitionOptions", "0ms")("model", ctx_r0.userMenuItems);
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate1(" ", ctx_r0.username, " ");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngClass", ctx_r0.expandedUserMenu ? "pi pi-caret-up" : "pi pi-caret-down");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("items", ctx_r0.managedAccounts)("virtualScroll", true)("dropdownPosition", "bottom")("searchable", false)("ngModel", ctx_r0.actingAccountId)("searchFn", ctx_r0.accountSearchFn)("clearable", false);
    i0.ɵɵadvance(5);
    i0.ɵɵproperty("ngIf", ctx_r0.datacenter && ctx_r0.datacenter.locationsAvailable > 0);
} }
export class AlArchipeligo19AppHeaderComponent {
    constructor(alNavigation, ngZone, confirmationService) {
        this.alNavigation = alNavigation;
        this.ngZone = ngZone;
        this.confirmationService = confirmationService;
        this.authenticated = false;
        this.ready = false;
        this.actingAccountName = '';
        this.actingAccount = null;
        this.username = '';
        this.managedAccounts = [];
        this.loadedManagedAccounts = false;
        this.loadingManagedAccounts = false;
        this.userMenuItems = [];
        this.subscriptions = new AlSubscriptionGroup(null);
        this.expandedDatacenterMenu = false;
        this.expandedUserMenu = false;
        // TODO - Thinking instead we should have navigation component service, where we can emit toggle state and
        // listen to that in the al-sidenav,
        // Otherwise every app will need to handle this output and set the toggle boolean @input to the al-sidenav!!
        this.toggleButtonClick = new EventEmitter();
        this.onSessionEnded = (event) => {
            this.authenticated = false;
        };
        this.onSessionStart = (event) => {
            this.authenticated = true;
            this.loadActiveSession();
        };
        this.onActingAccountChanged = (event) => {
            this.ready = false;
        };
        this.onActingAccountResolved = (event) => {
            this.actingAccount = event.actingAccount;
            this.actingAccountId = event.actingAccount.id;
            if (this.managedAccounts.length < 2) {
                this.managedAccounts = [event.actingAccount];
            }
            this.ready = true;
        };
        this.onNavigationContextChanged = (event) => {
            if (AlSession.isActive()) {
                this.authenticated = true;
                this.datacenter = this.alNavigation.generateDatacenterMenu(AlSession.getActiveDatacenter(), AlSession.getActingAccountAccessibleLocations(), this.onClickDatacenter);
            }
            else {
                this.datacenter = undefined;
            }
        };
        this.logout = () => {
            this.alNavigation.forceDeauthentication();
        };
        this.onClickDatacenter = (insightLocationId, $event) => {
            const actor = AlLocatorService.getActingNode();
            if (!actor || !AlInsightLocations.hasOwnProperty(insightLocationId)) {
                //  No meat, no eggs, no bacon?  No breakfast for you :(
                return;
            }
            const regionLabel = AlInsightLocations[insightLocationId].logicalRegion;
            this.confirmationService.confirm({
                key: 'confirmation',
                header: 'Are you sure?',
                message: `You are about to switch regions to ${regionLabel}.  Are you sure this is what you want to do?`,
                acceptLabel: 'Yes, switch now!',
                rejectLabel: 'No thanks',
                accept: () => {
                    const originBaseURI = AlLocatorService.resolveURL(actor.locTypeId);
                    AlSession.setActiveDatacenter(insightLocationId);
                    AlLocatorService.setContext({ insightLocationId });
                    const targetBaseURI = AlLocatorService.resolveURL(actor.locTypeId);
                    this.alNavigation.track(AlTrackingMetricEventName.UsageTrackingEvent, {
                        category: AlTrackingMetricEventCategory.GenericConsoleAction,
                        action: 'Data Residency Change',
                        label: insightLocationId
                    });
                    if (targetBaseURI !== originBaseURI) {
                        //  The new domain portal for the changed datacenter is the one we're on.  Emit a notice and redirect.
                        console.log(`NOTICE: changing active location to '${insightLocationId}' requires change to a new portal at [${targetBaseURI}]`);
                        this.alNavigation.navigate.byLocation(actor.locTypeId);
                    }
                    else {
                        //  The new domain portal is the same as the old one.  Route to its base/default route using angular's router.
                        this.alNavigation.navigate.byNgRoute(['/']);
                    }
                }
            });
        };
        if (AlSession.isActive()) {
            this.loadActiveSession();
        }
    }
    loadActiveSession() {
        return __awaiter(this, void 0, void 0, function* () {
            yield AlSession.ready();
            yield this.alNavigation.ready();
            this.actingAccount = AlSession.getActingAccount();
            this.actingAccountId = this.actingAccount.id;
            this.actingAccountName = this.actingAccount.name;
            this.managedAccounts = [this.actingAccount];
            this.username = AlSession.getUserName();
            this.ready = true;
        });
    }
    ngOnInit() {
        this.subscriptions.manage([
            AlSession.notifyStream.attach(AlSessionStartedEvent, this.onSessionStart),
            AlSession.notifyStream.attach(AlActingAccountChangedEvent, this.onActingAccountChanged),
            AlSession.notifyStream.attach(AlActingAccountResolvedEvent, this.onActingAccountResolved),
            AlSession.notifyStream.attach(AlSessionEndedEvent, this.onSessionEnded),
            this.alNavigation.events.attach(AlNavigationContextChanged, this.onNavigationContextChanged)
        ]);
        this.actingAccount = AlSession.getActingAccount();
        if (this.actingAccount) {
            this.actingAccountId = this.actingAccount.id;
        }
        this.userMenuItems = [
            {
                label: 'Logout',
                icon: 'ui-icon-power-settings-new',
                command: () => {
                    this.logout();
                }
            }
        ];
        this.onNavigationContextChanged();
    }
    ngOnDestroy() {
        this.subscriptions.cancelAll();
    }
    onAccountChanged() {
        this.alNavigation.setActingAccount(this.actingAccountId);
    }
    accountSearchFn(term, account) {
        term = term.toLocaleLowerCase();
        return account.name.toLocaleLowerCase().indexOf(term) > -1 || account.id.startsWith(term);
    }
    onOpenAccountSelector() {
        if (!this.loadedManagedAccounts) {
            this.loadingManagedAccounts = true;
            this.managedAccounts = [];
            AIMSClient.getAccountsByRelationship(AlSession.getPrimaryAccountId(), "managed", { active: true }).then((managedAccounts) => {
                this.managedAccounts = [AlSession.getPrimaryAccount(), ...managedAccounts]
                    .sort((a, b) => a.name.toUpperCase().localeCompare(b.name.toUpperCase()));
                this.loadedManagedAccounts = true;
                this.loadingManagedAccounts = false;
            });
            this.filterInput.changes.subscribe(res => {
                if (this.filterInput.first) {
                    this.filterInput.first.nativeElement.focus();
                }
            });
        }
    }
    redirectToDashboards() {
        this.alNavigation.navigate.byNamedRoute("cd19:dashboards");
    }
    filterAccounts($event) {
        this.accountSelector.filter($event.target.value);
    }
    toggleClick() {
        this.toggleButtonClick.emit();
    }
}
/** @nocollapse */ AlArchipeligo19AppHeaderComponent.ɵfac = function AlArchipeligo19AppHeaderComponent_Factory(t) { return new (t || AlArchipeligo19AppHeaderComponent)(i0.ɵɵdirectiveInject(i1.AlNavigationService), i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(i2.ConfirmationService)); };
/** @nocollapse */ AlArchipeligo19AppHeaderComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AlArchipeligo19AppHeaderComponent, selectors: [["al-archipeligo19-app-header"]], viewQuery: function AlArchipeligo19AppHeaderComponent_Query(rf, ctx) { if (rf & 1) {
        i0.ɵɵviewQuery(_c0, true);
        i0.ɵɵviewQuery(_c1, true);
    } if (rf & 2) {
        var _t;
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.accountSelector = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.filterInput = _t);
    } }, outputs: { toggleButtonClick: "toggleButtonClick" }, decls: 7, vars: 1, consts: [[1, "user-info-summary"], [1, "u-flex", "u-items-center"], [1, "u-flex", "u-items-center", "u-text-white", "btn-naked", "al-header-menu", 3, "click"], [1, "material-icons", "menu-toggle"], ["href", "", 1, "al-header-logo", "u-ml-2", 3, "click"], ["class", "user-menus-container", 4, "ngIf"], [1, "user-menus-container"], [3, "popup", "showTransitionOptions", "hideTransitionOptions", "model", "onHide", "onShow"], ["usermenu", ""], [1, "user-menus-button", 3, "click"], [3, "ngClass"], ["bindLabel", "name", "bindValue", "id", 1, "al-account-selector", "u-mx-1", 3, "items", "virtualScroll", "dropdownPosition", "searchable", "ngModel", "searchFn", "clearable", "ngModelChange", "change", "open"], ["accountSelector", ""], ["ng-header-tmp", ""], ["ng-notfound-tmp", ""], ["ng-option-tmp", ""], [4, "ngIf"], [2, "display", "flex"], ["pInputText", "", "type", "text", "placeholder", "Search by account id or name...", 1, "filter-input", 3, "input"], ["filterInput", ""], ["pTooltip", "Loading", "id", "accounts-loading-indicator", 4, "ngIf"], ["pTooltip", "Loading", "id", "accounts-loading-indicator"], [1, "ng-option", "disabled"], [1, "account-selector-option"], [1, "account-selector-option__name"], [1, "account-selector-option__id"], [1, "region-menu", 3, "popup", "model", "showTransitionOptions", "hideTransitionOptions", "onHide", "onShow"], ["menux", ""], [1, "user-menus-button", "user-menus-button--upercase", 3, "click"]], template: function AlArchipeligo19AppHeaderComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵelementStart(2, "button", 2);
        i0.ɵɵlistener("click", function AlArchipeligo19AppHeaderComponent_Template_button_click_2_listener() { return ctx.toggleClick(); });
        i0.ɵɵelementStart(3, "i", 3);
        i0.ɵɵtext(4, "menu");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(5, "a", 4);
        i0.ɵɵlistener("click", function AlArchipeligo19AppHeaderComponent_Template_a_click_5_listener() { return ctx.redirectToDashboards(); });
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(6, AlArchipeligo19AppHeaderComponent_div_6_Template, 12, 17, "div", 5);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵadvance(6);
        i0.ɵɵproperty("ngIf", ctx.authenticated && ctx.ready);
    } }, directives: [i3.NgIf, i4.Menu, i3.NgClass, i5.NgSelectComponent, i6.NgControlStatus, i6.NgModel, i5.ɵj, i5.ɵl, i5.ɵf, i7.InputText, i8.Tooltip, i9.ProgressSpinner], styles: [".al-header-logo[_ngcontent-%COMP%]:focus-visible, .al-header-menu[_ngcontent-%COMP%]:focus-visible,   .ng-select.ng-select-focused:not(.ng-select-opened)>.ng-select-container{outline:-webkit-focus-ring-color auto 1px}.al-account-selector[_ngcontent-%COMP%]     .ng-dropdown-panel, [_nghost-%COMP%]     p-menu .ui-menu{background-color:#fff;box-shadow:var(--ald-g-shadow-sm);border-radius:var(--ald-g-radius-sm);padding:0;border-top:3px solid var(--ald-g-color-orange);margin:-3px 0 0}.al-account-selector[_ngcontent-%COMP%]     .ng-dropdown-panel-items .ng-option, [_nghost-%COMP%]     p-menu .ui-menu .ui-menuitem a{font-size:var(--ald-g-text-xs);line-height:var(--ald-g-leading-xs);color:#3c3c3c;padding:var(--ald-g-space-3) var(--ald-g-space-5)}.al-account-selector[_ngcontent-%COMP%]     .ng-dropdown-panel-items .ng-option.ng-option-selected, [_nghost-%COMP%]     p-menu .ui-menu .ui-menuitem.active a{background-color:var(--highlight);color:#fff}.al-account-selector[_ngcontent-%COMP%]     .ng-dropdown-panel-items .ng-option.ng-option-selected:hover, [_nghost-%COMP%]     p-menu .ui-menu .ui-menuitem.active a:hover{background-color:var(--highlight)}.user-info-summary[_ngcontent-%COMP%]{position:relative;background:var(--header-bg);display:flex;align-items:center;height:40px;justify-content:space-between;padding-left:var(--ald-g-space-5);padding-right:var(--ald-g-space-5)}.al-header-logo[_ngcontent-%COMP%]{background:url(\"data:image/svg+xml,%3Csvg viewBox%3D%220 0 125 12%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath d%3D%22m7.6958 9.881h-4.3105l-0.72 1.8694h-2.5074l4.44-11.179h1.9168l4.4558 11.179h-2.5705l-0.70421-1.8694zm-0.78316-2.0274-1.3547-3.5779-1.3895 3.5779h2.7442z%22 fill%3D%22%23fff%22%2F%3E%3Cpath d%3D%22m16.348 0.57158v8.9021h5.1253v2.2674h-7.4874v-11.17h2.3621z%22 fill%3D%22%23fff%22%2F%3E%3Cpath d%3D%22m31.948 0.57158v2.2705h-4.4747v2.0116h3.9947v2.2674h-3.9947v2.3526h4.4873v2.2674h-6.8621v-11.17h6.8495z%22 fill%3D%22%23fff%22%2F%3E%3Cpath d%3D%22m42.215 11.75-2.5264-4.2663h-1.2126v4.2663h-2.3621v-11.179h4.3074c0.9224-0.001851 1.8088 0.35839 2.4685 1.0033 0.6597 0.64488 1.0399 1.5229 1.0588 2.4452 0 1.4368-0.6852 2.5547-1.7873 3.0979l2.9242 4.6326h-2.8705zm-3.7358-6.3158h1.7084c0.1753 0.00865 0.3502-0.01838 0.5147-0.07945 0.1646-0.06108 0.3149-0.15493 0.4418-0.27588 0.127-0.12091 0.2283-0.2664 0.2975-0.42764 0.0691-0.16121 0.1045-0.33477 0.1045-0.51019s-0.0354-0.34898-0.1045-0.51022c-0.0692-0.16121-0.1705-0.30669-0.2975-0.42764-0.1269-0.12092-0.2772-0.21477-0.4418-0.27585-0.1645-0.06108-0.3394-0.08811-0.5147-0.07945h-1.7084v2.5863z%22 fill%3D%22%23fff%22%2F%3E%3Cpath d%3D%22m56.059 2.8421h-3.2716v8.9084h-2.3653v-8.9084h-3.2558v-2.2705h8.8927v2.2705z%22 fill%3D%22%23fff%22%2F%3E%3Cpath d%3D%22m65.432 0.57158v8.9021h5.1252v2.2674h-7.4905v-11.17h2.3653z%22 fill%3D%22%23fff%22%2F%3E%3Cpath d%3D%22m84.357 6.1611c0.0186 0.75793-0.1169 1.5118-0.3976 2.216-0.2811 0.70421-0.7017 1.3442-1.2367 1.8814-0.5352 0.5371-1.1734 0.9602-1.8767 1.2438-0.7029 0.2836-1.4564 0.4218-2.2143 0.4062-3.2558 0-5.6842-2.4758-5.6842-5.7473s2.4442-5.7505 5.6842-5.7505c0.7582-0.0156 1.5117 0.12267 2.2153 0.40645 0.7032 0.28379 1.3418 0.70721 1.8767 1.2447 0.5353 0.53748 0.9559 1.1779 1.2366 1.8824 0.2808 0.70456 0.4156 1.4587 0.3967 2.2169zm-8.9906 0c0 1.9642 1.4053 3.4484 3.2716 3.4484s3.2748-1.4842 3.2748-3.4484-1.4053-3.4484-3.2811-3.4484-3.2653 1.4842-3.2653 3.4484z%22 fill%3D%22%23FE6116%22%2F%3E%3Cpath d%3D%22m98.315 6.5274c0 3.2116-2.2516 5.3684-5.4631 5.3684-3.2116 0-5.6842-2.4758-5.6842-5.7474s2.4442-5.7505 5.7031-5.7505c2.2674 0 4.4526 1.2 5.0116 2.9084l-2.2516 1.0042c-0.3979-0.97264-1.5158-1.6105-2.76-1.6105-1.8695 0-3.2747 1.4842-3.2747 3.4484-0.0168 0.45739 0.0609 0.91329 0.2283 1.3393 0.1674 0.42597 0.4206 0.81288 0.7443 1.1365 0.3237 0.32365 0.7105 0.57704 1.1365 0.74441 0.426 0.16734 0.882 0.24502 1.3393 0.22822 1.6768 0 2.7-1.0547 2.7789-2.2358h-3.1294v-1.92h5.5579c0.0435 0.36044 0.0647 0.72325 0.0631 1.0863z%22 fill%3D%22%23fff%22%2F%3E%3Cpath d%3D%22m104.14 0.57158v11.179h-2.362v-11.179h2.362z%22 fill%3D%22%23fff%22%2F%3E%3Cpath d%3D%22m113.24 11.908c-3.208 0-5.637-2.5263-5.637-5.7474s2.429-5.7505 5.637-5.7505c2.267 0 4.232 1.2 4.775 2.9084l-2.106 1.0042c-0.417-0.97263-1.406-1.6105-2.669-1.6105-1.895 0-3.208 1.4684-3.208 3.4484s1.307 3.4484 3.208 3.4484c1.342 0 2.381-0.70105 2.732-1.8032l2.169 0.98842c-0.54 1.8379-2.564 3.1137-4.901 3.1137z%22 fill%3D%22%23fff%22%2F%3E%3Cpath d%3D%22m122.92 2.8989-0.373-0.63158h-0.18v0.63158h-0.35v-1.6547h0.631c0.137-2e-5 0.268 0.05358 0.366 0.14925 0.097 0.09568 0.153 0.22579 0.156 0.36234 4e-3 0.09332-0.019 0.18591-0.065 0.26699-0.046 0.08107-0.115 0.14728-0.198 0.1909l0.433 0.68526h-0.42zm-0.553-0.94737h0.253c0.027 0.0035 0.055 0.00117 0.081-0.00683s0.05-0.02149 0.071-0.03957c0.02-0.01808 0.037-0.04033 0.048-0.06527 0.011-0.02495 0.017-0.05201 0.017-0.07938 0-0.02738-6e-3 -0.05444-0.017-0.07938s-0.028-0.04719-0.048-0.06527c-0.021-0.01808-0.045-0.03157-0.071-0.03957s-0.054-0.01033-0.081-0.00683h-0.253v0.3821z%22 fill%3D%22%23fff%22%2F%3E%3Cpath d%3D%22m122.62 3.9032c-0.357 6.4e-4 -0.706-0.10468-1.003-0.30255-0.297-0.19791-0.529-0.4795-0.666-0.80912s-0.173-0.69243-0.103-1.0425c0.069-0.35006 0.241-0.67166 0.493-0.92404 0.253-0.25237 0.575-0.42417 0.924-0.49364 0.351-0.069474 0.713-0.033499 1.043 0.10337 0.33 0.13687 0.611 0.36846 0.809 0.6655 0.198 0.29701 0.303 0.64607 0.303 1.003 0 0.47738-0.19 0.93524-0.527 1.2728-0.338 0.33758-0.796 0.52721-1.273 0.52721v-2e-5zm0-3.2147c-0.28 0-0.554 0.082973-0.786 0.23842-0.233 0.15546-0.414 0.37642-0.521 0.63493s-0.135 0.54297-0.081 0.81739c0.055 0.27443 0.19 0.52651 0.387 0.72436 0.198 0.19786 0.45 0.33262 0.725 0.38718 0.274 0.0546 0.559 0.02659 0.817-0.08049 0.259-0.10708 0.48-0.28841 0.635-0.52105 0.155-0.23265 0.238-0.50618 0.238-0.786 0-0.37497-0.15-0.73431-0.415-0.99944-0.265-0.26514-0.624-0.41445-0.999-0.4153%22 fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E\") center no-repeat;width:125px;height:40px}.user-menus-container[_ngcontent-%COMP%]{display:flex;align-items:center}.al-account-selector[_ngcontent-%COMP%]     .ng-select-container, .user-menus-button[_ngcontent-%COMP%]{position:relative;cursor:pointer;background:0 0;border:0;padding:0;color:#fff;display:flex;align-items:center;height:40px;font-size:var(--ald-g-text-xs);line-height:var(--ald-g-leading-xs);padding-left:var(--ald-g-space-2)}.al-account-selector[_ngcontent-%COMP%]     .ng-select-container:hover, .user-menus-button[_ngcontent-%COMP%]:hover{color:#cbcbcb}.al-account-selector[_ngcontent-%COMP%]     .ng-select-container:focus-visible, .user-menus-button[_ngcontent-%COMP%]:focus-visible{outline:-webkit-focus-ring-color auto 1px}.user-menus-button--upercase[_ngcontent-%COMP%]{text-transform:uppercase}  .ng-select .ng-arrow-wrapper .ng-arrow{display:none!important}  .ng-select span.ng-arrow-wrapper:before{content:\"arrow_drop_down\";display:flex;font-family:'Material Icons';text-rendering:auto;font-weight:400;font-style:normal;font-size:24px;align-items:center}  .ng-select.ng-select-opened>.ng-select-container span.ng-arrow-wrapper:before{transform:rotate(180deg)}  .ng-select-opened .ng-select span.ng-arrow-wrapper{transform:rotate(180deg)}.al-account-selector[_ngcontent-%COMP%]     .ng-dropdown-panel{width:300px;right:0}.al-account-selector[_ngcontent-%COMP%]     .ng-dropdown-panel .ng-dropdown-header{border-bottom:1px solid var(--ald-g-color-gray-200);padding:12px}.al-account-selector[_ngcontent-%COMP%]     .ng-dropdown-panel-items .ng-option{padding-top:var(--ald-g-space-2);padding-bottom:var(--ald-g-space-2)}.al-account-selector[_ngcontent-%COMP%]     .ng-dropdown-panel-items .ng-option:hover{background-color:#ededed}.al-account-selector[_ngcontent-%COMP%]     .ng-dropdown-panel-items .ng-option .account-selector-option{white-space:normal}.al-account-selector[_ngcontent-%COMP%]     .ng-dropdown-panel-items .ng-option .account-selector-option__name{font-weight:600}[_nghost-%COMP%]     p-menu .ui-menu .ui-menuitem-icon{margin-right:var(--ald-g-space-2)}[_nghost-%COMP%]     p-menu .ui-menu .ui-menuitem.active a{pointer-events:none;color:#fff}[_nghost-%COMP%]     p-menu .ui-menu .ui-submenu-header{color:#a8a8a8;font-size:var(--ald-g-text-xs);padding:var(--ald-g-space-2) var(--ald-g-space-5) 0 var(--ald-g-space-5);background-color:transparent}[_nghost-%COMP%]     #accounts-loading-indicator .ui-progress-spinner{position:relative;top:4px;width:20px;height:18px;display:inline-block;margin-right:6px}.darkMode[_nghost-%COMP%]   .app-user-menu[_ngcontent-%COMP%], .darkMode   [_nghost-%COMP%]   .app-user-menu[_ngcontent-%COMP%], .darkMode[_nghost-%COMP%]   .user-info-summary[_ngcontent-%COMP%], .darkMode   [_nghost-%COMP%]   .user-info-summary[_ngcontent-%COMP%]{background-color:#212121}.blueMode[_nghost-%COMP%]   .app-user-menu[_ngcontent-%COMP%], .blueMode   [_nghost-%COMP%]   .app-user-menu[_ngcontent-%COMP%], .blueMode[_nghost-%COMP%]   .user-info-summary[_ngcontent-%COMP%], .blueMode   [_nghost-%COMP%]   .user-info-summary[_ngcontent-%COMP%]{background-color:#1e2b38}"] });
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(AlArchipeligo19AppHeaderComponent, [{
        type: Component,
        args: [{
                selector: 'al-archipeligo19-app-header',
                templateUrl: './al-archipeligo19-app-header.component.html',
                styleUrls: ['./al-archipeligo19-app-header.component.scss']
            }]
    }], function () { return [{ type: i1.AlNavigationService }, { type: i0.NgZone }, { type: i2.ConfirmationService }]; }, { filterInput: [{
            type: ViewChildren,
            args: ['filterInput']
        }], accountSelector: [{
            type: ViewChild,
            args: ['accountSelector']
        }], toggleButtonClick: [{
            type: Output
        }] }); })();
//# sourceMappingURL=data:application/json;base64, 