@veltdev/sdk-dev 6.0.7-beta.1 → 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-JZ3DIQVE.js → chunk-B2QMS6VA.js} +0 -0
package/chunk-FR7BEDQT.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as At,b as Oe}from"./chunk-XJT64ZXP.js";import{b as Ie}from"./chunk-N72BHERH.js";import{ca as _t,da as x,ea as Ht,fa as dt,ga as ke}from"./chunk-6VMBIKMK.js";import{$ as et,Aa as Bt,Bc as pe,Ca as Lt,Cf as he,Ee as ge,Fa as f,Fi as ye,Ib as H,Kb as Dt,L as ie,La as $t,Nb as B,Ob as wt,Pa as D,Pb as X,Qb as Gt,Ra as zt,T as gt,U as ae,Ua as P,Uh as ut,Vh as _e,Wa as Vt,Ya as U,_a as g,_b as F,a as d,ac as Ft,b as h,ba as le,bb as se,bc as R,be as Zt,c as re,ca as G,cc as O,da as Q,db as M,dc as rt,ec as ft,fa as ce,fb as w,fc as z,g as pt,gb as T,gc as de,ha as St,hc as me,ia as yt,ii as Tt,ja as ct,k as kt,kc as N,ki as L,l as jt,la as st,lb as v,lc as j,li as be,mb as S,nb as I,nh as at,ob as Y,p as xt,pa as nt,pc as W,qa as A,qh as fe,qi as xe,rf as ue,sb as y,sc as it,si as Se,tb as k,tc as Ct,ti as Et,ub as $,vb as It,vc as Xt,w as Ut,wa as ot,xb as Ot,xc as ve,yh as Ce,zb as l}from"./chunk-KWXZADQY.js";var De=(()=>{let r=class r{constructor(t){this.loggingService=t,this.autocompleteDataMap$=new jt({}),this.onAutocompleteChipClick$=new kt;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)(G(L))},r.\u0275prov=et({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var we=(()=>{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 pt(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(u=>{delete u?.locations,delete u?.location,delete u?.locationId,delete u?.pageInfo,delete u?.documentId,u.documentId=u?.clientDocumentId,delete u?.clientDocumentId,delete u?.veltFolderId,u?.clientOrganizationId&&(u.organizationId=u?.clientOrganizationId,delete u?.clientOrganizationId)}));let c=[];a&&(a=JSON.parse(JSON.stringify(a)),a?.location&&c.push(a?.location));let m=this.docService.getLocations();m&&Object.values(m).forEach(u=>{u?.location&&c.push(u?.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 pt(this,null,function*(){try{let t=this.authService.getUser();if(!t)return null;let e,i;t&&(e=Ce(t)??void 0,i=JSON.parse(JSON.stringify(t)),delete i?.contacts);let a=this.configService.getApiKey(),c=window?.Velt?.version,m=this.docService.getOrganizationMetadata(t?.organizationId),s,p;m&&(s=JSON.parse(JSON.stringify(m)),delete s?.organizationId,s.organizationId=s?.clientOrganizationId,delete s?.clientOrganizationId,delete s?.pageInfo,delete s?.apiKey,p=JSON.parse(JSON.stringify(m)),delete p?.clientOrganizationId,delete p?.pageInfo,delete p?.apiKey);let u=this.docService.getDocumentMetadataOfAvailableDocuments(),E=this.docService.getLocation(),b=[],_=[];E&&(b.push(E),E?.location&&_.push(E?.location));let C=this.docService.getLocations();C&&Object.values(C).forEach(V=>{b.push(V),V?.location&&_.push(V?.location)});let K=[],Z=[];u&&(K=JSON.parse(JSON.stringify(u)),K.forEach(V=>{delete V?.apiKey,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)}),Z=JSON.parse(JSON.stringify(u)),Z.forEach(V=>{delete V?.apiKey,delete V?.locations,delete V?.location,delete V?.locationId,delete V?.pageInfo,delete V?.clientDocumentId,V.folderId=V?.veltFolderId,delete V?.veltFolderId,delete V?.clientOrganizationId}));let lt,Nt=this.docService.getDocumentPaths();Nt?.folderId&&Nt?.veltFolderId&&(lt={folderId:Nt?.folderId,veltFolderId:Nt?.veltFolderId});let Yt,Mt;lt&&(Yt=JSON.parse(JSON.stringify(lt)),delete Yt?.veltFolderId,Mt=JSON.parse(JSON.stringify(lt)),Mt.folderId=Mt.veltFolderId,delete Mt?.veltFolderId);let Pt={};return Pt.veltVersion=c,Pt.apiKey=a,Pt.serverMap={organization:p??void 0,documents:Z,locations:b??void 0,folder:Mt??void 0,user:i??void 0,accessFields:this.docService.getProcessedDocContext()??void 0},Pt.clientMap={organization:s??void 0,documents:K,locations:_??void 0,folder:Yt??void 0,user:e??void 0,context:this.docService.getDocContext()??void 0},Pt}catch(t){return this.loggingService.catch("Error in MetadataService getDebugInfo: ",t),null}})}getDebugInfo$(){return Ut([this.authService.getUser$(),this.docService.getOrganizationConfig$(),this.docService.getOrganizationMetadataMap$(),this.docService.getAllDocumentMetadataMap$(),this.docService.getDocContext$()]).pipe(gt(()=>pt(this,null,function*(){return yield this.getDebugInfo()})),ie(fe))}};r.\u0275fac=function(e){return new(e||r)(G(ye),G(L),G(Et),G(be))},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}},Rt=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 qt(){return{panelOpen:!1,filterText:"",highlightedIndex:-1,autocompleteDisabledPositions:new Set,darkMode:!1,variant:void 0}}var Te=new le("AutocompleteLocalUIStateSignal");var Wt=(()=>{let r=class r{constructor(t,e,i,a,c,m){this.authService=t,this.contactService=e,this.autocompleteService=i,this.serviceBook=a,this.themeService=c,this.loggingService=m,this.contextMap=new Map,this.registryMap=new Map,this.serviceSubscriptions=[],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(d({},e),{appState:h(d({},e.appState),{user:t})})))})),this.serviceSubscriptions.push(this.themeService.getDarkMode$().subscribe(t=>{this.currentDarkMode=t,this.updateAllContexts(e=>h(d({},e),{appState:h(d({},e.appState),{darkMode:t})}))})),this.serviceSubscriptions.push(this.contactService.getUserContacts$().subscribe(t=>{this.currentUserContacts=t?.slice()||[],this.updateAllContexts(e=>h(d({},e),{data:h(d({},e.data),{userContacts:this.buildUserContactsWithHere(this.currentUserContacts)})}))})),this.serviceSubscriptions.push(this.contactService.getOrganizationGroups$().subscribe(t=>{this.currentOrganizationGroups=t||[],this.updateAllContexts(e=>h(d({},e),{data:h(d({},e.data),{organizationGroups:this.currentOrganizationGroups})}))})),this.serviceSubscriptions.push(this.contactService.getUserDocumentContacts$().subscribe(t=>{this.currentUserDocumentContacts=t||[],this.updateAllContexts(e=>h(d({},e),{data:h(d({},e.data),{userDocumentContacts:this.currentUserDocumentContacts})}))})),this.serviceSubscriptions.push(this.autocompleteService.getAutocompleteDataMap$().subscribe(t=>{this.currentAutocompleteDataMap=t||{},this.updateAllContexts(e=>h(d({},e),{data:h(d({},e.data),{autocompleteDataMap:this.currentAutocompleteDataMap})}))})),this.serviceSubscriptions.push(this.contactService.getAtHereEnabled$().subscribe(t=>{this.currentAtHereEnabled=t,this.updateAllContexts(e=>h(d({},e),{featureState:h(d({},e.featureState),{atHereEnabled:t}),data:h(d({},e.data),{userContacts:this.buildUserContactsWithHere(this.currentUserContacts)})}))})),this.serviceSubscriptions.push(this.contactService.getAtHereLabel().subscribe(t=>{this.currentAtHereLabel=t,this.updateAllContexts(e=>h(d({},e),{data:h(d({},e.data),{hereUserContact:h(d({},e.data.hereUserContact),{name:t})})}))})),this.serviceSubscriptions.push(this.contactService.getAtHereDescription().subscribe(t=>{this.currentAtHereDescription=t,this.updateAllContexts(e=>h(d({},e),{data:h(d({},e.data),{atHereDescription:t})}))})),this.serviceSubscriptions.push(this.serviceBook.observe(ut).pipe(gt(t=>t?t.getCustomAutocompleteSearch$():xt)).subscribe(t=>{this.currentCustomAutocompleteSearch=t,this.updateAllContexts(e=>h(d({},e),{featureState:h(d({},e.featureState),{customAutocompleteSearch:t})}))})),this.serviceSubscriptions.push(this.serviceBook.observe(ut).pipe(gt(t=>t?t.getExpandMentionGroups$():xt)).subscribe(t=>{this.currentExpandMentionGroups=t,this.updateAllContexts(e=>h(d({},e),{featureState:h(d({},e.featureState),{expandMentionGroups:t})}))})),this.serviceSubscriptions.push(this.serviceBook.observe(ut).pipe(gt(t=>t?t.getShowMentionGroupsFirst$():xt)).subscribe(t=>{this.currentShowMentionGroupsFirst=t,this.updateAllContexts(e=>h(d({},e),{featureState:h(d({},e.featureState),{showMentionGroupsFirst:t})}))})),this.serviceSubscriptions.push(this.serviceBook.observe(ut).pipe(gt(t=>t?t.getShowMentionGroupsOnly$():xt)).subscribe(t=>{this.currentShowMentionGroupsOnly=t,this.updateAllContexts(e=>h(d({},e),{featureState:h(d({},e.featureState),{showMentionGroupsOnly:t})}))})),this.serviceSubscriptions.push(this.serviceBook.observe(ut).pipe(gt(t=>t?t.getPaginatedContactList$():xt)).subscribe(t=>{this.currentPaginatedContactList=t,this.updateAllContexts(e=>h(d({},e),{featureState:h(d({},e.featureState),{paginatedContactList:t})}))})),this.serviceSubscriptions.push(this.serviceBook.observe(ut).pipe(gt(t=>t?t.getAutoCompleteScrollConfig$():xt)).subscribe(t=>{this.currentAutoCompleteScrollConfig=t,this.updateAllContexts(e=>h(d({},e),{uiState:h(d({},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 Rt;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)}return e}catch(e){return this.loggingService.catch("Error in AutocompleteCoreService getOrCreateContextConfig:",e),A(new Rt)}}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)}catch(i){this.loggingService.catch("Error in AutocompleteCoreService setContextConfig:",i)}}clearContextConfig(t){try{this.contextMap.delete(t),this.registryMap.delete(t)}catch(e){this.loggingService.catch("Error in AutocompleteCoreService clearContextConfig:",e)}}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)(G(Et),G(_t),G(De),G(Tt),G(Ht),G(L))},r.\u0275prov=et({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var Ee=(()=>{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(_e).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()||"",m=new ue;m.email=c;let s=new RegExp(ge.REGEX_EMAIL).test("@"+m?.email),p=a.data.userContacts.slice();a.featureState.customAutocompleteSearch||e&&(p=this.filterContacts(p,m),a.featureState.paginatedContactList&&p.length<3&&this.fetchFilteredUsersFromDb(e).then(()=>{})),a.featureState.atHereEnabled&&a.data.hereUserContact?.name?.includes(c)&&(p?.find(C=>C?.userId==="here")||(p=[a.data.hereUserContact,...p])),i?.length&&(p=p.filter(C=>!i.find(K=>K?.email===C?.email)));let u=e?this.filterGroups(a.data.organizationGroups,e):a.data.organizationGroups,E=p.map(C=>{if(C.visibility==="here"){if(a.data.atHereDescription)C=h(d({},C),{email:a.data.atHereDescription}),C.description=a.data.atHereDescription;else if(a.appState.user&&a.appState.user?.organizationId){let K=a.data.userDocumentContacts?.length||0;C=h(d({},C),{email:`${K} members`}),C.description=`${K} members`}}return{type:"contact",contact:C,disabled:!1}}),b=u.map(C=>({type:"group",group:C})),_=[...E,...b];if(a.featureState.expandMentionGroups)this.buildExpandedGroupItems(t,_,a,m,s);else{let C=_.length?void 0:{type:"contact",contact:m},K=this.createFlattenedItems({allItems:_,newUserContact:C,isExpandedGroups:!1,isCustomGroups:!1,showMentionGroupsOnly:a.featureState.showMentionGroupsOnly,showMentionGroupsFirst:a.featureState.showMentionGroupsFirst});t.update(Z=>h(d({},Z),{data:h(d({},Z.data),{flattenedItems:K,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 m=[],s={},p=new Map;e.forEach(C=>{if(C.contact?.userId){let K=he(C.contact.userId);p.set(K,C),s[C.contact.userId]=!1}});let u=new Map;i.data.organizationGroups.forEach(C=>{u.set(C.metadata.clientGroupId,{id:C.metadata.clientGroupId,name:C.metadata.groupName,members:[],userIds:Object.keys(C.users||{})})}),u.forEach(C=>{C.userIds.forEach(K=>{let Z=p.get(K);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]&&m.push(C)});let E=Array.from(u.values()),b=e.length?void 0:{type:"contact",contact:a},_=this.createFlattenedItems({allItems:e,contactsWithoutGroup:m,groups:E,newUserContact:b,isExpandedGroups:!0,isCustomGroups:!1,showMentionGroupsOnly:i.featureState.showMentionGroupsOnly,showMentionGroupsFirst:i.featureState.showMentionGroupsFirst});t.update(C=>h(d({},C),{data:h(d({},C.data),{flattenedItems:_,newUserContactError:c?void 0:"Invalid email",newUserContact:b,contactsWithoutGroup:m,groups:E})}))}catch(m){this.loggingService.catch("Error in AutocompleteActionService buildExpandedGroupItems:",m)}}filterCustomOptions(t,e){try{let i=t(),a=i.data.selectedAutocompleteData,c=i.data.autocompleteDataMap?.[a?.hotkey],m=c?.data?.slice()||[];if(i.featureState.customAutocompleteSearch||(e?m=m.filter(p=>p.name?.toLowerCase()?.includes(e?.toLowerCase())):m=a?.data?.slice()||[]),c?.groups&&c.groups.length>0){let p=[],u=new Map;c.groups?.forEach(_=>{u.set(_.id,{id:_.id,name:_.name,members:[]})}),m.forEach(_=>{let C={type:"custom",custom:_};_.groupId&&u.has(_.groupId)?u.get(_.groupId)?.members.push(C):p.push(C)});let E=Array.from(u.values()).filter(_=>_.members.length>0),b=this.createFlattenedItems({allItems:[],contactsWithoutGroup:p,groups:E,isExpandedGroups:!1,isCustomGroups:!0,showMentionGroupsOnly:i.featureState.showMentionGroupsOnly,showMentionGroupsFirst:i.featureState.showMentionGroupsFirst});t.update(_=>h(d({},_),{featureState:h(d({},_.featureState),{customGroupsEnabled:!0}),data:h(d({},_.data),{flattenedItems:b,contactsWithoutGroup:p,groups:E})}))}else{let p=m.map(E=>({type:"custom",custom:E})),u=this.createFlattenedItems({allItems:p,isExpandedGroups:!1,isCustomGroups:!1,showMentionGroupsOnly:i.featureState.showMentionGroupsOnly,showMentionGroupsFirst:i.featureState.showMentionGroupsFirst});t.update(E=>h(d({},E),{featureState:h(d({},E.featureState),{customGroupsEnabled:!1}),data:h(d({},E.data),{flattenedItems:u})}))}}catch(i){this.loggingService.catch("Error in AutocompleteActionService filterCustomOptions:",i)}}createFlattenedItems(t){try{let{allItems:e,contactsWithoutGroup:i,groups:a,newUserContact:c,isExpandedGroups:m=!1,isCustomGroups:s=!1,showMentionGroupsOnly:p=!1,showMentionGroupsFirst:u=!1}=t,E=[];if(m||s){if(!p&&!u&&i?.forEach((b,_)=>{let C=new mt;C.originalItem=b,C.disabled=!!b.disabled,C.id=s?`velt-option-custom-ungrouped-${_}`:`velt-option-user-${_}`,C.testId=s?`${this.componentId}-custom-ungrouped-${_}`:`${this.componentId}-user-${_}`,E.push(C)}),a?.forEach((b,_)=>{if(b?.members?.length){let C=new mt;C.originalItem={type:"group",group:b},C.isGroupHeader=!0,C.disabled=!0,C.group=b,C.id=s?`velt-option-custom-group-${_}`:`velt-option-group-${_}`,C.testId=s?`${this.componentId}-custom-group-${_}`:`${this.componentId}-group-${_}`,E.push(C),b.members.forEach((K,Z)=>{let lt=new mt;lt.originalItem=K,lt.isGroupMember=!0,lt.disabled=K.disabled||!1,lt.id=s?`velt-option-custom-group-${_}-member-${Z}`:`velt-option-group-${_}-member-${Z}`,lt.testId=s?`${this.componentId}-custom-group-${_}-member-${Z}`:`${this.componentId}-group-${_}-member-${Z}`,E.push(lt)})}}),!p&&u&&i?.length){let b=new mt;b.originalItem={type:"group"},b.isGroupHeader=!0,b.disabled=!0,b.groupName="Ungrouped",b.id="velt-option-ungrouped",b.testId=`${this.componentId}-ungrouped`,E.push(b),i.forEach((_,C)=>{let K=new mt;K.originalItem=_,K.isGroupMember=!0,K.disabled=_.disabled||!1,K.id=`velt-option-user-${C}`,K.testId=`${this.componentId}-user-${C}`,E.push(K)})}}else e.forEach((b,_)=>{let C=new mt;C.originalItem=b,C.disabled=b.disabled||!1,C.id=`velt-option-${_}`,C.testId=`${this.componentId}-${_}`,E.push(C)});if(c?.contact?.email){let b=new mt;b.originalItem=c,b.isNewContact=!0,b.id="velt-new-contact-option",b.testId=`${this.componentId}-new-contact`,E.push(b)}return E}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(d({},i),{data:h(d({},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)),m;return c>=0?m=[...a.slice(0,c),...a.slice(c+1)]:m=[...a,e],t.update(s=>h(d({},s),{data:h(d({},s.data),{multiSelectItems:m})})),m}catch(i){return this.loggingService.catch("Error in AutocompleteActionService toggleSelection:",i),[]}}confirmSelection(t){try{let i=t().data.multiSelectItems||[];return t.update(a=>h(d({},a),{data:h(d({},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 pt(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)(G(Wt),G(_t),G(L),G(Tt))},r.\u0275prov=et({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var Jt=(()=>{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)(G(L))},r.\u0275prov=et({token:r,factory:r.\u0275fac});let n=r;return n})();function Ae(n,r){try{let o=r?.trim();return o?(n||[]).find(t=>t?.userId===o):void 0}catch{return}}function Me(n,r,o){try{let t=o?.trim();return t?n||(r?.userId===t?r:void 0):void 0}catch{return}}var q=(()=>{let r=class r extends ke{set parentLocalUIState(t){t&&(this.localUIStateSignal=t,this.isLocalUIStateOwner=!1)}get elementRef(){return this.hostElementRef}constructor(){let t=Q(ot),e=Q(Ht),i=Q(ve),a=Q(Tt).get(ut),c=Q(x),m=Q(L);super(t,e,i,a??void 0,void 0,c,m),this.autocompleteId=Xt(),this.defaultCondition=Xt(!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.onContextPayload=s=>{try{this.isContextInitialized||(this.isContextInitialized=!0),this._autocompleteId=s.autocompleteId,this._contextData=s.contextData||{};let p=this.coreService.getContextConfig(s.autocompleteId);p&&(this.componentConfigSignal.update(u=>d({},u)),this.componentConfigSignal=p,this.cd.markForCheck())}catch(p){this.loggingService.catch("Error in AutocompletePrimitiveThemedComponent onContextPayload:",p)}},this.hostElementRef=t,this.themeService=e,this.dynamicDataService=c,this.loggingService=m,this.coreService=Q(Wt),this.actionService=Q(Ee),this.cd=i,this.commentService=a??void 0,this.registry=Q(Jt,{optional:!0})??void 0,this._userIdContactService=Q(_t),this._userIdAuthService=Q(Et),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=Ae(a,i);if(c){e(c),this.flushChangeDetection();return}this._userIdSub=Ut([this._userIdContactService.getUserByUserId$(i),this._userIdAuthService.getUser$()]).subscribe(([m,s])=>{try{let p=Me(m,s,i);e(p),this.flushChangeDetection()}catch(p){this.loggingService.catch("Error resolving userId user:",p)}})}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(Te,{optional:!0,skipSelf:!0});t?(this.localUIStateSignal=t,this.isLocalUIStateOwner=!1):(this.localUIStateSignal=A(qt()),this.isLocalUIStateOwner=!0)}catch{this.localUIStateSignal=A(qt()),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();return}if(t){this._autocompleteId=t,this.initializeFromAutocompleteId(t),this.setupA11yAttributes(),this.setupDarkModeSync();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();return}if(this.registry){this.registry.register(this.onContextPayload);let i=this.registry.getLastPayload?.();i&&this.onContextPayload(i),this.setupA11yAttributes(),this.setupDarkModeSync();return}this.tryRegisterWithContext(),this.setupA11yAttributes(),this.setupDarkModeSync()}catch(t){this.loggingService.catch("Error in AutocompletePrimitiveThemedComponent ngOnInit:",t)}}ngOnDestroy(){try{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(d({},i),{appState:h(d({},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 Jt)return i.contextData&&(this._contextData=i.contextData),i.registry;let a=window.ng;if(a?.getComponent){let m=a.getComponent(e);if(m?.registry)return m.registry}let c=e.__ngContext__;if(c&&Array.isArray(c))for(let m=0;m<c.length;m++){let s=c[m];if(s&&typeof s=="object"&&s.registry instanceof Jt)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=>d({},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=>d({},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}}};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:[U],decls:0,vars:0,template:function(e,i){},encapsulation:2});let n=r;return n})();var pn=(n,r)=>({componentConfigSignal:n,parentLocalUIState:r}),gn=(n,r)=>({condition:n,data:r}),un=n=>({componentConfigSignal:n}),hn=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-chip-tooltip-description-wireframe",variant:o,setIfCondition:t,componentElementRef:e}),fn=()=>({});function Cn(n,r){n&1&&$(0)}function _n(n,r){if(n&1&&g(0,Cn,1,0,"ng-container",5),n&2){l(2);let o=H(3);v("ngTemplateOutlet",o)}}function bn(n,r){n&1&&$(0)}function xn(n,r){if(n&1&&g(0,bn,1,0,"ng-container",5),n&2){l(2);let o=H(5);v("ngTemplateOutlet",o)}}function Sn(n,r){n&1&&$(0)}function yn(n,r){if(n&1&&g(0,Sn,1,0,"ng-container",5),n&2){l(2);let o=H(7);v("ngTemplateOutlet",o)}}function kn(n,r){if(n&1&&(y(0),w(1,_n,1,1,"ng-container")(2,xn,1,1,"ng-container")(3,yn,1,1,"ng-container"),k()),n&2){let o=l(2);f(),T((o==null?null:o.type)==="contact"?1:(o==null?null:o.type)==="custom"?2:(o==null?null:o.type)==="group"?3:-1)}}function In(n,r){if(n&1&&(B(0),N(1,"translate")),n&2){let o=l(2);X(" ",j(1,1,(o==null||o.contact==null?null:o.contact.email)||(o==null?null:o.email))," ")}}function On(n,r){if(n&1&&(B(0),N(1,"translate")),n&2){let o=l(2);X(" ",j(1,1,o==null||o.custom==null||o.custom.custom==null?null:o.custom.custom.description)," ")}}function Dn(n,r){if(n&1&&(B(0),N(1,"translate")),n&2){let o,t=l(3),e=l();Gt(" ",(o=e.objectKeys((t==null||t.group==null||t.group.group==null?null:t.group.group.users)||Ft(4,fn)))==null?null:o.length," ",j(1,2,"members")," ")}}function wn(n,r){if(n&1&&w(0,Dn,2,5),n&2){let o=l(2);T(!(o==null||o.group==null)&&o.group.group?0:-1)}}function Tn(n,r){if(n&1&&(y(0),g(1,kn,4,1,"ng-container",4)(2,In,2,3,"ng-template",null,0,W)(4,On,2,3,"ng-template",null,1,W)(6,wn,1,1,"ng-template",null,2,W),k()),n&2){let o=l(),t=l();f(),v("veltDynamicTemplate",z(3,hn,t.template,R(1,un,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function En(n,r){if(n&1&&g(0,Tn,8,9,"ng-container",3),n&2){let o=l();v("veltIf",O(4,gn,o.conditionSignal(),O(1,pn,o.componentConfigSignal,o.localUIStateSignal)))}}var Pe=(()=>{let r=class r extends q{set userObject(t){this.resolveUserObjectToContact(t,e=>{this.componentConfigSignal.update(i=>h(d({},i),{type:"contact",contact:e}))})}set userId(t){this.resolveUserIdToContact(t,e=>{this.componentConfigSignal.update(i=>h(d({},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:[F([x]),U],decls:1,vars:1,consts:[["contacEmailRef",""],["customDescriptionRef",""],["groupDescriptionRef",""],[4,"veltIf"],[4,"veltDynamicTemplate"],[4,"ngTemplateOutlet"]],template:function(e,i){if(e&1&&w(0,En,1,7,"ng-container"),e&2){let a;T((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 An=(n,r)=>({componentConfigSignal:n,parentLocalUIState:r}),Mn=(n,r)=>({condition:n,data:r}),Pn=n=>({componentConfigSignal:n}),Fn=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-chip-tooltip-icon-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function Rn(n,r){n&1&&$(0)}function Nn(n,r){if(n&1&&g(0,Rn,1,0,"ng-container",5),n&2){l(2);let o=H(3);v("ngTemplateOutlet",o)}}function jn(n,r){n&1&&$(0)}function Un(n,r){if(n&1&&g(0,jn,1,0,"ng-container",5),n&2){l(2);let o=H(5);v("ngTemplateOutlet",o)}}function Bn(n,r){n&1&&$(0)}function Ln(n,r){if(n&1&&g(0,Bn,1,0,"ng-container",5),n&2){l(2);let o=H(7);v("ngTemplateOutlet",o)}}function $n(n,r){if(n&1&&(y(0),w(1,Nn,1,1,"ng-container")(2,Un,1,1,"ng-container")(3,Ln,1,1,"ng-container"),k()),n&2){let o=l(2);f(),T((o==null?null:o.type)==="contact"?1:(o==null?null:o.type)==="custom"?2:(o==null?null:o.type)==="group"?3:-1)}}function zn(n,r){if(n&1&&Y(0,"snippyly-user-avatar",6),n&2){let o=l(2);v("size",32)("user",o==null?null:o.contact)}}function Vn(n,r){if(n&1&&(Y(0,"div",7),N(1,"safeSvg")),n&2){let o=l(3);v("innerHtml",j(1,1,o==null||o.custom==null||o.custom.custom==null||o.custom.custom.icon==null?null:o.custom.custom.icon.svg),Bt)}}function Gn(n,r){if(n&1&&(S(0,"div",8),Y(1,"img",9),I()),n&2){let o=l(3);f(),v("src",o==null||o.custom==null||o.custom.custom==null||o.custom.custom.icon==null?null:o.custom.custom.icon.url,Lt)}}function Hn(n,r){if(n&1&&(w(0,Vn,2,3,"div",7),w(1,Gn,2,1,"div",8)),n&2){let o=l(2);T(!(o==null||o.custom==null||o.custom.custom==null||o.custom.custom.icon==null)&&o.custom.custom.icon.svg?0:-1),f(),T(!(o==null||o.custom==null||o.custom.custom==null||o.custom.custom.icon==null)&&o.custom.custom.icon.url?1:-1)}}function Wn(n,r){n&1&&(S(0,"div",10),ct(),S(1,"svg",11),Y(2,"path",12),I()())}function Jn(n,r){if(n&1&&(y(0),g(1,$n,4,1,"ng-container",4)(2,zn,1,2,"ng-template",null,0,W)(4,Hn,2,2,"ng-template",null,1,W)(6,Wn,3,0,"ng-template",null,2,W),k()),n&2){let o=l(),t=l();f(),v("veltDynamicTemplate",z(3,Fn,t.template,R(1,Pn,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function Kn(n,r){if(n&1&&g(0,Jn,8,9,"ng-container",3),n&2){let o=l();v("veltIf",O(4,Mn,o.conditionSignal(),O(1,An,o.componentConfigSignal,o.localUIStateSignal)))}}var Re=(()=>{let r=class r extends q{set userObject(t){this.resolveUserObjectToContact(t,e=>{this.componentConfigSignal.update(i=>h(d({},i),{type:"contact",contact:e}))})}set userId(t){this.resolveUserIdToContact(t,e=>{this.componentConfigSignal.update(i=>h(d({},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:[F([x]),U],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,Kn,1,7,"ng-container"),e&2){let a;T((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 Yn=(n,r)=>({componentConfigSignal:n,parentLocalUIState:r}),Xn=(n,r)=>({condition:n,data:r}),Zn=n=>({componentConfigSignal:n}),qn=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-chip-tooltip-name-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function Qn(n,r){n&1&&$(0)}function to(n,r){if(n&1&&g(0,Qn,1,0,"ng-container",5),n&2){l(2);let o=H(3);v("ngTemplateOutlet",o)}}function eo(n,r){n&1&&$(0)}function no(n,r){if(n&1&&g(0,eo,1,0,"ng-container",5),n&2){l(2);let o=H(5);v("ngTemplateOutlet",o)}}function oo(n,r){n&1&&$(0)}function ro(n,r){if(n&1&&g(0,oo,1,0,"ng-container",5),n&2){l(2);let o=H(7);v("ngTemplateOutlet",o)}}function io(n,r){if(n&1&&(y(0),w(1,to,1,1,"ng-container")(2,no,1,1,"ng-container")(3,ro,1,1,"ng-container"),k()),n&2){let o=l(2);f(),T((o==null?null:o.type)==="contact"?1:(o==null?null:o.type)==="custom"?2:(o==null?null:o.type)==="group"?3:-1)}}function ao(n,r){if(n&1&&(B(0),N(1,"translate")),n&2){let o=l(2);X(" ",j(1,1,o==null||o.contact==null?null:o.contact.name)," ")}}function lo(n,r){if(n&1&&(B(0),N(1,"translate")),n&2){let o=l(2);X(" ",j(1,1,o==null||o.custom==null||o.custom.custom==null?null:o.custom.custom.name)," ")}}function co(n,r){if(n&1&&(B(0),N(1,"translate")),n&2){let o=l(2);X(" ",j(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 so(n,r){if(n&1&&(y(0),g(1,io,4,1,"ng-container",4)(2,ao,2,3,"ng-template",null,0,W)(4,lo,2,3,"ng-template",null,1,W)(6,co,2,3,"ng-template",null,2,W),k()),n&2){let o=l(),t=l();f(),v("veltDynamicTemplate",z(3,qn,t.template,R(1,Zn,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function mo(n,r){if(n&1&&g(0,so,8,9,"ng-container",3),n&2){let o=l();v("veltIf",O(4,Xn,o.conditionSignal(),O(1,Yn,o.componentConfigSignal,o.localUIStateSignal)))}}var Ne=(()=>{let r=class r extends q{set userObject(t){this.resolveUserObjectToContact(t,e=>{this.componentConfigSignal.update(i=>h(d({},i),{type:"contact",contact:e}))})}set userId(t){this.resolveUserIdToContact(t,e=>{this.componentConfigSignal.update(i=>h(d({},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:[F([x]),U],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;T((a=i.componentConfigSignal())?0:-1,a)}},styles:["[_nghost-%COMP%]:empty{display:none}"],changeDetection:0});let n=r;return n})();var vo=(n,r)=>({componentConfigSignal:n,parentLocalUIState:r}),po=(n,r)=>({condition:n,data:r}),go=n=>({componentConfigSignal:n}),uo=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-chip-tooltip-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function ho(n,r){n&1&&$(0)}function fo(n,r){if(n&1&&(S(0,"velt-shadow-dom-internal"),g(1,ho,1,0,"ng-container",2),I()),n&2){l();let o=H(4);f(),v("ngTemplateOutlet",o)}}function Co(n,r){n&1&&$(0)}function _o(n,r){if(n&1&&g(0,Co,1,0,"ng-container",2),n&2){l();let o=H(4);v("ngTemplateOutlet",o)}}function bo(n,r){if(n&1&&(S(0,"div",4)(1,"div",5),Y(2,"velt-autocomplete-chip-tooltip-icon-internal",6),I(),S(3,"div",7)(4,"div",8),Y(5,"velt-autocomplete-chip-tooltip-name-internal",6),I(),S(6,"div",9),Y(7,"velt-autocomplete-chip-tooltip-description-internal",6),I()()()),n&2){let o=l(4);f(2),v("componentConfigSignal",o.componentConfigSignal),f(3),v("componentConfigSignal",o.componentConfigSignal),f(2),v("componentConfigSignal",o.componentConfigSignal)}}function xo(n,r){if(n&1&&g(0,bo,8,3,"div",3),n&2){let o=l(2),t=l();v("veltDynamicTemplate",z(3,uo,t.template,R(1,go,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function So(n,r){if(n&1&&(y(0),w(1,fo,2,1,"velt-shadow-dom-internal")(2,_o,1,1,"ng-container"),g(3,xo,1,9,"ng-template",null,0,W),k()),n&2){let o=l(2);f(),T(o.shadowDom&&!o.template||o.template&&o.isExplicitShadowDom?1:2)}}function yo(n,r){if(n&1&&g(0,So,5,1,"ng-container",1),n&2){let o=l();v("veltIf",O(4,po,o.conditionSignal(),O(1,vo,o.componentConfigSignal,o.localUIStateSignal)))}}var je=(()=>{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(d({},i),{type:"contact",contact:e}))})}set userId(t){this.resolveUserIdToContact(t,e=>{this.componentConfigSignal.update(i=>h(d({},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(At)}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:[F([x]),U],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,yo,1,7,"ng-container"),e&2){let a;T((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 Io=(n,r,o)=>({componentConfigSignal:n,parentLocalUIState:r,selectorItem:o}),Oo=(n,r)=>({condition:n,data:r}),Qt=n=>({$implicit:n}),Do=(n,r)=>({componentConfigSignal:n,userContact:r}),te=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-option-description-wireframe",variant:o,setIfCondition:t,componentElementRef:e}),wo=(n,r)=>({componentConfigSignal:n,custom:r}),To=(n,r)=>({componentConfigSignal:n,group:r}),Ue=()=>({});function Eo(n,r){n&1&&$(0)}function Ao(n,r){if(n&1&&g(0,Eo,1,0,"ng-container",4),n&2){l();let o=H(5),t=l(2);v("ngTemplateOutlet",o)("ngTemplateOutletContext",R(2,Qt,t.selectorItem==null?null:t.selectorItem.contact))}}function Mo(n,r){n&1&&$(0)}function Po(n,r){if(n&1&&g(0,Mo,1,0,"ng-container",4),n&2){l();let o=H(7),t=l(2);v("ngTemplateOutlet",o)("ngTemplateOutletContext",R(2,Qt,t.selectorItem==null?null:t.selectorItem.custom))}}function Fo(n,r){n&1&&$(0)}function Ro(n,r){if(n&1&&g(0,Fo,1,0,"ng-container",4),n&2){l();let o=H(9),t=l(2);v("ngTemplateOutlet",o)("ngTemplateOutletContext",R(2,Qt,t.selectorItem==null?null:t.selectorItem.group))}}function No(n,r){if(n&1&&(S(0,"p",7),B(1),N(2,"translate"),I()),n&2){let o=l(2).$implicit,t=l(3);Dt("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]:j(2,4,o.email)," ")}}function jo(n,r){if(n&1&&g(0,No,3,6,"p",6),n&2){let o=l().$implicit,t=l(2),e=l();v("veltDynamicTemplate",z(4,te,e.template,O(1,Do,e.componentConfigSignal,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function Uo(n,r){if(n&1&&w(0,jo,1,10,"p",5),n&2){let o=r.$implicit,t=l(3);T((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 Bo(n,r){if(n&1&&(S(0,"p",7),B(1),N(2,"translate"),I()),n&2){let o=l(2).$implicit;M("aria-label",o.description),f(),X(" ",j(2,2,o.description)," ")}}function Lo(n,r){if(n&1&&g(0,Bo,3,4,"p",8),n&2){let o=l().$implicit,t=l(2),e=l();v("veltDynamicTemplate",z(4,te,e.template,O(1,wo,e.componentConfigSignal,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function $o(n,r){if(n&1&&w(0,Lo,1,10,"p",7),n&2){let o=r.$implicit;T((o.description==null?null:o.description.length)>0?0:-1)}}function zo(n,r){if(n&1&&(S(0,"p",7),B(1),N(2,"translate"),I()),n&2){let o,t,e=l().$implicit,i=l(3);M("aria-label",((o=i.objectKeys((e==null?null:e.users)||Ft(5,Ue)))==null?null:o.length)+" members"),f(),Gt(" ",(t=i.objectKeys((e==null?null:e.users)||Ft(6,Ue)))==null?null:t.length," ",j(2,3,"members")," ")}}function Vo(n,r){if(n&1&&g(0,zo,3,7,"p",8),n&2){let o=r.$implicit,t=l(2),e=l();v("veltDynamicTemplate",z(4,te,e.template,O(1,To,e.componentConfigSignal,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function Go(n,r){if(n&1&&(y(0),w(1,Ao,1,4,"ng-container")(2,Po,1,4,"ng-container")(3,Ro,1,4,"ng-container"),g(4,Uo,1,1,"ng-template",null,0,W)(6,$o,1,1,"ng-template",null,1,W)(8,Vo,1,10,"ng-template",null,2,W),k()),n&2){let o=l(2);f(),T((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 Ho(n,r){if(n&1&&g(0,Go,10,1,"ng-container",3),n&2){let o=l();v("veltIf",O(5,Oo,o.conditionSignal(),rt(1,Io,o.componentConfigSignal,o.localUIStateSignal,o.selectorItem)))}}var Be=(()=>{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:[F([x]),U],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,Ho,1,8,"ng-container"),e&2){let a;T((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 Wo=(n,r,o)=>({componentConfigSignal:n,parentLocalUIState:r,selectorItem:o}),Jo=(n,r)=>({condition:n,data:r}),Ko=n=>({componentConfigSignal:n}),Le=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-option-error-icon-wireframe",variant:o,setIfCondition:t,componentElementRef:e}),Yo=n=>({$implicit:n}),Xo=(n,r,o)=>({componentConfigSignal:n,isNewContact:r,userContact:o});function Zo(n,r){if(n&1&&(S(0,"div",4)(1,"div",5),ct(),S(2,"svg",6),Y(3,"path",7)(4,"path",8),I()()()),n&2){let o=l(4);f(),M("data-testid",o.componentId+"-icon"),f(),M("data-testid",o.componentId+"-svg")}}function qo(n,r){if(n&1&&(S(0,"div",2),N(1,"translate"),g(2,Zo,5,2,"div",3),I()),n&2){let o=l(2),t=l();M("aria-label",j(1,3,"Invalid contact"))("data-testid",t.componentId),f(2),v("veltDynamicTemplate",z(7,Le,t.template,R(5,Ko,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function Qo(n,r){n&1&&$(0)}function tr(n,r){if(n&1&&g(0,Qo,1,0,"ng-container",9),n&2){l();let o=H(4),t=l(2);v("ngTemplateOutlet",o)("ngTemplateOutletContext",R(2,Yo,t.selectorItem==null?null:t.selectorItem.contact))}}function er(n,r){if(n&1&&(S(0,"div",4)(1,"div",10),ct(),S(2,"svg",6),Y(3,"path",7)(4,"path",8),I()()()),n&2){let o=l(4),t=l();f(),v("title",o.newUserContactError),M("title",o.newUserContactError)("data-testid",t.componentId+"-icon"),f(),M("data-testid",t.componentId+"-svg")}}function nr(n,r){if(n&1&&(S(0,"div",2),N(1,"translate"),g(2,er,5,4,"div",3),I()),n&2){let o=l().$implicit,t=l(2),e=l();M("aria-label",j(1,3,(t==null?null:t.newUserContactError)||"Invalid contact"))("data-testid",e.componentId),f(2),v("veltDynamicTemplate",z(9,Le,e.template,rt(5,Xo,e.componentConfigSignal,e.isNewContact,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function or(n,r){if(n&1&&w(0,nr,3,15,"div",2),n&2){let o=l(2),t=l();T(t.isNewContact&&o.newUserContactError?0:-1)}}function rr(n,r){if(n&1&&(y(0),w(1,qo,3,13,"div",2)(2,tr,1,4,"ng-container"),g(3,or,1,1,"ng-template",null,0,W),k()),n&2){let o=l(2);f(),T(o.defaultCondition()?(o.selectorItem==null?null:o.selectorItem.type)==="contact"?2:-1:1)}}function ir(n,r){if(n&1&&g(0,rr,5,1,"ng-container",1),n&2){let o=l();v("veltIf",O(5,Jo,o.conditionSignal(),rt(1,Wo,o.componentConfigSignal,o.localUIStateSignal,o.selectorItem)))}}var $e=(()=>{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:[F([x]),U],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,ir,1,8,"ng-container"),e&2){let a;T((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 ar=(n,r,o)=>({componentConfigSignal:n,parentLocalUIState:r,selectorItem:o}),lr=(n,r)=>({condition:n,data:r}),cr=(n,r)=>({componentConfigSignal:n,selectorItem:r}),sr=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-option-icon-wireframe",variant:o,setIfCondition:t,componentElementRef:e}),ee=n=>({$implicit:n});function dr(n,r){n&1&&$(0)}function mr(n,r){if(n&1&&g(0,dr,1,0,"ng-container",6),n&2){l(2);let o=H(3),t=l(2);v("ngTemplateOutlet",o)("ngTemplateOutletContext",R(2,ee,t.selectorItem==null?null:t.selectorItem.contact))}}function vr(n,r){n&1&&$(0)}function pr(n,r){if(n&1&&g(0,vr,1,0,"ng-container",6),n&2){l(2);let o=H(5),t=l(2);v("ngTemplateOutlet",o)("ngTemplateOutletContext",R(2,ee,t.selectorItem==null?null:t.selectorItem.custom))}}function gr(n,r){n&1&&$(0)}function ur(n,r){if(n&1&&g(0,gr,1,0,"ng-container",6),n&2){l(2);let o=H(7),t=l(2);v("ngTemplateOutlet",o)("ngTemplateOutletContext",R(2,ee,t.selectorItem==null?null:t.selectorItem.group))}}function hr(n,r){if(n&1&&(S(0,"div",5),w(1,mr,1,4,"ng-container")(2,pr,1,4,"ng-container")(3,ur,1,4,"ng-container"),I()),n&2){let o=l(3);M("data-testid",o.componentId)("aria-label","Option icon"),f(),T((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 fr(n,r){if(n&1&&(ct(),S(0,"svg",7),Y(1,"path",9),I()),n&2){let o=l(4);M("data-testid",o.componentId+"-contact-at")}}function Cr(n,r){if(n&1&&Y(0,"snippyly-user-avatar",8),n&2){let o=l().$implicit,t=l(3);v("size",32)("user",o),M("data-testid",t.componentId+"-contact-avatar")}}function _r(n,r){if(n&1&&w(0,fr,2,1,":svg:svg",7)(1,Cr,1,3,"snippyly-user-avatar",8),n&2){let o=r.$implicit;T((o==null?null:o.visibility)==="here"?0:1)}}function br(n,r){if(n&1&&(Y(0,"div",10),N(1,"safeSvg")),n&2){let o=l().$implicit,t=l(3);v("innerHTML",j(1,2,o.icon.svg),Bt),M("data-testid",t.componentId+"-custom-svg")}}function xr(n,r){if(n&1&&Y(0,"img",11),n&2){let o=l().$implicit,t=l(3);v("src",o.icon.url,Lt),M("alt",(o==null?null:o.description)||"Custom icon")("data-testid",t.componentId+"-custom-img")}}function Sr(n,r){if(n&1&&(w(0,br,2,4,"div",10),w(1,xr,1,3,"img",11)),n&2){let o=r.$implicit;T(!(o==null||o.icon==null)&&o.icon.svg?0:-1),f(),T(!(o==null||o.icon==null)&&o.icon.url?1:-1)}}function yr(n,r){if(n&1&&(ct(),S(0,"svg",12),Y(1,"path",13),I()),n&2){let o=l(3);M("data-testid",o.componentId+"-group-icon")}}function kr(n,r){if(n&1&&(y(0),g(1,hr,4,3,"div",4)(2,_r,2,1,"ng-template",null,0,W)(4,Sr,2,2,"ng-template",null,1,W)(6,yr,2,1,"ng-template",null,2,W),k()),n&2){let o=l(),t=l();f(),v("veltDynamicTemplate",z(4,sr,t.template,O(1,cr,t.componentConfigSignal,t.selectorItem),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function Ir(n,r){if(n&1&&g(0,kr,8,10,"ng-container",3),n&2){let o=l();v("veltIf",O(5,lr,o.conditionSignal(),rt(1,ar,o.componentConfigSignal,o.localUIStateSignal,o.selectorItem)))}}var ze=(()=>{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:[F([x]),U],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,Ir,1,8,"ng-container"),e&2){let a;T((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 Or=(n,r,o)=>({componentConfigSignal:n,parentLocalUIState:r,selectorItem:o}),Dr=(n,r)=>({condition:n,data:r}),ne=n=>({$implicit:n}),wr=(n,r)=>({componentConfigSignal:n,userContact:r}),oe=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-option-name-wireframe",variant:o,setIfCondition:t,componentElementRef:e}),Tr=(n,r)=>({componentConfigSignal:n,custom:r}),Er=(n,r)=>({componentConfigSignal:n,group:r});function Ar(n,r){n&1&&$(0)}function Mr(n,r){if(n&1&&g(0,Ar,1,0,"ng-container",4),n&2){l();let o=H(5),t=l(2);v("ngTemplateOutlet",o)("ngTemplateOutletContext",R(2,ne,t.selectorItem==null?null:t.selectorItem.contact))}}function Pr(n,r){n&1&&$(0)}function Fr(n,r){if(n&1&&g(0,Pr,1,0,"ng-container",4),n&2){l();let o=H(7),t=l(2);v("ngTemplateOutlet",o)("ngTemplateOutletContext",R(2,ne,t.selectorItem==null?null:t.selectorItem.custom))}}function Rr(n,r){n&1&&$(0)}function Nr(n,r){if(n&1&&g(0,Rr,1,0,"ng-container",4),n&2){l();let o=H(9),t=l(2);v("ngTemplateOutlet",o)("ngTemplateOutletContext",R(2,ne,t.selectorItem==null?null:t.selectorItem.group))}}function jr(n,r){if(n&1&&(S(0,"p",5),B(1),N(2,"translate"),I()),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(" ",j(2,3,o.name||o.email)," ")}}function Ur(n,r){if(n&1&&g(0,jr,3,5,"p",7),n&2){let o=l().$implicit,t=l(2),e=l();v("veltDynamicTemplate",z(4,oe,e.template,O(1,wr,e.componentConfigSignal,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function Br(n,r){n&1&&Y(0,"velt-skeleton-loader-internal",6)}function Lr(n,r){if(n&1&&w(0,Ur,1,10,"p",5)(1,Br,1,0,"velt-skeleton-loader-internal",6),n&2){let o=r.$implicit;T((o.name==null?null:o.name.length)>0||(o==null||o.email==null?null:o.email.length)>0?0:1)}}function $r(n,r){if(n&1&&(S(0,"p",5),B(1),N(2,"translate"),I()),n&2){let o=l(2).$implicit,t=l(3);M("data-testid",t.componentId+"-custom-text")("aria-label",o.name),f(),X(" ",j(2,3,o.name)," ")}}function zr(n,r){if(n&1&&g(0,$r,3,5,"p",7),n&2){let o=l().$implicit,t=l(2),e=l();v("veltDynamicTemplate",z(4,oe,e.template,O(1,Tr,e.componentConfigSignal,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function Vr(n,r){if(n&1&&w(0,zr,1,10,"p",5),n&2){let o=r.$implicit;T((o.name==null?null:o.name.length)>0?0:-1)}}function Gr(n,r){if(n&1&&(S(0,"p",5),B(1),N(2,"translate"),I()),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(" ",j(2,3,o==null||o.metadata==null?null:o.metadata.groupName)," ")}}function Hr(n,r){if(n&1&&g(0,Gr,3,5,"p",7),n&2){let o=l().$implicit,t=l(2),e=l();v("veltDynamicTemplate",z(4,oe,e.template,O(1,Er,e.componentConfigSignal,o),t==null?null:t.variant,e.setIfCondition.bind(e),e.elementRef))}}function Wr(n,r){if(n&1&&w(0,Hr,1,10,"p",5),n&2){let o=r.$implicit;T((o==null||o.metadata==null||o.metadata.groupName==null?null:o.metadata.groupName.length)>0?0:-1)}}function Jr(n,r){if(n&1&&(y(0),w(1,Mr,1,4,"ng-container")(2,Fr,1,4,"ng-container")(3,Nr,1,4,"ng-container"),g(4,Lr,2,1,"ng-template",null,0,W)(6,Vr,1,1,"ng-template",null,1,W)(8,Wr,1,1,"ng-template",null,2,W),k()),n&2){let o=l(2);f(),T((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 Kr(n,r){if(n&1&&g(0,Jr,10,1,"ng-container",3),n&2){let o=l();v("veltIf",O(5,Dr,o.conditionSignal(),rt(1,Or,o.componentConfigSignal,o.localUIStateSignal,o.selectorItem)))}}var Ve=(()=>{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:[F([x]),U],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,Kr,1,8,"ng-container"),e&2){let a;T((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 Yr=(n,r,o,t,e,i,a)=>({componentConfigSignal:n,parentLocalUIState:r,selectorItem:o,isNewContact:t,multiSelect:e,isSelected:i,readOnly:a}),Xr=(n,r)=>({condition:n,data:r}),Zr=(n,r,o,t,e,i)=>({componentConfigSignal:n,isNewContact:r,selectorItem:o,multiSelect:t,isSelected:e,readOnly:i}),qr=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-option-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function Qr(n,r){if(n&1&&(S(0,"div",3),Y(1,"velt-autocomplete-option-icon-internal",4),S(2,"div",5),Y(3,"velt-autocomplete-option-name-internal",4)(4,"velt-autocomplete-option-description-internal",4),I(),Y(5,"velt-autocomplete-option-error-icon-internal",6),I()),n&2){let o=l(2),t=l();Dt("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(),v("selectorItem",t.selectorItem)("componentConfigSignal",t.componentConfigSignal),f(),M("data-testid",t.componentId+"-details"),f(),v("selectorItem",t.selectorItem)("componentConfigSignal",t.componentConfigSignal),f(),v("selectorItem",t.selectorItem)("componentConfigSignal",t.componentConfigSignal),f(),v("selectorItem",t.selectorItem)("isNewContact",t.isNewContact)("componentConfigSignal",t.componentConfigSignal)}}function ti(n,r){n&1&&(S(0,"div",2),ct(),S(1,"svg",7),Y(2,"path",8),I()())}function ei(n,r){if(n&1&&(y(0),g(1,Qr,6,17,"div",1),w(2,ti,3,0,"div",2),k()),n&2){let o=l(),t=l();f(),v("veltDynamicTemplate",z(9,qr,t.template,de(2,Zr,t.componentConfigSignal,t.isNewContact,t.selectorItem,t.multiSelect,t.isSelected,t.readOnly),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef)),f(),T(t.multiSelect&&!t.readOnly&&t.isSelected?2:-1)}}function ni(n,r){if(n&1&&g(0,ei,3,15,"ng-container",0),n&2){let o=l();v("veltIf",O(9,Xr,o.conditionSignal(),me(1,Yr,o.componentConfigSignal,o.localUIStateSignal,o.selectorItem,o.isNewContact,o.multiSelect,o.isSelected,o.readOnly)))}}var Ge=(()=>{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(At),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)}}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:[F([x]),U],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,ni,1,12,"ng-container"),e&2){let a;T((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 He=(()=>{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=d(d({},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(d({},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,m){try{Object.keys(i).forEach(s=>{let p;if(nt(t)?p=it(()=>at(t(),i[s].path)):p=it(()=>at(t,i[s].path)),nt(p()))Ct(()=>{try{let u=p()();i[s].value=u,this.extractedProps=i,this.evaluateCondition()}catch{}},{injector:this.injector});else{let u=p();i[s].value=u,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(x),D(st))},r.\u0275cmp=P({type:r,selectors:[["app-data"]],inputs:{path:"path",field:"field"},standalone:!1,features:[F([x])],decls:2,vars:3,template:function(e,i){e&1&&(B(0),N(1,"translate")),e&2&&wt(j(1,1,i.valueSignal()))},dependencies:[Ie],encapsulation:2,changeDetection:0});let n=r;return n})();var oi=(n,r)=>({template:n,context:r,cloneTemplate:!0});function ri(n,r){n&1&&$(0)}function ii(n,r){if(n&1&&(y(0),g(1,ri,1,0,"ng-container",1),k()),n&2){let o=l();f(),v("veltDynamicTemplate",O(1,oi,o.template,o.dataComponentConfigSignal()))}}var We=(()=>{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=d(d({},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(d({},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,(m,s)=>{let p=e[s];if(p&&p.value!==void 0){let u=p.value;return typeof u=="string"?`'${u}'`:typeof u=="boolean"||typeof u=="number"?String(u):u===null?"null":typeof u=="object"?u?"true":"false":String(u)}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,m){try{this.cleanupEffects.forEach(s=>s.destroy()),this.cleanupEffects.length=0,Object.keys(i).forEach(s=>{let p;if(nt(t)?p=it(()=>at(t(),i[s].path)):p=it(()=>at(t,i[s].path)),nt(p())){let u=Ct(()=>{try{let E=p()();i[s].value=E,this.extractedProps=i,this.evaluateCondition()}catch{i[s].value="",this.extractedProps=i,this.evaluateCondition()}},{injector:this.injector});this.cleanupEffects.push(u)}else{let u=p();i[s].value=u,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(x),D(st))},r.\u0275cmp=P({type:r,selectors:[["app-if"]],inputs:{template:"template",condition:"condition"},standalone:!1,features:[F([x])],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltDynamicTemplate"]],template:function(e,i){e&1&&g(0,ii,2,4,"ng-container",0),e&2&&v("ngIf",i.showContent())},styles:["[_nghost-%COMP%]{display:flex;align-items:center}"],changeDetection:0});let n=r;return n})();var Je=(()=>{let r=class r{constructor(t,e,i){this.coreActionsService=t,this.loggingService=e,this.metadataService=i,this.buttonClickSubject$=new kt,this.buttonToggleMap$=new jt({}),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(m){return pt(this,arguments,function*({id:t,type:e,groupId:i,contextData:a,data:c}){try{this.buttonToggle(t,void 0,e,i);let p=this.extractButtonData(a),u=this.createButtonContext(t,e,i),E=yield this.metadataService.getGlobalMetadata(),b={};if(c){let s=c,{componentConfigSignal:C}=s,K=re(s,["componentConfigSignal"]);if(b=d({},K),C&&typeof C=="function")try{let Z=C();Z&&typeof Z=="object"&&(b=d(d({},b),Z))}catch(Z){this.loggingService.catch("Error accessing componentConfigSignal: ",Z)}}let _=h(d({buttonContext:u},p),{metadata:E,data:b});this.buttonClickSubject$.next(_),this.coreActionsService.triggerAction(Zt.VELT_BUTTON_CLICK,_)}catch(p){this.loggingService.catch("Error in ButtonService buttonClick: ",p)}})}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,m=this.createNewToggleMap(c,t,e,i,a);this.buttonToggleMap$.next(m)}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(d({},a),{groupId:i}):a}catch(a){return this.loggingService.catch("Error in ButtonService createButtonMetadata: ",a),{}}}createNewToggleMap(t,e,i,a,c){try{let m=d({},t);return a==="button-toggle"?h(d({},m),{ungrouped:h(d({},m.ungrouped),{[e]:i??!m.ungrouped?.[e]})}):a==="single-select"&&c?h(d({},m),{[c]:{[e]:i??!0}}):a==="multi-select"&&c?h(d({},m),{[c]:h(d({},m[c]),{[e]:i??!m[c]?.[e]})}):m}catch(m){return this.loggingService.catch("Error in ButtonService createNewToggleMap: ",m),{}}}buttonClickSubject(){return this.buttonClickSubject$.asObservable()}buttonToggleMap(){return this.buttonToggleMap$.asObservable()}resetVeltButtonState(t){return pt(this,null,function*(){try{if(t){let{id:c,group:m}=t,s=JSON.parse(JSON.stringify(this.buttonToggleMap$.value||{}));m&&c?delete s?.[m]?.[c]:m?delete s?.[m]:c&&Object.keys(s).forEach(p=>{Object.keys(s[p]).forEach(u=>{u===c&&delete s?.[p]?.[u]})}),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(Zt.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)(G(xe),G(L),G(we))},r.\u0275prov=et({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var li=n=>({componentConfigSignal:n}),ci=(n,r)=>({condition:n,data:r}),si=(n,r)=>({componentConfigSignal:n,buttonComponentConfig:r}),di=(n,r,o,t)=>({template:n,context:r,cloneTemplate:!0,setIfCondition:o,componentElementRef:t});function mi(n,r){if(n&1&&(y(0),B(1),N(2,"translate"),k()),n&2){let o=l(5);f(),X(" ",j(2,1,o.id)," ")}}function vi(n,r){if(n&1){let o=It();S(0,"div",3),Ot("click",function(){St(o);let e=l(4);return yt(e.onClick())}),g(1,mi,3,3,"ng-container",4),I()}if(n&2){let o=l().ngIf,t=l(3);Dt("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(),v("veltDynamicTemplate",ft(11,di,t.template,O(8,si,t.dataComponentConfigSignal().componentConfigSignal,o),t.setIfCondition.bind(t),t.elementRef))}}function pi(n,r){if(n&1&&(y(0),g(1,vi,2,16,"div",2),k()),n&2){let o=l(3);f(),v("ngIf",o.id)}}function gi(n,r){if(n&1&&(y(0),g(1,pi,2,1,"ng-container",0),k()),n&2){let o=l(2);f(),v("ngIf",o.buttonComponentConfigSignal())}}function ui(n,r){if(n&1&&(y(0),g(1,gi,2,1,"ng-container",1),k()),n&2){let o=l();f(),v("veltIf",O(3,ci,o.conditionSignal(),R(1,li,o.dataComponentConfigSignal().componentConfigSignal)))}}var Ke=(()=>{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(d({},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(d({},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(m=>{this.dataComponentConfigSignal.update(s=>(s=d(d({},s),m),s)),this.extractedProps=this.dynamicDataService.getModifiedPathBasedOnCondition(this.dataComponentConfigSignal,this.extractedProps),this.getComputedValues(this.dataComponentConfigSignal,this.evaluateCondition,this.extractedProps)}))}catch(m){this.loggingService.catch("Error in ButtonComponent data functionality: ",m)}}ngOnInit(){try{super.ngOnInit(),this.subscription.push(this.buttonService.buttonToggleMap().subscribe(t=>{this.buttonComponentConfigSignal.update(e=>(e=h(d({},e),{buttonToggleMap:t}),e))})),this.buttonComponentConfigSignal.update(t=>(t=h(d({},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(d({},i),{[t]:e})),this.buttonComponentConfigSignal.update(i=>(i=d({},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,m){try{Object.keys(i).forEach(s=>{let p;nt(t)?p=it(()=>at(t(),i[s].path)):p=it(()=>at(t,i[s].path)),nt(p())?Ct(()=>{try{i[s].value=p()(),this.extractedProps=i,this.evaluateCondition()}catch{}},{injector:this.injector}):(i[s].value=p(),this.extractedProps=i,this.evaluateCondition())})}catch(s){this.loggingService.catch("Error in ButtonComponent getComputedValues: ",s)}}};r.\u0275fac=function(e){return new(e||r)(D(Je),D(L),D(x),D(ot),D(st))},r.\u0275cmp=P({type:r,selectors:[["app-button"]],inputs:{id:"id",type:"type",group:"group",disabled:"disabled",active:"active"},standalone:!1,features:[F([x]),U],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,ui,2,6,"ng-container",0),e&2&&v("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 hi=(n,r,o)=>({componentConfigSignal:n,parentLocalUIState:r,group:o}),fi=(n,r)=>({condition:n,data:r}),Ci=(n,r)=>({componentConfigSignal:n,group:r}),_i=(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&&(y(0),S(1,"div",2)(2,"span",3),B(3),I()(),k()),n&2){let o=l(3);f(3),wt((o.group==null?null:o.group.name)||o.groupName)}}function xi(n,r){if(n&1&&(y(0),g(1,bi,4,1,"ng-container",1),k()),n&2){let o=l(),t=l();f(),v("veltDynamicTemplate",z(4,_i,t.template,O(1,Ci,t.componentConfigSignal,t.group),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function Si(n,r){if(n&1&&g(0,xi,2,10,"ng-container",0),n&2){let o=l();v("veltIf",O(5,fi,o.conditionSignal(),rt(1,hi,o.componentConfigSignal,o.localUIStateSignal,o.group)))}}var Ye=(()=>{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=yi(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(_t),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:[F([x]),U],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,Si,1,8,"ng-container"),e&2){let a;T((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 yi(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 ki=(n,r,o,t)=>({componentConfigSignal:n,parentLocalUIState:r,newUserContact:o,newUserContactError:t}),Ii=(n,r)=>({condition:n,data:r}),Oi=(n,r,o)=>({componentConfigSignal:n,newUserContact:r,newUserContactError:o}),Di=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-autocomplete-empty-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function wi(n,r){if(n&1&&(S(0,"span",3),B(1),I()),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 Ti(n,r){if(n&1&&(S(0,"span",4),B(1),I()),n&2){let o=l(4);M("data-testid",o.componentId+"-error"),f(),X(" ",o.newUserContactError," ")}}function Ei(n,r){if(n&1&&(S(0,"span",5),B(1," No results found "),I()),n&2){let o=l(4);M("data-testid",o.componentId+"-no-results")}}function Ai(n,r){if(n&1&&(y(0),S(1,"div",2),w(2,wi,2,2,"span",3)(3,Ti,2,2,"span",4)(4,Ei,2,1,"span",5),I(),k()),n&2){let o=l(3);f(),M("data-testid",o.componentId),f(),T(!(o.newUserContact==null||o.newUserContact.contact==null)&&o.newUserContact.contact.email&&!o.newUserContactError?2:o.newUserContactError?3:4)}}function Mi(n,r){if(n&1&&(y(0),g(1,Ai,5,2,"ng-container",1),k()),n&2){let o=l(),t=l();f(),v("veltDynamicTemplate",z(5,Di,t.template,rt(1,Oi,t.componentConfigSignal,t.newUserContact,t.newUserContactError),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function Pi(n,r){if(n&1&&g(0,Mi,2,11,"ng-container",0),n&2){let o=l();v("veltIf",O(6,Ii,o.conditionSignal(),ft(1,ki,o.componentConfigSignal,o.localUIStateSignal,o.newUserContact,o.newUserContactError)))}}var Xe=(()=>{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:[F([x]),U],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,Pi,1,9,"ng-container"),e&2){let a;T((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 vt=class{constructor(){this.closeDialog=()=>{},this.darkMode=!1,this.variant="",this.type=""}};var Ze=n=>({componentConfigSignal:n}),Fi=(n,r)=>({condition:n,data:r}),Ri=(n,r,o,t)=>({template:n,context:r,componentName:"velt-confirm-dialog-reject-button-wireframe",setIfCondition:o,componentElementRef:t});function Ni(n,r){if(n&1&&(y(0),S(1,"button",4),B(2),N(3,"translate"),I(),k()),n&2){let o=l(2).ngIf;f(2),X(" ",j(3,1,(o==null?null:o.noButton)||"No")," ")}}function ji(n,r){if(n&1){let o=It();y(0),S(1,"div",2),Ot("pointerdown",function(e){return St(o),yt(e.stopPropagation())}),g(2,Ni,4,3,"ng-container",3),I(),k()}if(n&2){let o=l(2);f(),M("data-testid",o.componentId+"-button"),f(),v("veltDynamicTemplate",ft(4,Ri,o.template,R(2,Ze,o.componentConfigSignal),o.setIfCondition.bind(o),o.elementRef))}}function Ui(n,r){if(n&1&&(y(0),g(1,ji,3,9,"ng-container",1),k()),n&2){let o=l();f(),v("veltIf",O(3,Fi,o.conditionSignal(),R(1,Ze,o.componentConfigSignal)))}}var qe=(()=>{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 vt)}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(x),D(L))},r.\u0275cmp=P({type:r,selectors:[["app-confirm-dialog-reject"]],standalone:!1,features:[F([x]),U],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,Ui,2,6,"ng-container",0),e&2&&v("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 Qe=n=>({componentConfigSignal:n}),Bi=(n,r)=>({condition:n,data:r}),Li=(n,r,o,t)=>({template:n,context:r,componentName:"velt-confirm-dialog-approve-button-wireframe",setIfCondition:o,componentElementRef:t});function $i(n,r){if(n&1&&(y(0),S(1,"button",4),B(2),N(3,"translate"),I(),k()),n&2){let o=l(2).ngIf;f(2),X(" ",j(3,1,(o==null?null:o.yesButton)||"Yes")," ")}}function zi(n,r){if(n&1){let o=It();y(0),S(1,"div",2),Ot("pointerdown",function(e){return St(o),yt(e.stopPropagation())})("click",function(){St(o);let e=l().ngIf;return yt(e==null?null:e.closeDialog(!0))}),g(2,$i,4,3,"ng-container",3),I(),k()}if(n&2){let o=l(2);f(),M("data-testid",o.componentId+"-button"),f(),v("veltDynamicTemplate",ft(4,Li,o.template,R(2,Qe,o.componentConfigSignal),o.setIfCondition.bind(o),o.elementRef))}}function Vi(n,r){if(n&1&&(y(0),g(1,zi,3,9,"ng-container",1),k()),n&2){let o=l();f(),v("veltIf",O(3,Bi,o.conditionSignal(),R(1,Qe,o.componentConfigSignal)))}}var tn=(()=>{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 vt)}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(x),D(L))},r.\u0275cmp=P({type:r,selectors:[["app-confirm-dialog-approve"]],standalone:!1,features:[F([x]),U],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,Vi,2,6,"ng-container",0),e&2&&v("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 en=n=>({componentConfigSignal:n}),Gi=(n,r)=>({condition:n,data:r}),Hi=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-confirm-dialog-title-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function Wi(n,r){if(n&1&&(S(0,"h2",4),B(1),N(2,"translate"),I()),n&2){let o=l(3).ngIf,t=l();M("data-testid",t.componentId),f(),wt(j(2,2,o==null?null:o.title))}}function Ji(n,r){if(n&1&&(y(0),g(1,Wi,3,4,"h2",3),k()),n&2){let o=l(2).ngIf;f(),v("ngIf",o==null?null:o.title)}}function Ki(n,r){if(n&1&&(y(0),g(1,Ji,2,1,"ng-container",2),k()),n&2){let o=l().ngIf,t=l();f(),v("veltDynamicTemplate",z(3,Hi,t.template,R(1,en,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function Yi(n,r){if(n&1&&(y(0),g(1,Ki,2,9,"ng-container",1),k()),n&2){let o=l();f(),v("veltIf",O(3,Gi,o.conditionSignal(),R(1,en,o.componentConfigSignal)))}}var nn=(()=>{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 vt)}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(x),D(L))},r.\u0275cmp=P({type:r,selectors:[["app-confirm-dialog-title"]],standalone:!1,features:[F([x]),U],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,Yi,2,6,"ng-container",0),e&2&&v("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 on=n=>({componentConfigSignal:n}),Xi=(n,r)=>({condition:n,data:r}),Zi=(n,r,o,t,e)=>({template:n,context:r,componentName:"velt-confirm-dialog-message-wireframe",variant:o,setIfCondition:t,componentElementRef:e});function qi(n,r){if(n&1&&(S(0,"div"),B(1),N(2,"translate"),I()),n&2){let o=l(3).ngIf;f(),X(" ",j(2,1,o==null?null:o.message)," ")}}function Qi(n,r){if(n&1&&(y(0),g(1,qi,3,3,"div",0),k()),n&2){let o=l(2).ngIf;f(),v("ngIf",o==null?null:o.message)}}function ta(n,r){if(n&1&&(y(0),S(1,"div",2),g(2,Qi,2,1,"ng-container",3),I(),k()),n&2){let o=l().ngIf,t=l();f(),M("data-testid",t.componentId),f(),v("veltDynamicTemplate",z(4,Zi,t.template,R(2,on,t.componentConfigSignal),o==null?null:o.variant,t.setIfCondition.bind(t),t.elementRef))}}function ea(n,r){if(n&1&&(y(0),g(1,ta,3,10,"ng-container",1),k()),n&2){let o=l();f(),v("veltIf",O(3,Xi,o.conditionSignal(),R(1,on,o.componentConfigSignal)))}}var rn=(()=>{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 vt)}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(x),D(L))},r.\u0275cmp=P({type:r,selectors:[["app-confirm-dialog-message"]],standalone:!1,features:[F([x]),U],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,ea,2,6,"ng-container",0),e&2&&v("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 Kt={"velt-autocomplete-option-wireframe":Ge,"velt-autocomplete-group-option-wireframe":Ye,"velt-autocomplete-empty-wireframe":Xe,"velt-autocomplete-option-icon-wireframe":ze,"velt-autocomplete-option-name-wireframe":Ve,"velt-autocomplete-option-description-wireframe":Be,"velt-autocomplete-option-error-icon-wireframe":$e,"velt-autocomplete-chip-tooltip-wireframe":je,"velt-autocomplete-chip-tooltip-icon-wireframe":Re,"velt-autocomplete-chip-tooltip-name-wireframe":Ne,"velt-autocomplete-chip-tooltip-description-wireframe":Pe,"velt-data":He,"velt-if":We,"velt-button-wireframe":Ke,"velt-confirm-dialog-wireframe":Oe,"velt-confirm-dialog-reject-button-wireframe":qe,"velt-confirm-dialog-approve-button-wireframe":tn,"velt-confirm-dialog-title-wireframe":nn,"velt-confirm-dialog-message-wireframe":rn};var an=(()=>{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,m)=>m.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=pe(t,{environmentInjector:this.injector.get(ce)});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;"),!Kt[t])return null;let c=a?`${a}__${t}`:"",m=e?.getAttribute("velt-wireframe-id");m&&(c=`${a}__${m}__${t}`);let s=this.createComponentRef(Kt[t],c,!1);if(!s||!e)return null;let p=s.location.nativeElement;if((e?.children?.length>0||e?.innerHTML?.trim()?.length>0)&&(s.instance.template=e),e.attributes.length>0)for(let u=0;u<e.attributes.length;u++){let E=e.attributes[u],b=E.name,_=E.value;b==="class"?p.classList.add(_):b==="style"?p.setAttribute("style",_):b==="velt-if"?s.instance.veltIf=_:(p.setAttribute(b,_),this.setPropertyOnComponent(s,b,_))}return i&&typeof i=="object"&&Object.keys(i).forEach(u=>{this.veltFunctionComponents.includes(t)?s.instance.updateDataComponentConfigSignal(u,i[u]):this.setPropertyOnComponent(s,u,i[u])}),this.appRef.attachView(s.hostView),e.parentNode?e.parentNode.replaceChild(p,e):e.appendChild(p),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 m=[],s=t.tagName.toLowerCase();if(Kt[s]&&!a?.includes(s)){let u=this.injectComponentIntoAndMoveChildren(s,t,e,i);return u&&m.push(u),m}return Array.from(t.children).forEach(u=>{let E=this.processAndReplaceVeltComponents(u,e,i,a,c);m.push(...E)}),m}catch(m){return this.loggingService.catch("Error in DynamicComponentService processAndReplaceVeltComponents: ",m),[]}}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)(G(st),G(se),G(L))},r.\u0275prov=et({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var ed=(()=>{let r=class r{set veltDynamicTemplate({template:t,context:e,id:i,cloneTemplate:a,componentName:c,variant:m,suffix:s,setIfCondition:p,componentElementRef:u,replaceTemplate:E=!0}){try{if(s&&(c+=`--${s}`),m&&(c+=`---${m}`),c){let b=this.wireframeService.getConditionElement(c);if(!b&&t&&(b=t),b){let _=b?.getAttribute("velt-if");_&&p&&p(_),Array.from(b.attributes).forEach(C=>{u?.nativeElement.setAttribute(C.name,C.value)}),e?.componentConfigSignal?(this.dynamicDataService.applyConditionalClasses(u?.nativeElement,e),this.dynamicDataService.executeConditionalClasses()):this.dynamicDataService.applyConditionalClasses(u?.nativeElement)}}if(c&&!t){let b=this.wireframeService.getWireframe(c);if(b){let _=document.createElement(b.tagName);_.innerHTML=b.innerHTML,this.template=_}}else this.template=t;this.data=e,this.id=i,this.cloneTemplate=!!a,this.cloneTemplate&&t&&(this.template=this.domService.deepCloneElement(t)),this.checkToUpdateTemplate(E)}catch(b){this.loggingService.warn("Error in DynamicTemplateDirective veltDynamicTemplate: ",b)}}constructor(t,e,i,a,c,m,s,p){this.elementRef=t,this.templateRef=e,this.viewContainer=i,this.dynamicComponentService=a,this.loggingService=c,this.domService=m,this.wireframeService=s,this.dynamicDataService=p,this.directiveId=Math.random().toString(36).substring(7),this.isCustomTemplateMode=!1,this.isDefaultTemplateMode=!1,this.cloneTemplate=!1,this.injectedElements=[],this.componentRefs=[];try{this.loggingService.log("%c[WB] Creating CLASS: DynamicTemplateDirective","color: blue;")}catch(u){this.loggingService.catch("Error in DynamicTemplateDirective constructor: ",u)}}checkDataValue(t,e){let i=t.querySelectorAll("[data-velt]");function a(c,m){return m.split(".").reduce((s,p)=>s&&s[p],c)}i.forEach(c=>{let m=c.getAttribute("data-velt");if(m&&e){let s=a(e,m);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.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)}}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 m=i.children[c],s=this.dynamicComponentService.processAndReplaceVeltComponents(m,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.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($t),D(zt),D(an),D(L),D(Se),D(At),D(x))},r.\u0275dir=Vt({type:r,selectors:[["","veltDynamicTemplate",""]],inputs:{veltDynamicTemplate:"veltDynamicTemplate"}});let n=r;return n})();var sd=(()=>{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 kt,this.conditionRegex=/\{(.*?)\}/g,this.dataComponentConfig=A({}),this.extractedProps={},this.hasView=!1,this.cleanupEffects=[];try{this.dynamicDataService.getCommonData().pipe(ae(this.destroy$)).subscribe(m=>{this.processCondition(m)})}catch(m){this.loggingService.catch("Error in IfDirective constructor:",m)}}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=d(d({},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,m){try{this.cleanupEffects.forEach(s=>s.destroy()),this.cleanupEffects.length=0,Object.keys(i).forEach(s=>{let p;if(nt(t)?p=it(()=>at(t(),i[s].path)):p=it(()=>at(t,i[s].path)),nt(p())){let u=Ct(()=>{try{let E=p()();i[s].value=E,this.extractedProps=i,this.evaluateCondition()}catch{}},{injector:this.injector,allowSignalWrites:!0});this.cleanupEffects.push(u)}else{let u=p();i[s].value=u,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(d({},i),{[t]:e}))}catch(i){this.loggingService.catch("Error in IfDirective updateConfig:",i)}}};r.\u0275fac=function(e){return new(e||r)(D($t),D(zt),D(x),D(L),D(st))},r.\u0275dir=Vt({type:r,selectors:[["","veltIf",""]],inputs:{veltIf:"veltIf"},features:[F([x])]});let n=r;return n})();export{De as a,we as b,Wt as c,Jt as d,q as e,Pe as f,Re as g,Ne as h,je as i,Be as j,$e as k,ze as l,Ve as m,Ge as n,vt as o,qe as p,tn as q,nn as r,rn as s,We as t,Je as u,Ke as v,Ye as w,Xe as x,Kt as y,an as z,ed as A,sd as B};
|