(function (global, factory) {
    typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@wm/core'), require('@wm/components/base'), require('@angular/common'), require('lodash-es')) :
    typeof define === 'function' && define.amd ? define(['exports', '@angular/core', '@wm/core', '@wm/components/base', '@angular/common', 'lodash-es'], factory) :
    (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.wm = global.wm || {}, global.wm.components = global.wm.components || {}, global.wm.components.basic = {}), global.ng.core, global.wm.core, global.wm.components.base, global.ng.common, global._));
})(this, (function (exports, i0, i1, i1$1, i2, lodashEs) { 'use strict';

    function _interopNamespaceDefault(e) {
        var n = Object.create(null);
        if (e) {
            Object.keys(e).forEach(function (k) {
                if (k !== 'default') {
                    var d = Object.getOwnPropertyDescriptor(e, k);
                    Object.defineProperty(n, k, d.get ? d : {
                        enumerable: true,
                        get: function () { return e[k]; }
                    });
                }
            });
        }
        n.default = e;
        return Object.freeze(n);
    }

    var i0__namespace = /*#__PURE__*/_interopNamespaceDefault(i0);
    var i1__namespace = /*#__PURE__*/_interopNamespaceDefault(i1);
    var i1$1__namespace = /*#__PURE__*/_interopNamespaceDefault(i1$1);
    var i2__namespace = /*#__PURE__*/_interopNamespaceDefault(i2);

    const registerProps$8 = () => {
        i1$1.register('wm-anchor', new Map([
            ['animation', i1$1.PROP_STRING],
            ['badgevalue', i1$1.PROP_STRING],
            ['caption', { value: 'Link', ...i1$1.PROP_STRING }],
            ['class', i1$1.PROP_STRING],
            ['conditionalclass', i1$1.PROP_ANY],
            ['conditionalstyle', i1$1.PROP_ANY],
            ['encodeurl', i1$1.PROP_BOOLEAN],
            ['hint', i1$1.PROP_STRING],
            ['arialabel', i1$1.PROP_STRING],
            ['hyperlink', { value: '', ...i1$1.PROP_STRING }],
            ['iconclass', i1$1.PROP_STRING],
            ['iconheight', i1$1.PROP_STRING],
            ['iconmargin', i1$1.PROP_STRING],
            ['iconposition', i1$1.PROP_STRING],
            ['iconurl', i1$1.PROP_STRING],
            ['iconwidth', i1$1.PROP_STRING],
            ['name', i1$1.PROP_STRING],
            ['shortcutkey', i1$1.PROP_STRING],
            ['show', { value: true, ...i1$1.PROP_BOOLEAN }],
            ['tabindex', { value: 0, ...i1$1.PROP_NUMBER }],
            ['target', { value: '_self', ...i1$1.PROP_STRING }]
        ]));
    };

    const _c0$5 = ["wmAnchor", ""];
    const _c1$1 = [[["", 8, "caret"]]];
    const _c2$1 = [".caret"];
    const _c3 = (a0, a1, a2) => ({ width: a0, height: a1, margin: a2 });
    function AnchorComponent_img_0_Template(rf, ctx) { if (rf & 1) {
        i0__namespace.ɵɵelement(0, "img", 5);
        i0__namespace.ɵɵpipe(1, "image");
    } if (rf & 2) {
        const ctx_r0 = i0__namespace.ɵɵnextContext();
        i0__namespace.ɵɵproperty("src", i0__namespace.ɵɵpipeBind1(1, 2, ctx_r0.iconurl), i0__namespace.ɵɵsanitizeUrl)("ngStyle", i0__namespace.ɵɵpureFunction3(4, _c3, ctx_r0.iconwidth, ctx_r0.iconheight, ctx_r0.iconmargin));
    } }
    function AnchorComponent_i_1_Template(rf, ctx) { if (rf & 1) {
        i0__namespace.ɵɵelement(0, "i", 6);
    } if (rf & 2) {
        const ctx_r0 = i0__namespace.ɵɵnextContext();
        i0__namespace.ɵɵclassMapInterpolate1("app-icon ", ctx_r0.iconclass, "");
        i0__namespace.ɵɵproperty("ngStyle", i0__namespace.ɵɵpureFunction3(4, _c3, ctx_r0.iconwidth, ctx_r0.iconheight, ctx_r0.iconmargin));
    } }
    function AnchorComponent_span_2_Template(rf, ctx) { if (rf & 1) {
        i0__namespace.ɵɵelementStart(0, "span", 7);
        i0__namespace.ɵɵtext(1);
        i0__namespace.ɵɵelementEnd();
    } if (rf & 2) {
        const ctx_r0 = i0__namespace.ɵɵnextContext();
        i0__namespace.ɵɵadvance();
        i0__namespace.ɵɵtextInterpolate2("", ctx_r0.caption, " ", ctx_r0.appLocale.LABEL_ICON, "");
    } }
    function AnchorComponent_span_5_Template(rf, ctx) { if (rf & 1) {
        i0__namespace.ɵɵelement(0, "span", 8);
    } if (rf & 2) {
        const ctx_r0 = i0__namespace.ɵɵnextContext();
        i0__namespace.ɵɵproperty("textContent", ctx_r0.badgevalue);
    } }
    const DEFAULT_CLS$8 = 'app-anchor';
    const WIDGET_CONFIG$8 = {
        widgetType: 'wm-anchor',
        hostClass: DEFAULT_CLS$8,
        displayType: i1$1.DISPLAY_TYPE.INLINE_BLOCK
    };
    const regex = /Actions.goToPage_(\w+)\.invoke\(\)/g;
    const disableContextMenu = ($event) => {
        $event.preventDefault();
    };
    class AnchorComponent extends i1$1.StylableComponent {
        static { this.initializeProps = registerProps$8(); }
        constructor(inj, app, explicitContext) {
            super(inj, WIDGET_CONFIG$8, explicitContext);
            this.app = app;
            this._eventNotifier = new i1.EventNotifier();
            i1$1.styler(this.nativeElement, this);
        }
        processEventAttr(eventName, expr, meta) {
            super.processEventAttr(eventName, expr, meta);
            if (!this.hasNavigationToCurrentPageExpr) {
                const app = this.inj.get(i1.App);
                const fns = expr.split(';').map(Function.prototype.call, String.prototype.trim);
                if (fns.some(fn => {
                    regex.lastIndex = 0;
                    const matches = regex.exec(fn);
                    const hasGoToPageExpr = matches && (matches.length > 0);
                    if (hasGoToPageExpr && !this.hasGoToPageExpr) {
                        this.hasGoToPageExpr = true;
                        this.goToPageName = matches[1];
                    }
                    return hasGoToPageExpr && matches[1] === app.activePageName;
                })) {
                    this.hasNavigationToCurrentPageExpr = true;
                }
            }
        }
        onActive(callback) {
            this._eventNotifier.subscribe('on-active', callback);
        }
        handleEvent(node, eventName, eventCallback, locals, meta) {
            super.handleEvent(node, eventName, e => {
                if (this.hasGoToPageExpr && locals.$event) {
                    locals.$event.preventDefault();
                }
                eventCallback();
            }, locals, meta);
        }
        onPropertyChange(key, nv, ov) {
            if (key === 'hyperlink') {
                if (!nv) {
                    i1.setAttr(this.nativeElement, 'href', 'javascript:void(0)');
                    this.nativeElement.addEventListener('contextmenu', disableContextMenu);
                    return;
                }
                if (this.encodeurl) {
                    nv = i1.encodeUrl(nv);
                }
                // if hyperlink starts with 'www.' append '//' in the beginning
                if (nv.startsWith('www.')) {
                    nv = `//${nv}`;
                }
                i1.setAttr(this.nativeElement, 'href', nv);
                this.nativeElement.removeEventListener('contextmenu', disableContextMenu);
            }
            else {
                super.onPropertyChange(key, nv, ov);
            }
        }
        init() {
            if (this.hasNavigationToCurrentPageExpr) {
                i1.addClass(this.nativeElement, 'active');
                i1.setAttr(this.nativeElement, 'aria-current', 'page');
            }
            if (this.hyperlink && i1.getRouteNameFromLink(this.hyperlink) === `/${this.app.activePageName}`
                || this.hasNavigationToCurrentPageExpr) {
                this._eventNotifier.notify("on-active", {});
            }
        }
        ngAfterViewInit() {
            super.ngAfterViewInit();
            this.init();
            if (this.hasGoToPageExpr) {
                // In SPA, it highlights active page link when we navigate within the same layout
                this.cancelSubscription = this.app.subscribe("highlightActiveLink", (data) => {
                    if (this.hasNavigationToCurrentPageExpr && this.goToPageName !== this.app.activePageName) {
                        this.hasNavigationToCurrentPageExpr = false;
                        i1.removeClass(this.nativeElement, 'active');
                        i1.removeAttr(this.nativeElement, 'aria-current');
                    }
                    if (this.goToPageName === data.pageName) {
                        this.hasNavigationToCurrentPageExpr = true;
                        i1.addClass(this.nativeElement, 'active');
                        i1.setAttr(this.nativeElement, 'aria-current', 'page');
                    }
                });
            }
        }
        ngOnAttach() {
            this.init();
            super.ngOnAttach();
        }
        ngOnDestroy() {
            this._eventNotifier.destroy();
            if (this.cancelSubscription) {
                this.cancelSubscription();
            }
            super.ngOnDestroy();
        }
        static { this.ɵfac = function AnchorComponent_Factory(t) { return new (t || AnchorComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.Injector), i0__namespace.ɵɵdirectiveInject(i1__namespace.App), i0__namespace.ɵɵdirectiveInject('EXPLICIT_CONTEXT', 8)); }; }
        static { this.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: AnchorComponent, selectors: [["a", "wmAnchor", ""]], hostVars: 3, hostBindings: function AnchorComponent_HostBindings(rf, ctx) { if (rf & 2) {
                i0__namespace.ɵɵhostProperty("target", ctx.target);
                i0__namespace.ɵɵattribute("accesskey", ctx.shortcutkey)("icon-position", ctx.iconposition);
            } }, exportAs: ["wmAnchor"], features: [i0__namespace.ɵɵProvidersFeature([
                    i1$1.provideAsWidgetRef(AnchorComponent)
                ]), i0__namespace.ɵɵInheritDefinitionFeature], attrs: _c0$5, ngContentSelectors: _c2$1, decls: 6, vars: 5, consts: [["data-identifier", "img", "alt", "Image", "class", "anchor-image-icon", 3, "src", "ngStyle", 4, "ngIf"], ["aria-hidden", "true", 3, "class", "ngStyle", 4, "ngIf"], ["class", "sr-only", 4, "ngIf"], [1, "anchor-caption", 3, "innerHTML"], ["class", "badge pull-right", 3, "textContent", 4, "ngIf"], ["data-identifier", "img", "alt", "Image", 1, "anchor-image-icon", 3, "src", "ngStyle"], ["aria-hidden", "true", 3, "ngStyle"], [1, "sr-only"], [1, "badge", "pull-right", 3, "textContent"]], template: function AnchorComponent_Template(rf, ctx) { if (rf & 1) {
                i0__namespace.ɵɵprojectionDef(_c1$1);
                i0__namespace.ɵɵtemplate(0, AnchorComponent_img_0_Template, 2, 8, "img", 0)(1, AnchorComponent_i_1_Template, 1, 8, "i", 1)(2, AnchorComponent_span_2_Template, 2, 2, "span", 2);
                i0__namespace.ɵɵelement(3, "span", 3);
                i0__namespace.ɵɵprojection(4);
                i0__namespace.ɵɵtemplate(5, AnchorComponent_span_5_Template, 1, 1, "span", 4);
            } if (rf & 2) {
                i0__namespace.ɵɵproperty("ngIf", ctx.iconurl);
                i0__namespace.ɵɵadvance();
                i0__namespace.ɵɵproperty("ngIf", ctx.iconclass);
                i0__namespace.ɵɵadvance();
                i0__namespace.ɵɵproperty("ngIf", ctx.iconclass);
                i0__namespace.ɵɵadvance();
                i0__namespace.ɵɵproperty("innerHTML", ctx.caption, i0__namespace.ɵɵsanitizeHtml);
                i0__namespace.ɵɵadvance(2);
                i0__namespace.ɵɵproperty("ngIf", ctx.badgevalue);
            } }, dependencies: [i2__namespace.NgIf, i2__namespace.NgStyle, i1$1__namespace.TextContentDirective, i1$1__namespace.ImagePipe], encapsulation: 2 }); }
    }
    (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(AnchorComponent, [{
            type: i0.Component,
            args: [{ selector: 'a[wmAnchor]', providers: [
                        i1$1.provideAsWidgetRef(AnchorComponent)
                    ], exportAs: 'wmAnchor', template: "<img data-identifier=\"img\" alt=\"Image\" class=\"anchor-image-icon\" [src]=\"iconurl | image\" *ngIf=\"iconurl\" [ngStyle]=\"{width:iconwidth, height:iconheight, margin:iconmargin}\"/>\n<i class=\"app-icon {{iconclass}}\" aria-hidden=\"true\" [ngStyle]=\"{width:iconwidth, height:iconheight, margin:iconmargin}\" *ngIf=\"iconclass\"></i>\n<span class=\"sr-only\" *ngIf=\"iconclass\">{{caption}} {{appLocale.LABEL_ICON}}</span>\n<span class=\"anchor-caption\" [innerHTML]=\"caption\"></span>\n<ng-content select=\".caret\"></ng-content>\n<span *ngIf=\"badgevalue\" class=\"badge pull-right\" [textContent]=\"badgevalue\"></span>\n" }]
        }], () => [{ type: i0__namespace.Injector }, { type: i1__namespace.App }, { type: undefined, decorators: [{
                    type: i0.Inject,
                    args: ['EXPLICIT_CONTEXT']
                }, {
                    type: i0.Optional
                }] }], { target: [{
                type: i0.HostBinding,
                args: ['target']
            }], shortcutkey: [{
                type: i0.HostBinding,
                args: ['attr.accesskey']
            }], iconposition: [{
                type: i0.HostBinding,
                args: ['attr.icon-position']
            }] }); })();
    (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassDebugInfo(AnchorComponent, { className: "AnchorComponent", filePath: "anchor/anchor.component.ts", lineNumber: 37 }); })();

    const registerProps$7 = () => {
        i1$1.register('wm-audio', new Map([
            ['audiopreload', { value: 'none', ...i1$1.PROP_STRING }],
            ['audiosupportmessage', { value: 'Your browser does not support the audio tag.', ...i1$1.PROP_STRING }],
            ['autoplay', i1$1.PROP_BOOLEAN],
            ['class', i1$1.PROP_STRING],
            ['controls', i1$1.PROP_BOOLEAN],
            ['hint', i1$1.PROP_STRING],
            ['arialabel', i1$1.PROP_STRING],
            ['loop', i1$1.PROP_BOOLEAN],
            ['mp3format', i1$1.PROP_STRING],
            ['muted', i1$1.PROP_BOOLEAN],
            ['name', i1$1.PROP_STRING],
            ['show', { value: true, ...i1$1.PROP_BOOLEAN }],
            ['tabindex', { value: 0, ...i1$1.PROP_NUMBER }]
        ]));
    };

    const _c0$4 = ["wmAudio", ""];
    const DEFAULT_CLS$7 = 'app-audio';
    const WIDGET_CONFIG$7 = {
        widgetType: 'wm-audio',
        hostClass: DEFAULT_CLS$7,
        displayType: i1$1.DISPLAY_TYPE.INLINE_BLOCK
    };
    class AudioComponent extends i1$1.StylableComponent {
        static { this.initializeProps = registerProps$7(); }
        constructor(inj, explicitContext) {
            super(inj, WIDGET_CONFIG$7, explicitContext);
            i1$1.styler(this.nativeElement, this);
        }
        onPropertyChange(key, nv, ov) {
            if (key === 'tabindex') {
                return;
            }
            else {
                super.onPropertyChange(key, nv, ov);
            }
        }
        static { this.ɵfac = function AudioComponent_Factory(t) { return new (t || AudioComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.Injector), i0__namespace.ɵɵdirectiveInject('EXPLICIT_CONTEXT', 8)); }; }
        static { this.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: AudioComponent, selectors: [["", "wmAudio", ""]], features: [i0__namespace.ɵɵProvidersFeature([
                    i1$1.provideAsWidgetRef(AudioComponent)
                ]), i0__namespace.ɵɵInheritDefinitionFeature], attrs: _c0$4, decls: 5, vars: 17, consts: [["name", "wmAudio", 3, "autoplay", "controls", "loop", "muted", "preload", "src", "tabindex"], ["type", "audio/mp3", 3, "src"]], template: function AudioComponent_Template(rf, ctx) { if (rf & 1) {
                i0__namespace.ɵɵelementStart(0, "audio", 0);
                i0__namespace.ɵɵpipe(1, "trustAs");
                i0__namespace.ɵɵelement(2, "source", 1);
                i0__namespace.ɵɵpipe(3, "trustAs");
                i0__namespace.ɵɵtext(4);
                i0__namespace.ɵɵelementEnd();
            } if (rf & 2) {
                i0__namespace.ɵɵproperty("autoplay", ctx.autoplay)("controls", ctx.controls)("loop", ctx.loop)("muted", ctx.muted)("preload", ctx.audiopreload)("src", i0__namespace.ɵɵpipeBind2(1, 11, ctx.mp3format, "resource"), i0__namespace.ɵɵsanitizeUrl)("tabindex", ctx.tabindex);
                i0__namespace.ɵɵattribute("aria-label", ctx.arialabel || "Audio")("hint", ctx.hint);
                i0__namespace.ɵɵadvance(2);
                i0__namespace.ɵɵproperty("src", i0__namespace.ɵɵpipeBind2(3, 14, ctx.mp3format, "resource"), i0__namespace.ɵɵsanitizeUrl);
                i0__namespace.ɵɵadvance(2);
                i0__namespace.ɵɵtextInterpolate1(" ", ctx.audiosupportmessage, "\n");
            } }, dependencies: [i1$1__namespace.TrustAsPipe], encapsulation: 2 }); }
    }
    (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(AudioComponent, [{
            type: i0.Component,
            args: [{ selector: '[wmAudio]', providers: [
                        i1$1.provideAsWidgetRef(AudioComponent)
                    ], template: "<audio [attr.aria-label]=\"arialabel || 'Audio'\" [attr.hint]=\"hint\" [autoplay]=\"autoplay\"\n       [controls]=\"controls\" [loop]=\"loop\" [muted]=\"muted\" [preload]=\"audiopreload\" [src]=\"mp3format | trustAs: 'resource'\"\n       name=\"wmAudio\" [tabindex]=\"tabindex\">\n    <source type=\"audio/mp3\" [src]=\"mp3format | trustAs: 'resource'\">\n    {{audiosupportmessage}}\n</audio>\n" }]
        }], () => [{ type: i0__namespace.Injector }, { type: undefined, decorators: [{
                    type: i0.Inject,
                    args: ['EXPLICIT_CONTEXT']
                }, {
                    type: i0.Optional
                }] }], null); })();
    (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassDebugInfo(AudioComponent, { className: "AudioComponent", filePath: "audio/audio.component.ts", lineNumber: 20 }); })();

    const registerProps$6 = () => {
        i1$1.register('wm-html', new Map([
            ['class', i1$1.PROP_STRING],
            ['content', i1$1.PROP_STRING],
            ['hint', i1$1.PROP_STRING],
            ['arialabel', i1$1.PROP_STRING],
            ['name', i1$1.PROP_STRING],
            ['show', { value: true, ...i1$1.PROP_BOOLEAN }]
        ]));
    };

    const DEFAULT_CLS$6 = 'app-html-container';
    const WIDGET_CONFIG$6 = {
        widgetType: 'wm-html',
        hostClass: DEFAULT_CLS$6
    };
    class HtmlDirective extends i1$1.StylableComponent {
        static { this.initializeProps = registerProps$6(); }
        constructor(inj, height, boundContent, sanitizePipe, explicitContext) {
            super(inj, WIDGET_CONFIG$6, explicitContext);
            this.boundContent = boundContent;
            this.sanitizePipe = sanitizePipe;
            // if the height is provided set the overflow to auto
            if (height) {
                i1.setCSS(this.nativeElement, 'overflow', 'auto');
            }
            i1$1.styler(this.nativeElement, this);
        }
        ngOnInit() {
            super.ngOnInit();
            if (this.boundContent) {
                this.nativeElement.innerHTML = '';
            }
            if (!this.content && this.nativeElement.innerHTML) {
                this.content = this.nativeElement.innerHTML;
            }
        }
        onPropertyChange(key, nv, ov) {
            if (key === 'content') {
                // Check for trustPipe safe values
                let bindContent = this.nativeElement.getAttribute('content.bind');
                let safeValue = bindContent ? nv && bindContent.includes('trustAs:') : false;
                if (typeof nv === 'object' && safeValue) {
                    i1.setProperty(this.nativeElement, 'innerHTML', nv[Object.keys(nv)[0]]);
                }
                else {
                    i1.setProperty(this.nativeElement, 'innerHTML', this.sanitizePipe.transform(nv, i0.SecurityContext.HTML));
                }
            }
            else {
                super.onPropertyChange(key, nv, ov);
            }
        }
        static { this.ɵfac = function HtmlDirective_Factory(t) { return new (t || HtmlDirective)(i0__namespace.ɵɵdirectiveInject(i0__namespace.Injector), i0__namespace.ɵɵinjectAttribute('height'), i0__namespace.ɵɵinjectAttribute('content.bind'), i0__namespace.ɵɵdirectiveInject(i1$1__namespace.SanitizePipe), i0__namespace.ɵɵdirectiveInject('EXPLICIT_CONTEXT', 8)); }; }
        static { this.ɵdir = /*@__PURE__*/ i0__namespace.ɵɵdefineDirective({ type: HtmlDirective, selectors: [["", "wmHtml", ""]], exportAs: ["wmHtml"], features: [i0__namespace.ɵɵProvidersFeature([
                    i1$1.provideAsWidgetRef(HtmlDirective)
                ]), i0__namespace.ɵɵInheritDefinitionFeature] }); }
    }
    (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(HtmlDirective, [{
            type: i0.Directive,
            args: [{
                    selector: '[wmHtml]',
                    providers: [
                        i1$1.provideAsWidgetRef(HtmlDirective)
                    ],
                    exportAs: 'wmHtml'
                }]
        }], () => [{ type: i0__namespace.Injector }, { type: undefined, decorators: [{
                    type: i0.Attribute,
                    args: ['height']
                }] }, { type: undefined, decorators: [{
                    type: i0.Attribute,
                    args: ['content.bind']
                }] }, { type: i1$1__namespace.SanitizePipe }, { type: undefined, decorators: [{
                    type: i0.Inject,
                    args: ['EXPLICIT_CONTEXT']
                }, {
                    type: i0.Optional
                }] }], null); })();

    const registerProps$5 = () => {
        i1$1.register('wm-icon', new Map([
            ['animation', i1$1.PROP_STRING],
            ['caption', i1$1.PROP_STRING],
            ['class', i1$1.PROP_STRING],
            ['conditionalclass', i1$1.PROP_ANY],
            ['conditionalstyle', i1$1.PROP_ANY],
            ['hint', i1$1.PROP_STRING],
            ['arialabel', i1$1.PROP_STRING],
            ['iconclass', { value: 'wm-sl-l sl-user', ...i1$1.PROP_STRING }],
            ['iconposition', { value: 'left', ...i1$1.PROP_STRING }],
            ['iconsize', i1$1.PROP_STRING],
            ['iconurl', i1$1.PROP_STRING],
            ['name', i1$1.PROP_STRING],
            ['show', { value: true, ...i1$1.PROP_BOOLEAN }]
        ]));
    };

    const _c0$3 = ["wmIcon", ""];
    function IconComponent_span_1_Template(rf, ctx) { if (rf & 1) {
        i0__namespace.ɵɵelementStart(0, "span", 2);
        i0__namespace.ɵɵtext(1);
        i0__namespace.ɵɵelementEnd();
    } if (rf & 2) {
        const ctx_r0 = i0__namespace.ɵɵnextContext();
        i0__namespace.ɵɵadvance();
        i0__namespace.ɵɵtextInterpolate(ctx_r0.arialabel || ctx_r0.caption || ctx_r0.appLocale.LABEL_ICON);
    } }
    function IconComponent_label_2_Template(rf, ctx) { if (rf & 1) {
        i0__namespace.ɵɵelement(0, "label", 3);
    } if (rf & 2) {
        const ctx_r0 = i0__namespace.ɵɵnextContext();
        i0__namespace.ɵɵproperty("textContent", ctx_r0.caption);
    } }
    const DEFAULT_CLS$5 = 'app-icon-wrapper';
    const WIDGET_CONFIG$5 = {
        widgetType: 'wm-icon',
        hostClass: DEFAULT_CLS$5
    };
    class IconComponent extends i1$1.StylableComponent {
        static { this.initializeProps = registerProps$5(); }
        constructor(inj, explicitContext) {
            super(inj, WIDGET_CONFIG$5, explicitContext);
            i1$1.styler(this.nativeElement, this);
        }
        static { this.ɵfac = function IconComponent_Factory(t) { return new (t || IconComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.Injector), i0__namespace.ɵɵdirectiveInject('EXPLICIT_CONTEXT', 8)); }; }
        static { this.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: IconComponent, selectors: [["", "wmIcon", ""]], hostVars: 3, hostBindings: function IconComponent_HostBindings(rf, ctx) { if (rf & 2) {
                i0__namespace.ɵɵattribute("icon-position", ctx.iconposition);
                i0__namespace.ɵɵstyleProp("font-size", ctx.iconsize);
            } }, features: [i0__namespace.ɵɵProvidersFeature([
                    i1$1.provideAsWidgetRef(IconComponent)
                ]), i0__namespace.ɵɵInheritDefinitionFeature], attrs: _c0$3, decls: 3, vars: 5, consts: [["class", "sr-only", 4, "ngIf"], ["aria-hidden", "true", "class", "app-label", 3, "textContent", 4, "ngIf"], [1, "sr-only"], ["aria-hidden", "true", 1, "app-label", 3, "textContent"]], template: function IconComponent_Template(rf, ctx) { if (rf & 1) {
                i0__namespace.ɵɵelement(0, "i");
                i0__namespace.ɵɵtemplate(1, IconComponent_span_1_Template, 2, 1, "span", 0)(2, IconComponent_label_2_Template, 1, 1, "label", 1);
            } if (rf & 2) {
                i0__namespace.ɵɵclassMapInterpolate1("app-icon ", ctx.iconclass, "");
                i0__namespace.ɵɵadvance();
                i0__namespace.ɵɵproperty("ngIf", ctx.iconclass);
                i0__namespace.ɵɵadvance();
                i0__namespace.ɵɵproperty("ngIf", ctx.caption);
            } }, dependencies: [i2__namespace.NgIf, i1$1__namespace.TextContentDirective], encapsulation: 2 }); }
    }
    (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(IconComponent, [{
            type: i0.Component,
            args: [{ selector: '[wmIcon]', providers: [
                        i1$1.provideAsWidgetRef(IconComponent)
                    ], template: "<i class=\"app-icon {{iconclass}}\"></i>\n<span *ngIf=\"iconclass\" class=\"sr-only\">{{ arialabel || caption || appLocale.LABEL_ICON }}</span>\n<label *ngIf=\"caption\" [textContent]=\"caption\" aria-hidden=\"true\" class=\"app-label\"></label>\n" }]
        }], () => [{ type: i0__namespace.Injector }, { type: undefined, decorators: [{
                    type: i0.Inject,
                    args: ['EXPLICIT_CONTEXT']
                }, {
                    type: i0.Optional
                }] }], { iconposition: [{
                type: i0.HostBinding,
                args: ['attr.icon-position']
            }], iconsize: [{
                type: i0.HostBinding,
                args: ['style.fontSize']
            }] }); })();
    (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassDebugInfo(IconComponent, { className: "IconComponent", filePath: "icon/icon.component.ts", lineNumber: 19 }); })();

    const registerProps$4 = () => {
        i1$1.register('wm-iframe', new Map([
            ['class', i1$1.PROP_STRING],
            ['encodeurl', i1$1.PROP_BOOLEAN],
            ['height', { value: '150px', ...i1$1.PROP_STRING }],
            ['iframesrc', i1$1.PROP_STRING],
            ['name', i1$1.PROP_STRING],
            ['show', { value: true, ...i1$1.PROP_BOOLEAN }],
            ['width', { value: '300px', ...i1$1.PROP_STRING }],
            ['hint', i1$1.PROP_STRING],
            ['arialabel', i1$1.PROP_STRING]
        ]));
    };

    const _c0$2 = ["wmIframe", ""];
    function IframeComponent_div_1_Template(rf, ctx) { if (rf & 1) {
        i0__namespace.ɵɵelementStart(0, "div", 2);
        i0__namespace.ɵɵelement(1, "p", 3);
        i0__namespace.ɵɵelementEnd();
    } if (rf & 2) {
        const ctx_r0 = i0__namespace.ɵɵnextContext();
        i0__namespace.ɵɵadvance();
        i0__namespace.ɵɵproperty("title", ctx_r0.hintMsg)("textContent", ctx_r0.errMsg);
    } }
    const DEFAULT_CLS$4 = 'embed-responsive app-iframe';
    const WIDGET_CONFIG$4 = {
        widgetType: 'wm-iframe',
        hostClass: DEFAULT_CLS$4
    };
    class IframeComponent extends i1$1.StylableComponent {
        static { this.initializeProps = registerProps$4(); }
        constructor(inj, trustAsPipe, explicitContext) {
            super(inj, WIDGET_CONFIG$4, explicitContext);
            this.trustAsPipe = trustAsPipe;
            /**
             * this property member is set to true when the content request url doesn't match windows protocol
             */
            this.showContentLoadError = false;
            i1$1.styler(this.nativeElement, this);
        }
        computeIframeSrc() {
            this.showContentLoadError = false;
            this._iframesrc = undefined;
            if (this.iframesrc) {
                let url = this.iframesrc;
                if (this.encodeurl) {
                    url = i1.encodeUrl(this.iframesrc);
                }
                const trustedUrl = this.trustAsPipe.transform(url, i0.SecurityContext.RESOURCE_URL);
                if (i1.isInsecureContentRequest(url)) {
                    this.showContentLoadError = true;
                    this.errorMsg = `${this.appLocale.MESSAGE_ERROR_CONTENT_DISPLAY} ${this.iframesrc}`;
                    this.hintMsg = this.errorMsg;
                }
                this._iframesrc = trustedUrl;
            }
        }
        onPropertyChange(key, nv, ov) {
            if (key === 'iframesrc' || key === 'encodeurl') {
                this.computeIframeSrc();
            }
            else {
                super.onPropertyChange(key, nv, ov);
            }
        }
        static { this.ɵfac = function IframeComponent_Factory(t) { return new (t || IframeComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.Injector), i0__namespace.ɵɵdirectiveInject(i1$1__namespace.TrustAsPipe), i0__namespace.ɵɵdirectiveInject('EXPLICIT_CONTEXT', 8)); }; }
        static { this.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: IframeComponent, selectors: [["", "wmIframe", ""]], features: [i0__namespace.ɵɵProvidersFeature([
                    i1$1.provideAsWidgetRef(IframeComponent)
                ]), i0__namespace.ɵɵInheritDefinitionFeature], attrs: _c0$2, decls: 2, vars: 4, consts: [["role", "document", "scrolling", "auto", "marginheight", "0", "marginwidth", "0", "frameborder", "0", "seamless", "seamless", 1, "embed-responsive-item", "iframe-content", 3, "name"], ["class", "wm-content-info readonly-wrapper", 4, "ngIf"], [1, "wm-content-info", "readonly-wrapper"], [1, "wm-message", 3, "title", "textContent"]], template: function IframeComponent_Template(rf, ctx) { if (rf & 1) {
                i0__namespace.ɵɵelement(0, "iframe", 0);
                i0__namespace.ɵɵtemplate(1, IframeComponent_div_1_Template, 2, 2, "div", 1);
            } if (rf & 2) {
                i0__namespace.ɵɵproperty("name", ctx.name);
                i0__namespace.ɵɵattribute("src", ctx._iframesrc, i0__namespace.ɵɵsanitizeResourceUrl)("aria-label", ctx.arialabel || "iframe");
                i0__namespace.ɵɵadvance();
                i0__namespace.ɵɵproperty("ngIf", ctx.showContentLoadError);
            } }, dependencies: [i2__namespace.NgIf, i1$1__namespace.TextContentDirective], encapsulation: 2 }); }
    }
    (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(IframeComponent, [{
            type: i0.Component,
            args: [{ selector: '[wmIframe]', providers: [
                        i1$1.provideAsWidgetRef(IframeComponent)
                    ], template: "<iframe  class=\"embed-responsive-item iframe-content\" role=\"document\"\n        scrolling=\"auto\"\n        marginheight=\"0\"\n        marginwidth=\"0\"\n        frameborder=\"0\"\n        [name]=\"name\"\n        [attr.src]=\"_iframesrc\"\n         [attr.aria-label]=\"arialabel || 'iframe'\"\n        seamless=\"seamless\">\n</iframe>\n<div class=\"wm-content-info readonly-wrapper\" *ngIf=\"showContentLoadError\">\n    <p class=\"wm-message\" [title]=\"hintMsg\" [textContent]=\"errMsg\"></p>\n</div>\n" }]
        }], () => [{ type: i0__namespace.Injector }, { type: i1$1__namespace.TrustAsPipe }, { type: undefined, decorators: [{
                    type: i0.Inject,
                    args: ['EXPLICIT_CONTEXT']
                }, {
                    type: i0.Optional
                }] }], null); })();
    (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassDebugInfo(IframeComponent, { className: "IframeComponent", filePath: "iframe/iframe.component.ts", lineNumber: 22 }); })();

    const registerProps$3 = () => {
        i1$1.register('wm-label', new Map([
            ['animation', i1$1.PROP_STRING],
            ['caption', { value: 'Label', ...i1$1.PROP_STRING }],
            ['class', i1$1.PROP_STRING],
            ['conditionalclass', i1$1.PROP_ANY],
            ['conditionalstyle', i1$1.PROP_ANY],
            ['type', i1$1.PROP_STRING],
            ['notag', i1$1.PROP_BOOLEAN],
            ['hint', i1$1.PROP_STRING],
            ['name', i1$1.PROP_STRING],
            ['required', i1$1.PROP_BOOLEAN],
            ['show', { value: true, ...i1$1.PROP_BOOLEAN }]
        ]));
    };

    const DEFAULT_CLS$3 = 'app-label';
    const WIDGET_CONFIG$3 = {
        widgetType: 'wm-label',
        hostClass: DEFAULT_CLS$3,
        displayType: i1$1.DISPLAY_TYPE.INLINE_BLOCK
    };
    class LabelDirective extends i1$1.StylableComponent {
        static { this.initializeProps = registerProps$3(); }
        constructor(inj, sanitizePipe, explicitContext) {
            super(inj, WIDGET_CONFIG$3, explicitContext);
            this.sanitizePipe = sanitizePipe;
            i1$1.styler(this.nativeElement, this);
        }
        onPropertyChange(key, nv, ov) {
            if (key === 'caption') {
                // Check for trustPipe safe values
                let bindContent = this.nativeElement.getAttribute('caption.bind');
                let safeValue = bindContent ? nv && bindContent.includes('trustAs:') : false;
                if (lodashEs.isObject(nv) && !safeValue) {
                    i1.setProperty(this.nativeElement, 'textContent', JSON.stringify(nv));
                }
                else if (lodashEs.isObject(nv) && safeValue) {
                    i1.setProperty(this.nativeElement, 'innerHTML', nv[Object.keys(nv)[0]]);
                }
                else {
                    i1.setProperty(this.nativeElement, 'innerHTML', this.sanitizePipe.transform(nv, i0.SecurityContext.HTML));
                }
            }
            else if (key === 'required') {
                i1.toggleClass(this.nativeElement, 'required', nv);
            }
            else {
                super.onPropertyChange(key, nv, ov);
            }
        }
        static { this.ɵfac = function LabelDirective_Factory(t) { return new (t || LabelDirective)(i0__namespace.ɵɵdirectiveInject(i0__namespace.Injector), i0__namespace.ɵɵdirectiveInject(i1$1__namespace.SanitizePipe), i0__namespace.ɵɵdirectiveInject('EXPLICIT_CONTEXT', 8)); }; }
        static { this.ɵdir = /*@__PURE__*/ i0__namespace.ɵɵdefineDirective({ type: LabelDirective, selectors: [["", "wmLabel", ""]], exportAs: ["wmLabel"], features: [i0__namespace.ɵɵProvidersFeature([
                    i1$1.provideAsWidgetRef(LabelDirective)
                ]), i0__namespace.ɵɵInheritDefinitionFeature] }); }
    }
    (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(LabelDirective, [{
            type: i0.Directive,
            args: [{
                    selector: '[wmLabel]',
                    providers: [
                        i1$1.provideAsWidgetRef(LabelDirective)
                    ],
                    exportAs: 'wmLabel'
                }]
        }], () => [{ type: i0__namespace.Injector }, { type: i1$1__namespace.SanitizePipe }, { type: undefined, decorators: [{
                    type: i0.Inject,
                    args: ['EXPLICIT_CONTEXT']
                }, {
                    type: i0.Optional
                }] }], null); })();

    const registerProps$2 = () => {
        const props = new Map([
            ['animation', i1$1.PROP_STRING],
            ['class', i1$1.PROP_STRING],
            ['conditionalclass', i1$1.PROP_ANY],
            ['conditionalstyle', i1$1.PROP_ANY],
            ['encodeurl', i1$1.PROP_STRING],
            ['hint', i1$1.PROP_STRING],
            ['arialabel', i1$1.PROP_STRING],
            ['name', i1$1.PROP_STRING],
            ['pictureaspect', { value: 'None', ...i1$1.PROP_STRING }],
            ['alttext', { value: 'Image alt text not provided', ...i1$1.PROP_STRING }],
            ['pictureplaceholder', i1$1.PROP_STRING],
            ['picturesource', i1$1.PROP_STRING],
            ['resizemode', { value: 'fill', ...i1$1.PROP_STRING }],
            ['shape', i1$1.PROP_STRING],
            ['show', { value: true, ...i1$1.PROP_BOOLEAN }],
            ['tabindex', { value: 0, ...i1$1.PROP_NUMBER }]
        ]);
        if (i1.isMobileApp()) {
            props.set('offline', { value: true, ...i1$1.PROP_BOOLEAN });
        }
        i1$1.register('wm-picture', props);
    };

    const DEFAULT_CLS$2 = 'app-picture';
    const WIDGET_CONFIG$2 = {
        widgetType: 'wm-picture',
        hostClass: DEFAULT_CLS$2,
        displayType: i1$1.DISPLAY_TYPE.INLINE_BLOCK
    };
    class PictureDirective extends i1$1.StylableComponent {
        static { this.initializeProps = registerProps$2(); }
        constructor(inj, imagePipe, explicitContext) {
            super(inj, WIDGET_CONFIG$2, explicitContext);
            this.imagePipe = imagePipe;
            i1$1.styler(this.nativeElement, this);
        }
        setImgSource() {
            this.imgSource = this.imagePipe.transform(this.picturesource, this.encodeurl, this.pictureplaceholder);
        }
        onPropertyChange(key, nv, ov) {
            if (key === 'pictureaspect') {
                let width = '';
                let height = '';
                switch (nv) {
                    case 'None':
                        width = this.width;
                        height = this.height;
                        break;
                    case 'H':
                        width = '100%';
                        break;
                    case 'V':
                        height = '100%';
                        break;
                    case 'Both':
                        width = '100%';
                        height = '100%';
                        break;
                }
                i1.setCSS(this.nativeElement, 'width', width, true);
                i1.setCSS(this.nativeElement, 'height', height, true);
            }
            else if (key === 'encodeurl' || key === 'pictureplaceholder') {
                this.setImgSource();
            }
            else if (key === 'shape') {
                i1.switchClass(this.nativeElement, `img-${nv}`, `img-${ov}`);
            }
            else if (key === 'hint') {
                i1.setAttr(this.nativeElement, 'alt', nv);
            }
            else if (key === 'resizemode') {
                i1.setCSS(this.nativeElement, 'object-fit', nv);
            }
            super.onPropertyChange(key, nv, ov);
        }
        onStyleChange(key, nv, ov) {
            if (key === 'picturesource') {
                this.setImgSource();
            }
            else {
                super.onStyleChange(key, nv, ov);
            }
        }
        ngOnInit() {
            this.setImgSource();
            super.ngOnInit();
        }
        static { this.ɵfac = function PictureDirective_Factory(t) { return new (t || PictureDirective)(i0__namespace.ɵɵdirectiveInject(i0__namespace.Injector), i0__namespace.ɵɵdirectiveInject(i1$1__namespace.ImagePipe), i0__namespace.ɵɵdirectiveInject('EXPLICIT_CONTEXT', 8)); }; }
        static { this.ɵdir = /*@__PURE__*/ i0__namespace.ɵɵdefineDirective({ type: PictureDirective, selectors: [["img", "wmPicture", ""]], hostVars: 1, hostBindings: function PictureDirective_HostBindings(rf, ctx) { if (rf & 2) {
                i0__namespace.ɵɵhostProperty("src", ctx.imgSource, i0__namespace.ɵɵsanitizeUrl);
            } }, exportAs: ["wmPicture"], features: [i0__namespace.ɵɵProvidersFeature([
                    i1$1.provideAsWidgetRef(PictureDirective)
                ]), i0__namespace.ɵɵInheritDefinitionFeature] }); }
    }
    (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(PictureDirective, [{
            type: i0.Directive,
            args: [{
                    selector: 'img[wmPicture]',
                    providers: [
                        i1$1.provideAsWidgetRef(PictureDirective)
                    ],
                    exportAs: 'wmPicture'
                }]
        }], () => [{ type: i0__namespace.Injector }, { type: i1$1__namespace.ImagePipe }, { type: undefined, decorators: [{
                    type: i0.Inject,
                    args: ['EXPLICIT_CONTEXT']
                }, {
                    type: i0.Optional
                }] }], { imgSource: [{
                type: i0.HostBinding,
                args: ['src']
            }] }); })();

    const registerProps$1 = () => {
        i1$1.register('wm-spinner', new Map([
            ['animation', { value: 'spin', PROP_STRING: i1$1.PROP_STRING }],
            ['caption', { value: 'Loading...', ...i1$1.PROP_STRING }],
            ['class', i1$1.PROP_STRING],
            ['iconclass', { value: 'fa fa-circle-o-notch fa-spin', ...i1$1.PROP_STRING }],
            ['iconsize', i1$1.PROP_STRING],
            ['image', i1$1.PROP_STRING],
            ['imageheight', i1$1.PROP_STRING],
            ['imagewidth', { value: '20px', ...i1$1.PROP_STRING }],
            ['name', i1$1.PROP_STRING],
            ['show', { value: true, ...i1$1.PROP_BOOLEAN }],
            ['type', { value: 'icon', ...i1$1.PROP_STRING }],
            ['servicevariabletotrack', i1$1.PROP_STRING],
            ['hint', i1$1.PROP_STRING],
            ['arialabel', i1$1.PROP_STRING]
        ]));
    };

    const _c0$1 = ["wmSpinner", ""];
    const _c1 = (a0, a1, a2, a3) => ({ width: a0, height: a1, backgroundImage: a2, backgroundSize: a3 });
    const _c2 = (a0, a1) => [a0, a1];
    function SpinnerComponent_span_1_Template(rf, ctx) { if (rf & 1) {
        i0__namespace.ɵɵelement(0, "span", 5);
    } if (rf & 2) {
        const ctx_r0 = i0__namespace.ɵɵnextContext();
        i0__namespace.ɵɵproperty("ngClass", ctx_r0.animation)("ngStyle", i0__namespace.ɵɵpureFunction4(2, _c1, ctx_r0.imagewidth, ctx_r0.imageheight, "url(" + ctx_r0.picture + ")", ctx_r0.imagewidth));
    } }
    function SpinnerComponent_i_2_Template(rf, ctx) { if (rf & 1) {
        i0__namespace.ɵɵelement(0, "i", 6);
    } if (rf & 2) {
        const ctx_r0 = i0__namespace.ɵɵnextContext();
        i0__namespace.ɵɵstyleProp("fon-size", ctx_r0.iconsize);
        i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction2(3, _c2, ctx_r0.iconclass, ctx_r0.animation));
    } }
    function SpinnerComponent_span_3_Template(rf, ctx) { if (rf & 1) {
        i0__namespace.ɵɵelement(0, "span", 7);
    } if (rf & 2) {
        const ctx_r0 = i0__namespace.ɵɵnextContext();
        i0__namespace.ɵɵproperty("innerHTML", ctx_r0.caption, i0__namespace.ɵɵsanitizeHtml);
    } }
    function SpinnerComponent_div_4_p_1_Template(rf, ctx) { if (rf & 1) {
        i0__namespace.ɵɵelement(0, "p", 10);
    } if (rf & 2) {
        const value_r2 = ctx.$implicit;
        i0__namespace.ɵɵproperty("textContent", value_r2);
    } }
    function SpinnerComponent_div_4_Template(rf, ctx) { if (rf & 1) {
        i0__namespace.ɵɵelementStart(0, "div", 8);
        i0__namespace.ɵɵtemplate(1, SpinnerComponent_div_4_p_1_Template, 1, 1, "p", 9);
        i0__namespace.ɵɵelementEnd();
    } if (rf & 2) {
        const ctx_r0 = i0__namespace.ɵɵnextContext();
        i0__namespace.ɵɵadvance();
        i0__namespace.ɵɵproperty("ngForOf", ctx_r0.spinnerMessages);
    } }
    const DEFAULT_CLS$1 = 'app-spinner';
    const WIDGET_CONFIG$1 = { widgetType: 'wm-spinner', hostClass: DEFAULT_CLS$1 };
    class SpinnerComponent extends i1$1.StylableComponent {
        static { this.initializeProps = registerProps$1(); }
        get spinnerMessages() {
            return this._spinnerMessages;
        }
        set spinnerMessages(newVal) {
            this.showCaption = lodashEs.isEmpty(newVal);
            this._spinnerMessages = newVal;
        }
        listenOnDataSource() {
            const variables = lodashEs.split(this.servicevariabletotrack, ',');
            this.getAppInstance().subscribe('toggle-variable-state', data => {
                const name = data.variable.execute(i1.DataSource.Operation.GET_NAME);
                if (lodashEs.includes(variables, name) && i1.validateDataSourceCtx(data.variable, this.getViewParent())) {
                    this.widget.show = data.active;
                }
            });
        }
        constructor(inj, imagePipe, explicitContext) {
            super(inj, WIDGET_CONFIG$1, explicitContext);
            this.imagePipe = imagePipe;
            this.iconclass = '';
            this.animation = '';
            this.showCaption = true;
            i1$1.styler(this.nativeElement, this);
        }
        onPropertyChange(key, nv, ov) {
            if (key === 'image') {
                this.picture = this.imagePipe.transform(nv);
            }
            else if (key === 'animation') {
                if (nv === 'spin') {
                    this.animation = 'fa-spin';
                }
                else {
                    this.animation = nv || '';
                }
            }
            else {
                super.onPropertyChange(key, nv, ov);
            }
        }
        ngOnInit() {
            super.ngOnInit();
            // if variables are to be listened to, hide the widget and set the listener
            if (this.servicevariabletotrack) {
                this.widget.show = false;
                this.listenOnDataSource();
            }
        }
        static { this.ɵfac = function SpinnerComponent_Factory(t) { return new (t || SpinnerComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.Injector), i0__namespace.ɵɵdirectiveInject(i1$1__namespace.ImagePipe), i0__namespace.ɵɵdirectiveInject('EXPLICIT_CONTEXT', 8)); }; }
        static { this.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: SpinnerComponent, selectors: [["", "wmSpinner", ""]], exportAs: ["wmSpinner"], features: [i0__namespace.ɵɵProvidersFeature([
                    i1$1.provideAsWidgetRef(SpinnerComponent)
                ]), i0__namespace.ɵɵInheritDefinitionFeature], attrs: _c0$1, decls: 5, vars: 4, consts: [[1, "spinner-message"], ["class", "spinner-image animated infinite", "aria-hidden", "true", 3, "ngClass", "ngStyle", 4, "ngIf"], ["class", "spinner-image animated infinite", "aria-hidden", "true", 3, "ngClass", "fonSize", 4, "ngIf"], ["class", "spinner-text", 3, "innerHTML", 4, "ngIf"], ["class", "spinner-messages", 4, "ngIf"], ["aria-hidden", "true", 1, "spinner-image", "animated", "infinite", 3, "ngClass", "ngStyle"], ["aria-hidden", "true", 1, "spinner-image", "animated", "infinite", 3, "ngClass"], [1, "spinner-text", 3, "innerHTML"], [1, "spinner-messages"], [3, "textContent", 4, "ngFor", "ngForOf"], [3, "textContent"]], template: function SpinnerComponent_Template(rf, ctx) { if (rf & 1) {
                i0__namespace.ɵɵelementStart(0, "div", 0);
                i0__namespace.ɵɵtemplate(1, SpinnerComponent_span_1_Template, 1, 7, "span", 1)(2, SpinnerComponent_i_2_Template, 1, 6, "i", 2)(3, SpinnerComponent_span_3_Template, 1, 1, "span", 3)(4, SpinnerComponent_div_4_Template, 2, 1, "div", 4);
                i0__namespace.ɵɵelementEnd();
            } if (rf & 2) {
                i0__namespace.ɵɵadvance();
                i0__namespace.ɵɵproperty("ngIf", ctx.type === "image");
                i0__namespace.ɵɵadvance();
                i0__namespace.ɵɵproperty("ngIf", ctx.type === "icon");
                i0__namespace.ɵɵadvance();
                i0__namespace.ɵɵproperty("ngIf", ctx.showCaption);
                i0__namespace.ɵɵadvance();
                i0__namespace.ɵɵproperty("ngIf", !ctx.showCaption && ctx.spinnerMessages);
            } }, dependencies: [i2__namespace.NgClass, i2__namespace.NgForOf, i2__namespace.NgIf, i2__namespace.NgStyle, i1$1__namespace.TextContentDirective], encapsulation: 2 }); }
    }
    (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(SpinnerComponent, [{
            type: i0.Component,
            args: [{ selector: '[wmSpinner]', providers: [
                        i1$1.provideAsWidgetRef(SpinnerComponent)
                    ], exportAs: 'wmSpinner', template: "<div class=\"spinner-message\">\n    <span class=\"spinner-image animated infinite\" [ngClass]=\"animation\" aria-hidden=\"true\"\n        [ngStyle]=\"{width: imagewidth, height: imageheight, backgroundImage: 'url(' + picture + ')', backgroundSize: imagewidth}\"\n        *ngIf=\"type === 'image'\"></span>\n    <i class=\"spinner-image animated infinite\" aria-hidden=\"true\" [ngClass]=\"[iconclass, animation]\" [style.fonSize]=\"iconsize\" *ngIf=\"type === 'icon'\"></i>\n    <span class=\"spinner-text\" [innerHTML]=\"caption\" *ngIf=\"showCaption\"></span>\n    <div class=\"spinner-messages\" *ngIf=\"!showCaption && spinnerMessages\">\n        <p *ngFor=\"let value of spinnerMessages\" [textContent]=\"value\"></p>\n    </div>\n</div>\n" }]
        }], () => [{ type: i0__namespace.Injector }, { type: i1$1__namespace.ImagePipe }, { type: undefined, decorators: [{
                    type: i0.Inject,
                    args: ['EXPLICIT_CONTEXT']
                }, {
                    type: i0.Optional
                }] }], null); })();
    (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassDebugInfo(SpinnerComponent, { className: "SpinnerComponent", filePath: "spinner/spinner.component.ts", lineNumber: 20 }); })();

    const registerProps = () => {
        i1$1.register('wm-video', new Map([
            ['autoplay', i1$1.PROP_BOOLEAN],
            ['class', i1$1.PROP_STRING],
            ['controls', i1$1.PROP_BOOLEAN],
            ['hint', i1$1.PROP_STRING],
            ['arialabel', i1$1.PROP_STRING],
            ['loop', i1$1.PROP_BOOLEAN],
            ['mp4format', i1$1.PROP_STRING],
            ['muted', i1$1.PROP_BOOLEAN],
            ['name', i1$1.PROP_STRING],
            ['oggformat', i1$1.PROP_STRING],
            ['show', { value: true, ...i1$1.PROP_BOOLEAN }],
            ['subtitlelang', { value: 'en', ...i1$1.PROP_STRING }],
            ['subtitlesource', i1$1.PROP_STRING],
            ['tabindex', { value: 0, ...i1$1.PROP_NUMBER }],
            ['videoposter', { value: 'resources/images/imagelists/default-image.png', ...i1$1.PROP_STRING }],
            ['videopreload', { value: 'none', ...i1$1.PROP_STRING }],
            ['videosupportmessage', { value: 'Your browser does not support the video tag.', ...i1$1.PROP_STRING }],
            ['webmformat', i1$1.PROP_STRING]
        ]));
    };

    const _c0 = ["wmVideo", ""];
    function VideoComponent_source_3_Template(rf, ctx) { if (rf & 1) {
        i0__namespace.ɵɵelement(0, "source", 4);
        i0__namespace.ɵɵpipe(1, "trustAs");
    } if (rf & 2) {
        const ctx_r0 = i0__namespace.ɵɵnextContext();
        i0__namespace.ɵɵproperty("src", i0__namespace.ɵɵpipeBind2(1, 1, ctx_r0.mp4format, "resource"), i0__namespace.ɵɵsanitizeUrl);
    } }
    function VideoComponent_source_4_Template(rf, ctx) { if (rf & 1) {
        i0__namespace.ɵɵelement(0, "source", 5);
        i0__namespace.ɵɵpipe(1, "trustAs");
    } if (rf & 2) {
        const ctx_r0 = i0__namespace.ɵɵnextContext();
        i0__namespace.ɵɵproperty("src", i0__namespace.ɵɵpipeBind2(1, 1, ctx_r0.webmformat, "resource"), i0__namespace.ɵɵsanitizeUrl);
    } }
    function VideoComponent_source_5_Template(rf, ctx) { if (rf & 1) {
        i0__namespace.ɵɵelement(0, "source", 6);
        i0__namespace.ɵɵpipe(1, "trustAs");
    } if (rf & 2) {
        const ctx_r0 = i0__namespace.ɵɵnextContext();
        i0__namespace.ɵɵproperty("src", i0__namespace.ɵɵpipeBind2(1, 1, ctx_r0.oggformat, "resource"), i0__namespace.ɵɵsanitizeUrl);
    } }
    const DEFAULT_CLS = 'app-video';
    const WIDGET_CONFIG = {
        widgetType: 'wm-video',
        hostClass: DEFAULT_CLS,
        displayType: i1$1.DISPLAY_TYPE.INLINE_BLOCK
    };
    class VideoComponent extends i1$1.StylableComponent {
        static { this.initializeProps = registerProps(); }
        constructor(inj, trustAsPipe, explicitContext) {
            super(inj, WIDGET_CONFIG, explicitContext);
            this.trustAsPipe = trustAsPipe;
            /**
             * subtitle language property eg: en
             */
            this.subtitlelang = 'en';
            i1$1.styler(this.nativeElement, this);
        }
        // DO NOT use ngIf binding for the track. As of v6.0.Beta7 there is an error creating a void track node
        onPropertyChange(key, nv, ov) {
            if (key === 'subtitlesource') {
                let track = this.nativeElement.querySelector('track');
                if (track) {
                    i1.removeNode(track, true);
                }
                track = i1.createElement('track', {
                    kind: 'subtitles',
                    label: this.subtitlelang,
                    srclang: this.subtitlelang,
                    src: this.trustAsPipe.transform(nv, i0.SecurityContext.RESOURCE_URL),
                    default: ''
                }, true);
                i1.appendNode(track, this.nativeElement.querySelector('video'));
            }
            else if (key === 'mp4format') {
                this.mp4format = i1.transformFileURI(nv);
            }
            else if (key === 'webmformat') {
                this.webmformat = i1.transformFileURI(nv);
            }
            else if (key === 'oggformat') {
                this.oggformat = i1.transformFileURI(nv);
            }
            else if (key === 'tabindex') {
                return;
            }
            super.onPropertyChange(key, nv, ov);
        }
        static { this.ɵfac = function VideoComponent_Factory(t) { return new (t || VideoComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.Injector), i0__namespace.ɵɵdirectiveInject(i1$1__namespace.TrustAsPipe), i0__namespace.ɵɵdirectiveInject('EXPLICIT_CONTEXT', 8)); }; }
        static { this.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: VideoComponent, selectors: [["", "wmVideo", ""]], features: [i0__namespace.ɵɵProvidersFeature([
                    i1$1.provideAsWidgetRef(VideoComponent)
                ]), i0__namespace.ɵɵInheritDefinitionFeature], attrs: _c0, decls: 7, vars: 18, consts: [[3, "preload", "src", "muted", "poster", "controls", "loop", "autoplay", "tabindex"], ["type", "video/mp4", 3, "src", 4, "ngIf"], ["type", "video/webm", 3, "src", 4, "ngIf"], ["type", "video/ogg", 3, "src", 4, "ngIf"], ["type", "video/mp4", 3, "src"], ["type", "video/webm", 3, "src"], ["type", "video/ogg", 3, "src"]], template: function VideoComponent_Template(rf, ctx) { if (rf & 1) {
                i0__namespace.ɵɵelementStart(0, "video", 0);
                i0__namespace.ɵɵpipe(1, "trustAs");
                i0__namespace.ɵɵpipe(2, "image");
                i0__namespace.ɵɵtemplate(3, VideoComponent_source_3_Template, 2, 4, "source", 1)(4, VideoComponent_source_4_Template, 2, 4, "source", 2)(5, VideoComponent_source_5_Template, 2, 4, "source", 3);
                i0__namespace.ɵɵtext(6);
                i0__namespace.ɵɵelementEnd();
            } if (rf & 2) {
                i0__namespace.ɵɵproperty("preload", ctx.videopreload)("src", i0__namespace.ɵɵpipeBind2(1, 13, ctx.mp4format, "resource"), i0__namespace.ɵɵsanitizeUrl)("muted", ctx.muted)("poster", i0__namespace.ɵɵpipeBind1(2, 16, ctx.videoposter), i0__namespace.ɵɵsanitizeUrl)("controls", ctx.controls)("loop", ctx.loop)("autoplay", ctx.autoplay)("tabindex", ctx.tabindex);
                i0__namespace.ɵɵattribute("aria-label", ctx.arialabel || "video");
                i0__namespace.ɵɵadvance(3);
                i0__namespace.ɵɵproperty("ngIf", ctx.mp4format);
                i0__namespace.ɵɵadvance();
                i0__namespace.ɵɵproperty("ngIf", ctx.webmformat);
                i0__namespace.ɵɵadvance();
                i0__namespace.ɵɵproperty("ngIf", ctx.oggformat);
                i0__namespace.ɵɵadvance();
                i0__namespace.ɵɵtextInterpolate1(" ", ctx.videosupportmessage, "\n");
            } }, dependencies: [i2__namespace.NgIf, i1$1__namespace.TrustAsPipe, i1$1__namespace.ImagePipe], encapsulation: 2 }); }
    }
    (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(VideoComponent, [{
            type: i0.Component,
            args: [{ selector: '[wmVideo]', providers: [
                        i1$1.provideAsWidgetRef(VideoComponent)
                    ], template: "<video [attr.aria-label]=\"arialabel || 'video'\" [preload]=\"videopreload\"\n       [src]=\"mp4format | trustAs: 'resource'\"\n       [muted]=\"muted\"\n       [poster]=\"videoposter | image\"\n       [controls]=\"controls\"\n       [loop]=\"loop\"\n       [autoplay]=\"autoplay\" [tabindex]=\"tabindex\">\n    <source type=\"video/mp4\" [src]=\"mp4format | trustAs: 'resource'\" *ngIf=\"mp4format\">\n    <source type=\"video/webm\" [src]=\"webmformat | trustAs: 'resource'\" *ngIf=\"webmformat\">\n    <source type=\"video/ogg\" [src]=\"oggformat | trustAs: 'resource'\" *ngIf=\"oggformat\">\n    {{videosupportmessage}}\n</video>\n" }]
        }], () => [{ type: i0__namespace.Injector }, { type: i1$1__namespace.TrustAsPipe }, { type: undefined, decorators: [{
                    type: i0.Inject,
                    args: ['EXPLICIT_CONTEXT']
                }, {
                    type: i0.Optional
                }] }], null); })();
    (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassDebugInfo(VideoComponent, { className: "VideoComponent", filePath: "video/video.component.ts", lineNumber: 22 }); })();

    const components = [
        AnchorComponent,
        AudioComponent,
        HtmlDirective,
        IconComponent,
        IframeComponent,
        LabelDirective,
        PictureDirective,
        SpinnerComponent,
        VideoComponent
    ];
    class BasicModule {
        static { this.ɵfac = function BasicModule_Factory(t) { return new (t || BasicModule)(); }; }
        static { this.ɵmod = /*@__PURE__*/ i0__namespace.ɵɵdefineNgModule({ type: BasicModule }); }
        static { this.ɵinj = /*@__PURE__*/ i0__namespace.ɵɵdefineInjector({ imports: [i2.CommonModule,
                i1$1.WmComponentsModule] }); }
    }
    (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(BasicModule, [{
            type: i0.NgModule,
            args: [{
                    imports: [
                        i2.CommonModule,
                        i1$1.WmComponentsModule
                    ],
                    declarations: [...components],
                    exports: [...components]
                }]
        }], null, null); })();
    (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0__namespace.ɵɵsetNgModuleScope(BasicModule, { declarations: [AnchorComponent,
            AudioComponent,
            HtmlDirective,
            IconComponent,
            IframeComponent,
            LabelDirective,
            PictureDirective,
            SpinnerComponent,
            VideoComponent], imports: [i2.CommonModule,
            i1$1.WmComponentsModule], exports: [AnchorComponent,
            AudioComponent,
            HtmlDirective,
            IconComponent,
            IframeComponent,
            LabelDirective,
            PictureDirective,
            SpinnerComponent,
            VideoComponent] }); })();

    exports.AnchorComponent = AnchorComponent;
    exports.AudioComponent = AudioComponent;
    exports.BasicModule = BasicModule;
    exports.HtmlDirective = HtmlDirective;
    exports.IconComponent = IconComponent;
    exports.IframeComponent = IframeComponent;
    exports.LabelDirective = LabelDirective;
    exports.PictureDirective = PictureDirective;
    exports.SpinnerComponent = SpinnerComponent;
    exports.VideoComponent = VideoComponent;
    exports.disableContextMenu = disableContextMenu;

}));
