import {J,c9 as qn,c as tS,aV as ut,aZ as Dt,nH as ko,nI as Ln,nJ as Dn,cp as Mi,k0 as bi,gQ as Se$1,gP as Ee$1,nK as Ha,hs as xo,gR as Y,c5 as bD,ad as ce,eV as Be$1,eW as Mi$1,gS as Z,by as it,nL as D1,L as w,w as wo,ca as yo,gN as D$,hE as fi,f as QT,dd as kn,cb as Dn$1,hi as Lt,de as Cn,cc as Fn,dV as yn,cw as Ac,gX as Ji,nM as Dl,nN as Mo,hl as D2,hn as ei,nO as Z7,nP as Yn,a0 as ks,a3 as Py,cE as py,a2 as Uu,T as P_,a4 as Sy,kt as fM,ch as My,A as Iw,bN as lM,bu as dy,eU as aM,gU as T$,gY as C$,ce as zy,bv as Vy,bw as y_,bx as v_,gZ as jy,cA as Qi,gF as ay,gG as vc,bk as i_,bm as Bp,bz as f_,bo as $p,cn as Ry,d8 as CM,e5 as Gu,e6 as zu}from'./main-WUGO6e7n.js';function Be(e,l){e&1&&Ry(0);}function Ae(e,l){e&1&&Ry(0);}function Le(e,l){if(e&1){let i=i_();ks(0,"TimesCircleIcon",16),Py("click",function(t){Bp(i);let o=f_(4).index,a=f_();return $p(a.removeItem(t,o))}),Uu();}e&2&&(Sy("styleClass","p-chips-token-icon"),My("data-pc-section","removeTokenIcon")("aria-hidden",true));}function Re(e,l){}function Ne(e,l){e&1&&py(0,Re,0,0,"ng-template");}function Ke(e,l){if(e&1){let i=i_();ks(0,"span",17),Py("click",function(t){Bp(i);let o=f_(4).index,a=f_();return $p(a.removeItem(t,o))}),py(1,Ne,1,0,null,11),Uu();}if(e&2){let i=f_(5);My("data-pc-section","removeTokenIcon")("aria-hidden",true),Iw(),Sy("ngTemplateOutlet",i.removeTokenIconTemplate)("ngTemplateOutletContext",lM(4,De,i.removeItem.bind(i)));}}function Pe(e,l){if(e&1&&(Gu(0),py(1,Le,1,3,"TimesCircleIcon",14)(2,Ke,2,6,"span",15),zu()),e&2){let i=f_(4);Iw(),Sy("ngIf",!i.removeTokenIconTemplate),Iw(),Sy("ngIf",i.removeTokenIconTemplate);}}function Qe(e,l){if(e&1&&py(0,Pe,3,2,"ng-container",9),e&2){let i=f_(3);Sy("ngIf",!i.disabled);}}function je(e,l){if(e&1){let i=i_();ks(0,"p-chip",13),Py("onRemove",function(t){Bp(i);let o=f_().index,a=f_();return $p(a.removeItem(t,o))}),py(1,Ae,1,0,"ng-container",11)(2,Qe,1,1,"ng-template",null,3,CM),Uu();}if(e&2){let i=f_().$implicit,n=f_();Sy("label",n.field?n.resolveFieldData(i,n.field):i)("removeIcon",n.chipIcon),Iw(),Sy("ngTemplateOutlet",n.itemTemplate)("ngTemplateOutletContext",lM(4,ge,i));}}function qe(e,l){if(e&1){let i=i_();ks(0,"li",10,2),Py("click",function(t){let o=Bp(i).$implicit,a=f_();return $p(a.onItemClick(t,o))})("contextmenu",function(t){let o=Bp(i).$implicit,a=f_();return $p(a.onItemContextMenu(t,o))}),py(2,Be,1,0,"ng-container",11)(3,je,4,6,"p-chip",12),Uu();}if(e&2){let i=l.$implicit,n=l.index,t=f_();Sy("ngClass",lM(11,Me,t.focusedIndex===n)),My("id",t.id+"_chips_item_"+n)("ariaLabel",i)("aria-selected",true)("aria-setsize",t.value.length)("aria-posinset",n+1)("data-p-focused",t.focusedIndex===n)("data-pc-section","token"),Iw(2),Sy("ngTemplateOutlet",t.itemTemplate)("ngTemplateOutletContext",lM(13,ge,i)),Iw(),Sy("ngIf",!t.itemTemplate);}}function Ue(e,l){if(e&1){let i=i_();ks(0,"TimesIcon",16),Py("click",function(){Bp(i);let t=f_(2);return $p(t.clear())}),Uu();}e&2&&Sy("styleClass","p-chips-clear-icon");}function ze(e,l){}function Ge(e,l){e&1&&py(0,ze,0,0,"ng-template");}function He(e,l){if(e&1){let i=i_();ks(0,"span",19),Py("click",function(){Bp(i);let t=f_(2);return $p(t.clear())}),py(1,Ge,1,0,null,20),Uu();}if(e&2){let i=f_(2);Iw(),Sy("ngTemplateOutlet",i.clearIconTemplate);}}function We(e,l){if(e&1&&(ks(0,"li"),py(1,Ue,1,1,"TimesIcon",14)(2,He,2,1,"span",18),Uu()),e&2){let i=f_();Iw(),Sy("ngIf",!i.clearIconTemplate),Iw(),Sy("ngIf",i.clearIconTemplate);}}var Se,Ee,$e,Fe,Me,ge,De,Je,Xe,fe,Ye,Ce,ki,Ze=J(()=>{qn();qn();tS();tS();ut();Dt();ko();ko();Ln();Dn();Mi();bi();Se$1();Ee$1();Ha();Ha();xo();Se=["inputtext"],Ee=["container"],$e=(e,l,i,n)=>({"p-inputchips p-component p-input-wrapper":!0,"p-disabled":e,"p-focus":l,"p-inputwrapper-filled":i,"p-inputwrapper-focus":n}),Fe=e=>({"p-chips-clearable":e}),Me=e=>({"p-inputchips-chip-item":!0,"p-focus":e}),ge=e=>({$implicit:e}),De=e=>({removeItem:e});Je=({dt:e})=>`
.p-inputchips {
    display: inline-flex;
}

.p-inputchips-input {
    margin: 0;
    list-style-type: none;
    cursor: text;
    overflow: hidden;
    display: flex;
    position: relative;
    align-items: center;
    flex-wrap: wrap;
    padding: calc(${e("inputchips.padding.y")} / 2) ${e("inputchips.padding.x")};
    gap: calc(${e("inputchips.padding.y")} / 2);
    color: ${e("inputchips.color")};
    background: ${e("inputchips.background")};
    border: 1px solid ${e("inputchips.border.color")};
    border-radius: ${e("inputchips.border.radius")};
    width: 100%;
    transition: background ${e("inputchips.transition.duration")}, color ${e("inputchips.transition.duration")}, border-color ${e("inputchips.transition.duration")}, outline-color ${e("inputchips.transition.duration")}, box-shadow ${e("inputchips.transition.duration")};
    outline-color: transparent;
    box-shadow: ${e("inputchips.shadow")};
}

.p-inputchips:not(.p-disabled):hover .p-inputchips-input {
    border-color: ${e("inputchips.hover.border.color")};
}

.p-inputchips:not(.p-disabled).p-focus .p-inputchips-input {
    border-color: ${e("inputchips.focus.border.color")};
    box-shadow: ${e("inputchips.focus.ring.shadow")};
    outline: ${e("inputchips.focus.ring.width")} ${e("inputchips.focus.ring.style")} ${e("inputchips.focus.ring.color")};
    outline-offset: ${e("inputchips.focus.ring.offset")};
}

.p-inputchips.p-invalid .p-inputchips-input {
    border-color: ${e("inputchips.invalid.border.color")};
}

.p-variant-filled.p-inputchips-input {
    background: ${e("inputchips.filled.background")};
}

.p-inputchips:not(.p-disabled).p-focus .p-variant-filled.p-inputchips-input  {
    background: ${e("inputchips.filled.focus.background")};
}

.p-inputchips.p-disabled .p-inputchips-input {
    opacity: 1;
    background: ${e("inputchips.disabled.background")};
    color: ${e("inputchips.disabled.color")};
}

.p-inputchips-chip.p-chip {
    padding-top: calc(${e("inputchips.padding.y")} / 2);
    padding-bottom: calc(${e("inputchips.padding.y")} / 2);
    border-radius: ${e("inputchips.chip.border.radius")};
    transition: background ${e("inputchips.transition.duration")}, color ${e("inputchips.transition.duration")};
}

.p-inputchips-chip-item.p-focus .p-inputchips-chip {
    background: ${e("inputchips.chip.focus.background")};
    color: ${e("inputchips.chip.focus.color")};
}

.p-inputchips-input:has(.p-inputchips-chip) {
    padding-left: calc(${e("inputchips.padding.y")} / 2);
    padding-right: calc(${e("inputchips.padding.y")} / 2);
}

.p-inputchips-input-item {
    flex: 1 1 auto;
    display: inline-flex;
    padding-top: calc(${e("inputchips.padding.y")} / 2);
    padding-bottom: calc(${e("inputchips.padding.y")} / 2);
}

.p-inputchips-input-item input {
    border: 0 none;
    outline: 0 none;
    background: transparent;
    margin: 0;
    padding: 0;
    box-shadow: none;
    border-radius: 0;
    width: 100%;
    font-family: inherit;
    font-feature-settings: inherit;
    font-size: 1rem;
    color: inherit;
}

.p-inputchips-input-item input::placeholder {
    color: ${e("inputchips.placeholder.color")};
}

/* For PrimeNG */

.p-chips-clear-icon {
    position: absolute;
    top: 50%;
    margin-top: -0.5rem;
    cursor: pointer;
    right: ${e("inputchips.padding.x")};
}
`,Xe={root:({instance:e,props:l})=>["p-inputchips p-component p-inputwrapper",{"p-disabled":l.disabled,"p-invalid":l.invalid,"p-focus":e.focused,"p-inputwrapper-filled":l.modelValue&&l.modelValue.length||e.inputValue&&e.inputValue.length,"p-inputwrapper-focus":e.focused}],input:({props:e,instance:l})=>["p-inputchips-input",{"p-variant-filled":e.variant?e.variant==="filled":l.config.inputStyle==="filled"||l.config.inputVariant==="filled"}],chipItem:({state:e,index:l})=>["p-inputchips-chip-item",{"p-focus":e.focusedIndex===l}],pcChip:"p-inputchips-chip",chipIcon:"p-inputchips-chip-icon",inputItem:"p-inputchips-input-item"},fe=(()=>{class e extends Y{name="inputchips";theme=Je;classes=Xe;static \u0275fac=(()=>{let i;return function(t){return (i||(i=bD(e)))(t||e)}})();static \u0275prov=ce({token:e,factory:e.\u0275fac})}return e})(),Ye={provide:Be$1,useExisting:Mi$1(()=>Ce),multi:!0},Ce=(()=>{class e extends Z{el;cd;config;style;styleClass;disabled;field;placeholder;max;maxLength;ariaLabel;ariaLabelledBy;tabindex;inputId;allowDuplicate=!0;caseSensitiveDuplication=!0;inputStyle;inputStyleClass;chipIcon;addOnTab;addOnBlur;separator;showClear=!1;autofocus;variant="outlined";onAdd=new it;onRemove=new it;onFocus=new it;onBlur=new it;onChipClick=new it;onChipContextMenu=new it;onClear=new it;inputViewChild;containerViewChild;templates;itemTemplate;removeTokenIconTemplate;clearIconTemplate;value;onModelChange=()=>{};onModelTouched=()=>{};valueChanged;id=D1();focused;focusedIndex;filled;_componentStyle=w(fe);get focusedOptionId(){return this.focusedIndex!==null?`${this.id}_chips_item_${this.focusedIndex}`:null}get isMaxedOut(){return this.max&&this.value&&this.max===this.value.length}constructor(i,n,t){super(),this.el=i,this.cd=n,this.config=t,console.log("Deprecated since v18. Use AutoComplete component instead with its typeahead property.");}ngAfterContentInit(){this.templates.forEach(i=>{switch(i.getType()){case "item":this.itemTemplate=i.template;break;case "removetokenicon":this.removeTokenIconTemplate=i.template;break;case "clearicon":this.clearIconTemplate=i.template;break;default:this.itemTemplate=i.template;break}}),this.updateFilledState();}onWrapperClick(){this.inputViewChild?.nativeElement.focus();}onContainerFocus(){this.focused=!0;}onContainerBlur(){this.focusedIndex=-1,this.focused=!1;}onContainerKeyDown(i){switch(i.code){case "ArrowLeft":this.onArrowLeftKeyOn();break;case "ArrowRight":this.onArrowRightKeyOn();break;case "Backspace":this.onBackspaceKeyOn(i);break;case "Space":this.focusedIndex!==null&&this.value&&this.value.length>0&&this.onItemClick(i,this.value[this.focusedIndex]);break;default:break}}onArrowLeftKeyOn(){this.inputViewChild.nativeElement.value.length===0&&this.value&&this.value.length>0&&(this.focusedIndex=this.focusedIndex===null?this.value.length-1:this.focusedIndex-1,this.focusedIndex<0&&(this.focusedIndex=0));}onArrowRightKeyOn(){this.inputViewChild.nativeElement.value.length===0&&this.value&&this.value.length>0&&(this.focusedIndex===this.value.length-1?(this.focusedIndex=null,this.inputViewChild?.nativeElement.focus()):this.focusedIndex++);}onBackspaceKeyOn(i){this.focusedIndex!==null&&this.removeItem(i,this.focusedIndex);}onInput(){this.updateFilledState(),this.focusedIndex=null;}onPaste(i){this.disabled||(this.separator&&((i.clipboardData||this.document.defaultView.clipboardData).getData("Text").split(this.separator).forEach(t=>{this.addItem(i,t,!0);}),this.inputViewChild.nativeElement.value=""),this.updateFilledState());}updateFilledState(){!this.value||this.value.length===0?this.filled=this.inputViewChild&&this.inputViewChild.nativeElement&&this.inputViewChild.nativeElement.value!="":this.filled=!0;}onItemClick(i,n){this.onChipClick.emit({originalEvent:i,value:n});}onItemContextMenu(i,n){this.onChipContextMenu.emit({originalEvent:i,value:n});}writeValue(i){this.value=i,this.updateMaxedOut(),this.updateFilledState(),this.cd.markForCheck();}registerOnChange(i){this.onModelChange=i;}registerOnTouched(i){this.onModelTouched=i;}setDisabledState(i){this.disabled=i,this.cd.markForCheck();}resolveFieldData(i,n){if(i&&n){if(n.indexOf(".")==-1)return i[n];{let a=n.split("."),T=i;for(var t=0,o=a.length;t<o;++t)T=T[a[t]];return T}}else return null}onInputFocus(i){this.focused=!0,this.focusedIndex=null,this.onFocus.emit(i);}onInputBlur(i){this.focused=!1,this.focusedIndex=null,this.addOnBlur&&this.inputViewChild.nativeElement.value&&this.addItem(i,this.inputViewChild.nativeElement.value,!1),this.onModelTouched(),this.onBlur.emit(i);}removeItem(i,n){if(this.disabled)return;let t=this.value[n];this.value=this.value.filter((o,a)=>a!=n),this.focusedIndex=null,this.inputViewChild.nativeElement.focus(),this.onModelChange(this.value),this.onRemove.emit({originalEvent:i,value:t}),this.updateFilledState(),this.updateMaxedOut();}addItem(i,n,t){if(this.value=this.value||[],n&&n.trim().length){let o=this.caseSensitiveDuplication?this.value.includes(n):this.value.some(a=>a.toLowerCase()===n.toLowerCase());(this.allowDuplicate||!o)&&!this.isMaxedOut&&(this.value=[...this.value,n],this.onModelChange(this.value),this.onAdd.emit({originalEvent:i,value:n}));}this.updateFilledState(),this.updateMaxedOut(),this.inputViewChild.nativeElement.value="",t&&i.preventDefault();}clear(){this.value=null,this.updateFilledState(),this.onModelChange(this.value),this.updateMaxedOut(),this.onClear.emit();}onKeyDown(i){let n=i.target.value;switch(i.code){case "Backspace":n.length===0&&this.value&&this.value.length>0&&(this.focusedIndex!==null?this.removeItem(i,this.focusedIndex):this.removeItem(i,this.value.length-1));break;case "Enter":case "NumpadEnter":n&&n.trim().length&&!this.isMaxedOut&&this.addItem(i,n,!0);break;case "Tab":this.addOnTab&&n&&n.trim().length&&!this.isMaxedOut&&(this.addItem(i,n,!0),i.preventDefault());break;case "ArrowLeft":n.length===0&&this.value&&this.value.length>0&&this.containerViewChild?.nativeElement.focus();break;case "ArrowRight":i.stopPropagation();break;default:this.separator&&(this.separator===i.key||i.key.match(this.separator))&&this.addItem(i,n,!0);break}}updateMaxedOut(){this.inputViewChild&&this.inputViewChild.nativeElement&&(this.isMaxedOut?(this.inputViewChild.nativeElement.blur(),this.inputViewChild.nativeElement.disabled=!0):(this.disabled&&this.inputViewChild.nativeElement.blur(),this.inputViewChild.nativeElement.disabled=this.disabled||!1));}static \u0275fac=function(n){return new(n||e)(wo(yo),wo(D$),wo(fi))};static \u0275cmp=QT({type:e,selectors:[["p-chips"]],contentQueries:function(n,t,o){if(n&1&&jy(o,Qi,4),n&2){let a;y_(a=v_())&&(t.templates=a);}},viewQuery:function(n,t){if(n&1&&Vy(Se,5)(Ee,5),n&2){let o;y_(o=v_())&&(t.inputViewChild=o.first),y_(o=v_())&&(t.containerViewChild=o.first);}},hostAttrs:[1,"p-element","p-inputwrapper"],hostVars:6,hostBindings:function(n,t){n&2&&zy("p-inputwrapper-filled",t.filled)("p-inputwrapper-focus",t.focused)("p-chips-clearable",t.showClear);},inputs:{style:"style",styleClass:"styleClass",disabled:[2,"disabled","disabled",T$],field:"field",placeholder:"placeholder",max:[2,"max","max",C$],maxLength:"maxLength",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",tabindex:[2,"tabindex","tabindex",C$],inputId:"inputId",allowDuplicate:[2,"allowDuplicate","allowDuplicate",T$],caseSensitiveDuplication:[2,"caseSensitiveDuplication","caseSensitiveDuplication",T$],inputStyle:"inputStyle",inputStyleClass:"inputStyleClass",chipIcon:"chipIcon",addOnTab:[2,"addOnTab","addOnTab",T$],addOnBlur:[2,"addOnBlur","addOnBlur",T$],separator:"separator",showClear:[2,"showClear","showClear",T$],autofocus:[2,"autofocus","autofocus",T$],variant:"variant"},outputs:{onAdd:"onAdd",onRemove:"onRemove",onFocus:"onFocus",onBlur:"onBlur",onChipClick:"onChipClick",onChipContextMenu:"onChipContextMenu",onClear:"onClear"},features:[aM([Ye,fe]),dy],decls:8,vars:31,consts:[["container",""],["inputtext",""],["token",""],["removeicon",""],[3,"ngClass","ngStyle"],["tabindex","-1","role","listbox",1,"p-inputchips-input",3,"click","focus","blur","keydown"],["role","option",3,"ngClass","click","contextmenu",4,"ngFor","ngForOf"],["role","option",1,"p-inputchips-input-item",3,"ngClass"],["type","text","pAutoFocus","",1,"test",3,"keydown","input","paste","focus","blur","disabled","ngStyle","autofocus"],[4,"ngIf"],["role","option",3,"click","contextmenu","ngClass"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","p-inputchips-chip","removable","",3,"label","removeIcon","onRemove",4,"ngIf"],["removable","",1,"p-inputchips-chip",3,"onRemove","label","removeIcon"],[3,"styleClass","click",4,"ngIf"],["class","p-chips-token-icon",3,"click",4,"ngIf"],[3,"click","styleClass"],[1,"p-chips-token-icon",3,"click"],["class","p-chips-clear-icon",3,"click",4,"ngIf"],[1,"p-chips-clear-icon",3,"click"],[4,"ngTemplateOutlet"]],template:function(n,t){n&1&&(ks(0,"div",4)(1,"ul",5,0),Py("click",function(){return t.onWrapperClick()})("focus",function(){return t.onContainerFocus()})("blur",function(){return t.onContainerBlur()})("keydown",function(a){return t.onContainerKeyDown(a)}),py(3,qe,4,15,"li",6),ks(4,"li",7)(5,"input",8,1),Py("keydown",function(a){return t.onKeyDown(a)})("input",function(){return t.onInput()})("paste",function(a){return t.onPaste(a)})("focus",function(a){return t.onInputFocus(a)})("blur",function(a){return t.onInputBlur(a)}),Uu()(),py(7,We,3,2,"li",9),Uu()()),n&2&&(P_(t.styleClass),Sy("ngClass",fM(24,$e,t.disabled,t.focused,t.value&&t.value.length||(t.inputViewChild==null?null:t.inputViewChild.nativeElement.value)&&(t.inputViewChild==null?null:t.inputViewChild.nativeElement.value.length),t.focused))("ngStyle",t.style),My("data-pc-name","chips")("data-pc-section","root"),Iw(),My("aria-labelledby",t.ariaLabelledBy)("aria-label",t.ariaLabel)("aria-activedescendant",t.focused?t.focusedOptionId:void 0)("aria-orientation","horizontal")("data-pc-section","container"),Iw(2),Sy("ngForOf",t.value),Iw(),Sy("ngClass",lM(29,Fe,t.showClear&&!t.disabled)),My("data-pc-section","inputToken"),Iw(),P_(t.inputStyleClass),Sy("disabled",t.disabled||t.isMaxedOut)("ngStyle",t.inputStyle)("autofocus",t.autofocus),My("id",t.inputId)("maxlength",t.maxLength)("placeholder",t.value&&t.value.length?null:t.placeholder)("tabindex",t.tabindex),Iw(2),Sy("ngIf",t.value!=null&&t.filled&&!t.disabled&&t.showClear));},dependencies:[kn,Dn$1,Lt,Cn,Fn,yn,Ac,Ji,Dl,Mo,D2,ei,Z7,Yn],encapsulation:2})}return e})(),ki=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275mod=ay({type:e});static \u0275inj=vc({imports:[Ce,Ji,Ji]})}return e})();});export{Ce as C,Ze as Z,ki as k};