1"use strict";(self.webpackChunkwebclient_webpack=self.webpackChunkwebclient_webpack||[]).push([[7273],{97273(S,E,c){c.d(E,{D5:()=>d,KW:()=>P,lI:()=>C,n0:()=>h,pA:()=>i});var a=c(85802),v=c(54381),F=c(61220),b=c(95847),H=c(19037),A=c(99437),D=c(96354),t=c(25558),f=c(84572),n=c(7673),r=c(83185),e=c(42610),s=c(87019),l=c(12426),o=c(38357),p=c(81753),m=c(92996);const i=s.z9,h="$filter=not startsWith(Name,'___FAVORITES___');";function d(g,y,x,T,M){return g.map($=>{const R=$.Phones&&$.Phones.length>0,w=x.find(u=>u.Id===$.Id);return{...$,IsEmailDuplicated:!!M.find(u=>$.EmailAddress?.toLowerCase()===u.toLowerCase()),Dids:w?.Routes?.filter(u=>(0,r.U)(u.DID)).map(u=>(0,p.fE)(u.DID,u.DisplayName)),Phone:R?$.Phones[0]:void 0,Fxses:T.filter(u=>u.FxsLines?.some(I=>I.Number===$.Number)),Registrar:R?y.find(u=>u.MAC===$.Phones[0].MacAddress):void 0}})}let P=(()=>{class g{usersApiService=(0,a.WQX)(b.u);defsService=(0,a.WQX)(v.G);fxsService=(0,a.WQX)(F.V);localStorageService=(0,a.WQX)(l.sj);tokenInfoService=(0,a.WQX)(m.Z);getStoredPageSize(){const x=this.localStorageService.retrieve(e.Hh.UsersPageSize);return x?+x:i}setStoredPageSize(x){this.localStorageService.store(e.Hh.UsersPageSize,x)}filterByGroupId=null;get filter(){return"not AIAgent and not startsWith(Number,'HD')"+(this.filterByGroupId?` and Groups/any(group:group/GroupId eq ${this.filterByGroupId})`:"")}resolveData(x,T,M){return this.tokenInfoService.getMyToken$().pipe((0,t.n)($=>{const w=$.trunks?this.fxsService.listFxs({$select:["Name","FxsLines","Template"],$expand:["Template($select=DeviceType),Registered"]}):(0,n.of)(null);return(0,f.z)([this.usersApiService.listUser({$orderby:["Number"],$count:!0,$filter:this.filter,$search:(0,o.Bj)(M),$select:["IsRegistered","CurrentProfileName","DisplayName","Id","EmailAddress","Number","Tags","Require2FA","AllowLanOnly"],$expand:[`Groups($select=GroupId,Name,Rights;${h}$expand=Rights($select=RoleName)),Phones($select=MacAddress,Name,Settings($select=IsSBC,ProvisionType))`],$skip:(x-1)*T,$top:T}),w]).pipe((0,t.n)(([u,I])=>{const B=(0,r.Gp)(u,this.usersApiService),O=u.value?.filter(_=>_.EmailAddress).map(_=>_.EmailAddress)??[],j=0===O.length?(0,n.of)([]):this.usersApiService.getDuplicatedEmails({usersGetDuplicatedEmailsRequestBody:{emails:O}}).pipe((0,D.T)(_=>_.value??[])),W=u.value?.map(_=>_.Id)??[],L=0===W.length?(0,n.of)([]):this.defsService.getRoutes({defsGetRoutesRequestBody:{ids:W}}).pipe((0,D.T)(_=>_.value));return(0,f.z)([B,L,j]).pipe((0,D.T)(([_,V,U])=>({value:d(u.value||[],_.value||[],V,I?.value||[],U),totalItems:u["@odata.count"]})))}))}))}static \u0275fac=function(T){return new(T||g)};static \u0275prov=a.jDH({token:g,factory:g.\u0275fac,providedIn:"root"})}return g})();const C=()=>{const g=(0,a.WQX)(P),y=(0,a.WQX)(H.s);return g.resolveData(1,g.getStoredPageSize(),"").pipe((0,A.W)(x=>y.handleError(x)))}},61220(S,E,c){c.d(E,{V:()=>H});var a=c(97201),v=c(4499),F=c(35547),b=c(85802);let H=(()=>{class A extends v.d{createFxs(t,f="body"){const n=t?.pbxFxs;if(null==n)throw new Error("Required parameter pbxFxs was null or undefined when calling createFxs.");let r=this.defaultHeaders;r=this.configuration.addCredentialToHeaders("Application","Authorization",r,"Bearer ");const e=this.configuration.selectHeaderAccept(["application/json"]);void 0!==e&&(r=r.set("Accept",e));const l=this.configuration.selectHeaderContentType(["application/json"]);void 0!==l&&(r=r.set("Content-Type",l));let o="json";e&&(o=e.startsWith("text")?"text":this.configuration.isJsonMime(e)?"json":"blob");const{basePath:m,withCredentials:i}=this.configuration;return this.httpClient.request("post",`${m}/Fxs`,{body:n,responseType:o,...i?{withCredentials:i}:{},headers:r,observe:f})}createFxsQuery(t,f="body",n=!1,r){if(null==t.pbxFxs)throw new Error("Required parameter pbxFxs was null or undefined when calling createFxs.");return"/Fxs"}deleteFxs(t,f="body"){const n=t?.macAddress;if(null==n)throw new Error("Required parameter macAddress was null or undefined when calling deleteFxs.");const r=t?.ifMatch;let e=this.defaultHeaders;null!=r&&(e=e.set("If-Match",String(r))),e=this.configuration.addCredentialToHeaders("Application","Authorization",e,"Bearer ");const s=this.configuration.selectHeaderAccept(["application/json"]);void 0!==s&&(e=e.set("Accept",s));let l="json";s&&(l=s.startsWith("text")?"text":this.configuration.isJsonMime(s)?"json":"blob");let o=`/Fxs(${this.configuration.encodeParam({name:"macAddress",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:p,withCredentials:m}=this.configuration;return this.httpClient.request("delete",`${p}${o}`,{responseType:l,...m?{withCredentials:m}:{},headers:e,observe:f})}deleteFxsQuery(t,f="body",n=!1,r){const e=t.macAddress;if(null==e)throw new Error("Required parameter macAddress was null or undefined when calling deleteFxs.");return`/Fxs(${this.configuration.encodeParam({name:"macAddress",value:e,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`}getFxs(t,f="body"){const n=t?.macAddress;if(null==n)throw new Error("Required parameter macAddress was null or undefined when calling getFxs.");const r=t?.$select,e=t?.$expand;let s=new a.rx(this.encoder);s=this.addToHttpParams(s,"$select",r,a.l2.Form,!1),s=this.addToHttpParams(s,"$expand",e,a.l2.Form,!1);let l=this.defaultHeaders;l=this.configuration.addCredentialToHeaders("Application","Authorization",l,"Bearer ");const o=this.configuration.selectHeaderAccept(["application/json"]);void 0!==o&&(l=l.set("Accept",o));let p="json";o&&(p=o.startsWith("text")?"text":this.configuration.isJsonMime(o)?"json":"blob");let m=`/Fxs(${this.configuration.encodeParam({name:"macAddress",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:i,withCredentials:h}=this.configuration;return this.httpClient.request("get",`${i}${m}`,{params:s.toHttpParams(),responseType:p,...h?{withCredentials:h}:{},headers:l,observe:f})}getFxsQuery(t,f="body",n=!1,r){const e=t.macAddress;if(null==e)throw new Error("Required parameter macAddress was null or undefined when calling getFxs.");const s=t.$select,l=t.$expand;let o=new a.rx(this.encoder);return o=this.addToHttpParams(o,"$select",s,a.l2.Form,!1),o=this.addToHttpParams(o,"$expand",l,a.l2.Form,!1),`/Fxs(${this.configuration.encodeParam({name:"macAddress",value:e,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})?`+o.toString()}listFxs(t,f="body"){const n=t?.$top,r=t?.$skip,e=t?.$search,s=t?.$filter,l=t?.$count,o=t?.$orderby,p=t?.$select,m=t?.$expand;let i=new a.rx(this.encoder);i=this.addToHttpParams(i,"$top",n,a.l2.Form,!1),i=this.addToHttpParams(i,"$skip",r,a.l2.Form,!1),i=this.addToHttpParams(i,"$search",e,a.l2.Form,!1),i=this.addToHttpParams(i,"$filter",s,a.l2.Form,!1),i=this.addToHttpParams(i,"$count",l,a.l2.Form,!1),i=this.addToHttpParams(i,"$orderby",o,a.l2.Form,!1),i=this.addToHttpParams(i,"$select",p,a.l2.Form,!1),i=this.addToHttpParams(i,"$expand",m,a.l2.Form,!1);let h=this.defaultHeaders;h=this.configuration.addCredentialToHeaders("Application","Authorization",h,"Bearer ");const d=this.configuration.selectHeaderAccept(["application/json"]);void 0!==d&&(h=h.set("Accept",d));let P="json";d&&(P=d.startsWith("text")?"text":this.configuration.isJsonMime(d)?"json":"blob");const{basePath:g,withCredentials:y}=this.configuration;return this.httpClient.request("get",`${g}/Fxs`,{params:i.toHttpParams(),responseType:P,...y?{withCredentials:y}:{},headers:h,observe:f})}
1listFxsQuery(t,f="body",n=!1,r){const e=t.$top,s=t.$skip,l=t.$search,o=t.$filter,p=t.$count,m=t.$orderby,i=t.$select,h=t.$expand;let d=new a.rx(this.encoder);return d=this.addToHttpParams(d,"$top",e,a.l2.Form,!1),d=this.addToHttpParams(d,"$skip",s,a.l2.Form,!1),d=this.addToHttpParams(d,"$search",l,a.l2.Form,!1),d=this.addToHttpParams(d,"$filter",o,a.l2.Form,!1),d=this.addToHttpParams(d,"$count",p,a.l2.Form,!1),d=this.addToHttpParams(d,"$orderby",m,a.l2.Form,!1),d=this.addToHttpParams(d,"$select",i,a.l2.Form,!1),d=this.addToHttpParams(d,"$expand",h,a.l2.Form,!1),"/Fxs?"+d.toString()}regenerateWebCredentials(t,f="body"){const n=t?.macAddress;if(null==n)throw new Error("Required parameter macAddress was null or undefined when calling regenerateWebCredentials.");let r=this.defaultHeaders;r=this.configuration.addCredentialToHeaders("Application","Authorization",r,"Bearer ");const e=this.configuration.selectHeaderAccept(["application/json"]);void 0!==e&&(r=r.set("Accept",e));let s="json";e&&(s=e.startsWith("text")?"text":this.configuration.isJsonMime(e)?"json":"blob");let l=`/Fxs(${this.configuration.encodeParam({name:"macAddress",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})/Pbx.RegenerateWebCredentials`;const{basePath:o,withCredentials:p}=this.configuration;return this.httpClient.request("post",`${o}${l}`,{responseType:s,...p?{withCredentials:p}:{},headers:r,observe:f})}regenerateWebCredentialsQuery(t,f="body",n=!1,r){const e=t.macAddress;if(null==e)throw new Error("Required parameter macAddress was null or undefined when calling regenerateWebCredentials.");return`/Fxs(${this.configuration.encodeParam({name:"macAddress",value:e,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})/Pbx.RegenerateWebCredentials`}updateFxs(t,f="body"){const n=t?.macAddress;if(null==n)throw new Error("Required parameter macAddress was null or undefined when calling updateFxs.");const r=t?.pbxFxs;let e=this.defaultHeaders;e=this.configuration.addCredentialToHeaders("Application","Authorization",e,"Bearer ");const s=this.configuration.selectHeaderAccept(["application/json"]);void 0!==s&&(e=e.set("Accept",s));const o=this.configuration.selectHeaderContentType(["application/json"]);void 0!==o&&(e=e.set("Content-Type",o));let p="json";s&&(p=s.startsWith("text")?"text":this.configuration.isJsonMime(s)?"json":"blob");let m=`/Fxs(${this.configuration.encodeParam({name:"macAddress",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:i,withCredentials:h}=this.configuration;return this.httpClient.request("patch",`${i}${m}`,{body:r,responseType:p,...h?{withCredentials:h}:{},headers:e,observe:f})}updateFxsQuery(t,f="body",n=!1,r){const e=t.macAddress;if(null==e)throw new Error("Required parameter macAddress was null or undefined when calling updateFxs.");return`/Fxs(${this.configuration.encodeParam({name:"macAddress",value:e,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`}static \u0275fac=(()=>{let t;return function(n){return(t||(t=F.xGo(A)))(n||A)}})();static \u0275prov=b.jDH({token:A,factory:A.\u0275fac,providedIn:"root"})}return A})()}}]);
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.