(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{Rfgh:function(e,t,i){"use strict";i.d(t,"a",function(){return s});var n=i("fXoL");let s=(()=>{class e{constructor(e){this.template=e}getType(){return this.name}}return e.\u0275fac=function(t){return new(t||e)(n.Nb(n.K))},e.\u0275dir=n.Ib({type:e,selectors:[["","appTemplate",""]],inputs:{type:"type",name:["appTemplate","name"]}}),e})()},k5B0:function(e,t,i){"use strict";i.d(t,"a",function(){return ie});var n=i("R0Ic"),s=i("fXoL"),l=i("3Pt+");let o=(()=>{class e{static hasClass(e,t){return e.classList?e.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(e.className)}static findSingle(e,t){return e?e.querySelector(t):null}static relativePosition(e,t){const i=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),n=t.offsetHeight,s=t.getBoundingClientRect(),l=this.getViewport();let o,a;s.top+n+i.height>l.height?(o=-1*i.height,e.style.transformOrigin="bottom",s.top+o<0&&(o=-1*s.top)):(o=n,e.style.transformOrigin="top"),a=i.width>l.width?-1*s.left:s.left+i.width>l.width?-1*(s.left+i.width-l.width):0,e.style.top=o+"px",e.style.left=a+"px"}static absolutePosition(e,t){const i=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),n=i.height,s=i.width,l=t.offsetHeight,o=t.offsetWidth,a=t.getBoundingClientRect(),r=this.getWindowScrollTop(),c=this.getWindowScrollLeft(),p=this.getViewport();let h,d;a.top+l+n>p.height?(h=a.top+r-n,e.style.transformOrigin="bottom",h<0&&(h=r)):(h=l+a.top+r,e.style.transformOrigin="top"),d=a.left+s>p.width?Math.max(0,a.left+c+o-s):a.left+c,e.style.top=h+"px",e.style.left=d+"px"}static getParents(e,t=[]){return null===e.parentNode?t:this.getParents(e.parentNode,t.concat([e.parentNode]))}static getScrollableParents(e){const t=[];if(e){const i=this.getParents(e),n=/(auto|scroll)/,s=e=>{const t=window.getComputedStyle(e,null);return n.test(t.getPropertyValue("overflow"))||n.test(t.getPropertyValue("overflowX"))||n.test(t.getPropertyValue("overflowY"))};for(const e of i){const i=1===e.nodeType&&e.dataset.scrollselectors;if(i){const n=i.split(",");for(const i of n){const n=this.findSingle(e,i);n&&s(n)&&t.push(n)}}9!==e.nodeType&&s(e)&&t.push(e)}}return t}static getHiddenElementDimensions(e){const t={};return e.style.visibility="hidden",e.style.display="block",t.width=e.offsetWidth,t.height=e.offsetHeight,e.style.display="none",e.style.visibility="visible",t}static scrollInView(e,t){const i=getComputedStyle(e).getPropertyValue("borderTopWidth"),n=i?parseFloat(i):0,s=getComputedStyle(e).getPropertyValue("paddingTop"),l=s?parseFloat(s):0,o=e.getBoundingClientRect(),a=t.getBoundingClientRect().top+document.body.scrollTop-(o.top+document.body.scrollTop)-n-l,r=e.scrollTop,c=e.clientHeight,p=this.getOuterHeight(t);a<0?e.scrollTop=r+a:a+p>c&&(e.scrollTop=r+a-c+p)}static getWindowScrollTop(){const e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)}static getWindowScrollLeft(){const e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}static getOuterHeight(e,t){let i=e.offsetHeight;if(t){const t=getComputedStyle(e);i+=parseFloat(t.marginTop)+parseFloat(t.marginBottom)}return i}static getWidth(e){let t=e.offsetWidth;const i=getComputedStyle(e);return t-=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight)+parseFloat(i.borderLeftWidth)+parseFloat(i.borderRightWidth),t}static getViewport(){const e=window,t=document,i=t.documentElement,n=t.getElementsByTagName("body")[0];return{width:e.innerWidth||i.clientWidth||n.clientWidth,height:e.innerHeight||i.clientHeight||n.clientHeight}}static isAndroid(){return/(android)/i.test(navigator.userAgent)}static appendChild(e,t){if(this.isElement(t))t.appendChild(e);else{if(!t.el||!t.el.nativeElement)throw new Error("Cannot append "+t+" to "+e);t.el.nativeElement.appendChild(e)}}static isElement(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName}}return e.zindex=1e3,e})();class a{constructor(e,t=(()=>{})){this.element=e,this.listener=t}bindScrollListener(){this.scrollableParents=o.getScrollableParents(this.element);for(const e of this.scrollableParents)e.addEventListener("scroll",this.listener)}unbindScrollListener(){if(this.scrollableParents)for(const e of this.scrollableParents)e.removeEventListener("scroll",this.listener)}destroy(){this.unbindScrollListener(),this.element=null,this.listener=null,this.scrollableParents=null}}var r=i("Rfgh");class c{static equals(e,t,i){return i?this.resolveFieldData(e,i)===this.resolveFieldData(t,i):this.equalsByValue(e,t)}static equalsByValue(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){const i=Array.isArray(e),n=Array.isArray(t);let s,l,o;if(i&&n){if(l=e.length,l!==t.length)return!1;for(s=l;0!=s--;)if(!this.equalsByValue(e[s],t[s]))return!1;return!0}if(i!==n)return!1;const a=e instanceof Date,r=t instanceof Date;if(a!==r)return!1;if(a&&r)return e.getTime()===t.getTime();const c=e instanceof RegExp,p=t instanceof RegExp;if(c!==p)return!1;if(c&&p)return e.toString()===t.toString();const h=Object.keys(e);if(l=h.length,l!==Object.keys(t).length)return!1;for(s=l;0!=s--;)if(!Object.prototype.hasOwnProperty.call(t,h[s]))return!1;for(s=l;0!=s--;)if(o=h[s],!this.equalsByValue(e[o],t[o]))return!1;return!0}return e!=e&&t!=t}static resolveFieldData(e,t){if(e&&t){if(this.isFunction(t))return t(e);if(-1===t.indexOf("."))return e[t];{const i=t.split(".");let n=e;for(let e=0,t=i.length;e<t;++e){if(null===n)return null;n=n[i[e]]}return n}}return null}static isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)}static removeAccents(e){return e&&e.search(/[\xC0-\xFF]/g)>-1&&(e=e.replace(/[\xC0-\xC5]/g,"A").replace(/[\xC6]/g,"AE").replace(/[\xC7]/g,"C").replace(/[\xC8-\xCB]/g,"E").replace(/[\xCC-\xCF]/g,"I").replace(/[\xD0]/g,"D").replace(/[\xD1]/g,"N").replace(/[\xD2-\xD6\xD8]/g,"O").replace(/[\xD9-\xDC]/g,"U").replace(/[\xDD]/g,"Y").replace(/[\xDE]/g,"P").replace(/[\xE0-\xE5]/g,"a").replace(/[\xE6]/g,"ae").replace(/[\xE7]/g,"c").replace(/[\xE8-\xEB]/g,"e").replace(/[\xEC-\xEF]/g,"i").replace(/[\xF1]/g,"n").replace(/[\xF2-\xF6\xF8]/g,"o").replace(/[\xF9-\xFC]/g,"u").replace(/[\xFE]/g,"p").replace(/[\xFD\xFF]/g,"y")),e}}let p=(()=>{class e{constructor(){this.filters={startsWith:(e,t,i)=>{if(null==t||""===t.trim())return!0;if(null==e)return!1;const n=c.removeAccents(t.toString()).toLocaleLowerCase(i);return c.removeAccents(e.toString()).toLocaleLowerCase(i).slice(0,n.length)===n},contains:(e,t,i)=>{if(null==t||"string"==typeof t&&""===t.trim())return!0;if(null==e)return!1;const n=c.removeAccents(t.toString()).toLocaleLowerCase(i);return-1!==c.removeAccents(e.toString()).toLocaleLowerCase(i).indexOf(n)},notContains:(e,t,i)=>{if(null==t||"string"==typeof t&&""===t.trim())return!0;if(null==e)return!1;const n=c.removeAccents(t.toString()).toLocaleLowerCase(i);return-1===c.removeAccents(e.toString()).toLocaleLowerCase(i).indexOf(n)},endsWith:(e,t,i)=>{if(null==t||""===t.trim())return!0;if(null==e)return!1;const n=c.removeAccents(t.toString()).toLocaleLowerCase(i),s=c.removeAccents(e.toString()).toLocaleLowerCase(i);return-1!==s.indexOf(n,s.length-n.length)},equals:(e,t,i)=>null==t||"string"==typeof t&&""===t.trim()||null!=e&&(e.getTime&&t.getTime?e.getTime()===t.getTime():c.removeAccents(e.toString()).toLocaleLowerCase(i)===c.removeAccents(t.toString()).toLocaleLowerCase(i)),notEquals:(e,t,i)=>!(null==t||"string"==typeof t&&""===t.trim()||null!=e&&(e.getTime&&t.getTime?e.getTime()===t.getTime():c.removeAccents(e.toString()).toLocaleLowerCase(i)===c.removeAccents(t.toString()).toLocaleLowerCase(i))),in:(e,t)=>{if(null==t||0===t.length)return!0;for(const i of t)if(c.equals(e,i))return!0;return!1},between:(e,t)=>null==t||null==t[0]||null==t[1]||null!=e&&(e.getTime?t[0].getTime()<=e.getTime()&&e.getTime()<=t[1].getTime():t[0]<=e&&e<=t[1]),lt:(e,t,i)=>null==t||null!=e&&(e.getTime&&t.getTime?e.getTime()<t.getTime():e<t),lte:(e,t,i)=>null==t||null!=e&&(e.getTime&&t.getTime?e.getTime()<=t.getTime():e<=t),gt:(e,t,i)=>null==t||null!=e&&(e.getTime&&t.getTime?e.getTime()>t.getTime():e>t),gte:(e,t,i)=>null==t||null!=e&&(e.getTime&&t.getTime?e.getTime()>=t.getTime():e>=t),is:(e,t,i)=>this.filters.equals(e,t,i),isNot:(e,t,i)=>this.filters.notEquals(e,t,i),before:(e,t,i)=>this.filters.lt(e,t,i),after:(e,t,i)=>this.filters.gt(e,t,i),dateIs:(e,t)=>null==t||null!=e&&e.toDateString()===t.toDateString(),dateIsNot:(e,t)=>null==t||null!=e&&e.toDateString()!==t.toDateString(),dateBefore:(e,t)=>null==t||null!=e&&e.getTime()<t.getTime(),dateAfter:(e,t)=>null==t||null!=e&&e.getTime()>t.getTime()}}filter(e,t,i,n,s){const l=[];if(e)for(const o of e)for(const e of t){const t=c.resolveFieldData(o,e);if(this.filters[n](t,i,s)){l.push(o);break}}return l}register(e,t){this.filters[e]=t}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=s.Jb({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var h=i("3Yxx"),d=i("ofXK");function u(e,t){if(1&e&&(s.Tb(0,"span",3),s.Bc(1),s.Sb()),2&e){const e=s.cc();s.Ab(1),s.Cc(e.label||"empty")}}function g(e,t){1&e&&s.Pb(0)}const f=function(e){return{height:e}},m=function(e,t){return{"amw-dropdown-item":!0,"amw-highlight":e,"amw-disabled":t}},b=function(e){return{$implicit:e}};let y=(()=>{class e{constructor(){this.clickEvent=new s.n}onOptionClick(e){this.clickEvent.emit({originalEvent:e,option:this.option})}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=s.Hb({type:e,selectors:[["app-dropdownitem"]],inputs:{option:"option",selected:"selected",label:"label",disabled:"disabled",visible:"visible",itemSize:"itemSize",template:"template"},outputs:{clickEvent:"clickEvent"},decls:3,vars:14,consts:[["role","option",3,"ngStyle","ngClass","click"],["class","mz-dropdown__text",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"mz-dropdown__text"]],template:function(e,t){1&e&&(s.Tb(0,"li",0),s.ac("click",function(e){return t.onOptionClick(e)}),s.zc(1,u,2,1,"span",1),s.zc(2,g,1,0,"ng-container",2),s.Sb()),2&e&&(s.gc("ngStyle",s.lc(7,f,t.itemSize+"px"))("ngClass",s.mc(9,m,t.selected,t.disabled)),s.Bb("aria-label",t.label)("aria-selected",t.selected),s.Ab(1),s.gc("ngIf",!t.template),s.Ab(1),s.gc("ngTemplateOutlet",t.template)("ngTemplateOutletContext",s.lc(12,b,t.option)))},directives:[d.m,d.j,d.l,d.n],encapsulation:2}),e})();const v=["container"],w=["filter"],T=["in"],O=["editableInput"];function C(e,t){if(1&e&&(s.Rb(0),s.Bc(1),s.Qb()),2&e){const e=s.cc(2);s.Ab(1),s.Cc(e.label||"empty")}}function x(e,t){1&e&&s.Pb(0)}const L=function(e){return{"amw-dropdown-label amw-inputtext":!0,"amw-dropdown-label-empty":e}},D=function(e){return{$implicit:e}};function I(e,t){if(1&e&&(s.Tb(0,"span",11),s.zc(1,C,2,1,"ng-container",12),s.zc(2,x,1,0,"ng-container",13),s.Sb()),2&e){const e=s.cc();s.gc("ngClass",s.lc(4,L,null==e.label||0===e.label.length)),s.Ab(1),s.gc("ngIf",!e.selectedItemTemplate),s.Ab(1),s.gc("ngTemplateOutlet",e.selectedItemTemplate)("ngTemplateOutletContext",s.lc(6,D,e.selectedOption))}}const S=function(e){return{"amw-dropdown-label amw-inputtext amw-placeholder":!0,"amw-dropdown-label-empty":e}};function E(e,t){if(1&e&&(s.Tb(0,"span",11),s.Bc(1),s.Sb()),2&e){const e=s.cc();s.gc("ngClass",s.lc(2,S,null==e.placeholder||0===e.placeholder.length)),s.Ab(1),s.Cc(e.placeholder||"empty")}}function V(e,t){if(1&e){const e=s.Ub();s.Tb(0,"input",14,15),s.ac("click",function(){return s.tc(e),s.cc().onEditableInputClick()})("input",function(t){return s.tc(e),s.cc().onEditableInputChange(t)})("focus",function(t){return s.tc(e),s.cc().onEditableInputFocus(t)})("blur",function(t){return s.tc(e),s.cc().onInputBlur(t)}),s.Sb()}if(2&e){const e=s.cc();s.gc("disabled",e.disabled),s.Bb("maxlength",e.maxlength)("placeholder",e.placeholder)("aria-expanded",e.overlayVisible)}}function k(e,t){if(1&e){const e=s.Ub();s.Tb(0,"i",16),s.ac("click",function(t){return s.tc(e),s.cc().clear(t)}),s.Sb()}}function F(e,t){1&e&&s.Pb(0)}function A(e,t){if(1&e){const e=s.Ub();s.Tb(0,"div",24),s.Tb(1,"div",25),s.ac("click",function(e){return e.stopPropagation()}),s.Tb(2,"input",26,27),s.ac("keydown.enter",function(e){return e.preventDefault()})("keydown",function(t){return s.tc(e),s.cc(2).onKeydown(t,!1)})("input",function(t){return s.tc(e),s.cc(2).onFilterInputChange(t)}),s.Sb(),s.Ob(4,"span",28),s.Sb(),s.Sb()}if(2&e){const e=s.cc(2);s.Ab(2),s.gc("value",e.filterValue||""),s.Bb("placeholder",e.filterPlaceholder)("aria-label",e.ariaFilterLabel)}}function z(e,t){if(1&e&&(s.Tb(0,"span"),s.Bc(1),s.Sb()),2&e){const e=s.cc().$implicit,t=s.cc(3);s.Ab(1),s.Cc(t.getOptionGroupLabel(e)||"empty")}}function H(e,t){1&e&&s.Pb(0)}function P(e,t){1&e&&s.Pb(0)}const M=function(e,t){return{$implicit:e,selectedOption:t}};function B(e,t){if(1&e&&(s.Tb(0,"li",30),s.zc(1,z,2,1,"span",12),s.zc(2,H,1,0,"ng-container",13),s.Sb(),s.zc(3,P,1,0,"ng-container",13)),2&e){const e=t.$implicit;s.cc(2);const i=s.rc(8),n=s.cc();s.Ab(1),s.gc("ngIf",!n.groupTemplate),s.Ab(1),s.gc("ngTemplateOutlet",n.groupTemplate)("ngTemplateOutletContext",s.lc(5,D,e)),s.Ab(1),s.gc("ngTemplateOutlet",i)("ngTemplateOutletContext",s.mc(7,M,n.getOptionGroupChildren(e),n.selectedOption))}}function G(e,t){if(1&e&&(s.Rb(0),s.zc(1,B,4,10,"ng-template",29),s.Qb()),2&e){const e=s.cc(2);s.Ab(1),s.gc("ngForOf",e.optionsToDisplay)}}function W(e,t){1&e&&s.Pb(0)}function R(e,t){if(1&e&&(s.Rb(0),s.zc(1,W,1,0,"ng-container",13),s.Qb()),2&e){s.cc();const e=s.rc(8),t=s.cc();s.Ab(1),s.gc("ngTemplateOutlet",e)("ngTemplateOutletContext",s.mc(2,M,t.optionsToDisplay,t.selectedOption))}}function N(e,t){if(1&e){const e=s.Ub();s.Tb(0,"app-dropdownitem",31),s.ac("clickEvent",function(t){return s.tc(e),s.cc(3).onItemClick(t)}),s.Sb()}if(2&e){const e=t.$implicit,i=s.cc().selectedOption,n=s.cc(2);s.gc("option",e)("selected",i==e)("label",n.getOptionLabel(e))("disabled",n.isOptionDisabled(e))("template",n.itemTemplate)}}function j(e,t){1&e&&s.zc(0,N,1,5,"ng-template",29),2&e&&s.gc("ngForOf",t.$implicit)}function q(e,t){if(1&e&&(s.Rb(0),s.Bc(1),s.Qb()),2&e){const e=s.cc(3);s.Ab(1),s.Dc(" ",e.emptyFilterMessageLabel," ")}}function U(e,t){1&e&&s.Pb(0)}function K(e,t){if(1&e&&(s.Tb(0,"li",32),s.zc(1,q,2,1,"ng-container",12),s.zc(2,U,1,0,"ng-container",18),s.Sb()),2&e){const e=s.cc(2);s.Ab(1),s.gc("ngIf",!e.emptyFilterTemplate&&!e.emptyTemplate),s.Ab(1),s.gc("ngTemplateOutlet",e.emptyFilterTemplate||e.emptyTemplate)}}function Z(e,t){if(1&e&&(s.Rb(0),s.Bc(1),s.Qb()),2&e){const e=s.cc(3);s.Ab(1),s.Dc(" ",e.emptyMessageLabel," ")}}function $(e,t){1&e&&s.Pb(0)}function Q(e,t){if(1&e&&(s.Tb(0,"li",32),s.zc(1,Z,2,1,"ng-container",12),s.zc(2,$,1,0,"ng-container",18),s.Sb()),2&e){const e=s.cc(2);s.Ab(1),s.gc("ngIf",!e.emptyTemplate),s.Ab(1),s.gc("ngTemplateOutlet",e.emptyTemplate)}}function X(e,t){1&e&&s.Pb(0)}const Y=function(e,t){return{showTransitionParams:e,hideTransitionParams:t}},_=function(e){return{value:"visible",params:e}};function J(e,t){if(1&e){const e=s.Ub();s.Tb(0,"div",17),s.ac("@overlayAnimation.start",function(t){return s.tc(e),s.cc().onOverlayAnimationStart(t)}),s.zc(1,F,1,0,"ng-container",18),s.zc(2,A,5,3,"div",19),s.Tb(3,"div",20),s.Tb(4,"ul",21),s.zc(5,G,2,1,"ng-container",12),s.zc(6,R,2,5,"ng-container",12),s.zc(7,j,1,1,"ng-template",null,22,s.Ac),s.zc(9,K,3,2,"li",23),s.zc(10,Q,3,2,"li",23),s.Sb(),s.Sb(),s.zc(11,X,1,0,"ng-container",18),s.Sb()}if(2&e){const e=s.cc();s.Db(e.panelStyleClass),s.gc("ngClass","amw-dropdown-panel amw-component")("@overlayAnimation",s.lc(17,_,s.mc(14,Y,e.showTransitionOptions,e.hideTransitionOptions)))("ngStyle",e.panelStyle),s.Ab(1),s.gc("ngTemplateOutlet",e.headerTemplate),s.Ab(1),s.gc("ngIf",e.filter),s.Ab(1),s.yc("max-height",e.scrollHeight||"auto"),s.Ab(2),s.gc("ngIf",e.group),s.Ab(1),s.gc("ngIf",!e.group),s.Ab(3),s.gc("ngIf",e.filterValue&&e.isEmpty()),s.Ab(1),s.gc("ngIf",!e.filterValue&&e.isEmpty()),s.Ab(1),s.gc("ngTemplateOutlet",e.footerTemplate)}}const ee=function(e,t,i,n){return{"amw-dropdown amw-component":!0,"amw-disabled":e,"amw-dropdown-open":t,"amw-focus":i,"amw-dropdown-clearable":n}},te={provide:l.h,useExisting:Object(s.T)(()=>ie),multi:!0};let ie=(()=>{class e{constructor(e,t,i,n,l,o){this.el=e,this.renderer=t,this.cd=i,this.zone=n,this.filterService=l,this.uiHelperService=o,this.scrollHeight="200px",this.resetFilterOnHide=!1,this.dropdownIcon="pi pi-chevron-down",this.optionGroupChildren="items",this.autoDisplayFirst=!0,this.emptyFilterMessage="",this.emptyMessage="",this.autoZIndex=!0,this.baseZIndex=0,this.showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)",this.hideTransitionOptions=".1s linear",this.filterMatchMode="contains",this.autofocusFilter=!0,this.changeEvent=new s.n,this.filterEvent=new s.n,this.focusEvent=new s.n,this.blurEvent=new s.n,this.clickEvent=new s.n,this.showEvent=new s.n,this.hideEvent=new s.n,this.viewPortOffsetTop=0,this.translationKey="COMMON",this.onModelChange=e=>{},this.onModelTouched=()=>{}}get disabled(){return this.isDisabled}set disabled(e){e&&(this.focused=!1,this.overlayVisible&&this.hide()),this.isDisabled=e,this.cd.destroyed||this.cd.detectChanges()}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":this.itemTemplate=e.template;break;case"selectedItem":this.selectedItemTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"emptyfilter":this.emptyFilterTemplate=e.template;break;case"empty":this.emptyTemplate=e.template;break;case"group":this.groupTemplate=e.template;break;default:this.itemTemplate=e.template}})}ngOnInit(){this.optionsToDisplay=this.options,this.updateSelectedOption(null)}get options(){return this.optionsList}set options(e){this.optionsList=e,this.optionsToDisplay=this.optionsList,this.updateSelectedOption(this.value),this.optionsChanged=!0,this.filteredValue&&this.filteredValue.length&&this.activateFilter()}get filterValue(){return this.filteredValue}set filterValue(e){this.filteredValue=e,this.activateFilter()}ngAfterViewInit(){this.editable&&this.updateEditableLabel()}get label(){return this.selectedOption?this.getOptionLabel(this.selectedOption):null}get emptyMessageLabel(){return this.emptyMessage||this.uiHelperService.getTranslation(this.translationKey,"emptyMessage")}get emptyFilterMessageLabel(){return this.emptyFilterMessage||this.uiHelperService.getTranslation(this.translationKey,"emptyFilterMessage")}updateEditableLabel(){this.editableInputViewChild&&this.editableInputViewChild.nativeElement&&(this.editableInputViewChild.nativeElement.value=this.selectedOption?this.getOptionLabel(this.selectedOption):this.value||"")}getOptionLabel(e){return this.optionLabel?c.resolveFieldData(e,this.optionLabel):void 0!==e.label?e.label:e}getOptionValue(e){return this.optionValue?c.resolveFieldData(e,this.optionValue):this.optionLabel||void 0===e.value?e:e.value}isOptionDisabled(e){return this.optionDisabled?c.resolveFieldData(e,this.optionDisabled):void 0!==e.disabled&&e.disabled}getOptionGroupLabel(e){return this.optionGroupLabel?c.resolveFieldData(e,this.optionGroupLabel):void 0!==e.label?e.label:e}getOptionGroupChildren(e){return this.optionGroupChildren?c.resolveFieldData(e,this.optionGroupChildren):e.items}onItemClick(e){const t=e.option;this.isOptionDisabled(t)||(this.selectItem(e,t),this.accessibleViewChild.nativeElement.focus()),setTimeout(()=>{this.hide()},150)}selectItem(e,t){this.selectedOption!==t&&(this.selectedOption=t,this.value=this.getOptionValue(t),this.onModelChange(this.value),this.updateEditableLabel(),this.changeEvent.emit({originalEvent:e.originalEvent,value:this.value}))}ngAfterViewChecked(){this.optionsChanged&&this.overlayVisible&&(this.optionsChanged=!1,this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.alignOverlay()},1)})),this.selectedOptionUpdated&&this.itemsWrapper&&(o.findSingle(this.overlay,"li.p-highlight")&&o.scrollInView(this.itemsWrapper,o.findSingle(this.overlay,"li.p-highlight")),this.selectedOptionUpdated=!1)}writeValue(e){this.filter&&this.resetFilter(),this.value=e,this.updateSelectedOption(e),this.updateEditableLabel(),this.cd.markForCheck()}resetFilter(){this.filteredValue=null,this.filterViewChild&&this.filterViewChild.nativeElement&&(this.filterViewChild.nativeElement.value=""),this.optionsToDisplay=this.options}updateSelectedOption(e){this.selectedOption=this.findOption(e,this.optionsToDisplay),this.autoDisplayFirst&&!this.placeholder&&!this.selectedOption&&this.optionsToDisplay&&this.optionsToDisplay.length&&!this.editable&&(this.selectedOption=this.optionsToDisplay[0]),this.selectedOptionUpdated=!0}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}onMouseclick(e){this.disabled||this.readonly||this.isInputClick(e)||(this.clickEvent.emit(e),this.accessibleViewChild.nativeElement.focus(),this.overlayVisible?this.hide():this.show(),this.cd.detectChanges())}isInputClick(e){return o.hasClass(e.target,"p-dropdown-clear-icon")||e.target.isSameNode(this.accessibleViewChild.nativeElement)||this.editableInputViewChild&&e.target.isSameNode(this.editableInputViewChild.nativeElement)}isOutsideClicked(e){return!(this.el.nativeElement.isSameNode(e.target)||this.el.nativeElement.contains(e.target)||this.overlay&&this.overlay.contains(e.target))}isEmpty(){return!this.optionsToDisplay||this.optionsToDisplay&&0===this.optionsToDisplay.length}onEditableInputClick(){this.bindDocumentClickListener()}onEditableInputFocus(e){this.focused=!0,this.hide(),this.focusEvent.emit(e)}onEditableInputChange(e){this.value=e.target.value,this.updateSelectedOption(this.value),this.onModelChange(this.value),this.changeEvent.emit({originalEvent:e,value:this.value})}show(){this.overlayVisible=!0}onOverlayAnimationStart(e){switch(e.toState){case"visible":if(this.overlay=e.element,this.itemsWrapper=o.findSingle(this.overlay,".p-dropdown-items-wrapper"),this.appendOverlay(),this.autoZIndex&&(this.overlay.style.zIndex=String(this.baseZIndex+ ++o.zindex)),this.alignOverlay(),this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindScrollListener(),this.options&&this.options.length){const e=o.findSingle(this.itemsWrapper,".p-dropdown-item.p-highlight");e&&o.scrollInView(this.itemsWrapper,e)}this.filterViewChild&&this.filterViewChild.nativeElement&&(this.preventModelTouched=!0),this.showEvent.emit(e);break;case"void":this.onOverlayHide(),this.hideEvent.emit(e)}}scrollToSelectedVirtualScrollElement(){this.virtualAutoScrolled=!0}updateVirtualScrollSelectedIndex(e){this.selectedOption&&this.optionsToDisplay&&this.optionsToDisplay.length&&(e&&(this.viewPortOffsetTop=0),this.virtualScrollSelectedIndex=this.findOptionIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay))}appendOverlay(){this.appendTo&&("body"===this.appendTo?document.body.appendChild(this.overlay):o.appendChild(this.overlay,this.appendTo),this.overlay.style.minWidth||(this.overlay.style.minWidth=o.getWidth(this.containerViewChild.nativeElement)+"px"))}restoreOverlayAppend(){this.overlay&&this.appendTo&&this.el.nativeElement.appendChild(this.overlay)}hide(){this.overlayVisible=!1,this.filter&&this.resetFilterOnHide&&this.resetFilter(),this.cd.markForCheck()}alignOverlay(){this.overlay&&(this.appendTo?o.absolutePosition(this.overlay,this.containerViewChild.nativeElement):o.relativePosition(this.overlay,this.containerViewChild.nativeElement))}onInputFocus(e){this.focused=!0,this.focusEvent.emit(e)}onInputBlur(e){this.focused=!1,this.blurEvent.emit(e),this.preventModelTouched||this.onModelTouched(),this.preventModelTouched=!1}findPrevEnabledOption(e){let t;if(this.optionsToDisplay&&this.optionsToDisplay.length){for(let i=e-1;0<=i;i--){const e=this.optionsToDisplay[i];if(!e.disabled){t=e;break}}if(!t)for(let i=this.optionsToDisplay.length-1;i>=e;i--){const e=this.optionsToDisplay[i];if(!this.isOptionDisabled(e)){t=e;break}}}return t}findNextEnabledOption(e){let t;if(this.optionsToDisplay&&this.optionsToDisplay.length){for(let i=e+1;e<this.optionsToDisplay.length-1;i++){const e=this.optionsToDisplay[i];if(!this.isOptionDisabled(e)){t=e;break}}if(!t)for(let i=0;i<e;i++){const e=this.optionsToDisplay[i];if(!this.isOptionDisabled(e)){t=e;break}}}return t}onKeydown(e,t){if(!this.readonly&&this.optionsToDisplay&&null!==this.optionsToDisplay.length)switch(e.which){case 40:if(!this.overlayVisible&&e.altKey)this.show();else if(this.group){const t=this.selectedOption?this.findOptionGroupIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1;if(-1!==t){const i=t.itemIndex+1;i<this.getOptionGroupChildren(this.optionsToDisplay[t.groupIndex]).length?(this.selectItem(e,this.getOptionGroupChildren(this.optionsToDisplay[t.groupIndex])[i]),this.selectedOptionUpdated=!0):this.optionsToDisplay[t.groupIndex+1]&&(this.selectItem(e,this.getOptionGroupChildren(this.optionsToDisplay[t.groupIndex+1])[0]),this.selectedOptionUpdated=!0)}else this.selectItem(e,this.getOptionGroupChildren(this.optionsToDisplay[0])[0])}else{const t=this.selectedOption?this.findOptionIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1,i=this.findNextEnabledOption(t);i&&(this.selectItem(e,i),this.selectedOptionUpdated=!0)}e.preventDefault();break;case 38:if(this.group){const t=this.selectedOption?this.findOptionGroupIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1;if(-1!==t){const i=t.itemIndex-1;if(i>=0)this.selectItem(e,this.getOptionGroupChildren(this.optionsToDisplay[t.groupIndex])[i]),this.selectedOptionUpdated=!0;else if(i<0){const i=this.optionsToDisplay[t.groupIndex-1];i&&(this.selectItem(e,this.getOptionGroupChildren(i)[this.getOptionGroupChildren(i).length-1]),this.selectedOptionUpdated=!0)}}}else{const t=this.selectedOption?this.findOptionIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1,i=this.findPrevEnabledOption(t);i&&(this.selectItem(e,i),this.selectedOptionUpdated=!0)}e.preventDefault();break;case 32:case 32:this.overlayVisible||(this.show(),e.preventDefault());break;case 13:(!this.filter||this.optionsToDisplay&&this.optionsToDisplay.length>0)&&this.hide(),e.preventDefault();break;case 27:case 9:this.hide();break;default:t&&!e.metaKey&&this.search(e)}}search(e){this.searchTimeout&&clearTimeout(this.searchTimeout);const t=e.key;let i;if(this.previousSearchChar=this.currentSearchChar,this.currentSearchChar=t,this.searchValue=this.previousSearchChar===this.currentSearchChar?this.currentSearchChar:this.searchValue?this.searchValue+t:t,this.group){const e=this.selectedOption?this.findOptionGroupIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):{groupIndex:0,itemIndex:0};i=this.searchOptionWithinGroup(e)}else{let e=this.selectedOption?this.findOptionIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1;i=this.searchOption(++e)}i&&!this.isOptionDisabled(i)&&(this.selectItem(e,i),this.selectedOptionUpdated=!0),this.searchTimeout=setTimeout(()=>{this.searchValue=null},250)}searchOption(e){let t;return this.searchValue&&(t=this.searchOptionInRange(e,this.optionsToDisplay.length),t||(t=this.searchOptionInRange(0,e))),t}searchOptionInRange(e,t){for(let i=e;i<t;i++){const e=this.optionsToDisplay[i];if(this.getOptionLabel(e).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))&&!this.isOptionDisabled(e))return e}return null}searchOptionWithinGroup(e){if(this.searchValue){for(let t=e.groupIndex;t<this.optionsToDisplay.length;t++)for(let i=e.groupIndex===t?e.itemIndex+1:0;i<this.getOptionGroupChildren(this.optionsToDisplay[t]).length;i++){const e=this.getOptionGroupChildren(this.optionsToDisplay[t])[i];if(this.getOptionLabel(e).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))&&!this.isOptionDisabled(e))return e}for(let t=0;t<=e.groupIndex;t++)for(let i=0;i<(e.groupIndex===t?e.itemIndex:this.getOptionGroupChildren(this.optionsToDisplay[t]).length);i++){const e=this.getOptionGroupChildren(this.optionsToDisplay[t])[i];if(this.getOptionLabel(e).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))&&!this.isOptionDisabled(e))return e}}return null}findOptionIndex(e,t){let i=-1;if(t)for(let n=0;n<t.length;n++)if(null==e&&null==this.getOptionValue(t[n])||c.equals(e,this.getOptionValue(t[n]),this.dataKey)){i=n;break}return i}findOptionGroupIndex(e,t){let i,n;if(t)for(let s=0;s<t.length&&(i=s,n=this.findOptionIndex(e,this.getOptionGroupChildren(t[s])),-1===n);s++);return-1!==n?{groupIndex:i,itemIndex:n}:-1}findOption(e,t,i){if(this.group&&!i){let i;if(t&&t.length)for(const n of t)if(i=this.findOption(e,this.getOptionGroupChildren(n),!0),i)break;return i}{const i=this.findOptionIndex(e,t);return-1!==i?t[i]:null}}onFilterInputChange(e){const t=e.target.value;t&&t.length?(this.filteredValue=t,this.activateFilter()):(this.filteredValue=null,this.optionsToDisplay=this.options),this.optionsChanged=!0,this.filterEvent.emit({originalEvent:e,filter:this.filteredValue})}activateFilter(){const e=(this.filterBy||this.optionLabel||"label").split(",");if(this.options&&this.options.length){if(this.group){const t=[];for(const i of this.options){const n=this.filterService.filter(this.getOptionGroupChildren(i),e,this.filterValue,this.filterMatchMode,this.filterLocale);n&&n.length&&t.push(Object.assign(Object.assign({},i),{[this.optionGroupChildren]:n}))}this.optionsToDisplay=t}else this.optionsToDisplay=this.filterService.filter(this.options,e,this.filterValue,this.filterMatchMode,this.filterLocale);this.optionsChanged=!0}}applyFocus(){this.editable?o.findSingle(this.el.nativeElement,".p-dropdown-label.p-inputtext").focus():o.findSingle(this.el.nativeElement,"input[readonly]").focus()}focus(){this.applyFocus()}bindDocumentClickListener(){this.documentClickListener||(this.documentClickListener=this.renderer.listen(this.el?this.el.nativeElement.ownerDocument:"document","click",e=>{this.isOutsideClicked(e)&&(this.hide(),this.unbindDocumentClickListener()),this.cd.markForCheck()}))}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){this.documentResizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.documentResizeListener)}unbindDocumentResizeListener(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}onWindowResize(){o.isAndroid()||this.hide()}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new a(this.containerViewChild.nativeElement,e=>{this.overlayVisible&&this.hide()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}clear(e){this.value=null,this.onModelChange(this.value),this.changeEvent.emit({originalEvent:e,value:this.value}),this.updateSelectedOption(this.value),this.updateEditableLabel()}onOverlayHide(){this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.overlay=null,this.itemsWrapper=null,this.onModelTouched()}ngOnDestroy(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.restoreOverlayAppend(),this.onOverlayHide()}}return e.\u0275fac=function(t){return new(t||e)(s.Nb(s.l),s.Nb(s.D),s.Nb(s.h),s.Nb(s.z),s.Nb(p),s.Nb(h.a))},e.\u0275cmp=s.Hb({type:e,selectors:[["app-dropdown"]],contentQueries:function(e,t,i){if(1&e&&s.Gb(i,r.a,!1),2&e){let e;s.qc(e=s.bc())&&(t.templates=e)}},viewQuery:function(e,t){if(1&e&&(s.Hc(v,!0),s.Hc(w,!0),s.Hc(T,!0),s.Hc(O,!0)),2&e){let e;s.qc(e=s.bc())&&(t.containerViewChild=e.first),s.qc(e=s.bc())&&(t.filterViewChild=e.first),s.qc(e=s.bc())&&(t.accessibleViewChild=e.first),s.qc(e=s.bc())&&(t.editableInputViewChild=e.first)}},hostVars:4,hostBindings:function(e,t){2&e&&s.Fb("p-inputwrapper-filled",t.value)("p-inputwrapper-focus",t.focused||t.overlayVisible)},inputs:{scrollHeight:"scrollHeight",filter:"filter",name:"name",style:"style",panelStyle:"panelStyle",styleClass:"styleClass",panelStyleClass:"panelStyleClass",readonly:"readonly",required:"required",editable:"editable",appendTo:"appendTo",tabindex:"tabindex",placeholder:"placeholder",filterPlaceholder:"filterPlaceholder",filterLocale:"filterLocale",inputId:"inputId",selectId:"selectId",dataKey:"dataKey",filterBy:"filterBy",autofocus:"autofocus",resetFilterOnHide:"resetFilterOnHide",dropdownIcon:"dropdownIcon",optionLabel:"optionLabel",optionValue:"optionValue",optionDisabled:"optionDisabled",optionGroupLabel:"optionGroupLabel",optionGroupChildren:"optionGroupChildren",autoDisplayFirst:"autoDisplayFirst",group:"group",showClear:"showClear",emptyFilterMessage:"emptyFilterMessage",emptyMessage:"emptyMessage",itemSize:"itemSize",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",ariaFilterLabel:"ariaFilterLabel",ariaLabelledBy:"ariaLabelledBy",filterMatchMode:"filterMatchMode",maxlength:"maxlength",autofocusFilter:"autofocusFilter",disabled:"disabled",options:"options",filterValue:"filterValue"},outputs:{changeEvent:"changeEvent",filterEvent:"filterEvent",focusEvent:"focusEvent",blurEvent:"blurEvent",clickEvent:"clickEvent",showEvent:"showEvent",hideEvent:"hideEvent"},features:[s.zb([te])],decls:12,vars:21,consts:[[3,"ngClass","ngStyle","click"],["container",""],[1,"amw-hidden-accessible"],["type","text","readonly","","aria-haspopup","listbox","aria-haspopup","listbox",3,"disabled","focus","blur","keydown"],["in",""],[3,"ngClass",4,"ngIf"],["type","text","class","amw-dropdown-label amw-inputtext","aria-haspopup","listbox",3,"disabled","click","input","focus","blur",4,"ngIf"],["class","amw-dropdown-clear-icon pi pi-times",3,"click",4,"ngIf"],["role","button","aria-haspopup","listbox",1,"amw-dropdown-trigger"],[1,"amw-dropdown-trigger-icon",3,"ngClass"],[3,"ngClass","ngStyle","class",4,"ngIf"],[3,"ngClass"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["type","text","aria-haspopup","listbox",1,"amw-dropdown-label","amw-inputtext",3,"disabled","click","input","focus","blur"],["editableInput",""],[1,"amw-dropdown-clear-icon","pi","pi-times",3,"click"],[3,"ngClass","ngStyle"],[4,"ngTemplateOutlet"],["class","amw-dropdown-header",4,"ngIf"],[1,"amw-dropdown-items-wrapper"],["role","listbox",1,"amw-dropdown-items"],["itemslist",""],["class","amw-dropdown-empty-message",4,"ngIf"],[1,"amw-dropdown-header"],[1,"amw-dropdown-filter-container",3,"click"],["type","text","autocomplete","off",1,"amw-dropdown-filter","amw-inputtext","amw-component",3,"value","keydown.enter","keydown","input"],["filter",""],[1,"amw-dropdown-filter-icon","pi","pi-search"],["ngFor","",3,"ngForOf"],[1,"amw-dropdown-item-group"],[3,"option","selected","label","disabled","template","clickEvent"],[1,"amw-dropdown-empty-message"]],template:function(e,t){1&e&&(s.Tb(0,"div",0,1),s.ac("click",function(e){return t.onMouseclick(e)}),s.Tb(2,"div",2),s.Tb(3,"input",3,4),s.ac("focus",function(e){return t.onInputFocus(e)})("blur",function(e){return t.onInputBlur(e)})("keydown",function(e){return t.onKeydown(e,!0)}),s.Sb(),s.Sb(),s.zc(5,I,3,8,"span",5),s.zc(6,E,2,4,"span",5),s.zc(7,V,2,4,"input",6),s.zc(8,k,1,0,"i",7),s.Tb(9,"div",8),s.Ob(10,"span",9),s.Sb(),s.zc(11,J,12,19,"div",10),s.Sb()),2&e&&(s.Db(t.styleClass),s.gc("ngClass",s.nc(16,ee,t.disabled,t.overlayVisible,t.focused,t.showClear&&!t.disabled))("ngStyle",t.style),s.Ab(3),s.gc("disabled",t.disabled),s.Bb("id",t.inputId)("aria-expanded",t.overlayVisible)("aria-labelledby",t.ariaLabelledBy)("tabindex",t.tabindex),s.Ab(2),s.gc("ngIf",!t.editable&&null!=t.label),s.Ab(1),s.gc("ngIf",!t.editable&&null==t.label),s.Ab(1),s.gc("ngIf",t.editable),s.Ab(1),s.gc("ngIf",null!=t.value&&t.showClear&&!t.disabled),s.Ab(1),s.Bb("aria-expanded",t.overlayVisible),s.Ab(1),s.gc("ngClass",t.dropdownIcon),s.Ab(1),s.gc("ngIf",t.overlayVisible))},directives:[d.j,d.m,d.l,d.n,d.k,y],encapsulation:2,data:{animation:[Object(n.j)("overlayAnimation",[Object(n.i)(":enter",[Object(n.h)({opacity:0,transform:"scaleY(0.8)"}),Object(n.e)("{{showTransitionParams}}")]),Object(n.i)(":leave",[Object(n.e)("{{hideTransitionParams}}",Object(n.h)({opacity:0}))])])]},changeDetection:0}),e})()}}]);