-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchunk-73J7SKVR.js
More file actions
1 lines (1 loc) · 24.4 KB
/
chunk-73J7SKVR.js
File metadata and controls
1 lines (1 loc) · 24.4 KB
1
import{$ as A,$b as Ke,Ab as Ue,B as Ae,Ba as ke,Ca as z,Da as C,Dc as tt,Ea as d,Eb as Qe,F as V,G as Ce,Ga as g,Gc as ot,Ha as Fe,I as E,Ia as K,Ja as Ve,K as a,Ka as Ge,L as T,La as X,Le as ut,M as I,Na as Ne,O as De,Oa as Le,Qa as S,Ra as q,Rb as oe,S as Te,Sa as Z,Sd as rt,T as P,Ta as Re,U as m,V as x,Wd as nt,X as Ie,Xb as O,Xd as st,Y as f,Ya as je,Yb as l,Z as He,Za as ze,Zb as $,Zd as at,_a as Xe,_b as Ye,_d as k,a as B,ab as _,ac as Ze,ae as lt,b as Q,ba as we,cb as qe,da as Be,ee as ct,fa as Pe,ga as Se,h as be,hd as it,i as Y,ia as n,ja as u,ka as G,la as N,lb as y,mb as $e,na as h,oa as L,ob as w,pa as R,pb as r,qb as J,ra as Oe,re as pt,sa as Me,sb as We,t as _e,ta as Ee,tb as ee,ua as H,va as v,wa as b,wb as D,wc as Je,xa as j,xb as te,xc as et,y as ye,z as xe}from"./chunk-LNMBE7IX.js";function mt(){return{transformValueToSearch:e=>typeof e=="string"?e:String(e),transformOptionToString:e=>typeof e=="string"?e:String(e),transformOptionToValue:void 0,requireSelection:!1,showClearBtn:!1,debounceTime:150}}var dt=new E("HlmAutocompleteConfig");function Yt(e){return{provide:dt,useValue:B(B({},mt()),e)}}function ft(){return a(dt,{optional:!0})??mt()}var Tt={hasBackdrop:!1,scrollStrategy:"reposition"},W=(()=>{class e extends k{align=r("center");sideOffset=r(0,{transform:te});offsetX=r(0,{transform:te});_positionStrategy;constructor(){super(),this.setAriaDescribedBy(""),this.setAriaLabelledBy(""),m(()=>{let t=this.align();x(()=>{this.mutableAttachPositions.set([{originX:t,originY:"bottom",overlayX:t,overlayY:"top"},{originX:t,originY:"top",overlayX:t,overlayY:"bottom"}])}),x(()=>{this.applySideOffset(this.sideOffset())})}),m(()=>{let t=this.sideOffset();x(()=>{this.applySideOffset(t)})}),m(()=>{let t=this.offsetX();x(()=>{this.applyOffsetX(t)})}),m(()=>{let t=this.mutableAttachTo(),o=this.mutableAttachPositions();!t||!o||o.length===0||x(()=>{this._positionStrategy?this._positionStrategy.setOrigin(t):this._positionStrategy=this.positionBuilder.flexibleConnectedTo(t).withPush(!1),this._positionStrategy.withPositions(o),this.mutablePositionStrategy.set(this._positionStrategy)})})}applySideOffset(t){this.mutableAttachPositions.update(o=>o.map(i=>Q(B({},i),{offsetY:i.originY==="top"?-t:t})))}applyOffsetX(t){this.mutableAttachPositions.update(o=>o.map(i=>Q(B({},i),{offsetX:t})))}static \u0275fac=function(o){return new(o||e)};static \u0275dir=n({type:e,selectors:[["","brnPopover",""],["brn-popover"]],inputs:{align:[1,"align"],sideOffset:[1,"sideOffset"],offsetX:[1,"offsetX"]},exportAs:["brnPopover"],features:[_([{provide:k,useExisting:V(()=>e)},at(Tt)]),G]})}return e})(),gt=(()=>{class e extends lt{static \u0275fac=(()=>{let t;return function(i){return(t||(t=Ie(e)))(i||e)}})();static \u0275dir=n({type:e,selectors:[["","brnPopoverContent",""]],features:[_([st(()=>e)]),G]})}return e})(),ht=(()=>{class e extends ct{_host=a(f,{host:!0});brnPopoverTriggerFor=r(void 0,{alias:"brnPopoverTriggerFor"});constructor(){super(),m(()=>{let t=this.brnPopoverTriggerFor();x(()=>{t&&(t.mutableAttachTo.set(this._host.nativeElement),t.mutableCloseOnOutsidePointerEvents.set(!0),this.mutableBrnDialogTriggerFor().set(t))})}),this._brnDialog&&(this._brnDialog.mutableAttachTo.set(this._host.nativeElement),this._brnDialog.mutableCloseOnOutsidePointerEvents.set(!0))}static \u0275fac=function(o){return new(o||e)};static \u0275dir=n({type:e,selectors:[["button","brnPopoverTrigger",""],["button","brnPopoverTriggerFor",""]],hostAttrs:["aria-haspopup","dialog"],hostVars:5,hostBindings:function(o,i){o&2&&(C("id",i.id())("type",i.type()),h("aria-expanded",i.state()==="open"?"true":"false")("data-state",i.state())("aria-controls",i.dialogId))},inputs:{brnPopoverTriggerFor:[1,"brnPopoverTriggerFor"]},features:[G]})}return e})();var re=new E("BrnAutocompleteItemToken");function It(e){return{provide:re,useExisting:e}}var vt=new E("BrnAutocompleteToken");function Ht(e){return{provide:vt,useExisting:e}}function ne(){return a(vt)}var F=(()=>{class e{static _id=0;_injector=a(De);id=r(`brn-autocomplete-${++e._id}`);valueChange=w();selectionCleared=w();_brnPopover=a(W,{optional:!0});_focus=P("first");items=We(re,{descendants:!0});keyManager=new ut(this.items,this._injector);isExpanded=y(()=>this._brnPopover?.stateComputed()==="open");constructor(){this.keyManager.withVerticalOrientation().withHomeAndEnd().withWrap().skipPredicate(t=>t.disabled),m(()=>{let t=this.items(),o=this._focus();x(()=>{if(!t.length)return;let i=this.keyManager.activeItem;(!i||!t.includes(i))&&(o==="first"?this.keyManager.setFirstItemActive():this.keyManager.setLastItemActive())})}),this.keyManager.change.pipe(oe()).subscribe(()=>{let t=this.keyManager.activeItem?.value();t&&this.valueChange.emit(t)})}selectActiveItem(){this._brnPopover?.stateComputed()==="open"&&this.keyManager.activeItem?.selected.emit()}open(t="first"){this._brnPopover?.open(),this._focus.set(t)}close(){this._brnPopover?.close()}toggle(){this.isExpanded()?this.close():this.open()}static \u0275fac=function(o){return new(o||e)};static \u0275dir=n({type:e,selectors:[["","brnAutocomplete",""]],contentQueries:function(o,i,c){o&1&&Ve(c,i.items,re,5),o&2&&X()},hostVars:1,hostBindings:function(o,i){o&1&&d("keydown.enter",function(){return i.selectActiveItem()}),o&2&&C("id",i.id())},inputs:{id:[1,"id"]},outputs:{valueChange:"valueChange",selectionCleared:"selectionCleared"},features:[_([Ht(e)])]})}return e})(),bt=(()=>{class e{_templateRef=a(we);_viewContainerRef=a(Pe);_autocomplete=ne();_visible=y(()=>this._autocomplete.items().length>0);constructor(){m(()=>{this._visible()?this._viewContainerRef.clear():this._viewContainerRef.createEmbeddedView(this._templateRef)})}static \u0275fac=function(o){return new(o||e)};static \u0275dir=n({type:e,selectors:[["","brnAutocompleteEmpty",""]]})}return e})(),_t=(()=>{class e{static _id=0;id=r(`brn-autocomplete-group-${++e._id}`);static \u0275fac=function(o){return new(o||e)};static \u0275dir=n({type:e,selectors:[["","brnAutocompleteGroup",""]],hostAttrs:["role","group"],hostVars:1,hostBindings:function(o,i){o&2&&C("id",i.id())},inputs:{id:[1,"id"]}})}return e})(),yt=(()=>{class e{static _id=0;_platform=a(He);_elementRef=a(f);_autocomplete=ne();id=r(`brn-autocomplete-item-${++e._id}`);value=r.required();_disabled=r(!1,{alias:"disabled",transform:D});get disabled(){return this._disabled()}_active=P(!1);selected=w();getLabel(){return this._elementRef.nativeElement.textContent?.trim()??""}setActiveStyles(){this._active.set(!0),Qe(this._platform)&&this._elementRef.nativeElement.scrollIntoView({block:"nearest"})}setInactiveStyles(){this._active.set(!1)}onClick(){this._autocomplete.keyManager.setActiveItem(this),this.selected.emit()}activate(){this._disabled()||this._autocomplete.keyManager.setActiveItem(this)}static \u0275fac=function(o){return new(o||e)};static \u0275dir=n({type:e,selectors:[["button","brnAutocompleteItem",""]],hostAttrs:["type","button","role","option","tabIndex","-1"],hostVars:6,hostBindings:function(o,i){o&1&&d("click",function(){return i.onClick()})("mouseenter",function(){return i.activate()}),o&2&&(C("id",i.id()),h("disabled",i._disabled()?!0:null)("data-disabled",i._disabled()?"":null)("data-value",i.value())("aria-selected",i._active())("data-selected",i._active()?"":null))},inputs:{id:[1,"id"],value:[1,"value"],_disabled:[1,"disabled","_disabled"]},outputs:{selected:"selected"},features:[_([It(e)])]})}return e})(),xt=(()=>{class e{static _id=0;id=r(`brn-autocomplete-list-${++e._id}`);static \u0275fac=function(o){return new(o||e)};static \u0275dir=n({type:e,selectors:[["","brnAutocompleteList",""]],hostAttrs:["role","listbox"],hostVars:1,hostBindings:function(o,i){o&2&&C("id",i.id())},inputs:{id:[1,"id"]}})}return e})(),At=(()=>{class e{_autocomplete=ne();_isExpanded=this._autocomplete.isExpanded;_activeDescendant=P(void 0);constructor(){this._autocomplete.keyManager.change.pipe(xe(this._autocomplete.keyManager.activeItemIndex),oe()).subscribe(()=>{this._activeDescendant.set(this._autocomplete.keyManager.activeItem?.id())})}onKeyDown(t){t.key==="Enter"&&t.preventDefault(),this._isExpanded()||(t.key==="ArrowDown"&&this._autocomplete.open("first"),t.key==="ArrowUp"&&this._autocomplete.open("last"),t.key==="Escape"&&this._autocomplete.selectionCleared.emit()),this._autocomplete.keyManager.onKeydown(t)}static \u0275fac=function(o){return new(o||e)};static \u0275dir=n({type:e,selectors:[["input","brnAutocompleteSearchInput",""]],hostAttrs:["role","combobox","aria-autocomplete","list"],hostVars:2,hostBindings:function(o,i){o&1&&d("keydown",function(M){return i.onKeyDown(M)}),o&2&&h("aria-activedescendant",i._activeDescendant())("aria-expanded",i._isExpanded())}})}return e})();var se=(()=>{class e{static \u0275fac=function(o){return new(o||e)};static \u0275dir=n({type:e,selectors:[["","hlmPopover",""],["hlm-popover"]],features:[u([{directive:W,inputs:["align","align","autoFocus","autoFocus","closeDelay","closeDelay","closeOnOutsidePointerEvents","closeOnOutsidePointerEvents","sideOffset","sideOffset","state","state","offsetX","offsetX"],outputs:["stateChanged","stateChanged","closed","closed"]}])]})}return e})();var ae=(()=>{class e{_stateProvider=nt({host:!0});state=this._stateProvider.state??P("closed");_renderer=a(Be);_element=a(f);constructor(){m(()=>{this._renderer.setAttribute(this._element.nativeElement,"data-state",this.state())}),l(()=>"border-border bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative w-72 rounded-md border p-4 shadow-md outline-none")}static \u0275fac=function(o){return new(o||e)};static \u0275dir=n({type:e,selectors:[["","hlmPopoverContent",""],["","brnPopoverContent","","hlm",""]]})}return e})();var wt=(()=>{class e{static \u0275fac=function(o){return new(o||e)};static \u0275dir=n({type:e,selectors:[["button","hlmPopoverTrigger",""],["button","hlmPopoverTriggerFor",""]],hostAttrs:["data-slot","popover-trigger"],features:[u([{directive:ht,inputs:["id","id","brnPopoverTriggerFor","hlmPopoverTriggerFor","type","type"]}])]})}return e})();var le=(()=>{class e{constructor(){l(()=>"py-6 text-center text-sm")}static \u0275fac=function(o){return new(o||e)};static \u0275dir=n({type:e,selectors:[["","hlmAutocompleteEmpty",""]]})}return e})();var ce=(()=>{class e{constructor(){l(()=>"text-foreground block overflow-hidden p-1")}static \u0275fac=function(o){return new(o||e)};static \u0275dir=n({type:e,selectors:[["","hlmAutocompleteGroup",""],["hlm-autocomplete-group"]],features:[u([{directive:_t,inputs:["id","id"]}])]})}return e})();var pe=(()=>{class e{constructor(){l(()=>"data-[selected]:bg-accent data-[selected=true]:text-accent-foreground [&>ng-icon:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-start text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[hidden]:hidden [&>ng-icon]:pointer-events-none [&>ng-icon]:shrink-0 [&>ng-icon:not([class*='text-'])]:text-base")}static \u0275fac=function(o){return new(o||e)};static \u0275dir=n({type:e,selectors:[["button","hlmAutocompleteItem",""],["button","hlm-autocomplete-item",""]],features:[u([{directive:yt,inputs:["value","value","disabled","disabled","id","id"],outputs:["selected","selected"]}])]})}return e})();var ue=(()=>{class e{constructor(){l(()=>"block max-h-60 overflow-x-hidden overflow-y-auto")}static \u0275fac=function(o){return new(o||e)};static \u0275dir=n({type:e,selectors:[["","hlmAutocompleteList",""],["hlm-autocomplete-list"]],features:[u([{directive:xt,inputs:["id","id"]}])]})}return e})();var me=(()=>{class e{constructor(){l(()=>["group/input-group border-input dark:bg-input/30 relative flex w-full items-center rounded-md border shadow-xs transition-[color,box-shadow] outline-none","h-9 min-w-0 has-[>textarea]:h-auto","has-[>[data-align=inline-start]]:[&>input]:pl-2","has-[>[data-align=inline-end]]:[&>input]:pr-2","has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3","has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3","has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]","has-[>.ng-invalid.ng-touched]:ring-destructive/20 has-[>.ng-invalid.ng-touched]:border-destructive dark:has-[>.ng-invalid.ng-touched]:ring-destructive/40"])}static \u0275fac=function(o){return new(o||e)};static \u0275dir=n({type:e,selectors:[["","hlmInputGroup",""],["hlm-input-group"]],hostAttrs:["data-slot","input-group","role","group"]})}return e})();var Pt=$("text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>ng-icon:not([class*='text-'])]:text-base",{variants:{align:{"inline-start":"order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]","inline-end":"order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]","block-start":"order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5 [.border-b]:pb-3","block-end":"order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5 [.border-t]:pt-3"}},defaultVariants:{align:"inline-start"}}),de=(()=>{class e{align=r("inline-start");constructor(){l(()=>Pt({align:this.align()}))}static \u0275fac=function(o){return new(o||e)};static \u0275dir=n({type:e,selectors:[["hlm-input-group-addon"],["","hlmInputGroupAddon",""]],hostAttrs:["role","group","data-slot","input-group-addon"],hostVars:1,hostBindings:function(o,i){o&2&&h("data-align",i.align())},inputs:{align:[1,"align"]}})}return e})();var St=$("flex items-center gap-2 text-sm shadow-none",{variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-2 has-[>ng-icon]:px-2 [&>ng-icon:not([class*='text-'])]:text-sm",sm:"h-8 gap-1.5 rounded-md px-2.5 has-[>ng-icon]:px-2.5","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>ng-icon]:p-0","icon-sm":"size-8 p-0 has-[>ng-icon]:p-0"}},defaultVariants:{size:"xs"}}),fe=(()=>{class e{size=r("xs");type=r("button");constructor(){l(()=>St({size:this.size()}))}static \u0275fac=function(o){return new(o||e)};static \u0275dir=n({type:e,selectors:[["button","hlmInputGroupButton",""]],hostVars:2,hostBindings:function(o,i){o&2&&(C("type",i.type()),h("data-size",i.size()))},inputs:{size:[1,"size"],type:[1,"type"]},features:[_([Ye({variant:"ghost"})]),u([{directive:Ke,inputs:["variant","variant"]}])]})}return e})();var ge=(()=>{class e{constructor(){l(()=>"flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent")}static \u0275fac=function(o){return new(o||e)};static \u0275dir=n({type:e,selectors:[["input","hlmInputGroupInput",""]],hostAttrs:["data-slot","input-group-control"],features:[u([pt])]})}return e})();var he=(()=>{class e{_host=a(f,{host:!0});_brnDialog=a(k,{optional:!0});disabledTrigger=r(!1,{transform:D});constructor(){this._brnDialog&&this._brnDialog.mutableAttachTo.set(this._host.nativeElement)}open(){this.disabledTrigger()||this._brnDialog?.open()}static \u0275fac=function(o){return new(o||e)};static \u0275dir=n({type:e,selectors:[["","hlmAutocompleteTrigger",""]],hostBindings:function(o,i){o&1&&d("click",function(){return i.open()})},inputs:{disabledTrigger:[1,"disabledTrigger"]}})}return e})();var Mt=["input"],Et=[[["","loading",""]],[["","empty",""]]],kt=["[loading]","[empty]"],Ft=e=>({$implicit:e});function Vt(e,s){if(e&1){let t=z();v(0,"button",13),d("click",function(){T(t);let i=g();return I(i._selectionCleared())}),j(1,"ng-icon",14),b()}if(e&2){let t=g();H("disabled",t._disabled())}}function Gt(e,s){e&1&&ke(0)}function Nt(e,s){if(e&1&&N(0,Gt,1,0,"ng-container",19),e&2){let t=g().$implicit;H("ngTemplateOutlet",s)("ngTemplateOutletContext",qe(2,Ft,t))}}function Lt(e,s){if(e&1&&q(0),e&2){let t=g().$implicit,o=g(2);Re(" ",o.transformOptionToString()(t)," ")}}function Rt(e,s){if(e&1){let t=z();v(0,"button",18),d("selected",function(){let i=T(t).$implicit,c=g(2);return I(c._optionSelected(i))}),L(1,Nt,1,4,"ng-container")(2,Lt,1,1),b()}if(e&2){let t,o=s.$implicit,i=g(2),c=Xe(0);S(i._computedAutocompleteItemClass()),H("value",c?c(o):o),A(),R((t=i.optionTemplate())?1:2,t)}}function jt(e,s){if(e&1&&q(0),e&2){let t=g(4);Z(t.loadingText())}}function zt(e,s){e&1&&K(0,0,null,jt,1,1)}function Xt(e,s){if(e&1&&q(0),e&2){let t=g(4);Z(t.emptyText())}}function qt(e,s){e&1&&K(0,1,null,Xt,1,1)}function $t(e,s){if(e&1&&(v(0,"div",20),L(1,zt,2,0)(2,qt,2,0),b()),e&2){let t=g(2);S(t._computedAutocompleteEmptyClass()),A(),R(t.loading()?1:2)}}function Wt(e,s){if(e&1&&(v(0,"div",15)(1,"hlm-autocomplete-list")(2,"hlm-autocomplete-group"),Me(3,Rt,3,4,"button",16,Oe),b()(),N(5,$t,3,3,"div",17),b()),e&2){let t=g();Ne("width",t._elementRef.nativeElement.offsetWidth,"px"),A(),S(t._computedAutocompleteListClass()),Le("hidden",t.filteredOptions().length===0),A(2),Ee(t.filteredOptions())}}var Ut={provide:Ze,useExisting:V(()=>Ct),multi:!0},Ct=(()=>{class e{static _id=0;_config=ft();_brnAutocomplete=J.required(F);_inputRef=J.required("input",{read:f});_elementRef=a(f);autocompleteSearchClass=r("");_computedAutocompleteSearchClass=y(()=>O(this.autocompleteSearchClass()));autocompleteInputClass=r("");_computedAutocompleteInputClass=y(()=>O(this.autocompleteInputClass()));autocompleteListClass=r("");_computedAutocompleteListClass=y(()=>O(this.autocompleteListClass()));autocompleteItemClass=r("");_computedAutocompleteItemClass=y(()=>O(this.autocompleteItemClass()));autocompleteEmptyClass=r("");_computedAutocompleteEmptyClass=y(()=>O(this.autocompleteEmptyClass()));filteredOptions=r([]);value=ee();debounceTime=r(this._config.debounceTime);search=ee("");_search=rt(this.search,this.debounceTime());transformValueToSearch=r(this._config.transformValueToSearch);requireSelection=r(this._config.requireSelection,{transform:D});transformOptionToString=r(this._config.transformOptionToString);transformOptionToValue=r(this._config.transformOptionToValue);displayWith=r(void 0);_displaySearchValue=y(()=>{let t=this.displayWith();return t||this.transformValueToSearch()});optionTemplate=r();loading=r(!1,{transform:D});showClearBtn=r(this._config.showClearBtn,{transform:D});searchPlaceholderText=r("Select an option");loadingText=r("Loading options...");emptyText=r("No options found");ariaLabelToggleButton=r("Toggle options");inputId=r(`hlm-autocomplete-input-${++e._id}`);disabled=r(!1,{transform:D});_disabled=$e(()=>this.disabled());valueChange=w();searchChange=w();_onChange;_onTouched;constructor(){l(()=>"block w-full"),m(()=>{let t=this._search();this.searchChange.emit(t)})}_searchChanged(t){let o=t.target.value;this.search.set(o??""),!this._brnAutocomplete().isExpanded()&&o.length>0&&this._brnAutocomplete().open()}_toggleOptions(){(this._search()||this.filteredOptions().length>0)&&this._brnAutocomplete().toggle(),this._inputRef().nativeElement.focus()}_selectionCleared(){this.value.set(void 0),this._onChange?.(null),this.valueChange.emit(null),this.search.set("")}_optionSelected(t){let o=this.transformOptionToValue();console.log("Option selected:",t,"using transformer:",o);let i=o?o(t):t;this.value.set(i),this._onChange?.(i),this.valueChange.emit(i);let c=this._displaySearchValue()(i);this.search.set(c??""),this._brnAutocomplete().close()}writeValue(t){this.value.set(t||void 0);let o=t?this._displaySearchValue()(t):"";this.search.set(o)}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this._disabled.set(t)}_closed(){if(this.requireSelection()){let t=this.value(),o=t?this._displaySearchValue()(t):"";this.search.set(o??"")}}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Se({type:e,selectors:[["hlm-autocomplete"]],viewQuery:function(o,i){o&1&&Ge(i._brnAutocomplete,F,5)(i._inputRef,Mt,5,f),o&2&&X(2)},inputs:{autocompleteSearchClass:[1,"autocompleteSearchClass"],autocompleteInputClass:[1,"autocompleteInputClass"],autocompleteListClass:[1,"autocompleteListClass"],autocompleteItemClass:[1,"autocompleteItemClass"],autocompleteEmptyClass:[1,"autocompleteEmptyClass"],filteredOptions:[1,"filteredOptions"],value:[1,"value"],debounceTime:[1,"debounceTime"],search:[1,"search"],transformValueToSearch:[1,"transformValueToSearch"],requireSelection:[1,"requireSelection"],transformOptionToString:[1,"transformOptionToString"],transformOptionToValue:[1,"transformOptionToValue"],displayWith:[1,"displayWith"],optionTemplate:[1,"optionTemplate"],loading:[1,"loading"],showClearBtn:[1,"showClearBtn"],searchPlaceholderText:[1,"searchPlaceholderText"],loadingText:[1,"loadingText"],emptyText:[1,"emptyText"],ariaLabelToggleButton:[1,"ariaLabelToggleButton"],inputId:[1,"inputId"],disabled:[1,"disabled"]},outputs:{value:"valueChange",search:"searchChange",valueChange:"valueChange",searchChange:"searchChange"},features:[_([Ut,Je({lucideSearch:it,lucideChevronDown:tt,lucideCircleX:ot})])],ngContentSelectors:kt,decls:14,vars:13,consts:[["popover",""],["input",""],["align","start","autoFocus","first-heading","sideOffset","5","closeDelay","100","closeOnOutsidePointerEvents","true",3,"closed"],["brnAutocomplete","",3,"selectionCleared"],["hlmInputGroup","","hlmAutocompleteTrigger","",3,"disabledTrigger"],["brnAutocompleteSearchInput","","hlmInputGroupInput","","type","text","autocomplete","off",3,"input","id","placeholder","disabled","value"],["hlmInputGroupAddon",""],["name","lucideSearch"],["hlmInputGroupAddon","","align","inline-end"],["hlmInputGroupButton","","type","button","tabindex","-1","aria-label","clear","size","icon-xs",3,"disabled"],["hlmInputGroupButton","","type","button","tabindex","-1","size","icon-xs",3,"click","disabled"],["name","lucideChevronDown"],["hlmPopoverContent","","class","p-0",3,"width",4,"brnPopoverContent"],["hlmInputGroupButton","","type","button","tabindex","-1","aria-label","clear","size","icon-xs",3,"click","disabled"],["name","lucideCircleX"],["hlmPopoverContent","",1,"p-0"],["hlm-autocomplete-item","",3,"class","value"],["hlmAutocompleteEmpty","",3,"class",4,"brnAutocompleteEmpty"],["hlm-autocomplete-item","",3,"selected","value"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["hlmAutocompleteEmpty",""]],template:function(o,i){if(o&1){let c=z();Fe(Et),je(0),v(1,"hlm-popover",2,0),d("closed",function(){return T(c),I(i._closed())}),v(3,"div",3),d("selectionCleared",function(){return T(c),I(i._selectionCleared())}),v(4,"div",4)(5,"input",5,1),d("input",function(Dt){return T(c),I(i._searchChanged(Dt))}),b(),v(7,"div",6),j(8,"ng-icon",7),b(),v(9,"div",8),L(10,Vt,2,1,"button",9),v(11,"button",10),d("click",function(){return T(c),I(i._toggleOptions())}),j(12,"ng-icon",11),b()()(),N(13,Wt,6,6,"div",12),b()()}o&2&&(ze(i.transformOptionToValue()),A(4),S(i._computedAutocompleteSearchClass()),H("disabledTrigger",!i._search()||i._disabled()),A(),S(i._computedAutocompleteInputClass()),H("id",i.inputId())("placeholder",i.searchPlaceholderText())("disabled",i._disabled())("value",i.search()),A(5),R(i.showClearBtn()&&i.value()!==void 0?10:-1),A(),H("disabled",i._disabled()),h("aria-label",i.ariaLabelToggleButton()))},dependencies:[Ue,F,bt,At,le,ce,pe,ue,he,gt,se,ae,et,me,de,fe,ge],encapsulation:2,changeDetection:0})}return e})();var ve=class{_box;_destroyed=new Y;_resizeSubject=new Y;_resizeObserver;_elementObservables=new Map;constructor(s){this._box=s,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(t=>this._resizeSubject.next(t)))}observe(s){return this._elementObservables.has(s)||this._elementObservables.set(s,new be(t=>{let o=this._resizeSubject.subscribe(t);return this._resizeObserver?.observe(s,{box:this._box}),()=>{this._resizeObserver?.unobserve(s),o.unsubscribe(),this._elementObservables.delete(s)}}).pipe(_e(t=>t.some(o=>o.target===s)),ye({bufferSize:1,refCount:!0}),Ae(this._destroyed))),this._elementObservables.get(s)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear()}},gr=(()=>{class e{_cleanupErrorListener;_observers=new Map;_ngZone=a(Te);constructor(){typeof ResizeObserver<"u"}ngOnDestroy(){for(let[,t]of this._observers)t.destroy();this._observers.clear(),this._cleanupErrorListener?.()}observe(t,o){let i=o?.box||"content-box";return this._observers.has(i)||this._observers.set(i,new ve(i)),this._observers.get(i).observe(t)}static \u0275fac=function(o){return new(o||e)};static \u0275prov=Ce({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{gt as a,se as b,ae as c,wt as d,Yt as e,Ct as f,gr as g};