1"use strict";(self.webpackChunkwebclient_webpack=self.webpackChunkwebclient_webpack||[]).push([[5527],{4801(F,w,s){s.d(w,{f:()=>G});var C=s(18530),y=s(84412),g=s(13961),m=s(74402),a=s(84572),d=s(57786),D=s(7673),u=s(96354),x=s(99437),O=s(23294),p=s(5964),R=s(65245),k=s(99172),b=s(25558),h=s(96697),v=s(50644),P=s(89417),S=s(87019),I=s(89079);class G{refresh$=new C.B;pageChanged$=new C.B;currentPage$;pagedItems$;infiniteTotalCount$;sub=new g.yU;totalCount$;itemsPerPage$;filterQuery$;pageSize$;filterLoading$;search=new P.MJ("");constructor($,L,c,_=S.z9,X=void 0,Z=!1){const at={value:[],totalItems:0};this.itemsPerPage$=new y.t(_),this.filterQuery$=Z?new C.B:new y.t(X),this.pageSize$=this.itemsPerPage$.asObservable();const st=(0,m.A)(L)?L:(0,D.of)(L),ct=this.search.valueChanges.pipe((0,k.Z)(""),(0,u.T)(E=>(E||"").trim()),(0,O.F)()),t=(0,a.z)([ct,this.itemsPerPage$,this.filterQuery$,st]).pipe((0,b.n)(([E,N,U,et])=>this.pageChanged$.pipe((0,k.Z)(1),(0,O.F)(),(0,u.T)(tt=>({search:E,page:tt,itemsPerPage:N,filterQuery:U,resolver:et})))),(0,v.lc)(this.refresh$),(0,v.H9)());this.currentPage$=t.pipe((0,u.T)(({page:E})=>E),(0,v.H9)()),this.pagedItems$=t.pipe((0,R.i)(c?1:0),(0,b.n)(({search:E,page:N,itemsPerPage:U,filterQuery:et,resolver:tt})=>tt.resolveData(N,U,E,et).pipe((0,x.W)(()=>(0,D.of)(at)))),(0,k.Z)(c||at),(0,v.H9)()),this.filterLoading$=(0,d.h)((0,a.z)([ct,this.filterQuery$,st]).pipe((0,u.T)(E=>!0)),this.pagedItems$.pipe((0,R.i)(c?0:1),(0,u.T)(E=>!1))).pipe((0,k.Z)(!c),(0,O.F)(),(0,v.H9)()),this.totalCount$=this.pagedItems$.pipe((0,u.T)(E=>E.totalItems??0)),this.infiniteTotalCount$=(0,a.z)([this.pageChanged$.pipe((0,k.Z)(1)),this.itemsPerPage$,this.pagedItems$]).pipe((0,u.T)(([E,N,U])=>U.hasNext&&U.value?E*_+1:U.value?E*_:0)),this.pagedItems$.pipe((0,p.p)(E=>!E.totalItems),(0,p.p)(E=>0===E.value?.length),(0,b.n)(E=>t.pipe((0,h.s)(1),(0,u.T)(N=>N.page-1))),(0,p.p)(E=>E>0),(0,I.pQ)($)).subscribe({next:E=>{E>0&&this.pageChanged$.next(E)}}),(0,a.z)([t,this.pagedItems$]).pipe((0,p.p)(([E,N])=>!!N.totalItems),(0,u.T)(([{page:E,itemsPerPage:N},{totalItems:U}])=>({page:E,maxPage:Math.max(1,Math.ceil((U||0)/N))})),(0,p.p)(({page:E,maxPage:N})=>N<E),(0,I.pQ)($)).subscribe(({maxPage:E})=>{E>0&&this.pageChanged$.next(E)})}nextPage(){this.currentPage$.pipe((0,u.T)($=>$+1),(0,h.s)(1)).subscribe({next:$=>{this.pageChanged$.next($)}})}pageChanged($){this.pageChanged$.next($.page)}pageSizeChanged($){this.itemsPerPage$.next($)}filterChanged($){this.filterQuery$.next($)}}},47172(F,w,s){s.d(w,{J9:()=>D,Ji:()=>a,Zc:()=>d,qU:()=>y,zM:()=>m});var C=s(9195);const y=["all","incoming","outgoing","missed","abandoned"],g={[C.r.Missed]:"_i18n.Calls_Missed",[C.r.Received]:"_i18n.IncomingCalls",[C.r.Outgoing]:"_i18n.Calls_Outgoing",[C.r.Abandoned]:"_i18n.Calls_AbandonedQueue",[C.r.AllCalls]:"_i18n.Calls_All"},m={[C.r.Missed]:"_i18n.RecentsMissedCall",[C.r.Received]:"_i18n.Incoming_call",[C.r.Outgoing]:"_i18n.RecentsOutgoingCall",[C.r.Abandoned]:"_i18n.AbandonedCall",[C.r.AllCalls]:"_i18n.Unknown"},a={all:C.r.AllCalls,missed:C.r.Missed,incoming:C.r.Received,outgoing:C.r.Outgoing,abandoned:C.r.Abandoned},d=Object.fromEntries(Object.entries(a).map(([u,x])=>[u,g[x]]));function D(u){return"string"==typeof u&&y.includes(u)}},48661(F,w,s){s.d(w,{Hr:()=>O,Sz:()=>p,iH:()=>u});var C=s(67374),y=s.n(C),g=s(8516),m=s(1211),a=s(9195),d=s(47172),D=s(85372);class u{call;partyName;partyNumber;queueName;isVoicemail;iconClass;icon;description;via;duration;isToday;time;dateRelative;callTypeTitle;constructor(v){this.call=v,this.partyName=function x(h){return(h.party??"").replace(/\s*->\s*VM\s*$/,"").replace(h.partyNumber,"").trim()}(this.call)||this.call.partyNumber,this.partyNumber=this.partyName===this.call.partyNumber?"":this.call.partyNumber,this.isVoicemail=this.call.partyDnType===m.Jhl.SpecialMenu,this.iconClass=O[this.call.callType],this.icon=p[this.call.callType],this.via=R(this.call),this.queueName=this.call.title,this.description=function k(h){return[[h.title,y()(h.startTime).format("L LT"),b(h.duration)].filter(Boolean).join(", "),R(h)].filter(Boolean).join(" ")}(this.call),this.duration=b(this.call.duration),this.isToday=y()().isSame(y()(this.call.startTime),"day"),this.time=y()(this.call.startTime).format("LT"),this.dateRelative=(0,D.P)(this.call.startTime),this.callTypeTitle=d.zM[this.call.callType]}}const O={[a.r.Received]:"fillIconBlue received",[a.r.Outgoing]:"fillIconGreen outgoing",[a.r.Missed]:"fillIconRed missed",[a.r.Abandoned]:"fillIconRed missed",[a.r.AllCalls]:""},p={[a.r.Received]:g.T8X,[a.r.Outgoing]:g.ZWL,[a.r.Missed]:g.EGT,[a.r.Abandoned]:g.Q3b,[a.r.AllCalls]:void 0};function R(h){return h.viaParty?`via ${h.viaParty} ${h.viaPartyNumber}`:""}function b(h){if(!h||h<=0)return"";const v=y().duration(h,"seconds");return v.format(v.hours()?"HH:mm:ss":"H:m:ss").replace(/^0:/,"")}},71106(F,w,s){s.d(w,{A:()=>C});class C{contacts;groupName;constructor(g,m){this.contacts=g,this.groupName=m}}},3032(F,w,s){s.d(w,{Z:()=>V});var C=s(85802),y=s(90394),g=s(20284),m=s(16444),a=s(65656),d=s(46062),D=s(65676),u=s(38601),x=s(1211),O=s(84412),p=s(85343),R=s(90558),k=s(77498),b=s(96697),h=s(71106),v=s(59882),P=s(42610),S=s(33971),I=s(12094),G=s(23773);let V=(()=>{class ${phoneService=(0,C.WQX)(g.u);chatLocatorService=(0,C.WQX)(y.e);myPhoneService=(0,C.WQX)(m.gx);modalService=(0,C.WQX)(u.B);meetingService=(0,C.WQX)(D.g);navigationService=(0,C.WQX)(I.s);router=(0,C.WQX)(v.Ix);peopleLink=(0,G.I)(P.Hh.SavePeople,P.lX);lastSearchedText="";_currentExtension$=new O.t(void 0);isVideoCallEnabled$;constructor(){const c=(0,C.WQX)(R.gc);this.isVideoCallEnabled$=c.isWebRTCSelected$}get currentExtension$(){return this._currentExtension$.asObservable()}viewExtension(c,_={}){this._currentExtension$.next(c),this.router.navigate(["people","view"],{state:_}).catch(p.l)}hasMoreActions(c){return this.isLocal(c)||this.hasEmail(c)||this.hasMobile(c)||this.isReceptionist(c)||this.isOperationist(c)}
1navigatePreviousUrl(){const c=this.peopleLink();this.navigationService.navigatePreviousUrl$(c instanceof Array?c:[c]).pipe((0,b.s)(1)).subscribe(()=>{this._currentExtension$.next(void 0)})}navigatePeople(){const c=this.peopleLink();this.router.navigate(c instanceof Array?c:[c]).then(()=>{this._currentExtension$.next(void 0)})}callToExtensionNumber(c,_){void 0===c||void 0===c.phones.extension||this.phoneService.call(c.phones.extension,_)}chatWithExtension(c){if(void 0!==c&&void 0!==c.phones.extension)return this.chatLocatorService.openChat(new h.A([c]))}meetingWithExtension({contact:c}){return this.meetingService.createWebmeetingWithContact(c).pipe((0,k.c)(a.j)).subscribe({next:X=>{(0,S.Pe)(X.myJoinLink,this.modalService,"_i18n.PopupBlockedWebmeeting","_i18n.OpenWebmeeting")},error:X=>this.modalService.error(X)})}isLocal(c){return c.bridgeId===d.Ij&&!c.myContact}leaveVoicemail(c){this.myPhoneService.myPhoneSession.pipe((0,b.s)(1)).subscribe(_=>{this.phoneService.call(_.systemParameters.VmailDialCode+c.phones.extension)})}intercom(c){this.myPhoneService.myPhoneSession.pipe((0,b.s)(1)).subscribe(_=>{this.phoneService.call(_.systemParameters.IntercomDialCode+c.phones.extension)})}canWebmeet(c){return c&&(!!c.emailAddress||c.bridgeId===d.Ij)}hasEmail(c){return c&&!!c.emailAddress}email(c){(0,S.b8)("mailto:"+c.emailAddress)}hasMobile(c){return c&&!!c.phones.mobile}getMobilePhone(c){if(this.hasMobile(c))return c.phones.mobile}getNativeMobilePhone(c){if(this.hasMobile(c))return c.nativeMobileNumber}callMobile(c){const _=this.getMobilePhone(c);_&&this.phoneService.call(_)}static IsFavorite(c){return c.isFavorite}isFavorite(c){return $.IsFavorite(c)}updateFavorites(c,_){const X=new x.S2g;X.Action=c,X.ExtensionNumbers=_.map(Z=>Z.extensionNumber),this.myPhoneService.get(X).subscribe({error:Z=>{this.modalService.error(Z)}})}addToFavorites(c){this.updateFavorites(x.X2v.Inserted,[c])}removeFromFavorites(c){this.updateFavorites(x.X2v.Deleted,[c])}setStatus(c,_){const X=new x.mko({TargetExtension:c});return X.InternalProfileName=_,this.myPhoneService.get(X)}assignExtension(c,_){return this.myPhoneService.get(new x.eWQ({TargetExtension:c,FirstName:_.firstName,LastName:_.lastName,Email:_.email,Mobile:_.mobile}))}clearExtension(c){const _=new x.MJd({TargetExtension:c});return this.myPhoneService.get(_)}isReceptionist(c){return!(!c||c.bridgeId!==d.Ij)&&c.groups.some(_=>_.groupId.AssignClearOperations)}isOperationist(c){return!(!c||c.bridgeId!==d.Ij)&&c.groups.some(_=>_.groupId.PerformOperations)}isLocalContact(c){return c.bridgeId===d.Ij}isExtensionLocal(c){return this.isLocalContact(c)&&!c.myContact}isVoicemailEnabled(c){return c.isVoicemailEnabled&&this.isExtensionLocal(c)}isAddToFavorites(c){return this.isExtensionLocal(c)&&!this.isFavorite(c)}isRemoveFromFavorites(c){return this.isExtensionLocal(c)&&this.isFavorite(c)}canToggleFavorite(c){return this.isExtensionLocal(c)&&!c.myContact}toggleFavorite(c){this.canToggleFavorite(c)&&(this.isAddToFavorites(c)?this.addToFavorites(c):this.isRemoveFromFavorites(c)&&this.removeFromFavorites(c))}static \u0275fac=function(_){return new(_||$)};static \u0275prov=C.jDH({token:$,factory:$.\u0275fac,providedIn:"root"})}return $})()},63782(F,w,s){s.d(w,{phonebookRoutes:()=>qe});var C=s(14310),y=s(60277),g=s(16444),m=s(59882),a=s(85802),d=s(17705),D=s(91473),u=s(46062),x=s(68739),O=s(84572),p=s(7673),R=s(96697),k=s(70980),b=s(25558),h=s(96354),v=s(5964),P=s(99172),S=s(1211),I=s(38601),G=s(576),V=s(32271),$=s(72252),L=s(68018),c=s(58689),_=s(8516),X=s(57347),Z=s(12720),ct=s(1191),t=s(35547);const E=["*"];function N(e,l){if(1&e){const n=t.RV6();t.j41(0,"a",6),t.nI1(1,"translate"),t.bIt("click",function(){a.eBV(n);const i=t.XpG();return a.Njj(i.editItem())}),t.nrm(2,"app-icon",2),t.k0s()}if(2&e){const n=t.XpG();t.HbH(t.VkB("btn ",n.isNewDesign()?"btn-border btn-icon":"btn-plain")),t.Y8G("title",t.mNQ(t.bMT(1,6,"_i18n.Edit"))),t.R7$(2),t.Y8G("icon",n.pencilIcon())}}function U(e,l){if(1&e){const n=t.RV6();t.j41(0,"a",7),t.nI1(1,"translate"),t.bIt("click",function(){a.eBV(n);const i=t.XpG();return a.Njj(i.save.emit())}),t.nrm(2,"app-icon",2),t.k0s()}if(2&e){const n=t.XpG();t.HbH(t.VkB("btn ms-auto ",n.isNewDesign()?"btn-border btn-icon":"btn-plain")),t.Y8G("title",t.mNQ(t.bMT(1,6,"_i18n.Save"))),t.R7$(2),t.Y8G("icon",n.saveIcon())}}function et(e,l){if(1&e){const n=t.RV6();t.j41(0,"a",8),t.nI1(1,"translate"),t.bIt("click",function(){a.eBV(n);const i=t.XpG();return a.Njj(i.deleteItem())}),t.nrm(2,"app-icon",2),t.k0s()}if(2&e){const n=t.XpG();t.HbH(t.VkB("btn ",n.isNewDesign()?"btn-border btn-icon":"btn-plain")),t.Y8G("title",t.mNQ(t.bMT(1,6,"_i18n.Delete"))),t.R7$(2),t.Y8G("icon",n.trashIcon())}}let tt=(()=>{class e{phonebook=(0,a.WQX)(D.m);phoneBookService=(0,a.WQX)(G.P);cd=(0,a.WQX)(d.gRc);modalService=(0,a.WQX)(I.B);isNewDesign=(0,a.WQX)(c.T);pencilIcon=(0,V.EW)(()=>this.isNewDesign()?_.gHP:X);trashIcon=(0,V.EW)(()=>this.isNewDesign()?_.TBR:Z);saveIcon=(0,V.EW)(()=>this.isNewDesign()?_.eMP:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="m433.941 129.941-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"/></svg>');arrowLeftIcon=(0,V.EW)(()=>this.isNewDesign()?_.nkM:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M4.7 244.7c-6.2 6.2-6.2 16.4 0 22.6l176 176c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6L54.6 272 432 272c8.8 0 16-7.2 16-16s-7.2-16-16-16L54.6 240 203.3 91.3c6.2-6.2 6.2-16.4 0-22.6s-16.4-6.2-22.6 0l-176 176z"/></svg>\n');editMode;isNew;contact;save=(0,d.CGW)();canEditCompanyPhonebook;constructor(){(0,a.WQX)(g.gx).myPhoneSession.pipe((0,b.n)(o=>o.canEditCompanyPhonebook$),(0,R.s)(1)).subscribe(o=>{this.canEditCompanyPhonebook=o,this.cd.markForCheck()})}editItem(){this.phoneBookService.editContact(this.contact)}canEdit(){return this.phoneBookService.canEdit(this.contact,this.canEditCompanyPhonebook)}deleteItem(){this.modalService.confirmDeletion("_i18n.Contact_Delete_Confirm_Message").subscribe(()=>{this.doDeleteItem()})}doDeleteItem(){this.phonebook.deleteContact(this.contact).subscribe(n=>
1this.phoneBookService.navigatePreviousUrl())}navigateBack(){this.phoneBookService.navigatePreviousUrl()}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=t.VBU({type:e,selectors:[["editor-operations"]],inputs:{editMode:"editMode",isNew:"isNew",contact:"contact"},outputs:{save:"save"},ngContentSelectors:E,decls:8,vars:8,consts:[[1,"p-1","b-b","d-flex","align-items-center","aside-align","bg","flex-shrink-0","sticky-top"],[3,"click"],[3,"icon"],["id","btnEdit",3,"title","class"],["id","btnSave",3,"title","class"],["id","btnDelete",3,"title","class"],["id","btnEdit",3,"click","title"],["id","btnSave",3,"click","title"],["id","btnDelete",3,"click","title"]],template:function(o,i){1&o&&(t.NAR(),t.j41(0,"div",0)(1,"a",1),t.bIt("click",function(){return i.navigateBack()}),t.nrm(2,"app-icon",2),t.k0s(),t.SdG(3),t.nVh(4,N,3,8,"a",3)(5,U,3,8,"a",4),t.nVh(6,et,3,8,"a",5),t.j41(7,"app-mobile-close-button",1),t.bIt("click",function(){return i.navigateBack()}),t.k0s()()),2&o&&(t.AVh("gap-2",i.isNewDesign()),t.R7$(),t.HbH(t.VkB("btn ",i.isNewDesign()?"btn-border btn-icon m-2":"me-1 btn-plain")),t.R7$(),t.Y8G("icon",i.arrowLeftIcon()),t.R7$(2),t.vxM(!i.editMode&&i.canEdit()?4:i.editMode?5:-1),t.R7$(2),t.vxM(!i.isNew&&i.canEdit()?6:-1))},dependencies:[$.U,ct.R,L.D9],encapsulation:2})}return e})();var z=s(89079),Pt=s(57241);const Dt=["contactEditor"];function wt(e,l){if(1&e){const n=t.RV6();t.j41(0,"editor-operations",6),t.bIt("save",function(){a.eBV(n);const i=t.XpG();return a.Njj(i.saveContact())}),t.k0s()}if(2&e){const n=t.XpG();t.Y8G("contact",n.contact)("editMode",!0)("isNew",n.isNew)}}function $t(e,l){if(1&e){const n=t.RV6();t.j41(0,"app-manage-contact-button",14),t.bIt("click",function(){a.eBV(n);const i=t.XpG(2);return a.Njj(i.deleteContact())}),t.k0s()}if(2&e){const n=t.XpG(2);t.Y8G("icon",n.TrashIcon)}}function Vt(e,l){if(1&e){const n=t.RV6();t.j41(0,"div",3)(1,"button",7),t.bIt("click",function(){a.eBV(n);const i=t.XpG();return a.Njj(i.navigateBack())}),t.nrm(2,"lucide-icon",8),t.k0s(),t.j41(3,"h3",9),t.EFF(4),t.nI1(5,"translate"),t.k0s(),t.j41(6,"div",10),t.nVh(7,$t,1,1,"app-manage-contact-button",11),t.j41(8,"app-manage-contact-button",12),t.bIt("click",function(){a.eBV(n);const i=t.XpG();return a.Njj(i.saveContact())}),t.k0s(),t.j41(9,"app-mobile-close-button",13),t.bIt("click",function(){a.eBV(n);const i=t.XpG();return a.Njj(i.navigateBack())}),t.k0s()()()}if(2&e){const n=t.XpG();t.R7$(2),t.Y8G("img",n.ArrowLeft),t.R7$(2),t.JRh(t.bMT(5,4,n.isNew?"_i18n.AddContact":"_i18n.EditContact")),t.R7$(3),t.vxM(n.isNew?-1:7),t.R7$(),t.Y8G("icon",n.SaveIcon)}}let Ct=(()=>{class e{route=(0,a.WQX)(m.nX);myphone=(0,a.WQX)(g.gx);cd=(0,a.WQX)(d.gRc);phonebookService=(0,a.WQX)(G.P);phonebook=(0,a.WQX)(D.m);modal=(0,a.WQX)(I.B);isNewDesign=(0,a.WQX)(c.T);currentContact$=(0,z.br)(this.phonebookService.currentContact);subscription;isSaving=!1;isNew;contact;editViewModel=new C.j(new x.KA("-1",u.eE.PersonalPhonebook,u.kK));contactEditor;saveContact(){if(this.isSaving)return;const n=this.contactEditor.obtainContact();n&&(this.isSaving=!0,this.phonebook.updateContactByModel(n).pipe((0,R.s)(1),(0,k.j)(()=>{this.isSaving=!1})).subscribe({next:o=>{o.Success&&this.navigateBack()},error:o=>this.modal.error(o)}))}deleteContact(){this.modal.confirmDeletion("_i18n.Contact_Delete_Confirm_Message").pipe((0,b.n)(()=>this.phonebook.deleteContact(this.contact))).subscribe(()=>this.navigateBack())}
1navigateBack(){this.phonebookService.navigatePreviousUrl()}ngOnInit(){const n=this.route.queryParams.pipe((0,h.T)(o=>o.number?{phones:{mobile:o.number}}:void 0),(0,v.p)(o=>!!o),(0,P.Z)(void 0));this.subscription=(0,O.z)([this.currentContact$,this.route.params,this.route.queryParams]).pipe((0,b.n)(([o,i,r])=>o&&o.id===i.id&&o.type===+i.type?(0,p.of)({contact:o,isNew:!1,companyCreationEnabled:!1,crmCreationEnabled:!1,microsoft365CreationEnabled:!1,hasMicrosoft365License:!1}):(0,O.z)([this.myphone.myPhoneSession,this.phonebookService.isMcmMode$,this.phonebookService.canModifyCompanyPhonebook$,this.phonebookService.isCrmCreationEnabled$,this.phonebookService.isMicrosoft365CreationEnabled$,this.phonebookService.hasExchangeLicense$,n]).pipe((0,b.n)(([f,T,j,M,W,B,H])=>{const Y=i.newContactType,A=r.mask,Q=!T&&j,q=!T&&M,K=!T&&W,nt=!(Q||q||K||T);return Y===String(u.eE.CompanyPhonebook)||Y===String(u.eE.PersonalPhonebook)||Y===String(u.eE.DepartmentPhonebook)?(0,p.of)({contact:new x.KA("-1",+i.newContactType,u.kK,H),isNew:!0,companyCreationEnabled:Q,crmCreationEnabled:q,microsoft365CreationEnabled:K,hasMicrosoft365License:B,createCompanyContactInitial:Q&&Y===String(u.eE.CompanyPhonebook),createPersonalContactInitial:Y===String(u.eE.PersonalPhonebook)||nt,createDepartmentContactInitial:Y===String(u.eE.CompanyPhonebook)&&(T||!Q),createCrmContactInitial:!1,createMicrosoft365ContactInitial:!1}):A===S.CTt.CO_M365.toString()||A===S.CTt.CO_CRM.toString()?(0,p.of)({contact:new x.KA("-1",u.eE.PersonalPhonebook,u.kK,H),isNew:!0,companyCreationEnabled:Q,crmCreationEnabled:q,microsoft365CreationEnabled:K,hasMicrosoft365License:B,createCompanyContactInitial:!1,createPersonalContactInitial:Y===String(u.eE.PersonalPhonebook)||nt,createDepartmentContactInitial:!1,createCrmContactInitial:q&&A===S.CTt.CO_CRM.toString(),createMicrosoft365ContactInitial:K&&B&&A===S.CTt.CO_M365.toString()}):null!=i.id?f.get(new S.Q24({Id:i.id,ContactType:i.type})).pipe((0,h.T)(ht=>({contact:ht.Contact?x.KA.create(ht.Contact):void 0,isNew:!1,companyCreationEnabled:!1,crmCreationEnabled:!1,microsoft365CreationEnabled:!1,hasMicrosoft365License:!1,createCompanyContactInitial:!1,createPersonalContactInitial:!1,createDepartmentContactInitial:!1,createCrmContactInitial:!1,createMicrosoft365ContactInitial:!1}))):(0,p.of)({contact:new x.KA("-1",j?u.eE.CompanyPhonebook:u.eE.PersonalPhonebook,u.kK,H),isNew:!0,companyCreationEnabled:Q,crmCreationEnabled:q,microsoft365CreationEnabled:K,hasMicrosoft365License:B,createCompanyContactInitial:Q,createPersonalContactInitial:nt,createDepartmentContactInitial:T||!Q&&!nt,createCrmContactInitial:!1,createMicrosoft365ContactInitial:!1})})))).subscribe({next:o=>{this.isNew=o.isNew,o.contact?this.contact=o.contact:this.navigateBack(),void 0!==this.contact&&(this.editViewModel=new C.j(this.contact),this.editViewModel.companyPhonebookCreationEnabled=o.companyCreationEnabled,this.editViewModel.crmCreationEnabled=o.crmCreationEnabled,this.editViewModel.microsoft365CreationEnabled=o.microsoft365CreationEnabled,this.editViewModel.createCompanyContact=o.createCompanyContactInitial,this.editViewModel.createPersonalContact=o.createPersonalContactInitial,this.editViewModel.createDepartmentContact=o.createDepartmentContactInitial,this.editViewModel.createCrmContact=o.createCrmContactInitial,this.editViewModel.createMicrosoft365Contact=o.createMicrosoft365ContactInitial,this.editViewModel.hasExchangeLicense=o.hasMicrosoft365License),this.cd.markForCheck()},error:o=>this.modal.error(o)})}ngOnDestroy(){this.subscription.unsubscribe()}ArrowLeft=_.nkM;TrashIcon=_.TBR;SaveIcon=_.eMP;static \u0275fac=function(o){return new(o||e)};static \u0275cmp=t.VBU({type:e,selectors:[["ng-component"]],viewQuery:function(o,i){if(1&o&&t.GBs(Dt,5),2&o){let r;t.mGM(r=t.lsd())&&(i.contactEditor=r.first)}},features:[t.Jv_([])],decls:6,vars:3,consts:[["contactEditor",""],[1,"d-flex","h-100","flex-column","bg-tiles"],[3,"contact","editMode","isNew"],[1,"d-flex","align-items-center","aside-align-panel-header","ps-3","pe-2","border-bottom"],[1,"editor","scrollable","pt-4"],[3,"vm","showMoreFields"],[3,"save","contact","editMode","isNew"],["type","button","data-qa","go-back",1,"btn","btn-plain","btn-icon","me-1","d-md-down-none",3,"click"],[3,"img"],[1,"m-0","me-auto"],[1,"d-flex","align-items-center","gap-2","me-2"],["text","_i18n.CntDelete","data-qa","delete",3,"icon"],["text","_i18n.Save","data-qa","save",3,"click","icon"],[3,"click"],["text","_i18n.CntDelete","data-qa","delete",3,"click","icon"]],template:function(o,i){1&o&&(t.j41(0,"div",1),t.nVh(1,wt,1,3,"editor-operations",2)(2,Vt,10,6,"div",3),t.j41(3,"div",4),t.nrm(4,"contact-editor",5,0),t.k0s()()),2&o&&(t.R
17$(),t.vxM(i.isNewDesign()?2:1),t.R7$(3),t.Y8G("vm",i.editViewModel)("showMoreFields",!i.isNew))},dependencies:[tt,y._,$.U,_.flO,_.WGl,Pt.d,L.D9],styles:[".editor[_ngcontent-%COMP%], .buttons[_ngcontent-%COMP%]{max-width:1200px}"]})}return e})();var St=s(23294),Mt=s(44668),xt=s(93049),lt=s(89417),Gt=s(19499),jt=s(51667),Bt=s(84412),rt=s(91413),pt=s(37863),At=s(3710),Xt=s(12449),Nt=s(20681);let Ft=(()=>{class e extends Xt.d{httpClient;constructor(n,o,i){super(o,i),this.httpClient=n}phonebookClear(n,o="body",i=!1,r){let f=new pt.rx(this.encoder);f=this.addToHttpParams(f,"phonebookType",n,pt.l2.Form,!0);let T=this.defaultHeaders;T=this.configuration.addCredentialToHeaders("Application","Authorization",T,"Bearer ");const j=r?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);void 0!==j&&(T=T.set("Accept",j));const M=r?.context??new rt._y,W=r?.transferCache??!0;let B="json";j&&(B=j.startsWith("text")?"text":this.configuration.isJsonMime(j)?"json":"blob");const{basePath:Y,withCredentials:A}=this.configuration;return this.httpClient.request("post",`${Y}/webclient/api/Phonebook/clear`,{context:M,params:f.toHttpParams(),responseType:B,...A?{withCredentials:A}:{},headers:T,observe:o,...void 0!==W?{transferCache:W}:{},reportProgress:i})}phonebookImport(n,o,i="body",r=!1,f){if(null==n)throw new Error("Required parameter fileInput was null or undefined when calling phonebookImport.");let T=new pt.rx(this.encoder);T=this.addToHttpParams(T,"phonebookType",o,pt.l2.Form,!0);let j=this.defaultHeaders;j=this.configuration.addCredentialToHeaders("Application","Authorization",j,"Bearer ");const M=f?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);void 0!==M&&(j=j.set("Accept",M));const W=f?.context??new rt._y,B=f?.transferCache??!0;let A,Q=!1;Q=this.canConsumeForm(["multipart/form-data"]),A=Q?new FormData:new rt.Nl({encoder:this.encoder}),void 0!==n&&(A=A.append("fileInput",n)||A);let K="json";M&&(K=M.startsWith("text")?"text":this.configuration.isJsonMime(M)?"json":"blob");const{basePath:ht,withCredentials:Rt}=this.configuration;return this.httpClient.request("post",`${ht}/webclient/api/Phonebook/import`,{context:W,body:A,params:T.toHttpParams(),responseType:K,...Rt?{withCredentials:Rt}:{},headers:j,observe:i,...void 0!==B?{transferCache:B}:{},reportProgress:r})}static \u0275fac=function(o){return new(o||e)(a.KVO(rt.Qq),a.KVO(At.o,8),a.KVO(Nt.V,8))};static \u0275prov=a.jDH({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const J={None:0,Personal:1,Department:2,Company:4};var _t=s(53775),ut=s(95),Lt=s(42610),Wt=s(44652),Ut=s(96049),kt=s(33971),bt=s(19630),Yt=s(18054),Qt=s(68845),zt=s(49371),Ht=s(83421),Kt=s(38969),gt=s(68580),Jt=s(12426);let Zt=(()=>{class e{localStorage=(0,a.WQX)(Jt.sj);queryParams;appSaveQueryParams="";onClick(){this.appSaveQueryParams&&this.localStorage.store(this.appSaveQueryParams,this.queryParams??"")}static \u0275fac=function(o){return new(o||e)};static \u0275dir=t.FsC({type:e,selectors:[["","appSaveQueryParams",""]],hostBindings:function(o,i){1&o&&t.bIt("click",function(){return i.onClick()})},inputs:{queryParams:"queryParams",appSaveQueryParams:"appSaveQueryParams"}})}return e})();var qt=s(53180),tn=s(42268),nn=s(40720),en=s(75294),dt=s(49769),on=s(3471),an=s(97519),Tt=s(62175),sn=s(32566),cn=s(47548),ln=s(18530);function rn(e,l){if(1&e){const n=t.RV6();t.j41(0,"button",9),t.nI1(1,"translate"),t.bIt("click",function(i){a.eBV(n);const r=t.XpG();return i.stopPropagation(),a.Njj(r.showMoreClicked$.next(i))}),t.nrm(2,"lucide-icon",7),t.k0s()}if(2&e){const n=t.XpG();t.Y8G("title",t.bMT(1,2,"_i18n.ShowMore")),t.R7$(2),t.Y8G("img",n.Ellipsis)}}let pn=(()=>{class e{phonebookService=(0,a.WQX)(G.P);showMoreClicked$=new ln.B;Ellipsis=_.gyB;contact;showMoreActionsClicked=(0,z.p)(this.showMoreClicked$);phoneCallIcon=_.d3s;static \u0275fac=function(o){return new(o||e)};static \u0275cmp=t.VBU({type:e,selectors:[["app-phonebook-list-item"]],inputs:{contact:"contact"},outputs:{showMoreActionsClicked:"showMoreActionsClicked"},decls:13,vars:13,consts:[["data-qa","phonebook-list-item",1,"d-flex","gap-2","p-2","align-items-center"],["size","s","data-qa","avatar",3,"ext"],[1,"d-flex","flex-1","mw-0","flex-column"],["data-qa","name",1,"m-0",3,"truncatedText"],["data-qa","phone",1,"text-truncate","text-hint"],[1,"d-flex","align-items-center"],["type","button","data-qa","call-btn",1,"btn","btn-plain","btn-icon",3,"click","title"],[3,"img"],["type","button","data-qa","show-more",1,"btn","btn-plain","btn-icon",3,"title"],["type","button","data-qa","show-more",1,"btn","btn-plain","btn-icon",3,"click","title"]],template:function(o,i){1&o&&(t.j41(0,"div",0),t.nrm(1,"app-avatar",1),t.j41(2,"div",2),t.nrm(3,"h6",3),t.nI1(4,"contactName"),t.nI1(5,"async"),t.j41(6,"small",4),t.EFF(7),t.k0s()(),t.j41(8,"div",5)(9,"button",6),t.nI1(10,"translate"),t.bIt("click",function(){return i.phonebookService.makeCall(i.contact)}),t.nrm(11,"lucide-icon",7),t.k0s(),t.nVh(12,rn,3,4,"button",8),t.k0s()()),2&o&&(t.R
17$(),t.Y8G("ext",i.contact),t.R7$(2),t.Y8G("truncatedText",t.bMT(5,9,t.i5U(4,6,i.contact,i.contact.emailAddress))),t.R7$(4),t.JRh(i.contact.bestPhone),t.R7$(2),t.Y8G("title",t.bMT(10,11,"_i18n.Call")),t.R7$(2),t.Y8G("img",i.phoneCallIcon),t.R7$(),t.vxM(i.showMoreClicked$.observed?12:-1))},dependencies:[Tt.f,cn.N,_.flO,_.WGl,L.D9,dt.Jj,sn.G],encapsulation:2,changeDetection:0})}return e})();var _n=s(22429),It=s(69789),Et=s(20284),dn=s(14175),vt=s(79556),mn=s(1438);function hn(e,l){if(1&e){const n=t.RV6();t.j41(0,"app-manage-contact-button",6),t.bIt("click",function(){a.eBV(n);const i=t.XpG(),r=t.XpG();return a.Njj(r.phonebookService.editContact(i))}),t.k0s(),t.j41(1,"app-manage-contact-button",7),t.bIt("click",function(){a.eBV(n);const i=t.XpG(),r=t.XpG();return a.Njj(r.phonebookService.deleteContact(i,r.router.url))}),t.k0s()}if(2&e){const n=t.XpG(2);t.Y8G("icon",n.Pencil),t.R7$(),t.Y8G("icon",n.TrashIcon)}}function Cn(e,l){if(1&e){const n=t.RV6();t.j41(0,"app-manage-contact-button",8),t.bIt("click",function(){const i=a.eBV(n),r=t.XpG(2);return a.Njj(r.openUrlInTab(i))}),t.k0s()}if(2&e){const n=t.XpG(2);t.Y8G("icon",n.Contact)}}function un(e,l){if(1&e){const n=t.RV6();t.j41(0,"app-manage-contact-button",9),t.bIt("click",function(){a.eBV(n);const i=t.XpG(2);return a.Njj(i.openClientCrmUrl())}),t.k0s()}if(2&e){const n=t.XpG(2);t.Y8G("icon",n.UserSearch)}}function bn(e,l){if(1&e&&(t.j41(0,"div",5)(1,"h4",10),t.nrm(2,"lucide-icon",11),t.EFF(3),t.nI1(4,"translate"),t.k0s(),t.nrm(5,"previous-contact-interactions",12),t.k0s()),2&e){const n=t.XpG(),o=t.XpG();t.R7$(2),t.Y8G("img",o.History),t.R7$(),t.SpI(" ",t.bMT(4,3,"_i18n.InteractionHistory")," "),t.R7$(2),t.Y8G("contact",n)}}function gn(e,l){if(1&e){const n=t.RV6();t.j41(0,"div",0)(1,"app-contact-panel-header",1),t.bIt("closed",function(){a.eBV(n);const i=t.XpG();return a.Njj(i.closed.emit())}),t.nVh(2,hn,2,2),t.nVh(3,Cn,1,1,"app-manage-contact-button",2),t.nVh(4,un,1,1,"app-manage-contact-button",3),t.k0s(),t.nrm(5,"app-contact-data",4),t.k0s(),t.nVh(6,bn,6,5,"div",5)}if(2&e){let n;const o=l,i=t.XpG();t.R7$(),t.Y8G("contact",o)("phoneNumber",o.bestPhone),t.R7$(),t.vxM(i.canEditOrDelete()?2:-1),t.R7$(),t.vxM((n=o.crmUrl)?3:-1,n),t.R7$(),t.vxM(i.canOpenClientCrmUrl()?4:-1),t.R7$(),t.Y8G("contact",o),t.R7$(),t.vxM(i.showInteractionHistory()?6:-1)}}let yt=(()=>{class e{phonebookService=(0,a.WQX)(G.P);phoneService=(0,a.WQX)(Et.u);chatSmsService=(0,a.WQX)(ut.V);integrationService=(0,a.WQX)(bt.a);myPhoneService=(0,a.WQX)(g.gx);previousContactInteractionsService=(0,a.WQX)(vt.k);router=(0,a.WQX)(m.Ix);isNewDesign=(0,a.WQX)(c.T);contact=d.hFB.required();pageView=!1;closed=(0,d.CGW)();PhoneCall=_.d3s;MessageCircle=_.oFn;UserSearch=_.geC;Pencil=_.gHP;Contact=_.Bve;Mail=_.gE4;History=_.BZB;XIcon=_.uv5;TrashIcon=_.TBR;isSmsAvailable=(0,z.ot)(this.chatSmsService.isSmsAvailable$,{initialValue:!1});hasClientCrmIntegration=(0,z.ot)(this.integrationService.hasClientCrmIntegration$);canEditCompanyPhonebook=(0,z.ot)(this.myPhoneService.myPhoneSession.pipe((0,b.n)(n=>n.canEditCompanyPhonebook$)),{initialValue:!1});showInteractionHistory=(0,z.ot)(this.previousContactInteractionsService.isInteractionHistoryHidden$.pipe((0,h.T)(n=>!n)),{initialValue:!1});canOpenClientCrmUrl=(0,V.EW)(()=>{const{bestPhone:n,emailAddress:o}=this.contact();return this.hasClientCrmIntegration()&&!(!n&&!o)});canEditOrDelete=(0,V.EW)(()=>this.phonebookService.canEdit(this.contact(),this.canEditCompanyPhonebook()));openClientCrmUrl(){const{bestPhone:n,emailAddress:o}=this.contact();this.integrationService.openClientCrmUrl(n,o)}openUrlInTab(n){window.open(n,"_blank")}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=t.VBU({type:e,selectors:[["app-phonebook-selected-contact"]],hostVars:2,hostBindings:function(o,i){2&o&&t.AVh("page-view",i.pageView)},inputs:{contact:[1,"contact"],pageView:"pageView"},outputs:{closed:"closed"},decls:1,vars:1,consts:[[1,"contact-info"],["data-qa","contact-panel-header",3,"closed","contact","phoneNumber"],["data-qa","open-crm","text","_i18n.CRM",3,"icon"],["data-qa","crm-lookup","text","_i18n.LookUp",3,"icon"],["data-qa","contact-data",3,"contact"],[1,"interaction-history"],["text","_i18n.EditContact","data-qa","edit-contact",3,"click","icon"],["text","_i18n.CntDelete","data-qa","delete-contact",3,"click","icon"],["data-qa","open-crm","text","_i18n.CRM",3,"click","icon"],["data-qa","crm-lookup","text","_i18n.LookUp",3,"click","icon"],[1,"mb-3"],[1,"me-1",3,"img"],[3,"contact"]],template:function(o,i){if(1&o&&t.nVh(0,gn,7,7),2&o){let r;t.vxM((r=i.contact())?0:-1,r)}},dependencies:[It.S,_.flO,_.WGl,dn.W,mn.v,Pt.d,L.D9],styles:["@media(max-width:1399.98px){.d-xxl-down-none[_ngcontent-%COMP%], .xxl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:1199.98px){.d-xl-down-none[_ngcontent-%COMP%], .xl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:991.98px){.d-lg-down-none[_ngcontent-%COMP%], .lg-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:767.98px){.d-md-down-none[_ngcontent-%COMP%], .md-visible[_ngcontent-%COMP%]{display:none!important}}@media(max-width:575.98px){.d-sm-down-none[_ngcontent-%COMP%], .sm-visible[_ngcontent-%COMP%]{display:none!important}}[_nghost-%COMP%]{background:var(--background);position:relative;display:flex;flex-direction:column;width:100%;height:100%;overflow:auto}[_nghost-%COMP%] .contact-info[_ngcontent-%COMP%]{flex:1 1 auto;max-height:max-content}[_nghost-%COMP%] .interaction-history[_ngcontent-%COMP%]{border-top:1px solid var(--border-color);padding:var(--spacer-l)}@media(min-width:992px){.page-view[_nghost-%COMP%]{flex-direction:row}.page-view[_nghost-%COMP%] .interaction-history[_ngcontent-%COMP%]{border-left:1px solid var(--border-color);border-top:none;flex:0 0 400px;overflow:auto}.page-view[_nghost-%COMP%] .contact-info[_ngcontent-%COMP%]{overflow:auto}}"]})}return e})();var vn=s(82529),fn=s(37199);const Pn=["scrollBox"],Mn=["file"],xn=["basicMenu"],ft=()=>({exact:!0}),ot=e=>({p1:e}),mt=()=>["/contacts"],Ot=(e,l)=>({groupId:e,mask:l});function kn(e,l){if(1&e){const n=t.RV6();t.j41(0,"button",21),t.nI1(1,"translate"),t.bIt("click",function(){a.eBV(n);const i=t.XpG(2);return a.Njj(i.phonebookService.addNewContact())}),t.nrm(2,"lucide-icon",22),t.k0s()}if(2&e){const n=t.XpG(2);t.Y8G("title",t.mNQ(t.bMT(1,4,"_i18n.AddContact")))("routerLinkActiveOptions",t.lJ4(6,ft)),t.R7$(2),t.Y8G("img",n.plusIcon)}}function Tn(e,l){if(1&e){const n=t.RV6();t.j41(0,"ul",27)(1,"li",28)(2,"a",29),t.bIt("click",function(){a.eBV(n);const i=t.XpG(4);return a.Njj(i.uploadForImport(i.PhonebookType.Department))}),t.nrm(3,"lucide-icon",22),t.EFF(4),t.nI1(5,"async"),t.nI1(6,"translate"),t.k0s()(),t.j41(7,"li",28)(8,"a",30),t.bIt("click",function(){a.eBV(n);const i=t.XpG(4);return a.Njj(i.uploadForImport(i.PhonebookType.Company))}),t.nrm(9,"lucide-icon",22),t.EFF(10),t.nI1(11,"translate"),t.k0s()()()}if(2&e){let n;const o=t.XpG(4);t.R7$(3),t.Y8G("img",o.uploadIcon),t.R7$(),t.SpI(" ",t.i5U(6,6,"_i18n.ImportDepartmentContacts",t.eq3(11,ot,null==(n=t.bMT(5,4,o.myPrimaryDepartment$))?null:n.Name))," "),t.R7$(5),t.Y8G("img",o.uploadIcon),t.R7$(),t.SpI(" ",t.bMT(11,9,"_i18n.ImportCompanyContacts")," ")}}function In(e,l){if(1&e){const n=t.RV6();t.j41(0,"ul",27)(1,"li",28)(2,"a",31),t.bIt("click",function(){a.eBV(n);const i=t.XpG(4);return a.Njj(i.clearPhonebook(i.PhonebookType.Department))}),t.nrm(3,"lucide-icon",22),t.EFF(4),t.nI1(5,"async"),t.nI1(6,"translate"),t.k0s()(),t.j41(7,"li",28)(8,"a",32),t.bIt("click",function(){a.eBV(n);const i=t.XpG(4);return a.Njj(i.clearPhonebook(i.PhonebookType.Company))}),t.nrm(9,"lucide-icon",22),t.EFF(10),t.nI1(11,"translate"),t.k0s()()()}if(2&e){let n;const o=t.XpG(4);t.R7$(3),t.Y8G("img",o.trashIcon),t.R7$(),t.SpI(" ",t.i5U(6,6,"_i18n.DeleteDepartmentContacts",t.eq3(11,ot,null==(n=t.bMT(5,4,o.myPrimaryDepartment$))?null:n.Name))," "),t.R7$(5),t.Y8G("img",o.trashIcon),t.R7$(),t.SpI(" ",t.bMT(11,9,"_i18n.DeleteCompanyContacts")," ")}}function En(e,l){if(1&e&&(t.j41(0,"div",23)(1,"button",24),t.nI1(2,"translate"),t.nrm(3,"lucide-icon",22),t.k0s(),t.DNE(4,Tn,12,13,"ul",25),t.k0s(),t.j41(5,"div",23)(6,"button",26),t.nI1(7,"translate"),t.nrm(8,"lucide-icon",22),t.k0s(),t.DNE(9,In,12,13,"ul",25),t.k0s()),2&e){const n=t.XpG(3);t.R7$(),t.Y8G("title",t.mNQ(t.bMT(2,6,"_i18n.Import"))),t.R7$(2),t.Y8G("img",n.uploadIcon),t.R7$(3),t.Y8G("title",t.mNQ(t.bMT(7,8,"_i18n.DeleteAllContacts"))),t.R7$(2),t.Y8G("img",n.trashIcon)}}function yn(e,l){if(1&e){const n=t.RV6();t.j41(0,"button",33),t.nI1(1,"translate"),t.bIt("click",function(){a.eBV(n);const i=t.XpG(3);return a.Njj(i.uploadForImport())}),t.nrm(2,"lucide-icon",22),t.k0s(),t.j41(3,"button",34),t.nI1(4,"translate"),t.bIt("click",function(){a.eBV(n);const i=t.XpG(3);return a.Njj(i.clearPhonebook())}),t.nrm(5,"lucide-icon",22),t.k0s()}if(2&e){const n=t.XpG(3);t.Y8G("title",t.mNQ(t.bMT(1,6,"_i18n.Import"))),t.R7$(2),t.Y8G("img",n.uploadIcon),t.R7$(),t.Y8G("title",t.mNQ(t.bMT(4,8,"_i18n.DeleteAllContacts"))),t.R7$(2),t.Y8G("img",n.trashIcon)}}function On(e,l){if(1&e&&(t.nVh(0,En,10,10),t.nI1(1,"async"),t.vZN(2,yn,6,10)),2&e){const n=t.XpG(2);t.vxM(t.bMT(1,1,n.localService.showActionsButtonsDropdown$)?0:2)}}function Rn(e,l){if(1&e&&(t.j41(0,"li",28)(1,"a",37),t.EFF(2),t.nI1(3,"translate"),t.k0s()()),2&e){const n=l.$implicit,o=t.XpG(3);t.R7$(),t.Y8G("routerLink",t.lJ4(6,mt))("queryParams",t.l_i(7,Ot,n.id,n.mask))("appSaveQueryParams",o.saveLink),t.R7$(),t.SpI(" ",t.bMT(3,4,n.name)," ")}}function Dn(e,l){if(1&e&&(t.j41(0,"ul",35)(1,"li",28)(2,"a",36),t.EFF(3),t.nI1(4,"translate"),t.k0s()(),t.Z7z(5,Rn,4,10,"li",28,t.fX1),t.nI1(7,"async"),t.k0s()),2&e){const n=t.XpG(2);t.AVh("dropdown-menu-right",!n.isNewDesign()),t.R7$(2),t.Y8G("routerLink",t.lJ4(9,mt))("appSaveQueryParams",n.saveLink),t.R7$(),t.SpI(" ",t.bMT(4,5,"_i18n.AllContacts")," "),t.R7$(2),t.Dyx(t.bMT(7,7,n.localService.shelf$))}}function wn(e,l){1&e&&t.nrm(0,"app-message-centered",17)}function $n(e,l){if(1&e){const n=t.RV6();t.j41(0,"app-phonebook-list-item",43),t.bIt("contextmenu",function(i){const r=a.eBV(n).$implicit,f=t.XpG(3);return a.Njj(f.onContextMenu(i,r))})("showMoreActionsClicked",function(i){const r=a.eBV(n).$implicit,f=t.XpG(3);return a.Njj(f.onContextMenu(i,r))}
1)("click",function(){const i=a.eBV(n).$implicit,r=t.XpG(3);return a.Njj(r.onContactSingleClick(i))})("dblclick",function(){const i=a.eBV(n).$implicit,r=t.XpG(3);return a.Njj(r.onContactDoubleClick(i))}),t.k0s()}if(2&e){const n=l.$implicit,o=t.XpG(3);t.AVh("selected",o.isSelected(n)),t.Y8G("contact",n)}}function Vn(e,l){if(1&e){const n=t.RV6();t.j41(0,"app-phonebook-list-item",43),t.bIt("contextmenu",function(i){const r=a.eBV(n).$implicit,f=t.XpG(4);return a.Njj(f.onContextMenu(i,r))})("showMoreActionsClicked",function(i){const r=a.eBV(n).$implicit,f=t.XpG(4);return a.Njj(f.onContextMenu(i,r))})("click",function(){const i=a.eBV(n).$implicit,r=t.XpG(4);return a.Njj(r.onContactSingleClick(i))})("dblclick",function(){const i=a.eBV(n).$implicit,r=t.XpG(4);return a.Njj(r.onContactDoubleClick(i))}),t.k0s()}if(2&e){const n=l.$implicit,o=t.XpG(4);t.AVh("selected",o.isSelected(n)),t.Y8G("contact",n)}}function Sn(e,l){if(1&e&&(t.j41(0,"div",44),t.Z7z(1,Vn,1,3,"app-phonebook-list-item",40,t.fX1),t.k0s()),2&e){const n=l.contacts;t.R7$(),t.Dyx(n)}}function Gn(e,l){if(1&e){const n=t.RV6();t.j41(0,"div",38),t.bIt("infiniteScrollCallback",function(){a.eBV(n);const i=t.XpG(2);return a.Njj(i.localService.showMore())}),t.j41(1,"div",39),t.Z7z(2,$n,1,3,"app-phonebook-list-item",40,t.fX1),t.k0s(),t.j41(4,"app-crm-contacts",41),t.DNE(5,Sn,3,0,"ng-template",42),t.k0s()()}if(2&e){const n=t.XpG(2);t.Y8G("infiniteScrollContainer","#scrollBox")("infiniteScrollDistance",1)("infiniteScrollDisabled",n.localService.pagingDisabled),t.R7$(2),t.Dyx(n.contacts()),t.R7$(2),t.Y8G("crm",n.crmContacts())}}function jn(e,l){if(1&e){const n=t.RV6();t.j41(0,"app-phonebook-selected-contact",45),t.vzT("leave"),t.bIt("closed",function(){a.eBV(n);const i=t.XpG(2);return a.Njj(i.phonebookService.resetCurrentContact())}),t.k0s()}2&e&&t.Y8G("contact",l)}function Bn(e,l){if(1&e){const n=t.RV6();t.j41(0,"button",48),t.nI1(1,"translate"),t.bIt("click",function(){a.eBV(n);const i=t.XpG(3);return a.Njj(i.phonebookService.addNewContact())}),t.nrm(2,"lucide-icon",22),t.k0s()}if(2&e){const n=t.XpG(3);t.Y8G("title",t.mNQ(t.bMT(1,4,"_i18n.AddContact")))("routerLinkActiveOptions",t.lJ4(6,ft)),t.R7$(2),t.Y8G("img",n.plusIcon)}}function An(e,l){if(1&e&&(t.j41(0,"div",20),t.nrm(1,"app-message-centered",46),t.nVh(2,Bn,3,7,"button",47),t.nI1(3,"async"),t.k0s()),2&e){t.XpG();const n=t.r8f(20),o=t.XpG();t.R7$(),t.AVh("d-none",n),t.Y8G("icon",o.contactIcon),t.R7$(),t.vxM(t.bMT(3,4,o.localService.showAddButton$)?2:-1)}}function Xn(e,l){if(1&e&&(t.j41(0,"app-layout-type4")(1,"h3",7),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"search-bar",8)(5,"div",9),t.nVh(6,kn,3,7,"button",10),t.nI1(7,"async"),t.nVh(8,On,3,3),t.nI1(9,"async"),t.k0s(),t.j41(10,"div",11)(11,"button",12),t.nrm(12,"lucide-icon",13),t.j41(13,"span"),t.EFF(14),t.nI1(15,"async"),t.nI1(16,"nullToEmpty"),t.nI1(17,"translate"),t.nrm(18,"span",14),t.k0s()(),t.DNE(19,Dn,8,10,"ul",15),t.k0s()(),t.SS7(20),t.j41(21,"div",16,2),t.nVh(23,wn,1,0,"app-message-centered",17)(24,Gn,6,4,"div",18),t.k0s(),t.nVh(25,jn,1,1,"app-phonebook-selected-contact",19)(26,An,4,6,"div",20),t.k0s()),2&e){let n;const o=t.XpG();t.R7$(2),t.JRh(t.bMT(3,9,"_i18n.Contacts")),t.R7$(2),t.Y8G("formControl",o.searchControl)("clearable",!0),t.R7$(2),t.vxM(t.bMT(7,11,o.localService.showAddButton$)?6:-1),t.R7$(2),t.vxM(t.bMT(9,13,o.localService.showActionsButtons$)?8:-1),t.R7$(4),t.Y8G("img",o.filter),t.R7$(2),t.JRh(t.bMT(17,19,t.bMT(16,17,t.bMT(15,15,o.title$))));const i=o.contacts(),r=o.crmContacts();t.R7$(6);const f=t.bH3(i&&0===i.length&&r&&("ok"===(null==r?null:r.status)||"unavailable"===(null==r?null:r.status))&&0===r.contacts.length);t.R7$(3),t.vxM(f?23:24),t.R7$(2),t.vxM((n=o.phonebookService.currentContact())?25:26,n)}}function Nn(e,l){if(1&e){const n=t.RV6();t.j41(0,"button",58),t.nI1(1,"translate"),t.bIt("click",function(){a.eBV(n);const i=t.XpG(2);return a.Njj(i.phonebookService.addNewContact())}),t.k0s()}2&e&&t.Y8G("title",t.mNQ(t.bMT(1,3,"_i18n.AddContact")))("routerLinkActiveOptions",t.lJ4(5,ft))}function Fn(e,l){if(1&e){const n=t.RV6();t.j41(0,"ul",27)(1,"li",28)(2,"a",61),t.bIt("click",function(){a.eBV(n);const i=t.XpG(4);return a.Njj(i.uploadForImport(i.PhonebookType.Department))}),t.nrm(3,"span",62),t.j41(4,"span"),t.EFF(5),t.nI1(6,"async"),t.nI1(7,"translate"),t.k0s()()(),t.j41(8,"li",28)(9,"a",63),t.bIt("click",function(){a.eBV(n);const i=t.XpG(4);return a.Njj(i.uploadForImport(i.PhonebookType.Company))}),t.nrm(10,"span",62),t.j41(11,"span"),t.EFF(12),t.nI1(13,"translate"),t.k0s()()()()}if(2&e){let n;const o=t.XpG(4);t.R7$(5),t.JRh(t.i5U(7,4,"_i18n.ImportDepartmentContacts",t.eq3(9,ot,
1null==(n=t.bMT(6,2,o.myPrimaryDepartment$))?null:n.Name))),t.R7$(7),t.JRh(t.bMT(13,7,"_i18n.ImportCompanyContacts"))}}function Ln(e,l){if(1&e){const n=t.RV6();t.j41(0,"ul",27)(1,"li",28)(2,"a",64),t.bIt("click",function(){a.eBV(n);const i=t.XpG(4);return a.Njj(i.clearPhonebook(i.PhonebookType.Department))}),t.nrm(3,"span",65),t.j41(4,"span"),t.EFF(5),t.nI1(6,"async"),t.nI1(7,"translate"),t.k0s()()(),t.j41(8,"li",28)(9,"a",66),t.bIt("click",function(){a.eBV(n);const i=t.XpG(4);return a.Njj(i.clearPhonebook(i.PhonebookType.Company))}),t.nrm(10,"span",65),t.j41(11,"span"),t.EFF(12),t.nI1(13,"translate"),t.k0s()()()()}if(2&e){let n;const o=t.XpG(4);t.R7$(5),t.JRh(t.i5U(7,4,"_i18n.DeleteDepartmentContacts",t.eq3(9,ot,null==(n=t.bMT(6,2,o.myPrimaryDepartment$))?null:n.Name))),t.R7$(7),t.JRh(t.bMT(13,7,"_i18n.DeleteCompanyContacts"))}}function Wn(e,l){1&e&&(t.j41(0,"div",23),t.nrm(1,"button",59),t.nI1(2,"translate"),t.DNE(3,Fn,14,11,"ul",25),t.k0s(),t.j41(4,"div",23),t.nrm(5,"button",60),t.nI1(6,"translate"),t.DNE(7,Ln,14,11,"ul",25),t.k0s()),2&e&&(t.R7$(),t.Y8G("title",t.mNQ(t.bMT(2,4,"_i18n.Import"))),t.R7$(4),t.Y8G("title",t.mNQ(t.bMT(6,6,"_i18n.DeleteAllContacts"))))}function Un(e,l){if(1&e){const n=t.RV6();t.j41(0,"button",67),t.nI1(1,"translate"),t.bIt("click",function(){a.eBV(n);const i=t.XpG(3);return a.Njj(i.uploadForImport())}),t.k0s(),t.j41(2,"button",68),t.nI1(3,"translate"),t.bIt("click",function(){a.eBV(n);const i=t.XpG(3);return a.Njj(i.clearPhonebook())}),t.k0s()}2&e&&(t.Y8G("title",t.mNQ(t.bMT(1,4,"_i18n.Import"))),t.R7$(2),t.Y8G("title",t.mNQ(t.bMT(3,6,"_i18n.DeleteAllContacts"))))}function Yn(e,l){if(1&e&&(t.nVh(0,Wn,8,8),t.nI1(1,"async"),t.vZN(2,Un,4,8)),2&e){const n=t.XpG(2);t.vxM(t.bMT(1,1,n.localService.showActionsButtonsDropdown$)?0:2)}}function Qn(e,l){if(1&e&&(t.j41(0,"li",28)(1,"a",37),t.EFF(2),t.nI1(3,"translate"),t.k0s()()),2&e){const n=l.$implicit,o=t.XpG(3);t.R7$(),t.Y8G("routerLink",t.lJ4(6,mt))("queryParams",t.l_i(7,Ot,n.id,n.mask))("appSaveQueryParams",o.saveLink),t.R7$(),t.SpI(" ",t.bMT(3,4,n.name)," ")}}function zn(e,l){if(1&e&&(t.j41(0,"ul",69)(1,"li",28)(2,"a",36),t.EFF(3),t.nI1(4,"translate"),t.k0s()(),t.Z7z(5,Qn,4,10,"li",28,t.fX1),t.nI1(7,"async"),t.k0s()),2&e){const n=t.XpG(2);t.R7$(2),t.Y8G("routerLink",t.lJ4(7,mt))("appSaveQueryParams",n.saveLink),t.R7$(),t.SpI(" ",t.bMT(4,3,"_i18n.AllContacts")," "),t.R7$(2),t.Dyx(t.bMT(7,5,n.localService.shelf$))}}function Hn(e,l){if(1&e){const n=t.RV6();t.j41(0,"phonebook-tile",70),t.bIt("contextmenu",function(i){const r=a.eBV(n).$implicit,f=t.XpG(2);return a.Njj(f.onContextMenu(i,r))})("showMoreActionsClicked",function(i){const r=a.eBV(n).$implicit,f=t.XpG(2);return a.Njj(f.onContextMenu(i,r))}
1)("click",function(){const i=a.eBV(n).$implicit,r=t.XpG(2);return a.Njj(r.phonebookService.viewContact(i))}),t.k0s()}if(2&e){const n=l.$implicit,o=t.XpG(2);t.AVh("selected-tile",o.isSelected(n)),t.Y8G("showMoreIsVisible",o.hasMoreActions(n))("contact",n)}}function Kn(e,l){if(1&e){const n=t.RV6();t.j41(0,"a",71),t.bIt("click",function(){a.eBV(n);const i=t.XpG(2);return a.Njj(i.localService.showMore())}),t.EFF(1,"Show more"),t.k0s()}2&e&&t.Y8G("translate","_i18n.ShowMore")}function Jn(e,l){if(1&e){const n=t.RV6();t.j41(0,"phonebook-tile",70),t.bIt("contextmenu",function(i){const r=a.eBV(n).$implicit,f=t.XpG(3);return a.Njj(f.onContextMenu(i,r))})("showMoreActionsClicked",function(i){const r=a.eBV(n).$implicit,f=t.XpG(3);return a.Njj(f.onContextMenu(i,r))})("click",function(){const i=a.eBV(n).$implicit,r=t.XpG(3);return a.Njj(r.phonebookService.openCrmContactUrl(i))}),t.k0s()}if(2&e){const n=l.$implicit,o=t.XpG(3);t.AVh("selected-tile",o.isSelected(n)),t.Y8G("showMoreIsVisible",o.hasMoreActions(n))("contact",n)}}function Zn(e,l){if(1&e&&(t.j41(0,"ul",55),t.Z7z(1,Jn,1,4,"phonebook-tile",56,t.fX1),t.k0s()),2&e){const n=l.contacts;t.R7$(),t.Dyx(n)}}function qn(e,l){if(1&e&&(t.j41(0,"div",4)(1,"search-bar",49)(2,"div",50),t.nVh(3,Nn,2,6,"button",51),t.nI1(4,"async"),t.nVh(5,Yn,3,3),t.nI1(6,"async"),t.k0s(),t.j41(7,"div",11)(8,"button",52)(9,"span"),t.EFF(10),t.nI1(11,"async"),t.nI1(12,"nullToEmpty"),t.nI1(13,"translate"),t.nrm(14,"span",14),t.k0s()(),t.DNE(15,zn,8,8,"ul",53),t.k0s()(),t.j41(16,"div",54)(17,"ul",55),t.Z7z(18,Hn,1,4,"phonebook-tile",56,t.fX1),t.nVh(20,Kn,2,1,"a",57),t.nI1(21,"async"),t.k0s(),t.j41(22,"app-crm-contacts",41),t.DNE(23,Zn,3,0,"ng-template",42),t.k0s()()()),2&e){const n=t.XpG();t.R7$(),t.Y8G("formControl",n.searchControl),t.R7$(2),t.vxM(t.bMT(4,6,n.localService.showAddButton$)?3:-1),t.R7$(2),t.vxM(t.bMT(6,8,n.localService.showActionsButtons$)?5:-1),t.R7$(5),t.JRh(t.bMT(13,14,t.bMT(12,12,t.bMT(11,10,n.title$)))),t.R7$(8),t.Dyx(n.contacts()),t.R7$(2),t.vxM(t.bMT(21,16,n.showMoreButtons$)?20:-1),t.R7$(2),t.Y8G("crm",n.crmContacts())}}function te(e,l){if(1&e&&(t.nrm(0,"lucide-icon",22),t.j41(1,"span"),t.EFF(2),t.nI1(3,"translate"),t.k0s()),2&e){const n=t.XpG(2);t.Y8G("img",n.phoneCallIcon),t.R7$(2),t.JRh(t.bMT(3,2,"_i18n.Call"))}}function ne(e,l){if(1&e){const n=t.RV6();t.DNE(0,te,4,4,"ng-template",72),t.bIt("execute",function(i){a.eBV(n);const r=t.XpG();return a.Njj(r.phonebookService.makeCall(i.item.contact))})}}function ee(e,l){if(1&e&&t.nrm(0,"lucide-icon",22),2&e){const n=t.XpG(2);t.Y8G("img",n.videoIcon)}}function oe(e,l){if(1&e&&(t.nVh(0,ee,1,1,"lucide-icon",22),t.j41(1,"span"),t.EFF(2),t.nI1(3,"translate"),t.k0s()),2&e){const n=t.XpG();t.vxM(n.isNewDesign()?0:-1),t.R7$(2),t.JRh(t.bMT(3,2,"_i18n.Webmeeting"))}}function ie(e,l){if(1&e&&t.nrm(0,"lucide-icon",22),2&e){const n=t.XpG(2);t.Y8G("img",n.messageSquareIcon)}}function ae(e,l){if(1&e&&(t.nVh(0,ie,1,1,"lucide-icon",22),t.j41(1,"span"),t.EFF(2),t.nI1(3,"translate"),t.k0s()),2&e){const n=l.$implicit,o=t.XpG();t.vxM(o.isNewDesign()?0:-1),t.R7$(2),t.JRh(t.i5U(3,2,"_i18n.SendSmsTo",t.eq3(5,ot,n.contact.bestSmsMobile)))}}function se(e,l){if(1&e&&t.nrm(0,"lucide-icon",22),2&e){const n=t.XpG(2);t.Y8G("img",n.phoneIcon)}}function ce(e,l){if(1&e&&(t.nVh(0,se,1,1,"lucide-icon",22),t.j41(1,"span"),t.EFF(2),t.nI1(3,"translate"),t.k0s()),2&e){const n=t.XpG();t.vxM(n.isNewDesign()?0:-1),t.R7$(2),t.JRh(t.bMT(3,2,"_i18n.DialerEditAndCall"))}}function le(e,l){if(1&e&&t.nrm(0,"lucide-icon",22),2&e){const n=t.XpG(2);t.Y8G("img",n.penIcon)}}function re(e,l){if(1&e&&(t.nVh(0,le,1,1,"lucide-icon",22),t.j41(1,"span"),t.EFF(2),t.nI1(3,"translate"),t.k0s()),2&e){const n=t.XpG();t.vxM(n.isNewDesign()?0:-1),t.R7$(2),t.JRh(t.bMT(3,2,"_i18n.Edit"))}}function pe(e,l){if(1&e&&t.nrm(0,"lucide-icon",22),2&e){const n=t.XpG(2);t.Y8G("img",n.trashIcon)}}function _e(e,l){if(1&e&&(t.nVh(0,pe,1,1,"lucide-icon",22),t.j41(1,"span"),t.EFF(2),t.nI1(3,"translate"),t.k0s()),2&e){const n=t.XpG();t.vxM(n.isNewDesign()?0:-1),t.R7$(2),t.JRh(t.bMT(3,2,"_i18n.Delete"))}}function de(e,l){if(1&e&&t.nrm(0,"lucide-icon",22),2&e){const n=t.XpG(2);t.Y8G("img",n.contactIcon)}}function me(e,l){if(1&e&&(t.nVh(0,de,1,1,"lucide-icon",22),t.j41(1,"span"),t.EFF(2),t.nI1(3,"translate"),t.k0s()),2&e){const n=t.XpG();t.vxM(n.isNewDesign()?0:-1),t.R7$(2),t.JRh(t.bMT(3,2,"_i18n.CrmContactPage"))}}function he(e,l){if(1&e&&t.nrm(0,"lucide-icon",22),2&e){const n=t.XpG(2);t.Y8G("img",n.userSearchIcon)}}function Ce(e,l){if(1&e&&(t.nVh(0,he,1,1,"lucide-icon",22),t.j41(1,"span"),t.EFF(2),t.nI1(3,"translate"),t.k0s()),2&e){const n=t.XpG();t.vxM(n.isNewDesign()?0:-1),t.R7$(2),t.JRh(t.bMT(3,2,"_i18n.CRMLookUpOption"))}}let ue=(()=>{class e{phonebookService=(0,a.WQX)(G.P);localService=(0,a.WQX)(_t.Ou);phonebookApiService=(0,a.WQX)(Ft);contextMenuService=(0,a.WQX)(Gt.K);route=(0,a.WQX)(m.nX);router=(0,a.WQX)(m.Ix);modalService=(0,a.WQX)(I.B);smsChatService=(0,a.WQX)(ut.V);myPhone=(0,a.WQX)(g.gx);integrationService=(0,a.WQX)(bt.a);destroy$=(0,a.WQX)(a.abz);scrollBox;isNewDesign=(0,a.WQX)(c.T);filter=_.rhG;plusIcon=_.FWt;uploadIcon=_._OO;trashIcon=_.TBR;contactIcon=_.Bve;phoneIcon=_.bcf;videoIcon=_.CeX;messageSquareIcon=_.vEG;penIcon=_.w$p;userSearchIcon=_.geC;phoneCallIcon=_.d3s;saveLink=Lt.Hh.SaveContactsQueryParams;PhonebookType=J;contextMenuForContact=(0,a.vPA)(void 0);contacts;
1crmContacts;showMoreButtons$;selectedBook$;title$;isCompanyPhonebook$;phonebookTypeToImport$=new Bt.t(void 0);myPrimaryDepartment$;searchControl=new lt.MJ("",{nonNullable:!0});fileUpload;basicMenu;constructor(){const n=(0,a.WQX)(Wt.D),o=this.route.queryParams.pipe((0,h.T)(M=>({mask:M.mask,groupId:M.groupId})),(0,St.F)(),(0,Mt.t)({refCount:!0,bufferSize:1}));this.selectedBook$=(0,O.z)([o,this.localService.shelf$]).pipe((0,h.T)(([M,W])=>W.find(H=>H.mask===M.mask&&H.id===M.groupId)||{name:"_i18n.AllContacts"})),this.title$=this.selectedBook$.pipe((0,h.T)(M=>M.name)),this.isCompanyPhonebook$=this.selectedBook$.pipe((0,h.T)(M=>M.id===u.eE.CompanyPhonebook.toString()));const i=this.myPhone.myPhoneSession.pipe((0,b.n)(M=>M.systemParameters$),(0,h.T)(M=>M.HideCrmContacts)),r=(0,O.z)([this.selectedBook$,i]).pipe((0,h.T)(([M,W])=>(0,_t._H)(M,W))),f=this.searchControl.valueChanges.pipe((0,P.Z)(""));this.myPrimaryDepartment$=this.myPhone.myPhoneSession.pipe((0,b.n)(M=>M.myPrimaryDepartmentId$));const T=(0,O.z)([this.isCompanyPhonebook$,this.myPrimaryDepartment$]).pipe((0,h.T)(([M,W])=>M),(0,v.p)(M=>M),(0,P.Z)(!0)),j=(0,O.z)([f,T]).pipe((0,b.n)(([M,W])=>M?i.pipe((0,b.n)(B=>this.localService.getSinglePageContacts(M,Ut.o.allPhonebook(B),(0,kt.Jd)(this.myPhone.myPhoneSession),"/contacts"))):this.localService.getContactBulk(M,r,(0,kt.Jd)(this.myPhone.myPhoneSession),"/contacts")),(0,Mt.t)({refCount:!0,bufferSize:1}));this.showMoreButtons$=j.pipe((0,h.T)(M=>M.TotalCount>M.Entries.length)),this.contacts=(0,z.ot)(j.pipe((0,h.T)(M=>x.KA.responseContacts(M))),{initialValue:null}),this.crmContacts=(0,z.ot)(f.pipe((0,b.n)(M=>n.requestCrmContact(new S.Nhk({InputString:M,MaxContactCount:_t.fy})))),{initialValue:null}),(0,O.z)([f,T,r]).pipe((0,z.pQ)(this.destroy$)).subscribe(()=>{this.scrollBox&&(this.scrollBox.nativeElement.scrollTop=0)})}uploadForImport(n){this.phonebookTypeToImport$.next(n??J.None),this.fileUpload.nativeElement.value="",this.fileUpload.nativeElement.click()}clearPhonebook(n){n?this.modalService.confirmDangerAction("_i18n.DeleteAllContactsInfo","_i18n.DeleteAllContacts").subscribe(()=>{this.doClearPhonebook(n)}):(0,O.z)([this.modalService.confirmDangerAction("_i18n.DeleteAllContactsInfo","_i18n.DeleteAllContacts"),this.selectedBook$,this.phonebookService.canModifyCompanyPhonebook$]).pipe((0,R.s)(1)).subscribe(([o,i,r])=>{const f=i.id===u.eE.CompanyPhonebook.toString()?r?J.Company:J.Department:J.Personal;this.doClearPhonebook(f)})}doClearPhonebook(n){this.phonebookApiService.phonebookClear(n).subscribe({error:o=>this.modalService.error(o)})}hasMoreActions(n){return this.localService.hasMoreActions(n)}isSelected(n){return n===this.phonebookService.currentContact()||n===this.contextMenuForContact()}onContextMenu(n,o){this.contextMenuForContact.set(o),n.preventDefault(),n.stopPropagation(),this.localService.canEditContact$(o).pipe((0,R.s)(1)).subscribe(i=>{this.contextMenuService.show.next({contextMenu:this.basicMenu,event:n,item:{contact:o,canEdit:i}})})}selectContact(n){this.isSelected(n)||this.phonebookService.currentContact.set(n)}onContactSingleClick(n){this.selectContact(n)}onContactDoubleClick(n){this.selectContact(n),this.phonebookService.makeCall(n)}onFileSelected(n){const o=n?.[0];o&&(0,O.z)([this.selectedBook$,this.phonebookTypeToImport$,this.phonebookService.canModifyCompanyPhonebook$]).pipe((0,R.s)(1),(0,b.n)(([i,r,f])=>{const T=r||(i.id===u.eE.CompanyPhonebook.toString()?f?J.Company:J.Department:J.Personal);return this.phonebookApiService.phonebookImport(o,T)}),(0,an.U)(this.modalService)).subscribe()}ngAfterViewInit(){this.basicMenu.close.subscribe(()=>{this.contextMenuForContact.set(void 0)})}ngOnInit(){this.phonebookService.resetCurrentContact()}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=t.VBU({type:e,selectors:[["ng-component"]],viewQuery:function(o,i){if(1&o&&t.GBs(Pn,5)(Mn,5)(xn,5),2&o){let r;t.mGM(r=t.lsd())&&(i.scrollBox=r.first),t.mGM(r=t.lsd())&&(i.fileUpload=r.first),t.mGM(r=t.lsd())&&(i.basicMenu=r.first)}},features:[t.Jv_([_t.Ou])],decls:16,vars:13,consts:[["file",""],["basicMenu",""],["scrollBox",""],["type","file","hidden","","accept",".csv",3,"change"],[1,"d-flex","flex-column","w-100","h-100","overflow-hidden","position-relative"],["contextMenuItem",""],["contextMenuItem","",3,"execute","visible"],["layout-header","","data-qa","title-header"],["layout-header","",3,"formControl","clearable"],["search-prepend","",1,"d-flex","gap-2"],["type","button","id","btnAddNewUI","routerLinkActive","focus",1,"btn","btn-border","btn-icon",3,"routerLinkActiveOptions","title"],["search-append","","dropdown","","placement","bottom right"],["id","button-alignment","dropdownToggle","","type","button","aria-controls","dropdown-alignment",1,"btn","btn-border","dropdown-toggle"],[1,"me-1",3,"img"],[1,"caret"],["id","dropdown-alignment","class","dropdown-menu","role","menu","aria-labelledby","button-alignment",3,"dropdown-menu-right",4,"dropdownMenu"],["layout-nav","","id","scrollBox",1,"h-100","scrollable","scrollable-padding-2"],["description","_i18n.NoContactsFound"],["infiniteScroll","",1,"d-flex","flex-column","gap-1",3,"infiniteScrollContainer","infiniteScrollDistance","infiniteScrollDisabled"],[1,"slide-from-right",3,"contact"],[1,"content-wrapper"],["type","button","id","btnAddNewUI","routerLinkActive","focus",1,"btn","btn-border","btn-icon",3,"click","routerLinkActiveOptions","title"],[3,"img"],["dropdown",""],["id","btnImportContactsOptionsNewUI","type","button","dropdownToggle","",1,"btn","btn-border","btn-icon",3,"title"],["class","dropdown-menu","role","menu","data-qa","dropdown",4,"dropdownMenu"],["id","btnClearAllOptionsNewUI","type","button","dropdownToggle","",1,"btn","btn-border","btn-icon",3,"title"],["role","menu","data-qa","dropdown",1,"dropdown-menu"],["role","menuitem"],["data-id","btnImportDepartmentContact",1,"dropdown-item","d-flex","gap-2","align-items-center",3,"click"],["data-id","btnImportCompanyContact",1,"dropdown-item","d-flex","gap-2","align-items-center",3,"click"],["data-id","btnClearDepartmentPhoneBook",1,"dropdown-item","d-flex","gap-2","align-items-center",3,"click"],["data-id","btnClearCompanyPhoneBook",1,"dropdown-item","d-flex","gap-2","align-items-center",3,"click"],["data-qa","btnImportContactsNewUI","type","button",1,"btn","btn-border","btn-icon",3,"click","title"],["data-qa","btnClearPhoneBookNewUI","type","button",1,"btn","btn-border","btn-icon",3,"click","title"],["id","dropdown-alignment","role","menu","aria-labelledby","button-alignment",1,"dropdown-menu"],[1,"dropdown-item",3,"routerLink","appSaveQueryParams"],[1,"dropdown-item",3,"routerLink","queryParams","appSaveQueryParams"],["infiniteScroll","",1,"d-flex","flex-column","gap-1",3,"infiniteScrollCallback","infiniteScrollContainer","infiniteScrollDistance","infiniteScrollDisabled"],["data-qa","contact-list",1,"d-flex","flex-column","gap-1"],[1,"clickable","border-radius",3,"selected","contact"],[3,"crm"],["appCrmContactsRef",""],[1,"clickable","border-radius",3,"contextmenu","showMoreActionsClicked","click","dblclick","contact"],["data-qa","contacts-list",1,"d-flex","flex-column","gap-1"],[1,"slide-from-right",3,"closed","contact"],["header","_i18n.DialerSelectContact","description","_i18n.SelectContactToView",1,"d-md-down-none",3,"icon"],["type","button","id","btnAddNewUI","routerLinkActive","focus",1,"btn","btn-icon","btn-primary","plus-button",3,"routerLinkActiveOptions","title"],["type","button","id","btnAddNewUI","routerLinkActive","focus",1,"btn","btn-icon","btn-primary","plus-button",3,"click","routerLinkActiveOptions","title"],[3,"formControl"],["search-prepend","",1,"d-flex"],["type","button","id","btnAdd","routerLinkActive","focus","app-plus-solid-icon","",1,"btn","btn-plain",3,"routerLinkActiveOptions","title"],["id","button-alignment","dropdownToggle","","type","button","aria-controls","dropdown-alignment",1,"btn","btn-plain","dropdown-toggle"],["id","dropdown-alignment","class","dropdown-menu dropdown-menu-right ","role","menu","aria-labelledby","button-alignment",4,"dropdownMenu"],[1,"scrollable","flex-1"],[1,"presenceContent"],[1,"grid-group-item","mhover",3,"selected-tile","showMoreIsVisible","contact"],[1,"show-more-tile","grid-group-item","mhover",3,"translate"],["type","button","id","btnAdd","routerLinkActive","focus","app-plus-solid-icon","",1,"btn","btn-plain",3,"click","routerLinkActiveOptions","title"],["data-qa","btnImportContactsOptions","type","button","dropdownToggle","","app-arrow-from-bottom-solid-icon","",1,"btn","btn-plain",3,"title"],["data-qa","btnClearAllOptions","type","button","dropdownToggle","","app-trash-alt-solid-icon","",1,"btn","btn-plain",3,"title"],["data-qa","btnImportDepartmentContact",1,"dropdown-item","d-flex","gap-1","align-items-center",3,"click"],["app-arrow-from-bottom-solid-icon","",1,"svg-xs","customSVGIcons"],["data-qa","btnImportCompanyContact",1,"dropdown-item","d-flex","gap-1","align-items-center",3,"click"],["data-qa","btnClearDepartmentPhoneBook",1,"dropdown-item","d-flex","gap-1","align-items-center",3,"click"],["app-trash-alt-solid-icon","",1,"svg-xs","customSVGIcons"],["data-qa","btnClearCompanyPhoneBook",1,"dropdown-item","d-flex","gap-1","align-items-center",3,"click"],["data-qa","btnImportContacts","type","button","app-arrow-from-bottom-solid-icon","",1,"btn","btn-plain",3,"click","title"],["data-qa","btnClearPhoneBook","type","button","app-trash-alt-solid-icon","",1,"btn","btn-plain",3,"click","title"],["id","dropdown-alignment","role","menu","aria-labelledby","button-alignment",1,"dropdown-menu","dropdown-menu-right"],[1,"grid-group-item","mhover",3,"contextmenu","showMoreActionsClicked","click","
1showMoreIsVisible","contact"],[1,"show-more-tile","grid-group-item","mhover",3,"click","translate"],["contextMenuItem","",3,"execute"]],template:function(o,i){if(1&o){const r=t.RV6();t.j41(0,"input",3,0),t.bIt("change",function(){a.eBV(r);const T=t.sdS(1);return a.Njj(i.onFileSelected(T.files))}),t.k0s(),t.nVh(2,Xn,27,22,"app-layout-type4")(3,qn,24,18,"div",4),t.j41(4,"context-menu",null,1),t.nVh(6,ne,1,0,null,5),t.DNE(7,oe,4,4,"ng-template",6),t.bIt("execute",function(T){return i.phonebookService.meetingWithContact(T.item.contact)}),t.DNE(8,ae,4,7,"ng-template",6),t.nI1(9,"async"),t.bIt("execute",function(T){return i.smsChatService.navigateToProviderWizard(T.item.contact.bestSmsMobile)}),t.DNE(10,ce,4,4,"ng-template",6),t.bIt("execute",function(T){return i.phonebookService.editBeforeCall(T.item.contact)}),t.DNE(11,re,4,4,"ng-template",6),t.bIt("execute",function(T){return i.phonebookService.editContact(T.item.contact)}),t.DNE(12,_e,4,4,"ng-template",6),t.bIt("execute",function(T){return i.phonebookService.deleteContact(T.item.contact,i.router.url)}),t.DNE(13,me,4,4,"ng-template",6),t.bIt("execute",function(T){return i.phonebookService.openCrmContactUrl(T.item.contact)}),t.DNE(14,Ce,4,4,"ng-template",6),t.nI1(15,"async"),t.bIt("execute",function(T){return i.integrationService.openClientCrmUrl(null==T.item.contact?null:T.item.contact.bestPhone,null==T.item.contact?null:T.item.contact.emailAddress)}),t.k0s()}2&o&&(t.R7$(2),t.vxM(i.isNewDesign()?2:3),t.R7$(4),t.vxM(i.isNewDesign()?6:-1),t.R7$(),t.Y8G("visible",i.localService.canWebmeet),t.R7$(),t.Y8G("visible",t.bMT(9,9,i.smsChatService.isSmsAvailable$)&&i.localService.hasBestSmsMobile.bind(i)),t.R7$(2),t.Y8G("visible",i.localService.isEditBeforeCallEnabled),t.R7$(),t.Y8G("visible",i.localService.canEdit),t.R7$(),t.Y8G("visible",i.localService.canEdit),t.R7$(),t.Y8G("visible",i.localService.hasCrmUrl),t.R7$(),t.Y8G("visible",t.bMT(15,11,i.integrationService.hasClientCrmIntegration$)&&i.localService.canOpenClientCrmUrl.bind(i)))},dependencies:[Qt.L,lt.X1,lt.BC,lt.l_,xt.wQ,zt.K,Ht.I,Kt.d,gt.Kk,gt.UL,gt.hs,xt.Wk,Zt,qt.d,L.Mm,tn.n,nn.E,jt.E,en.J,Yt.i,pn,_n.D,yt,_.flO,_.WGl,vn.z,fn.l,L.D9,dt.Jj,on.W],styles:["@media(max-width:1399.98px){.d-xxl-down-none[_ngcontent-%COMP%], .xxl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:1199.98px){.d-xl-down-none[_ngcontent-%COMP%], .xl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:991.98px){.d-lg-down-none[_ngcontent-%COMP%], .lg-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:767.98px){.d-md-down-none[_ngcontent-%COMP%], .md-visible[_ngcontent-%COMP%]{display:none!important}}@media(max-width:575.98px){.d-sm-down-none[_ngcontent-%COMP%], .sm-visible[_ngcontent-%COMP%]{display:none!important}}[_nghost-%COMP%]{position:relative;overflow:hidden}.crm-tile[_ngcontent-%COMP%]{height:50px}.presenceContent[_ngcontent-%COMP%]{padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}.new-design [_nghost-%COMP%] .show-more-tile[_ngcontent-%COMP%]{height:100%;display:flex;text-decoration:underline;justify-content:center;align-items:center;padding:var(--spacer)}.new-design [_nghost-%COMP%] .plus-button[_ngcontent-%COMP%]{position:fixed;right:var(--spacer-l);bottom:var(--spacer-l);--btn-icon-size: 56px;--svg-size: var(--svg-size-lg);box-shadow:0 4px 10px #0000002e}@media(max-width:575.98px){.new-design [_nghost-%COMP%] .plus-button[_ngcontent-%COMP%]{--btn-icon-size: 36px;--svg-size: var(--svg-size-md)}}.content-wrapper[_ngcontent-%COMP%]{height:100%;pointer-events:none}.content-wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{pointer-events:auto}"],changeDetection:0})}return e})();var be=s(13961),ge=s(983),ve=s(81535),fe=s(94263);let Pe=(()=>{class e{static \u0275fac=function(o){return new(o||e)};static \u0275cmp=t.VBU({type:e,selectors:[["app-phone-rotary-light-icon"],["","app-phone-rotary-light-icon",""]],decls:2,vars:0,consts:[["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 512 512"],["d","M32 142.4V192h72.9L86.6 224H32c-17.7 0-32-14.3-32-32V141.3c0-8.5 3.4-16.6 9.9-22.1C38.2 95.4 125.9 32 256 32s217.8 63.4 246.1 87.2c6.5 5.5 9.9 13.6 9.9 22.1V192c0 17.7-14.3 32-32 32H425.4l-18.3-32H480V142.4C453 120.1 373.2 64 256 64S59 120.1 32 142.4zm0-1.1s0 0 0 0v0zM32 401c0-11.1 2.9-22.1 8.4-31.8l101.1-177c10.5-18.4 29.5-30.4 50.4-32V128c0-8.8 7.2-16 16-16s16 7.2 16 16v32h64V128c0-8.8 7.2-16 16-16s16 7.2 16 16v32.2c21 1.7 39.9 13.6 50.4 32l101.1 177c5.5 9.7 8.4 20.6 8.4 31.8v31c0 26.5-21.5 48-48 48H80c-26.5 0-48-21.5-48-48V401zM304 192H208 197.1c-11.5 0-22.1 6.2-27.8 16.1L68.2 385.1C65.5 390 64 395.4 64 401v31c0 8.8 7.2 16 16 16H432c8.8 0 16-7.2 16-16V401c0-5.6-1.5-11-4.2-15.9l-101.1-177c-5.7-10-16.3-16.1-27.8-16.1H304zM208 320a48 48 0 1 0 96 0 48 48 0 1 0 -96 0zm48 80a80 80 0 1 1 0-160 80 80 0 1 1 0 160z"]],template:function(o,i){1&o&&(a.qSk(),t.rj2(0,"svg",0),t.Hgh(1,"path",1),t.eux())},encapsulation:2})}return e})(),Me=(()=>{class e{static \u0275fac=function(o){return new(o||e)};static \u0275cmp=t.VBU({type:e,selectors:[["app-fax-light-icon"],["","app-fax-light-icon",""]],decls:2,vars:0,consts:[["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 512 512"],["d","M160 64c0-17.7 14.3-32 32-32H388.1c8.5 0 16.6 3.4 22.6 9.4l27.9 27.9
1c6 6 9.4 14.1 9.4 22.6V160h32V91.9c0-17-6.7-33.3-18.7-45.3L433.4 18.7C421.4 6.7 405.1 0 388.1 0H192c-35.3 0-64 28.7-64 64v72.6c-9.4-5.4-20.3-8.6-32-8.6H64c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H96c19.1 0 36.3-8.4 48-21.7c11.7 13.3 28.9 21.7 48 21.7H448c35.3 0 64-28.7 64-64V256c0-35.3-28.7-64-64-64H160V64zm0 160H448c17.7 0 32 14.3 32 32V448c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V224zm-32-32v16V448c0 17.7-14.3 32-32 32H64c-17.7 0-32-14.3-32-32V192c0-17.7 14.3-32 32-32H96c17.7 0 32 14.3 32 32zM296 304a24 24 0 1 0 -48 0 24 24 0 1 0 48 0zm72 24a24 24 0 1 0 0-48 24 24 0 1 0 0 48zm24 72a24 24 0 1 0 -48 0 24 24 0 1 0 48 0zM272 424a24 24 0 1 0 0-48 24 24 0 1 0 0 48z"]],template:function(o,i){1&o&&(a.qSk(),t.rj2(0,"svg",0),t.Hgh(1,"path",1),t.eux())},encapsulation:2})}return e})();var xe=s(19341),ke=s(9852),Te=s(3032);const Ie=e=>({p1:e}),it=e=>({phone:e});function Ee(e,l){if(1&e){const n=t.RV6();t.j41(0,"a",2),t.nI1(1,"translate"),t.bIt("click",function(){a.eBV(n);const i=t.XpG().phone,r=t.XpG();return a.Njj(r.smsChatService.navigateToProviderWizard(i))}),t.nrm(2,"app-comment-lines-light-icon",3),t.k0s()}if(2&e){const n=t.XpG().phone,o=t.XpG();t.HbH(t.VkB("sms-anchor mhover ",o.isNewDesign()?"btn btn-border btn-icon m-2":"")),t.Y8G("title",t.i5U(1,4,"_i18n.SendSmsTo",t.eq3(7,Ie,n)))}}function ye(e,l){if(1&e&&(t.nVh(0,Ee,3,9,"a",1),t.nI1(1,"async")),2&e){const n=t.XpG();t.vxM(t.bMT(1,1,n.smsChatService.isSmsAvailable$)?0:-1)}}function Oe(e,l){if(1&e){const n=t.RV6();t.j41(0,"app-phonebook-selected-contact",6),t.bIt("closed",function(){a.eBV(n);const i=t.XpG(2);return a.Njj(i.navigateBack())}),t.k0s()}if(2&e){const n=t.XpG(),o=t.XpG();t.Y8G("contact",n)("pageView",o.isInfoPanelVisible)}}function Re(e,l){if(1&e&&(t.j41(0,"a",25),t.nI1(1,"translate"),t.nrm(2,"lucide-icon",26),t.k0s()),2&e){const n=t.XpG(2),o=t.XpG();t.HbH(t.VkB("btn ",o.isNewDesign()?"btn-border btn-icon":"btn-plain")),t.Y8G("href",t.mNQ(n.crmUrl),t.B4B)("title",t.mNQ(t.bMT(1,10,"_i18n.CrmContactPage"))),t.R7$(2),t.AVh("svg-md",o.isNewDesign()),t.Y8G("img",o.IdCard)}}function De(e,l){if(1&e&&(t.j41(0,"a",25),t.nI1(1,"async"),t.nI1(2,"translate"),t.nrm(3,"lucide-icon",26),t.k0s()),2&e){const n=t.XpG(3);t.HbH(t.VkB("btn ",n.isNewDesign()?"btn-border btn-icon":"btn-plain")),t.Y8G("href",t.mNQ(t.bMT(1,8,n.clientCrmUrl$)),t.B4B)("title",t.mNQ(t.bMT(2,10,"_i18n.CRMLookUpOption"))),t.R7$(3),t.Y8G("img",n.UserSearch)}}function we(e,l){if(1&e){const n=t.RV6();t.j41(0,"button",27),t.nI1(1,"translate"),t.bIt("click",function(){a.eBV(n);const i=t.XpG(3);return a.Njj(i.toggleInfoPanel())}),t.nrm(2,"lucide-icon",26),t.k0s()}if(2&e){const n=t.XpG(3);t.HbH(t.VkB("btn ms-2 ",n.isNewDesign()?"btn-border btn-icon svg-md":"btn-plain")),t.Y8G("title",t.mNQ(t.bMT(1,6,"_i18n.Information"))),t.R7$(2),t.Y8G("img",n.Info)}}function $e(e,l){if(1&e&&(t.j41(0,"div",17),t.nrm(1,"lucide-icon",26)(2,"span",28),t.j41(3,"span",29),t.EFF(4),t.k0s()()),2&e){const n=t.XpG(2),o=t.XpG();t.R7$(),t.Y8G("img",o.Building),t.R7$(),t.Y8G("translate","_i18n.Company"),t.R7$(2),t.JRh(n.company)}}function Ve(e,l){if(1&e&&(t.j41(0,"div",18),t.nrm(1,"lucide-icon",26)(2,"span",28),t.j41(3,"span",30),t.EFF(4),t.k0s()()),2&e){const n=t.XpG(2),o=t.XpG();t.R7$(),t.Y8G("img",o.IdCard),t.R7$(),t.Y8G("translate","_i18n.TitleLabel"),t.R7$(2),t.JRh(n.title)}}function Se(e,l){if(1&e&&(t.j41(0,"div",19),t.nrm(1,"lucide-icon",26)(2,"span",28),t.j41(3,"span",31),t.EFF(4),t.k0s()()),2&e){const n=t.XpG(2),o=t.XpG();t.R7$(),t.Y8G("img",o.Users),t.R7$(),t.Y8G("translate","_i18n.Department"),t.R7$(2),t.JRh(n.department)}}function Ge(e,l){1&e&&t.eu8(0)}function je(e,l){if(1&e){const n=t.RV6();t.j41(0,"div",20)(1,"a",32),t.bIt("click",function(){a.eBV(n);const i=t.XpG(2),r=t.XpG();return a.Njj(r.phone.call(i.phones.mobile))}),t.nrm(2,"lucide-icon",26)(3,"span",28),t.j41(4,"span",33),t.EFF(5),t.k0s()(),t.DNE(6,Ge,1,0,"ng-container",34),t.k0s()}if(2&e){const n=t.XpG(2),o=t.XpG(),i=t.sdS(1);t.R7$(2),t.Y8G("img",o.Smartphone),t.R7$(),t.Y8G("translate","_i18n.MobileNumber"),t.R7$(2),t.JRh(n.phones.mobile),t.R7$(),t.Y8G("ngTemplateOutlet",i)("ngTemplateOutletContext",t.eq3(5,it,n.phones.mobile))}}function Be(e,l){1&e&&t.eu8(0)}function Ae(e,l){if(1&e){const n=t.RV6();t.j41(0,"div",20)(1,"a",35),t.bIt("click",function(){a.eBV(n);const i=t.XpG(2),r=t.XpG();return a.Njj(r.phone.call(i.phones.mobile2))}),t.nrm(2,"lucide-icon",26)(3,"span",28),t.j41(4,"span",36),t.EFF(5),t.k0s()(),t.DNE(6,Be,1,0,"ng-container",34),t.k0s()}if(2&e){const n=t.XpG(2),o=t.XpG(),i=t.sdS(1);t.R7$(2),t.Y8G("img",o.Smartphone),t.R7$(),t.Y8G("translate","_i18n.ContactData0"),t.R7$(2),t.JRh(n.phones.mobile2),t.R7$(),t.Y8G("ngTemplateOutlet",i)("ngTemplateOutletContext",t.eq3(5,it,n.phones.mobile2))}}function Xe(e,l){1&e&&t.eu8(0)}function Ne(e,l){if(1&e){const n=t.RV6();t.j41(0,"div",20)(1,"a",37),t.bIt("click",function(){a.eBV(n);const i=t.XpG(2),r=t.XpG();return a.Njj(r.phone.call(i.phones.home))}),t.nrm(2,"lucide-icon",26)(3,"span",28),t.j41(4,"span",38),t.EFF(5),t.k0s()(),t.DNE(6,Xe,1,0,"ng-container",34),t.k0s()}if(2&e){const n=t.XpG(2),o=t.XpG(),i=t.sdS(1);t.R7$(2),t.Y8G("img",o.Phone),t.R7$(),t.Y8G("translate","_i18n.ContactData1"),t.R7$(2),t.JRh(n.phones.home),t.R7$(),t.Y8G("ngTemplateOutlet",i)("ngTemplateOutletContext",t.eq3(5,it,n.phones.home))}}function Fe(e,l){1&e&&t.eu8(0)}function Le(e,l){if(1&e){const n=t.RV6();t.j41(0,"div",20)(1,"a",39),t.bIt("click",function(){a.eBV(n);const i=t.XpG(2),r=t.XpG();return a.Njj(r.phone.call(i.phones.business))}),t.nrm(2,"span",40)(3,"span",28),t.j41(4,"span",41),t.EFF(5),t.k0s()(),t.DNE(6,Fe,1,0,"ng-container",34),t.k0s()}if(2&e){const n=t.XpG(2);t.XpG();const o=t.sdS(1);t.R7$(3),t.Y8G("translate","_i18n.ContactData3"),t.R7$(2),t.JRh(n.phones.business),t.R7$(),t.Y8G("ngTemplateOutlet",o)("ngTemplateOutletContext",t.eq3(4,it,n.phones.business))}}function We(e,l){1&e&&t.eu8(0)}function Ue(e,l){if(1&e){const n=t.RV6();t.j41(0,"div",20)(1,"a",42),t.bIt("click",function(){a.eBV(n);const i=t.XpG(2),r=t.XpG();return a.Njj(r.phone.call(i.phones.business2))}),t.nrm(2,"span",40)(3,"span",28),t.j41(4,"span",43),t.EFF(5),t.k0s()(),t.DNE(6,We,1,0,"ng-container",34),t.k0s()}if(2&e){const n=t.XpG(2);t.XpG();const o=t.sdS(1);t.R7$(3),t.Y8G("translate","_i18n.ContactData4"),t.R7$(2),t.JRh(n.phones.business2),t.R7$(),t.Y8G("ngTemplateOutlet",o)("ngTemplateOutletContext",t.eq3(4,it,n.phones.business2))}}function Ye(e,l){if(1&e&&(t.j41(0,"a",21),t.nrm(1,"lucide-icon",26)(2,"span",28),t.j41(3,"span",44),t.EFF(4),t.k0s()()),2&e){const n=t.XpG(2),o=t.XpG();t.Y8G("href",t.VkB("mailto:",n.emailAddress),t.B4B),t.R7$(),t.Y8G("img",o.Mail),t.R7$(),t.Y8G("translate","_i18n.ContactData5"),t.R7$(2),t.JRh(n.emailAddress)}}function Qe(e,l){if(1&e&&(t.j41(0,"div",22),t.nrm(1,"span",45)(2,"span",28),t.j41(3,"span",46),t.EFF(4),t.k0s()()),2&e){const n=t.XpG(2);t.R7$(2),t.Y8G("translate","_i18n.ContactData6"),t.R7$(2),t.JRh(n.phones.other)}}function ze(e,l){if(1&e&&(t.j41(0,"div",23),t.nrm(1,"span",47)(2,"span",28),t.j41(3,"span",48),t.EFF(4),t.k0s()()),2&e){const n=t.XpG(2);t.R7$(2),t.Y8G("translate","_i18n.ContactData7"),t.R7$(2),t.JRh(n.phones.businessFax)}}function He(e,l){if(1&e){const n=t.RV6();t.j41(0,"div",49)(1,"app-mobile-close-button",50),t.bIt("click",function(){a.eBV(n);const i=t.XpG(3);return a.Njj(i.isInfoPanelVisible=!1)}),t.k0s(),t.nrm(2,"p",51)(3,"previous-contact-interactions",52),t.k0s()}if(2&e){const n=t.XpG(2),o=t.XpG();t.AVh("active",o.isInfoPanelVisible),t.R7$(2),t.Y8G("translate","_i18n.InteractionHistory"),t.R7$(),t.Y8G("contact",n)}}function Ke(e,l){if(1&e&&(t.j41(0,"div",5)(1,"editor-operations",7)(2,"div",8)(3,"span",9),t.EFF(4),t.nI1(5,"lforfl"),t.nI1(6,"async"),t.k0s(),t.nVh(7,Re,3,12,"a",10),t.nVh(8,De,4,12,"a",10),t.nI1(9,"async"),t.k0s(),t.nrm(10,"div",11),t.nVh(11,we,3,8,"button",12),t.nI1(12,"async"),t.k0s(),t.j41(13,"div",13)(14,"div",14),t.nrm(15,"app-avatar",15),t.j41(16,"div",16),t.nVh(17,$e,5,3,"div",17),t.nVh(18,Ve,5,3,"div",18),t.nVh(19,Se,5,3,"div",19),t.nVh(20,je,7,7,"div",20),t.nVh(21,Ae,7,7,"div",20),t.nVh(22,Ne,7,7,"div",20),t.nVh(23,Le,7,6,"div",20),t.nVh(24,Ue,7,6,"div",20),t.nVh(25,Ye,5,5,"a",21),t.nVh(26,Qe,5,2,"div",22),t.nVh(27,ze,5,2,"div",23),t.k0s()(),t.nVh(28,He,4,4,"div",24),t.nI1(29,"async"),t.k0s()()),2&e){const n=t.XpG(),o=t.XpG();t.R7$(),t.Y8G("contact",n)("editMode",!1)("isNew",!1),t.R7$(),t.AVh("gap-2",o.isNewDesign()),t.R7$(2),t.JRh(t.bMT(6,29,t.bMT(5,27,n))),t.R7$(3),t.vxM(n.crmUrl?7:-1),t.R7$(),t.vxM(t.bMT(9,31,o.hasCl
1ientCrmIntegration$)&&o.canOpenClientCrmUrl?8:-1),t.R7$(3),t.vxM(o.canTogglePanel&&!t.bMT(12,33,o.isInteractionHistoryHidden$)?11:-1),t.R7$(4),t.AVh("m-2",o.isNewDesign()),t.Y8G("ext",n)("indicators",!1)("allowLetters",!1)("colorfulDefault",!1),t.R7$(2),t.vxM(n.company?17:-1),t.R7$(),t.vxM(n.title?18:-1),t.R7$(),t.vxM(n.department?19:-1),t.R7$(),t.vxM(n.phones.mobile?20:-1),t.R7$(),t.vxM(n.phones.mobile2?21:-1),t.R7$(),t.vxM(n.phones.home?22:-1),t.R7$(),t.vxM(n.phones.business?23:-1),t.R7$(),t.vxM(n.phones.business2?24:-1),t.R7$(),t.vxM(n.emailAddress?25:-1),t.R7$(),t.vxM(n.phones.other?26:-1),t.R7$(),t.vxM(n.phones.businessFax?27:-1),t.R7$(),t.vxM(!1===t.bMT(29,35,o.isInteractionHistoryHidden$)?28:-1)}}function Je(e,l){if(1&e&&t.nVh(0,Oe,1,2,"app-phonebook-selected-contact",4)(1,Ke,30,37,"div",5),2&e){const n=t.XpG();t.vxM(n.isNewDesign()?0:1)}}const qe=[{path:"",providers:[G.P],children:[{path:"",component:ue,data:{animation:"root",title:"_i18n.Contacts"}},{path:"new",component:Ct,data:{animation:"new"}},{path:"new/:newContactType",component:Ct,data:{animation:"new"}},{path:"view/:type/:id",component:(()=>{class e{route=(0,a.WQX)(m.nX);phone=(0,a.WQX)(Et.u);phoneBookService=(0,a.WQX)(G.P);cd=(0,a.WQX)(d.gRc);myPhoneService=(0,a.WQX)(g.gx);smsChatService=(0,a.WQX)(ut.V);breakpointObserver=(0,a.WQX)(ve.Q);modal=(0,a.WQX)(I.B);previousContactInteractionsService=(0,a.WQX)(vt.k);integrationService=(0,a.WQX)(bt.a);peopleService=(0,a.WQX)(Te.Z);contact=this.phoneBookService.currentContact;subscription=new be.yU;breakpoint="(min-width: 768px)";isInfoPanelVisible=!this.canTogglePanel;isInteractionHistoryHidden$;hasClientCrmIntegration$;clientCrmUrl$;contact$=(0,z.br)(this.contact);isNewDesign=(0,a.WQX)(c.T);MessageCircle=_.oFn;IdCard=_.Kz7;UserSearch=_.geC;Info=_.R2D;Building=_.tIP;Users=_.zWC;Smartphone=_.wO7;Phone=_.bcf;Mail=_.gE4;get canTogglePanel(){return!this.breakpointObserver.isMatched(this.breakpoint)}toggleInfoPanel(){this.canTogglePanel&&(this.isInfoPanelVisible=!this.isInfoPanelVisible)}
1navigateBack(){this.peopleService.navigatePreviousUrl()}ngOnInit(){this.isInteractionHistoryHidden$=this.previousContactInteractionsService.isInteractionHistoryHidden$,this.hasClientCrmIntegration$=this.integrationService.hasClientCrmIntegration$,this.clientCrmUrl$=this.contact$.pipe((0,b.n)(n=>this.integrationService.clientSideCrmUrl$(n?.bestPhone,n?.emailAddress)),(0,h.T)(n=>n??"")),this.subscription.add((0,O.z)([this.contact$,this.route.params]).pipe((0,b.n)(([n,o])=>n&&n.id===o.id&&n.type===+o.type?ge.w:this.myPhoneService.myPhoneSession.pipe((0,b.n)(i=>i.get(new S.Q24({Id:o.id,ContactType:o.type}))),(0,h.T)(i=>i.Contact?x.KA.create(i.Contact):void 0)))).subscribe({next:n=>{n?this.phoneBookService.currentContact.set(n):this.phoneBookService.navigateContacts()},error:n=>this.modal.error(n)})),this.subscription.add(this.breakpointObserver.observe(this.breakpoint).subscribe(n=>{this.isInfoPanelVisible=n.matches,this.cd.markForCheck()}))}get canOpenClientCrmUrl(){return this.integrationService.canOpenContactClientSideCrmUrl(this.contact())}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=t.VBU({type:e,selectors:[["ng-component"]],features:[t.Jv_([vt.k])],decls:3,vars:1,consts:[["sms",""],[3,"class","title"],[3,"click","title"],[1,"customSVGIcons","svg-md"],[3,"contact","pageView"],[1,"d-flex","h-100","flex-column","bg-tiles"],[3,"closed","contact","pageView"],[3,"contact","editMode","isNew"],[1,"d-flex","flex-fill","align-items-center","mw-0","gap-1"],["data-qa","contact-title",1,"text-md","text-truncate"],["target","_blank",3,"href","class","title"],[1,"flex-grow-1"],["id","infoPanelToggleBtn","type","button",3,"class","title"],[1,"d-flex","flex-row","position-relative","flex-grow-1",2,"overflow-y","auto"],[1,"d-flex","align-content-start","flex-row","flex-wrap","flex-grow-1","scrollable"],["size","xl",1,"mb-3",3,"ext","indicators","allowLetters","colorfulDefault"],[1,"svg-md"],["id","contactCompany",1,"contact-item","mb-3"],["id","contactTitle",1,"contact-item","mb-3"],["id","contactDepartment",1,"contact-item","mb-3"],[1,"d-flex","mb-3"],["id","contactEmailAddress","target","_blank","rel","noopener",1,"contact-item","mhover","mb-3",3,"href"],["id","contactOther",1,"contact-item","mb-3"],["id","contactBusinessFax",1,"contact-item","mb-3"],[1,"info-panel","scrollable","p-4",3,"active"],["target","_blank",3,"href","title"],[3,"img"],["id","infoPanelToggleBtn","type","button",3,"click","title"],[3,"translate"],["data-qa","company"],["data-qa","title"],["data-qa","department"],["id","contactMobileBtn",1,"contact-item","mhover",2,"cursor","pointer",3,"click"],["data-qa","mobile"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["id","contactMobile2Btn",1,"contact-item","mhover",2,"cursor","pointer",3,"click"],["data-qa","mobile-2"],["id","contactHomeBtn",1,"contact-item","mhover",2,"cursor","pointer",3,"click"],["data-qa","home"],["id","contactBusinessBtn",1,"contact-item","mhover",2,"cursor","pointer",3,"click"],["app-phone-office-light-icon","",1,"customSVGIcons","svg-md"],["data-qa","business"],["id","contactBusiness2Btn",1,"contact-item","mhover",2,"cursor","pointer",3,"click"],["data-qa","business-2"],["data-qa","email"],["app-phone-rotary-light-icon","",1,"customSVGIcons","svg-md"],["data-qa","other"],["app-fax-light-icon","",1,"customSVGIcons","svg-md"],["data-qa","business-fax"],[1,"info-panel","scrollable","p-4"],[3,"click"],[1,"border-bottom","pb-1","mb-2","text-truncate",3,"translate"],[3,"contact"]],template:function(o,i){if(1&o&&(t.DNE(0,ye,2,3,"ng-template",null,0,t.C5r),t.nVh(2,Je,2,1)),2&o){let r;t.R7$(2),t.vxM((r=i.contact())?2:-1,r)}},dependencies:[tt,Tt.f,L.Mm,dt.T3,fe.D,Pe,Me,It.S,_.flO,_.WGl,xe.L,$.U,yt,L.D9,dt.Jj,ke._],styles:['@media(max-width:1399.98px){.d-xxl-down-none[_ngcontent-%COMP%], .xxl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:1199.98px){.d-xl-down-none[_ngcontent-%COMP%], .xl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:991.98px){.d-lg-down-none[_ngcontent-%COMP%], .lg-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:767.98px){.d-md-down-none[_ngcontent-%COMP%], .md-visible[_ngcontent-%COMP%]{display:none!important}}@media(max-width:575.98px){.d-sm-down-none[_ngcontent-%COMP%], .sm-visible[_ngcontent-%COMP%]{display:none!important}}[_nghost-%COMP%] .info-panel[_ngcontent-%COMP%]{width:0;opacity:0;transition:all .3s ease-in-out}[_nghost-%COMP%] .info-panel.active[_ngcontent-%COMP%]{opacity:1;width:290px;box-shadow:-2px 0 6px #0000001a;background:var(--bg-primary);border-left:1px solid var(--border-color);padding:0 var(--spacer-l)}@media(max-width:991.98px){[_nghost-%COMP%] .info-panel[_ngcontent-%COMP%]{position:absolute;top:0;bottom:0;right:0}}[_nghost-%COMP%] .info-panel[_ngcontent-%COMP%] app-mobile-close-button[_ngcontent-%COMP%]{position:absolute;top:0;right:0}[_nghost-%COMP%] .contact-item[_ngcontent-%COMP%]{min-width:250px;height:50px;display:grid;align-items:center;grid-template-columns:50px auto;grid-template-areas:"icon label" "icon text"}[_nghost-%COMP%] .contact-item[_ngcontent-%COMP%] .customSVGIcons[_ngcontent-%COMP%], [_nghost-%COMP%] .contact-item[_ngcontent-%COMP%] lucide-icon[_ngcontent-%COMP%]{justify-self:center;grid-area:icon}[_nghost-%COMP%] .sms-anchor[_ngcontent-%COMP%]{display:flex;flex:none;width:50px;align-items:center;justify-content:center}.new-design [_nghost-%COMP%]{--svg-color: currentColor}.new-design [_nghost-%COMP%] .info-panel.active[_ngcontent-%COMP%]{width:350px;box-shadow:none}']})}return e})(),data:{animation:"view"}},{path:"edit/:type/:id",component:Ct,data:{animation:"edit"}}]}]},53180(F,w,s){s.d(w,{d:()=>v});var C=s(576),y=s(17705),g=s(85802),m=s(62175),a=s(49769),d=s(68018),D=s(32566),u=s(58689),x=s(8516),O=s(47548),p=s(35
1547);function R(P,S){if(1&P&&p.nrm(0,"app-avatar",0),2&P){const I=p.XpG();p.Y8G("ext",I.contact)("size","l"===I.size?"m":"m"===I.size?"s":"xs")}}function k(P,S){if(1&P&&(p.j41(0,"small",2),p.EFF(1),p.k0s()),2&P){const I=p.XpG();p.R7$(),p.JRh(null==I.contact?null:I.contact.bestPhone)}}function b(P,S){if(1&P){const I=p.RV6();p.j41(0,"a",6),p.nI1(1,"translate"),p.bIt("click",function(V){g.eBV(I);const $=p.XpG();return g.Njj($.makeCall(V))}),p.nrm(2,"lucide-icon",7),p.k0s()}if(2&P){const I=p.XpG();p.HbH(p.VkB("btn btn-icon ",I.isNewDesign()&&"l"===I.size?"btn-border":"btn-plain")),p.AVh("hover-visible",!I.callActionVisible&&!I.isNewDesign()),p.Y8G("title",p.mNQ(p.bMT(1,8,"_i18n.Call"))),p.R7$(2),p.Y8G("img",I.Phone)}}function h(P,S){if(1&P){const I=p.RV6();p.j41(0,"a",8),p.nI1(1,"translate"),p.bIt("click",function(V){g.eBV(I);const $=p.XpG();return V.stopPropagation(),g.Njj($.showMoreActionsClicked.emit(V))}),p.nrm(2,"lucide-icon",9),p.k0s()}if(2&P){const I=p.XpG();p.Y8G("title",p.mNQ(p.bMT(1,3,"_i18n.ShowMore"))),p.R7$(2),p.Y8G("img",I.isNewDesign()?I.Ellipsis:I.EllipsisVertical)}}let v=(()=>{class P{phonebookService=(0,g.WQX)(C.P);isNewDesign=(0,g.WQX)(u.T);Phone=x.bcf;Ellipsis=x.gyB;EllipsisVertical=x.YbC;size="l";dataQa="phonebook-tile";contact;showMoreIsVisible;callActionVisible=!0;showMoreActionsClicked=(0,y.CGW)();get hostClass(){return`size-${this.size}`}makeCall(I){I.stopPropagation(),this.phonebookService.makeCall(this.contact)}static \u0275fac=function(G){return new(G||P)};static \u0275cmp=p.VBU({type:P,selectors:[["phonebook-tile"]],hostVars:3,hostBindings:function(G,V){2&G&&(p.BMQ("data-qa",V.dataQa),p.HbH(V.hostClass))},inputs:{size:"size",dataQa:"dataQa",contact:"contact",showMoreIsVisible:"showMoreIsVisible",callActionVisible:"callActionVisible"},outputs:{showMoreActionsClicked:"showMoreActionsClicked"},decls:8,vars:10,consts:[[3,"ext","size"],["data-qa","contact-name",1,"name",3,"truncatedText"],["data-a","contact-phone",1,"phone"],[1,"actions"],["data-qa","make-call",3,"class","hover-visible","title"],["data-qa","show-more",1,"btn","btn-icon","btn-plain","show-more",3,"title"],["data-qa","make-call",3,"click","title"],[3,"img"],["data-qa","show-more",1,"btn","btn-icon","btn-plain","show-more",3,"click","title"],[1,"filled",3,"img"]],template:function(G,V){1&G&&(p.nVh(0,R,1,2,"app-avatar",0),p.nrm(1,"span",1),p.nI1(2,"contactName"),p.nI1(3,"async"),p.nVh(4,k,2,1,"small",2),p.j41(5,"div",3),p.nVh(6,b,3,10,"a",4),p.nVh(7,h,3,5,"a",5),p.k0s()),2&G&&(p.vxM("xs"!==V.size?0:-1),p.R7$(),p.Y8G("truncatedText",p.bMT(3,8,p.i5U(2,5,V.contact,V.contact.emailAddress))),p.R7$(3),p.vxM("l"===V.size||"m"===V.size?4:-1),p.R7$(2),p.vxM("xs"!==V.size?6:-1),p.R7$(),p.vxM(V.showMoreIsVisible?7:-1))},dependencies:[m.f,O.N,x.flO,x.WGl,d.D9,a.Jj,D.G],styles:['[_nghost-%COMP%]{cursor:pointer;min-width:100px;column-gap:var(--spacer-xs);justify-content:flex-start;align-items:center}.size-xs[_nghost-%COMP%], .size-s[_nghost-%COMP%]{display:flex}.size-xs[_nghost-%COMP%] .actions[_ngcontent-%COMP%], .size-s[_nghost-%COMP%] .actions[_ngcontent-%COMP%]{margin-left:auto}.size-s[_nghost-%COMP%]{height:40px}.size-m[_nghost-%COMP%]{display:grid;height:var(--avatar-size);grid-template:[row1-start] "avatar name actions" auto [row1-end] [row2-start] "avatar phone actions" auto [row2-end]/auto 1fr auto}.size-m[_nghost-%COMP%] .actions[_ngcontent-%COMP%]{flex-direction:column;height:100%;justify-content:start}.size-l[_nghost-%COMP%]{display:grid;height:var(--avatar-size);grid-template:[row1-start] "avatar name name" auto [row1-end] [row2-start] "avatar phone actions" auto [row2-end]/auto 1fr auto}.size-l[_nghost-%COMP%] .actions[_ngcontent-%COMP%]{align-self:flex-start}[_nghost-%COMP%] app-avatar[_ngcontent-%COMP%]{grid-area:avatar}[_nghost-%COMP%] .actions[_ngcontent-%COMP%]{grid-area:actions;display:inline-flex;align-items:baseline}[_nghost-%COMP%] .phone[_ngcontent-%COMP%]{grid-area:phone;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;align-self:flex-start}[_nghost-%COMP%] .name[_ngcontent-%COMP%]{grid-area:name;flex:1;align-self:flex-end;display:block;gap:var(--spacer-xs);max-width:100%;min-width:50px;padding-right:var(--spacer-s)}[_nghost-%COMP%] .btn-icon[_ngcontent-%COMP%]{--svg-size: 14px;--btn-icon-size: 20px}[_nghost-%COMP%] .show-more[_ngcontent-%COMP%]{--svg-color: currentColor}.new-design [_nghost-%COMP%]{row-gap:var(--spacer-xs)}.new-design [_nghost-%COMP%] .name[_ngcontent-%COMP%]{display:block;padding-right:0}.new-design .size-m[_nghost-%COMP%] .name[_ngcontent-%COMP%], .new-design .size-l[_nghost-%COMP%] .name[_ngcontent-%COMP%]{font-weight:var(--font-weight-bold)}.new-design .size-xs[_nghost-%COMP%], .new-design .size-s[_nghost-%COMP%], .new-design .size-m[_nghost-%COMP%]{padding:var(--spacer-xs)}.new-design .size-xs[_nghost-%COMP%] .btn-icon[_ngcontent-%COMP%], .new-design .size-s[_nghost-%COMP%] .btn-icon[_ngcontent-%COMP%], .new-design .size-m[_nghost-%COMP%] .btn-icon[_ngcontent-%COMP%]{--btn-icon-size: 24px}.new-design .size-xs[_nghost-%COMP%] .actions[_ngcontent-%COMP%]:empty, .new-design .size-s[_nghost-%COMP%] .actions[_ngcontent-%COMP%]:empty, .new-design .size-m[_nghost-%COMP%] .actions[_ngcontent-%COMP%]:empty{display:none}.new-design .size-m[_nghost-%COMP%]{height:60px}.new-design .size-m[_nghost-%COMP%] .actions[_ngcontent-%COMP%]{flex-direction:column-reverse}.new-design .size-l[_nghost-%COMP%]{height:160px;display:flex;flex-direction:column;border-radius:var(--border-radius);padding:var(--spacer);position:relative}.new-design .size-l[_nghost-%COMP%] .show-more[_ngcontent-%COMP%]{position:absolute;top:var(--spacer-xs);right:var(--spacer-xs)}.new-design .size-l[_nghost-%COMP%] .actions[_ngcontent-%COMP%]{gap:var(--spacer-xs);min-height:28px;align-self:center}.new-design .size-l[_nghost-%COMP%] .name[_ngcontent-%COMP%]{text-align:center}.new-design [_nghost-%COMP%] .btn-icon[_ngcontent-%COMP%]{--svg-size: var(--svg-size-sm);--btn-icon-size: 28px;--svg-color: currentColor}.new-design .size-xs[_nghost-%COMP%] .btn-icon[_ngcontent-%COMP%]{--svg-size: 12px}.new-design [_nghost-%COMP%]:not(.size-m) .name[_ngcontent-%COMP%], .new-design [_nghost-%COMP%]:not(.size-m) .phone[_ngcontent-%COMP%]{align-self:center}.new-design [_nghost-%COMP%] .phone[_ngcontent-%COMP%]{color:var(--text-hint);max-width:100%}'],changeDetection:0})}return P})()},42268(F,w,s){s.d(w,{n:()=>R});var C=s(40720),y=s(5739),g=s(74743),m=s(49769),a=s(68018),d=s(35547);const D=k=>({contacts:k});function u(k,b){if(1&k&&d.nrm(0,"span",2),2&k){const h=d.XpG(3);d.Y8G("title",h.crm.error)}}function x(k,b){1&k&&d.nrm(0,"span",3)}function O(k,b){if(1&k&&(d.j41(0,"div",0)(1,"span"),d.EFF(2),d.nI1(3,"translate"),d.k0s(),d.nVh(4,u,1,1,"span",2),d.nVh(5,x,1,0,"span",3),d.k0s()),2&k){const h=d.XpG(2);d.R7$(2),d.JRh(d.bMT(3,3,"_i18n.CRM")),d.R7$(2),d.vxM("error"===h.crm.status?4:-1),d.R7$(),d.vxM("loading"===h.crm.status?5:-1)}}function p(k,b){if(1&k&&(d.nVh(0,O,6,5,"div",0),d.eu8(1,1)),2&k){const h=d.XpG();d.vxM("error"===h.crm.status||"loading"===h.crm.status||h.crm.contacts.length>0?0:-1),d.R7$(),d.Y8G("ngTemplateOutlet",h.content.templateRef)("ngTemplateOutletContext",d.eq3(3,D,h.crm.contacts))}}let R=(()=>{class k{crm;content;static \u0275fac=function(v){return new(v||k)};static \u0275cmp=d.VBU({type:k,selectors:[["app-crm-contacts"]],contentQueries:function(v,P,S){if(1&v&&d.wni(S,C.E,5),2&v){let I;d.mGM(I=d.lsd())&&(P.content=I.first)}},inputs:{crm:"crm"},decls:1,vars:1,consts:[[1,"crm-tile","d-flex","align-items-center","p-3","gap-2"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["app-exclamation-circle-solid-icon","",1,"customSVGIcons","fillIconRed","svg-sm",3,"title"],["app-spinner-regular-icon","",1,"customSVGIcons","svg-sm"]],template:function(v,P){1&v&&d.nVh(0,p,2,5),2&v&&d.vxM(P.crm&&"unavailable"!==P.crm.status?0:-1)},dependencies:[y.b,g.a,m.T3,a.D9],encapsulation:2,changeDetection:0})}return k})()},83421(F,w,s){s.d(w,{I:()=>g});
1var C=s(35547),y=s(85802);let g=(()=>{class m{static \u0275fac=function(D){return new(D||m)};static \u0275cmp=C.VBU({type:m,selectors:[["app-arrow-from-bottom-solid-icon"],["","app-arrow-from-bottom-solid-icon",""]],decls:2,vars:0,consts:[["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 384 512"],["d","M360 480H24c-13.3 0-24-10.7-24-24v-24c0-13.3 10.7-24 24-24h336c13.3 0 24 10.7 24 24v24c0 13.3-10.7 24-24 24zM90.4 216.5l65.6-65.6V360c0 13.3 10.7 24 24 24h24c13.3 0 24-10.7 24-24V150.9l65.6 65.6c9.4 9.4 24.6 9.4 33.9 0l17-17c9.4-9.4 9.4-24.6 0-33.9L209 30.1c-9.4-9.4-24.6-9.4-33.9 0L39.5 165.6c-9.4 9.4-9.4 24.6 0 33.9l17 17c9.4 9.4 24.6 9.4 33.9 0z"]],template:function(D,u){1&D&&(y.qSk(),C.rj2(0,"svg",0),C.Hgh(1,"path",1),C.eux())},encapsulation:2})}return m})()},40720(F,w,s){s.d(w,{E:()=>g});var C=s(35547),y=s(85802);let g=(()=>{class m{templateRef=(0,y.WQX)(C.C4Q);static \u0275fac=function(D){return new(D||m)};static \u0275dir=C.FsC({type:m,selectors:[["","appCrmContactsRef",""]]})}return m})()},32566(F,w,s){s.d(w,{G:()=>D});var C=s(85802),y=s(16444),g=s(7673),m=s(96354),a=s(25558),d=s(35547);let D=(()=>{class x{service=(0,C.WQX)(y.gx);transform(p,R){return function u(x,O,p){if(O&&!O.isDummy){const R=O.firstName?.trim()??"",k=O.lastName?.trim()??"",b=O.company?.trim()??"",h=b?` - ${b}`:"";return R?k?x.myPhoneSession.pipe((0,a.n)(v=>v.systemParameters$),(0,m.T)(v=>b?`${v.IsLastFirst?`${k}, ${R.charAt(0).toUpperCase()}`:`${R} ${k.charAt(0).toUpperCase()}`}${h}`:v.IsLastFirst?`${k}, ${R}`:`${R} ${k}`)):(0,g.of)(`${R}${h}`):(0,g.of)(k?`${k}${h}`:b)}return(0,g.of)(p||"")}(this.service,p,R)}static \u0275fac=function(R){return new(R||x)};static \u0275pipe=d.EJ8({name:"contactName",type:x,pure:!0})}return x})()},72252(F,w,s){s.d(w,{U:()=>m});var C=s(68018),y=s(12834),g=s(35547);let m=(()=>{class a{static \u0275fac=function(u){return new(u||a)};static \u0275cmp=g.VBU({type:a,selectors:[["app-mobile-close-button"]],hostAttrs:[1,"d-md-none"],decls:2,vars:3,consts:[["data-qa","mobile-close-btn",3,"title"]],template:function(u,x){1&u&&(g.nrm(0,"app-button-close-x",0),g.nI1(1,"translate")),2&u&&g.Y8G("title",g.bMT(1,1,"_i18n.GoBack"))},dependencies:[y.W,C.D9],encapsulation:2,changeDetection:0})}return a})()},97519(F,w,s){s.d(w,{U:()=>d});var C=s(7673),y=s(88141),g=s(99437),m=s(7881),a=s(445);const d=(D,u="_i18n.ImportDone",x=!1)=>O=>O.pipe((0,g.W)(p=>(0,C.of)({Exception:(0,m.PE)(p)})),(0,y.M)(p=>{D.showComponent(a.K,{initialState:{result:p,successMessage:u,isAsyncImport:x}})}))},85260(F,w,s){s.d(w,{Cy:()=>R});var y=s(31635),g=s(17705),m=s(35547),a=s(85802),d=s(72806),D=s(49769);const u=["*"];function x(b,h){if(1&b){const v=m.RV6();m.j41(0,"button",3),m.bIt("click",function(){a.eBV(v);const S=m.XpG(2);return a.Njj(S.close())}),m.j41(1,"span",4),m.EFF(2,"\xd7"),m.k0s(),m.j41(3,"span",5),m.EFF(4,"Close"),m.k0s()()}}function O(b,h){if(1&b&&(m.j41(0,"div",1),m.nVh(1,x,5,0,"button",2),m.SdG(2),m.k0s()),2&b){const v=m.XpG();m.HbH("alert alert-"+v.type),m.Y8G("ngClass",v.classes),m.R7$(),m.vxM(v.dismissible?1:-1)}}let p=(()=>{class b{constructor(){this.type="warning",this.dismissible=!1,this.dismissOnTimeout=void 0}static{this.\u0275fac=function(P){return new(P||b)}}static{this.\u0275prov=a.jDH({token:b,factory:b.\u0275fac,providedIn:"root"})}}return b})(),R=(()=>{class b{constructor(v,P){this.changeDetection=P,this.type="warning",this.dismissible=!1,this.isOpen=!0,this.onClose=new a.bkB,this.onClosed=new a.bkB,this.classes="",this.dismissibleChange=new a.bkB,Object.assign(this,v),this.dismissibleChange.subscribe(()=>{this.classes=this.dismissible?"alert-dismissible":"",this.changeDetection.markForCheck()})}ngOnInit(){this.dismissOnTimeout&&setTimeout(()=>this.close(),parseInt(this.dismissOnTimeout,10))}close(){this.isOpen&&(this.onClose.emit(this),this.isOpen=!1,this.changeDetection.markForCheck(),this.onClosed.emit(this))}static{this.\u0275fac=function(P){return new(P||b)(m.rXU(p),m.rXU(g.gRc))}}static{this.\u0275cmp=m.VBU({type:b,selectors:[["alert"],["bs-alert"]],inputs:{type:"type",dismissible:"dismissible",dismissOnTimeout:"dismissOnTimeout",isOpen:"isOpen"},outputs:{onClose:"onClose",onClosed:"onClosed"},ngContentSelectors:u,decls:1,vars:1,consts:[["role","alert",3,"class","ngClass"],["role","alert",3,"ngClass"],["type","button","aria-label","Close",1,"close","btn-close"],["type","button","aria-label","Close",1,"close","btn-close",3,"click"],["aria-hidden","true",1,"visually-hidden"],[1,"sr-only","visually-hidden"]],template:function(P,S){1&P&&(m.NAR(),m.nVh(0,O,3,4,"div",0)),2&P&&m.vxM(S.isOpen?0:-1)},dependencies:[D.YU],encapsulation:2,changeDetection:0})}}return(0,y.Cg)([(0,d.Yr)(),(0,y.Sn)("design:type",Object)],b.prototype,"dismissible",void 0),b})()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.