PageSourceSearch

https://app.simpledcard.com/en/chunk-IXJWIKOW.js

js simpledcard.com collected 2026-10-02 15:46:30 UTC 293,034 bytes, 1 lines download raw bytes

1import{a as bl,b as yl,c as vl,d as xl,e as $l,f as Gl}from"./chunk-6C6UJRZW.js";import{a as Sr}from"./chunk-BVHFCIN6.js";import{f as qi,g as hl}from"./chunk-Q4V7NGUW.js";import{a as Ul}from"./chunk-JVAB4QGV.js";import{a as Dl}from"./chunk-SVE3IE2W.js";import{a as ki}from"./chunk-3PU4WQ7B.js";import{a as we}from"./chunk-G3XVLPZQ.js";import{a as xa,c as $a,d as Ya}from"./chunk-3VRPAQNL.js";import{Ac as wi,sc as Oa,vc as Ra,wc as Ia,xc as mt,yc as Di,zc as Ui}from"./chunk-MU6BIPLY.js";import{a as za}from"./chunk-YE7E2BFW.js";import{a as Ma}from"./chunk-D6UIUMUH.js";import{a as hi,b as bn}from"./chunk-JXPPI62O.js";import{a as $i}from"./chunk-OMHQIKUN.js";import{a as bi}from"./chunk-OAJFN7S6.js";import{a as yt}from"./chunk-362LESPZ.js";import"./chunk-UFBIU5B6.js";import{a as Fl,b as ji,c as Cr,d as Pl}from"./chunk-4GZF7AYE.js";import{a as Ll}from"./chunk-5MSBCKNO.js";import{a as Il}from"./chunk-77GGAQET.js";import{E as Rl,h as El,i as ml,k as ul,l as pl,m as gl}from"./chunk-BNBVNC2U.js";import{a as vt}from"./chunk-UFHLR6NU.js";import{A as il,E as ol,G as rl,H as sl,J as al,K as ll,M as _l,N as cr,O as cl,S as dl,U as Cl,Z as dr,_ as Sl,a as Ja,ba as Tl,c as Ha,g as zi,i as Ka,j as ar,k as Wa,o as Qa,q as Za,r as lr,s as el,w as tl,y as nl,z as _r}from"./chunk-LPSBN34L.js";import"./chunk-EVDPTSZP.js";import{b as Al,c as Ml,e as Ol}from"./chunk-LWIUJFNA.js";import{a as fl,b as Nl}from"./chunk-AYNM43TC.js";import"./chunk-KEXADXL6.js";import{a as yi}from"./chunk-OOUN5NTZ.js";import{b as Ga,c as Ua}from"./chunk-XOZSQHGB.js";import{b as be}from"./chunk-YRO3BHNZ.js";import"./chunk-KQKVROK4.js";import"./chunk-WKBGAK42.js";import"./chunk-HYFNU66K.js";import{v as qa}from"./chunk-TIL2BXUZ.js";import{a as ba,b as ya}from"./chunk-FFSH4CMS.js";import{a as Aa,i as Pa,j as ha,k as ut,l as Ft}from"./chunk-Q4324DM7.js";import{c as ja}from"./chunk-ZUDLJFVY.js";import{e as vi,h as Gi}from"./chunk-XCLPVTZK.js";import"./chunk-GZSXTEYZ.js";import{a as Qe}from"./chunk-B46L77JZ.js";import"./chunk-FX7DTB5M.js";import{a as Bt,b as fa}from"./chunk-75UZSSKM.js";import{a as Na}from"./chunk-E2WWY3XV.js";import"./chunk-CWRK7QVJ.js";import{a as xi,g as Vi,i as Da,j as wa,k as Va,m as Xa,n as Xi,o as Ba,q as Bi,u as ka}from"./chunk-Q3LTV6WD.js";import{a as Ze}from"./chunk-7ZWQBUHQ.js";import{a as ga,e as va}from"./chunk-B7WN5ERR.js";import{a as La,c as Fa}from"./chunk-BMXPOK2J.js";import{c as ee,d as Pe,g as te}from"./chunk-KOT5LASO.js";import{a as cn,c as dn,h as ke}from"./chunk-C6PTJ6BN.js";import{Ae as Oe,Ak as Ca,Bb as Ei,Bc as pi,Bk as Sa,D as R,De as Ys,Dk as Ta,E as x,Ek as Fi,Fe as Vt,Gd as ks,Ge as Js,Ha as hs,He as Hs,Ib as xs,Ie as St,Je as Ke,Jk as sr,Ke as Tt,Ld as Y,Le as Et,Ma as Pn,Md as Ge,Me as Ks,Mk as Ea,N as B,Na as bs,Nc as ws,Nd as j,Ne as Mi,O as re,Ob as $s,Od as gi,Oe as st,Of as oa,P as y,Pe as ue,Q as Si,R as Ti,Rb as on,Re as Li,S as $,Sk as ma,T as Ve,Te as na,Tk as ua,Ue as Xt,Ve as an,Vk as Pi,We as ln,Xe as We,Xk as pa,Ye as De,Yh as sa,Ze as ia,ad as Vs,bi as or,da as Ps,de as fi,ee as Ni,ei as aa,fc as Gs,fe as wt,ga as z,gc as Ds,ge as rn,gk as _a,hc as Us,he as Q,ie as Ai,md as He,me as zs,oa as de,oe as Ie,pe as js,qe as _e,rg as ra,se as me,sg as hn,si as rr,td as Xs,te as Me,ud as Bs,ue as bt,ve as qs,we as ot,xe as Ue,xi as la,xk as ca,ye as sn,yk as da,ze as rt,zk as _n}from"./chunk-QRKZBIR3.js";import{H as Oi,Ia as Zs,La as ea,R as Ri,W as Ws,da as Qs,gb as ta,j as ci,k as Is,m as di,n as tn,o as Ls,qa as Lt,s as Fs,t as Ci,xa as Ii,ya as at,z as Le}from"./chunk-ABJTGOAB.js";import{$b as pe,$c as Dt,C as si,Ca as _s,Dd as It,E as $e,Ea as cs,Ed as W,G as Te,Gb as Je,Gd as Os,H as Nt,Hb as T,Ib as nt,Id as Rs,J as rs,Jb as E,K as Z,Ka as Ln,Kb as Be,Lb as se,Mb as ae,Mc as Zt,Na as _i,Nb as C,Nc as ps,Oa as ds,Ob as a,Oc as Ot,Pb as r,Q as ss,Qb as M,Rb as At,S as ht,Sb as Mt,Sc as I,T as ir,Tc as L,Td as en,Ub as w,Uc as gs,Vb as V,Wb as Ee,Wc as fe,Yc as fs,Za as Cs,Zb as h,ac as ge,ae as nn,bb as l,bc as c,be as ys,cd as Fn,ce as vs,da as Ne,dd as qe,e as gt,ea as $t,ed as Ns,f as lt,fc as it,fd as dt,ga as Gt,gc as u,ge as mi,ha as ai,he as ui,ic as d,jc as ms,k as In,kc as us,kd as Ct,la as as,m as ft,ma as Ae,n as Se,na as ls,ob as D,pb as Ss,qb as Ts,qc as _t,ra as m,rc as ct,s as F,sc as b,t as nr,tb as Es,u as Ye,ua as li,ub as O,uc as H,wd as As,xc as X,y as Xe,ya as N,yc as ce,yd as Ms,za as A,zc as Fe}from"./chunk-TGUHKKUV.js";import{a as g,b as f,d as Rt}from"./chunk-NZ6L75S5.js";var pt=(()=>{let t=class t{constructor(){this.http=m(en);}getIntegrationData(n){return this.http.get(`/customers/:customerId/externalSystems/${n}`);}startIntegration(n,i){return this.http.put(`/customers/:customerId/externalSystems/${n}`,{postExternalAuthorizationCallbackUrl:i});}setAccessKey(n,i){return this.http.put(`/customers/:customerId/externalSystems/${n}/accessKey`,{accessKey:i});}deleteIntegrationData(n){return this.http.delete(`/customers/:customerId/externalSystems/${n}`);}};t.ɵfac=function(i){return new(i||t)();},t.ɵprov=Ae({token:t,factory:t.ɵfac,providedIn:"root"});let e=t;return e;})();var zt=R("[CustomerSettings AFAS] Load AFAS Settings"),Yi=R("[CustomerSettings AFAS] Load AFAS Settings success",x()),Ji=R("[CustomerSettings AFAS] Load AFAS Settings failed",x()),Hi=R("[CustomerSettings AFAS] Set AFAS access key",x()),Ki=R("[CustomerSettings AFAS] Set AFAS access key success"),Tr=R("[CustomerSettings AFAS] Set AFAS access key failed",x()),Wi=R("[CustomerSettings AFAS] Show remove AFAS confirmation dialog"),wl=R("[CustomerSettings AFAS] Remove AFAS access key canceled"),Er=R("[CustomerSettings AFAS] Remove AFAS access key"),Qi=R("[CustomerSettings AFAS] Remove AFAS access key success"),mr=R("[CustomerSettings AFAS] Remove AFAS access key failed",x());var Vl=(()=>{let t=class t{constructor(){this.actions$=m(Ge),this.integrationsService=m(pt),this.confirmationDialog=m(We),this.getAfasSettings$=Y(()=>this.actions$.pipe(j(zt),Ne(()=>this.integrationsService.getIntegrationData("afas").pipe(F(({status:n})=>Yi({status:n})),Te(n=>Se(Ji({error:n}))))))),this.setAfasAccessKey$=Y(()=>this.actions$.pipe(j(Hi),Ne(({accessKey:n})=>this.integrationsService.setAccessKey("afas",n).pipe(F(()=>Ki()),Te(i=>Se(Tr({error:i}))))))),this.setAfasAccessKeySuccess$=Y(()=>this.actions$.pipe(j(Ki),F(()=>new De({message:"AFAS API token successfully added"}
1)))),this.openConfirmationDialog$=Y(()=>this.actions$.pipe(j(Wi),Ne(()=>this.confirmationDialog.openConfirmationDialog({title:"Remove AFAS API Token",cancelLabel:"Cancel",confirmLabel:"Confirm",message:"Are you sure that you want to remove the AFAS API Token?"}).pipe(F(n=>n?Er():wl()))))),this.removeAfasAccessKey$=Y(()=>this.actions$.pipe(j(Er),Ne(()=>this.integrationsService.deleteIntegrationData("afas").pipe(F(()=>Qi()),Te(n=>Se(mr({error:n}))))))),this.removeAfasAccessKeySuccess$=Y(()=>this.actions$.pipe(j(Qi),F(()=>new De({message:"AFAS API token successfully removed"})))),this.reloadAfasStatus$=Y(()=>this.actions$.pipe(j(Ki,Tr,Qi,mr),F(()=>zt())));}};t.ɵfac=function(i){return new(i||t)();},t.ɵprov=Ae({token:t,factory:t.ɵfac});let e=t;return e;})();var Zi=R("[CustomerSettings Update Settings From Modal] Update Approval Settings From Modal",x()),ur=R("[CustomerSettings Update Settings From Modal] Update Approval Settings From Modal Success",x()),Xl=R("[CustomerSettings Update Settings From Modal] Update Approval Settings From Modal Failure",x());var Bl=(()=>{let t=class t{constructor(){this.actions$=m(Ge),this.justificationAdvancedApprovalService=m($i),this.matDialog=m(wt),this.loadUserPermissionsAfterDefaultSettings$=Y(()=>this.actions$.pipe(j(Sa,Fi),F(({defaultJustificationReviewSettings:n})=>{let i=ys(nn(n.map(s=>s.assignments.map(_=>_.userId))));return Ea({requestParameters:{userIds:i}});}))),this.updateDefaultJustificationReviewSettingsFromModal$=Y(()=>this.actions$.pipe(j(Zi),ht(({dialogId:n,defaultJustificationReviewSettings:i})=>this.justificationAdvancedApprovalService.updateDefaultJustificationReviewSettings(i).pipe(F(()=>ur({defaultJustificationReviewSettings:i,dialogId:n})),Te(s=>Se(Xl({error:s}))))))),this.updateDefaultJustificationReviewSettingsFromModalSuccess$=Y(()=>this.actions$.pipe(j(ur),F(({dialogId:n,defaultJustificationReviewSettings:i})=>(this.matDialog.getDialogById(n)?.close(!0),Fi({defaultJustificationReviewSettings:i}))))),this.reviewSettingsUpdatedSuccessMessage$=Y(()=>this.actions$.pipe(j(Fi),F(()=>new De({message:"Approval settings saved successfully"}))));}};t.ɵfac=function(i){return new(i||t)();},t.ɵprov=Ae({token:t,factory:t.ɵfac,providedIn:"root"});let e=t;return e;})();var Cn=R("[CustomerSettings Card Settings] Set Card Settings For Edit",x());var kl=(()=>{let t=class t{constructor(){this.actions$=m(Ge),this.setCardSettingsForEdit$=Y(()=>this.actions$.pipe(j(vl),F(({defaultCardSettings:n})=>Cn({cardSettings:n}))));}};t.ɵfac=function(i){return new(i||t)();},t.ɵprov=Ae({token:t,factory:t.ɵfac});let e=t;return e;})();var eo=R("[CustomerSettings] Update Customer Client Batch",x()),pr=R("[CustomerSettings] Update Customer Client Batch Failed",x()),gr=R("[CustomerSettings] Update Customer Client Batch Success"),to=R("[CustomerSettings] Create Customer Client Batch",x()),fr=R("[CustomerSettings] Create Customer Client Batch Failed",x()),Nr=R("[CustomerSettings] Create Customer Client Batch Success"),Sn=R("[CustomerSettings] Store Customer Client List",x()),no=R("[CustomerSettings] Change Customer Client Property",x()),io=R("[CustomerSettings] Change New Customer Client Property",x()),yn=R("[CustomerSettings] Create Customer Client Success",x()),oo=R("[CustomerSettings] Update Customer Client Success",x()),Tn=R("[CustomerSettings] Add Empty Customer Client"),ro=R("[CustomerSettings] Remove Customer Client",x()),vn=R("[CustomerSettings] Change Search Filter",x()),xn=R("[CustomerSettings] Change Status Filter",x()),$n=R("[CustomerSettings] Update Client Legal Entity Filter",x());var zl=(()=>{let t=class t{constructor(){this.actions$=m(Ge),this.bookkeepingService=m(Ft),this.replaceCustomerClientList$=Y(()=>this.actions$.pipe(j(Ha),F(({customerClientList:n})=>Sn({customerClientList:n})))),this.addFirstEmptyClient$=Y(()=>this.actions$.pipe(j(Sn),F(()=>Tn()))),this.updateCustomerClientBatch$=Y(()=>this.actions$.pipe(j(eo),Ye(n=>ft(n.customerClients).pipe(Ye(i=>this.createUpdateRequest(i),40),Nt(),Ne(i=>i.filter(_=>_.type===pr.type).length===0?[...i,gr()]:i))))),this.createCustomerClientBatch$=Y(()=>this.actions$.pipe(j(to),Ye(n=>ft(n.customerClients).pipe(Ye(i=>this.createCreateRequest(i),40),Nt(),Ne(i=>i.filter(_=>_.type===fr.type).length===0?[...i,Nr()]:i))))),this.updateCustomerClientBatchSuccess$=Y(()=>this.actions$.pipe(j(gr),F(()=>{let n="Clients successfully edited.";return new De({message:n});}))),this.createCustomerClientBatchSuccess$=Y(()=>this.actions$.pipe(j(Nr),F(()=>{let n="Clients successfully added.";return new De({message:n});})));}createUpdateRequest(n){return this.bookkeepingService.updateClient(n).pipe(F(()=>oo({id:n.id})),Te(i=>Se(pr({error:i}))));}createCreateRequest(n){return this.bookkeepingService.createClient(n).pipe(F(i=>yn({customerClient:i,previousId:n.id})),Te(i=>Se(fr({error:i}))));}};t.ɵfac=function(i){return new(i||t)();},t.ɵprov=Ae({token:t,factory:t.ɵfac});let e=t;return e;})();
1var so=R("[CustomerSettings] Update Customer Cost Center Batch",x()),Ar=R("[CustomerSettings] Update Customer Cost Center Batch Failed"),ao=R("[CustomerSettings] Update Customer Cost Center Batch Success"),Gn=R("[CustomerSettings] Store Customer Cost Center List",x()),lo=R("[CustomerSettings] Change Customer Cost Center Property",x()),_o=R("[CustomerSettings] Change New Customer Cost Center Property",x()),co=R("[CustomerSettings] Create Customer Cost Center Success",x()),Mr=R("[CustomerSettings] Create Customer Cost Center Failed",x()),Co=R("[CustomerSettings] Add Empty Customer Cost Center"),So=R("[CustomerSettings] Remove Customer Cost Center",x()),Dn=R("[CustomerSettings] Update Cost Center search filter",x()),Un=R("[CustomerSettings] Update Cost Center status Filter",x()),wn=R("[CustomerSettings] Update Cost Center Legal Entity Filter",x()),jt=R("[CustomerSettings] Reset Cost Center Filters");var jl=(()=>{let t=class t{constructor(){this.actions$=m(Ge),this.bookkeepingService=m(Ft),this.storeCustomerCostCenterList$=Y(()=>this.actions$.pipe(j(Ka),F(({customerCostCenterList:n})=>Gn({customerCostCenterList:n.map(_=>{var S=_,{accounts:i}=S,s=Rt(S,["accounts"]);return s;})})))),this.updateCustomerCostCenterBatch$=Y(()=>this.actions$.pipe(j(so),Ye(({existingCostCenters:n,newCostCenters:i})=>{let s=n.map(p=>this.createUpdateRequest(p)),_=i.map(p=>this.createCreateRequest(p));return ft([...s,..._]).pipe(Ye(p=>p,40),Nt(),Ne(p=>p.filter(v=>v.type===Mr.type||v.type===ar.type).length===0?[...p,ao()]:[...p,Ar()]));}))),this.updateCustomerCostCenterBatchSuccess$=Y(()=>this.actions$.pipe(j(ao),F(()=>{let n="Cost centres updated successfully.";return new De({message:n});}))),this.resetCustomerCostCenterFilters$=Y(()=>this.actions$.pipe(j(ao,Ar),F(()=>jt())));}createUpdateRequest(n){return this.bookkeepingService.updateCostCenter(n).pipe(F(()=>Wa({customerCostCenter:n})),Te(i=>Se(ar({error:i}))));}createCreateRequest(n){let _=n,{id:i}=_,s=Rt(_,["id"]);return this.bookkeepingService.createCostCenter(s).pipe(F(({costCenter:S})=>co({customerCostCenter:S,previousId:n.id})),Te(S=>Se(Mr({error:S}))));}};t.ɵfac=function(i){return new(i||t)();},t.ɵprov=Ae({token:t,factory:t.ɵfac});let e=t;return e;})();var To=R("[CustomerSettings] Update Customer Cost Type Batch",x()),Eo=R("[CustomerSettings] Update Customer Cost Type Batch Success"),Or=R("[CustomerSettings] Update Customer Cost Type Batch Failed"),Vn=R("[CustomerSettings] Store Customer Cost Type List",x()),mo=R("[CustomerSettings] Change Customer Cost Type Property",x()),uo=R("[CustomerSettings] Change New Customer Cost Type Property",x()),po=R("[CustomerSettings] Create Customer Cost Type Success",x()),Rr=R("[CustomerSettings] Create Customer Cost Type Failed",x()),go=R("[CustomerSettings] Add Empty Customer Cost Type"),fo=R("[CustomerSettings] Remove Customer Cost Type",x()),Xn=R("[CustomerSettings] Update Cost Type search filter",x()),Bn=R("[CustomerSettings] Update Cost Type status Filter",x()),kn=R("[CustomerSettings] Update Cost Type Legal Entity Filter",x()),qt=R("[CustomerSettings] Reset Cost Type Filters");var ql=(()=>{let t=class t{constructor(){this.actions$=m(Ge),this.bookkeepingService=m(Ft),this.storeCustomerCostTypeList$=Y(()=>this.actions$.pipe(j(Za),F(({customerCostTypeList:n})=>Vn({customerCostTypeList:n.map(_=>{var S=_,{accounts:i}=S,s=Rt(S,["accounts"]);return s;})})))),this.updateCustomerCostTypeBatch$=Y(()=>this.actions$.pipe(j(To),Ye(({existingCostTypes:n,newCostTypes:i})=>{let s=n.map(p=>this.createUpdateRequest(p)),_=i.map(p=>this.createCreateRequest(p));return ft([...s,..._]).pipe(Ye(p=>p,40),Nt(),Ne(p=>p.filter(v=>v.type===Rr.type||v.type===lr.type).length===0?[...p,Eo()]:[...p,Or()]));}))),this.updateCustomerCostTypeBatchSuccess$=Y(()=>this.actions$.pipe(j(Eo),F(()=>{let n="Cost types updated successfully.";return new De({message:n});}))),this.resetCustomerCostTypeFilters$=Y(()=>this.actions$.pipe(j(Eo,Or),F(()=>qt())));}createUpdateRequest(n){return this.bookkeepingService.updateCostType(n).pipe(F(()=>el({customerCostType:n})),Te(i=>Se(lr({error:i}))));}createCreateRequest(n){let _=n,{id:i}=_,s=Rt(_,["id"]);return this.bookkeepingService.createCostType(s).pipe(F(({costType:S})=>po({customerCostType:S,previousId:n.id})),Te(S=>Se(Rr({error:S}))));}};t.ɵfac=function(i){return new(i||t)();},t.ɵprov=Ae({token:t,factory:t.ɵfac});let e=t;return e;})();
1var No=R("[CustomerSettings] Update Customer Cost Unit Batch",x()),Ao=R("[CustomerSettings] Update Customer Cost Unit Batch Success"),Ir=R("[CustomerSettings] Update Customer Cost Unit Batch Failed"),zn=R("[CustomerSettings] Store Customer Cost Unit List",x()),Mo=R("[CustomerSettings] Change Customer Cost Unit Property",x()),Oo=R("[CustomerSettings] Change New Customer Cost Unit Property",x()),Ro=R("[CustomerSettings] Create Customer Cost Unit Success",x()),Lr=R("[CustomerSettings] Create Customer Cost Unit Failed",x()),Io=R("[CustomerSettings] Add Empty Customer Cost Unit"),Lo=R("[CustomerSettings] Remove Customer Cost Unit",x()),jn=R("[CustomerSettings] Update Cost Unit search filter",x()),qn=R("[CustomerSettings] Update Cost Unit status Filter",x()),Yn=R("[CustomerSettings] Update Cost Unit Legal Entity Filter",x()),Yt=R("[CustomerSettings] Reset Cost Unit Filters");var Yl=(()=>{let t=class t{constructor(){this.actions$=m(Ge),this.bookkeepingService=m(Ft),this.storeCustomerCostUnitList$=Y(()=>this.actions$.pipe(j(nl),F(({customerCostUnitList:n})=>zn({customerCostUnitList:n})))),this.updateCustomerCostUnitBatch$=Y(()=>this.actions$.pipe(j(No),Ye(({existingCostUnits:n,newCostUnits:i})=>{let s=n.map(p=>this.createUpdateRequest(p)),_=i.map(p=>this.createCreateRequest(p));return ft([...s,..._]).pipe(Ye(p=>p,40),Nt(),Ne(p=>p.filter(v=>v.type===Lr.type||v.type===_r.type).length===0?[...p,Ao()]:[...p,Ir()]));}))),this.updateCustomerCostUnitBatchSuccess$=Y(()=>this.actions$.pipe(j(Ao),F(()=>{let n="Cost units updated successfully.";return new De({message:n});}))),this.resetCustomerCostUnitFilters$=Y(()=>this.actions$.pipe(j(Ao,Ir),F(()=>Yt())));}createUpdateRequest(n){return this.bookkeepingService.updateCostUnit(n).pipe(F(()=>il({customerCostUnit:n})),Te(i=>Se(_r({error:i}))));}createCreateRequest(n){let _=n,{id:i}=_,s=Rt(_,["id"]);return this.bookkeepingService.createCostUnit(s).pipe(F(S=>Ro({customerCostUnit:S,previousId:n.id})),Te(S=>Se(Lr({error:S}))));}};t.ɵfac=function(i){return new(i||t)();},t.ɵprov=Ae({token:t,factory:t.ɵfac});let e=t;return e;})();var Jt=R("[CustomerSettings Exact Globe] Load Exact Globe Settings"),Fo=R("[CustomerSettings Exact Globe] Load Exact Globe Settings success",x()),Po=R("[CustomerSettings Exact Globe] Load Exact Globe Settings failed",x()),ho=R("[CustomerSettings Exact Globe] Set Exact Globe credentials",x()),bo=R("[CustomerSettings Exact Globe] Set Exact Globe credentials success"),Fr=R("[CustomerSettings Exact Globe] Set Exact Globe credentials failed",x()),yo=R("[CustomerSettings Exact Globe] Show remove Exact Globe confirmation dialog"),Jl=R("[CustomerSettings Exact Globe] Remove Exact Globe credentials canceled"),Pr=R("[CustomerSettings Exact Globe] Remove Exact Globe credentials"),En=R("[CustomerSettings Exact Globe] Remove Exact Globe credentials success"),hr=R("[CustomerSettings Exact Globe] Remove Exact Globe credentials failed",x());var Hl=(()=>{let t=class t{constructor(){this.actions$=m(Ge),this.integrationsService=m(pt),this.confirmationDialog=m(We),this.getExactGlobeSettings$=Y(()=>this.actions$.pipe(j(Jt),Ne(()=>this.integrationsService.getIntegrationData(t.INTEGRATION_KEY).pipe(F(({status:n})=>Fo({status:n})),Te(n=>Se(Po({error:n}))))))),this.setExactGlobeCredentials$=Y(()=>this.actions$.pipe(j(ho),Ne(({username:n,secret:i})=>this.integrationsService.setAccessKey(t.INTEGRATION_KEY,JSON.stringify({username:n,secret:i})).pipe(F(()=>bo()),Te(s=>Se(Fr({error:s}))))))),this.setExactGlobeCredentialsSuccess$=Y(()=>this.actions$.pipe(j(bo),F(()=>new De({message:"Exact Globe credentials successfully added."})))),this.openConfirmationDialog$=Y(()=>this.actions$.pipe(j(yo),Ne(()=>this.confirmationDialog.openConfirmationDialog({title:"Remove Exact Globe credentials",cancelLabel:"Cancel",confirmLabel:"Confirm",message:"Are you sure that you want to remove your Exact Globe credentials?"}).pipe(F(n=>n?Pr():Jl()))))),this.removeExactGlobeCredentials$=Y(()=>this.actions$.pipe(j(Pr),Ne(()=>this.integrationsService.deleteIntegrationData(t.INTEGRATION_KEY).pipe(F(()=>En()),Te(n=>Se(hr({error:n}))))))),this.removeExactGlobeCredentialsSuccess$=Y(()=>this.actions$.pipe(j(En),F(()=>new De({message:"Exact Globe credentials successfully removed."})))),this.reloadExactGlobeStatus$=Y(()=>this.actions$.pipe(j(bo,Fr,En,hr),F(()=>Jt())));}};t.INTEGRATION_KEY="exactGlobe",t.ɵfac=function(i){return new(i||t)();},t.ɵprov=Ae({token:t,factory:t.ɵfac});let e=t;return e;})();
1var vo=R("[CustomerSettings] Update Customer Settings Prefilling",x()),q0=R("[CustomerSettings] Update Customer Settings Prefilling Failed",x()),Y0=R("[CustomerSettings] Update Customer Settings Prefilling Success"),xo=R("[CustomerSettings] Replace Customer Settings Prefilling List",x()),$o=R("[CustomerSettings] Change Customer Settings Prefilling Property",x()),Go=R("[CustomerSettings] Change Customer Settings Use Prefilling",x()),Do=R("[CustomerSettings] Change Customer Settings Use Prefilling Success",x()),Kl=R("[CustomerSettings] Change Customer Settings Use Prefilling Failed",x());var Wl=(()=>{let t=class t{constructor(){this.actions$=m(Ge),this.customerService=m(Bs),this.replaceCustomerSettingsPrefillingList$=Y(()=>this.actions$.pipe(j(rl),F(({customerPrefillingList:n})=>xo({customerPrefillingList:n})))),this.updateCustomerPrefilling$=Y(()=>this.actions$.pipe(j(vo),F(({customerPrefillingList:n})=>sl({customerPrefillingList:n})))),this.updateCustomerPrefillingSuccess$=Y(()=>this.actions$.pipe(j(al),F(()=>{let n="Prefillings updated successfully.";return new De({message:n});}))),this.changeUsePrefilling$=Y(()=>this.actions$.pipe(j(Go),Ne(({usePrefilling:n})=>this.customerService.changeCustomerGenericSettings({features:[{name:z.PREFILLING,usedByCustomer:n}]}).pipe(F(()=>Do({usePrefilling:n})),Te(i=>Se(Kl({error:i}))))))),this.changeUsePrefillingSuccess$=Y(()=>this.actions$.pipe(j(Do),F(({usePrefilling:n})=>{let i="Prefilling successfully enabled.";return n===!1&&(i="Prefilling successfully disabled."),new De({message:i});}))),this.reloadCustomer$=Y(()=>this.actions$.pipe(j(Do),F(()=>Ps())));}};t.ɵfac=function(i){return new(i||t)();},t.ɵprov=Ae({token:t,factory:t.ɵfac});let e=t;return e;})();var Uo=R("[CustomerSettings] Update Customer Project Batch",x()),br=R("[CustomerSettings] Update Customer Project Batch Failed"),mn=R("[CustomerSettings] Update Customer Project Batch Success"),Jn=R("[CustomerSettings] Store Customer Project List",x()),wo=R("[CustomerSettings] Change Customer Project Property",x()),Vo=R("[CustomerSettings] Change New Customer Project Property",x()),Xo=R("[CustomerSettings] Create Customer Project Success",x()),yr=R("[CustomerSettings] Create Customer Project Failed",x()),Bo=R("[CustomerSettings] Add Empty Customer Project"),ko=R("[CustomerSettings] Remove Customer Project",x()),Hn=R("[CustomerSettings] Update Project search filter",x()),Kn=R("[CustomerSettings] Update Project status Filter",x()),Wn=R("[CustomerSettings] Update Project Legal Entity Filter",x()),Ht=R("[CustomerSettings] Reset Project Filters");var Ql=(()=>{let t=class t{constructor(){this.actions$=m(Ge),this.bookkeepingService=m(Ft),this.storeCustomerProjectList$=Y(()=>this.actions$.pipe(j(_l),F(({customerProjectList:n})=>Jn({customerProjectList:n})))),this.updateCustomerProjectBatch$=Y(()=>this.actions$.pipe(j(Uo),Ye(({changedProjects:n,newProjects:i})=>{let s=n.map(p=>this.createUpdateRequest(p)),_=i.map(p=>this.createCreateRequest(p));return ft([...s,..._]).pipe(Ye(p=>p,40),Nt(),Ne(p=>p.filter(v=>v.type===yr.type||v.type===cr.type).length===0?[...p,mn()]:[...p,br()]));}))),this.updateCustomerProjectBatchSuccess$=Y(()=>this.actions$.pipe(j(mn),F(()=>{let n="Projects updated successfully.";return new De({message:n});}))),this.resetCustomerProjectFilters$=Y(()=>this.actions$.pipe(j(mn,br),F(()=>Ht())));}createUpdateRequest(n){return this.bookkeepingService.updateProject(n).pipe(F(()=>cl({customerProject:n})),Te(i=>Se(cr({error:i}))));}createCreateRequest(n){let _=n,{id:i}=_,s=Rt(_,["id"]);return this.bookkeepingService.createProject(s).pipe(F(S=>Xo({customerProject:S,previousId:n.id})),Te(S=>Se(yr({error:S}))));}};t.ɵfac=function(i){return new(i||t)();},t.ɵprov=Ae({token:t,factory:t.ɵfac});let e=t;return e;})();var zo=R("[CustomerSettings] Update Customer Vat Batch",x()),jo=R("[CustomerSettings] Update Customer Vat Batch Success"),vr=R("[CustomerSettings] Update Customer Vat Batch Failed"),Qn=R("[CustomerSettings] Store Customer Vat List",x()),qo=R("[CustomerSettings] Change Customer Vat Property",x()),Yo=R("[CustomerSettings] Change New Customer Vat Property",x()),Jo=R("[CustomerSettings] Create Customer Vat Success",x()),xr=R("[CustomerSettings] Create Customer Vat Failed",x()),Ho=R("[CustomerSettings] Add Empty Customer Vat"),Ko=R("[CustomerSettings] Remove Customer Vat",x()),Zn=R("[CustomerSettings] Upd
1ate Vat search filter",x()),ei=R("[CustomerSettings] Update Vat status Filter",x()),ti=R("[CustomerSettings] Update Vat legal entity Filter",x()),Kt=R("[CustomerSettings] Reset Vat Filters");var Zl=(()=>{let t=class t{constructor(){this.actions$=m(Ge),this.bookkeepingService=m(Ft),this.storeCustomerVatList$=Y(()=>this.actions$.pipe(j(Cl),F(({customerVatList:n})=>Qn({customerVatList:n})))),this.updateCustomerVatBatch$=Y(()=>this.actions$.pipe(j(zo),Ye(({existingVats:n,newVats:i})=>{let s=n.map(p=>this.createUpdateRequest(p)),_=i.map(p=>this.createCreateRequest(p));return ft([...s,..._]).pipe(Ye(p=>p,40),Nt(),Ne(p=>p.filter(v=>v.type===xr.type||v.type===dr.type).length===0?[...p,jo()]:[...p,vr()]));}))),this.updateCustomerVatBatchSuccess$=Y(()=>this.actions$.pipe(j(jo),F(()=>{let n="Vats updated successfully.";return new De({message:n});}))),this.resetCustomerVatFilters$=Y(()=>this.actions$.pipe(j(jo,vr),F(()=>Kt())));}createUpdateRequest(n){return this.bookkeepingService.updateVat(n).pipe(F(()=>Sl({customerVat:n})),Te(i=>Se(dr({error:i}))));}createCreateRequest(n){let _=n,{id:i}=_,s=Rt(_,["id"]);return this.bookkeepingService.createVat(s).pipe(F(S=>Jo({customerVat:S,previousId:n.id})),Te(S=>Se(xr({error:S}))));}};t.ɵfac=function(i){return new(i||t)();},t.ɵprov=Ae({token:t,factory:t.ɵfac});let e=t;return e;})();var e_=[kl,Vl,Yl,Ql,Zl,zl,Wl,jl,ql,Hl,Bl];var Id={status:null,loaded:!1},Ld=Ve(Id,$(zt,e=>f(g({},e),{loaded:!1})),$(Yi,(e,{status:t})=>f(g({},e),{status:t,loaded:!0})),$(Ji,e=>f(g({},e),{status:null,loaded:!0})));function t_(e,t){return Ld(e,t);}var Fd={cardSettings:null},Pd=Ve(Fd,$(Cn,(e,{cardSettings:t})=>f(g({},e),{cardSettings:t})));function n_(e,t){return Pd(e,t);}function ze(e,t){return t.toUpperCase().includes(e.toUpperCase());}var hd={customerClientSettings:[],editedIds:[],filteredClientIds:[],filters:{search:"",statusActive:!0,legalEntityId:null},newClients:[],nextCreatedId:1},bd=Ve(hd,$(Sn,(e,{customerClientList:t})=>f(g({},e),{customerClientSettings:[...t.map(o=>f(g({},o),{legalEntityId:o.legalEntityId||-1}))],editedIds:[],filters:{search:"",statusActive:!0,legalEntityId:null},newClients:[],nextCreatedId:1})),$(yn,(e,{customerClient:t,previousId:o})=>f(g({},e),{customerClientSettings:[...e.customerClientSettings,f(g({},t),{legalEntityId:t.legalEntityId||-1})],newClients:e.newClients.filter(n=>n.id!==o)})),$(oo,(e,{id:t})=>f(g({},e),{editedIds:e.editedIds.filter(o=>o!==t)})),$(no,(e,{id:t,property:o,newValue:n})=>xs(e,i=>{let s=i.customerClientSettings.find(_=>_.id===t);s[o]=n,i.editedIds=[...i.editedIds.filter(_=>_!==t),t];})),$(io,(e,{id:t,property:o,newValue:n})=>f(g({},e),{newClients:[...e.newClients.map(i=>i.id!==t?i:f(g({},i),{[o]:n}))]})),$(Tn,e=>f(g({},e),{newClients:[...e.newClients,{id:e.nextCreatedId,name:"",group:null,reference1:"",reference2:null,reference3:null,active:!0,legalEntityId:-1}],nextCreatedId:e.nextCreatedId+1})),$(ro,(e,{id:t})=>f(g({},e),{newClients:e.newClients.filter(o=>o.id!==t)})),$(vn,(e,{filter:t})=>f(g({},e),{filters:f(g({},e.filters),{search:t})})),$(xn,(e,{statusActive:t})=>f(g({},e),{filters:f(g({},e.filters),{statusActive:t})})),$($n,(e,{legalEntityId:t})=>f(g({},e),{filters:f(g({},e.filters),{legalEntityId:t})})),$(vn,xn,$n,Sn,yn,e=>f(g({},e),{filteredClientIds:e.customerClientSettings.filter(t=>(e.filters.legalEntityId===null||t.legalEntityId===e.filters.legalEntityId)&&(e.filters.statusActive===null||t.active===e.filters.statusActive)&&(ze(e.filters.search,t.name)||ze(e.filters.search,t.group??"")||ze(e.filters.search,t.reference1)||ze(e.filters.search,t.reference2??"")||ze(e.filters.search,t.reference3??""))).map(t=>t.id)})));function i_(e,t){return bd(e,t);}var o_={customerCostCenterSettings:[],filters:{search:"",statusActive:!0,legalEntityId:null},filteredCostCentersIds:[],newCostCenters:[],nextCreatedId:1},yd=Ve(o_,$(Gn,(e,{customerCostCenterList:t})=>f(g({},e),{customerCostCenterSettings:[...t.map(o=>f(g({},o),{legalEntityId:o.legalEntityId||-1}))],newCostCenters:[],nextCreatedId:1})),$(co,(e,{customerCostCenter:t,previousId:o})=>f(g({},e),{customerCostCenterSettings:[...e.customerCostCenterSettings,f(g({},t),{legalEntityId:t.legalEntityId||-1})],newCostCenters:e.newCostCenters.filter(n=>n.id!==o)})),$(lo,(e,{id:t,property:o,newValue:n})=>f(g({},e),{customerCostCenterSettings:[...e.customerCostCenterSettings.map(i=>i.id!==t?i:f(g({},i),{[o]:n}))]})),$(_o,(e,{id:t,property:o,newValue:n})=>f(g({},e),{newCostCenters:[...e.newCostCenters.map(i=>i.id!==t?i:f(g({},i),{[o]:n}))]})),$(Co,e=>f(g({},e),{newCostCenters:[...e.newCostCenters,{description:"",code:null,active:!0,id:e.nextCreatedId,legalEntityId:-1}],nextCreatedId:e.nextCreatedId+1})),$(So,(e,{id:t})=>f(g({},e),{newCostCenters:e.newCostCenters.filter(o=>o.id!==t)})),$(Dn,(e,{searchValue:t})=>f(g({},e),{filters:f(g({},e.filters),{search:t})})),$(Un,(e,{statusActive:t})=>f(g({},e),{filters:f(g({},e.filters),{statusActive:t})})),$(wn,(e,{legalEntityId:t})=>f(g({},e),{filters:f(g({},e.filters),{legalEntityId:t})})),$(jt,e=>f(g({},e),{filters:g({},o_.filters)}
1)),$(Dn,Un,wn,jt,Gn,e=>f(g({},e),{filteredCostCentersIds:e.customerCostCenterSettings.filter(t=>(e.filters.legalEntityId===null||t.legalEntityId===e.filters.legalEntityId)&&(e.filters.statusActive===null||t.active===e.filters.statusActive)&&(ze(e.filters.search,t.description)||ze(e.filters.search,t.code??""))).map(t=>t.id)})));function r_(e,t){return yd(e,t);}var s_={customerCostTypeSettings:[],filters:{search:"",statusActive:!0,legalEntityId:null},filteredCostTypesIds:[],newCostTypes:[],nextCreatedId:1},vd=Ve(s_,$(Vn,(e,{customerCostTypeList:t})=>f(g({},e),{customerCostTypeSettings:[...t.map(o=>f(g({},o),{legalEntityId:o.legalEntityId||-1}))],newCostTypes:[],nextCreatedId:1})),$(po,(e,{customerCostType:t,previousId:o})=>f(g({},e),{customerCostTypeSettings:[...e.customerCostTypeSettings,f(g({},t),{legalEntityId:t.legalEntityId||-1})],newCostTypes:e.newCostTypes.filter(n=>n.id!==o)})),$(mo,(e,{id:t,property:o,newValue:n})=>f(g({},e),{customerCostTypeSettings:[...e.customerCostTypeSettings.map(i=>i.id!==t?i:f(g({},i),{[o]:n}))]})),$(uo,(e,{id:t,property:o,newValue:n})=>f(g({},e),{newCostTypes:[...e.newCostTypes.map(i=>i.id!==t?i:f(g({},i),{[o]:n}))]})),$(go,e=>f(g({},e),{newCostTypes:[...e.newCostTypes,{description:"",externalLedger:"",active:!0,id:e.nextCreatedId,legalEntityId:-1}],nextCreatedId:e.nextCreatedId+1})),$(fo,(e,{id:t})=>f(g({},e),{newCostTypes:e.newCostTypes.filter(o=>o.id!==t)})),$(Xn,(e,{searchValue:t})=>f(g({},e),{filters:f(g({},e.filters),{search:t})})),$(Bn,(e,{statusActive:t})=>f(g({},e),{filters:f(g({},e.filters),{statusActive:t})})),$(kn,(e,{legalEntityId:t})=>f(g({},e),{filters:f(g({},e.filters),{legalEntityId:t})})),$(qt,e=>f(g({},e),{filters:g({},s_.filters)}
1)),$(Xn,Bn,kn,qt,Vn,e=>f(g({},e),{filteredCostTypesIds:e.customerCostTypeSettings.filter(t=>(e.filters.legalEntityId===null||t.legalEntityId===e.filters.legalEntityId)&&(e.filters.statusActive===null||t.active===e.filters.statusActive)&&(ze(e.filters.search,t.description)||ze(e.filters.search,t.externalLedger??""))).map(t=>t.id)})));function a_(e,t){return vd(e,t);}var l_={customerCostUnitSettings:[],filters:{search:"",statusActive:!0,legalEntityId:null},filteredCostUnitsIds:[],newCostUnits:[],nextCreatedId:1},xd=Ve(l_,$(zn,(e,{customerCostUnitList:t})=>f(g({},e),{customerCostUnitSettings:t.map(o=>f(g({},o),{legalEntityId:o.legalEntityId||-1})),newCostUnits:[],nextCreatedId:1})),$(Ro,(e,{customerCostUnit:t,previousId:o})=>f(g({},e),{customerCostUnitSettings:[...e.customerCostUnitSettings,f(g({},t),{legalEntityId:t.legalEntityId||-1})],newCostUnits:e.newCostUnits.filter(n=>n.id!==o)})),$(Mo,(e,{id:t,property:o,newValue:n})=>f(g({},e),{customerCostUnitSettings:e.customerCostUnitSettings.map(i=>i.id!==t?i:f(g({},i),{[o]:n}))})),$(Oo,(e,{id:t,property:o,newValue:n})=>f(g({},e),{newCostUnits:e.newCostUnits.map(i=>i.id!==t?i:f(g({},i),{[o]:n}))})),$(Io,e=>f(g({},e),{newCostUnits:[...e.newCostUnits,{description:"",code:"",active:!0,id:e.nextCreatedId,legalEntityId:-1}],nextCreatedId:e.nextCreatedId+1})),$(Lo,(e,{id:t})=>f(g({},e),{newCostUnits:e.newCostUnits.filter(o=>o.id!==t)})),$(jn,(e,{searchValue:t})=>f(g({},e),{filters:f(g({},e.filters),{search:t})})),$(qn,(e,{statusActive:t})=>f(g({},e),{filters:f(g({},e.filters),{statusActive:t})})),$(Yn,(e,{legalEntityId:t})=>f(g({},e),{filters:f(g({},e.filters),{legalEntityId:t})})),$(Yt,e=>f(g({},e),{filters:g({},l_.filters)})),$(jn,qn,Yn,Yt,zn,e=>f(g({},e),{filteredCostUnitsIds:e.customerCostUnitSettings.filter(t=>(e.filters.legalEntityId===null||t.legalEntityId===e.filters.legalEntityId)&&(e.filters.statusActive===null||t.active===e.filters.statusActive)&&(ze(e.filters.search,t.description)||ze(e.filters.search,t.code??""))).map(t=>t.id)})));function __(e,t){return xd(e,t);}var $d={status:null,loaded:!1},Gd=Ve($d,$(Jt,e=>f(g({},e),{loaded:!1})),$(Fo,(e,{status:t})=>f(g({},e),{status:t,loaded:!0})),$(Po,e=>f(g({},e),{status:null,loaded:!0})));function c_(e,t){return Gd(e,t);}var ni=R("[CustomerSettings MasterAccounts] Set Master For Edit",x()),ii=R("[CustomerSettings MasterAccounts] Set Master Validity",x());var Dd={masterAccount:null,valid:!0},Ud=Ve(Dd,$(ni,(e,{masterAccount:t})=>f(g({},e),{masterAccount:t})),$(ii,(e,{valid:t})=>f(g({},e),{valid:t})));function d_(e,t){return Ud(e,t);}var wd={customerPrefillingSettings:[]},Vd=Ve(wd,$(xo,(e,{customerPrefillingList:t})=>f(g({},e),{customerPrefillingSettings:[...t]})),$($o,(e,{index:t,property:o,newValue:n})=>f(g({},e),{customerPrefillingSettings:[...e.customerPrefillingSettings.map((i,s)=>s!==t?i:f(g({},i),{[o]:n}))]})));function C_(e,t){return Vd(e,t);}var S_={customerProjectSettings:[],changedProjectIds:[],filters:{search:"",statusActive:!0,legalEntityId:null},filteredProjectsIds:[],newProjects:[],nextCreatedId:1},Xd=Ve(S_,$(Jn,(e,{customerProjectList:t})=>f(g({},e),{customerProjectSettings:t.map(o=>f(g({},o),{legalEntityId:o.legalEntityId??-1})),newProjects:[],nextCreatedId:1})),$(Xo,(e,{customerProject:t,previousId:o})=>f(g({},e),{customerProjectSettings:[...e.customerProjectSettings,f(g({},t),{legalEntityId:t.legalEntityId??-1})],newProjects:e.newProjects.filter(n=>n.id!==o)})),$(wo,(e,{id:t,property:o,newValue:n})=>f(g({},e),{customerProjectSettings:[...e.customerProjectSettings.map(i=>i.id!==t?i:f(g({},i),{[o]:n}))],changedProjectIds:e.changedProjectIds.includes(t)?e.changedProjectIds:[...e.changedProjectIds,t]})),$(Vo,(e,{id:t,property:o,newValue:n})=>f(g({},e),{newProjects:[...e.newProjects.map(i=>i.id!==t?i:f(g({},i),{[o]:n}))]})),$(Bo,e=>f(g({},e),{newProjects:[...e.newProjects,{description:"",code:"",active:!0,legalEntityId:-1,id:e.nextCreatedId}],nextCreatedId:e.nextCreatedId+1})),$(ko,(e,{id:t})=>f(g({},e),{newProjects:e.newProjects.filter(o=>o.id!==t)})),$(Hn,(e,{searchValue:t})=>f(g({},e),{filters:f(g({},e.filters),{search:t})})),$(Kn,(e,{statusActive:t})=>f(g({},e),{filters:f(g({},e.filters),{statusActive:t})})),$(Wn,(e,{legalEntityId:t})=>f(g({},e),{filters:f(g({},e.filters),{legalEntityId:t})})),$(Ht,e=>f(g({},e),{filters:g({},S_.filters)}
1)),$(Hn,Kn,Wn,Ht,Jn,e=>f(g({},e),{filteredProjectsIds:e.customerProjectSettings.filter(t=>(e.filters.statusActive===null||t.active===e.filters.statusActive)&&(e.filters.legalEntityId===null||t.legalEntityId===e.filters.legalEntityId)&&(ze(e.filters.search,t.description)||ze(e.filters.search,t.code??""))).map(t=>t.id)})),$(mn,e=>f(g({},e),{changedProjectIds:[]})));function T_(e,t){return Xd(e,t);}var E_={customerVatSettings:[],filters:{search:"",statusActive:!0,legalEntityId:null},filteredVatsIds:[],newVats:[],nextCreatedId:1},Bd=Ve(E_,$(Qn,(e,{customerVatList:t})=>f(g({},e),{customerVatSettings:[...t.map(o=>f(g({},o),{legalEntityId:o.legalEntityId||-1}))],newVats:[],nextCreatedId:1})),$(Jo,(e,{customerVat:t,previousId:o})=>f(g({},e),{customerVatSettings:[...e.customerVatSettings,f(g({},t),{legalEntityId:t.legalEntityId||-1})],newVats:e.newVats.filter(n=>n.id!==o)})),$(qo,(e,{id:t,property:o,newValue:n})=>f(g({},e),{customerVatSettings:[...e.customerVatSettings.map(i=>i.id!==t?i:f(g({},i),{[o]:n}))]})),$(Yo,(e,{id:t,property:o,newValue:n})=>f(g({},e),{newVats:[...e.newVats.map(i=>i.id!==t?i:f(g({},i),{[o]:n}))]})),$(Ho,e=>f(g({},e),{newVats:[...e.newVats,{description:"",percentage:"",code:"",ledger:"",legalEntityId:-1,active:!0,id:e.nextCreatedId}],nextCreatedId:e.nextCreatedId+1})),$(Ko,(e,{id:t})=>f(g({},e),{newVats:e.newVats.filter(o=>o.id!==t)})),$(Zn,(e,{searchValue:t})=>f(g({},e),{filters:f(g({},e.filters),{search:t})})),$(ei,(e,{statusActive:t})=>f(g({},e),{filters:f(g({},e.filters),{statusActive:t})})),$(ti,(e,{legalEntityId:t})=>f(g({},e),{filters:f(g({},e.filters),{legalEntityId:t})})),$(Kt,e=>f(g({},e),{filters:g({},E_.filters)}
1)),$(Zn,ei,Kt,Qn,ti,e=>f(g({},e),{filteredVatsIds:e.customerVatSettings.filter(t=>(e.filters.statusActive===null||t.active===e.filters.statusActive)&&(e.filters.legalEntityId===null||t.legalEntityId===e.filters.legalEntityId)&&(ze(e.filters.search,t.description)||ze(e.filters.search,t.code)||ze(e.filters.search,t.ledger??""))).map(t=>t.id)})));function m_(e,t){return Bd(e,t);}var $r="customerSettings",je=Si($r),u_={cardSettings:n_,afasSettings:t_,exactGlobeSettings:c_,masterAccount:d_,customerVatSettings:m_,customerClientSettings:i_,customerCostUnitSettings:__,customerPrefillingSettings:C_,customerProjectSettings:T_,customerCostCenterSettings:r_,customerCostTypeSettings:a_};function p_(){return li(Ti.forFeature($r,u_),gi.forFeature(e_));}var Gr="accountStatementFeature",oi=Si(Gr);var g_=(()=>{let t=class t{constructor(){this.http=m(en);}getAccountStatements(n){return this.http.get("/customers/:customerId/accountStatements",{observe:"response",params:ui(n)});}getAccountStatementsForGrid(n){return this.getAccountStatements(n).pipe(F(i=>oa(i,n)));}};t.ɵfac=function(i){return new(i||t)();},t.ɵprov=Ae({token:t,factory:t.ɵfac,providedIn:"root"});let e=t;return e;})();var un=R("[Account Statements] Load Account Statements",x()),Wo=R("[Account Statements] Load Account Statements Success",x()),Qo=R("[Account Statements] Load Account Statements Failed",x());var f_=(()=>{let t=class t{constructor(){this.actions$=m(Ge),this.accountStatementService=m(g_),this.loadAccountStatementList$=Y(()=>this.actions$.pipe(j(un),Ne(({requestParameters:n})=>this.accountStatementService.getAccountStatementsForGrid(n).pipe(F(({items:i,totalCount:s})=>Wo({accountStatements:i,totalCount:s})),Te(i=>Se(Qo({error:i})))))));}};t.ɵfac=function(i){return new(i||t)();},t.ɵprov=Ae({token:t,factory:t.ɵfac});let e=t;return e;})();var Zo=$s(),kd=Zo.getInitialState({loaded:!1,loading:!1,totalCount:0}),zd=Ve(kd,$(un,e=>f(g({},e),{loaded:!1,loading:!0,totalCount:0})),$(Wo,(e,{accountStatements:t,totalCount:o})=>Zo.setAll(t,f(g({},e),{totalCount:o,loaded:!0,loading:!1}))),$(Qo,e=>f(g({},e),{loaded:!1,loading:!1})));function N_(e,t){return zd(e,t);}function A_(){return li(Ti.forFeature(Gr,N_),gi.forFeature(f_));}var er=(()=>{let t=class t{constructor(){this.authService=m(Xs);}getConfig(){return[{name:"General",allowed:()=>Xe([this.authService.isMaster(),this.authService.isAdmin(),this.authService.isCashmanager()]).pipe(F(([n,i,s])=>n&&i||s)),menuItems:[{name:"Master account",route:"/customer-settings/master-account",allowed:()=>Xe([this.authService.isMaster(),this.authService.isCashmanager()]).pipe(F(([n,i])=>n&&i))},{name:"SimpledCard Card Overview",route:"/customer-settings/card-overview",allowed:()=>this.authService.isAdmin()},{name:"Legal entities",route:"/customer-settings/legal-entities",allowed:()=>Xe([this.authService.isMaster(),this.authService.isAdmin(),this.authService.isFeatureActive(z.MULTIPLE_COMPANIES)]).pipe(F(([n,i,s])=>n&&i&&s))}]},{name:"Financial",allowed:()=>Xe([this.authService.isMaster(),this.authService.isAdmin(),this.authService.isCashmanager()]).pipe(F(([n,i,s])=>n&&(i||s))),menuItems:[{name:"VAT",route:"/customer-settings/financial/vats",allowed:()=>Xe([this.authService.isMaster(),this.authService.isAdmin(),this.authService.isCashmanager(),this.authService.isFeatureActive(z.EXPENSE_MANAGEMENT)]).pipe(F(([n,i,s,_])=>n&&(i||s)&&_))},{name:"Cost types",route:"/customer-settings/financial/cost-types",allowed:()=>Xe([this.authService.isMaster(),this.authService.isAdmin(),this.authService.isCashmanager(),this.authService.isFeatureActive(z.EXPENSE_MANAGEMENT)]).pipe(F(([n,i,s,_])=>n&&(i||s)&&_))},{name:"Cost centres",route:"/customer-settings/financial/cost-centers",allowed:()=>Xe([this.authService.isMaster(),this.authService.isAdmin(),this.authService.isCashmanager()]).pipe(F(([n,i,s])=>n&&(i||s)))},{name:"Cost units",route:"/customer-settings/financial/cost-units",allowed:()=>Xe([this.authService.isMaster(),this.authService.isAdmin(),this.authService.isCashmanager(),this.authService.isFeatureActive(z.COST_UNITS)]).pipe(F(([n,i,s,_])=>n&&(i||s)&&_))},{name:"Projects",route:"/customer-settings/financial/projects",allowed:()=>Xe([this.authService.isMaster(),this.authService.isAdmin(),this.authService.isCashmanager(),this.authService.isFeatureActive(z.PROJECTS)]).pipe(F(([n,i,s,_])=>n&&(i||s)&&_))},{name:"Clients",route:"/customer-settings/financial/clients",allowed:()=>Xe([this.authService.isMaster(),this.authService.isAdmin(),this.authService.isCashmanager(),this.authService.isFeatureActive(z.CLIENT_FUNDS)]).pipe(F(([n,i,s,_])=>n&&(i||s)&&_))},{name:"Card settings",route:"/customer-settings/card-settings",allowed:()=>Xe([this.authService.isMaster(),this.authService.isAdmin()]).pipe(F(([n,i])=>n&&i))},{name:"Creditor ledger",route:"/customer-settings/global-ledger",allowed:()=>Xe([this.authService.isMaster(),this.authService.isAdmin(),this.authService.isFeatureActive(z.REIMBURSEMENT)]).pipe(F(([n,i,s])=>n&&i&&s))},{name:"Bank payments suspense ledger",route:"/customer-settings/financial/bank-payment-suspense-ledger",allowed:()=>Xe([this.authService.isMaster(),this.authService.isAdmin(),this.authService.isFeatureActive(z.REIMBURSEMENT_PAYOUT)]).pipe(F(([n,i,s])=>n&&i&&s))}]},{name:"Justification",allowed:()=>Xe([this.authService.isMaster(),this.authService.isAdmin(),this.authService.isCashmanager(),this.authService.isAccountant()]).pipe(F(([n,i,s,_])=>n&&(i||s||_))),menuItems:[{name:"Justification rules",route:"/customer-settings/justification-rules",allowed:()=>Xe([this.authService.isMasterAdminOrMasterCashmanager(),this.authService.isFeatureActive(z.JUSTIFICATION_CONFIGURATOR)]).pipe(F(([n,i])=>i&&n))},{name:"Prefilling of justifications",route:"/customer-settings/financial/prefilling",allowed:()=>Xe([this.authService.isMaster(),this.authService.isAdmin(),this.authService.isCashmanager(),this.authService.isFeatureActive(z.EXPENSE_MANAGEMENT),this.authService.isFeatureActive(z.PREFILLING)]).pipe(F(([n,i,s,_,S])=>n&&(i||s)&&_&&S))},{name:"Approval settings",allowed:()=>Xe([this.authService.isMaster(),this.authService.isAdmin(),this.authService.isFeatureActive(z.ADVANCED_APPROVAL_JUSTIFICATIONS),this.authService.isFeatureActive(z.EXPENSE_JUSTIFICATION_PREVENT_SELF_REVIEW)]).pipe(F(([n,i,s,_])=>n&&i&&(s||_))),tabs:[{name:"Approval stages",route:"/customer-settings/approval-sett
1ings/approval-stages",allowed:()=>this.authService.isFeatureActive(z.ADVANCED_APPROVAL_JUSTIFICATIONS)},{name:"Default assignees",route:"/customer-settings/approval-settings/default-assignees",allowed:()=>this.authService.isFeatureActive(z.ADVANCED_APPROVAL_JUSTIFICATIONS)},{name:"Multiple-eyes principle",route:"/customer-settings/approval-settings/multiple-eyes",allowed:()=>this.authService.isFeatureActive(z.ADVANCED_APPROVAL_JUSTIFICATIONS)},{name:"Self approval",route:"/customer-settings/approval-settings/self-approval",allowed:()=>this.authService.isFeatureActive(z.EXPENSE_JUSTIFICATION_PREVENT_SELF_REVIEW)}]},{name:"Request receipts",route:"/customer-settings/download-receipts",allowed:()=>Xe([this.authService.isMaster(),this.authService.isAccountant(),this.authService.isFeatureActive(z.EXPENSE_MANAGEMENT)]).pipe(F(([n,i,s])=>n&&i&&s))},{name:"Download statements",route:"/customer-settings/download-statements",allowed:()=>Xe([this.authService.isMaster(),this.authService.isAccountant(),this.authService.isFeatureActive(z.ADYEN_BANKING)]).pipe(F(([n,i,s])=>n&&i&&s))}]},{name:"Integrations",allowed:()=>Xe([this.authService.isMaster(),this.authService.isAdmin()]).pipe(F(([n,i])=>n&&i)),menuItems:[{name:"Exact online",route:"/customer-settings/integrations/exact-online",allowed:()=>this.authService.isFeatureActive(z.EXPORT_EXACT_ONLINE)},{name:"Exact online BE",route:"/customer-settings/integrations/exact-online-be",allowed:()=>this.authService.isFeatureActive(z.EXPORT_EXACT_ONLINE_BE)},{name:"Exact Globe",route:"/customer-settings/integrations/exact-globe",allowed:()=>this.authService.isFeatureActive(z.EXPORT_EXACT_GLOBE)},{name:"Twinfield",route:"/customer-settings/integrations/twinfield",allowed:()=>this.authService.isFeatureActive(z.EXPORT_TWINFIELD)},{name:"Dynamics 365 Business Central",route:"/customer-settings/integrations/business-central",allowed:()=>this.authService.isFeatureActive(z.EXPORT_BUSINESS_CENTRAL)},{name:"Odoo",route:"/customer-settings/integrations/odoo",allowed:()=>this.authService.isFeatureActive(z.EXPORT_ODOO)},{name:"AFAS API",route:"/customer-settings/integrations/afas",allowed:()=>this.authService.isFeatureActive(z.EXPORT_AFAS)},{name:"EmailXpenC",route:"/customer-settings/integrations/emailxpenc",allowed:()=>this.authService.isFeatureActive(z.EXPORT_EMAILXPENC)},{name:"OpenBanking AISP/TPP Access",route:"/customer-settings/integrations/open-banking",allowed:()=>Xe([this.authService.isMasterAdmin(),this.authService.isFeatureActive(z.OPEN_BANKING_ACCOUNT_INFORMATION_ACCESS)]).pipe(F(([n,i])=>n&&i))}]}];}getFirstAllowedRoute(){let n=this.getConfig(),i=[];return n.forEach(s=>{s.menuItems.forEach(_=>{_.tabs?_.tabs.forEach(S=>{i.push(Xe([_.allowed(),S.allowed()]).pipe(Z(1),$e(([p,P])=>p&&P),F(()=>S.route)));}):i.push(_.allowed().pipe(Z(1),$e(S=>S),F(()=>_.route)));});}),si(...i).pipe(Z(1));}};t.ɵfac=function(i){return new(i||t)();},t.ɵprov=Ae({token:t,factory:t.ɵfac,providedIn:"root"});let e=t;return e;})();
1function jd(e,t){if(e&1&&(a(0,"a",2),X(1),r()),e&2){let o=d(2).$implicit;C("routerLink",o.route),l(),ce(o.name);}}function qd(e,t){if(e&1&&(a(0,"li",8)(1,"a",2),X(2),r()()),e&2){let o=d().$implicit;l(),C("routerLink",o.route),l(),Fe(" ",o.name," ");}}function Yd(e,t){if(e&1&&(T(0,qd,3,2,"li",8),I(1,"async")),e&2){let o=t.$implicit;E(L(1,1,o.allowed())?0:-1);}}function Jd(e,t){if(e&1){let o=h();a(0,"a",3),u("click",function(){N(o);let i=d(2).$implicit,s=d(3);return A(s.toggleMenuCategory(i));}),X(1),a(2,"span",4),M(3,"fa-icon",5),r()(),a(4,"div",6)(5,"ul",7),se(6,Yd,2,3,null,null,Be),r()();}if(e&2){let o=d(2).$implicit,n=d(3);l(),Fe(" ",o.name," "),l(2),H("fa-rotate-90",o.open),C("icon",n.menuCategoryIndicator),l(),H("open",o.open),l(2),ae(o.tabs);}}function Hd(e,t){if(e&1&&(a(0,"div",1),T(1,jd,2,2,"a",2),T(2,Jd,8,6),r()),e&2){let o=d().$implicit;l(),E(o.route?1:-1),l(),E(o.tabs?2:-1);}}function Kd(e,t){if(e&1&&(T(0,Hd,3,2,"div",1),I(1,"async")),e&2){let o=t.$implicit;E(L(1,1,o.allowed())?0:-1);}}function Wd(e,t){if(e&1&&(a(0,"div",0)(1,"span"),X(2),r()(),se(3,Kd,2,3,null,null,Be)),e&2){let o=d().$implicit;l(2),Fe(" ",o.name," "),l(),ae(o.menuItems);}}function Qd(e,t){if(e&1&&(T(0,Wd,5,1),I(1,"async")),e&2){let o=t.$implicit;E(L(1,1,o.allowed())?0:-1);}}var ne=(()=>{let t=class t{constructor(){this.customerSettingsMenuService=m(er),this.activatedRoute=m(ci),this.router=m(di),this.menuCategoryIndicator=Qs;}ngOnInit(){this.menu=this.customerSettingsMenuService.getConfig(),this.initMenuCategoryOpen();}toggleMenuCategory(n){n.open=!n.open;}initMenuCategoryOpen(){let n=this.router.createUrlTree([],{relativeTo:this.activatedRoute}).toString();nn(this.menu.map(i=>i.menuItems)).filter(i=>i.tabs).forEach(i=>{i.open=i.open||i.tabs.some(s=>s.route===n);});}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-settings-menu"]],decls:2,vars:0,consts:[[1,"nav-separator"],[1,"nav","flex-column","nav-pills"],["routerLinkActive","active",1,"nav-link",3,"routerLink"],[1,"nav-link","has-children",3,"click"],[1,"submenu-indicator"],[3,"icon"],[1,"submenu-container"],[1,"nav","flex-column","child-nav"],[1,"nav-item"]],template:function(i,s){i&1&&se(0,Qd,2,3,null,null,Be),i&2&&ae(s.menu);},dependencies:[Ls,tn,Le,W],styles:[".nav-link[_ngcontent-%COMP%]{color:#337ab7;position:relative;transition:all .2s ease;border-left:3px solid transparent}.nav-link[_ngcontent-%COMP%]:hover{background-color:#337ab714;color:#337ab7}.nav-link.active[_ngcontent-%COMP%]{color:#fff;background-color:#337ab7;font-weight:500}.nav-link.has-children[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.submenu-indicator[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;font-size:16px;line-height:1;opacity:.8;transition:transform .2s ease}
1.nav-separator[_ngcontent-%COMP%]{padding:.5rem;margin-top:1rem;margin-bottom:.5rem;border-bottom:1px solid rgba(0,0,0,.1);font-weight:600;font-size:11px;color:#72777c;text-transform:uppercase;letter-spacing:.5px}.nav-separator[_ngcontent-%COMP%]:first-child{margin-top:0}.submenu-container[_ngcontent-%COMP%]{overflow:hidden;max-height:0;transition:max-height .25s ease-out,opacity .2s ease-out;opacity:0}.submenu-container.open[_ngcontent-%COMP%]{max-height:500px;opacity:1;transition:max-height .4s ease-in,opacity .3s ease-in;margin-bottom:4px}.child-nav[_ngcontent-%COMP%]{background-color:#337ab70a}.child-nav[_ngcontent-%COMP%]   .nav-link[_ngcontent-%COMP%]{padding-left:2rem}"],changeDetection:0});let e=t;return e;})();var M_=y(je,e=>e.afasSettings),Zd=y(M_,e=>e.status),O_=y(Zd,e=>e==="CONNECTED"),R_=y(M_,e=>e.loaded);function eC(e,t){e&1&&(a(0,"span"),c(1,2),r());}function tC(e,t){if(e&1){let o=h();a(0,"div")(1,"div",18)(2,"label",19),c(3,3),r(),M(4,"input",20),r(),a(5,"div",21)(6,"button",22),u("click",function(){N(o);let i=d();return A(i.connect());}),c(7,4),r()()();}if(e&2){let o=d();l(4),C("formControl",o.accessKeyControl),l(2),C("disabled",o.accessKeyControl.invalid);}}function nC(e,t){if(e&1){let o=h();a(0,"div",18)(1,"label",19),c(2,5),r(),M(3,"input",23),r(),a(4,"div",21)(5,"button",24),u("click",function(){N(o);let i=d();return A(i.removeToken());}),c(6,6),r()();}}var I_=(()=>{let t=class t{constructor(){this.store=m(B),this.accessKeyControl=new sn("",[_e.required]);}ngOnInit(){this.connected$=this.store.select(O_);}connect(){this.accessKeyControl.valid&&this.store.dispatch(Hi({accessKey:this.accessKeyControl.value}));}removeToken(){this.accessKeyControl.setValue("",{emitEvent:!1}),this.store.dispatch(Wi());}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-afas"]],decls:20,vars:4,consts:()=>{let n;n="AFAS API Integration";let i;i="Set up the API integration of SimpledCard and AFAS."+"[\uFFFD#15\uFFFD\uFFFD/#15\uFFFD|\uFFFD#16\uFFFD\uFFFD/#16\uFFFD]"+" Retrieve the AFAS API token from the AFAS Profit environment."+"[\uFFFD#15\uFFFD\uFFFD/#15\uFFFD|\uFFFD#16\uFFFD\uFFFD/#16\uFFFD]"+" Enter the token below and click on connect to establish the integration.",i=it(i);let s;s="Company settings";let _;_="Token";let S;S="Connect";let p;p="AFAS API token securely stored";let P;P="Token";let v;return v="Remove",[n,i,s,_,S,P,v,[3,"backButtonActive"],[4,"toolbar-title"],[1,"container-fluid","customer-settings-menu"],[1,"row"],[1,"col-md-3"],[1,"col-md-9"],[1,"afas-settings-section"],[1,"afas-settings-title"],[1,"afas-settings-body"],[1,"col-md-12"],[1,"afas-settings-text"],[1,"form-group"],["for","afas-token",1,"afas-settings-label"],["id","afas-token","placeholder","<afasIntegrationCtrl.token><version>1</version><data>1234ABC12345ABC</data></afasIntegrationCtrl.token>","type","text",1,"form-control",3,"formControl"],[1,"d-flex","justify-content-end"],[1,"simpled-button","primary","mb-1",3,"click","disabled"],["disabled","","id","afas-token","type","text","value",p,1,"form-control"],[1,"simpled-button","danger",3,"click"]];},template:function(i,s){i&1&&(a(0,"simpled-toolbar",7),O(1,eC,2,0,"span",8),r(),a(2,"div",9)(3,"div",10)(4,"div",11),M(5,"simpled-settings-menu"),r(),a(6,"div",12)(7,"div",13)(8,"h4",14),c(9,0),r(),a(10,"div",15)(11,"div",10)(12,"div",16)(13,"div",17),pe(14,1),M(15,"br")(16,"br"),ge(),r(),T(17,tC,8,2,"div"),I(18,"async"),nt(19,nC,7,0),r()()()()()()()),i&2&&(C("backButtonActive",!0),l(17),E(L(18,2,s.connected$)!==!0?17:19));},dependencies:[te,ee,ne,ue,Ie,me,Vt,Q,W],styles:[".afas-settings-section[_ngcontent-%COMP%]{padding:16px;margin:0 0 8px;border-bottom:1px solid #e5e9f1}.afas-settings-title[_ngcontent-%COMP%]{padding:10px 15px 0;font-weight:600;font-size:18px;margin:10px 0;line-height:1.1}.afas-settings-body[_ngcontent-%COMP%]{padding:15px}.afas-settings-text[_ngcontent-%COMP%]{padding:16px 0 8px;margin-bottom:8px}.form-control[_ngcontent-%COMP%]{font-size:14px}"],changeDetection:0});let e=t;return e;})();function iC(e,t){e&1&&(a(0,"span"),c(1,2),r());}function oC(e,t){if(e&1){let o=h();a(0,"div")(1,"div",23)(2,"div"),X(3),r(),a(4,"div"),M(5,"fa-icon",24),a(6,"span"),c(7,4),r()()(),a(8,"div",25)(9,"button",26),u("click",function(){N(o);let i=d(2);return A(i.businessCentralCancelConnect());}),c(10,5),r()()();}if(e&2){let o=d(),n=d();l(3),ce(o.externalUserName),l(2),C("icon",n.faCheck);}}function rC(e,t){if(e&1){let o=h();a(0,"div")(1,"div",27),c(2,6),r(),a(3,"div",25)(4,"button",26),u("click",function(){N(o);let i=d(2);return A(i.businessCentralCancelConnect());}),c(5,7),r()()();}}function sC(e,t){if(e&1){let o=h();a(0,"div")(1,"div",28),c(2,8),r(),a(3,"div",29)(4,"button",26),u("click",function(){N(o);let i=d(2);return A(i.businessCentralTryAgain());}),c(5,9),r()()();}}function aC(e,t){if(e&1&&(a(0,"p"),c(1,3),r(),T(2,oC,11,2,"div"),T(3,rC,6,0,"div"),T(4,sC,6,0,"div")),e&2){let o=t;l(2),E(o.status==="CONNECTED"?2:-1),l(),E(o.status==="PENDING"?3:-1),l(),E(o.status==="FAILED"?4:-1);}}function lC(e,t){if(e&1){let o=h();a(0,"div",30)(1,"button",31),u("click",function(){N(o);let i=d(2);return A(i.businessCentralConnect());}),c(2,10),r()();}}function _C(e,t){if(e&1&&(T(0,lC,3,0,"div",30),I(1,"async")),e&2){let o=d();E(L(1,1,o.isLoaded$)?0:-1);}}var L_=(()=>{let t=class t{constructor(){this.confirmationDialog=m(We),this.integrationService=m(pt),this.faCheck=Lt,this.businessCentralRequest$=new lt(null),this.isLoaded$=new lt(!1);}
1ngOnInit(){this.integrationService.getIntegrationData("businessCentral").subscribe({next:n=>{this.businessCentralRequest$.next(n),this.isLoaded$.next(!0);},error:()=>this.isLoaded$.next(!0)});}businessCentralConnect(){let n=window.location.href;this.integrationService.startIntegration("businessCentral",n).subscribe(i=>{i.externalAuthorizationUrl&&(window.location.href=i.externalAuthorizationUrl);});}businessCentralCancelConnect(){this.confirmationDialog.openConfirmationDialog({title:"Disconnect Business Central",message:"Are you sure you want to disconnect SimpledCard and Business Central?",confirmLabel:"Confirm",cancelLabel:"Cancel"},"760px").subscribe(n=>{n&&this.integrationService.deleteIntegrationData("businessCentral").subscribe(()=>{this.businessCentralRequest$.next(null);});});}businessCentralTryAgain(){this.integrationService.deleteIntegrationData("businessCentral").subscribe(()=>this.businessCentralConnect());}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-business-central-connect"]],decls:19,vars:4,consts:()=>{let n;n="Dynamics 365 Business Central";let i;i="Here you can link your SimpledCard account with your Business Central account. Please click 'Connect' and follow the steps. You will be redirected to the verification-page of Business Central. Use your Business Central credentials to log in and establish the connection.";let s;s="Company settings";let _;_="Account details:";let S;S="Connected";let p;p="Disconnect";let P;P="In progress...";let v;v="Cancel";let G;G="Connection failed";let J;J="Try again";let ie;return ie="Connect",[n,i,s,_,S,p,P,v,G,J,ie,[3,"backButtonActive"],[4,"toolbar-title"],[1,"container-fluid","customer-settings-menu"],[1,"row"],[1,"col-md-3"],[1,"col-md-9"],[1,"business-central-settings-section"],[1,"business-central-settings-title-section"],["src","./assets/images/business-central-logo.png","width","42px"],[1,"business-central-settings-title"],[1,"business-central-settings-section-body"],[1,"business-central-settings-account-section"],[1,"alert","alert-success"],[3,"icon"],[1,"business-central-settings-cancel-button-section"],[1,"simpled-button","danger",3,"click"],[1,"alert","alert-warning"],[1,"alert","alert-danger"],[1,"business-central-settings-again-button-section"],[1,"business-central-settings-button-section"],[1,"simpled-button","primary",3,"click"]];},template:function(i,s){if(i&1&&(a(0,"simpled-toolbar",11),O(1,iC,2,0,"span",12),r(),a(2,"div",13)(3,"div",14)(4,"div",15),M(5,"simpled-settings-menu"),r(),a(6,"div",16)(7,"div",17)(8,"div",18),M(9,"img",19),a(10,"h4",20),c(11,0),r()(),a(12,"div",21)(13,"p"),c(14,1),r()(),a(15,"div",22),T(16,aC,5,3),I(17,"async"),nt(18,_C,2,3),r()()()()()),i&2){let _;C("backButtonActive",!0),l(16),E((_=L(17,2,s.businessCentralRequest$))?16:18,_);}},dependencies:[te,ee,ne,Le,W],styles:[".business-central-settings-section[_ngcontent-%COMP%], .business-central-settings-section-body[_ngcontent-%COMP%], .business-central-settings-account-section[_ngcontent-%COMP%]{padding:16px}.business-central-settings-section[_ngcontent-%COMP%]   .business-central-settings-title-section[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:25px;padding:10px 15px 0}.business-central-settings-section[_ngcontent-%COMP%]   .business-central-settings-title-section[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{margin-bottom:0;margin-left:10px}.business-central-settings-section[_ngcontent-%COMP%]   .business-central-settings-button-section[_ngcontent-%COMP%]{display:flex;justify-content:center}.business-central-settings-account-section[_ngcontent-%COMP%]   .alert[_ngcontent-%COMP%]{display:flex;font-weight:600}.business-central-settings-account-section[_ngcontent-%COMP%]   .alert[_ngcontent-%COMP%]   fa-icon[_ngcontent-%COMP%]{margin-right:5px}.business-central-settings-account-section[_ngcontent-%COMP%]   .business-central-settings-cancel-button-section[_ngcontent-%COMP%], .business-central-settings-account-section[_ngcontent-%COMP%]   .business-central-settings-again-button-section[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}"],changeDetection:0});let e=t;return e;})();var cC=["*"],tt=(()=>{let t=class t{constructor(){this.cdf=m(Ct),this.disabled=!1,this.checked=!1,this.checkIcon=Lt,this.onChange=n=>{},this.onTouched=()=>{};}onClick(){this.disabled!==!0&&(this.checked=!this.checked,this.onChange(this.checked));}writeValue(n){this.checked=n===!0,this.cdf.detectChanges();}registerOnChange(n){this.onChange=n;}registerOnTouched(n){this.onTouched=n;}setDisabledState(n){this.disabled=n;}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-button-checkbox"]],hostBindings:function(i,s){i&1&&u("click",function(){return s.onClick();});},features:[Zt([{provide:zs,useExisting:as(()=>t),multi:!0}])],ngContentSelectors:cC,decls:3,vars:3,consts:[["type","button"],[3,"icon"]],template:function(i,s){i&1&&(ms(),a(0,"button",0),M(1,"fa-icon",1),r(),us(2)),i&2&&(H("checked",s.checked),l(),C("icon",s.checkIcon));},dependencies:[Le],styles:["button[_ngcontent-%COMP%]{color:#fff;padding:2px 6px;font-size:12px;line-height:1.5;border-radius:3px;display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;-webkit-user-select:none;user-select:none;border-color:#ccc;background-color:#fff}button[_ngcontent-%COMP%]:focus{background-color:#e6e6e6;border-color:#8c8c8c}button[_ngcontent-%COMP%]   fa-icon[_ngcontent-%COMP%]{opacity:0}
1button.checked[_ngcontent-%COMP%]{border-color:#22b466;background-color:#22b466}button.checked[_ngcontent-%COMP%]   fa-icon[_ngcontent-%COMP%]{opacity:1}button.checked[_ngcontent-%COMP%]:focus{border-color:#23a560;background-color:#23a560}"],changeDetection:0});let e=t;return e;})();var Wt=y(je,e=>e.customerClientSettings),F_=y(Wt,e=>e.customerClientSettings),dC=y(Wt,e=>e.editedIds),CC=y(Wt,e=>e.filteredClientIds),P_=y(Wt,({filters:e})=>e.search),h_=y(Wt,({filters:e})=>e.statusActive),b_=y(Wt,({filters:e})=>e.legalEntityId),Dr=y(Wt,e=>e.newClients),y_=y(F_,dC,(e,t)=>e.filter(o=>t.includes(o.id))),v_=y(F_,CC,(e,t)=>e.filter(o=>t.includes(o.id)));var SC=["tableLine"],TC=["clientFormAdd"],EC=(e,t)=>t.id;function mC(e,t){e&1&&(a(0,"p",33),c(1,16),r());}function uC(e,t){e&1&&(a(0,"p",33),c(1,17),r());}function pC(e,t){e&1&&(a(0,"p",33),c(1,18),r());}function gC(e,t){e&1&&(a(0,"p",33),c(1,19),r());}function fC(e,t){e&1&&(a(0,"p",33),c(1,20),r());}function NC(e,t){e&1&&(a(0,"p",33),c(1,21),r());}function AC(e,t){e&1&&(a(0,"p",33),c(1,22),r());}function MC(e,t){e&1&&(a(0,"p",33),c(1,23),r());}function OC(e,t){if(e&1){let o=h();a(0,"td")(1,"label"),c(2,24),r(),a(3,"ng-select",39,6),u("ngModelChange",function(i){N(o);let s=d().$implicit,_=d(2);return A(_.lineChange(s.id,"legalEntityId",i));}),r()();}if(e&2){let o=d().$implicit,n=d(2);l(3),C("items",n.legalEntitiesOptions())("name","newClient["+o.id+"][legalEntityId]")("selectOnTab",!0)("ngModel",o.legalEntityId)("clearable",!1);}}function RC(e,t){if(e&1){let o=h();a(0,"tr")(1,"td")(2,"label"),c(3,9),r(),a(4,"input",32,1),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(2);return A(_.lineChange(s.id,"name",i));}),r(),T(7,mC,2,0,"p",33),T(8,uC,2,0,"p",33),T(9,pC,2,0,"p",33),r(),a(10,"td")(11,"label"),c(12,10),r(),a(13,"input",34,2),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(2);return A(_.lineChange(s.id,"group",i));}),r(),T(15,gC,2,0,"p",33),r(),a(16,"td")(17,"label"),c(18,11),r(),a(19,"input",35,3),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(2);return A(_.lineChange(s.id,"reference1",i));}),r(),T(21,fC,2,0,"p",33),T(22,NC,2,0,"p",33),r(),a(23,"td")(24,"label"),c(25,12),r(),a(26,"input",34,4),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(2);return A(_.lineChange(s.id,"reference2",i));}),r(),T(28,AC,2,0,"p",33),r(),a(29,"td")(30,"label"),c(31,13),r(),a(32,"input",34,5),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(2);return A(_.lineChange(s.id,"reference3",i));}),r(),T(34,MC,2,0,"p",33),r(),T(35,OC,5,5,"td"),a(36,"td")(37,"label"),c(38,14),r(),a(39,"simpled-button-checkbox",36),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(2);return A(_.lineChange(s.id,"active",i));}),r()(),a(40,"td")(41,"label"),c(42,15),r(),a(43,"button",37),u("click",function(){let i=N(o).$implicit,s=d(2);return A(s.removeItem(i.id));}),M(44,"fa-icon",38),r()()();}if(e&2){let o=t.$implicit,n=b(6),i=b(14),s=b(20),_=b(27),S=b(33),p=d(2);l(4),H("form-input-invalid",n.invalid&&(n.dirty||p.submitted)),C("name","newClient["+o.id+"][name]")("ngModel",o.name)("simpledMaxLengthValidator",100),l(3),E(n.errors!=null&&n.errors.required&&(n.dirty||p.submitted)?7:-1),l(),E(n.errors!=null&&n.errors.pattern&&(n.dirty||p.submitted)?8:-1),l(),E(n.errors!=null&&n.errors.maxlength&&(n.dirty||p.submitted)?9:-1),l(4),H("form-input-invalid",i.invalid),C("name","newClient["+o.id+"][group]")("simpledMaxLengthValidator",50)("ngModel",o.group),l(2),E(i.errors!=null&&i.errors.maxlength?15:-1),l(4),H("form-input-invalid",s.invalid&&(s.dirty||p.submitted)),C("name","newClient["+o.id+"][reference1]")("simpledMaxLengthValidator",50)("ngModel",o.reference1),l(2),E(s.errors!=null&&s.errors.required&&(s.dirty||p.submitted)?21:-1),l(),E(s.errors!=null&&s.errors.maxlength&&(s.dirty||p.submitted)?22:-1),l(4),H("form-input-invalid",_.invalid),C("name","newClient["+o.id+"][reference2]")("simpledMaxLengthValidator",50)("ngModel",o.reference2),l(2),E(_.errors!=null&&_.errors.maxlength?28:-1),l(4),H("form-input-invalid",S.invalid),C("name","newClient["+o.id+"][reference3]")("simpledMaxLengthValidator",50)("ngModel",o.reference3),l(2),E(S.errors!=null&&S.errors.maxlength?34:-1),l(),E(p.legalEntitiesOptions().length>1?35:-1),l(4),C("name","newClient["+o.id+"][active]")("ngModel",o.active),l(5),C("icon",p.removeIcon);}}function IC(e,t){if(e&1){let o=h();a(0,"td")(1,"input",31),u("focus",function(){N(o);let i=d(2);return A(i.addNewLine());}),r()();}}function LC(e,t){if(e&1){let o=h();a(0,"tbody"),se(1,RC,45,37,"tr",null,EC),a(3,"tr",30)(4,"td")(5,"input",31),u("focus",function(){N(o);let i=d();return A(i.addNewLine());}),r()(),a(6,"td")(7,"input",31),u("focus",function(){N(o);let i=d();return A(i.addNewLine());}),r()(),a(8,"td")(9,"input",31),u("focus",function(){N(o);let i=d();return A(i.addNewLine());}),r()(),a(10,"td")(11,"input",31),u("focus",function(){N(o);let i=d();return A(i.addNewLine());}),r()(),a(12,"td")(13,"input",31),u("focus",function(){N(o);let i=d();return A(i.addNewLine());}),r()(),T(14,IC,2,0,"td"),M(15,"td")(16,"td"),r()();}if(e&2){let o=d();l(),ae(t),l(13),E(o.legalEntitiesOptions().length>1?14:-1);}}var x_=(()=>{let t=class t{constructor(){this.store=m(B),this.legalEntitiesStore=m(Qe),this.changeDetectorRef=m(Ct),this.legalEntitiesOptions=this.legalEntitiesStore.legalEntityOptionsWithMaster,this.removeIcon=at,this.submitted=!1,this.tableLines=dt("tableLine"),this.form=Ns("clientFormAdd");}ngOnInit(){this.clientsAdd$=this.store.pipe(re(Dr));}lineChange(n,i,s){this.store.dispatch(io({id:n,property:i,newValue:s}));}addNewLine(){this.store.dispatch(Tn()),setTimeout(()=>{this.tableLines().at(-1).nativeElement.focus(),this.changeDetectorRef.markForCheck();},50);}removeItem(n){this.store.dispatch(ro({id:n}));}save(){this.form().form.valid?(this.submitted=!1,this.store.pipe(re(Dr),Z(1)).subscribe(n=>{let i=n.map(s=>
1f(g({},s),{legalEntityId:He(s.legalEntityId)}));this.store.dispatch(to({customerClients:i}));})):this.submitted=!0;}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-client-add-list"]],viewQuery:function(i,s){i&1&&_t(s.tableLines,SC,5)(s.form,TC,5),i&2&&ct(2);},decls:13,vars:6,consts:()=>{let n;n="Add clients";let i;i="Add";let s;s="Active";let _;_="Name";let S;S="Group";let p;p="Reference #1";let P;P="Reference #2";let v;v="Reference #3";let G;G="Status";let J;J="Remove";let ie;ie="Name required";let U;U="This field cannot contain only spaces.";let oe;oe="Name can have at most 100 characters.";let k;k="Group can have at most 50 characters.";let Ce;Ce="Reference required";let ve;ve="Reference must have a maximum of 50 characters.";let q;q="Reference must have a maximum of 50 characters.";let le;le="Reference must have a maximum of 50 characters.";let Pt;return Pt="Legal entity",[["clientFormAdd","ngForm"],["tableLine","","name","ngModel"],["group","ngModel"],["reference1","ngModel"],["reference2","ngModel"],["reference3","ngModel"],["legalEntityId","ngModel"],n,i,_,S,p,P,v,G,J,ie,U,oe,k,Ce,ve,q,le,Pt,[1,"client-add-customer-section"],[1,"client-add-customer-title"],[1,"table"],[1,"client-add-button-section"],[1,"simpled-button","primary",3,"click","disabled"],[1,"add-new-line"],["readonly","",1,"form-control","form-control-legacy",3,"focus"],["required","","pattern",".*\\S.*",1,"form-control","form-control-legacy",3,"ngModelChange","name","ngModel","simpledMaxLengthValidator"],[1,"help-block"],[1,"form-control","form-control-legacy",3,"ngModelChange","name","simpledMaxLengthValidator","ngModel"],["required","",1,"form-control","form-control-legacy",3,"ngModelChange","name","simpledMaxLengthValidator","ngModel"],["matTooltip",s,3,"ngModelChange","name","ngModel"],[1,"btn","btn-danger","btn-sm",3,"click"],[3,"icon"],["bindLabel","name","bindValue","id",3,"ngModelChange","items","name","selectOnTab","ngModel","clearable"]];},template:function(i,s){if(i&1&&(a(0,"div",25)(1,"h4",26),c(2,7),r(),a(3,"form",null,0)(5,"table",27),T(6,LC,17,1,"tbody"),I(7,"async"),r()(),a(8,"div",28)(9,"button",29),I(10,"async"),u("click",function(){return s.save();}),w(11),c(12,8),V(),r()()()),i&2){let _,S;l(6),E((_=L(7,2,s.clientsAdd$))?6:-1,_),l(3),C("disabled",((S=L(10,4,s.clientsAdd$))==null?null:S.length)===0);}},dependencies:[ue,Oe,Ie,me,Me,Tt,Et,st,rt,ot,mt,ke,tt,Ze,Le,Q,W],styles:[".form-input-invalid[_ngcontent-%COMP%]{border-color:#f76f6b;box-shadow:inset 0 1px 1px #00000014;color:#f76f6b}.form-input-invalid[_ngcontent-%COMP%]:focus{box-shadow:inset 0 1px 1px #00000014,0 0 6px #ce8483}.help-block[_ngcontent-%COMP%]{margin-bottom:0;padding:4px 8px;font-weight:600;font-size:14px;color:#fff;background-color:#f76f6b;border-radius:0 0 5px 5px}.client-add-customer-section[_ngcontent-%COMP%]{margin:0 0 30px;border-bottom:1px solid #e5e9f1;padding-bottom:30px}.client-add-customer-section[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{display:block}.client-add-customer-title[_ngcontent-%COMP%]{padding:10px 15px 0;font-weight:600;font-size:18px;margin:10px 0;line-height:1.1}.add-new-line[_ngcontent-%COMP%]{opacity:.7}.add-new-line[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{background:#fff;cursor:pointer}.btn-danger[_ngcontent-%COMP%]{padding:4px 8px;line-height:18px}.client-add-button-section[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}"],changeDetection:0});let e=t;return e;})();var FC=(e,t)=>t.id;function PC(e,t){e&1&&(a(0,"span"),c(1,16),r());}function hC(e,t){if(e&1){let o=h();w(0),a(1,"button",49),u("click",function(){N(o);let i=d();return A(i.save());}),w(2),c(3,17),V(),r(),V();}if(e&2){d();let o=b(32);l(),C("disabled",o.invalid);}}function bC(e,t){if(e&1){let o=h();a(0,"ng-select",50),I(1,"async"),u("ngModelChange",function(i){N(o);let s=d();return A(s.onLegalEntityFilterChange(i));}),r();}if(e&2){let o=d();C("items",o.legalEntitiesOptions())("ngModel",L(1,3,o.legalEntityIdFilter$))("searchable",!1);}}function yC(e,t){e&1&&(a(0,"th",47)(1,"span"),c(2,18),r()());}function vC(e,t){e&1&&(a(0,"p",52),c(1,19),r());}function xC(e,t){e&1&&(a(0,"p",52),c(1,20),r());}function $C(e,t){e&1&&(a(0,"p",52),c(1,21),r());}function GC(e,t){e&1&&(a(0,"p",52),c(1,22),r());}function DC(e,t){e&1&&(a(0,"p",52),c(1,23),r());}function UC(e,t){e&1&&(a(0,"p",52),c(1,24),r());}function wC(e,t){e&1&&(a(0,"p",52),c(1,25),r());}function VC(e,t){e&1&&(a(0,"p",52),c(1,26),r());}
1function XC(e,t){e&1&&(a(0,"p",52),c(1,27),r());}function BC(e,t){e&1&&(a(0,"p",52),c(1,28),r());}function kC(e,t){if(e&1){let o=h();a(0,"td")(1,"ng-select",56,6),u("ngModelChange",function(i){N(o);let s=d().$implicit,_=d(2);return A(_.lineChange(s.id,"legalEntityId",i));}),r()();}if(e&2){let o=d().$implicit,n=d(2);l(),C("items",n.legalEntitiesOptions())("name","client["+o.id+"][legalEntityId]")("selectOnTab",!0)("ngModel",o.legalEntityId)("clearable",!1);}}function zC(e,t){if(e&1){let o=h();a(0,"tr")(1,"td")(2,"input",51,1),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(2);return A(_.lineChange(s.id,"name",i));}),r(),T(4,vC,2,0,"p",52),T(5,xC,2,0,"p",52),T(6,$C,2,0,"p",52),r(),a(7,"td")(8,"input",53,2),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(2);return A(_.lineChange(s.id,"group",i));}),r(),T(10,GC,2,0,"p",52),r(),a(11,"td")(12,"input",54,3),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(2);return A(_.lineChange(s.id,"reference1",i));}),r(),T(14,DC,2,0,"p",52),T(15,UC,2,0,"p",52),r(),a(16,"td")(17,"input",53,4),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(2);return A(_.lineChange(s.id,"reference2",i));}),r(),T(19,wC,2,0,"p",52),T(20,VC,2,0,"p",52),r(),a(21,"td")(22,"input",53,5),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(2);return A(_.lineChange(s.id,"reference3",i));}),r(),T(24,XC,2,0,"p",52),T(25,BC,2,0,"p",52),r(),T(26,kC,3,5,"td"),a(27,"td")(28,"simpled-button-checkbox",55),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(2);return A(_.lineChange(s.id,"active",i));}),r()()();}if(e&2){let o=t.$implicit,n=b(3),i=b(9),s=b(13),_=b(18),S=b(23),p=d(2);l(2),H("form-input-invalid",n.invalid),C("name","client["+o.id+"][name]")("ngModel",o.name)("simpledMaxLengthValidator",100),l(2),E(n.errors!=null&&n.errors.required?4:-1),l(),E(n.errors!=null&&n.errors.pattern?5:-1),l(),E(n.errors!=null&&n.errors.maxlength?6:-1),l(2),H("form-input-invalid",i.invalid),C("name","client["+o.id+"][group]")("simpledMaxLengthValidator",50)("ngModel",o.group),l(2),E(i.errors!=null&&i.errors.maxlength?10:-1),l(2),H("form-input-invalid",s.invalid),C("name","client["+o.id+"][reference1]")("simpledMaxLengthValidator",50)("ngModel",o.reference1),l(2),E(s.errors!=null&&s.errors.required?14:-1),l(),E(s.errors!=null&&s.errors.maxlength?15:-1),l(2),H("form-input-invalid",_.invalid),C("name","client["+o.id+"][reference2]")("simpledMaxLengthValidator",50)("ngModel",o.reference2),l(2),E(_.errors!=null&&_.errors.required?19:-1),l(),E(_.errors!=null&&_.errors.maxlength?20:-1),l(2),H("form-input-invalid",S.invalid),C("name","client["+o.id+"][reference3]")("simpledMaxLengthValidator",50)("ngModel",o.reference3),l(2),E(S.errors!=null&&S.errors.required?24:-1),l(),E(S.errors!=null&&S.errors.maxlength?25:-1),l(),E(p.legalEntitiesOptions().length>1?26:-1),l(2),C("name","client["+o.id+"][active]")("ngModel",o.active);}}function jC(e,t){e&1&&(a(0,"tbody"),se(1,zC,29,38,"tr",null,FC),r()
1),e&2&&(l(),ae(t));}var $_=(()=>{let t=class t{constructor(){this.store=m(B),this.legalEntitiesStore=m(Qe),this.clients$=this.store.pipe(re(v_)),this.searchFilter$=this.store.pipe(re(P_)),this.statusFilter$=this.store.pipe(re(h_)),this.legalEntityIdFilter$=this.store.pipe(re(b_)),this.legalEntitiesOptions=this.legalEntitiesStore.legalEntityOptionsWithMaster,this.removeIcon=at,this.statusFilterValues=[{name:"Active",value:!0},{name:"Inactive",value:!1}];}lineChange(n,i,s){this.store.dispatch(no({id:n,property:i,newValue:s}));}onSearchChanged(n){this.store.dispatch(vn({filter:n}));}onStatusFilterChange(n){this.store.dispatch(xn({statusActive:n}));}onLegalEntityFilterChange(n){this.store.dispatch($n({legalEntityId:n}));}save(){this.store.pipe(re(y_),Z(1)).subscribe(n=>{let i=n.map(s=>f(g({},s),{legalEntityId:He(s.legalEntityId)}));this.store.dispatch(eo({customerClients:i}));});}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-client-list"]],decls:57,vars:16,consts:()=>{let n;n="Type to search by name, group or reference";let i;i="Any status";let s;s="Any legal entity";let _;_="Clients";let S;S="Here you can specify the clients of your organization."+"[\uFFFD#16\uFFFD\uFFFD/#16\uFFFD|\uFFFD#17\uFFFD\uFFFD/#17\uFFFD|\uFFFD#18\uFFFD\uFFFD/#18\uFFFD|\uFFFD#19\uFFFD\uFFFD/#19\uFFFD|\uFFFD#20\uFFFD\uFFFD/#20\uFFFD]"+" This clients will show in the justifications screen, to link the costs of an expense to the clients that the costs were made for."+"[\uFFFD#16\uFFFD\uFFFD/#16\uFFFD|\uFFFD#17\uFFFD\uFFFD/#17\uFFFD|\uFFFD#18\uFFFD\uFFFD/#18\uFFFD|\uFFFD#19\uFFFD\uFFFD/#19\uFFFD|\uFFFD#20\uFFFD\uFFFD/#20\uFFFD]"+" By making a line inactive you can hide the client for your users to pick, but still retrieve it for historical data."+"[\uFFFD#16\uFFFD\uFFFD/#16\uFFFD|\uFFFD#17\uFFFD\uFFFD/#17\uFFFD|\uFFFD#18\uFFFD\uFFFD/#18\uFFFD|\uFFFD#19\uFFFD\uFFFD/#19\uFFFD|\uFFFD#20\uFFFD\uFFFD/#20\uFFFD]"+" Because of that, after saving a line you can only edit or hide, not remove it."+"[\uFFFD#16\uFFFD\uFFFD/#16\uFFFD|\uFFFD#17\uFFFD\uFFFD/#17\uFFFD|\uFFFD#18\uFFFD\uFFFD/#18\uFFFD|\uFFFD#19\uFFFD\uFFFD/#19\uFFFD|\uFFFD#20\uFFFD\uFFFD/#20\uFFFD]"+" Please note: When adding a new client, you have to make this active for specific accounts."+"[\uFFFD#16\uFFFD\uFFFD/#16\uFFFD|\uFFFD#17\uFFFD\uFFFD/#17\uFFFD|\uFFFD#18\uFFFD\uFFFD/#18\uFFFD|\uFFFD#19\uFFFD\uFFFD/#19\uFFFD|\uFFFD#20\uFFFD\uFFFD/#20\uFFFD]"+" You can do this by navigating to account details, and check or uncheck clients under the tab Clients.",S=it(S);let p;p="Clients";let P;P="Name";let v;v="Group";let G;G="Reference #1";let J;J="Reference #2";let ie;ie="Reference #3";let U;U="Status";let oe;oe="Company settings";let k;k="Save";let Ce;Ce="Legal entity";let ve;ve="Active";let q;q="Name required";let le;le="This field cannot contain only spaces.";let Pt;Pt="Name can have at most 100 characters.";let ye;ye="Group can have at most 50 characters.";let Ut;Ut="Reference required";let xe;xe="Reference must have a maximum of 50 characters.";let An;An="Reference required";let Mn;Mn="Reference must have a maximum of 50 characters.";let On;On="Reference required";let Rn;return Rn="Reference must have a maximum of 50 characters.",[["clientForm","ngForm"],["name","ngModel"],["group","ngModel"],["reference1","ngModel"],["reference2","ngModel"],["reference3","ngModel"],["legalEntityId","ngModel"],_,S,p,P,v,G,J,ie,U,oe,k,Ce,q,le,Pt,ye,Ut,xe,An,Mn,On,Rn,[3,"backButtonActive"],[4,"toolbar-title"],[4,"toolbar-actions"],[1,"container-fluid","customer-settings-menu"],[1,"row"],[1,"col-md-3"],[1,"col-md-9"],[1,"client-list-settings-section"],[1,"client-list-settings-title"],[1,"client-list-settings-body"],[1,"col-md-12"],[1,"client-list-settings-text"],[1,"filters","col"],["placeholder",n,1,"search-filter",3,"filterChange","value","debounce"],["bindLabel","name","bindValue","value","placeholder",i,"data-sc-test","client-status-filter",1,"simpled-select","simpled-select-filter","dropdown-filter",3,"ngModelChange","items","ngModel","clearable","searchable"],["bindLabel","name","bindValue","id","placeholder",s,1,"simpled-select","simpled-select-filter","dropdown-filter",3,"items","ngModel","searchable"],[1,"table","table-edit"],["width","20%"],["width","15%"],["width","5%"],[1,"simpled-button","primary",3,"click","disabled"],["bindLabel","name","bindValue","id","placeholder",s,1,"simpled-select","simpled-select-filter","dropdown-filter",3,"ngModelChange","items","ngModel","searchable"],["required","","pattern",".*\\S.*",1,"form-control","form-control-legacy",3,"ngModelChange","name","ngModel","simpledMaxLengthValidator"],[1,"help-block"],[1,"form-control","form-control-legacy",3,"ngModelChange","name","simpledMaxLengthValidator","ngModel"],["required","",1,"form-control","form-control-legacy",3,"ngModelChange","name","simpledMaxLengthValidator","ngModel"],["matTooltip",ve,3,"ngModelChange","name","ngModel"],["bindLabel","name","bindValue","id",3,"ngModelChange","items","name","selectOnTab","ngModel","clearable"]];},template:function(i,s){if(i&1&&(a(0,"simpled-toolbar",29),O(1,PC,2,0,"span",30)(2,hC,4,1,"ng-container",31),r(),a(3,"div",32)(4,"div",33)(5,"div",34),M(6,"simpled-settings-menu"),r(),a(7,"div",35)(8,"div",36)(9,"h4",37),c(10,7),r(),a(11,"div",38)(12,"div",33)(13,"div",39)(14,"div",40),pe(15,8),M(16,"br")(17,"br")(18,"br")(19,"br")(20,"br"),ge(),r()()()(),M(21,"simpled-client-add-list"),a(22,"h4",37),c(23,9),r(),a(24,"div",41)(25,"simpled-search-filter",42),I(26,"async"),u("filterChange",function(S){return s.onSearchChanged(S);}),r(),a(27,"ng-select",43),I(28,"async"),u("ngModelChange",function(S){return s.onStatusFilterChange(S);}),r(),T(29,bC,2,5,"ng-select",44),r(),M(30,"hr"),a(31,"form",null,0)(33,"table",45)(34,"thead")(35,"tr")(36,"th",46)(37,"span"),c(38,10),r()(),a(39,"th",47)(40,"span"),c(41,11),r()(),a(42,"th",47)(43,"span"),c(44,12),r()(),a(45,"th",47)(46,"span"),c(47,13),r()(),a(48,"th",47)(49,"span"),c(50,14),r()(),T(51,yC,3,0,"th",47),a(52,"th",48)(53,"span"),c(54,15),r()()()(),T(55,jC,3,0,"tbody"),I(56,"async"),r()()()()()()),i&2){let _;C("backButtonActive",!0),l(25),C("value",L(26,10,s.searchFilter$))("debounce",0),l(2),C("items",s.statusFilterValues)("ngModel",L(28,12,s.statusFilter$))("clearable",!0)("searchable",!1),l(2),E(s.legalEntitiesOptions().length>1?29:-1),l(22),E(s.legalEntitiesOptions().length>1?51:-1),l(4),E((_=L(56,14,s.clients$))?55:-1,_);}},dependencies:[te,ee,Pe,Q,ne,x_,ut,ke,ue,Oe,Ie,me,Me,Tt,Et,st,rt,ot,mt,tt,Ze,W],styles:[".form-input-invalid[_ngcontent-%COMP%]{border-color:#f76f6b;box-shadow:inset 0 1px 1px #00000014;color:#f76f6b}.form-input-invalid[_ngcontent-%COMP%]:focus{box-shadow:inset 0 1px 1px #00000014,0 0 6px #ce8483}.help-block[_ngcontent-%COMP%]{margin-bottom:0;padding:4px 8px;font-weight:600;font-size:14px;color:#fff;background-color:#f76f6b;border-radius:0 0 5px 5px}.client-list-settings-section[_ngcontent-%COMP%]{padding:16px;margin:0 0 8px;border-bottom:1px solid #e5e9f1}.client-list-settings-title[_ngcontent-%COMP%]{padding:10px 15px 0;font-weight:600;font-size:18px;margin:10px 0;line-height:1.1}.client-list-settings-body[_ngcontent-%COMP%]{padding:15px}.client-list-settings-text[_ngcontent-%COMP%]{padding:16px 0 8px;margin-bottom:8px}.filters[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin-bottom:16px;margin-top:16px}.filters[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{margin-bottom:16px}.filters[_ngcontent-%COMP%]   .search-filter[_ngcontent-%COMP%]{flex:0 1 600px;min-width:250px;margin-right:16px}.filters[_ngcontent-%COMP%]   .dropdown-filter[_ngcontent-%COMP%]{flex:0 0 auto;margin-right:16px}.filters[_ngcontent-%COMP%]   .dropdown-filter[_ngcontent-%COMP%]:last-child{margin-right:0}"],changeDetection:0});let e=t;return e;})();var pn=y(je,e=>e.customerCostCenterSettings),G_=y(pn,e=>e.customerCostCenterSettings),D_=y(pn,({filters:e})=>e.search),U_=y(pn,({filters:e})=>e.statusActive),w_=y(pn,({filters:e})=>e.legalEntityId),qC=y(pn,e=>e.filteredCostCentersIds),Ur=y(pn,e=>e.newCostCenters),V_=y(G_,Ur,(e,t)=>({existingCostCenters:e,newCostCenters:t})),X_=y(G_,qC,(e,t)=>e.filter(n=>
1t.includes(n.id)));var YC=["tableLine"];function JC(e,t){e&1&&(a(0,"span"),c(1,13),r());}function HC(e,t){if(e&1){let o=h();w(0),a(1,"button",41),u("click",function(){N(o);let i=d();return A(i.save());}),w(2),c(3,14),V(),r(),V();}if(e&2){d();let o=b(27);l(),C("disabled",o.invalid);}}function KC(e,t){if(e&1){let o=h();a(0,"ng-select",42),I(1,"async"),u("ngModelChange",function(i){N(o);let s=d();return A(s.onLegalEntityFilterChange(i));}),r();}if(e&2){let o=d();C("items",o.legalEntitiesOptions())("ngModel",L(1,3,o.legalEntityIdFilter$))("searchable",!1);}}function WC(e,t){e&1&&(a(0,"th",39)(1,"span"),c(2,15),r()());}function QC(e,t){e&1&&Ee(0);}function ZC(e,t){if(e&1&&O(0,QC,1,0,"ng-container",48),e&2){d(3);let o=b(44);C("ngTemplateOutlet",o);}}function eS(e,t){e&1&&Ee(0);}function tS(e,t){if(e&1&&O(0,eS,1,0,"ng-container",48),e&2){d(3);let o=b(50);C("ngTemplateOutlet",o);}}function nS(e,t){e&1&&Ee(0);}function iS(e,t){if(e&1&&O(0,nS,1,0,"ng-container",48),e&2){d(3);let o=b(46);C("ngTemplateOutlet",o);}}function oS(e,t){e&1&&Ee(0);}function rS(e,t){if(e&1&&O(0,oS,1,0,"ng-container",48),e&2){d(3);let o=b(48);C("ngTemplateOutlet",o);}}function sS(e,t){e&1&&Ee(0);}function aS(e,t){if(e&1&&O(0,sS,1,0,"ng-container",48),e&2){d(3);let o=b(50);C("ngTemplateOutlet",o);}}function lS(e,t){if(e&1){let o=h();a(0,"td")(1,"ng-select",49,7),u("ngModelChange",function(i){N(o);let s=d().$implicit,_=d(2);return A(_.lineChange(s.id,"legalEntityId",i));}),r()();}if(e&2){let o=d().$implicit,n=d(2);l(),C("items",n.legalEntitiesOptions())("name","costCenter["+o.id+"][legalEntityId]")("selectOnTab",!0)("ngModel",o.legalEntityId)("clearable",!1);}}function _S(e,t){if(e&1){let o=h();a(0,"tr")(1,"td")(2,"input",45,5),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(2);return A(_.lineChange(s.id,"description",i));}),r(),T(5,ZC,1,1,"ng-container"),T(6,tS,1,1,"ng-container"),T(7,iS,1,1,"ng-container"),r(),a(8,"td")(9,"input",46,6),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(2);return A(_.lineChange(s.id,"code",i));}),r(),T(11,rS,1,1,"ng-container"),T(12,aS,1,1,"ng-container"),r(),T(13,lS,3,5,"td"),a(14,"td")(15,"simpled-button-checkbox",47),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(2);return A(_.lineChange(s.id,"active",i));}),r()()();}if(e&2){let o=t.$implicit,n=b(4),i=b(10),s=d(2);l(2),H("form-input-invalid",n.invalid),C("name","costCenter["+o.id+"][description]")("ngModel",o.description)("simpledMaxLengthValidator",60),l(3),E(n.errors!=null&&n.errors.required?5:-1),l(),E(n.errors!=null&&n.errors.pattern?6:-1),l(),E(n.errors!=null&&n.errors.maxlength?7:-1),l(2),H("form-input-invalid",i.invalid),C("name","costCenter["+o.id+"][code]")("simpledMaxLengthValidator",20)("ngModel",o.code),l(2),E(i.errors!=null&&i.errors.maxlength?11:-1),l(),E(i.errors!=null&&i.errors.pattern?12:-1),l(),E(s.legalEntitiesOptions().length>1?13:-1),l(2),C("name","costCenter["+o.id+"][active]")("ngModel",o.active);}}function cS(e,t){e&1&&Ee(0);}function dS(e,t){if(e&1&&O(0,cS,1,0,"ng-container",48),e&2){d(4);let o=b(44);C("ngTemplateOutlet",o);}}function CS(e,t){e&1&&Ee(0);}function SS(e,t){if(e&1&&O(0,CS,1,0,"ng-container",48),e&2){d(4);let o=b(50);C("ngTemplateOutlet",o);}}function TS(e,t){e&1&&Ee(0);}function ES(e,t){if(e&1&&O(0,TS,1,0,"ng-container",48),e&2){d(4);let o=b(46);C("ngTemplateOutlet",o);}}function mS(e,t){e&1&&Ee(0);}function uS(e,t){if(e&1&&O(0,mS,1,0,"ng-container",48),e&2){d(4);let o=b(48);C("ngTemplateOutlet",o);}}function pS(e,t){e&1&&Ee(0);}function gS(e,t){if(e&1&&O(0,pS,1,0,"ng-container",48),e&2){d(4);let o=b(50);C("ngTemplateOutlet",o);}}function fS(e,t){if(e&1){let o=h();a(0,"td")(1,"ng-select",49,7),u("ngModelChange",function(i){N(o);let s=d().$implicit,_=d(3);return A(_.lineChangeNewItem(s.id,"legalEntityId",i));}),r()();}if(e&2){let o=d().$implicit,n=d(3);l(),C("items",n.legalEntitiesOptions())("name","newCostCenter["+o.id+"][legalEntityId]")("selectOnTab",!0)("ngModel",o.legalEntityId)("clearable",!1);}}function NS(e,t){if(e&1){let o=h();a(0,"tr")(1,"td")(2,"input",45,5),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(3);return A(_.lineChangeNewItem(s.id,"description",i));}),r(),T(5,dS,1,1,"ng-container"),T(6,SS,1,1,"ng-container"),T(7,ES,1,1,"ng-container"),r(),a(8,"td")(9,"input",46,6),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(3);return A(_.lineChangeNewItem(s.id,"code",i));}),r(),T(11,uS,1,1,"ng-container"),T(12,gS,1,1,"ng-container"),r(),T(13,fS,3,5,"td"),a(14,"td")(15,"button",50),u("click",function(){let i=N(o).$implicit,s=d(3);return A(s.removeItem(i.id));}),M(16,"fa-icon",51),r()()();}if(e&2){let o=t.$implicit,n=b(4),i=b(10),s=d(3);l(2),H("form-input-invalid",n.invalid),C("name","newCostCenter["+o.id+"][description]")("ngModel",o.description)("simpledMaxLengthValidator",60),l(3),E(n.errors!=null&&n.errors.required?5:-1),l(),E(n.errors!=null&&n.errors.pattern?6:-1),l(),E(n.errors!=null&&n.errors.maxlength?7:-1),l(2),H("form-input-invalid",i.invalid),C("name","newCostCenter["+o.id+"][code]")("simpledMaxLengthValidator",20)("ngModel",o.code),l(2),E(i.errors!=null&&i.errors.maxlength?11:-1),l(),E(i.errors!=null&&i.errors.pattern?12:-1),l(),E(s.legalEntitiesOptions().length>1?13:-1),l(3),C("icon",s.removeIcon);}}function AS(e,t){e&1&&se(0,NS,17,17,"tr",null,Je().trackById,!0),e&2&&ae(t);}function MS(e,t){if(e&1){let o=h();a(0,"td")(1,"input",44),u("focus",function(){N(o);let i=d(2);return A(i.addNewLine());}),r()();}}function OS(e,t){if(e&1){let o=h();a(0,"tbody"),se(1,_S,16,18,"tr",null,Je().trackById,!0),T(3,AS,2,0),I(4,"async"),a(5,"tr",43)(6,"td")(7,"input",44),u("focus",function(){N(o);let i=d();return A(i.addNewLine());}),r()(),a(8,"td")(9,"input",44),u("focus",function(){N(o);let i=d();return A(i.addNewLine());}),r()(),T(10,MS,2,0,"td"),M(11,"td"),r()();}if(e&2){let o,n=d();l(),ae(t),l(2),E((o=L(4,2,n.newCostCenters$))?3:-1,o),l(7),E(n.legalEntitiesOptions().length>1?10:-1);}}function RS(e,t){e&1&&(a(0,"p",52),c(1,16),r());}function IS(e,t){e&1&&(a(0,"p",52),c(1,17),r());}function LS(e,t){e&1&&(a(0,"p",52),c(1,18),r());}function FS(e,t){e&1&&(a(0,"p",52),c(1,19),r());}var B_=(()=>{let t=class t{constructor(){this.store=m(B),this.legalEntitiesStore=m(Qe),this.changeDetectorRef=m(Ct),this.costCentersFiltered$=this.store.select(X_),this.newCostCenters$=this.store.select(Ur),this.searchFilter$=this.store.select(D_),this.statusFilter$=this.store.select(U_),this.legalEntityIdFilter$=this.store.select(w_),this.legalEntitiesOptions=this.legalEntitiesStore.legalEntityOptionsWithMaster,this.removeIcon=at,this.statusFilterValues=[{name:"Active",value:!0},{name:"Inactive",value:!1}],this.tableLines=dt("tableLine");}ngOnInit(){this.store.dispatch(jt());}lineChange(n,i,s){this.store.dispatch(lo({id:n,property:i,newValue:s}));}lineChangeNewItem(n,i,s){this.store.dispatch(_o({id:n,property:i,newValue:s}));}addNewLine(){this.store.dispatch(Co()),setTimeout(()=>{this.tableLines().at(-1).nativeElement.focus(),this.changeDetectorRef.markForCheck();},50);}removeItem(n){this.store.dispatch(So({id:n}));}save(){this.store.pipe(re(V_),Z(1)).subscribe(({existingCostCenters:n,newCostCenters:i}
1)=>{let s=n.map(S=>f(g({},S),{legalEntityId:He(S.legalEntityId)})),_=i.map(S=>f(g({},S),{legalEntityId:He(S.legalEntityId)}));this.store.dispatch(so({existingCostCenters:s,newCostCenters:_}));});}onSearchChanged(n){this.store.dispatch(Dn({searchValue:n}));}onStatusFilterChange(n){this.store.dispatch(Un({statusActive:n}));}onLegalEntityFilterChange(n){this.store.dispatch(wn({legalEntityId:n}));}trackById(n,i){return i.id;}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-cost-center-list"]],viewQuery:function(i,s){i&1&&_t(s.tableLines,YC,5),i&2&&ct();},decls:51,vars:16,consts:()=>{let n;n="Search by description or code";let i;i="Any status";let s;s="Any legal entity";let _;_="Cost centres";let S;S="Here you can specify the cost centres that can be used in your organization."+"[\uFFFD#16\uFFFD\uFFFD/#16\uFFFD|\uFFFD#17\uFFFD\uFFFD/#17\uFFFD|\uFFFD#18\uFFFD\uFFFD/#18\uFFFD|\uFFFD#19\uFFFD\uFFFD/#19\uFFFD]"+" By making a line inactive you can hide the item for your users to pick, but still retrieve it for historical data."+"[\uFFFD#16\uFFFD\uFFFD/#16\uFFFD|\uFFFD#17\uFFFD\uFFFD/#17\uFFFD|\uFFFD#18\uFFFD\uFFFD/#18\uFFFD|\uFFFD#19\uFFFD\uFFFD/#19\uFFFD]"+" Because of that, after saving a line you can only edit or hide, not remove it."+"[\uFFFD#16\uFFFD\uFFFD/#16\uFFFD|\uFFFD#17\uFFFD\uFFFD/#17\uFFFD|\uFFFD#18\uFFFD\uFFFD/#18\uFFFD|\uFFFD#19\uFFFD\uFFFD/#19\uFFFD]"+" Please note: When adding a new cost centre, you have to make this active for specific accounts."+"[\uFFFD#16\uFFFD\uFFFD/#16\uFFFD|\uFFFD#17\uFFFD\uFFFD/#17\uFFFD|\uFFFD#18\uFFFD\uFFFD/#18\uFFFD|\uFFFD#19\uFFFD\uFFFD/#19\uFFFD]"+" You can do this by navigating to account details, and check or uncheck cost centres under the tab Cost centres.",S=it(S);let p;p="Description";let P;P="Code";let v;v="Status";let G;G="Company settings";let J;J="Save";let ie;ie="Legal entity";let U;U="Active";let oe;oe="Description required";let k;k="Description can have at most 60 characters.";let Ce;Ce="Code can have at most 20 characters.";let ve;return ve="This field cannot contain only spaces.",[["costCenterForm","ngForm"],["descriptionRequired",""],["descriptionMaxLength",""],["codeMaxLength",""],["patternError",""],["tableLine","","description","ngModel"],["code","ngModel"],["legalEntityId","ngModel"],_,S,p,P,v,G,J,ie,oe,k,Ce,ve,[3,"backButtonActive"],[4,"toolbar-title"],[4,"toolbar-actions"],[1,"container-fluid","customer-settings-menu"],[1,"row"],[1,"col-md-3"],[1,"col-md-9"],[1,"cost-center-list-settings-section"],[1,"cost-center-list-settings-title"],[1,"cost-center-list-settings-body"],[1,"col-md-12"],[1,"cost-center-list-settings-text"],[1,"filters"],["placeholder",n,1,"search-filter",3,"filterChange","value","debounce"],["bindLabel","name","bindValue","value","placeholder",i,1,"simpled-select","simpled-select-filter","dropdown-filter",3,"ngModelChange","ngModel","items","clearable","searchable"],["bindLabel","name","bindValue","id","placeholder",s,1,"simpled-select","simpled-select-filter","dropdown-filter",3,"items","ngModel","searchable"],[1,"table"],["width","50%"],["width","25%"],["width","20%"],["width","5%"],[1,"simpled-button","primary",3,"click","disabled"],["bindLabel","name","bindValue","id","placeholder",s,1,"simpled-select","simpled-select-filter","dropdown-filter",3,"ngModelChange","items","ngModel","searchable"],[1,"add-new-line"],["readonly","",1,"form-control","form-control-legacy",3,"focus"],["required","","pattern",".*\\S.*",1,"form-control","form-control-legacy",3,"ngModelChange","name","ngModel","simpledMaxLengthValidator"],["pattern",".*\\S.*",1,"form-control","form-control-legacy",3,"ngModelChange","name","simpledMaxLengthValidator","ngModel"],["matTooltip",U,3,"ngModelChange","name","ngModel"],[4,"ngTemplateOutlet"],["bindLabel","name","bindValue","id",3,"ngModelChange","items","name","selectOnTab","ngModel","clearable"],[1,"btn","btn-danger","btn-sm",3,"click"],[3,"icon"],[1,"help-block"]];},template:function(i,s){if(i&1&&(a(0,"simpled-toolbar",20),O(1,JC,2,0,"span",21)(2,HC,4,1,"ng-container",22),r(),a(3,"div",23)(4,"div",24)(5,"div",25),M(6,"simpled-settings-menu"),r(),a(7,"div",26)(8,"div",27)(9,"h4",28),c(10,8),r(),a(11,"div",29)(12,"div",24)(13,"div",30)(14,"div",31),pe(15,9),M(16,"br")(17,"br")(18,"br")(19,"br"),ge(),r()()()(),a(20,"div",32)(21,"simpled-search-filter",33),I(22,"async"),u("filterChange",function(S){return s.onSearchChanged(S);}
1),r(),a(23,"ng-select",34),I(24,"async"),u("ngModelChange",function(S){return s.onStatusFilterChange(S);}),r(),T(25,KC,2,5,"ng-select",35),r(),a(26,"form",null,0)(28,"table",36)(29,"thead")(30,"tr")(31,"th",37)(32,"span"),c(33,10),r()(),a(34,"th",38)(35,"span"),c(36,11),r()(),T(37,WC,3,0,"th",39),a(38,"th",40)(39,"span"),c(40,12),r()()()(),T(41,OS,12,4,"tbody"),I(42,"async"),r()()()()()(),O(43,RS,2,0,"ng-template",null,1,fe)(45,IS,2,0,"ng-template",null,2,fe)(47,LS,2,0,"ng-template",null,3,fe)(49,FS,2,0,"ng-template",null,4,fe)),i&2){let _;C("backButtonActive",!0),l(21),C("value",L(22,10,s.searchFilter$))("debounce",0),l(2),C("ngModel",L(24,12,s.statusFilter$))("items",s.statusFilterValues)("clearable",!0)("searchable",!1),l(2),E(s.legalEntitiesOptions().length>1?25:-1),l(12),E(s.legalEntitiesOptions().length>1?37:-1),l(4),E((_=L(42,14,s.costCentersFiltered$))?41:-1,_);}},dependencies:[te,ee,Pe,Q,ne,ut,ke,ue,Oe,Ie,me,Me,Tt,Et,st,rt,ot,mt,tt,Ze,Le,It,W],styles:[".form-input-invalid[_ngcontent-%COMP%]{border-color:#f76f6b;box-shadow:inset 0 1px 1px #00000014;color:#f76f6b}.form-input-invalid[_ngcontent-%COMP%]:focus{box-shadow:inset 0 1px 1px #00000014,0 0 6px #ce8483}.help-block[_ngcontent-%COMP%]{margin-bottom:0;padding:4px 8px;font-weight:600;font-size:14px;color:#fff;background-color:#f76f6b;border-radius:0 0 5px 5px}.input-group-text[_ngcontent-%COMP%]{border-radius:0}.cost-center-list-settings-section[_ngcontent-%COMP%]{padding:16px;margin:0 0 8px;border-bottom:1px solid #e5e9f1}.cost-center-list-settings-title[_ngcontent-%COMP%]{padding:10px 15px 0;font-weight:600;font-size:18px;margin:10px 0;line-height:1.1}.cost-center-list-settings-body[_ngcontent-%COMP%]{padding:15px}.cost-center-list-settings-text[_ngcontent-%COMP%]{padding:16px 0 8px;margin-bottom:8px}.add-new-line[_ngcontent-%COMP%]{opacity:.7}.add-new-line[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{background:#fff;cursor:pointer}.btn-danger[_ngcontent-%COMP%]{padding:4px 8px;line-height:18px}.filters[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:16px}.filters[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{margin-bottom:16px}.filters[_ngcontent-%COMP%]   .search-filter[_ngcontent-%COMP%]{flex:0 1 600px;min-width:250px;margin-right:16px}.filters[_ngcontent-%COMP%]   .dropdown-filter[_ngcontent-%COMP%]{margin-right:16px;flex:0 0 auto}.filters[_ngcontent-%COMP%]   .dropdown-filter[_ngcontent-%COMP%]:last-child{margin-right:0}"],changeDetection:0});let e=t;return e;})();var gn=y(je,e=>e.customerCostTypeSettings),k_=y(gn,e=>e.customerCostTypeSettings),z_=y(gn,({filters:e})=>e.search),j_=y(gn,({filters:e})=>e.statusActive),q_=y(gn,({filters:e})=>e.legalEntityId),PS=y(gn,e=>e.filteredCostTypesIds),wr=y(gn,e=>e.newCostTypes),Y_=y(k_,wr,(e,t)=>({existingCostTypes:e,newCostTypes:t})),J_=y(k_,PS,(e,t)=>e.filter(n=>t.includes(n.id)));var hS=["tableLine"];function bS(e,t){e&1&&(a(0,"span"),c(1,13),r());}function yS(e,t){if(e&1){let o=h();w(0),a(1,"button",41),u("click",function(){N(o);let i=d();return A(i.save());}),w(2),c(3,14),V(),r(),V();}if(e&2){d();let o=b(27);l(),C("disabled",o.invalid);}}function vS(e,t){if(e&1){let o=h();a(0,"ng-select",42),I(1,"async"),u("ngModelChange",function(i){N(o);let s=d();return A(s.onLegalEntityFilterChange(i));}),r();}if(e&2){let o=d();C("items",o.legalEntitiesOptions())("ngModel",L(1,3,o.legalEntityIdFilter$))("searchable",!1);}}function xS(e,t){e&1&&(a(0,"th",39)(1,"span"),c(2,15),r()());}function $S(e,t){e&1&&Ee(0);}function GS(e,t){if(e&1&&O(0,$S,1,0,"ng-container",48),e&2){d(3);let o=b(44);C("ngTemplateOutlet",o);}}function DS(e,t){e&1&&Ee(0);}function US(e,t){if(e&1&&O(0,DS,1,0,"ng-container",48),e&2){d(3);let o=b(50);C("ngTemplateOutlet",o);}}function wS(e,t){e&1&&Ee(0);}function VS(e,t){if(e&1&&O(0,wS,1,0,"ng-container",48),e&2){d(3);let o=b(46);C("ngTemplateOutlet",o);}}function XS(e,t){e&1&&Ee(0);}function BS(e,t){if(e&1&&O(0,XS,1,0,"ng-container",48),e&2){d(3);let o=b(48);C("ngTemplateOutlet",o);}}function kS(e,t){if(e&1){let o=h();a(0,"td")(1,"ng-select",49,7),u("ngModelChange",function(i){N(o);let s=d().$implicit,_=d(2);return A(_.lineChange(s.id,"legalEntityId",i));}),r()();}if(e&2){let o=d().$implicit,n=d(2);l(),C("items",n.legalEntitiesOptions())("name","costType["+o.id+"][legalEntityId]")("selectOnTab",!0)("ngModel",o.legalEntityId)("clearable",!1);}}function zS(e,t){if(e&1){let o=h();a(0,"tr")(1,"td")(2,"input",45,5),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(2);return A(_.lineChange(s.id,"description",i));}),r(),T(5,GS,1,1,"ng-container"),T(6,US,1,1,"ng-container"),T(7,VS,1,1,"ng-container"),r(),a(8,"td")(9,"input",46,6),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(2);return A(_.lineChange(s.id,"externalLedger",i));}),r(),T(11,BS,1,1,"ng-container"),r(),T(12,kS,3,5,"td"),a(13,"td")(14,"simpled-button-checkbox",47),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(2);return A(_.lineChange(s.id,"active",i));}),r()()();}if(e&2){let o=t.$implicit,n=b(4),i=b(10),s=d(2);l(2),H("form-input-invalid",n.invalid),C("name","costType["+o.id+"][description]")("ngModel",o.description)("simpledMaxLengthValidator",60),l(3),E(n.errors!=null&&n.errors.required?5:-1),l(),E(n.errors!=null&&n.errors.pattern?6:-1),l(),E(n.errors!=null&&n.errors.maxlength?7:-1),l(2),H("form-input-invalid",i.invalid),C("name","costType["+o.id+"][externalLedger]")("simpledMaxLengthValidator",30)("ngModel",o.externalLedger),l(2),E(i.errors!=null&&i.errors.maxlength?11:-1),l(),E(s.legalEntitiesOptions().length>1?12:-1),l(2),C("name","costType["+o.id+"][active]")("ngModel",o.active);}}function jS(e,t){e&1&&Ee(0);}function qS(e,t){if(e&1&&O(0,jS,1,0,"ng-container",48),e&2){d(4);let o=b(44);C("ngTemplateOutlet",o);}}function YS(e,t){e&1&&Ee(0);}function JS(e,t){if(e&1&&O(0,YS,1,0,"ng-container",48),e&2){d(4);let o=b(50);C("ngTemplateOutlet",o);}}function HS(e,t){e&1&&Ee(0);}function KS(e,t){if(e&1&&O(0,HS,1,0,"ng-container",48),e&2){d(4);let o=b(46);C("ngTemplateOutlet",o);}}function WS(e,t){e&1&&Ee(0);}function QS(e,t){if(e&1&&O(0,WS,1,0,"ng-container",48),e&2){d(4);let o=b(48);C("ngTemplateOutlet",o);}}function ZS(e,t){if(e&1){let o=h();a(0,"td")(1,"ng-select",49,7),u("ngModelChange",function(i){N(o);let s=d().$implicit,_=d(3);return A(_.lineChangeNewItem(s.id,"legalEntityId",i));}),r()();}if(e&2){let o=d().$implicit,n=d(3);l(),C("items",n.legalEntitiesOptions())("name","newCostType["+o.id+"][legalEntityId]")("selectOnTab",!0)("ngModel",o.legalEntityId)("clearable",!1);}}function eT(e,t){if(e&1){let o=h();a(0,"tr")(1,"td")(2,"input",45,5),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(3);return A(_.lineChangeNewItem(s.id,"description",i));}),r(),T(5,qS,1,1,"ng-container"),T(6,JS,1,1,"ng-container"),T(7,KS,1,1,"ng-container"),r(),a(8,"td")(9,"input",46,6),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(3);return A(_.lineChangeNewItem(s.id,"externalLedger",i));}),r(),T(11,QS,1,1,"ng-container"),r(),T(12,ZS,3,5,"td"),a(13,"td")(14,"button",50),u("click",function(){let i=N(o).$implicit,s=d(3);return A(s.removeItem(i.id));}),M(15,"fa-icon",51),r()()();}if(e&2){let o=t.$implicit,n=b(4),i=b(10),s=d(3);l(2),H("form-input-invalid",n.invalid),C("name","newCostType["+o.id+"][description]")("ngModel",o.description)("simpledMaxLengthValidator",60),l(3),E(n.errors!=null&&n.errors.required?5:-1),l(),E(n.errors!=null&&n.errors.pattern?6:-1),l(),E(n.errors!=null&&n.errors.maxlength?7:-1),l(2),H("form-input-invalid",i.invalid),C("name","newCostType["+o.id+"][externalLedger]")("simpledMaxLengthValidator",30)("ngModel",o.externalLedger),l(2),E(i.errors!=null&&i.errors.maxlength?11:-1),l(),E(s.legalEntitiesOptions().length>1?12:-1),l(3),C("icon",s.removeIcon);}}function tT(e,t){e&1&&se(0,eT,16,16,"tr",null,Je().trackById,!0),e&2&&ae(t);}function nT(e,t){if(e&1){let o=h();a(0,"td")(1,"input",44),u("focus",function(){N(o);let i=d(2);return A(i.addNewLine());}),r()();}}function iT(e,t){if(e&1){let o=h();a(0,"tbody"),se(1,zS,15,17,"tr",null,Je().trackById,!0),T(3,tT,2,0),I(4,"async"),a(5,"tr",43)(6,"td")(7,"input",44),u("focus",function(){N(o);let i=d();return A(i.addNewLine());}),r()(),a(8,"td")(9,"input",44),u("focus",function(){N(o);let i=d();return A(i.addNewLine());}),r()(),T(10,nT,2,0,"td"),M(11,"td"),r()();}if(e&2){let o,n=d();l(),ae(t),l(2),E((o=L(4,2,n.newCostTypes$))?3:-1,o),l(7),E(n.legalEntitiesOptions().length>1?10:-1);}}function oT(e,t){e&1&&(a(0,"p",52),c(1,16),r());}function rT(e,t){e&1&&(a(0,"p",52),c(1,17),r());}function sT(e,t){e&1&&(a(0,"p",52),c(1,18),r());}function aT(e,t){e&1&&(a(0,"p",52),c(1,19),r());}var H_=(()=>{let t=class t{constructor(){this.tableLines=dt("tableLine"),this.store=m(B),this.legalEntitiesStore=m(Qe),this.changeDetectorRef=m(Ct),this.costTypesFiltered$=this.store.select(J_),this.newCostTypes$=this.store.select(wr),this.searchFilter$=this.store.select(z_),this.statusFilter$=this.store.select(j_),this.legalEntityIdFilter$=this.store.select(q_),this.legalEntitiesOptions=this.legalEntitiesStore.legalEntityOptionsWithMaster,this.removeIcon=at,this.statusFilterValues=[{name:"Active",value:!0},{name:"Inactive",value:!1}];}
1ngOnInit(){this.store.dispatch(qt());}lineChange(n,i,s){this.store.dispatch(mo({id:n,property:i,newValue:s}));}lineChangeNewItem(n,i,s){this.store.dispatch(uo({id:n,property:i,newValue:s}));}removeItem(n){this.store.dispatch(fo({id:n}));}addNewLine(){this.store.dispatch(go()),setTimeout(()=>{this.tableLines().at(-1).nativeElement.focus(),this.changeDetectorRef.markForCheck();},50);}onSearchChanged(n){this.store.dispatch(Xn({searchValue:n}));}onStatusFilterChange(n){this.store.dispatch(Bn({statusActive:n}));}onLegalEntityFilterChange(n){this.store.dispatch(kn({legalEntityId:n}));}trackById(n,i){return i.id;}save(){this.store.pipe(re(Y_),Z(1)).subscribe(({existingCostTypes:n,newCostTypes:i})=>{let s=n.map(S=>f(g({},S),{legalEntityId:He(S.legalEntityId)})),_=i.map(S=>f(g({},S),{legalEntityId:He(S.legalEntityId)}));this.store.dispatch(To({existingCostTypes:s,newCostTypes:_}));});}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-cost-type-list"]],viewQuery:function(i,s){i&1&&_t(s.tableLines,hS,5),i&2&&ct();},decls:51,vars:16,consts:()=>{let n;n="Search by description or ledger";let i;i="Any status";let s;s="Any legal entity";let _;_="Cost types";let S;S="Here you can specify the cost types that can be used in your organization."+"[\uFFFD#16\uFFFD\uFFFD/#16\uFFFD|\uFFFD#17\uFFFD\uFFFD/#17\uFFFD|\uFFFD#18\uFFFD\uFFFD/#18\uFFFD|\uFFFD#19\uFFFD\uFFFD/#19\uFFFD]"+" By making a line inactive you can hide the item for your users to pick, but still retrieve it for historical data."+"[\uFFFD#16\uFFFD\uFFFD/#16\uFFFD|\uFFFD#17\uFFFD\uFFFD/#17\uFFFD|\uFFFD#18\uFFFD\uFFFD/#18\uFFFD|\uFFFD#19\uFFFD\uFFFD/#19\uFFFD]"+" Because of that, after saving a line you can only edit or hide, not remove it."+"[\uFFFD#16\uFFFD\uFFFD/#16\uFFFD|\uFFFD#17\uFFFD\uFFFD/#17\uFFFD|\uFFFD#18\uFFFD\uFFFD/#18\uFFFD|\uFFFD#19\uFFFD\uFFFD/#19\uFFFD]"+" Please note: When adding a new cost type, you have to make this active for specific accounts."+"[\uFFFD#16\uFFFD\uFFFD/#16\uFFFD|\uFFFD#17\uFFFD\uFFFD/#17\uFFFD|\uFFFD#18\uFFFD\uFFFD/#18\uFFFD|\uFFFD#19\uFFFD\uFFFD/#19\uFFFD]"+" You can do this by navigating to account details, and check or uncheck cost types under the tab Cost types.",S=it(S);let p;p="Description";let P;P="Ledger";let v;v="Status";let G;G="Company settings";let J;J="Save";let ie;ie="Legal entity";let U;U="Active";let oe;oe="Description required";let k;k="Description can have at most 60 characters.";let Ce;Ce="Ledger can have at most 30 characters";let ve;return ve="This field cannot contain only spaces.",[["costTypeForm","ngForm"],["descriptionRequired",""],["descriptionMaxLength",""],["externalLedgerMaxLength",""],["patternError",""],["tableLine","","description","ngModel"],["externalLedger","ngModel"],["legalEntityId","ngModel"],_,S,p,P,v,G,J,ie,oe,k,Ce,ve,[3,"backButtonActive"],[4,"toolbar-title"],[4,"toolbar-actions"],[1,"container-fluid","customer-settings-menu"],[1,"row"],[1,"col-md-3"],[1,"col-md-9"],[1,"cost-type-list-settings-section"],[1,"cost-type-list-settings-title"],[1,"cost-type-list-settings-body"],[1,"col-md-12"],[1,"cost-type-list-settings-text"],[1,"filters"],["placeholder",n,1,"search-filter",3,"filterChange","value","debounce"],["bindLabel","name","bindValue","value","placeholder",i,1,"simpled-select","simpled-select-filter","dropdown-filter",3,"ngModelChange","items","ngModel","clearable","searchable"],["bindLabel","name","bindValue","id","placeholder",s,1,"simpled-select","simpled-select-filter","dropdown-filter",3,"items","ngModel","searchable"],[1,"table"],["width","50%"],["width","25%"],["width","20%"],["width","5%"],[1,"simpled-button","primary",3,"click","disabled"],["bindLabel","name","bindValue","id","placeholder",s,1,"simpled-select","simpled-select-filter","dropdown-filter",3,"ngModelChange","items","ngModel","searchable"],[1,"add-new-line"],["readonly","",1,"form-control","form-control-legacy",3,"focus"],["required","","pattern",".*\\S.*",1,"form-control","form-control-legacy",3,"ngModelChange","name","ngModel","simpledMaxLengthValidator"],[1,"form-control","form-control-legacy",3,"ngModelChange","name","simpledMaxLengthValidator","ngModel"],["matTooltip",U,3,"ngModelChange","name","ngModel"],[4,"ngTemplateOutlet"],["bindLabel","name","bindValue","id",3,"ngModelChange","items","name","selectOnTab","ngModel","clearable"],[1,"btn","btn-danger","btn-sm",3,"click"],[3,"icon"],[1,"help-block"]];},template:function(i,s){if(i&1&&(a(0,"simpled-toolbar",20),O(1,bS,2,0,"span",21)(2,yS,4,1,"ng-container",22),r(),a(3,"div",23)(4,"div",24)(5,"div",25),M(6,"simpled-settings-menu"),r(),a(7,"div",26)(8,"div",27)(9,"h4",28),c(10,8),r(),a(11,"div",29)(12,"div",24)(13,"div",30)(14,"div",31),pe(15,9),M(16,"br")(17,"br")(18,"br")(19,"br"),ge(),r()()()(),a(20,"div",32)(21,"simpled-search-filter",33),I(22,"async"),u("filterChange",function(S){return s.onSearchChanged(S);}
1),r(),a(23,"ng-select",34),I(24,"async"),u("ngModelChange",function(S){return s.onStatusFilterChange(S);}),r(),T(25,vS,2,5,"ng-select",35),r(),a(26,"form",null,0)(28,"table",36)(29,"thead")(30,"tr")(31,"th",37)(32,"span"),c(33,10),r()(),a(34,"th",38)(35,"span"),c(36,11),r()(),T(37,xS,3,0,"th",39),a(38,"th",40)(39,"span"),c(40,12),r()()()(),T(41,iT,12,4,"tbody"),I(42,"async"),r()()()()()(),O(43,oT,2,0,"ng-template",null,1,fe)(45,rT,2,0,"ng-template",null,2,fe)(47,sT,2,0,"ng-template",null,3,fe)(49,aT,2,0,"ng-template",null,4,fe)),i&2){let _;C("backButtonActive",!0),l(21),C("value",L(22,10,s.searchFilter$))("debounce",0),l(2),C("items",s.statusFilterValues)("ngModel",L(24,12,s.statusFilter$))("clearable",!0)("searchable",!1),l(2),E(s.legalEntitiesOptions().length>1?25:-1),l(12),E(s.legalEntitiesOptions().length>1?37:-1),l(4),E((_=L(42,14,s.costTypesFiltered$))?41:-1,_);}},dependencies:[te,ee,Pe,Q,ne,ut,ke,ue,Oe,Ie,me,Me,Tt,Et,st,rt,ot,mt,tt,Ze,Le,It,W],styles:[".form-input-invalid[_ngcontent-%COMP%]{border-color:#f76f6b;box-shadow:inset 0 1px 1px #00000014;color:#f76f6b}.form-input-invalid[_ngcontent-%COMP%]:focus{box-shadow:inset 0 1px 1px #00000014,0 0 6px #ce8483}.help-block[_ngcontent-%COMP%]{margin-bottom:0;padding:4px 8px;font-weight:600;font-size:14px;color:#fff;background-color:#f76f6b;border-radius:0 0 5px 5px}.input-group-text[_ngcontent-%COMP%]{border-radius:0}.cost-type-list-settings-section[_ngcontent-%COMP%]{padding:16px;margin:0 0 8px;border-bottom:1px solid #e5e9f1}.cost-type-list-settings-title[_ngcontent-%COMP%]{padding:10px 15px 0;font-weight:600;font-size:18px;margin:10px 0;line-height:1.1}.cost-type-list-settings-body[_ngcontent-%COMP%]{padding:15px}.cost-type-list-settings-text[_ngcontent-%COMP%]{padding:16px 0 8px;margin-bottom:8px}.add-new-line[_ngcontent-%COMP%]{opacity:.7}.add-new-line[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{background:#fff;cursor:pointer}.btn-danger[_ngcontent-%COMP%]{padding:4px 8px;line-height:18px}.filters[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:16px}.filters[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{margin-bottom:16px}.filters[_ngcontent-%COMP%]   .search-filter[_ngcontent-%COMP%]{flex:0 1 600px;min-width:250px;margin-right:16px}.filters[_ngcontent-%COMP%]   .dropdown-filter[_ngcontent-%COMP%]{margin-right:16px;flex:0 0 auto}.filters[_ngcontent-%COMP%]   .dropdown-filter[_ngcontent-%COMP%]:last-child{margin-right:0}"],changeDetection:0});let e=t;return e;})();var fn=y(je,e=>e.customerCostUnitSettings),K_=y(fn,e=>e.customerCostUnitSettings),W_=y(fn,({filters:e})=>e.search),Q_=y(fn,({filters:e})=>e.statusActive),Z_=y(fn,({filters:e})=>e.legalEntityId),lT=y(fn,e=>e.filteredCostUnitsIds),Vr=y(fn,e=>e.newCostUnits),ec=y(K_,Vr,(e,t)=>({existingCostUnits:e,newCostUnits:t})),tc=y(K_,lT,(e,t)=>e.filter(n=>t.includes(n.id)));var _T=["tableLine"];function cT(e,t){e&1&&(a(0,"span"),c(1,13),r());}function dT(e,t){if(e&1){let o=h();w(0),a(1,"button",41),u("click",function(){N(o);let i=d();return A(i.save());}),w(2),c(3,14),V(),r(),V();}if(e&2){d();let o=b(27);l(),C("disabled",o.invalid);}}function CT(e,t){if(e&1){let o=h();a(0,"ng-select",42),I(1,"async"),u("ngModelChange",function(i){N(o);let s=d();return A(s.onLegalEntityFilterChange(i));}),r();}if(e&2){let o=d();C("items",o.legalEntitiesOptions())("ngModel",L(1,3,o.legalEntityIdFilter$))("searchable",!1);}}function ST(e,t){e&1&&(a(0,"th",39)(1,"span"),c(2,15),r()());}function TT(e,t){e&1&&Ee(0);}function ET(e,t){if(e&1&&O(0,TT,1,0,"ng-container",48),e&2){d(3);let o=b(44);C("ngTemplateOutlet",o);}}function mT(e,t){e&1&&Ee(0);}function uT(e,t){if(e&1&&O(0,mT,1,0,"ng-container",48),e&2){d(3);let o=b(50);C("ngTemplateOutlet",o);}}function pT(e,t){e&1&&Ee(0);}function gT(e,t){if(e&1&&O(0,pT,1,0,"ng-container",48),e&2){d(3);let o=b(46);C("ngTemplateOutlet",o);}}function fT(e,t){e&1&&Ee(0);}function NT(e,t){if(e&1&&O(0,fT,1,0,"ng-container",48),e&2){d(3);let o=b(48);C("ngTemplateOutlet",o);}}function AT(e,t){e&1&&Ee(0);}function MT(e,t){if(e&1&&O(0,AT,1,0,"ng-container",48),e&2){d(3);let o=b(50);C("ngTemplateOutlet",o);}}function OT(e,t){if(e&1){let o=h();a(0,"td")(1,"ng-select",49,7),u("ngModelChange",function(i){N(o);let s=d().$implicit,_=d(2);return A(_.lineChange(s.id,"legalEntityId",i));}),r()();}if(e&2){let o=d().$implicit,n=d(2);l(),C("items",n.legalEntitiesOptions())("name","costUnit["+o.id+"][legalEntityId]")("selectOnTab",!0)("ngModel",o.legalEntityId)("clearable",!1);}}function RT(e,t){if(e&1){let o=h();a(0,"tr")(1,"td")(2,"input",45,5),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(2);return A(_.lineChange(s.id,"description",i));}),r(),T(5,ET,1,1,"ng-container"),T(6,uT,1,1,"ng-container"),T(7,gT,1,1,"ng-container"),r(),a(8,"td")(9,"input",46,6),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(2);return A(_.lineChange(s.id,"code",i));}),r(),T(11,NT,1,1,"ng-container"),T(12,MT,1,1,"ng-container"),r(),T(13,OT,3,5,"td"),a(14,"td")(15,"simpled-button-checkbox",47),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(2);return A(_.lineChange(s.id,"active",i));}),r()()();}if(e&2){let o=t.$implicit,n=b(4),i=b(10),s=d(2);l(2),H("form-input-invalid",n.invalid),C("name","costUnit["+o.id+"][description]")("ngModel",o.description)("simpledMaxLengthValidator",60),l(3),E(n.errors!=null&&n.errors.required?5:-1),l(),E(n.errors!=null&&n.errors.pattern?6:-1),l(),E(n.errors!=null&&n.errors.maxlength?7:-1),l(2),H("form-input-invalid",i.invalid),C("name","costUnit["+o.id+"][code]")("simpledMaxLengthValidator",20)("ngModel",o.code),l(2),E(i.errors!=null&&i.errors.maxlength?11:-1),l(),E(i.errors!=null&&i.errors.pattern?12:-1),l(),E(s.legalEntitiesOptions().length>1?13:-1),l(2),C("name","costUnit["+o.id+"][active]")("ngModel",o.active);}}function IT(e,t){}function LT(e,t){e&1&&O(0,IT,0,0,"ng-template");}function FT(e,t){if(e&1&&O(0,LT,1,0,null,48),e&2){d(4);let o=b(44);C("ngTemplateOutlet",o);}}function PT(e,t){}function hT(e,t){e&1&&O(0,PT,0,0,"ng-template");}function bT(e,t){if(e&1&&O(0,hT,1,0,null,48),e&2){d(4);let o=b(50);C("ngTemplateOutlet",o);}}function yT(e,t){}function vT(e,t){e&1&&O(0,yT,0,0,"ng-template");}function xT(e,t){if(e&1&&O(0,vT,1,0,null,48),e&2){d(4);let o=b(46);C("ngTemplateOutlet",o);}}function $T(e,t){}function GT(e,t){e&1&&O(0,$T,0,0,"ng-template");}function DT(e,t){if(e&1&&O(0,GT,1,0,null,48),e&2){d(4);let o=b(48);C("ngTemplateOutlet",o);}}function UT(e,t){}function wT(e,t){e&1&&O(0,UT,0,0,"ng-template");}function VT(e,t){if(e&1&&O(0,wT,1,0,null,48),e&2){d(4);let o=b(50);C("ngTemplateOutlet",o);}}function XT(e,t){if(e&1){let o=h();a(0,"td")(1,"ng-select",49,7),u("ngModelChange",function(i){N(o);let s=d().$implicit,_=d(3);return A(_.lineChangeNewItem(s.id,"legalEntityId",i));}),r()();}if(e&2){let o=d().$implicit,n=d(3);l(),C("items",n.legalEntitiesOptions())("name","newCostUnit["+o.id+"][legalEntityId]")("selectOnTab",!0)("ngModel",o.legalEntityId)("clearable",!1);}}function BT(e,t){if(e&1){let o=h();a(0,"tr")(1,"td")(2,"input",45,5),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(3);return A(_.lineChangeNewItem(s.id,"description",i));}),r(),T(5,FT,1,1),T(6,bT,1,1),T(7,xT,1,1),r(),a(8,"td")(9,"input",46,6),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(3);return A(_.lineChangeNewItem(s.id,"code",i));}),r(),T(11,DT,1,1),T(12,VT,1,1),r(),T(13,XT,3,5,"td"),a(14,"td")(15,"button",50),u("click",function(){let i=N(o).$implicit,s=d(3);return A(s.removeItem(i.id));}),M(16,"fa-icon",51),r()()();}if(e&2){let o=t.$implicit,n=b(4),i=b(10),s=d(3);l(2),H("form-input-invalid",n.invalid),C("name","newCostUnit["+o.id+"][description]")("ngModel",o.description)("simpledMaxLengthValidator",60),l(3),E(n.errors!=null&&n.errors.required?5:-1),l(),E(n.errors!=null&&n.errors.pattern?6:-1),l(),E(n.errors!=null&&n.errors.maxlength?7:-1),l(2),H("form-input-invalid",i.invalid),C("name","newCostUnit["+o.id+"][code]")("simpledMaxLengthValidator",20)("ngModel",o.code),l(2),E(i.errors!=null&&i.errors.maxlength?11:-1),l(),E(i.errors!=null&&i.errors.pattern?12:-1),l(),E(s.legalEntitiesOptions().length>1?13:-1),l(3),C("icon",s.removeIcon);}}function kT(e,t){e&1&&se(0,BT,17,17,"tr",null,Je().trackById,!0),e&2&&ae(t);}function zT(e,t){if(e&1){let o=h();a(0,"td")(1,"input",44),u("focus",function(){N(o);let i=d(2);return A(i.addNewLine());}),r()();}}function jT(e,t){if(e&1){let o=h();a(0,"tbody"),se(1,RT,16,18,"tr",null,Je().trackById,!0),T(3,kT,2,0),I(4,"async"),a(5,"tr",43)(6,"td")(7,"input",44),u("focus",function(){N(o);let i=d();return A(i.addNewLine());}),r()(),a(8,"td")(9,"input",44),u("focus",function(){N(o);let i=d();return A(i.addNewLine());}),r()(),T(10,zT,2,0,"td"),M(11,"td"),r()();}if(e&2){let o,n=d();l(),ae(t),l(2),E((o=L(4,2,n.newCostUnits$))?3:-1,o),l(7),E(n.legalEntitiesOptions().length>1?10:-1);}}function qT(e,t){e&1&&(a(0,"p",52),c(1,16),r());}function YT(e,t){e&1&&(a(0,"p",52),c(1,17),r());}function JT(e,t){e&1&&(a(0,"p",52),c(1,18),r());}function HT(e,t){e&1&&(a(0,"p",52),c(1,19),r());}var nc=(()=>{let t=class t{constructor(){this.store=m(B),this.legalEntitiesStore=m(Qe),this.changeDetectorRef=m(Ct),this.tableLines=dt("tableLine"),this.costUnitsFiltered$=this.store.select(tc),this.newCostUnits$=this.store.select(Vr),this.searchFilter$=this.store.select(W_),this.statusFilter$=this.store.select(Q_),this.legalEntityIdFilter$=this.store.select(Z_),this.legalEntitiesOptions=this.legalEntitiesStore.legalEntityOptionsWithMaster,this.removeIcon=at,this.statusFilterValues=[{name:"Active",value:!0},{name:"Inactive",value:!1}];}
1ngOnInit(){this.store.dispatch(Yt());}lineChange(n,i,s){this.store.dispatch(Mo({id:n,property:i,newValue:s}));}lineChangeNewItem(n,i,s){this.store.dispatch(Oo({id:n,property:i,newValue:s}));}removeItem(n){this.store.dispatch(Lo({id:n}));}addNewLine(){this.store.dispatch(Io()),setTimeout(()=>{this.tableLines().at(-1).nativeElement.focus(),this.changeDetectorRef.markForCheck();},50);}onSearchChanged(n){this.store.dispatch(jn({searchValue:n}));}onStatusFilterChange(n){this.store.dispatch(qn({statusActive:n}));}onLegalEntityFilterChange(n){this.store.dispatch(Yn({legalEntityId:n}));}trackById(n,i){return i.id;}save(){this.store.pipe(re(ec),Z(1)).subscribe(({existingCostUnits:n,newCostUnits:i})=>{let s=n.map(S=>f(g({},S),{legalEntityId:He(S.legalEntityId)})),_=i.map(S=>f(g({},S),{legalEntityId:He(S.legalEntityId)}));this.store.dispatch(No({existingCostUnits:s,newCostUnits:_}));});}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-cost-unit-list"]],viewQuery:function(i,s){i&1&&_t(s.tableLines,_T,5),i&2&&ct();},decls:51,vars:16,consts:()=>{let n;n="Search by description or code";let i;i="Any status";let s;s="Any legal entity";let _;_="Cost units";let S;S="Here you can specify the cost units that can be used in your organization."+"[\uFFFD#16\uFFFD\uFFFD/#16\uFFFD|\uFFFD#17\uFFFD\uFFFD/#17\uFFFD|\uFFFD#18\uFFFD\uFFFD/#18\uFFFD|\uFFFD#19\uFFFD\uFFFD/#19\uFFFD]"+" By making a line inactive you can hide a specific cost unit for your users, but still retrieve it for historical data."+"[\uFFFD#16\uFFFD\uFFFD/#16\uFFFD|\uFFFD#17\uFFFD\uFFFD/#17\uFFFD|\uFFFD#18\uFFFD\uFFFD/#18\uFFFD|\uFFFD#19\uFFFD\uFFFD/#19\uFFFD]"+" Because of this, after saving a line you can only edit or hide, not remove it."+"[\uFFFD#16\uFFFD\uFFFD/#16\uFFFD|\uFFFD#17\uFFFD\uFFFD/#17\uFFFD|\uFFFD#18\uFFFD\uFFFD/#18\uFFFD|\uFFFD#19\uFFFD\uFFFD/#19\uFFFD]"+" Please note: When adding a new cost unit, you have to make this active for specific accounts."+"[\uFFFD#16\uFFFD\uFFFD/#16\uFFFD|\uFFFD#17\uFFFD\uFFFD/#17\uFFFD|\uFFFD#18\uFFFD\uFFFD/#18\uFFFD|\uFFFD#19\uFFFD\uFFFD/#19\uFFFD]"+" You can do this by navigating to account details, and check or uncheck cost units under the tab Cost units.",S=it(S);let p;p="Description";let P;P="Code";let v;v="Status";let G;G="Company settings";let J;J="Save";let ie;ie="Legal entity";let U;U="Active";let oe;oe="Description required";let k;k="Description can have at most 60 characters.";let Ce;Ce="Code can have at most 20 characters.";let ve;return ve="This field cannot contain only spaces.",[["costUnitForm","ngForm"],["descriptionRequired",""],["descriptionMaxLength",""],["codeMaxLength",""],["patternError",""],["tableLine","","description","ngModel"],["code","ngModel"],["legalEntityId","ngModel"],_,S,p,P,v,G,J,ie,oe,k,Ce,ve,[3,"backButtonActive"],[4,"toolbar-title"],[4,"toolbar-actions"],[1,"container-fluid","customer-settings-menu"],[1,"row"],[1,"col-md-3"],[1,"col-md-9"],[1,"cost-unit-list-settings-section"],[1,"cost-unit-list-settings-title"],[1,"cost-unit-list-settings-body"],[1,"col-md-12"],[1,"cost-unit-list-settings-text"],[1,"filters"],["placeholder",n,1,"search-filter",3,"filterChange","value","debounce"],["bindLabel","name","bindValue","value","placeholder",i,1,"simpled-select","simpled-select-filter","dropdown-filter",3,"ngModelChange","items","ngModel","clearable","searchable"],["bindLabel","name","bindValue","id","placeholder",s,1,"simpled-select","simpled-select-filter","dropdown-filter",3,"items","ngModel","searchable"],[1,"table"],["width","50%"],["width","25%"],["width","20%"],["width","5%"],[1,"simpled-button","primary",3,"click","disabled"],["bindLabel","name","bindValue","id","placeholder",s,1,"simpled-select","simpled-select-filter","dropdown-filter",3,"ngModelChange","items","ngModel","searchable"],[1,"add-new-line"],["readonly","",1,"form-control","form-control-legacy",3,"focus"],["required","","pattern",".*\\S.*",1,"form-control","form-control-legacy",3,"ngModelChange","name","ngModel","simpledMaxLengthValidator"],["pattern",".*\\S.*",1,"form-control","form-control-legacy",3,"ngModelChange","name","simpledMaxLengthValidator","ngModel"],["matTooltip",U,3,"ngModelChange","name","ngModel"],[4,"ngTemplateOutlet"],["bindLabel","name","bindValue","id",3,"ngModelChange","items","name","selectOnTab","ngModel","clearable"],[1,"btn","btn-danger","btn-sm",3,"click"],[3,"icon"],[1,"help-block"]];},template:function(i,s){if(i&1&&(a(0,"simpled-toolbar",20),O(1,cT,2,0,"span",21)(2,dT,4,1,"ng-container",22),r(),a(3,"div",23)(4,"div",24)(5,"div",25),M(6,"simpled-settings-menu"),r(),a(7,"div",26)(8,"div",27)(9,"h4",28),c(10,8),r(),a(11,"div",29)(12,"div",24)(13,"div",30)(14,"div",31),pe(15,9),M(16,"br")(17,"br")(18,"br")(19,"br"),ge(),r()()()(),a(20,"div",32)(21,"simpled-search-filter",33),I(22,"async"),u("filterChange",function(S){return s.onSearchChanged(S);}
1),r(),a(23,"ng-select",34),I(24,"async"),u("ngModelChange",function(S){return s.onStatusFilterChange(S);}),r(),T(25,CT,2,5,"ng-select",35),r(),a(26,"form",null,0)(28,"table",36)(29,"thead")(30,"tr")(31,"th",37)(32,"span"),c(33,10),r()(),a(34,"th",38)(35,"span"),c(36,11),r()(),T(37,ST,3,0,"th",39),a(38,"th",40)(39,"span"),c(40,12),r()()()(),T(41,jT,12,4,"tbody"),I(42,"async"),r()()()()()(),O(43,qT,2,0,"ng-template",null,1,fe)(45,YT,2,0,"ng-template",null,2,fe)(47,JT,2,0,"ng-template",null,3,fe)(49,HT,2,0,"ng-template",null,4,fe)),i&2){let _;C("backButtonActive",!0),l(21),C("value",L(22,10,s.searchFilter$))("debounce",0),l(2),C("items",s.statusFilterValues)("ngModel",L(24,12,s.statusFilter$))("clearable",!0)("searchable",!1),l(2),E(s.legalEntitiesOptions().length>1?25:-1),l(12),E(s.legalEntitiesOptions().length>1?37:-1),l(4),E((_=L(42,14,s.costUnitsFiltered$))?41:-1,_);}},dependencies:[te,ee,Pe,Q,ne,ut,ke,ue,Oe,Ie,me,Me,Tt,Et,st,rt,ot,mt,tt,Ze,Le,It,W],styles:[".form-input-invalid[_ngcontent-%COMP%]{border-color:#f76f6b;box-shadow:inset 0 1px 1px #00000014;color:#f76f6b}.form-input-invalid[_ngcontent-%COMP%]:focus{box-shadow:inset 0 1px 1px #00000014,0 0 6px #ce8483}.help-block[_ngcontent-%COMP%]{margin-bottom:0;padding:4px 8px;font-weight:600;font-size:14px;color:#fff;background-color:#f76f6b;border-radius:0 0 5px 5px}.input-group-text[_ngcontent-%COMP%]{border-radius:0}.cost-unit-list-settings-section[_ngcontent-%COMP%]{padding:16px;margin:0 0 8px;border-bottom:1px solid #e5e9f1}.cost-unit-list-settings-title[_ngcontent-%COMP%]{padding:10px 15px 0;font-weight:600;font-size:18px;margin:10px 0;line-height:1.1}.cost-unit-list-settings-body[_ngcontent-%COMP%]{padding:15px}.cost-unit-list-settings-text[_ngcontent-%COMP%]{padding:16px 0 8px;margin-bottom:8px}.add-new-line[_ngcontent-%COMP%]{opacity:.7}.add-new-line[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{background:#fff;cursor:pointer}.btn-danger[_ngcontent-%COMP%]{padding:4px 8px;line-height:18px}.filters[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:16px}.filters[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{margin-bottom:16px}.filters[_ngcontent-%COMP%]   .search-filter[_ngcontent-%COMP%]{flex:0 1 600px;min-width:250px;margin-right:16px}.filters[_ngcontent-%COMP%]   .dropdown-filter[_ngcontent-%COMP%]{margin-right:16px;flex:0 0 auto}.filters[_ngcontent-%COMP%]   .dropdown-filter[_ngcontent-%COMP%]:last-child{margin-right:0}"],changeDetection:0});let e=t;return e;})();var Xr=(()=>{let t=class t{constructor(){this._state=fa({status:null,loading:!1}),this.integrationsService=m(pt),this.confirmationDialog=m(We),this.toastrService=m(yi),this.apiErrorHandlerService=m(La),this.isConnected=Dt(()=>this._state().status==="CONNECTED"),this.loading=Dt(()=>this._state().loading);}loadStatus(){return Bt(this._state,{status:null,loading:!0}),this.integrationsService.getIntegrationData("emailxpenc").pipe(Gt(({status:n})=>Bt(this._state,{status:n,loading:!1})),Te(n=>(n.status!==404&&this.apiErrorHandlerService.addError(n,n.url??""),Bt(this._state,{status:null,loading:!1}),In)));}setAccessKey(n){return this.integrationsService.setAccessKey("emailxpenc",n).pipe(Gt(()=>{Bt(this._state,{status:"CONNECTED",loading:!1}),this.toastrService.success("EmailXpenC token successfully added");}),Te(i=>(this.apiErrorHandlerService.addError(i,i.url??""),Bt(this._state,{status:null,loading:!1}),In)));}removeAccessKey(){return this.confirmationDialog.openConfirmationDialog({title:"Remove EmailXpenC Token",cancelLabel:"Cancel",confirmLabel:"Confirm",message:"Are you sure that you want to remove the EmailXpenC Token?"}).pipe(Ne(n=>n?this.removeAccessKeyRequest():In));}removeAccessKeyRequest(){return this.integrationsService.deleteIntegrationData("emailxpenc").pipe(Gt(()=>{Bt(this._state,{status:null,loading:!1}),this.toastrService.success("EmailXpenC token successfully removed");}),Te(n=>(this.apiErrorHandlerService.addError(n,n.url??""),Bt(this._state,{status:null,loading:!1}),In)));}};t.ɵfac=function(i){return new(i||t)();},t.ɵprov=Ae({token:t,factory:t.ɵfac});let e=t;return e;})();function KT(e,t){e&1&&(a(0,"span"),c(1,2),r());}function WT(e,t){if(e&1){let o=h();a(0,"simpled-form-group")(1,"label",16),c(2,3),r(),M(3,"input",17),r(),a(4,"div",18)(5,"button",19),u("click",function(){N(o);let i=d();return A(i.connect());}),c(6,4),r()();}if(e&2){let o=d();l(3),C("formControl",o.accessKeyControl),l(2),C("disabled",o.accessKeyControl.invalid);}}function QT(e,t){if(e&1){let o=h();a(0,"simpled-form-group")(1,"label",16),c(2,5),r(),M(3,"input",20),r(),a(4,"div",18)(5,"button",21),u("click",function(){N(o);let i=d();return A(i.removeToken());}),c(6,6),r()();}if(e&2){let o=d();l(5),H("disabled",o.emailxpencStore.loading());}}var ic=(()=>{let t=class t{constructor(){this.emailxpencStore=m(Xr),this.accessKeyControl=new 
1Ue("",[_e.required]);}ngOnInit(){this.emailxpencStore.loadStatus().subscribe();}connect(){this.accessKeyControl.valid&&!this.emailxpencStore.loading()&&this.emailxpencStore.setAccessKey(this.accessKeyControl.value).subscribe(()=>{this.accessKeyControl.setValue("",{emitEvent:!1});});}removeToken(){this.accessKeyControl.setValue("",{emitEvent:!1}),this.emailxpencStore.removeAccessKey().subscribe(()=>this.accessKeyControl.reset());}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-emailxpenc"]],features:[Zt([Xr])],decls:14,vars:2,consts:()=>{let n;n="EmailXpenC Integration";let i;i="Set up the integration of SimpledCard and EmailXpenC. Retrieve the EmailXpenC token from the EmailXpenC environment. Enter the token below and click on connect to establish the integration.";let s;s="Company settings";let _;_="Token";let S;S="Connect";let p;p="EmailXpenC token securely stored";let P;P="Token";let v;return v="Remove EmailXpenC Token",[n,i,s,_,S,P,v,[3,"backButtonActive"],[4,"toolbar-title"],[1,"container-fluid","customer-settings-menu"],[1,"row"],[1,"col-md-3"],[1,"col-md-9"],[1,"emailxpenc-settings"],[1,"simpled-h3","mb-4"],[1,"mb-3"],["for","emailxpenc-token"],["simpledFormControl","","id","emailxpenc-token","data-sc-test","token-input","type","text",3,"formControl"],[1,"d-flex","justify-content-end"],["data-sc-test","connect-button",1,"simpled-button","primary","mb-1",3,"click","disabled"],["simpledFormControl","","disabled","","id","emailxpenc-token","data-sc-test","token-input","type","text","value",p],["data-sc-test","remove-button",1,"simpled-button","danger",3,"click"]];},template:function(i,s){i&1&&(a(0,"simpled-toolbar",7),O(1,KT,2,0,"span",8),r(),a(2,"div",9)(3,"div",10)(4,"div",11),M(5,"simpled-settings-menu"),r(),a(6,"div",12)(7,"div",13)(8,"h2",14),c(9,0),r(),a(10,"p",15),c(11,1),r(),T(12,WT,7,2)(13,QT,7,2),r()()()()),i&2&&(C("backButtonActive",!0),l(12),E(s.emailxpencStore.isConnected()?13:12));},dependencies:[te,ee,ne,ue,Ie,me,Vt,Q,Xt,ln],styles:[".emailxpenc-settings[_ngcontent-%COMP%]{padding:16px 32px;border-bottom:1px solid #e5e9f1}"],changeDetection:0});let e=t;return e;})();var oc=y(je,e=>e.exactGlobeSettings),ZT=y(oc,e=>e.status),rc=y(ZT,e=>e==="CONNECTED"),sc=y(oc,e=>e.loaded);function eE(e,t){e&1&&(a(0,"span"),c(1,3),r());}function tE(e,t){if(e&1){let o=h();a(0,"div")(1,"form",26),u("ngSubmit",function(){N(o);let i=d();return A(i.connect());}),a(2,"div",27)(3,"label",28),c(4,4),r(),M(5,"input",29),r(),a(6,"div",27)(7,"label",30),c(8,5),r(),M(9,"input",31),r(),a(10,"div",32)(11,"button",33),c(12,6),r()()()();}if(e&2){let o=d();l(),C("formGroup",o.formGroup),l(10),C("disabled",o.formGroup.invalid);}}function nE(e,t){if(e&1){let o=h();a(0,"div",27)(1,"label",34),c(2,7),r(),a(3,"div",35),c(4,8),r()(),a(5,"div",27)(6,"label",34),c(7,9),r(),a(8,"div",36),c(9,10),r()(),a(10,"div",32)(11,"button",37),u("click",function(){N(o);let i=d();return A(i.removeToken());}),c(12,11),r()();}}var ac=(()=>{let t=class t{constructor(){this.store=m(B),this.fb=m(Ks),this.actions$=m(Ge),this.accessKeyControl=new sn("",[_e.required]),this.unsubscribe$=new gt(),this.formGroup=this.fb.group({username:["",[_e.required]],secret:["",[_e.required]]});}ngOnInit(){this.connected$=this.store.select(rc),this.actions$.pipe(j(En),$t(this.unsubscribe$)).subscribe(()=>{this.formGroup.reset();});}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete();}connect(){this.formGroup.valid&&this.store.dispatch(ho({username:this.formGroup.controls.username.value,secret:this.formGroup.controls.secret.value}));}removeToken(){this.store.dispatch(yo());}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-exact-globe"]],decls:24,vars:4,consts:()=>{let n;n="On this page you can link your SimpledCard account with your Exact Globe account. Provide your username and password and click on \u201CSave\u201D. Your password will be stored encrypted.";let i;i="Exporting the transactions";let s;s="When the connection is established, you can export your transaction details to Exact through the 'Reports' tab. Select 'Exact Globe Integration' in the drop-down, select a date range and click 'Generate report'. SimpledCard will send the transaction details to Exact.";let _;_="Company settings";let S;S="Username";let p;p="Password";let P;P="Save";let v;v="Username";let G;G="Username securely stored";let J;J="Password";let ie;ie="Password securely stored";let U;return U="Remove",[n,i,s,_,S,p,P,v,G,J,ie,U,[3,"backButtonActive"],[4,"toolbar-title"],[1,"container-fluid","customer-settings-menu"],[1,"row"],[1,"col-md-3"],[1,"col-md-9"],[1,"exact-globe-settings-section"],[1,"exact-globe-settings-title-section"],["src","./assets/images/exact-logo.png","width","96px"],[1,"exact-globe-settings-title"],[1,"exact-globe-settings-body"],[1,"col-md-12"],[1,"exact-globe-settings-text"],[1,"exact-globe-settings-subtitle"],["autocomplete","off",3,"ngSubmit","formGroup"],[1,"form-group"],["for","username",1,"exact-globe-settings-label"],["autocomplete","off","formControlName","username","id","username","data-test","username","placeholder","","type","text",1,"form-control"],["for","secret",1,"exact-globe-settings-label"],["autocomplete","off","formControlName","secret","id","secret","data-test","secret","placeholder","","type","password",1,"form-control"],[1,"d-flex","justify-content-end"],["type","submit",1,"simpled-button","primary","mb-1",3,"disabled"],[1,"exact-globe-settings-label"],["data-test","username",1,"form-control","form-control-disabled"],["data-test","secret",1,"form-control","form-control-disabled"],[1,"simpled-button","danger",3,"click"]];},template:function(i,s){i&1&&(a(0,"simpled-toolbar",12),O(1,eE,2,0,"span",13),r(),a(2,"div",14)(3,"div",15)(4,"div",16),M(5,"simpled-settings-menu"),r(),a(6,"div",17)(7,"div",18)(8,"div",19),M(9,"img",20),a(10,"h4",21),X(11,"Exact Globe"),r()(),a(12,"div",22)(13,"div",15)(14,"div",23)(15,"div",24),c(16,
10),r(),a(17,"h5",25),c(18,1),r(),a(19,"div",24),c(20,2),r(),T(21,tE,13,2,"div"),I(22,"async"),nt(23,nE,13,0),r()()()()()()()),i&2&&(C("backButtonActive",!0),l(21),E(L(22,2,s.connected$)!==!0?21:23));},dependencies:[te,ee,ne,ue,Oe,Ie,me,Me,Ke,St,Q,W],styles:[".exact-globe-settings-title-section[_ngcontent-%COMP%]{display:flex;align-items:center;padding:10px 15px 0}.exact-globe-settings-section[_ngcontent-%COMP%]{padding:16px;margin:0 0 8px;border-bottom:1px solid #e5e9f1}.exact-globe-settings-title[_ngcontent-%COMP%]{padding:0;font-weight:600;font-size:18px;line-height:1.1;margin:0 0 0 10px}.exact-globe-settings-subtitle[_ngcontent-%COMP%]{padding:0;font-weight:600;font-size:16px;margin:0;line-height:1.1;font-family:Open Sans;color:#012842}.exact-globe-settings-body[_ngcontent-%COMP%]{padding:15px}.exact-globe-settings-text[_ngcontent-%COMP%]{padding:16px 0 8px;margin-bottom:8px}.form-control[_ngcontent-%COMP%]{font-size:14px}"],changeDetection:0});let e=t;return e;})();function iE(e,t){e&1&&(a(0,"span"),c(1,4),r());}function oE(e,t){if(e&1){let o=h();a(0,"div")(1,"div",26)(2,"div"),X(3),r(),a(4,"div"),M(5,"fa-icon",27),a(6,"span"),c(7,6),r()()(),a(8,"div",28)(9,"button",29),u("click",function(){N(o);let i=d(2);return A(i.exactOnlineCancelConnect());}),c(10,7),r()()();}if(e&2){let o=d(),n=d();l(3),ce(o.externalUserName),l(2),C("icon",n.faCheck);}}function rE(e,t){if(e&1){let o=h();a(0,"div")(1,"div",30),c(2,8),r(),a(3,"div",28)(4,"button",29),u("click",function(){N(o);let i=d(2);return A(i.exactOnlineCancelConnect());}),c(5,9),r()()();}}function sE(e,t){if(e&1){let o=h();a(0,"div")(1,"div",31),c(2,10),r(),a(3,"div",32)(4,"button",29),u("click",function(){N(o);let i=d(2);return A(i.exactOnlineTryAgain());}),c(5,11),r()()();}}function aE(e,t){if(e&1&&(a(0,"p"),c(1,5),r(),T(2,oE,11,2,"div"),T(3,rE,6,0,"div"),T(4,sE,6,0,"div")),e&2){let o=t;l(2),E(o.status==="CONNECTED"?2:-1),l(),E(o.status==="PENDING"?3:-1),l(),E(o.status==="FAILED"?4:-1);}}function lE(e,t){if(e&1){let o=h();a(0,"div",33)(1,"button",34),u("click",function(){N(o);let i=d(2);return A(i.exactOnlineConnect());}),c(2,12),r()();}}function _E(e,t){if(e&1&&(T(0,lE,3,0,"div",33),I(1,"async")),e&2){let o=d();E(L(1,1,o.isLoaded$)?0:-1);}}var Br=(()=>{let t=class t{constructor(){this.confirmationDialog=m(We),this.integrationService=m(pt),this.route=m(ci),this.faCheck=Lt,this.exactOnlineRequest$=new lt(null),this.isLoaded$=new lt(!1);}ngOnInit(){this.exactOnlineKey=this.route.snapshot.data.exactOnlineKey,this.integrationService.getIntegrationData(this.exactOnlineKey).subscribe(n=>{this.exactOnlineRequest$.next(n),this.isLoaded$.next(!0);},n=>this.isLoaded$.next(!0));}exactOnlineConnect(){let n=window.location.href;this.integrationService.startIntegration(this.exactOnlineKey,n).subscribe(i=>{i.externalAuthorizationUrl&&(window.location.href=i.externalAuthorizationUrl);});}exactOnlineCancelConnect(){this.confirmationDialog.openConfirmationDialog({title:"Disconnect ExactOnline",message:"Are you sure you want to disconnect SimpledCard and ExactOnline?",confirmLabel:"Confirm",cancelLabel:"Cancel"},"760px").subscribe(n=>{n&&this.integrationService.deleteIntegrationData(this.exactOnlineKey).subscribe(()=>{this.exactOnlineRequest$.next(null);});});}exactOnlineTryAgain(){this.integrationService.deleteIntegrationData(this.exactOnlineKey).subscribe(()=>this.exactOnlineConnect());}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-exact-online-connect"]],decls:24,vars:4,consts:()=>{let n;n="Exact online";let i;i="Here you can link your SimpledCard account with your Exact Online account. Please click 'Connect' and follow the steps. You will be redirected to the verification-page of Exact. Use your Exact credentials to log in and establish the connection.";let s;s="Exporting the transactions";let _;_="When the connection is established, you can export your transaction details to Exact through the 'Reports' tab. Select 'Exact Integration' in the drop-down, select a date range and press 'Download CSV'. SimpledCard will send the transaction details to Exact.";let S;S="Company settings";let p;p="Account details:";let P;
1P="Connected";let v;v="Disconnect";let G;G="In progress...";let J;J="Cancel";let ie;ie="Connection failed";let U;U="Try again";let oe;return oe="Connect",[n,i,s,_,S,p,P,v,G,J,ie,U,oe,[3,"backButtonActive"],[4,"toolbar-title"],[1,"container-fluid","customer-settings-menu"],[1,"row"],[1,"col-md-3"],[1,"col-md-9"],[1,"exact-settings-section"],[1,"exact-settings-title-section"],["src","./assets/images/exact-logo.png","width","96px"],[1,"exact-settings-title"],[1,"exact-settings-section-body"],[1,"exact-settings-instruction-section"],[1,"exact-settings-account-section"],[1,"alert","alert-success"],[3,"icon"],[1,"exact-settings-cancel-button-section"],[1,"simpled-button","danger",3,"click"],[1,"alert","alert-warning"],[1,"alert","alert-danger"],[1,"exact-settings-again-button-section"],[1,"exact-settings-button-section"],[1,"simpled-button","primary",3,"click"]];},template:function(i,s){if(i&1&&(a(0,"simpled-toolbar",13),O(1,iE,2,0,"span",14),r(),a(2,"div",15)(3,"div",16)(4,"div",17),M(5,"simpled-settings-menu"),r(),a(6,"div",18)(7,"div",19)(8,"div",20),M(9,"img",21),a(10,"h4",22),c(11,0),r()(),a(12,"div",23)(13,"p"),c(14,1),r(),a(15,"div",24)(16,"h4"),c(17,2),r(),a(18,"p"),c(19,3),r()()(),a(20,"div",25),T(21,aE,5,3),I(22,"async"),nt(23,_E,2,3),r()()()()()),i&2){let _;C("backButtonActive",!0),l(21),E((_=L(22,2,s.exactOnlineRequest$))?21:23,_);}},dependencies:[te,ee,ne,Le,Q,W],styles:[".exact-settings-section[_ngcontent-%COMP%], .exact-settings-section-body[_ngcontent-%COMP%], .exact-settings-account-section[_ngcontent-%COMP%]{padding:16px}.exact-settings-section[_ngcontent-%COMP%]   .exact-settings-title-section[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:25px;padding:10px 15px 0}.exact-settings-section[_ngcontent-%COMP%]   .exact-settings-title-section[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{margin-bottom:0;margin-left:10px}.exact-settings-section[_ngcontent-%COMP%]   .exact-settings-instruction-section[_ngcontent-%COMP%]{margin:40px 0 15px}.exact-settings-section[_ngcontent-%COMP%]   .exact-settings-button-section[_ngcontent-%COMP%]{display:flex;justify-content:center}.exact-settings-account-section[_ngcontent-%COMP%]   .alert[_ngcontent-%COMP%]{display:flex;font-weight:600}.exact-settings-account-section[_ngcontent-%COMP%]   .alert[_ngcontent-%COMP%]   fa-icon[_ngcontent-%COMP%]{margin-right:5px}.exact-settings-account-section[_ngcontent-%COMP%]   .exact-settings-cancel-button-section[_ngcontent-%COMP%], .exact-settings-account-section[_ngcontent-%COMP%]   .exact-settings-again-button-section[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}"],changeDetection:0});let e=t;return e;})();var xt=e=>({formField:e});function cE(e,t){e&1&&(a(0,"span"),c(1,4),r());}function dE(e,t){if(e&1){let o=h();w(0),a(1,"button",20),u("click",function(){N(o);let i=d();return A(i.save());}),c(2,5),r(),V();}}function CE(e,t){}function SE(e,t){}function TE(e,t){}function EE(e,t){}function mE(e,t){}function uE(e,t){}function pE(e,t){}function gE(e,t){}function fE(e,t){if(e&1&&O(0,gE,0,0,"ng-template",24),e&2){d();let o=b(24),n=d();C("ngTemplateOutlet",o)("ngTemplateOutletContext",Ot(2,xt,n.formFields.get("costUnit")));}}function NE(e,t){}function AE(e,t){if(e&1&&O(0,NE,0,0,"ng-template",24),e&2){d();let o=b(24),n=d();C("ngTemplateOutlet",o)("ngTemplateOutletContext",Ot(2,xt,n.formFields.get("client")));}}function ME(e,t){}function OE(e,t){if(e&1&&M(0,"simpled-button-checkbox",27),e&2){let o=d().formField,n=d(2);C("formControl",n.form.controls[o.field]);}}function RE(e,t){e&1&&(a(0,"span",28),c(1,8),r());}function IE(e,t){if(e&1&&(a(0,"tr")(1,"td",25),X(2),r(),a(3,"td",26),T(4,OE,1,1,"simpled-button-checkbox",27)(5,RE,2,0,"span",28),r(),M(6,"td",29),r()),e&2){let o=t.formField;l(2),ce(o.label),l(2),E(o.field?4:5);}}function LE(e,t){if(e&1&&(a(0,"form",19)(1,"table",21)(2,"thead")(3,"tr")(4,"th",22)(5,"span"),c(6,6),r()(),a(7,"th",23)(8,"span"),c(9,7),r()()()(),a(10,"tbody"),O(11,CE,0,0,"ng-template",24)(12,SE,0,0,"ng-template",24)(13,TE,0,0,"ng-template",24)(14,EE,0,0,"ng-template",24)(15,mE,0,0,"ng-template",24)(16,uE,0,0,"ng-template",24)(17,pE,0,0,"ng-template",24),T(18,fE,1,4,null,24),I(19,"isFeatureActive"),T(20,AE,1,4,null,24),I(21,"isFeatureActive"),O(22,ME,0,0,"ng-template",24)(23,IE,7,2,"ng-template",null,0,fe),r()()()),e&2){let o=b(24),n=d();C("formGroup",n.form),l(11),C("ngTemplateOutlet",o)("ngTemplateOutletContext",Ot(23,xt,n.formFields.get("cardholderComment"))),l(),C("ngTemplateOutlet",o)("ngTemplateOutletContext",Ot(25,xt,n.formFields.get("receipt"))),l(),C("ngTemplateOutlet",o)("ngTemplateOutletContext",Ot(27,xt,n.formFields.get("details"))),l(),C("ngTemplateOutlet",o)("ngTemplateOutletContext",Ot(29,xt,n.formFields.get("amount"))),l(),C("ngTemplateOutlet",o)("ngTemplateOutletContext",Ot(31,xt,n.formFields.get("vat"))),l(),C("ngTemplateOutlet",o)("ngTemplateOutletContext",Ot(33,xt,
1n.formFields.get("costType"))),l(),C("ngTemplateOutlet",o)("ngTemplateOutletContext",Ot(35,xt,n.formFields.get("costCenter"))),l(),E(L(19,19,n.Features.COST_UNITS)?18:-1),l(2),E(L(21,21,n.Features.COST_UNITS)?20:-1),l(2),C("ngTemplateOutlet",o)("ngTemplateOutletContext",Ot(37,xt,n.formFields.get("project")));}}var lc=(()=>{let t=class t{constructor(){this.store=m(B),this.unsubscribe$=new gt(),this.formFields=new Map([["cardholderComment",{label:"Description",field:"cardholderComment"}],["receipt",{label:"Receipt",field:"receipt"}],["details",{label:"Item description"}],["amount",{label:"Amount"}],["vat",{label:"VAT",field:"vat"}],["costType",{label:"Cost type",field:"costType"}],["costCenter",{label:"Cost centre",field:"costCenter"}],["costUnit",{label:"Cost unit",field:"costUnit"}],["client",{label:"Client",field:"client"}],["project",{label:"Project",field:"project"}]]),this.rulesCardholderRequired$=this.store.select(Oa),this.Features=z;}ngOnInit(){this.form=new qs({}),[...this.formFields.values()].filter(n=>!!n.field).forEach(n=>this.form.addControl(n.field,new sn())),this.rulesCardholderRequired$.pipe($t(this.unsubscribe$)).subscribe(n=>this.form.patchValue(n));}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete();}save(){this.store.dispatch(xa({rules:this.form.value}));}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-justification-rules"]],decls:16,vars:2,consts:()=>{let n;n="Justification rules";let i;i="Normally it is not mandatory for cardholders to fill in all expense data. Please set the fields below that you would like to be mandatory to prevent important information missing from the justifications. The details and the amount are by default required fields, and therefore you cannot configure them on this page.";let s;s="Note! If cardholders do not know the information for the mandatory fields, they cannot submit their justifications. E.g. if the receipt is lost, or they don\u2019t know what VAT to choose from.";let _;_="Company settings";let S;S="Save changes";let p;p="Field";let P;P="Required";let v;return v="Always required",[["formRowRef",""],n,i,s,_,S,p,P,v,[3,"backButtonActive"],[4,"toolbar-title"],[4,"toolbar-actions"],[1,"container-fluid"],[1,"row"],[1,"col-md-3"],[1,"col-md-9"],[1,"justification-rules-settings-title"],[1,"justification-rules-settings-text"],["type","warning",1,"d-block","mb-5"],[3,"formGroup"],[1,"simpled-button","primary",3,"click"],[1,"table"],["width","300px"],["width","100px",1,"text-center"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-name"],[1,"text-center"],[3,"formControl"],[1,"always-required"],["width","auto",1,"px-0"]];},template:function(i,s){i&1&&(a(0,"simpled-toolbar",9),O(1,cE,2,0,"span",10)(2,dE,3,0,"ng-container",11),r(),a(3,"div",12)(4,"div",13)(5,"div",14),M(6,"simpled-settings-menu"),r(),a(7,"div",15)(8,"h4",16),w(9),c(10,1),V(),r(),a(11,"p",17),c(12,2),r(),a(13,"simpled-alert",18),c(14,3),r(),T(15,LE,25,39,"form",19),r()()()),i&2&&(C("backButtonActive",!0),l(15),E(s.form?15:-1));},dependencies:[te,ee,Pe,Q,ne,Ma,ue,Oe,me,Me,Vt,Ke,It,tt,vi],styles:[".justification-rules-settings-title[_ngcontent-%COMP%]{font-family:Montserrat;font-weight:600;font-size:21px;line-height:32px;color:#012842;margin-bottom:1rem}.justification-rules-settings-text[_ngcontent-%COMP%]{font-size:16px;color:#003457}.table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{color:#6b8199;font-weight:600;font-family:Montserrat;border:none;padding-bottom:1.5rem}.table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{border-top-color:#e9eff5;padding:1rem .75rem}.table[_ngcontent-%COMP%]   .field-name[_ngcontent-%COMP%]{font-weight:600;font-size:16px;color:#012842}.table[_ngcontent-%COMP%]   .always-required[_ngcontent-%COMP%]{color:#6b8199;font-weight:600;font-size:12px;white-space:nowrap}"],changeDetection:0});let e=t;return e;})();function FE(e,t){e&1&&(a(0,"p",12),c(1,4),r());}function PE(e,t){e&1&&(a(0,"p",12),c(1,5),r());}var _c=(()=>{let t=class t{constructor(){this.fb=m(Mi),this.cardSettings=qe(void 0),this.cardSettingsChange=Fn(),this.unsubscribe$=new gt(),this.cardSettingsForm=this.fb.group({defaultBookLedger:["",[_e.maxLength(30)]],defaultGeneralLedger:["",[_e.maxLength(30)]]});}ngOnInit(){this.cardSettingsForm.valueChanges.pipe($t(this.unsubscribe$)).subscribe(n=>this.cardSettingsChange.emit(g({},n)));}ngOnChanges(){let n=this.cardSettings();this.cardSettingsForm.patchValue({defaultBookLedger:n?.defaultBookLedger,defaultGeneralLedger:n?.defaultGeneralLedger},{emitEvent:!1});}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete();}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-card-settings-form"]],inputs:{cardSettings:[1,"cardSettings"]},outputs:{cardSettingsChange:"cardSettingsChange"},features:[_i],decls:17,vars:7,consts:()=>{let n;n="Card ledger:";let i;i="This ledger is usually the same as the \u2018Master account ledger\u2019.";let s;s="Card general ledger:";let _;_="This is the ledger for all outgoing transactions.";let S;S="Card ledger number can be a maximum of 30 characters.";let p;return p="Card general ledger can be a maximum of 30 characters.",[n,i,s,_,S,p,[1,"row"],[1,"col-12","col-md-6"],[1,"form-group",3,"formGroup"],[1,"mb-3"],["for","card-settings-ledger",1,"form-label"],["formControlName","defaultBookLedger","id","card-settings-default-ledger","type","text",1,"form-control","form-control-legacy"],[1,"help-block"],[1,"form-text"],["formControlName","defaultGeneralLedger","id","card-settings-general-ledger","type","text",1,"form-control","form-control-legacy"]];},template:function(i,s){if(i&1&&(a(0,"div",6)(1,"div",7)(2,"form",8)(3,"div",9)(4,"label",10),c(5,0),r(),M(6,"input",11),T(7,FE,2,0,"p",12),a(8,"p",13),c(9,1),r()(),a(10,"div",9)(11,"label",10),c(12,2),r(),M(13,"input",14),T(14,PE,2,0,"p",12),a(15,"p",13),c(16,3),r()()()()()),i&2){let _,S;l(2),C("formGroup",s.cardSettingsForm),l(),H("form-group-invalid",s.cardSettingsForm.get("defaultBookLedger").invalid),l(4),E((_=s.cardSettingsForm.get("defaultBookLedger"))!=null&&_.hasError("maxlength")?7:-1),l(3),H("form-group-invalid",s.cardSettingsForm.get("defaultGeneralLedger").invalid),l(4),E((S=s.cardSettingsForm.get("defaultGeneralLedger"))!=null&&S.hasError("maxlength")?14:-1);}},dependencies:[ue,Oe,Ie,me,Me,Ke,St],styles:[".form-group[_ngcontent-%COMP%]   .form-control[_ngcontent-%COMP%]{height:38px;border-radius:0;border:1px solid #cccccc;color:#555;font-size:14px;line-height:1.42857143;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-group[_ngcontent-%COMP%]   .form-control[_ngcontent-%COMP%]:disabled{cursor:not-allowed}.form-group[_ngcontent-%COMP%]   .form-text[_ngcontent-%COMP%]{color:#7
177}.form-group-invalid[_ngcontent-%COMP%]   .form-control[_ngcontent-%COMP%]{border-color:#f76f6b;box-shadow:inset 0 1px 1px #00000014;color:#f76f6b}.form-group-invalid[_ngcontent-%COMP%]   .form-control[_ngcontent-%COMP%]:focus{box-shadow:inset 0 1px 1px #00000014,0 0 6px #ce8483}.form-group-invalid[_ngcontent-%COMP%]   .help-block[_ngcontent-%COMP%]{color:#fff;background-color:#f76f6b;border-radius:0 0 5px 5px}"],changeDetection:0});let e=t;return e;})();function hE(e,t){if(e&1&&(a(0,"tr")(1,"td"),X(2),I(3,"titlecase"),r(),a(4,"td"),X(5),r(),a(6,"td"),X(7),r()()),e&2){let o=t.$implicit;l(2),ce(L(3,3,o.type)),l(3),Fe(" ",o.cardsInStock," "),l(2),Fe(" ",o.payableCards," ");}}function bE(e,t){if(e&1&&(a(0,"tr")(1,"td"),c(2,2),r(),M(3,"td"),a(4,"td"),X(5),r()()),e&2){let o=t.$implicit;l(5),Fe(" ",o.payableCards," ");}}function yE(e,t){if(e&1&&(a(0,"div",3)(1,"table",4)(2,"tr")(3,"th"),X(4),r(),a(5,"th",5),c(6,0),r(),a(7,"th")(8,"span",6),c(9,1),r()()(),se(10,hE,8,5,"tr",null,Be),se(12,bE,6,1,"tr",null,Be),r()()),e&2){let o=d();l(4),ce(o.issuerName()),l(6),ae(o.cardStatistics()),l(2),ae(o.virtualCardStatistics());}}var cc=(()=>{let t=class t{constructor(){this.cardStatistics=qe(void 0),this.virtualCardStatistics=qe(void 0),this.issuerName=qe(void 0);}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-card-statistics-table"]],inputs:{cardStatistics:[1,"cardStatistics"],virtualCardStatistics:[1,"virtualCardStatistics"],issuerName:[1,"issuerName"]},decls:1,vars:1,consts:()=>{let n;n="Cards with status: active, blocked, blocked by PIN, and expired";let i;i="in stock";let s;s="in use";let _;return _="Virtual cards",[i,s,_,[1,"cards-stat-row"],[1,"cards-info"],[1,"whitespace-nowrap"],["matTooltip",n,"matTooltipPosition","after",1,"whitespace-nowrap"]];},template:function(i,s){if(i&1&&T(0,yE,14,1,"div",3),i&2){let _;E(((_=s.cardStatistics())==null?null:_.length)>0||((_=s.virtualCardStatistics())==null?null:_.length)>0?0:-1);}},dependencies:[Ze,Os],styles:[".cards-stat-row[_ngcontent-%COMP%]{max-width:870px;margin-bottom:30px}.cards-stat-row[_ngcontent-%COMP%]   .cards-info[_ngcontent-%COMP%]{border-top:1px solid #c8c8c8;width:100%}.cards-stat-row[_ngcontent-%COMP%]   .cards-info[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]{border-bottom:1px solid #c8c8c8}.cards-stat-row[_ngcontent-%COMP%]   .cards-info[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f9f9f9}.cards-stat-row[_ngcontent-%COMP%]   .cards-info[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:first-child   th[_ngcontent-%COMP%]{color:#2b5167;font-size:14px;font-weight:400}.cards-stat-row[_ngcontent-%COMP%]   .cards-info[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{padding:7px}.cards-stat-row[_ngcontent-%COMP%]   .cards-info[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:7px 0;color:#333;font-size:14px}.cards-stat-row[_ngcontent-%COMP%]   .cards-info[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{width:70%;padding-left:6px;font-weight:600;font-size:14px;color:#2b5167}.whitespace-nowrap[_ngcontent-%COMP%]{white-space:nowrap}"],changeDetection:0});let e=t;return e;})();var dc=(()=>{let t=class t{constructor(){}ngOnInit(){}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-force-approval-enable-dialog"]],decls:15,vars:0,consts:()=>{let n;n="Edit multiple-eyes settings";let i;i="Enable Multiple-Eyes Principle";let s;s="Each justification must be approved by more than one, different Accountant users (multiple-eyes principle)";let _;_="Cancel";let S;return S="Confirm",[n,i,s,_,S,["dialog-title",""],["dialog-content",""],["dialog-cancel-button",""],["dialog-confirm-button",""]];},template:function(i,s){i&1&&(a(0,"simpled-confirmation-dialog-layout"),w(1,5),c(2,0),V(),a(3,"div",6)(4,"p")(5,"b"),c(6,1),r()(),a(7,"p"),c(8,2),r()(),w(9,7)(10),c(11,3),V()(),w(12,8)(13),c(14,4),V()(),r());},dependencies:[Ai],encapsulation:2,changeDetection:0});let e=t;return e;})();var Cc=(()=>{let t=class t{constructor(){}ngOnInit(){}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-force-approval-disable-dialog"]],decls:18,vars:0,consts:()=>{let n;n="Edit multiple-eyes settings";let i;i="Disable Multiple-Eyes Principle";let s;s="A Master Accountant can single-handedly approve a justification. This applies to all justifications. The multiple-eyes principle is "+"\uFFFD#9\uFFFD"+"not enforced"+"\uFFFD/#9\uFFFD"+" for Master Accountant users.";let _;_="Only allow this temporarily and not structurally. If you don\u2019t require multiple approvals, contact [email protected] to change the settings.";let S;S="Cancel";let p;return p="Confirm",[n,i,s,_,S,p,["dialog-title",""],["dialog-content",""],[1,"text-muted"],["dialog-cancel-button",""],["dialog-confirm-button",""]];},template:function(i,s){i&1&&(a(0,"simpled-confirmation-dialog-layout"),w(1,6),c(2,0),V(),a(3,"div",7)(4,"p")(5,"b"),c(6,1),r()(),a(7,"p"),pe(8,2),M(9,"b"),ge(),r(),a(10,"p",8),c(11,3),r()(),w(12,9)(13),c(14,4),V()(),w(15,10)(16),c(17,5),V()(),r());},dependencies:[Ai],encapsulation:2,changeDetection:0});let e=t;return e;})();function vE(e,t){if(e&1&&(At(0,"div",8)(1,"div",10)(2,"label"),X(3),Mt(),At(4,"p"),X(5),Mt()()()),e&2){let o=t.$implicit;l(3),Fe("BIC (",o.title,")"),l(2),ce(o.code);}}function xE(e,t){if(e&1&&(At(0,"div",3)(1,"div",4)(2,"div",5)(3,"label"),c(4,0),Mt(),At(5,"p"),X(6),I(7,"iban"),Mt()(),At(8,"div",6)(9,"label"),c(10,1),Mt(),At(11,"p"),X(12),Mt()()(),At(13,"div",4)(14,"div",7),se(15,vE,6,2,"div",8,Be),Mt(),At(17,"div",7)(18,"div",9)(19,"label"),c(20,2),Mt(),At(21,"p"),X(22),Mt()()()()()),e&2){let o=t.$implicit;l(6),ce(L(7,3,o.iban)),l(6),ce(o.name),l(3),ae(o.bicCodes),l(7),ce(o.address);}}var Sc=(()=>{let t=class t{constructor(){this.masterAccount=qe(void 0);}ngOnInit(){}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-master-account-details"]],inputs:{masterAccount:[1,"masterAccount"]},decls:2,vars:0,consts:()=>{let n;n="IBAN";let i;i="Name";let s;return s="Address",[n,i,s,[1,"d-flex","p-4","master-account-bank-account"],[1,"w-50"],[1,"master-account-property","master-account-property-iban"],[1,"master-account-property","master-account-property-name"],[1,"row"],[1,"col-6","master-account-bic-codes"],[1,"col-12","master-account-property","master-account-property-bic-address"],[1,"master-account-property","master-account-property-bic-title"]];},template:function(i,s){if(i&1&&se(0,xE,23,5,"div",3,Be),i&2){let _;ae((_=s.masterAccount().issuer)==null?null:_.bankAccounts);}},dependencies:[Aa],styles:[".master-account-property[_ngcontent-%COMP%]{font-size:15px;color:#555}"],changeDetection:0});let e=t;return e;})();var $E=()=>["/customer-settings","financial","cost-centers"];function GE(e,t){e&1&&(a(0,"p",16),c(1,6),r());}function DE(e,t){e&1&&(a(0,"p",16),c(1,7),r());}function UE(e,t){if(e&1&&X(0),e&2){let o=t.item;Fe(" ",o.description," ");}}
1function wE(e,t){if(e&1&&(a(0,"span",25),X(1),r()),e&2){let o=t.item,n=t.searchTerm;C("ngOptionHighlight",n),l(),ce(o.description);}}function VE(e,t){if(e&1&&(a(0,"ng-select",21),O(1,UE,1,1,"ng-template",23)(2,wE,2,2,"ng-template",24),r()),e&2){let o=d();C("items",o.activeCostCenters)("selectOnTab",!0);}}function XE(e,t){if(e&1&&M(0,"input",22),e&2){let o=d();C("value",o.masterCostCenter==null?null:o.masterCostCenter.description);}}function BE(e,t){e&1&&(a(0,"p",26),c(1,8),r());}function kE(e,t){e&1&&(a(0,"div",27)(1,"p"),pe(2,9),M(3,"a",28),ge(),r()()),e&2&&(l(3),C("routerLink",ps(1,$E)));}function zE(e,t){if(e&1&&(a(0,"div"),T(1,BE,2,0,"p",26),T(2,kE,4,2,"div",27),r()),e&2){let o,n=d();l(),E(n.costCenters().length!==0?1:-1),l(),E(((o=n.costCenters())==null?null:o.length)===0?2:-1);}}var Tc=(()=>{let t=class t{constructor(){this.fb=m(Mi),this.masterAccount=qe(void 0),this.costCenters=qe([]),this.readOnly=qe(!1),this.masterAccountChange=Fn(),this.masterAccountValidityChange=Fn(),this.hasActive=!1,this.unsubscribe$=new gt(),this.masterAccountForm=this.fb.group({bookLedger:["",[_e.maxLength(30)]],generalLedger:["",[_e.maxLength(30)]],costCenterId:[null]});}ngOnInit(){this.masterAccountForm.valueChanges.pipe($t(this.unsubscribe$)).subscribe(n=>this.masterAccountChange.emit(f(g({},n),{id:this.masterAccount()?.id}))),this.masterAccountForm.statusChanges.pipe($t(this.unsubscribe$)).subscribe(()=>this.masterAccountValidityChange.emit(this.masterAccountForm.valid)),this.activeCostCenters=this.filterCostCenter(this.costCenters()),this.hasActive=this.costCenters().find(n=>n.active===!0)!==void 0,this.masterCostCenter=this.costCenters().find(n=>n.id===this.masterAccount()?.costCenterId),this.readOnly()===!0&&this.masterAccountForm.disable();}ngOnChanges(){let n=this.masterAccount();this.masterAccountForm.patchValue({bookLedger:n?.bookLedger,generalLedger:n?.generalLedger,costCenterId:n?.costCenterId},{emitEvent:!1}),this.activeCostCenters=this.filterCostCenter(this.costCenters()),this.masterCostCenter=this.costCenters().find(i=>i.id===this.masterAccount()?.costCenterId),this.hasActive=this.costCenters().find(i=>i.active===!0)!==void 0,this.readOnly()===!0?this.masterAccountForm.disable():this.masterAccountForm.disabled&&this.masterAccountForm.enable();}filterCostCenter(n){return n.filter(i=>i.active===!0||i.id===this.masterAccount()?.costCenterId);}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete();}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-master-account-form"]],inputs:{masterAccount:[1,"masterAccount"],costCenters:[1,"costCenters"],readOnly:[1,"readOnly"]},outputs:{masterAccountChange:"masterAccountChange",masterAccountValidityChange:"masterAccountValidityChange"},features:[_i],decls:25,vars:9,consts:()=>{let n;n="Start typing to search cost centres";let i;i="Master account ledger";let s;s="Represents the balance on your master account.";let _;_="Ledger funds in transit \u2013 suspense account";let S;S="Represents the funds in transit between bank and SimpledCard.";let p;p="Cost centre";let P;P="This is the cost centre for the master account ledger";let v;v="Book ledger must be at most 30 characters long.";let G;G="Account general ledger can be a maximum of 30 characters long.";let J;J="The cost centre of this account has been deactivated.";let ie;return ie="There are no cost centres specified. You can do that "+"\uFFFD#3\uFFFD"+"here"+"\uFFFD/#3\uFFFD"+".",[i,s,_,S,p,P,v,G,J,ie,[1,"row"],[1,"col-12","col-md-6"],[1,"form-group",3,"formGroup"],[1,"mb-3"],["for","master-account-ledger",1,"form-label"],["formControlName","bookLedger","id","master-account-ledger","type","text",1,"form-control","form-control-legacy"],[1,"help-block"],[1,"form-text"],["for","master-account-ledger-funds-transit",1,"form-label"],["formControlName","generalLedger","id","master-account-ledger-funds-transit","type","text",1,"form-control","form-control-legacy"],["for","master-account-cost-center",1,"form-label"],["id","master-account-cost-center","formControlName","costCenterId","bindValue","id","bindLabel","description","placeholder",n,1,"simpled-select",3,"items","selectOnTab"],["id","master-account-cost-center","type","text","disabled","",1,"form-control","form-control-legacy",3,"value"],["ng-label-tmp",""],["ng-option-tmp",""],[3,"ngOptionHighlight"],[1,"master-form-info"],[1,"master-form-no-cost-center"],[3,"routerLink"]];},template:function(i,s){if(i&1&&(a(0,"div",10)(1,"div",11)(2,"form",12)(3,"div",13)(4,"label",14),
1c(5,0),r(),M(6,"input",15),T(7,GE,2,0,"p",16),a(8,"p",17),c(9,1),r()(),a(10,"div",13)(11,"label",18),c(12,2),r(),M(13,"input",19),T(14,DE,2,0,"p",16),a(15,"p",17),c(16,3),r()(),a(17,"div",13)(18,"label",20),c(19,4),r(),T(20,VE,3,2,"ng-select",21)(21,XE,1,1,"input",22),T(22,zE,3,2,"div"),a(23,"p",17),c(24,5),r()()()()()),i&2){let _,S;l(2),C("formGroup",s.masterAccountForm),l(),H("form-group-invalid",s.masterAccountForm.get("bookLedger").invalid),l(4),E((_=s.masterAccountForm.get("bookLedger"))!=null&&_.hasError("maxlength")?7:-1),l(3),H("form-group-invalid",s.masterAccountForm.get("generalLedger").invalid),l(4),E((S=s.masterAccountForm.get("generalLedger"))!=null&&S.hasError("maxlength")?14:-1),l(6),E(s.hasActive&&!s.readOnly()?20:21),l(2),E(!s.hasActive&&!s.readOnly()||(s.masterCostCenter==null?null:s.masterCostCenter.active)!==!0?22:-1);}},dependencies:[ue,Oe,Ie,me,Me,Ke,St,ke,dn,cn,xi,tn],styles:[".form-group[_ngcontent-%COMP%]   .form-control[_ngcontent-%COMP%]{height:38px;border-radius:0;border:1px solid #cccccc;color:#555;font-size:14px;line-height:1.42857143;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-group[_ngcontent-%COMP%]   .form-control[_ngcontent-%COMP%]:disabled{cursor:not-allowed}.form-group[_ngcontent-%COMP%]   .ng-select[_ngcontent-%COMP%]{padding-bottom:.25rem}.form-group[_ngcontent-%COMP%]   .form-text[_ngcontent-%COMP%]{color:#777}.form-group[_ngcontent-%COMP%]   .help-block[_ngcontent-%COMP%]{padding:4px 8px;font-weight:600;font-size:14px}.form-group-invalid[_ngcontent-%COMP%]   .form-control[_ngcontent-%COMP%]{border-color:#f76f6b;box-shadow:inset 0 1px 1px #00000014;color:#f76f6b}.form-group-invalid[_ngcontent-%COMP%]   .form-control[_ngcontent-%COMP%]:focus{box-shadow:inset 0 1px 1px #00000014,0 0 6px #ce8483}.form-group-invalid[_ngcontent-%COMP%]   .help-block[_ngcontent-%COMP%]{color:#fff;background-color:#f76f6b;border-radius:0 0 5px 5px}.master-form-info[_ngcontent-%COMP%]{margin:6px 0 0}"],changeDetection:0});let e=t;return e;})();var Ec=(()=>{let t=class t{};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-legal-entities-info-modal"]],decls:27,vars:0,consts:()=>{let n;n="Understanding legal entity details";let i;i=""+"\uFFFD#7\uFFFD"+"ID:"+"\uFFFD/#7\uFFFD"+" Unique identifier for the entity which can be used to setup the reports.";let s;s=""+"\uFFFD#10\uFFFD"+"Name:"+"\uFFFD/#10\uFFFD"+" The entity's display name.";let _;_=""+"\uFFFD#13\uFFFD"+"Entity current account ledger:"+"\uFFFD/#13\uFFFD"+" Any amount paid by the holding company on behalf of the entity is recorded as a credit on the current account ledger. This reflects an increase in the entity's liability to the holding.";let S;S=""+"\uFFFD#16\uFFFD"+"Holding current account ledger:"+"\uFFFD/#16\uFFFD"+" Any amount paid by the holding company on behalf of the entity is recorded as a debit on this current account ledger. This reflects an increase in the holding's receivable from the entity.";let p;p=""+"\uFFFD#19\uFFFD"+"Entity cost center:"+"\uFFFD/#19\uFFFD"+" This is the entity's designated cost centre, which is used in the booking of transactions on the current account ledger. It ensures that expenses or transfers are properly attributed to the correct entity within the holding structure.";let P;P=""+"\uFFFD#22\uFFFD"+"Holding cost center:"+"\uFFFD/#22\uFFFD"+" This is the holding's designated cost centre, which is used in the booking of transactions on the current account ledger. It ensures that expenses or transfers are properly attributed to the correct entity within the holding structure.";let v;return v="Close",[n,i,s,_,S,p,P,v,[1,"simpled-modal-heading"],[1,"simpled-modal-title"],[1,"simpled-modal-content"],[1,"simpled-modal-footer","simpled-modal-actions"],["type","button","mat-dialog-close","",1,"simpled-button","primary","ms-auto"]];},template:function(i,s){i&1&&(a(0,"section",8)(1,"h2",9),c(2,0),r()(),a(3,"section",10)(4,"ul")(5,"li"),pe(6,1),M(7,"strong"),ge(),r(),a(8,"li"),pe(9,2),M(10,"strong"),ge(),r(),a(11,"li"),pe(12,3),M(13,"strong"),ge(),r(),a(14,"li"),pe(15,4),M(16,"strong"),ge(),r(),a(17,"li"),pe(18,5),M(19,"strong"),ge(),r(),a(20,"li"),pe(21,6),M(22,"strong"),ge(),r()()(),a(23,"section",11)(24,"button",12),w(25),c(26,7),V(),r()());},dependencies:[Q,rn],encapsulation:2,changeDetection:0});let e=t;return e;})();function jE(e,t){e&1&&(a(0,"h2",29),c(1,15),r());}function qE(e,t){e&1&&(a(0,"h2",29),c(1,16),r());}function YE(e,t){e&1&&(a(0,"simpled-error"),c(1,17),r());}function JE(e,t){e&1&&(a(0,"simpled-error"),c(1,18),r());}function HE(e,t){e&1&&(a(0,"simpled-error"),c(1,19),r());}function KE(e,t){e&1&&(a(0,"simpled-error"),c(1,20),r());}function WE(e,t){e&1&&(a(0,"simpled-error"),c(1,21),r());}function QE(e,t){e&1&&(a(0,"simpled-error"),c(1,22),r());}function ZE(e,t){e&1&&(a(0,"simpled-error"),c(1,23),r());}function em(e,t){e&1&&(a(0,"simpled-error"),c(1,24),r());}function tm(e,t){e&1&&(a(0,"simpled-error"),c(1,25),r());}function nm(e,t){e&1&&(a(0,"simpled-error"),c(1,26),r());}var mc=(()=>{let t=class t{constructor(){this.legalEntityStore=m(Qe),this.dialogData=m(Ni),this.dialogRef=m(fi),this.isAccordionOpen=Ln(!1),this.currentEntity=Dt(()=>this.legalEntityStore.legalEntities().find(n=>n.id===this.dialogData.legalEntityId)),this.form=new bt({name:new Ue("",[_e.required,_e.maxLength(255)]),legalName:new Ue("",[_e.required,_e.maxLength(255)]),entityCALedger:new 
1Ue("",[_e.required,_e.maxLength(255)]),holdingCALedger:new Ue("",[_e.required,_e.maxLength(255)]),entityCostCenter:new Ue("",[_e.maxLength(255)]),holdingCostCenter:new Ue("",[_e.maxLength(255)])}),this.loading=Ln(!1);}ngOnInit(){this.currentEntity()&&this.form.setValue({name:this.currentEntity().name,legalName:this.currentEntity().legalName,entityCALedger:this.currentEntity().rcLedger,holdingCALedger:this.currentEntity().holdingRcLedger,entityCostCenter:this.currentEntity().costCenter||null,holdingCostCenter:this.currentEntity().holdingCostCenter||null});}onSubmit(){if(this.form.invalid){this.form.markAllAsTouched();return;}this.loading.set(!0),this.currentEntity()?this.legalEntityStore.update(this.dialogData.legalEntityId,{name:this.form.value.name,legalName:this.form.value.legalName,status:this.currentEntity().status,rcLedger:this.form.value.entityCALedger,holdingRcLedger:this.form.value.holdingCALedger,costCenter:this.form.value.entityCostCenter||null,holdingCostCenter:this.form.value.holdingCostCenter||null}).pipe(ir(()=>this.loading.set(!1))).subscribe(()=>this.dialogRef.close(!0)):this.legalEntityStore.create({name:this.form.value.name,legalName:this.form.value.legalName,rcLedger:this.form.value.entityCALedger,holdingRcLedger:this.form.value.holdingCALedger,costCenter:this.form.value.entityCostCenter||null,holdingCostCenter:this.form.value.holdingCostCenter||null}).pipe(ir(()=>this.loading.set(!1))).subscribe(()=>this.dialogRef.close(!0));}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-legal-entity-edit-modal"]],decls:64,vars:15,consts:()=>{let n;n="Enter the display name of the legal entity";let i;i="Enter the legal name of the legal entity";let s;s="Enter the current account ledger for the entity";let _;_="Enter the current account ledger for the master entity";let S;S="Enter the cost center for the entity";let p;p="Enter the cost center for the master entity";let P;P="Display name";let v;v="Unique name to identify the legal entity.";let G;G="Legal name";let J;J="Unique legal name to identify the legal entity.";let ie;ie="Entity current account ledger";let U;U="The intercompany ledger on the entity's books. Amounts paid by the master entity on the entity's behalf are credited here, increasing the entity's liability toward the master entity.";let oe;oe="Master entity current account ledger";let k;k="The intercompany ledger on the master entity's books. Amounts paid on behalf of the entity are debited here, increasing the master entity's receivable from the entity.";let Ce;Ce="Advanced fields";let ve;ve="Entity cost center";let q;q="The cost center assigned to this entity, used to allocate transactions posted to the entity's current account ledger.";let le;le="Master entity cost center";let Pt;Pt="The cost center assigned to the master entity, used to allocate the corresponding entries on the master entity's current account ledger.";let ye;ye="Cancel";let Ut;Ut="Save";let xe;xe="Edit legal entity";let An;An="Add new legal entity";let Mn;Mn="Display name is required.";let On;On="Display name cannot exceed 255 characters.";let Rn;Rn="Legal name is required.";let he;he="Legal name cannot exceed 255 characters.";let Zr;Zr="Entity current account ledger is required.";let es;es="Entity current account ledger cannot exceed 255 characters.";let ts;ts="Master entity current account ledger is required.";let ns;ns="Master entity current account ledger cannot exceed 255 characters.";let is;is="Entity cost center cannot exceed 255 characters.";let os;return os="Master entity cost center cannot exceed 255 characters.",[P,v,G,J,ie,U,oe,k,Ce,ve,q,le,Pt,ye,Ut,xe,An,Mn,On,Rn,he,Zr,es,ts,ns,is,os,[3,"ngSubmit","formGroup"],[1,"simpled-modal-heading"],[1,"simpled-modal-title"],[1,"simpled-modal-content"],["simpledFormControl","","formControlName","name","placeholder",n],["simpledFormControl","","formControlName","legalName","placeholder",i],["simpledFormControl","","formControlName","entityCALedger","placeholder",s],["simpledFormControl","","formControlName","holdingCALedger","placeholder",_],[1,"first-accordion","last-accordion","inline",3,"collapse","isOpen"],["accordion-title",""],["accordion-body",""],["simpledFormControl","","formControlName","entityCostCenter","placeholder",S],["simpledFormControl","","formControlName","holdingCostCenter","placeholder",p],[1,"simpled-modal-footer","simpled-modal-actions"],["type","button","mat-dialog-close","",1,"simpled-button","secondary"],["type","submit",1,"simpled-button","primary",3,"disabled"],[3,"loading"]];},template:function(i,s){i&1&&(a(0,"form",27),u("ngSubmit",function(){return s.onSubmit();}),a(1,"section",28),T(2,jE,2,0,"h2",29)(3,qE,2,0,"h2",29),r(),a(4,"section",30)(5,"simpled-form-group")(6,"label"),c(7,0),r(),M(8,"input",31),a(9,"simpled-
1hint"),c(10,1),r(),T(11,YE,2,0,"simpled-error"),T(12,JE,2,0,"simpled-error"),r(),a(13,"simpled-form-group")(14,"label"),c(15,2),r(),M(16,"input",32),a(17,"simpled-hint"),c(18,3),r(),T(19,HE,2,0,"simpled-error"),T(20,KE,2,0,"simpled-error"),r(),a(21,"simpled-form-group")(22,"label"),c(23,4),r(),M(24,"input",33),a(25,"simpled-hint"),c(26,5),r(),T(27,WE,2,0,"simpled-error"),T(28,QE,2,0,"simpled-error"),r(),a(29,"simpled-form-group")(30,"label"),c(31,6),r(),M(32,"input",34),a(33,"simpled-hint"),c(34,7),r(),T(35,ZE,2,0,"simpled-error"),T(36,em,2,0,"simpled-error"),r(),a(37,"simpled-accordion",35),u("collapse",function(){return s.isAccordionOpen.update(S=>!S);}),w(38,36),a(39,"div"),c(40,8),r(),V(),w(41,37),a(42,"simpled-form-group")(43,"label"),c(44,9),r(),M(45,"input",38),a(46,"simpled-hint"),c(47,10),r(),T(48,tm,2,0,"simpled-error"),r(),a(49,"simpled-form-group")(50,"label"),c(51,11),r(),M(52,"input",39),a(53,"simpled-hint"),c(54,12),r(),T(55,nm,2,0,"simpled-error"),r(),V(),r()(),a(56,"section",40)(57,"button",41),w(58),c(59,13),V(),r(),a(60,"button",42),w(61),c(62,14),V(),M(63,"simpled-spinner",43),r()()()),i&2&&(C("formGroup",s.form),l(2),E(s.currentEntity()?2:3),l(9),E(s.form.get("name").hasError("required")?11:-1),l(),E(s.form.get("name").hasError("maxlength")?12:-1),l(7),E(s.form.get("legalName").hasError("required")?19:-1),l(),E(s.form.get("legalName").hasError("maxlength")?20:-1),l(7),E(s.form.get("entityCALedger").hasError("required")?27:-1),l(),E(s.form.get("entityCALedger").hasError("maxlength")?28:-1),l(7),E(s.form.get("holdingCALedger").hasError("required")?35:-1),l(),E(s.form.get("holdingCALedger").hasError("maxlength")?36:-1),l(),C("isOpen",s.isAccordionOpen()),l(11),E(s.form.get("entityCostCenter").hasError("maxlength")?48:-1),l(7),E(s.form.get("holdingCostCenter").hasError("maxlength")?55:-1),l(5),C("disabled",s.loading()),l(3),C("loading",s.loading()));},dependencies:[ue,Oe,Ie,me,Me,Ke,St,Xt,ln,an,na,Li,Q,rn,Na,Ra],encapsulation:2});let e=t;return e;})();var im=(e,t)=>t.id;function om(e,t){e&1&&(a(0,"span"),c(1,5),r());}function rm(e,t){if(e&1){let o=h();w(0),a(1,"button",27),u("click",function(){N(o);let i=d();return A(i.createEntity());}),w(2),c(3,6),V(),r(),V();}}function sm(e,t){e&1&&M(0,"simpled-no-results");}function am(e,t){if(e&1){let o=h();a(0,"div",40),u("cdkMenuItemTriggered",function(){N(o);let i=d(2).$index,s=d(3);return A(s.deactivateEntity(i));}),M(1,"fa-icon",37),w(2),c(3,15),V(),r();}if(e&2){let o=d(5);l(),C("icon",o.deactivateIcon);}}function lm(e,t){if(e&1){let o=h();a(0,"div",41),u("cdkMenuItemTriggered",function(){N(o);let i=d(2).$index,s=d(3);return A(s.reactivateEntity(i));}),M(1,"fa-icon",37),w(2),c(3,16),V(),r();}if(e&2){let o=d(5);l(),C("icon",o.reactivateIcon);}}function _m(e,t){if(e&1){let o=h();a(0,"div",35)(1,"div",36),u("click",function(){N(o);let i=d().$index,s=d(3);return A(s.editEntity(i));}),M(2,"fa-icon",37),w(3),c(4,14),V(),r(),T(5,am,4,1,"div",38)(6,lm,4,1,"div",39),r();}if(e&2){let o=d().$implicit,n=d(3);l(2),C("icon",n.editIcon),l(3),E(o.status==="ACTIVE"?5:o.status==="INACTIVE"?6:-1);}}function cm(e,t){if(e&1&&(a(0,"tr",32)(1,"td"),X(2),r(),a(3,"td"),X(4),r(),a(5,"td"),X(6),r(),a(7,"td"),X(8),r(),a(9,"td"),X(10),r(),a(11,"td"),X(12),r(),a(13,"td"),X(14),r(),a(15,"td",33),M(16,"simpled-display-icon",34),O(17,_m,7,2,"ng-template",null,0,fe),r()()),e&2){let o=t.$implicit,n=b(18),i=d(3);H("inactive",o.status==="INACTIVE"),l(2),ce(o.id),l(2),ce(o.name),l(2),ce(o.legalName),l(2),ce(o.rcLedger),l(2),ce(o.holdingRcLedger),l(2),ce(o.costCenter),l(2),ce(o.holdingCostCenter),l(2),C("icon",i.menuIcon)("animateHover",!0)("cdkMenuTriggerFor",n);}}function dm(e,t){if(e&1&&(a(0,"div",29)(1,"table",30)(2,"thead")(3,"tr")(4,"th"),c(5,7),r(),a(6,"th"),c(7,8),r(),a(8,"th"),c(9,9),r(),a(10,"th"),c(11,10),r(),a(12,"th"),c(13,11),r(),a(14,"th"),c(15,12),r(),a(16,"th"),c(17,13),r(),M(18,"th"),r()(),a(19,"tbody"),se(20,cm,19,12,"tr",31,im),r()()()),e&2){let o=d(2);l(20),ae(o.legalEntities());}}function Cm(e,t){if(e&1){let o=h();a(0,"section")(1,"simpled-filters-container")(2,"simpled-select-filter",28),u("filterChange",function(i){N(o);let s=d();return A(s.statusFilterState.set((i==null?null:i.id)??null));}),r()()(),T(3,sm,1,0,"simpled-no-results")(4,dm,22,0,"div",29);}if(e&2){let o=d();l(2),C("model",o.statusFilterState())("values",o.statusFilterValues),l(),E(o.legalEntities().length===0?3:4);}}var uc=(()=>{let t=class t{constructor(){this.menuIcon=Oi,this.editIcon=Ri,this.deactivateIcon=Ii,this.reactivateIcon=Lt,this.confirmationDialogService=m(We),this.matDialog=m(wt),this.toastrService=m(yi),this.legalEntitiesStore=m(Qe),this.injector=m(_s),this.statusFilterValues=[{name:"Active",id:"ACTIVE"},{name:"Inactive",id:"INACTIVE"}],this.statusFilterState=Ln("ACTIVE"),this.legalEntities=Dt(()=>{let n=this.statusFilterState();return this.legalEntitiesStore.legalEntities().filter(i=>i.id!==null&&(n===null||i.status===n)).sort((i,s)=>i.id-s.id);}),this.loaded=this.legalEntitiesStore.loaded;}ngOnInit(){this.legalEntitiesStore.load().subscribe();}deactivateEntity(n){this.confirmationDialogService.openConfirmationDialog({title:"Deactivate legal entity",message:"Are you sure you want to deactivate this legal entity?"}).pipe(Z(1),$e(i=>!!i),ht(()=>this.legalEntitiesStore.updateStatus(this.legalEntities()[n].id,"INACTIVE"))).subscribe(()=>{this.toastrService.success("Deactivate entity success");});}reactivateEntity(n){this.confirmationDialogService.openConfirmationDialog({title:"Reactivate legal entity",message:"Are you sure you want to reactivate this legal entity?"}).pipe(Z(1),$e(i=>!!i),ht(()=>this.legalEntitiesStore.updateStatus(this.legalEntities()[n].id,"ACTIVE"))).subscribe(()=>{this.toastrService.success("Reactivate entity success");});}createEntity(){this.openLegalEntityModal().afterClosed().subscribe(n=>{n&&this.toastrService.success("Add new entity success");});}editEntity(n){this.openLegalEntityModal(this.legalEntities()[n].id).afterClosed().subscribe(i=>{i&&this.toastrService.success("Edit entity success");});}showLegalEntityInfo(){this.matDialog.open(Ec,{maxWidth:"800px",width:"90vw"});}openLegalEntityModal(n){return this.matDialog.open(mc,{maxWidth:"800px",width:"90vw",injector:this.injector,data:{legalEntityId:n},disableClose:!0});}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-legal-entities"]],decls:20,vars:2,consts:()=>{let n;n="Legal entities";let i;i="On this page you can configure the accounting settings for each entity. These settings determine how transactions are booked in the respective accounting systems.";let s;s=""+"\uFFFD#15\uFFFD"+"Note:"+"\uFFFD/#15\uFFFD"+" While each entity maintains its own general ledger entries, the funds managed within the Card Management System (CMS) remain legally and financially owned by the master entity.";let _;_="The following general ledger accounts represent the intercompany financial relationship between the entity and the master entity ("+"\uFFFD#18\uFFFD"+"Learn more"+"\uFFFD/#18\uFFFD"+"):";let S;S="Company settings";let p;p="Add new";let P;P="Any status";let v;v="ID";let G;G="Name";let J;J="Legal name";let ie;ie="Entity current account ledger";let U;U="Master entity current account ledger";let oe;oe="Entity cost center";let k;k="Master entity cost center";let Ce;Ce="Edit";let ve;ve="Deactivate";let q;
1return q="Reactivate",[["menu",""],n,i,s,_,S,p,v,G,J,ie,U,oe,k,Ce,ve,q,[3,"backButtonActive"],[4,"toolbar-title"],[4,"toolbar-actions"],[1,"container-fluid","customer-settings-menu"],[1,"row"],[1,"col-md-3"],[1,"col-md-9"],[1,"mb-5"],[1,"simpled-h3","mb-3"],[1,"clickable","link-underline-blue",3,"click"],["data-sc-test","add-legal-entity-button",1,"simpled-button","primary","toolbar-button",3,"click"],["placeholder",P,1,"filter-item",3,"filterChange","model","values"],[1,"sidescrolled-table-container"],[1,"table","legal-entities-grid"],[1,"legal-entities-grid-row",3,"inactive"],[1,"legal-entities-grid-row"],[1,"grid-actions-col","text-end"],["size","md",1,"d-inline-flex",3,"icon","animateHover","cdkMenuTriggerFor"],["cdkMenu",""],["cdkMenuItem","","data-sc-test","menu-action-edit",1,"sc-menu-item-info",3,"click"],[3,"icon"],["cdkMenuItem","","data-sc-test","menu-action-deactivate",1,"sc-menu-item-danger"],["cdkMenuItem","","data-sc-test","menu-action-reactivate",1,"sc-menu-item-success"],["cdkMenuItem","","data-sc-test","menu-action-deactivate",1,"sc-menu-item-danger",3,"cdkMenuItemTriggered"],["cdkMenuItem","","data-sc-test","menu-action-reactivate",1,"sc-menu-item-success",3,"cdkMenuItemTriggered"]];},template:function(i,s){i&1&&(a(0,"simpled-toolbar",17),O(1,om,2,0,"span",18)(2,rm,4,0,"ng-container",19),r(),a(3,"div",20)(4,"div",21)(5,"div",22),M(6,"simpled-settings-menu"),r(),a(7,"div",23)(8,"section",24)(9,"h2",25),c(10,1),r(),a(11,"p"),c(12,2),r(),a(13,"p"),pe(14,3),M(15,"strong"),ge(),r(),a(16,"p"),pe(17,4),a(18,"a",26),u("click",function(){return s.showLegalEntityInfo();}),r(),ge(),r()(),T(19,Cm,5,3),r()()()),i&2&&(C("backButtonActive",!0),l(19),E(s.loaded()?19:-1));},dependencies:[te,ee,Pe,Q,ne,Xi,Vi,Bi,bi,Di,wi,Ui,Le],styles:[".legal-entities-grid[_ngcontent-%COMP%]{width:100%;max-width:100%}.legal-entities-grid[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{white-space:nowrap}.legal-entities-grid[_ngcontent-%COMP%]   .legal-entities-grid-row[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{vertical-align:middle}.legal-entities-grid[_ngcontent-%COMP%]   tr.inactive[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{color:#8fa3b8}"]});let e=t;return e;})();var pc=y(je,e=>e.masterAccount),gc=y(pc,e=>e.masterAccount),fc=y(pc,e=>e.valid);function Sm(e,t){e&1&&(a(0,"span"),c(1,4),r());}function Tm(e,t){if(e&1){let o=h();a(0,"span")(1,"button",20),I(2,"async"),u("click",function(){N(o);let i=d(2);return A(i.saveAccount());}),w(3),c(4,5),V(),r()();}if(e&2){let o=d(2);l(),C("disabled",L(2,1,o.isValid$)!==!0);}}function Em(e,t){e&1&&O(0,Tm,5,3,"span",19);}function mm(e,t){if(e&1&&(a(0,"mat-tab",22),M(1,"simpled-master-account-details",23),r()),e&2){let o=t.$implicit;C("label",o.name),l(),C("masterAccount",o);}}function um(e,t){if(e&1){let o=h();a(0,"div",18)(1,"mat-tab-group",21),u("selectedTabChange",function(i){let s=N(o),_=d();return A(_.onTabChange(s[i.index]==null?null:s[i.index].id));}),se(2,mm,2,2,"mat-tab",22,Be),r()();}e&2&&(l(),C("mat-stretch-tabs",!1),l(),ae(t));}function pm(e,t){if(e&1){let o=h();a(0,"div",10)(1,"div",24)(2,"h4",14),c(3,6),r(),a(4,"div",15)(5,"simpled-master-account-form",25),I(6,"async"),I(7,"async"),u("masterAccountChange",function(i){N(o);let s=d();return A(s.onMasterAccountChange(i));})("masterAccountValidityChange",function(i){N(o);let s=d();return A(s.onValidityChange(i));}),r()()()();}if(e&2){let o=d();l(5),C("masterAccount",t)("costCenters",L(6,3,o.costCenters$))("readOnly",L(7,5,o.isAdmin$)!==!0);}}var Nc=(()=>{let t=class t{constructor(){this.store=m(B),this.isAdmin$=this.store.select(hs),this.isValid$=this.store.select(fc),this.masterAccounts$=this.store.select(la),this.activeMaster$=this.store.select(gc),this.costCenters$=this.store.pipe(re(El)),this.masterAccounts$.pipe(Z(1),$e(n=>n?.length>0)).subscribe(n=>{this.store.dispatch(or({masterAccountId:n[0].id}));}),this.store.pipe(re(qa),$e(n=>!!n),Ci()).subscribe(n=>{this.store.dispatch(ii({valid:!0})),this.store.dispatch(ni({masterAccount:{id:n.id,bookLedger:n?.bookLedger,generalLedger:n?.generalLedger,costCenterId:n?.costCenter?.id}}));});}saveAccount(){this.activeMaster$.pipe(Z(1)).subscribe(n=>{this.store.dispatch(aa(n));});}onMasterAccountChange(n){this.store.dispatch(ni({masterAccount:n}));}onValidityChange(n){this.store.dispatch(ii({valid:n}));}onTabChange(n){n!=null&&this.store.dispatch(or({masterAccountId:n}
1));}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-master-account"]],decls:25,vars:10,consts:()=>{let n;n="Maintain master balance";let i;i="The master balance represents the available amount that you can transfer to your separate accounts and consequently your cardholders. This balance is supplemented by a bank transfer from your corporate account to the Adyen IBAN mentioned below.";let s;s="Please note: Transfers can only be processed if they are made from the corporate account you have stipulated in the SimpledCard service agreement. During workdays your transfer will be processed within 24 hours.";let _;_="It is not possible to make an urgent payment/rush transfer to this Master Account.";let S;S="Company settings";let p;p="Save account";let P;return P="Edit master account",[n,i,s,_,S,p,P,[3,"backButtonActive"],[4,"toolbar-title"],[1,"container-fluid","customer-settings-menu"],[1,"row"],[1,"col-md-3"],[1,"col-md-9"],[1,"master-account-settings-section"],[1,"master-account-settings-title"],[1,"master-account-settings-section-body"],[1,"col-md-12"],[1,"col-md-12","text-important","text-danger"],[1,"master-account-tabs"],[4,"toolbar-actions"],[1,"simpled-button","primary","toolbar-button",3,"click","disabled"],["animationDuration","0",3,"selectedTabChange","mat-stretch-tabs"],[3,"label"],[1,"tab-content",3,"masterAccount"],[1,"col-12"],[3,"masterAccountChange","masterAccountValidityChange","masterAccount","costCenters","readOnly"]];},template:function(i,s){if(i&1&&(a(0,"simpled-toolbar",7),O(1,Sm,2,0,"span",8),T(2,Em,1,0,"span"),I(3,"async"),r(),a(4,"div",9)(5,"div",10)(6,"div",11),M(7,"simpled-settings-menu"),r(),a(8,"div",12)(9,"div",13)(10,"h4",14),c(11,0),r(),a(12,"div",15)(13,"div",10)(14,"p",16),c(15,1),r()(),a(16,"div",10)(17,"p",16),c(18,2),r(),a(19,"p",17),c(20,3),r()(),T(21,um,4,1,"div",18),I(22,"async"),r()(),T(23,pm,8,7,"div",10),I(24,"async"),r()()()),i&2){let _,S;C("backButtonActive",!0),l(2),E(L(3,4,s.isAdmin$)?2:-1),l(19),E((_=L(22,6,s.masterAccounts$))?21:-1,_),l(2),E((S=L(24,8,s.activeMaster$))?23:-1,S);}},dependencies:[te,ee,Pe,Q,ne,ya,ba,Sc,Tc,W],styles:[".master-account-settings-section-body[_ngcontent-%COMP%]{padding:16px}.master-account-settings-title[_ngcontent-%COMP%]{font-size:18px;padding:0 16px;margin-top:24px;font-weight:600}.master-account-tabs[_ngcontent-%COMP%]{margin-top:16px;border-bottom:1px solid #e5e9f1}.text-important[_ngcontent-%COMP%]{font-size:16px}"],changeDetection:0});let e=t;return e;})();function gm(e,t){e&1&&(a(0,"span"),c(1,2),r());}function fm(e,t){if(e&1){let o=h();a(0,"div")(1,"div",23)(2,"div"),X(3),r(),a(4,"div"),M(5,"fa-icon",24),a(6,"span"),c(7,4),r()()(),a(8,"div",25)(9,"button",26),u("click",function(){N(o);let i=d(2);return A(i.odooCancelConnect());}),c(10,5),r()()();}if(e&2){let o=d(),n=d();l(3),ce(o.externalUserName),l(2),C("icon",n.faCheck);}}function Nm(e,t){if(e&1){let o=h();a(0,"div")(1,"div",27),c(2,6),r(),a(3,"div",25)(4,"button",26),u("click",function(){N(o);let i=d(2);return A(i.odooCancelConnect());}),c(5,7),r()()();}}function Am(e,t){if(e&1){let o=h();a(0,"div")(1,"div",28),c(2,8),r(),a(3,"div",29)(4,"button",26),u("click",function(){N(o);let i=d(2);return A(i.odooTryAgain());}),c(5,9),r()()();}}function Mm(e,t){if(e&1&&(a(0,"p"),c(1,3),r(),T(2,fm,11,2,"div"),T(3,Nm,6,0,"div"),T(4,Am,6,0,"div")),e&2){let o=t;l(2),E(o.status==="CONNECTED"?2:-1),l(),E(o.status==="PENDING"?3:-1),l(),E(o.status==="FAILED"?4:-1);}}function Om(e,t){if(e&1){let o=h();a(0,"div",30)(1,"button",31),u("click",function(){N(o);let i=d(2);return A(i.odooConnect());}),c(2,10),r()();}}function Rm(e,t){if(e&1&&(T(0,Om,3,0,"div",30),I(1,"async")),e&2){let o=d();E(L(1,1,o.isLoaded$)?0:-1);}}var Ac=(()=>{let t=class t{constructor(){this.confirmationDialog=m(We),this.integrationService=m(pt),this.faCheck=Lt,this.odooRequest$=new lt(null),this.isLoaded$=new lt(!1);}ngOnInit(){this.integrationService.getIntegrationData("odoo").subscribe({next:n=>{this.odooRequest$.next(n),this.isLoaded$.next(!0);},error:()=>this.isLoaded$.next(!0)});}odooConnect(){let n=window.location.href;this.integrationService.startIntegration("odoo",n).subscribe(i=>{i.externalAuthorizationUrl&&(window.location.href=i.externalAuthorizationUrl);});}odooCancelConnect(){this.confirmationDialog.openConfirmationDialog({title:"Disconnect Odoo",message:"Are you sure you want to disconnect SimpledCard and Odoo?",confirmLabel:"Confirm",cancelLabel:"Cancel"},"760px").subscribe(n=>{n&&this.integrationService.deleteIntegrationData("odoo").subscribe(()=>{this.odooRequest$.next(null);});});}odooTryAgain(){this.integrationService.deleteIntegrationData("odoo").subscribe(()=>this.odooConnect());}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-odoo-connect"]],decls:19,vars:4,consts:()=>{let n;n="Odoo";let i;i="Here you can link your SimpledCard account with your Odoo account. Please click 'Connect' and follow the steps. You will be redirected to the verification-page of Odoo. Use your Odoo credentials to log in and establish the connection.";let s;s="Company settings";let _;_="Account details:";let S;S="Connected";let p;p="Disconnect";let P;P="In progress...";let v;v="Cancel";let G;G="Connection failed";let J;J="Try again";let ie;return ie="Connect",[n,i,s,_,S,p,P,v,G,J,ie,[3,"backButtonActive"],[4,"toolbar-title"],[1,"container-fluid","customer-settings-menu"],[1,"row"],[1,"col-md-3"],[1,"col-md-9"],[1,"odoo-settings-section"],[1,"odoo-settings-title-section"],["src","./assets/images/odoo-logo.png","width","42px"],[1,"odoo-settings-title"],[1,"odoo-settings-section-body"],[1,"odoo-settings-account-section"],[1,"alert","alert-success"],[3,"icon"],[1,"odoo-settings-cancel-button-section"],[1,"simpled-button","danger",3,"click"],[1,"alert","alert-warning"],[1,"alert","alert-danger"],[1,"odoo-settings-again-button-section"],[1,"odoo-settings-button-section"],[1,"simpled-button","primary",3,"click"]];},template:function(i,s){if(i&1&&(a(0,"simpled-toolbar",11),O(1,gm,2,0,"span",12),r(),a(2,"div",13)(3,"div",14)(4,"div",15),M(5,"simpled-settings-menu"),r(),a(6,"div",16)(7,"div",17)(8,"div",18),M(9,"img",19),a(10,"h4",20),c(11,0),r()(),a(12,"div",21)(13,"p"),c(14,1),r()(),a(15,"div",22),T(16,Mm,5,3),I(17,"async"),nt(18,Rm,2,3),r()()()()()),i&2){let _;C("backButtonActive",!0),l(16),E((_=L(17,2,s.odooRequest$))?16:18,_);}},dependencies:[te,ee,ne,Le,W],styles:[".odoo-settings-section[_ngcontent-%COMP%], .odoo-settings-section-body[_ngcontent-%COMP%], .odoo-settings-account-section[_ngcontent-%COMP%]{padding:16px}.odoo-settings-section[_ngcontent-%COMP%]   .odoo-settings-title-section[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:25px;padding:10px 15px 0}.odoo-settings-section[_ngcontent-%COMP%]   .odoo-settings-title-section[_ngcontent-%COMP%]   h4[_ng
1content-%COMP%]{margin-bottom:0;margin-left:10px}.odoo-settings-section[_ngcontent-%COMP%]   .odoo-settings-button-section[_ngcontent-%COMP%]{display:flex;justify-content:center}.odoo-settings-account-section[_ngcontent-%COMP%]   .alert[_ngcontent-%COMP%]{display:flex;font-weight:600}.odoo-settings-account-section[_ngcontent-%COMP%]   .alert[_ngcontent-%COMP%]   fa-icon[_ngcontent-%COMP%]{margin-right:5px}.odoo-settings-account-section[_ngcontent-%COMP%]   .odoo-settings-cancel-button-section[_ngcontent-%COMP%], .odoo-settings-account-section[_ngcontent-%COMP%]   .odoo-settings-again-button-section[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}"],changeDetection:0});let e=t;return e;})();function Im(e,t){e&1&&(a(0,"span"),c(1,3),r());}function Lm(e,t){e&1&&(a(0,"span",15),c(1,4),r());}function Fm(e,t){e&1&&(a(0,"span",15),c(1,5),r());}var Mc=(()=>{let t=class t{constructor(){this.store=m(B);}ngOnInit(){this.isTppActive$=this.store.pipe(re(Pn(z.OPEN_BANKING_ACCOUNT_INFORMATION_ACCESS)));}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-open-banking"]],decls:22,vars:7,consts:()=>{let n;n="OpenBanking AISP/TPP Access";let i;i="OpenBanking AISP/TPP Access:";let s;s="For more information please contact "+"\uFFFD#21\uFFFD"+"[email protected]"+"\uFFFD/#21\uFFFD"+"";let _;_="Company settings";let S;S="Enabled";let p;return p="Disabled",[n,i,s,_,S,p,[3,"backButtonActive"],[4,"toolbar-title"],[1,"container-fluid","customer-settings-menu"],[1,"row"],[1,"col-md-3"],[1,"col-md-9"],[1,"open-banking"],[1,"open-banking-header"],[1,"open-banking-body"],[1,"open-banking-status"],["href","mailto:[email protected]",1,"link"]];},template:function(i,s){i&1&&(a(0,"simpled-toolbar",6),O(1,Im,2,0,"span",7),r(),a(2,"div",8)(3,"div",9)(4,"div",10),M(5,"simpled-settings-menu"),r(),a(6,"div",11)(7,"div",12)(8,"h4",13),c(9,0),r(),a(10,"div",14)(11,"p"),w(12),c(13,1),V(),X(14,"\xA0 "),T(15,Lm,2,0,"span",15),I(16,"async"),T(17,Fm,2,0,"span",15),I(18,"async"),r(),a(19,"p"),pe(20,2),M(21,"a",16),ge(),r()()()()()()),i&2&&(C("backButtonActive",!0),l(15),E(L(16,3,s.isTppActive$)===!0?15:-1),l(2),E(L(18,5,s.isTppActive$)===!1?17:-1));},dependencies:[te,ee,ne,Q,W],styles:[".open-banking[_ngcontent-%COMP%]{border:0;border-bottom:1px solid #e5e9f1;margin:0 0 8px;padding:16px}.open-banking-header[_ngcontent-%COMP%]{padding:10px 15px 0;margin:10px 0;font-weight:600;font-size:18px}.open-banking-body[_ngcontent-%COMP%]{padding:15px}"],changeDetection:0});let e=t;return e;})();var kr=y(Tl,e=>e.customerVatList),zr=y(kr,e=>e.customerVatList),a8=y(kr,e=>e.loading),Oc=y(kr,e=>e.loaded),Pm=y(zr,e=>e.filter(t=>t.active)),Rc=y(Pm,e=>e&&e.length!==0);var hm=y(je,e=>e.customerPrefillingSettings),jr=y(hm,e=>e.customerPrefillingSettings);var bm=["tableLine"];function ym(e,t){e&1&&(a(0,"span"),c(1,7),r());}function vm(e,t){if(e&1){let o=h();w(0),a(1,"button",30),u("click",function(){N(o);let i=d();return A(i.save());}),w(2),c(3,8),V(),r(),V();}if(e&2){d();let o=b(29);l(),C("disabled",o.invalid);}}function xm(e,t){if(e&1&&X(0),e&2){let o=t.item;Fe(" ",o.description," ");}}function $m(e,t){if(e&1&&(a(0,"p",35),X(1),r(),a(2,"span",35),X(3),r()),e&2){let o=t.item,n=t.searchTerm;C("ngOptionHighlight",n),l(),ce(o.description),l(),C("ngOptionHighlight",n),l(),ce(o.externalLedger);}}function Gm(e,t){if(e&1&&X(0),e&2){let o=t.item;Fe(" ",o.description," ");}}function Dm(e,t){if(e&1&&(a(0,"p",35),X(1),r(),a(2,"span",35),X(3),r()),e&2){let o=t.item,n=t.searchTerm;C("ngOptionHighlight",n),l(),ce(o.description),l(),C("ngOptionHighlight",n),l(),ce(o.code);}}function Um(e,t){if(e&1){let o=h();a(0,"tr")(1,"td"),X(2),r(),a(3,"td")(4,"ng-select",31),I(5,"async"),I(6,"async"),I(7,"async"),u("ngModelChange",function(i){let s=N(o).$index,_=d(2);return A(_.lineChange(s,"costTypeId",i));})("clear",function(){let i=N(o).$index,s=d(2);return A(s.lineChange(i,"costTypeId",null));}),O(8,xm,1,1,"ng-template",32)(9,$m,4,4,"ng-template",33),r()(),a(10,"td")(11,"ng-select",34),I(12,"async"),I(13,"async"),u("ngModelChange",function(i){let s=N(o).$index,_=d(2);return A(_.lineChange(s,"vatCodeId",i));})("clear",function(){let i=N(o).$index,s=d(2);return A(s.lineChange(i,"vatCodeId",null));}),O(14,Gm,1,1,"ng-template",32)(15,Dm,4,4,"ng-template",33),r()()();}if(e&2){let o=t.$implicit,n=t.$index,i=d(2);l(2),Fe(" ",o.simpledCostType.description," "),l(2),C("items",L(5,14,i.costTypes$))("name","prefilling["+n+"][costTypeId]")("disabled",L(6,16,i.hasActiveCostType$)===!1)("ngModel",o.costTypeId)("selectOnTab",!0)("searchFn",i.searchCostType)("placeholder",L(7,18,i.costTypePlaceholder$)),l(7),C("items",L(12,20,i.vats$))("name","prefilling["+n+"][vatCodeId]")("ngModel",o.vatCodeId)("selectOnTab",!0)("disabled",L(13,22,i.hasActiveVat$)===!1)("searchFn",i.searchVat);}}function wm(e,t){e&1&&(a(0,"tbody"),se(1,Um,16,24,"tr",null,Je().trackById,!0),r()),e&2&&(l(),ae(t));}var Ic=(()=>{let t=class t{constructor(){this.store=m(B),this.unsubscribe$=new gt(),this.removeIcon=at,this.tableLines=dt("tableLine"),this.defaultCostTypePlaceholder="Type to filter by description",this.defaultVatPlaceholder="Type to filter by description or code";}ngOnInit(){this.prefillings$=this.store.pipe(re(jr)),this.costTypes$=this.store.pipe(re(ul),F(n=>n.map(i=>
1f(g({},i),{disabled:!i.active})))),this.costTypesLoaded$=this.store.pipe(re(gl)),this.hasActiveCostType$=nr([this.costTypesLoaded$,this.store.pipe(re(pl))]).pipe(F(([n,i])=>!n||i)),this.costTypePlaceholder$=this.hasActiveCostType$.pipe(F(n=>n?this.defaultCostTypePlaceholder:"")),this.vats$=this.store.pipe(re(zr),F(n=>n.map(i=>f(g({},i),{disabled:!i.active})))),this.vatsLoaded$=this.store.pipe(re(Oc)),this.hasActiveVat$=nr([this.vatsLoaded$,this.store.pipe(re(Rc))]).pipe(F(([n,i])=>!n||i)),this.vatPlaceholder$=this.hasActiveVat$.pipe(F(n=>n?this.defaultVatPlaceholder:"")),this.isPrefillingUsed$=this.store.pipe(re(bs(z.PREFILLING)));}lineChange(n,i,s){this.store.dispatch($o({index:n,property:i,newValue:s}));}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete();}changeUsePrefilling(n){this.store.dispatch(Go({usePrefilling:n}));}save(){this.store.pipe(re(jr),Z(1)).subscribe(n=>this.store.dispatch(vo({customerPrefillingList:n})));}trackById(n,i){return i.simpledCostType.id;}searchCostType(n,i){return n=n.toLocaleLowerCase(),i.description.toLocaleLowerCase().indexOf(n)>-1||i.externalLedger?.toLocaleLowerCase().indexOf(n)>-1;}searchVat(n,i){return n=n.toLocaleLowerCase(),i.description.toLocaleLowerCase().indexOf(n)>-1||i.code?.toLocaleLowerCase().indexOf(n)>-1;}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-prefilling-list"]],viewQuery:function(i,s){i&1&&_t(s.tableLines,bm,5),i&2&&ct();},decls:44,vars:7,consts:()=>{let n;n="Prefilling of justifications";let i;i="When a cardholder does a transaction at a merchant, the system knows the Simpled cost type of this transaction."+"[\uFFFD#16\uFFFD\uFFFD/#16\uFFFD|\uFFFD#17\uFFFD\uFFFD/#17\uFFFD|\uFFFD#18\uFFFD\uFFFD/#18\uFFFD|\uFFFD#19\uFFFD\uFFFD/#19\uFFFD]"+" To help the cardholder fill in his justification, in this screen you can match our Simpled cost types to your own cost types and the usual VAT percentage."+"[\uFFFD#16\uFFFD\uFFFD/#16\uFFFD|\uFFFD#17\uFFFD\uFFFD/#17\uFFFD|\uFFFD#18\uFFFD\uFFFD/#18\uFFFD|\uFFFD#19\uFFFD\uFFFD/#19\uFFFD]"+" This will be prefilled in the first line of the cardholders justification, but can always be changed by the cardholder."+"[\uFFFD#16\uFFFD\uFFFD/#16\uFFFD|\uFFFD#17\uFFFD\uFFFD/#17\uFFFD|\uFFFD#18\uFFFD\uFFFD/#18\uFFFD|\uFFFD#19\uFFFD\uFFFD/#19\uFFFD]"+" By leaving a field for cost type or VAT empty in this screen, we will not prefill that field for that Simpled cost type."+"[\uFFFD#16\uFFFD\uFFFD/#16\uFFFD|\uFFFD#17\uFFFD\uFFFD/#17\uFFFD|\uFFFD#18\uFFFD\uFFFD/#18\uFFFD|\uFFFD#19\uFFFD\uFFFD/#19\uFFFD]"+" Disabling prefilling will not prefill for any of the Simpled cost types.",i=it(i);let s;s="Use prefilling";let _;_="Cost type category";let S;S="Cost type";let p;p="VAT";let P;P="Company settings";let v;v="Save";let G;return G="Type to filter by description or code",[["prefillingForm","ngForm"],n,i,s,_,S,p,P,v,[3,"backButtonActive"],[4,"toolbar-title"],[4,"toolbar-actions"],[1,"container-fluid","customer-settings-menu"],[1,"row"],[1,"col-md-3"],[1,"col-md-9"],[1,"prefilling-list-settings-section"],[1,"prefilling-list-settings-title"],[1,"prefilling-list-settings-body"],[1,"col-md-12"],[1,"prefilling-list-settings-text"],[1,"prefilling-list-settings-feature-section"],[1,"row","align-items-center"],[1,"col-6","text-start"],["for","use-prefilling"],[1,"col-6","text-end"],["id","use-prefilling","name","use-prefilling",3,"ngModelChange","ngModel"],[1,"table"],["width","30%"],["width","35%"],[1,"simpled-button","primary",3,"click","disabled"],["bindLabel","description","bindValue","id",1,"simpled-select",3,"ngModelChange","clear","items","name","disabled","ngModel","selectOnTab","searchFn","placeholder"],["ng-label-tmp",""],["ng-option-tmp",""],["bindLabel","description","bindValue","id","placeholder",G,1,"simpled-select",3,"ngModelChange","clear","items","name","ngModel","selectOnTab","disabled","searchFn"],[3,"ngOptionHighlight"]];},template:function(i,s){if(i&1&&(a(0,"simpled-toolbar",9),O(1,ym,2,0,"span",10)(2,vm,4,1,"ng-container",11),r(),a(3,"div",12)(4,"div",13)(5,"div",14),M(6,"simpled-settings-menu"),r(),a(7,"div",15)(8,"div",16)(9,"h4",17),c(10,1),r(),a(11,"div",18)(12,"div",13)(13,"div",19)(14,"div",20),pe(15,2),M(16,"br")(17,"br")(18,"br")(19,"br"),ge(),r()()()(),a(20,"div",21)(21,"div",22)(22,"div",23)(23,"label",24),c(24,3),r()(),a(25,"div",25)(26,"simpled-button-checkbox",26),I(27,"async"),u("ngModelChange",function(S){return s.changeUsePrefilling(S);}),r()()()(),a(28,"form",null,0)(30,"table",27)(31,"thead")(32,"tr")(33,"th",28)(34,"span"),c(35,4),r()(),a(36,"th",29)(37,"span"),c(38,5),r()(),a(39,"th",29)(40,"span"),c(41,6),r()()()(),T(42,wm,3,0,"tbody"),I(43,"async"),r()()()()()()),i&2){let _;
1C("backButtonActive",!0),l(26),C("ngModel",L(27,3,s.isPrefillingUsed$)),l(16),E((_=L(43,5,s.prefillings$))?42:-1,_);}},dependencies:[te,ee,Pe,Q,ne,tt,ue,Oe,me,Me,st,rt,ot,ke,dn,cn,xi,W],styles:[".prefilling-list-settings-section[_ngcontent-%COMP%]{padding:16px;margin:0 0 8px;border-bottom:1px solid #e5e9f1}.prefilling-list-settings-title[_ngcontent-%COMP%]{padding:10px 15px 0;font-weight:600;font-size:18px;margin:10px 0;line-height:1.1}.prefilling-list-settings-body[_ngcontent-%COMP%]{padding:15px}.prefilling-list-settings-text[_ngcontent-%COMP%]{padding:16px 0 8px;margin-bottom:8px}.prefilling-list-settings-feature-section[_ngcontent-%COMP%]{padding:10px 13px}.prefilling-list-settings-feature-section[_ngcontent-%COMP%]   .row[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{margin:0}ng-select[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{padding-top:10px;margin:0;line-height:1em}ng-select[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:.625rem;display:block;line-height:2em}ng-select[_ngcontent-%COMP%]     .ng-option-disabled{display:none!important}ng-select.simpled-select[_ngcontent-%COMP%]{padding-bottom:0}.table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{vertical-align:middle}"],changeDetection:0});let e=t;return e;})();var Lc=(()=>{let t=class t{constructor(){this.http=m(en);}sendRequestReceipts(n){return this.http.post("/customers/:customerId/receiptsArchive",{},{params:ui(n)});}};t.ɵfac=function(i){return new(i||t)();},t.ɵprov=Ae({token:t,factory:t.ɵfac,providedIn:"root"});let e=t;return e;})();function Vm(e,t){e&1&&(a(0,"span"),c(1,9),r());}function Xm(e,t){if(e&1&&(a(0,"simpled-form-group")(1,"label"),c(2,10),r(),M(3,"ng-select",31),r()),e&2){let o=d();l(3),C("formControl",o.form.controls.expenseTypes)("items",o.expenseTypesOptions())("multiple",!0);}}function Bm(e,t){if(e&1&&M(0,"fa-icon",20),e&2){let o=d();C("icon",o.infoIcon);}}function km(e,t){if(e&1&&(a(0,"mat-radio-button",26),X(1),r()),e&2){let o=t.$implicit;C("value",o.value),l(),Fe(" ",o.name," ");}}var Fc=(()=>{let t=class t{constructor(){this.requestReceiptsService=m(Lc),this.store=m(B),this.form=new bt({expenseTypes:new Ue(null,[_e.required]),justificationStatuses:new Ue(null,[_e.required]),startDate:new Ue(null,[_e.required]),endDate:new Ue(null,[_e.required]),periodType:new Ue("APPROVAL_DATE",[_e.required])}),this.isReimbursementActive$=this.store.select(Pn(z.REIMBURSEMENT)),this.isReimbursementActive=this.store.selectSignal(Pn(z.REIMBURSEMENT)),this.periodTypeOptions=[{name:"Approval date",value:"APPROVAL_DATE"},{name:"Expense date",value:"EXPENSE_DATE"}],this.expenseTypesOptions=Dt(()=>{let n=[{name:"Card transaction",value:bn.CARD_PAYMENT}];return this.isReimbursementActive()&&n.push({name:"Reimbursement claim",value:bn.REIMBURSEMENT}),n.push({name:"Bank transfer",value:bn.BANK_ACCOUNT_PAYMENT}),n;}),this.justificationStatusOptions=[{name:"Open for review",value:hi.OPEN_FOR_REVIEW},{name:"Approved",value:hi.APPROVED},{name:"Rejected",value:hi.REJECTED}],this.maxEndDate=mi.now().minus({days:1}).endOf("day")?.toJSDate(),this.downloadIcon=Zs,this.infoIcon=ta;}get dateRangeValue(){return{startDate:this.form.controls.startDate.value,endDate:this.form.controls.endDate.value};}ngOnInit(){this.isReimbursementActive$.pipe(Z(1),$e(n=>!n)).subscribe(()=>{this.form.patchValue({expenseTypes:[bn.CARD_PAYMENT]});});}sendRequestReceipt(){let n=this.form.getRawValue(),i=hn(n.endDate),s=hn(n.startDate);if(Math.floor(i.diff(s,"days").days)>365){this.store.dispatch(new ia({message:"The date range cannot exceed 365 days"}));return;}this.requestReceiptsService.sendRequestReceipts(n).pipe(Gt(()=>{let S="The request has been sent. You'll receive an email within 1 hour, containing a link to download the requested receipts.";this.store.dispatch(new De({message:S}));})).subscribe();}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-request-receipts"]],decls:44,vars:18,consts:()=>{let n;n="For reimbursements, only receipts of approved expenses will be included.";let i;i="Select period (max. 365 days)";let s;s="Request receipts";let _;_="Status";let S;S="Date";let p;p="Request receipts";let P;P="You'll receive an email within 1 hour, containing a link to download the requested receipts. "+"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"+" Didn't receive the email? Please contact our Customer Support Team.";let v;v="How to read the receipt names?";let G;G="The receipt name contains the following information:";let J;J="expense date - card token - justification voucher id - file name index. "+"\uFFFD#41\uFFFD\uFFFD/#41\uFFFD"+" For example: 230208-507886594-50000740-1.png";let ie;ie="For reimbursements the card token is replaced with \"reimbursement\": 230208-reimbursement-50000740-1.png";let U;U="Company settings";let oe;return oe="Expense type",[s,_,S,p,P,v,G,J,ie,U,oe,[3,"backButtonActive"],[4,"toolbar-title"],[1,"container-fluid","customer-settings-menu"],[1,"row"],[1,"col-md-3"],[1,"col-md-9"],[1,"request-receipts-section"],[1,"simpled-
1h2","mb-3"],[1,"receipt-request-form",3,"ngSubmit","formGroup"],["matTooltip",n,"matTooltipPosition","right",1,"info-icon",3,"icon"],["simpledFormControl","","bindLabel","name","bindValue","value",3,"formControl","items","multiple"],[1,"date-range-group"],[1,"required-asterisk"],["placeholder",i,3,"date","dateContainer","allowOpenEndedRange","showQuickFilters","maxDate"],[1,"d-block",3,"formControl"],[3,"value"],["type","submit",1,"simpled-button","primary","mt-2",3,"disabled"],[3,"icon"],[1,"mt-3"],[1,"simpled-h3","mt-5","mb-3"],["simpledFormControl","","bindValue","value","bindLabel","name",3,"formControl","items","multiple"]];},template:function(i,s){i&1&&(a(0,"simpled-toolbar",11),O(1,Vm,2,0,"span",12),r(),a(2,"div",13)(3,"div",14)(4,"div",15),M(5,"simpled-settings-menu"),r(),a(6,"div",16)(7,"div",17)(8,"h2",18),c(9,0),r(),a(10,"form",19),u("ngSubmit",function(){return s.sendRequestReceipt();}),T(11,Xm,4,3,"simpled-form-group"),I(12,"async"),a(13,"simpled-form-group")(14,"label"),c(15,1),r(),T(16,Bm,1,1,"fa-icon",20),I(17,"async"),M(18,"ng-select",21),r(),a(19,"div",22)(20,"label",23),c(21,2),r(),a(22,"simpled-date-range-select",24),u("date",function(S){return s.form.patchValue({startDate:S.startDate,endDate:S.endDate});}),r()(),a(23,"mat-radio-group",25),se(24,km,2,2,"mat-radio-button",26,Be),r(),a(26,"button",27),M(27,"fa-icon",28),a(28,"span"),c(29,3),r()()(),a(30,"div",29)(31,"p"),pe(32,4),M(33,"br"),ge(),r()(),a(34,"div")(35,"h3",30),c(36,5),r(),a(37,"p"),c(38,6),r(),a(39,"p"),pe(40,7),M(41,"br"),ge(),r(),a(42,"p"),c(43,8),r()()()()()()),i&2&&(C("backButtonActive",!0),l(10),C("formGroup",s.form),l(),E(L(12,14,s.isReimbursementActive$)?11:-1),l(5),E(L(17,16,s.isReimbursementActive$)?16:-1),l(2),C("formControl",s.form.controls.justificationStatuses)("items",s.justificationStatusOptions)("multiple",!0),l(4),C("dateContainer",s.dateRangeValue)("allowOpenEndedRange",!1)("showQuickFilters",!1)("maxDate",s.maxEndDate),l(),C("formControl",s.form.controls.periodType),l(),ae(s.periodTypeOptions),l(2),C("disabled",s.form.invalid),l(),C("icon",s.downloadIcon));},dependencies:[te,ee,ne,ue,Oe,me,Me,Vt,Ke,Xt,ke,Gi,an,Le,Ze,Ba,fl,Nl,Q,W],styles:[".receipt-request-form[_ngcontent-%COMP%]{width:max(600px,50%);max-width:100%}.receipt-request-form[_ngcontent-%COMP%]   .info-icon[_ngcontent-%COMP%]{margin-left:4px;color:#6b8199}.receipt-request-form[_ngcontent-%COMP%]   .date-range-group[_ngcontent-%COMP%]{max-width:400px}.receipt-request-form[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{margin-bottom:16px}"],changeDetection:0});let e=t;return e;})();var Pc=(()=>{let t=class t{};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-self-approval"]],decls:5,vars:0,consts:()=>{let n;n="Prevent approval of own expenses by Accountant";let i;return i="An Accountant can't approve his own expenses. This doesn't apply to a Master Accountant, who is able to approve his own expenses.",[n,i,[1,"primary","settings-subtitle"]];},template:function(i,s){i&1&&(At(0,"div")(1,"h4",2),c(2,0),Mt(),At(3,"div"),c(4,1),Mt()());},encapsulation:2});let e=t;return e;})();function zm(e,t){e&1&&(a(0,"span"),c(1,4),r());}function jm(e,t){if(e&1){let o=h();a(0,"div")(1,"div",26)(2,"div"),X(3),r(),a(4,"div"),M(5,"fa-icon",27),a(6,"span"),c(7,6),r()()(),a(8,"div",28)(9,"button",29),u("click",function(){N(o);let i=d(2);return A(i.twinfieldCancelConnect());}),c(10,7),r()()();}if(e&2){let o=d(),n=d();l(3),ce(o.externalUserName),l(2),C("icon",n.faCheck);}}function qm(e,t){if(e&1){let o=h();a(0,"div")(1,"div",30),c(2,8),r(),a(3,"div",28)(4,"button",29),u("click",function(){N(o);let i=d(2);return A(i.twinfieldCancelConnect());}),c(5,9),r()()();}}function Ym(e,t){if(e&1){let o=h();a(0,"div")(1,"div",31),c(2,10),r(),a(3,"div",32)(4,"button",29),u("click",function(){N(o);let i=d(2);return A(i.twinfieldTryAgain());}),c(5,11),r()()();}}function Jm(e,t){if(e&1&&(a(0,"p"),c(1,5),r(),T(2,jm,11,2,"div"),T(3,qm,6,0,"div"),T(4,Ym,6,0,"div")),e&2){let o=t;l(2),E(o.status==="CONNECTED"?2:-1),l(),E(o.status==="PENDING"?3:-1),l(),E(o.status==="FAILED"?4:-1);}}function Hm(e,t){if(e&1){let o=h();a(0,"div",33)(1,"button",34),u("click",function(){N(o);let i=d(2);return A(i.twinfieldConnect());}),c(2,12),r()();}}function Km(e,t){if(e&1&&(T(0,Hm,3,0,"div",33),I(1,"async")),e&2){let o=d();E(L(1,1,o.isLoaded$)?0:-1);}}var hc=(()=>{let t=class t{constructor(){this.confirmationDialog=m(We),this.integrationService=m(pt),this.faCheck=Lt,this.twinfieldRequest$=new lt(null),this.isLoaded$=new lt(!1);}
1ngOnInit(){this.integrationService.getIntegrationData("twinfield").subscribe(n=>{this.twinfieldRequest$.next(n),this.isLoaded$.next(!0);},n=>this.isLoaded$.next(!0));}twinfieldConnect(){let n=window.location.href;this.integrationService.startIntegration("twinfield",n).subscribe(i=>{i.externalAuthorizationUrl&&(window.location.href=i.externalAuthorizationUrl);});}twinfieldCancelConnect(){this.confirmationDialog.openConfirmationDialog({title:"Disconnect Twinfield",message:"Are you sure you want to disconnect SimpledCard and Twinfield?",confirmLabel:"Confirm",cancelLabel:"Cancel"},"760px").subscribe(n=>{n&&this.integrationService.deleteIntegrationData("twinfield").subscribe(()=>{this.twinfieldRequest$.next(null);});});}twinfieldTryAgain(){this.integrationService.deleteIntegrationData("twinfield").subscribe(()=>this.twinfieldConnect());}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-twinfield-connect"]],decls:24,vars:4,consts:()=>{let n;n="Twinfield";let i;i="Here you can link your SimpledCard account with your Twinfield account. Please click 'Connect' and follow the steps. You will be redirected to the verification-page of Twinfield. Use your Twinfield credentials to log in and establish the connection.";let s;s="Exporting the transactions";let _;_="When the connection is established, you can export your transaction details to Twinfield through the 'Reports' tab. Select 'Twinfield Integration' in the drop-down, select a date range and press 'Download CSV'. SimpledCard will send the transaction details to Twinfield.";let S;S="Company settings";let p;p="Account details:";let P;P="Connected";let v;v="Disconnect";let G;G="In progress...";let J;J="Cancel";let ie;ie="Connection failed";let U;U="Try again";let oe;return oe="Connect",[n,i,s,_,S,p,P,v,G,J,ie,U,oe,[3,"backButtonActive"],[4,"toolbar-title"],[1,"container-fluid","customer-settings-menu"],[1,"row"],[1,"col-md-3"],[1,"col-md-9"],[1,"twinfield-settings-section"],[1,"twinfield-settings-title-section"],["src","./assets/images/twinfield-logo.png","width","42px"],[1,"twinfield-settings-title"],[1,"twinfield-settings-section-body"],[1,"twinfield-settings-instruction-section"],[1,"twinfield-settings-account-section"],[1,"alert","alert-success"],[3,"icon"],[1,"twinfield-settings-cancel-button-section"],[1,"simpled-button","danger",3,"click"],[1,"alert","alert-warning"],[1,"alert","alert-danger"],[1,"twinfield-settings-again-button-section"],[1,"twinfield-settings-button-section"],[1,"simpled-button","primary",3,"click"]];},template:function(i,s){if(i&1&&(a(0,"simpled-toolbar",13),O(1,zm,2,0,"span",14),r(),a(2,"div",15)(3,"div",16)(4,"div",17),M(5,"simpled-settings-menu"),r(),a(6,"div",18)(7,"div",19)(8,"div",20),M(9,"img",21),a(10,"h4",22),c(11,0),r()(),a(12,"div",23)(13,"p"),c(14,1),r(),a(15,"div",24)(16,"h4"),c(17,2),r(),a(18,"p"),c(19,3),r()()(),a(20,"div",25),T(21,Jm,5,3),I(22,"async"),nt(23,Km,2,3),r()()()()()),i&2){let _;C("backButtonActive",!0),l(21),E((_=L(22,2,s.twinfieldRequest$))?21:23,_);}},dependencies:[te,ee,ne,Le,Q,W],styles:[".twinfield-settings-section[_ngcontent-%COMP%], .twinfield-settings-section-body[_ngcontent-%COMP%], .twinfield-settings-account-section[_ngcontent-%COMP%]{padding:16px}.twinfield-settings-section[_ngcontent-%COMP%]   .twinfield-settings-title-section[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:25px;padding:10px 15px 0}.twinfield-settings-section[_ngcontent-%COMP%]   .twinfield-settings-title-section[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{margin-bottom:0;margin-left:10px}.twinfield-settings-section[_ngcontent-%COMP%]   .twinfield-settings-instruction-section[_ngcontent-%COMP%]{margin:40px 0 15px}.twinfield-settings-section[_ngcontent-%COMP%]   .twinfield-settings-button-section[_ngcontent-%COMP%]{display:flex;justify-content:center}.twinfield-settings-account-section[_ngcontent-%COMP%]   .alert[_ngcontent-%COMP%]{display:flex;font-weight:600}.twinfield-settings-account-section[_ngcontent-%COMP%]   .alert[_ngcontent-%COMP%]   fa-icon[_ngcontent-%COMP%]{margin-right:5px}.twinfield-settings-account-section[_ngcontent-%COMP%]   .twinfield-settings-cancel-button-section[_ngcontent-%COMP%], .twinfield-settings-account-section[_ngcontent-%COMP%]   .twinfield-settings-again-button-section[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}"],changeDetection:0});let e=t;return e;})();var bc=()=>{let e=m(di);return m(er).getFirstAllowedRoute().pipe(F(o=>e.parseUrl(o)));};var yc=()=>{let e=m(B);m(va).getAccounts({types:[Ei.LEVEL1]}).subscribe(o=>{e.dispatch(_a({accounts:o}));});};var vc=(e,t)=>{let o=m(B);return o.dispatch(zt()),o.pipe(re(R_),$e(n=>n),Z(1));};var xc=(e,t)=>{let o=m(B),n={showHidden:!0,sortBy:"ID",sortOrder:"ASC"};return o.dispatch(Ja({listCustomerClientsParameters:n})),!0;};var $c=(e,t)=>{let o=m(B),n={showHidden:!0,sortBy:"ID",sortOrder:"ASC"};return o.dispatch(zi({listCustomerCostCentersParameters:n})),!0;};var qr=(e,t)=>{let o=m(B),n={showHidden:!0,sortBy:"ID",sortOrder:"ASC"};return o.dispatch(Qa({listCustomerCostTypesParameters:n})),!0;};var Gc=(e,t)=>{let o=m(B),n={showHidden:!0,sortBy:"ID",sortOrder:"ASC"};return o.dispatch(tl({listCustomerCostUnitsParameters:n})),!0;};var Dc=(e,t)=>{let o=m(B);return o.dispatch(Jt()),o.pipe(re(sc),$e(n=>n),Z(1));};var Uc=(e,t)=>{let o=m(B),n={sortBy:"SIMPLED_COST_TYPE_DESCRIPTION",sortOrder:"ASC"};return o.dispatch(ol({listJustificationPrefillingsParameters:n})),!0;};var wc=(e,t)=>{let o=m(B),n={showHidden:!0,sortBy:"ID",sortOrder:"ASC"};return o.dispatch(ll({listCustomerProjectsParameters:n})),!0;};var Yr=(e,t)=>{let o=m(B),n={sortBy:"ID",sortOrder:"ASC",showHidden:!0};return o.dispatch(dl({listCustomerVatsParameters:n})),!0;};var Vc=(e,t)=>{let o=m(B),n={showHidden:!0,sortBy:"ID",sortOrder:"ASC"};return o.dispatch(zi({listCustomerCostCentersParameters:n})),o.pipe(re(ml),$e(i=>!!i),Z(1));};var Wm=y(ma,e=>e.defaultJustificationReviewSettings),kt=y(Wm,e=>e.defaultJustificationReviewSettings);var Xc=y(kt,Dl,Pi,ca,(e,t,o,n)=>e.map(i=>{let s=i.accountIds.map(p=>n[p]),_=o.map(p=>i.assignments.find(P=>P.reviewStageId===p.id)??{reviewStageId:p.id,userId:null}).map(p=>{let P=t.find(v=>v.user.id===p.userId)?.user.name;return{reviewStageId:p.reviewStageId,user:{id:p.userId,name:P}};});return f(g({},i),{accounts:s,assignments:_});})),Bc=e=>y(kt,da(Ei.LEVEL1),(t,o)=>{let n=nn(t.filter((i,s)=>s!==e).map(i=>i.accountIds));return o.filter(i=>!n.includes(i.id));}),kc=e=>y(kt,t=>e===void 0?{name:"",accountIds:[],scope:_n.ACCOUNT,assignments:[]}:t[e]);function zc(){return e=>{let t=e.value;return!(Array.isArray(t)&&t.some(n=>n.userId))?{atLeastOneAssignedUser:!0}:null;};}function Jr(){return e=>{let o=e.value.filter(s=>s.userId).map(s=>s.userId),n=new Set(o);return o.length!==n.size&&o.length>0?{userOnlyInOneStage:!0}:null;};}function Qm(e,t){e&1&&(a(0,"simpled-error"),c(1,6),r());}function Zm(e,t){e&1&&(a(0,"simpled-error"),c(1,7),r());}function eu(e,t){if(e&1&&X(0),e&2){let o=t.item;Fe(" ",o.name," ");}}function tu(e,t){if(e&1&&X(0),e&2){let o=t.item;Fe(" ",o.name," ");}}function nu(e,t){e&1&&(a(0,"simpled-error"),c(1,9),r());}function iu(e,t){e&1&&(a(0,"simpled-error"),c(1,10),r());}function ou(e,t){if(e&1&&(a(0,"simpled-form-group",22)(1,"label"),w(2),c(3,8),V(),X(4),r(),a(5,"ng-select",23),I(6,"async"),O(7,eu,1,1,"ng-template",24)(8,tu,1,1,"ng-template",25),r(),T(9,nu,2,0,"simpled-error"),T(10,iu,2,0,"simpled-error"),r()),e&2){let o=t.$implicit,n=t.$index,i=d(2);C("formGroupName",n),l(4),Fe(": ",o.name),l(),C("appendTo",".cdk-overlay-container")("items",L(6,6,i.userList$)),l(4),E(i.form.get("assignments").hasError("atLeastOneAssignedUser")?9:-1),l(),E(i.form.get("assignments").hasError("userOnlyInOneStage")?10:-1);}}function ru(e,t){e&1&&(w(0,18),se(1,ou,11,8,"simpled-form-group",22,Be),V()),e&2&&(l(),ae(t));}var jc=(()=>{let t=class t{constructor(){this.store=m(B),this.advancedApprovalService=m($i),this.dialogRef=m(fi),this.data=m(Ni),this.reviewStages$=this.store.select(Pi),this.defaultApprovalSettings$=this.store.select(kt);}ngOnInit(){this.approvalSettings$=this.store.select(kc(this.data.approvalSettingIndex)),this.accounts$=this.store.select(Bc(this.data.approvalSettingIndex)),this.approvalSettings$.pipe(Z(1),ai(this.reviewStages$)).subscribe(([n,i])=>{this.isFallbackScope=n.scope===_n.FALLBACK,this.updateUserList(n.accountIds,this.isFallbackScope);let s=this.isFallbackScope?[Jr()]:[zc(),Jr()],_=this.isFallbackScope?"Fallback":n.name;this.form=new bt({name:new Ue({value:_,disabled:this.isFallbackScope},[_e.required]),accountIds:new Ue({value:n.accountIds,disabled:this.isFallbackScope},[_e.required]),scope:new Ue(n.scope,[_e.required]),assignments:new Ys(i.map(S=>{let p=n.assignments.find(P=>P.reviewStageId===S.id);return new bt({reviewStageId:new Ue(S.id,[_e.required]),userId:new Ue(p?p.userId:null)});}),s)});});}accountsChanged(n){this.form.controls.assignments.controls.forEac
1h(i=>{i.controls.userId.setValue(null);}),this.updateUserList(n,this.isFallbackScope);}updateUserList(n,i){if(n.length===0&&!i)this.userList$=Se([]);else{let s=i?{roles:[de.MASTER_ACCOUNTANT,de.MASTER_CASHMANAGER_ACCOUNTANT,de.MASTER_ADMINISTRATOR_ACCOUNTANT,de.MASTER_ADMINISTRATOR_CASHMANAGER_ACCOUNTANT]}:{accountIds:n};this.userList$=this.advancedApprovalService.getReviewStagePermissions(s).pipe(F(_=>vs(_.map(p=>p.user),p=>p.id)));}}onSubmit(){if(this.form.invalid){this.form.markAllAsTouched();return;}this.defaultApprovalSettings$.pipe(Z(1)).subscribe(n=>{let i=f(g({},this.form.getRawValue()),{assignments:this.form.getRawValue().assignments.filter(_=>_.userId!==null)}),s=this.getUpdatedSettings(n,i);this.store.dispatch(Zi({defaultJustificationReviewSettings:s,dialogId:this.dialogRef.id}));});}getUpdatedSettings(n,i){return this.data.approvalSettingIndex!==void 0?n.map((s,_)=>_===this.data.approvalSettingIndex?i:s):[...n,i];}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-approval-settings-modal"]],decls:28,vars:14,consts:()=>{let n;n="Enter a name for the setting";let i;i="Type to search or choose accounts from dropdown";let s;s="Add new default assignees setting";let _;_="Set default assignees for the selected account. At the start of an approval stage, the assigned user will be pre-selected, but you can change it before final approval.";let S;S="Name";let p;p="Account";let P;P="Cancel";let v;v="Save";let G;G="Please provide a name for the setting.";let J;J="Please select at least one account.";let ie;ie="Type to search or choose user from dropdown";let U;U="Approval stage";let oe;oe="You must select a user for at least one stage.";let k;return k="A user can only be assigned to one stage.",[s,_,S,p,P,v,G,J,U,oe,k,[3,"ngSubmit","formGroup"],[1,"simpled-modal-heading"],[1,"simpled-modal-title"],[1,"simpled-modal-content"],["simpledFormControl","","formControlName","name","placeholder",n],["bindLabel","label","dropdownPosition","bottom","bindValue","id","placeholder",i,"formControlName","accountIds","simpledFormControl","",1,"simpled-select",3,"ngModelChange","items","appendTo","multiple","closeOnSelect"],[1,"form-group"],["formArrayName","assignments"],[1,"simpled-modal-footer","simpled-modal-actions"],["type","button","mat-dialog-close","",1,"simpled-button","secondary"],["type","submit",1,"simpled-button","primary"],[1,"form-group","has-validation",3,"formGroupName"],["simpledFormControl","","bindLabel","name","bindValue","id","formControlName","userId","placeholder",ie,1,"simpled-select",3,"appendTo","items"],["ng-label-tmp",""],["ng-option-tmp",""]];},template:function(i,s){if(i&1&&(a(0,"form",11),u("ngSubmit",function(){return s.onSubmit();}),a(1,"section",12)(2,"h2",13),c(3,0),r()(),a(4,"section",14)(5,"p"),c(6,1),r(),a(7,"simpled-form-group")(8,"label"),c(9,2),r(),M(10,"input",15),T(11,Qm,2,0,"simpled-error"),r(),a(12,"simpled-form-group")(13,"label"),c(14,3),r(),a(15,"ng-select",16),I(16,"async"),u("ngModelChange",function(S){return s.accountsChanged(S);}),r(),T(17,Zm,2,0,"simpled-error"),r(),a(18,"div",17),T(19,ru,3,0,"ng-container",18),I(20,"async"),r()(),a(21,"section",19)(22,"button",20),w(23),c(24,4),V(),r(),a(25,"button",21),w(26),c(27,5),V(),r()()()),i&2){let _,S,p,P;C("formGroup",s.form),l(11),E((_=s.form.get("name"))!=null&&_.invalid&&(_=s.form.get("name"))!=null&&_.hasError("required")?11:-1),l(4),C("items",L(16,10,s.accounts$))("appendTo",".cdk-overlay-container")("multiple",!0)("closeOnSelect",!1),l(2),E((S=s.form.get("accountIds"))!=null&&S.invalid&&(S=s.form.get("accountIds"))!=null&&S.hasError("required")?17:-1),l(),H("form-group-invalid",((p=s.form.get("assignments"))==null?null:p.invalid)&&(((p=s.form.get("assignments"))==null?null:p.touched)||((p=s.form.get("assignments"))==null?null:p.dirty))),l(),E((P=L(20,12,s.reviewStages$))?19:-1,P);}},dependencies:[ue,Oe,Ie,me,Me,Ke,St,Js,Hs,Xt,ln,an,Li,ke,Gi,dn,cn,Q,rn,W],encapsulation:2});let e=t;return e;})();function su(e,t){e&1&&(a(0,"span"),c(1,6),r());}function au(e,t){if(e&1){let o=h();w(0),a(1,"button",23),u("click",function(){N(o);let i=d();return A(i.addSetting());}),w(2),c(3,7),V(),r(),V();}}function lu(e,t){if(e&1&&X(0),e&2){let o=d().$implicit;Fe(" ",o.name," ");}}function _u(e,t){e&1&&(w(0),c(1,8),V());}
1function cu(e,t){if(e&1&&(a(0,"span"),X(1),r()),e&2){let o=d().$implicit;l(),ce(o.label);}}function du(e,t){if(e&1&&T(0,cu,2,1,"span"),e&2){let o=t.$implicit;E(o!=null&&o.label?0:-1);}}function Cu(e,t){e&1&&X(0),e&2&&Fe(" ",t," ");}function Su(e,t){e&1&&(w(0),c(1,9),V());}function Tu(e,t){if(e&1&&(a(0,"div"),X(1),T(2,Cu,1,1)(3,Su,2,0,"ng-container"),r()),e&2){let o,n=t.$implicit,i=t.$index;l(),Fe(" ",i+1,". "),l(),E((o=n.user.name)?2:3,o);}}function Eu(e,t){if(e&1){let o=h();a(0,"div",31),u("cdkMenuItemTriggered",function(){N(o);let i=d(2).$index,s=d();return A(s.deleteSetting(i));}),M(1,"fa-icon",29),w(2)(3),c(4,11),V()(),r();}if(e&2){let o=d(3);l(),C("icon",o.deleteIcon);}}function mu(e,t){if(e&1){let o=h();a(0,"div",27)(1,"div",28),u("click",function(){N(o);let i=d().$index,s=d();return A(s.editSetting(i));}),M(2,"fa-icon",29),w(3),c(4,10),V(),r(),T(5,Eu,5,1,"div",30),r();}if(e&2){let o=d().$implicit,n=d();l(2),C("icon",n.editIcon),l(3),E(o.scope===n.JustificationReviewScope.ACCOUNT?5:-1);}}function uu(e,t){if(e&1&&(a(0,"tr",22)(1,"td"),T(2,lu,1,1)(3,_u,2,0,"ng-container"),r(),a(4,"td",24),se(5,du,1,1,null,null,Be),r(),a(7,"td"),se(8,Tu,4,2,"div",null,Be),r(),a(10,"td",25),M(11,"simpled-display-icon",26),O(12,mu,6,2,"ng-template",null,0,fe),r()()),e&2){let o=t.$implicit,n=b(13),i=d();l(2),E(o.scope===i.JustificationReviewScope.ACCOUNT?2:3),l(3),ae(o.accounts),l(3),ae(o.assignments),l(3),C("icon",i.menuIcon)("animateHover",!0)("cdkMenuTriggerFor",n);}}var qc=(()=>{let t=class t{constructor(){this.matDialog=m(wt),this.menuIcon=Oi,this.editIcon=Ri,this.deleteIcon=Ii,this.JustificationReviewScope=_n,this.store=m(B),this.confirmationDialogService=m(We),this.approvalSettings$=this.store.select(Xc);}deleteSetting(n){this.confirmationDialogService.openConfirmationDialog({title:"Delete approval setting",message:"Are you sure you want to delete this approval setting?"}).pipe(Z(1),$e(i=>!!i),ht(()=>this.store.select(kt).pipe(Z(1)))).subscribe(i=>{let s=i.filter((_,S)=>S!==n);this.store.dispatch(Ta({defaultJustificationReviewSettings:s}));});}addSetting(){this.openApprovalSettingsModal();}editSetting(n){this.openApprovalSettingsModal(n);}openApprovalSettingsModal(n){this.matDialog.open(jc,{width:"700px",autoFocus:!1,restoreFocus:!1,data:{approvalSettingIndex:n}});}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-approval-settings"]],decls:28,vars:3,consts:()=>{let n;n="Default assignees";let i;i="Select the default assignees per stage for accounts.";let s;s="Name";let _;_="Accounts";let S;S="Default assignees";let p;p="Company settings";let P;P="Add new";let v;v="Fallback";let G;G="Unassigned";let J;J="Edit";let ie;return ie="Delete",[["menu",""],n,i,s,_,S,p,P,v,G,J,ie,[3,"backButtonActive"],[4,"toolbar-title"],[4,"toolbar-actions"],[1,"container-fluid","customer-settings-menu"],[1,"row"],[1,"col-md-3"],[1,"col-md-9"],[1,"simpled-h3","mb-3"],[1,"mb-5"],[1,"table","approval-settings-grid"],[1,"approval-settings-grid-row"],[1,"simpled-button","primary","toolbar-button",3,"click"],[1,"approval-settings-accounts-col"],["width","25%",1,"grid-actions-col","text-end"],["size","md",1,"d-inline-flex",3,"icon","animateHover","cdkMenuTriggerFor"],["cdkMenu",""],["cdkMenuItem","",3,"click"],[3,"icon"],["cdkMenuItem","",1,"sc-menu-item-danger"],["cdkMenuItem","",1,"sc-menu-item-danger",3,"cdkMenuItemTriggered"]];},template:function(i,s){i&1&&(a(0,"simpled-toolbar",12),O(1,su,2,0,"span",13)(2,au,4,0,"ng-container",14),r(),a(3,"div",15)(4,"div",16)(5,"div",17),M(6,"simpled-settings-menu"),r(),a(7,"div",18)(8,"div")(9,"h2",19),c(10,1),r()(),a(11,"section",20)(12,"p"),c(13,2),r()(),a(14,"table",21)(15,"thead")(16,"tr")(17,"th"),c(18,3),r(),a(19,"th"),c(20,4),r(),a(21,"th"),c(22,5),r(),M(23,"th"),r()(),a(24,"tbody"),se(25,uu,14,4,"tr",22,Be),I(27,"async"),r()()()()()),i&2&&(C("backButtonActive",!0),l(25),ae(L(27,1,s.approvalSettings$)));},dependencies:[te,ee,Pe,Q,ne,bi,Di,wi,Ui,Le,W],styles:['.approval-settings-grid[_ngcontent-%COMP%]{width:100%;max-width:100%}
1.approval-settings-grid[_ngcontent-%COMP%]   .approval-settings-grid-row[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{vertical-align:middle}.approval-settings-grid[_ngcontent-%COMP%]   .approval-settings-accounts-col[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:after{content:", "}.approval-settings-grid[_ngcontent-%COMP%]   .approval-settings-accounts-col[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:last-child:after{content:""}']});let e=t;return e;})();function pu(e,t){if(e&1&&(a(0,"div")(1,"span",13),X(2),r(),a(3,"span",14),X(4,"Approval:"),r(),a(5,"span"),X(6),r()()),e&2){let o=t.$implicit,n=t.$index;l(2),Fe("",n+1,". "),l(4),ce(o.name);}}function gu(e,t){if(e&1&&(a(0,"div",5)(1,"div",6)(2,"h4",7),w(3),c(4,0),V(),r()(),a(5,"div",8),se(6,pu,7,2,"div",null,Be),r(),a(8,"div",9)(9,"span"),c(10,1),r(),a(11,"span"),X(12),r()(),a(13,"div",10)(14,"p"),c(15,2),r(),a(16,"p")(17,"span",11),c(18,3),r(),a(19,"a",12),c(20,4),r()()()()),e&2){let o=t;l(6),ae(o.justificationReviewStages),l(6),Fe(" ",o.justificationReviewStages.length," ");}}var Yc=(()=>{let t=class t{constructor(){this.store=m(B),this.justificationReviewSettings$=this.store.select(ua);}ngOnInit(){}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-advanced-approval"]],decls:2,vars:3,consts:()=>{let n;n="Approval stages";let i;i="Number of required approvals for a justification:";let s;s="All justifications need to be reviewed by different Accountants";let _;_="Ensure that all Accounts have the required number of Accountant users linked";let S;return S="Accounts",[n,i,s,_,S,[1,"advanced-approval-setings-stages-container"],[1,"advanced-approval-setings-subtitle-container"],[1,"primary","settings-subtitle"],[1,"advanced-approval-setings-stages-box"],[1,"advanced-approval-setings-stages-header"],[1,"advanced-approval-setings-stages-footer"],[1,"advanced-approval-setings-stages-footer-instruction"],["routerLink","/accounts",1,"link-underline-blue"],[1,"advanced-approval-setings-stages-index"],[1,"advanced-approval-setings-stages-text"]];},template:function(i,s){if(i&1&&(T(0,gu,21,1,"div",5),I(1,"async")),i&2){let _;E((_=L(1,1,s.justificationReviewSettings$))?0:-1,_);}},dependencies:[Q,tn,W],styles:[".advanced-approval-setings-stages-container[_ngcontent-%COMP%]{margin-bottom:25px}.advanced-approval-setings-stages-container[_ngcontent-%COMP%]   .advanced-approval-setings-stages-header[_ngcontent-%COMP%]{margin-bottom:25px;font-weight:600}.advanced-approval-setings-stages-container[_ngcontent-%COMP%]   .advanced-approval-setings-subtitle-container[_ngcontent-%COMP%]{margin-bottom:25px}.advanced-approval-setings-stages-container[_ngcontent-%COMP%]   .advanced-approval-setings-stages-box[_ngcontent-%COMP%]{margin-bottom:30px;padding-left:15px;font-size:16px}.advanced-approval-setings-stages-container[_ngcontent-%COMP%]   .advanced-approval-setings-stages-box[_ngcontent-%COMP%]   .advanced-approval-setings-stages-index[_ngcontent-%COMP%], .advanced-approval-setings-stages-container[_ngcontent-%COMP%]   .advanced-approval-setings-stages-box[_ngcontent-%COMP%]   .advanced-approval-setings-stages-text[_ngcontent-%COMP%]{font-weight:600;color:#2b5167}.advanced-approval-setings-stages-container[_ngcontent-%COMP%]   .advanced-approval-setings-stages-box[_ngcontent-%COMP%]   .advanced-approval-setings-stages-text[_ngcontent-%COMP%]{padding-right:20px}.advanced-approval-setings-stages-container[_ngcontent-%COMP%]   .advanced-approval-setings-stages-footer[_ngcontent-%COMP%]{color:#80858d}.advanced-approval-setings-stages-container[_ngcontent-%COMP%]   .advanced-approval-setings-stages-footer[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin-bottom:0}.advanced-approval-setings-stages-container[_ngcontent-%COMP%]   .advanced-approval-setings-stages-footer[_ngcontent-%COMP%]   .advanced-approval-setings-stages-footer-instruction[_ngcontent-%COMP%]{margin-right:5px}.advanced-approval-settings-actions[_ngcontent-%COMP%]{display:flex;margin:1.5rem 0;justify-content:center}"],changeDetection:0});let e=t;return e;})();function fu(e,t){e&1&&(a(0,"span"),c(1,0),r());}var Jc=(()=>{let t=class t{};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-advanced-approval-router"]],decls:8,vars:1,consts:()=>{let n;return n="Company settings",[n,[3,"backButtonActive"],[4,"toolbar-title"],[1,"container-fluid","customer-settings-menu"],[1,"row"],[1,"col-md-3"],[1,"col-md-9"]];},template:function(i,s){i&1&&(a(0,"simpled-toolbar",1),O(1,fu,2,0,"span",2),r(),a(2,"div",3)(3,"div",4)(4,"div",5),M(5,"simpled-settings-menu"),r(),a(6,"div",6),M(7,"router-outlet"),r()()()),i&2&&C("backButtonActive",!0);},dependencies:[te,ee,ne,Is],encapsulation:2,changeDetection:0});let e=t;return e;})();function Nu(e,t){e&1&&(w(0),c(1,2),V());}function Au(e,t){e&1&&(w(0),c(1,3),V());}function Mu(e,t){e&1&&(a(0,"button",8),c(1,4),r());}function Ou(e,t){e&1&&(a(0,"button",9),c(1,5),r());}var Hc=(()=>{let t=class t{constructor(){this.store=m(B),this.matDialog=m(wt);}ngOnInit(){this.forceApprovalEnabled$=this.store.pipe(re(pa));}toggleMultipleEye(){this.forceApprovalEnabled$.pipe(Z(1),F(n=>!n),Ne(n=>n?this.showDisableConfirmationDialog():this.showEnableConfirmationDialog())).subscribe(n=>this.store.dispatch(n));}showDisableConfirmationDialog(){return this.matDialog.open(Cc,{width:"700px",autoF
1ocus:!1,restoreFocus:!1}).afterClosed().pipe(Z(1),$e(n=>!!n),F(()=>sr({enabled:!0})));}showEnableConfirmationDialog(){return this.matDialog.open(dc,{width:"700px",autoFocus:!1,restoreFocus:!1}).afterClosed().pipe(Z(1),$e(n=>!!n),F(()=>sr({enabled:!1})));}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-approval-multiple-eyes"]],decls:15,vars:6,consts:()=>{let n;n="Multiple-eyes principle";let i;i="Each justification must be approved by more than one, different Accountant users (multiple-eyes principle)";let s;s="Disabled";let _;_="Enabled";let S;S="Enable";let p;return p="Disable",[n,i,s,_,S,p,[1,"primary","settings-subtitle"],[1,"advanced-approval-settings-actions",3,"click"],[1,"simpled-button","primary","btn-lg","advanced-approval-settings-button"],[1,"simpled-button","danger","btn-lg","advanced-approval-settings-button"]];},template:function(i,s){i&1&&(a(0,"div")(1,"h4",6),w(2),c(3,0),V(),r(),w(4),c(5,1),V(),X(6,":\xA0 "),a(7,"b"),T(8,Nu,2,0,"ng-container"),I(9,"async"),nt(10,Au,2,0,"ng-container"),r(),a(11,"div",7),u("click",function(){return s.toggleMultipleEye();}),T(12,Mu,2,0,"button",8),I(13,"async"),nt(14,Ou,2,0,"button",9),r()()),i&2&&(l(8),E(L(9,2,s.forceApprovalEnabled$)===!0?8:10),l(4),E(L(13,4,s.forceApprovalEnabled$)===!0?12:14));},dependencies:[Q,W],styles:[".advanced-approval-setings-stages-container[_ngcontent-%COMP%]{margin-bottom:25px}.advanced-approval-setings-stages-container[_ngcontent-%COMP%]   .advanced-approval-setings-stages-header[_ngcontent-%COMP%]{margin-bottom:25px;font-weight:600}.advanced-approval-setings-stages-container[_ngcontent-%COMP%]   .advanced-approval-setings-subtitle-container[_ngcontent-%COMP%]{margin-bottom:25px}.advanced-approval-setings-stages-container[_ngcontent-%COMP%]   .advanced-approval-setings-stages-box[_ngcontent-%COMP%]{margin-bottom:30px;padding-left:15px;font-size:16px}.advanced-approval-setings-stages-container[_ngcontent-%COMP%]   .advanced-approval-setings-stages-box[_ngcontent-%COMP%]   .advanced-approval-setings-stages-index[_ngcontent-%COMP%], .advanced-approval-setings-stages-container[_ngcontent-%COMP%]   .advanced-approval-setings-stages-box[_ngcontent-%COMP%]   .advanced-approval-setings-stages-text[_ngcontent-%COMP%]{font-weight:600;color:#2b5167}.advanced-approval-setings-stages-container[_ngcontent-%COMP%]   .advanced-approval-setings-stages-box[_ngcontent-%COMP%]   .advanced-approval-setings-stages-text[_ngcontent-%COMP%]{padding-right:20px}.advanced-approval-setings-stages-container[_ngcontent-%COMP%]   .advanced-approval-setings-stages-footer[_ngcontent-%COMP%]{color:#80858d}.advanced-approval-setings-stages-container[_ngcontent-%COMP%]   .advanced-approval-setings-stages-footer[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin-bottom:0}.advanced-approval-setings-stages-container[_ngcontent-%COMP%]   .advanced-approval-setings-stages-footer[_ngcontent-%COMP%]   .advanced-approval-setings-stages-footer-instruction[_ngcontent-%COMP%]{margin-right:5px}.advanced-approval-settings-actions[_ngcontent-%COMP%]{display:flex;margin:1.5rem 0;justify-content:center}"]});let e=t;return e;})();function Ru(e,t){e&1&&(a(0,"span"),c(1,2),r());}function Iu(e,t){if(e&1){let o=h();w(0),a(1,"button",18),I(2,"isFeatureActive"),u("click",function(){N(o);let i=d();return A(i.onOrderNewCards());}),w(3),c(4,3),V(),r(),V();}if(e&2){let o=d();l(),C("disabled",L(2,1,o.Features.INTERNAL_CARD_BLOCK));}}function Lu(e,t){if(e&1&&(a(0,"div",15)(1,"h3"),c(2,4),r(),M(3,"simpled-card-statistics-table",17),I(4,"async"),I(5,"async"),r()),e&2){let o=d();l(3),C("cardStatistics",L(4,2,o.cardStatisticsGeneralPurposePaynovate$))("issuerName",L(5,4,o.paynovateName$));}}var Kc=(()=>{let t=class t{constructor(){this.store=m(B),this.cardStatisticsCorporateAdyen$=this.store.select(qi(on.CORPORATE,yt.ADYEN)),this.cardStatisticsCorporatePaynovate$=this.store.select(qi(on.CORPORATE,yt.PAYNOVATE)),this.cardStatisticsGeneralPurposePaynovate$=this.store.select(qi(on.GENERAL_PURPOSE,yt.PAYNOVATE)),this.virtualCardStatisticsCorporateAdyen$=this.store.select(hl(on.CORPORATE,yt.ADYEN)),this.adyenName$=this.store.select(rr(yt.ADYEN)),this.paynovateName$=this.store.select(rr(yt.PAYNOVATE)),this.UsageCategory=on,this.IssuersId=yt,this.Features=z;}onOrderNewCards(){this.store.dispatch(new ks({path:["/cards/order"]}));}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-card-overview"]],decls:24,vars:19,consts:()=>{let n;n="SimpledCard payment cards";let i;i="Business payment and expense module";let s;s="Company settings";let _;_="Order new cards";let S;return S="Client funds management module",[n,i,s,_,S,[3,"backButtonActive"],[4,"toolbar-title"],[4,"toolbar-actions"],[1,"container-fluid","customer-settings-menu"],[1,"row"],[1,"col-md-3"],[1,"col-md-9"],[1,"container-fluid"],[1,"primary","settings-title"],[1,"row","cards-stat-row"],[1,"col-md-6"],[1,"mb-5","d-block",3,"cardStatistics","virtualCardStatistics","issuerName"],[1,"mb-5","d-block",3,"cardStatistics","issuerName"],[1,"simpled-button","primary","toolbar-button",3,"click","disabled"]];},template:function(i,s){i&1&&(a(0,"simpled-toolbar",5),O(1,Ru,2,0,"span",6)(2,Iu,5,3,"ng-container",7),r(),a(3,"div",8)(4,"div",9)(5,"div",10),M(6,"simpled-settings-menu"),r(),a(7,"div",11)(8,"div",12)(9,"h2",13),c(10,0),r(),a(11,"div",14)(12,"div",15)(13,"h3"),c(14,1),r(),M(15,"simpled-card-statistics-table",16),I(16,"async"),I(17,"async"),I(18,"async"),M(19,"simpled-card-statistics-table",17),I(20,"async"),I(21,"async"),r(),T(22,Lu,6,6,"div",15),I(23,"isFeatureActive"),r()()()()()),i&2&&(C("backButtonActive",!0),l(15),C("cardStatistics",L(16,7,s.cardStatisticsCorporateAdyen$))("virtualCardStatistics",L(17,9,s.virtualCardStatisticsCorporateAdyen$))("issuerName",L(18,11,s.adyenName$)),l(4),C("cardStatistics",L(20,13,s.cardStatisticsCorporatePaynovate$))("issuerName",L(21,15,s.paynovateName$)),l(3),E(L(23,17,s.Features.PRODUCT_GPC_CLIENT_FUNDS)?22:-1));},dependencies:[te,ee,Pe,Q,ne,cc,W,vi],styles:["h3[_ngcontent-%COMP%]{margin-bottom:30px;color:#333;font-family:Open Sans;font-size:16px;font-weight:600;line-height:22px}.cards-stat-row[_ngcontent-%COMP%]{max-width:870px}"],changeDetection:0});let e=t;return e;})();var Fu=y(je,e=>e.cardSettings),Wc=y(Fu,e=>e.cardSettings);function Pu(e,t){e&1&&(a(0,"span"),c(1,2),r());}function hu(e,t){if(e&1){let o=h();w(0),a(1,"button",16),u("click",function(){N(o);let i=d();return A(i.saveCardSettings());}),w(2),c(3,3),V(),r(),V();}}var Qc=(()=>{let t=class t{constructor(){this.store=m(B);}ngOnInit(){this.activeCardSettings$=this.store.pipe(re(Wc));}onCardSettingsChange(n){this.store.dispatch(Cn({cardSettings:n}));}saveCardSettings(){this.activeCardSettings$.pipe(Z(1)).subscribe(n=>{this.store.dispatch(xl({defaultCardSettings:n}));});}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-card-settings"]],decls:18,vars:4,consts:()=>{let n;n="Default Card settings";let i;i="The values you set here, will be prefilled as default values for every card you activate. Of course you can still change the values at the moment of card activation.";let s;s="Company settings";let _;return _="Save",[n,i,s,_,[3,"backButtonActive"],[4,"toolbar-title"],[4,"toolbar-actions"],[1,"container-fluid","customer-settings-menu"],[1,"row"],[1,"col-md-3"],[1,"col-md-9"],[1,"card-setings-container"],[1,"primary","settings-title"],[1,"card-settings-info"],[1,"card-settings-form-container"],[3,"cardSettingsChange","cardSettings"],[1,"simpled-button","primary","toolbar-button",3,"click"]];},template:function(i,s){i&1&&(a(0,"simpled-toolbar",4),O(1,Pu,2,0,"span",5)(2,hu,4,0,"ng-container",6),r(),a(3,"div",7)(4,"div",8)(5,"div",9),M(6,"simpled-settings-menu"),r(),a(7,"div",10)(8,"div",11)(9,"div")(10,"h2",12),c(11,0),r()(),a(12,"div",13)(13,"p"),c(14,1),r()(),a(15,"div",14)(16,"simpled-card-settings-form",15),I(17,"async"),u("cardSettingsChange",function(S){return s.onCardSettingsChange(S);}),r()()()()()()),i&2&&(C("backButtonActive",!0),l(16),C("cardSettings",L(17,2,s.activeCardSettings$)));},dependencies:[te,ee,Pe,Q,ne,_c,W],styles:[".card-setings-container[_ngcontent-%COMP%]{padding-left:15px}"],changeDetection:0});let e=t;return e;})();var ri=y(Cr,e=>e.globalLedgerSettings),tr=y(Cr,e=>e.loaded),ny=y(ri,e=>e?.find(t=>t.ledgerType===vt.BANK_PAYMENTS_SUSPENSE));function bu(e,t){e&1&&(a(0,"span"),c(1,3),r());}function yu(e,t){if(e&1){let o=h();w(0),a(1,"button",20),I(2,"async"),u("click",function(){N(o);let i=d();return A(i.saveGlobalLedgerSettings());}),w(3)(4),c(5,4),V()(),r(),V();}if(e&2){let o=d();l(),C("disabled",L(2,1,o.loaded$)===!1);}}function vu(e,t){e&1&&(a(0,"p",19),c(1,5),r());}var Zc=(()=>{let t=class t{constructor(){this.store=m(B),this.form=new bt({creditorLedger:new 
1Ue("",[_e.maxLength(30)])}),this.loaded$=this.store.select(tr),this.globalLedgerSettings$=this.store.select(ri);}ngOnInit(){this.loaded$.pipe($e(n=>n),ht(()=>this.globalLedgerSettings$),Z(1)).subscribe(n=>{let i=n.find(s=>s.ledgerType===vt.REIMBURSEMENT);this.form.setValue({creditorLedger:i?.globalLedger??""});});}saveGlobalLedgerSettings(){this.form.invalid||this.globalLedgerSettings$.pipe(Z(1)).subscribe(n=>{let i=[...n.filter(s=>s.ledgerType!==vt.REIMBURSEMENT),{globalLedger:this.form.value.creditorLedger??"",ledgerType:vt.REIMBURSEMENT}];this.store.dispatch(ji({globalLedgerSettings:i}));});}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-global-ledgers"]],decls:23,vars:5,consts:()=>{let n;n="Enter creditor ledger number";let i;i="Creditor ledger";let s;s="The values you set here per declaration type will be pre-filled as cross ledger in the exports.";let _;_="Reimbursements creditor ledger";let S;S="Company settings";let p;p="Save";let P;return P="Creditor ledger must be at most 30 characters long.",[i,s,_,S,p,P,[3,"backButtonActive"],[4,"toolbar-title"],[4,"toolbar-actions"],[1,"container-fluid"],[1,"row"],[1,"col-md-3"],[1,"col-md-9"],[1,"primary","settings-title"],[1,"col-12","col-md-6"],[1,"form-group",3,"formGroup"],[1,"mb-3"],["for","creditor-settings-default-ledger",1,"form-label"],["id","creditor-settings-default-ledger","formControlName","creditorLedger","type","text","placeholder",n,1,"form-control","form-control-legacy"],[1,"help-block"],[1,"simpled-button","primary","toolbar-button",3,"click","disabled"]];},template:function(i,s){i&1&&(a(0,"simpled-toolbar",6),O(1,bu,2,0,"span",7)(2,yu,6,3,"ng-container",8),r(),a(3,"div",9)(4,"div",10)(5,"div",11),M(6,"simpled-settings-menu"),r(),a(7,"div",12)(8,"div")(9,"div")(10,"h2",13),c(11,0),r()(),a(12,"div")(13,"p"),c(14,1),r()(),a(15,"div",10)(16,"div",14)(17,"form",15)(18,"div",16)(19,"label",17),c(20,2),r(),M(21,"input",18),T(22,vu,2,0,"p",19),r()()()()()()()()),i&2&&(C("backButtonActive",!0),l(17),C("formGroup",s.form),l(),H("form-group-invalid",s.form.controls.creditorLedger.invalid),l(4),E(s.form.controls.creditorLedger.hasError("maxlength")?22:-1));},dependencies:[te,ee,Pe,Q,ne,ue,Oe,Ie,me,Me,Ke,St,W],styles:[".form-group[_ngcontent-%COMP%]   .form-control[_ngcontent-%COMP%]{height:38px;border-radius:0;border:1px solid #cccccc;color:#555;font-size:14px;line-height:1.42857143;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-group[_ngcontent-%COMP%]   .form-control[_ngcontent-%COMP%]:disabled{cursor:not-allowed}.form-group[_ngcontent-%COMP%]   .form-text[_ngcontent-%COMP%]{color:#777}.form-group-invalid[_ngcontent-%COMP%]   .form-control[_ngcontent-%COMP%]{border-color:#f76f6b;box-shadow:inset 0 1px 1px #00000014;color:#f76f6b}.form-group-invalid[_ngcontent-%COMP%]   .form-control[_ngcontent-%COMP%]:focus{box-shadow:inset 0 1px 1px #00000014,0 0 6px #ce8483}.form-group-invalid[_ngcontent-%COMP%]   .help-block[_ngcontent-%COMP%]{color:#fff;background-color:#f76f6b;border-radius:0 0 5px 5px}"],changeDetection:0});let e=t;return e;})();function xu(e,t){e&1&&(a(0,"span"),c(1,0),r());}var ed=(()=>{let t=class t{constructor(){}ngOnInit(){}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-customer-settings-view"]],decls:6,vars:1,consts:()=>{let n;return n="Company settings",[n,[3,"backButtonActive"],[4,"toolbar-title"],[1,"container-fluid","customer-settings-menu"],[1,"row"],[1,"col-md-3"]];},template:function(i,s){i&1&&(a(0,"simpled-toolbar",1),O(1,xu,2,0,"span",2),r(),a(2,"div",3)(3,"div",4)(4,"div",5),M(5,"simpled-settings-menu"),r()()()),i&2&&C("backButtonActive",!0);},dependencies:[te,ee,ne],encapsulation:2,changeDetection:0});let e=t;return e;})();var Qt=y(je,e=>e.customerProjectSettings),$u=y(Qt,e=>e.customerProjectSettings),td=y(Qt,({filters:e})=>e.search),nd=y(Qt,({filters:e})=>e.statusActive),id=y(Qt,({filters:e})=>e.legalEntityId),Gu=y(Qt,e=>e.filteredProjectsIds),Hr=y(Qt,e=>e.newProjects),Du=y(Qt,e=>e.customerProjectSettings.filter(t=>e.changedProjectIds.includes(t.id))),od=y(Du,Hr,(e,t)=>({changedProjects:e,newProjects:t})),rd=y($u,Gu,(e,t)=>e.filter(n=>
1t.includes(n.id)));var Uu=["tableLine"];function wu(e,t){e&1&&(a(0,"span"),c(1,13),r());}function Vu(e,t){if(e&1){let o=h();w(0),a(1,"button",42),u("click",function(){N(o);let i=d();return A(i.save());}),w(2),c(3,14),V(),r(),V();}if(e&2){d();let o=b(27);l(),C("disabled",o.invalid);}}function Xu(e,t){if(e&1){let o=h();a(0,"ng-select",43),I(1,"async"),u("ngModelChange",function(i){N(o);let s=d();return A(s.onLegalEntityFilterChange(i));}),r();}if(e&2){let o=d();C("ngModel",L(1,4,o.legalEntityIdFilter$))("items",o.legalEntitiesOptions())("clearable",!0)("searchable",!1);}}function Bu(e,t){e&1&&(a(0,"th",40)(1,"span"),c(2,15),r()());}function ku(e,t){e&1&&Ee(0);}function zu(e,t){if(e&1&&O(0,ku,1,0,"ng-container",49),e&2){d(3);let o=b(44);C("ngTemplateOutlet",o);}}function ju(e,t){e&1&&Ee(0);}function qu(e,t){if(e&1&&O(0,ju,1,0,"ng-container",49),e&2){d(3);let o=b(52);C("ngTemplateOutlet",o);}}function Yu(e,t){e&1&&Ee(0);}function Ju(e,t){if(e&1&&O(0,Yu,1,0,"ng-container",49),e&2){d(3);let o=b(46);C("ngTemplateOutlet",o);}}function Hu(e,t){e&1&&Ee(0);}function Ku(e,t){if(e&1&&O(0,Hu,1,0,"ng-container",49),e&2){d(3);let o=b(48);C("ngTemplateOutlet",o);}}function Wu(e,t){e&1&&Ee(0);}function Qu(e,t){if(e&1&&O(0,Wu,1,0,"ng-container",49),e&2){d(3);let o=b(52);C("ngTemplateOutlet",o);}}function Zu(e,t){e&1&&Ee(0);}function ep(e,t){if(e&1&&O(0,Zu,1,0,"ng-container",49),e&2){d(3);let o=b(50);C("ngTemplateOutlet",o);}}function tp(e,t){if(e&1){let o=h();a(0,"td")(1,"ng-select",50),u("ngModelChange",function(i){N(o);let s=d().$implicit,_=d(2);return A(_.lineChange(s.id,"legalEntityId",i));}),r()();}if(e&2){let o=d().$implicit,n=d(2);l(),C("name","project["+o.id+"][legalEntityId]")("items",n.legalEntitiesOptions())("clearable",!1)("searchable",!1)("ngModel",o.legalEntityId);}}function np(e,t){if(e&1){let o=h();a(0,"tr")(1,"td")(2,"input",46,6),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(2);return A(_.lineChange(s.id,"description",i));}),r(),T(5,zu,1,1,"ng-container"),T(6,qu,1,1,"ng-container"),T(7,Ju,1,1,"ng-container"),r(),a(8,"td")(9,"input",47,7),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(2);return A(_.lineChange(s.id,"code",i));}),r(),T(11,Ku,1,1,"ng-container"),T(12,Qu,1,1,"ng-container"),T(13,ep,1,1,"ng-container"),r(),T(14,tp,2,5,"td"),a(15,"td")(16,"simpled-button-checkbox",48),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(2);return A(_.lineChange(s.id,"active",i));}),r()()();}if(e&2){let o=t.$implicit,n=b(4),i=b(10),s=d(2);l(2),H("form-input-invalid",n.invalid),C("name","project["+o.id+"][description]")("ngModel",o.description)("simpledMaxLengthValidator",60),l(3),E(n.errors!=null&&n.errors.required?5:-1),l(),E(n.errors!=null&&n.errors.pattern?6:-1),l(),E(n.errors!=null&&n.errors.maxlength?7:-1),l(2),H("form-input-invalid",i.invalid),C("name","project["+o.id+"][code]")("simpledMaxLengthValidator",20)("ngModel",o.code),l(2),E(i.errors!=null&&i.errors.required?11:-1),l(),E(i.errors!=null&&i.errors.pattern?12:-1),l(),E(i.errors!=null&&i.errors.maxlength?13:-1),l(),E(s.legalEntitiesOptions().length>1?14:-1),l(2),C("name","project["+o.id+"][active]")("ngModel",o.active);}}function ip(e,t){e&1&&Ee(0);}function op(e,t){if(e&1&&O(0,ip,1,0,"ng-container",49),e&2){d(4);let o=b(44);C("ngTemplateOutlet",o);}}function rp(e,t){e&1&&Ee(0);}function sp(e,t){if(e&1&&O(0,rp,1,0,"ng-container",49),e&2){d(4);let o=b(52);C("ngTemplateOutlet",o);}}function ap(e,t){e&1&&Ee(0);}function lp(e,t){if(e&1&&O(0,ap,1,0,"ng-container",49),e&2){d(4);let o=b(46);C("ngTemplateOutlet",o);}}function _p(e,t){e&1&&Ee(0);}function cp(e,t){if(e&1&&O(0,_p,1,0,"ng-container",49),e&2){d(4);let o=b(48);C("ngTemplateOutlet",o);}}function dp(e,t){e&1&&Ee(0);}function Cp(e,t){if(e&1&&O(0,dp,1,0,"ng-container",49),e&2){d(4);let o=b(52);C("ngTemplateOutlet",o);}}function Sp(e,t){}function Tp(e,t){e&1&&O(0,Sp,0,0,"ng-template");}function Ep(e,t){if(e&1&&O(0,Tp,1,0,null,49),e&2){d(4);let o=b(50);C("ngTemplateOutlet",o);}}function mp(e,t){if(e&1){let o=h();a(0,"td")(1,"ng-select",50),u("ngModelChange",function(i){N(o);let s=d().$implicit,_=d(3);return A(_.lineChangeNewItem(s.id,"legalEntityId",i));}),r()();}if(e&2){let o=d().$implicit,n=d(3);l(),C("name","newProject["+o.id+"][legalEntityId]")("items",n.legalEntitiesOptions())("clearable",!1)("searchable",!1)("ngModel",o.legalEntityId);}}function up(e,t){if(e&1){let o=h();a(0,"tr")(1,"td")(2,"input",46,6),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(3);return A(_.lineChangeNewItem(s.id,"description",i));}),r(),T(5,op,1,1,"ng-container"),T(6,sp,1,1,"ng-container"),T(7,lp,1,1,"ng-container"),r(),a(8,"td")(9,"input",47,7),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(3);return A(_.lineChangeNewItem(s.id,"code",i));}),r(),T(11,cp,1,1,"ng-container"),T(12,Cp,1,1,"ng-container"),T(13,Ep,1,1),r(),T(14,mp,2,5,"td"),a(15,"td")(16,"button",51),u("click",function(){let i=N(o).$implicit,s=d(3);return A(s.removeItem(i.id));}),M(17,"fa-icon",52),r()()();}if(e&2){let o=t.$implicit,n=b(4),i=b(10),s=d(3);l(2),H("form-input-invalid",n.invalid),C("name","newProject["+o.id+"][description]")("ngModel",o.description)("simpledMaxLengthValidator",60),l(3),E(n.errors!=null&&n.errors.required?5:-1),l(),E(n.errors!=null&&n.errors.pattern?6:-1),l(),E(n.errors!=null&&n.errors.maxlength?7:-1),l(2),H("form-input-invalid",i.invalid),C("name","newProject["+o.id+"][code]")("simpledMaxLengthValidator",20)("ngModel",o.code),l(2),E(i.errors!=null&&i.errors.required?11:-1),l(),E(i.errors!=null&&i.errors.pattern?12:-1),l(),E(i.errors!=null&&i.errors.maxlength?13:-1),l(),E(s.legalEntitiesOptions().length>1?14:-1),l(3),C("icon",s.removeIcon);}}function pp(e,t){e&1&&se(0,up,18,18,"tr",null,Je().trackById,!0),e&2&&ae(t);}function gp(e,t){if(e&1){let o=h();a(0,"td")(1,"input",45),u("focus",function(){N(o);let i=d(2);return A(i.addNewLine());}),r()();}}function fp(e,t){if(e&1){let o=h();a(0,"tbody"),se(1,np,17,19,"tr",null,Je().trackById,!0),T(3,pp,2,0),I(4,"async"),a(5,"tr",44)(6,"td")(7,"input",45),u("focus",function(){N(o);let i=d();return A(i.addNewLine());}),r()(),a(8,"td")(9,"input",45),u("focus",function(){N(o);let i=d();return A(i.addNewLine());}),r()(),T(10,gp,2,0,"td"),M(11,"td"),r()();}if(e&2){let o,n=d();l(),ae(t),l(2),E((o=L(4,2,n.newProjects$))?3:-1,o),l(7),E(n.legalEntitiesOptions().length>1?10:-1);}}function Np(e,t){e&1&&(a(0,"p",53),c(1,16),r());}function Ap(e,t){e&1&&(a(0,"p",53),c(1,17),r());}function Mp(e,t){e&1&&(a(0,"p",53),c(1,18),r());}function Op(e,t){e&1&&(a(0,"p",53),c(1,19),r());}function Rp(e,t){e&1&&(a(0,"p",53),c(1,20),r());}var sd=(()=>{let t=class t{constructor(){this.store=m(B),this.legalEntitiesStore=m(Qe),this.changeDetectorRef=m(Ct),this.projectsFiltered$=this.store.select(rd),this.newProjects$=this.store.select(Hr),this.searchFilter$=this.store.select(td),this.statusFilter$=this.store.select(nd),this.legalEntityIdFilter$=this.store.select(id),this.legalEntitiesOptions=this.legalEntitiesStore.legalEntityOptionsWithMaster,this.removeIcon=at,this.statusFilterValues=[{name:"Active",value:!0},{name:"Inactive",value:!1}],this.tableLines=dt("tableLine");}ngOnInit(){this.store.dispatch(Ht());}lineChange(n,i,s){this.store.dispatch(wo({id:n,property:i,newValue:s}));}lineChangeNewItem(n,i,s){this.store.dispatch(Vo({id:n,property:i,newValue:s}));}addNewLine(){this.store.dispatch(Bo()),setTimeout(()=>{this.tableLines().at(-1).nativeElement.focus(),this.changeDetectorRef.markForCheck();},50);}removeItem(n){this.store.dispatch(ko({id:n}));}save(){this.store.pipe(re(od),Z(1)).subscribe(({changedProjects:n,newProjects:i})=>{let s=n.map(S=>f(g({},S),{legalEntityId:He(S.legalEntityId)})),_=i.map(S=>f(g({},S),{legalEntityId:He(S.legalEntityId)}));this.store.dispatch(Uo({changedProjects:s,newProjects:_}));});}onSearchChanged(n){this.store.dispatch(Hn({searchValue:n}));}onStatusFilterChange(n){this.store.dispatch(Kn({statusActive:n}));}onLegalEntityFilterChange(n){this.store.dispatch(Wn({legalEntityId:n}));}trackById(n,i){return i.id;}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-project-list"]],viewQuery:function(i,s){i&1&&_t(s.tableLines,Uu,5),i&2&&ct();},decls:53,vars:16,consts:()=>{let n;n="Search by description or code";let i;i="Any status";let s;s="Any legal entity";let _;_="Projects";let S;S="Here you can specify projects."+"[\uFFFD#16\uFFFD\uFFFD/#16\uFFFD|\uFFFD#17\uFFFD\uFFFD/#17\uFFFD|\uFFFD#18\uFFFD\uFFFD/#18\uFFFD|\uFFFD#19\uFFFD\uFFFD/#19\uFFFD]"+" By making a line inactive you can hide the item for your users, but still retrieve it for historical data."+"[\uFFFD#16\uFFFD\uFFFD/#16\uFFFD|\uFFFD#17\uFFFD\uFFFD/#17\uFFFD|\uFFFD#18\uFFFD\uFFFD/#18\uFFFD|\uFFFD#19\uFFFD\uFFFD/#19\uFFFD]"+" After saving a line you can only edit or hide, not remove it."+"[\uFFFD#16\uFFFD\uFFFD/#16\uFFFD|\uFFFD#17\uFFFD\uFFFD/#17\uFFFD|\uFFFD#18\uFFFD\uFFFD/#18\uFFFD|\uFFFD#19\uFFFD\uFFFD/#19\uFFFD]"+" Please note: When adding a new project, you have to make this active for specific accounts."+"[\uFFFD#16\uFFFD\uFFFD/#16\uFFFD|\uFFFD#17\uFFFD\uFFFD/#17\uFFFD|\uFFFD#18\uFFFD\uFFFD/#18\uFFFD|\uFFFD#19\uFFFD\uFFFD/#19\uFFFD]"+" You can do this by navigating to the tab projects under account details.",S=it(S);let p;p="Description";let P;
1P="Code";let v;v="Status";let G;G="Company settings";let J;J="Save";let ie;ie="Legal entity";let U;U="Active";let oe;oe="Description required";let k;k="Description can have at most 60 characters.";let Ce;Ce="Code required";let ve;ve="Code can have at most 20 characters.";let q;return q="This field cannot contain only spaces.",[["projectForm","ngForm"],["descriptionRequired",""],["descriptionMaxLength",""],["codeRequired",""],["codeMaxLength",""],["patternError",""],["tableLine","","description","ngModel"],["code","ngModel"],_,S,p,P,v,G,J,ie,oe,k,Ce,ve,q,[3,"backButtonActive"],[4,"toolbar-title"],[4,"toolbar-actions"],[1,"container-fluid","customer-settings-menu"],[1,"row"],[1,"col-md-3"],[1,"col-md-9"],[1,"project-list-settings-section"],[1,"project-list-settings-title"],[1,"project-list-settings-body"],[1,"col-md-12"],[1,"project-list-settings-text"],[1,"filters"],["placeholder",n,1,"search-filter",3,"filterChange","value","debounce"],["bindLabel","name","bindValue","value","placeholder",i,1,"simpled-select","simpled-select-filter","dropdown-filter",3,"ngModelChange","ngModel","items","clearable","searchable"],["bindLabel","name","bindValue","id","placeholder",s,1,"simpled-select","simpled-select-filter","dropdown-filter",3,"ngModel","items","clearable","searchable"],[1,"table"],["width","40%"],["width","20%"],["width","35%"],["width","5%"],[1,"simpled-button","primary",3,"click","disabled"],["bindLabel","name","bindValue","id","placeholder",s,1,"simpled-select","simpled-select-filter","dropdown-filter",3,"ngModelChange","ngModel","items","clearable","searchable"],[1,"add-new-line"],["readonly","",1,"form-control","form-control-legacy",3,"focus"],["required","","pattern",".*\\S.*",1,"form-control","form-control-legacy",3,"ngModelChange","name","ngModel","simpledMaxLengthValidator"],["required","","pattern",".*\\S.*",1,"form-control","form-control-legacy",3,"ngModelChange","name","simpledMaxLengthValidator","ngModel"],["matTooltip",U,3,"ngModelChange","name","ngModel"],[4,"ngTemplateOutlet"],["bindLabel","name","bindValue","id",3,"ngModelChange","name","items","clearable","searchable","ngModel"],[1,"btn","btn-danger","btn-sm",3,"click"],[3,"icon"],[1,"help-block"]];},template:function(i,s){if(i&1&&(a(0,"simpled-toolbar",21),O(1,wu,2,0,"span",22)(2,Vu,4,1,"ng-container",23),r(),a(3,"div",24)(4,"div",25)(5,"div",26),M(6,"simpled-settings-menu"),r(),a(7,"div",27)(8,"div",28)(9,"h4",29),c(10,8),r(),a(11,"div",30)(12,"div",25)(13,"div",31)(14,"div",32),pe(15,9),M(16,"br")(17,"br")(18,"br")(19,"br"),ge(),r()()()(),a(20,"div",33)(21,"simpled-search-filter",34),I(22,"async"),u("filterChange",function(S){return s.onSearchChanged(S);}),r(),a(23,"ng-select",35),I(24,"async"),u("ngModelChange",function(S){return s.onStatusFilterChange(S);}),r(),T(25,Xu,2,6,"ng-select",36),r(),a(26,"form",null,0)(28,"table",37)(29,"thead")(30,"tr")(31,"th",38)(32,"span"),c(33,10),r()(),a(34,"th",39)(35,"span"),c(36,11),r()(),T(37,Bu,3,0,"th",40),a(38,"th",41)(39,"span"),c(40,12),r()()()(),T(41,fp,12,4,"tbody"),I(42,"async"),r()()()()()(),O(43,Np,2,0,"ng-template",null,1,fe)(45,Ap,2,0,"ng-template",null,2,fe)(47,Mp,2,0,"ng-template",null,3,fe)(49,Op,2,0,"ng-template",null,4,fe)(51,Rp,2,0,"ng-template",null,5,fe)),i&2){let _;C("backButtonActive",!0),l(21),C("value",L(22,10,s.searchFilter$))("debounce",0),l(2),C("ngModel",L(24,12,s.statusFilter$))("items",s.statusFilterValues)("clearable",!0)("searchable",!1),l(2),E(s.legalEntitiesOptions().length>1?25:-1),l(12),E(s.legalEntitiesOptions().length>1?37:-1),l(4),E((_=L(42,14,s.projectsFiltered$))?41:-1,_);}},dependencies:[te,ee,Pe,Q,ne,ut,ke,ue,Oe,Ie,me,Me,Tt,Et,st,rt,ot,mt,tt,Ze,Le,It,W],styles:[".form-input-invalid[_ngcontent-%COMP%]{border-color:#f76f6b;box-shadow:inset 0 1px 1px #00000014;color:#f76f6b}.form-input-invalid[_ngcontent-%COMP%]:focus{box-shadow:inset 0 1px 1px #00000014,0 0 6px #ce8483}.help-block[_ngcontent-%COMP%]{margin-bottom:0;padding:4px 8px;font-weight:600;font-size:14px;color:#fff;background-color:#f76f6b;border-radius:0 0 5px 5px}.input-group-text[_ngcontent-%COMP%]{border-radius:0}.project-list-settings-section[_ngcontent-%COMP%]{padding:16px;margin:0 0 8px;border-bottom:1px solid #e5e9f1}.project-list-settings-title[_ngcontent-%COMP%]{padding:10px 15px 0;font-weight:600;font-size:18px;margin:10px 0;line-height:1.1}.project-list-settings-body[_ngcontent-%COMP%]{padding:15px}.project-list-settings-text[_ngcontent-%COMP%]{padding:16px 0 8px;margin-bottom:8px}.add-new-line[_ngcontent-%COMP%]{opacity:.7}.add-new-line[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{background:#fff;cursor:pointer}.btn-danger[_ngcontent-%COMP%]{padding:4px 8px;line-height:18px}.filters[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:16px}.filters[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{margin-bottom:16px}.filters[_ngcontent-%COMP%]   .search-filter[_ngcontent-%COMP%]{flex:0 1 600px;min-width:250px;margin-right:16px}.filters[_ngcontent-%COMP%]   .dropdown-filter[_ngcontent-%COMP%]{margin-right:16px;flex:0 0 auto}.filters[_ngcontent-%COMP%]   .dropdown-filter[_ngcontent-%COMP%]:last-child{margin-right:0}"],changeDetection:0});let e=t;return e;})();var Nn=y(je,e=>e.customerVatSettings),ad=y(Nn,e=>e.customerVatSettings),ld=y(Nn,({filters:e})=>e.search),_d=y(Nn,({filters:e})=>e.statusActive),cd=y(Nn,({filters:e})=>e.legalEntityId),Ip=y(Nn,e=>e.filteredVatsIds),Kr=y(Nn,e=>e.newVats),dd=y(ad,Kr,(e,t)=>
1({existingVats:e,newVats:t})),Cd=y(ad,Ip,(e,t)=>e.filter(n=>t.includes(n.id)));var Sd=(()=>{let t=class t extends Ia{constructor(){super(...arguments),this.maxNumber=qe(void 0,{alias:"simpledMaxNumberValidator"});}validate(n){return _e.max(this.maxNumber())(n);}};t.ɵfac=(()=>{let n;return function(s){return(n||(n=ds(t)))(s||t);};})(),t.ɵdir=Ts({type:t,selectors:[["","simpledMaxNumberValidator",""]],inputs:{maxNumber:[1,"simpledMaxNumberValidator","maxNumber"]},features:[Zt([{provide:js,useExisting:t,multi:!0}]),Es]});let e=t;return e;})();var Lp=["tableLine"];function Fp(e,t){e&1&&(a(0,"span"),c(1,20),r());}function Pp(e,t){if(e&1){let o=h();w(0),a(1,"button",50),u("click",function(){N(o);let i=d();return A(i.save());}),w(2),c(3,21),V(),r(),V();}if(e&2){d();let o=b(25);l(),C("disabled",o.invalid);}}function hp(e,t){if(e&1){let o=h();a(0,"ng-select",51),I(1,"async"),u("ngModelChange",function(i){N(o);let s=d();return A(s.onLegalEntityFilterChange(i));}),r();}if(e&2){let o=d();C("items",o.legalEntitiesOptions())("ngModel",L(1,3,o.legalEntityIdFilter$))("searchable",!1);}}function bp(e,t){e&1&&(a(0,"th",48)(1,"span"),c(2,22),r()());}function yp(e,t){}function vp(e,t){e&1&&O(0,yp,0,0,"ng-template");}function xp(e,t){if(e&1&&O(0,vp,1,0,null,61),e&2){d(3);let o=b(48);C("ngTemplateOutlet",o);}}function $p(e,t){}function Gp(e,t){e&1&&O(0,$p,0,0,"ng-template");}function Dp(e,t){if(e&1&&O(0,Gp,1,0,null,61),e&2){d(3);let o=b(60);C("ngTemplateOutlet",o);}}function Up(e,t){}function wp(e,t){e&1&&O(0,Up,0,0,"ng-template");}function Vp(e,t){if(e&1&&O(0,wp,1,0,null,61),e&2){d(3);let o=b(50);C("ngTemplateOutlet",o);}}function Xp(e,t){}function Bp(e,t){e&1&&O(0,Xp,0,0,"ng-template");}function kp(e,t){if(e&1&&O(0,Bp,1,0,null,61),e&2){d(3);let o=b(52);C("ngTemplateOutlet",o);}}function zp(e,t){}function jp(e,t){e&1&&O(0,zp,0,0,"ng-template");}function qp(e,t){if(e&1&&O(0,jp,1,0,null,61),e&2){d(3);let o=b(54);C("ngTemplateOutlet",o);}}function Yp(e,t){}function Jp(e,t){e&1&&O(0,Yp,0,0,"ng-template");}function Hp(e,t){if(e&1&&O(0,Jp,1,0,null,61),e&2){d(3);let o=b(56);C("ngTemplateOutlet",o);}}function Kp(e,t){}function Wp(e,t){e&1&&O(0,Kp,0,0,"ng-template");}function Qp(e,t){if(e&1&&O(0,Wp,1,0,null,61),e&2){d(3);let o=b(60);C("ngTemplateOutlet",o);}}function Zp(e,t){}function eg(e,t){e&1&&O(0,Zp,0,0,"ng-template");}function tg(e,t){if(e&1&&O(0,eg,1,0,null,61),e&2){d(3);let o=b(58);C("ngTemplateOutlet",o);}}function ng(e,t){if(e&1){let o=h();a(0,"td")(1,"ng-select",62,12),u("ngModelChange",function(i){N(o);let s=d().$implicit,_=d(2);return A(_.lineChange(s.id,"legalEntityId",i));}),r()();}if(e&2){let o=d().$implicit,n=d(2);l(),C("items",n.legalEntitiesOptions())("name","vat["+o.id+"][legalEntityId]")("selectOnTab",!0)("ngModel",o.legalEntityId)("clearable",!1);}}function ig(e,t){if(e&1){let o=h();a(0,"tr")(1,"td")(2,"input",54,8),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(2);return A(_.lineChange(s.id,"description",i));}),r(),T(5,xp,1,1),T(6,Dp,1,1),T(7,Vp,1,1),r(),a(8,"td")(9,"div",55)(10,"input",56,9),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(2);return A(_.lineChange(s.id,"percentage",i));}),r(),a(12,"span",57),X(13,"%"),r()(),T(14,kp,1,1),T(15,qp,1,1),r(),a(16,"td")(17,"input",58,10),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(2);return A(_.lineChange(s.id,"code",i));}),r(),T(19,Hp,1,1),T(20,Qp,1,1),r(),a(21,"td")(22,"input",59,11),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(2);return A(_.lineChange(s.id,"ledger",i));}),r(),T(24,tg,1,1),r(),T(25,ng,3,5,"td"),a(26,"td")(27,"simpled-button-checkbox",60),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(2);return A(_.lineChange(s.id,"active",i));}),r()()();}if(e&2){let o=t.$implicit,n=b(4),i=b(11),s=b(18),_=b(23),S=d(2);l(2),H("form-input-invalid",n.invalid),C("name","vat["+o.id+"][description]")("ngModel",o.description)("simpledMaxLengthValidator",60),l(3),E(n.errors!=null&&n.errors.required?5:-1),l(),E(n.errors!=null&&n.errors.pattern?6:-1),l(),E(n.errors!=null&&n.errors.maxlength?7:-1),l(3),H("form-input-invalid",i.invalid),C("name","vat["+o.id+"][percentage]")("simpledMaxNumberValidator",99.9)("maskito",S.currencyInputMask)("ngModel",o.percentage),l(4),E(i.errors!=null&&i.errors.pattern||i.errors!=null&&i.errors.required?14:-1),l(),E(i.errors!=null&&i.errors.max?15:-1),l(2),H("form-input-invalid",s.invalid),C("name","vat["+o.id+"][code]")("ngModel",o.code)("simpledMaxLengthValidator",30),l(2),E(s.errors!=null&&s.errors.maxlength?19:-1),l(),E(s.errors!=null&&s.errors.pattern?20:-1),l(2),H("form-input-invalid",_.invali
1d),C("name","vat["+o.id+"][ledger]")("simpledMaxLengthValidator",30)("ngModel",o.ledger),l(2),E(_.errors!=null&&_.errors.maxlength?24:-1),l(),E(S.legalEntitiesOptions().length>1?25:-1),l(2),C("name","vat["+o.id+"][active]")("ngModel",o.active);}}function og(e,t){}function rg(e,t){e&1&&O(0,og,0,0,"ng-template");}function sg(e,t){if(e&1&&O(0,rg,1,0,null,61),e&2){d(4);let o=b(48);C("ngTemplateOutlet",o);}}function ag(e,t){}function lg(e,t){e&1&&O(0,ag,0,0,"ng-template");}function _g(e,t){if(e&1&&O(0,lg,1,0,null,61),e&2){d(4);let o=b(60);C("ngTemplateOutlet",o);}}function cg(e,t){}function dg(e,t){e&1&&O(0,cg,0,0,"ng-template");}function Cg(e,t){if(e&1&&O(0,dg,1,0,null,61),e&2){d(4);let o=b(50);C("ngTemplateOutlet",o);}}function Sg(e,t){}function Tg(e,t){e&1&&O(0,Sg,0,0,"ng-template");}function Eg(e,t){if(e&1&&O(0,Tg,1,0,null,61),e&2){d(4);let o=b(52);C("ngTemplateOutlet",o);}}function mg(e,t){}function ug(e,t){e&1&&O(0,mg,0,0,"ng-template");}function pg(e,t){if(e&1&&O(0,ug,1,0,null,61),e&2){d(4);let o=b(54);C("ngTemplateOutlet",o);}}function gg(e,t){}function fg(e,t){e&1&&O(0,gg,0,0,"ng-template");}function Ng(e,t){if(e&1&&O(0,fg,1,0,null,61),e&2){d(4);let o=b(56);C("ngTemplateOutlet",o);}}function Ag(e,t){}function Mg(e,t){e&1&&O(0,Ag,0,0,"ng-template");}function Og(e,t){if(e&1&&O(0,Mg,1,0,null,61),e&2){d(4);let o=b(60);C("ngTemplateOutlet",o);}}function Rg(e,t){}function Ig(e,t){e&1&&O(0,Rg,0,0,"ng-template");}function Lg(e,t){if(e&1&&O(0,Ig,1,0,null,61),e&2){d(4);let o=b(58);C("ngTemplateOutlet",o);}}function Fg(e,t){if(e&1){let o=h();a(0,"td")(1,"ng-select",62,12),u("ngModelChange",function(i){N(o);let s=d().$implicit,_=d(3);return A(_.lineChangeNewItem(s.id,"legalEntityId",i));}),r()();}if(e&2){let o=d().$implicit,n=d(3);l(),C("items",n.legalEntitiesOptions())("name","newVat["+o.id+"][legalEntityId]")("selectOnTab",!0)("ngModel",o.legalEntityId)("clearable",!1);}}function Pg(e,t){if(e&1){let o=h();a(0,"tr")(1,"td")(2,"input",54,8),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(3);return A(_.lineChangeNewItem(s.id,"description",i));}),r(),T(5,sg,1,1),T(6,_g,1,1),T(7,Cg,1,1),r(),a(8,"td")(9,"div",55)(10,"input",56,9),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(3);return A(_.lineChangeNewItem(s.id,"percentage",i));}),r(),a(12,"span",57),X(13,"%"),r()(),T(14,Eg,1,1),T(15,pg,1,1),r(),a(16,"td")(17,"input",58,10),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(3);return A(_.lineChangeNewItem(s.id,"code",i));}),r(),T(19,Ng,1,1),T(20,Og,1,1),r(),a(21,"td")(22,"input",59,11),u("ngModelChange",function(i){let s=N(o).$implicit,_=d(3);return A(_.lineChangeNewItem(s.id,"ledger",i));}),r(),T(24,Lg,1,1),r(),T(25,Fg,3,5,"td"),a(26,"td")(27,"button",63),u("click",function(){let i=N(o).$implicit,s=d(3);return A(s.removeItem(i.id));}),M(28,"fa-icon",64),r()()();}if(e&2){let o=t.$implicit,n=b(4),i=b(11),s=b(18),_=b(23),S=d(3);l(2),H("form-input-invalid",n.invalid),C("name","newVat["+o.id+"][description]")("ngModel",o.description)("simpledMaxLengthValidator",60),l(3),E(n.errors!=null&&n.errors.required?5:-1),l(),E(n.errors!=null&&n.errors.pattern?6:-1),l(),E(n.errors!=null&&n.errors.maxlength?7:-1),l(3),H("form-input-invalid",i.invalid),C("name","newVat["+o.id+"][percentage]")("simpledMaxNumberValidator",99.9)("maskito",S.currencyInputMask)("ngModel",o.percentage),l(4),E(i.errors!=null&&i.errors.pattern||i.errors!=null&&i.errors.required?14:-1),l(),E(i.errors!=null&&i.errors.max?15:-1),l(2),H("form-input-invalid",s.invalid),C("name","newVat["+o.id+"][code]")("ngModel",o.code)("simpledMaxLengthValidator",30),l(2),E(s.errors!=null&&s.errors.maxlength?19:-1),l(),E(s.errors!=null&&s.errors.pattern?20:-1),l(2),H("form-input-invalid",_.invalid),C("name","newVat["+o.id+"][ledger]")("simpledMaxLengthValidator",30)("ngModel",o.ledger),l(2),E(_.errors!=null&&_.errors.maxlength?24:-1),l(),E(S.legalEntitiesOptions().length>1?25:-1),l(3),C("icon",S.removeIcon);}}function hg(e,t){e&1&&se(0,Pg,29,31,"tr",null,Je().trackById,!0),e&2&&ae(t);}function bg(e,t){if(e&1){let o=h();a(0,"td")(1,"input",53),u("focus",function(){N(o);let i=d(2);return A(i.addNewLine());}),r()();}}function yg(e,t){if(e&1){let o=h();a(0,"tbody"),se(1,ig,28,32,"tr",null,Je().trackById,!0),T(3,hg,2,0),I(4,"async"),a(5,"tr",52)(6,"td")(7,"input",53),u("focus",function(){N(o);let i=d();return A(i.addNewLine());}),r()(),a(8,"td")(9,"input",53),u("focus",function(){N(o);let i=d();return A(i.addNewLine());}),r()(),a(10,"td")(11,"input",53),u("focus",function(){N(o);let i=d();return A(i.addNewLine());}),r()(),a(12,"td")(13,"input",53),u("focus",function(){N(o);let i=d();return A(i.addNewLine());}),r()(),T(14,bg,2,0,"td"),M(15,"td"),r()();}if(e&2){let o,n=d();l(),ae(t),l(2),E((o=L(4,2,n.newVats$))?3:-1,o),l(11),E(n.legalEntitiesOptions().length>1?14:-1);}}function vg(e,t){e&1&&(a(0,"p",65),c(1,23),r());}function xg(e,t){e&1&&(a(0,"p",65),c(1,24),r());}function $g(e,t){e&1&&(a(0,"p",65),c(1,25),r());}function Gg(e,t){e&1&&(a(0,"p",65),c(1,26),r());}
1function Dg(e,t){e&1&&(a(0,"p",65),c(1,27),r());}function Ug(e,t){e&1&&(a(0,"p",65),c(1,28),r());}function wg(e,t){e&1&&(a(0,"p",65),c(1,29),r());}var Td=(()=>{let t=class t{constructor(){this.tableLines=dt("tableLine"),this.store=m(B),this.legalEntitiesStore=m(Qe),this.changeDetectorRef=m(Ct),this.maskitoService=m(Pa),this.i18nNumberParser=m(Fa),this.locale=m(fs),this.newVats$=this.store.select(Kr),this.searchFilter$=this.store.select(ld),this.statusFilter$=this.store.select(_d),this.legalEntityIdFilter$=this.store.select(cd),this.legalEntitiesOptions=this.legalEntitiesStore.legalEntityOptionsWithMaster,this.removeIcon=at,this.statusFilterValues=[{name:"Active",value:!0},{name:"Inactive",value:!1}],this.currencyInputMask=this.maskitoService.generateMaskitoNumberOptions({maximumFractionDigits:2});}ngOnInit(){this.store.dispatch(Kt()),this.vatsFiltered$=this.store.pipe(re(Cd),F(n=>n.map(i=>i.percentage?f(g({},i),{percentage:i.percentage.toString().replace(/\./,Ms(this.locale,As.Decimal))}):i)));}lineChange(n,i,s){this.store.dispatch(qo({id:n,property:i,newValue:s}));}lineChangeNewItem(n,i,s){this.store.dispatch(Yo({id:n,property:i,newValue:s}));}removeItem(n){this.store.dispatch(Ko({id:n}));}addNewLine(){this.store.dispatch(Ho()),setTimeout(()=>{this.tableLines().at(-1).nativeElement.focus(),this.changeDetectorRef.markForCheck();},50);}onSearchChanged(n){this.store.dispatch(Zn({searchValue:n}));}onStatusFilterChange(n){this.store.dispatch(ei({statusActive:n}));}onLegalEntityFilterChange(n){this.store.dispatch(ti({legalEntityId:n}));}trackById(n,i){return i.id;}
1save(){this.store.pipe(re(dd),Z(1)).subscribe(({existingVats:n,newVats:i})=>{let s=n.map(S=>f(g({},S),{legalEntityId:He(S.legalEntityId),percentage:typeof S.percentage=="number"?S.percentage:this.i18nNumberParser.parseNumber(S.percentage)})),_=i.map(S=>f(g({},S),{legalEntityId:He(S.legalEntityId),percentage:typeof S.percentage=="number"?S.percentage:this.i18nNumberParser.parseNumber(S.percentage)}));this.store.dispatch(zo({existingVats:s,newVats:_}));});}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-vat-list"]],viewQuery:function(i,s){i&1&&_t(s.tableLines,Lp,5),i&2&&ct();},decls:61,vars:16,consts:()=>{let n;n="Search by description or code";let i;i="Any status";let s;s="Any legal entity";let _;_="VAT";let S;S="Here you can specify the VAT percentages that can be used in your organization."+"[\uFFFD#16\uFFFD\uFFFD/#16\uFFFD|\uFFFD#17\uFFFD\uFFFD/#17\uFFFD]"+" By making a line inactive you can hide the item for your users to pick, but still retrieve it for historical data."+"[\uFFFD#16\uFFFD\uFFFD/#16\uFFFD|\uFFFD#17\uFFFD\uFFFD/#17\uFFFD]"+" Because of that, after saving a line you can only edit or hide, not remove it.",S=it(S);let p;p="Description";let P;P="Percentage";let v;v="Code";let G;G="Vat ledger";let J;J="Status";let ie;ie="Company settings";let U;U="Save";let oe;oe="Legal entity";let k;k="Active";let Ce;Ce="Description required";let ve;ve="Description can have at most 60 characters.";let q;q="Please enter a valid number that has a maximum of one decimal";let le;le="The VAT percentage must be at most 99.9";let Pt;Pt="Code can have at most 30 characters.";let ye;ye="Ledger can have at most 30 characters";let Ut;return Ut="This field cannot contain only spaces.",[["vatForm","ngForm"],["descriptionRequired",""],["descriptionMaxLength",""],["percentageRequired",""],["percentageMaxValue",""],["codeMaxLength",""],["ledgerMaxLength",""],["patternError",""],["tableLine","","description","ngModel"],["percentage","ngModel"],["code","ngModel"],["ledger","ngModel"],["legalEntityId","ngModel"],_,S,p,P,v,G,J,ie,U,oe,Ce,ve,q,le,Pt,ye,Ut,[3,"backButtonActive"],[4,"toolbar-title"],[4,"toolbar-actions"],[1,"container-fluid","customer-settings-menu"],[1,"row"],[1,"col-md-3"],[1,"col-md-9"],[1,"vat-list-settings-section"],[1,"vat-list-settings-title"],[1,"vat-list-settings-body"],[1,"col-md-12"],[1,"vat-list-settings-text"],[1,"filters"],["placeholder",n,1,"search-filter",3,"filterChange","value","debounce"],["bindLabel","name","bindValue","value","placeholder",i,1,"simpled-select","simpled-select-filter","dropdown-filter",3,"ngModelChange","items","ngModel","clearable","searchable"],["bindLabel","name","bindValue","id","placeholder",s,1,"simpled-select","simpled-select-filter","dropdown-filter",3,"items","ngModel","searchable"],[1,"table"],["width","35%"],["width","15%"],["width","5%"],[1,"simpled-button","primary",3,"click","disabled"],["bindLabel","name","bindValue","id","placeholder",s,1,"simpled-select","simpled-select-filter","dropdown-filter",3,"ngModelChange","items","ngModel","searchable"],[1,"add-new-line"],["readonly","",1,"form-control","form-control-legacy",3,"focus"],["required","","pattern",".*\\S.*",1,"form-control","form-control-legacy",3,"ngModelChange","name","ngModel","simpledMaxLengthValidator"],[1,"input-group"],["required","","pattern","^[0-9]+([\\.,][0-9]{1})?$",1,"form-control","form-control-legacy",3,"ngModelChange","name","simpledMaxNumberValidator","maskito","ngModel"],[1,"input-group-text"],["pattern",".*\\S.*",1,"form-control","form-control-legacy",3,"ngModelChange","name","ngModel","simpledMaxLengthValidator"],[1,"form-control","form-control-legacy",3,"ngModelChange","name","simpledMaxLengthValidator","ngModel"],["matTooltip",k,3,"ngModelChange","name","ngModel"],[4,"ngTemplateOutlet"],["bindLabel","name","bindValue","id",3,"ngModelChange","items","name","selectOnTab","ngModel","clearable"],[1,"btn","btn-danger","btn-sm",3,"click"],[3,"icon"],[1,"help-block"]];},template:function(i,s){if(i&1&&(a(0,"simpled-toolbar",30),O(1,Fp,2,0,"span",31)(2,Pp,4,1,"ng-container",32),r(),a(3,"div",33)(4,"div",34)(5,"div",35),M(6,"simpled-settings-menu"),r(),a(7,"div",36)(8,"div",37)(9,"h4",38),c(10,13),r(),a(11,"div",39)(12,"div",34)(13,"div",40)(14,"div",41),pe(15,14),M(16,"br")(17,"br"),ge(),r()()()(),a(18,"div",42)(19,"simpled-search-filter",43),I(20,"async"),u("filterChange",function(S){return s.onSearchChanged(S);}),r(),a(21,"ng-select",44),I(22,"async"),u("ngModelChange",function(S){return s.onStatusFilterChange(S);}),r(),T(23,hp,2,5,"ng-select",45),r(),a(24,"form",null,0)(26,"table",46)(27,"thead")(28,"tr")(29,"th",47)(30,"span"),c(31,15),r()(),a(32,"th",48)(33,"span"),c(34,16),r()(),a(35,"th",48)(36,"span"),c(37,17),r()(),a(38,"th",48)(39,"span"),c(40,18),r()(),T(41,bp,3,0,"th",48),a(42,"th",49)(43,"span"),c(44,19),r()()()(),T(45,yg,16,4,"tbody"),I(46,"async"),r()()()()()(),O(47,vg,2,0,"ng-template",null,1,fe)(49,xg,2,0,"ng-template",null,2,fe)(51,$g,2,0,"ng-template",null,3,fe)(53,Gg,2,0,"ng-template",null,4,fe)(55,Dg,2,0,"ng-template",null,5,fe)(57,Ug,2,0,"ng-template",null,6,fe)(59,wg,2,0,"ng-template",null,7,fe)),i&2){let _;C("backButtonActive",!0),l(19),C("value",L(20,10,s.searchFilter$))("debounce",0),l(2),C("items",s.statusFilterValues)("ngModel",L(22,12,s.statusFilter$))("clearable",!0)("searchable",!1),l(2),E(s.legalEntitiesOptions().length>1?23:-1),l(18),E(s.legalEntitiesOptions().length>1?41:-1),l(4),E((_=L(46,14,s.vatsFiltered$))?45:-1,_);}},dependencies:[te,ee,Pe,Q,ne,ut,ke,ue,Oe,Ie,me,Me,Tt,Et,st,rt,ot,mt,Sd,ha,tt,Ze,Le,It,W],styles:[".form-input-invalid[_ngcontent-%COMP%]{border-color:#f76f6b;box-shadow:inset 0 1px 1px #00000014;color:#f76f6b}.form-input-invalid[_ngcontent-%COMP%]:focus{box-shadow:inset 0 1px 1px #00000014,0 0 6px #ce8483}.help-block[_ngcontent-%COMP%]{margin-bottom:0;padding:4px 8px;font-weight:600;font-size:14px;color:#fff;background-color:#f76f6b;border-radius:0 0 5px 5px}.vat-list-settings-section[_ngcontent-%COMP%]{padding:16px;margin:0 0 8px;border-bottom:1px solid #e5e9f1}.vat-list-settings-title[_ngcontent-%COMP%]{padding:10px 15px 0;font-weight:600;font-size:18px;margin:10px 0;line-height:1.1}.vat-list-settings-body[_ngcontent-%COMP%]{padding:15px}.vat-list-settings-text[_ngcontent-%COMP%]{padding:16px 0 8px;margin-bottom:8px}.add-new-line[_ngcontent-%COMP%]{opacity:.7}.add-new-line[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{background:#fff;cursor:pointer}.btn-danger[_ngcontent-%COMP%]{padding:4px 8px;line-height:18px}.filters[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:16px}.filters[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{margin-bottom:16px}.filters[_ngcontent-%COMP%]   .search-filter[_ngcontent-%COMP%]{flex:0 1 600px;min-width:250px;margin-right:16px}.filters[_ngcontent-%COMP%]   .dropdown-filter[_ngcontent-%COMP%]{margin-right:16px;flex:0 0 auto}.filters[_ngcontent-%COMP%]   .dropdown-filter[_ngcontent-%COMP%]:last-child{margin-right:0}"],changeDetection:0});let e=t;return e;})();function Vg(e,t){if(e&1&&(a(0,"simpled-grouped-table-row",1)(1,"div",2),M(2,"fa-icon",3),r(),a(3,"div",4),X(4),r(),a(5,"a",5),M(6,"fa-icon",3),r()()),e&2){let o=t.$implicit,n=d(2);l(2),C("icon",n.pdfIcon),l(2),ce(o.fileName),l(),C("href",o.url,Cs),l(),C("icon",n.downloadIcon);}}function Xg(e,t){if(e&1&&(a(0,"simpled-grouped-table-rowgroup")(1,"simpled-grouped-table-header"),X(2),I(3,"date"),r(),se(4,Vg,7,4,"simpled-grouped-table-row",1,Je().trackById,!0),r()),e&2){let o=t.$implicit;l(2),Fe(" ",gs(3,1,o.groupedBy,"MMMM y")," "),l(2),ae(o.list);}}var Ed=(()=>{let t=class t{constructor(){this.groupedRows=qe(void 0),this.totalCount=qe(void 0),this.currentPage=qe(void 0),this.pdfIcon=ea,this.downloadIcon=Ws;}trackById(n,i){return i.id;}trackByGroup(n,i){return i.groupedBy;}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-account-statements-grid"]],inputs:{groupedRows:[1,"groupedRows"],totalCount:[1,"totalCount"],currentPage:[1,"currentPage"]},decls:4,vars:2,consts:[[3,"totalCount","currentPage"],[1,"account-statement-grid-row"],[1,"icon-col"],[3,"icon"],[1,"file-name-col"],[1,"icon-col",3,"href"]],template:function(i,s){i&1&&(a(0,"simpled-grouped-table"),se(1,Xg,6,4,"simpled-grouped-table-rowgroup",null,s.trackByGroup,!0),r(),M(3,"simpled-data-table-pagination",0)),i&2&&(l(),ae(s.groupedRows()),l(2),C("totalCount",s.totalCount())("currentPage",s.currentPage()));},dependencies:[Ua,Ml,Al,Ga,Le,Da,Rs],styles:[".account-statement-grid-row[_ngcontent-%COMP%]{padding:15px 10px}.icon-col[_ngcontent-%COMP%]{flex:0 0 30px;min-width:30px;color:#6b8199;text-align:center;font-size:20px}.file-name-col[_ngcontent-%COMP%]{flex:1 1 auto;padding:0 8px;word-break:break-all}simpled-grouped-table-row[_ngcontent-%COMP%]:hover{background-color:inherit}"],changeDetection:0});let e=t;return e;})();var md=(()=>{let t=class t{constructor(){this.store=m(B),this.angulartics2=m(ga),this.cardService=m(ja),this.analyticsCategory=qe(void 0),this.issuerIds=qe([]),this.cardIdsParam$=this.store.pipe(re(pi)),this.typeahead$=new gt(),this.resetFilterItems$=new gt(),this.loading$=new lt(!1),this.minTermLength=2;}ngOnInit(){this.defaultItem$=this.cardIdsParam$.pipe(Z(1),Ne(s=>s.length>0?this.cardService.getCards({cardIds:s}):Se([])),F(s=>this.mapCardsToFilterItems(s)?.[0]));let n=this.typeahead$.pipe(ss(),Gt(()=>this.loading$.next(!0)),rs(400),ai(this.store.select(sa(this.issuerIds()))),Ne(([s,_])=>s?this.cardService.getCardsForGrid({pageSize:30,pageNumber:0,searchBy:s,ledgerGroupIds:_.map(S=>S.id)}).pipe(F(S=>S.items),Te(()=>Se([]))):Se([])),F(s=>this.mapCardsToFilterItems(s)),Gt(()=>this.loading$.next(!1))),i=this.resetFilterItems$.pipe(F(()=>[]));this.filterItems$=si(i,n);}filterChange(n){this.store.dispatch(new Vs(n?[n.id]:void 0));let i=this.analyticsCategory();i&&this.angulartics2.eventTrack.next({action:"card-filter-typeahead",properties:{category:i}});}onSearch(n){n.length<this.minTermLength&&this.resetFilterItems$.next();}mapCardsToFilterItems(n){return n.map(i=>({id:i.id,name:ra.formatCardPublicToken(i.publicToken)}));}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-card-filter-typeahead"]],inputs:{analyticsCategory:[1,"analyticsCategory"],issuerIds:[1,"issuerIds"]},decls:4,vars:12,consts:()=>{let n;n="Any card";let i;return i="Enter public token",[["placeholder",n,"typeToSearchText",i,3,"filterChange","filterSearch","model","values","bindValue","typeahead","isLoading","minTermLength"]];},template:function(i,s){i&1&&(a(0,"simpled-select-filter",0),I(1,"async"),I(2,"async"),I(3,"async"),u("filterChange",function(S){return s.filterChange(S);})("filterSearch",function(S){return s.onSearch(S.term);}
1),r()),i&2&&C("model",L(1,6,s.defaultItem$))("values",L(2,8,s.filterItems$))("bindValue",void 0)("typeahead",s.typeahead$)("isLoading",L(3,10,s.loading$))("minTermLength",s.minTermLength);},dependencies:[Vi,W],encapsulation:2,changeDetection:0});let e=t;return e;})();var ud=y(Gs,pi,Us,(e,t,o)=>({pageNumber:e,cardIds:t,searchBy:o}));var{selectEntities:Bg,selectAll:pd}=Zo.getSelectors(oi),T4=y(Bg,e=>e),gd=y(pd,e=>e),fd=y(oi,e=>e.totalCount),Nd=y(pd,e=>e.length>0),E4=y(oi,e=>e.loading),Ad=y(oi,e=>e.loaded);var kg=e=>[e];function zg(e,t){e&1&&(a(0,"span"),c(1,1),r());}function jg(e,t){if(e&1&&(M(0,"simpled-account-statements-grid",15),I(1,"async"),I(2,"async"),I(3,"async")),e&2){let o=d(2);C("groupedRows",L(1,3,o.accountStatements$))("currentPage",L(2,5,o.currentPage$))("totalCount",L(3,7,o.totalCount$));}}function qg(e,t){e&1&&M(0,"simpled-no-results",16);}function Yg(e,t){if(e&1&&(T(0,jg,4,9,"simpled-account-statements-grid",15),I(1,"async"),nt(2,qg,1,0,"simpled-no-results",16)),e&2){let o=d();E(L(1,1,o.hasAnyAccountStatement$)?0:2);}}var Md=(()=>{let t=class t{constructor(){this.store=m(B),this.groupService=m(Ol),this.destroyRef=m(cs),this.accountStatements$=this.store.pipe(re(gd),F(n=>this.groupService.groupBy(n,i=>{let s=hn(i.statementDate);return mi.fromObject({year:s.year,month:s.month,day:1}).toISO();}))),this.totalCount$=this.store.select(fd),this.currentPage$=this.store.select(Ds),this.isLoaded$=this.store.select(Ad),this.hasAnyAccountStatement$=this.store.select(Nd),this.filters$=this.store.select(ud),this.IssuersId=yt;}ngOnInit(){this.filters$.pipe(Ci(this.destroyRef),F(n=>g({pageNumber:0},n))).subscribe(n=>{this.store.dispatch(un({requestParameters:{pageNumber:n.pageNumber,cardIds:n.cardIds,searchBy:n.searchBy,pageSize:30}}));});}onSearchChanged(n){this.store.dispatch(new ws(n));}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-download-statements"]],decls:21,vars:10,consts:()=>{let n;n="Search by file name";let i;i="Download statements";let s;return s="Company settings",[i,s,[3,"backButtonActive"],[4,"toolbar-title"],[1,"container-fluid","customer-settings-menu"],[1,"row"],[1,"col-md-3"],[1,"col-md-9"],[1,"download-statements-settings-section"],[1,"download-statements-page-title"],[1,"download-statements-settings-body"],[1,"col-md-12"],["search-slot","","placeholder",n,1,"card-list-filter-item","search-by-filter",3,"filterChange","value"],["filters-slot",""],[1,"filter-item","me-0",3,"issuerIds"],[3,"groupedRows","currentPage","totalCount"],[1,"no-border"]];},template:function(i,s){i&1&&(a(0,"simpled-toolbar",2),O(1,zg,2,0,"span",3),r(),a(2,"div",4)(3,"div",5)(4,"div",6),M(5,"simpled-settings-menu"),r(),a(6,"div",7)(7,"div",8)(8,"h4",9),c(9,0),r(),a(10,"div",10)(11,"div",5)(12,"div",11)(13,"simpled-filterbar")(14,"simpled-search-filter",12),I(15,"async"),u("filterChange",function(S){return s.onSearchChanged(S);}),r(),a(16,"simpled-filters-container",13),M(17,"simpled-card-filter-typeahead",14),r()()(),a(18,"div",11),T(19,Yg,3,3),I(20,"async"),r()()()()()()()),i&2&&(C("backButtonActive",!0),l(14),C("value",L(15,4,s.filters$).searchBy),l(3),C("issuerIds",Ot(8,kg,s.IssuersId.ADYEN)),l(2),E(L(20,6,s.isLoaded$)?19:-1));},dependencies:[te,ee,ne,Xa,ut,Va,Xi,wa,md,Ed,Bi,W],styles:[".download-statements-page-title[_ngcontent-%COMP%]{font-family:Montserrat;font-weight:600;font-size:21px;line-height:32px;color:#012842;margin-bottom:32px}"],changeDetection:0});let e=t;return e;})();function Jg(e,t){e&1&&(a(0,"span"),c(1,4),r());}function Hg(e,t){if(e&1){let o=h();w(0),a(1,"button",22),I(2,"async"),u("click",function(){N(o);let i=d();return A(i.saveGlobalLedgerSettings());}),w(3)(4),c(5,5),V()(),r(),V();}if(e&2){let o=d();l(),C("disabled",L(2,1,o.loaded$)===!1);}}function Kg(e,t){e&1&&(a(0,"p",21),c(1,6),r());}var Od=(()=>{let t=class t{constructor(){this.store=m(B),this.form=new bt({suspenseLedger:new Ue("",[_e.maxLength(30)])}),this.loaded$=this.store.select(tr),this.globalLedgerSettings$=this.store.select(ri);}ngOnInit(){this.loaded$.pipe($e(n=>n),ht(()=>this.globalLedgerSettings$),Z(1)).subscribe(n=>{let i=n.find(s=>s.ledgerType===vt.BANK_PAYMENTS_SUSPENSE);this.form.setValue({suspenseLedger:i?.globalLedger??""});});}
1saveGlobalLedgerSettings(){this.form.invalid||this.globalLedgerSettings$.pipe(Z(1)).subscribe(n=>{let i=[...n.filter(s=>s.ledgerType!==vt.BANK_PAYMENTS_SUSPENSE),{globalLedger:this.form.value.suspenseLedger??"",ledgerType:vt.BANK_PAYMENTS_SUSPENSE}];this.store.dispatch(ji({globalLedgerSettings:i}));});}};t.ɵfac=function(i){return new(i||t)();},t.ɵcmp=D({type:t,selectors:[["simpled-bank-payment-suspense-ledger"]],decls:23,vars:5,consts:()=>{let n;n="Default suspense ledger for bank payments when creating new accounts";let i;i="The value you set here will be used to prefill \"Bank payments suspense ledger\" upon new account creation.";let s;s="Changing this value will not affect relevant (re)generated reports. The new value will only be used for pre-filling when a new account is created.";let _;_="Default suspense ledger for bank payments";let S;S="Company settings";let p;p="Save";let P;return P="Suspense ledger must be at most 30 characters long",[n,i,s,_,S,p,P,[3,"backButtonActive"],[4,"toolbar-title"],[4,"toolbar-actions"],[1,"container-fluid","customer-settings-menu"],[1,"row"],[1,"col-md-3"],[1,"col-md-9"],[1,"container-fluid"],[1,"simpled-h3"],[1,"col-12","col-md-6"],[1,"form-group",3,"formGroup"],[1,"mb-3"],["for","suspense-settings-default-ledger",1,"form-label"],["id","suspense-settings-default-ledger","formControlName","suspenseLedger","type","text",1,"form-control","form-control-legacy"],[1,"help-block"],[1,"simpled-button","primary","toolbar-button",3,"click","disabled"]];},template:function(i,s){i&1&&(a(0,"simpled-toolbar",7),O(1,Jg,2,0,"span",8)(2,Hg,6,3,"ng-container",9),r(),a(3,"div",10)(4,"div",11)(5,"div",12),M(6,"simpled-settings-menu"),r(),a(7,"div",13)(8,"div",14)(9,"h2",15),c(10,0),r(),a(11,"p"),c(12,1),r(),a(13,"p"),c(14,2),r(),a(15,"div",11)(16,"div",16)(17,"form",17)(18,"div",18)(19,"label",19),c(20,3),r(),M(21,"input",20),T(22,Kg,2,0,"p",21),r()()()()()()()()),i&2&&(C("backButtonActive",!0),l(17),C("formGroup",s.form),l(),H("form-group-invalid",s.form.controls.suspenseLedger.invalid),l(4),E(s.form.controls.suspenseLedger!=null&&s.form.controls.suspenseLedger.hasError("maxlength")?22:-1));},dependencies:[te,ee,Pe,Q,ne,ue,Oe,Ie,me,Me,Ke,St,W],styles:[".form-group[_ngcontent-%COMP%]   .form-control[_ngcontent-%COMP%]{height:38px;border-radius:0;border:1px solid #cccccc;color:#555;font-size:14px;line-height:1.42857143;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-group[_ngcontent-%COMP%]   .form-control[_ngcontent-%COMP%]:disabled{cursor:not-allowed}.form-group[_ngcontent-%COMP%]   .form-text[_ngcontent-%COMP%]{color:#777}.form-group-invalid[_ngcontent-%COMP%]   .form-control[_ngcontent-%COMP%]{border-color:#f76f6b;box-shadow:inset 0 1px 1px #00000014;color:#f76f6b}.form-group-invalid[_ngcontent-%COMP%]   .form-control[_ngcontent-%COMP%]:focus{box-shadow:inset 0 1px 1px #00000014,0 0 6px #ce8483}.form-group-invalid[_ngcontent-%COMP%]   .help-block[_ngcontent-%COMP%]{color:#fff;background-color:#f76f6b;border-radius:0 0 5px 5px}"],changeDetection:0});let e=t;return e;})();var Wr=(e,t)=>{m(B).dispatch(Fl());};var Qr=()=>{m(B).dispatch(Ca());};var Rd=[{path:"",pathMatch:"full",component:ed,canActivate:[bc]},{path:"master-account",component:Nc,canActivate:[be],data:{allowedForRole:[de.MASTER_CASHMANAGER]},resolve:[Sr,Vc,Il]},{path:"card-overview",component:Kc,canActivate:[be],data:{allowedForRole:[de.ADMINISTRATOR]},resolve:[yl,Sr]},{path:"legal-entities",component:uc,canActivate:[be,we],data:{allowedForRole:[de.MASTER_ADMINISTRATOR],allowedWhenFeatureActive:[z.MULTIPLE_COMPANIES]}},{path:"download-receipts",component:Fc,canActivate:[be,we],data:{allowedForRole:[de.MASTER_ACCOUNTANT],allowedWhenFeatureActive:[z.EXPENSE_MANAGEMENT]}},{path:"card-settings",component:Qc,canActivate:[be],data:{allowedForRole:[de.MASTER_ADMINISTRATOR]},resolve:[$l]},{path:"global-ledger",component:Zc,canActivate:[be,we],data:{allowedForRole:[de.MASTER_ADMINISTRATOR],allowedWhenFeatureActive:[z.REIMBURSEMENT]},resolve:[Wr]},{path:"approval-settings",component:Jc,canActivate:[be],data:{allowedForRole:[de.MASTER_ADMINISTRATOR]},children:[{path:"",pathMatch:"full",redirectTo:"approval-stages"},{path:"approval-stages",component:Yc,resolve:[ki],canActivate:[we],data:{allowedWhenFeatureActive:[z.ADVANCED_APPROVAL_JUSTIFICATIONS]}},{path:"multiple-eyes",component:Hc,resolve:[Qr,ki],canActivate:[we],data:{allowedWhenFeatureActive:[z.ADVANCED_APPROVAL_JUSTIFICATIONS]}}
1,{path:"self-approval",component:Pc,canActivate:[we],data:{allowedWhenFeatureActive:[z.EXPENSE_JUSTIFICATION_PREVENT_SELF_REVIEW]}}]},{path:"approval-settings/default-assignees",component:qc,resolve:[Qr,ki,yc],canActivate:[be,we],data:{allowedForRole:[de.MASTER_ADMINISTRATOR],allowedWhenFeatureActive:[z.ADVANCED_APPROVAL_JUSTIFICATIONS]}},{path:"justification-rules",component:lc,resolve:[$a],canActivate:[be,we],data:{allowedForRole:[de.MASTER_ADMINISTRATOR,de.MASTER_CASHMANAGER],allowedWhenFeatureActive:[z.JUSTIFICATION_CONFIGURATOR]}},{path:"financial",children:[{path:"vats",component:Td,resolve:[Yr],canActivate:[be,we],data:{allowedForRole:[de.MASTER_ADMINISTRATOR,de.MASTER_CASHMANAGER],allowedWhenFeatureActive:[z.EXPENSE_MANAGEMENT]}},{path:"cost-centers",component:B_,resolve:[$c],canActivate:[be],data:{allowedForRole:[de.MASTER_ADMINISTRATOR,de.MASTER_CASHMANAGER]}},{path:"cost-types",component:H_,resolve:[qr],canActivate:[be,we],data:{allowedForRole:[de.MASTER_ADMINISTRATOR,de.MASTER_CASHMANAGER],allowedWhenFeatureActive:[z.EXPENSE_MANAGEMENT]}},{path:"projects",component:sd,resolve:[wc],canActivate:[be,we],data:{allowedForRole:[de.MASTER_ADMINISTRATOR,de.MASTER_CASHMANAGER],allowedWhenFeatureActive:[z.PROJECTS]}},{path:"cost-units",component:nc,resolve:[Gc],canActivate:[be,we],data:{allowedForRole:[de.MASTER_ADMINISTRATOR,de.MASTER_CASHMANAGER],allowedWhenFeatureActive:[z.COST_UNITS]}},{path:"clients",component:$_,resolve:[xc],canActivate:[be,we],data:{allowedForRole:[de.MASTER_ADMINISTRATOR,de.MASTER_CASHMANAGER],allowedWhenFeatureActive:[z.CLIENT_FUNDS]}},{path:"prefilling",component:Ic,resolve:[Uc,Yr,qr],canActivate:[be,we],data:{allowedForRole:[de.MASTER_ADMINISTRATOR,de.MASTER_CASHMANAGER],allowedWhenFeatureActive:[z.PREFILLING]}},{path:"bank-payment-suspense-ledger",component:Od,resolve:[Wr],canActivate:[be,we],data:{allowedForRole:[de.MASTER_ADMINISTRATOR],allowedWhenFeatureActive:[z.REIMBURSEMENT_PAYOUT]}}]},{path:"integrations",children:[{path:"afas",resolve:{afasStatus:vc},component:I_,canActivate:[be,we],data:{allowedForRole:[de.MASTER_ADMINISTRATOR],allowedWhenFeatureActive:[z.EXPORT_AFAS]}},{path:"emailxpenc",component:ic,canActivate:[be,we],data:{allowedForRole:[de.MASTER_ADMINISTRATOR],allowedWhenFeatureActive:[z.EXPORT_EMAILXPENC]}},{path:"exact-globe",component:ac,canActivate:[be,we],resolve:{exactGlobeStatus:Dc},data:{allowedForRole:[de.MASTER_ADMINISTRATOR],allowedWhenFeatureActive:[z.EXPORT_EXACT_GLOBE]}},{path:"exact-online",component:Br,canActivate:[be,we],data:{allowedForRole:[de.MASTER_ADMINISTRATOR],allowedWhenFeatureActive:[z.EXPORT_EXACT_ONLINE],exactOnlineKey:"exactOnline"}},{path:"exact-online-be",component:Br,canActivate:[be,we],data:{allowedForRole:[de.MASTER_ADMINISTRATOR],allowedWhenFeatureActive:[z.EXPORT_EXACT_ONLINE_BE],exactOnlineKey:"exactOnlineBe"}},{path:"twinfield",component:hc,canActivate:[be,we],data:{allowedForRole:[de.MASTER_ADMINISTRATOR],allowedWhenFeatureActive:[z.EXPORT_TWINFIELD]}},{path:"business-central",component:L_,canActivate:[be,we],data:{allowedForRole:[de.MASTER_ADMINISTRATOR],allowedWhenFeatureActive:[z.EXPORT_BUSINESS_CENTRAL]}},{path:"odoo",component:Ac,canActivate:[be,we],data:{allowedForRole:[de.MASTER_ADMINISTRATOR],allowedWhenFeatureActive:[z.EXPORT_ODOO]}},{path:"open-banking",component:Mc,canActivate:[be],data:{allowedForRole:[de.MASTER_ADMINISTRATOR]}}]},{path:"download-statements",component:Md,canActivate:[be,we],data:{allowedForRole:[de.MASTER_ACCOUNTANT],allowedWhenFeatureActive:[z.ADYEN_BANKING]}}];var Z5=(()=>{let t=class t{};t.ɵfac=function(i){return new(i||t)();},t.ɵmod=Ss({type:t}),t.ɵinj=ls({providers:[p_(),A_(),Rl(),Ll(),bl(),Gl(),Pl(),za(),Ya(),Ul(),ka()],imports:[Fs.forChild(Rd)]});let e=t;return e;})();export{Z5 as CustomerSettingsModule};/**i18n:d26ce5dd71a124c87447f53010ad67246cc416145e338c06a2b48f77f6f864ba*/

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.