@veltdev/sdk-dev 6.0.6 → 6.0.7-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/models/element/activity-element.model.d.ts +9 -0
- package/app/models/element/autocomplete-element.model.d.ts +10 -0
- package/app/models/element/comment-element.model.d.ts +71 -0
- package/app/models/element/notification-element.model.d.ts +17 -0
- package/chunk-2RTPWFAT.js +2 -0
- package/{chunk-2ZGVZZFS.js → chunk-45SHL7SS.js} +1 -1
- package/chunk-53YYC3DZ.js +1 -0
- package/{chunk-OXX7MHHB.js → chunk-5BK24BNN.js} +1 -1
- package/chunk-6RGPTVZH.js +1 -0
- package/chunk-7TGEFEIB.js +1 -0
- package/{chunk-75Z7SIQI.js → chunk-AK52FHZD.js} +1 -1
- package/{chunk-ZFEUGJVC.js → chunk-BJ4K7FJF.js} +1 -1
- package/chunk-CPLV2B4U.js +193 -0
- package/chunk-E35TUEDG.js +6 -0
- package/{chunk-HGFGZISK.js → chunk-IHSZS2BY.js} +1 -1
- package/chunk-JAW5QWYA.js +1 -0
- package/{chunk-Z6E2ZIIQ.js → chunk-JFH42AFE.js} +1 -1
- package/chunk-KOJBJNTA.js +93 -0
- package/{chunk-2Q3745J2.js → chunk-KZH4ST7D.js} +1 -1
- package/chunk-M7U5MNPT.js +1 -0
- package/{chunk-HS6LFYOH.js → chunk-OTY5GYBI.js} +1 -1
- package/{chunk-TBVR7DMN.js → chunk-QE5YLKIY.js} +1 -1
- package/{chunk-XVEAFTH3.js → chunk-RF7YZVET.js} +1 -1
- package/chunk-ZXNPIHGS.js +1 -0
- package/package.json +1 -1
- package/velt-activity-log.js +1 -1
- package/velt-area.js +1 -1
- package/velt-arrow.js +2 -2
- package/velt-comment.js +7 -7
- package/velt-cursor.js +2 -2
- package/velt-huddle.js +2 -2
- package/velt-live-state-sync.js +2 -2
- package/velt-notification.js +1 -1
- package/velt-presence.js +1 -1
- package/velt-reaction.js +1 -1
- package/velt-recorder.js +1 -1
- package/velt-rewriter.js +2 -2
- package/velt-selection.js +1 -1
- package/velt-tag.js +1 -1
- package/velt-user-invite.js +2 -2
- package/velt-user-request.js +1 -1
- package/velt-video-player.js +1 -1
- package/velt-views.js +2 -2
- package/velt.js +5 -5
- package/chunk-5CFN76GI.js +0 -193
- package/chunk-6VMBIKMK.js +0 -6
- package/chunk-DF5SLQUS.js +0 -1
- package/chunk-DZB424JF.js +0 -2
- package/chunk-FJ6CN2HK.js +0 -1
- package/chunk-FR7BEDQT.js +0 -1
- package/chunk-HVJ4WKTL.js +0 -93
- package/chunk-O6NHFZMD.js +0 -1
- package/chunk-PB5PWSQS.js +0 -1
- package/chunk-XJT64ZXP.js +0 -1
- /package/{chunk-KIYMQJSM.js → chunk-B2QMS6VA.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as Pt,b as We}from"./chunk-7TGEFEIB.js";import{b as He}from"./chunk-N72BHERH.js";import{Aa as bt,Ba as b,Ca as Zt,Da as dt,Ea as Ge,L as _t,M as ye,N as ke,O as Ie,Q as Xt,R as Oe,S as De,T as we,U as Tt,V as Ee,aa as Te,ca as Ae,da as ie,ea as Me}from"./chunk-E35TUEDG.js";import{$ as et,Aa as Gt,Bc as Se,Ca as Ht,Cf as je,Ee as Re,Fa as f,Fi as ze,Ib as W,Kb as wt,L as zt,La as Wt,Nb as V,Ob as Et,Pa as D,Pb as X,Qb as Yt,Ra as Jt,T as gt,U as ue,Ua as P,Uh as ut,Vh as Ve,Wa as Kt,Ya as N,_a as g,_b as R,a as m,ac as Nt,b as h,ba as he,bb as Ce,bc as F,be as ae,c as ge,ca as H,cc as O,da as Q,db as M,dc as it,ec as ft,fa as fe,fb as w,fc as $,g as vt,gb as E,gc as _e,ha as yt,hc as be,ia as kt,ii as At,ja as st,k as It,kc as j,ki as L,l as Bt,la as at,lb as p,lc as U,li as Le,mb as x,nb as k,nh as lt,ob as Y,od as Pe,p as St,pa as nt,pc as J,qa as A,qh as Ue,qi as Be,r as Ut,rc as oe,rf as Fe,sb as S,sc as rt,si as $e,tb as y,tc as Ct,ti as Mt,ub as B,vb as Ot,vc as re,w as $t,wa as ot,xb as Dt,xc as xe,yh as Ne,zb as l}from"./chunk-KWXZADQY.js";var Je=(()=>{let r=class r{constructor(t){this.loggingService=t,this.autocompleteDataMap$=new Bt({}),this.onAutocompleteChipClick$=new It;try{this.loggingService.log("%c[WB] Creating CLASS: AutocompleteService","color: blue;"),this.create({hotkey:"@",type:"contact",data:[]})}catch(e){this.loggingService.catch("Error in AutocompleteService constructor: ",e)}}create(t){try{if(this.loggingService.log("%c[WB] Calling AutocompleteService FUNCTION: create","color: green;"),t?.hotkey){let e=this.autocompleteDataMap$.value;e[t.hotkey]=t,this.autocompleteDataMap$.next(e)}}catch(e){this.loggingService.catch("Error in AutocompleteService create: ",e)}}remove(t){try{this.loggingService.log("%c[WB] Calling AutocompleteService FUNCTION: remove","color: green;");let e=this.autocompleteDataMap$.value;delete e[t],this.autocompleteDataMap$.next(e)}catch(e){this.loggingService.catch("Error in AutocompleteService remove: ",e)}}getAutocompleteDataMap$(){return this.autocompleteDataMap$.asObservable()}getAutocompleteDataMap(){return this.autocompleteDataMap$.value}setOnAutocompleteChipClick(t){this.onAutocompleteChipClick$.next(t)}getOnAutocompleteChipClick$(){return this.onAutocompleteChipClick$.asObservable()}};r.\u0275fac=function(e){return new(e||r)(H(L))},r.\u0275prov=et({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var Ke=(()=>{let r=class r{constructor(t,e,i,a){this.docService=t,this.loggingService=e,this.authService=i,this.configService=a;try{this.loggingService.log("%c[WB] Creating CLASS: MetadataService","color: blue;")}catch(c){this.loggingService.catch("Error in MetadataService constructor: ",c)}}getGlobalMetadata(){return vt(this,null,function*(){try{let t=this.authService.getUser();if(!t)return this.loggingService.catch("User not found. Ensure Identify method is called.",void 0,void 0,!0),{};let e=this.docService.getOrganizationMetadata(t?.organizationId),i=this.docService.getDocumentMetadataOfAvailableDocuments(),a=this.docService.getLocation();e&&(e=JSON.parse(JSON.stringify(e)),delete e?.organizationId,e.organizationId=e?.clientOrganizationId,delete e?.clientOrganizationId,delete e?.pageInfo),i&&(i=JSON.parse(JSON.stringify(i)),i.forEach(v=>{delete v?.locations,delete v?.location,delete v?.locationId,delete v?.pageInfo,delete v?.documentId,v.documentId=v?.clientDocumentId,delete v?.clientDocumentId,delete v?.veltFolderId,v?.clientOrganizationId&&(v.organizationId=v?.clientOrganizationId,delete v?.clientOrganizationId)}));let c=[];a&&(a=JSON.parse(JSON.stringify(a)),a?.location&&c.push(a?.location));let d=this.docService.getLocations();d&&Object.values(d).forEach(v=>{v?.location&&c.push(v?.location)});let s=this.docService.getDocumentPaths()?.folderId;return{organization:e,documents:i,locations:c,folderId:s}}catch(t){return this.loggingService.catch("Error in MetadataService getGlobalMetadata: ",t),{}}})}getDebugInfo(){return vt(this,null,function*(){try{let t=this.authService.getUser();if(!t)return null;let e,i;t&&(e=Ne(t)??void 0,i=JSON.parse(JSON.stringify(t)),delete i?.contacts);let a=this.configService.getApiKey(),c=window?.Velt?.version,d=this.docService.getOrganizationMetadata(t?.organizationId),s,u;d&&(s=JSON.parse(JSON.stringify(d)),delete s?.organizationId,s.organizationId=s?.clientOrganizationId,delete s?.clientOrganizationId,delete s?.pageInfo,delete s?.apiKey,u=JSON.parse(JSON.stringify(d)),delete u?.clientOrganizationId,delete u?.pageInfo,delete u?.apiKey);let v=this.docService.getDocumentMetadataOfAvailableDocuments(),T=this.docService.getLocation(),I=[],_=[];T&&(I.push(T),T?.location&&_.push(T?.location));let C=this.docService.getLocations();C&&Object.values(C).forEach(G=>{I.push(G),G?.location&&_.push(G?.location)});let z=[],Z=[];v&&(z=JSON.parse(JSON.stringify(v)),z.forEach(G=>{delete G?.apiKey,delete G?.locations,delete G?.location,delete G?.locationId,delete G?.pageInfo,delete G?.documentId,G.documentId=G?.clientDocumentId,delete G?.clientDocumentId,delete G?.veltFolderId,G?.clientOrganizationId&&(G.organizationId=G?.clientOrganizationId,delete G?.clientOrganizationId)}),Z=JSON.parse(JSON.stringify(v)),Z.forEach(G=>{delete G?.apiKey,delete G?.locations,delete G?.location,delete G?.locationId,delete G?.pageInfo,delete G?.clientDocumentId,G.folderId=G?.veltFolderId,delete G?.veltFolderId,delete G?.clientOrganizationId}));let ct,Lt=this.docService.getDocumentPaths();Lt?.folderId&&Lt?.veltFolderId&&(ct={folderId:Lt?.folderId,veltFolderId:Lt?.veltFolderId});let ne,Ft;ct&&(ne=JSON.parse(JSON.stringify(ct)),delete ne?.veltFolderId,Ft=JSON.parse(JSON.stringify(ct)),Ft.folderId=Ft.veltFolderId,delete Ft?.veltFolderId);let jt={};return jt.veltVersion=c,jt.apiKey=a,jt.serverMap={organization:u??void 0,documents:Z,locations:I??void 0,folder:Ft??void 0,user:i??void 0,accessFields:this.docService.getProcessedDocContext()??void 0},jt.clientMap={organization:s??void 0,documents:z,locations:_??void 0,folder:ne??void 0,user:e??void 0,context:this.docService.getDocContext()??void 0},jt}catch(t){return this.loggingService.catch("Error in MetadataService getDebugInfo: ",t),null}})}getDebugInfo$(){return $t([this.authService.getUser$(),this.docService.getOrganizationConfig$(),this.docService.getOrganizationMetadataMap$(),this.docService.getAllDocumentMetadataMap$(),this.docService.getDocContext$()]).pipe(gt(()=>vt(this,null,function*(){return yield this.getDebugInfo()})),zt(Ue))}};r.\u0275fac=function(e){return new(e||r)(H(ze),H(L),H(Mt),H(Le))},r.\u0275prov=et({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var mt=class{constructor(){this.isGroupHeader=!1,this.isGroupMember=!1,this.isNewContact=!1,this.disabled=!1}},Vt=class{constructor(){this.appState={user:null,darkMode:!1},this.featureState={customAutocompleteSearch:!1,expandMentionGroups:!1,showMentionGroupsFirst:!1,showMentionGroupsOnly:!1,customGroupsEnabled:!1,paginatedContactList:!1,atHereEnabled:!1,showAtHere:!1},this.data={userContacts:[],organizationGroups:[],userDocumentContacts:[],flattenedItems:[],hereUserContact:{name:"here",email:"",userId:"here",visibility:"here"},atHereDescription:null,autocompleteDataMap:{},selectedAutocompleteData:void 0,newUserContact:void 0,newUserContactError:void 0},this.uiState={variant:void 0,autoCompleteScrollConfig:{itemSize:55,minBufferPx:350,maxBufferPx:600,templateCacheSize:350}},this.trackByFlattenedItem=(r,o)=>{try{return o?.id||r.toString()}catch{return r.toString()}},this.onOptionClick=()=>{}}};function le(){return{panelOpen:!1,filterText:"",highlightedIndex:-1,autocompleteDisabledPositions:new Set,darkMode:!1,variant:void 0}}var Ye=new he("AutocompleteLocalUIStateSignal");var qt=class{constructor(r,o){this.injector=r,this.readSignal=o,this.cache=new Map,this.structureVersion=A(0)}bumpStructureVersion(){try{this.structureVersion.update(r=>r+1)}catch{}}get(r,o){try{if(!r||!this.injector)return Ut(null);let t=this.cache.get(r);if(t)return t;o?.();let e=Pe(rt(()=>{this.structureVersion();let i=this.readSignal(r);return i?i():null}),{injector:this.injector}).pipe(zt());return this.cache.set(r,e),e}catch{return Ut(null)}}},ja="default";function Xe(){try{return Q(at)}catch{return null}}var Qt=(()=>{let r=class r{bumpContextConfigStructureVersion(){this.configBridge.bumpStructureVersion()}constructor(t,e,i,a,c,d){this.authService=t,this.contactService=e,this.autocompleteService=i,this.serviceBook=a,this.themeService=c,this.loggingService=d,this.contextMap=new Map,this.registryMap=new Map,this.serviceSubscriptions=[],this.injector=Xe(),this.configBridge=new qt(this.injector,s=>this.contextMap.get(s)),this.currentUser=null,this.currentDarkMode=!1,this.currentUserContacts=[],this.currentOrganizationGroups=[],this.currentUserDocumentContacts=[],this.currentAutocompleteDataMap={},this.currentAtHereEnabled=!1,this.currentAtHereLabel="here",this.currentAtHereDescription=null,this.currentCustomAutocompleteSearch=!1,this.currentExpandMentionGroups=!1,this.currentShowMentionGroupsFirst=!1,this.currentShowMentionGroupsOnly=!1,this.currentPaginatedContactList=!1,this.currentAutoCompleteScrollConfig={itemSize:55,minBufferPx:350,maxBufferPx:600,templateCacheSize:350},this.setupSubscriptions()}setupSubscriptions(){try{this.serviceSubscriptions.push(this.authService.getUser$().subscribe(t=>{t&&(this.currentUser=t,this.updateAllContexts(e=>h(m({},e),{appState:h(m({},e.appState),{user:t})})))})),this.serviceSubscriptions.push(this.themeService.getDarkMode$().subscribe(t=>{this.currentDarkMode=t,this.updateAllContexts(e=>h(m({},e),{appState:h(m({},e.appState),{darkMode:t})}))})),this.serviceSubscriptions.push(this.contactService.getUserContacts$().subscribe(t=>{this.currentUserContacts=t?.slice()||[],this.updateAllContexts(e=>h(m({},e),{data:h(m({},e.data),{userContacts:this.buildUserContactsWithHere(this.currentUserContacts)})}))})),this.serviceSubscriptions.push(this.contactService.getOrganizationGroups$().subscribe(t=>{this.currentOrganizationGroups=t||[],this.updateAllContexts(e=>h(m({},e),{data:h(m({},e.data),{organizationGroups:this.currentOrganizationGroups})}))})),this.serviceSubscriptions.push(this.contactService.getUserDocumentContacts$().subscribe(t=>{this.currentUserDocumentContacts=t||[],this.updateAllContexts(e=>h(m({},e),{data:h(m({},e.data),{userDocumentContacts:this.currentUserDocumentContacts})}))})),this.serviceSubscriptions.push(this.autocompleteService.getAutocompleteDataMap$().subscribe(t=>{this.currentAutocompleteDataMap=t||{},this.updateAllContexts(e=>h(m({},e),{data:h(m({},e.data),{autocompleteDataMap:this.currentAutocompleteDataMap})}))})),this.serviceSubscriptions.push(this.contactService.getAtHereEnabled$().subscribe(t=>{this.currentAtHereEnabled=t,this.updateAllContexts(e=>h(m({},e),{featureState:h(m({},e.featureState),{atHereEnabled:t}),data:h(m({},e.data),{userContacts:this.buildUserContactsWithHere(this.currentUserContacts)})}))})),this.serviceSubscriptions.push(this.contactService.getAtHereLabel().subscribe(t=>{this.currentAtHereLabel=t,this.updateAllContexts(e=>h(m({},e),{data:h(m({},e.data),{hereUserContact:h(m({},e.data.hereUserContact),{name:t})})}))})),this.serviceSubscriptions.push(this.contactService.getAtHereDescription().subscribe(t=>{this.currentAtHereDescription=t,this.updateAllContexts(e=>h(m({},e),{data:h(m({},e.data),{atHereDescription:t})}))})),this.serviceSubscriptions.push(this.serviceBook.observe(ut).pipe(gt(t=>t?t.getCustomAutocompleteSearch$():St)).subscribe(t=>{this.currentCustomAutocompleteSearch=t,this.updateAllContexts(e=>h(m({},e),{featureState:h(m({},e.featureState),{customAutocompleteSearch:t})}))})),this.serviceSubscriptions.push(this.serviceBook.observe(ut).pipe(gt(t=>t?t.getExpandMentionGroups$():St)).subscribe(t=>{this.currentExpandMentionGroups=t,this.updateAllContexts(e=>h(m({},e),{featureState:h(m({},e.featureState),{expandMentionGroups:t})}))})),this.serviceSubscriptions.push(this.serviceBook.observe(ut).pipe(gt(t=>t?t.getShowMentionGroupsFirst$():St)).subscribe(t=>{this.currentShowMentionGroupsFirst=t,this.updateAllContexts(e=>h(m({},e),{featureState:h(m({},e.featureState),{showMentionGroupsFirst:t})}))})),this.serviceSubscriptions.push(this.serviceBook.observe(ut).pipe(gt(t=>t?t.getShowMentionGroupsOnly$():St)).subscribe(t=>{this.currentShowMentionGroupsOnly=t,this.updateAllContexts(e=>h(m({},e),{featureState:h(m({},e.featureState),{showMentionGroupsOnly:t})}))})),this.serviceSubscriptions.push(this.serviceBook.observe(ut).pipe(gt(t=>t?t.getPaginatedContactList$():St)).subscribe(t=>{this.currentPaginatedContactList=t,this.updateAllContexts(e=>h(m({},e),{featureState:h(m({},e.featureState),{paginatedContactList:t})}))})),this.serviceSubscriptions.push(this.serviceBook.observe(ut).pipe(gt(t=>t?t.getAutoCompleteScrollConfig$():St)).subscribe(t=>{this.currentAutoCompleteScrollConfig=t,this.updateAllContexts(e=>h(m({},e),{uiState:h(m({},e.uiState),{autoCompleteScrollConfig:t})}))}))}catch(t){this.loggingService.catch("Error in AutocompleteCoreService setupSubscriptions:",t)}}buildUserContactsWithHere(t){try{let e=t?.slice()||[];if(this.currentAtHereEnabled){let i={name:this.currentAtHereLabel,email:"",userId:"here",visibility:"here"};e.find(a=>a?.visibility==="here")||e.unshift(i)}return e}catch(e){return this.loggingService.catch("Error in AutocompleteCoreService buildUserContactsWithHere:",e),t||[]}}getOrCreateContextConfig(t){try{let e=this.contextMap.get(t);if(!e){let i=new Vt;i.appState.user=this.currentUser,i.appState.darkMode=this.currentDarkMode,i.data.userContacts=this.buildUserContactsWithHere(this.currentUserContacts),i.data.organizationGroups=this.currentOrganizationGroups,i.data.userDocumentContacts=this.currentUserDocumentContacts,i.data.autocompleteDataMap=this.currentAutocompleteDataMap,i.data.hereUserContact.name=this.currentAtHereLabel,i.data.atHereDescription=this.currentAtHereDescription,i.featureState.customAutocompleteSearch=this.currentCustomAutocompleteSearch,i.featureState.expandMentionGroups=this.currentExpandMentionGroups,i.featureState.showMentionGroupsFirst=this.currentShowMentionGroupsFirst,i.featureState.showMentionGroupsOnly=this.currentShowMentionGroupsOnly,i.featureState.paginatedContactList=this.currentPaginatedContactList,i.featureState.atHereEnabled=this.currentAtHereEnabled,i.uiState.autoCompleteScrollConfig=this.currentAutoCompleteScrollConfig,e=A(i),this.contextMap.set(t,e),this.bumpContextConfigStructureVersion()}return e}catch(e){return this.loggingService.catch("Error in AutocompleteCoreService getOrCreateContextConfig:",e),A(new Vt)}}getContextConfig(t){try{return this.contextMap.get(t)}catch(e){this.loggingService.catch("Error in AutocompleteCoreService getContextConfig:",e);return}}setContextConfig(t,e){try{this.contextMap.set(t,e),this.bumpContextConfigStructureVersion()}catch(i){this.loggingService.catch("Error in AutocompleteCoreService setContextConfig:",i)}}clearContextConfig(t){try{this.contextMap.delete(t),this.registryMap.delete(t),this.bumpContextConfigStructureVersion()}catch(e){this.loggingService.catch("Error in AutocompleteCoreService clearContextConfig:",e)}}getAutocompleteConfig$(t){try{return this.configBridge.get(t,()=>this.getOrCreateContextConfig(t))}catch(e){return this.loggingService.catch("Error in AutocompleteCoreService getAutocompleteConfig$:",e),Ut(null)}}setRegistry(t,e){try{this.registryMap.set(t,e)}catch(i){this.loggingService.catch("Error in AutocompleteCoreService setRegistry:",i)}}getRegistry(t){try{return this.registryMap.get(t)}catch(e){this.loggingService.catch("Error in AutocompleteCoreService getRegistry:",e);return}}findParentAutocompleteId(t){try{let e=t?.nativeElement;if(!e)return;let i=e.parentElement;for(;i;){let a=i.getAttribute?.("autocomplete-id");if(a)return a;if(i.tagName?.toLowerCase()==="velt-autocomplete-context-wrapper"){let c=i.getAttribute?.("autocomplete-id");if(c)return c}i=i.parentElement}return}catch(e){this.loggingService.catch("Error in AutocompleteCoreService findParentAutocompleteId:",e);return}}updateAllContexts(t){try{this.contextMap.forEach(e=>{let i=e();e.set(t(i))})}catch(e){this.loggingService.catch("Error in AutocompleteCoreService updateAllContexts:",e)}}};r.\u0275fac=function(e){return new(e||r)(H(Mt),H(bt),H(Je),H(At),H(Zt),H(L))},r.\u0275prov=et({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var Ze=(()=>{let r=class r{constructor(t,e,i,a){this.coreService=t,this.contactService=e,this.loggingService=i,this.serviceBook=a,this.componentId="velt-autocomplete-panel",this.commentActionsService=null,this.serviceBook.observe(Ve).subscribe(c=>this.commentActionsService=c)}filterOptions(t,e,i){try{let c=t().data.selectedAutocompleteData;c&&(c.type==="contact"?this.filterContactOptions(t,e,i):this.filterCustomOptions(t,e))}catch(a){this.loggingService.catch("Error in AutocompleteActionService filterOptions:",a)}}filterContactOptions(t,e,i){try{let a=t(),c=e?.toLowerCase()?.trim()||"",d=new Fe;d.email=c;let s=new RegExp(Re.REGEX_EMAIL).test("@"+d?.email),u=a.data.userContacts.slice();a.featureState.customAutocompleteSearch||e&&(u=this.filterContacts(u,d),a.featureState.paginatedContactList&&u.length<3&&this.fetchFilteredUsersFromDb(e).then(()=>{})),a.featureState.atHereEnabled&&a.data.hereUserContact?.name?.includes(c)&&(u?.find(C=>C?.userId==="here")||(u=[a.data.hereUserContact,...u])),i?.length&&(u=u.filter(C=>!i.find(z=>z?.email===C?.email)));let v=e?this.filterGroups(a.data.organizationGroups,e):a.data.organizationGroups,T=u.map(C=>{if(C.visibility==="here"){if(a.data.atHereDescription)C=h(m({},C),{email:a.data.atHereDescription}),C.description=a.data.atHereDescription;else if(a.appState.user&&a.appState.user?.organizationId){let z=a.data.userDocumentContacts?.length||0;C=h(m({},C),{email:`${z} members`}),C.description=`${z} members`}}return{type:"contact",contact:C,disabled:!1}}),I=v.map(C=>({type:"group",group:C})),_=[...T,...I];if(a.featureState.expandMentionGroups)this.buildExpandedGroupItems(t,_,a,d,s);else{let C=_.length?void 0:{type:"contact",contact:d},z=this.createFlattenedItems({allItems:_,newUserContact:C,isExpandedGroups:!1,isCustomGroups:!1,showMentionGroupsOnly:a.featureState.showMentionGroupsOnly,showMentionGroupsFirst:a.featureState.showMentionGroupsFirst});t.update(Z=>h(m({},Z),{data:h(m({},Z.data),{flattenedItems:z,newUserContactError:s?void 0:"Invalid email",newUserContact:C})}))}}catch(a){this.loggingService.catch("Error in AutocompleteActionService filterContactOptions:",a)}}buildExpandedGroupItems(t,e,i,a,c){try{let d=[],s={},u=new Map;e.forEach(C=>{if(C.contact?.userId){let z=je(C.contact.userId);u.set(z,C),s[C.contact.userId]=!1}});let v=new Map;i.data.organizationGroups.forEach(C=>{v.set(C.metadata.clientGroupId,{id:C.metadata.clientGroupId,name:C.metadata.groupName,members:[],userIds:Object.keys(C.users||{})})}),v.forEach(C=>{C.userIds.forEach(z=>{let Z=u.get(z);Z&&(C.members.push(Z),Z.contact?.userId&&(s[Z.contact.userId]=!0))})}),e.forEach(C=>{C.type==="contact"&&C.contact?.userId&&!s[C.contact.userId]&&d.push(C)});let T=Array.from(v.values()),I=e.length?void 0:{type:"contact",contact:a},_=this.createFlattenedItems({allItems:e,contactsWithoutGroup:d,groups:T,newUserContact:I,isExpandedGroups:!0,isCustomGroups:!1,showMentionGroupsOnly:i.featureState.showMentionGroupsOnly,showMentionGroupsFirst:i.featureState.showMentionGroupsFirst});t.update(C=>h(m({},C),{data:h(m({},C.data),{flattenedItems:_,newUserContactError:c?void 0:"Invalid email",newUserContact:I,contactsWithoutGroup:d,groups:T})}))}catch(d){this.loggingService.catch("Error in AutocompleteActionService buildExpandedGroupItems:",d)}}filterCustomOptions(t,e){try{let i=t(),a=i.data.selectedAutocompleteData,c=i.data.autocompleteDataMap?.[a?.hotkey],d=c?.data?.slice()||[];if(i.featureState.customAutocompleteSearch||(e?d=d.filter(u=>u.name?.toLowerCase()?.includes(e?.toLowerCase())):d=a?.data?.slice()||[]),c?.groups&&c.groups.length>0){let u=[],v=new Map;c.groups?.forEach(_=>{v.set(_.id,{id:_.id,name:_.name,members:[]})}),d.forEach(_=>{let C={type:"custom",custom:_};_.groupId&&v.has(_.groupId)?v.get(_.groupId)?.members.push(C):u.push(C)});let T=Array.from(v.values()).filter(_=>_.members.length>0),I=this.createFlattenedItems({allItems:[],contactsWithoutGroup:u,groups:T,isExpandedGroups:!1,isCustomGroups:!0,showMentionGroupsOnly:i.featureState.showMentionGroupsOnly,showMentionGroupsFirst:i.featureState.showMentionGroupsFirst});t.update(_=>h(m({},_),{featureState:h(m({},_.featureState),{customGroupsEnabled:!0}),data:h(m({},_.data),{flattenedItems:I,contactsWithoutGroup:u,groups:T})}))}else{let u=d.map(T=>({type:"custom",custom:T})),v=this.createFlattenedItems({allItems:u,isExpandedGroups:!1,isCustomGroups:!1,showMentionGroupsOnly:i.featureState.showMentionGroupsOnly,showMentionGroupsFirst:i.featureState.showMentionGroupsFirst});t.update(T=>h(m({},T),{featureState:h(m({},T.featureState),{customGroupsEnabled:!1}),data:h(m({},T.data),{flattenedItems:v})}))}}catch(i){this.loggingService.catch("Error in AutocompleteActionService filterCustomOptions:",i)}}createFlattenedItems(t){try{let{allItems:e,contactsWithoutGroup:i,groups:a,newUserContact:c,isExpandedGroups:d=!1,isCustomGroups:s=!1,showMentionGroupsOnly:u=!1,showMentionGroupsFirst:v=!1}=t,T=[];if(d||s){if(!u&&!v&&i?.forEach((I,_)=>{let C=new mt;C.originalItem=I,C.disabled=!!I.disabled,C.id=s?`velt-option-custom-ungrouped-${_}`:`velt-option-user-${_}`,C.testId=s?`${this.componentId}-custom-ungrouped-${_}`:`${this.componentId}-user-${_}`,T.push(C)}),a?.forEach((I,_)=>{if(I?.members?.length){let C=new mt;C.originalItem={type:"group",group:I},C.isGroupHeader=!0,C.disabled=!0,C.group=I,C.id=s?`velt-option-custom-group-${_}`:`velt-option-group-${_}`,C.testId=s?`${this.componentId}-custom-group-${_}`:`${this.componentId}-group-${_}`,T.push(C),I.members.forEach((z,Z)=>{let ct=new mt;ct.originalItem=z,ct.isGroupMember=!0,ct.disabled=z.disabled||!1,ct.id=s?`velt-option-custom-group-${_}-member-${Z}`:`velt-option-group-${_}-member-${Z}`,ct.testId=s?`${this.componentId}-custom-group-${_}-member-${Z}`:`${this.componentId}-group-${_}-member-${Z}`,T.push(ct)})}}),!u&&v&&i?.length){let I=new mt;I.originalItem={type:"group"},I.isGroupHeader=!0,I.disabled=!0,I.groupName="Ungrouped",I.id="velt-option-ungrouped",I.testId=`${this.componentId}-ungrouped`,T.push(I),i.forEach((_,C)=>{let z=new mt;z.originalItem=_,z.isGroupMember=!0,z.disabled=_.disabled||!1,z.id=`velt-option-user-${C}`,z.testId=`${this.componentId}-user-${C}`,T.push(z)})}}else e.forEach((I,_)=>{let C=new mt;C.originalItem=I,C.disabled=I.disabled||!1,C.id=`velt-option-${_}`,C.testId=`${this.componentId}-${_}`,T.push(C)});if(c?.contact?.email){let I=new mt;I.originalItem=c,I.isNewContact=!0,I.id="velt-new-contact-option",I.testId=`${this.componentId}-new-contact`,T.push(I)}return T}catch(e){return this.loggingService.catch("Error in AutocompleteActionService createFlattenedItems:",e),[]}}addContact(t){try{let e=t();e.data.newUserContact?.contact&&(this.contactService.addUserContact(e.data.newUserContact.contact),t.update(i=>h(m({},i),{data:h(m({},i.data),{newUserContact:void 0})})))}catch(e){this.loggingService.catch("Error in AutocompleteActionService addContact:",e)}}callbackOnOptionSelected(t){try{this.contactService.onContactSelected(t)}catch(e){this.loggingService.catch("Error in AutocompleteActionService callbackOnOptionSelected:",e)}}triggerAutocompleteSearch(t,e,i){try{let a={event:t,searchText:e,type:i};this.commentActionsService?.autocompleteSearch(a)}catch(a){this.loggingService.catch("Error in AutocompleteActionService triggerAutocompleteSearch:",a)}}toggleSelection(t,e){try{let a=t().data.multiSelectItems||[],c=a.findIndex(s=>this.isSameItem(s,e)),d;return c>=0?d=[...a.slice(0,c),...a.slice(c+1)]:d=[...a,e],t.update(s=>h(m({},s),{data:h(m({},s.data),{multiSelectItems:d})})),d}catch(i){return this.loggingService.catch("Error in AutocompleteActionService toggleSelection:",i),[]}}confirmSelection(t){try{let i=t().data.multiSelectItems||[];return t.update(a=>h(m({},a),{data:h(m({},a.data),{multiSelectItems:[]})})),[...i]}catch(e){return this.loggingService.catch("Error in AutocompleteActionService confirmSelection:",e),[]}}isSameItem(t,e){try{return t.type!==e.type?!1:t.type==="contact"&&e.type==="contact"?t.contact?.userId&&e.contact?.userId?t.contact.userId===e.contact.userId:t.contact?.email&&e.contact?.email?t.contact.email===e.contact.email:!1:t.type==="custom"&&e.type==="custom"?t.custom?.id&&e.custom?.id?t.custom.id===e.custom.id:!1:t.type==="group"&&e.type==="group"&&t.group?.metadata?.groupId&&e.group?.metadata?.groupId?t.group.metadata.groupId===e.group.metadata.groupId:!1}catch{return!1}}filterContacts(t,e){try{let i=e.email?.toLowerCase();return t?.filter(a=>a?.email?.includes(i)||a?.name?.toLowerCase()?.includes(i)||a?.organizationName?.toLowerCase()?.includes(i))}catch(i){return this.loggingService.catch("Error in AutocompleteActionService _filterContacts:",i),[]}}filterGroups(t,e){try{return t?.filter(i=>i?.metadata?.groupName?.toLowerCase()?.includes(e?.toLowerCase()))}catch(i){return this.loggingService.catch("Error in AutocompleteActionService _filterGroups:",i),[]}}filterCustomItems(t,e){try{return t?.filter(i=>i.name?.toLowerCase()?.includes(e?.toLowerCase()))||[]}catch(i){return this.loggingService.catch("Error in AutocompleteActionService filterCustomItems:",i),[]}}fetchFilteredUsersFromDb(t){return vt(this,null,function*(){try{yield this.contactService.searchUsers(t)}catch(e){this.loggingService.catch("Error in AutocompleteActionService fetchFilteredUsersFromDb:",e)}})}};r.\u0275fac=function(e){return new(e||r)(H(Qt),H(bt),H(L),H(At))},r.\u0275prov=et({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var te=(()=>{let r=class r{constructor(t){this.loggingService=t,this.subscribers=new Set}register(t){try{if(this.subscribers.add(t),this.lastPayload)try{t(this.lastPayload)}catch(e){this.loggingService.catch("[AUTOCOMPLETE REGISTRY] Error initializing subscriber:",e)}}catch(e){this.loggingService.catch("[AUTOCOMPLETE REGISTRY] Error in register:",e)}}unregister(t){try{this.subscribers.delete(t)}catch(e){this.loggingService.catch("[AUTOCOMPLETE REGISTRY] Error in unregister:",e)}}broadcast(t){try{this.lastPayload=t,this.subscribers.forEach(e=>{try{e(t)}catch(i){this.loggingService.catch("[AUTOCOMPLETE REGISTRY] Error in subscriber:",i)}})}catch(e){this.loggingService.catch("[AUTOCOMPLETE REGISTRY] Error in broadcast:",e)}}getLastPayload(){try{return this.lastPayload}catch(t){this.loggingService.catch("[AUTOCOMPLETE REGISTRY] Error in getLastPayload:",t);return}}};r.\u0275fac=function(e){return new(e||r)(H(L))},r.\u0275prov=et({token:r,factory:r.\u0275fac});let n=r;return n})();function ce(n,r){try{let o=r?.trim();return o?(n||[]).find(t=>t?.userId===o):void 0}catch{return}}function qe(n,r,o){try{let t=o?.trim();return t?n||(r?.userId===t?r:void 0):void 0}catch{return}}var ee=class{constructor(r){this.options=r,this.published=!1}finalize(){try{let r=this.options.getHost();if(!r)return;this.publish(r,_t(r)?.payload),De(r,this.options.ownerRef,()=>this.refreshFromPlacement())}catch{}}refreshFromPlacement(){try{let r=this.options.getHost();if(!r)return;let o=_t(r)?.payload,t=o?.contextData||{},e=!Pn(this.lastContextData,t)||this.lastAnnotationId!==o?.annotationId,i=this.lastEntity!==this.readOwnEntity(),a=this.lastLocalUIState!==this.readOwnLocalUIState(),c=this.lastInheritedEntity!==o?.data;if(this.published&&!e&&!i&&!a&&!c)return;this.options.onContextChanged?.(),this.publish(r,o),this.options.markForCheck?.()}catch{}}destroy(){try{let r=this.options.getHost();ke(r,this.options.ownerRef),we(r,this.options.ownerRef),this.published=!1}catch{}}getInheritedContextData(){try{return _t(this.options.getHost())?.payload?.contextData||{}}catch{return{}}}getInheritedEntity(){try{return _t(this.options.getHost())?.payload?.data}catch{return}}getInheritedLocalUIState(){try{return _t(this.options.getHost())?.payload?.localUIState}catch{return}}adoptInheritedLocalUIState(r){return Xt(h(m({},r),{host:this.options.getHost()}))}publish(r,o){let t=this.readOwnEntity(),e=this.readOwnLocalUIState();ye(r,Ie({host:r,inherited:o,ownData:t,ownLocalUIState:e,ownerRef:this.options.ownerRef})),this.lastContextData=o?.contextData||{},this.lastAnnotationId=o?.annotationId,this.lastEntity=t,this.lastLocalUIState=e,this.lastInheritedEntity=o?.data,this.published=!0}readOwnEntity(){if(this.options.getEntity)try{return oe(()=>this.options.getEntity())}catch{return}}readOwnLocalUIState(){if(this.options.getLocalUIState)try{return oe(()=>this.options.getLocalUIState())}catch{return}}};function Pn(n,r){try{if(n===r)return!0;if(!n||!r)return!1;let o=Object.keys(n);return o.length!==Object.keys(r).length?!1:o.every(t=>n[t]===r[t])}catch{return!1}}var q=(()=>{let r=class r extends Ge{set parentLocalUIState(t){t&&(this.localUIStateSignal=t,this.isLocalUIStateOwner=!1)}get elementRef(){return this.hostElementRef}constructor(){let t=Q(ot),e=Q(Zt),i=Q(xe),a=Q(At).get(ut),c=Q(b),d=Q(L);super(t,e,i,a??void 0,void 0,c,d),this.autocompleteId=re(),this.defaultCondition=re(!0,{transform:s=>{try{return typeof s=="string"?s==="true"||s==="":s}catch{return!0}}}),this._contextData={},this.isLocalUIStateOwner=!1,this.isContextInitialized=!1,this.registryCheckAttempts=0,this.MAX_REGISTRY_CHECK_ATTEMPTS=50,this.veltContextHost=new ee({getHost:()=>this.hostElementRef?.nativeElement,ownerRef:this,getLocalUIState:()=>this.isLocalUIStateOwner?this.localUIStateSignal:void 0,getEntity:()=>this.getPublishedVeltEntity(),onContextChanged:()=>{this.adoptInheritedLocalUIState(),this.inheritSelectorItemFromContext(),this.onVeltContextChanged()},markForCheck:()=>this.cd?.markForCheck?.()}),this.onContextPayload=s=>{try{this.isContextInitialized||(this.isContextInitialized=!0),this._autocompleteId=s.autocompleteId,this._contextData=s.contextData||{};let u=this.coreService.getContextConfig(s.autocompleteId);u&&(this.componentConfigSignal.update(v=>m({},v)),this.componentConfigSignal=u,this.cd.markForCheck())}catch(u){this.loggingService.catch("Error in AutocompletePrimitiveThemedComponent onContextPayload:",u)}},this.isLocalUIStateRoot=!1,this.hostElementRef=t,this.themeService=e,this.dynamicDataService=c,this.loggingService=d,this.coreService=Q(Qt),this.actionService=Q(Ze),this.cd=i,this.commentService=a??void 0,this.registry=Q(te,{optional:!0})??void 0,this._userIdContactService=Q(bt),this._userIdAuthService=Q(Mt),this.initializeLocalUIState()}resolveUserIdToContact(t,e){try{this._userIdValue=t,this._userIdApply=e,this._userIdSub?.unsubscribe(),this._userIdSub=void 0;let i=t?.trim();if(!i){e(void 0),this.flushChangeDetection();return}let a=this._userIdContactService.getInternalUserContacts()??[],c=ce(a,i);if(c){e(c),this.publishResolvedEntityToDescendants(),this.flushChangeDetection();return}this._userIdSub=$t([this._userIdContactService.getUserByUserId$(i),this._userIdAuthService.getUser$(),this._userIdContactService.getInternalUserContacts$()]).subscribe(([d,s,u])=>{try{let v=ce(u??[],i)??qe(d,s,i);e(v),this.publishResolvedEntityToDescendants(),this.flushChangeDetection()}catch(v){this.loggingService.catch("Error resolving userId user:",v)}})}catch(i){this.loggingService.catch("Error looking up userId:",i)}}flushChangeDetection(){try{this.cd?.detectChanges?.()}catch{try{this.cd?.markForCheck?.()}catch{}}}cancelUserIdResolution(){this._userIdSub?.unsubscribe(),this._userIdSub=void 0}resolveUserObjectToContact(t,e){try{if(!t){this._userIdValue?.trim()?this.resolveUserIdToContact(this._userIdValue,this._userIdApply??e):(e(void 0),this.flushChangeDetection());return}this.cancelUserIdResolution();let i=typeof t=="string"?JSON.parse(t):t;e(i),this.flushChangeDetection()}catch(i){this.loggingService.catch("Error parsing userObject:",i)}}initializeLocalUIState(){try{let t=Q(Ye,{optional:!0,skipSelf:!0});t?(this.localUIStateSignal=t,this.isLocalUIStateOwner=!1):(this.localUIStateSignal=A(le()),this.isLocalUIStateOwner=!0)}catch{this.localUIStateSignal=A(le()),this.isLocalUIStateOwner=!0}}ngOnInit(){try{super.ngOnInit();let t=this.autocompleteId();if(!t){let i=this.hostElementRef?.nativeElement?.getAttribute?.("autocomplete-id");i&&(t=i)}if(this.componentConfigSignal&&this.componentConfigSignal()&&Object.keys(this.componentConfigSignal()).length>0){this.initializeFromConfigSignal(this.componentConfigSignal),this.setupA11yAttributes(),this.setupDarkModeSync(),this.finalizeVeltContext();return}if(t){this._autocompleteId=t,this.initializeFromAutocompleteId(t),this.setupA11yAttributes(),this.setupDarkModeSync(),this.finalizeVeltContext();return}let e=this.findNearestParentWrapperRegistry();if(e){this.registry=e,this.registry.register(this.onContextPayload);let i=this.registry.getLastPayload?.();i&&this.onContextPayload(i),this.setupA11yAttributes(),this.setupDarkModeSync(),this.finalizeVeltContext();return}if(this.registry){this.registry.register(this.onContextPayload);let i=this.registry.getLastPayload?.();i&&this.onContextPayload(i),this.setupA11yAttributes(),this.setupDarkModeSync(),this.finalizeVeltContext();return}this.tryRegisterWithContext(),this.setupA11yAttributes(),this.setupDarkModeSync(),this.finalizeVeltContext()}catch(t){this.loggingService.catch("Error in AutocompletePrimitiveThemedComponent ngOnInit:",t)}}finalizeVeltContext(){try{this.adoptInheritedLocalUIState(),this.inheritSelectorItemFromContext(),this.veltContextHost.finalize()}catch(t){this.loggingService?.catch?.("Error in AutocompletePrimitiveThemedComponent finalizeVeltContext:",t)}}refreshVeltContextFromPlacement(){this.veltContextHost.refreshFromPlacement()}onVeltContextChanged(){}getPublishedVeltEntity(){}getInheritedVeltContextData(){try{return _t(this.hostElementRef?.nativeElement)?.payload?.contextData||{}}catch{return{}}}getInheritedVeltEntity(){try{return Oe(this.hostElementRef?.nativeElement)}catch{return}}inheritSelectorItemFromContext(){try{let t=this.getInheritedVeltEntity(),e=this.selectorItem;if(e&&e!==this._lastInheritedSelectorItem)return;t&&t!==e&&(this.selectorItem=t,this._lastInheritedSelectorItem=t,this.flushChangeDetection())}catch(t){this.loggingService?.catch?.("Error in AutocompletePrimitiveThemedComponent inheritSelectorItemFromContext:",t)}}publishResolvedEntityToDescendants(){try{let t=this.hostElementRef?.nativeElement;if(!t)return;this.veltContextHost.refreshFromPlacement(),Tt(t)}catch{}}ngOnDestroy(){try{this.veltContextHost.destroy(),this.registryCheckTimer&&(clearTimeout(this.registryCheckTimer),this.registryCheckTimer=void 0),this.registry&&this.registry.unregister(this.onContextPayload),this.darkModeConfigSyncSubscription&&this.darkModeConfigSyncSubscription.unsubscribe(),this._userIdSub?.unsubscribe(),this._userIdSub=void 0,super.ngOnDestroy()}catch(t){this.loggingService.catch("Error in AutocompletePrimitiveThemedComponent ngOnDestroy:",t)}}setupA11yAttributes(){}setupDarkModeSync(){try{this.darkModeConfigSyncSubscription=this.onDarkModeChange().subscribe(t=>{try{if(this.componentConfigSignal&&typeof this.componentConfigSignal=="function"){let e=this.componentConfigSignal();e&&e.appState&&e.appState.darkMode!==t&&this.componentConfigSignal.update(i=>h(m({},i),{appState:h(m({},i.appState),{darkMode:t})}))}}catch(e){this.loggingService.catch("Error in darkMode sync subscription:",e)}})}catch(t){this.loggingService.catch("Error in AutocompletePrimitiveThemedComponent setupDarkModeSync:",t)}}findNearestParentWrapperRegistry(){try{let t=this.hostElementRef?.nativeElement;if(!t)return;let e=t.parentElement;for(;e;){if(e.tagName?.toLowerCase()==="velt-autocomplete-context-wrapper"){let i=e.__veltContext;if(i?.registry instanceof te)return i.contextData&&(this._contextData=i.contextData),i.registry;let a=window.ng;if(a?.getComponent){let d=a.getComponent(e);if(d?.registry)return d.registry}let c=e.__ngContext__;if(c&&Array.isArray(c))for(let d=0;d<c.length;d++){let s=c[d];if(s&&typeof s=="object"&&s.registry instanceof te)return s.registry}}e=e.parentElement}}catch(t){this.loggingService.catch("[AUTOCOMPLETE PRIMITIVE BASE] Error finding parent wrapper registry:",t)}}tryRegisterWithContext(){try{let t=this.coreService.findParentAutocompleteId(this.hostElementRef);if(!t){this.registryCheckAttempts<this.MAX_REGISTRY_CHECK_ATTEMPTS&&(this.registryCheckAttempts++,this.registryCheckTimer=setTimeout(()=>this.tryRegisterWithContext(),10));return}this.registry=this.coreService.getRegistry(t),this.registry?this.registry.register(this.onContextPayload):this.registryCheckAttempts<this.MAX_REGISTRY_CHECK_ATTEMPTS?(this.registryCheckAttempts++,this.registryCheckTimer=setTimeout(()=>this.tryRegisterWithContext(),10)):this.initializeFromDOM(t)}catch(t){this.loggingService.catch("Error in AutocompletePrimitiveThemedComponent tryRegisterWithContext:",t)}}initializeFromDOM(t){try{this._autocompleteId=t;let e=this.coreService.getContextConfig(t);e&&(this.componentConfigSignal.update(i=>m({},i)),this.componentConfigSignal=e,this.isContextInitialized=!0,this.cd.markForCheck())}catch(e){this.loggingService.catch("Error in AutocompletePrimitiveThemedComponent initializeFromDOM:",e)}}initializeFromAutocompleteId(t){try{this._autocompleteId=t;let e=this.coreService.getOrCreateContextConfig(t);this.componentConfigSignal.update(i=>m({},i)),this.componentConfigSignal=e,this.isContextInitialized=!0,this.cd.markForCheck()}catch(e){this.loggingService.catch("Error in AutocompletePrimitiveThemedComponent initializeFromAutocompleteId:",e)}}initializeFromConfigSignal(t){try{this.isContextInitialized=!0,this.cd.markForCheck()}catch(e){this.loggingService.catch("Error in AutocompletePrimitiveThemedComponent initializeFromConfigSignal:",e)}}getContextValue(t){try{let e=this._contextData[t];if(e!=null)return e;let i=this.hostElementRef?.nativeElement?.getAttribute(t);return i!==null?i:void 0}catch(e){this.loggingService.catch("Error in AutocompletePrimitiveThemedComponent getContextValue:",e);return}}adoptInheritedLocalUIState(){try{Xt({host:this.hostElementRef?.nativeElement,current:this.localUIStateSignal,isOwner:this.isLocalUIStateOwner,isRoot:this.isLocalUIStateRoot,adopt:t=>{this.localUIStateSignal=t,this.isLocalUIStateOwner=!1}})}catch(t){this.loggingService?.catch?.("Error in AutocompletePrimitiveThemedComponent adoptInheritedLocalUIState:",t)}}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=P({type:r,selectors:[["app-autocomplete-primitive-themed-base"]],inputs:{autocompleteId:[1,"autocompleteId"],defaultCondition:[1,"defaultCondition"],parentLocalUIState:"parentLocalUIState"},standalone:!1,features:[N],decls:0,vars:0,template:function(e,i){},encapsulation:2});let n=r;return n})();var Rn=(n,r)=>({componentConfigSignal:n,parentLocalUIState:r}),Fn=(n,r)=>({condition:n,data:r}),jn=n=>({componentConfigSignal:n}),Un=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-chip-tooltip-description-wireframe",variant:o,setIfCondition:t,componentElementRef:e}),Nn=()=>({});function Vn(n,r){n&1&&B(0)}function Ln(n,r){if(n&1&&g(0,Vn,1,0,"ng-container",5),n&2){l(2);let o=W(3);p("ngTemplateOutlet",o)}}function Bn(n,r){n&1&&B(0)}function $n(n,r){if(n&1&&g(0,Bn,1,0,"ng-container",5),n&2){l(2);let o=W(5);p("ngTemplateOutlet",o)}}function zn(n,r){n&1&&B(0)}function Gn(n,r){if(n&1&&g(0,zn,1,0,"ng-container",5),n&2){l(2);let o=W(7);p("ngTemplateOutlet",o)}}function Hn(n,r){if(n&1&&(S(0),w(1,Ln,1,1,"ng-container")(2,$n,1,1,"ng-container")(3,Gn,1,1,"ng-container"),y()),n&2){let o=l(2);f(),E((o==null?null:o.type)==="contact"?1:(o==null?null:o.type)==="custom"?2:(o==null?null:o.type)==="group"?3:-1)}}function Wn(n,r){if(n&1&&(V(0),j(1,"translate")),n&2){let o=l(2);X(" ",U(1,1,(o==null||o.contact==null?null:o.contact.email)||(o==null?null:o.email))," ")}}function Jn(n,r){if(n&1&&(V(0),j(1,"translate")),n&2){let o=l(2);X(" ",U(1,1,o==null||o.custom==null||o.custom.custom==null?null:o.custom.custom.description)," ")}}function Kn(n,r){if(n&1&&(V(0),j(1,"translate")),n&2){let o,t=l(3),e=l();Yt(" ",(o=e.objectKeys((t==null||t.group==null||t.group.group==null?null:t.group.group.users)||Nt(4,Nn)))==null?null:o.length," ",U(1,2,"members")," ")}}function Yn(n,r){if(n&1&&w(0,Kn,2,5),n&2){let o=l(2);E(!(o==null||o.group==null)&&o.group.group?0:-1)}}function Xn(n,r){if(n&1&&(S(0),g(1,Hn,4,1,"ng-container",4)(2,Wn,2,3,"ng-template",null,0,J)(4,Jn,2,3,"ng-template",null,1,J)(6,Yn,1,1,"ng-template",null,2,J),y()),n&2){let o=l(),t=l();f(),p("veltDynamicTemplate",$(3,Un,t.template,F(1,jn,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function Zn(n,r){if(n&1&&g(0,Xn,8,9,"ng-container",3),n&2){let o=l();p("veltIf",O(4,Fn,o.conditionSignal(),O(1,Rn,o.componentConfigSignal,o.localUIStateSignal)))}}var Qe=(()=>{let r=class r extends q{set userObject(t){this.resolveUserObjectToContact(t,e=>{this.componentConfigSignal.update(i=>h(m({},i),{type:"contact",contact:e}))})}set userId(t){this.resolveUserIdToContact(t,e=>{this.componentConfigSignal.update(i=>h(m({},i),{type:"contact",contact:e}))})}constructor(){super(),this.componentId="velt-autocomplete-chip-tooltip-description",this.objectKeys=Object.keys,this.componentConfigSignal=A({})}ngOnInit(){try{super.ngOnInit()}catch(t){this.loggingService.catch("Error in AutocompleteChipTooltipDescriptionComponent ngOnInit:",t)}}ngOnDestroy(){try{this._userIdSub?.unsubscribe(),super.ngOnDestroy()}catch(t){this.loggingService.catch("Error in AutocompleteChipTooltipDescriptionComponent ngOnDestroy:",t)}}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=P({type:r,selectors:[["velt-autocomplete-chip-tooltip-description-internal"]],inputs:{userObject:"userObject",userId:"userId"},standalone:!1,features:[R([b]),N],decls:1,vars:1,consts:[["contacEmailRef",""],["customDescriptionRef",""],["groupDescriptionRef",""],[4,"veltIf"],[4,"veltDynamicTemplate"],[4,"ngTemplateOutlet"]],template:function(e,i){if(e&1&&w(0,Zn,1,7,"ng-container"),e&2){let a;E((a=i.componentConfigSignal())?0:-1,a)}},styles:["[_nghost-%COMP%]:empty{display:none}"],changeDetection:0});let n=r;return n})();function ht(n,r){n&&(n.setAttribute("role","presentation"),n.setAttribute("data-testid",r+"-container"))}var qn=(n,r)=>({componentConfigSignal:n,parentLocalUIState:r}),Qn=(n,r)=>({condition:n,data:r}),to=n=>({componentConfigSignal:n}),eo=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-chip-tooltip-icon-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function no(n,r){n&1&&B(0)}function oo(n,r){if(n&1&&g(0,no,1,0,"ng-container",5),n&2){l(2);let o=W(3);p("ngTemplateOutlet",o)}}function ro(n,r){n&1&&B(0)}function io(n,r){if(n&1&&g(0,ro,1,0,"ng-container",5),n&2){l(2);let o=W(5);p("ngTemplateOutlet",o)}}function ao(n,r){n&1&&B(0)}function lo(n,r){if(n&1&&g(0,ao,1,0,"ng-container",5),n&2){l(2);let o=W(7);p("ngTemplateOutlet",o)}}function co(n,r){if(n&1&&(S(0),w(1,oo,1,1,"ng-container")(2,io,1,1,"ng-container")(3,lo,1,1,"ng-container"),y()),n&2){let o=l(2);f(),E((o==null?null:o.type)==="contact"?1:(o==null?null:o.type)==="custom"?2:(o==null?null:o.type)==="group"?3:-1)}}function so(n,r){if(n&1&&Y(0,"snippyly-user-avatar",6),n&2){let o=l(2);p("size",32)("user",o==null?null:o.contact)}}function mo(n,r){if(n&1&&(Y(0,"div",7),j(1,"safeSvg")),n&2){let o=l(3);p("innerHtml",U(1,1,o==null||o.custom==null||o.custom.custom==null||o.custom.custom.icon==null?null:o.custom.custom.icon.svg),Gt)}}function po(n,r){if(n&1&&(x(0,"div",8),Y(1,"img",9),k()),n&2){let o=l(3);f(),p("src",o==null||o.custom==null||o.custom.custom==null||o.custom.custom.icon==null?null:o.custom.custom.icon.url,Ht)}}function vo(n,r){if(n&1&&(w(0,mo,2,3,"div",7),w(1,po,2,1,"div",8)),n&2){let o=l(2);E(!(o==null||o.custom==null||o.custom.custom==null||o.custom.custom.icon==null)&&o.custom.custom.icon.svg?0:-1),f(),E(!(o==null||o.custom==null||o.custom.custom==null||o.custom.custom.icon==null)&&o.custom.custom.icon.url?1:-1)}}function go(n,r){n&1&&(x(0,"div",10),st(),x(1,"svg",11),Y(2,"path",12),k()())}function uo(n,r){if(n&1&&(S(0),g(1,co,4,1,"ng-container",4)(2,so,1,2,"ng-template",null,0,J)(4,vo,2,2,"ng-template",null,1,J)(6,go,3,0,"ng-template",null,2,J),y()),n&2){let o=l(),t=l();f(),p("veltDynamicTemplate",$(3,eo,t.template,F(1,to,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function ho(n,r){if(n&1&&g(0,uo,8,9,"ng-container",3),n&2){let o=l();p("veltIf",O(4,Qn,o.conditionSignal(),O(1,qn,o.componentConfigSignal,o.localUIStateSignal)))}}var en=(()=>{let r=class r extends q{set userObject(t){this.resolveUserObjectToContact(t,e=>{this.componentConfigSignal.update(i=>h(m({},i),{type:"contact",contact:e}))})}set userId(t){this.resolveUserIdToContact(t,e=>{this.componentConfigSignal.update(i=>h(m({},i),{type:"contact",contact:e}))})}constructor(){super(),this.componentId="velt-autocomplete-chip-tooltip-icon",this.componentConfigSignal=A({})}ngOnInit(){try{super.ngOnInit()}catch(t){this.loggingService.catch("Error in AutocompleteChipTooltipIconComponent ngOnInit:",t)}}ngOnDestroy(){try{this._userIdSub?.unsubscribe(),super.ngOnDestroy()}catch(t){this.loggingService.catch("Error in AutocompleteChipTooltipIconComponent ngOnDestroy:",t)}}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=P({type:r,selectors:[["velt-autocomplete-chip-tooltip-icon-internal"]],inputs:{userObject:"userObject",userId:"userId"},standalone:!1,features:[R([b]),N],decls:1,vars:1,consts:[["contactAvatarRef",""],["customIconRef",""],["groupIconRef",""],[4,"veltIf"],[4,"veltDynamicTemplate"],[4,"ngTemplateOutlet"],[1,"comment-dialog-user-avatar",3,"size","user"],[1,"velt-autocomplete-chip-tooltip--icon-svg",3,"innerHtml"],[1,"velt-autocomplete-chip-tooltip--icon-img"],[3,"src"],[1,"velt-autocomplete-chip-tooltip--group-icon","velt-autocomplete-chip-tooltip--icon-svg"],["xmlns","http://www.w3.org/2000/svg","fill","rgb(233, 242, 255)","width","16","height","16","viewBox","0 0 16 16",1,"bi","bi-people-fill"],["d","M7 14s-1 0-1-1 1-4 5-4 5 3 5 4-1 1-1 1zm4-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6m-5.784 6A2.24 2.24 0 0 1 5 13c0-1.355.68-2.75 1.936-3.72A6.3 6.3 0 0 0 5 9c-4 0-5 3-5 4s1 1 1 1zM4.5 8a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5"]],template:function(e,i){if(e&1&&w(0,ho,1,7,"ng-container"),e&2){let a;E((a=i.componentConfigSignal())?0:-1,a)}},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent)}[_nghost-%COMP%]:empty{display:none}[dark][_nghost-%COMP%]{--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--velt-border-transparent: var(--velt-dark-mode-border-transparent);--velt-animation-transparent: var(--velt-dark-mode-animation-transparent)}.velt-autocomplete-chip-tooltip--group-icon[_ngcontent-%COMP%]{width:100%;height:100%;padding:var(--velt-spacing-xs);display:flex;align-items:center;justify-content:center;background:linear-gradient(0deg,#ffffff0a,#ffffff0a),linear-gradient(0deg,#3772ff14,#3772ff14);box-sizing:border-box}.velt-autocomplete-chip-tooltip--icon-svg[_ngcontent-%COMP%]{display:flex;width:100%;height:100%;align-items:center;justify-content:center;color:var(--velt-text-0)}.velt-autocomplete-chip-tooltip--icon-img[_ngcontent-%COMP%]{display:flex;width:100%;height:100%;align-items:center;justify-content:center}.velt-autocomplete-chip-tooltip--icon-img[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:16px;height:16px;object-fit:cover}"],changeDetection:0});let n=r;return n})();var fo=(n,r)=>({componentConfigSignal:n,parentLocalUIState:r}),Co=(n,r)=>({condition:n,data:r}),_o=n=>({componentConfigSignal:n}),bo=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-chip-tooltip-name-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function xo(n,r){n&1&&B(0)}function So(n,r){if(n&1&&g(0,xo,1,0,"ng-container",5),n&2){l(2);let o=W(3);p("ngTemplateOutlet",o)}}function yo(n,r){n&1&&B(0)}function ko(n,r){if(n&1&&g(0,yo,1,0,"ng-container",5),n&2){l(2);let o=W(5);p("ngTemplateOutlet",o)}}function Io(n,r){n&1&&B(0)}function Oo(n,r){if(n&1&&g(0,Io,1,0,"ng-container",5),n&2){l(2);let o=W(7);p("ngTemplateOutlet",o)}}function Do(n,r){if(n&1&&(S(0),w(1,So,1,1,"ng-container")(2,ko,1,1,"ng-container")(3,Oo,1,1,"ng-container"),y()),n&2){let o=l(2);f(),E((o==null?null:o.type)==="contact"?1:(o==null?null:o.type)==="custom"?2:(o==null?null:o.type)==="group"?3:-1)}}function wo(n,r){if(n&1&&(V(0),j(1,"translate")),n&2){let o=l(2);X(" ",U(1,1,o==null||o.contact==null?null:o.contact.name)," ")}}function Eo(n,r){if(n&1&&(V(0),j(1,"translate")),n&2){let o=l(2);X(" ",U(1,1,o==null||o.custom==null||o.custom.custom==null?null:o.custom.custom.name)," ")}}function To(n,r){if(n&1&&(V(0),j(1,"translate")),n&2){let o=l(2);X(" ",U(1,1,(o==null||o.group==null||o.group.group==null||o.group.group.metadata==null?null:o.group.group.metadata.groupName)||(o==null||o.group==null?null:o.group.text))," ")}}function Ao(n,r){if(n&1&&(S(0),g(1,Do,4,1,"ng-container",4)(2,wo,2,3,"ng-template",null,0,J)(4,Eo,2,3,"ng-template",null,1,J)(6,To,2,3,"ng-template",null,2,J),y()),n&2){let o=l(),t=l();f(),p("veltDynamicTemplate",$(3,bo,t.template,F(1,_o,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function Mo(n,r){if(n&1&&g(0,Ao,8,9,"ng-container",3),n&2){let o=l();p("veltIf",O(4,Co,o.conditionSignal(),O(1,fo,o.componentConfigSignal,o.localUIStateSignal)))}}var nn=(()=>{let r=class r extends q{set userObject(t){this.resolveUserObjectToContact(t,e=>{this.componentConfigSignal.update(i=>h(m({},i),{type:"contact",contact:e}))})}set userId(t){this.resolveUserIdToContact(t,e=>{this.componentConfigSignal.update(i=>h(m({},i),{type:"contact",contact:e}))})}constructor(){super(),this.componentId="velt-autocomplete-chip-tooltip-name",this.componentConfigSignal=A({})}ngOnInit(){try{super.ngOnInit()}catch(t){this.loggingService.catch("Error in AutocompleteChipTooltipNameComponent ngOnInit:",t)}}ngOnDestroy(){try{this._userIdSub?.unsubscribe(),super.ngOnDestroy()}catch(t){this.loggingService.catch("Error in AutocompleteChipTooltipNameComponent ngOnDestroy:",t)}}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=P({type:r,selectors:[["velt-autocomplete-chip-tooltip-name-internal"]],inputs:{userObject:"userObject",userId:"userId"},standalone:!1,features:[R([b]),N],decls:1,vars:1,consts:[["contactNameRef",""],["customNameRef",""],["groupNameRef",""],[4,"veltIf"],[4,"veltDynamicTemplate"],[4,"ngTemplateOutlet"]],template:function(e,i){if(e&1&&w(0,Mo,1,7,"ng-container"),e&2){let a;E((a=i.componentConfigSignal())?0:-1,a)}},styles:["[_nghost-%COMP%]:empty{display:none}"],changeDetection:0});let n=r;return n})();var Po=(n,r)=>({componentConfigSignal:n,parentLocalUIState:r}),Ro=(n,r)=>({condition:n,data:r}),Fo=n=>({componentConfigSignal:n}),jo=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-chip-tooltip-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function Uo(n,r){n&1&&B(0)}function No(n,r){if(n&1&&(x(0,"velt-shadow-dom-internal"),g(1,Uo,1,0,"ng-container",2),k()),n&2){l();let o=W(4);f(),p("ngTemplateOutlet",o)}}function Vo(n,r){n&1&&B(0)}function Lo(n,r){if(n&1&&g(0,Vo,1,0,"ng-container",2),n&2){l();let o=W(4);p("ngTemplateOutlet",o)}}function Bo(n,r){if(n&1&&(x(0,"div",4)(1,"div",5),Y(2,"velt-autocomplete-chip-tooltip-icon-internal",6),k(),x(3,"div",7)(4,"div",8),Y(5,"velt-autocomplete-chip-tooltip-name-internal",6),k(),x(6,"div",9),Y(7,"velt-autocomplete-chip-tooltip-description-internal",6),k()()()),n&2){let o=l(4);f(2),p("componentConfigSignal",o.componentConfigSignal),f(3),p("componentConfigSignal",o.componentConfigSignal),f(2),p("componentConfigSignal",o.componentConfigSignal)}}function $o(n,r){if(n&1&&g(0,Bo,8,3,"div",3),n&2){let o=l(2),t=l();p("veltDynamicTemplate",$(3,jo,t.template,F(1,Fo,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function zo(n,r){if(n&1&&(S(0),w(1,No,2,1,"velt-shadow-dom-internal")(2,Lo,1,1,"ng-container"),g(3,$o,1,9,"ng-template",null,0,J),y()),n&2){let o=l(2);f(),E(o.shadowDom&&!o.template||o.template&&o.isExplicitShadowDom?1:2)}}function Go(n,r){if(n&1&&g(0,zo,5,1,"ng-container",1),n&2){let o=l();p("veltIf",O(4,Ro,o.conditionSignal(),O(1,Po,o.componentConfigSignal,o.localUIStateSignal)))}}var on=(()=>{let r=class r extends q{set shadowDom(t){this._shadowDom=t}get shadowDom(){return this._shadowDom}set userObject(t){this.resolveUserObjectToContact(t,e=>{this.componentConfigSignal.update(i=>h(m({},i),{type:"contact",contact:e}))})}set userId(t){this.resolveUserIdToContact(t,e=>{this.componentConfigSignal.update(i=>h(m({},i),{type:"contact",contact:e}))})}constructor(){super(),this.componentId="velt-autocomplete-chip-tooltip",this._shadowDom=!1,this.isExplicitShadowDom=!1,this.componentConfigSignal=A({}),this.subscriptions=[],this.wireframeService=Q(Pt)}ngOnInit(){try{super.ngOnInit();let t=this.elementRef.nativeElement,e=t.getAttribute("shadow-dom")??t.getAttribute("shadowdom");this.isExplicitShadowDom=e!==null&&e!=="false",this.loggingService.log("%c[WB] Calling FUNCTION: ngOnInit","color: green;"),this.subscriptions.push(this.wireframeService.getWireframe$("velt-autocomplete-chip-tooltip-wireframe").subscribe(a=>{if(a){let c=document.createElement(a.tagName);c.innerHTML=a.innerHTML,this.template=c}}))}catch(t){this.loggingService.catch("Error in AutocompleteChipTooltipComponent OnInit: ",t)}}ngOnDestroy(){try{this._userIdSub?.unsubscribe(),super.ngOnDestroy(),this.subscriptions.forEach(t=>{t.unsubscribe()})}catch{}}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=P({type:r,selectors:[["velt-autocomplete-chip-tooltip-internal"]],inputs:{shadowDom:"shadowDom",variant:"variant",userObject:"userObject",userId:"userId"},standalone:!1,features:[R([b]),N],decls:1,vars:1,consts:[["tooltipContainerRef",""],[4,"veltIf"],[4,"ngTemplateOutlet"],["class","velt-autocomplete-chip-tooltip",4,"veltDynamicTemplate"],[1,"velt-autocomplete-chip-tooltip"],[1,"velt-autocomplete-chip-tooltip--icon"],[3,"componentConfigSignal"],[1,"velt-autocomplete-chip-tooltip--content"],[1,"velt-autocomplete-chip-tooltip--name"],[1,"velt-autocomplete-chip-tooltip--description"]],template:function(e,i){if(e&1&&w(0,Go,1,7,"ng-container"),e&2){let a;E((a=i.componentConfigSignal())?0:-1,a)}},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent)}[_nghost-%COMP%]:empty{display:none}[dark][_nghost-%COMP%]{--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--velt-border-transparent: var(--velt-dark-mode-border-transparent);--velt-animation-transparent: var(--velt-dark-mode-animation-transparent)}.velt-autocomplete-chip-tooltip[_ngcontent-%COMP%]{display:flex;background:var(--velt-background-0);border-radius:var(--velt-border-radius-sm);padding:var(--velt-spacing-md);margin:var(--velt-spacing-xs) 0;box-shadow:0 4px 21px #00000014;gap:var(--velt-spacing-md);max-width:256px;line-height:1.3;align-items:center}.velt-autocomplete-chip-tooltip[_ngcontent-%COMP%] .velt-autocomplete-chip-tooltip--icon[_ngcontent-%COMP%]{width:32px;height:32px;border-radius:var(--velt-border-radius-full);overflow:hidden;flex-shrink:0}.velt-autocomplete-chip-tooltip[_ngcontent-%COMP%] .velt-autocomplete-chip-tooltip--icon[_ngcontent-%COMP%] snippyly-user-avatar[_ngcontent-%COMP%]{display:flex}.velt-autocomplete-chip-tooltip[_ngcontent-%COMP%] .velt-autocomplete-chip-tooltip--icon[_ngcontent-%COMP%] .velt-autocomplete-chip-tooltip--icon-svg[_ngcontent-%COMP%]{width:100%;height:100%;padding:var(--velt-spacing-xs);display:flex;align-items:center;justify-content:center;background:linear-gradient(0deg,#ffffff0a,#ffffff0a),linear-gradient(0deg,#3772ff14,#3772ff14);box-sizing:border-box}.velt-autocomplete-chip-tooltip[_ngcontent-%COMP%] .velt-autocomplete-chip-tooltip--icon[_ngcontent-%COMP%] .velt-autocomplete-chip-tooltip--icon-svg[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:100%;height:100%}.velt-autocomplete-chip-tooltip[_ngcontent-%COMP%] .velt-autocomplete-chip-tooltip--icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover}.velt-autocomplete-chip-tooltip[_ngcontent-%COMP%] .velt-autocomplete-chip-tooltip--content[_ngcontent-%COMP%]{display:flex;flex-direction:column}.velt-autocomplete-chip-tooltip[_ngcontent-%COMP%] .velt-autocomplete-chip-tooltip--content[_ngcontent-%COMP%] .velt-autocomplete-chip-tooltip--name[_ngcontent-%COMP%]{font-size:var(--velt-font-size-sm);font-weight:400;line-height:21px;text-align:left;word-break:break-word;color:var(--velt-text-0)}.velt-autocomplete-chip-tooltip[_ngcontent-%COMP%] .velt-autocomplete-chip-tooltip--content[_ngcontent-%COMP%] .velt-autocomplete-chip-tooltip--description[_ngcontent-%COMP%]{font-size:var(--velt-font-size-xs);font-weight:400;line-height:17px;letter-spacing:.01em;text-align:left;color:var(--velt-text-5);word-break:break-word}"],changeDetection:0});let n=r;return n})();var Wo=(n,r,o)=>({componentConfigSignal:n,parentLocalUIState:r,selectorItem:o}),Jo=(n,r)=>({condition:n,data:r}),se=n=>({$implicit:n}),Ko=(n,r)=>({componentConfigSignal:n,userContact:r}),de=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-option-description-wireframe",variant:o,setIfCondition:t,componentElementRef:e}),Yo=(n,r)=>({componentConfigSignal:n,custom:r}),Xo=(n,r)=>({componentConfigSignal:n,group:r}),rn=()=>({});function Zo(n,r){n&1&&B(0)}function qo(n,r){if(n&1&&g(0,Zo,1,0,"ng-container",4),n&2){l();let o=W(5),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",F(2,se,t.selectorItem==null?null:t.selectorItem.contact))}}function Qo(n,r){n&1&&B(0)}function tr(n,r){if(n&1&&g(0,Qo,1,0,"ng-container",4),n&2){l();let o=W(7),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",F(2,se,t.selectorItem==null?null:t.selectorItem.custom))}}function er(n,r){n&1&&B(0)}function nr(n,r){if(n&1&&g(0,er,1,0,"ng-container",4),n&2){l();let o=W(9),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",F(2,se,t.selectorItem==null?null:t.selectorItem.group))}}function or(n,r){if(n&1&&(x(0,"p",7),V(1),j(2,"translate"),k()),n&2){let o=l(2).$implicit,t=l(3);wt("velt-autocomplete-option-description--secondary",(o.name==null?null:o.name.length)>0),M("aria-label",t.field?o[t.field]:o.email),f(),X(" ",t.field?o[t.field]:U(2,4,o.email)," ")}}function rr(n,r){if(n&1&&g(0,or,3,6,"p",6),n&2){let o=l().$implicit,t=l(2),e=l();p("veltDynamicTemplate",$(4,de,e.template,O(1,Ko,e.componentConfigSignal,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function ir(n,r){if(n&1&&w(0,rr,1,10,"p",5),n&2){let o=r.$implicit,t=l(3);E((t.field?o!=null&&o[t.field]:(o.email==null?null:o.email.length)>0&&(o.name==null?null:o.name.length)>0)?0:-1)}}function ar(n,r){if(n&1&&(x(0,"p",7),V(1),j(2,"translate"),k()),n&2){let o=l(2).$implicit;M("aria-label",o.description),f(),X(" ",U(2,2,o.description)," ")}}function lr(n,r){if(n&1&&g(0,ar,3,4,"p",8),n&2){let o=l().$implicit,t=l(2),e=l();p("veltDynamicTemplate",$(4,de,e.template,O(1,Yo,e.componentConfigSignal,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function cr(n,r){if(n&1&&w(0,lr,1,10,"p",7),n&2){let o=r.$implicit;E((o.description==null?null:o.description.length)>0?0:-1)}}function sr(n,r){if(n&1&&(x(0,"p",7),V(1),j(2,"translate"),k()),n&2){let o,t,e=l().$implicit,i=l(3);M("aria-label",((o=i.objectKeys((e==null?null:e.users)||Nt(5,rn)))==null?null:o.length)+" members"),f(),Yt(" ",(t=i.objectKeys((e==null?null:e.users)||Nt(6,rn)))==null?null:t.length," ",U(2,3,"members")," ")}}function dr(n,r){if(n&1&&g(0,sr,3,7,"p",8),n&2){let o=r.$implicit,t=l(2),e=l();p("veltDynamicTemplate",$(4,de,e.template,O(1,Xo,e.componentConfigSignal,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function mr(n,r){if(n&1&&(S(0),w(1,qo,1,4,"ng-container")(2,tr,1,4,"ng-container")(3,nr,1,4,"ng-container"),g(4,ir,1,1,"ng-template",null,0,J)(6,cr,1,1,"ng-template",null,1,J)(8,dr,1,10,"ng-template",null,2,J),y()),n&2){let o=l(2);f(),E((o.selectorItem==null?null:o.selectorItem.type)==="contact"?1:(o.selectorItem==null?null:o.selectorItem.type)==="custom"?2:(o.selectorItem==null?null:o.selectorItem.type)==="group"?3:-1)}}function pr(n,r){if(n&1&&g(0,mr,10,1,"ng-container",3),n&2){let o=l();p("veltIf",O(5,Jo,o.conditionSignal(),it(1,Wo,o.componentConfigSignal,o.localUIStateSignal,o.selectorItem)))}}var an=(()=>{let r=class r extends q{set userObject(t){this.resolveUserObjectToContact(t,e=>{this.selectorItem=e?{type:"contact",contact:e}:void 0})}set userId(t){this.resolveUserIdToContact(t,e=>{this.selectorItem=e?{type:"contact",contact:e}:void 0})}constructor(){super(),this.objectKeys=Object.keys,this.componentConfigSignal=A({}),this.componentId="velt-autocomplete-option-description"}ngOnInit(){try{super.ngOnInit(),this.dynamicDataService.applyConditionalClasses(this.hostElementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,selectorItem:this.selectorItem})}catch(t){this.loggingService.catch("Error in AutocompleteOptionDescriptionComponent ngOnInit:",t)}}ngOnDestroy(){try{this._userIdSub?.unsubscribe(),super.ngOnDestroy()}catch(t){this.loggingService.catch("Error in AutocompleteOptionDescriptionComponent ngOnDestroy:",t)}}setupA11yAttributes(){try{ht(this.hostElementRef.nativeElement,this.componentId)}catch(t){this.loggingService.catch("Error in AutocompleteOptionDescriptionComponent setupA11yAttributes:",t)}}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=P({type:r,selectors:[["velt-autocomplete-option-description-internal"]],inputs:{selectorItem:"selectorItem",field:"field",userObject:"userObject",userId:"userId"},standalone:!1,features:[R([b]),N],decls:1,vars:1,consts:[["contactEmailRef",""],["customDescriptionRef",""],["groupDescriptionRef",""],[4,"veltIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"line-height-1","velt-autocomplete-option-description",3,"velt-autocomplete-option-description--secondary"],["class","line-height-1 velt-autocomplete-option-description",3,"velt-autocomplete-option-description--secondary",4,"veltDynamicTemplate"],[1,"line-height-1","velt-autocomplete-option-description"],["class","line-height-1 velt-autocomplete-option-description",4,"veltDynamicTemplate"]],template:function(e,i){if(e&1&&w(0,pr,1,8,"ng-container"),e&2){let a;E((a=i.componentConfigSignal())?0:-1,a)}},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent);display:block}[_nghost-%COMP%]:empty{display:none}[dark][_nghost-%COMP%]{--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--velt-border-transparent: var(--velt-dark-mode-border-transparent);--velt-animation-transparent: var(--velt-dark-mode-animation-transparent)}.velt-autocomplete-option-description[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--velt-text-8);font-size:var(--velt-font-size-xs);margin:0;line-height:18px}"],changeDetection:0});let n=r;return n})();var vr=(n,r,o)=>({componentConfigSignal:n,parentLocalUIState:r,selectorItem:o}),gr=(n,r)=>({condition:n,data:r}),ur=n=>({componentConfigSignal:n}),ln=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-option-error-icon-wireframe",variant:o,setIfCondition:t,componentElementRef:e}),hr=n=>({$implicit:n}),fr=(n,r,o)=>({componentConfigSignal:n,isNewContact:r,userContact:o});function Cr(n,r){if(n&1&&(x(0,"div",4)(1,"div",5),st(),x(2,"svg",6),Y(3,"path",7)(4,"path",8),k()()()),n&2){let o=l(4);f(),M("data-testid",o.componentId+"-icon"),f(),M("data-testid",o.componentId+"-svg")}}function _r(n,r){if(n&1&&(x(0,"div",2),j(1,"translate"),g(2,Cr,5,2,"div",3),k()),n&2){let o=l(2),t=l();M("aria-label",U(1,3,"Invalid contact"))("data-testid",t.componentId),f(2),p("veltDynamicTemplate",$(7,ln,t.template,F(5,ur,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function br(n,r){n&1&&B(0)}function xr(n,r){if(n&1&&g(0,br,1,0,"ng-container",9),n&2){l();let o=W(4),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",F(2,hr,t.selectorItem==null?null:t.selectorItem.contact))}}function Sr(n,r){if(n&1&&(x(0,"div",4)(1,"div",10),st(),x(2,"svg",6),Y(3,"path",7)(4,"path",8),k()()()),n&2){let o=l(4),t=l();f(),p("title",o.newUserContactError),M("title",o.newUserContactError)("data-testid",t.componentId+"-icon"),f(),M("data-testid",t.componentId+"-svg")}}function yr(n,r){if(n&1&&(x(0,"div",2),j(1,"translate"),g(2,Sr,5,4,"div",3),k()),n&2){let o=l().$implicit,t=l(2),e=l();M("aria-label",U(1,3,(t==null?null:t.newUserContactError)||"Invalid contact"))("data-testid",e.componentId),f(2),p("veltDynamicTemplate",$(9,ln,e.template,it(5,fr,e.componentConfigSignal,e.isNewContact,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function kr(n,r){if(n&1&&w(0,yr,3,15,"div",2),n&2){let o=l(2),t=l();E(t.isNewContact&&o.newUserContactError?0:-1)}}function Ir(n,r){if(n&1&&(S(0),w(1,_r,3,13,"div",2)(2,xr,1,4,"ng-container"),g(3,kr,1,1,"ng-template",null,0,J),y()),n&2){let o=l(2);f(),E(o.defaultCondition()?(o.selectorItem==null?null:o.selectorItem.type)==="contact"?2:-1:1)}}function Or(n,r){if(n&1&&g(0,Ir,5,1,"ng-container",1),n&2){let o=l();p("veltIf",O(5,gr,o.conditionSignal(),it(1,vr,o.componentConfigSignal,o.localUIStateSignal,o.selectorItem)))}}var cn=(()=>{let r=class r extends q{set userObject(t){this.resolveUserObjectToContact(t,e=>{this.selectorItem=e?{type:"contact",contact:e}:void 0})}set userId(t){this.resolveUserIdToContact(t,e=>{this.selectorItem=e?{type:"contact",contact:e}:void 0})}constructor(){super(),this.componentConfigSignal=A({}),this.componentId="velt-autocomplete-error-icon"}ngOnInit(){try{super.ngOnInit(),this.dynamicDataService.applyConditionalClasses(this.hostElementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,selectorItem:this.selectorItem,isNewContact:this.isNewContact})}catch(t){this.loggingService.catch("Error in AutocompleteOptionErrorIconComponent ngOnInit:",t)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(t){this.loggingService.catch("Error in AutocompleteOptionErrorIconComponent ngOnDestroy:",t)}}setupA11yAttributes(){try{ht(this.hostElementRef.nativeElement,this.componentId)}catch(t){this.loggingService.catch("Error in AutocompleteOptionErrorIconComponent setupA11yAttributes:",t)}}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=P({type:r,selectors:[["velt-autocomplete-option-error-icon-internal"]],inputs:{selectorItem:"selectorItem",isNewContact:"isNewContact",userObject:"userObject",userId:"userId"},standalone:!1,features:[R([b]),N],decls:1,vars:1,consts:[["errorIconRef",""],[4,"veltIf"],["role","alert"],["class","velt-autocomplete-option-error-icon",4,"veltDynamicTemplate"],[1,"velt-autocomplete-option-error-icon"],[1,"s-flex"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","fill","currentColor","viewBox","0 0 16 16","aria-hidden","true","focusable","false",1,"bi","bi-exclamation-triangle"],["fill","red","d","M7.938 2.016A.13.13 0 0 1 8.002 2a.13.13 0 0 1 .063.016.146.146 0 0 1 .054.057l6.857 11.667c.036.06.035.124.002.183a.163.163 0 0 1-.054.06.116.116 0 0 1-.066.017H1.146a.115.115 0 0 1-.066-.017.163.163 0 0 1-.054-.06.176.176 0 0 1 .002-.183L7.884 2.073a.147.147 0 0 1 .054-.057zm1.044-.45a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566z"],["fill","red","d","M7.002 12a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 5.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995z"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"s-flex",3,"title"]],template:function(e,i){if(e&1&&w(0,Or,1,8,"ng-container"),e&2){let a;E((a=i.componentConfigSignal())?0:-1,a)}},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent)}[_nghost-%COMP%]:empty{display:none}[dark][_nghost-%COMP%]{--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--velt-border-transparent: var(--velt-dark-mode-border-transparent);--velt-animation-transparent: var(--velt-dark-mode-animation-transparent)}.velt-autocomplete-option-error-icon[_ngcontent-%COMP%]{margin-inline:var(--velt-spacing-lg)}.velt-autocomplete-option-error-icon[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:transparent;border:none;padding:0;margin:0;cursor:pointer;outline:none;color:var(--velt-text-1)}"],changeDetection:0});let n=r;return n})();var Dr=(n,r,o)=>({componentConfigSignal:n,parentLocalUIState:r,selectorItem:o}),wr=(n,r)=>({condition:n,data:r}),Er=(n,r)=>({componentConfigSignal:n,selectorItem:r}),Tr=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-option-icon-wireframe",variant:o,setIfCondition:t,componentElementRef:e}),me=n=>({$implicit:n});function Ar(n,r){n&1&&B(0)}function Mr(n,r){if(n&1&&g(0,Ar,1,0,"ng-container",6),n&2){l(2);let o=W(3),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",F(2,me,t.selectorItem==null?null:t.selectorItem.contact))}}function Pr(n,r){n&1&&B(0)}function Rr(n,r){if(n&1&&g(0,Pr,1,0,"ng-container",6),n&2){l(2);let o=W(5),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",F(2,me,t.selectorItem==null?null:t.selectorItem.custom))}}function Fr(n,r){n&1&&B(0)}function jr(n,r){if(n&1&&g(0,Fr,1,0,"ng-container",6),n&2){l(2);let o=W(7),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",F(2,me,t.selectorItem==null?null:t.selectorItem.group))}}function Ur(n,r){if(n&1&&(x(0,"div",5),w(1,Mr,1,4,"ng-container")(2,Rr,1,4,"ng-container")(3,jr,1,4,"ng-container"),k()),n&2){let o=l(3);M("data-testid",o.componentId)("aria-label","Option icon"),f(),E((o.selectorItem==null?null:o.selectorItem.type)==="contact"?1:(o.selectorItem==null?null:o.selectorItem.type)==="custom"?2:(o.selectorItem==null?null:o.selectorItem.type)==="group"?3:-1)}}function Nr(n,r){if(n&1&&(st(),x(0,"svg",7),Y(1,"path",9),k()),n&2){let o=l(4);M("data-testid",o.componentId+"-contact-at")}}function Vr(n,r){if(n&1&&Y(0,"snippyly-user-avatar",8),n&2){let o=l().$implicit,t=l(3);p("size",32)("user",o),M("data-testid",t.componentId+"-contact-avatar")}}function Lr(n,r){if(n&1&&w(0,Nr,2,1,":svg:svg",7)(1,Vr,1,3,"snippyly-user-avatar",8),n&2){let o=r.$implicit;E((o==null?null:o.visibility)==="here"?0:1)}}function Br(n,r){if(n&1&&(Y(0,"div",10),j(1,"safeSvg")),n&2){let o=l().$implicit,t=l(3);p("innerHTML",U(1,2,o.icon.svg),Gt),M("data-testid",t.componentId+"-custom-svg")}}function $r(n,r){if(n&1&&Y(0,"img",11),n&2){let o=l().$implicit,t=l(3);p("src",o.icon.url,Ht),M("alt",(o==null?null:o.description)||"Custom icon")("data-testid",t.componentId+"-custom-img")}}function zr(n,r){if(n&1&&(w(0,Br,2,4,"div",10),w(1,$r,1,3,"img",11)),n&2){let o=r.$implicit;E(!(o==null||o.icon==null)&&o.icon.svg?0:-1),f(),E(!(o==null||o.icon==null)&&o.icon.url?1:-1)}}function Gr(n,r){if(n&1&&(st(),x(0,"svg",12),Y(1,"path",13),k()),n&2){let o=l(3);M("data-testid",o.componentId+"-group-icon")}}function Hr(n,r){if(n&1&&(S(0),g(1,Ur,4,3,"div",4)(2,Lr,2,1,"ng-template",null,0,J)(4,zr,2,2,"ng-template",null,1,J)(6,Gr,2,1,"ng-template",null,2,J),y()),n&2){let o=l(),t=l();f(),p("veltDynamicTemplate",$(4,Tr,t.template,O(1,Er,t.componentConfigSignal,t.selectorItem),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function Wr(n,r){if(n&1&&g(0,Hr,8,10,"ng-container",3),n&2){let o=l();p("veltIf",O(5,wr,o.conditionSignal(),it(1,Dr,o.componentConfigSignal,o.localUIStateSignal,o.selectorItem)))}}var sn=(()=>{let r=class r extends q{set userObject(t){this.resolveUserObjectToContact(t,e=>{this.selectorItem=e?{type:"contact",contact:e}:void 0})}set userId(t){this.resolveUserIdToContact(t,e=>{this.selectorItem=e?{type:"contact",contact:e}:void 0})}constructor(){super(),this.componentConfigSignal=A({}),this.componentId="velt-autocomplete-icon"}ngOnInit(){try{super.ngOnInit(),this.dynamicDataService.applyConditionalClasses(this.hostElementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,selectorItem:this.selectorItem})}catch(t){this.loggingService.catch("Error in AutocompleteOptionIconComponent ngOnInit:",t)}}ngOnDestroy(){try{this._userIdSub?.unsubscribe(),super.ngOnDestroy()}catch(t){this.loggingService.catch("Error in AutocompleteOptionIconComponent ngOnDestroy:",t)}}setupA11yAttributes(){try{let t=this.hostElementRef.nativeElement;t.setAttribute("role","presentation"),t.setAttribute("data-testid",this.componentId+"-container")}catch(t){this.loggingService.catch("Error in AutocompleteOptionIconComponent setupA11yAttributes:",t)}}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=P({type:r,selectors:[["velt-autocomplete-option-icon-internal"]],inputs:{selectorItem:"selectorItem",userObject:"userObject",userId:"userId"},standalone:!1,features:[R([b]),N],decls:1,vars:1,consts:[["contactAvatarRef",""],["customAvatarRef",""],["groupAvatarRef",""],[4,"veltIf"],["class","velt-autocomplete-option-icon","role","img",4,"veltDynamicTemplate"],["role","img",1,"velt-autocomplete-option-icon"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["xmlns","http://www.w3.org/2000/svg","width","24","height","24","fill","none","viewBox","0 0 16 16","aria-hidden","true","focusable","false",1,"bi","bi-at"],[3,"size","user"],["fill","currentColor","d","M13.106 7.222c0-2.967-2.249-5.032-5.482-5.032-3.35 0-5.646 2.318-5.646 5.702 0 3.493 2.235 5.708 5.762 5.708.862 0 1.689-.123 2.304-.335v-.862c-.43.199-1.354.328-2.29.328-2.926 0-4.813-1.88-4.813-4.798 0-2.844 1.921-4.881 4.594-4.881 2.735 0 4.608 1.688 4.608 4.156 0 1.682-.554 2.769-1.416 2.769-.492 0-.772-.28-.772-.76V5.206H8.923v.834h-.11c-.266-.595-.881-.964-1.6-.964-1.4 0-2.378 1.162-2.378 2.823 0 1.737.957 2.906 2.379 2.906.8 0 1.415-.39 1.709-1.087h.11c.081.67.703 1.148 1.503 1.148 1.572 0 2.57-1.415 2.57-3.643zm-7.177.704c0-1.197.54-1.907 1.456-1.907.93 0 1.524.738 1.524 1.907S8.308 9.84 7.371 9.84c-.895 0-1.442-.725-1.442-1.914z"],[1,"velt-autocomplete-option-icon--custom-svg",3,"innerHTML"],[1,"velt-autocomplete-option-icon--custom-img",3,"src"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","fill","currentColor","viewBox","0 0 16 16","aria-hidden","true","focusable","false",1,"bi","bi-people-fill"],["d","M7 14s-1 0-1-1 1-4 5-4 5 3 5 4-1 1-1 1zm4-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6m-5.784 6A2.24 2.24 0 0 1 5 13c0-1.355.68-2.75 1.936-3.72A6.3 6.3 0 0 0 5 9c-4 0-5 3-5 4s1 1 1 1zM4.5 8a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5"]],template:function(e,i){if(e&1&&w(0,Wr,1,8,"ng-container"),e&2){let a;E((a=i.componentConfigSignal())?0:-1,a)}},styles:['html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent)}[_nghost-%COMP%]:empty{display:none}[dark][_nghost-%COMP%]{--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--velt-border-transparent: var(--velt-dark-mode-border-transparent);--velt-animation-transparent: var(--velt-dark-mode-animation-transparent)}.velt-autocomplete-option-icon--placeholder[_ngcontent-%COMP%]{z-index:2;opacity:.8}.velt-autocomplete-option-icon[_ngcontent-%COMP%]{min-width:calc((2.25rem + 0px) * var(--velt-base-rem-unit));width:calc((2.25rem + 0px) * var(--velt-base-rem-unit));min-height:calc((2.25rem + 0px) * var(--velt-base-rem-unit));height:calc((2.25rem + 0px) * var(--velt-base-rem-unit));box-sizing:border-box;background-clip:padding-box;border:solid 2px transparent;display:flex;align-items:center;justify-content:center;position:relative;margin-right:var(--velt-spacing-md)}.velt-autocomplete-option-icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;border-radius:var(--velt-border-radius-full);z-index:2;object-fit:cover}.velt-autocomplete-option-icon[_ngcontent-%COMP%]:before{content:"";position:absolute;inset:0;z-index:1;border-radius:inherit;background:inherit}.velt-autocomplete-option-icon[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{color:var(--velt-text-1)}'],changeDetection:0});let n=r;return n})();var Jr=(n,r,o)=>({componentConfigSignal:n,parentLocalUIState:r,selectorItem:o}),Kr=(n,r)=>({condition:n,data:r}),pe=n=>({$implicit:n}),Yr=(n,r)=>({componentConfigSignal:n,userContact:r}),ve=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-option-name-wireframe",variant:o,setIfCondition:t,componentElementRef:e}),Xr=(n,r)=>({componentConfigSignal:n,custom:r}),Zr=(n,r)=>({componentConfigSignal:n,group:r});function qr(n,r){n&1&&B(0)}function Qr(n,r){if(n&1&&g(0,qr,1,0,"ng-container",4),n&2){l();let o=W(5),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",F(2,pe,t.selectorItem==null?null:t.selectorItem.contact))}}function ti(n,r){n&1&&B(0)}function ei(n,r){if(n&1&&g(0,ti,1,0,"ng-container",4),n&2){l();let o=W(7),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",F(2,pe,t.selectorItem==null?null:t.selectorItem.custom))}}function ni(n,r){n&1&&B(0)}function oi(n,r){if(n&1&&g(0,ni,1,0,"ng-container",4),n&2){l();let o=W(9),t=l(2);p("ngTemplateOutlet",o)("ngTemplateOutletContext",F(2,pe,t.selectorItem==null?null:t.selectorItem.group))}}function ri(n,r){if(n&1&&(x(0,"p",5),V(1),j(2,"translate"),k()),n&2){let o=l(2).$implicit,t=l(3);M("data-testid",t.componentId+"-contact-text")("aria-label",o.name||o.email),f(),X(" ",U(2,3,o.name||o.email)," ")}}function ii(n,r){if(n&1&&g(0,ri,3,5,"p",7),n&2){let o=l().$implicit,t=l(2),e=l();p("veltDynamicTemplate",$(4,ve,e.template,O(1,Yr,e.componentConfigSignal,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function ai(n,r){n&1&&Y(0,"velt-skeleton-loader-internal",6)}function li(n,r){if(n&1&&w(0,ii,1,10,"p",5)(1,ai,1,0,"velt-skeleton-loader-internal",6),n&2){let o=r.$implicit;E((o.name==null?null:o.name.length)>0||(o==null||o.email==null?null:o.email.length)>0?0:1)}}function ci(n,r){if(n&1&&(x(0,"p",5),V(1),j(2,"translate"),k()),n&2){let o=l(2).$implicit,t=l(3);M("data-testid",t.componentId+"-custom-text")("aria-label",o.name),f(),X(" ",U(2,3,o.name)," ")}}function si(n,r){if(n&1&&g(0,ci,3,5,"p",7),n&2){let o=l().$implicit,t=l(2),e=l();p("veltDynamicTemplate",$(4,ve,e.template,O(1,Xr,e.componentConfigSignal,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function di(n,r){if(n&1&&w(0,si,1,10,"p",5),n&2){let o=r.$implicit;E((o.name==null?null:o.name.length)>0?0:-1)}}function mi(n,r){if(n&1&&(x(0,"p",5),V(1),j(2,"translate"),k()),n&2){let o=l(2).$implicit,t=l(3);M("data-testid",t.componentId+"-group-text")("aria-label",o==null||o.metadata==null?null:o.metadata.groupName),f(),X(" ",U(2,3,o==null||o.metadata==null?null:o.metadata.groupName)," ")}}function pi(n,r){if(n&1&&g(0,mi,3,5,"p",7),n&2){let o=l().$implicit,t=l(2),e=l();p("veltDynamicTemplate",$(4,ve,e.template,O(1,Zr,e.componentConfigSignal,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function vi(n,r){if(n&1&&w(0,pi,1,10,"p",5),n&2){let o=r.$implicit;E((o==null||o.metadata==null||o.metadata.groupName==null?null:o.metadata.groupName.length)>0?0:-1)}}function gi(n,r){if(n&1&&(S(0),w(1,Qr,1,4,"ng-container")(2,ei,1,4,"ng-container")(3,oi,1,4,"ng-container"),g(4,li,2,1,"ng-template",null,0,J)(6,di,1,1,"ng-template",null,1,J)(8,vi,1,1,"ng-template",null,2,J),y()),n&2){let o=l(2);f(),E((o.selectorItem==null?null:o.selectorItem.type)==="contact"?1:(o.selectorItem==null?null:o.selectorItem.type)==="custom"?2:(o.selectorItem==null?null:o.selectorItem.type)==="group"?3:-1)}}function ui(n,r){if(n&1&&g(0,gi,10,1,"ng-container",3),n&2){let o=l();p("veltIf",O(5,Kr,o.conditionSignal(),it(1,Jr,o.componentConfigSignal,o.localUIStateSignal,o.selectorItem)))}}var dn=(()=>{let r=class r extends q{set userObject(t){this.resolveUserObjectToContact(t,e=>{this.selectorItem=e?{type:"contact",contact:e}:void 0})}set userId(t){this.resolveUserIdToContact(t,e=>{this.selectorItem=e?{type:"contact",contact:e}:void 0})}constructor(){super(),this.componentConfigSignal=A({}),this.componentId="velt-autocomplete-name"}ngOnInit(){try{super.ngOnInit(),this.dynamicDataService.applyConditionalClasses(this.hostElementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,selectorItem:this.selectorItem})}catch(t){this.loggingService.catch("Error in AutocompleteOptionNameComponent ngOnInit:",t)}}ngOnDestroy(){try{this._userIdSub?.unsubscribe(),super.ngOnDestroy()}catch(t){this.loggingService.catch("Error in AutocompleteOptionNameComponent ngOnDestroy:",t)}}setupA11yAttributes(){try{let t=this.hostElementRef.nativeElement;t.setAttribute("role","presentation"),t.setAttribute("data-testid",this.componentId+"-container")}catch(t){this.loggingService.catch("Error in AutocompleteOptionNameComponent setupA11yAttributes:",t)}}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=P({type:r,selectors:[["velt-autocomplete-option-name-internal"]],inputs:{selectorItem:"selectorItem",userObject:"userObject",userId:"userId"},standalone:!1,features:[R([b]),N],decls:1,vars:1,consts:[["contactNameRef",""],["customNameRef",""],["groupNameRef",""],[4,"veltIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["role","option",1,"line-height-1","velt-autocomplete-option-name"],["height","21px","width","80px","borderRadius","20px"],["class","line-height-1 velt-autocomplete-option-name","role","option",4,"veltDynamicTemplate"]],template:function(e,i){if(e&1&&w(0,ui,1,8,"ng-container"),e&2){let a;E((a=i.componentConfigSignal())?0:-1,a)}},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent)}[_nghost-%COMP%]:empty{display:none}[dark][_nghost-%COMP%]{--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--velt-border-transparent: var(--velt-dark-mode-border-transparent);--velt-animation-transparent: var(--velt-dark-mode-animation-transparent)}.velt-autocomplete-option-name[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;color:var(--velt-text-1);font-size:var(--velt-font-size-sm);margin:0;line-height:21px;white-space:nowrap}"],changeDetection:0});let n=r;return n})();var hi=(n,r,o,t,e,i,a)=>({componentConfigSignal:n,parentLocalUIState:r,selectorItem:o,isNewContact:t,multiSelect:e,isSelected:i,readOnly:a}),fi=(n,r)=>({condition:n,data:r}),Ci=(n,r,o,t,e,i)=>({componentConfigSignal:n,isNewContact:r,selectorItem:o,multiSelect:t,isSelected:e,readOnly:i}),_i=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-option-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function bi(n,r){if(n&1&&(x(0,"div",3),Y(1,"velt-autocomplete-option-icon-internal",4),x(2,"div",5),Y(3,"velt-autocomplete-option-name-internal",4)(4,"velt-autocomplete-option-description-internal",4),k(),Y(5,"velt-autocomplete-option-error-icon-internal",6),k()),n&2){let o=l(2),t=l();wt("velt-autocomplete-option--multi-select",t.multiSelect)("velt-autocomplete-option--selected",t.isSelected),M("data-testid",t.componentId)("aria-selected",t.isSelected)("aria-disabled",!!(o!=null&&o.newUserContactError)),f(),p("selectorItem",t.selectorItem)("componentConfigSignal",t.componentConfigSignal),f(),M("data-testid",t.componentId+"-details"),f(),p("selectorItem",t.selectorItem)("componentConfigSignal",t.componentConfigSignal),f(),p("selectorItem",t.selectorItem)("componentConfigSignal",t.componentConfigSignal),f(),p("selectorItem",t.selectorItem)("isNewContact",t.isNewContact)("componentConfigSignal",t.componentConfigSignal)}}function xi(n,r){n&1&&(x(0,"div",2),st(),x(1,"svg",7),Y(2,"path",8),k()())}function Si(n,r){if(n&1&&(S(0),g(1,bi,6,17,"div",1),w(2,xi,3,0,"div",2),y()),n&2){let o=l(),t=l();f(),p("veltDynamicTemplate",$(9,_i,t.template,_e(2,Ci,t.componentConfigSignal,t.isNewContact,t.selectorItem,t.multiSelect,t.isSelected,t.readOnly),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef)),f(),E(t.multiSelect&&!t.readOnly&&t.isSelected?2:-1)}}function yi(n,r){if(n&1&&g(0,Si,3,15,"ng-container",0),n&2){let o=l();p("veltIf",O(9,fi,o.conditionSignal(),be(1,hi,o.componentConfigSignal,o.localUIStateSignal,o.selectorItem,o.isNewContact,o.multiSelect,o.isSelected,o.readOnly)))}}var mn=(()=>{let r=class r extends q{set userObject(t){this.resolveUserObjectToContact(t,e=>{this.selectorItem=e?{type:"contact",contact:e}:void 0})}set userId(t){this.resolveUserIdToContact(t,e=>{this.selectorItem=e?{type:"contact",contact:e}:void 0})}constructor(){super(),this.multiSelect=!1,this.isSelected=!1,this.readOnly=!1,this.componentConfigSignal=A({}),this.subscriptions=[],this.wireframeService=Q(Pt),this.componentId="velt-autocomplete-option"}ngOnInit(){try{this.loggingService.log("%c[WB] Calling FUNCTION: ngOnInit","color: green;"),super.ngOnInit();let t="velt-autocomplete-option-wireframe";this.dynamicDataService.applyConditionalClasses(this.hostElementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,selectorItem:this.selectorItem,isNewContact:this.isNewContact}),this.variant&&(t+=`---${this.variant}`),this.subscriptions.push(this.wireframeService.getWireframe$(t).subscribe(e=>{if(e){let i=document.createElement(e.tagName);i.innerHTML=e.innerHTML,this.template=i}}))}catch(t){this.loggingService.catch("Error in AutocompleteOptionComponent OnInit: ",t)}}getPublishedVeltEntity(){return this.selectorItem}setupA11yAttributes(){try{let t=this.hostElementRef.nativeElement;t.setAttribute("role","option"),t.setAttribute("data-testid",this.componentId+"-container"),t.setAttribute("aria-label",this.getOptionLabel())}catch(t){this.loggingService.catch("Error in AutocompleteOptionComponent setupA11yAttributes:",t)}}ngOnDestroy(){try{this.loggingService.log("%c[WB] Calling FUNCTION: ngOnDestroy","color: red;"),super.ngOnDestroy(),this._userIdSub?.unsubscribe(),this.subscriptions.forEach(t=>t?.unsubscribe())}catch(t){this.loggingService.catch("Error in AutocompleteOptionComponent OnDestroy: ",t)}}getOptionLabel(){try{switch(this.selectorItem?.type){case"contact":return this.getContactLabel();case"custom":return this.selectorItem.custom?.name||"Custom option";case"group":return this.selectorItem.group?.metadata?.groupName||"Group option";default:return"Option"}}catch(t){return this.loggingService.catch("Error in AutocompleteOptionComponent getOptionLabel:",t),"Option"}}getContactLabel(){try{let t=this.selectorItem?.contact,e=t?.name||t?.email||"Contact";return this.isNewContact?`New contact: ${e}`:e}catch(t){return this.loggingService.catch("Error in AutocompleteOptionComponent getContactLabel:",t),"Contact"}}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=P({type:r,selectors:[["velt-autocomplete-option-internal"]],inputs:{selectorItem:"selectorItem",isNewContact:"isNewContact",variant:"variant",multiSelect:"multiSelect",isSelected:"isSelected",readOnly:"readOnly",userObject:"userObject",userId:"userId"},standalone:!1,features:[R([b]),N],decls:1,vars:1,consts:[[4,"veltIf"],["class","velt-autocomplete-option--container","role","option",3,"velt-autocomplete-option--multi-select","velt-autocomplete-option--selected",4,"veltDynamicTemplate"],[1,"velt-autocomplete-option--check"],["role","option",1,"velt-autocomplete-option--container"],[3,"selectorItem","componentConfigSignal"],[1,"velt-autocomplete-option--details"],[3,"selectorItem","isNewContact","componentConfigSignal"],["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M11.6667 3.5L5.25 9.91667L2.33333 7","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"]],template:function(e,i){if(e&1&&w(0,yi,1,12,"ng-container"),e&2){let a;E((a=i.componentConfigSignal())?0:-1,a)}},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent);width:100%;display:flex;align-items:center;min-width:0;overflow:hidden;box-sizing:border-box}[_nghost-%COMP%]:empty{display:none}[dark][_nghost-%COMP%]{--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--velt-border-transparent: var(--velt-dark-mode-border-transparent);--velt-animation-transparent: var(--velt-dark-mode-animation-transparent)}.velt-autocomplete-option--container[_ngcontent-%COMP%]{display:flex;align-items:center;flex:1;min-width:0}.velt-autocomplete-option--details[_ngcontent-%COMP%]{overflow:hidden;flex-grow:1}.velt-autocomplete-option--check[_ngcontent-%COMP%]{flex-shrink:0;width:24px;height:24px;border-radius:50%;background:var(--velt-accent-transparent, rgba(0, 168, 112, .15));display:flex;align-items:center;justify-content:center;color:var(--velt-accent, #00a870);margin-left:8px}"],changeDetection:0});let n=r;return n})();var pn=(()=>{let r=class r{constructor(t,e,i){this.loggingService=t,this.dynamicDataService=e,this.injector=i,this.path="",this.field="",this.extractedProps={},this.valueSignal=A(void 0),this.dataComponentConfigSignal=A({}),this.subscription=[];try{this.subscription.push(this.dynamicDataService.getCommonData().subscribe(a=>{this.dataComponentConfigSignal.update(c=>(c=m(m({},c),a),c)),this.extractedProps=this.dynamicDataService.getModifiedPathBasedOnCondition(this.dataComponentConfigSignal,this.extractedProps),this.getComputedValues(this.dataComponentConfigSignal,this.evaluateCondition,this.extractedProps)}))}catch(a){this.loggingService.catch("Error in DataComponent constructor: ",a)}}ngOnInit(){try{(this.path||this.field)&&(this.extractProps(),this.extractedProps=this.dynamicDataService.getModifiedPathBasedOnCondition(this.dataComponentConfigSignal,this.extractedProps),this.getComputedValues(this.dataComponentConfigSignal,this.evaluateCondition,this.extractedProps))}catch(t){this.loggingService.catch("Error in DataComponent ngOnInit: ",t)}}ngOnDestroy(){try{this.subscription.forEach(t=>t.unsubscribe())}catch(t){this.loggingService.catch("Error in DataComponent ngOnDestroy: ",t)}}updateDataComponentConfigSignal(t,e){try{t==="dataComponentConfigSignal"?this.dataComponentConfigSignal.set(e):this.dataComponentConfigSignal.update(i=>h(m({},i),{[t]:e})),(this.path||this.field)&&(this.extractedProps=this.dynamicDataService.getModifiedPathBasedOnCondition(this.dataComponentConfigSignal,this.extractedProps),this.getComputedValues(this.dataComponentConfigSignal,this.evaluateCondition,this.extractedProps))}catch(i){this.loggingService.catch("Error in DataComponent updateDataComponentConfigSignal: ",i)}}extractProps(){try{let t=this.field||this.path;this.extractedProps[t]={value:null,path:null,isDynamicPath:this.hasDynamicParts(t)}}catch(t){this.loggingService.catch("Error in DataComponent extractProps: ",t)}}hasDynamicParts(t){try{let e=/\[[^\]'"]*[^\]'"]\]/.test(t),i=/\[[^[\]]*[\.\[][^[\]]*\]/.test(t);return e||i}catch(e){return this.loggingService.catch("Error checking for dynamic path: ",e),!1}}evaluateCondition(){try{let t=this.field||this.path,e=this.extractedProps[t].value;this.valueSignal.set(e)}catch(t){this.loggingService.catch("Error in DataComponent evaluateCondition: ",t)}}getComputedValues(t,e,i,a,c,d){try{Object.keys(i).forEach(s=>{let u;if(nt(t)?u=rt(()=>lt(t(),i[s].path)):u=rt(()=>lt(t,i[s].path)),nt(u()))Ct(()=>{try{let v=u()();i[s].value=v,this.extractedProps=i,this.evaluateCondition()}catch{}},{injector:this.injector});else{let v=u();i[s].value=v,this.extractedProps=i,this.evaluateCondition()}})}catch(s){this.loggingService.catch("Error in DynamicDataService getComputedValues: ",s)}}};r.\u0275fac=function(e){return new(e||r)(D(L),D(b),D(at))},r.\u0275cmp=P({type:r,selectors:[["app-data"]],inputs:{path:"path",field:"field"},standalone:!1,features:[R([b])],decls:2,vars:3,template:function(e,i){e&1&&(V(0),j(1,"translate")),e&2&&Et(U(1,1,i.valueSignal()))},dependencies:[He],encapsulation:2,changeDetection:0});let n=r;return n})();var ki=(n,r)=>({template:n,context:r,cloneTemplate:!0});function Ii(n,r){n&1&&B(0)}function Oi(n,r){if(n&1&&(S(0),g(1,Ii,1,0,"ng-container",1),y()),n&2){let o=l();f(),p("veltDynamicTemplate",O(1,ki,o.template,o.dataComponentConfigSignal()))}}var vn=(()=>{let r=class r{constructor(t,e,i){this.loggingService=t,this.dynamicDataService=e,this.injector=i,this.condition="",this.showContent=A(!1),this.conditionRegex=/\{(.*?)\}/g,this.extractedProps={},this.dataComponentConfigSignal=A({}),this.subscription=[],this.cleanupEffects=[];try{this.subscription.push(this.dynamicDataService.getCommonData().subscribe(a=>{this.dataComponentConfigSignal.update(c=>(c=m(m({},c),a),c)),this.extractedProps=this.dynamicDataService.getModifiedPathBasedOnCondition(this.dataComponentConfigSignal,this.extractedProps),this.getComputedValues(this.dataComponentConfigSignal,this.evaluateCondition,this.extractedProps)}))}catch(a){this.loggingService.catch("Error in IfComponent constructor: ",a)}}ngOnInit(){try{this.condition&&(this.extractProps(),this.extractedProps=this.dynamicDataService.getModifiedPathBasedOnCondition(this.dataComponentConfigSignal,this.extractedProps),this.getComputedValues(this.dataComponentConfigSignal,this.evaluateCondition,this.extractedProps))}catch(t){this.loggingService.catch("Error in IfComponent ngOnInit: ",t)}}ngOnDestroy(){try{this.cleanupEffects.forEach(t=>t.destroy()),this.cleanupEffects.length=0,this.subscription.forEach(t=>t.unsubscribe())}catch(t){this.loggingService.catch("Error in IfComponent ngOnDestroy: ",t)}}updateDataComponentConfigSignal(t,e){try{t==="dataComponentConfigSignal"?this.dataComponentConfigSignal.set(e):this.dataComponentConfigSignal.update(i=>h(m({},i),{[t]:e})),this.condition&&(this.extractedProps=this.dynamicDataService.getModifiedPathBasedOnCondition(this.dataComponentConfigSignal,this.extractedProps),this.getComputedValues(this.dataComponentConfigSignal,this.evaluateCondition,this.extractedProps))}catch(i){this.loggingService.catch("Error in IfComponent updateDataComponentConfigSignal: ",i)}}extractProps(){try{this.extractedProps={},this.conditionRegex.lastIndex=0;let t;for(;(t=this.conditionRegex.exec(this.condition))!==null;){let e=t[1];this.extractedProps[e]={value:null,path:null,isDynamicPath:this.hasDynamicParts(e)}}}catch(t){this.loggingService.catch("Error in IfComponent extractProps: ",t)}}hasDynamicParts(t){try{let e=/\[[^\]'"]*[^\]'"]\]/.test(t),i=/\[[^[\]]*[\.\[][^[\]]*\]/.test(t);return e||i}catch(e){return this.loggingService.catch("Error checking for dynamic path: ",e),!1}}evaluateCondition(){try{let t=this.condition,e=this.extractedProps,i=t.replace(this.conditionRegex,(d,s)=>{let u=e[s];if(u&&u.value!==void 0){let v=u.value;return typeof v=="string"?`'${v}'`:typeof v=="boolean"||typeof v=="number"?String(v):v===null?"null":typeof v=="object"?v?"true":"false":String(v)}return"false"}),a=this.sanitizeCondition(i),c=this.dynamicDataService.safeEval(a);return this.showContent.set(c),c}catch(t){return this.loggingService.catch("Error in IfComponent evaluateCondition: ",t),this.showContent.set(!1),!1}}sanitizeCondition(t){try{return t.replace(/[^a-zA-Z0-9\s\+\-\*\/\%\(\)\!\=\<\>\|\&\.\[\]\{\},'"]/g,"")}catch(e){return this.loggingService.catch("Error in IfComponent sanitizeCondition: ",e),""}}getComputedValues(t,e,i,a,c,d){try{this.cleanupEffects.forEach(s=>s.destroy()),this.cleanupEffects.length=0,Object.keys(i).forEach(s=>{let u;if(nt(t)?u=rt(()=>lt(t(),i[s].path)):u=rt(()=>lt(t,i[s].path)),nt(u())){let v=Ct(()=>{try{let T=u()();i[s].value=T,this.extractedProps=i,this.evaluateCondition()}catch{i[s].value="",this.extractedProps=i,this.evaluateCondition()}},{injector:this.injector});this.cleanupEffects.push(v)}else{let v=u();i[s].value=v,this.extractedProps=i,this.evaluateCondition()}})}catch(s){this.loggingService.catch("Error in DynamicDataService getComputedValues: ",s)}}};r.\u0275fac=function(e){return new(e||r)(D(L),D(b),D(at))},r.\u0275cmp=P({type:r,selectors:[["app-if"]],inputs:{template:"template",condition:"condition"},standalone:!1,features:[R([b])],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltDynamicTemplate"]],template:function(e,i){e&1&&g(0,Oi,2,4,"ng-container",0),e&2&&p("ngIf",i.showContent())},styles:["[_nghost-%COMP%]{display:flex;align-items:center}"],changeDetection:0});let n=r;return n})();var gn=(()=>{let r=class r{constructor(t,e,i){this.coreActionsService=t,this.loggingService=e,this.metadataService=i,this.buttonClickSubject$=new It,this.buttonToggleMap$=new Bt({}),this.contextDataMapping={commentAnnotation:{source:["componentConfigSignal","data","annotation"],target:"commentAnnotation"},unreadCommentsMap:{source:["componentConfigSignal","unreadCommentsMap"],target:"unreadCommentAnnotationsMap"},comment:{source:["commentObj"],target:"comment"},index:{source:["i"],target:"index"},allAnnotations:{source:["componentConfigSignal","annotations"],target:"commentAnnotations"},systemFilteredAnnotations:{source:["componentConfigSignal","filteredCommentPinAnnotations"],target:"systemFilteredAnnotations"},notification:{source:["notification"],target:"notification"},allNotifications:{source:["componentConfigSignal","notificationsInSession"],target:"notifications"}}}buttonClick(d){return vt(this,arguments,function*({id:t,type:e,groupId:i,contextData:a,data:c}){try{this.buttonToggle(t,void 0,e,i);let u=this.extractButtonData(a),v=this.createButtonContext(t,e,i),T=yield this.metadataService.getGlobalMetadata(),I={};if(c){let s=c,{componentConfigSignal:C}=s,z=ge(s,["componentConfigSignal"]);if(I=m({},z),C&&typeof C=="function")try{let Z=C();Z&&typeof Z=="object"&&(I=m(m({},I),Z))}catch(Z){this.loggingService.catch("Error accessing componentConfigSignal: ",Z)}}let _=h(m({buttonContext:v},u),{metadata:T,data:I});this.buttonClickSubject$.next(_),this.coreActionsService.triggerAction(ae.VELT_BUTTON_CLICK,_)}catch(u){this.loggingService.catch("Error in ButtonService buttonClick: ",u)}})}buttonActive({id:t,type:e,groupId:i,contextData:a}){try{let c=this.buttonToggleMap$.value?.[i||"ungrouped"]?.[t]||!0;this.buttonToggle(t,c,e,i)}catch(c){this.loggingService.catch("Error in ButtonService buttonClick: ",c)}}buttonToggle(t,e,i,a){try{let c=this.buttonToggleMap$.value,d=this.createNewToggleMap(c,t,e,i,a);this.buttonToggleMap$.next(d)}catch(c){this.loggingService.catch("Error in ButtonService buttonToggle: ",c)}}extractButtonData(t){try{let e={};return Object.entries(this.contextDataMapping).forEach(([i,a])=>{let c=this.getNestedValue(t,a.source);c!==void 0&&(e[a.target]=c)}),e}catch(e){return this.loggingService.catch("Error in ButtonService extractContextData: ",e),{}}}getNestedValue(t,e){try{let i=t;for(let a of e){if(i?.[a]===void 0)return;nt(i[a])?i=i[a]():i=i[a]}return i}catch(i){this.loggingService.catch("Error in ButtonService getNestedValue: ",i);return}}createButtonContext(t,e,i){try{let a={type:e,selections:this.buttonToggleMap$.value,clickedButtonId:t};return(e==="single-select"||e==="multi-select")&&i?h(m({},a),{groupId:i}):a}catch(a){return this.loggingService.catch("Error in ButtonService createButtonMetadata: ",a),{}}}createNewToggleMap(t,e,i,a,c){try{let d=m({},t);return a==="button-toggle"?h(m({},d),{ungrouped:h(m({},d.ungrouped),{[e]:i??!d.ungrouped?.[e]})}):a==="single-select"&&c?h(m({},d),{[c]:{[e]:i??!0}}):a==="multi-select"&&c?h(m({},d),{[c]:h(m({},d[c]),{[e]:i??!d[c]?.[e]})}):d}catch(d){return this.loggingService.catch("Error in ButtonService createNewToggleMap: ",d),{}}}buttonClickSubject(){return this.buttonClickSubject$.asObservable()}buttonToggleMap(){return this.buttonToggleMap$.asObservable()}resetVeltButtonState(t){return vt(this,null,function*(){try{if(t){let{id:c,group:d}=t,s=JSON.parse(JSON.stringify(this.buttonToggleMap$.value||{}));d&&c?delete s?.[d]?.[c]:d?delete s?.[d]:c&&Object.keys(s).forEach(u=>{Object.keys(s[u]).forEach(v=>{v===c&&delete s?.[u]?.[v]})}),this.buttonToggleMap$.next(s)}else this.buttonToggleMap$.next({});let e={selections:this.buttonToggleMap$.value},i=yield this.metadataService.getGlobalMetadata(),a={buttonContext:e,metadata:i};this.coreActionsService.triggerAction(ae.VELT_BUTTON_CLICK,a)}catch(e){this.loggingService.catch("Error in ButtonService resetVeltButtonState: ",e)}})}buttonToggleMapValue(){return this.buttonToggleMap$.value}};r.\u0275fac=function(e){return new(e||r)(H(Be),H(L),H(Ke))},r.\u0275prov=et({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var wi=n=>({componentConfigSignal:n}),Ei=(n,r)=>({condition:n,data:r}),Ti=(n,r)=>({componentConfigSignal:n,buttonComponentConfig:r}),Ai=(n,r,o,t)=>({template:n,context:r,cloneTemplate:!0,setIfCondition:o,componentElementRef:t});function Mi(n,r){if(n&1&&(S(0),V(1),j(2,"translate"),y()),n&2){let o=l(5);f(),X(" ",U(2,1,o.id)," ")}}function Pi(n,r){if(n&1){let o=Ot();x(0,"div",3),Dt("click",function(){yt(o);let e=l(4);return kt(e.onClick())}),g(1,Mi,3,3,"ng-container",4),k()}if(n&2){let o=l().ngIf,t=l(3);wt("velt-button--disabled",o.disabled)("velt-button--active",t.group?o.buttonToggleMap==null||o.buttonToggleMap[t.group]==null?null:o.buttonToggleMap[t.group][t.id]:o.buttonToggleMap==null||o.buttonToggleMap.ungrouped==null?null:o.buttonToggleMap.ungrouped[t.id]),M("data-testid",t.componentId+"-"+t.id)("data-group",t.group?t.group:"ungrouped")("data-value",t.valueSignal()),f(),p("veltDynamicTemplate",ft(11,Ai,t.template,O(8,Ti,t.dataComponentConfigSignal().componentConfigSignal,o),t.setIfCondition.bind(t),t.elementRef))}}function Ri(n,r){if(n&1&&(S(0),g(1,Pi,2,16,"div",2),y()),n&2){let o=l(3);f(),p("ngIf",o.id)}}function Fi(n,r){if(n&1&&(S(0),g(1,Ri,2,1,"ng-container",0),y()),n&2){let o=l(2);f(),p("ngIf",o.buttonComponentConfigSignal())}}function ji(n,r){if(n&1&&(S(0),g(1,Fi,2,1,"ng-container",1),y()),n&2){let o=l();f(),p("veltIf",O(3,Ei,o.conditionSignal(),F(1,wi,o.dataComponentConfigSignal().componentConfigSignal)))}}var un=(()=>{let r=class r extends dt{set disabled(t){try{let e=t;typeof t=="string"&&(e=JSON.parse(t)),this.buttonComponentConfigSignal.update(i=>(i=h(m({},i),{disabled:e}),i))}catch{}}set active(t){try{let e=t;typeof t=="string"&&(e=JSON.parse(t)),this.buttonComponentConfigSignal.update(i=>(i=h(m({},i),{active:e}),i))}catch{}}constructor(t,e,i,a,c){super(a,i,e),this.buttonService=t,this.loggingService=e,this.dynamicDataService=i,this.elementRef=a,this.injector=c,this.type="button",this.componentId="velt-button",this.subscription=[],this.extractedProps={},this.valueSignal=A(void 0),this.dataComponentConfigSignal=A({}),this.buttonComponentConfigSignal=A({buttonToggleMap:{},active:!1,disabled:!1,contextData:{},internalId:null});try{this.subscription.push(this.dynamicDataService.getCommonData().subscribe(d=>{this.dataComponentConfigSignal.update(s=>(s=m(m({},s),d),s)),this.extractedProps=this.dynamicDataService.getModifiedPathBasedOnCondition(this.dataComponentConfigSignal,this.extractedProps),this.getComputedValues(this.dataComponentConfigSignal,this.evaluateCondition,this.extractedProps)}))}catch(d){this.loggingService.catch("Error in ButtonComponent data functionality: ",d)}}ngOnInit(){try{super.ngOnInit(),this.subscription.push(this.buttonService.buttonToggleMap().subscribe(t=>{this.buttonComponentConfigSignal.update(e=>(e=h(m({},e),{buttonToggleMap:t}),e))})),this.buttonComponentConfigSignal.update(t=>(t=h(m({},t),{internalId:this.id?.includes("{")&&this.id?.includes("}")?this.id?.split("{")[1].split("}")[0]:this.id}),t)),this.buttonComponentConfigSignal().internalId&&(this.extractProps(),this.extractedProps=this.dynamicDataService.getModifiedPathBasedOnCondition(this.dataComponentConfigSignal,this.extractedProps),this.getComputedValues(this.dataComponentConfigSignal,this.evaluateCondition,this.extractedProps)),setTimeout(()=>{this.buttonComponentConfigSignal().active&&this.buttonService.buttonActive({id:this.valueSignal(),type:this.type,groupId:this.group,contextData:this.buttonComponentConfigSignal().contextData})},100)}catch(t){this.loggingService.catch("Error in ButtonComponent ngOnInit: ",t)}}ngOnDestroy(){try{super.ngOnDestroy(),this.subscription.forEach(t=>{t.unsubscribe()})}catch(t){this.loggingService.catch("Error in ButtonComponent ngOnDestroy: ",t)}}onClick(){try{if(this.buttonComponentConfigSignal().disabled)return;this.buttonService.buttonClick({id:this.valueSignal(),type:this.type,groupId:this.group,contextData:this.buttonComponentConfigSignal().contextData,data:this.dataComponentConfigSignal()})}catch(t){this.loggingService.catch("Error in ButtonComponent onClick: ",t)}}updateDataComponentConfigSignal(t,e){try{t==="dataComponentConfigSignal"?this.dataComponentConfigSignal.set(e):this.dataComponentConfigSignal.update(i=>h(m({},i),{[t]:e})),this.buttonComponentConfigSignal.update(i=>(i=m({},i),i.contextData[t]=e,i))}catch(i){this.loggingService.catch("Error in ButtonComponent updateDataComponentConfigSignal: ",i)}}extractProps(){try{this.extractedProps[this.buttonComponentConfigSignal().internalId]={value:null,path:null}}catch(t){this.loggingService.catch("Error in ButtonComponent extractProps: ",t)}}evaluateCondition(){try{this.id?.includes("{")&&this.id?.includes("}")?(this.valueSignal.set(this.extractedProps[this.buttonComponentConfigSignal().internalId].value),this.elementRef.nativeElement.id=this.valueSignal()):(this.valueSignal.set(this.id),this.elementRef.nativeElement.id=this.id)}catch{}}getComputedValues(t,e,i,a,c,d){try{Object.keys(i).forEach(s=>{let u;nt(t)?u=rt(()=>lt(t(),i[s].path)):u=rt(()=>lt(t,i[s].path)),nt(u())?Ct(()=>{try{i[s].value=u()(),this.extractedProps=i,this.evaluateCondition()}catch{}},{injector:this.injector}):(i[s].value=u(),this.extractedProps=i,this.evaluateCondition())})}catch(s){this.loggingService.catch("Error in ButtonComponent getComputedValues: ",s)}}};r.\u0275fac=function(e){return new(e||r)(D(gn),D(L),D(b),D(ot),D(at))},r.\u0275cmp=P({type:r,selectors:[["app-button"]],inputs:{id:"id",type:"type",group:"group",disabled:"disabled",active:"active"},standalone:!1,features:[R([b]),N],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["class","velt-button",3,"velt-button--disabled","velt-button--active","click",4,"ngIf"],[1,"velt-button",3,"click"],[4,"veltDynamicTemplate"]],template:function(e,i){e&1&&g(0,ji,2,6,"ng-container",0),e&2&&p("ngIf",i.componentConfigSignal())},styles:[".velt-button--disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:not-allowed;opacity:.5}"],changeDetection:0});let n=r;return n})();var Ui=(n,r,o)=>({componentConfigSignal:n,parentLocalUIState:r,group:o}),Ni=(n,r)=>({condition:n,data:r}),Vi=(n,r)=>({componentConfigSignal:n,group:r}),Li=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-group-option-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function Bi(n,r){if(n&1&&(S(0),x(1,"div",2)(2,"span",3),V(3),k()(),y()),n&2){let o=l(3);f(3),Et((o.group==null?null:o.group.name)||o.groupName)}}function $i(n,r){if(n&1&&(S(0),g(1,Bi,4,1,"ng-container",1),y()),n&2){let o=l(),t=l();f(),p("veltDynamicTemplate",$(4,Li,t.template,O(1,Vi,t.componentConfigSignal,t.group),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function zi(n,r){if(n&1&&g(0,$i,2,10,"ng-container",0),n&2){let o=l();p("veltIf",O(5,Ni,o.conditionSignal(),it(1,Ui,o.componentConfigSignal,o.localUIStateSignal,o.group)))}}var hn=(()=>{let r=class r extends q{set group(t){this._group=t;let e=this._groupSetByParent;this._groupSetByParent=!!t,t?(this._groupIdSub?.unsubscribe(),this._groupIdSub=void 0):e&&this.resolveGroupId()}get group(){return this._group}set groupObject(t){try{if(this._groupSetByParent)return;if(!t){this._group=void 0,this.flushChangeDetection();return}let e=typeof t=="string"?JSON.parse(t):t;e&&typeof e=="object"&&(this._group=e,this.flushChangeDetection())}catch(e){this.loggingService.catch("Error parsing groupObject:",e)}}set groupId(t){this._groupId=t,this.resolveGroupId()}resolveGroupId(){try{if(this._groupSetByParent)return;this._groupIdSub?.unsubscribe(),this._groupIdSub=void 0;let t=this._groupId?.trim();if(!t){this._group=void 0,this.flushChangeDetection();return}this._groupIdSub=this.contactService.getOrganizationGroups$().subscribe(e=>{try{this._group=Gi(e,t),this.flushChangeDetection()}catch(i){this.loggingService.catch("Error resolving groupId:",i)}})}catch(t){this.loggingService.catch("Error in groupId resolution:",t)}}constructor(){super(),this.componentId="velt-autocomplete-group-option",this._groupSetByParent=!1,this.contactService=Q(bt),this.componentConfigSignal=A({})}ngOnInit(){try{super.ngOnInit(),this.dynamicDataService.applyConditionalClasses(this.hostElementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,group:this.group})}catch(t){this.loggingService.catch("Error in AutocompleteGroupOptionComponent ngOnInit:",t)}}ngOnDestroy(){try{this._groupIdSub?.unsubscribe(),super.ngOnDestroy()}catch(t){this.loggingService.catch("Error in AutocompleteGroupOptionComponent ngOnDestroy:",t)}}setupA11yAttributes(){try{ht(this.hostElementRef.nativeElement,this.componentId)}catch(t){this.loggingService.catch("Error in AutocompleteGroupOptionComponent setupA11yAttributes:",t)}}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=P({type:r,selectors:[["velt-autocomplete-group-option-internal"]],inputs:{group:"group",groupName:"groupName",groupObject:"groupObject",groupId:"groupId"},standalone:!1,features:[R([b]),N],decls:1,vars:1,consts:[[4,"veltIf"],[4,"veltDynamicTemplate"],[1,"velt-autocomplete-group-option"],[1,"velt-autocomplete-group-option-name"]],template:function(e,i){if(e&1&&w(0,zi,1,8,"ng-container"),e&2){let a;E((a=i.componentConfigSignal())?0:-1,a)}},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]:empty{display:none}.velt-autocomplete-group-option[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.velt-autocomplete-group-option-name[_ngcontent-%COMP%]{font-weight:500}"],changeDetection:0});let n=r;return n})();function Gi(n,r){try{let o=r?.trim();if(!o)return;let t=(n||[]).find(e=>e?.metadata?.clientGroupId===o||e?.metadata?.groupId===o);return t?{id:t.metadata.clientGroupId||t.metadata.groupId,name:t.metadata.groupName,members:[]}:void 0}catch{return}}var Hi=(n,r,o,t)=>({componentConfigSignal:n,parentLocalUIState:r,newUserContact:o,newUserContactError:t}),Wi=(n,r)=>({condition:n,data:r}),Ji=(n,r,o)=>({componentConfigSignal:n,newUserContact:r,newUserContactError:o}),Ki=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-empty-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function Yi(n,r){if(n&1&&(x(0,"span",3),V(1),k()),n&2){let o=l(4);M("data-testid",o.componentId+"-add-contact"),f(),X(' Add "',o.newUserContact==null||o.newUserContact.contact==null?null:o.newUserContact.contact.email,'" ')}}function Xi(n,r){if(n&1&&(x(0,"span",4),V(1),k()),n&2){let o=l(4);M("data-testid",o.componentId+"-error"),f(),X(" ",o.newUserContactError," ")}}function Zi(n,r){if(n&1&&(x(0,"span",5),V(1," No results found "),k()),n&2){let o=l(4);M("data-testid",o.componentId+"-no-results")}}function qi(n,r){if(n&1&&(S(0),x(1,"div",2),w(2,Yi,2,2,"span",3)(3,Xi,2,2,"span",4)(4,Zi,2,1,"span",5),k(),y()),n&2){let o=l(3);f(),M("data-testid",o.componentId),f(),E(!(o.newUserContact==null||o.newUserContact.contact==null)&&o.newUserContact.contact.email&&!o.newUserContactError?2:o.newUserContactError?3:4)}}function Qi(n,r){if(n&1&&(S(0),g(1,qi,5,2,"ng-container",1),y()),n&2){let o=l(),t=l();f(),p("veltDynamicTemplate",$(5,Ki,t.template,it(1,Ji,t.componentConfigSignal,t.newUserContact,t.newUserContactError),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function ta(n,r){if(n&1&&g(0,Qi,2,11,"ng-container",0),n&2){let o=l();p("veltIf",O(6,Wi,o.conditionSignal(),ft(1,Hi,o.componentConfigSignal,o.localUIStateSignal,o.newUserContact,o.newUserContactError)))}}var fn=(()=>{let r=class r extends q{constructor(){super(),this.componentId="velt-autocomplete-empty",this.componentConfigSignal=A({})}ngOnInit(){try{super.ngOnInit(),this.dynamicDataService.applyConditionalClasses(this.hostElementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,newUserContact:this.newUserContact,newUserContactError:this.newUserContactError})}catch(t){this.loggingService.catch("Error in AutocompleteEmptyComponent ngOnInit:",t)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(t){this.loggingService.catch("Error in AutocompleteEmptyComponent ngOnDestroy:",t)}}setupA11yAttributes(){try{let t=this.hostElementRef.nativeElement;t.setAttribute("role","status"),t.setAttribute("data-testid",this.componentId+"-container"),t.setAttribute("aria-live","polite")}catch(t){this.loggingService.catch("Error in AutocompleteEmptyComponent setupA11yAttributes:",t)}}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=P({type:r,selectors:[["velt-autocomplete-empty-internal"]],inputs:{newUserContact:"newUserContact",newUserContactError:"newUserContactError"},standalone:!1,features:[R([b]),N],decls:1,vars:1,consts:[[4,"veltIf"],[4,"veltDynamicTemplate"],[1,"velt-autocomplete-empty"],[1,"velt-autocomplete-empty--add-contact"],[1,"velt-autocomplete-empty--error"],[1,"velt-autocomplete-empty--no-results"]],template:function(e,i){if(e&1&&w(0,ta,1,9,"ng-container"),e&2){let a;E((a=i.componentConfigSignal())?0:-1,a)}},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]:empty{display:none}.velt-autocomplete-empty[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:8px 16px;color:var(--velt-text-6, #666);font-size:14px;line-height:1.5}.velt-autocomplete-empty--add-contact[_ngcontent-%COMP%]{color:var(--velt-text-1);cursor:pointer}.velt-autocomplete-empty--error[_ngcontent-%COMP%]{color:var(--velt-error-color, #dc3545)}.velt-autocomplete-empty--no-results[_ngcontent-%COMP%]{color:var(--velt-text-6, #666);font-style:italic}"],changeDetection:0});let n=r;return n})();var pt=class{constructor(){this.closeDialog=()=>{},this.darkMode=!1,this.variant="",this.type=""}};var Cn=n=>({componentConfigSignal:n}),ea=(n,r)=>({condition:n,data:r}),na=(n,r,o,t)=>({template:n,context:r,componentName:"velt-confirm-dialog-reject-button-wireframe",setIfCondition:o,componentElementRef:t});function oa(n,r){if(n&1&&(S(0),x(1,"button",4),V(2),j(3,"translate"),k(),y()),n&2){let o=l(2).ngIf;f(2),X(" ",U(3,1,(o==null?null:o.noButton)||"No")," ")}}function ra(n,r){if(n&1){let o=Ot();S(0),x(1,"div",2),Dt("pointerdown",function(e){return yt(o),kt(e.stopPropagation())}),g(2,oa,4,3,"ng-container",3),k(),y()}if(n&2){let o=l(2);f(),M("data-testid",o.componentId+"-button"),f(),p("veltDynamicTemplate",ft(4,na,o.template,F(2,Cn,o.componentConfigSignal),o.setIfCondition.bind(o),o.elementRef))}}function ia(n,r){if(n&1&&(S(0),g(1,ra,3,9,"ng-container",1),y()),n&2){let o=l();f(),p("veltIf",O(3,ea,o.conditionSignal(),F(1,Cn,o.componentConfigSignal)))}}var _n=(()=>{let r=class r extends dt{constructor(t,e,i){super(t,e,i),this.elementRef=t,this.dynamicDataService=e,this.loggingService=i,this.componentId="velt-confirm-dialog-reject",super.initializeComponentConfigSignal(new pt)}ngOnInit(){try{super.ngOnInit()}catch(t){this.loggingService.catch("Error in ConfirmDialogRejectComponent ngOnInit: ",t)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(t){this.loggingService.catch("Error in ConfirmDialogRejectComponent ngOnDestroy: ",t)}}};r.\u0275fac=function(e){return new(e||r)(D(ot),D(b),D(L))},r.\u0275cmp=P({type:r,selectors:[["app-confirm-dialog-reject"]],standalone:!1,features:[R([b]),N],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["mat-button","","mat-dialog-close","",3,"pointerdown"],[4,"veltDynamicTemplate"],[1,"velt-confirm-dialog--reject"]],template:function(e,i){e&1&&g(0,ia,2,6,"ng-container",0),e&2&&p("ngIf",i.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]{flex:1}.velt-confirm-dialog--reject[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:100%;padding:var(--velt-spacing-md) var(--velt-spacing-lg);border-radius:var(--velt-border-radius-3xl);border:0;transition:.2s;cursor:pointer;color:var(--velt-text-0);background-color:var(--velt-background-2);font-size:var(--velt-font-size-md);font-style:normal;font-weight:600;line-height:normal}.velt-confirm-dialog--reject[_ngcontent-%COMP%]:hover{background-color:var(--velt-background-4)}"],changeDetection:0});let n=r;return n})();var bn=n=>({componentConfigSignal:n}),aa=(n,r)=>({condition:n,data:r}),la=(n,r,o,t)=>({template:n,context:r,componentName:"velt-confirm-dialog-approve-button-wireframe",setIfCondition:o,componentElementRef:t});function ca(n,r){if(n&1&&(S(0),x(1,"button",4),V(2),j(3,"translate"),k(),y()),n&2){let o=l(2).ngIf;f(2),X(" ",U(3,1,(o==null?null:o.yesButton)||"Yes")," ")}}function sa(n,r){if(n&1){let o=Ot();S(0),x(1,"div",2),Dt("pointerdown",function(e){return yt(o),kt(e.stopPropagation())})("click",function(){yt(o);let e=l().ngIf;return kt(e==null?null:e.closeDialog(!0))}),g(2,ca,4,3,"ng-container",3),k(),y()}if(n&2){let o=l(2);f(),M("data-testid",o.componentId+"-button"),f(),p("veltDynamicTemplate",ft(4,la,o.template,F(2,bn,o.componentConfigSignal),o.setIfCondition.bind(o),o.elementRef))}}function da(n,r){if(n&1&&(S(0),g(1,sa,3,9,"ng-container",1),y()),n&2){let o=l();f(),p("veltIf",O(3,aa,o.conditionSignal(),F(1,bn,o.componentConfigSignal)))}}var xn=(()=>{let r=class r extends dt{constructor(t,e,i){super(t,e,i),this.elementRef=t,this.dynamicDataService=e,this.loggingService=i,this.componentId="velt-confirm-dialog-approve",super.initializeComponentConfigSignal(new pt)}ngOnInit(){try{super.ngOnInit()}catch(t){this.loggingService.catch("Error in ConfirmDialogApproveComponent ngOnInit: ",t)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(t){this.loggingService.catch("Error in ConfirmDialogApproveComponent ngOnDestroy: ",t)}}};r.\u0275fac=function(e){return new(e||r)(D(ot),D(b),D(L))},r.\u0275cmp=P({type:r,selectors:[["app-confirm-dialog-approve"]],standalone:!1,features:[R([b]),N],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["mat-button","","cdkFocusInitial","",3,"pointerdown","click"],[4,"veltDynamicTemplate"],[1,"velt-confirm-dialog--approve"]],template:function(e,i){e&1&&g(0,da,2,6,"ng-container",0),e&2&&p("ngIf",i.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]{flex:1}.velt-confirm-dialog--approve[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:100%;padding:var(--velt-spacing-md) var(--velt-spacing-lg);border-radius:var(--velt-border-radius-3xl);border:0;transition:.2s;cursor:pointer;background-color:var(--velt-error);color:var(--velt-error-foreground);font-size:var(--velt-font-size-md);font-style:normal;font-weight:500;line-height:normal}.velt-confirm-dialog--approve[_ngcontent-%COMP%]:hover{background-color:var(--velt-error-hover)}"],changeDetection:0});let n=r;return n})();var Sn=n=>({componentConfigSignal:n}),ma=(n,r)=>({condition:n,data:r}),pa=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-confirm-dialog-title-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function va(n,r){if(n&1&&(x(0,"h2",4),V(1),j(2,"translate"),k()),n&2){let o=l(3).ngIf,t=l();M("data-testid",t.componentId),f(),Et(U(2,2,o==null?null:o.title))}}function ga(n,r){if(n&1&&(S(0),g(1,va,3,4,"h2",3),y()),n&2){let o=l(2).ngIf;f(),p("ngIf",o==null?null:o.title)}}function ua(n,r){if(n&1&&(S(0),g(1,ga,2,1,"ng-container",2),y()),n&2){let o=l().ngIf,t=l();f(),p("veltDynamicTemplate",$(3,pa,t.template,F(1,Sn,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function ha(n,r){if(n&1&&(S(0),g(1,ua,2,9,"ng-container",1),y()),n&2){let o=l();f(),p("veltIf",O(3,ma,o.conditionSignal(),F(1,Sn,o.componentConfigSignal)))}}var yn=(()=>{let r=class r extends dt{constructor(t,e,i){super(t,e,i),this.elementRef=t,this.dynamicDataService=e,this.loggingService=i,this.componentId="velt-confirm-dialog-title",super.initializeComponentConfigSignal(new pt)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(t){this.loggingService.catch("Error in ConfirmDialogTitleComponent ngOnInit: ",t)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(t){this.loggingService.catch("Error in ConfirmDialogTitleComponent ngOnDestroy: ",t)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(t){this.loggingService.catch("Error in ConfirmDialogTitleComponent setupA11yAttributes:",t)}}};r.\u0275fac=function(e){return new(e||r)(D(ot),D(b),D(L))},r.\u0275cmp=P({type:r,selectors:[["app-confirm-dialog-title"]],standalone:!1,features:[R([b]),N],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],["mat-dialog-title","","class","velt-confirm-dialog-title",4,"ngIf"],["mat-dialog-title","",1,"velt-confirm-dialog-title"]],template:function(e,i){e&1&&g(0,ha,2,6,"ng-container",0),e&2&&p("ngIf",i.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}.velt-confirm-dialog-title[_ngcontent-%COMP%]{color:var(--velt-text-0);font-size:var(--velt-font-size-xl);font-style:normal;font-weight:600;line-height:1.5;padding:0 24px 9px}"],changeDetection:0});let n=r;return n})();var kn=n=>({componentConfigSignal:n}),fa=(n,r)=>({condition:n,data:r}),Ca=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-confirm-dialog-message-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function _a(n,r){if(n&1&&(x(0,"div"),V(1),j(2,"translate"),k()),n&2){let o=l(3).ngIf;f(),X(" ",U(2,1,o==null?null:o.message)," ")}}function ba(n,r){if(n&1&&(S(0),g(1,_a,3,3,"div",0),y()),n&2){let o=l(2).ngIf;f(),p("ngIf",o==null?null:o.message)}}function xa(n,r){if(n&1&&(S(0),x(1,"div",2),g(2,ba,2,1,"ng-container",3),k(),y()),n&2){let o=l().ngIf,t=l();f(),M("data-testid",t.componentId),f(),p("veltDynamicTemplate",$(4,Ca,t.template,F(2,kn,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function Sa(n,r){if(n&1&&(S(0),g(1,xa,3,10,"ng-container",1),y()),n&2){let o=l();f(),p("veltIf",O(3,fa,o.conditionSignal(),F(1,kn,o.componentConfigSignal)))}}var In=(()=>{let r=class r extends dt{constructor(t,e,i){super(t,e,i),this.elementRef=t,this.dynamicDataService=e,this.loggingService=i,this.componentId="velt-confirm-dialog-message",super.initializeComponentConfigSignal(new pt)}ngOnInit(){try{super.ngOnInit()}catch(t){this.loggingService.catch("Error in ConfirmDialogMessageComponent ngOnInit: ",t)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(t){this.loggingService.catch("Error in ConfirmDialogMessageComponent ngOnDestroy: ",t)}}};r.\u0275fac=function(e){return new(e||r)(D(ot),D(b),D(L))},r.\u0275cmp=P({type:r,selectors:[["app-confirm-dialog-message"]],standalone:!1,features:[R([b]),N],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["mat-dialog-content","",1,"velt-confirm-dialog-message"],[4,"veltDynamicTemplate"]],template:function(e,i){e&1&&g(0,Sa,2,6,"ng-container",0),e&2&&p("ngIf",i.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}.velt-confirm-dialog-message[_ngcontent-%COMP%]{margin:var(--velt-spacing-sm) 0;font-size:var(--velt-font-size-md);font-style:normal;font-weight:400;line-height:normal;color:var(--velt-text-0);padding:20px 24px}"],changeDetection:0});let n=r;return n})();var Rt={"velt-autocomplete-option-wireframe":mn,"velt-autocomplete-group-option-wireframe":hn,"velt-autocomplete-empty-wireframe":fn,"velt-autocomplete-option-icon-wireframe":sn,"velt-autocomplete-option-name-wireframe":dn,"velt-autocomplete-option-description-wireframe":an,"velt-autocomplete-option-error-icon-wireframe":cn,"velt-autocomplete-chip-tooltip-wireframe":on,"velt-autocomplete-chip-tooltip-icon-wireframe":en,"velt-autocomplete-chip-tooltip-name-wireframe":nn,"velt-autocomplete-chip-tooltip-description-wireframe":Qe,"velt-data":pn,"velt-if":vn,"velt-button-wireframe":un,"velt-confirm-dialog-wireframe":We,"velt-confirm-dialog-reject-button-wireframe":_n,"velt-confirm-dialog-approve-button-wireframe":xn,"velt-confirm-dialog-title-wireframe":yn,"velt-confirm-dialog-message-wireframe":In};var On=(()=>{let r=class r{constructor(t,e,i){this.injector=t,this.appRef=e,this.loggingService=i,this.componentRefs=new Map,this.veltFunctionComponents=["velt-if","velt-data","velt-button-wireframe"];try{this.loggingService.log("%c[WB] Creating CLASS: DynamicComponentService","color: blue;")}catch(a){this.loggingService.catch("Error in DynamicComponentService constructor: ",a)}}isSignalInput(t,e){try{let i=t[e];if(i&&typeof i=="function"){let a=i.toString();if(a.length<200&&!a.includes("native code"))return!0}return!1}catch{return!1}}setPropertyOnComponent(t,e,i){try{if(this.isSignalInput(t.instance,e))t.setInput(e,i);else{let a=e.replace(/-([a-z])/g,(c,d)=>d.toUpperCase());a!==e&&this.isSignalInput(t.instance,a)?t.setInput(a,i):t.instance[e]=i}}catch{try{t.instance[e]=i}catch(c){this.loggingService.warn(`Failed to set property '${e}' on component:`,c)}}}createComponentRef(t,e,i=!0){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: createComponentRef","color: green;"),e&&this.componentRefs.has(e)){let a=this.componentRefs.get(e);return a||null}else{let a=Se(t,{environmentInjector:this.injector.get(fe)});return i&&this.appRef.attachView(a.hostView),a}}catch(a){return this.loggingService.catch("Error in DynamicComponentService createComponentRef: ",a),null}}injectComponentIntoAndMoveChildren(t,e,i,a){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: injectComponentIntoAndMoveChildren","color: green;"),!Rt[t])return null;let c=a?`${a}__${t}`:"",d=e?.getAttribute("velt-wireframe-id");d&&(c=`${a}__${d}__${t}`);let s=this.createComponentRef(Rt[t],c,!1);if(!s||!e)return null;let u=s.location.nativeElement;if((e?.children?.length>0||e?.innerHTML?.trim()?.length>0)&&(s.instance.template=e),e.attributes.length>0)for(let v=0;v<e.attributes.length;v++){let T=e.attributes[v],I=T.name,_=T.value;I==="class"?u.classList.add(_):I==="style"?u.setAttribute("style",_):I==="velt-if"?s.instance.veltIf=_:(u.setAttribute(I,_),this.setPropertyOnComponent(s,I,_))}i&&typeof i=="object"&&Object.keys(i).forEach(v=>{this.veltFunctionComponents.includes(t)?s.instance.updateDataComponentConfigSignal(v,i[v]):this.setPropertyOnComponent(s,v,i[v])}),this.appRef.attachView(s.hostView),e.parentNode?e.parentNode.replaceChild(u,e):e.appendChild(u);try{Tt(u)}catch{}return s}catch(c){return this.loggingService.catch("Error in DynamicComponentService injectComponentIntoAndMoveChildren: ",c),null}}processAndReplaceVeltComponents(t,e,i,a=[],c){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: processAndReplaceVeltComponents","color: green;"),!t)return[];let d=[],s=t.tagName.toLowerCase();if(Rt[s]&&!a?.includes(s)){let v=this.injectComponentIntoAndMoveChildren(s,t,e,i);return v&&d.push(v),d}return Array.from(t.children).forEach(v=>{let T=this.processAndReplaceVeltComponents(v,e,i,a,c);d.push(...T)}),d}catch(d){return this.loggingService.catch("Error in DynamicComponentService processAndReplaceVeltComponents: ",d),[]}}getComponentRef(t){return this.componentRefs.get(t)||null}getAllComponentRefs(){return this.componentRefs}attachComponentToView(t){try{this.loggingService.log("%cc[WB] Calling FUNCTION: attachComponentToView","color: green;"),t&&this.appRef.attachView(t.hostView)}catch(e){this.loggingService.catch("Error in DynamicComponentService attachComponentToView: ",e)}}detachComponentFromView(t){try{this.loggingService.log("%c[WB] Calling FUNCTION: detachComponentFromView","color: green;"),t&&this.appRef.detachView(t.hostView)}catch(e){this.loggingService.catch("Error in DynamicComponentService detachComponentFromView: ",e)}}setCommentRefData(t,e){try{this.loggingService.log("%c[WB] Calling FUNCTION: setCommentRefData","color: green;"),e&&t&&typeof t=="object"&&(Object.keys(t).forEach(i=>{let a=e.instance?.template?.nodeName?.toLowerCase();this.veltFunctionComponents.includes(a)?e.instance.updateDataComponentConfigSignal(i,t[i]):this.setPropertyOnComponent(e,i,t[i])}),typeof e.instance?.refreshAnnotationContextFromSignal=="function"&&e.instance.refreshAnnotationContextFromSignal())}catch(i){this.loggingService.catch("Error in DynamicComponentService setCommentRefData: ",i)}}destroyComponentRefsByIdStartsWith(t){try{this.loggingService.log("%c[WB] Calling FUNCTION: destroyComponentRefsByIdStartsWith","color: green;"),this.componentRefs.forEach((e,i)=>{i.startsWith(t)&&(e.destroy(),this.componentRefs.delete(i))})}catch(e){this.loggingService.catch("Error in DynamicComponentService destroyComponentRefsByIdStartsWith: ",e)}}};r.\u0275fac=function(e){return new(e||r)(H(at),H(Ce),H(L))},r.\u0275prov=et({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var Ld=(()=>{let r=class r{set veltDynamicTemplate({template:t,context:e,id:i,cloneTemplate:a,componentName:c,variant:d,suffix:s,setIfCondition:u,componentElementRef:v,replaceTemplate:T=!0,childrenSlot:I=!0}){try{if(this.childrenSlot=I&&Ee(c)?Te(v?.nativeElement,this):void 0,this.childrenSlot&&!T&&this.warnAugmentingAnchorReplaced(c),s&&(c+=`--${s}`),d&&(c+=`---${d}`),c){let _=this.wireframeService.getConditionElement(c);if(!_&&t&&(_=t),_){let C=_?.getAttribute("velt-if");C&&u&&u(C),Array.from(_.attributes).forEach(z=>{v?.nativeElement.setAttribute(z.name,z.value)}),e?.componentConfigSignal?(this.dynamicDataService.applyConditionalClasses(v?.nativeElement,e),this.dynamicDataService.executeConditionalClasses()):this.dynamicDataService.applyConditionalClasses(v?.nativeElement)}}if(c&&!t){let _=this.wireframeService.getWireframe(c);if(_){let C=document.createElement(_.tagName);C.innerHTML=_.innerHTML,this.template=C}}else this.template=t;this.data=e,this.id=i,this.cloneTemplate=!!a,this.cloneTemplate&&t&&(this.template=this.domService.deepCloneElement(t)),this.checkToUpdateTemplate(T)}catch(_){this.loggingService.warn("Error in DynamicTemplateDirective veltDynamicTemplate: ",_)}}constructor(t,e,i,a,c,d,s,u){this.elementRef=t,this.templateRef=e,this.viewContainer=i,this.dynamicComponentService=a,this.loggingService=c,this.domService=d,this.wireframeService=s,this.dynamicDataService=u,this.directiveId=Math.random().toString(36).substring(7),this.isCustomTemplateMode=!1,this.isDefaultTemplateMode=!1,this.cloneTemplate=!1,this.injectedElements=[],this.isChildrenMode=!1,this.componentRefs=[],this.warnedAugmentingAnchor=!1;try{this.loggingService.log("%c[WB] Creating CLASS: DynamicTemplateDirective","color: blue;")}catch(v){this.loggingService.catch("Error in DynamicTemplateDirective constructor: ",v)}}checkDataValue(t,e){let i=t.querySelectorAll("[data-velt]");function a(c,d){return d.split(".").reduce((s,u)=>s&&s[u],c)}i.forEach(c=>{let d=c.getAttribute("data-velt");if(d&&e){let s=a(e,d);c instanceof HTMLElement&&(c.innerText=JSON.stringify(s,null,2))}})}checkToUpdateTemplate(t){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: checkToUpdateTemplate","color: green;"),this.childrenSlot)this.isDefaultTemplateMode=!1,this.isCustomTemplateMode=!1,this.isChildrenMode?this.updateDataOnComponentRefs(this.data):(this.cleanUp(),this.isChildrenMode=this.injectChildrenSlot());else if(this.template&&t)if(this.isDefaultTemplateMode=!1,this.isCustomTemplateMode)this.updateDataOnComponentRefs(this.data);else{this.isCustomTemplateMode=!0,this.cleanUp();let e=document.createElement(this.template.tagName);e.innerHTML=this.template.innerHTML,this.injectElementNextToSibling(this.elementRef.nativeElement,e)}else this.isCustomTemplateMode=!1,this.isDefaultTemplateMode||(this.cleanUp(),this.viewContainer.createEmbeddedView(this.templateRef),this.isDefaultTemplateMode=!0)}catch(e){this.loggingService.catch("Error in DynamicTemplateDirective checkToUpdateTemplate: ",e)}}warnAugmentingAnchorReplaced(t){try{if(this.warnedAugmentingAnchor)return;this.warnedAugmentingAnchor=!0,console.warn(`[Velt] Children passed to <${(t||"").replace(/-wireframe$/,"")}> replace its default content. This primitive normally renders SDK children of its own (and may repeat them per item), so your markup will render once, not once per item. To render per item, loop in your own code and place one primitive per item.`)}catch{}}injectChildrenSlot(){try{let t=Ae(this.childrenSlot,this);if(!t.length)return!1;let e=this.elementRef.nativeElement,i=e.parentNode;if(!i)return ie(this.childrenSlot,this),!1;t.forEach(c=>{if(Me(c,d=>!!Rt[d])){let d=this.dynamicComponentService.processAndReplaceVeltComponents(c,this.data,this.id?this.id:`from-children-${this.directiveId}`,[],"from children slot");d?.length&&this.componentRefs.push(...d)}});let a=e.nextSibling;return t.forEach(c=>{i.insertBefore(c,a),a=c.nextSibling}),t.forEach(c=>Tt(c)),!0}catch(t){return this.loggingService.catch("Error in DynamicTemplateDirective injectChildrenSlot: ",t),!1}}injectElementNextToSibling(t,e){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: injectElementNextToSibling","color: green;"),!e)return;this.cleanUp();let i=e;for(let c=0;c<i.children.length;c++){let d=i.children[c],s=this.dynamicComponentService.processAndReplaceVeltComponents(d,this.data,this.id?this.id:`from-directive-${this.directiveId}`,[],"from directive");s?.length&&this.componentRefs.push(...s)}i.setAttribute("data-velt-added-from-directive","true"),this.customTemplate=i;let a=Array.from(i.childNodes).reverse();t.nextSibling&&t.nextSibling&&t.nextSibling.getAttribute&&t.nextSibling.getAttribute("data-velt-added-from-directive")&&t.parentNode.removeChild(t.nextSibling),a.forEach(c=>{t.parentNode.insertBefore(c,t.nextSibling),c instanceof Element&&this.injectedElements.push(c)}),i.remove()}catch(i){this.loggingService.catch("Error in DynamicTemplateDirective injectElementNextToSibling: ",i)}}updateDataOnComponentRefs(t){try{this.loggingService.log("%c[WB] Calling FUNCTION: updateDataOnComponentRefs","color: green;"),this.componentRefs.forEach(e=>{this.dynamicComponentService.setCommentRefData(t,e)})}catch(e){this.loggingService.catch("Error in DynamicTemplateDirective updateDataOnComponentRefs: ",e)}}ngOnDestroy(){try{this.cleanUp()}catch(t){this.loggingService.catch("Error in DynamicTemplateDirective ngOnDestroy: ",t)}}cleanUp(){try{this.componentRefs.forEach(t=>{t.destroy()}),this.componentRefs=[],this.isChildrenMode&&(ie(this.childrenSlot,this),this.isChildrenMode=!1),this.injectedElements.forEach(t=>{t.remove()}),this.injectedElements=[],this.viewContainer.clear()}catch(t){this.loggingService.catch("Error in DynamicTemplateDirective cleanUp: ",t)}}};r.\u0275fac=function(e){return new(e||r)(D(ot),D(Wt),D(Jt),D(On),D(L),D($e),D(Pt),D(b))},r.\u0275dir=Kt({type:r,selectors:[["","veltDynamicTemplate",""]],inputs:{veltDynamicTemplate:"veltDynamicTemplate"}});let n=r;return n})();var Kd=(()=>{let r=class r{set veltIf(t){this.handleVeltIfChange(t)}constructor(t,e,i,a,c){this.templateRef=t,this.viewContainer=e,this.dynamicDataService=i,this.loggingService=a,this.injector=c,this.destroy$=new It,this.conditionRegex=/\{(.*?)\}/g,this.dataComponentConfig=A({}),this.extractedProps={},this.hasView=!1,this.cleanupEffects=[];try{this.dynamicDataService.getCommonData().pipe(ue(this.destroy$)).subscribe(d=>{this.processCondition(d)})}catch(d){this.loggingService.catch("Error in IfDirective constructor:",d)}}ngOnInit(){try{if(!this.context?.data)return;Object.entries(this.context.data).forEach(([t,e])=>{this.updateConfig(t,e)}),this.context.condition&&this.processCondition()}catch(t){this.loggingService.catch("Error in IfDirective ngOnInit:",t)}}ngOnDestroy(){try{this.cleanupEffects.forEach(t=>t.destroy()),this.cleanupEffects.length=0,this.destroy$.next(),this.destroy$.complete()}catch(t){this.loggingService.catch("Error in IfDirective ngOnDestroy:",t)}}handleVeltIfChange(t){try{if(this.context=t,!t.condition){this.hasView||(this.viewContainer.createEmbeddedView(this.templateRef),this.hasView=!0);return}this.processCondition()}catch(e){this.loggingService.warn("Error in IfDirective input setter:",e)}}processCondition(t){try{this.extractProps(),t&&this.dataComponentConfig.update(e=>(e=m(m({},e),t),e)),this.extractedProps=this.dynamicDataService.getModifiedPathBasedOnCondition(this.dataComponentConfig,this.extractedProps),this.getComputedValues(this.dataComponentConfig,this.evaluateCondition.bind(this),this.extractedProps)}catch(e){this.loggingService.catch("Error in IfDirective processCondition:",e)}}getComputedValues(t,e,i,a,c,d){try{this.cleanupEffects.forEach(s=>s.destroy()),this.cleanupEffects.length=0,Object.keys(i).forEach(s=>{let u;if(nt(t)?u=rt(()=>lt(t(),i[s].path)):u=rt(()=>lt(t,i[s].path)),nt(u())){let v=Ct(()=>{try{let T=u()();i[s].value=T,this.extractedProps=i,this.evaluateCondition()}catch{}},{injector:this.injector,allowSignalWrites:!0});this.cleanupEffects.push(v)}else{let v=u();i[s].value=v,this.extractedProps=i,this.evaluateCondition()}})}catch(s){this.loggingService.catch("Error in DynamicDataService getComputedValues: ",s)}}extractProps(){try{this.extractedProps={},this.conditionRegex.lastIndex=0;let t;for(;(t=this.conditionRegex.exec(this.context?.condition??""))!==null;){let e=t[1];this.extractedProps[e]={value:null,path:null,isDynamicPath:this.hasDynamicParts(e)}}}catch(t){this.loggingService.catch("Error in IfDirective extractProps:",t)}}hasDynamicParts(t){try{let e=/\[[^\]'"]*[^\]'"]\]/.test(t),i=/\[[^[\]]*[\.\[][^[\]]*\]/.test(t);return e||i}catch(e){return this.loggingService.catch("Error checking for dynamic path: ",e),!1}}evaluateCondition(){try{if(!this.context?.condition)return!1;let t=this.buildConditionString(),e=this.sanitizeCondition(t),i=this.dynamicDataService.safeEval(e);return this.updateView(i),i}catch(t){return this.loggingService.catch("Error in IfDirective evaluateCondition:",t),this.clearView(),!1}}buildConditionString(){try{return this.context.condition.replace(this.conditionRegex,(t,e)=>{let i=this.extractedProps[e];if(i?.value!==void 0){let a=i.value;return typeof a=="string"?`'${a}'`:typeof a=="boolean"||typeof a=="number"?String(a):a===null?"null":typeof a=="object"?a?"true":"false":String(a)}return"false"})}catch(t){return this.loggingService.catch("Error in IfDirective buildConditionString:",t),""}}sanitizeCondition(t){try{return t.replace(/[^a-zA-Z0-9\s\+\-\*\/\%\(\)\!\=\<\>\|\&\.\[\]\{\},'"]/g,"")}catch(e){return this.loggingService.catch("Error sanitizing condition:",e),""}}updateView(t){try{t&&!this.hasView?(this.viewContainer.createEmbeddedView(this.templateRef),this.hasView=!0):!t&&this.hasView&&this.clearView()}catch(e){this.loggingService.catch("Error in IfDirective updateView:",e)}}clearView(){try{this.viewContainer.clear(),this.hasView=!1}catch(t){this.loggingService.catch("Error in IfDirective clearView:",t)}}updateConfig(t,e){try{this.dataComponentConfig.update(i=>h(m({},i),{[t]:e}))}catch(i){this.loggingService.catch("Error in IfDirective updateConfig:",i)}}};r.\u0275fac=function(e){return new(e||r)(D(Wt),D(Jt),D(b),D(L),D(at))},r.\u0275dir=Kt({type:r,selectors:[["","veltIf",""]],inputs:{veltIf:"veltIf"},features:[R([b])]});let n=r;return n})();export{Je as a,Ke as b,qt as c,ja as d,Xe as e,Qt as f,te as g,ee as h,q as i,Qe as j,en as k,nn as l,on as m,an as n,cn as o,sn as p,dn as q,mn as r,pt as s,_n as t,xn as u,yn as v,In as w,vn as x,gn as y,un as z,hn as A,fn as B,Rt as C,On as D,Ld as E,Kd as F};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as Y}from"./chunk-
|
|
1
|
+
import{b as Y}from"./chunk-M7U5MNPT.js";import{$ as j,Ai as N,C as A,Cf as D,E as g,Fi as K,Jd as w,L as S,Ld as y,M as B,Md as U,Nd as O,Ni as _,Oi as x,Pi as Q,S as F,T as H,W as E,ca as b,g as $,ki as W,l as C,li as L,p as k,qh as P,r as u,si as R,ti as M,v as m,w as z}from"./chunk-KWXZADQY.js";var he=(()=>{let p=class p{constructor(e,t,r,a,s,c,n,i,d,o){this.authService=e,this.commonDbService=t,this.databaseService=r,this.docService=a,this.domService=s,this.loggingService=c,this.metadataService=n,this.commonDbUtils=i,this.configService=d,this.realtimeAdapter=o,this.HEARTBEAT_DURATION=5*1e3,this.heartbeatEnabled$=new C(!1),this.subscriptions=[],this.heartbeatCreatedTimestamps=new Map,this.initializedHeartbeatIds=new Set;try{this.loggingService.log("%c[WB] Creating CLASS: HeartbeatService","color: blue;"),this.heartbeatEnabled$.pipe(S()).subscribe(h=>{h?this.setupHeartbeat():this.teardownHeartbeat()}),this.docService.addPreDocumentIdChangeFunction("heartbeat-service",h=>h?.documentId?this.removeDocumentHeartbeat(h):Promise.resolve())}catch(h){this.loggingService.catch("Error in HeartbeatService constructor: ",h)}}setupWebWorker(e){try{let t=`
|
|
2
2
|
let intervalId;
|
|
3
3
|
self.addEventListener('message', (event) => {
|
|
4
4
|
if (event.data === 'start') {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as L}from"./chunk-N72BHERH.js";import{
|
|
1
|
+
import{b as L}from"./chunk-N72BHERH.js";import{Ca as z,Ea as B}from"./chunk-E35TUEDG.js";import{Fa as r,Ga as S,Gc as N,Kb as T,Nb as f,Ob as D,Pa as s,Qb as h,Ua as I,Ya as O,_a as m,a as y,b as u,ha as w,ia as _,kc as v,ki as j,lb as p,lc as g,mb as a,nb as d,qa as C,sb as E,si as V,tb as k,vb as F,wa as b,xb as x,zb as c}from"./chunk-KWXZADQY.js";function A(t,i){if(t&1&&(a(0,"span",6),f(1),v(2,"translate"),d()),t&2){let o=c(2).ngIf;r(),h("",g(2,2,"You are following")," ",o.leaderName)}}function P(t,i){t&1&&(a(0,"span",6),f(1),v(2,"translate"),d()),t&2&&(r(),D(g(2,1,"You are leading.")))}function R(t,i){if(t&1){let o=F();a(0,"div",2),x("click",function(){w(o);let e=c().ngIf,l=c();return _(e.type==="following"?l.closeOverlay():void 0)}),a(1,"div",3),m(2,A,3,4,"span",4)(3,P,3,3,"span",4),a(4,"button",5),x("click",function(){w(o);let e=c(2);return _(e.closeOverlay())}),f(5),v(6,"translate"),v(7,"translate"),d()()()}if(t&2){let o=c().ngIf;T("no-pointer",o.type==="leading"),r(2),p("ngIf",o.type==="following"),r(),p("ngIf",o.type==="leading"),r(2),h("",g(6,6,"Stop")," ",g(7,8,o.type))}}function Y(t,i){if(t&1&&(E(0),m(1,R,8,10,"div",1),k()),t&2){let o=i.ngIf;r(),p("ngIf",o.leaderName!==""||o.type==="leading")}}var te=(()=>{let i=class i extends B{closeOverlay(){this.closeOverlayEvent.emit()}constructor(n,e,l,M){super(e,l),this.loggingService=n,this.elementRef=e,this.themeService=l,this.domService=M,this.closeOverlayEvent=new S,this.componentConfigSignal=C({leaderName:"",type:"following"})}ngOnInit(){}ngAfterViewInit(){try{this.customCssSubscription=this.domService.subscribeInjectCustomCss(this.elementRef)}catch(n){this.loggingService.catch("Error in FollowOverlayComponent ngAfterViewInit: ",n)}}setLeaderName(n){try{this.componentConfigSignal.update(e=>(e=u(y({},e),{leaderName:n}),e))}catch(e){this.loggingService.catch("Error in FollowOverlayComponent setLeaderName: ",e)}}getLeaderName(){return this.componentConfigSignal().leaderName}setType(n){try{this.componentConfigSignal.update(e=>(e=u(y({},e),{type:n}),e))}catch(e){this.loggingService.catch("Error in FollowOverlayComponent setType: ",e)}}ngOnDestroy(){try{super.ngOnDestroy(),this.customCssSubscription?.unsubscribe()}catch(n){this.loggingService.catch("Error in FollowOverlayComponent ngOnDestroy: ",n)}}};i.\u0275fac=function(e){return new(e||i)(s(j),s(b),s(z),s(V))},i.\u0275cmp=I({type:i,selectors:[["snippyly-follow-overlay"]],outputs:{closeOverlayEvent:"closeOverlayEvent"},standalone:!1,features:[O],decls:1,vars:1,consts:[[4,"ngIf"],["data-velt-ignore","","class","follow-overlay-container",3,"no-pointer","click",4,"ngIf"],["data-velt-ignore","",1,"follow-overlay-container",3,"click"],["data-velt-ignore","",1,"follow-dialog"],["data-velt-ignore","","class","follow-text",4,"ngIf"],["data-velt-ignore","",1,"follow-btn",3,"click"],["data-velt-ignore","",1,"follow-text"]],template:function(e,l){e&1&&m(0,Y,2,1,"ng-container",0),e&2&&p("ngIf",l.componentConfigSignal())},dependencies:[N,L],styles:[`html{--velt-base-rem-unit: 1}*[data-snippyly-element=true],*[data-velt-element=true]{font-family:var(--velt-default-font-family)}velt-wireframe{display:none!important}body.velt-pin-dragging iframe{pointer-events:none!important}.follow-overlay-container{position:fixed;top:0;left:0;width:100%;height:100%;background-color:transparent;z-index:var(--velt-follow-mode-overlay-z-index);display:flex;justify-content:center;align-items:flex-end}.follow-overlay-container .follow-dialog{background-color:var(--legacy-velt-follow-overlay-bg-color);color:var(--legacy-velt-follow-overlay-text-color);font-size:12px;display:flex;justify-content:center;align-items:center;gap:calc((1.2rem + 0px) * var(--velt-base-rem-unit));padding:calc((.9rem + 0px) * var(--velt-base-rem-unit)) calc((1.1rem + 0px) * var(--velt-base-rem-unit));border-radius:90px;margin-bottom:calc((2rem + 0px) * var(--velt-base-rem-unit));box-shadow:0 8px 16px -8px #0f0f0f1a;border:1px solid var(--legacy-velt-follow-overlay-border-color)}.follow-overlay-container .follow-dialog .follow-btn{background-color:var(--legacy-velt-follow-overlay-btn-color);padding:8px 12px;border-radius:90px;display:inline-flex;justify-content:center;align-items:center;border:none;font-weight:600;font-size:14px;cursor:pointer;pointer-events:all}.follow-overlay-container .follow-dialog .follow-btn:hover{transition:background-color .5s;background-color:var(--legacy-velt-follow-overlay-btn-hover-color)}.follow-overlay-container.no-pointer{pointer-events:none}
|
|
2
2
|
`],encapsulation:3,changeDetection:0});let t=i;return t})();export{te as a};
|