PageSourceSearch

https://www.myspacesworks.com/63.c82602b73e86e4bc.js

js myspacesworks.com collected 2026-10-02 00:01:29 UTC 685,454 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkPantheon_Web=self.webpackChunkPantheon_Web||[]).push([[63],{26592:(lt,O,e)=>{e.d(O,{V:()=>f,a:()=>h});var t=e(54438),n=e(60177),d=e(82341),s=e(59640),_=e(23372);const f=C=>(T,m,I)=>{const[y,...o]=I.url.split("?"),P=y.split("/"),[N,...a]=C.join("/").split("?"),M=N.split("/");for(const R of M)switch(R){case".":break;case"..":P.pop();break;default:P.push(R)}return[P.join("/"),[o.join("?"),a.join("?")].filter(R=>!!R).join("&")].filter(R=>!!R).join("?")},h=(C,T)=>{const m=(0,t.WQX)(t.Agw);return(0,n.Vy)(m)?((0,t.WQX)(s.il).dispatch((0,_.Is)()),!0):((C,T)=>(0,d.f8)(C,T))(C,T)}},71962:(lt,O,e)=>{e.d(O,{$:()=>d});var t=e(54438),n=e(21626);let d=(()=>{class s{constructor(f){this.httpClient=f}getAccountKeyContacts(){return this.httpClient.get("accounts/my/keyContacts")}updateCentreKeyContacts(f){return this.httpClient.put("accounts/my/keyContacts",JSON.stringify(f))}updateAccountKeyContacts(f){return this.httpClient.put("accounts/my/keyContacts/default",JSON.stringify(f))}static{this.\u0275fac=function(g){return new(g||s)(t.KVO(n.Qq))}}static{this.\u0275prov=t.jDH({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})()},15079:(lt,O,e)=>{e.d(O,{V:()=>t,l:()=>n});var t=function(d){return d.assign="assign",d.reassign="reassign",d.unassign="unassign",d.markLost="markLost",d}(t||{}),n=function(d){return d.active="active",d.pendingActivation="pendingActivation",d.inactive="inactive",d.pendingDeactivation="pendingDeactivation",d.activationFailed="activationFailed",d.deactivationFailed="deactivationFailed",d.lost="lost",d.damaged="damaged",d}(n||{})},77223:(lt,O,e)=>{e.d(O,{u:()=>I});var t=e(84572),n=e(7673),d=e(5964),s=e(96354),_=e(59640),f=e(70715);const g=(0,_.Mz)(f.J,y=>y.accessCardFeature),h=(0,_.Mz)(g,({isActive:y})=>!!y),C=(0,_.Mz)(g,({isLoaded:y})=>y);var T=e(63373),m=e(54438);let I=(()=>{class y{get isAccessCardFeatureEnabled(){return this.store$.dispatch((0,T.Zj)()),(0,t.z)([this.store$.select(h),this.store$.select(C)]).pipe((0,d.p)(([,P])=>P),(0,s.T)(([P])=>P))}constructor(P){this.store$=P}static isVisible(P){try{return P.get(y).isAccessCardFeatureEnabled}catch(N){return console.log(N),(0,n.of)(!1)}}static{this.\u0275fac=function(N){return new(N||y)(m.KVO(_.il))}}static{this.\u0275prov=m.jDH({token:y,factory:y.\u0275fac,providedIn:"root"})}}return y})()},66649:(lt,O,e)=>{e.d(O,{H:()=>d});var t=e(25766),n=e(99832);const d=s=>!(s.renewalOptionId===t.T.NonRenewing||s.renewalOptionId===t.T.NotTiedToMembershipBooking&&s.isExpired||s.renewalOptionId===t.T.AutoRenewing&&s.endSaleTypeId===n.G.Termination||s.renewalOptionId===t.T.AutoRenewing&&s.isExpired)},41668:(lt,O,e)=>{e.d(O,{$m:()=>t.$m,Uk:()=>t.Uk,VS:()=>n.VS,a$:()=>t.a$,c9:()=>t.c9,d5:()=>t.d5,jH:()=>t.jH,kp:()=>t.kp,o3:()=>t.o3,vf:()=>t.vf,y3:()=>t.y3});var t=e(96552),n=e(56352)},921:(lt,O,e)=>{e.d(O,{Nc:()=>d,R6:()=>g,fs:()=>C,ix:()=>s,kR:()=>f,lH:()=>_,lh:()=>h});var t=e(59640),n=e(2117);const d=(0,t.Mz)(n.Z,T=>T.memberships.membershipsFilterOptions||{page:1,pageSize:10,results:[],sortBy:null,sortDirection:"asc",totalCount:0,totalPages:1}),s=(0,t.Mz)(n.Z,T=>T.memberships.currentMembershipsPage),_=(0,t.Mz)(n.Z,({memberships:{membershipsFacets:T}})=>T),f=(0,t.Mz)(n.Z,T=>T.memberships.isLoading),g=(0,t.Mz)(n.Z,T=>T.memberships.displayMyMembershipsOnly),h=(0,t.Mz)(n.Z,T=>T.memberships.membershipEligibility),C=(0,t.Mz)(n.Z,T=>T.memberships.memberships)},89907:(lt,O,e)=>{e.d(O,{s:()=>t});var t=function(n){return n.FullROR="fullROR",n.PartialROR="partialROR",n.AmendBankDetailsForFullROR="amendBankDetailsForFullROR",n.AmendBankDetailsForPartialROR="amendBankDetailsForPartialROR",n}(t||{})},34853:(lt,O,e)=>{e.d(O,{J:()=>n});const n=(0,e(59640).VP)("[Add Payment method] Cancel add payment method")},51752:(lt,O,e)=>{e.d(O,{AL:()=>n.AL,BR:()=>g.BR,BX:()=>s.BX,CA:()=>d.CA,D3:()=>g.D3,DJ:()=>s.DJ,EB:()=>s.EB,ER:()=>s.ER,F6:()=>d.F6,Fw:()=>d.Fw,HY:()=>s.HY,Hb:()=>t.Hb,Hf:()=>s.Hf,I$:()=>t.I$,IH:()=>t.IH,Iv:()=>s.Iv,Ix:()=>s.Ix,JA:()=>f.J,JF:()=>d.JF,KP:()=>s.KP,M3:()=>_.M3,Ms:()=>g.Ms,NI:()=>s.NI,NZ:()=>s.NZ,O8:()=>d.O8,OP:()=>d.OP,Op:()=>d.Op,Or:()=>s.Or,Pz:()=>s.Pz,Q$:()=>s.Q$,Q7:()=>n.xK,QZ:()=>s.QZ,Ql:()=>g.Ql,Qz:()=>g.Qz,S:()=>s.S,Sz:()=>_.Sz,W6:()=>d.W6,WK:()=>d.WK,WM:()=>s.WM,WP:()=>s.WP,Wb:()=>s.Wb,Xq:()=>s.Xq,Y4:()=>s.Y4,Yr:()=>_.F6,aG:()=>g.aG,a_:()=>t.a_,bE:()=>s.bE,bR:()=>s.bR,di:()=>n.di,eA:()=>s.eA,el:()=>d.el,eo:()=>s.eo,fW:()=>s.fW,ft:()=>d.ft,hZ:()=>s.hZ,iI:()=>d.iI,im:()=>s.im,kG:()=>d.kG,nc:()=>d.nc,nd:()=>t.nd,ne:()=>d.ne,pc:()=>s.pc,pg:()=>d.pg,qi:()=>d.qi,qk:()=>d.qk,qr:()=>d.qr,rL:()=>d.rL,rb:()=>s.rb,rw:()=>n.rw,rx:()=>n.rx,so:()=>d.so,tp:()=>t.tp,vm:()=>d.vm,vn:()=>s.vn,w8:()=>_.w8,xA:()=>s.xA,xH:()=>d.xH,xK:()=>s.xK,xS:()=>s.xS,xt:()=>_.xt});var t=e(85055),n=e(63739),d=e(70692),s=e(7807),_=e(57325),f=e(34853),g=e(65383)},52369:(lt,O,e)=>{e.d(O,{D:()=>n});const n=(0,e(59640).UX)("billingPayment")},94222:(lt,O,e)=>{e.d(O,{e:()=>Te});var t=e(59640),n=e(85055);const s=(0,t.vy)({transactionSummary:[],loading:!1},(0,t.on)(n.I$,(E,{transactionSummary:F})=>({...E,transactionSummary:F,loading:!1})),(0,t.on)(n.a_,E=>({...E,loading:!0})),(0,t.on)(n.tp,E=>({transactionSummary:null,loading:!1})));var f=e(63739);const h=(0,t.vy)({canDeactivate:!0,loading:!1,centrePreferences:[],layouts:null,deliveryMethods:null,splitGroups:null},(0,t.on)(f.AL,function T(E){return{...E,expanded:null,loading:!0}}),(0,t.on)(f.DU,function m(E,{centrePreferences:F,layouts:L,deliveryMethods:ft,splitGroups:K}){return{...E,loading:!1,centrePreferences:F,layouts:L,deliveryMethods:ft,splitGroups:K}}),(0,t.on)(f.XP,function I(E){return{...E,loading:!1}}),(0,t.on)(f.xK,function y(E,{canDeactivate:F}){return{...E,canDeactivate:F}}),(0,t.on)(f.rw,function o(E,{centreIndex:F,invoicePreferencesIndex:L,preferences:ft}){return a(E,{centreIndex:F,invoicePreferencesIndex:L,preferences:ft,loading:!0})}),(0,t.on)(f.ir,function P(E,{centreIndex:F,invoicePreferencesIndex:L,preferences:ft}){return a(E,{centreIndex:F,invoicePreferencesIndex:L,preferences:ft,loading:!1})}),(0,t.on)(f.qb,function N(E,{centreIndex:F,invoicePreferencesIndex:L,preferences:ft}){return a(E,{centreIndex:F,invoicePreferencesIndex:L,preferences:ft,loading:!1})}),(0,t.on)(f.rx,function G(E,{centreIndex:F}){return{...E,expanded:{centreIndex:F,invoicePreferencesIndex:null}}}),(0,t.on)(f.di,function k(E,{invoicePreferencesIndex:F}){return{...E,expanded:{...E.expanded,invoicePreferencesIndex:F??E.expanded?.invoicePreferencesIndex}}}));function a(E,{centreIndex:F,invoicePreferencesIndex:L,preferences:ft,loading:K}){const Tt=E.centrePreferences[F];return{...E,centrePreferences:M(E.centrePreferences,{...Tt,invoicePreferences:M(Tt.invoicePreferences,{...ft,invoiceFrequencyVisibility:Tt.invoicePreferences[L].invoiceFrequencyVisibility,loading:K},L)},F)}}function M(E,F,L){return[...E.slice(0,L),F,...E.slice(L+1)]}var R=e(14144),J=e(41613);const et={centreTransactions:[],selectedTransactions:[],totalBalance:0,selectedCentres:[],loaded:!0,filteredChargeFrom:[],paidCentreNumbers:[],paidInvoiceNumbers:[],activeFilter:R.G2,expandedCentres:[],hasMoreRecords:!1,centreTransactionSummaries:null,centreTransactionSummariesLoaded:!0,transactionTypeDownloadState:{[J.D.Statement]:{},[J.D.Invoice]:{},[J.D.TaxDetails]:{}}};var st=e(70692),Et=e(65383),dt=e(60928);const Nt=(0,t.vy)(et,(0,t.on)(st.qi,st.xH,E=>({...E,loaded:!1,hasMoreRecords:!1})),(0,t.on)(st.qr,(E,{transactionResponse:F})=>({...E,centreTransactions:F.results,selectedTransactions:[],totalBalance:[...E.selectedCentres].reduce((L,ft)=>L+ft.prices[0].amount,0),loaded:!0,hasMoreRecords:F.results.length!==F.totalCount})),(0,t.on)(st.so,(E,{transactionResponse:F})=>({...E,centreTransactions:[...E.centreTransactions,...F.results],loaded:!0,hasMoreRecords:F.totalCount!==[...E.centreTransactions,...F.results].length,activeFilter:{...E.activeFilter,page:E.activeFilter?E.activeFilter.page+1:1}}
1)),(0,t.on)(st.ne,E=>({...E,loaded:!0,selectedTransactions:[],totalBalance:0})),(0,t.on)(st.Fw,(E,{centre:F})=>({...E,selectedCentres:[...E.selectedCentres,F],selectedTransactions:[],totalBalance:[...E.selectedCentres,F].reduce((L,ft)=>L+ft.prices[0].amount,0)})),(0,t.on)(st.el,(E,{centreNumber:F})=>({...E,selectedCentres:E.selectedCentres.filter(L=>(0,dt.V)(L.centreNumbers)!==F.toString()),selectedTransactions:[],totalBalance:E.selectedCentres.filter(L=>(0,dt.V)(L.centreNumbers)!==F.toString()).reduce((L,ft)=>L+ft.prices[0].amount,0)})),(0,t.on)(st.WK,(E,{invoice:F})=>({...E,selectedCentres:[],selectedTransactions:[...E.selectedTransactions,F],totalBalance:[...E.selectedTransactions,F].reduce((L,ft)=>L+ft.remainingBalance.amount,0)})),(0,t.on)(st.nc,(E,{centreNumbers:F})=>({...E,expandedCentres:F})),(0,t.on)(st.pg,(E,{invoice:F})=>({...E,selectedCentres:[],selectedTransactions:E.selectedTransactions.filter(L=>L.id!==F.id),totalBalance:E.selectedTransactions.filter(L=>L.id!==F.id).reduce((L,ft)=>L+ft.remainingBalance.amount,0)}
1)),(0,t.on)(st.qk,(E,{invoice:F})=>({...E,selectedCentres:[],selectedTransactions:[F],totalBalance:F.remainingBalance?.amount})),(0,t.on)(st.OX,(E,{chargeFromValue:F})=>({...E,filteredChargeFrom:F})),(0,t.on)(st.CA,E=>({...E,centreTransactions:[],selectedCentres:[],selectedTransactions:[],totalBalance:0,activeFilter:R.G2})),(0,t.on)(st.F6,st.W6,(E,{invoiceId:F,transactionType:L,reportFormatType:ft})=>({...E,transactionTypeDownloadState:{...E.transactionTypeDownloadState,[L]:{...E.transactionTypeDownloadState[L],[F]:{...E.transactionTypeDownloadState[L][F],[ft]:{isDownloading:!0}}}}})),(0,t.on)(st.rL,(E,{request:F})=>({...E,transactionTypeDownloadState:{...E.transactionTypeDownloadState,[F.transactionType]:{...E.transactionTypeDownloadState[F.transactionType],[F.centreNumbers[0]]:{...E.transactionTypeDownloadState[F.transactionType][F.centreNumbers[0]],[F.reportFormatType]:{isDownloading:!0}}}}})),(0,t.on)(st.JF,st.OP,(E,{transactionType:F,transactionTypeId:L,reportFormatType:ft})=>({...E,transactionTypeDownloadState:{...E.transactionTypeDownloadState,[F]:{...E.transactionTypeDownloadState[F],[L]:{...E.transactionTypeDownloadState[F][L],[ft]:{isDownloading:!1}}}}})),(0,t.on)(st.qi,(E,{filter:F})=>({...E,activeFilter:{...F,page:1}})),(0,t.on)(st.Op,(E,{paidInvoiceNumbers:F})=>({...E,paidInvoiceNumbers:E.paidInvoiceNumbers.concat(F)})),(0,t.on)(st.O8,(E,{centreNumbers:F})=>({...E,paidCentreNumbers:E.paidCentreNumbers.concat(F)})),(0,t.on)(st.vm,(E,{data:F})=>({...E,centreTransactionSummaries:F,centreTransactionSummariesLoaded:!0})),(0,t.on)(st.ft,(E,{filter:F})=>({...E,centreTransactionSummariesLoaded:!1,activeFilter:{...F,page:1},centreTransactions:[]})),(0,t.on)(st.kG,E=>({...E,centreTransactionSummariesLoaded:!0})),(0,t.on)(Et.QY,(E,{data:F})=>({...E,centreTransactions:F})));var mt=e(85196),Pt=e(7807),l=e(77702);const $={isSaving:!1,invoices:[],centreBalances:[],context:null,loaded:!0,loading:!1,paymentRequestId:null,transactionDetails:null,cashierPayment:null,isPayBalanceFlowCompleted:!1};var Z=e(53952);const ot=(0,t.vy)($,(0,t.on)(Pt.xA,E=>({...$})),(0,t.on)(Pt.hZ,Pt.xS,(E,{paymentInfo:F})=>({...E,isSaving:F.paymentMethodType!==Z.eq.addNewPaymentMethod})),(0,t.on)(Pt.XV,Pt.Hf,Pt.NT,Pt.Iv,mt.O6,Pt.S,E=>({...E,isSaving:!1})),(0,t.on)(Pt.Y4,(E,{invoices:F})=>({...E,invoices:F,loaded:!0})),(0,t.on)(Pt.QZ,(E,{balances:F})=>({...E,centreBalances:F,loaded:!0})),(0,t.on)(Pt.Pz,Pt.BX,E=>({...E,loaded:!0})),(0,t.on)(Pt.bR,Pt.Xq,E=>({...E,loaded:!1})),(0,t.on)(Pt.eo,(E,{payType:F,countryIsoCode:L,paymentInfo:ft})=>({...E,context:{payType:F,countryIsoCode:L,paymentInfo:ft}})),(0,t.on)(Pt.PT,E=>({...E,context:null})),(0,t.on)(Pt.X4,E=>({...E,loaded:!0,isSaving:!1})),(0,t.on)(Pt.DJ,(E,{paymentRequestId:F})=>({...E,paymentRequestId:F})),(0,t.on)(l.S,Pt.S,(E,{transactionDetails:F})=>({...E,transactionDetails:F,loading:!1})),(0,t.on)(Pt.xK,Pt.Q$,E=>({...E,loading:!1})),(0,t.on)(Pt.NI,Pt.pc,E=>({...E,loading:!0})),(0,t.on)(Pt.im,(E,{context:F})=>({...E,loading:!0,context:F,cashierPayment:null})),(0,t.on)(Pt.WP,(E,{cashierPayment:F})=>({...E,cashierPayment:F,loading:!1,paymentRequestId:F.transactionId})),(0,t.on)(Pt.bE,E=>({...E,loading:!1})),(0,t.on)(Pt.Or,(E,{isCompleted:F=!1})=>({...E,isPayBalanceFlowCompleted:F})));var U=e(57325),gt=e(15623),_t=e(89907),ct=e(86734);const pt=(0,t.vy)(gt.t,(0,t.on)(U._i,(E,{hasDepositBalances:F})=>({...E,hasDepositBalances:F})),(0,t.on)(U.ef,(E,{country:F,location:L})=>function xt(E,F,L){const ft={...E};return E.countryFilter!==F&&(ft.countryFilter=F),E.locationFilter!==L&&(ft.locationFilter=L),ft.filteredDepositBalances=F?E.allDepositBalances.filter(K=>K.isoCodeThreeLetter===F):E.allDepositBalances,L&&(ft.filteredDepositBalances=ft.filteredDepositBalances.map(K=>({name:K.name,isoCodeThreeLetter:K.isoCodeThreeLetter,depositBalanceLocations:K.depositBalanceLocations.filter(Tt=>Tt.number===L)})).filter(K=>K.depositBalanceLocations.length>0)),ft}(E,F,L)),(0,t.on)(U.e,(E,{balances:F})=>function it(E,F){const L={...E};return F=function q(E){return E.map(F=>({...F,depositBalanceLocations:F.depositBalanceLocations.map(L=>({...L,eligibleAction:nt(L)}))}))}(F),L.allDepositBalances=F,L.filteredDepositBalances=F,L.countryList=F.map(ft=>({id:ft.isoCodeThreeLetter,name:ft.name})),L.locationList=[],F.forEach(ft=>{L.locationList.push(...ft.depositBalanceLocations.map(K=>({id:K.number,name:K.name})))}),L.isLoading=!1,L}(E,F)),(0,t.on)(U.WZ,E=>({...E,isLoading:!0})),(0,t.on)(U.Dx,E=>({...E,bankAccountDetailsLoading:!0})),(0,t.on)(U.Yz,(E,{bankAccounts:F})=>({...E,bankAccountDetailsLoading:!1,bankAccounts:F,retainerFlowType:Dt(F,E)})),(0,t.on)(U.PZ,E=>({...E,bankAccountDetailsLoading:!1,retainerFlowType:gt.N.addBankAccountDetails})),(0,t.on)(U.xt,E=>({...E,bankAccountDetailsLoading:!0})),(0,t.on)(U.uP,(E,{id:F})=>{const L=E.bankAccounts.filter(ft=>ft.id!==F);return{...E,bankAccountDetailsLoading:!1,bankAccounts:L,retainerFlowType:Dt(L,E)}}),(0,t.on)(U.d5,E=>({...E,bankAccountDetailsLoading:!1})),(0,t.on)(U.w8,(E,{bankAccountDetails:F})=>({...E,selectedBankAccountDetails:F})),(0,t.on)(U.M3,(E,{retainerFlowType:F})=>({...E,retainerFlowType:F})),(0,t.on)(ct.RE,(E,{retainerRequest:F})=>({...E,selectedRetainerRequest:F})),(0,t.on)(U.Se,E=>function oe(E){const F={...E};return F.filteredDepositBalances=E.allDepositBalances,F.countryList=E.allDepositBalances.map(L=>({id:L.isoCodeThreeLetter,name:L.name}
1)),F.locationList=[],E.allDepositBalances.forEach(L=>{F.locationList.push(...L.depositBalanceLocations.map(ft=>({id:ft.number,name:ft.name})))}),F.countryFilter=null,F.locationFilter=null,F}(E)),(0,t.on)(U.lN,E=>({...E,selectedRetainerRequest:gt.t.selectedRetainerRequest,retainerConfiguration:gt.t.retainerConfiguration,retainerRequestBodyData:gt.t.retainerRequestBodyData,retainerFormValid:gt.t.retainerFormValid,currencies:gt.t.currencies,selectedBankAccountDetails:gt.t.selectedBankAccountDetails,bankAccounts:gt.t.bankAccounts})),(0,t.on)(U.jf,E=>({...E,isLoadingConfiguration:!0})),(0,t.on)(U.Ib,(E,{retainerConfiguration:F})=>({...E,retainerConfiguration:F,isLoadingConfiguration:!1})),(0,t.on)(U.Bi,E=>({...E,isLoadingConfiguration:!1})),(0,t.on)(U.FP,(E,{canDeactivate:F})=>({...E,canDeactivate:F})),(0,t.on)(U._w,E=>({...E,isLoadingConfiguration:!0})),(0,t.on)(U.zm,(E,{currencies:F})=>({...E,isLoadingConfiguration:!1,currencies:F})),(0,t.on)(U.an,E=>({...E,isLoadingConfiguration:!1})),(0,t.on)(U.S9,E=>({...E,submitRequestInProgress:!0})),(0,t.on)(U.$H,E=>({...E,submitRequestInProgress:!1})),(0,t.on)(U.em,E=>({...E,submitRequestInProgress:!1})),(0,t.on)(U.x9,E=>({...E,submitBankRequestInProgress:!0})),(0,t.on)(U.cQ,E=>({...E,submitBankRequestInProgress:!1})),(0,t.on)(U.ni,E=>({...E,submitBankRequestInProgress:!1})),(0,t.on)(U.Sz,(E,{retainerFormData:F,retainerFormValid:L})=>({...E,retainerRequestBodyData:F,retainerFormValid:L})));function nt(E){return E.hasPartialRetainer||E.hasRetainer||E.lastReturnOfRetainerRequest?E.lastReturnOfRetainerRequest?.createDate?E.lastReturnOfRetainerRequest.isPartial?E.hasRetainer?_t.s.FullROR:_t.s.AmendBankDetailsForPartialROR:_t.s.AmendBankDetailsForFullROR:E.hasRetainer?_t.s.FullROR:_t.s.PartialROR:null}function Dt(E,F){return E?.length&&F.selectedRetainerRequest.isNewRequest?gt.N.fromBankAccountDetails:gt.N.addBankAccountDetails}var v=e(14399);const ue=(0,t.vy)({osaResponse:null,osaResponseInProgress:!1},(0,t.on)(v.Dq,E=>({...E,osaResponseInProgress:!0})),(0,t.on)(v.q5,(E,{osaResponse:F})=>({...E,osaResponse:F,osaResponseInProgress:!1})),(0,t.on)(v.zA,E=>({...E,osaResponseInProgress:!1}))),bt=(0,t.vy)({transactionSummary:[],loading:!1,isUploading:!1,canDeactivate:!1},(0,t.on)(Et.BR,(E,{transactionSummary:F})=>({...E,transactionSummary:F,loading:!1})),(0,t.on)(Et.D3,E=>({...E,loading:!0})),(0,t.on)(Et.Ql,E=>({transactionSummary:null,loading:!1,isUploading:!1,canDeactivate:!1})),(0,t.on)(Et.Ms,(E,{canDeactivate:F})=>({...E,canDeactivate:F})),(0,t.on)(Et.aG,E=>({...E,isUploading:!0})),(0,t.on)(Et.ne,E=>({...E,isUploading:!1})),(0,t.on)(Et.aP,E=>({...E,isUploading:!1})),(0,t.on)(Et.QY,E=>({...E,loading:!1})),(0,t.on)(Et.Qz,E=>({...E,loading:!0})),(0,t.on)(Et.Ly,E=>({...E,loading:!1}))),Te={invoicePreferences:function C(E,F){return h(E,F)},transactions:function _(E,F){return s(E,F)},centreTransactions:function V(E,F){return Nt(E,F)},depositBalances:function x(E,F){return pt(E,F)},payBalance:function D(E,F){return ot(E,F)},osa:ue,financialDocumentation:function Ft(E,F){return bt(E,F)}}},44469:(lt,O,e)=>{e.d(O,{$n:()=>d.$n,G_:()=>t.G_,Gu:()=>t.Gu,Kl:()=>d.Kl,Og:()=>t.Og,Qg:()=>s.Qg,Uc:()=>t.Uc,Wo:()=>t.Wo,Xh:()=>n.Xh,Y3:()=>n.Y3,gP:()=>n.gP,mJ:()=>n.mJ,nN:()=>d.G_,vq:()=>d.vq});var t=e(83994),n=e(89722),d=e(24188),s=e(10194)},70692:(lt,O,e)=>{e.d(O,{CA:()=>I,F6:()=>y,Fw:()=>f,JF:()=>P,O8:()=>R,OP:()=>N,OX:()=>m,Op:()=>J,W6:()=>a,WK:()=>h,el:()=>g,ft:()=>H,iI:()=>M,kG:()=>st,nc:()=>d,ne:()=>_,pg:()=>T,qi:()=>n,qk:()=>C,qr:()=>s,rL:()=>o,so:()=>k,vm:()=>et,xH:()=>G});var t=e(59640);const n=(0,t.VP)("[Billing Payment] Load Centre Transactions Request",(0,t.xk)()),d=(0,t.VP)("[Billing Payment] Expand Centre",(0,t.xk)()),s=(0,t.VP)("[Billing Payment] Load Centre Transactions Success",(0,t.xk)()),_=(0,t.VP)("[Billing Payment] Load Centre Transactions Failure",(0,t.xk)()),f=(0,t.VP)("[Billing Payment] Select Centre For Payment",(0,t.xk)()),g=(0,t.VP)("[Billing Payment] Unselect Centre For Payment",(0,t.xk)()),h=(0,t.VP)("[Billing Payment] Select Invoice For Payment",(0,t.xk)()),C=(0,t.VP)("[Billing Payment] Select Single Invoice For Payment",(0,t.xk)()),T=(0,t.VP)("[Billing Payment] Unselect Invoice For Payment",(0,t.xk)()),m=(0,t.VP)("[Billing Payment] Filter Charge From Updated",(0,t.xk)()),I=(0,t.VP)("[Billing Payment] Re
1set Centre Payment State"),y=(0,t.VP)("[Billing Payment] Download Centre Invoice",(0,t.xk)()),o=(0,t.VP)("[Billing Payment] Download Account Statement",(0,t.xk)()),P=(0,t.VP)("[Billing Payment] Tax/Invoice File Download Failure",(0,t.xk)()),N=(0,t.VP)("[Billing Payment] File Download Success",(0,t.xk)()),a=(0,t.VP)("[Billing Payment] Download Tax Details",(0,t.xk)()),M=(0,t.VP)("[Billing Payment] File Download To Client Success"),G=(0,t.VP)("[Billing Payment] Load Next Page"),k=(0,t.VP)("[Billing Payment] Load Next Page Success",(0,t.xk)()),R=(0,t.VP)("[Billing Payment] Set Paid Centre Numbers",(0,t.xk)()),J=(0,t.VP)("[Billing Payment] Set Paid Invoice Numbers",(0,t.xk)()),H=(0,t.VP)("[Billing Payment] Load Centre Transaction Summary Request",(0,t.xk)()),et=(0,t.VP)("[Billing Payment] Load Centre Transaction Summary Success",(0,t.xk)()),st=(0,t.VP)("[Billing Payment] Load Centre Transaction Summary Failure",(0,t.xk)())},14144:(lt,O,e)=>{e.d(O,{G2:()=>_,G5:()=>d,cm:()=>f,i8:()=>s,rT:()=>n,t2:()=>g});var t=e(43318),n=function(h){return h.ProofOfPayment="proofOfPayment",h.WithholdingTaxCertificate="withholdingTaxCertificate",h}(n||{}),d=function(h){return h.IDR="IDR",h.ICR="ICR",h.PDR="PDR",h.PPY="PPY",h.BAD="BAD",h.PRC="PRC",h.NONE="NONE",h.D01="D01",h.D02="D02",h.D03="D03",h.D04="D04",h.D05="D05",h.D06="D06",h.D07="D07",h.D08="D08",h.D09="D09",h.D10="D10",h.D11="D11",h}(d||{}),s=function(h){return h.Unknown="unknown",h.Unpaid="unpaid",h.PartiallyPaid="partiallyPaid",h.Paid="paid",h}(s||{});const _={page:1,pageSize:10,fromDate:(0,t.Hs)(6),toDate:(new Date).toDateString(),transactionTypes:[],centreNumbers:[],paymentStatuses:[],searchText:null},f=[{key:s.Unknown,id:0,name:"COMMON.BLANKS"},{key:s.Paid,id:3,name:"BILLINGPAYMENT.INVOICESTRANSACTIONS.CENTRETRX.STATUS_PAID"},{key:s.PartiallyPaid,id:2,name:"BILLINGPAYMENT.INVOICESTRANSACTIONS.CENTRETRX.STATUS_PARTIALLYPAID"},{key:s.Unpaid,id:1,name:"BILLINGPAYMENT.INVOICESTRANSACTIONS.CENTRETRX.STATUS_UNPAID"}],g=[{id:"PDR",name:"BILLINGPAYMENT.INVOICESTRANSACTIONS.CENTRETRX.TYPE_PDR"},{id:"BAD",name:"BILLINGPAYMENT.INVOICESTRANSACTIONS.CENTRETRX.TYPE_BAD"},{id:"ICR",name:"BILLINGPAYMENT.INVOICESTRANSACTIONS.CENTRETRX.TYPE_ICR"},{id:"IDR",name:"BILLINGPAYMENT.INVOICESTRANSACTIONS.CENTRETRX.TYPE_IDR"},{id:"PPY",name:"BILLINGPAYMENT.INVOICESTRANSACTIONS.CENTRETRX.TYPE_PPY"},{id:"PRC",name:"BILLINGPAYMENT.INVOICESTRANSACTIONS.CENTRETRX.TYPE_PRC"},{id:"D01",name:"BILLINGPAYMENT.INVOICESTRANSACTIONS.CENTRETRX.TYPE_D01"},{id:"D02",name:"BILLINGPAYMENT.INVOICESTRANSACTIONS.CENTRETRX.TYPE_D02"},{id:"D03",name:"BILLINGPAYMENT.INVOICESTRANSACTIONS.CENTRETRX.TYPE_D03"},{id:"D04",name:"BILLINGPAYMENT.INVOICESTRANSACTIONS.CENTRETRX.TYPE_D04"},{id:"D05",name:"BILLINGPAYMENT.INVOICESTRANSACTIONS.CENTRETRX.TYPE_D05"},{id:"D06",name:"BILLINGPAYMENT.INVOICESTRANSACTIONS.CENTRETRX.TYPE_D06"},{id:"D07",name:"BILLINGPAYMENT.INVOICESTRANSACTIONS.CENTRETRX.TYPE_D07"},{id:"D08",name:"BILLINGPAYMENT.INVOICESTRANSACTIONS.CENTRETRX.TYPE_D08"},{id:"D09",name:"BILLINGPAYMENT.INVOICESTRANSACTIONS.CENTRETRX.TYPE_D09"},{id:"D10",name:"BILLINGPAYMENT.INVOICESTRANSACTIONS.CENTRETRX.TYPE_D10"},{id:"D11",name:"BILLINGPAYMENT.INVOICESTRANSACTIONS.CENTRETRX.TYPE_D11"}]},57325:(lt,O,e)=>{e.d(O,{$H:()=>H,Bi:()=>a,Dx:()=>_,F6:()=>n,FP:()=>o,Ib:()=>N,M3:()=>C,PZ:()=>g,S9:()=>J,Se:()=>I,Sz:()=>Pt,Tl:()=>y,WZ:()=>s,Yz:()=>f,_i:()=>d,_w:()=>M,an:()=>k,cQ:()=>Et,d5:()=>mt,e:()=>T,ef:()=>m,em:()=>et,jf:()=>P,lN:()=>R,ni:()=>dt,uP:()=>V,w8:()=>h,x9:()=>st,xt:()=>Nt,zm:()=>G});var t=e(59640);const n=(0,t.VP)("[Billing Payment - Deposit Balances] Find Has Deposit Balances"),d=(0,t.VP)("[Billing Payment - Deposit Balances] Set Has Deposit Balances",(0,t.xk)()),s=(0,t.VP)("[Billing Payment - Deposit Balances] Get Deposit Balances"),_=(0,t.VP)("[Billing Payment - Deposit Balances] Get Bank Accounts"),f=(0,t.VP)("[Billing Payment - Deposit Balances] Get Bank Accounts Success",(0,t.xk)()),g=(0,t.VP)("[Billing Payment - Deposit Balances] Get Bank Accounts Failure"),h=(0,t.VP)("[Billing Payment - Deposit Balances] Store Selected Bank Account Details",(0,t.xk)()),C=(0,t.VP)("[Billing Payment - Deposit Balances] Store Retainer Flow Type",(0,t.xk)()),T=(0,t.VP)("[Billing Payment - Deposit Balances] Get Deposit Balances Success",(0,t.xk)()),m=(0,t.VP)("[Billing Payment - Deposit Balances] Filter Deposit Balances",(0,t.xk)()),I=(0,t.VP)("[Billing Payment - Deposit Balances] Clear Filter"),y=(0,t.VP)("[Billing Payment - Deposit Balances] Navigate back"),o=(0,t.VP)("[Billing Payment - Deposit Balances] Set can deactivate",(0,t.xk)()),P=(0,t.VP)("[Billing Payment - Deposit Balances] Get Retainer Configuration",(0,t.xk)()),N=(0,t.VP)("[Billing Payment - Deposit Balances] Get Retainer Configuration Success",(0,t.xk)()),a=(0,t.VP)("[Billing Payment - Deposit Balances] Get Retainer Configuration Failure"),M=(0,t.VP)("[Billing Payment - Deposit Balances] Get Currencies"),G=(0,t.VP)("[Billing Payment - Deposit Balances] Get Currencies Success",(0,t.xk)()),k=(0,t.VP)("[Billing Payment - Deposit Balances] Get Currencies Failure"),R=(0,t.VP)("[Billing Payment - Deposit Balances] Clear Retainer Form State"),J=(0,t.VP)("[Billing Payment - Deposit Balances] Make A Retainer Request",(0,t.xk)()),H=(0,t.VP)("[Billing Payment - Deposit Balances] Make A Retainer Request Success"),et=(0,t.VP)("[Billing Payment - Deposit Balances] Make A Retainer Request Failure"),st=(0,t.VP)("[Billing Payment - Deposit Balances] Make A Retainer Request With Bank Account Details",(0,t.xk)()),Et=(0,t.VP)("[Billing Payment - Deposit Balances] Make A Retainer Request With Bank Account Details Success"),dt=(0,t.VP)("[Billing Payment - Deposit Balances] Make A Retainer Request With Bank Account Details Failure"),Nt=(0,t.VP)("[Billing Payment - Deposit Balances] Delete Bank Account Details",(0,t.xk)()),V=(0,t.VP)("[Billing Payment - Deposit Balances] Delete Bank Account Details Success",(0,t.xk)()),mt=(0,t.VP)("[Billing Payment - Deposit Balances] Delete Bank Account Details Failure"),Pt=(0,t.VP)("[Billing Payment - Deposit Balances] Store Retainer Form Data",(0,t.xk)())},24188:(lt,O,e)=>{e.d(O,{$n:()=>o,Ac:()=>a,BW:()=>g,G_:()=>f,Kl:()=>_,Li:()=>T,VY:()=>y,Zv:()=>I,fT:()=>C,fh:()=>G,g6:()=>m,gi:()=>k,iF:()=>R,jT:()=>N,km:()=>h,nh:()=>d,pz:()=>J,vq:()=>P,wC:()=>M});var t=e(59640),n=e(52369);const d=(0,t.Mz)(n.D,H=>H.depositBalances.filteredDepositBalances),_=((0,t.Mz)(n.D,H=>H.depositBalances.selectedRetainerRequest),(0,t.Mz)(n.D,H=>H.depositBalances.bankAccounts)),f=(0,t.Mz)(n.D,H=>H.depositBalances.selectedBankAccountDetails),g=(0,t.Mz)(n.D,H=>H.depositBalances.bankAccountDetailsLoading),h=(0,t.Mz)(n.D,H=>H.depositBalances.retainerFlowType),C=(0,t.Mz)(n.D,H=>H.depositBalances.isLoading),T=(0,t.Mz)(n.D,H=>H.depositBalances.countryList),m=(0,t.Mz)(n.D,H=>H.depositBalances.locationList),I=(0,t.Mz)(n.D,H=>H.depositBalances.isLoadingConfiguration),y=(0,t.Mz)(n.D,H=>H.depositBalances.retainerConfiguration),o=(0,t.Mz)(n.D,H=>H.depositBalances.hasDepositBalances),P=(0,t.Mz)(n.D,H=>H.depositBalances.selectedRetainerRequest),N=(0,t.Mz)(n.D,H=>H.depositBalances.canDeactivate),a=(0,t.Mz)(n.D,H=>H.depositBalances.currencies),M=(0,t.Mz)(n.D,H=>H.depositBalances.submitRequestInProgress),G=(0,t.Mz)(n.D,H=>H.depositBalances.submitBankRequestInProgress),k=(0,t.Mz)(n.D,H=>H.depositBalances.retainerRequestBodyData),R=(0,t.Mz)(n.D,H=>H.depositBalances.retainerFormValid),J=(0,t.Mz)(n.D,H=>H.depositBalances.locationList.find(et=>et.id===H.depositBalances.selectedRetainerRequest?.centreNumber)?.name)},15623:(lt,O,e)=>{e.d(O,{N:()=>t,t:()=>n});var t=function(d){return d[d.fromBankAccountDetails=0]="fromBankAccountDetails",d[d.addBankAccountDetails=1]="addBankAccountDetails",d}(t||{});const n={hasDepositBalances:!1,allDepositBalances:[],filteredDepositBalances:[],countryList:[],locationList:[],countryFilter:null,locationFilter:null,isLoading:!1,selectedRetainerRequest:null,isLoadingConfiguration:!1,retainerConfiguration:null,canDeactivate:!0,currencies:null,
1submitRequestInProgress:!1,submitBankRequestInProgress:!1,retainerRequestBodyData:null,retainerFormValid:!1,retainerFlowType:t.addBankAccountDetails,bankAccounts:[],selectedBankAccountDetails:null,bankAccountDetailsLoading:!1}},65383:(lt,O,e)=>{e.d(O,{BR:()=>n,D3:()=>s,Ly:()=>I,Ms:()=>C,QY:()=>m,Ql:()=>d,Qz:()=>T,aG:()=>f,aP:()=>_,ne:()=>g});var t=e(59640);const n=(0,t.VP)("[Billing Payment] Load TransactionCountryCentre Success",(0,t.xk)()),d=(0,t.VP)("[Billing Payment] Load TransactionCountryCentre Failure"),s=(0,t.VP)("[Billing Payment] Load TransactionCountryCentre"),_=(0,t.VP)("[Billing Payment] Upload FinancialDocumentation Success",(0,t.xk)()),f=(0,t.VP)("[Billing Payment] Upload FinancialDocumentation",(0,t.xk)()),g=(0,t.VP)("[Billing Payment] Upload FinancialDocumentation Failure"),C=((0,t.VP)("[Billing Payment - Financial Documentation] Show successful notification"),(0,t.VP)("[Billing Payment] Set can deactivate",(0,t.xk)())),T=(0,t.VP)("[Billing Payment] Get Centre Transaction Summary Request",(0,t.xk)()),m=(0,t.VP)("[Billing Payment] Get Centre Transaction Success",(0,t.xk)()),I=(0,t.VP)("[Billing Payment] Get Centre Transaction Summary Failure");(0,t.VP)("[Billing Payment] ModalResult Financial Documentation",(0,t.xk)())},10194:(lt,O,e)=>{e.d(O,{EV:()=>d,O_:()=>_,Qg:()=>h,YG:()=>f,_d:()=>g,zh:()=>s});var t=e(59640),n=e(52369);const d=(0,t.Mz)(n.D,C=>C.financialDocumentation.transactionSummary),s=(0,t.Mz)(n.D,C=>C.financialDocumentation.loading),_=({isoCodeThreeLetter:C})=>(0,t.Mz)(n.D,T=>T.financialDocumentation?.transactionSummary?.find(m=>m.countryIsoCode===C)?.transactionSummaries),f=(0,t.Mz)(n.D,C=>C.financialDocumentation.isUploading),g=(0,t.Mz)(n.D,C=>C.financialDocumentation.canDeactivate),h=({transactionReference:C})=>(0,t.Mz)(n.D,T=>T.centreTransactions.centreTransactions.find(m=>m.transactionReference===C))},63739:(lt,O,e)=>{e.d(O,{AL:()=>n,DU:()=>d,XP:()=>s,di:()=>T,ir:()=>f,qb:()=>g,rw:()=>_,rx:()=>C,xK:()=>h});var t=e(59640);const n=(0,t.VP)("[InvoicePreferences] Init Invoice Preferences"),d=(0,t.VP)("[InvoicePreferences] Init Invoice Preferences Success",(0,t.xk)()),s=(0,t.VP)("[InvoicePreferences] Init Invoice Preferences Failed"),_=(0,t.VP)("[InvoicePreferences] Save Invoice Preferences",(0,t.xk)()),f=(0,t.VP)("[InvoicePreferences] Save Invoice Preferences Success",(0,t.xk)()),g=(0,t.VP)("[InvoicePreferences] Save Invoice Preferences Failed",(0,t.xk)()),h=(0,t.VP)("[InvoicePreferences] Set Can Deactivate",(0,t.xk)()),C=(0,t.VP)("[InvoicePreferences] Set Centre Expanded",(0,t.xk)()),T=(0,t.VP)("[InvoicePreferences] Set Invoice Preferences Expanded",(0,t.xk)())},14399:(lt,O,e)=>{e.d(O,{Dq:()=>n,I1:()=>h,TX:()=>C,Uq:()=>g,Vn:()=>T,Vt:()=>f,Zu:()=>_,q5:()=>s,zA:()=>d});var t=e(59640);const n=(0,t.VP)("[Osa] Get OSA response",(0,t.xk)()),d=(0,t.VP)("[Osa] Get OSA response - Failure"),s=(0,t.VP)("[Osa] Get OSA response - Success",(0,t.xk)()),_=(0,t.VP)("[OSA] Set password request",(0,t.xk)()),f=(0,t.VP)("[OSA] Set password success",(0,t.xk)()),g=(0,t.VP)("[OSA] Set password failure"),h=(0,t.VP)("[OSA] Complete OSA payment onboarding"),C=(0,t.VP)("[OSA] Start OSA payment onboarding"),T=(0,t.VP)("[OSA] Start OSA login")},7807:(lt,O,e)=>{e.d(O,{BX:()=>I,DJ:()=>Et,EB:()=>J,ER:()=>Z,HY:()=>dt,Hf:()=>g,Iv:()=>h,Ix:()=>l,KP:()=>$,NI:()=>Nt,NT:()=>f,NZ:()=>R,Or:()=>pt,PT:()=>et,Pz:()=>P,Q$:()=>D,QZ:()=>o,S:()=>V,WM:()=>ct,WP:()=>gt,Wb:()=>M,X4:()=>st,XV:()=>d,Xq:()=>T,Y4:()=>m,bE:()=>_t,bR:()=>y,eA:()=>k,eo:()=>a,fW:()=>Pt,hZ:()=>n,im:()=>U,pc:()=>ot,rb:()=>H,vn:()=>G,xA:()=>s,xK:()=>mt,xS:()=>_});var t=e(59640);const n=(0,t.VP)("[Billing Payment] Pay Centre Balance Request",(0,t.xk)()),d=(0,t.VP)("[Billing Payment] Pay Centre Balance Sucess"),s=(0,t.VP)("[Billing Payment] Clean Pay Invoice State"),_=(0,t.VP)("[Billing Payment] Pay Invoice Request",(0,t.xk)()),f=(0,t.VP)("[Billing Payment] Pay Invoice Sucess"),g=(0,t.VP)("[Billing Payment] Payment Failure",(0,t.xk)()),h=(0,t.VP)("[Billing Payment] paymentFailureWithCode",(0,t.xk)()),T=((0,t.VP)("[Billing Payment] Toggle Add Payment Page",(0,t.xk)()),(0,t.VP)("[Billing Payment] Get Invoices Info",(0,t.xk)())),m=(0,t.VP)("[Billing Payment] Get Invoices Info Success",(0,t.xk)()),I=(0,t.VP)("[Billing Payment] Get Invoices Info Failure",(0,t.xk)()),y=(0,t.VP)("[Billing Payment] Get Centre Balances",(0,t.xk)()),o=(0,t.VP)("[Billing Payment] Get Centre Balances Success",(0,t.xk)()),P=(0,t.VP)("[Billing Payment] Get Centre Balances Failure",(0,t.xk)()),a=((0,t.VP)("[Billing Payment] Update Total Balance",(0,t.xk)()),(0,t.VP)("[Billing Payment] Set pay balance context",(0,t.xk)())),M=(0,t.VP)("[Billing Payment] payBalanceSuccess",(0,t.xk)()),G=(0,t.VP)("[Billing Payment] payBalanceWithNewCard",(0,t.xk)()),k=(0,t.VP)("[Billing Payment] payBalanceRequest",(0,t.xk)()),R=(0,t.VP)("[Billing Payment] payBalanceHcc",(0,t.xk)()),J=(0,t.VP)("[Billing Payment] payBalanceAddCard",(0,t.xk)()),H=(0,t.VP)("[Billing Payment] payBalanceLegacyAddCard",(0,t.xk)()),et=(0,t.VP)("[Billing Payment] Re
1set pay balance context"),st=(0,t.VP)("[Billing Payment] Reset loader flag"),Et=(0,t.VP)("[Billing Payment] setPaymentRequestId",(0,t.xk)()),dt=(0,t.VP)("[Billing Payment] cancelPayment"),Nt=(0,t.VP)("[Billing Payment] getTransactionDetails",(0,t.xk)()),V=(0,t.VP)("[Billing Payment] getTransactionDetailsSuccess",(0,t.xk)()),mt=(0,t.VP)("[Billing Payment] getTransactionDetailsFailure"),Pt=(0,t.VP)("[Billing Payment] cancelPaymentFailure"),l=(0,t.VP)("[Billing Payment] getHccSetupOptionsForInvoice",(0,t.xk)()),$=(0,t.VP)("[Billing Payment] payBalanceWithContext",(0,t.xk)()),Z=(0,t.VP)("[Billing Payment] checkCardBillingAddress",(0,t.xk)()),ot=(0,t.VP)("[Billing Payment] payBalanceTransactionDetails",(0,t.xk)()),D=(0,t.VP)("[Billing Payment] payBalanceTransactionDetailsLoaded"),U=(0,t.VP)("[Billing Payment] Pay Balance Worldline Request",(0,t.xk)()),gt=(0,t.VP)("[Billing Payment] Pay Balance Worldline Success",(0,t.xk)()),_t=(0,t.VP)("[Billing Payment] Pay Balance Worldline Failure"),ct=(0,t.VP)("[Billing Payment] Submit Pay Balance For Worldline",(0,t.xk)()),pt=(0,t.VP)("[Billing Payment] Set Is Pay Balance Flow Completed",(0,t.xk)())},85952:(lt,O,e)=>{e.d(O,{HW:()=>n,Re:()=>d,Uf:()=>s}),e(4091);var n=function(_){return _.success="success",_.rejectedByBank="rejectedByBank",_.currentlyUnable="currentlyUnable",_.wrongPaymentMethod="wrongPaymentMethod",_}(n||{}),d=function(_){return _[_.Invoice=0]="Invoice",_[_.Centre=1]="Centre",_}(d||{}),s=function(_){return _.noResult="noResult",_.success="success",_.failure="failure",_.pending="pending",_}(s||{})},89722:(lt,O,e)=>{e.d(O,{Fw:()=>y,Xh:()=>h,Y3:()=>m,c5:()=>_,gP:()=>I,mJ:()=>C,ts:()=>g,u3:()=>f,uz:()=>s});var t=e(59640),n=e(52369);const d=(0,t.Mz)(n.D,o=>o.payBalance),s=(0,t.Mz)(d,o=>o.isSaving),_=(0,t.Mz)(d,o=>o.invoices),f=(0,t.Mz)(d,o=>o.centreBalances),g=(0,t.Mz)(d,o=>o.loaded),h=(0,t.Mz)(d,o=>o.context),C=(0,t.Mz)(d,o=>o.paymentRequestId),m=((0,t.Mz)(d,o=>o.transactionDetails),(0,t.Mz)(d,o=>o.loading)),I=(0,t.Mz)(d,o=>o.cashierPayment),y=(0,t.Mz)(d,o=>o.isPayBalanceFlowCompleted)},85055:(lt,O,e)=>{e.d(O,{Hb:()=>_,I$:()=>n,IH:()=>f,a_:()=>s,nd:()=>g,tp:()=>d});var t=e(59640);const n=(0,t.VP)("[Billing Payment] Load TransactionSummary Success",(0,t.xk)()),d=(0,t.VP)("[Billing Payment] Load TransactionSummary Failure",(0,t.xk)()),s=(0,t.VP)("[Billing Payment] Load TransactionSummary"),_=(0,t.VP)("[Billing Payment] Check Outstanding Invoice"),f=(0,t.VP)("[Billing Payment] Check Outstanding Invoice Success",(0,t.xk)()),g=(0,t.VP)("[Billing Payment] Check Outstanding Invoice Fail")},60928:(lt,O,e)=>{function t(n){return 1===n.length?n[0].toString():n.length>1?n.join(","):null}e.d(O,{V:()=>t})},83994:(lt,O,e)=>{e.d(O,{G_:()=>f,Gu:()=>g,Og:()=>d,Uc:()=>s,Wo:()=>_});var t=e(59640),n=e(52369);const d=(0,t.Mz)(n.D,h=>h.transactions.transactionSummary),s=(0,t.Mz)(n.D,h=>h.transactions.loading),_=({isoCodeThreeLetter:h})=>(0,t.Mz)(n.D,C=>C.transactions?.transactionSummary?.find(T=>T.countryIsoCode===h)?.transactionSummaries),f=({isoCodeThreeLetter:h})=>(0,t.Mz)(n.D,C=>C.transactions?.transactionSummary?.find(T=>T.countryIsoCode===h)?.legalProcessNotEnabled),g=({isoCodeThreeLetter:h})=>(0,t.Mz)(n.D,C=>C.transactions?.transactionSummary?.find(T=>T.countryIsoCode===h)?.prices[0].amount)},78085:(lt,O,e)=>{e.r(O),e.d(O,{BusinessSavingsModule:()=>de});var t=e(60177),n=e(69924),d=e(68018),s=e(77339),_=e(59640),f=e(89417),g=e(64199),h=e(4705),C=e(10467),T=e(54438),m=e(21413),I=e(96354),y=e(56977),o=e(5964),P=e(96697),N=e(54843),a=e(3950),M=e(17730),G=e(49610),k=e(91379),R=e(52052),J=e(35822),H=e(60156),et=e(57833),st=e(35155),Et=e(76864);function dt(vt,Jt){1&vt&&T.nrm(0,"iwg-breadcrumbs")}function Nt(vt,Jt){if(1&vt&&(T.nrm(0,"img",8),T.nI1(1,"async")),2&vt){let Gt;const wt=T.XpG(2);T.Y8G("src",null==(Gt=T.bMT(1,1,wt.businessSavings$))?null:Gt.businessSavingsLogo,T.B4B)}}function V(vt,Jt){if(1&vt&&(T.j41(0,"div",9),T.nrm(1,"img",11),T.nI1(2,"async"),T.j41(3,"span",12),T.EFF(4,"BUSINESS_SAVINGS.BUSINESS_SAVINGS_INFO"),T.k0s()()),2&vt){let Gt;const wt=T.XpG(2);T.R7$(),T.Y8G("src",null==(Gt=T.bMT(2,1,wt.businessSavings$))?null:Gt.iwgLogo,T.B4B)}}function mt(vt,Jt){if(1&vt&&(T.j41(0,"div",10),T.nrm(1,"img",11),T.nI1(2,"async"),T.k0s()),2&vt){let Gt;const wt=T.XpG(2);T.R7$(),T.Y8G("src",null==(Gt=T.bMT(2,1,wt.businessSavings$))?null:Gt.iwgLogo,T.B4B)}}function Pt(vt,Jt){if(1&vt&&(T.j41(0,"div",7),T.DNE(1,Nt,2,3,"img",8),T.nI1(2,"async"),T.DNE(3,V,5,3,"div",9),T.nI1(4,"async"),T.nI1(5,"async"),T.DNE(6,mt,3,3,"div",10),T.nI1(7,"async"),T.nI1(8,"async"),T.k0s()),2&vt){let Gt,wt,ee;const me=T.XpG();T.R7$(),T.vxM(null!=(Gt=T.bMT(2,3,me.businessSavings$))&&Gt.businessSavingsLogo?1:-1),T.R7$(2),T.vxM(!T.bMT(4,5,me.isMobile$)&&null!=(wt=T.bMT(5,7,me.businessSavings$))&&wt.iwgLogo?3:-1),T.R7$(3),T.vxM(T.bMT(7,9,me.isMobile$)&&null!=(ee=T.bMT(8,11,me.businessSavings$))&&ee.iwgLogo?6:-1)}}function l(vt,Jt){if(1&vt&&(T.j41(0,"iwg-loader",2),T.nrm(1,"div",13),T.k0s()),2&vt){const Gt=T.XpG();T.Y8G("loading",!Gt.builtFirstLoaded)}}function $(vt,Jt){1&vt&&(T.j41(0,"div",6)(1,"span",14),T.EFF(2,"BUSINESS_SAVINGS.TITLE"),T.k0s(),T.j41(3,"span",15),T.EFF(4,"BUSINESS_SAVINGS.NO_ACCESS"),T.k0s()())}let Z=(()=>{class vt{constructor(Gt,wt,ee,me,Me){this.store$=Gt,this.deviceService=wt,this.benefitsRestService=ee,this.externalScriptsLoaderService=me,this.platformId=Me,this.businessSavings$=this.store$.select(k.tH),this.unsubscribe$=new m.B,this.isLoading$=this.store$.select(k.QW),this.isMobile$=this.deviceService.isMobile$,this.canAccessBusinessSavings=!1,this.builtFirstLoaded=!1,this.messageListener=null,this.isInitializing=!1,this.builtFirstConfig=null,this.loadTimeout=null}
1ngOnInit(){this.store$.dispatch((0,a.Zz)({breadcrumbs:[{label:"MENU.OPTIONS.HOME",url:"/home"}]})),this.store$.dispatch((0,G.lw)()),this.store$.select(R.eH).pipe((0,I.T)(Gt=>({canAccessBusinessSavings:!!Gt?.contextOptions?.[M.M.CanAccessBusinessSavings]})),(0,y.Q)(this.unsubscribe$)).subscribe(Gt=>{this.canAccessBusinessSavings=Gt.canAccessBusinessSavings}),this.loadBuiltFirstEmbed()}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete(),this.cleanupBuiltFirstEmbed(),this.store$.dispatch((0,G.du)())}loadBuiltFirstEmbed(){var Gt=this;return(0,C.A)(function*(){(0,t.UE)(Gt.platformId)&&Gt.businessSavings$.pipe((0,o.p)(wt=>!!wt?.marketplaceUrl),(0,P.s)(1)).subscribe(function(){var wt=(0,C.A)(function*(ee){Gt.builtFirstConfig={marketplaceUrl:ee.marketplaceUrl,cid:ee.cid,collectionId:ee.collectionId,consentJwt:ee.consentJwt};const me=Gt.builtFirstConfig.marketplaceUrl;Gt.loadBuiltFirstScript().then(()=>{Gt.initializeBuiltFirstEmbed(me)}).catch(Me=>{console.error("Failed to load Builtfirst script:",Me)})});return function(ee){return wt.apply(this,arguments)}}())})()}loadBuiltFirstScript(){return new Promise((Gt,wt)=>{globalThis.Builtfirst?Gt():this.externalScriptsLoaderService.load(J.m[J.m.builtFirstEmbed]).then(()=>Gt()).catch(ee=>wt(ee))})}initializeBuiltFirstEmbed(Gt){var wt=this;return(0,C.A)(function*(){if(wt.isInitializing||wt.builtFirstLoaded)return;if(document.getElementById("builtfirst-container")?.querySelector("iframe"))return void(wt.builtFirstLoaded=!0);wt.isInitializing=!0;const me=globalThis.Builtfirst;if(!me?.embed)return void(wt.isInitializing=!1);if(!document.getElementById("builtfirst-container"))return wt.isInitializing=!1,void setTimeout(()=>wt.initializeBuiltFirstEmbed(Gt),100);const ye=wt.builtFirstConfig?.consentJwt,be=wt.builtFirstConfig?.cid||"",ve={baseUrl:Gt,containerId:"builtfirst-container",consentJwt:ye||void 0,onConsentConfirm:(Ct=(0,C.A)(function*(){const Kt=globalThis.__builtfirstJwtPromise;return Kt?{jwt:(yield Kt)||"",cid:be}:(globalThis.__builtfirstJwtPromise=wt.generateJwtToken().then(W=>W).catch(W=>(console.error("JWT generation error:",W),null)).finally(()=>{setTimeout(()=>{globalThis.__builtfirstJwtPromise=null},100)}),{jwt:(yield globalThis.__builtfirstJwtPromise)||"",cid:be})}),function(){return Ct.apply(this,arguments)})};var Ct;wt.builtFirstConfig?.collectionId&&(ve.collection_ids=[wt.builtFirstConfig.collectionId]),me.embed(ve),globalThis.__builtfirstInitialized=!0,wt.builtFirstLoaded=!0,wt.isInitializing=!1})()}generateJwtToken(){var Gt=this;return(0,C.A)(function*(){try{const wt=yield(0,N._)(Gt.benefitsRestService.generateAccessJwt());let ee=null;return"string"==typeof wt?ee=wt:wt&&"object"==typeof wt&&(ee=wt.jwt||wt.Jwt||wt.JWT||null),ee}catch(wt){return console.error("Failed to generate BuiltFirst JWT via API:",wt),null}})()}cleanupBuiltFirstEmbed(){if((0,t.UE)(this.platformId)){this.messageListener&&(window.removeEventListener("message",this.messageListener),this.messageListener=null),this.loadTimeout&&(clearTimeout(this.loadTimeout),this.loadTimeout=null);const Gt=document.getElementById("builtfirst-container");Gt&&(Gt.innerHTML=""),this.isInitializing=!1,this.builtFirstLoaded=!1,globalThis.__builtfirstJwtPromise=null,globalThis.__builtfirstInitialized=!1}}static{this.\u0275fac=function(wt){return new(wt||vt)(T.rXU(_.il),T.rXU(H.g),T.rXU(et.o),T.rXU(J.M),T.rXU(T.Agw))}}static{this.\u0275cmp=T.VBU({type:vt,selectors:[["iwg-business-savings-details"]],decls:12,vars:4,consts:[["headerBreadcrumbs",""],["headerTitle",""],[3,"loading"],[1,"page-header"],[1,"bottom-border-desktop"],[1,"container"],[1,"staff-container"],[1,"header-title-wrapper"],["alt","Business Savings",1,"business-savings-logo",3,"src"],[1,"brands-info"],[1,"brands-info","container"],["alt","Iwg",1,"iwg-logo",3,"src"],["translate","",1,"iwg-h5","business-savings-info"],["id","builtfirst-container",1,"builtfirst-container"],["translate","",1,"staff-title","iwg-h4-medium"],["translate","",1,"staff-desc","iwg-body1"]],template:function(wt,ee){1&wt&&(T.j41(0,"iwg-loader",2),T.nI1(1,"async"),T.j41(2,"div",3)(3,"iwg-page-header",4),T.DNE(4,dt,1,0,"ng-template",null,0,T.C5r)(6,Pt,9,13,"ng-template",null,1,T.C5r),T.k0s()(),T.j41(8,"div",5),T.DNE(9,l,2,1,"iwg-loader",2)(10,$,5,0,"div",6),T.k0s()(),T.nrm(11,"router-outlet")),2&wt&&(T.Y8G("loading",T.bMT(1,2,ee.isLoading$)),T.R7$(9),T.vxM(ee.canAccessBusinessSavings?9:10))},dependencies:[n.y,d.Mm,st.m,Et.V,h.n3,t.Jj],styles:[".builtfirst-container[_ngcontent-%COMP%]{width:100%;min-height:60rem;position:relative;overflow:hidden}.builtfirst-container[_ngcontent-%COMP%]   iframe[_ngcontent-%COMP%]{border:none;width:100%;display:block}@media (max-width: 767.98px){.builtfirst-container[_ngcontent-%COMP%]{min-height:40rem}}.iwg-logo[_ngcontent-%COMP%]{width:18rem}@media (max-width: 767.98px){.iwg-logo[_ngcontent-%COMP%]{width:12rem}}.header-title-wrapper[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;gap:2rem;width:100%}.brands-info[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:end}@media (max-width: 767.98px){.brands-info[_ngcontent-%COMP%]{margin-left:0;justify-content:start}}.business-savings-info[_ngcontent-%COMP%]{text-align:end;width:40rem;padding-right:3rem;font-size:var(--body2-font-size, 1.4rem)}@media (max-width: 767.98px){.business-savings-info[_ngcontent-%COMP%]{text-align:start;padding-right:0;padding-left:1rem;width:auto}}[dir=rtl]   [_nghost-%COMP%]   .business-savings-info[_ngcontent-%COMP%]{padding-right:0;padding-left:3rem}@media (max-width: 767.98px){[dir=rtl]   [_nghost-%COMP%]   .business-savings-info[_ngcontent-%COMP%]{text-align:start;padding-right:1rem;padding-left:0}}[dir=rtl][_ngcontent-%COMP%]   .business-savings-info[_ngcontent-%COMP%]{padding-right:0;padding-left:3rem}@media (max-width: 767.98px){[dir=rtl][_ngcontent-%COMP%]   .business-savings-info[_ngcontent-%COMP%]{text-align:start;padding-right:1rem;padding-left:0}}[dir=rtl][_nghost-%COMP%]   .business-savings-info[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .business-savings-info[_ngcontent-%COMP%]{padding-right:0;padding-left:3rem}@media (max-width: 767.98px){[dir=rtl][_nghost-%COMP%]   .business-savings-info[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .business-savings-info[_ngcontent-%COMP%]{text-align:start;padding-right:1rem;padding-left:0}}.staff-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:2.4rem;padding-top:8rem;padding-bottom:8rem}@media (max-width: 767.98px){.staff-container[_ngcontent-%COMP%]{padding-left:5%;padding-right:5%}}.staff-desc[_ngcontent-%COMP%]{max-width:50%;margin:auto;text-align:center}@media (max-width: 767.98px){.staff-desc[_ngcontent-%COMP%]{width:100%;max-width:unset}}"]})}}return vt})();var ot=e(34978),D=e(88141),U=e(25558),gt=e(7673),_t=e(86734),ct=e(23372),x=e(24153),it=e(26592);const q=[{path:"",component:Z,canActivate:[ot.W,()=>{const vt=(0,T.WQX)(_.il);return vt.pipe((0,_.Lt)(R.eH),(0,D.M)(Jt=>{Jt||vt.dispatch((0,ct.Is)())}),(0,o.p)(Jt=>null!==Jt),(0,U.n)(Jt=>Jt?.contextOptions?.[M.M.IsBusinessSavingsEligible]?(0,gt.of)(!0):(vt.dispatch((0,_t.H3)()),(0,gt.of)(!1))))}],data:{analyticPageName:"Business Savings",permissions:{only:x.e.CanAccessBenefits,redirectTo:(0,it.V)(["no-access"])}}}];let nt=(()=>{class vt{static{this.\u0275fac=function(wt){return new(wt||vt)}}static{this.\u0275mod=T.$C({type:vt})}static{this.\u0275inj=T.G2t({imports:[t.MD,h.iI.forChild(q),h.iI]})}}return vt})();var xt=e(99437),Dt=e(98413),oe=e(38207);let _e=(()=>{class vt{constructor(Gt,wt){this.actions$=Gt,this.benefitsService=wt,this.getBusinessSavings$=(0,s.EH)(()=>this.actions$.pipe((0,s.gp)(G.lw),(0,U.n)(()=>this.benefitsService.getBusinessSavings().pipe((0,I.T)(ee=>G.xL({businessSavings:ee})),(0,xt.W)(()=>(0,gt.of)(G.Jy())))))),this.getBusinessSavingsFailed$=(0,s.EH)(()=>this.actions$.pipe((0,s.gp)(G.Jy),(0,I.T)(()=>(0,Dt.Ds)({text:"COMMON.ERROR",notificationType:oe._.error}))))}static{this.\u0275fac=function(wt){return new(wt||vt)(T.KVO(s.En),T.KVO(et.o))}}static{this.\u0275prov=T.jDH({token:vt,factory:vt.\u0275fac})}}return vt})();const re=(0,_.vy)({businessSavings:null,isLoading:!1},(0,_.on)(G.lw,vt=>({...vt,isLoading:!0})),(0,_.on)(G.xL,(vt,{businessSavings:Jt})=>({...vt,businessSavings:Jt,isLoading:!1})),(0,_.on)(G.Jy,vt=>({...vt,businessSavings:null,isLoading:!1})),(0,_.on)(G.du,vt=>({...vt,businessSavings:null})));function bt(vt,Jt){return re(vt,Jt)}var Ft=e(95132),Te=e(86016),E=e(6732),F=e(86049),L=e(96518),ft=e(39642),K=e(99252),Tt=e(31476),St=e(71660),ae=e(46351),ne=e(742);let de=(()=>{class vt{static{this.\u0275fac=function(wt){return new(wt||vt)}}static{this.\u0275mod=T.$C({type:vt})}static{this.\u0275inj=T.G2t({providers:[ne.K,ae.Y],imports:[t.MD,n.y,d.h,Ft.g,_.md,s.Vm,f.YN,_.md.forFeature
1("businessSavings",bt),s.Vm.forFeature([_e]),g.C,St.O,E.R,F.v,L.s,ft.C,K.D,Tt.P,f.X1.withConfig({callSetDisabledState:"whenDisabledForLegacyCode"}),nt,Te.w]})}}return vt})()},49610:(lt,O,e)=>{e.d(O,{Jy:()=>s,du:()=>_,lw:()=>n,xL:()=>d});var t=e(59640);const n=(0,t.VP)("[Business Savings] Get Business Savings Request"),d=(0,t.VP)("[Business Savings] Get Business Savings Success",(0,t.xk)()),s=(0,t.VP)("[Business Savings] Get Business Savings Failed"),_=(0,t.VP)("[Business Savings] Reset Business Savings")},91379:(lt,O,e)=>{e.d(O,{QW:()=>s,tH:()=>d});var t=e(59640);const n=(0,t.UX)("businessSavings"),d=(0,t.Mz)(n,_=>_.businessSavings),s=(0,t.Mz)(n,_=>_.isLoading)},51277:(lt,O,e)=>{e.d(O,{x:()=>d});var t=e(54438),n=e(68018);let d=(()=>{class s{constructor(){this.wrapperId="",this.labelText="",this.valueChanged=new t.bkB}toggleClick(){this.valueChanged.emit()}static{this.\u0275fac=function(g){return new(g||s)}}static{this.\u0275cmp=t.VBU({type:s,selectors:[["iwg-toggle-wrapper"]],inputs:{value:"value",wrapperId:"wrapperId",labelText:"labelText"},outputs:{valueChanged:"valueChanged"},decls:6,vars:9,consts:[["type","button",1,"form__field-wrapper-toggle","text-link--button",3,"click","id"],[1,"form__field-wrapper-toggle__label",3,"id"],[1,"form__field-wrapper-toggle__icon",3,"id"],["aria-hidden","true",1,"iwg-icon-slider"]],template:function(g,h){1&g&&(t.j41(0,"button",0),t.bIt("click",function(){return h.toggleClick()}),t.j41(1,"span",1),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"span",2),t.nrm(5,"i",3),t.k0s()()),2&g&&(t.Y8G("id",h.wrapperId+"_Toggle"),t.BMQ("aria-pressed",h.value),t.R7$(),t.Y8G("id",h.wrapperId+"_Toggle_Label"),t.R7$(),t.JRh(t.bMT(3,7,h.labelText)),t.R7$(2),t.AVh("checked",h.value),t.Y8G("id",h.wrapperId+"_Toggle_Icon"))},dependencies:[n.D9],styles:[".form__field-wrapper-toggle[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--spacing-xs, var(--scale-400, 1.6rem))}.form__field-wrapper-toggle__label[_ngcontent-%COMP%]{cursor:pointer}.form__field-wrapper-toggle__icon[_ngcontent-%COMP%]{cursor:pointer;transform:rotate(180deg);color:var(--color-text-primary, var(--brand-neutral-900, #0A0428))}.form__field-wrapper-toggle__icon[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{display:flex}[dir=rtl]   [_nghost-%COMP%]   .form__field-wrapper-toggle__icon[_ngcontent-%COMP%]{transform:none}[dir=rtl][_ngcontent-%COMP%]   .form__field-wrapper-toggle__icon[_ngcontent-%COMP%]{transform:none}[dir=rtl][_nghost-%COMP%]   .form__field-wrapper-toggle__icon[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .form__field-wrapper-toggle__icon[_ngcontent-%COMP%]{transform:none}.form__field-wrapper-toggle__icon.checked[_ngcontent-%COMP%]{color:var(--color-text-accent-tertiary, var(--brand-accent-secondary, #1098A7));transform:none}[dir=rtl]   [_nghost-%COMP%]   .form__field-wrapper-toggle__icon.checked[_ngcontent-%COMP%]{transform:rotate(180deg)}[dir=rtl][_ngcontent-%COMP%]   .form__field-wrapper-toggle__icon.checked[_ngcontent-%COMP%]{transform:rotate(180deg)}[dir=rtl][_nghost-%COMP%]   .form__field-wrapper-toggle__icon.checked[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .form__field-wrapper-toggle__icon.checked[_ngcontent-%COMP%]{transform:rotate(180deg)}"]})}}return s})()},18864:(lt,O,e)=>{e.d(O,{U:()=>s});var t=e(60177),n=e(68018),d=e(54438);let s=(()=>{class _{static{this.\u0275fac=function(h){return new(h||_)}}static{this.\u0275mod=d.$C({type:_})}static{this.\u0275inj=d.G2t({imports:[t.MD,n.h]})}}return _})()},10087:(lt,O,e)=>{e.d(O,{O:()=>B});var t=e(31635),n=e(21413),d=e(84572),s=e(23294),_=e(56977),f=e(5964),g=e(53993),h=e(25558),C=e(96697),T=e(65245),m=e(85986),I=e(59640),y=e(5567),o=e(77702),P=e(42092),N=e(53952),a=e(98413),M=e(38207),G=e(9167),k=e(38612),R=e(89417),J=e(64504),H=e(94905),et=e(62233),st=e(56963),Et=e(18224),dt=e(13997),Nt=e(86734),V=e(45032),mt=e(44469),Pt=e(34905),l=e(54438),$=e(60156),Z=e(39178),ot=e(60177),D=e(76864),U=e(25068),gt=e(68018),_t=e(12262),ct=e(31476),pt=e(54933),x=e(95087);function it(W,A){if(1&W&&(l.j41(0,"div",14),l.EFF(1),l.k0s()),2&W){const w=l.XpG(2);l.R7$(),l.SpI(" ",w.info.billingAddress.addressLine2,"")}}function q(W,A){if(1&W&&(l.j41(0,"div",15),l.EFF(1),l.k0s()),2&W){const w=l.XpG(2);l.R7$(),l.SpI(" ",w.info.billingAddress.addressLine3,"")}}function nt(W,A){if(1&W&&(l.j41(0,"div",16),l.EFF(1),l.k0s()),2&W){const w=l.XpG(2);l.R7$(),l.SpI(" ",w.info.billingAddress.countyStateProvince,"")}}function xt(W,A){if(1&W&&(l.j41(0,"div",17),l.EFF(1),l.k0s()),2&W){const w=l.XpG(2);l.R7$(),l.SpI(" ",w.info.billingAddress.postcode,"")}}function Dt(W,A){if(1&W&&(l.j41(0,"div",2)(1,"div",3)(2,"div",18),l.EFF(3," PAYMENT.CARD_BILLING_ADDRESS.LABELS.PHONE_NUMBER"),l.k0s(),l.j41(4,"div",19),l.EFF(5),l.k0s()()()),2&W){const w=l.XpG(2);l.R7$(5),l.SpI(" ",w.info.phoneNumber.telephoneNumber,"")}}function oe(W,A){if(1&W&&(l.j41(0,"div")(1,"div",1),l.EFF(2," PAYMENT.CARD_BILLING_ADDRESS.LABELS.ADDRESS_DETAILS"),l.k0s(),l.j41(3,"div",2)(4,"div",3)(5,"div",4),l.EFF(6," PAYMENT.CARD_BILLING_ADDRESS.LABELS.COUNTRY"),l.k0s(),l.j41(7,"div",5),l.EFF(8),l.k0s()()(),l.j41(9,"div",2)(10,"div",3)(11,"div",6),l.EFF(12,"PAYMENT.CARD_BILLING_ADDRESS.LABELS.BILLING_ADDRESS"),l.k0s(),l.j41(13,"div",7),l.EFF(14),l.k0s(),l.DNE(15,it,2,1,"div",8)(16,q,2,1,"div",9),l.j41(17,"div",10),l.EFF(18),l.k0s(),l.DNE(19,nt,2,1,"div",11)(20,xt,2,1,"div",12),l.k0s()(),l.DNE(21,Dt,6,1,"div",13),l.k0s()),2&W){const w=l.XpG();
1l.R7$(8),l.JRh(w.countryName),l.R7$(6),l.SpI(" ",w.info.billingAddress.addressLine1,""),l.R7$(),l.Y8G("ngIf",w.info.billingAddress.addressLine2),l.R7$(),l.Y8G("ngIf",w.info.billingAddress.addressLine3),l.R7$(2),l.JRh(w.info.billingAddress.city),l.R7$(),l.Y8G("ngIf",w.info.billingAddress.countyStateProvince),l.R7$(),l.Y8G("ngIf",w.info.billingAddress.postcode),l.R7$(),l.Y8G("ngIf",w.info.phoneNumber)}}let v=(()=>{class W{constructor(w){this.store$=w,this.unsubscribe$=new n.B}ngOnInit(){this.store$.pipe((0,I.Lt)(y.D1),(0,_.Q)(this.unsubscribe$)).subscribe(w=>{w&&(this.info=w,this.getCountryName())})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}getCountryName(){this.store$.pipe((0,I.Lt)((0,x.LD)(this.info.billingAddress.countryIsoCode)),(0,C.s)(1),(0,_.Q)(this.unsubscribe$)).subscribe(w=>this.countryName=w.name)}static{this.\u0275fac=function(ut){return new(ut||W)(l.rXU(I.il))}}static{this.\u0275cmp=l.VBU({type:W,selectors:[["iwg-card-billing-address-details"]],inputs:{isSingleUseCard:"isSingleUseCard"},decls:1,vars:1,consts:[[4,"ngIf"],["id","CardBillingAddress_Details_CardBillingAddressLabel","translate","",1,"iwg-h5-medium","m--b-4"],[1,"row"],[1,"col-xs-12","col-sm-12","m--b-4"],["id","CardBillingAddress_Details_Country","translate","",1,"iwg-label3-medium"],["id","CardBillingAddress_Details_CountryValue",1,"iwg-body1","m--t-1"],["id","CardBillingAddress_Details_AddressLabel","translate","",1,"iwg-label3-medium"],["id","CardBillingAddress_Details_AddressLine1",1,"iwg-body1","m--t-1","addr-summary"],["class","iwg-body1 m--t-1 addr-summary","id","CardBillingAddress_Details_AddressLine2",4,"ngIf"],["class","iwg-body1 m--t-1 addr-summary","id","CardBillingAddress_Details_AddressLine3",4,"ngIf"],["id","CardBillingAddress_Details_City",1,"iwg-body1","m--t-1","addr-summary"],["class","iwg-body1 m--t-1 addr-summary","id","CardBillingAddress_Details_CountyStateProvince",4,"ngIf"],["class","iwg-body1 m--t-1 addr-summary","id","CardBillingAddress_Details_Postcode",4,"ngIf"],["class","row",4,"ngIf"],["id","CardBillingAddress_Details_AddressLine2",1,"iwg-body1","m--t-1","addr-summary"],["id","CardBillingAddress_Details_AddressLine3",1,"iwg-body1","m--t-1","addr-summary"],["id","CardBillingAddress_Details_CountyStateProvince",1,"iwg-body1","m--t-1","addr-summary"],["id","CardBillingAddress_Details_Postcode",1,"iwg-body1","m--t-1","addr-summary"],["id","CardBillingAddress_Details_PhoneNumber","translate","",1,"iwg-label3-medium"],["id","CardBillingAddress_Details_PhoneNumberValue",1,"iwg-body1","m--t-1"]],template:function(ut,Wt){1&ut&&l.DNE(0,oe,22,8,"div",0),2&ut&&l.Y8G("ngIf",Wt.info)},dependencies:[ot.bT,gt.Mm],styles:[".addr-summary[_ngcontent-%COMP%]{word-break:break-word}"]})}}return W})();var _e=e(4706),ue=e(85196),re=e(84005);let bt=(()=>{class W{constructor(w){this.store$=w,this.paymentMethodCardUrl$=this.store$.select(H.bw).pipe((0,s.F)())}submitState(w){this.store$.dispatch((0,ue._m)({hash:w,variables:{},hccType:this.hccType,preAuthAmount:this.preAuthAmount}))}static{this.\u0275fac=function(ut){return new(ut||W)(l.rXU(I.il))}}static{this.\u0275cmp=l.VBU({type:W,selectors:[["iwg-payment-card-worldpay"]],inputs:{hccType:"hccType",preAuthAmount:"preAuthAmount"},decls:4,vars:3,consts:[["translate","",1,"iwg-h5-medium","m--t-5","m--b-3"],[3,"stateChange","url"]],template:function(ut,Wt){1&ut&&(l.j41(0,"div",0),l.EFF(1,"PAYMENT.CARD_DETAILS_LABEL"),l.k0s(),l.j41(2,"iwg-worldpay-form",1),l.nI1(3,"async"),l.bIt("stateChange",function(pe){return Wt.submitState(pe)}),l.k0s()),2&ut&&(l.R7$(2),l.Y8G("url",l.bMT(3,1,Wt.paymentMethodCardUrl$)))},dependencies:[gt.Mm,re.Q,ot.Jj],encapsulation:2})}}return W})();var Ft=e(25749),Te=e(19331),E=e(10283);const F=["topFormAnchor"],L=W=>({ConsumerInput_CurrencySymbol:"",ConsumerInput_Value:W,ConsumerInput_CurrencyCode:""});function ft(W,A){if(1&W){const w=l.RV6();l.j41(0,"iwg-captcha",10,1),l.nI1(2,"async"),l.nI1(3,"async"),l.bIt("resolved",function(Wt){l.eBV(w);const ht=l.XpG();return l.Njj(ht.captchaResolved(Wt))})("failed",function(){l.eBV(w);const Wt=l.XpG();return l.Njj(Wt.captchaFailed())}),l.k0s()}if(2&W){const w=l.XpG();l.AVh("hide-captcha",w.hideCaptcha)("captcha-takes-no-space",w.captchaInvisible),l.Y8G("reset$",w.resetCaptcha$)("captchaSize",w.captchaSize)("navigateBackOnClose",w.navigateBackOnCaptchaClose)("shouldRetriggerCaptcha",w.allowSilentRecapture||!(w.showPaymentProvider&&(l.bMT(2,8,w.paymentRequestId$)||l.bMT(3,10,w.hccSession$))))}}function K(W,A){if(1&W){const w=l.RV6();l.j41(0,"div")(1,"iwg-terms-conditions-house-rules-form",13),l.bIt("formChecked",function(Wt){l.eBV(w);const ht=l.XpG(3);return l.Njj(ht.handleFormChanges(Wt))}),l.k0s(),l.j41(2,"div",14)(3,"div",15)(4,"iwg-button",16),l.nI1(5,"async"),l.EFF(6," PAYMENT.CARD_BILLING_ADDRESS.NEXT "),l.k0s()()()()}if(2&W){const w=l.XpG(3);l.R7$(4),l.AVh("w-100",l.bMT(5,3,w.isMobile$)),l.Y8G("disabled",!w.isFormChecked)}}function Tt(W,A){if(1&W&&(l.j41(0,"div"),l.DNE(1,K,7,5,"div",12),l.k0s()),2&W){const w=l.XpG(2);l.R7$(),l.Y8G("ngIf",(w.productType===w.productTypes.Membership||w.productType===w.productTypes.VirtualOffice)&&!w.canAddCardForMembershipFlow)}}function St(W,A){1&W&&(l.j41(0,"div",20),l.nI1(1,"iwgPrice"),l.EFF(2,"USER_PROFILE.ADD_PAYMENT_METHOD.CREDIT_OR_DEBIT_CARD.AUTHORIZATION"),l.k0s()),2&W&&l.Y8G("translateParams",l.eq3(3,L,l.bMT(1,1,A.ngIf)))}function ae(W,A){if(1&W&&(l.qex(0),l.DNE(1,St,3,5,"div",19),l.nI1(2,"async"),l.bVm()),2&W){const w=l.XpG(3);l.R7$(),l.Y8G("ngIf",l.bMT(2,1,w.authorization$))}}function ne(W,A){if(1&W){const w=l.RV6();l.j41(0,"iwg-terms-conditions-house-rules-form",13),l.bIt("formChecked",function(Wt){l.eBV(w);const ht=l.XpG(3);return l.Njj(ht.handleFormChanges(Wt))}),l.k0s()}}function de(W,A){if(1&W){const w=l.RV6();l.j41(0,"iwg-button",21),l.nI1(1,"async"),l.bIt("click",function(){l.eBV(w);const Wt=l.XpG(3);return l.Njj(Wt.flipAddressState(!1))})("keydown.enter",function(){l.eBV(w);const Wt=l.XpG(3);return l.Njj(Wt.flipAddressState(!1))}),l.EFF(2," PAYMENT.CARD_BILLING_ADDRESS.CANCEL"),l.k0s()}if(2&W){const w=l.XpG(3);l.Y8G("ngClass",l.bMT(1,3,w.isMobile$)?"m--b-3 w-100":"m--r-2")("type","button")("displayType",w.buttonDisplayType.secondary)}}function vt(W,A){if(1&W&&(l.j41(0,"div"),l.nrm(1,"iwg-card-billing-address-form",17),l.DNE(2,ae,3,3,"ng-container",12)(3,ne,1,0,"iwg-terms-conditions-house-rules-form"),l.j41(4,"div",14)(5,"div",15),l.DNE(6,de,3,5,"iwg-button",18),l.nI1(7,"async"),l.j41(8,"iwg-button",16),l.nI1(9,"async"),l.EFF(10),l.nI1(11,"async"),l.k0s()()()()),2&W){const w=l.XpG(2);l.R7$(),l.Y8G("companyAddress",w.companyAddress),l.R7$(),l.Y8G("ngIf",w.showFormContent&&w.authMessageVisible),l.R7$(),l.vxM(w.productType===w.productTypes.Membership||w.productType===w.productTypes.VirtualOffice?3:-1),l.R7$(3),l.Y8G("ngIf",!!l.bMT(7,8,w.billingAddress$)),l.R7$(2),l.AVh("w-100",l.bMT(9,10,w.isMobile$)),l.Y8G("disabled",w.isSubmitDisabled()),l.R7$(2),l.SpI(" ",l.bMT(11,12,w.billingAddress$)?"PAYMENT.CARD_BILLING_ADDRESS.UPDATE":"PAYMENT.CARD_BILLING_ADDRESS.NEXT"," ")}}function Jt(W,A){if(1&W){const w=l.RV6();l.j41(0,"form",11),l.bIt("ngSubmit",function(){l.eBV(w);const Wt=l.XpG();return l.Njj(Wt.onDetailsSubmit())}),l.DNE(1,Tt,2,1,"div",12)(2,vt,12,14,"div",12),l.k0s()}if(2&W){const w=l.XpG();l.Y8G("formGroup",w.cardInfoForm),l.R7$(),l.Y8G("ngIf",w.isSaveCard()&&(w.isAddressEditShown||!w.isBillingAddressRequired)),l.R7$(),l.Y8G("ngIf",w.isAddressEditShown&&w.isBillingAddressRequired)}}function Gt(W,A){1&W&&(l.j41(0,"span",24),l.EFF(1,"PAYMENT.CARD_BILLING_ADDRESS.SUMMARY_TITLE"),l.k0s())}function wt(W,A){if(1&W){const w=l.RV6();
1l.j41(0,"div",25),l.nrm(1,"iwg-card-billing-address-details",26),l.j41(2,"div",27)(3,"iwg-button",28),l.bIt("click",function(){l.eBV(w);const Wt=l.XpG(3);return l.Njj(Wt.flipAddressState(!0))})("keydown.enter",function(){l.eBV(w);const Wt=l.XpG(3);return l.Njj(Wt.flipAddressState(!0))}),l.EFF(4," PAYMENT.CARD_BILLING_ADDRESS.SHOW_EDIT_FORM"),l.k0s()()()}if(2&W){const w=l.XpG(3);l.R7$(),l.Y8G("isSingleUseCard",!w.isSaveCard())}}function ee(W,A){1&W&&(l.qex(0),l.j41(1,"iwg-accordion",23),l.DNE(2,Gt,2,0,"ng-template",null,2,l.C5r)(4,wt,5,1,"ng-template",null,3,l.C5r),l.k0s(),l.bVm())}function me(W,A){if(1&W&&l.nrm(0,"iwg-payment-card-worldpay",33),2&W){const w=l.XpG(3);l.Y8G("hccType",w.hccType)("preAuthAmount",w.preauthorizationAmount)}}function Me(W,A){if(1&W&&(l.j41(0,"div",34),l.nrm(1,"iwg-dropdown",36),l.nI1(2,"async"),l.k0s()),2&W){const w=l.XpG(4);l.Y8G("formGroup",w.paymentCountryForm),l.R7$(),l.Y8G("options",l.bMT(2,5,w.countries$))("isRequired",!0)("isSearchable",!0)("searchType",w.dropdownIncludesSearchType)}}function ye(W,A){if(1&W){const w=l.RV6();l.qex(0),l.DNE(1,Me,3,7,"div",34),l.j41(2,"iwg-payment-card-worldline",35),l.bIt("navigateBack",function(){l.eBV(w);const Wt=l.XpG(3);return l.Njj(Wt.navigateBackFromWorldlineForm())}),l.k0s(),l.bVm()}if(2&W){const w=l.XpG(3);l.R7$(),l.vxM(w.showCountryDropdown?1:-1),l.R7$(),l.Y8G("hccType",w.hccType)("cashierPrefill",w.cashierPrefill)}}function be(W,A){if(1&W){const w=l.RV6();l.j41(0,"iwg-payment-card-iframe",37),l.nI1(1,"async"),l.nI1(2,"async"),l.bIt("stateChange",function(Wt){l.eBV(w);const ht=l.XpG(3);return l.Njj(ht.onCardSubmit(Wt))}),l.k0s()}if(2&W){const w=l.XpG(3);l.Y8G("paymentProvider",l.bMT(1,4,w.paymentProviderType$))("hccType",w.hccType)("preAuthAmount",w.preauthorizationAmount)("url",l.bMT(2,6,w.hccUrl$))}}function ve(W,A){if(1&W&&(l.qex(0,29),l.nI1(1,"async"),l.DNE(2,me,1,2,"iwg-payment-card-worldpay",30)(3,ye,3,3,"ng-container",31)(4,be,3,8,"iwg-payment-card-iframe",32),l.bVm()),2&W){const w=l.XpG(2);l.Y8G("ngSwitch",l.bMT(1,3,w.paymentProviderType$)),l.R7$(2),l.Y8G("ngSwitchCase",w.PaymentProviderType.worldpay),l.R7$(),l.Y8G("ngSwitchCase",w.PaymentProviderType.worldlinePOP)}}function Ct(W,A){if(1&W&&(l.j41(0,"div"),l.DNE(1,ee,6,0,"ng-container",12)(2,ve,5,5,"ng-container",22),l.k0s()),2&W){const w=l.XpG();l.AVh("d-none",w.isAddressEditShown&&w.isBillingAddressRequired),l.R7$(),l.Y8G("ngIf",w.isBillingAddressRequired),l.R7$(),l.Y8G("ngIf",w.showPaymentProvider)}}function Kt(W,A){1&W&&(l.j41(0,"div",38),l.EFF(1," BILLINGPAYMENT.INVOICESTRANSACTIONS.PAY_BALANCE.INVISIBLE_CAPTCHA_LABEL "),l.k0s())}class B{static{this.captchaWaitLimitMs=2e4}static{this.captchaWaitAttempts=3}get hideCaptcha(){return this.isCaptchaResolved&&(!this.isAddressEditShown||!this.isBillingAddressRequired)&&!this.newCaptchaTokenRequired}get captchaSize(){return this.captchaInvisible?V.M.invisible:V.M.normal}get allowSilentRecapture(){return this.captchaInvisible&&this.isInsideCheckout}get navigateBackOnCaptchaClose(){return!this.isInsideCheckout}get showCaptchaNotice(){return this.captchaInvisible&&this.isCaptchaRequired&&!this.isInsideCheckout&&this.paymentProviderType!==G.wF.worldlinePOP}get isInsideCheckout(){return this.insideCheckout||this.productType===Et.c.VirtualOffice||this.productType===Et.c.Membership}get showFormContent(){return this.isCaptchaResolved||!this.isCaptchaRequired||!this.newCaptchaTokenRequired}get awaitingStandaloneTerms(){return!this.isBillingAddressRequired&&!this.canAddCardForMembershipFlow}get showPaymentProvider(){return(!this.productType||this.productType===Et.c.Membership&&this.canAddCardForMembershipFlow||this.productType===Et.c.VirtualOffice&&!this.awaitingStandaloneTerms)&&(this.paymentProviderType===G.wF.worldlinePOP&&this.isCaptchaResolved||this.paymentProviderType!==G.wF.worldlinePOP||!this.isCaptchaRequired)}constructor(A,w,ut,Wt,ht){this.addPaymentMethodCardProvider=A,this.store=w,this.fb=ut,this.deviceService=Wt,this.nxgLogger=ht,this.storeAccount=null,this.authMessageVisible=!0,this.visible=null,this.captchaInvisible=!1,this.insideCheckout=!1,this.showCountryDropdown=!1,this.cashierPrefill=null,this.companyAddress=null,this.buttonDisplayType=k.t,this.unsubscribe$=new n.B,this.paymentProviderType$
1=this.store.select(y.$F),this.hccUrl$=this.store.select(y.bw),this.PaymentProviderType=G.wF,this.resetCaptcha$=new n.B,this.awaitingRecapture=!1,this.captchaUnavailable=!1,this.captchaAttemptsLeft=B.captchaWaitAttempts,this.productTypes=Et.c,this.paymentRequestId$=this.store.select(mt.mJ),this.hccSession$=this.store.select(y.Wd),this.countries$=this.store.select(et.qz),this.paymentCountryForm=this.fb.group({country:[null,[R.k0.required]]}),this.dropdownIncludesSearchType=Pt.W.Includes}ngOnInit(){this.isFormChecked=!1,this.store.dispatch((0,o.gu)({canAddCard:!1})),this.isBillingAddressRequired$=this.store.select(y.tP).pipe((0,s.F)()),this.isBillingAddressRequired$.pipe((0,_.Q)(this.unsubscribe$)).subscribe(A=>this.isBillingAddressRequired=A),this.createForm(),this.isMobile$=this.deviceService.isMobile$,(0,d.z)([this.locationNumber$,this.hccCentreNumber]).pipe((0,s.F)(),(0,_.Q)(this.unsubscribe$)).subscribe(([A,w])=>{this.store.dispatch((0,o.j)({locationNumber:A,hccCentreNumber:w,hccType:this.hccType,preAuthAmount:this.preauthorizationAmount,storeAccount:this.storeAccount,visible:this.visible,productType:this.productType}))}),this.store.select(y.qs).pipe((0,f.p)(Boolean),(0,g.E)(this.store.select(y.SX)),(0,_.Q)(this.unsubscribe$)).subscribe(([A,w])=>{this.addPaymentMethodCardProvider?.addCard&&this.addPaymentMethodCardProvider?.addCard(w),this.addCard(w)}),this.store.pipe((0,I.Lt)(et.Hg),(0,f.p)(A=>null!==A),(0,_.Q)(this.unsubscribe$)).subscribe(A=>{this.contactId=A.contactId}),this.store.select(et.TR).pipe((0,f.p)(A=>null!==A),(0,_.Q)(this.unsubscribe$)).subscribe(A=>{this.country=A.isoCodeThreeLetter}),this.store.select(y.mN).pipe((0,_.Q)(this.unsubscribe$)).subscribe(A=>{this.urlLoading=A}),this.availableCards$=this.store.select(y.V$),this.billingAddress$=this.store.select(y.D1),this.isStaff$=this.store.select(et.Pe),this.authorization$=this.store.select(y.PQ),this.store.pipe((0,I.Lt)(y.hG),(0,g.E)(this.billingAddress$),(0,_.Q)(this.unsubscribe$)).subscribe(([A,w])=>{this.isAddressEditShown=A,A&&w&&this.cardInfoForm.patchValue({billingAddress:w})}),this.locationNumber$.pipe((0,g.E)(this.hccCentreNumber),(0,h.n)(([A,w])=>this.store.select((0,H.pq)({params:{locationType:w||A?J.L.byLocationNumber:J.L.defaultCentre,centreNumber:w??A},requiredPaymentMethodTypes:[N.eq.paymentCard]})))),this.store.select(et.Pe).pipe((0,_.Q)(this.unsubscribe$)).subscribe(A=>this.isStaff=A),this.store.select(y.T1).pipe((0,_.Q)(this.unsubscribe$)).subscribe(A=>{this.isCaptchaRequired=A,A&&this.captchaInvisible&&!this.isCaptchaResolved&&this.boundCaptchaWait()}),this.store.select(y.Ch).pipe((0,_.Q)(this.unsubscribe$)).subscribe(A=>{this.newCaptchaTokenRequired=A,A&&(this.captchaToken=null,this.isCaptchaResolved=!1,this.boundCaptchaWait(),this.resetCaptcha$.next())}),this.store.select(y.y0).pipe((0,_.Q)(this.unsubscribe$)).subscribe(A=>{this.canAddCardForMembershipFlow=A}),this.store.dispatch((0,o.xK)({canDeactivate:!0})),this.cardInfoForm.valueChanges.pipe((0,f.p)(A=>!!this.cardInfoForm.touched),(0,dt.ec)(),(0,C.s)(1),(0,_.Q)(this.unsubscribe$)).subscribe(()=>this.store.dispatch((0,o.xK)({canDeactivate:!1}))),this.paymentProviderType$.pipe((0,_.Q)(this.unsubscribe$)).subscribe(A=>this.paymentProviderType=A),this.showCountryDropdown&&(this.store.select(y.AZ).pipe((0,f.p)(A=>!!A),(0,C.s)(1),(0,_.Q)(this.unsubscribe$)).subscribe(A=>this.paymentCountryForm.get("country").setValue(A?.authorization?.countryIsoCode)),this.paymentCountryForm.valueChanges.pipe((0,dt.ec)(),(0,T.i)(1),(0,_.Q)(this.unsubscribe$)).subscribe(()=>this.setPaymentCountryCode()))}ngOnChanges(A){const w=A.preauthorizationAmount;if(w&&!w.firstChange&&(this.productType===Et.c.VirtualOffice||this.productType===Et.c.Membership)&&null!=w.currentValue&&w.currentValue!==w.previousValue){if(this.store.dispatch((0,o.r1)({loading:!0})),this.isCaptchaRequired&&this.allowSilentRecapture)return this.awaitingRecapture=!0,this.boundCaptchaWait(),void this.resetCaptcha$.next();this.store.dispatch((0,o.hw)({hccType:this.hccType,preAuthAmount:w.currentValue,storeAccount:this.storeAccount,visible:this.visible,productType:this.productType}))}}ngOnDestroy(){clearTimeout(this.captchaWaitTimer),this.unsubscribe$.next(),this.unsubscribe$.complete()}boundCaptchaWait(){this.captchaUnavailable=!1,this.captchaAttemptsLeft=B.captchaWaitAttempts,this.armCaptchaWait()}armCaptchaWait(){clearTimeout(this.captchaWaitTimer),this.captchaWaitTimer=setTimeout(()=>this.endCaptchaWait(),B.captchaWaitLimitMs)}get isAwaitingCaptchaToken(){return this.isCaptchaRequired&&this.captchaInvisible&&(!this.isCaptchaResolved||this.awaitingRecapture)}endCaptchaWait(){if(this.isAwaitingCaptchaToken){if(--this.captchaAttemptsLeft>0)return this.armCaptchaWait(),void this.resetCaptcha$.next();this.giveUpOnCaptcha()}}giveUpOnCaptcha(){clearTimeout(this.captchaWaitTimer),this.isAwaitingCaptchaToken&&(this.captchaUnavailable=!0,this.store.dispatch((0,a.Ds)({notificationType:M._.error,text:"USER_PROFILE.ADD_PAYMENT_METHOD.CREDIT_OR_DEBIT_CARD.GET_HCC_SETUP_FAIL"}))),this.awaitingRecapture&&(this.awaitingRecapture=!1,this.store.dispatch((0,o.r1)({loading:!1})))}createForm(){this.cardInfoForm=this.fb.group({billingAddress:[""]})}addCard(A){this.isSaveCard()&&(this.insideCheckout||this.store.dispatch((0,a.Ds)({notificationType:M._.success,text:"BILLINGPAYMENT.ADD_COMPANY_PAYMENT_METHOD.DONE",messageTag:"PAYMENT.MESSAGE_TAG"})),this.nxgLogger.log((0,st.V8)(this.contactId,this.country)))}isSubmitDisabled(){return!(this.cardInfoForm.touched&&!this.cardInfoForm.pristine&&this.cardInfoForm.valid&&!this.cardInfoForm.pending&&(this.captchaToken||!this.isCaptchaRequired)&&((this.productType===Et.c.Membership||this.productType===Et.c.VirtualOffice)&&this.isFormChecked||!this.productType))}isSaveCard(){return!(this.isStaff||this.isSingleUseCard.value&&this.isBillingAddressRequired)}
1onDetailsSubmit(){this.store.dispatch((0,o.gu)({canAddCard:!0})),this.isBillingAddressRequired&&this.store.dispatch((0,o.RY)({billingAddressInfo:this.cardInfoForm.controls.billingAddress.value,hccType:this.hccType,preAuthAmount:this.preauthorizationAmount,storeAccount:this.storeAccount,visible:this.visible,productType:this.productType})),this.flipAddressState(!1)}flipAddressState(A){this.topFormAnchor?.nativeElement&&this.topFormAnchor.nativeElement.scrollIntoView({behavior:"smooth"}),this.cardInfoForm.markAsPristine(),this.cardInfoForm.markAsUntouched(),this.cardInfoForm.controls.billingAddress.markAsUntouched(),this.store.dispatch((0,o.PT)({isAddressEditShown:A})),this.captchaToken=null,A&&this.resetCaptcha$.next()}captchaResolved(A){this.captchaToken=A,this.store.dispatch((0,o._O)({captchaToken:A}));const w=this.awaitingRecapture&&!!A;w&&(this.awaitingRecapture=!1),(w||!this.isAddressEditShown||!this.isBillingAddressRequired)&&A&&this.store.dispatch((0,o.hw)({hccType:this.hccType,preAuthAmount:this.preauthorizationAmount,storeAccount:this.storeAccount,visible:this.visible,productType:this.productType})),this.isCaptchaResolved||(this.isCaptchaResolved=!!A),A&&(clearTimeout(this.captchaWaitTimer),this.captchaUnavailable=!1)}captchaFailed(){this.giveUpOnCaptcha()}onCardSubmit(A){this.store.dispatch((0,o._m)(A))}handleFormChanges(A){this.isFormChecked=A}navigateBackFromWorldlineForm(){this.store.dispatch(this.productType?(0,Nt.oZ)({productType:this.productType}):(0,Nt.Tl)({}))}setPaymentCountryCode(){const A=this.paymentCountryForm.get("country")?.value;this.store.dispatch((0,o.aN)({countryCode:A,hccType:this.hccType,preAuthAmount:this.preauthorizationAmount,storeAccount:this.storeAccount,visible:this.visible,productType:this.productType}))}static{this.\u0275fac=function(w){return new(w||B)(l.rXU(m._,8),l.rXU(I.il),l.rXU(R.ze),l.rXU($.g),l.rXU(Z.so))}}static{this.\u0275cmp=l.VBU({type:B,selectors:[["iwg-add-payment-method-card"]],viewQuery:function(w,ut){if(1&w&&l.GBs(F,5),2&w){let Wt;l.mGM(Wt=l.lsd())&&(ut.topFormAnchor=Wt.first)}},inputs:{locationNumber$:"locationNumber$",hccCentreNumber:"hccCentreNumber",isSingleUseCard:"isSingleUseCard",storeAccount:"storeAccount",authMessageVisible:"authMessageVisible",hccType:"hccType",preauthorizationAmount:"preauthorizationAmount",isCompanyDefault:"isCompanyDefault",productType:"productType",visible:"visible",captchaInvisible:"captchaInvisible",insideCheckout:"insideCheckout",showCountryDropdown:"showCountryDropdown",cashierPrefill:"cashierPrefill",companyAddress:"companyAddress"},features:[l.OA$],decls:7,vars:7,consts:[["topFormAnchor",""],["captcha",""],["header",""],["content",""],[1,"anchor"],["wrapperId","VerifyCustomerEmail",3,"reset$","hide-captcha","captcha-takes-no-space","captchaSize","navigateBackOnClose","shouldRetriggerCaptcha","resolved","failed",4,"ngIf"],[3,"loading"],[3,"formGroup","ngSubmit",4,"ngIf"],[3,"d-none",4,"ngIf"],["class","iwg-body1 text-center","translate","",4,"ngIf"],["wrapperId","VerifyCustomerEmail",3,"resolved","failed","reset$","captchaSize","navigateBackOnClose","shouldRetriggerCaptcha"],[3,"ngSubmit","formGroup"],[4,"ngIf"],[3,"formChecked"],[1,"row","end-xs","m--t-3"],[1,"col-xs-12","m--b-5","m--t-5"],["wrapperId","AddCard_BillingAddress_Next",3,"disabled"],["formControlName","billingAddress",3,"companyAddress"],["wrapperId","AddCard_BillingAddress_Back",3,"ngClass","type","displayType","click","keydown.enter",4,"ngIf"],["class","caption iwg-body1 m--t-8 m--b-3","translate","",3,"translateParams",4,"ngIf"],["translate","",1,"caption","iwg-body1","m--t-8","m--b-3",3,"translateParams"],["wrapperId","AddCard_BillingAddress_Back",3,"click","keydown.enter","ngClass","type","displayType"],[3,"ngSwitch",4,"ngIf"],["rightAccordion","true","rowId","AddCard_BillingAddress_Summary"],["translate",""],[1,"col-xs"],[3,"isSingleUseCard"],[1,"d--flex","end-xs"],["type","button","displayType","text-link-inline","wrapperId","AddCard_BillingAddress_Edit",1,"text-link","m--b-3",3,"click","keydown.enter"],[3,"ngSwitch"],[3,"hccType","preAuthAmount",4,"ngSwitchCase"],[4,"ngSwitchCase"],[3,"paymentProvider","hccType","preAuthAmount","url","stateChange",4,"ngSwitchDefault"],[3,"hccType","preAuthAmount"],[1,"m--b-5",3,"formGroup"],[3,"navigateBack","hccType","cashierPrefill"],["titleKey","name","idKey","isoCodeThreeLetter","valueKey","isoCodeThreeLetter","labelText","PAYMENT.COUNTRY_DROPDOWN.LABEL","wrapperId","UserProfile_AddPaymentMethod_PaymentMethod","formControlName","country","placeholder","PAYMENT.COUNTRY_DROPDOWN.PLACEHOLDER","filterKeys","name",3,"options","isRequired","isSearchable","searchType"],[3,"stateChange","paymentProvider","hccType","preAuthAmount","url"],["translate","",1,"iwg-body1","text-center"]],template:function(w,ut){1&w&&(l.nrm(0,"div",4,0),l.DNE(2,ft,4,12,"iwg-captcha",5),l.j41(3,"iwg-loader",6),l.DNE(4,Jt,3,3,"form",7)(5,Ct,3,4,"div",8)(6,Kt,2,0,"div",9),l.k0s()),2&w&&(l.R7$(2),l.Y8G("ngIf",ut.isCaptchaRequired),l.R7$(),l.AVh("iframe-container",ut.showPaymentProvider),l.Y8G("loading",ut.urlLoading||ut.isCaptchaRequired&&ut.captchaInvisible&&!ut.isCaptchaResolved&&!ut.captchaUnavailable),l.R7$(),l.Y8G("ngIf",ut.showFormContent),l.R7$(),l.Y8G("ngIf",ut.showFormContent),l.R7$(),l.Y8G("ngIf",ut.showCaptchaNotice))},dependencies:[ot.YU,ot.bT,ot.ux,ot.e1,ot.fG,D.V,U.M,V.c,R.qT,R.BC,R.cb,R.j4,R.JD,gt.Mm,_t.Q,ct.P,pt.h,v,_e.g,bt,Ft.A,Te.K,ot.Jj,E.r],styles:["[_nghost-%COMP%] > *[_ngcontent-%COMP%]{margin-bottom:2rem;display:block}
1.cards-list[_ngcontent-%COMP%]{margin-top:1rem}.cards-list[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{margin-right:1.5rem}[dir=rtl]   [_nghost-%COMP%]   .cards-list[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{margin-right:0;margin-left:1.5rem}[dir=rtl][_ngcontent-%COMP%]   .cards-list[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{margin-right:0;margin-left:1.5rem}[dir=rtl][_nghost-%COMP%]   .cards-list[_ngcontent-%COMP%] > *[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .cards-list[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{margin-right:0;margin-left:1.5rem}.iframe-container[_ngcontent-%COMP%]{min-height:63rem}@media (max-width: 1023.98px){.payment-method-type-col[_ngcontent-%COMP%]{padding-left:1.2rem}[dir=rtl]   [_nghost-%COMP%]   .payment-method-type-col[_ngcontent-%COMP%]{padding-left:1.6rem;padding-right:1.2rem}[dir=rtl][_ngcontent-%COMP%]   .payment-method-type-col[_ngcontent-%COMP%]{padding-left:1.6rem;padding-right:1.2rem}[dir=rtl][_nghost-%COMP%]   .payment-method-type-col[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .payment-method-type-col[_ngcontent-%COMP%]{padding-left:1.6rem;padding-right:1.2rem}}.anchor[_ngcontent-%COMP%]{margin-bottom:0}.hide-captcha[_ngcontent-%COMP%]{animation-duration:4s;animation-name:_ngcontent-%COMP%_hide;overflow:hidden;height:0;margin-bottom:0}.captcha-takes-no-space[_ngcontent-%COMP%]{animation:none;overflow:hidden;height:0;margin-bottom:0}@keyframes _ngcontent-%COMP%_hide{0%{opacity:1;height:auto}50%{opacity:1;height:auto}99%{height:auto}to{opacity:0;height:0}}.radio-button-wrapper[_ngcontent-%COMP%]{flex-basis:25%;padding-left:2rem}[dir=rtl]   [_nghost-%COMP%]   .radio-button-wrapper[_ngcontent-%COMP%]{padding-right:2rem;padding-left:0}[dir=rtl][_ngcontent-%COMP%]   .radio-button-wrapper[_ngcontent-%COMP%]{padding-right:2rem;padding-left:0}[dir=rtl][_nghost-%COMP%]   .radio-button-wrapper[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .radio-button-wrapper[_ngcontent-%COMP%]{padding-right:2rem;padding-left:0}@media (max-width: 1023.98px){.radio-button-wrapper[_ngcontent-%COMP%]{flex-basis:100%;padding-left:2rem;padding-right:2rem}}@media (max-width: 1023.98px){.radio-button-mobile[_ngcontent-%COMP%]{flex-direction:column}}.text-center[_ngcontent-%COMP%]{text-align:center}.convai-enabled[_nghost-%COMP%]   .row.end-xs[_ngcontent-%COMP%], .convai-enabled   [_nghost-%COMP%]   .row.end-xs[_ngcontent-%COMP%]{padding-bottom:var(--convai-enabled-padding-bottom, 16rem)}@media (max-width: 1023.98px){.convai-enabled[_nghost-%COMP%]   .row.end-xs[_ngcontent-%COMP%], .convai-enabled   [_nghost-%COMP%]   .row.end-xs[_ngcontent-%COMP%]{padding-bottom:2.6rem}}"]})}}(0,t.Cg)([(0,P.W)(null)],B.prototype,"locationNumber$",void 0),(0,t.Cg)([(0,P.W)(null)],B.prototype,"hccCentreNumber",void 0),(0,t.Cg)([(0,P.W)(!1)],B.prototype,"isSingleUseCard",void 0)},85986:(lt,O,e)=>{e.d(O,{_:()=>n});const n=new(e(54438).nKC)("AddPaymentMethodCardProvider")},2274:(lt,O,e)=>{e.d(O,{n:()=>n});const n=new(e(54438).nKC)("AddPaymentMethodDirectDebitProvider")},15144:(lt,O,e)=>{e.d(O,{G:()=>_t});var t=e(31635),n=e(54438),d=e(89417),s=e(94905),_=e(21413),f=e(84572),g=e(5964),h=e(56977),C=e(25558),T=e(96697),m=e(96354),I=e(53952),y=e(64504),o=e(85196),P=e(42092),N=e(77702),a=e(13997),M=e(59640),G=e(60177),k=e(76864),R=e(31476),J=e(10087),H=e(2274),et=e(60983),st=e(22960),Et=e(6463),dt=e(68018),Nt=e(12262),V=e(77818);function mt(ct,pt){if(1&ct&&(n.j41(0,"div",11),n.EFF(1),n.k0s()),2&ct){const x=n.XpG().$implicit;n.R7$(),n.Lme(" ",x.accountName," (",null==x.centres[0]?null:x.centres[0].financialAccountId,") ")}}function Pt(ct,pt){1&ct&&n.DNE(0,mt,2,2,"div",10),2&ct&&n.Y8G("ngIf",pt.$implicit)}function l(ct,pt){if(1&ct){const x=n.RV6();n.j41(0,"div",8)(1,"iwg-dropdown",9),n.mxI("valueChange",function(q){n.eBV(x);const nt=n.XpG();return n.DH7(nt.selectedAccountId,q)||(nt.selectedAccountId=q),n.Njj(q)}),n.bIt("valueChange",function(q){n.eBV(x);const nt=n.XpG();return n.Njj(nt.onAccountValueChanged(q))}),n.DNE(2,Pt,1,1,"ng-template",null,0,n.C5r),n.k0s()()}if(2&ct){const x=pt.ngIf,it=n.XpG();n.R7$(),n.R50("value",it.selectedAccountId),n.Y8G("options",x)("disabled",0===x.length)("isRequired",!0)}}function $(ct,pt){if(1&ct){const x=n.RV6();n.j41(0,"div",12)(1,"iwg-dropdown",13),n.mxI("valueChange",function(q){n.eBV(x);const nt=n.XpG();return n.DH7(nt.selectedCentreNumber,q)||(nt.selectedCentreNumber=q),n.Njj(q)}),n.bIt("valueChange",function(q){n.eBV(x);const nt=n.XpG();return n.Njj(nt.onCentreValueChanged(q))}),n.k0s()()}if(2&ct){const x=pt.ngIf,it=n.XpG();n.R7$(),n.R50("value",it.selectedCentreNumber),n.Y8G("options",x)("disabled",0===x.length)("isRequired",!0)}}function Z(ct,pt){if(1&ct){const x=n.RV6();n.j41(0,"div",14)(1,"span",15),n.EFF(2,"BILLINGPAYMENT.DIRECT_DEBIT.SCHEMES.DESCRIPTION"),n.k0s(),n.j41(3,"div",16)(4,"iwg-radio-button",17),n.bIt("selectedValueChange",function(q){n.eBV(x);const nt=n.XpG();return n.Njj(nt.onAccountHolderTypeChange(q))})("keydown.space",function(){n.eBV(x);const q=n.XpG();return n.Njj(q.onAccountHolderTypeChange(q.AccountHolderType.AccountHolder))}),n.j41(5,"span",18),n.EFF(6,"BILLINGPAYMENT.DIRECT_DEBIT.SCHEMES.ACCOUNT_HOLDER"),n.k0s()(),n.j41(7,"iwg-radio-button",19),n.bIt("selectedValueChange",function(q){n.eBV(x);const nt=n.XpG();return n.Njj(nt.onAccountHolderTypeChange(q))})("keydown.space",function(){n.eBV(x);const q=n.XpG();return n.Njj(q.onAccountHolderTypeChange(q.AccountHolderType.BusinessHolder))}),n.j41(8,"span",18),n.EFF(9,"BILLINGPAYMENT.DIRECT_DEBIT.SCHEMES.BUSINESS_HOLDER"),n.k0s()()()()}if(2&ct){const x=n.XpG();n.R7$(4),n.Y8G("selectedValue",x.selectedAccountHolderType)("value",x.AccountHolderType.AccountHolder),n.R7$(3),n.Y8G("value",x.AccountHolderType.BusinessHolder)("selectedValue",x.selectedAccountHolderType)}}let ot=(()=>{class ct{constructor(x,it){this.directDebitProvider=x,this.store$=it,this.unsubscribe$=new _.B,this.DirectDebitType=et.y,this.AccountHolderType=et.u,this.availableAccounts$=this.store$.select(Et.M2),this.isLoading$=this.store$.select(Et.wc).pipe((0,m.T)(q=>!q)),this.disableNext=!0,this.selectedAccountHolderType=et.u.AccountHolder}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}ngOnInit(){this.availableCentres$=this.getDirectDebitCentres(),this.directDebitType$=this.getDirectDebitType(),this.onAccountHolderTypeChange(et.u.AccountHolder),this.get
1SelectedCentreNumber().pipe((0,h.Q)(this.unsubscribe$)).subscribe(x=>{this.selectedCentreNumber=x,x&&this.selectedAccountId&&(this.disableNext=!1)}),this.availableAccounts$.pipe((0,g.p)(x=>!!x),(0,h.Q)(this.unsubscribe$)).subscribe(x=>{this.availableAccounts=x,1===x.length&&this.onAccountValueChanged(x[0].accountId)})}onAccountHolderTypeChange(x){this.accountHolderTypeChanged(x)}onCentreValueChanged(x){if(null==x){const it=this.availableAccounts?.find(q=>q.accountId===this.selectedAccountId);1===it?.centres?.length&&(x=it.centres[0].centreNumber)}this.centreSelected(x),this.disableNext=null===x,this.selectedCentreNumber=x}onNextClick(){this.store$.dispatch(st.AH()),this.store$.dispatch(st.Ws()),this.directDebitProvider?.nextClicked&&this.directDebitProvider?.nextClicked()}getDirectDebitType(){return this.store$.select(Et.bU)}getSelectedCentreNumber(){return this.store$.select(Et.$n)}getDirectDebitCentres(){return this.store$.select(Et.P0)}accountHolderTypeChanged(x){this.selectedAccountHolderType=x||et.u.AccountHolder,this.store$.dispatch(st.Ue({accountHolderType:this.selectedAccountHolderType}))}centreSelected(x){this.store$.dispatch(st.Zq({centreNumber:x}))}onAccountValueChanged(x){this.store$.dispatch(st.Am({accountId:x})),this.selectedAccountId=x,this.onCentreValueChanged(null)}static{this.\u0275fac=function(it){return new(it||ct)(n.rXU(H.n,8),n.rXU(M.il))}}static{this.\u0275cmp=n.VBU({type:ct,selectors:[["iwg-add-payment-method-direct-debit"]],decls:12,vars:13,consts:[["optionTemplate",""],[3,"loading"],[1,"direct-debit-container"],["class","m--b-8",4,"ngIf"],["class","available-centres",4,"ngIf"],["class","directdebit-holder-types iwg-body1",4,"ngIf"],[1,"next-step"],["wrapperId","direct-debit-payment-next-button",3,"click","keydown.enter","disabled"],[1,"m--b-8"],["titleKey","accountName","
1idKey","accountId","valueKey","accountId","labelText","BILLINGPAYMENT.DIRECT_DEBIT.SELECT_ACCOUNT.LABEL","wrapperId","DirectDebit_Accounts","hintText","BILLINGPAYMENT.DIRECT_DEBIT.SELECT_ACCOUNT.TOOLTIP",1,"padding-top-bottom",3,"valueChange","value","options","disabled","isRequired"],["class","option-template",4,"ngIf"],[1,"option-template"],[1,"available-centres"],["titleKey","centreName","idKey","centreNumber","valueKey","centreNumber","labelText","BILLINGPAYMENT.DIRECT_DEBIT.SELECT_CENTRE","wrapperId","DirectDebit_Centres",3,"valueChange","value","options","disabled","isRequired"],[1,"directdebit-holder-types","iwg-body1"],["translate","",1,"directdebit-holder-types__description"],[1,"directdebit-holder-types__choices"],["wrapperId","account-holder-type-radiobutton","name","choice","tabindex","0",3,"selectedValueChange","keydown.space","selectedValue","value"],["translate",""],["wrapperId","business-holder-type-radiobutton","name","choice","tabindex","0",3,"selectedValueChange","keydown.space","value","selectedValue"]],template:function(it,q){1&it&&(n.j41(0,"iwg-loader",1),n.nI1(1,"async"),n.j41(2,"div",2),n.DNE(3,l,4,4,"div",3),n.nI1(4,"async"),n.DNE(5,$,2,4,"div",4),n.nI1(6,"async"),n.DNE(7,Z,10,4,"div",5),n.nI1(8,"async"),n.j41(9,"div",6)(10,"iwg-button",7),n.bIt("click",function(){return q.onNextClick()})("keydown.enter",function(){return q.onNextClick()}),n.EFF(11,"COMMON.NEXT"),n.k0s()()()()),2&it&&(n.Y8G("loading",n.bMT(1,5,q.isLoading$)),n.R7$(3),n.Y8G("ngIf",n.bMT(4,7,q.availableAccounts$)),n.R7$(2),n.Y8G("ngIf",n.bMT(6,9,q.availableCentres$)),n.R7$(2),n.Y8G("ngIf",n.bMT(8,11,q.directDebitType$)===q.DirectDebitType.DirectDebit),n.R7$(3),n.Y8G("disabled",q.disableNext))},dependencies:[G.bT,k.V,dt.Mm,Nt.Q,V.d,R.P,G.Jj],styles:[".direct-debit-container[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column}.available-centres[_ngcontent-%COMP%]{margin-bottom:6rem}@media (max-width: 1023.98px){.available-centres[_ngcontent-%COMP%]{flex:1}}.directdebit-holder-types[_ngcontent-%COMP%]{margin-bottom:6rem}.directdebit-holder-types__description[_ngcontent-%COMP%]{display:block;margin-bottom:3rem}.directdebit-holder-types__choices[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:stretch}@media (max-width: 1023.98px){.directdebit-holder-types__choices[_ngcontent-%COMP%]{flex-direction:column;flex:1}}.directdebit-holder-types__choices[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-child{margin-right:4rem;margin-bottom:0}@media (max-width: 1023.98px){.directdebit-holder-types__choices[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-child{margin-right:0;margin-bottom:3rem}}[dir=rtl]   [_nghost-%COMP%]   .directdebit-holder-types__choices[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-child{margin-right:0;margin-left:4rem}@media (max-width: 1023.98px){[dir=rtl]   [_nghost-%COMP%]   .directdebit-holder-types__choices[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-child{margin-left:0}}[dir=rtl][_ngcontent-%COMP%]   .directdebit-holder-types__choices[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-child{margin-right:0;margin-left:4rem}@media (max-width: 1023.98px){[dir=rtl][_ngcontent-%COMP%]   .directdebit-holder-types__choices[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-child{margin-left:0}}[dir=rtl][_nghost-%COMP%]   .directdebit-holder-types__choices[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-child, [dir=rtl]   [_nghost-%COMP%]   .directdebit-holder-types__choices[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-child{margin-right:0;margin-left:4rem}@media (max-width: 1023.98px){[dir=rtl][_nghost-%COMP%]   .directdebit-holder-types__choices[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-child, [dir=rtl]   [_nghost-%COMP%]   .directdebit-holder-types__choices[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-child{margin-left:0}}.directdebit-holder-types__choices[_ngcontent-%COMP%] > iwg-radio-button[_ngcontent-%COMP%]{height:10rem;flex-grow:1;flex-basis:50%;display:block}.convai-enabled[_nghost-%COMP%]   .next-step[_ngcontent-%COMP%], .convai-enabled   [_nghost-%COMP%]   .next-step[_ngcontent-%COMP%]{padding-bottom:var(--convai-enabled-padding-bottom, 16rem)}@media (max-width: 1023.98px){.convai-enabled[_nghost-%COMP%]   .next-step[_ngcontent-%COMP%], .convai-enabled   [_nghost-%COMP%]   .next-step[_ngcontent-%COMP%]{padding-bottom:2.6rem}}.next-step[_ngcontent-%COMP%]{display:flex;align-self:flex-end}.next-step[_ngcontent-%COMP%] > iwg-button[_ngcontent-%COMP%]{width:25rem}@media (max-width: 1023.98px){.next-step[_ngcontent-%COMP%] > iwg-button[_ngcontent-%COMP%]{width:100%}}@media (max-width: 1023.98px){.next-step[_ngcontent-%COMP%]{margin-left:unset;align-self:stretch}}.option-template[_ngcontent-%COMP%]{cursor:pointer;transition:all .1s;align-content:center;min-height:inherit}"]})}}return ct})();function D(ct,pt){if(1&ct&&(n.qex(0,1),n.nrm(1,"iwg-dropdown",5),n.bVm()),2&ct){const x=n.XpG();n.Y8G("formGroup",x.paymentMethodTypeForm),n.R7$(),n.Y8G("options",x.paymentMethodOptions)("isRequired",!0)}}function U(ct,pt){if(1&ct&&n.nrm(0,"iwg-add-payment-method-card",6),2&ct){const x=n.XpG();n.Y8G("locationNumber$",x.locationNumber.value)("hccCentreNumber",x.hccCentreNumber.value)("isSingleUseCard",x.isSingleUseCard)("authMessageVisible",x.listType.value!==x.paymentMethodsListType.transaction)("captchaInvisible",x.captchaInvisible||x.listType.value===x.paymentMethodsListType.transaction)("hccType",x.hccType)("preauthorizationAmount",x.preAuthAmount)("isCompanyDefault",x.isCompanyDefault)("showCountryDropdown",!x.productType&&x.listType.value===x.paymentMethodsListType.company)("productType",x.productType)("storeAccount",x.storeAccount)("cashierPrefill",x.cashierPrefill)("companyAddress",x.companyAddress)("insideCheckout",x.insideCheckout)("visible",x.listType.value!==x.paymentMethodsListType.booking&&null)}}function gt(ct,pt){1&ct&&n.nrm(0,"iwg-add-payment-method-direct-debit")}class _t{get selectedPaymentMethod(){return this.paymentMethodTypeForm.value.paymentMethodType}set selectedPaymentMethod(pt){this.paymentMethodTypeForm.get("paymentMethodType").setValue(pt)}constructor(pt,x){this.formBuilder=pt,this.store$=x,this.hasMultipleTypeOptions=new n.bkB,this.storeAccount=null,this.cashierPrefill=null,this.companyAddress=null,this.captchaInvisible=!1,this.insideCheckout=!1,this.isTransactionStatusLoading$=this.store$.select(s.Wp),this.paymentMethodsListType=I.pI,this.paymentMethodTypeForm=this.formBuilder.group({paymentMethodType:[null,[d.k0.required]]}),this.allPaymentMethodOptions=[{id:I.eq.paymentCard,name:"USER_PROFILE.ADD_PAYMENT_METHOD.CREDIT_OR_DEBIT_CARD.METHOD_NAME"},{id:I.eq.directDebit,name:"USER_PROFILE.ADD_PAYMENT_METHOD.DIRECT_DEBIT.METHOD_NAME"}],this.PaymentMethodType=I.eq,this.paymentMethodOptions=[],this.destroy$=new _.B}ngOnInit(){(0,f.z)([this.listType,this.locationNumber]).pipe((0,g.p)(([pt])=>!!pt),(0,h.Q)(this.destroy$)).subscribe(([pt,x])=>
1this.store$.dispatch((0,o.YA)({params:{listType:pt,centreNumbers:x?[String(x)]:null}}))),this.fetchAvailablePaymentMethodRequest(),(0,f.z)([this.paymentMethods,this.locationNumber,this.hccCentreNumber]).pipe((0,C.n)(([pt,x,it])=>this.store$.select((0,s.Dx)({params:x?{locationType:y.L.byLocationNumber,centreNumber:it??x,productType:this.productType}:{locationType:y.L.defaultCentre,productType:this.productType}})).pipe((0,g.p)(q=>!!q),(0,T.s)(1),(0,m.T)(q=>({available:q,paymentMethods:pt})))),(0,h.Q)(this.destroy$)).subscribe(({available:pt,paymentMethods:x})=>{this.paymentMethodOptions=this.allPaymentMethodOptions.filter(nt=>(!x||x.includes(nt.id))&&pt.includes(nt.id)),this.hasMultipleTypeOptions.emit(this.paymentMethodOptions?.length>1);const it=this.paymentMethodTypeForm.get("paymentMethodType");this.paymentMethodOptions.length<=1?it.disable():it.enable();const q=this.selectedPaymentMethod;(!q||x&&!x.includes(q)||!pt.includes(q))&&(this.selectedPaymentMethod=this.paymentMethodOptions[0]?.id)}),this.store$.dispatch((0,N.xK)({canDeactivate:!0})),this.paymentMethodTypeForm.valueChanges.pipe((0,a.ec)(),(0,T.s)(1),(0,h.Q)(this.destroy$)).subscribe(()=>this.store$.dispatch((0,N.xK)({canDeactivate:!1})))}fetchAvailablePaymentMethodRequest(){(0,f.z)([this.locationNumber,this.hccCentreNumber]).pipe((0,h.Q)(this.destroy$)).subscribe(([pt,x])=>{this.store$.dispatch((0,o.md)(x||pt?{params:{locationType:y.L.byLocationNumber,centreNumber:x??pt,productType:this.productType}}:{params:{locationType:y.L.defaultCentre,productType:this.productType}}))})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}static{this.\u0275fac=function(x){return new(x||_t)(n.rXU(d.ze),n.rXU(M.il))}}static{this.\u0275cmp=n.VBU({type:_t,selectors:[["iwg-add-payment-method"]],inputs:{paymentMethods:"paymentMethods",locationNumber:"locationNumber",hccCentreNumber:"hccCentreNumber",listType:"listType",hccType:"hccType",preAuthAmount:"preAuthAmount",isSingleUseCard:"isSingleUseCard",isCompanyDefault:"isCompanyDefault",productType:"productType",storeAccount:"storeAccount",cashierPrefill:"cashierPrefill",companyAddress:"companyAddress",captchaInvisible:"captchaInvisible",insideCheckout:"insideCheckout"},outputs:{hasMultipleTypeOptions:"hasMultipleTypeOptions"},decls:6,vars:7,consts:[[1,"loader-full-height",3,"loading"],[3,"formGroup"],[1,"content",3,"ngSwitch"],[3,"locationNumber$","hccCentreNumber","isSingleUseCard","authMessageVisible","captchaInvisible","hccType","preauthorizationAmount","isCompanyDefault","showCountryDropdown","productType","storeAccount","cashierPrefill","companyAddress","insideCheckout","visible",4,"ngSwitchCase"],[4,"ngSwitchCase"],["titleKey","name","idKey","id","valueKey","id","labelText","USER_PROFILE.ADD_PAYMENT_METHOD.PAYMENT_METHOD","wrapperId","UserProfile_AddPaymentMethod_PaymentMethod","formControlName","paymentMethodType",3,"options","isRequired"],[3,"locationNumber$","hccCentreNumber","isSingleUseCard","authMessageVisible","captchaInvisible","hccType","preauthorizationAmount","isCompanyDefault","showCountryDropdown","productType","storeAccount","cashierPrefill","companyAddress","insideCheckout","visible"]],template:function(x,it){1&x&&(n.j41(0,"iwg-loader",0),n.nI1(1,"async"),n.DNE(2,D,2,3,"ng-container",1),n.j41(3,"div",2),n.DNE(4,U,1,15,"iwg-add-payment-method-card",3)(5,gt,1,0,"iwg-add-payment-method-direct-debit",4),n.k0s()()),2&x&&(n.Y8G("loading",!it.paymentMethodOptions.length||n.bMT(1,5,it.isTransactionStatusLoading$)),n.R7$(2),n.vxM(it.paymentMethodOptions.length>1?2:-1),n.R7$(),n.Y8G("ngSwitch",it.selectedPaymentMethod),n.R7$(),n.Y8G("ngSwitchCase",it.PaymentMethodType.paymentCard),n.R7$(),n.Y8G("ngSwitchCase",it.PaymentMethodType.directDebit))},dependencies:[G.ux,G.e1,k.V,d.BC,d.cb,d.j4,d.JD,R.P,J.O,ot,G.Jj],styles:[".content[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;margin-top:4rem}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.content[_ngcontent-%COMP%]{flex:none}}.content[_ngcontent-%COMP%]   iwg-add-payment-method-direct-debit[_ng
1content-%COMP%]{height:100%}.payment-method[_ngcontent-%COMP%]{width:50%}@media (max-width: 1023.98px){.payment-method[_ngcontent-%COMP%]{width:100%}}"]})}}(0,t.Cg)([(0,P.W)()],_t.prototype,"paymentMethods",void 0),(0,t.Cg)([(0,P.W)()],_t.prototype,"locationNumber",void 0),(0,t.Cg)([(0,P.W)(null)],_t.prototype,"hccCentreNumber",void 0),(0,t.Cg)([(0,P.W)()],_t.prototype,"listType",void 0)},34138:(lt,O,e)=>{e.d(O,{t:()=>$});var t=e(54438),n=e(89417),d=e(21413),s=e(5964),_=e(56977),f=e(96697),g=e(70152),h=e(23294),C=e(3133),T=e(69465),m=e(89921),I=e(30480),y=e(3135),o=e(74941),P=e(95651),N=e(85798);class a extends n.k0{static hasWhiteSpace(){return ot=>ot.value&&ot.value&&/\s/.test(ot.value)?{hasWhiteSpace:!0}:null}}var M=e(95585),G=e(59640),k=e(60177),R=e(39642),J=e(9993),H=e(68018);const et=Z=>({field:Z}),st=Z=>({ConsumerInput_Field:Z});function Et(Z,ot){if(1&Z&&t.eu8(0,6),2&Z){const D=t.XpG().$implicit,U=t.XpG(2),gt=t.sdS(2);t.Y8G("ngTemplateOutlet",gt)("ngTemplateOutletContext",t.eq3(2,et,U.validationFields[D.key]))}}function dt(Z,ot){if(1&Z){const D=t.RV6();t.j41(0,"iwg-bank-code",7),t.bIt("bankCodeValueChanged",function(gt){t.eBV(D);const _t=t.XpG().$implicit,ct=t.XpG(2);return t.Njj(ct.bankCodeValueChanged(gt,_t.key))}),t.k0s()}if(2&Z){const D=t.XpG().$implicit,U=t.XpG(2);t.Y8G("bankCode",U.validationFields[D.key])("value",null==U.initialValue?null:U.initialValue.banksortcode)}}function Nt(Z,ot){if(1&Z&&(t.j41(0,"div"),t.DNE(1,Et,1,4,"ng-container",4)(2,dt,1,2,"iwg-bank-code",5),t.k0s()),2&Z){const D=ot.$implicit,U=t.XpG(2);t.R7$(),t.Y8G("ngIf",!(null!=U.validationFields[D.key]&&U.validationFields[D.key].values&&null!=U.validationFields[D.key]&&U.validationFields[D.key].values.length)),t.R7$(),t.Y8G("ngIf",(null==U.validationFields[D.key]?null:U.validationFields[D.key].values)&&(null==U.validationFields[D.key]||null==U.validationFields[D.key].values?null:U.validationFields[D.key].values.length))}}function V(Z,ot){if(1&Z&&(t.qex(0),t.j41(1,"form",2),t.DNE(2,Nt,3,2,"div",3),t.nI1(3,"keyvalue"),t.k0s(),t.bVm()),2&Z){const D=t.XpG();t.R7$(),t.Y8G("formGroup",D.bankAccountDetailsForm),t.R7$(),t.Y8G("ngForOf",D.getSortedControls(t.bMT(3,2,D.bankAccountDetailsForm.controls)))}}function mt(Z,ot){if(1&Z&&(t.nrm(0,"iwg-text-input-wrapper",12),t.nI1(1,"translate")),2&Z){const D=t.XpG(2).field,U=t.XpG();t.Y8G("formControl",U.bankAccountDetailsForm.get((null==D.name?null:D.name.toLowerCase())+"confirmation"))("wrapperId",U.wrapperId+"_"+(null==D.name?null:D.name.toLowerCase())+"-confirmation")("labelText",t.i5U(1,3,"BILLINGPAYMENT.DIRECT_DEBIT.CONFIRM_FIELD",t.eq3(6,st,D.description)))}}function Pt(Z,ot){if(1&Z&&(t.j41(0,"div",9),t.nrm(1,"iwg-text-input-wrapper",10),t.DNE(2,mt,2,8,"iwg-text-input-wrapper",11),t.k0s()),2&Z){const D=t.XpG().field,U=t.XpG();t.R7$(),t.Y8G("formControl",U.bankAccountDetailsForm.get(null==D.name?null:D.name.toLowerCase()))("wrapperId",U.wrapperId+"_"+(null==D.name?null:D.name.toLowerCase()))("iconTooltip",D.hint)("iconTooltipHtml",!0)("labelText",D.description),t.R7$(),t.Y8G("ngIf",D.confirmationRequired)}}function l(Z,ot){if(1&Z&&t.DNE(0,Pt,3,6,"div",8),2&Z){const D=ot.field;t.Y8G("ngIf",D&&D.visible)}}let $=(()=>{class Z{constructor(D,U,gt){this.fb=D,this.appConfigService=U,this.store$=gt,this.unsubscribe$=new d.B,this.paymentOrigin=o.f.Domestic,this.wrapperId="",this.bankAccountDetailsChanged=new t.bkB,this.bankAccountDetailsValidityChanged=new t.bkB,this.validationResponse=new t.bkB,this.debounceTime=Number.parseInt(this.appConfigService.get("inputDebounceTime"),10)||0,this.validationInProgress=!1,this.validationSuccessfulOrDisabled=!1}ngOnInit(){this.getValidationFields(),this.createForm(),this.store$.select(I.ov).pipe((0,s.p)(D=>!!D),(0,_.Q)(this.unsubscribe$)).subscribe(D=>{this.validateDetails(D)}),this.store$.select(y.bU).pipe((0,_.Q)(this.unsubscribe$)).subscribe(D=>this.directDebitType=D),this.store$.select(I.c$).pipe((0,_.Q)(this.unsubscribe$)).subscribe(D=>{this.validationSuccessfulOrDisabled=D,this.emitFormChanges()}),this.initialValue&&this.bankAccountDetailsForm?.patchValue(this.initialValue)}ngOnChanges(D){D.fields&&(this.resetControl(this.bankAccountDetailsForm),this.getValidationFields(),this.createForm())}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete(),this.store$.dis
1patch(m.Ct())}resetControl(D){D?.enable(),D?.reset(),D?.statusChanges.pipe((0,f.s)(1),(0,_.Q)(this.unsubscribe$)).subscribe(()=>D?.markAsPristine())}emitFormChanges(){let D=!0;Object.keys(this.bankAccountDetailsForm.controls).forEach(U=>{this.bankAccountDetailsForm.controls[U].valid||(D=!1)}),this.bankAccountDetailsValidityChanged.emit(this.bankAccountDetailsForm.valid&&D&&this.validationSuccessfulOrDisabled),this.bankAccountDetailsChanged.emit(this.bankAccountDetailsForm.value)}createForm(){this.bankAccountDetailsForm=this.fb.group({...this.directDebitFormGroup()}),this.bankAccountDetailsForm.valueChanges.pipe((0,g.B)(this.debounceTime),(0,h.F)(),(0,_.Q)(this.unsubscribe$)).subscribe(()=>{this.setValidationErrors(!1),this.emitFormChanges(),this.requestValidation()}),this.bankAccountDetailsForm.statusChanges.pipe((0,f.s)(Object.keys(this.bankAccountDetailsForm.controls).length),(0,_.Q)(this.unsubscribe$)).subscribe(()=>this.bankAccountDetailsForm.markAsPristine())}directDebitFormGroup(){const D={};return this.validationFields&&Object.keys(this.validationFields).forEach(U=>{this.validationFields[U]?.visible&&(this.validationFields[U].confirmationRequired&&(D[U+"confirmation"]=(0,C.Ny)(new n.hs("",[n.k0.required,(0,C.ZP)((0,T.Y)(U,this.unsubscribe$),{ConsumerInputField:this.validationFields[U].description})]),{required:"BILLINGPAYMENT.DIRECT_DEBIT.VALIDATION_ERRORS.REQUIRED",nomatch:"BILLINGPAYMENT.DIRECT_DEBIT.VALIDATION_ERRORS.NO_MATCH"})),D[U]=this.createDirectDebitFormControl({field:this.validationFields[U]}))}),D}createDirectDebitFormControl(D){const U=D.field||{},gt={ConsumerInputField:U.description},_t="BILLINGPAYMENT.DIRECT_DEBIT.VALIDATION_ERRORS.VALIDATION_FAILURE";return(0,C.Ny)(new n.hs(D.placeholder||null,[U.required?(0,C.ZP)(n.k0.required,gt):n.k0.nullValidator,U.validationRegex&&"iban"!==U.name?(0,C.ZP)(n.k0.pattern(U.validationRegex),gt):n.k0.nullValidator,"iban"===U.name?n.k0.compose([N.h.isInvalidIban(this.validationFields.countryIsoCode),a.hasWhiteSpace()]):n.k0.nullValidator]),{required:"BILLINGPAYMENT.DIRECT_DEBIT.VALIDATION_ERRORS.REQUIRED",pattern:"BILLINGPAYMENT.DIRECT_DEBIT.VALIDATION_ERRORS.INVALID",validationFailure:_t,isInvalidIban:_t,hasWhiteSpace:_t})}requestValidation(){if(this.bankAccountDetailsForm.valid&&this.fields.shouldValidate){const D=[];Object.keys(this.bankAccountDetailsForm.controls).forEach(U=>{D.push({name:"iban"===U?"iban":this.fields.mandatoryFields.find(gt=>(0,P.KE)(gt)===U),value:this.bankAccountDetailsForm.controls[U].value})}),D.length&&this.store$.dispatch(m.NF({validationRequest:{countryIsoCode:this.validationFields.countryIsoCode,paymentOrigin:this.paymentOrigin,validationType:this.validationType,fields:D}}))}}validateDetails(D){D?.isValid||this.setValidationErrors(!0),this.emitFormChanges(),this.validationResponse.emit(D)}bankCodeValueChanged(D,U){this.bankAccountDetailsForm.controls[U]?.setValue(D)}isFieldMandatory(D){return D&&this.fields?.mandatoryFields?.map(U=>(0,P.KE)(U)).includes(D.name?.toLowerCase())}getValidationFields(){this.validationFields={},this.validationFields.countryIsoCode=this.fields.countryIsoCode,this.fields.isIbanSupported&&this.fields.iban?this.validationFields.iban=this.fields.iban:Object.keys(this.fields).forEach(D=>{this.isFieldMandatory(this.fields[D])&&(this.validationFields[D]=this.fields[(0,P.KE)(D)])})}getSortedControls(D){const U=[...D].sort((_t,ct)=>this.fields[_t.key]?.sortOrder-this.fields[ct.key]?.sortOrder);return[...this.fields?.mandatoryFields?.map(_t=>(0,P.KE)(_t))??[]].reverse().forEach(_t=>{const ct=U.findIndex(pt=>(0,P.KE)(pt.key)===_t);-1!==ct&&U.unshift(U.splice(ct,1)[0])}),U}setValidationErrors(D){Object.keys(this.bankAccountDetailsForm.controls).forEach(U=>{this.bankAccountDetailsForm.controls[U]?.setErrors({validationFailure:D||null},{emitEvent:!1}),D||this.bankAccountDetailsForm.controls[U]?.updateValueAndValidity({emitEvent:!1})})}static{this.\u0275fac=function(U){return new(U||Z)(t.rXU(n.ze),t.rXU(M.R),t.rXU(G.il))}}static{this.\u0275cmp=t.VBU({type:Z,selectors:[["iwg-bank-account-details"]],inputs:{fields:"fields",paymentOrigin:"paymentOrigin",initialValue:"initialValue",wrapperId:"wrapperId",validationType:"validationType"},outputs:{bankAccountDetailsChanged:"bankAccountDetailsChanged",bankAccountDetailsValidityChanged:"bankAccountDetailsValidityChanged",validationResponse:"validationResponse"},features:[t.OA$],decls:3,vars:1,consts:[["directDebitField",""],[4,"ngIf"],[1,"setup-form",3,"formGroup"],[4,"ngFor","ngForOf"],[3,"ngTemplateOutlet","ngTemplateOutletContext",4,"ngIf"],["wrapperId","direct-debit-setup-",3,"bankCode","value","bankCodeValueChanged",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["wrapperId","direct-debit-setup-",3,"bankCodeValueChanged","bankCode","value"],["class","setup-form__inline-group",4,"ngIf"],[1,"setup-form__inline-group"],[1,"setup-form__inline-group__input-field",3,"formControl","wrapperId","iconTooltip","iconTooltipHtml","labelText"],["class","setup-form__inline-group__input-field",3,"formControl","wrapperId","labelText",4,"ngIf"],[1,"setup-form__inline-group__input-field",3,"formControl","wrapperId","labelText"]],template:function(U,gt){1&U&&t.DNE(0,V,4,4,"ng-container",1)(1,l,1,1,"ng-template",null,0,t.C5r),2&U&&t.Y8G("ngIf",gt.validationFields)},dependencies:[k.Sq,k.bT,k.T3,n.qT,n.BC,n.cb,n.l_,n.j4,R.C,J.V,k.lG,H.D9],styles:[".setup-form[_ngcontent-%COMP%]{display:flex;flex-direction:column}.setup-form__inline-group[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin:1rem -2rem}.setup-form__inline-group__input-field[_ngcontent-%COMP%]{flex:1;margin:0 2rem}@media (max-width: 1023.98px){.setup-form__inline-group__input-field[_ngcontent-%COMP%]{margin:1rem 0}}@media (max-width: 1023.98px){.setup-form__inline-group[_ngcontent-%COMP%]{flex-direction:column;margin:0}}.setup-form__input-field[_ngcontent-%COMP%]{margin:1rem 0}"]})}}return Z})()},9993:(lt,O,e)=>{e.d(O,{V:()=>I});var t=e(54438),n=e(89417),d=e(21413),s=e(56977),_=e(3133),f=e(68018),g=e(60177),h=e(39642),C=e(31476);function T(y,o){if(1&y&&t.nrm(0,"iwg-dropdown",4),2&y){const P=t.XpG
1();t.Y8G("wrapperId",P.wrapperId+"_"+(null==P.bankCode.name?null:P.bankCode.name.toLowerCase())+"-dropdown")("hintText",P.bankCode.hint)("labelText",P.bankCode.description)("options",P.bankCode.values)("sortAsc",!1)}}function m(y,o){if(1&y&&t.nrm(0,"iwg-text-input-wrapper",5),2&y){const P=t.XpG();t.Y8G("wrapperId",P.wrapperId+"_"+(null==P.bankCode.name?null:P.bankCode.name.toLowerCase())+"-input")("placeholderText",P.getPlaceholder())}}let I=(()=>{class y{constructor(P,N){this.fb=P,this.translateService=N,this.unsubscribe$=new d.B,this.wrapperId="",this.bankCodeValueChanged=new t.bkB,this.showInput=!1}ngOnInit(){this.bankCodeForm=this.fb.group({bankCodeDropdown:(0,_.Ny)(new n.hs("",[this.bankCode.required?(0,_.ZP)(n.k0.required,{ConsumerInputField:this.bankCode.description}):n.k0.nullValidator]),{required:"BILLINGPAYMENT.DIRECT_DEBIT.VALIDATION_ERRORS.REQUIRED"}),bankCodeInput:(0,_.Ny)(new n.hs("",this.getInputValidators()),{required:"BILLINGPAYMENT.DIRECT_DEBIT.VALIDATION_ERRORS.REQUIRED",pattern:"BILLINGPAYMENT.DIRECT_DEBIT.VALIDATION_ERRORS.INVALID"})}),this.handleFormChanges(),this.setInitialValue()}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}getPlaceholder(){const N=this.translateService.instant(`BILLINGPAYMENT.DIRECT_DEBIT.FIELDS.${this.bankCode.name.toUpperCase()}_PLACEHOLDER`);return N.includes("BILLINGPAYMENT")?"":N}setInitialValue(){if(this.value){const P=this.bankCode.values.find(M=>M.id===this.value),N=this.bankCode.values.find(M=>"xxx"===M.id);this.bankCodeForm.setValue(P?{bankCodeDropdown:P,bankCodeInput:null}:{bankCodeDropdown:N,bankCodeInput:this.value})}}handleFormChanges(){this.bankCodeForm.valueChanges.pipe((0,s.Q)(this.unsubscribe$)).subscribe(P=>{this.showInput=P&&"xxx"===P.bankCodeDropdown?.id,this.bankCodeForm.get("bankCodeInput").setValidators(this.getInputValidators()),this.bankCodeValueChanged.emit(this.showInput?P.bankCodeInput:P.bankCodeDropdown?.id)})}getInputValidators(){const P=[];return this.bankCode.validationRegex&&P.push((0,_.ZP)(n.k0.pattern(this.bankCode.validationRegex),{ConsumerInputField:this.bankCode.description})),this.bankCode.required&&this.showInput&&P.push((0,_.ZP)(n.k0.required,{ConsumerInputField:this.bankCode.description})),P}static{this.\u0275fac=function(N){return new(N||y)(t.rXU(n.ze),t.rXU(f.c$))}}static{this.\u0275cmp=t.VBU({type:y,selectors:[["iwg-bank-code"]],inputs:{wrapperId:"wrapperId",bankCode:"bankCode",value:"value"},outputs:{bankCodeValueChanged:"bankCodeValueChanged"},decls:5,vars:3,consts:[[1,"setup-form",3,"formGroup"],[1,"form-field"],["formControlName","bankCodeDropdown","idKey","id","titleKey","translatedDescription","placeholder","COMMON.PLEASE_SELECT_PLACEHOLDER",3,"wrapperId","hintText","labelText","options","sortAsc",4,"ngIf"],["formControlName","bankCodeInput",3,"wrapperId","placeholderText",4,"ngIf"],["formControlName","bankCodeDropdown","idKey","id","titleKey","translatedDescription","placeholder","COMMON.PLEASE_SELECT_PLACEHOLDER",3,"wrapperId","hintText","labelText","options","sortAsc"],["formControlName","bankCodeInput",3,"wrapperId","placeholderText"]],template:function(N,a){1&N&&(t.j41(0,"form",0)(1,"div",1),t.DNE(2,T,1,5,"iwg-dropdown",2),t.k0s(),t.j41(3,"div",1),t.DNE(4,m,1,2,"iwg-text-input-wrapper",3),t.k0s()()),2&N&&(t.Y8G("formGroup",a.bankCodeForm),t.R7$(2),t.Y8G("ngIf",a.bankCode.values&&a.bankCode.values.length),t.R7$(2),t.Y8G("ngIf",a.showInput))},dependencies:[g.bT,n.qT,n.BC,n.cb,n.j4,n.JD,h.C,C.P],styles:[".form-field[_ngcontent-%COMP%]{margin:1rem 0}"]})}}return y})()},54933:(lt,O,e)=>{e.d(O,{h:()=>l});var t=e(89417),n=e(84412),d=e(84572),s=e(5964),_=e(96697),f=e(56977),g=e(23294),h=e(41434),C=e(3133),T=e(13997),m=e(62233),I=e(34905),y=e(12851),o=e(28213),P=e(41668),N=e(65761),a=e(19662),M=e(54438),G=e(59640),k=e(95585),R=e(60177),J=e(69594),H=e(51277),et=e(68018),st=e(39642),Et=e(31476),dt=e(10430);const Nt=["toggleButton"],V=$=>({countryIsoCode:$}),mt=()=>({required:"PAYMENT.CARD_BILLING_ADDRESS.REQUIRED"});function Pt($,Z){if(1&$&&(M.j41(0,"div",6),M.nrm(1,"iwg-dropdown",17),M.nI1(2,"translateStateWithFallback"),M.nI1(3,"async"),M.nI1(4,"translateStateWithFallback"),M.k0s()),2&$){const ot=M.XpG();M.R7$(),M.Y8G("isSearchable",!0)("labelText",M.i5U(2,6,"PAYMENT.CARD_BILLING_ADDRESS.LABELS.COUNTY_STATE_PROVINCE",M.eq3(14,V,ot.countryIsoCode)))("options",M.bMT(3,9,ot.counties$))("searchType",ot.dropdownIncludesSearchType)("placeholder",M.i5U(4,11,"PAYMENT.CARD_BILLING_ADDRESS.LABELS.COUNTY_STATE_PROVINCE",M.eq3(16,V,ot.countryIsoCode)))("errors",M.lJ4(18,mt))}}let l=(()=>{class $ extends h.G{static{this.billingAddressRequiredMessage="PAYMENT.CARD_BILLING_ADDRESS.REQUIRED"}set disabled(ot){this.setDisabledState(ot)}constructor(ot,D,U,gt){super(),this.ngControl=ot,this.store$=D,this.fb=U,this.config=gt,this.addressDetail
1sForm=this.fb.group({country:(0,C.Ny)(["",t.k0.required],{required:$.billingAddressRequiredMessage}),countyStateProvince:(0,C.Ny)(["",t.k0.required],{required:$.billingAddressRequiredMessage}),addressLines:this.fb.group({addressLine1:(0,C.Ny)(["",y.m],{required:$.billingAddressRequiredMessage}),addressLine2:[""],addressLine3:[""]}),city:(0,C.Ny)(["",y.m],{required:$.billingAddressRequiredMessage}),postcode:(0,C.Ny)(["",y.m],{required:$.billingAddressRequiredMessage}),phoneNumber:[null]}),this.debounceTime=this.config.get("inputDebounceTime"),this.useCompanyAddress=!1,this.companyAddress=null,this.info$=new n.t(null),this.countries$=this.store$.select(m.iU),this.dropdownIncludesSearchType=I.W.Includes,this.ngControl&&(this.ngControl.valueAccessor=this)}ngOnInit(){this.setupForm(),this.store$.select(m.BQ).pipe((0,s.p)(ot=>ot),(0,_.s)(1),(0,f.Q)(this.unsubscribe$)).subscribe(()=>this.store$.dispatch((0,P.kp)())),this.info$.pipe((0,f.Q)(this.unsubscribe$)).subscribe(ot=>this.addressToForm(ot)),(0,d.z)([this.store$.select(o.jZ),this.store$.select(N.sZ),this.store$.select(a.XG),this.store$.select(a.Lk)]).pipe((0,s.p)(([ot,D,U,gt])=>!!(ot||D||U||gt)),(0,f.Q)(this.unsubscribe$)).subscribe(([ot,D,U,gt])=>{const _t=ot?.billingAddress??D?.billingAddress;this.accountAddress={billingAddress:U?.billingAddress??gt?.billingAddress??_t},this.useCompanyAddress&&this.info$.next(this.addressToUse)})}get addressToUse(){return this.companyAddress??this.accountAddress}writeValue(ot){this.info$.next(ot)}setDisabledState(ot){ot?Object.keys(this.addressDetailsForm.controls).forEach(D=>{this.addressDetailsForm.controls[D].valid&&"phoneNumber"!==D&&this.addressDetailsForm.get(D).disable()}):this.addressDetailsForm.enable()}setupForm(){this.addressDetailsForm.markAsPristine(),this.addressDetailsForm.valueChanges.pipe((0,T.ec)(),(0,f.Q)(this.unsubscribe$)).subscribe(()=>{this.formToAddress(this.addressDetailsForm.getRawValue()),this.addressDetailsForm.touched&&this.ngControl.control.markAsTouched()}),this.addressDetailsForm.statusChanges.pipe((0,f.Q)(this.unsubscribe$)).subscribe(()=>this.applyComponentState()),this.addressDetailsForm.get("country").valueChanges.pipe((0,s.p)(ot=>ot),(0,g.F)(),(0,f.Q)(this.unsubscribe$)).subscribe(ot=>
1{this.countrySelected(ot),this.updatePostCodeValidator(ot)})}formToAddress(ot){const D={billingAddress:ot&&{countryIsoCode:ot.country??"",addressLine1:ot.addressLines?.addressLine1,addressLine2:ot.addressLines?.addressLine2,addressLine3:ot.addressLines?.addressLine3,city:ot.city,postcode:ot.postcode},phoneNumber:ot.phoneNumber};ot?.country&&ot?.countyStateProvince&&this.counties$.pipe((0,f.Q)(this.unsubscribe$)).subscribe(U=>{D.billingAddress.countyStateProvinceId=U?.find(gt=>gt.id===ot.countyStateProvince)?.id,D.billingAddress.countyStateProvince=U?.find(gt=>gt.id===ot.countyStateProvince)?.stateName}),this.onChange(D),this.applyComponentState()}addressToForm(ot){this.addressDetailsForm.patchValue({country:ot?.billingAddress?.countryIsoCode??"",countyStateProvince:ot?.billingAddress?.countyStateProvinceId??"",addressLines:{addressLine1:ot?.billingAddress?.addressLine1??"",addressLine2:ot?.billingAddress?.addressLine2??"",addressLine3:ot?.billingAddress?.addressLine3??""},city:ot?.billingAddress?.city??"",postcode:ot?.billingAddress?.postcode??"",phoneNumber:(ot?.phoneNumber||this.addressDetailsForm.controls.phoneNumber?.value)??null})}countrySelected(ot){this.countryIsoCode=ot,this.addressDetailsForm.touched&&this.addressDetailsForm.get("countyStateProvince").setValue(void 0),this.updateCountyValidator(ot),this.store$.dispatch((0,m.Bq)({countryIsoCode:ot})),this.counties$=this.store$.select((0,m.ql)(ot)),this.updatePostCo
1deValidator(ot)}updatePostCodeValidator(ot){this.store$.select((0,m.LD)(ot)).pipe((0,_.s)(1),(0,f.Q)(this.unsubscribe$)).subscribe(D=>{const U=this.addressDetailsForm.get("postcode");D?.options.isPostCodeMandatory?U.setValidators([y.m]):U.clearValidators(),U.updateValueAndValidity()})}updateCountyValidator(ot){this.store$.select((0,m.LD)(ot)).pipe((0,_.s)(1),(0,f.Q)(this.unsubscribe$)).subscribe(D=>{D?.options?.isStateMandatory?this.addressDetailsForm.get("countyStateProvince").setValidators([t.k0.required]):this.addressDetailsForm.get("countyStateProvince").clearValidators(),this.addressDetailsForm.get("countyStateProvince").updateValueAndValidity()})}applyComponentState(){this.ngControl&&this.addressDetailsForm.pending&&this.ngControl.control.markAsPending(),this.ngControl&&this.addressDetailsForm.invalid&&this.ngControl.control.setErrors({...this.addressDetailsForm.errors,cardBillingAddressFormInvalid:!0}),this.ngControl&&this.addressDetailsForm.valid&&this.ngControl.control.setErrors(null)}toggleUseCompanyAddress(){this.useCompanyAddress=!this.useCompanyAddress,this.useCompanyAddress&&this.info$.next(this.addressToUse),this.addressDetailsForm.markAsTouched(),this.addressDetailsForm.updateValueAndValidity(),this.setDisabledState(this.useCompanyAddress)}static{this.\u0275fac=function(D){return new(D||$)(M.rXU(t.vO,10),M.rXU(G.il),M.rXU(t.ze),M.rXU(k.R))}}static{this.\u0275cmp=M.VBU({type:$,selectors:[["iwg-card-billing-address-form"]],contentQueries:function(D,U,gt){if(1&D&&M.wni(gt,Nt,5),2&D){let _t;M.mGM(_t=M.lsd())&&(U.toggleButton=_t.first)}},inputs:{companyAddress:"companyAddress",disabled:"disabled"},features:[M.Vt3],decls:32,vars:13,consts:[["id","CardBillingAddress_Details_Title","translate","",1,"iwg-h5-medium","m--b-1"],["id","CardBillingAddress_Details_Subtitle","translate","",1,"iwg-body1","m--b-5"],[1,"m--b-5"],["wrapperId","AddBillingAddress_UseCompany_Toggle","labelText","PAYMENT.CARD_BILLING_ADDRESS.LABELS.USE_COMPANY",3,"valueChanged","value"],[3,"formGroup"],[1,"row"],[1,"col-xs-12","m--b-5"],["formControlName","country","titleKey","name","idKey","isoCodeThreeLetter","valueKey","isoCodeThreeLetter","labelText","PAYMENT.CARD_BILLING_ADDRESS.LABELS.COUNTRY","filterKeys","name","placeholder","PAYMENT.CARD_BILLING_ADDRESS.PLACEHOLDERS.SELECT","wrapperId","AddCard_BillingAddress_Country",3,"isSearchable","options","searchType"],["wrapperId","AddCard_BillingAddress_AddressLines",3,"formGroup"],["formControlName","addressLine1","labelText","PAYMENT.CARD_BILLING_ADDRESS.LABELS.BILLING_ADDRESS","type","text","placeholderText","PAYMENT.CARD_BILLING_ADDRESS.PLACEHOLDERS.ADDRESS_LINE1","wrapperId","AddCard_BillingAddress_AddressLine1",3,"maxLength"],["formControlName","addressLine2","type","text","maxLength","50","placeholderText","PAYMENT.CARD_BILLING_ADDRESS.PLACEHOLDERS.ADDRESS_LINE2","labelText","PAYMENT.CARD_BILLING_ADDRESS.PLACEHOLDERS.ADDRESS_LINE2","wrapperId","AddCard_BillingAddress_AddressLine2"],["formControlName","addressLine3","type","text","maxLength","50","placeholderText","PAYMENT.CARD_BILLING_ADDRESS.PLACEHOLDERS.ADDRESS_LINE3","labelText","PAYMENT.CARD_BILLING_ADDRESS.PLACEHOLDERS.ADDRESS_LINE3","wrapperId","AddCard_BillingAddress_AddressLine3"],["wrapperId","AddCard_BillingAddress_City","formControlName","city","maxLength","40","placeholderText","PAYMENT.CARD_BILLING_ADDRESS.PLACEHOLDERS.CITY","labelText","PAYMENT.CARD_BILLING_ADDRESS.LABELS.CITY"],["class","col-xs-12 m--b-5",4,"ngIf"],["wrapperId","AddCard_BillingAddress_Postcode","formControlName","postcode","maxLength","12","placeholderText","PAYMENT.CARD_BILLING_ADDRESS.PLACEHOLDERS.POSTCODE","labelText","PAYMENT.CARD_BILLING_ADDRESS.LABELS.POSTCODE"],[1,"col-xs-12"],["wrapperId","AddCard_BillingAddress_PhoneNumber","labelText","PAYMENT.CARD_BILLING_ADDRESS.LABELS.PHONE_NUMBER","formControlName","phoneNumber",3,"debounceTime"],["formControlName","countyStateProvince","filterKeys","stateName","titleKey","stateName","idKey","id","valueKey","id","wrapperId","AddCard_BillingAddress_CountyStateProvince",3,"isSearchable","labelText","options","searchType","placeholder","errors"]],template:function(D,U){if
1(1&D&&(M.j41(0,"div",0),M.EFF(1," PAYMENT.CARD_BILLING_ADDRESS.LABELS.ADDRESS_DETAILS"),M.k0s(),M.j41(2,"div",1),M.EFF(3," PAYMENT.CARD_BILLING_ADDRESS.LABELS.ADDRESS_DETAILS_SUBTITLE"),M.k0s(),M.j41(4,"div",2)(5,"iwg-toggle-wrapper",3),M.bIt("valueChanged",function(){return U.toggleUseCompanyAddress()}),M.k0s()(),M.j41(6,"div",4)(7,"div",5)(8,"div",6),M.nrm(9,"iwg-dropdown",7),M.nI1(10,"async"),M.k0s()(),M.j41(11,"div",8)(12,"div",5)(13,"div",6),M.nrm(14,"iwg-text-input-wrapper",9),M.k0s()(),M.j41(15,"div",5)(16,"div",6),M.nrm(17,"iwg-text-input-wrapper",10),M.k0s()(),M.j41(18,"div",5)(19,"div",6),M.nrm(20,"iwg-text-input-wrapper",11),M.k0s()()(),M.j41(21,"div",5)(22,"div",6),M.nrm(23,"iwg-text-input-wrapper",12),M.k0s(),M.DNE(24,Pt,5,19,"div",13),M.nI1(25,"async"),M.k0s(),M.j41(26,"div",5)(27,"div",6),M.nrm(28,"iwg-text-input-wrapper",14),M.k0s()(),M.j41(29,"div",5)(30,"div",15),M.nrm(31,"iwg-phone-number",16),M.k0s()()()),2&D){let gt;M.R7$(5),M.Y8G("value",U.useCompanyAddress),M.R7$(),M.Y8G("formGroup",U.addressDetailsForm),M.R7$(3),M.Y8G("isSearchable",!0)("options",M.bMT(10,9,U.countries$))("searchType",U.dropdownIncludesSearchType),M.R7$(2),M.Y8G("formGroup",U.addressDetailsForm.get("addressLines")),M.R7$(3),M.Y8G("maxLength",50),M.R7$(10),M.Y8G("ngIf",null==(gt=M.bMT(25,11,U.counties$))?null:gt.length),M.R7$(7),M.Y8G("debounceTime",U.debounceTime)}},dependencies:[R.bT,J.D,H.x,t.BC,t.cb,t.j4,t.JD,et.Mm,st.C,Et.P,R.Jj,dt.I],encapsulation:2})}}return $})()},52581:(lt,O,e)=>{e.d(O,{t:()=>V});var t=e(89417),n=e(21413),d=e(70152),s=e(56977),_=e(96354),f=e(23294),g=e(96697),h=e(12517),C=e(3133),T=e(69465),m=e(84598),I=function(mt){return mt.GBR="GBR",mt}(I||{}),y=e(94905),o=e(95651),P=e(54438),N=e(59640);const a=mt=>({field:mt}),M=mt=>({ConsumerInput_Field:mt});function G(mt,Pt){if(1&mt){const l=P.RV6();P.j41(0,"iwg-bank-code",9),P.bIt("bankCodeValueChanged",function(Z){P.eBV(l);const ot=P.XpG(3);return P.Njj(ot.bankCodeValueChanged(Z))}),P.k0s()}if(2&mt){const l=P.XpG(3);P.Y8G("bankCode",l.fields.banksortcode)("value",l.directDebitDetailsForm.value.banksortcode)}}function k(mt,Pt){if(1&mt&&P.eu8(0,10),2&mt){const l=P.XpG().$implicit,$=P.XpG(2),Z=P.sdS(2);P.Y8G("ngTemplateOutlet",Z)("ngTemplateOutletContext",P.eq3(2,a,$.fields[l.key]))}}function R(mt,Pt){if(1&mt&&(P.qex(0),P.DNE(1,G,1,2,"iwg-bank-code",7)(2,k,1,4,"ng-container",8),P.bVm()),2&mt){const l=Pt.$implicit,$=P.XpG(2);P.R7$(),P.Y8G("ngIf",$.showBankCode(l.key)&&!$.isFieldMandatory($.fields[l.key])),P.R7$(),P.Y8G("ngIf",!$.showBankCode(l.key)&&!$.isFieldMandatory($.fields[l.key]))}}function J(mt,Pt){if(1&mt&&(P.qex(0),P.j41(1,"iwg-loader",3),P.nI1(2,"async"),P.j41(3,"form",4),P.eu8(4,5),P.DNE(5,R,3,2,"ng-container",6),P.nI1(6,"keyvalue"),P.k0s()(),P.bVm()),2&mt){const l=P.XpG(),$=P.sdS(4);P.R7$(),P.Y8G("loading",P.bMT(2,5,l.validationInProgress$))("message","COMMON.PROCESSING"),P.R7$(2),P.Y8G("formGroup",l.directDebitDetailsForm),P.R7$(),P.Y8G("ngTemplateOutlet",$),P.R7$(),P.Y8G("ngForOf",l.getSortedControls(P.bMT(6,7,l.directDebitDetailsForm.controls)))}}function H(mt,Pt){if(1&mt&&(P.nrm(0,"iwg-text-input-wrapper",15),P.nI1(1,"translate")),2&mt){const l=P.XpG(2).field,$=P.XpG();P.Y8G("formControl",$.directDebitDetailsForm.get((null==l.name?null:l.name.toLowerCase())+"confirmation"))("wrapperId","direct-debit-setup-"+(null==l.name?null:l.name.toLowerCase())+"-confirmation")("labelText",P.i5U(1,3,"BILLINGPAYMENT.DIRECT_DEBIT.CONFIRM_FIELD",P.eq3(6,M,l.description)))}}function et(mt,Pt){if(1&mt&&(P.j41(0,"div",12),P.nrm(1,"iwg-text-input-wrapper",13),P.DNE(2,H,2,8,"iwg-text-input-wrapper",14),P.k0s()),2&mt){const l=P.XpG().field,$=P.XpG();P.R7$(),P.Y8G("formControl",$.directDebitDetailsForm.get(null==l.name?null:l.name.toLowerCase()))("wrapperId","direct-debit-setup-"+(null==l.name?null:l.name.toLowerCase()))("iconTooltip",l.hint)("labelText",l.description),P.R7$(),P.Y8G("ngIf",l.confirmationRequired)}}function st(mt,Pt){if(1&mt&&P.DNE(0,et,3,5,"div",11),2&mt){const l=Pt.field,$=P.XpG();P.Y8G("ngIf",l&&l.visible&&!$.isFieldMandatory(l))}}function Et(mt,Pt){if(1&mt){const l=P.RV6();P.j41(0,"iwg-bank-account-details",17),P.bIt("bankAccountDetailsChanged",function(Z){P.eBV(l);const ot=P.XpG(2);return P.Njj(ot.bankAccountDetailsChanged(Z))})("bankAccountDetailsValidityChanged",function(Z){P.eBV(l);const ot=P.XpG(2);return P.Njj(ot.bankAccountDetailsValidityChanged(Z))})("validationResponse",function(Z){P.eBV(l);const ot=P.XpG(2);return P.Njj(ot.populateBankAccountDetails(Z))}),P.k0s()}if(2&mt){const l=P.XpG(2);P.Y8G("fields",l.fields)("initialValue",l.initialValue)}}
1function dt(mt,Pt){if(1&mt&&P.DNE(0,Et,1,2,"iwg-bank-account-details",16),2&mt){const l=P.XpG();P.Y8G("ngIf",l.fields)}}let V=(()=>{class mt{constructor(l,$,Z){this.fb=l,this.store=$,this.directDebitProvider=Z,this.unsubscribe$=new n.B,this.bankAccountDetailsValid=!0,this.validationInProgress$=this.store.select(y.J5)}ngOnInit(){this.directDebitDetailsForm=this.fb.group({...this.directDebitFormGroup()}),this.mandatoryFieldIndex=this.getIndexOfMandatoryField(),this.directDebitDetailsForm.valueChanges.pipe((0,d.B)(500),(0,s.Q)(this.unsubscribe$)).subscribe(()=>{this.directDebitProvider.directDebitDetailsFormChanged(this.directDebitDetailsForm.getRawValue())}),this.directDebitDetailsForm.statusChanges.pipe((0,_.T)(l=>l===m.U.VALID),(0,f.F)(),(0,s.Q)(this.unsubscribe$)).subscribe(l=>this.directDebitProvider.directDebitDetailsFormStatusChanged(l&&this.bankAccountDetailsValid)),this.directDebitProvider.getDirectDebitDetails().pipe((0,g.s)(1)).subscribe(l=>{if(l){this.initialValue=l;const $={};Object.keys(l).forEach(Z=>{$[Z]=l[Z],$[Z+"confirmation"]=l[Z]}),this.directDebitDetailsForm.patchValue($),this.directDebitDetailsForm.markAsPristine()}})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}directDebitFormGroup(){const l={};return this.fields&&Object.keys(this.fields).forEach($=>{this.fields[$]?.visible&&(this.fields[$].confirmationRequired&&(l[$+"confirmation"]=(0,C.Ny)(new t.hs("",[t.k0.required,(0,C.ZP)((0,T.Y)($,this.unsubscribe$),{ConsumerInputField:this.fields[$].description})]),{required:"BILLINGPAYMENT.DIRECT_DEBIT.VALIDATION_ERRORS.REQUIRED",nomatch:"BILLINGPAYMENT.DIRECT_DEBIT.VALIDATION_ERRORS.NO_MATCH"})),l[$]=this.createDirectDebitFormControl({field:this.fields[$]}))}),l}createDirectDebitFormControl(l){const $=l.field||{},Z={ConsumerInputField:$.description};return(0,C.Ny)(new t.hs(l.placeholder||"",[$.required?(0,C.ZP)(t.k0.required,Z):t.k0.nullValidator,$.validationRegex?(0,C.ZP)(t.k0.pattern($.validationRegex),Z):t.k0.nullValidator]),{required:"BILLINGPAYMENT.DIRECT_DEBIT.VALIDATION_ERRORS.REQUIRED",pattern:"BILLINGPAYMENT.DIRECT_DEBIT.VALIDATION_ERRORS.INVALID"})}inlineSortCodeAndAccountNumber(){return this.fields.countryIsoCode.toUpperCase()===I.GBR}bankCodeValueChanged(l){this.directDebitDetailsForm.get(this.fields.banksortcode.name?.toLowerCase())?.setValue(l)}isFieldMandatory(l){const $=l?.name?.toLowerCase();return!("iban"!==$||!this.fields.isIbanSupported)||this.fields?.mandatoryFields?.map(Z=>(0,o.KE)(Z)?.toLowerCase())?.includes($)}bankAccountDetailsChanged(l){this.directDebitDetailsForm.patchValue(l),this.populateBankAccountDetails(null)}bankAccountDetailsValidityChanged(l){this.bankAccountDetailsValid=l,this.directDebitProvider.directDebitDetailsFormStatusChanged(l&&this.directDebitDetailsForm.valid)}populateBankAccountDetails(l){l?.isValid?Object.keys(l.bankData).filter($=>l.bankData[$]).forEach($=>{const Z=this.directDebitDetailsForm.controls[$?.toLowerCase()];Z?.setValue(l.bankData[$]),Z?.disable()}):Object.keys(this.directDebitDetailsForm.controls).forEach($=>{const Z=this.directDebitDetailsForm.controls[$];Z?.disabled&&(Z?.enable(),Z?.reset(),Z?.statusChanges.pipe((0,g.s)(1)).subscribe(()=>Z?.markAsPristine()))})}getIndexOfMandatoryField(){let l,$;return Object.keys(this.fields).filter(Z=>this.fields[Z]?.visible).sort((Z,ot)=>this.fields[Z]?.sortOrder-this.fields[ot]?.sortOrder).forEach((Z,ot)=>{"iban"!==Z?.toLowerCase()&&this.isFieldMandatory(this.fields[Z])&&[null,void 0].includes(l)&&(l=ot),"iban"===Z?.toLowerCase()&&($=ot)}),this.fields.isIbanSupported&&![null,void 0].includes($)?$:l}showBankCode(l){return this.fields[l]?.values?.length>0}getSortedControls(l){return l.sort(($,Z)=>this.fields[$.key]?.sortOrder-this.fields[Z.key]?.sortOrder)}static{this.\u0275fac=function($){return new($||mt)(P.rXU(t.ze),P.rXU(N.il),P.rXU(h.J))}}static{this.\u0275cmp=P.VBU({type:mt,selectors:[["iwg-direct-debit-details-form"]],inputs:{fields:"fields"},decls:5,vars:1,consts:[["directDebitField",""],["bankaccountdetails",""],[4,"ngIf"],[3,"loading","message"],[1,"setup-form",3,"formGroup"],[3,"ngTemplateOutlet"],[4,"ngFor","ngForOf"],["wrapperId","direct-debit-setup-",3,"bankCode","value","bankCodeValueChanged",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext",4,"ngIf"],["wrapperId","direct-debit-setup-",3,"bankCodeValueChanged","bankCode","value"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["class","setup-form__inline-group",4,"ngIf"],[1,"setup-form__inline-group"],[1,"setup-form__inline-group__input-field",3,"formControl","wrapperId","iconTooltip","labelText"],["class","setup-form__inline-group__input-field",3,"formControl","wrapperId","labelText",4,"ngIf"],[1,"setup-form__inline-group__input-field",3,"formControl","wrapperId","labelText"],["wrapperId","direct-debit-setup-",3,"fields","initialValue","bankAccountDetailsChanged","bankAccountDetailsValidityChanged","validationResponse",4,"ngIf"],["wrapperId","direct-debit-setup-",3,"bankAccountDetailsChanged","bankAccountDetailsValidityChanged","validationResponse","fields","initialValue"]],template:function($,Z){1&$&&P.DNE(0,J,7,9,"ng-container",2)(1,st,1,1,"ng-template",null,0,P.C5r)(3,dt,1,1,"ng-template",null,1,P.C5r),2&$&&P.Y8G("ngIf",Z.fields)},styles:[".setup-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-bottom:3rem}.setup-form__inline-group[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin:1rem -4rem}.setup-form__inline-group__input-field[_ngcontent-%COMP%]{flex:1;margin:0 4rem}@media (max-width: 1023.98px){.setup-form__inline-group__input-field[_ngcontent-%COMP%]{margin:1rem 0}}@media (max-width: 1023.98px){.setup-form__inline-group[_ngcontent-%COMP%]{flex-direction:column;margin:0}}.setup-form__input-field[_ngcontent-%COMP%]{margin:1rem 0}"]})}}return mt})()},12517:(lt,O,e)=>{e.d(O,{J:()=>n});const n=new(e(54438).nKC)("DirectDebitDetailsFormProvider")},26377:(lt,O,e)=>{e.d(O,{U:()=>Pt});var t=e(54438),n=e(79832),d=e(44885),s=e(60983),_=e(21413),f=e(7673),g=e(23294),h=e(56977),C=e(69671),T=e(69924),m=e(60177),I=e(76864),y=e(5404),o=e(68018),P=e(12262),N=e(53122),a=e(96518);const M=["placeholder"],G=["*"],k=()=>[0,1];function R(l,$){if(1&l&&(t.j41(0,"span",13),t.EFF(1),t.k0s()),2&l){const Z=t.XpG(2);t.R7$(),t.JRh(Z.title)}}function J(l,$){if(1&l&&t.nrm(0,"iwg-stepper",16),2&l){const Z=t.XpG(4);t.Y8G("stepsCount",Z.stepsCount)("currentStep",Z.currentStep)}}function H(l,$){1&l&&t.nrm(0,"span"),2&l&&t.ZvI("path",$.index+1,"")}function et(l,$){1&l&&(t.j41(0,"span",17),t.DNE(1,H,1,3,"span",18),t.k0s()),2&l&&(t.R7$(),t.Y8G("ngForOf",t.lJ4(1,k)))}function st(l,$){if(1&l&&t.DNE(0,J,1,2,"iwg-stepper",14)(1,et,2,2,"span",15),2&l){const Z=t.XpG(3);t.Y8G("ngIf",Z.hasNextStep()),t.R7$(),t.Y8G("ngIf",Z.hasSuccessIcon())}}function Et(l,$){1&l&&t.DNE(0,st,2,2,"ng-template",null,3,t.C5r)}function dt(l,$){1&l&&(t.j41(0,"span",19),t.EFF(1,"COMMON.NEXT"),t.k0s())}function Nt(l,$){1&l&&(t.j41(0,"span",19),t.EFF(1,"COMMON.CONFIRM"),t.k0s())}function V(l,$){1&l&&(t.j41(0,"span",19),t.EFF(1,"COMMON.DONE"),t.k0s())}function mt(l,$){if(1&l){const Z=t.RV6();t.j41(0,"iwg-modal-flyout",5),t.bIt("closeModal",function(){t.eBV(Z);const D=t.XpG();return t.Njj(D.onClose())})("back",function(){t.eBV(Z);const D=t.XpG();return t.Njj(D.onBack())}),t.nrm(1,"div",null,0),t.j41(3,"iwg-page-header",6),t.DNE(4,R,2,1,"ng-template",null,1,t.C5r)(6,Et,2,0,null,7),t.k0s(),t.j41(7,"iwg-loader",8,2),t.nI1(9,"async"),t.SdG(10),t.k0s(),t.j41(11,"footer")(12,"div",9)(13,"iwg-button",10),t.bIt("click",function(){t.eBV(Z);const D=t.XpG();return t.Njj(D.onClick())})("keydown.enter",function(){t.eBV(Z);const D=t.XpG();return t.Njj(D.onClick())}),t.qex(14,11),t.DNE(15,dt,2,0,"span",12)(16,Nt,2,0,"span",12)(17,V,2,0,"span",12),t.bVm(),t.k0s()()()()}if(2&l){const Z=t.XpG();t.Y8G("hasCloseButton",Z.hasCloseButton())("hasBackButton",Z.hasBackButton()),t.R7$(3),t.Y8G("pageSizeType",Z.pageSizeType),t.R7$(3),t.Y8G("ngIf",Z.hasNextStep()||Z.hasSuccessIcon()),t.R7$(),t.Y8G("loading",t.bMT(9,10,Z.pageLoading$)),t.R7$(6),t.Y8G("disabled",Z.nextStepDisabled||Z.pageLoading),t.R7$(),t.Y8G("ngSwitch",Z.currentStep),t.R7$(),t.Y8G("ngSwitchCase",Z.DirectDebitStep.Setup),t.R7$(),t.Y8G("ngSwitchCase",Z.DirectDebitStep.Review),t.R7$(),t.Y8G("ngSwitchCase",Z.DirectDebitStep.Finish)}}let Pt=(()=>{class l extends C.f{constructor(Z){super(),this.flyoutProvider=Z,this.DirectDebitStep=n.M,this.pageSizeType=T.l.Flyout,this.modalResult=new t.bkB,this.unsubscribe$=new _.B,this.pageLoading=!1,this.pageLoading$=this.flyoutProvider.isPageLoading?this.flyoutProvider.isPageLoading():(0,f.of)(!1)}ngOnInit(){this.directDebitType=this.flyoutProvider.getDirectDebitType(),this.title=this.getTitle(),this.stepsCount=this.directDebitType===s.y.Simple?1:2}ngAfterViewInit(){this.flyoutProvider.isPageLoading&&this.flyoutProvider.isPageLoading().pipe((0,g.F)(),(0,h.Q)(this.unsubscribe$)).subscribe(Z=>{this.pageLoading=Z,this.flyoutTop?.nativeElement&&this.flyoutTop.nativeElement.scrollIntoView({behavior:"smooth"})})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}canDeactivateModal(){return this.flyoutProvider.confirmBeforeNavigation&&this.flyoutProvider.confirmBeforeNavigation()?{key:"EXIT_MODAL.TITLE",subtitle:"EXIT_MODAL.SUBTITLE"}:null}
1onClick(){this.flyoutProvider.nextStep(),this.modalResult.emit()}onBack(){this.flyoutProvider.navigateOrClose(),this.modalResult.emit()}onClose(){this.flyoutProvider.navigateOrClose(),this.modalResult.emit()}hasNextStep(){return this.directDebitType!==s.y.Simple&&this.currentStep<n.M.Finish}hasSuccessIcon(){return this.currentStep===n.M.Finish}hasCloseButton(){return[n.M.Setup,n.M.Finish].includes(this.currentStep)}hasBackButton(){return this.currentStep===n.M.Review}getTitle(){const Z=this.directDebitType||s.y.DirectDebit;return`BILLINGPAYMENT.DIRECT_DEBIT.${n.M[this.currentStep||n.M.Setup].toUpperCase().toUpperCase()}.${Z.toUpperCase()}_TITLE`}static{this.\u0275fac=function(ot){return new(ot||l)(t.rXU(d.L))}}static{this.\u0275cmp=t.VBU({type:l,selectors:[["iwg-direct-debit-flyout"]],viewQuery:function(ot,D){if(1&ot&&t.GBs(M,5),2&ot){let U;t.mGM(U=t.lsd())&&(D.flyoutTop=U.first)}},inputs:{currentStep:"currentStep",nextStepDisabled:"nextStepDisabled"},features:[t.Vt3],ngContentSelectors:G,decls:1,vars:1,consts:[["placeholder",""],["headerTitle",""],["directDebitFlyoutLoader",""],["headerIcon",""],["class","iwg-body1",3,"hasCloseButton","hasBackButton","closeModal","back",4,"iwgModal"],[1,"iwg-body1",3,"closeModal","back","hasCloseButton","hasBackButton"],[1,"no-container",3,"pageSizeType"],[4,"ngIf"],[1,"loader",3,"loading"],[1,"container","direct-debit-footer"],["wrapperId","direct-debit-footer__button","type","button","translate","",1,"direct-debit-footer__next",3,"click","keydown.enter","disabled"],[3,"ngSwitch"],["translate","",4,"ngSwitchCase"],["id","flyout-title","translate",""],["wrapperId","direct-debit-flyout-stepper",3,"stepsCount","currentStep",4,"ngIf"],["class","iwg-icon-filled-green-tick","id","direct-debit-flyout-finish-icon",4,"ngIf"],["wrapperId","direct-debit-flyout-stepper",3,"stepsCount","currentStep"],["id","direct-debit-flyout-finish-icon",1,"iwg-icon-filled-green-tick"],[3,"class",4,"ngFor","ngForOf"],["translate",""]],template:function(ot,D){1&ot&&(t.NAR(),t.DNE(0,mt,18,12,"iwg-modal-flyout",4)),2&ot&&t.Y8G("iwgModal",!0)},dependencies:[m.Sq,m.bT,m.ux,m.e1,I.V,y.d,o.Mm,P.Q,T.y,N.h,a.s,m.Jj],styles:[".loader[_ngcontent-%COMP%]{height:40rem}.direct-debit-footer[_ngcontent-%COMP%]{width:100%;background-color:var(--color-bg-secondary, var(--global-neutral-200, #F4F4F5));display:flex;justify-content:flex-end;padding-top:3rem;padding-bottom:3rem}@media (max-width: 1023.98px){.direct-debit-footer[_ngcontent-%COMP%]{padding-top:2.6rem;padding-bottom:2.6rem}}.direct-debit-footer__next[_ngcontent-%COMP%]{text-align:center;text-transform:uppercase;flex:0 1 30%}@media (max-width: 1023.98px){.direct-debit-footer__next[_ngcontent-%COMP%]{flex:1;-webkit-appearance:none}}"]})}}return l})()},79832:(lt,O,e)=>{e.d(O,{M:()=>t});var t=function(n){return n[n.Setup=0]="Setup",n[n.Review=1]="Review",n[n.Finish=2]="Finish",n}(t||{})},44885:(lt,O,e)=>{e.d(O,{L:()=>n});const n=new(e(54438).nKC)("DirectDebitFlyoutProvider")},4706:(lt,O,e)=>{e.d(O,{g:()=>a});var t=e(31635),n=e(54438),d=e(21413),s=e(23294),_=e(96354),f=e(56977),g=e(42092),h=e(9167),C=e(89722);let T=(()=>{class M{checkIsLocalFrame(k){try{return!(!k.contentDocument&&!k.contentWindow.document)}catch{return!1}}getLocationHash(k){return k.hash.slice(1).split("?")[0]}getLocationQueryVariables(k){return k.href.split("?")[1]?.split("&").reduce((R,J)=>{const[H,et]=J.split("=");return R[decodeURIComponent(H)]=et&&decodeURIComponent(et),R},{})}static{this.\u0275fac=function(R){return new(R||M)}}static{this.\u0275prov=n.jDH({token:M,factory:M.\u0275fac,providedIn:"root"})}}return M})();var m=e(345),I=e(59640),y=e(60177),o=e(76864),P=e(68018);function N(M,G){if(1&M){const k=n.RV6();n.j41(0,"iframe",5,0),n.nI1(2,"translate"),n.bIt("load",function(){n.eBV(k);const J=n.sdS(1),H=n.XpG();return n.Njj(H.hccFrameLoaded(J))}),n.k0s()}if(2&M){const k=n.XpG();n.FS9("title",n.bMT(2,3,"PAYMENT.PAYMENT_METHOD_PAYMENTCARD")),n.FS9("height",k.frameHeight),n.Y8G("src",k.safeUrl,n.f$h)}}class a{set paymentProvider(G){this.frameHeight=G===h.wF.ingenico?775:640}constructor(G,k,R){this.iframeUtilsService=G,this.domSanitizer=k,this.store$=R,this.frameLoading=!0,this.frameHeight=640,this.unsubscribe$=new d.B,this.stateChange=new n.bkB,this.isTransactionDetail
1sLoading$=this.store$.select(C.Y3)}ngOnInit(){this.url.pipe((0,s.F)(),(0,_.T)(G=>G?this.domSanitizer.bypassSecurityTrustResourceUrl(G):null),(0,f.Q)(this.unsubscribe$)).subscribe(G=>{this.frameLoading=!!G,this.safeUrl=G})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}hccFrameLoaded(G){if(!this.iframeUtilsService.checkIsLocalFrame(G))return void(this.frameLoading=!1);const{location:k}=G.contentWindow;"about:blank"!==k.href&&this.stateChange.emit({hash:this.iframeUtilsService.getLocationHash(k),variables:this.iframeUtilsService.getLocationQueryVariables(k),hccType:this.hccType,preAuthAmount:this.preAuthAmount})}static{this.\u0275fac=function(k){return new(k||a)(n.rXU(T),n.rXU(m.up),n.rXU(I.il))}}static{this.\u0275cmp=n.VBU({type:a,selectors:[["iwg-payment-card-iframe"]],inputs:{paymentProvider:"paymentProvider",hccType:"hccType",preAuthAmount:"preAuthAmount",url:"url"},outputs:{stateChange:"stateChange"},decls:6,vars:5,consts:[["cardFrame",""],[3,"loading"],["translate","",1,"iwg-h5-medium","m--t-5","m--b-3"],["message","COMMON.PROCESSING",3,"loading"],["class","w-100 b-none",3,"title","src","height","load",4,"ngIf"],[1,"w-100","b-none",3,"load","title","src","height"]],template:function(k,R){1&k&&(n.j41(0,"iwg-loader",1)(1,"div",2),n.EFF(2,"PAYMENT.CARD_DETAILS_LABEL"),n.k0s()(),n.j41(3,"iwg-loader",3),n.nI1(4,"async"),n.DNE(5,N,3,5,"iframe",4),n.k0s()),2&k&&(n.Y8G("loading",R.frameLoading),n.R7$(3),n.Y8G("loading",n.bMT(4,3,R.isTransactionDetailsLoading$)),n.R7$(2),n.Y8G("ngIf",R.safeUrl))},dependencies:[y.bT,o.V,P.Mm,y.Jj,P.D9],styles:["iframe[_ngcontent-%COMP%]{border:none}"]})}}(0,t.Cg)([(0,g.W)(null)],a.prototype,"url",void 0)},19331:(lt,O,e)=>{e.d(O,{K:()=>y});var t=e(54438),n=e(9167),d=e(94905),s=e(23294),_=e(85196),f=e(44469),g=e(51752),h=e(59640),C=e(60177),T=e(68018),m=e(94210);function I(o,P){1&o&&(t.j41(0,"div",0),t.EFF(1," BILLINGPAYMENT.INVOICESTRANSACTIONS.PAY_BALANCE.INVISIBLE_CAPTCHA_LABEL\n"),t.k0s())}let y=(()=>{class o{constructor(N){this.store$=N,this.paymentMethodCardSetup$=this.store$.select(d.Wd).pipe((0,s.F)()),this.cashierPaymentSetup$=this.store$.select(f.gP).pipe((0,s.F)()),this.navigateBack=new t.bkB,this.isOneOffPayment=!1,this.showInvisibleCaptchaMessage=!1,this.cashierPrefill=null}submitState(N){this.store$.dispatch(this.isOneOffPayment?N.callbackType===n.eL.success?(0,g.WM)({externalReference:N.externalReference}):(0,g.Hf)({}):(0,_._m)({hash:N.callbackType,variables:{},hccType:this.hccType,preAuthAmount:this.preAuthAmount,externalReference:N.externalReference}))}static{this.\u0275fac=function(a){return new(a||o)(t.rXU(h.il))}}static{this.\u0275cmp=t.VBU({type:o,selectors:[["iwg-payment-card-worldline"]],inputs:{isOneOffPayment:"isOneOffPayment",hccType:"hccType",preAuthAmount:"preAuthAmount",showInvisibleCaptchaMessage:"showInvisibleCaptchaMessage",cashierPrefill:"cashierPrefill"},outputs:{navigateBack:"navigateBack"},decls:8,vars:9,consts:[["translate","",1,"iwg-body1","m--b-5",2,"text-align","center"],["class","iwg-body1 m--b-5","style","text-align: center;","translate","",4,"ngIf"],["translate","",1,"iwg-h5-medium","m--t-5","m--b-3"],[3,"stateChange","navigateBack","cardSetup","cashierPaymentSetup","isOneOffPayment","cashierPrefill"]],template:function(a,M){1&a&&(t.j41(0,"div",0),t.EFF(1," USER_PROFILE.ADD_PAYMENT_METHOD.CREDIT_OR_DEBIT_CARD.AUTHORIZATION_WORLDLINE\n"),t.k0s(),t.DNE(2,I,2,0,"div",1),t.j41(3,"div",2),t.EFF(4,"PAYMENT.CARD_DETAILS_LABEL"),t.k0s(),t.j41(5,"iwg-worldline-form",3),t.nI1(6,"async"),t.nI1(7,"async"),t.bIt("stateChange",function(k){return M.submitState(k)})("navigateBack",function(){return M.navigateBack.emit()}),t.k0s()),2&a&&(t.R7$(2),t.Y8G("ngIf",M.showInvisibleCaptchaMessage),t.R7$(3),t.Y8G("cardSetup",t.bMT(6,5,M.paymentMethodCardSetup$))("cashierPaymentSetup",t.bMT(7,7,M.cashierPaymentSetup$))("isOneOffPayment",M.isOneOffPayment)("cashierPrefill",M.cashierPrefill))},dependencies:[C.bT,T.Mm,m.K,C.Jj],encapsulation:2})}}return o})()},25749:(lt,O,e)=>{e.d(O,{A:()=>P});var t=e(54438),n=e(89417),d=e(21413),s=e(56977),_=e(86734),f=e(3133),g=e(59640),h=e(60177),C=e(68018),T=e(50004),m=e(22573);function I(N,a){1&N&&(t.j41(0,"iwg-checkbox",4)(1,"span",5),t.EFF(2,"VIRTUAL_OFFICE.MONTHLY_INVOICE_RULES"),t.k0s()())}
1function y(N,a){if(1&N){const M=t.RV6();t.j41(0,"iwg-checkbox",6)(1,"span"),t.nrm(2,"span",7),t.nI1(3,"translate"),t.nI1(4,"translateCut"),t.j41(5,"a",8),t.nI1(6,"translate"),t.nI1(7,"translateCut"),t.bIt("click",function(k){t.eBV(M);const R=t.XpG();return t.Njj(R.onLinkClick(k,"terms-conditions-house-rules"))}),t.k0s(),t.nrm(8,"span",7),t.nI1(9,"translate"),t.nI1(10,"translateCut"),t.j41(11,"a",8),t.nI1(12,"translate"),t.nI1(13,"translateCut"),t.bIt("click",function(k){t.eBV(M);const R=t.XpG();return t.Njj(R.onLinkClick(k,"privacy-policy"))}),t.k0s(),t.nrm(14,"span",7),t.nI1(15,"translate"),t.nI1(16,"translateCut"),t.k0s()()}2&N&&(t.R7$(2),t.Y8G("innerHTML",t.brH(4,7,t.bMT(3,5,"VIRTUAL_OFFICE.TERMS_CONDITIONS"),null,"Tchr_LinkStart"),t.npT),t.R7$(3),t.Y8G("innerHTML",t.brH(7,13,t.bMT(6,11,"VIRTUAL_OFFICE.TERMS_CONDITIONS"),"Tchr_LinkStart","Tchr_LinkEnd"),t.npT),t.R7$(3),t.Y8G("innerHTML",t.brH(10,19,t.bMT(9,17,"VIRTUAL_OFFICE.TERMS_CONDITIONS"),"Tchr_LinkEnd","PrivacyPolicy_LinkStart"),t.npT),t.R7$(3),t.Y8G("innerHTML",t.brH(13,25,t.bMT(12,23,"VIRTUAL_OFFICE.TERMS_CONDITIONS"),"PrivacyPolicy_LinkStart","PrivacyPolicy_LinkEnd"),t.npT),t.R7$(3),t.Y8G("innerHTML",t.brH(16,31,t.bMT(15,29,"VIRTUAL_OFFICE.TERMS_CONDITIONS"),"PrivacyPolicy_LinkEnd",null),t.npT))}function o(N,a){if(1&N){const M=t.RV6();t.j41(0,"iwg-checkbox",9)(1,"span"),t.nrm(2,"span",7),t.nI1(3,"translate"),t.nI1(4,"translateCut"),t.j41(5,"a",8),t.nI1(6,"translate"),t.nI1(7,"translateCut"),t.bIt("click",function(k){t.eBV(M);const R=t.XpG();return t.Njj(R.onLinkClick(k,"terms-conditions-house-rules"))}),t.k0s(),t.nrm(8,"span",7),t.nI1(9,"translate"),t.nI1(10,"translateCut"),t.k0s()()}2&N&&(t.R7$(2),t.Y8G("innerHTML",t.brH(4,5,t.bMT(3,3,"ACCOUNT.MANAGE_PRODUCTS_SERVICES.REVIEW_BUSINESS_CONTINUITY_SUMMARY.TERMS_AND_CONDITIONS"),null,"Tchr_LinkStart"),t.npT),t.R7$(3),t.Y8G("innerHTML",t.brH(7,11,t.bMT(6,9,"ACCOUNT.MANAGE_PRODUCTS_SERVICES.REVIEW_BUSINESS_CONTINUITY_SUMMARY.TERMS_AND_CONDITIONS"),"Tchr_LinkStart","Tchr_LinkEnd"),t.npT),t.R7$(3),t.Y8G("innerHTML",t.brH(10,17,t.bMT(9,15,"ACCOUNT.MANAGE_PRODUCTS_SERVICES.REVIEW_BUSINESS_CONTINUITY_SUMMARY.TERMS_AND_CONDITIONS"),"Tchr_LinkEnd",null),t.npT))}let P=(()=>{class N{constructor(M){this.store=M,this.unsubscribe$=new d.B,this.termsForm=new n.J3({invoicerules:(0,f.Ny)(new n.hs(!1,n.k0.requiredTrue),{}),terms:(0,f.Ny)(new n.hs(!1,n.k0.requiredTrue),{})}),this.formChecked=new t.bkB,this.wrapperId=""}ngOnInit(){this.termsForm.valueChanges.pipe((0,s.Q)(this.unsubscribe$)).subscribe(M=>{this.formChecked.emit((this.isBusinessContinuity||M.invoicerules)&&M.terms)})}onLinkClick(M,G){M&&(M.stopPropagation(),M.preventDefault()),this.store.dispatch((0,_.EG)({queryParam:G}))}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}static{this.\u0275fac=function(G){return new(G||N)(t.rXU(g.il))}}static{this.\u0275cmp=t.VBU({type:N,selectors:[["iwg-terms-conditions-house-rules-form"]],inputs:{isBusinessContinuity:"isBusinessContinuity",wrapperId:"wrapperId"},outputs:{formChecked:"formChecked"},decls:6,vars:5,consts:[["exitVoForm",""],[3,"id","formGroup"],["id","ProductBooking_ReviewDetails_InvoiceRules","formControlName","invoicerules",4,"ngIf"],["id","ProductBooking_ReviewDetails_Terms","formControlName","terms",4,"ngIf","ngIfElse"],["id","ProductBooking_ReviewDetails_InvoiceRules","formControlName","invoicerules"],["translate",""],["id","ProductBooking_ReviewDetails_Terms","formControlName","terms"],[3,"innerHTML"],[1,"text-link",3,"click","innerHTML"],["id","ReviewBusinessContinuity_Terms","formControlName","terms"]],template:function(G,k){if(1&G&&(t.j41(0,"div",1),t.DNE(1,I,3,0,"iwg-checkbox",2),t.nrm(2,"br"),t.DNE(3,y,17,35,"iwg-checkbox",3)(4,o,11,21,"ng-template",null,0,t.C5r),t.k0s()),2&G){const R=t.sdS(5);t.Y8G("id",k.wrapperId)("formGroup",k.termsForm),t.R7$(),t.Y8G("ngIf",!k.isBusinessContinuity),t.R7$(2),t.Y8G("ngIf",!k.isBusinessContinuity)("ngIfElse",R)}},dependencies:[h.bT,n.BC,n.cb,n.j4,n.JD,C.Mm,T.P,C.D9,m.D],encapsulation:2})}}return N})()},94210:(lt,O,e)=>{e.d(O,{K:()=>J});var t=e(31635),n=e(54438),d=e(21413),s=e(56977),_=e(84572),f=e(99172),g=e(96354),h=e(5964),C=e(42092),T=e(9167),m=e(44469),I=e(51752),y=e(77702),o=e(94905),P=e(29399),N=e(59640),a=e(10467),M=e(60177);let G=(()=>{class H{constructor(st){this.platformId=st,this.callbackResponse$=new d.B,this.iframeLoading$=new d.B,this.navigateBackTriggered$=new d.B}initializePaymentIQCashier(st,Et){var dt=this;return(0,a.A)(function*(){if((0,M.UE)(dt.platformId)){dt.destroy(st),dt.iframeLoading$.next(!0);try{const Nt=(yield e.e(364).then(e.t.bind(e,94418,23))).default;dt.cashierInstance=new Nt(st,Et,V=>{V.on({success:mt=>dt.successCallback(mt),pending:mt=>dt.successCallback(mt),unresolved:mt=>dt.successCallback(mt),failure:mt=>dt.errorCallback(),isLoading:mt=>dt.iframeLoading$.next(!0),doneLoading:mt=>dt.iframeLoading$.next(!1),cancelled:mt=>dt.errorCallback(),navigate:mt=>{"/"===mt?.data?.path&&dt.navigateBackTriggered$.next()}})})}catch(Nt){console.error("Failed to initialize PaymentIQ Cashier:",Nt)}}})()}successCallback(st){this.callbackResponse$.next({callbackType:T.eL.success,externalReference:st?.data?.payload?.txRefId})}errorCallback(){this.callbackResponse$.next({callbackType:T.eL.error})}destroy(st){if(this.cashierInstance){this.cashierInstance=null;const Et=document.querySelector(st);Et&&(Et.innerHTML="")}}static{this.\u0275fac=function(Et){return new(Et||H)(n.KVO(n.Agw))}}static{this.\u0275prov=n.jDH({token:H,factory:H.\u0275fac,providedIn:"root"})}}return H})();var k=e(76864);const R="#worldlinePopIntegration";class J{constructor(et,st){this.store$=et,this.paymentIQCashierService=st,this.isOneOffPayment=!1,this.cashierPrefill=null,this.stateChange=new n.bkB,this.navigateBack=new n.bkB,this.PaymentProviderType=T.wF,this.unsubscribe$=new d.B,this.isFlowCompleted=!1}
1ngOnInit(){this.store$.dispatch((0,y.xK)({canDeactivate:!1})),this.store$.dispatch((0,y.e_)({deactivateMessage:"BILLINGPAYMENT.ADD_PAYMENT_METHOD.CAN_DEACTIVATE_WORLDLINE"})),this.paymentIQCashierService.navigateBackTriggered$.pipe((0,s.Q)(this.unsubscribe$)).subscribe(()=>this.navigateBack.emit()),this.paymentIQCashierService.callbackResponse$.pipe((0,s.Q)(this.unsubscribe$)).subscribe(et=>{this.isFlowCompleted=!0,this.store$.dispatch((0,I.Or)({isCompleted:!0})),this.stateChange.emit(et)}),this.loading$=(0,_.z)([this.store$.select(m.Y3),this.paymentIQCashierService.iframeLoading$.pipe((0,f.Z)(!0))]).pipe((0,s.Q)(this.unsubscribe$),(0,g.T)(([et,st])=>!!et||!!st)),this.store$.select(o.k3).pipe((0,s.Q)(this.unsubscribe$)).subscribe(et=>{et&&this.paymentIQCashierService.destroy(R)}),(0,_.z)([this.cardSetup,this.cashierPaymentSetup,this.store$.select(P.dE).pipe((0,g.T)(et=>et?.cultureName||"en-GB"))]).pipe((0,h.p)(([et,st,Et])=>(!this.isOneOffPayment&&!!et||this.isOneOffPayment&&!!st)&&!!Et),(0,s.Q)(this.unsubscribe$)).subscribe({next:([et,st,Et])=>{let dt;dt=this.isOneOffPayment?{merchantId:st.merchantId,userId:st.externalProviderUserId,sessionId:st.sessionId,environment:st.environment,locale:Et.replace("-","_"),defaultLoader:!0,amount:st.paymentAuthorization?.amount,fetchConfig:!0}:{merchantId:et.merchantId,userId:et.externalProviderUserId,sessionId:et.sessionId,environment:et.environment,locale:Et.replace("-","_"),defaultLoader:!0,amount:et.paymentAuthorization?.amount,fetchConfig:!0},this.cashierPrefill&&(dt.user=this.cashierPrefill.user,this.cashierPrefill.country&&(dt.country=this.cashierPrefill.country)),this.paymentIQCashierService.initializePaymentIQCashier(R,dt)}})}ngOnDestroy(){this.isOneOffPayment&&!this.isFlowCompleted&&this.store$.dispatch((0,I.HY)()),this.store$.dispatch((0,I.Or)({isCompleted:!1})),this.paymentIQCashierService.destroy(R),this.unsubscribe$.next(),this.unsubscribe$.complete()}static{this.\u0275fac=function(st){return new(st||J)(n.rXU(N.il),n.rXU(G))}}static{this.\u0275cmp=n.VBU({type:J,selectors:[["iwg-worldline-form"]],inputs:{cardSetup:"cardSetup",cashierPaymentSetup:"cashierPaymentSetup",isOneOffPayment:"isOneOffPayment",cashierPrefill:"cashierPrefill"},outputs:{stateChange:"stateChange",navigateBack:"navigateBack"},decls:3,vars:3,consts:[[3,"loading"],["id","worldlinePopIntegration"]],template:function(st,Et){1&st&&(n.j41(0,"iwg-loader",0),n.nI1(1,"async"),n.nrm(2,"div",1),n.k0s()),2&st&&n.Y8G("loading",n.bMT(1,1,Et.loading$))},dependencies:[k.V,M.Jj],styles:["[_nghost-%COMP%]{display:block}iwg-loader[_ngcontent-%COMP%]{display:block;min-height:10rem}"]})}}(0,t.Cg)([(0,C.W)(null)],J.prototype,"cardSetup",void 0),(0,t.Cg)([(0,C.W)(null)],J.prototype,"cashierPaymentSetup",void 0)},84005:(lt,O,e)=>{e.d(O,{Q:()=>J});var t=e(31635),n=e(54438),d=e(21413),s=e(19724),_=e(84572),f=e(25558),g=e(96354),h=e(5964),C=e(88141),T=e(56977),m=e(35822),I=e(42092),y=e(9167),o=e(94905),P=e(89722),N=e(51752),a=e(29399),M=e(59640),G=e(60156),k=e(76864),R=e(60177);class J{constructor(et,st,Et){this.store$=et,this.externalScriptsLoader=st,this.deviceService=Et,this.stateChange=new n.bkB,this.paymentProviderType$=this.store$.select(o.$F),this.PaymentProviderType=y.wF,this.unsubscribe$=new d.B}ngOnInit(){this.loading$=this.store$.select(P.Y3),(0,s.H)(this.externalScriptsLoader.load(m.m[m.m.worldpaySDK])).pipe((0,f.n)(()=>(0,_.z)([this.url,this.store$.select(a.dE).pipe((0,g.T)(et=>et?.cultureName||"en-GB"))])),(0,h.p)(([et,st])=>!!et&&!!st),(0,C.M)(()=>this.libraryObject?.destroy()),(0,T.Q)(this.unsubscribe$)).subscribe({next:([et,st])=>{this.libraryObject=new WPCL.Library,this.libraryObject.setup({iframeHelperURL:`${this.deviceService.window.location.origin}/assets/static-pages/worldpay-helper.html`,url:et,type:"iframe",accessibility:!0,target:"worldpayIntegration",language:st?.split("-")[0],inject:"immediate",resultCallback:Et=>{if(Et?.order)switch(Et.order.status){case"success":this.store$.dispatch((0,N.Or)({isCompleted:!0})),this.stateChange.emit(y.eL.success);break;case"session_expired":case"cancelled_by_shopper":this.stateChange.emit(y.eL.expire);break;
1case"pending":this.resolvePendingStatus(Et.order.gateway.status);break;default:this.stateChange.emit(y.eL.error)}}})},error:et=>console.error(et)})}ngOnDestroy(){this.libraryObject?.destroy(),this.unsubscribe$.next(),this.unsubscribe$.complete()}resolvePendingStatus(et){switch(et){case"OPEN":this.stateChange.emit(y.eL.success);break;case"EXPIRED":this.stateChange.emit(y.eL.expire);break;default:this.stateChange.emit(y.eL.error)}}static{this.\u0275fac=function(st){return new(st||J)(n.rXU(M.il),n.rXU(m.M),n.rXU(G.g))}}static{this.\u0275cmp=n.VBU({type:J,selectors:[["iwg-worldpay-form"]],inputs:{url:"url"},outputs:{stateChange:"stateChange"},decls:3,vars:3,consts:[[3,"loading"],["id","worldpayIntegration"]],template:function(st,Et){1&st&&(n.j41(0,"iwg-loader",0),n.nI1(1,"async"),n.nrm(2,"div",1),n.k0s()),2&st&&n.Y8G("loading",n.bMT(1,1,Et.loading$))},dependencies:[k.V,R.Jj],styles:["[_nghost-%COMP%]{display:block}"]})}}(0,t.Cg)([(0,I.W)(null)],J.prototype,"url",void 0)},21711:(lt,O,e)=>{e.d(O,{g:()=>pt});var t=e(54438),n=e(44885),d=e(79832),s=e(6463),_=e(22960),f=e(32319),g=e(96354),h=e(96697),C=e(56977),T=e(21413),m=e(84572),I=e(94905),y=e(53952),o=e(60983),P=e(85055),N=e(14399),a=e(59640),M=e(60156),G=e(60177),k=e(61978),R=e(68018),J=e(26377),H=e(33612);const et=["additionalCentresGrid"],st=["companyNameAndAddressTemplate"],Et=["accountTypeTemplate"],dt=["accountTemplate"];function Nt(x,it){1&x&&(t.qex(0),t.j41(1,"div",7)(2,"span",8),t.EFF(3,"BILLINGPAYMENT.DIRECT_DEBIT.FINISH.SIMPLE.DESCRIPTION.1"),t.k0s(),t.j41(4,"span",8),t.EFF(5,"BILLINGPAYMENT.DIRECT_DEBIT.FINISH.SIMPLE.DESCRIPTION.2"),t.k0s()(),t.bVm())}function V(x,it){1&x&&(t.j41(0,"div",7)(1,"span",8),t.EFF(2,"BILLINGPAYMENT.DIRECT_DEBIT.FINISH.ACCOUNT_HOLDER.DESCRIPTION.1"),t.k0s(),t.j41(3,"span",8),t.EFF(4,"BILLINGPAYMENT.DIRECT_DEBIT.FINISH.ACCOUNT_HOLDER.DESCRIPTION.2"),t.k0s()())}function mt(x,it){1&x&&(t.j41(0,"div",7)(1,"span",8),t.EFF(2,"BILLINGPAYMENT.DIRECT_DEBIT.FINISH.BUSINESS_HOLDER.DESCRIPTION.1"),t.k0s(),t.j41(3,"span",8),t.EFF(4,"BILLINGPAYMENT.DIRECT_DEBIT.FINISH.BUSINESS_HOLDER.DESCRIPTION.2"),t.k0s()())}function Pt(x,it){if(1&x&&(t.qex(0)(1,9),t.DNE(2,V,5,0,"div",10)(3,mt,5,0,"div",10),t.bVm()()),2&x){const q=it.ngIf,nt=t.XpG(2);t.R7$(),t.Y8G("ngSwitch",q),t.R7$(),t.Y8G("ngSwitchCase",nt.AccountHolderType.AccountHolder),t.R7$(),t.Y8G("ngSwitchCase",nt.AccountHolderType.BusinessHolder)}}function l(x,it){if(1&x&&(t.qex(0),t.DNE(1,Nt,6,0,"ng-container",6)(2,Pt,4,3,"ng-container",6),t.nI1(3,"async"),t.bVm()),2&x){const q=it.ngIf,nt=t.XpG();t.R7$(),t.Y8G("ngIf",q===nt.DirectDebitType.Simple),t.R7$(),t.Y8G("ngIf",q!==nt.DirectDebitType.Simple&&t.bMT(3,2,nt.accountHolderType$))}}function $(x,it){if(1&x){const q=t.RV6();t.qex(0),t.j41(1,"div",11)(2,"span",12),t.EFF(3,"BILLINGPAYMENT.DIRECT_DEBIT.FINISH.ADDITIONAL_CENTRES.TITLE"),t.k0s(),t.j41(4,"span",13),t.EFF(5,"BILLINGPAYMENT.DIRECT_DEBIT.FINISH.ADDITIONAL_CENTRES.DESCRIPTION"),t.k0s(),t.j41(6,"div",14)(7,"iwg-grid",15,3),t.bIt("checkBoxClicked",function(xt){t.eBV(q);const Dt=t.XpG(3);return t.Njj(Dt.selectAdditionalCentre(xt))}),t.k0s()()(),t.bVm()}if(2&x){const q=t.XpG().ngIf,nt=t.XpG(2);t.R7$(7),t.Y8G("rowHeight",nt.gridHeight)("isMultiSelect",!0)("columnDefs",nt.columnDefs)("isMobileSelectAll",!0)("rowData",q)("hideHeaderOnMobile",!0)}}function Z(x,it){if(1&x&&(t.qex(0),t.DNE(1,$,9,6,"ng-container",6),t.bVm()),2&x){const q=it.ngIf;t.R7$(),t.Y8G("ngIf",q.length>0)}}function ot(x,it){if(1&x&&(t.qex(0),t.DNE(1,Z,2,1,"ng-container",6),t.nI1(2,"async"),t.bVm()),2&x){const q=t.XpG();t.R7$(),t.Y8G("ngIf",t.bMT(2,1,q.additionalCentres$))}}function D(x,it){if(1&x&&(t.qex(0),t.j41(1,"div",17)(2,"span",18),t.EFF(3),t.k0s(),t.j41(4,"span",19),t.EFF(5),t.k0s(),t.j41(6,"span",20),t.EFF(7),t.k0s(),t.j41(8,"span",21),t.EFF(9),t.nI1(10,"iwgAddress"),t.k0s()(),t.bVm()),2&x){const q=t.XpG().$implicit;t.R7$(3),t.JRh(null==q.centres[0]?null:q.centres[0].financialAccountId),t.R7$(2),t.JRh(q.customerTypeDescription),t.R7$(2),t.JRh(q.accountName),t.R7$(2),t.JRh(t.bMT(10,4,q.accountAddress))}}function U(x,it){if(1&x&&(t.j41(0,"span"),t.EFF(1),t.k0s()),2&x){const q=t.XpG().$implicit;t.R7$(),t.JRh(null==q.centres[0]?null:q.centres[0].financialAccountId)}}function gt(x,it){if(1&x&&(t.DNE(0,D,11,6,"ng-container",16),t.nI1(1,"async"),t.DNE(2,U,2,1,"ng-template",null,4,t.C5r)),2&x){const q=t.sdS(3),nt=t.XpG();t.Y8G("ngIf",t.bMT(1,2,nt.isMobile$))("ngIfElse",q)}}function _t(x,it){if(1&x&&(t.j41(0,"div",17)(1,"span",20),t.EFF(2),t.k0s(),t.j41(3,"span",22),t.EFF(4),t.nI1(5,"iwgAddress"),t.k0s()()),2&x){const q=it.$
1implicit;t.R7$(2),t.JRh(q.accountName),t.R7$(2),t.JRh(t.bMT(5,2,q.accountAddress))}}function ct(x,it){if(1&x&&(t.j41(0,"span",23),t.EFF(1),t.k0s()),2&x){const q=it.$implicit;t.R7$(),t.JRh(q.customerTypeDescription)}}let pt=(()=>{class x{constructor(q,nt){this.store$=q,this.deviceService=nt,this.AccountHolderType=o.u,this.DirectDebitType=o.y,this.currentStep=d.M.Finish,this.accountHolderType$=this.store$.select(s.XY),this.additionalCentres$=this.store$.select(s.qp),this.directDebitType$=this.store$.select(s.bU),this.checkForOutstandingInvoicesForCountryIso=["GBR"],this.paymentMethodsList=[],this.unsubscribe$=new T.B,this.isMobile$=this.deviceService.isMobile$,this.canAddForAdditionalCentres$=(0,m.z)([this.store$.select(s.bU),this.store$.select(s.XY)]).pipe((0,g.T)(([xt,Dt])=>xt!==o.y.Simple&&Dt!==o.u.BusinessHolder)),this.columnDefs=[{headerName:"BILLINGPAYMENT.DIRECT_DEBIT.FINISH.ADDITIONAL_CENTRES.ACCOUNT_NUMBER",field:"financialAccountId",colId:"FinancialAccountId",checkboxSelection:!0,cellClass:"aggrid_primary_column text-overflow-elipsis",cellRenderer:xt=>this.getTemplateRenderer(xt,this.accountTemplate),width:180,minWidth:180},{headerName:"BILLINGPAYMENT.DIRECT_DEBIT.FINISH.ADDITIONAL_CENTRES.ACCOUNT_TYPE",field:"customerType",colId:"CustomerType",cellRenderer:xt=>this.getTemplateRenderer(xt,this.accountTypeTemplate),width:170,minWidth:170,hideOnMobile:!0},{headerName:"BILLINGPAYMENT.DIRECT_DEBIT.FINISH.ADDITIONAL_CENTRES.COMPANY_NAME_AND_ADDRESS",field:"companyNameAndAddress",colId:"CompanyNameAndAddress",cellRenderer:xt=>this.getTemplateRenderer(xt,this.companyNameAndAddressTemplate),hideOnMobile:!0}]}ngOnInit(){this.store$.select(s.bU).pipe((0,h.s)(1)).subscribe(q=>this.directDebitType=q),this.store$.select(f.tg).pipe((0,h.s)(1)).subscribe(q=>this.onboardingCompletionStatus=q),this.deviceService.isMobile$.pipe((0,C.Q)(this.unsubscribe$)).subscribe(q=>this.gridHeight=q?140:80),this.store$.select(s.hE).pipe((0,C.Q)(this.unsubscribe$)).subscribe(q=>this.directDebitCountryIsoCode=q),this.store$.select((0,I.s1)({params:{listType:y.pI.company}})).pipe((0,C.Q)(this.unsubscribe$)).subscribe(q=>this.paymentMethodsList=q)}ngOnDestroy(){this.checkOutstandingInvoice(),this.store$.dispatch(_.Pr()),this.store$.dispatch(_.SM()),this.store$.dispatch(_.e1()),this.store$.dispatch(_.j2()),this.store$.dispatch(_.ze()),this.unsubscribe$.next(),this.unsubscribe$.complete()}nextStep(){this.store$.dispatch(_.mk())}navigateOrClose(){this.store$.dispatch(this.onboardingCompletionStatus?(0,N.I1)():_.Fj())}selectAdditionalCentre(q){const nt=q?.selectedItems;this.store$.dispatch(nt?.length>0?_.Ky(nt[0].data?{centreNumbers:nt.filter(xt=>xt.isSelected&&xt.isDataLoaded).map(xt=>xt.data.centreNumber)}:{centreNumbers:nt.map(xt=>xt.centres?.[0]?.centreNumber)}):_.aO())}getDirectDebitType(){return this.directDebitType}isPageLoading(){return this.store$.select(s.KH)}getTemplateRenderer(q,nt){return q.data?nt.createEmbeddedView({$implicit:q.data}):null}checkOutstandingInvoice(){(!this.paymentMethodsList||0===this.paymentMethodsList.filter(q=>q.paymentMethodType===y.eq.paymentCard).length)&&this.checkForOutstandingInvoicesForCountryIso.includes(this.directDebitCountryIsoCode)&&this.store$.dispatch((0,P.Hb)())}static{this.\u0275fac=function(nt){return new(nt||x)(t.rXU(a.il),t.rXU(M.g))}}static{this.\u0275cmp=t.VBU({type:x,selectors:[["iwg-direct-debit-finish"]],viewQuery:function(nt,xt){if(1&nt&&(t.GBs(et,7),t.GBs(st,7,t.C4Q),t.GBs(Et,7,t.C4Q),t.GBs(dt,7,t.C4Q)),2&nt){let Dt;t.mGM(Dt=t.lsd())&&(xt.additionalCentresGrid=Dt.first),t.mGM(Dt=t.lsd())&&(xt.companyNameAndAddressTemplate=Dt.first),t.mGM(Dt=t.lsd())&&(xt.accountTypeTemplate=Dt.first),t.mGM(Dt=t.lsd())&&(xt.accountTemplate=Dt.first)}},features:[t.Jv_([{provide:n.L,useExisting:(0,t.Rfq)(()=>x)}])],decls:11,vars:8,consts:[["accountTemplate",""],["companyNameAndAddressTemplate",""],["accountTypeTemplate",""],["additionalCentresGrid",""],["accountTemplateDesktop",""],[3,"nextStepDisabled","currentStep"],[4,"ngIf"],[1,"finish-description"],["translate","",1,"finish-description__paragraph"],[3,"ngSwitch"],["class","finish-description",4,"ngSwitchCase"],[1,"additional-centres"],["translate","",1,"iwg-h4","m--b-4","m--t-8"],["translate",""],[1,"additional-centres__list"],[3,"checkBoxClicked","rowHeight","isMultiSelect","columnDefs","isMobileSelectAll","rowData","hideHeaderOnMobile"],[4,"ngIf","ngIfElse"],[1,"vertical-cell"],[1,"iwg-body1","m--t-2"],[1,"customer-type","m--b-2"],[1,"iwg-label3-medium"],[1,"iwg-body1","m--b-2"],[1,"iwg-body1"],[1,"customer-type"]],template:function(nt,xt){1&nt&&(t.j41(0,"iwg-direct-debit-flyout",5),t.DNE(1,l,4,4,"ng-container",6),t.nI1(2,"async"),t.DNE(3,ot,3,3,"ng-container",6),t.nI1(4,"async"),t.k0s(),t.DNE(5,gt,4,4,"ng-template",null,0,t.C5r)(7,_t,6,4,"ng-template",null,1,t.C5r)(9,ct,2,1,"ng-template",null,2,t.C5r)),2&nt&&(t.Y8G("nextStepDisabled",!1)("currentStep",xt.currentStep),t.R7$(),t.Y8G("ngIf",t.bMT(2,4,xt.directDebitType$)),t.R7$(2),t.Y8G("ngIf",t.bMT(4,6,xt.canAddForAdditionalCentres$)))},dependencies:[G.bT,G.ux,G.e1,k._,R.Mm,J.U,G.Jj,H.o],styles:[".finish-description[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:-4rem}@media (max-width: 1023.98px){.finish-description[_ngcontent-%COMP%]{margin-top:0}}.finish-description__paragraph[_ngcontent-%COMP%]{display:block;margin-bottom:1rem}.additional-centres[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-bottom:2rem}.additional-centres__list[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:2.5rem}.additional-centres__list__item[_ngcontent-%COMP%]{align-self:flex-start;margin-bottom:2.5rem}.vertical-cell[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between}.customer-type[_ngcontent-%COMP%]{text-transform:capitalize}"]})}}return x})()},38556:(lt,O,e)=>{e.d(O,{z:()=>F});var t=e(54438),n=e(22960),d=e(53952),s=e(96354),_=e(96697),f=e(94905),g=e(6463),h=e(44885),C=e(79832),T=e(69671),m=e(60983),I=e(59640),y=e(60177),o=e(48337),P=e(68018),N=e(12262),a=e(97644),M=e(26377),G=e(345);const k=L=>({"guarantee-logo":L}),R=L=>({ConsumerInput_CreditorName:L}),J=L=>({ConsumerInputCreditorName:L});function H(L,ft){1&L&&t.eu8(0)}function et(L,ft){if(1&L&&t.nrm(0,"div",6),2&L){const K=t.XpG(2);t.Y8G("innerHTML",K.safeGuaranteeText,t.npT)}}function st(L,ft){1&L&&(t.j41(0,"div",7),t.EFF(1,"BILLINGPAYMENT.DIRECT_DEBIT.REVIEW.GUARANTEE.MISSING"),t.k0s())}function Et(L,ft){if(1&L&&t.DNE(0,et,1,1,"div",4)(1,st,2,0,"div",5),2&L){const K=t.XpG();t.Y8G("ngIf",K.guaranteeText),t.R7$(),t.Y8G("ngIf",!K.guaranteeText)}}function dt(L,ft){if(1&L&&(t.j41(0,"h4",8),t.EFF(1,"BILLINGPAYMENT.DIRECT_DEBIT.REVIEW.GUARANTEE.TITLE"),t.k0s(),t.j41(2,"ul",9)(3,"li",10),t.EFF(4,"BILLINGPAYMENT.DIRECT_DEBIT.REVIEW.GUARANTEE.1"),t.k0s(),t.j41(5,"li"),t.EFF(6),t.nI1(7,"translate"),t.k0s(),t.j41(8,"li")(9,"span"),t.EFF(10),t.nI1(11,"translate"),t.k0s(),t.j41(12,"ul",11)(13,"li"),t.EFF(14),t.nI1(15,"translate"),t.k0s()()(),t.j41(16,"li",10),t.EFF(17,"BILLINGPAYMENT.DIRECT_DEBIT.REVIEW.GUARANTEE.4"),t.k0s()()),2&L){const K=t.XpG();t.R7$(6),t.SpI(" ",t.i5U(7,3,"BILLINGPAYMENT.DIRECT_DEBIT.REVIEW.GUARANTEE.2",t.eq3(12,R,K.centre.creditorName))," "),t.R7$(4),t.JRh(t.i5U(11,6,"BILLINGPAYMENT.DIRECT_DEBIT.REVIEW.GUARANTEE.3",t.eq3(14,J,K.centre.creditorName))),t.R7$(4),t.SpI(" ",t.i5U(15,9,"BILLINGPAYMENT.DIRECT_DEBIT.REVIEW.GUARANTEE.3.1",t.eq3(16,R,K.centre.creditorName))," ")}}let Nt=(()=>{class L{constructor(K){this.sanitizer=K,this.safeGuaranteeText=""}ngOnChanges(){this.centre&&(this.showUkGuarantee=this.centre.directDebitType===m.y.DirectDebit),this.safeGuaranteeText=this.getGuaranteeText()}getGuaranteeText(){return this.guaranteeText?this.sanitizer.bypassSecurityTrustHtml(this.guaranteeText):""}static{this.\u0275fac=function(Tt){return new(Tt||L)(t.rXU(G.up))}}static{this.\u0275cmp=t.VBU({type:L,selectors:[["iwg-direct-debit-guarantee"]],inputs:{centre:"centre",guaranteeText:"guaranteeText"},features:[t.OA$],decls:6,vars:4,consts:[["guarantee",""],["defaultGuarantee",""],[1,"guarantee",3,"ngClass"],[4,"ngTemplateOutlet"],[3,"innerHTML",4,"ngIf"],["class","no-guarantee","translate","",4,"ngIf"],[3,"innerHTML"],["translate","",1,"no-guarantee"],["translate","",1,"guarantee__title"],[1,"guarantee__list"],["translate",""],[1,"guarantee__list__sub"]],template:function(Tt,St){if(1&Tt&&(t.j41(0,"div",2),t.DNE(1,H,1,0,"ng-container",3),t.k0s(),t.DNE(2,Et,2,2,"ng-template",null,0,t.C5r)(4,dt,18,18,"ng-template",null,1,t.C5r)),2&Tt){const ae=t.sdS(3),ne=t.sdS(5);t.Y8G("ngClass",t.eq3(2,k,St.showUkGuarantee)),t.R7$(),t.Y8G("ngTemplateOutlet",St.showUkGuarantee?ne:ae)}},dependencies:[y.YU,y.bT,y.T3,P.Mm,P.D9],styles:['.guarantee{display:flex;flex-direction:column;border:.1rem solid var(--color-border, var(--global-neutral-300, #C3C3C3));padding:2rem;padding-top:0;margin:3rem 0 5rem}.guarantee__title{text-align:center}@media (max-width: 1023.98px){.guarantee__title{margin-top:8rem}}.guarantee__list{padding:0 2rem;list-style-type:disc}.guarantee__list li{padding-top:1.5rem}.guarantee__list__sub{list-style:"- ";list-style-position:inside}.guarantee__list__sub li{padding-top:1.5rem}.guarantee-logo{background-image:url(https://assets.iwgplc.com/image/upload/f_auto,q_auto/CustomerPortal/Generic/sprites/direct_debit_cptfsx);background-repeat:no-repeat;background-position:right 4rem top 2rem}h2{text-align:center}.no-guarantee{text-align:center;transform:translateY(50%)}\n'],encapsulation:2})}}return L})();var V=e(89417),mt=e(23294),Pt=e(56977),l=e(21413),$=e(84598),Z=e(50004);const ot=L=>({ConsumerInput_CreditorName:L});function D(L,ft){if(1&L&&(t.j41(0,"div",3)(1,"iwg-checkbox",4)(2,"span"),t.EFF(3),t.nI1(4,"translate"),t.k0s()()()),2&L){const K=ft.$implicit,Tt=ft.index,St=t.XpG(2);t.R7$(),t.Y8G("formControlName",Tt)("tabIndex",0),t.R7$(2),t.JRh(t.i5U(4,3,K,t.eq3(6,ot,St.centre.creditorName)))}}function U(L,ft){if(1&L&&(t.qex(0),t.j41(1,"form",1),t.DNE(2,D,5,8,"div",2),t.k0s(),t.bVm()),2&L){const K=t.XpG();t.R7$(),t.Y8G("formGroup",K.confirmationForm),t.R7$(),t.Y8G("ngForOf",
1K.confirmations)}}let gt=(()=>{class L{constructor(K){this.fb=K,this.confirmationFormStatusChanged=new t.bkB(!0),this.confirmed=!1,this.unsubscribe$=new l.B}ngOnInit(){this.confirmations=this.getConfirmations(),this.confirmationForm=this.fb.group({confirmationArray:new V.Bm(this.confirmations.map(K=>new V.hs(this.confirmed,V.k0.requiredTrue)))}),this.confirmationForm.statusChanges.pipe((0,s.T)(K=>K===$.U.VALID),(0,mt.F)(),(0,Pt.Q)(this.unsubscribe$)).subscribe(K=>this.confirmationFormStatusChanged.emit(K)),0===this.confirmations.length&&this.confirmationFormStatusChanged.emit(!0)}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}get confirmationArray(){return this.confirmationForm.get("confirmationArray")}getConfirmations(){if(!this.centre)return[];switch(this.centre.directDebitType){case m.y.ACH:return["BILLINGPAYMENT.DIRECT_DEBIT.REVIEW.ACH_CONFIRMATION.1","BILLINGPAYMENT.DIRECT_DEBIT.REVIEW.ACH_CONFIRMATION.2"];case m.y.PAD:return["BILLINGPAYMENT.DIRECT_DEBIT.REVIEW.PAD_CONFIRMATION.1","BILLINGPAYMENT.DIRECT_DEBIT.REVIEW.PAD_CONFIRMATION.2"];case m.y.SEPA:return["BILLINGPAYMENT.DIRECT_DEBIT.REVIEW.SEPA_CONFIRMATION"]}return[]}static{this.\u0275fac=function(Tt){return new(Tt||L)(t.rXU(V.ze))}}static{this.\u0275cmp=t.VBU({type:L,selectors:[["iwg-direct-debit-confirmation-form"]],inputs:{confirmed:"confirmed",centre:"centre"},outputs:{confirmationFormStatusChanged:"confirmationFormStatusChanged"},decls:1,vars:1,consts:[[4,"ngIf"],[1,"confirmation-form",3,"formGroup"],["formArrayName","confirmationArray","class","confirmation-form__item",4,"ngFor","ngForOf"],["formArrayName","confirmationArray",1,"confirmation-form__item"],[3,"formControlName","tabIndex"]],template:function(Tt,St){1&Tt&&t.DNE(0,U,3,2,"ng-container",0),2&Tt&&t.Y8G("ngIf",St.confirmations)},dependencies:[y.Sq,y.bT,V.qT,V.BC,V.cb,V.j4,V.JD,V.v8,Z.P,P.D9],styles:[".confirmation-form[_ngcontent-%COMP%]{margin-top:3rem;margin-bottom:3rem}.confirmation-form__item[_ngcontent-%COMP%]{display:block;margin-bottom:2rem}"]})}}return L})();var _t=e(742);const ct=(L,ft,K)=>({centre:L,fields:ft,details:K}),pt=L=>({ConsumerInput_DirectDebitType:L}),x=L=>({ConsumerInputFinancialAccountId:L}),it=L=>({ConsumerInputCreditorName:L}),q=(L,ft)=>({field:L,value:ft});function nt(L,ft){if(1&L&&(t.j41(0,"iwg-notification-item",4)(1,"span"),t.EFF(2),t.nI1(3,"translate"),t.nI1(4,"translate"),t.k0s()()),2&L){const K=t.XpG();t.Y8G("notificationType","info"),t.R7$(2),t.JRh(t.i5U(4,4,"BILLINGPAYMENT.DIRECT_DEBIT.REVIEW.SUPERSEDE_EXISTING",t.eq3(7,pt,t.bMT(3,2,K.getDirectDebitTypeTranslationKey()))))}}function xt(L,ft){if(1&L){const K=t.RV6();t.j41(0,"div",9)(1,"span",10),t.EFF(2),t.nI1(3,"translate"),t.j41(4,"iwg-button",11),t.bIt("click",function(){t.eBV(K);const St=t.XpG(2);return t.Njj(St.downloadIntructions())})("keydown.enter",function(){t.eBV(K);const St=t.XpG(2);return t.Njj(St.downloadIntructions())}),t.EFF(5,"COMMON.SELECT_HERE"),t.k0s()(),t.j41(6,"span",12),t.EFF(7,"BILLINGPAYMENT.DIRECT_DEBIT.REVIEW.SEPA_DESCRIPTION.2"),t.k0s(),t.j41(8,"span",10),t.EFF(9),t.nI1(10,"translate"),t.k0s(),t.j41(11,"span",12),t.EFF(12,"BILLINGPAYMENT.DIRECT_DEBIT.REVIEW.SEPA_DESCRIPTION.4"),t.k0s(),t.j41(13,"span",12),t.EFF(14,"BILLINGPAYMENT.DIRECT_DEBIT.REVIEW.SEPA_DESCRIPTION.5"),t.k0s()()}if(2&L){const K=t.XpG().ngIf;t.R7$(2),t.SpI(" ",t.i5U(3,2,"BILLINGPAYMENT.DIRECT_DEBIT.REVIEW.SEPA_DESCRIPTION.1",t.eq3(8,x,K.centre.financialAccountId))," "),t.R7$(7),t.SpI(" ",t.i5U(10,5,"BILLINGPAYMENT.DIRECT_DEBIT.REVIEW.SEPA_DESCRIPTION.3",t.eq3(10,it,K.centre.creditorName))," ")}}function Dt(L,ft){if(1&L){const K=t.RV6();t.j41(0,"div",9)(1,"span",12),t.EFF(2),t.nI1(3,"translate"),t.j41(4,"iwg-button",11),t.bIt("click",function(){t.eBV(K);const St=t.XpG(2);return t.Njj(St.downloadIntructions())})("keydown.enter",function(){t.eBV(K);const St=t.XpG(2);return t.Njj(St.downloadIntructions())}),t.EFF(5,"COMMON.SELECT_HERE"),t.k0s()(),t.j41(6,"span",12),t.EFF(7),t.nI1(8,"translate"),t.k0s(),t.j41(9,"span",12),t.EFF(10,"BILLINGPAYMENT.DIRECT_DEBIT.REVIEW.DESCRIPTION.3"),t.k0s()()}if(2&L){const K=t.XpG().ngIf;t.R7$(2),t.SpI(" ",t.i5U(3,2,"BILLINGPAYMENT.DIRECT_DEBIT.REVIEW.DESCRIPTION.1",t.eq3(8,x,K.centre.financialAccountId))," "),t.R7$(5),t.SpI(" ",t.i5U(8,5,"BILLINGPAYMENT.DIRECT_DEBIT.REVIEW.DESCRIPTION.2",t.eq3(10,it,K.centre.creditorName))," ")}}function oe(L,ft){if(1&L&&(t.qex(0),t.eu8(1,15),t.nI1(2,"translate"),t.bVm()),2&L){const K=t.XpG(2).ngIf;t.XpG();const Tt=t.sdS(9);t.R7$(),t.Y8G("ngTemplateOutlet",Tt)("ngTemplateOutletContext",t.l_i(4,q,K.fields.paymenttype,t.bMT(2,2,"BILLINGPAYMENT.DIRECT_DEBIT.FIELDS.SEPA.RECURRENTPAYMENTTYPE")))}}function v(L,ft){if(1&L&&(t.qex(0),t.eu8(1,15),t.nI1(2,"localizedDate"),t.eu8(3,15),t.nI1(4,"translate"),t.eu8(5,15),t.nI1(6,"translate"),t.bVm()),2&L){const K=t.XpG(2).ngIf;t.XpG();const Tt=t.sdS(9);t.R7$(),t.Y8G("ngTemplateOutlet",Tt)("ngTemplateOutletContext",t.l_i(12,q,K.fields.paymentstartdate,t.bMT(2,6,K.details.paymentstartdate))),t.R7$(2),t.Y8G("ngTemplateOutlet",Tt)("ngTemplateOutletContext",t.l_i(15,q,K.fields.paymenttiming,t.bMT(4,8,"BILLINGPAYMENT.DIRECT_DEBIT.FIELDS.PAD.PAYMENTTIMINGMONTHLY"))),t.R7$(2),t.Y8G("ngTemplateOutlet",Tt)("ngTemplateOutletContext",t.l_i(18,q,K.fields.paymentcategory,t.bMT(6,10,"BILLINGPAYMENT.DIRECT_DEBIT.FIELDS.PAD.PAYMENTCATEGORYBUSINESS")))}}function _e(L,ft){if(1&L&&(t.j41(0,"div",13)(1,"div",14),t.EFF(2),t.nI1(3,"translate"),t.nI1(4,"translate"),t.k0s(),t.eu8(5,15)(6,15)(7,15)(8,15)(9,15)(10,15)(11,15)(12,15)(13,15)(14,15)(15,15),t.nI1(16,"localizedDate"),t.DNE(17,oe,3,7,"ng-container",3)(18,v,7,21,"ng-container",3),t.eu8(19,15),t.k0s()),2&L){const K=t.XpG().ngIf,Tt=t.XpG
1(),St=t.sdS(9);t.R7$(2),t.JRh(t.i5U(4,29,"BILLINGPAYMENT.DIRECT_DEBIT.REVIEW.DETAILS_TITLE",t.eq3(34,pt,t.bMT(3,27,Tt.getDirectDebitTypeTranslationKey())))),t.R7$(3),t.Y8G("ngTemplateOutlet",St)("ngTemplateOutletContext",t.l_i(36,q,K.fields.banksortcode,K.details.banksortcode)),t.R7$(),t.Y8G("ngTemplateOutlet",St)("ngTemplateOutletContext",t.l_i(39,q,K.fields.bankaccountnumber,K.details.bankaccountnumber)),t.R7$(),t.Y8G("ngTemplateOutlet",St)("ngTemplateOutletContext",t.l_i(42,q,K.fields.bankaccountname,K.details.bankaccountname)),t.R7$(),t.Y8G("ngTemplateOutlet",St)("ngTemplateOutletContext",t.l_i(45,q,K.fields.bankbranchcode,K.details.bankbranchcode)),t.R7$(),t.Y8G("ngTemplateOutlet",St)("ngTemplateOutletContext",t.l_i(48,q,K.fields.bankname,K.details.bankname)),t.R7$(),t.Y8G("ngTemplateOutlet",St)("ngTemplateOutletContext",t.l_i(51,q,K.fields.iban,K.details.iban)),t.R7$(),t.Y8G("ngTemplateOutlet",St)("ngTemplateOutletContext",t.l_i(54,q,K.fields.swiftcode,K.details.swiftcode)),t.R7$(),t.Y8G("ngTemplateOutlet",St)("ngTemplateOutletContext",t.l_i(57,q,K.fields.customername,K.details.customername)),t.R7$(),t.Y8G("ngTemplateOutlet",St)("ngTemplateOutletContext",t.l_i(60,q,K.fields.nameofpersonsigning,K.details.nameofpersonsigning)),t.R7$(),t.Y8G("ngTemplateOutlet",St)("ngTemplateOutletContext",t.l_i(63,q,K.fields.positionofpersonsigning,K.details.positionofpersonsigning)),t.R7$(),t.Y8G("ngTemplateOutlet",St)("ngTemplateOutletContext",t.l_i(66,q,K.fields.mandatedate,t.bMT(16,32,K.details.mandatedate))),t.R7$(2),t.Y8G("ngIf",Tt.directDebitType===Tt.DirectDebitType.SEPA),t.R7$(),t.Y8G("ngIf",Tt.directDebitType===Tt.DirectDebitType.PAD),t.R7$(),t.Y8G("ngTemplateOutlet",St)("ngTemplateOutletContext",t.l_i(69,q,null==K.fields?null:K.fields.mandatereference,K.details.mandateReference))}}function ue(L,ft){1&L&&(t.qex(0),t.j41(1,"div",17),t.EFF(2,"BILLINGPAYMENT.DIRECT_DEBIT.REVIEW.GUARANTEE.TITLE"),t.k0s(),t.j41(3,"span",12),t.EFF(4,"BILLINGPAYMENT.DIRECT_DEBIT.REVIEW.GUARANTEE.DESCRIPTION"),t.k0s(),t.bVm())}function re(L,ft){if(1&L&&(t.qex(0),t.DNE(1,ue,5,0,"ng-container",3),t.nrm(2,"iwg-direct-debit-guarantee",16),t.nI1(3,"async"),t.bVm()),2&L){const K=t.XpG().ngIf,Tt=t.XpG();t.R7$(),t.Y8G("ngIf",Tt.directDebitType===Tt.DirectDebitType.DirectDebit),t.R7$(),t.Y8G("centre",K.centre)("guaranteeText",t.bMT(3,3,Tt.guaranteeText$))}}function bt(L,ft){if(1&L){const K=t.RV6();t.qex(0)(1,5),t.DNE(2,xt,15,12,"div",6)(3,Dt,11,12,"div",6),t.bVm(),t.DNE(4,_e,20,72,"div",7)(5,re,4,5,"ng-container",3),t.j41(6,"iwg-direct-debit-confirmation-form",8),t.nI1(7,"async"),t.bIt("confirmationFormStatusChanged",function(St){t.eBV(K);const ae=t.XpG();return t.Njj(ae.onConfirmationStatusChanged(St))}),t.k0s(),t.bVm()}if(2&L){const K=ft.ngIf,Tt=t.XpG();t.R7$(),t.Y8G("ngSwitch",Tt.directDebitType),t.R7$(),t.Y8G("ngSwitchCase",Tt.DirectDebitType.SEPA),t.R7$(),t.Y8G("ngSwitchCase",Tt.DirectDebitType.DirectDebit),t.R7$(),t.Y8G("ngIf",null==K?null:K.fields),t.R7$(),t.Y8G("ngIf",Tt.directDebitType!==Tt.DirectDebitType.SEPA),t.R7$(),t.Y8G("centre",K.centre)("confirmed",t.bMT(7,7,Tt.validReview$))}}function Ft(L,ft){if(1&L&&t.nrm(0,"iwg-hint",22),2&L){const K=t.XpG(2).field;t.Y8G("message",K.hint)}}function Te(L,ft){if(1&L&&(t.qex(0),t.j41(1,"div",18)(2,"span",19),t.EFF(3),t.DNE(4,Ft,1,1,"iwg-hint",20),t.k0s(),t.j41(5,"span",21),t.EFF(6),t.k0s()(),t.bVm()),2&L){const K=t.XpG(),Tt=K.field,St=K.value;t.R7$(3),t.SpI(" ",Tt.description," "),t.R7$(),t.Y8G("ngIf",Tt.hint),t.R7$(2),t.JRh(St)}}function E(L,ft){1&L&&t.DNE(0,Te,7,3,"ng-container",3),2&L&&t.Y8G("ngIf",ft.field&&ft.value)}let F=(()=>{class L extends T.f{constructor(K){super(),this.store$=K,this.paymentMethodsParams={listType:d.pI.company},this.DirectDebitType=m.y,this.currentStep=C.M.Review,this.backClicked=!1,this.confirmClicked=!1,this.directDebitDetails$=this.store$.select(g.JV),this.directDebitType$=this.store$.select(g.bU),this.directDebitFields$=this.store$.select(g.EU),this.directDebitCentre$=this.store$.select(g.y),this.guaranteeText$=this.store$.select(g.DO),this.validReview$=this.store$.select(g.qI)}ngOnInit(){this.hasItems$=this.store$.select((0,f.s1)({params:this.paymentMethodsParams})).pipe((0,s.T)(K=>{const Tt=K?.filter(St=>St.paymentMethodType===d.eq.directDebit);return Tt&&Tt.length>0})),this.signedInstructionsFile=history.state?.file,this.store$.dis
1patch(n.jp()),this.store$.select(g.bU).pipe((0,_.s)(1)).subscribe(K=>this.directDebitType=K)}onPopState(K){this.navigateOrClose()}onConfirmationStatusChanged(K){this.store$.dispatch(n.xM({valid:K}))}navigateOrClose(){this.backClicked=!0,this.store$.dispatch(n.dw({file:this.signedInstructionsFile}))}canDeactivateModal(){return this.backClicked||this.confirmClicked?null:{key:"EXIT_MODAL.TITLE",subtitle:"EXIT_MODAL.SUBTITLE"}}nextStep(){this.confirmClicked=!0,this.store$.dispatch(n.VD({file:this.signedInstructionsFile})),this.store$.dispatch(n.dR())}downloadIntructions(){this.store$.dispatch(n._i())}getDirectDebitType(){return this.directDebitType}isPageLoading(){return this.store$.select(g.KH)}getDirectDebitTypeTranslationKey(){return`BILLINGPAYMENT.DIRECT_DEBIT.TYPES.${this.directDebitType.toUpperCase()}`}static{this.\u0275fac=function(Tt){return new(Tt||L)(t.rXU(I.il))}}static{this.\u0275cmp=t.VBU({type:L,selectors:[["iwg-direct-debit-review"]],hostBindings:function(Tt,St){1&Tt&&t.bIt("popstate",function(ne){return St.onPopState(ne)},!1,t.tSv)},features:[t.Jv_([{provide:h.L,useExisting:(0,t.Rfq)(()=>L)}]),t.Vt3],decls:10,vars:18,consts:[["directDebitDetails",""],[3,"nextStepDisabled","currentStep"],["class","notification-info",3,"notificationType",4,"ngIf"],[4,"ngIf"],[1,"notification-info",3,"notificationType"],[3,"ngSwitch"],["class","review-description",4,"ngSwitchCase"],["class","direct-debit-details",4,"ngIf"],[3,"confirmationFormStatusChanged","centre","confirmed"],[1,"review-description"],[1,"review-paragraph"],["type","button","displayType","text-link-inline",1,"text-link",3,"click","keydown.enter"],["translate","",1,"review-paragraph"],[1,"direct-debit-details"],[1,"iwg-h4"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"centre","guaranteeText"],["translate","",1,"iwg-h4"],[1,"direct-debit-details__field"],[1,"iwg-label3-medium","direct-debit-details__field__description"],["wrapperId","direct_debit_review","class","hint",3,"message",4,"ngIf"],[1,"direct-debit-details__field__value"],["wrapperId","direct_debit_review",1,"hint",3,"message"]],template:function(Tt,St){1&Tt&&(t.j41(0,"iwg-direct-debit-flyout",1),t.nI1(1,"async"),t.DNE(2,nt,5,9,"iwg-notification-item",2),t.nI1(3,"async"),t.DNE(4,bt,8,9,"ng-container",3),t.nI1(5,"async"),t.nI1(6,"async"),t.nI1(7,"async"),t.k0s(),t.DNE(8,E,1,1,"ng-template",null,0,t.C5r)),2&Tt&&(t.Y8G("nextStepDisabled",!t.bMT(1,4,St.validReview$))("currentStep",St.currentStep),t.R7$(2),t.Y8G("ngIf",t.bMT(3,6,St.hasItems$)),t.R7$(2),t.Y8G("ngIf",t.sMw(14,ct,t.bMT(5,8,St.directDebitCentre$),t.bMT(6,10,St.directDebitFields$),t.bMT(7,12,St.directDebitDetails$))))},dependencies:[y.bT,y.T3,y.ux,y.e1,o.p,P.Mm,N.Q,a._,M.U,Nt,gt,y.Jj,P.D9,_t.K],styles:[".notification-info[_ngcontent-%COMP%]{margin-top:-3rem;margin-bottom:5rem}@media (max-width: 1023.98px){.notification-info[_ngcontent-%COMP%]{margin-top:0;margin-bottom:1rem}}.review-description[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:-4rem;margin-bottom:5rem}@media (max-width: 1023.98px){.review-description[_ngcontent-%COMP%]{margin-top:0;margin-bottom:1rem}}.review-paragraph[_ngcontent-%COMP%]{display:block;margin-bottom:1rem}.review-paragraph[_ngcontent-%COMP%]   span[_ngcontent-%COMP%], .text-link[_ngcontent-%COMP%]{text-transform:lowercase}.direct-debit-details[_ngcontent-%COMP%]{display:flex;justify-content:space-between;flex-wrap:wrap;margin-top:-3rem}@media (max-width: 1023.98px){.direct-debit-details[_ngcontent-%COMP%]{margin-top:0}}.direct-debit-details__field[_ngcontent-%COMP%]{display:flex;flex:0 1 100%;flex-direction:column;margin-bottom:2rem}.direct-debit-details__field__description[_ngcontent-%COMP%]{display:flex}"]}
1)}}return L})()},38673:(lt,O,e)=>{e.d(O,{S:()=>x});var t=e(54438),n=e(96354),d=e(96697),s=e(60983),_=e(6463),f=e(22960),g=e(79832),h=e(12517);const C=new t.nKC("DirectDebitUploadFormProvider");var T=e(44885),m=e(69671),I=e(89417),y=e(86734),o=e(59640),P=e(68018),N=e(60177),a=e(48337),M=e(12262),G=e(50004),k=e(26377),R=e(52581),J=e(21413),H=e(23294),et=e(56977),st=e(84598),Et=e(47192);let dt=(()=>{class it{constructor(nt,xt){this.fb=nt,this.uploadFormProvider=xt,this.MAX_FILE_SIZE_MB="10MB",this.ALLOWED_EXTENSIONS=".pdf,.png,.jpg,.jpeg",this.uploadDisabled=!0,this.unsubscribe$=new J.B,this.placeholder="GENERIC.COMPONENT.FILEUPLOAD.FILENOTSELECTED"}ngOnInit(){this.initializeUploadForm(),this.updateUploadForm(),this.uploadForm.statusChanges.pipe((0,H.F)(),(0,et.Q)(this.unsubscribe$)).subscribe(nt=>this.uploadFormProvider.uploadFormStatusChanged(nt===st.U.VALID))}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}initializeUploadForm(){this.uploadForm=this.fb.group({uploadFile:new I.hs("",I.k0.required)})}updateUploadForm(){this.uploadFormProvider.preuploadedFile&&(this.placeholder=this.uploadFormProvider.preuploadedFile.name,this.uploadForm.patchValue({uploadFile:this.uploadFormProvider.preuploadedFile}),this.uploadForm.markAsPristine())}onFilesUploaded(nt){nt?.[0]&&this.uploadFormProvider.fileUploaded(nt[0])}static{this.\u0275fac=function(xt){return new(xt||it)(t.rXU(I.ze),t.rXU(C))}}static{this.\u0275cmp=t.VBU({type:it,selectors:[["iwg-direct-debit-upload-form"]],inputs:{uploadDisabled:"uploadDisabled"},decls:4,vars:5,consts:[[1,"upload-form",3,"formGroup"],[1,"upload-form__item"],["formControlName","uploadFile","id","directdebit-file",3,"filesUploaded","placeholder","isDisabled","acceptExtensions","maxFileSizeMB"]],template:function(xt,Dt){1&xt&&(t.qex(0),t.j41(1,"form",0)(2,"div",1)(3,"iwg-fileupload",2),t.bIt("filesUploaded",function(v){return Dt.onFilesUploaded(v)}),t.k0s()()(),t.bVm()),2&xt&&(t.R7$(),t.Y8G("formGroup",Dt.uploadForm),t.R7$(2),t.Y8G("placeholder",Dt.placeholder)("isDisabled",Dt.uploadDisabled)("acceptExtensions",Dt.ALLOWED_EXTENSIONS)("maxFileSizeMB",Dt.MAX_FILE_SIZE_MB))},dependencies:[Et.j,I.qT,I.BC,I.cb,I.j4,I.JD],styles:[".upload-form__item[_ngcontent-%COMP%]{margin-bottom:2rem}"]})}}return it})();var Nt=e(33612);const V=()=>({ConsumerInput_Break:" "}),mt=it=>({ConsumerInput_DirectDebitType:it});function Pt(it,q){1&it&&t.eu8(0)}function l(it,q){if(1&it&&(t.qex(0),t.nrm(1,"br")(2,"br"),t.j41(3,"span"),t.EFF(4),t.nI1(5,"translate"),t.nI1(6,"translate"),t.k0s(),t.bVm()),2&it){const nt=t.XpG(2);t.R7$(4),t.JRh(t.i5U(6,3,"BILLINGPAYMENT.DIRECT_DEBIT.SETUP.INSTRUCTIONS",t.eq3(6,mt,t.bMT(5,1,"BILLINGPAYMENT.DIRECT_DEBIT.TYPES."+nt.directDebitType.toUpperCase()))))}}function $(it,q){if(1&it&&(t.qex(0),t.nrm(1,"iwg-direct-debit-details-form",7),t.bVm()),2&it){const nt=q.ngIf;t.R7$(),t.Y8G("fields",nt)}}function Z(it,q){if(1&it&&(t.qex(0),t.DNE(1,$,2,1,"ng-container",6),t.nI1(2,"async"),t.bVm()),2&it){const nt=t.XpG(2);t.R7$(),t.Y8G("ngIf",t.bMT(2,1,nt.directDebitFields$))}}function ot(it,q){if(1&it){const nt=t.RV6();t.qex(0),t.j41(1,"div",8)(2,"span",9),t.EFF(3,"BILLINGPAYMENT.DIRECT_DEBIT.SETUP.BUSINESS_HOLDER.AUTHORISE_INSTRUCTIONS"),t.k0s(),t.j41(4,"span",9),t.EFF(5,"BILLINGPAYMENT.DIRECT_DEBIT.SETUP.DOWNLOAD_INSTRUCTIONS"),t.k0s(),t.j41(6,"iwg-button",10),t.bIt("click",function(){t.eBV(nt);const Dt=t.XpG(2);return t.Njj(Dt.downloadInstructions())})("keydown.enter",function(){t.eBV(nt);const Dt=t.XpG(2);return t.Njj(Dt.downloadInstructions())}),t.EFF(7," BILLINGPAYMENT.DIRECT_DEBIT.SETUP.DOWNLOAD_CTA "),t.k0s(),t.j41(8,"span",11),t.EFF(9,"BILLINGPAYMENT.DIRECT_DEBIT.SETUP.UPLOAD_INSTRUCTIONS"),t.k0s()(),t.nrm(10,"iwg-direct-debit-upload-form",12),t.nI1(11,"async"),t.j41(12,"form",13)(13,"iwg-checkbox",14),t.bIt("valueChange",function(Dt){t.eBV(nt);const oe=t.XpG(2);return t.Njj(oe.onAuthoriseConfirmationChanged(Dt))}),t.j41(14,"span",15),t.EFF(15,"BILLINGPAYMENT.DIRECT_DEBIT.SETUP.BUSINESS_HOLDER.CONFIRM_AUTHORISED"),t.k0s()()(),t.bVm()}if(2&it){const nt=t.XpG(2);t.R7$(10),t.Y8G("uploadDisabled",!t.bMT(11,2,nt.instructionsDownloaded$)),t.R7$(2),t.Y8G("formGroup",nt.confirmationForm)}}function D(it,q){if(1&it&&(t.j41(0,"div",4)(1,"strong",5),t.EFF(2,"BILLINGPAYMENT.DIRECT_DEBIT.SETUP.DESCRIPTION"),t.k0s(),t.DNE(3,l,7,8,"ng-container",6),t.nI1(4,"async"),t.k0s(),t.DNE(5,Z,3,3,"ng-container",6),t.nI1(6,"async"),t.DNE(7,ot,16,4,"ng-container",6)),2&it){const nt=t.XpG();t.R7$(),t.Y8G("translateParams",t.lJ4(8,V)),t.R7$(2),t.Y8G("ngIf",t.bMT(4,4,nt.showLanguageInstructions$)),t.R7$(2),t.Y8G("ngIf",!t.bMT(6,6,nt.directDebitFieldsLoading$)),t.R7$(2),t.Y8G("ngIf",nt.holderType===nt.AccountHolderType.BusinessHolder)}}function U(it,q){if(1&it&&(t.j41(0,"li")(1,"span",21),t.EFF(2,"BILLINGPAYMENT.DIRECT_DEBIT.FIELDS.CREDITORNAME"),t.k0s(),t.EFF(3),t.k0s()),2&it){const nt=t.XpG().ngIf;t.R7$(3),t.SpI(" ",nt.creditorName,"")}}function gt(it,q){if(1&it&&(t.j41(0,"li")(1,"span",21),t.EFF(2,"BILLINGPAYMENT.DIRECT_DEBIT.FIELDS.CREDITORADDRESS"),t.k0s(),t.EFF(3),t.nI1(4,"iwgAddress"),t.k0s()),2&it){const nt=t.XpG().ngIf;t.R7$(3),t.SpI(" ",t.bMT(4,1,nt.address),"")}}function _t(it,q){if(1&it&&(t.j41(0,"li")(1,"span",21),t.EFF(2,"BILLINGPAYMENT.DIRECT_DEBIT.FIELDS.CREDITORID"),t.k0s(),t.EFF(3),t.k0s()),2&it){const nt=t.XpG().ngIf;t.R7$(3),t.SpI(" ",nt.creditorId,"")}}function ct(it,q){if(1&it&&(t.qex(0),t.j41(1,"span",17)(2,"span",18),t.EFF(3,"BILLINGPAYMENT.DIRECT_DEBIT.SETUP.CREDITOR_INFORMATION_INSTRUCTIONS"),t.k0s(),t.nrm(4,"iwg-hint",19),t.k0s(),t.j41(5,"ul",20),t.DNE(6,U,4,1,"li",6)(7,gt,5,3,"li",6)(8,_t,4,1,"li",6),t.k0s(),t.bVm()),2&it){const nt=q.ngIf;t.R7$(6),t.Y8G("ngIf",nt.creditorName),t.R7$(),t.Y8G("ngIf",nt.address),t.R7$(),t.Y8G("ngIf",nt.creditorId)}}function pt(it,q){if(1&it){const nt=t.RV6();t.j41(0,"div",16)(1,"iwg-button",10),t.bIt("click",function(){t.eBV(nt);const Dt=t.XpG();return t.Njj(Dt.downloadInstructions())})("keydown.enter",function(){t.eBV(nt);const Dt=t.XpG();return t.Njj(Dt.downloadInstructions())}),t.EFF(2," BILLINGPAYMENT.DIRECT_DEBIT.SETUP.DOWNLOAD_SIMPLE_DIRECT_DEBIT_CTA "),t.k0s(),t.DNE(3,ct,9,3,"ng-container",6),t.nI1(4,"async"),t.j41(5,"span",9),t.EFF(6,"BILLINGPAYMENT.DIRECT_DEBIT.SETUP.UPLOAD_SIMPLE_DIRECT_DEBIT_INSTRUCTIONS"),t.k0s()(),t.nrm(7,"iwg-direct-debit-upload-form",12),t.nI1(8,"async")}if(2&it){const nt=t.XpG();t.R7$(3),t.Y8G("ngIf",t.bMT(4,2,nt.directDebitCentre$)),t.R7$(4),t.Y8G("uploadDisabled",!t.bMT(8,4,nt.instructionsDownloaded$))}}let x=(()=>{class it extends m.f{constructor(nt,xt,Dt){super(),this.fb=nt,this.store$=xt,this.translateService=Dt,this.AccountHolderType=s.u,this.DirectDebitType=s.y,this.holderType=s.u.AccountHolder,this.currentStep=g.M.Setup,this.validUpload=!1,this.validDirectDebitDetails=!1,this.nextClicked=!1,this.directDebitFieldsLoading$=this.store$.select(_.Mx),this.directDebitFields$=this.store$.select(_.EU),this.directDebitCentre$=this.store$.select(_.y),this.instructionsDownloaded$=this.store$.select(_.C4),this.nextStepDisabled$=this.store$.select(_.qN).pipe((0,n.T)(oe=>!oe)),this.showLanguageInstructions$=this.store$.select(_.y).pipe((0,n.T)(oe=>oe?.language!==this.translateService.currentLang))}ngOnInit(){this.preuploadedFile=history.state?.file,this.file=this.preuploadedFile,this.confirmationForm=this.fb.group({confirmAuthorised:new I.hs(!1,I.k0.requiredTrue)}
1),this.preuploadedFile&&(this.store$.dispatch(f.EJ({valid:!0})),this.confirmationForm.get("confirmAuthorised").setValue(!0)),this.store$.select(_.XY).pipe((0,d.s)(1)).subscribe(nt=>this.holderType=nt),this.store$.select(_.bU).pipe((0,d.s)(1)).subscribe(nt=>{this.directDebitType=nt,nt!==s.y.Simple&&this.store$.dispatch(f.bG())})}ngOnDestroy(){this.nextClicked||(this.store$.dispatch(f.Pr()),this.store$.dispatch(f.SM()),this.store$.dispatch(f.e1()))}getDirectDebitDetails(){return this.store$.select(_.JV)}canDeactivateModal(){return this.nextClicked?null:"BILLINGPAYMENT.DIRECT_DEBIT.CONFIRM_LEAVE_PAGE"}uploadFormStatusChanged(nt){this.store$.dispatch(f.EJ({valid:nt})),this.validUpload=nt}fileUploaded(nt){this.file=nt}directDebitDetailsFormStatusChanged(nt){this.validDirectDebitDetails=nt,this.store$.dispatch(f.rZ({valid:nt}))}directDebitDetailsFormChanged(nt){this.directDebitDetails=nt,this.store$.dispatch(f.pG({mandate:this.directDebitDetails}))}nextStep(){this.nextClicked=!0,this.store$.dispatch(this.directDebitType===s.y.Simple?f.tO({file:this.file}):f.Tm({directDebitDetails:this.directDebitDetails,file:this.file}))}navigateOrClose(){this.store$.dispatch(y.CP())}downloadInstructions(){this.store$.dispatch(f._i())}getDirectDebitType(){return this.directDebitType}isPageLoading(){return this.store$.select(_.KH)}onAuthoriseConfirmationChanged(nt){this.store$.dispatch(f.F6({value:nt}))}static{this.\u0275fac=function(xt){return new(xt||it)(t.rXU(I.ze),t.rXU(o.il),t.rXU(P.c$))}}static{this.\u0275cmp=t.VBU({type:it,selectors:[["iwg-direct-debit-setup"]],features:[t.Jv_([{provide:T.L,useExisting:(0,t.Rfq)(()=>it)},{provide:h.J,useExisting:(0,t.Rfq)(()=>it)},{provide:C,useExisting:(0,t.Rfq)(()=>it)}]),t.Vt3],decls:7,vars:5,consts:[["directDebit",""],["simple",""],[3,"nextStepDisabled","currentStep"],[4,"ngTemplateOutlet"],[1,"setup-instructions"],["translate","",3,"translateParams"],[4,"ngIf"],[3,"fields"],[1,"instructions"],["translate","",1,"instructions__paragraph"],["type","button","displayType","text-link-inline",1,"instructions__download","text-link","text-link--regular",3,"click","keydown.enter"],["translate","",1,"authorise-instructions__upload"],[3,"uploadDisabled"],[1,"confirmation-form",3,"formGroup"],["formControlName","confirmAuthorised",3,"valueChange"],["translate",""],[1,"instructions","instructions-simple"],[1,"instructions__paragraph"],["translate","",1,"colon"],["wrapperId","direct_debit_setup","message","BILLINGPAYMENT.DIRECT_DEBIT.SETUP.GAIN_BANK_APPROVAL_HINT",1,"hint"],[1,"creditor-list"],["translate","",1,"creditor-info"]],template:function(xt,Dt){if(1&xt&&(t.j41(0,"iwg-direct-debit-flyout",2),t.nI1(1,"async"),t.DNE(2,Pt,1,0,"ng-container",3),t.k0s(),t.DNE(3,D,8,9,"ng-template",null,0,t.C5r)(5,pt,9,6,"ng-template",null,1,t.C5r)),2&xt){const oe=t.sdS(4),v=t.sdS(6);t.Y8G("nextStepDisabled",t.bMT(1,3,Dt.nextStepDisabled$))("currentStep",Dt.currentStep),t.R7$(2),t.Y8G("ngTemplateOutlet",Dt.directDebitType===Dt.DirectDebitType.Simple?v:oe)}},dependencies:[N.bT,N.T3,a.p,I.qT,I.BC,I.cb,I.j4,I.JD,P.Mm,M.Q,G.P,k.U,R.t,dt,N.Jj,P.D9,Nt.o],styles:['.setup-instructions[_ngcontent-%COMP%]{margin-top:-2.4rem;margin-bottom:3rem}@media (max-width: 1023.98px){.setup-instructions[_ngcontent-%COMP%]{margin-top:0}}.instructions[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-bottom:2rem}.instructions__paragraph[_ngcontent-%COMP%]{margin-bottom:1rem;display:flex;align-items:center}.instructions__download[_ngcontent-%COMP%]{margin:2rem 0 3rem;align-self:flex-start}@media (max-width: 1023.98px){.instructions[_ngcontent-%COMP%]{margin-top:0;margin-bottom:1rem}}.instructions-simple[_ngcontent-%COMP%]{margin-top:-3rem;margin-bottom:.5rem}@media (max-width: 1023.98px){.instructions-simple[_ngcontent-%COMP%]{margin-top:0}}.creditor-list[_ngcontent-%COMP%]{padding:0 2rem 2rem;list-style-type:disc}.creditor-info[_ngcontent-%COMP%]{font-weight:var(--font-weight-bold, 700)}.creditor-info[_ngcontent-%COMP%]:after{content:": "}.confirmation-form[_ngcontent-%COMP%]{margin-bottom:3rem}.colon[_ngcontent-%COMP%]:after{content:":"}']})}}return it})()},69273:(lt,O,e)=>{e.d(O,{o:()=>On});var t=e(77339),n=e(59640),d=e(94222),s=e(96354),_=e(53993),f=e(5964),g=e(25558),h=e(99437),C=e(31397),T=e(96697),m=e(35335),I=e(88141),y=e(84572),o=e(7673),P=e(983),N=e(98413),a=e(27559),M=e(77702),G=e(9167),k=e(5567),R=e(10462),J=e(53952),H=e(19266),et=e(62233),st=e(94905),Et=e(99194),dt=e(44469),Nt=e(85952),V=e(51752),mt=e(19662),Pt=e(18224),l=e(65761),$=e(54438),Z=e(50579),ot=e(60156),D=e(69563);let U=(()=>{class u{constructor(j,at,Mt,At,$t){this.paymentMethodCardService=j,this.actions$=at,this.store$=Mt,this.deviceService=At,this.productService=$t,this.isSingleUseCard$=(0,y.z)([this.store$.select(et.Pe),this.store$.select(st.oB),this.store$.select(k.$F)]).pipe((0,s.T)(([yt,Ut,Ht])=>yt||Ut!==J.pI.company&&Ht!==G.wF.dataCash&&Ht!==G.wF.ingenico)),this.cardEntryDetailsGiven$=(0,y.z)([this.store$.select(k.D1),this.store$.select(k.tP),this.store$.select(k.y0),this.store$.select(k.Xe)]).pipe((0,s.T)(([yt,Ut,Ht,Ot])=>!(Ut&&!yt||Ot?.productType===Pt.c.Membership&&!Ht))),this.lowerBusyWhileCardEntryRequestIsHeld$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(M.hw),(0,_.E)(this.cardEntryDetailsGiven$),(0,f.p)(([,yt])=>!yt),(0,s.T)(()=>(0,M.r1)({loading:!1})))),this.setupNewPaymentMethod$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(M.j,M.aN),(0,g.n)(yt=>this.paymentMethodCardService.getHccSessionSetup(yt.hccCentreNumber??yt.locationNumber,yt.countryCode).pi
1pe((0,s.T)(Ut=>(0,M.rC)({...yt,addPaymentCardSetup:Ut})),(0,h.W)(Ut=>(0,o.of)((0,M.lI)())))))),this.loadPaymentMethodCardHccSetupSucces$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(M.rC),(0,s.T)(yt=>(0,M.hw)(yt)))),this.loadPaymentMethodCardHccSetupFail$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(M.lI),(0,s.T)(()=>(0,N.Ds)({notificationType:a._n.error,text:"USER_PROFILE.ADD_PAYMENT_METHOD.CREDIT_OR_DEBIT_CARD.GET_HCC_SETUP_FAIL"})))),this.updateBillingAddressInfo$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(M.RY),(0,C.Z)(yt=>(0,o.of)((0,M.hw)(yt))))),this.loadPaymentMethodCardHccUrl$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(M.hw),(0,g.n)(yt=>this.cardEntryDetailsGiven$.pipe((0,f.p)(Boolean),(0,T.s)(1),(0,m.c)(0),(0,s.T)(()=>yt))),(0,_.E)(this.store$.select(k.D1),this.store$.select(k.Xe)),(0,s.T)(([yt,Ut,Ht])=>({actionData:yt,billingAddressInfo:Ut,sessionTerms:Ht})),(0,_.E)(this.store$.select(k.x),this.store$.select(k.Bw),this.store$.select(k.$F),this.store$.select(k.sT),this.store$.select(k.T1),this.store$.select(k.PG),this.isSingleUseCard$,this.store$.select(mt.lv).pipe((0,s.T)(yt=>yt?.initialTotalPrice?.currency?.id)),this.store$.select(k.AZ),this.store$.select(mt.G2)),(0,s.T)(([yt,Ut,Ht,Ot,Xt,te,se,Ce,Ve,je,Qe])=>{if(!se&&te)return(0,Et.l)();const Ye={paymentProviderId:Ut,centreNumber:Ht,returnUrl:this.getCallbackUrl(G.eL.success),errorUrl:this.getCallbackUrl(G.eL.error),expiryUrl:this.getCallbackUrl(G.eL.expire),billingAddressInfo:yt.billingAddressInfo,paymentProviderType:Ot,isSingleUseCard:Ot===G.wF.worldlinePOP?!yt.sessionTerms?.storeAccount:Ce,isUseSdk:Ot===G.wF.worldpay,captchaToken:se,hccType:yt.actionData.hccType,amount:yt.actionData.preAuthAmount||(Ot===G.wF.worldlinePOP?je?.authorization?.amount:null),currency:Ve??je?.authorization?.currency?.id,visible:yt.sessionTerms?.visible,autoCapture:!(yt.actionData.preAuthAmount>0)&&null},Je=Qe?.toString()?.toLowerCase()===Pt.c[Pt.c.VirtualOffice].toLowerCase()||Qe?.toString()?.toLowerCase()===Pt.c[Pt.c.Membership].toLowerCase(),ln=Xt?.[Ot]??Xt?.[G.Fd.default];return ln?{...ln,...Ye}:Je?(0,M.Wo)(Ye):(0,M.uv)(Ye)}))),this.$defaultCreateHccAction=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(M.uv),(0,g.n)(({type:yt,...Ut})=>this.paymentMethodCardService.createHccSession(Ut).pipe((0,s.T)(Ht=>Ht.hccUrl||Ht.sessionId?(0,M.D8)(Ht):(0,M.Bm)()),(0,h.W)(()=>(0,o.of)((0,M.Bm)())))))),this.defaultCreateValidatedHccAction$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(M.Wo),(0,_.E)(this.store$.select(mt.Fn)),(0,g.n)(([{type:yt,...Ut},Ht])=>this.productService.createValidatedHccSession({...Ut,productPricingRequest:Ht}).pipe((0,s.T)(Ot=>Ot?.hccUrl||Ot?.sessionId?(0,M.D8)(Ot):(0,M.Bm)()),(0,h.W)(()=>(0,o.of)((0,M.Bm)())))))),this.loadPaymentMethodCardHccUrlFail$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(M.Bm),(0,s.T)(()=>(0,N.Ds)({notificationType:a._n.error,text:"USER_PROFILE.ADD_PAYMENT_METHOD.CREDIT_OR_DEBIT_CARD.GET_HCC_SETUP_FAIL"})))),this.submitResult$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(M._m),(0,_.E)(this.store$.select(k.Xo),this.store$.select(k.CT),this.store$.select(k.$F),this.store$.select(dt.mJ),this.store$.select(k.lg)),(0,C.Z)(([{hash:yt,variables:Ut,hccType:Ht,preAuthAmount:Ot},Xt,te,se,Ce,Ve])=>(Ve&&this.store$.dispatch((0,N.ZF)({messageTag:Ve})),Xt===G.XD.waitingForHcc?this.resolveWaitingForHccState(yt,Ut,te,Ht,Ot,se,Ce):P.w)))),this.addPaymentCard$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(M.Qb),(0,_.E)(this.store$.select(k.fx),this.isSingleUseCard$,this.store$.select(l.bA)),(0,_.E)(this.store$.select(k.Pt),this.store$.select(k.$F),this.store$.select(k.Bw),this.store$.select(k.ZB),this.store$.select(k.O5)),(0,s.T)(([[{paymentProviderReference:yt,hccType:Ut,preAuthAmount:Ht},Ot,Xt,te],se,Ce,Ve,je,Qe])=>{const Ye={paymentProviderReference:yt,agreementText:null,centreNumber:Ot,hccCentreNumber:Ve,contactId:te,isSingleUseCard:Xt,hccType:Ut,preAuthAmount:Ht,transactionId:je,externalReference:Qe},Je=se?.[Ce]??se?.[G.Fd.default];return Je?{...Je,...Ye}:(0,M.ZS)(Ye)}))),this.defaultAddPaymentCardAction$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(M.ZS),(0,C.Z)(({type:yt,...Ut})=>this.paymentMethodCardService.addCard(Ut).pipe((0,s.T)(Ht=>(0,M.V$)({response:Ht})),(0,h.W)(Ht=>(0,o.of)((0,M.wr)({hccType:Ut.hccType,preAuthAmount:Ut.preAuthAmount}))))))),this.addPaymentCardSuccess$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(M.V$),(0,C.Z)(()=>[(0,M.fM)()]))),this.addPaymentCardFail$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(M.wr),(0,C.Z)(({hccType:yt,preAuthAmount:Ut})=>[(0,N.Ds)({notificationType:a._n.error,text:"USER_PROFILE.ADD_PAYMENT_METHOD.CREDIT_OR_DEBIT_CARD.ADD_CARD_FAIL"}),(0,M.hw)({hccType:yt,preAuthAmount:Ut})]))),this.compleateFlow$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(M.fM),(0,_.E)(this.store$.select(k.SX),this.isSingleUseCard$),(0,C.Z)(([yt,Ut,Ht])=>[(0,R.sI)({item:{paymentMethodType:J.eq.paymentCard,paymentCard:{...Ut,isSingleUseCard:Ht},directDebit:null},isCompany:!0,isSingleUseCard:Ht}),(0,H.EV)({mustAuthorizeCpa:!1}),(0,M.jD)({}
1)]))),this.getTransactionDetailsSuccess$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(M.S),(0,_.E)(this.store$.select(k.$F)),(0,C.Z)(([{context:yt,transactionDetails:Ut},Ht])=>{switch(Ut.status){case Nt.Uf.success:return this.store$.dispatch((0,V.Or)({isCompleted:!0})),yt.hccType===G.vN.preAuth?[(0,M.yE)()]:[(0,M.Qb)({paymentProviderReference:yt.variables.dts_reference||yt.variables.EXTERNALREFERENCE||yt.ref,hccType:yt.hccType,preAuthAmount:yt.preAuthAmount})];case Nt.Uf.failure:{const Ot=`BILLINGPAYMENT.INVOICESTRANSACTIONS.PAY_BALANCE.ERROR_${Ut.responseCode.toUpperCase()}`;return this.store$.dispatch((0,M.Zq)({lastMessageTag:Ot})),[(0,N.Ds)({notificationType:a._n.error,text:Ot}),(0,M.hw)({hccType:yt.hccType,preAuthAmount:yt.preAuthAmount})]}default:if(Ht===G.wF.ingenicoConnect)return yt.hccType===G.vN.preAuth?[(0,M.yE)()]:[(0,M.Qb)({paymentProviderReference:yt.variables.dts_reference||yt.variables.EXTERNALREFERENCE||yt.ref,hccType:yt.hccType,preAuthAmount:yt.preAuthAmount})];{const Ot="USER_PROFILE.ADD_PAYMENT_METHOD.CREDIT_OR_DEBIT_CARD.HCC_ERROR";return this.store$.dispatch((0,M.Zq)({lastMessageTag:Ot})),[(0,N.Ds)({notificationType:a._n.error,text:Ot}),(0,M.hw)({hccType:yt.hccType,preAuthAmount:yt.preAuthAmount})]}}}))),this.checkBookingTransactionStatus$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(M.GA),(0,I.M)(()=>this.store$.dispatch((0,N.ZF)({messageTag:"COMMON.ERROR"}))),(0,_.E)(this.store$.select(k.ZB),this.store$.select(k.O5),this.store$.select(k.$F)),(0,C.Z)(([yt,Ut,Ht,Ot])=>this.paymentMethodCardService.addCard(Ot===G.wF.worldlinePOP?{externalReference:Ht}:{transactionId:Ut}).pipe((0,s.T)(te=>(0,M.hj)({transactionId:te.transactionId})),(0,h.W)(()=>(0,o.of)((0,M.MU)())))))),this.checkBookingTransactionStatusFailure$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(M.MU),(0,s.T)(()=>(0,N.Ds)({notificationType:a._n.error,text:"COMMON.ERROR"}))))}getCallbackUrl(j){return this.deviceService.window?`${this.deviceService.window.location.origin}/assets/static-pages/add-card.html#${j}`:null}resolveWaitingForHccState(j,at,Mt,At,$t,yt,Ut){if(yt===G.wF.ingenicoConnect&&Ut)return this.store$.dispatch((0,V.NI)({context:{variables:at,ref:Mt,hccType:At,preAuthAmount:$t}})),P.w;switch(j){case G.eL.success:return At===G.vN.preAuth?[(0,M.yE)()]:[(0,M.Qb)({paymentProviderReference:at.dts_reference||at.EXTERNALREFERENCE||Mt,hccType:At,preAuthAmount:$t})];case G.eL.expire:{const Ht="USER_PROFILE.ADD_PAYMENT_METHOD.CREDIT_OR_DEBIT_CARD.HCC_EXPIRED";return this.store$.dispatch((0,M.Zq)({lastMessageTag:Ht})),[(0,N.Ds)({notificationType:a._n.error,text:Ht}),(0,M.hw)({hccType:At,preAuthAmount:$t})]}default:return Ut&&this.store$.dispatch((0,V.NI)({context:{variables:at,ref:Mt,hccType:At,preAuthAmount:$t}})),P.w}}static{this.\u0275fac=function(at){return new(at||u)($.KVO(Z.v),$.KVO(t.En),$.KVO(n.il),$.KVO(ot.g),$.KVO(D.b))}}static{this.\u0275prov=$.jDH({token:u,factory:u.\u0275fac})}}return u})();var gt=e(30786),_t=e(6463),ct=e(60983),pt=e(22960),x=e(38207),it=e(71927),q=e(32226),nt=e(21626),xt=e(2530);let Dt=(()=>{class u{constructor(j,at){this.httpClient=j,this.fileService=at}getDirectDebitCentres(){return this.httpClient.get("directDebit/centres")}createDirectDebitReference(j){return this.httpClient.post("directDebit/mandate-reference",{centreNumber:j}).pipe((0,s.T)(at=>at))}createDirectDebitMandate(j){return this.httpClient.post("directDebit",j)}getDirectDebitFieldsForCentre(j){return this.httpClient.get(`directDebit/centres/${j}/fields`).pipe((0,s.T)(at=>{const Mt={countryIsoCode:at.countryIsoCode,mandatoryFields:at.mandatoryFields,isIbanSupported:at.isIbanSupported,shouldValidate:at.shouldValidate,bankaccountname:null,bankaccountnumber:null,bankbranchcode:null,bankname:null,customername:null,iban:null,nameofpersonsigning:null,positionofpersonsigning:null,banksortcode:null,swiftcode:null,customeraddress:null,mandatedate:null,mandatereference:null,paymentstartdate:null,paymentcategory:null,paymenttiming:null,paymenttype:null};return at.fieldRules.forEach(At=>{const $t=At.name?.toLowerCase();void 0!==Mt[$t]&&(Mt[$t]=At)}),Mt}))}downloadDirectDebitSimpleTemplate(j){return this.httpClient.get(`directDebit/simple-template/download?countryIsoCode=${j}`,{responseType:"blob",observe:"response"}).pipe((0,s.T)(Mt=>{const At=Mt.headers.get("content-disposition"),$t=this.fileService.getFilenameFromContentDisposition(At)||`Simple_Template_${j}`,yt=[];return yt.push(Mt.body),{blob:new Blob(yt,{type:Mt.body.type}),name:$t}}))}generateDirectDebitDocument(j,at,Mt,At,$t){return this.httpClient.post("directDebit/generate-instructions",{directDebit:{...$t,mandatereference:$t.mandateReference}
1,centreNumber:j,countryIsoCode:at,accountId:Mt,contactId:At},{responseType:"blob",observe:"response"}).pipe((0,s.T)(Ut=>{const Ht=Ut.headers.get("content-disposition"),Ot=this.fileService.getFilenameFromContentDisposition(Ht)||"Direct_Debit",Xt=[];return Xt.push(Ut.body),{blob:new Blob(Xt,{type:Ut.body.type}),name:Ot}}))}uploadSimpleFile(j,at){const Mt=`directDebit/centres/${j}/simple-template/upload`,At=new FormData;return At.append("file",at,at.name),this.httpClient.post(Mt,At,{observe:"events"}).pipe((0,f.p)($t=>$t.type===nt.hv.Response),(0,s.T)($t=>$t.type===nt.hv.Response&&$t.body))}uploadFile(j,at,Mt,At,$t,yt){const Ut=new FormData;return Ut.append("mandateRequest",JSON.stringify({directDebit:Mt,centreNumber:j,countryIsoCode:at,accountId:$t,contactId:yt})),Ut.append("file",At,At.name),this.httpClient.post("directDebit/upload-instructions",Ut,{reportProgress:!0,observe:"events"}).pipe((0,f.p)(Ht=>Ht.type===nt.hv.Response),(0,s.T)(Ht=>Ht.type===nt.hv.Response&&Ht.body))}getGuaranteeText(j){return this.httpClient.get(`directDebit/guarantee?centreNumber=${j}`).pipe((0,s.T)(at=>at.guarantee))}getDirectDebitCentresForCountry(j){return this.httpClient.get(`directDebit/centres/${j}`)}createDirectDebitMandates(j,at,Mt,At){return this.httpClient.post("directDebit/multiple",{accounts:j,countryIsoCode:Mt,directDebitType:at,directDebit:At})}static{this.\u0275fac=function(at){return new(at||u)($.KVO(nt.Qq),$.KVO(xt.E))}}static{this.\u0275prov=$.jDH({token:u,factory:u.\u0275fac,providedIn:"root"})}}return u})(),oe=(()=>{class u{constructor(j,at,Mt,At){this.actions$=j,this.directDebitService=at,this.store$=Mt,this.fileService=At,this.downloadDirectDebitInstructions$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(pt._i),(0,_.E)(this.store$.select(_t.y),this.store$.select(_t.JV),this.store$.select(_t.kL),this.store$.select(q.XY),this.store$.select(q.hE),this.store$.select(q.e1)),(0,g.n)(([$t,yt,Ut,Ht,Ot,Xt,te])=>yt?Ht||yt.directDebitType===ct.y.Simple?(yt.directDebitType===ct.y.Simple?this.directDebitService.downloadDirectDebitSimpleTemplate(yt.address.countryIsoCode):this.directDebitService.generateDirectDebitDocument(yt.centreNumber,Xt,te.accountId,te.contactId,{...Ut,isPaperless:yt.directDebitType!==ct.y.DirectDebit||Ot===ct.u.AccountHolder})).pipe((0,I.M)(Ce=>this.fileService.saveAs(Ce.blob,Ce.name)),(0,s.T)(()=>pt._b()),(0,h.W)(()=>(0,o.of)(pt.Jr({error:"BILLINGPAYMENT.DIRECT_DEBIT.INSTRUCTIONS_DOWNLOAD_FAILED"})))):(0,o.of)(pt.Jr({error:"BILLINGPAYMENT.DIRECT_DEBIT.VALIDATION_ERRORS.PLURAL_INVALID"})):(0,o.of)(pt.Jr({error:"BILLINGPAYMENT.DIRECT_DEBIT.INSTRUCTIONS_DOWNLOAD_FAILED"}))))),this.downloadDirectDebitInstructionsFailure$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(pt.Jr),(0,s.T)($t=>(0,N.Ds)({notificationType:x._.error,text:$t.error})))),this.uploadSimpleTemplate$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(pt.tO),(0,_.E)(this.store$.select(_t.$n)),(0,gt.p)(([$t,yt])=>this.directDebitService.uploadSimpleFile(yt,$t.file).pipe((0,s.T)(()=>pt.TQ()),(0,h.W)(Ut=>(0,o.of)(pt.uB())))))),this.uploadSimpleTemplateSuccess$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(pt.TQ),(0,s.T)(()=>pt.y6()))),this.uploadSimpleTemplateFailure$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(pt.uB),(0,s.T)($t=>(0,N.Ds)({notificationType:x._.error,text:"BILLINGPAYMENT.DIRECT_DEBIT.SIMPLE_TEMPLATE_UPLOAD_FAILED"}))))}static{this.\u0275fac=function(at){return new(at||u)($.KVO(t.En),$.KVO(Dt),$.KVO(n.il),$.KVO(xt.E))}}static{this.\u0275prov=$.jDH({token:u,factory:u.\u0275fac})}}return u})();var v=e(50229),_e=e(4705);let ue=(()=>{class u{constructor(j,at){this.actions$=j,this.router=at,this.SETUP_PAGE="direct-debit-setup",this.REVIEW_PAGE="direct-debit-review",this.FINISH_PAGE="direct-debit-finish",this.navigateToDirectDebitSetupPage$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(v.Ii),(0,I.M)(()=>this.router.navigate(["../",this.SETUP_PAGE],{relativeTo:this.getCurrentActivatedRoute(this.router.routerState.root),queryParamsHandling:"merge"}))),{dispatch:!1}),this.navigateToDirectDebitReviewPage$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(v.VX),(0,I.M)(Mt=>{this.router.navigate(["../",this.REVIEW_PAGE],{relativeTo:this.getCurrentActivatedRoute(this.router.routerState.root),state:{file:Mt.file},queryParamsHandling:"merge"})})),{dispatch:!1}),this.navigateBackToDirectDebitSetupPage$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(v.dw),(0,I.M)(Mt=>{this.router.navigate(["../",this.SETUP_PAGE],{relativeTo:this.getCurrentActivatedRoute(this.router.routerState.root),state:{file:Mt.file},replaceUrl:!0,queryParamsHandling:"merge"})})),{dispatch:!1}),this.navigateToDirectDebitFinishPage$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(v.y6),(0,I.M)(()=>{this.router.navigate(["../",this.FINISH_PAGE],{relativeTo:this.getCurrentActivatedRoute(this.router.routerState.root),queryParamsHandling:"merge",replaceUrl:!0})}
1)),{dispatch:!1}),this.navigateToDirectDebitStartFlowPage$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(v.Fj),(0,I.M)(()=>{this.router.navigate(["../"],{relativeTo:this.getCurrentActivatedRoute(this.router.routerState.root),queryParamsHandling:"merge"})})),{dispatch:!1})}getCurrentActivatedRoute(j){const at=j.children?.find(Mt=>"primary"===Mt.outlet);return at?this.getCurrentActivatedRoute(at):j}static{this.\u0275fac=function(at){return new(at||u)($.KVO(t.En),$.KVO(_e.Ix))}}static{this.\u0275prov=$.jDH({token:u,factory:u.\u0275fac})}}return u})(),re=(()=>{class u{constructor(j,at,Mt){this.actions$=j,this.directDebitService=at,this.store$=Mt,this.loadDirectDebitGuarantee$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(pt.jp),(0,_.E)(this.store$.select(_t.bU),this.store$.select(_t.$n)),(0,g.n)(([At,$t,yt])=>$t===ct.y.ACH||$t===ct.y.PAD?this.directDebitService.getGuaranteeText(yt).pipe((0,s.T)(Ut=>pt.R1({guarantee:Ut})),(0,h.W)(()=>(0,o.of)(pt.om()))):(0,o.of)(pt.R1({guarantee:null})))))}static{this.\u0275fac=function(at){return new(at||u)($.KVO(t.En),$.KVO(Dt),$.KVO(n.il))}}static{this.\u0275prov=$.jDH({token:u,factory:u.\u0275fac})}}return u})();var bt=e(3135);let Te=(()=>{class u{constructor(j,at,Mt){this.actions$=j,this.directDebitService=at,this.store$=Mt,this.directDebitCentres$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(bt.NP),(0,_.E)(this.store$.select(bt.wc)),(0,f.p)(([At,$t])=>!$t),(0,g.n)(At=>this.directDebitService.getDirectDebitCentres().pipe((0,s.T)($t=>$t&&$t.length>0?bt.Hv({accountCentres:$t}):bt.w3()),(0,h.W)($t=>(0,o.of)(bt.w3())))))),this.directDebitFieldsForCentre$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(bt.Ke),(0,_.E)(this.store$.select(bt.EU),this.store$.select(bt.$n),this.store$.select(bt.hE)),(0,g.n)(([At,$t,yt,Ut])=>$t?.countryIsoCode===Ut?(0,o.of)(bt.s4({fields:$t})):this.directDebitService.getDirectDebitFieldsForCentre(yt).pipe((0,s.T)(Ht=>bt.s4({fields:Ht})),(0,h.W)(Ht=>(0,o.of)(bt.b4())))))),this.directDebitFieldsForCentreFailure$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(bt.b4),function Ft(u,Q=x._.error){return(0,s.T)(j=>(0,N.Ds)({notificationType:Q,text:u}))}("BILLINGPAYMENT.DIRECT_DEBIT.FIELDS_LOAD_FAILED"))),this.directDebitSetupRequest$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(bt.AH),(0,_.E)(this.store$.select(bt.bU)),(0,g.n)(([At,$t])=>$t===ct.y.Simple?[bt.s4({fields:null}),bt.Ii()]:[bt.Ke(),bt.Ii()]))),this.directDebitReviewRequest$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(bt.Tm),(0,_.E)(this.store$.select(bt.$n),this.store$.select(bt.yl),this.store$.select(bt.bU)),(0,gt.p)(([At,$t,yt,Ut])=>(0,o.of)(Ut===ct.y.Simple||yt?.centreNumber===$t?bt.VX({file:At.file}):bt.YZ()))))}static{this.\u0275fac=function(at){return new(at||u)($.KVO(t.En),$.KVO(Dt),$.KVO(n.il))}}static{this.\u0275prov=$.jDH({token:u,factory:u.\u0275fac})}}return u})();var E=e(32319),F=e(14399);function L(u,Q=x._.error){return(0,s.T)(j=>(0,N.Ds)({notificationType:Q,text:u}))}let ft=(()=>{class u{constructor(j,at,Mt,At,$t){this.actions$=j,this.directDebitService=at,this.store$=Mt,this.accStore$=At,this.coreStore$=$t,this.generateMandateReferenceRequest$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(bt.bG),(0,_.E)(this.store$.select(bt.$n),this.store$.select(bt.yl)),(0,gt.p)(([yt,Ut,Ht])=>Ht?.centreNumber===Ut?(0,o.of)(bt.tq({mandateReference:Ht})):this.directDebitService.createDirectDebitReference(Ut).pipe((0,s.T)(Ot=>bt.tq({mandateReference:Ot})),(0,h.W)(Ot=>(0,o.of)(bt.YZ())))))),this.generateMandateReferenceFailure$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(bt.YZ),L("BILLINGPAYMENT.DIRECT_DEBIT.REFERENCE_NOT_GENERATED"))),this.directDebitMandateRequest$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(bt.VD),(0,_.E)(this.store$.select(bt.$n),this.store$.select(bt.JV),this.store$.select(bt.XY),this.store$.select(bt.hE),this.store$.select(bt.ND)),(0,gt.p)(([yt,Ut,Ht,Ot,Xt,te])=>{if(Ot===ct.u.AccountHolder){const se={centreNumber:Ut,countryIsoCode:Xt,accountId:te.accountId,contactId:te.contactId,directDebit:{...Ht,isPaperless:!0}};return this.directDebitService.createDirectDebitMandate(se).pipe((0,s.T)(Ce=>bt.Pj({mandate:Ce})),(0,h.W)(Ce=>(0,o.of)(bt.ER())))}return this.directDebitService.uploadFile(Ut,Xt,{...Ht,isPaperless:!1},yt.file,te.accountId,te.contactId).pipe((0,s.T)(se=>bt.Pj({mandate:se})),(0,h.W)(se=>(0,o.of)(bt.ER())))}))),this.directDebitMandateSuccess$=(0,t.EH)(()=>
1this.actions$.pipe((0,t.gp)(bt.Pj),(0,C.Z)(({mandate:yt})=>[bt.y6(),(0,R.sI)({item:{paymentMethodType:J.eq.directDebit,directDebit:yt,paymentCard:null},isCompany:!0})]))),this.directDebitMandateFailure$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(bt.ER),L("BILLINGPAYMENT.DIRECT_DEBIT.CREATE_MANDATE_FAILED"))),this.defaultDirectDebitDetails$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(bt.Ws),(0,_.E)(this.coreStore$.select(et.Hg),this.accStore$.select(l.Nl),this.store$.select(bt.bU)),(0,s.T)(([yt,Ut,Ht,Ot])=>{const Xt=[Ut.firstName,Ut.lastName].join(" "),te={},se=new Date,Ce=Date.UTC(se.getUTCFullYear(),se.getUTCMonth(),se.getUTCDate(),se.getUTCHours(),se.getUTCMinutes());return te.mandatedate=new Date(Ce),(Ot===ct.y.ACH||Ot===ct.y.PAD)&&(te.bankaccountname=Xt,te.nameofpersonsigning=Xt,te.customername=Ht,te.paymentstartdate=new Date(se.getFullYear(),se.getMonth(),se.getDate()),te.paymentstartdate.setDate(se.getDate()+15)),bt.Eg({mandate:te})}))),this.createDirectDebitForMultipleAccounts$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(bt.Tc),(0,_.E)(this.store$.select(bt.bU),this.store$.select(bt.eZ),this.store$.select(bt.JV),this.store$.select(bt.hE),this.store$.select(E.tg)),(0,gt.p)(([yt,Ut,Ht,Ot,Xt,te])=>this.directDebitService.createDirectDebitMandates(Ht.map(se=>({accountId:se.accountId,centreNumber:se.centres?.[0]?.centreNumber,contactId:se.contactId})),Ut,Xt,Ot).pipe((0,C.Z)(()=>[bt.zl(),te?(0,F.I1)():bt.Fj()]),(0,h.W)(()=>(0,o.of)(bt.wb())))))),this.createDirectDebitMultipleAccountsSuccess$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(bt.zl),(0,s.T)(()=>(0,N.Ds)({text:"BILLINGPAYMENT.DIRECT_DEBIT.FINISH.ADDITIONAL_CENTRES.CREATING_MANDATES_SUCCESS",notificationType:x._.success,removeOnRedirect:!1,displayTime:1e4})))),this.createDirectDebitMultipleAccountsFailure$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(bt.wb),L("BILLINGPAYMENT.DIRECT_DEBIT.FINISH.ADDITIONAL_CENTRES.CREATING_MANDATES_FAILURE"))),this.createDirectDebitMultipleAccountsOrNavigate$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(bt.mk),(0,_.E)(this.store$.select(bt.eZ),this.store$.select(E.tg)),(0,g.n)(([yt,Ut,Ht])=>(0,o.of)(Ut?.length>0?bt.Tc():Ht?(0,F.I1)():bt.Fj()))))}static{this.\u0275fac=function(at){return new(at||u)($.KVO(t.En),$.KVO(Dt),$.KVO(n.il),$.KVO(n.il),$.KVO(n.il))}}static{this.\u0275prov=$.jDH({token:u,factory:u.\u0275fac})}}return u})(),K=(()=>{class u{constructor(j,at,Mt){this.actions$=j,this.store$=at,this.directDebitService=Mt,this.getAdditionalCentres$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(bt.dR),(0,_.E)(this.store$.select(bt.y)),(0,g.n)(([At,$t])=>this.directDebitService.getDirectDebitCentresForCountry($t?.address?.countryIsoCode).pipe((0,s.T)(yt=>bt.D3({additionalCentres:yt.filter(Ut=>Ut.centres?.[0]?.financialAccountId!==$t?.financialAccountId)})),(0,h.W)(()=>(0,o.of)(bt.mI()))))))}static{this.\u0275fac=function(at){return new(at||u)($.KVO(t.En),$.KVO(n.il),$.KVO(Dt))}}static{this.\u0275prov=$.jDH({token:u,factory:u.\u0275fac})}}return u})(),Tt=(()=>{class u{constructor(j){this.httpClient=j}validateBankAccountDetails(j){return this.httpClient.post("bank-account-details/validate",j)}static{this.\u0275fac=function(at){return new(at||u)($.KVO(nt.Qq))}}static{this.\u0275prov=$.jDH({token:u,factory:u.\u0275fac,providedIn:"root"})}}return u})();const ae=[oe,ue,re,Te,ft,K,(()=>{class u{constructor(j,at){this.actions$=j,this.bankAccountDetailsValidationService=at,this.validateBankAccountDetails$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(bt.NF),(0,g.n)(({validationRequest:Mt})=>this.bankAccountDetailsValidationService.validateBankAccountDetails(Mt).pipe((0,s.T)(At=>bt.Hd({validationResponse:At})),(0,h.W)(()=>(0,o.of)(bt.w1())))))),this.validateBankAccountDetailsFailure$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(bt.w1),(0,s.T)(()=>(0,N.Ds)({notificationType:x._.error,text:"BILLINGPAYMENT.DIRECT_DEBIT.VALIDATION_FAILED"}))))}static{this.\u0275fac=function(at){return new(at||u)($.KVO(t.En),$.KVO(Tt))}}static{this.\u0275prov=$.jDH({token:u,factory:u.\u0275fac})}}return u})()];var ne=e(8839),de=e(86734),vt=e(62253),Jt=e(56374),Gt=e(87906);let wt=(()=>{class u{constructor(j){this.httpClient=j}deleteMandate(j,at=!1){return this.httpClient.delete(`DirectDebit/${j}?preview=${at}`)}static{this.\u0275fac=function(at){return new(at||u)($.KVO(nt.Qq))}}static{this.\u0275prov=$.jDH({token:u,factory:u.\u0275fac,providedIn:"root"})}}return u})();var ee=e(13997),me=e(57801);let Me=(()=>{class u{constructor(j,at){this.httpClient=j,this.dateService=at}mapGetPaymentMethodResponse(j){return j?{...j,directDebit:j.directDebit&&{...j.directDebit,createDate:new Date(j.directDebit.createDate)},paymentCard:j.paymentCard&&{...j.paymentCard,createDate:this.getCorrectDate(j.paymentCard.createDate),cardExpire:this.getCorrectDate(j.paymentCard.cardExpire)}}:null}getAvailablePaymentMethods(j){return this.httpClient.get("paymentMethod/available-payment-methods",{params:(0,ee.Pp)(j)})}getDefaultCentres(j=null){j??={page:1,pageSize:10};const at=(0,ee.Pp)(j);return this.httpClient.get("paymentMethod/v2/centres/defaults",{params:at})}setDefaultCentres(j){return this.httpClient.put("paymentMethod/centres/defaults",j)}getAll(j){return this.httpClient.get("paymentMethod",{params:(0,ee.Pp)(j)}).pipe((0,s.T)(at=>at.map(Mt=>this.mapGetPaymentMethodResponse(Mt))))}getById(j){return this.httpClient.get(`paymentMethod/${j.paymentMethodType}/${j.paymentMethodId}`).pipe((0,s.T)(at=>this.mapGetPaymentMethodResponse(at)))}getAddPaymentMethodRequirements(){return this.httpClient.get("paymentMethod/requirements")}getCorrectDate(j){return this.dateService.create(j).toDate()}static{this.\u0275fac=function(at){return new(at||u)($.KVO(nt.Qq),$.KVO
1(me.k))}}static{this.\u0275prov=$.jDH({token:u,factory:u.\u0275fac,providedIn:"root"})}}return u})();var ye=e(59756),be=e(68018),ve=e(39178);const Kt="PAYMENT.MESSAGE_TAG",B="COMMON.CANCEL";let W=(()=>{class u{filterMatchingOldItems(j,at){return(j||[]).filter(Mt=>!!at.some(At=>At.centreNumber.join(",")===Mt.centreNumber.join(",")))}canRemovePaymentMethod(j){return this.createDeleteRequest(j,!0).pipe((0,g.n)(Mt=>{const At=Mt.operationStatus?Mt.operationStatus[0]:null;return this.store$.dispatch((0,R.Td)({isRemoveInProcess:!1})),this.createModal(At)}))}createDeleteRequest(j,at=!1){let Mt;switch(j.paymentMethodType){case J.eq.paymentCard:Mt=this.paymentMethodCardService.deleteCard(j.paymentMethodId,at);break;case J.eq.directDebit:Mt=this.paymentMethodDirectDebitService.deleteMandate(j.paymentMethodId,at)}return at?Mt.pipe((0,h.W)(()=>(0,o.of)({operationStatus:null}))):Mt}createModal(j){switch(j){case J.Ap.defaultPaymentMethod:return this.confirmationDialogService.showModal({title:"BILLINGPAYMENT.PAYMENTMETHODS.LIST.REMOVE_CONFIRMATION.DEFAULT_PAYMENT_METHOD_HEADING",content:{key:"BILLINGPAYMENT.PAYMENTMETHODS.LIST.REMOVE_CONFIRMATION.DEFAULT_PAYMENT_METHOD_BODY",params:{ConsumerInput_AnchorTagStart:'<a class="text-link" href="/billing-payment/payment-methods">',ConsumerInput_AnchorTagEnd:"</a>"}},secondaryButton:B,primaryButton:void 0,isHTMLMessage:!0});case J.Ap.lastPaymentMethodAndUsedByNotCompletedLongTermBooking:return this.confirmationDialogService.showModal({title:"BILLINGPAYMENT.PAYMENTMETHODS.LIST.REMOVE_CONFIRMATION.LAST_PAYMENT_METHOD_WITH_LONG_TERM_BOOKING_HEADING",content:"BILLINGPAYMENT.PAYMENTMETHODS.LIST.REMOVE_CONFIRMATION.LAST_PAYMENT_METHOD_WITH_LONG_TERM_BOOKING_BODY",primaryButton:"BILLINGPAYMENT.PAYMENTMETHODS.LIST.REMOVE_CONFIRMATION.LAST_PAYMENT_METHOD_WITH_LONG_TERM_BOOKING_CTA",secondaryButton:B}).pipe(this.navigateToAddPaymentMethod());case J.Ap.lastPaymentMethodWithActiveMembership:return this.confirmationDialogService.showModal({title:"BILLINGPAYMENT.PAYMENTMETHODS.LIST.REMOVE_CONFIRMATION.LAST_PAYMENT_METHOD_WITH_LONG_TERM_BOOKING_HEADING",content:"BILLINGPAYMENT.PAYMENTMETHODS.LIST.REMOVE_CONFIRMATION.LAST_PAYMENT_METHOD_WITH_ACTIVE_PRODUCT_BODY",primaryButton:"BILLINGPAYMENT.PAYMENTMETHODS.LIST.REMOVE_CONFIRMATION.LAST_PAYMENT_METHOD_WITH_ACTIVE_PRODUCT_CTA",secondaryButton:B}).pipe(this.navigateToAddPaymentMethod());case J.Ap.lastAndDefaultPaymentMethod:return this.confirmationDialogService.showModal({title:"BILLINGPAYMENT.PAYMENTMETHODS.LIST.REMOVE_CONFIRMATION.LAST_AND_DEFAULT_PAYMENT_METHOD_HEADING",content:"BILLINGPAYMENT.PAYMENTMETHODS.LIST.REMOVE_CONFIRMATION.LAST_AND_DEFAULT_PAYMENT_METHOD_BODY",primaryButton:"BILLINGPAYMENT.PAYMENTMETHODS.LIST.REMOVE_CONFIRMATION.LAST_AND_DEFAULT_PAYMENT_METHOD_CTA",secondaryButton:B}).pipe(this.navigateToAddPaymentMethod());default:return this.confirmationDialogService.showModal({title:"BILLINGPAYMENT.PAYMENTMETHODS.LIST.REMOVE_CONFIRMATION.TITLE",content:[this.translate.instant("BILLINGPAYMENT.PAYMENTMETHODS.LIST.REMOVE_CONFIRMATION.CONTENT_COMPANY"),this.translate.instant("BILLINGPAYMENT.PAYMENTMETHODS.LIST.REMOVE_CONFIRMATION.CONTENT_PERSONAL_CONTINUATION")].join("<br/>"),isHTMLMessage:!0})}}navigateToAddPaymentMethod(){return(0,s.T)(j=>(j&&this.store$.dispatch((0,de.CP)()),!1))}getDeaultsChangeSuccessMessages(j,at){return j.map(Mt=>({newItem:Mt,oldItem:at.find(At=>At.centreNumber.join(",")===Mt.centreNumber.join(","))})).filter(Mt=>Mt.newItem?.defaultPaymentMethod?.paymentMethodId!==Mt.oldItem?.defaultPaymentMethod?.paymentMethodId||Mt.newItem?.defaultPaymentMethod?.paymentMethodType!==Mt.oldItem?.defaultPaymentMethod?.paymentMethodType).map(Mt=>Mt.oldItem?.defaultPaymentMethod?.paymentMethodType===J.eq.directDebit&&Mt.newItem?.defaultPaymentMethod?.paymentMethodType===J.eq.directDebit?"BILLINGPAYMENT.PAYMENTMETHODS.LIST.NOTIFICATIONS.SET_DEFAULTS_DD_DD_SUCCESS":Mt.oldItem?.defaultPaymentMethod?.paymentMethodType===J.eq.directDebit&&Mt.newItem?.defaultPaymentMethod?.paymentMethodType===J.eq.paymentCard?"BILLINGPAYMENT.PAYMENTMETHODS.LIST.NOTIFICATIONS.SET_DEFAULTS_DD_CC_SUCCESS":Mt.oldItem?.defaultPaymentMethod?.paymentMethodType===J.eq.paymentCard&&Mt.newItem?.defaultPaymentMethod?.paymentMethodType===J.eq.directDebit?"BILLINGPAYMENT.PAYMENTMETHODS.LIST.NOTIFICATIONS.SET_DEFAULTS_CC_DD_SUCCESS":Mt.oldItem?.defaultPaymentMethod?.paymentMethodType===J.eq.paymentCard&&Mt.newItem?.defaultPaymentMethod?.paymentMethodType===J.eq.paymentCard?"BILLINGPAYMENT.PAYMENTMETHODS.LIST.NOTIFICATIONS.SET_DEFAULTS_CC_CC_SUCCESS":Mt.newItem?.defaultPaymentMethod?.paymentMethodType===J.eq.directDebit?"BILLINGPAYMENT.PAYMENTMETHODS.LIST.NOTIFICATIONS.SET_DEFAULTS_DD_SUCCESS":"BILLINGPAYMENT.PAYMENTMETHODS.LIST.NOTIFICATIONS.SET_DEFAULTS_SUCCESS").map(Mt=>(0,N.Ds)({notificationType:x._.success,text:Mt,messageTag:Kt}))}constructor(j,at,Mt,At,$t,yt,Ut,Ht){this.paymentMethodDirectDebitService=j,this.paymentMethodCardService=at,this.paymentMethodService=Mt,this.actions$=At,this.store$=$t,this.confirmationDialogService=yt,this.translate=Ut,this.ngxLogger=Ht,this.getPaymentMethods$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(R.J5),(0,C.Z)(({params:Ot})=>this.store$.select((0,ne.sV)(Ot)).pipe((0,T.s)(1),(0,f.p)(Xt=>!Xt),(0,s.T)(()=>(0,R.A)({params:Ot})))))),this.getPaymentMethodsForce$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(R.A),(0,I.M)(()=>
1this.store$.dispatch((0,N.ZF)({messageTag:"BILLINGPAYMENT.PAYMENTMETHODS.LIST.NOTIFICATIONS.GET_FAIL"}))),(0,C.Z)(({params:Ot})=>this.paymentMethodService.getAll(Ot).pipe((0,s.T)(Xt=>(0,R.QG)({params:Ot,items:Xt})),(0,h.W)(()=>[(0,R.J3)({params:Ot})]))))),this.getPaymentMethodsFail$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(R.J3),(0,s.T)(()=>(0,N.Ds)({notificationType:x._.error,text:"BILLINGPAYMENT.PAYMENTMETHODS.LIST.NOTIFICATIONS.GET_FAIL"})))),this.getPaymentMethod$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(R.eB),(0,C.Z)(({params:Ot})=>(0,o.of)(Ot).pipe((0,_.E)(this.store$.select((0,ne.sp)(Ot)),this.store$.select((0,ne.cA)(Ot))),(0,f.p)(([Xt,te,se])=>!se&&!te),(0,s.T)(()=>(0,R.fb)({params:Ot})))))),this.getPaymentMethodForce$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(R.fb),(0,I.M)(()=>this.store$.dispatch((0,N.ZF)({messageTag:"BILLINGPAYMENT.PAYMENTMETHODS.LIST.NOTIFICATIONS.GET_ITEM_FAIL"}))),(0,C.Z)(({params:Ot})=>this.paymentMethodService.getById(Ot).pipe((0,s.T)(Xt=>(0,R.pq)({params:Ot,item:Xt})),(0,h.W)(()=>[(0,R.yD)({params:Ot})]))))),this.getPaymentMethodFail$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(R.yD),(0,s.T)(()=>(0,N.Ds)({notificationType:x._.error,text:"BILLINGPAYMENT.PAYMENTMETHODS.LIST.NOTIFICATIONS.GET_ITEM_FAIL"})))),this.getPaymentMethodsDefaultCentres$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(R.QV),(0,_.E)(this.store$.select(ne.di),this.store$.select(ne.zk),this.store$.select(ne.kN)),(0,f.p)(([{filterRequest:Ot},Xt,te])=>!Xt||Ot!=te),(0,s.T)(([{filterRequest:Ot}])=>(0,R.tV)({filterRequest:Ot})))),this.getPaymentMethodsDefaultCentresForce$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(R.tV),(0,I.M)(()=>this.store$.dispatch((0,N.ZF)({messageTag:"BILLINGPAYMENT.PAYMENTMETHODS.LIST.NOTIFICATIONS.GET_DEFAULTS_FAIL"}))),(0,g.n)(({filterRequest:Ot,nextPage:Xt})=>this.paymentMethodService.getDefaultCentres(Ot).pipe((0,s.T)(te=>(0,R.rg)({defaultCentresPaged:te,nextPage:Xt})),(0,h.W)(()=>[(0,R.SM)()]))))),this.getPaymentMethodsDefaultCentresFail$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(R.SM),(0,s.T)(()=>(0,N.Ds)({notificationType:x._.error,text:"BILLINGPAYMENT.PAYMENTMETHODS.LIST.NOTIFICATIONS.GET_DEFAULTS_FAIL"})))),this.setPaymentMethodsDefaultCentres$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(R.GW),(0,I.M)(()=>this.store$.dispatch((0,N.ZF)({messageTag:Kt}))),(0,C.Z)(({defaultCentres:Ot,accountId:Xt})=>this.paymentMethodService.setDefaultCentres({paymentRequest:Ot[0],accountId:Xt}).pipe((0,C.Z)(()=>this.store$.select(ne.s9).pipe((0,T.s)(1),(0,s.T)(te=>(0,R.N7)({defaultCentres:Ot,oldItems:this.filterMatchingOldItems(te,Ot)})))),(0,h.W)(()=>[(0,R.uu)()]))))),this.setPaymentMethodsDefaultCentresFail$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(R.uu),(0,s.T)(()=>(0,N.Ds)({notificationType:x._.error,text:"BILLINGPAYMENT.PAYMENTMETHODS.LIST.NOTIFICATIONS.SET_DEFAULTS_FAIL",messageTag:Kt})))),this.setPaymentMethodsDefaultCentresSuccess$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(R.N7),(0,C.Z)(({defaultCentres:Ot,oldItems:Xt})=>this.getDeaultsChangeSuccessMessages(Ot,Xt)))),this.removePaymentMethod$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(R.m0),(0,I.M)(()=>this.store$.dispatch((0,N.ZF)({messageTag:Kt}))),(0,gt.p)(({params:Ot})=>this.canRemovePaymentMethod(Ot).pipe((0,f.p)(Xt=>Xt),(0,s.T)(()=>({params:Ot})))),(0,_.E)(this.store$.select((0,ne.s1)({params:{listType:J.pI.company}}))),(0,I.M)(()=>this.store$.dispatch((0,R.Td)({isRemoveInProcess:!0}))),(0,C.Z)(([{params:Ot},Xt])=>{let te=!1;const se=this.createDeleteRequest(Ot,!1);return Ot.paymentMethodType===J.eq.paymentCard&&(te=!0),se.pipe((0,C.Z)(Ce=>te?[(0,R.zs)({params:Ot,operationStatus:Ce?.operationStatus}),(0,H.EV)({mustAuthorizeCpa:!Xt||Xt.length<=1})]:[(0,R.zs)({params:Ot,operationStatus:Ce?.operationStatus})]),(0,h.W)(({status:Ce})=>[(0,R.CM)({status:Ce})]))}))),this.removePaymentMethodSuccess$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(R.zs),(0,I.M)(({params:Ot,operationStatus:Xt})=>!Xt.length&&this.ngxLogger.log((0,vt.Ck)(Gt.y.Remove,Jt.j.Company,Ot.paymentMethodType))),(0,C.Z)(({operationStatus:Ot})=>Ot.length?Ot.filter(Xt=>!!this.removePaymentMethodStatus[Xt]).map(Xt=>(0,N.Ds)({notificationType:x._.success,text:this.removePaymentMethodStatus[Xt]})):[(0,N.Ds)({notificationType:x._.success,text:"BILLINGPAYMENT.PAYMENTMETHODS.LIST.NOTIFICATIONS.REMOVE_ITEM_SUCCESS",messageTag:Kt})]))),this.removePaymentMethodFail$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(R.CM),(0,s.T)(({status:Ot})=>(0,N.Ds)({notificationType:x._.error,text:this.removePaymentMethodStatus[Ot]??"BILLINGPAYMENT.PAYMENTMETHODS.LIST.NOTIFICATIONS.REMOVE_ITEM_FAIL",messageTag:Kt})))),this.addPaymentMethodSuccess$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(R.sI),(0,s.T)(({item:Ot,isCompany:Xt})=>(this.ngxLogger.log((0,vt.Ck)(Gt.y.Add,Xt?Jt.j.Company:Jt.j.User,Ot.paymentMethodType)),(0,F.I1)())))),this.editCardDetail
1s$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(R.Hm),(0,I.M)(Ot=>this.store$.dispatch((0,N.ZF)({messageTag:Kt}))),(0,C.Z)(({request:Ot})=>this.paymentMethodCardService.editCard(Ot).pipe((0,g.n)(Xt=>[(0,R.uf)({card:Xt}),(0,de.Tl)({queryParamsHandling:"merge"}),(0,N.Ds)({notificationType:x._.success,text:"PAYMENT.EDIT_CARD.EDIT_SUCCESS",messageTag:Kt})]),(0,h.W)(()=>[(0,R.$m)(),(0,N.Ds)({notificationType:x._.error,text:"PAYMENT.EDIT_CARD.EDIT_FAIL",messageTag:Kt})]))))),this.addCardBillingAddress$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(R.p3),(0,I.M)(Ot=>this.store$.dispatch((0,N.ZF)({messageTag:Kt}))),(0,_.E)(this.store$.select(ne.K3)),(0,g.n)(([{cardId:Ot,request:Xt},te])=>this.paymentMethodCardService.addCardBillingAddress(Ot,Xt).pipe((0,C.Z)(se=>[(0,de.Tl)({queryParamsHandling:"merge"}),te]),(0,h.W)(()=>(0,o.of)((0,R.$m)())))))),this.editCardDetailsFail$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(R.$m),(0,s.T)(Ot=>(0,N.Ds)({notificationType:x._.error,text:"PAYMENT.EDIT_CARD.EDIT_FAIL",messageTag:Kt})))),this.removePaymentMethodStatus={409:"BILLINGPAYMENT.PAYMENTMETHODS.LIST.NOTIFICATIONS.REMOVE_ITEM_FAIL_DEFAULT",412:"BILLINGPAYMENT.PAYMENTMETHODS.LIST.NOTIFICATIONS.REMOVE_ITEM_FAIL_LAST_AND_NOT_COMPLETED",[J.Ap.paymentMethodUsedByFutureShortStayBooking]:"BILLINGPAYMENT.PAYMENTMETHODS.LIST.NOTIFICATIONS.REMOVE_ITEM_SUCCESS_FUTURE"}}static{this.\u0275fac=function(at){return new(at||u)($.KVO(wt),$.KVO(Z.v),$.KVO(Me),$.KVO(t.En),$.KVO(n.il),$.KVO(ye.N),$.KVO(be.c$),$.KVO(ve.so))}}static{this.\u0275prov=$.jDH({token:u,factory:u.\u0275fac})}}return u})();var A=e(78600),w=e(71203),ut=e(40054),Wt=e(95343),ht=e(68996);let pe=(()=>{class u{constructor(j,at,Mt){this.paymentMethodService=j,this.actions$=at,this.store$=Mt,this.getAvailablePaymentMethods$=(0,t.EH)(()=>this.actions$.pipe((0,A.SF)((0,w.F)((0,t.gp)(ut.md),(0,C.Z)(({params:At})=>(0,o.of)(null).pipe((0,_.E)(this.store$.select((0,Wt.$9)({params:At})),this.store$.select((0,Wt.Dx)({params:At}))),(0,f.p)(([$t,yt,Ut])=>!Ut&&!yt),(0,s.T)(()=>(0,ut.F_)({params:At})))))))),this.getAvailablePaymentMethodsForce$=(0,t.EH)(()=>this.actions$.pipe((0,A.SF)((0,w.F)((0,t.gp)(ut.F_),(0,I.M)(()=>this.store$.dispatch((0,N.ZF)({messageTag:"BILLINGPAYMENT.PAYMENTMETHODS.LIST.NOTIFICATIONS.GET_AVAILABILITY_FAIL"}))),(0,C.Z)(({params:At})=>this.paymentMethodService.getAvailablePaymentMethods(At).pipe((0,s.T)($t=>(0,ut.B6)({params:At,paymentMethodTypes:$t})),(0,h.W)(()=>[(0,ut.gS)({params:At})]))))))),this.getAvailablePaymentMethodsFail$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(ut.gS),(0,s.T)(()=>(0,N.Ds)({notificationType:x._.error,text:"BILLINGPAYMENT.PAYMENTMETHODS.LIST.NOTIFICATIONS.GET_AVAILABILITY_FAIL"})))),this.clearPaymentMethods$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(ht.he),(0,s.T)(()=>(0,ut.Lj)())))}static{this.\u0275fac=function(at){return new(at||u)($.KVO(Me),$.KVO(t.En),$.KVO(n.il))}}static{this.\u0275prov=$.jDH({token:u,factory:u.\u0275fac})}}return u})();var Vt=e(23294),Zt=e(23083),ie=e(43236),Fe=e(70043);const Ke=[U,W,pe,...ae,(()=>{class u{constructor(j,at,Mt){this.actions$=j,this.store$=at,this.paymentMethodService=Mt,this.init$=(0,t.EH)(()=>(0,Zt.c)(this.store$.select(l.sZ).pipe((0,Vt.F)(null,At=>At?.taxVat?.number),(0,f.p)(At=>!!At?.taxVat?.number),(0,s.T)(At=>At.taxVat.number),(0,s.T)(()=>(0,H.vP)({mustInsertVat:!1}))),ie.E)),this.getAddPaymentMethodRequirementsRequest$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(H.Cd),(0,_.E)(this.store$.select(Fe.zi)),(0,f.p)(([At,$t])=>!$t),(0,s.T)(()=>(0,H.nZ)()))),this.getAddPaymentMethodRequirementsForceRequest$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(H.nZ),(0,g.n)(()=>this.paymentMethodService.getAddPaymentMethodRequirements().pipe((0,s.T)(At=>(0,H.Qv)({addPaymentMethodRequirements:At})),(0,h.W)(()=>(0,o.of)((0,H.JC)()))))))}static{this.\u0275fac=function(at){return new(at||u)($.KVO(t.En),$.KVO(n.il),$.KVO(Me))}}static{this.\u0275prov=$.jDH({token:u,factory:u.\u0275fac})}}return u})()],Bt={locationNumber:null,hccCentreNumber:null,addPaymentCardSetup:null,state:G.XD.waitingForHcc,loading:!0,paymentCard:null,compleated:!1,isAddressEditShown:!0,billingAddressInfo:null,authorizePayment:null,createHccAction:null,addPaymentCardAction:null,captchaToken:null,newCaptchaTokenRequired:!1,canAddCardForMembershipFlow:!1,lastMessageTag:null,externalReference:0,isBookingTransactionSuccessful:!1,isTransactionStatusLoading:!1,hccSession:null,transactionId:null,canDeactivate:!0,deactivateMessage:null,currencyChangedForWorldline:!1,sessionTerms:null},he=(0,n.vy)(Bt,(0,n.on)(M.j,(u,{locationNumber:Q,hccCentreNumber:j,storeAccount:at,visible:Mt,productType:At})=>({locationNumber:Q,hccCentreNumber:j,sessionTerms:{storeAccount:at,visible:Mt,productType:At},addPaymentCardSetup:null,loading:!0,state:G.XD.waitingForHcc,paymentCard:null,compleated:!1,isAddressEditShown:!0,billingAddressInfo:null,authorizePayment:u.authorizePayment,createHccAction:u.createHccAction,addPaymentCardAction:u.addPaymentCardAction,captchaToken:null,newCaptchaTokenRequired:!1,canAddCardForMembershipFlow:u.canAddCardForMembershipFlow,lastMessageTag:null,externalReference:0,isBookingTransactionSuccessful:!1,isTransactionStatusLoading:!1,hccSession:null,transactionId:null,canDeactivate:!0,deactivateMessage:null,currencyChangedForWorldline:!1})),(0,n.on)(M.aN,(u,{storeAccount:Q,visible:j,productType:at})=>({...Bt,sessionTerms:{storeAccount:Q,visible:j,productType:at},addPaymentCardSetup:u.addPaymentCardSetup,loading:!0,state:G.XD.waitingForHcc,authorizePayment:u.authorizePayment,createHccAction:u.createHccAction,addPaymentCardAction:u.addPaymentCardAction,canAddCardForMembershipFlow:u.canAddCardForMembershipFlow,canDeactivate:!1,currencyChangedForWorldline:!0})),(0,n.on)(M.rC,(u,{addPaymentCardSetup:Q})=>({...u,addPaymentCardSetup:u.currencyChangedForWorldline?{...u.addPaymentCardSetup,authorization:Q.authorization,availableCardTypes:Q.availableCardTypes}:Q,loading:!1,currencyChangedForWorldline:!1})),(0,n.on)(M.lI,u=>({...u,addPaymentCardSetup:null})),(0,n.on)(M.hw,u=>({...u,state:G.XD.waitingForHcc,newCaptchaTokenRequired:!1,hccSession:null})),(0,n.on)(M.uv,M.Wo,u=>({...u,captchaToken:null,loading:!0})),(0,n.on)(M.D8,(u,Q)=>({...u,loading:!1,hccSession:Q,transactionId:Q.transactionId})),(0,n.on)(M._m,(u,{externalReference:Q})=>({...u,externalReference:Q})),(0,n.on)(M.Bm,u=>({...u,loading:!1,hccSession:null})),(0,n.on)(M.Qb,u=>({...u,loading:!0,hccSession:null})),(0,n.on)(M.V$,(u,{response:{paymentCard:Q,transactionId:j}})=>({...u,paymentCard:Q,transactionId:j})),(0,n.on)(M.fM,u=>({...u,compleated:!0,loading:!0,hccSession:null})),(0,n.on)(M.PT,(u,{isAddressEditShown:Q})=>({...u,isAddressEditShown:Q})),(0,n.on)(M.RY,(u,{billingAddressInfo:Q})=>({...u,billingAddressInfo:Q})),(0,n.on)(M.r1,(u,{loading:Q})=>({...u,loading:Q})),(0,n.on)(M.O6,(u,{type:Q,...j})=>({...u,authorizePayment:j})),(0,n.on)(M.jD,(u,{createHccAction:Q,addPaymentCardAction:j})=>({...u,createHccAction:Q,addPaymentCardAction:j})),(0,n.on)(M._O,(u,{captchaToken:Q})=>({...u,captchaToken:Q})),(0,n.on)(Et.l,u=>({...u,loading:!1,newCaptchaTokenRequired:!0})),(0,n.on)(M.wr,u=>({...u,newCaptchaTokenRequired:!0,captchaToken:null})),(0,n.on)(M.gu,(u,{canAddCard:Q})=>({...u,canAddCardForMembershipFlow:Q})),(0,n.on)(M.Zq,(u,{lastMessageTag:Q})=>({...u,lastMessageTag:Q})),(0,n.on)(M.GA,u=>({...u,isBookingTransactionSuccessful:!1,isTransactionStatusLoading:!0})),(0,n.on)(M.hj,(u,{transactionId:Q})=>({...u,isBookingTransactionSuccessful:!0,isTransactionStatusLoading:!1,transactionId:Q})),(0,n.on)(M.MU,u=>({...u,isBookingTransactionSuccessful:!1,isTransactionStatusLoading:!1})),(0,n.on)(M.xK,(u,{canDeactivate:Q})=>({...u,canDeactivate:Q})),(0,n.on)(M.e_,(u,{deactivateMessage:Q})=>({...u,deactivateMessage:Q}))),X={paymentMethodsInitialized:{},paymentMethods:{},paymentMethodsLoading:{},instantPaymentMethodsLoading:{},defaultCentres:null,defaultCentresPaged:null,defaultCentresLoading:!1,defaultCentresInitialized:!1,defaultCentresFilterRequest:null,newPaymentMethod:null,newPaymentMethodScope:null,cardToEdit:null,cardBillingAddressSuccessAction:void 0,canDeactivateAddress:!0,isRemoveInProcess:!1};var tt=e(26656);const Lt=(0,n.vy)(X,(0,n.on)(R.U7,()=>({...X})),(0,n.on)(R.YA,(u,{params:Q})=>({...u,newPaymentMethodScope:Q})),(0,n.on)(R.sI,(u,{item:Q,isSingleUseCard:j})=>{const at=(0,tt.KZ)(u.newPaymentMethodScope);return{...X,paymentMethodsInitialized:{[at]:u.paymentMethodsInitialized[at]},paymentMethods:{...j?u.paymentMethods||{}:{[at]:u.paymentMethods[at]?[...zt(u.paymentMethods,Q,u.defaultCentres)[at],Q]:null},[tt.Lf]:[...u.paymentMethods[tt.Lf]||[],Q]},loaded:!1,newPaymentMethod:{paymentMethodId:Q.paymentCard?.id||Q.directDebit?.id,paymentMethodType:Q.paymentMethodType},defaultCentres:u.defaultCentres}}),(0,n.on)(R.A,(u,{params:Q})=>{const j=(0,tt.KZ)(Q);return{...u,paymentMethods:{...u.paymentMethods,[j]:null},paymentMethodsLoading:{...u.paymentMethodsLoading,[j]:!0},paymentMethodsInitialized:{...u.paymentMethodsInitialized,[j]:!1}}}),(0,n.on)(R.QG,(u,{params:Q,items:j})=>{const at=(0,tt.KZ)(Q);return{...u,paymentMethods:{...u.paymentMethods,[at]:j},paymentMethodsLoading:{...u.paymentMethodsLoading,[at]:!1}
1,paymentMethodsInitialized:{...u.paymentMethodsInitialized,[at]:!0}}}),(0,n.on)(R.J3,(u,{params:Q})=>{const j=(0,tt.KZ)(Q);return{...u,paymentMethods:{...u.paymentMethods,[j]:null},paymentMethodsLoading:{...u.paymentMethodsLoading,[j]:!1}}}),(0,n.on)(R.fb,(u,{params:Q})=>({...u,paymentMethods:{...u.paymentMethods,[tt.Lf]:u.paymentMethods[tt.Lf]?.filter(j=>!(0,tt.uz)(j,Q))},instantPaymentMethodsLoading:{...u.instantPaymentMethodsLoading,[Q.paymentMethodType]:{[Q.paymentMethodId]:!0}}})),(0,n.on)(R.pq,(u,{params:Q,item:j})=>({...u,paymentMethods:{...u.paymentMethods,[tt.Lf]:j?[...u.paymentMethods[tt.Lf]?.filter(at=>!(0,tt.uz)(at,Q))||[],j]:u.paymentMethods[tt.Lf]},instantPaymentMethodsLoading:{...u.instantPaymentMethodsLoading,[Q.paymentMethodType]:{[Q.paymentMethodId]:!1}}})),(0,n.on)(R.yD,(u,{params:Q})=>({...u,paymentMethods:{...u.paymentMethods,[tt.Lf]:u.paymentMethods[tt.Lf]?.filter(j=>(0,tt.uz)(j,Q))},instantPaymentMethodsLoading:{...u.instantPaymentMethodsLoading,[Q.paymentMethodType]:{[Q.paymentMethodId]:!1}}})),(0,n.on)(R.tV,(u,{filterRequest:Q})=>({...u,defaultCentresLoading:!0,defaultCentresInitialized:!0,defaultCentresFilterRequest:Q})),(0,n.on)(R.rg,(u,{defaultCentresPaged:Q,nextPage:j})=>({...u,defaultCentresLoading:!1,defaultCentres:j?u.defaultCentres.concat(Q?.results||[]):Q?.results||[],defaultCentresPaged:Q})),(0,n.on)(R.SM,u=>({...u,defaultCentresLoading:!1})),(0,n.on)(R.GW,u=>({...u,defaultCentresLoading:!0})),(0,n.on)(R.uu,u=>({...u,defaultCentresLoading:!1})),(0,n.on)(R.N7,(u,{defaultCentres:Q})=>({...u,defaultCentres:u.defaultCentres.map(j=>{const at=Q?.find(At=>At.centreNumber===j.centreNumber);if(!at)return j;const{defaultPaymentMethod:Mt}=at;return{...j,defaultPaymentMethod:Mt}}),defaultCentresLoading:!1})),(0,n.on)(R.m0,u=>({...u,isRemoveInProcess:!0})),(0,n.on)(R.CM,u=>({...u,isRemoveInProcess:!1})),(0,n.on)(R.zs,(u,{params:Q})=>({...u,paymentMethods:Object.keys(u.paymentMethods).reduce((j,at)=>(j[at]=u.paymentMethods[at]?.filter(Mt=>!(0,tt.uz)(Mt,Q)),j),{}),isRemoveInProcess:!1})),(0,n.on)(R.Td,(u,{isRemoveInProcess:Q})=>({...u,isRemoveInProcess:Q})),(0,n.on)(de.$H,(u,{card:Q})=>({...u,cardToEdit:Q,paymentMethodsLoading:{...u.paymentMethodsLoading,editCardLoading:!1}})),(0,n.on)(de.Ul,de.Fw,(u,{card:Q,successAction:j})=>({...u,cardToEdit:Q,paymentMethodsLoading:{...u.paymentMethodsLoading,editCardLoading:!1},cardBillingAddressSuccessAction:j,canDeactivateAddress:!0})),(0,n.on)(R.Hm,R.p3,u=>({...u,paymentMethodsLoading:{...u.paymentMethodsLoading,editCardLoading:!0},canDeactivateAddress:!0})),(0,n.on)(R.$m,u=>({...u,paymentMethodsLoading:{...u.paymentMethodsLoading,editCardLoading:!1},canDeactivateAddress:!1})),(0,n.on)(R.uf,(u,{card:Q})=>({...u,paymentMethods:zt(u.paymentMethods,{paymentMethodType:J.eq.paymentCard,paymentCard:Q,directDebit:null},u.defaultCentres)})),(0,n.on)(R.Jc,u=>({...u,newPaymentMethod:null})),(0,n.on)(R.wM,u=>({...u,paymentMethodsInitialized:{},paymentMethods:{},paymentMethodsLoading:{},instantPaymentMethodsLoading:{},newPaymentMethod:null,cardToEdit:null})),(0,n.on)(R.ac,(u,{canDeactivate:Q})=>({...u,canDeactivateAddress:Q})),(0,n.on)(R.m,(u,{params:Q})=>{const j=(0,tt.KZ)(Q);return{...u,paymentMethods:{...u.paymentMethods,[j]:ce(Q.centreNumbers,u)},paymentMethodsLoading:{...u.paymentMethodsLoading,[j]:!1},paymentMethodsInitialized:{...u.paymentMethodsInitialized,[j]:!0}}}));function zt(u,Q,j){switch(Q.paymentMethodType){case J.eq.paymentCard:{const{paymentCard:at}=Q,Mt=function le(u,Q,j){const at=u?.filter(At=>At.paymentProviderId===Q?.paymentProviderId),Mt={};return at?.forEach(At=>{const $t=(0,tt.KZ)({listType:J.pI.defaults,centreNumbers:At.centreNumber});Mt[$t]=j[$t]?.map(yt=>yt.paymentCard?.id===Q.id?{...yt,paymentCard:Q}:yt)}),Mt}(j,at,u),At=J.pI.company;return{...u,[At]:u[At]?.map($t=>$t.paymentCard?.id===at.id?{...$t,paymentCard:at}:$t).filter($t=>!$t.directDebit||$t.directDebit.isPending),...Mt}}case J.eq.directDebit:{const{directDebit:at}=Q;return{...u,[J.pI.company]:u[J.pI.company]?.filter(({directDebit:Mt})=>!Mt||Mt.id===at.id||Mt.isPending!==at.isPending)}}default:return null}}function ce(u,Q){const j=Q.defaultCentres?.find(Mt=>Mt.centreNumber===u),at=Q.paymentMethods[(0,tt.KZ)({listType:J.pI.company})];return j&&at?at.filter(Mt=>null!=Mt.paymentCard&&Mt.paymentCard.paymentProviderId===j.paymentProviderId||null!=Mt.directDebit&&Mt.directDebit.accountId===j.account?.id):[]}const rt={created:!1,creating:!1,valid:!1,details:null,reference:null,creatingMultiple:!1,createdMultiple:!1},Yt={accountHolderType:ct.u.AccountHolder,centresLoaded:!1,centreNumber:null,accountCentres:[],fields:null,loadingFields:!1,selectedDirectDebitAccountCentre:null},Y={downloaded:!1,downloading:!1,uploadSelected:!1,uploading:!1,uploaded:!1,validUpload:!1,uploadConfirmed:!1},kt={confirmed:!1,guaranteeText:null},jt={additionalCentres:{accountCentres:[],selectedCentres:[],mandateCreatedForSelectedCentres:!1,mandateFailedForSelectedCentres:!1},showLoader:!1},Pe={validationResponse:null,validationInProgress:!1,validationSuccessfulOrDisabled:!0},Oe={setup:Yt,mandate:rt,document:Y,review:kt,finish:jt,validation:Pe},gn=(0,n.vy)(Yt,(0,n.on)(it.Hv,(u,{accountCentres:Q})=>({...u,accountCentres:Q,centresLoaded:!0})),(0,n.on)(it.w3,u=>({...u,centres:[],centresLoaded:!1})),(0,n.on)(it.Zq,(u,{centreNumber:Q})=>({...u,centreNumber:Q})),(0,n.on)(it.Am,(u,{accountId:Q})=>({...u,selectedDirectDebitAccountCentre:u.accountCentres?.find(j=>j.accountId===Q)})),(0,n.on)(it.Ue,(u,{accountHolderType:Q})=>({...u,accountHolderType:Q})),(0,n.on)(it.Ke,u=>({...u,loadingFields:!0,showLoader:!0})),(0,n.on)(it.s4,(u,{fields:Q})=>({...u,fields:Q,loadingFields:!1,showLoader:!1})),(0,n.on)(it.b4,u=>({...u,fields:null,loadingFields:!1,showLoader:!1})),(0,n.on)(it.j2,u=>({...Yt})));var Ne=e(62629);const _n=(0,n.vy)(rt,(0,n.on)(Ne.Eg,(u,{mandate:Q})=>({...u,details:Q})),(0,n.on)(Ne.pG,(u,{mandate:Q})=>({...u,details:{...u.details,...Q,mandateReference:u.reference?u.reference.mandateReference:null}}
1)),(0,n.on)(Ne.rZ,(u,{valid:Q})=>({...u,valid:Q})),(0,n.on)(Ne.tq,(u,{mandateReference:Q})=>({...u,reference:Q,details:{...u.details,mandateReference:Q?.mandateReference}})),(0,n.on)(Ne.VD,u=>({...u,creating:!0})),(0,n.on)(Ne.Pj,u=>({...u,created:!0,creating:!1})),(0,n.on)(Ne.ER,u=>({...u,created:!1,creating:!1})),(0,n.on)(Ne.Tc,u=>({...u,createdMultiple:!1,creatingMultiple:!0})),(0,n.on)(Ne.zl,u=>({...u,createdMultiple:!0,creatingMultiple:!1})),(0,n.on)(Ne.wb,u=>({...u,createdMultiple:!1,creatingMultiple:!1})),(0,n.on)(Ne.Pr,u=>({...rt})));var tn=e(94165);const Cn=(0,n.vy)(kt,(0,n.on)(tn.R1,(u,{guarantee:Q})=>({...u,guaranteeText:Q})),(0,n.on)(tn.xM,(u,{valid:Q})=>({...u,confirmed:Q})),(0,n.on)(tn.e1,u=>({...u,confirmed:!1})));var Ue=e(37401);const fn=(0,n.vy)(Y,(0,n.on)(Ue._i,u=>({...u,downloading:!0})),(0,n.on)(Ue._b,u=>({...u,downloaded:!0,downloading:!1})),(0,n.on)(Ue.Jr,u=>({...u,downloaded:!1,downloading:!1})),(0,n.on)(Ue.EJ,(u,{valid:Q})=>({...u,uploadSelected:Q})),(0,n.on)(Ue.tO,u=>({...u,uploading:!0})),(0,n.on)(Ue.TQ,u=>({...u,uploading:!1,uploaded:!0})),(0,n.on)(Ue.uB,u=>({...u,uploading:!1,uploaded:!1})),(0,n.on)(Ue.F6,(u,{value:Q})=>({...u,uploadConfirmed:Q})),(0,n.on)(Ue.SM,u=>({...Y})));var ke=e(65401);const Tn=(0,n.vy)(jt,(0,n.on)(ke.dR,u=>({...u,showLoader:!0})),(0,n.on)(ke.D3,(u,{additionalCentres:Q})=>({...u,showLoader:!1,additionalCentres:{...u.additionalCentres,accountCentres:Q}})),(0,n.on)(ke.mI,u=>({...u,showLoader:!1,additionalCentres:{...u.additionalCentres,accountCentres:[]}})),(0,n.on)(ke.Ky,(u,{centreNumbers:Q})=>({...u,additionalCentres:{...u.additionalCentres,selectedCentres:[...new Set(Q)]}})),(0,n.on)(ke.rf,(u,{centreNumbers:Q})=>({...u,additionalCentres:{...u.additionalCentres,selectedCentres:u.additionalCentres.selectedCentres.filter(j=>!Q.includes(j))}})),(0,n.on)(ke.Xq,u=>({...u,additionalCentres:{...u.additionalCentres,selectedCentres:[...new Set(u.additionalCentres.accountCentres.map(Q=>Q.centres?.[0]?.centreNumber))]}})),(0,n.on)(ke.aO,u=>({...u,additionalCentres:{...u.additionalCentres,selectedCentres:[]}})),(0,n.on)(ke.ze,u=>({...jt})));var ze=e(89921);const Ge={setup:gn,document:fn,mandate:_n,review:Cn,finish:Tn,validation:(0,n.vy)(Pe,(0,n.on)(ze.NF,u=>({...u,validationInProgress:!0})),(0,n.on)(ze.Hd,(u,{validationResponse:Q})=>({...u,validationResponse:Q,validationInProgress:!1,validationSuccessfulOrDisabled:!0})),(0,n.on)(ze.w1,u=>({...u,validationResponse:null,validationInProgress:!1,validationSuccessfulOrDisabled:!1})),(0,n.on)(ze.Ct,u=>({...u,validationResponse:null})))};(0,n.vy)(Oe,(0,n.on)(pt.kU,u=>({...Oe})));var nn=e(69096);const vn=(0,n.vy)({paymentMethodTypes:{},isLoading:{}},(0,n.on)(ut.F_,(u,{params:Q})=>{const j=(0,nn.W)(Q);return{...u,paymentMethodTypes:{...u.paymentMethodTypes,[j]:null},isLoading:{...u.isLoading,[j]:!0}}}),(0,n.on)(ut.B6,(u,{paymentMethodTypes:Q,params:j})=>{const at=(0,nn.W)(j);return{...u,paymentMethodTypes:{...u.paymentMethodTypes,[at]:Q},isLoading:{...u.isLoading,[at]:!1}}}),(0,n.on)(ut.gS,(u,{params:Q})=>{const j=(0,nn.W)(Q);return{...u,paymentMethodTypes:{...u.paymentMethodTypes,[j]:null},isLoading:{...u.isLoading,[j]:!1}}}),(0,n.on)(ut.Lj,u=>({...u,paymentMethodTypes:{},isLoading:{}}))),Pn=(0,n.vy)({addPaymentMethodRequirements:null,isRequsted:!1},(0,n.on)(H.nZ,u=>({...u,isRequsted:!0})),(0,n.on)(H.JC,u=>({...u,isRequsted:!1})),(0,n.on)(H.Qv,(u,{addPaymentMethodRequirements:Q})=>({...u,addPaymentMethodRequirements:Q})),(0,n.on)(H.EV,(u,{mustAuthorizeCpa:Q})=>({...u,addPaymentMethodRequirements:{...u.addPaymentMethodRequirements,mustAuthorizeCpa:Q}})),(0,n.on)(H.vP,(u,{mustInsertVat:Q})=>({...u,addPaymentMethodRequirements:{...u.addPaymentMethodRequirements,mustInsertVat:Q}}))),In={addPaymentMethodCard:function b(u,Q){return he(u,Q)},paymentMethodListState:function qt(u,Q){return Lt(u,Q)},availablePaymentMethods:function yn(u,Q){return vn(u,Q)},directDebit:(0,n.HY)(Ge),options:Pn};let On=(()=>{class u{static{this.\u0275fac=function(at){return new(at||u)}}static{this.\u0275mod=$.$C({type:u})}
1static{this.\u0275inj=$.G2t({imports:[t.Vm.forFeature(Ke),n.md.forFeature("paymentMethods",In),n.md.forFeature("billingPayment",d.e)]})}}return u})()},4169:(lt,O,e)=>{e.d(O,{D:()=>D});var t=e(60177),n=e(4705),d=e(82341),s=e(42019),_=e(94409),f=e(80262),g=e(66637),h=e(52581),C=e(69273),T=e(9993),m=e(34138),I=e(18864),y=e(90004),o=e(86016),P=e(45032),N=e(89417),a=e(10880),M=e(72540),G=e(98692),k=e(2370),R=e(742),J=e(13725),H=e(10283),et=e(6732),st=e(69924),Et=e(86049),dt=e(96518),Nt=e(39642),V=e(99252),mt=e(31476),Pt=e(68018),l=e(71660),$=e(46351),Z=e(54438),ot=e(76864);let D=(()=>{class U{static{this.\u0275fac=function(ct){return new(ct||U)}}static{this.\u0275mod=Z.$C({type:U})}static{this.\u0275inj=Z.G2t({providers:[$.Y,R.K,J.X,H.r],imports:[t.MD,d.Ov.forChild(),C.o,f.e,o.w,_.p,k.X,G.i,M.q,a.X,g.U,s.b,n.iI,P.c,I.U,y.b,N.X1.withConfig({callSetDisabledState:"whenDisabledForLegacyCode"}),Pt.h,l.O,et.R,st.y,Et.v,dt.s,Nt.C,V.D,mt.P]})}}return U})();Z.wjB(h.t,function(){return[t.Sq,t.bT,t.T3,ot.V,N.qT,N.BC,N.cb,N.l_,N.j4,Nt.C,T.V,m.t]},function(){return[t.Jj,t.lG,Pt.D9]})},9167:(lt,O,e)=>{e.d(O,{Fd:()=>s,XD:()=>_,Z6:()=>n,eL:()=>f,h_:()=>d,vN:()=>g,wF:()=>t});var t=function(h){return h.dataCash="dataCash",h.ingenico="ingenico",h.worldpay="worldpay",h.ingenicoConnect="ingenicoConnect",h.worldlinePOP="worldlinePOP",h}(t||{}),n=function(h){return h[h.ingenico=1006]="ingenico",h[h.worldpay=1007]="worldpay",h[h.ingenicoConnect=1008]="ingenicoConnect",h[h.worldlinePOP=1009]="worldlinePOP",h}(n||{});function d(h){return null!=h&&void 0!==n[h]}var s=function(h){return h.worldpay="worldpay",h.ingenicoConnect="ingenicoConnect",h.worldlinePOP="worldlinePOP",h.default="default",h}(s||{}),_=function(h){return h[h.waitingForHcc=0]="waitingForHcc",h}(_||{}),f=function(h){return h.success="s",h.error="e",h.expire="x",h}(f||{}),g=function(h){return h.token="token",h.preAuth="preAuth",h}(g||{})},89921:(lt,O,e)=>{e.d(O,{Ct:()=>_,Hd:()=>d,NF:()=>n,w1:()=>s});var t=e(59640);const n=(0,t.VP)("[Direct Debit] Validate bank account details",(0,t.xk)()),d=(0,t.VP)("[Direct Debit] Validate bank account details - Success",(0,t.xk)()),s=(0,t.VP)("[Direct Debit] Validate bank account details - Failure"),_=(0,t.VP)("[Direct Debit] Clear validation response")},37401:(lt,O,e)=>{e.d(O,{EJ:()=>h,F6:()=>C,Jr:()=>s,SM:()=>T,TQ:()=>f,_b:()=>d,_i:()=>n,tO:()=>_,uB:()=>g});var t=e(59640);const n=(0,t.VP)("[Direct Debit] Direct Debit Instructions Download"),d=(0,t.VP)("[Direct Debit] Direct Debit Instructions Download - Success"),s=(0,t.VP)("[Direct Debit] Direct Debit Instructions Download - Failure",(0,t.xk)()),_=(0,t.VP)("[Direct Debit] Upload direct debit simple template",(0,t.xk)()),f=(0,t.VP)("[Direct Debit] Upload direct debit simple template - Success"),g=(0,t.VP)("[Direct Debit] Upload direct debit simple template - Failure"),h=(0,t.VP)("[Direct Debit] Upload instructions validation status changed",(0,t.xk)()),C=(0,t.VP)("[Direct Debit] Direct debit authorise confirmation changed",(0,t.xk)()),T=(0,t.VP)("[Direct Debit] Reset document mandate state")},65401:(lt,O,e)=>{e.d(O,{D3:()=>s,Ky:()=>f,Xq:()=>h,aO:()=>C,dR:()=>d,mI:()=>_,rf:()=>g,ze:()=>T});var t=e(59640);(0,t.VP)("[Direct Debit] Reset direct debit state");const d=(0,t.VP)("[Direct Debit] Get additional direct debit centres"),s=(0,t.VP)("[Direct Debit] Get additional direct debit centres - Success",(0,t.xk)()),_=(0,t.VP)("[Direct Debit] Get additional direct debit centres - Failure"),f=(0,t.VP)("[Direct Debit] Select additional centre",(0,t.xk)()),g=(0,t.VP)("[Direct Debit] Unselect additional centre",(0,t.xk)()),h=(0,t.VP)("[Direct Debit] Select all additional centres"),C=(0,t.VP)("[Direct Debit] Unselect all additional centres"),T=(0,t.VP)("[Direct Debit] Reset direct debit finish state")},62629:(lt,O,e)=>{e.d(O,{ER:()=>m,Eg:()=>d,Pj:()=>T,Pr:()=>I,Tc:()=>o,VD:()=>C,Ws:()=>n,YZ:()=>h,bG:()=>f,mk:()=>y,pG:()=>s,rZ:()=>_,tq:()=>g,wb:()=>N,zl:()=>P});var t=e(59640);const n=(0,t.VP)("[Direct Debit] Set default direct debit mandate details"),d=(0,t.VP)("[Direct Debit] Set default direct debit mandate details - Success",(0,t.xk)()),s=(0,t.VP)("[Direct Debit] Direct debit mandate updated",(0,t.xk)()),_=(0,t.VP)("[Direct Debit] Direct debit mandate validaiton status changed",(0,t.xk)()),f=(0,t.VP)("[Direct Debit] Create direct debit reference"),g=(0,t.VP)("[Direct Debit] Create direct debit reference - Success",(0,t.xk)()),h=(0,t.VP)("[Direct Debit] Create direct debit reference - Failure"),C=(0,t.VP)("[Direct Debit] Create direct debit mandate",(0,t.xk)()),T=(0,t.VP)("[Direct Debit] Create direct debit mandate - Success",(0,t.xk)()),m=(0,t.VP)("[Direct Debit] Create direct debit mandate - Failure"),I=(0,t.VP)("[Direct Debit] Reset mandate state"),y=(0,t.VP)("[Direct Debit] Create direct debit for multiple accounts (if selected) or navigate to start flow page (if none is selected)"),o=(0,t.VP)("[Direct Debit] Create direct debit for multiple accounts"),P=(0,t.VP)("[Direct Debit] Create direct debit for multiple accounts - Success"),N=(0,t.VP)("[Direct Debit] Create direct debit for multiple accounts - Failure")},50229:(lt,O,e)=>{e.d(O,{Fj:()=>f,Ii:()=>n,VX:()=>d,dw:()=>s,y6:()=>_});var t=e(59640);const n=(0,t.VP)("[Direct Debit] Navigate to Direct Debit setup page"),d=(0,t.VP)("[Direct Debit] Navigate to direct debit review page",(0,t.xk)()),s=(0,t.VP)("[Direct Debit] Navigate back to Direct Debit Setup page",(0,t.xk)()),_=(0,t.VP)("[Direct Debit] Navigate to Direct Debit Finish page"),f=(0,t.VP)("[Direct Debit] Navigate to Direct Debit start flow page")},94165:(lt,O,e)=>{e.d(O,{R1:()=>d,e1:()=>f,jp:()=>n,om:()=>s,xM:()=>_});var t=e(59640);const n=(0,t.VP)("[Direct Debit] Load Direct Debit Guarantee"),d=(0,t.VP)("[Direct Debit] Load Direct Debit Guarantee - Success",(0,t.xk)()),s=(0,t.VP)("[Direct Debit] Load Direct Debit Guarantee - Failure"),_=(0,t.VP)("[Direct Debit] Direct debit review confirmation changed",(0,t.xk)()),f=(0,t.VP)("[Direct Debit] Direct debit reset review state")},71927:(lt,O,e)=>{e.d(O,{AH:()=>m,Am:()=>f,Hv:()=>d,Ke:()=>g,NP:()=>n,Tm:()=>I,Ue:()=>T,Zq:()=>_,b4:()=>C,j2:()=>y,s4:()=>h,w3:()=>s});var t=e(59640);const n=(0,t.VP)("[Direct Debit Payment Method] Load centres supporting Direct Debit"),d=(0,t.VP)("[Direct Debit Payment Method] Load centres supporting Direct Debit - Success",(0,t.xk)()),s=(0,t.VP)("[Direct Debit Payment Method] Load centres supporting Direct Debit - Failure"),_=(0,t.VP)("[Direct Debit Payment Method] Selected Direct Debit centre",(0,t.xk)()),f=(0,t.VP)("[Direct Debit Payment Method] Selected Direct Debit account centre",(0,t.xk)()),g=(0,t.VP)("[Direct Debit Payment Method] Load Direct Debit fields for selected centre"),h=(0,t.VP)("[Direct Debit Payment Method] Load Direct Debit fields for selected centre - Success",(0,t.xk)()),C=(0,t.VP)("[Direct Debit Payment Method] Load Direct Debit fields for selected centre - Failure"),T=(0,t.VP)("[Direct Debit Payment Method] Select Account Holder Type - Account or business holder",(0,t.xk)()),m=(0,t.VP)("[Direct Debit Payment Method] Direct debit setup request"),I=(0,t.VP)("[Direct Debit] Direct Debit Review request",(0,t.xk)()),y=(0,t.VP)("[Direct Debit] Reset direct debit setup state")},22960:(lt,O,e)=>{e.d(O,{AH:()=>s.AH,Am:()=>s.Am,D3:()=>g.D3,EJ:()=>d.EJ,ER:()=>f.ER,Eg:()=>f.Eg,F6:()=>d.F6,Fj:()=>n.Fj,Hd:()=>h.Hd,Hv:()=>s.Hv,Ii:()=>n.Ii,Jr:()=>d.Jr,Ke:()=>s.Ke,Ky:()=>g.Ky,NF:()=>h.NF,NP:()=>s.NP,Pj:()=>f.Pj,Pr:()=>f.Pr,R1:()=>_.R1,SM:()=>d.SM,TQ:()=>d.TQ,Tc:()=>f.Tc,Tm:()=>s.Tm,Ue:()=>s.Ue,VD:()=>f.VD,VX:()=>n.VX,Ws:()=>f.Ws,YZ:()=>f.YZ,Zq:()=>s.Zq,_b:()=>d._b,_i:()=>d._i,aO:()=>g.aO,b4:()=>s.b4,bG:()=>f.bG,dR:()=>g.dR,dw:()=>n.dw,e1:()=>_.e1,j2:()=>s.j2,jp:()=>_.jp,kU:()=>C,mI:()=>g.mI,mk:()=>f.mk,om:()=>_.om,pG:()=>f.pG,rZ:()=>f.rZ,s4:()=>s.s4,tO:()=>d.tO,tq:()=>f.tq,uB:()=>d.uB,w1:()=>h.w1,w3:()=>s.w3,wb:()=>f.wb,xM:()=>_.xM,y6:()=>n.y6,ze:()=>g.ze,zl:()=>f.zl});var t=e(59640),n=e(50229),d=e(37401),s=e(71927),_=e(94165),f=e(62629),g=e(65401),h=e(89921);const C=(0,t.VP)("[Direct Debit] Reset direct debit state")},3135:(lt,O,e)=>{e.d(O,{$n:()=>n.$n,AH:()=>t.AH,D3:()=>t.D3,ER:()=>t.ER,EU:()=>n.EU,Eg:()=>t.Eg,Fj:()=>t.Fj,Hd:()=>t.Hd,Hv:()=>t.Hv,Ii:()=>t.Ii,JV:()=>n.JV,Ke:()=>t.Ke,ND:()=>n.e1,NF:()=>t.NF,NP:()=>t.NP,Pj:()=>t.Pj,Tc:()=>t.Tc,Tm:()=>t.Tm,VD:()=>t.VD,VX:()=>t.VX,Ws:()=>t.Ws,XY:()=>n.XY,YZ:()=>t.YZ,b4:()=>t.b4,bG:()=>t.bG,bU:()=>n.bU,dR:()=>t.dR,eZ:()=>n.eZ,hE:()=>n.hE,j2:()=>t.j2,mI:()=>t.mI,mk:()=>t.mk,s4:()=>t.s4,tq:()=>t.tq,w1:()=>t.w1,w3:()=>t.w3,wb:()=>t.wb,wc:()=>n.wc,y:()=>n.y,y6:()=>t.y6,yl:()=>n.yl,zl:()=>t.zl});var t=e(22960),n=e(6463)},70043:(lt,O,e)=>{e.d(O,{KJ:()=>s,zi:()=>_});var t=e(59640),n=e(3045);const d=(0,t.Mz)(n.y,f=>f.options),s=(0,t.Mz)(d,f=>f?.addPaymentMethodRequirements),_=(0,t.Mz)(d,f=>f?.isRequsted)},11020:(lt,O,e)=>{e.d(O,{L:()=>ve});var t=e(59640),n=e(21413),d=e(84572),s=e(56977),_=e(62253),f=e(62233),g=e(86734),h=e(54031),C=e(18224),T=e(28213),m=e(96552),I=e(51788),y=e(921),o=e(54438),P=e(60156),N=e(39178),a=e(60177),M=e(68018),G=e(95132),k=e(48337),R=e(12262),J=e(76864),H=e(74529),et=e(38769),st=e(70715);const Et=(0,t.Mz)(st.J,Ct=>Ct.benefitsPopup);var dt=e(59216),Nt=e(76325),V=e(97479),mt=e(53341),Pt=e(86049);const l=(Ct,Kt)=>Kt.benefit,$=Ct=>({ConsumerInput_MembershipBenefits_GenericMembership:Ct}),Z=Ct=>({ConsumerInput_Membership_XDaysUsage:Ct});function ot(Ct,Kt){if(1&Ct&&o.nrm(0,"i",6),2&Ct){const B=o.XpG().$index;
1o.Y8G("id","BENEFITS_IN_POPUP.ROW_"+B+"_VALUE_CHECKMARK")}}function D(Ct,Kt){if(1&Ct&&(o.j41(0,"div",7),o.EFF(1),o.k0s()),2&Ct){const B=o.XpG(2);o.R7$(),o.SpI("",B.discountPercentage,"%")}}function U(Ct,Kt){if(1&Ct&&(o.j41(0,"div",3)(1,"div",4),o.EFF(2),o.nI1(3,"translate"),o.k0s(),o.j41(4,"div",5),o.DNE(5,ot,1,1,"i",6)(6,D,2,1,"div",7),o.k0s()()),2&Ct){const B=Kt.$implicit,W=Kt.$index,A=o.XpG(2);o.Y8G("id","BENEFITS_IN_POPUP.ROW_"+W),o.R7$(),o.Y8G("id","BENEFITS_IN_POPUP.ROW_"+W+"_HEADER"),o.R7$(),o.JRh(o.i5U(3,6,B.benefit,o.eq3(9,Z,A.entitlements))),o.R7$(2),o.Y8G("id","BENEFITS_IN_POPUP.ROW_"+W+"_VALUE"),o.R7$(),o.vxM(!A.hasDiscount(B.benefit)&&B.isChecked?5:-1),o.R7$(),o.vxM(A.hasDiscount(B.benefit)?6:-1)}}function gt(Ct,Kt){if(1&Ct&&(o.j41(0,"div")(1,"div",1),o.EFF(2),o.nI1(3,"translate"),o.nI1(4,"translate"),o.k0s(),o.j41(5,"div",2),o.Z7z(6,U,7,11,"div",3,l),o.k0s()()),2&Ct){const B=Kt,W=o.XpG();o.R7$(2),o.JRh(o.i5U(4,3,"ACCOUNT.MANAGE_PRODUCTS_SERVICES.BENEFIT.GENERIC",o.eq3(6,$,o.bMT(3,1,B.cardType)))),o.R7$(4),o.Dyx(W.getBenefitsRows(B.benefits,B.classificationId,B.entitlementPerMonthType,B.entitlementsPerMonth))}}let _t=(()=>{class Ct{constructor(B){this.store=B,this.membershipBenefits$=this.store.pipe((0,t.Lt)(Et)),this.modalResult=new o.bkB,this.allTypesOfBenefits=dt.M,this.entitlements=0,this.destroy$=new n.B}ngOnDestroy(){this.store.dispatch((0,H.Kr)()),this.destroy$.next(),this.destroy$.complete()}onClose(){this.modalResult.emit()}hasDiscount(B){return B===dt.M.DiscountsOnMeetingRoomVideoComunicationsAndDayOffices}getDiscountPercentage(B){return B===V.VM.PreferredMembership15Percent?"15%":"10%"}getBenefitsRows(B,W,A,w){return this.createBenefitsRowsArray(this.allTypesOfBenefits,B,W,A,w)}createBenefitsRowsArray(B,W,A,w,ut){return this.filterBenefitsOnMembershipType(Object.keys(B).map(Wt=>({benefit:B[Wt],isChecked:W.includes(B[Wt])})),A,w,ut)}filterBenefitsOnMembershipType(B,W,A,w){return(W===V.VM.Member||W===V.VM.MemberOfNetwork)&&(B=B.filter(ut=>ut.benefit!==dt.M.DiscountsOnMeetingRoomVideoComunicationsAndDayOffices)),this.filterBenefitsOnEntitlement(B.filter(W===V.VM.Coworking||W===V.VM.CoworkingAccount?ut=>ut.benefit!==dt.M.PrivateOfficeUsage&&ut.benefit!==dt.M.UnlimitedCoworkingAndOfficeUsage&&ut.benefit!==dt.M.XDaysCoworkingDeskOrPrivateOfficeUsePerMonth&&ut.benefit!==dt.M.UnlimitedLoungeUsage:W===V.VM.Office||W===V.VM.OfficeAccount?ut=>ut.benefit!==dt.M.UnlimitedCoworkingUsage&&ut.benefit!==dt.M.XDaysCoworkingDeskUsePerMonth&&ut.benefit!==dt.M.UnlimitedLoungeUsage:W===V.VM.Lounge||W===V.VM.LoungeAccount?ut=>ut.benefit!==dt.M.UnlimitedCoworkingUsage&&ut.benefit!==dt.M.XDaysCoworkingDeskUsePerMonth&&ut.benefit!==dt.M.XDaysCoworkingDeskOrPrivateOfficeUsePerMonth&&ut.benefit!==dt.M.UnlimitedCoworkingAndOfficeUsage:ut=>ut.benefit!==dt.M.UnlimitedCoworkingUsage&&ut.benefit!==dt.M.XDaysCoworkingDeskUsePerMonth&&ut.benefit!==dt.M.XDaysCoworkingDeskOrPrivateOfficeUsePerMonth&&ut.benefit!==dt.M.UnlimitedCoworkingAndOfficeUsage&&ut.benefit!==dt.M.UnlimitedLoungeUsage),A,w)}filterBenefitsOnEntitlement(B,W,A){return(W=(0,mt.E)(W))===Nt._.Unlimited||W===Nt._.LimitedPerLocation?B.filter(w=>w.benefit!==dt.M.XDaysCoworkingDeskUsePerMonth&&w.benefit!==dt.M.XDaysCoworkingDeskOrPrivateOfficeUsePerMonth):(this.entitlements=A,B.filter(w=>w.benefit!==dt.M.UnlimitedCoworkingUsage&&w.benefit!==dt.M.UnlimitedCoworkingAndOfficeUsage))}static{this.\u0275fac=function(W){return new(W||Ct)(o.rXU(t.il))}}static{this.\u0275cmp=o.VBU({type:Ct,selectors:[["iwg-membership-benefits-popup"]],decls:3,vars:3,consts:[[3,"closeModal"],[1,"iwg-h3"],["id","BENEFITS_IN_POPUP.TABLE",1,"table"],[1,"table-row",3,"id"],[1,"iwg-field-input","row-header",3,"id"],[1,"table-row-icon-wrapper","row-value",3,"id"],["aria-hidden","true",1,"iwg-icon-small-tick","icon--xs","icon--success",3,"id"],["id","row_percentage",1,"iwg-field-input"]],template:function(W,A){if(1&W&&(o.j41(0,"iwg-modal-centered",0),o.bIt("closeModal",function(){return A.onClose()}),o.DNE(1,gt,8,8,"div"),o.nI1(2,"async"),o.k0s()),2&W){let w;o.R7$(),o.vxM((w=o.bMT(2,1,A.membershipBenefits$))?1:-1,w)}},dependencies:[Pt.v,a.Jj,M.D9],styles:['.iwg-h3[_ngcontent-%COMP%]{padding-bottom:3.1rem}.table[_ngcontent-%COMP%]{width:100%;border:1px solid var(--color-border, var(--global-neutral-300, #C3C3C3));margin-bottom:3rem}.table-row[_ngcontent-%COMP%]{width:100%;border-bottom:1px solid var(--color-border, var(--global-neutral-300, #C3C3C3));min-height:6rem;display:flex;align-items:center;word-break:break-word;padding:0 2.5rem 0 2rem;justify-content:space-between}.table-row[_ngcontent-%COMP%]:last-child{border-bottom:0px}.table-row-icon-wrapper[_ngcontent-%COMP%]{padding-left:1rem}.table-row[_ngcontent-%COMP%]:after{content:"";min-height:inherit}.table-row[_ngcontent-%COMP%]   .row-header[_ngcontent-%COMP%]{flex:90}#row_percentage[_ngcontent-%COMP%]{color:var(--global-functional-green, #23A983);word-break:normal}']})}}return Ct})();var ct=e(55424),pt=e(80501),x=e(22732);const it=["*"],q=Ct=>[Ct];function nt(Ct,Kt){if(1&Ct){const B=o.RV6();o.j41(0,"div",10),o.bIt("click",function(){o.eBV(B);const A=o.XpG();return o.Njj(A.onClose())})("keydown.enter",function(){o.eBV(B);const A=o.XpG();return o.Njj(A.onClose())}),o.nrm(1,"i",11),o.k0s()}}function xt(Ct,Kt){if(1&Ct&&(o.j41(0,"div",9),o.nrm(1,"iwg-pie-chart-timer",12),o.k0s()),2&Ct){const B=o.XpG();o.R7$(),o.Y8G("currentPercentage",B.qrTimer)("autoStart",!1)}}let Dt=(()=>
1{class Ct{constructor(B){this.store=B,this.hasBackdrop=!0,this.closeOnbackdropClick=!1,this.hasCloseButton=!0,this.qrTimer=0,this.useQrTimer=!0,this.modalResult=new o.bkB,this.image$=this.store.select(ct.G9),this.isLoading$=this.store.pipe((0,t.Lt)(ct.PJ))}ngOnInit(){this.useQrTimer&&this.startTimer()}ngOnDestroy(){this.interval&&clearInterval(this.interval),this.store.dispatch((0,et.cP)())}onClose(){this.modalResult.emit()}startTimer(){this.interval=setInterval(()=>{this.qrTimer--,this.qrTimer<=0&&this.onClose()},1e3)}static{this.\u0275fac=function(W){return new(W||Ct)(o.rXU(t.il))}}static{this.\u0275cmp=o.VBU({type:Ct,selectors:[["iwg-qr-code-modal"]],ngContentSelectors:it,decls:14,vars:12,consts:[[3,"closeModal","hasBackdrop","closeOnbackdropClick"],[1,"iwg-modal-centered-content"],[1,"header"],[1,"modal-close"],["id","qr_code_title","translate","",1,"title"],[1,"modal-content"],[1,"qr-code"],[1,"loader",3,"loading"],["alt",""],[1,"qr-code-timer"],[1,"modal-close",3,"click","keydown.enter"],["tabindex","0",1,"iwg-icon-small-close","icon--med","icon--interactive"],["maxValue","30","wrapperId","QuickAccess_Memberships_QRCode_Timer",3,"currentPercentage","autoStart"]],template:function(W,A){1&W&&(o.NAR(),o.j41(0,"iwg-modal-background",0),o.bIt("closeModal",function(){return A.onClose()}),o.j41(1,"div",1)(2,"div",2),o.DNE(3,nt,2,0,"div",3),o.j41(4,"div",4),o.EFF(5,"QUICK_ACCESS.QR_CODE"),o.k0s()(),o.j41(6,"div",5)(7,"div",6)(8,"iwg-loader",7),o.nI1(9,"async"),o.nrm(10,"img",8),o.nI1(11,"async"),o.k0s()(),o.SdG(12),o.DNE(13,xt,2,2,"div",9),o.k0s()()()),2&W&&(o.Y8G("hasBackdrop",A.hasBackdrop)("closeOnbackdropClick",A.closeOnbackdropClick),o.R7$(3),o.vxM(A.hasCloseButton?3:-1),o.R7$(5),o.Y8G("loading",o.bMT(9,6,A.isLoading$)),o.R7$(2),o.BMQ("src",o.eq3(10,q,"data:image/png;base64,"+o.bMT(11,8,A.image$)),o.B4B),o.R7$(3),o.vxM(A.useQrTimer?13:-1))},dependencies:[M.Mm,pt.b,J.V,x.l,a.Jj],styles:[".loader[_ngcontent-%COMP%]{margin-top:2rem;margin-bottom:2rem}.iwg-modal-centered-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;background:var(--color-bg-primary, var(--global-neutral-100, #FFFFFF));align-items:stretch;max-width:100%;width:40rem;padding:2rem}@media (max-width: 1023.98px){.iwg-modal-centered-content[_ngcontent-%COMP%]{height:100%;max-height:100%;min-height:100%;width:100%;max-width:100%;min-width:100%}}.iwg-modal-centered-content[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]{border-bottom:1px solid var(--color-border, var(--global-neutral-300, #C3C3C3));padding-bottom:2rem}.iwg-modal-centered-content[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{text-align:center;padding-right:7%}[dir=rtl]   [_nghost-%COMP%]   .iwg-modal-centered-content[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{padding-left:7%;padding-right:0}[dir=rtl][_ngcontent-%COMP%]   .iwg-modal-centered-content[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{padding-left:7%;padding-right:0}[dir=rtl][_nghost-%COMP%]   .iwg-modal-centered-content[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .iwg-modal-centered-content[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{padding-left:7%;padding-right:0}.iwg-modal-centered-content[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]   .modal-close[_ngcontent-%COMP%]{float:left}[dir=rtl]   [_nghost-%COMP%]   .iwg-modal-centered-content[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]   .modal-close[_ngcontent-%COMP%]{float:right}[dir=rtl][_ngcontent-%COMP%]   .iwg-modal-centered-content[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]   .modal-close[_ngcontent-%COMP%]{float:right}[dir=rtl][_nghost-%COMP%]   .iwg-modal-centered-content[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]   .modal-close[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .iwg-modal-centered-content[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]   .modal-close[_ngcontent-%COMP%]{float:right}.iwg-modal-centered-content[_ngcontent-%COMP%]   .modal-content[_ngcontent-%COMP%]{display:flex;flex-direction:column}@media (max-width: 1023.98px){.iwg-modal-centered-content[_ngcontent-%COMP%]   .modal
1-content[_ngcontent-%COMP%]{align-items:center;flex:1}}.iwg-modal-centered-content[_ngcontent-%COMP%]   .modal-content[_ngcontent-%COMP%]   .qr-code[_ngcontent-%COMP%]{text-align:center}.iwg-modal-centered-content[_ngcontent-%COMP%]   .modal-content[_ngcontent-%COMP%]   .qr-code[_ngcontent-%COMP%]   .loader[_ngcontent-%COMP%]{height:20rem}@media (max-width: 1023.98px){.iwg-modal-centered-content[_ngcontent-%COMP%]   .modal-content[_ngcontent-%COMP%]   .qr-code[_ngcontent-%COMP%]{margin:0;position:absolute;top:50%;transform:translateY(-50%)}}@media (orientation: landscape){.iwg-modal-centered-content[_ngcontent-%COMP%]   .modal-content[_ngcontent-%COMP%]   .qr-code[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{max-width:70%}}.qr-code-timer[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:center;width:100%}"]})}}return Ct})();var oe=e(96697),v=e(66649),_e=e(85630),ue=e(25766),re=e(89837),bt=e(90641),Ft=e(31208),Te=e(742);const E=Ct=>({numberOfFreeVisits:Ct}),F=()=>({LinkStart:"",LinkEnd:""});function L(Ct,Kt){if(1&Ct&&(o.j41(0,"iwg-pill",7)(1,"span",14),o.EFF(2,"BILLINGPAYMENT.PAYMENTMETHODS.LIST.CARD_ITEM.CARD_STATE.EXPIRED"),o.k0s()()),2&Ct){const B=o.XpG();o.Y8G("type",B.PillTypes.error)("wrapperId","membership_card_expired_pill_"+B.membership.id)}}function ft(Ct,Kt){if(1&Ct&&(o.j41(0,"div",10),o.EFF(1),o.nI1(2,"translate"),o.nI1(3,"localizedDate"),o.k0s()),2&Ct){const B=o.XpG();o.Y8G("id","membership_card_date_"+B.membership.id),o.R7$(),o.Lme(" ",o.bMT(2,3,B.toggleRenewalAndExpiryDateTranslation(B.membership))," ",o.i5U(3,5,B.toggleRenewalAndExpiryDate(B.membership),"short")," ")}}function K(Ct,Kt){if(1&Ct){const B=o.RV6();o.j41(0,"div",12)(1,"a",15),o.bIt("click",function(){o.eBV(B);const A=o.XpG();return o.Njj(A.displayBenefitsPopup(A.membership.classificationId,A.membership.entitlementPerMonthType,A.membership.entitlementPerMonth))}),o.EFF(2),o.nI1(3,"translate"),o.k0s()()}if(2&Ct){const B=o.XpG();o.R7$(),o.Y8G("id","membership_card_benefits_"+B.membership.id),o.R7$(),o.SpI(" ",o.i5U(3,2,"QUICK_ACCESS.MEMBERSHIP.VIEW_BENEFITS",o.lJ4(5,F))," ")}}let Tt=(()=>{class Ct{constructor(B,W,A,w){this.store=B,this.modalService=W,this.injector=A,this.ngxLogger=w,this.qrData=null,this.qrTimer=0,this.unsubscribe$=new n.B,this.MembershipRenewalType=ue.T,this.PillTypes=_e.f,this.isInitialLoad=!0}ngOnInit(){this.store.pipe((0,t.Lt)(f.T_),(0,s.Q)(this.unsubscribe$)).subscribe(B=>{B&&(this.companyName=B.accountName)})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}openModal(){this.qrData=`4${Math.floor(256*Math.random())}${this.membership.cardNumber}${(new Date).getUTCSeconds()}`,this.qrTimer=30,this.store.dispatch((0,et._Z)({content:this.qrData})),this.ngxLogger.log((0,_.xj)(this.membership,this.companyName)),this.modalService.showComponentModal(Dt,this.injector.get(o.Vns),B=>{B.qrTimer=this.qrTimer}).pipe((0,oe.s)(1),(0,s.Q)(this.unsubscribe$)).subscribe()}displayBenefitsPopup(B,W,A){this.ngxLogger.log((0,_.yq)(this.membership,this.companyName)),this.store.dispatch((0,H.lQ)({classificationId:B,entitlementPerMonthType:W,entitlementsPerMonth:A})),this.modalService.showComponentModal(_t,this.injector.get(o.Vns)).pipe((0,oe.s)(1),(0,s.Q)(this.unsubscribe$)).subscribe()}getMembershipRegion(){return this.membership.regionName.toUpperCase()===re.HC.GLOBAL?re.FA.GlobalAccess:this.membership.regionName}getMembershipTypeText(){return 0===this.membership.entitlementPerMonth?re.Fj[this.membership.classificationId]??re.Fj[-1]:(0,mt.z)(this.membership.entitlementPerMonthType)===Nt._.Limited?re.AM[this.membership.classificationId]??re.AM[-1]:re.D8[this.membership.classificationId]??re.D8[-1]}membershipWithBenefits(B){return V.GH.includes(B)}toggleRenewalAndExpiryDateTranslation(B){return this.hasTwoActiveMemberships?this.checkForValidDate()?re.FA.StartDate:re.FA.ExpiryDate:(0,v.H)(B)?re.FA.RenewalDate:re.FA.ExpiryDate}toggleRenewalAndExpiryDate(B){return this.hasTwoActiveMemberships?this.checkForValidDate()?B.validFromDate:B.expiryDate:(0,v.H)(B)?B.autoRenewalDate:B.expiryDate}checkForValidDate(){return new Date(this.membership.validFromDate)>new Date}static{this.\u0275fac=function(W){return new(W||Ct)(o.rXU(t.il),o.rXU(bt.B),o.rXU(o.zZn),o.rXU(N.so))}}static{this.\u0275cmp=o.VBU({type:Ct,selectors:[["iwg-membership-card"]],inputs:{membership:"membership",hasTwoActiveMemberships:"hasTwoActiveMemberships"},decls:21,vars:25,consts:[[1,"membership-card",3,"id"],[1,"card-content","dark",3,"id"],[1,"logo",3,"src","alt","id"],[1,"card-info",3,"id"],[1,"iwg-h5-medium","name-on-card",3,"id"],[1,"iwg-h2","card-number",3,"id"],[1,"pill-card",3,"id"],[3,"type","wrapperId"],[1,"card-detail
1s",3,"id"],[1,"card-details-left"],[3,"id"],["translate","",3,"id"],[1,"view-benefits-container"],["displayType","secondary",1,"qr-code-button",3,"click","keydown.enter","wrapperId"],["translate",""],[1,"view-benefits-link","text-link","text-link--regular","iwg-body1","w-30",3,"click","id"]],template:function(W,A){1&W&&(o.j41(0,"div",0)(1,"div",1),o.nrm(2,"img",2),o.j41(3,"div",3)(4,"span",4),o.EFF(5),o.k0s(),o.j41(6,"span",5),o.EFF(7),o.k0s(),o.j41(8,"div",6),o.DNE(9,L,3,2,"iwg-pill",7),o.k0s()(),o.j41(10,"div",8)(11,"div",9)(12,"div",10),o.EFF(13),o.nI1(14,"translate"),o.k0s(),o.j41(15,"div",11),o.EFF(16),o.k0s(),o.DNE(17,ft,4,8,"div",10),o.k0s(),o.DNE(18,K,4,6,"div",12),o.k0s(),o.j41(19,"iwg-button",13),o.bIt("click",function(){return A.openModal()})("keydown.enter",function(){return A.openModal()}),o.EFF(20,"QUICK_ACCESS.MEMBERSHIP.REVAL_QR_CODE"),o.k0s()()()),2&W&&(o.Y8G("id","membership_card_"+A.membership.id),o.R7$(),o.Y8G("id","membership_card_content_"+A.membership.id),o.R7$(),o.FS9("src",A.membership.brandLogoUrl,o.B4B),o.FS9("alt",A.membership.brandName),o.Y8G("id","membership_card_logo_"+A.membership.id),o.R7$(),o.Y8G("id","membership_card_info_"+A.membership.id),o.R7$(),o.Y8G("id","membership_card_name_on_card_"+A.membership.id),o.R7$(),o.JRh(A.membership.nameOnCard),o.R7$(),o.Y8G("id","membership_card_number_"+A.membership.id),o.R7$(),o.JRh(A.membership.cardNumber),o.R7$(),o.Y8G("id","membership_card_pill_"+A.membership.id),o.R7$(),o.vxM(A.membership.isExpired?9:-1),o.R7$(),o.Y8G("id","membership_card_details_"+A.membership.id),o.R7$(2),o.Y8G("id","membership_card_entitlements_"+A.membership.id),o.R7$(),o.SpI(" ",o.i5U(14,20,A.getMembershipTypeText(),o.eq3(23,E,A.membership.entitlementPerMonth))," "),o.R7$(2),o.Y8G("id","membership_card_region_"+A.membership.id),o.R7$(),o.JRh(A.getMembershipRegion()),o.R7$(),o.vxM(A.membership.renewalOptionId!==A.MembershipRenewalType.NotTiedToMembershipBooking?17:-1),o.R7$(),o.vxM(A.membershipWithBenefits(A.membership.classificationId)?18:-1),o.R7$(),o.Y8G("wrapperId","membership_card_reval_qr_code_"+A.membership.id))},dependencies:[M.Mm,Ft.T,R.Q,M.D9,Te.K],styles:['.membership-card{display:flex;color:var(--color-text-primary, var(--brand-neutral-900, #0A0428));width:40rem;margin-right:4rem;height:100%}[dir=rtl] :host .membership-card{margin-left:4rem;margin-right:0}@media (max-width: 1023.98px){[dir=rtl] :host .membership-card{margin:auto}}[dir=rtl] .membership-card{margin-left:4rem;margin-right:0}@media (max-width: 1023.98px){[dir=rtl] .membership-card{margin:auto}}:host-context([dir=rtl]) .membership-card{margin-left:4rem;margin-right:0}@media (max-width: 1023.98px){:host-context([dir=rtl]) .membership-card{margin:auto}}@media (max-width: 1023.98px){.membership-card{max-width:99.5%;padding-left:.1rem}}@media (max-width: 1023.98px) and (orientation: landscape){.membership-card{margin:auto}}@media (max-width: 1023.98px){.membership-card{margin:auto}}.membership-card .card-content{display:flex;flex-direction:column;width:100%;background-color:var(--color-bg-primary, var(--global-neutral-100, #FFFFFF));color:var(--color-text-primary, var(--brand-neutral-900, #0A0428));padding:2rem 3rem;min-height:33.9rem;align-self:stretch}@media (max-width: 1023.98px){.membership-card .card-content{padding:2rem;min-height:31.1rem}}.membership-card .card-content .logo{align-self:flex-end}.membership-card .card-content .card-info{position:relative;margin-bottom:4rem;flex:1 0 auto;display:flex;flex-direction:column}.membership-card .card-content .card-info .card-number{word-break:break-all}.membership-card .card-content .card-info span{color:var(--global-neutral-100, #FFFFFF)}.membership-card .card-content .card-details{font-size:1.6rem;padding-top:1.6rem;line-height:1.38;min-height:10rem}.membership-card .card-content .card-details .card-details-left{float:left;width:60%;overflow:hidden}[dir=rtl] :host .membership-card .card-content .card-details .card-details-left{float:right}[dir=rtl] .membership-card .card-content .card-details .card-details-left{float:right}:host-context([dir=rtl]) .membership-card .card-content .card-detail
1s .card-details-left{float:right}.membership-card .card-content .card-details .info-hint{cursor:pointer;content:"\\e9d2";font-size:1.9rem;float:right}[dir=rtl] :host .membership-card .card-content .card-details .info-hint{float:left}[dir=rtl] .membership-card .card-content .card-details .info-hint{float:left}:host-context([dir=rtl]) .membership-card .card-content .card-details .info-hint{float:left}.membership-card .card-content .card-details .info-hint .iwg-icon-info{font-size:1.9rem;margin-left:0}[dir=rtl] :host .membership-card .card-content .card-details .info-hint .iwg-icon-info{margin-right:0}[dir=rtl] .membership-card .card-content .card-details .info-hint .iwg-icon-info{margin-right:0}:host-context([dir=rtl]) .membership-card .card-content .card-details .info-hint .iwg-icon-info{margin-right:0}.membership-card .card-content .card-details .view-benefits-container{float:right;width:40%;text-align:end;margin-top:2.1rem;word-break:break-word}[dir=rtl] :host .membership-card .card-content .card-details .view-benefits-container{float:left}[dir=rtl] .membership-card .card-content .card-details .view-benefits-container{float:left}:host-context([dir=rtl]) .membership-card .card-content .card-details .view-benefits-container{float:left}.membership-card .qr-code-button{height:6rem;margin-top:2.5rem;font-size:1.4rem;letter-spacing:.2rem;cursor:pointer;width:100%}.pill-card{position:absolute;top:-5rem;left:0}[dir=rtl] :host .pill-card{left:auto;right:0}[dir=rtl] .pill-card{left:auto;right:0}:host-context([dir=rtl]) .pill-card{left:auto;right:0}.view-benefits-link{text-decoration:underline}\n'],encapsulation:2})}}return Ct})();var St=e(38571);const ae=(0,t.Mz)(st.J,Ct=>Ct.membershipUsage.membershipUsage),ne=Ct=>({ConsumerInput_MembershipUsage_Generic:Ct});function de(Ct,Kt){1&Ct&&(o.j41(0,"div",1)(1,"span",3),o.EFF(2,"ACCOUNT.MANAGE_PRODUCTS_SERVICES.MEMBERSHIP.USAGE_THIS_MONTH"),o.k0s(),o.nrm(3,"iwg-hint",4),o.k0s()),2&Ct&&(o.R7$(3),o.Y8G("message","QUICK_ACCESS.MEMBERSHIP.USAGE_HINT"))}function vt(Ct,Kt){if(1&Ct&&(o.j41(0,"div",2)(1,"span",3),o.EFF(2,"ACCOUNT.MANAGE_PRODUCTS_SERVICES.MEMBERSHIP.TYPES.OFFICE"),o.k0s(),o.j41(3,"span"),o.EFF(4),o.nI1(5,"translate"),o.k0s()()),2&Ct){const B=o.XpG();o.R7$(4),o.JRh(o.i5U(5,1,"ACCOUNT.MANAGE_PRODUCTS_SERVICES.MEMBERSHIP_USAGE.GENERIC_USAGE",o.eq3(4,ne,B.office)))}}function Jt(Ct,Kt){if(1&Ct&&(o.j41(0,"div",2)(1,"span",3),o.EFF(2,"ACCOUNT.MANAGE_PRODUCTS_SERVICES.MEMBERSHIP.TYPES.COWORKING"),o.k0s(),o.j41(3,"span"),o.EFF(4),o.nI1(5,"translate"),o.k0s()()),2&Ct){const B=o.XpG();o.R7$(4),o.JRh(o.i5U(5,1,"ACCOUNT.MANAGE_PRODUCTS_SERVICES.MEMBERSHIP_USAGE.GENERIC_USAGE",o.eq3(4,ne,B.coworking)))}}function Gt(Ct,Kt){if(1&Ct&&(o.j41(0,"div",0),o.DNE(1,de,4,1,"div",1)(2,vt,6,6,"div",2)(3,Jt,6,6,"div",2),o.k0s()),2&Ct){const B=Kt;o.R7$(),o.vxM(B.office>0||B.coworking>0?1:-1),o.R7$(),o.vxM(B.office>0?2:-1),o.R7$(),o.vxM(B.coworking>0?3:-1)}}let wt=(()=>{class Ct{constructor(B){this.store=B,this.membershipUsage$=this.store.pipe((0,t.Lt)(ae))}ngOnInit(){this.store.dispatch((0,St.nK)())}ngOnDestroy(){this.store.dispatch((0,St.GH)())}static{this.\u0275fac=function(W){return new(W||Ct)(o.rXU(t.il))}}static{this.\u0275cmp=o.VBU({type:Ct,selectors:[["iwg-membership-usage"]],decls:2,vars:3,consts:[[1,"wrapper"],[1,"iwg-page-title"],[1,"tile","iwg-label3-medium"],["translate",""],["wrapperId","membership_usage",3,"message"]],template:function(W,A){if(1&W&&(o.DNE(0,Gt,4,3,"div",0),o.nI1(1,"async")),2&W){let w;o.vxM((w=o.bMT(1,1,A.membershipUsage$))?0:-1,w)}},dependencies:[M.Mm,k.p,a.Jj,M.D9],styles:[".wrapper[_ngcontent-%COMP%]{margin:4rem 0 3rem}"]})}}return Ct})();const ee=Ct=>({padding:Ct});function me(Ct,Kt){1&Ct&&o.nrm(0,"iwg-hint",13),2&Ct&&o.Y8G("isStaffStyle",!0)("iconClass","iwg-icon-warning-tick")}function Me(Ct,Kt){if(1&Ct){const B=o.RV6();o.j41(0,"iwg-button",11),o.nI1(1,"async"),o.bIt("click",function(){o.eBV(B);const A=o.XpG();return o.Njj(A.onUpgradeMembership())})("keydown.enter",function(){o.eBV(B);const A=o.XpG();return o.Njj(A.onUpgradeMembership())}),o.j41(2,"div",12),o.DNE(3,me,1,2,"iwg-hint",13),o.nI1(4,"async"),o.j41(5,"span",4),o.EFF(6,"QUICK_ACCESS.MEMBERSHIP.UPGRADE_MEMBERSHIP"),o.k0s()()()}if(2&Ct){const B=o.XpG();o.Y8G("disabled",o.bMT(1,2,B.isStaff$)),o.R7$(3),o.vxM(o.bMT(4,4,B.isStaff$)?3:-1)}}function ye(Ct,Kt){if(1&Ct&&(o.nrm(0,"iwg-membership-card",14),o.nI1(1,"async")),2&Ct){const B=Kt.$implicit,W=o.XpG();o.AVh("container",o.bMT(1,4,W.isMobileView$)),o.Y8G("membership",B)("hasTwoActiveMemberships",W.hasTwoActiveMemberships())}}function be(Ct,Kt){if(1&Ct){const B=o.RV6();o.j41(0,"div")(1,"div",15)(2,"span",16),o.bIt("click",function(){o.eBV(B);const A=o.XpG();return o.Njj(A.onViewExpired())})("keydown.enter",function(){o.eBV(B);const A=o.XpG();return o.Njj(A.onViewExpired())}),o.EFF(3," QUICK_ACCESS.MEMBERSHIP.VIEW_EXPIRED "),o.k0s()()()}}let ve=(()=>
1{class Ct{constructor(B,W,A){this.store=B,this.deviceService=W,this.ngxLogger=A,this.isLoading$=this.store.select(y.kR),this.isMobileView$=this.deviceService.isMobile$,this.memberships=[],this.viewExpired=!1,this.scrollIndex=0,this.pageCount=0,this.isScrollAllLogged=!1,this.destroy$=new n.B,this.isStaff$=this.store.pipe((0,t.Lt)(f.Pe))}ngOnInit(){this.store.dispatch((0,I.o5)({isQuickAccess:!0})),this.store.dispatch((0,I.jT)()),this.store.dispatch((0,m.t$)()),(0,d.z)([this.store.select(y.fs),this.store.select(y.lh)]).pipe((0,s.Q)(this.destroy$)).subscribe(([B,W])=>{this.memberships=B??[],this.membershipPurchaseType=W?.membershipPurchaseType,this.isUpgradeMembershipVisible=this.membershipPurchaseType===h.W.PurchaseNew||this.membershipPurchaseType===h.W.UpgradeExisting}),this.store.pipe((0,t.Lt)(f.T_),(0,s.Q)(this.destroy$)).subscribe(B=>this.companyName=B?.accountName)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),this.store.dispatch((0,I.z9)())}hasExpiredMemberships(){return this.memberships?.some(B=>B.isExpired)}getMemberships(){return this.viewExpired?[...this.memberships].sort(B=>B.isExpired?1:-1):this.memberships?.filter(B=>!B.isExpired)}onViewExpired(){this.viewExpired=!0,this.ngxLogger.log((0,_.lu)(this.memberships.find(B=>!B.isExpired),this.companyName))}onScrollChange(B){this.scrollIndex=B,B===this.pageCount-1&&!this.isScrollAllLogged&&(this.isScrollAllLogged=!0,this.ngxLogger.log((0,_.nE)(this.memberships[0],this.companyName)))}onUpgradeMembership(){this.store.select(T.$E).pipe((0,s.Q)(this.destroy$)).subscribe(B=>{this.store.dispatch(B.isBlocked||B.isSuspended?(0,m.a$)():(0,g.p2)({productType:C.c.Membership,isAmendMembership:this.membershipPurchaseType===h.W.UpgradeExisting}))})}hasTwoActiveMemberships(){return this.memberships?.filter(B=>!B.isExpired)?.length>1}static{this.\u0275fac=function(W){return new(W||Ct)(o.rXU(t.il),o.rXU(P.g),o.rXU(N.so))}}static{this.\u0275cmp=o.VBU({type:Ct,selectors:[["iwg-memberships-card"]],decls:19,vars:16,consts:[[3,"loading"],[1,"memberships-content",3,"ngClass"],[1,"membership-title","container"],[1,"membership-title-label","iwg-page-title"],["translate",""],["wrapperId","membership_quick_access","message","QUICK_ACCESS.MEMBERSHIP.HINT",1,"icon-help"],[1,"button-content-summary"],["wrapperId","membership_quick_access_upgrade_membership",1,"upgrade-membership",3,"disabled"],[3,"scrollIndexChange","pagesCountEmitter","displayOnlyFullItems"],[1,"membership-card-item",3,"container","membership","hasTwoActiveMemberships"],[1,"container"],["wrapperId","membership_quick_access_upgrade_membership",1,"upgrade-membership",3,"click","keydown.enter","disabled"],[1,"button-content"],["wrapperId","membership_upgrade_staffHint","message","QUICK_ACCESS.MEMBERSHIP.STAFF_NOTIFICATION",1,"no-icon-margin","staff",3,"isStaffStyle","iconClass"],[1,"membership-card-item",3,"membership","hasTwoActiveMemberships"],[1,"view-expired"],["id","Membership_QuickAccess_ViewExpired","tabindex","0","translate","",1,"d-block","text-link","text-link--regular",3,"click","keydown.enter"]],template:function(W,A){1&W&&(o.j41(0,"iwg-loader",0),o.nI1(1,"async"),o.j41(2,"div",1)(3,"div",2)(4,"div",3)(5,"span",4),o.EFF(6),o.k0s(),o.nrm(7,"iwg-hint",5),o.k0s(),o.j41(8,"div",6),o.DNE(9,Me,7,6,"iwg-button",7),o.k0s()(),o.j41(10,"div"),o.nI1(11,"async"),o.j41(12,"iwg-carousel",8),o.nI1(13,"async"),o.bIt("scrollIndexChange",function(ut){return A.onScrollChange(ut)})("pagesCountEmitter",function(ut){return A.pageCount=ut}),o.Z7z(14,ye,2,6,"iwg-membership-card",9,o.fX1),o.DNE(16,be,4,0,"div"),o.k0s()(),o.j41(17,"div",10),o.nrm(18,"iwg-membership-usage"),o.k0s()()()),2&W&&(o.Y8G("loading",o.bMT(1,8,A.isLoading$)),o.R7$(2),o.Y8G("ngClass",o.eq3(14,ee,(null==A.memberships?null:A.memberships.length)>1)),o.R7$(4),o.JRh("QUICK_ACCESS.MEMBERSHIP.MY_MEMBERSHIPS"),o.R7$(3),o.vxM(A.isUpgradeMembershipVisible?9:-1),o.R7$(),o.AVh("container",!o.bMT(11,10,A.isMobileView$)),o.R7$(2),o.Y8G("displayOnlyFullItems",o.bMT(13,12,A.isMobileView$)),o.R7$(2),o.Dyx(A.getMemberships()),o.R7$(2),o.vxM(A.hasExpiredMemberships()&&!A.viewExpired?16:-1))},dependencies:[a.YU,M.Mm,G.g,k.p,R.Q,J.V,Tt,wt,a.Jj],styles:[".memberships-content{max-width:111rem}@media (max-width: 1023.98px){.memberships-content{width:100%}}@media (max-width: 1023.98px){.memberships-content{max-width:100%}}.memberships-content .membership-title{color:var(--global-neutral-900, #202020);line-height:1.2;padding-bottom:2rem;display:flex;align-items:center}@media (max-width: 1023.98px){.memberships-content .membership-title{flex-direction:column-reverse;align-items:flex-start}}[dir=rtl] :host .memberships-content .membership-title span{float:right;padding-left:1rem}[dir=rtl] .memberships-content .membership-title span{float:right;padding-left:1rem}:host-context([dir=rtl]) .memberships-content .membership-title span{float:right;padding-left:1rem}.memberships-content .membership-title .membership-title-label{flex:1 1}@media (max-width: 1023.98px){.memberships-content .membership-title .membership-title-label{padding-top:3rem}}.memberships-content .membership-title .button-content-summary{display:flex;align-items:center}@media (max-width: 1023.98px){.memberships-content .membership-title .button-content-summary{width:100%}}@media (max-width: 1023.98px){.memberships-content .membership-title .button-content-summary .upgrade-membership{flex:1;width:100%}}.memberships-content .membership-card-item{align-self:stretch}@media (max-width: 1023.98px) and (orientation: landscape){.memberships-content .membership-card-item{min-width:100%}}@media (max-width: 1023.98px){.memberships-content .membership-card-item{min-width:100%}}@media (max-width: 1023.98px){.memberships-content.padding{padding-bottom:0}}.view-expired{min-width:40rem;display:flex;flex-direction:column;justify-content:center;align-items:center;height:100%;min-height:33.9rem}@media (max-width: 1023.98px){.view-expired{min-height:31.1rem}}.staff{color:var(--color-icon-staff-mode, var(--color-staff, #6116e2));margin-right:1rem;margin-left:0;pointer-events:all;justify-self:end}[dir=rtl] :host .staff{margin-right:0;margin-left:1rem}[dir=rtl] .staff{margin-right:0;margin-left:1rem}:host-context([dir=rtl]) .staff{margin-right:0;margin-left:1rem}@media (max-width: 1023.98px){.staff{margin-left:0}}\n"],encapsulation:2})}}return Ct})()},32349:(lt,O,e)=>{e.r(O),e.d(O,{QuickAccessModule:()=>Wt});var t=e(60177),n=e(89417),d=e(77339),s=e(59640),_=e(68018),f=e(64199),g=e(93827),h=e(69924),C=e(86049),T=e(96518),m=e(54438);let I=(()=>{class ht{static{this.\u0275fac=function(Zt){return new(Zt||ht)}}static{this.\u0275mod=m.$C({type:ht})}static{this.\u0275inj=m.G2t({imports:[_.h,t.MD,T.s,C.v]})}}return ht})();var y=e(4705),o=e(44693),P=e(35155);function N(ht,pe){1&ht&&m.nrm(0,"iwg-breadcrumbs")}function a(ht,pe){1&ht&&(m.j41(0,"span",5),m.EFF(1,"MENU.TITLE.QUICK_ACCESS"),m.k0s())}function M(ht,pe){1&ht&&(m.j41(0,"iwg-page-header",4),m.DNE(1,N,1,0,"ng-template",null,1,m.C5r)(3,a,2,0,"ng-template",null,2,m.C5r),m.k0s())}let G=(()=>{class ht{static{this.\u0275fac=function(Zt){return new(Zt||ht)}}static{this.\u0275cmp=m.VBU({type:ht,selectors:[["iwg-quick-access"]],decls:4,vars:0,consts:[["header",""],["headerBreadcrumbs",""],["headerTitle",""],["queryParamsHandling","preserve"],[1,"bottom-border"],["translate",""]],template:function(Zt,ie){1&Zt&&(m.j41(0,"iwg-navigation-secondary",3),m.DNE(1,M,5,0,"ng-template",null,0,m.C5r),m.nrm(3,"router-outlet"),m.k0s())},dependencies:[y.n3,o.k,h.y,_.Mm,P.m],styles:["[_nghost-%COMP%]{height:100%}"]})}}return ht})();var k=e(11020),R=e(55469),J=e(25180),H=e(48337),et=e(76864),st=e(56977),Et=e(21413),dt=e(28213),Nt=e(55424),
1V=e(38769),mt=e(12262);const Pt=ht=>({"hide-printer-pin":ht}),l=ht=>[ht];function $(ht,pe){if(1&ht){const Vt=m.RV6();m.j41(0,"iwg-button",10),m.nI1(1,"async"),m.bIt("click",function(){m.eBV(Vt);const ie=m.XpG(2);return m.Njj(ie.revealQrCode())})("keydown.enter",function(){m.eBV(Vt);const ie=m.XpG(2);return m.Njj(ie.revealQrCode())}),m.EFF(2," QUICK_ACCESS.WORLDKEY_PIN.REVEAL_QR_CODE "),m.k0s()}if(2&ht){const Vt=m.XpG(2);m.Y8G("disabled",m.bMT(1,1,Vt.generatingPrinterPin$))}}function Z(ht,pe){if(1&ht&&(m.j41(0,"div",9)(1,"iwg-loader",11),m.nI1(2,"async"),m.nI1(3,"async"),m.nrm(4,"img",12),m.nI1(5,"async"),m.k0s()()),2&ht){const Vt=m.XpG(2);m.R7$(),m.Y8G("loading",m.bMT(2,2,Vt.isLoadingImage$)||m.bMT(3,4,Vt.isLoadingPin$)),m.R7$(3),m.BMQ("src",m.eq3(8,l,"data:image/png;base64,"+m.bMT(5,6,Vt.image$)),m.B4B)}}function ot(ht,pe){if(1&ht&&(m.j41(0,"span",4),m.EFF(1,"QUICK_ACCESS.WORLDKEY_PIN.LABEL_TEXT"),m.k0s(),m.j41(2,"div",5)(3,"div",6)(4,"div",7),m.nI1(5,"async"),m.EFF(6),m.k0s()(),m.DNE(7,$,3,3,"iwg-button",8),m.k0s(),m.DNE(8,Z,6,10,"div",9)),2&ht){const Vt=m.XpG();m.R7$(4),m.Y8G("ngClass",m.eq3(6,Pt,m.bMT(5,4,Vt.generatingPrinterPin$))),m.R7$(2),m.JRh(Vt.printerPin),m.R7$(),m.vxM(Vt.qrVisible?-1:7),m.R7$(),m.vxM(Vt.qrVisible?8:-1)}}let D=(()=>{class ht{constructor(Vt){this.store$=Vt,this.unsubscribe$=new Et.B,this.image$=this.store$.select(Nt.G9),this.isLoadingImage$=this.store$.pipe((0,s.Lt)(Nt.PJ)),this.isLoadingPin$=this.store$.pipe((0,s.Lt)(J.pe)),this.qrVisible=!1}ngOnInit(){this.generatingPrinterPin$=this.store$.select(J.pG),this.accountStatusSelector$=this.store$.select(dt.$E),this.store$.select(J.Bw).pipe((0,st.Q)(this.unsubscribe$)).subscribe(Vt=>{this.printerPin=Vt,this.qrVisible&&this.loadQrCode(this.printerPin)})}loadQrCode(Vt){this.qrVisible=!0,this.store$.dispatch((0,V._Z)({content:Vt}))}ngOnDestroy(){this.store$.dispatch(R.lQ()),this.store$.dispatch((0,V.cP)()),this.unsubscribe$.next(),this.unsubscribe$.complete()}revealQrCode(){this.loadQrCode(this.printerPin)}requestPin(){this.store$.dispatch(R.Kh())}isAccountActive(Vt){return!!Vt&&!Vt.isBlocked&&!Vt.isSuspended}static{this.\u0275fac=function(Zt){return new(Zt||ht)(m.rXU(s.il))}}static{this.\u0275cmp=m.VBU({type:ht,selectors:[["iwg-printer-pin"]],decls:8,vars:3,consts:[[1,"printer-pin-container"],[1,"request-printer-pin"],["translate","",1,"request-printer-pin__not-working"],["type","button","wrapperId","request-printer-pin-button","displayType","text-link-inline",1,"text-link",3,"click","keydown.enter"],["translate","",1,"printer-pin-label"],[1,"display-printer-pin"],[1,"pin-box"],["id","printer-pin-code",1,"iwg-h1","font-bold","pin-box__text",3,"ngClass"],["wrapperId","printer-pin-reveal-qr-code-button","translate","",1,"reveal-qr-button",3,"disabled"],[1,"qr-code"],["wrapperId","printer-pin-reveal-qr-code-button","translate","",1,"reveal-qr-button",3,"click","keydown.enter","disabled"],[1,"loader",3,"loading"],["alt",""]],template:function(Zt,ie){1&Zt&&(m.j41(0,"div",0),m.DNE(1,ot,9,8),m.nI1(2,"async"),m.j41(3,"div",1)(4,"span",2),m.EFF(5,"QUICK_ACCESS.WORLDKEY_PIN.PIN_NOT_WORKING"),m.k0s(),m.j41(6,"iwg-button",3),m.bIt("click",function(){return ie.requestPin()})("keydown.enter",function(){return ie.requestPin()}),m.EFF(7,"QUICK_ACCESS.WORLDKEY_PIN.REQUEST_NEW_PIN"),m.k0s()()()),2&Zt&&(m.R7$(),m.vxM(ie.isAccountActive(m.bMT(2,1,ie.accountStatusSelector$))?1:-1))},dependencies:[t.YU,_.Mm,mt.Q,et.V,t.Jj],styles:['.hide-printer-pin[_ngcontent-%COMP%]{visibility:hidden}.printer-pin-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding-bottom:4rem}.display-printer-pin[_ngcontent-%COMP%]{display:flex}@media (max-width: 1023.98px){.display-printer-pin[_ngcontent-%COMP%]{flex-direction:column}}.pin-box[_ngcontent-%COMP%]{display:flex;width:50%;cursor:pointer;-webkit-user-select:all;user-select:all}.pin-box__text[_ngcontent-%COMP%]{letter-spacing:.4rem;margin:0;padding:0}.reveal-qr-button[_ngcontent-%COMP%]{width:50%}@media (max-width: 1023.98px){.reveal-qr-button[_ngcontent-%COMP%]{width:100%;margin-top:2rem;margin-bottom:2rem}}.printer-pin-label[_ngcontent-%COMP%]{padding-bottom:.8rem}.request-printer-pin[_ngcontent-%COMP%]{padding-top:.8rem}.request-printer-pin__not-working[_ngcontent-%COMP%]:after{content:" ";white-space:pre}.qr-code[_ngcontent-%COMP%]{max-width:25rem}.qr-code[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{margin-left:-2.8rem}[dir=rtl]   [_nghost-%COMP%]   .qr-code[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{margin-left:0;margin-right:-2.8rem}[dir=rtl][_ngcontent-%COMP%]   .qr-code[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{margin-left:0;margin-right:-2.8rem}[dir=rtl][_nghost-%COMP%]   .qr-code[_ngcontent-%COMP%]   img[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .qr-code[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{margin-left:0;margin-right:-2.8rem}.qr-code[_ngcontent-%COMP%]   .loader[_ngcontent-%COMP%]{min-height:20rem}@media (orientation: landscape){.qr-code[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{max-width:100%}}']})}}return ht})(),U=(()=>{class ht{constructor(Vt){this.store$=Vt}
1ngOnInit(){this.store$.dispatch(R.tS()),this.generatingPrinterPin$=this.store$.select(J.pG)}static{this.\u0275fac=function(Zt){return new(Zt||ht)(m.rXU(s.il))}}static{this.\u0275cmp=m.VBU({type:ht,selectors:[["iwg-my-printer-pin"]],decls:10,vars:11,consts:[[1,"loader",3,"loading"],[1,"worldkey-pin","container"],[1,"worldkey-pin__title","iwg-page-title"],["translate",""],["wrapperId","worldkey_pin",3,"isHtmlMessage","message"]],template:function(Zt,ie){1&Zt&&(m.j41(0,"iwg-loader",0),m.nI1(1,"async"),m.j41(2,"div",1)(3,"div",2)(4,"span",3),m.EFF(5,"QUICK_ACCESS.WORLDKEY_PIN.TITLE"),m.k0s(),m.nrm(6,"iwg-hint",4),m.nI1(7,"translate"),m.nI1(8,"translate"),m.k0s(),m.nrm(9,"iwg-printer-pin"),m.k0s()()),2&Zt&&(m.Y8G("loading",m.bMT(1,5,ie.generatingPrinterPin$)),m.R7$(6),m.FCK("message","",m.bMT(7,7,"QUICK_ACCESS.WORLDKEY_PIN.HINT_1")," <br><br> ",m.bMT(8,9,"QUICK_ACCESS.WORLDKEY_PIN.HINT_2"),""),m.Y8G("isHtmlMessage",!0))},dependencies:[_.Mm,H.p,et.V,D,t.Jj,_.D9],styles:[".worldkey-pin[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:70%}@media (max-width: 1023.98px){.worldkey-pin[_ngcontent-%COMP%]{width:100%}}.worldkey-pin__title[_ngcontent-%COMP%]{display:flex;align-items:center}"]})}}return ht})();var gt=e(26592),_t=e(24153),ct=e(93826),pt=e(70715);const x=(0,s.Mz)(pt.J,ht=>ht.virtualOfficeEntitlements.entitlements),it=(0,s.Mz)(pt.J,ht=>ht.virtualOfficeEntitlements.entitlements?.length>0),q=(0,s.Mz)(pt.J,ht=>ht.virtualOfficeEntitlements.fetchingEntitlements),nt=(0,s.Mz)(pt.J,ht=>ht.virtualOfficeEntitlements.entitlementsUsage);var xt=e(96533),Dt=e(60156),oe=e(95132),v=e(99832),_e=e(742);const ue=ht=>({ConsumerInput_Membership_XDaysUsage:ht});function re(ht,pe){if(1&ht&&(m.j41(0,"div",6),m.EFF(1),m.nI1(2,"translate"),m.nI1(3,"localizedDate"),m.k0s()),2&ht){const Vt=m.XpG();m.Y8G("id","Vo_entitlement_Card_Date_EndSaleType_"+(null==Vt.entitlement?null:Vt.entitlement.endSaleTypeId)+"_"+Vt.wrappedId),m.R7$(),m.Lme(" ",m.bMT(2,3,Vt.dateTranslation)," ",m.i5U(3,5,Vt.entitlement.validTo,"short")," ")}}let bt=(()=>{class ht{constructor(){this.wrappedId=""}get dateTranslation(){return"QUICK_ACCESS.VIRTUAL_OFFICE."+(this.entitlement?.endSaleTypeId===v.G.Termination?"EXPIRY":"RENEWAL")}static{this.\u0275fac=function(Zt){return new(Zt||ht)}}static{this.\u0275cmp=m.VBU({type:ht,selectors:[["iwg-virtual-office-entitlement-card"]],inputs:{entitlement:"entitlement",wrappedId:"wrappedId"},decls:11,vars:12,consts:[[1,"vo-entitlement-card","dark"],[1,"vo-entitlement-card__content"],[1,"logo",3,"src","alt"],[1,"vo-entitlement-card__info-wrapper"],[1,"iwg-h2","location-name",3,"id"],[1,"iwg-body1","card-info"],[3,"id"]],template:function(Zt,ie){1&Zt&&(m.j41(0,"div",0)(1,"div",1),m.nrm(2,"img",2),m.j41(3,"div",3)(4,"div",4),m.EFF(5),m.k0s(),m.j41(6,"div",5)(7,"div",6),m.EFF(8),m.nI1(9,"translate"),m.k0s(),m.DNE(10,re,4,8,"div",6),m.k0s()()()()),2&Zt&&(m.R7$(2),m.FS9("src",null==ie.entitlement?null:ie.entitlement.brandLogoUrl,m.B4B),m.FS9("alt",null==ie.entitlement?null:ie.entitlement.brandName),m.R7$(2),m.Y8G("id","Vo_Entitlement_Card_Centre_Name_"+ie.wrappedId),m.R7$(),m.SpI(" ",null==ie.entitlement?null:ie.entitlement.centreName," "),m.R7$(2),m.Y8G("id","Vo_Entitlemet_Card_Free_Visits_"+ie.wrappedId),m.R7$(),m.SpI(" ",m.i5U(9,7,"QUICK_ACCESS.VIRTUAL_OFFICE.FREE_VISITS",m.eq3(10,ue,null==ie.entitlement?null:ie.entitlement.freeVisitsPerMonth))," "),m.R7$(2),m.vxM(ie.entitlement.validTo?10:-1))},dependencies:[_.D9,_e.K],styles:[".vo-entitlement-card[_ngcontent-%COMP%]{background-color:var(--color-bg-primary, var(--global-neutral-100, #FFFFFF));color:var(--color-text-primary, var(--brand-neutral-900, #0A0428));display:flex;width:40rem;margin-right:4rem}[dir=rtl]   [_nghost-%COMP%]   .vo-entitlement-card[_ngcontent-%COMP%]{margin-left:4rem;margin-right:0}@media (max-width: 1023.98px){[dir=rtl]   [_nghost-%COMP%]   .vo-entitlement-card[_ngcontent-%COMP%]{margin:auto}}[dir=rtl][_ngcontent-%COMP%]   .vo-entitlement-card[_ngcontent-%COMP%]{margin-left:4rem;margin-right:0}@media (max-width: 1023.98px){[dir=rtl][_ngcontent-%COMP%]   .vo-entitlement-card[_ngcontent-%COMP%]{margin:auto}}[dir=rtl][_nghost-%COMP%]   .vo-entitlement-card[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .vo-entitlement-card[_ngcontent-%COMP%]{margin-left:4rem;margin-right:0}@media (max-width: 1023.98px){[dir=rtl][_nghost-%COMP%]   .vo-entitlement-card[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .vo-entitlement-card[_ngcontent-%COMP%]{margin:auto}}@media (max-width: 1023.98px){.vo-entitlement-card[_ngcontent-%COMP%]{margin:auto}}@media (max-width: 1023.98px){.vo-entitlement-card[_ngcontent-%COMP%]{max-width:99.5%;padding-left:.1rem}}@media (max-width: 1023.98px) and (orientation: landscape){.vo-entitlement-card[_ngcontent-%COMP%]{margin:auto}}.vo-entitlement-card__content[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;padding:2rem 3rem;min-height:33.9rem}@media (max-width: 1023.98px){.vo-entitlement-card__content[_ngcontent-%COMP%]{padding:2rem;min-height:31.1rem}}.vo-entitlement-card__content[_ngcontent-%COMP%]   .logo[_ngcontent-%COMP%]{align-self:flex-end}.vo-entitlement-card__info-wrapper[_ngcontent-%COMP%]{flex:1 1 0px;display:flex;flex-direction:column;justify-content:center}.vo-entitlement-card__info-wrapper[_ngcontent-%COMP%]   .location-name[_ng
1content-%COMP%]{flex:1;word-break:break-word}.vo-entitlement-card__info-wrapper[_ngcontent-%COMP%]   .card-info[_ngcontent-%COMP%]{padding-top:1rem}"]})}}return ht})();const Ft=ht=>({ConsumerInput_MembershipUsage_Generic:ht});function Te(ht,pe){if(1&ht&&(m.j41(0,"div",0)(1,"div",1)(2,"span",2),m.EFF(3,"QUICK_ACCESS.VIRTUAL_OFFICE.USAGE.THIS_MONTH"),m.k0s(),m.nrm(4,"iwg-hint",3),m.k0s(),m.j41(5,"div",4)(6,"span",5),m.EFF(7,"QUICK_ACCESS.VIRTUAL_OFFICE.USAGE.OFFICE"),m.k0s(),m.j41(8,"span",6),m.EFF(9),m.nI1(10,"translate"),m.k0s()(),m.j41(11,"div",4)(12,"span",7),m.EFF(13,"QUICK_ACCESS.VIRTUAL_OFFICE.USAGE.COWORKING"),m.k0s(),m.j41(14,"span",8),m.EFF(15),m.nI1(16,"translate"),m.k0s()()()),2&ht){const Vt=pe;m.R7$(4),m.Y8G("message","QUICK_ACCESS.VIRTUAL_OFFICE.USAGE.HINT"),m.R7$(5),m.JRh(m.i5U(10,3,"QUICK_ACCESS.VIRTUAL_OFFICE.USAGE.VISITS_USED",m.eq3(9,Ft,null==Vt?null:Vt.office))),m.R7$(6),m.JRh(m.i5U(16,6,"QUICK_ACCESS.VIRTUAL_OFFICE.USAGE.VISITS_USED",m.eq3(11,Ft,null==Vt?null:Vt.coworking)))}}let E=(()=>{class ht{constructor(Vt){this.store=Vt,this.virtualOfficeUsage$=this.store.pipe((0,s.Lt)(nt))}static{this.\u0275fac=function(Zt){return new(Zt||ht)(m.rXU(s.il))}}static{this.\u0275cmp=m.VBU({type:ht,selectors:[["iwg-virtual-office-entitlement-usage"]],decls:2,vars:3,consts:[[1,"wrapper"],[1,"iwg-page-title"],["id","Virtual_Office_Usage_This_Month","translate",""],["wrapperId","virtual-office_usage",3,"message"],[1,"usage-tile","iwg-label3-medium"],["id","Virtual_Office_Usage_Office","translate",""],["id","Virtual_Office_Usage_Visits_Used_Office"],["id","Virtual_Office_Usage_Coworking","translate",""],["id","Virtual_Office_Usage_Visits_Used_Coworking"]],template:function(Zt,ie){if(1&Zt&&(m.DNE(0,Te,17,13,"div",0),m.nI1(1,"async")),2&Zt){let Fe;m.vxM((Fe=m.bMT(1,1,ie.virtualOfficeUsage$))?0:-1,Fe)}},dependencies:[_.Mm,H.p,t.Jj,_.D9],styles:[".wrapper[_ngcontent-%COMP%]{margin:4rem 0 3rem}",".usage-tile[_ngcontent-%COMP%]{height:9rem;display:flex;align-items:center;justify-content:space-between;padding:0 4rem;border:solid 1px var(--color-border, var(--global-neutral-300, #C3C3C3));border-left:3px solid var(--color-text-accent, var(--color-text-accent, var(--brand-primary-500, #E30613)));overflow:hidden;background-color:var(--color-bg-primary, var(--global-neutral-100, #FFFFFF));margin:0;width:100%;min-width:100%}"]})}}return ht})();function F(ht,pe){if(1&ht&&m.nrm(0,"iwg-virtual-office-entitlement-card",6),2&ht){const Zt=pe.$index;m.Y8G("entitlement",pe.$implicit)("wrappedId","VO_Entitlement_"+Zt)}}let L=(()=>{class ht{constructor(Vt,Zt){this.store=Vt,this.deviceService=Zt,this.isMobileView$=this.deviceService.isMobile$,this.virtualOfficeEntitlements$=this.store.select(x),this.loading$=this.store.select(q)}ngOnInit(){this.store.dispatch((0,xt.kK)())}static{this.\u0275fac=function(Zt){return new(Zt||ht)(m.rXU(s.il),m.rXU(Dt.g))}}static{this.\u0275cmp=m.VBU({type:ht,selectors:[["iwg-virtual-office-entitlements"]],decls:13,vars:8,consts:[[1,"loader",3,"loading"],[1,"container"],[1,"iwg-page-title"],["id","Virtual_Office_Ttitle","translate",""],["wrapperId","VirtualOffice_Entitlements_Hint","message","QUICK_ACCESS.VIRTUAL_OFFICE.HINT",1,"hint-icon"],[3,"displayOnlyFullItems"],[1,"entitlement-card",3,"entitlement","wrappedId"]],template:function(Zt,ie){1&Zt&&(m.j41(0,"iwg-loader",0),m.nI1(1,"async"),m.j41(2,"div",1)(3,"div",2)(4,"span",3),m.EFF(5," QUICK_ACCESS.VIRTUAL_OFFICE.TITLE "),m.k0s(),m.nrm(6,"iwg-hint",4),m.k0s(),m.j41(7,"iwg-carousel",5),m.nI1(8,"async"),m.Z7z(9,F,1,2,"iwg-virtual-office-entitlement-card",6,m.fX1),m.nI1(11,"async"),m.k0s(),m.nrm(12,"iwg-virtual-office-entitlement-usage"),m.k0s()()),2&Zt&&(m.Y8G("loading",m.bMT(1,2,ie.loading$)),m.R7$(7),m.Y8G("displayOnlyFullItems",m.bMT(8,4,ie.isMobileView$)),m.R7$(2),m.Dyx(m.bMT(11,6,ie.virtualOfficeEntitlements$)))},dependencies:[_.Mm,oe.g,H.p,et.V,bt,E,t.Jj],styles:["@media (max-width: 1023.98px) and (orientation: landscape){.entitlement-card[_ngcontent-%COMP%]{min-width:100%}}@media (max-width: 1023.98px){.entitlement-card[_ngcontent-%COMP%]{min-width:100%}}"]})}}return ht})();var ft=e(96354),K=e(86734),Tt=e(84572),ae=e(77223),ne=e(83483);const de="QUICK_ACCESS.WORLDKEY_PIN.NAVIGATION_TITLE",vt="QUICK_ACCESS.MEMBERSHIPS",Jt="QUICK_ACCESS.ACCESS_CARD",Gt="QUICK_ACCESS.VIRTUAL_OFFICES",wt="QUICK_ACCESS.PARTNER_OFFERS",me=[{path:"",component:G,children:[{path:"",redirectTo:"worldkey-pin",pathMatch:"full"},{path:"worldkey-pin",data:{caption:de,menuEntry:de,breadcrumb:de,hightLightChild:!0},children:[{path:"",component:U,canActivate:[gt.a],data:{permissions:{only:_t.e.CanAccessQuickAccess,redirectTo:"quick-access/worldkey-pin/no-access"},analyticPageName:"My Printer Pin"}},(0,ct.X)("quick-access/worldkey-pin",_t.e.CanAccessQuickAccess,"My Printer Pin")]},{path:"memberships",data:{caption:vt,menuEntry:vt,breadcrumb:vt,hightLightChild:!0},children:[{path:"",component:k.L,canActivate:[gt.a],data:{permissions:{only:_t.e.CanAccessQuickAccess,redirectTo:"quick-access/memberships/no-access"},analyticPageName:"Memberships"}},(0,ct.X)("quick-access/memberships",_t.e.CanAccessQuickAccess,"Memberships")]},{path:"access-card",loadChildren:()=>e.e(426).then(e.bind(e,17948)).then(ht=>ht.AccessCardModule),data:{caption:Jt,menuEntry:Jt,breadcrumb:Jt,hightLightChild:!0,isVisible:ae.u.isVisible}}
1,{path:"vo-entitlements",data:{caption:Gt,menuEntry:Gt,breadcrumb:Gt,hightLightChild:!0,isVisible:function ee(ht){const pe=ht.get(s.il);return pe.dispatch((0,xt.vX)()),pe.select(it)}},children:[{path:"",component:L,canActivate:[gt.a],data:{permissions:{only:_t.e.CanAccessQuickAccess,redirectTo:"quick-access/vo-entitlements/no-access"},analyticPageName:"Virtual Office Entitlements"}},(0,ct.X)("quick-access/vo-entitlements/no-access",_t.e.CanAccessQuickAccess,"Virtual Office Entitlements")],canActivate:[()=>{const ht=(0,m.WQX)(s.il);return ht.dispatch((0,xt.vX)()),(0,Tt.z)([ht.select(it),ht.select(q)]).pipe((0,ft.T)(([pe,Vt])=>(!pe&&!Vt&&ht.dispatch((0,K.H3)()),!0)))}]},{path:"benefits",loadChildren:()=>e.e(426).then(e.bind(e,94359)).then(ht=>ht.BenefitsModule),data:{caption:wt,menuEntry:wt,breadcrumb:wt,hightLightChild:!0,isVisible:ne.r}}]}];let Me=(()=>{class ht{static{this.\u0275fac=function(Zt){return new(Zt||ht)}}static{this.\u0275mod=m.$C({type:ht})}static{this.\u0275inj=m.G2t({imports:[t.MD,y.iI.forChild(me),y.iI]})}}return ht})();var ye=e(43246),be=e(55080),ve=e(15118),Ct=e(922),Kt=e(6732),B=e(39642),W=e(99252),A=e(31476),w=e(46351),ut=e(71660);let Wt=(()=>{class ht{static{this.\u0275fac=function(Zt){return new(Zt||ht)}}static{this.\u0275mod=m.$C({type:ht})}static{this.\u0275inj=m.G2t({providers:[w.Y,ye.x,_e.K],imports:[t.MD,Me,g.L,h.y,_.h,oe.g,s.md,d.Vm,n.YN,I,s.md.forFeature("quickAccess",ve.Y),d.Vm.forFeature(be.C),f.C,ut.O,Kt.R,C.v,T.s,B.C,W.D,A.P,n.X1.withConfig({callSetDisabledState:"whenDisabledForLegacyCode"}),Ct.Z]})}}return ht})()},43246:(lt,O,e)=>{e.d(O,{x:()=>d});var t=e(54438),n=e(21626);let d=(()=>{class s{constructor(f){this.http=f}getPrinterPin(){return this.http.get("printer-pin")}generatePrinterPin(){return this.http.get("printer-pin/generate")}static{this.\u0275fac=function(g){return new(g||s)(t.KVO(n.Qq))}}static{this.\u0275prov=t.jDH({token:s,factory:s.\u0275fac})}}return s})()},63373:(lt,O,e)=>{e.d(O,{EA:()=>s,Zj:()=>n,s8:()=>d});var t=e(59640);const n=(0,t.VP)("[Access Card Feature] checkAccessCardFeature"),d=(0,t.VP)("[Access Card Feature] checkAccessCardFeatureSuccess",(0,t.xk)()),s=(0,t.VP)("[Access Card Feature] checkAccessCardFeatureFailed")},90695:(lt,O,e)=>{e.d(O,{Gq:()=>s,P$:()=>n,Pj:()=>C,QX:()=>g,Sq:()=>d,cF:()=>I,i2:()=>h,jP:()=>_,of:()=>T,sf:()=>m,y2:()=>f});var t=e(59640);const n=(0,t.VP)("[Active Access Card] getActiveAccessCard",(0,t.xk)()),d=(0,t.VP)("[Active Access Card] getActiveAccessCardSuccess",(0,t.xk)()),s=(0,t.VP)("[Password Recovery] getActiveAccessCardFailed"),_=(0,t.VP)("[Active Access Card] setActiveAccessCard",(0,t.xk)()),f=(0,t.VP)("[Active Access Card] setActiveAccessCardForce",(0,t.xk)()),g=(0,t.VP)("[Active Access Card] setActiveAccessCardSuccess",(0,t.xk)()),h=(0,t.VP)("[Active Access Card] setActiveAccessCardFailed",(0,t.xk)()),C=(0,t.VP)("[Active Access Card] unassignActiveAccessCard",(0,t.xk)()),T=(0,t.VP)("[Active Access Card] unassignActiveAccessCardForce",(0,t.xk)()),m=(0,t.VP)("[Active Access Card] unassignActiveAccessCardSuccess"),I=(0,t.VP)("[Active Access Card] unassignActiveAccessCardFailed")},89650:(lt,O,e)=>{e.d(O,{$c:()=>g,Ok:()=>h,Wh:()=>s,Wm:()=>f,Zo:()=>_});var t=e(59640),n=e(70715);const d=(0,t.Mz)(n.J,({activeAccessCard:C})=>C),s=(0,t.Mz)(d,({accessCard:C})=>C?.status),_=(0,t.Mz)(d,({accessCard:C})=>C?.accessCardNumber||C?.oldAccessCardNumber),f=(0,t.Mz)(d,({isLoading:C})=>C),g=(0,t.Mz)(d,({isLoaded:C})=>C),h=(0,t.Mz)(d,({isSaving:C})=>C)},12087:(lt,O,e)=>{e.d(O,{IH:()=>f,b5:()=>n,n2:()=>_,ns:()=>g,rY:()=>d});var t=e(59640);const n=(0,t.VP)("[Benefit] GetPartnerOffersRequest",(0,t.xk)()),d=(0,t.VP)("[Benefit] GetPartnerOffersSuccess",(0,t.xk)()),_=((0,t.VP)("[Benefit] GetPartnerOffersFailed",(0,t.xk)()),(0,t.VP)("[Benefit] Clear Partner Offers")),f=(0,t.VP)("[Benefit] Set Selected Country",(0,t.xk)()),g=(0,t.VP)("[Benefit] Clear Current Country")},74529:(lt,O,e)=>{e.d(O,{Kr:()=>d,MN:()=>_,kC:()=>s,lQ:()=>n});var t=e(59640);const n=(0,t.VP)("[MembershipBenefitsPopup] Get Membership Benefits By ClassificationId",(0,t.xk)()),d=(0,t.VP)("[MembershipBenefitsPopup] Reset Membership Benefits"),s=(0,t.VP)("[MembershipBenefitsPopup] Get Membership Benefits By ClassificationId Succeeded",(0,t.xk)()),_=(0,t.VP)("[MembershipBenefitsPopup] Get Membership Benefits By ClassificationId Failed")},38571:(lt,O,e)=>{e.d(O,{GH:()=>_,fk:()=>s,nK:()=>n,t6:()=>d});var t=e(59640);const n=(0,t.VP)("[MembershipUsage] Get monthly usage request"),d=(0,t.VP)("[MembershipUsage] Get monthly usage success",(0,t.xk)()),s=(0,t.VP)("[MembershipUsage] Get monthly usage error",(0,t.xk)()),_=(0,t.VP)("[Membership Details] Reset Details")},55469:(lt,O,e)=>{e.d(O,{Kh:()=>_,PZ:()=>g,SB:()=>s,Yz:()=>f,lQ:()=>h,tS:()=>n,z8:()=>d});var t=e(59640);const n=(0,t.VP)("[Quick Access] Get printer pin request"),d=(0,t.VP)("[Quick Access] Get printer pin success",(0,t.xk)()),s=(0,t.VP)("[Quick Access] Get printer pin failure"),_=(0,t.VP)("[Quick Access] Generate printer pin request"),f=(0,t.VP)("[Quick Access] Generate printer pin success",(0,t.xk)()),g=(0,t.VP)("[Quick Access] Generate printer pin failure"),h=(0,t.VP)("[Quick Access] Clear printer pin")},25180:(lt,O,e)=>{e.d(O,{Bw:()=>d,pG:()=>s,pe:()=>_});var t=e(59640),n=e(70715);const d=(0,t.Mz)(n.J,f=>f.printerPin.pin),s=(0,t.Mz)(n.J,f=>f.printerPin.generatingPin),_=(0,t.Mz)(n.J,f=>f.printerPin.loading)},38769:(lt,O,e)=>{e.d(O,{_Z:()=>n,cP:()=>_,eK:()=>s,eY:()=>d});var t=e(59640);const n=(0,t.VP)("[QrCode] GetQrCodeRequest",(0,t.xk)()),d=(0,t.VP)("[QrCode] GetQrCodeSuccess",(0,t.xk)()),s=(0,t.VP)("[QrCode] GetQrCodeFailed",(0,t.xk)()),_=(0,t.VP)("[QrCode] ClearQrCode")},55424:(lt,O,e)=>{e.d(O,{G9:()=>s,PJ:()=>_});var t=e(59640),n=e(70715);const d=(0,t.Mz)(n.J,f=>f.qrCode),s=(0,t.Mz)(d,f=>f.qrCode),_=(0,t.Mz)(d,f=>f.loading)},55080:(lt,O,e)=>{e.d(O,{C:()=>bt});var t=e(77339),n=e(55469),d=e(96354),s=e(25558),_=e(5964),f=e(96697),g=e(30786),h=e(99437),C=e(53993),T=e(84572),m=e(7673),I=e(98413),y=e(38207),o=e(25180),P=e(62253),N=e(28213),a=e(41668),M=e(54438),G=e(43246),k=e(59640),R=e(39178);function J(Ft){return(0,d.T)(()=>(0,I.Ds)({notificationType:y._.error,text:Ft}))}let H=(()=>{class Ft{constructor(E,F,L,ft){this.actions$=E,this.printerPinService=F,this.store$=L,this.ngxLogger=ft,this.getPrinterPin$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(n.tS),(0,s.n)(K=>(0,T.z)([this.store$.select(o.Bw),this.store$.select(N.$E)]).pipe((0,_.p)(([Tt,St])=>!!St),(0,f.s)(1),(0,d.T)(([Tt,St])=>({pin:Tt,accountStatus:St})))),(0,g.p)(({pin:K,accountStatus:Tt})=>
1Tt.isBlocked||Tt.isSuspended?(this.store$.dispatch(n.lQ()),(0,m.of)((0,a.a$)())):K?(0,m.of)(n.z8({printerPin:{pin:K}})):this.printerPinService.getPrinterPin().pipe((0,d.T)(St=>(this.ngxLogger.log((0,P.T4)()),n.z8({printerPin:St}))),(0,h.W)(St=>(0,m.of)(n.SB())))))),this.getPrinterPinFailure$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(n.SB),J("QUICK_ACCESS.WORLDKEY_PIN.GET_PIN_FAILED"))),this.generatePrinterPin$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(n.Kh),(0,C.E)(this.store$.select(o.Bw),this.store$.select(N.$E)),(0,_.p)(([K,Tt,St])=>!!St),(0,g.p)(([K,Tt,St])=>St.isBlocked||St.isSuspended?(this.store$.dispatch(n.lQ()),(0,m.of)((0,a.a$)())):this.printerPinService.generatePrinterPin().pipe((0,d.T)(ae=>(this.ngxLogger.log((0,P.TF)()),n.Yz({printerPin:ae}))),(0,h.W)(ae=>(0,m.of)(n.PZ())))))),this.generatePrinterPinFailure$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(n.PZ),J("QUICK_ACCESS.WORLDKEY_PIN.GENERATE_PIN_FAILED")))}static{this.\u0275fac=function(F){return new(F||Ft)(M.KVO(t.En),M.KVO(G.x),M.KVO(k.il),M.KVO(R.so))}}static{this.\u0275prov=M.jDH({token:Ft,factory:Ft.\u0275fac})}}return Ft})();var et=e(38571),st=e(4174);let Et=(()=>{class Ft{constructor(E,F){this.actions$=E,this.service=F,this.getMembershipUsage$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(et.nK),(0,s.n)(()=>this.service.getMembershipMonthlyUsage().pipe((0,d.T)(L=>(0,et.t6)({membershipUsage:L})),(0,h.W)(L=>[(0,et.fk)({membershipUsage:null})])))))}static{this.\u0275fac=function(F){return new(F||Ft)(M.KVO(t.En),M.KVO(st.n))}}static{this.\u0275prov=M.jDH({token:Ft,factory:Ft.\u0275fac})}}return Ft})();var dt=e(96533),Nt=e(57833);let V=(()=>{class Ft{constructor(E,F){this.actions$=E,this.benefitsService=F,this.getVirtualOfficeEntitlementsForce$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(dt.vX),(0,s.n)(()=>this.benefitsService.getVirtualOfficeEntitlements().pipe((0,d.T)(L=>dt.x8({entitlements:L})),(0,h.W)(()=>(0,m.of)(dt.U0())))))),this.getVirtualOfficeEntitlementsUsage$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(dt.kK),(0,s.n)(()=>this.benefitsService.getVirtualOfficeEntitlementsUsage().pipe((0,d.T)(L=>dt.nj({entitlementsUsage:L})),(0,h.W)(()=>(0,m.of)(dt._L()))))))}static{this.\u0275fac=function(F){return new(F||Ft)(M.KVO(t.En),M.KVO(Nt.o))}}static{this.\u0275prov=M.jDH({token:Ft,factory:Ft.\u0275fac})}}return Ft})();var mt=e(74529);let Pt=(()=>{class Ft{constructor(E,F){this.actions$=E,this.service=F,this.getMembershipBenefits$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(mt.lQ),(0,s.n)(({classificationId:L})=>this.service.getDiscountPercentage(L).pipe((0,d.T)(ft=>(0,mt.kC)({discountPercentage:ft})),(0,h.W)(ft=>[(0,mt.MN)()])))))}static{this.\u0275fac=function(F){return new(F||Ft)(M.KVO(t.En),M.KVO(st.n))}}static{this.\u0275prov=M.jDH({token:Ft,factory:Ft.\u0275fac})}}return Ft})();var l=e(88141),$=e(38769),Z=e(21626);let ot=(()=>{class Ft{constructor(E){this.http=E}getQrCode(E){return this.http.get(`qrCode/${E}`)}static{this.\u0275fac=function(F){return new(F||Ft)(M.KVO(Z.Qq))}}static{this.\u0275prov=M.jDH({token:Ft,factory:Ft.\u0275fac,providedIn:"root"})}}return Ft})(),D=(()=>{class Ft{constructor(E,F,L){this.actions$=E,this.qrCodeService=F,this.ngxLogger=L,this.getQrCode$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)($._Z),(0,l.M)(()=>{this.ngxLogger.log((0,P.Zu)())}),(0,s.n)(ft=>this.qrCodeService.getQrCode(ft.content).pipe((0,d.T)(K=>(this.ngxLogger.log((0,P.zY)()),$.eY({qrCode:K}))),(0,h.W)(K=>(0,m.of)($.eK({error:K}
1)))))))}static{this.\u0275fac=function(F){return new(F||Ft)(M.KVO(t.En),M.KVO(ot),M.KVO(R.so))}}static{this.\u0275prov=M.jDH({token:Ft,factory:Ft.\u0275fac})}}return Ft})();var U=e(23294),gt=e(62233),_t=e(70274),ct=e(55109),pt=e(70980),it=e(63373);let q=(()=>{class Ft{constructor(E){this.httpClient=E}getAccessCardFeatureAvailability(){return this.httpClient.get("accessCard/available")}getActiveAccessCard(E){return this.httpClient.get("accessCard",{params:{isMailForwardingCard:E??!1}})}setActiveAccessCard(E,F,L=null){return this.httpClient.post("accessCard",{accessCardNumber:E,isMailForwardingCard:F??!1,accessCardAction:L})}unassignActiveAccessCard(E,F,L=null){return this.httpClient.request("DELETE","accessCard",{body:{accessCardNumber:E,isMailForwardingCard:F??!1,accessCardAction:L}})}static{this.\u0275fac=function(F){return new(F||Ft)(M.KVO(Z.Qq))}}static{this.\u0275prov=M.jDH({token:Ft,factory:Ft.\u0275fac,providedIn:"root"})}}return Ft})(),nt=(()=>{class Ft{constructor(E,F,L){this.actions$=E,this.store$=F,this.activeAccessCardService=L,this.checkAccessCardFeature$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(it.Zj),function x(Ft,Te,E,F,L){return ft=>{let K,Tt;const St=L?.subscribe(()=>K=void 0);return ft.pipe((0,_t.H)(ae=>K&&K+Ft>Date.now()?E(Tt):Te(ae).pipe((0,ct.o)(1),(0,_t.H)(ne=>(K=Date.now(),Tt=ne,E(ne))),(0,h.W)(ne=>F(ne)))),(0,pt.j)(()=>St?.unsubscribe()))}}(15e3,()=>(0,m.of)(null).pipe((0,l.M)(()=>this.store$.dispatch((0,I.ZF)({messageTag:"ACCESS_CARD.CHECK_FEATURE_ENABLED_FAIL"}))),(0,s.n)(()=>this.activeAccessCardService.getAccessCardFeatureAvailability())),ft=>[it.s8({isActive:ft})],()=>[it.EA()],this.store$.select(gt.Hg).pipe((0,d.T)(ft=>ft?.contactId),(0,U.F)())))),this.checkAccessCardFeatureFailed$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(it.EA),(0,d.T)(()=>(0,I.Ds)({text:"ACCESS_CARD.CHECK_FEATURE_ENABLED_FAIL",notificationType:y._.error}))))}static{this.\u0275fac=function(F){return new(F||Ft)(M.KVO(t.En),M.KVO(k.il),M.KVO(q))}}static{this.\u0275prov=M.jDH({token:Ft,factory:Ft.\u0275fac})}}return Ft})();var xt=e(31397),Dt=e(90695),oe=e(89650),v=e(15079),_e=e(59756);const ue="ACCESS_CARD.GET_ACCESS_CARD_FAIL",bt=[H,Et,V,Pt,D,nt,(()=>{class Ft{constructor(E,F,L,ft){this.actions$=E,this.store$=F,this.activeAccessCardService=L,this.confirmationDialogService=ft,this.getActiveAccessCard$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(Dt.P$),(0,l.M)(()=>this.store$.dispatch((0,I.ZF)({messageTag:ue}))),(0,s.n)(({isMailForwardingCard:K})=>this.activeAccessCardService.getActiveAccessCard(K).pipe((0,d.T)(Tt=>Dt.Sq({accessCard:Tt})),(0,h.W)(()=>[Dt.Gq()]))))),this.getActiveAccessCardFailed$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(Dt.Gq),(0,d.T)(()=>(0,I.Ds)({text:ue,notificationType:y._.error,messageTag:ue})))),this.setActiveAccessCard$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(Dt.jP),(0,C.E)(this.store$.select(gt.Pe)),(0,l.M)(()=>this.store$.dispatch((0,I.ZF)({messageTag:"ACCESS_CARD.SET_ACCESS_CARD"}))),(0,g.p)(([{accessCardNumber:K,isMailForwardingCard:Tt},St])=>this.activeAccessCardService.setActiveAccessCard(K,Tt).pipe((0,d.T)(()=>Dt.QX({accessCardNumber:K})),(0,h.W)(ae=>St&&409===ae.status?this.confirmationDialogService.showModal({title:"ACCESS_CARD.STAFF.REASSIGN_ACCESS_CARD_CONFIRM.TITLE",content:"ACCESS_CARD.STAFF.REASSIGN_ACCESS_CARD_CONFIRM.CONTENT",primaryButton:"ACCESS_CARD.UNASSIGN_ACCESS_CARD_CONFIRM.SUBMIT",secondaryButton:"ACCESS_CARD.UNASSIGN_ACCESS_CARD_CONFIRM.CANCEL",wrapperId:"assignAccessCardConfirm"}).pipe((0,xt.Z)(ne=>(0,m.of)(ne?Dt.y2({accessCardNumber:K,isMailForwardingCard:Tt}):Dt.i2({errorMessage:St?"ACCESS_CARD.STAFF.SET_ACCESS_CARD_FAIL":"ACCESS_CARD.SET_ACCESS_CARD_FAIL"})))):[Dt.i2({errorMessage:St?"ACCESS_CARD.STAFF.SET_ACCESS_CARD_FAIL":"ACCESS_CARD.SET_ACCESS_CARD_FAIL"})]))))),this.setActiveAccessCardForce$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(Dt.y2),(0,l.M)(()=>this.store$.dispatch((0,I.ZF)({messageTag:"ACCESS_CARD.SET_ACCESS_CARD"}))),(0,s.n)(({accessCardNumber:K,isMailForwardingCard:Tt})=>this.activeAccessCardService.setActiveAccessCard(K,Tt,v.V.reassign).pipe((0,d.T)(()=>Dt.QX({accessCardNumber:K})),(0,h.W)(St=>(0,m.of)(Dt.i2(409===St.status?{errorMessage:"ACCESS_CARD.STAFF.REASSIGN_BLOCKED_ACCESS_CARD_FAIL"}:{errorMessage:"ACCESS_CARD.STAFF.SET_ACCESS_CARD_FAIL"}))))))),this.setActiveAccessCardFailed$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(Dt.i2),(0,C.E)(this.store$.select(gt.Pe),this.store$.select(gt.Hg)),(0,d.T)(([K,Tt,St])=>{let ae="https://iwgprod.service-now.com/sp?id=sc_cat_item&sys_id=4ec2056987be8110ed48620c8bbb35ce&sysparm_category=b42c33331b887c10f4eb639ce54bcb2d";return Tt||(ae=St?.homeCentreNumber?`/centre/${St.homeCentreNumber}/manage/contact-centre`:"/help"),(0,I.Ds)({text:K.errorMessage??"ACCESS_CARD.SET_ACCESS_CARD_FAIL",notificationType:y._.error,messageTag:"ACCESS_CARD.SET_ACCESS_CARD",translateParameters:{ConsumerInput_AnchorTagStart:`<a class="iwg-icon-external icon--xxs align-baseline" href="${ae}"${Tt?' target="_blank"':""}>`,ConsumerInput_AnchorTagEnd:"</a>"},isHTMLMessage:!0})}
1))),this.unassignActiveAccessCard$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(Dt.Pj),(0,s.n)(K=>this.confirmationDialogService.showModal({title:K.accessCardAction===v.V.unassign?"ACCESS_CARD.STAFF.UNASSIGN_ACCESS_CARD_CONFIRM.TITLE":"ACCESS_CARD.UNASSIGN_ACCESS_CARD_CONFIRM.TITLE",content:K.accessCardAction===v.V.unassign?"ACCESS_CARD.STAFF.UNASSIGN_ACCESS_CARD_CONFIRM.CONTENT":"ACCESS_CARD.UNASSIGN_ACCESS_CARD_CONFIRM.CONTENT",primaryButton:"ACCESS_CARD.UNASSIGN_ACCESS_CARD_CONFIRM.SUBMIT",secondaryButton:"ACCESS_CARD.UNASSIGN_ACCESS_CARD_CONFIRM.CANCEL",wrapperId:"UnassignAccessCardConfirm"}).pipe((0,_.p)(Tt=>Tt),(0,d.T)(()=>Dt.of({isMailForwardingCard:K.isMailForwardingCard,accessCardAction:K.accessCardAction})))))),this.unassignActiveAccessCardForce$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(Dt.of),(0,l.M)(()=>this.store$.dispatch((0,I.ZF)({messageTag:"ACCESS_CARD.UNASSIGN_ACCESS_CARD"}))),(0,C.E)(this.store$.select(oe.Zo)),(0,s.n)(([K,Tt])=>this.activeAccessCardService.unassignActiveAccessCard(Tt,K.isMailForwardingCard,K.accessCardAction).pipe((0,d.T)(()=>Dt.sf()),(0,h.W)(()=>[Dt.cF()]))))),this.unassignActiveAccessCardFailed$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(Dt.cF),(0,d.T)(()=>(0,I.Ds)({text:"ACCESS_CARD.UNASSIGN_ACCESS_CARD_FAIL",notificationType:y._.error,messageTag:"ACCESS_CARD.UNASSIGN_ACCESS_CARD",translateParameters:{ConsumerInput_AnchorTagStart:'<a class="text-link" href="/help/contact-us">',ConsumerInput_AnchorTagEnd:"</a>"},isHTMLMessage:!0}))))}static{this.\u0275fac=function(F){return new(F||Ft)(M.KVO(t.En),M.KVO(k.il),M.KVO(q),M.KVO(_e.N))}}static{this.\u0275prov=M.jDH({token:Ft,factory:Ft.\u0275fac})}}return Ft})()]},70715:(lt,O,e)=>{e.d(O,{J:()=>n});const n=(0,e(59640).UX)("quickAccess")},15118:(lt,O,e)=>{e.d(O,{Y:()=>ot});var t=e(59640),d=e(55469);const s=(0,t.vy)({pin:null,generatingPin:!1,loading:!1},(0,t.on)(d.tS,D=>({...D,generatingPin:!0}
1)),(0,t.on)(d.z8,(D,{printerPin:U})=>({...D,pin:U.pin,generatingPin:!1})),(0,t.on)(d.SB,D=>({...D,generatingPin:!1})),(0,t.on)(d.Kh,D=>({...D,worldKeyPin:null,generatingPin:!0,loading:!0})),(0,t.on)(d.Yz,(D,{printerPin:U})=>({...D,pin:U.pin,generatingPin:!1,loading:!1})),(0,t.on)(d.PZ,D=>({...D,generatingPin:!1,loading:!1})),(0,t.on)(d.lQ,D=>({...D,generatingPin:!1,pin:null,loading:!1})));var f=e(38571);const g=(0,t.vy)({membershipUsage:null},(0,t.on)(f.nK,D=>D),(0,t.on)(f.t6,(D,{membershipUsage:U})=>({...D,membershipUsage:U})),(0,t.on)(f.fk,D=>({...D,membershipUsage:null})),(0,t.on)(f.GH,D=>({...D,membershipUsage:null})));var T=e(91604),m=e(74529),I=e(97479);const y=(0,t.vy)({classificationId:0,cardType:null,benefits:[],entitlementPerMonthType:null,entitlementsPerMonth:0,discountPercentage:null},(0,t.on)(m.lQ,(D,{classificationId:U,entitlementPerMonthType:gt,entitlementsPerMonth:_t})=>function o(D,U,gt,_t){const ct=T.k.find(pt=>pt.id===U)||T.k.find(pt=>pt.id===I.VM.MemberOfNetwork);return{...D,cardType:ct.cardType,benefits:ct.benefits,classificationId:ct.id,entitlementPerMonthType:gt,entitlementsPerMonth:_t}}(D,U,gt,_t)),(0,t.on)(m.Kr,D=>({...D,cardType:null,benefits:[],classificationId:0,entitlementPerMonthType:null,entitlementsPerMonth:0})),(0,t.on)(m.kC,(D,{discountPercentage:U})=>({...D,discountPercentage:U})));var a=e(96533);const M=(0,t.vy)({isInitialized:!1,entitlements:[],fetchingEntitlements:!1,entitlementsUsage:null},(0,t.on)(a.kK,D=>({...D,fetchingEntitlements:!0})),(0,t.on)(a._L,D=>({...D,fetchingEntitlements:!1})),(0,t.on)(a.nj,(D,{entitlementsUsage:U})=>({...D,entitlementsUsage:U,fetchingEntitlements:!1})),(0,t.on)(a.vX,D=>({...D,fetchingEntitlements:!0})),(0,t.on)(a.x8,(D,{entitlements:U})=>({...D,entitlements:U,fetchingEntitlements:!1,isInitialized:!0})),(0,t.on)(a.U0,D=>({...D,fetchingEntitlements:!1})));var k=e(38769);const J=(0,t.vy)({qrCode:null,loading:!1},(0,t.on)(k._Z,D=>({...D,loading:!0})),(0,t.on)(k.eY,(D,{qrCode:U})=>({...D,qrCode:U,loading:!1})),(0,t.on)(k.cP,D=>({...D,qrCode:null})));var st=e(90695),Et=e(15079);const dt=(0,t.vy)({isLoading:!1,isLoaded:!1,isSaving:!1,accessCard:null},(0,t.on)(st.P$,D=>({...D,isLoading:!0,isLoaded:!1})),(0,t.on)(st.Sq,(D,{accessCard:U})=>({...D,isLoading:!1,isLoaded:!0,accessCard:U})),(0,t.on)(st.sf,D=>({...D,isSaving:!1,accessCard:{accessCardNumber:null,status:Et.l.pendingDeactivation,oldAccessCardNumber:D.accessCard?.accessCardNumber}})),(0,t.on)(st.Gq,D=>({...D,isLoading:!1,isLoaded:!1})),(0,t.on)(st.i2,st.cF,D=>({...D,isSaving:!1})),(0,t.on)(st.jP,st.of,D=>({...D,isSaving:!0})),(0,t.on)(st.QX,(D,{accessCardNumber:U})=>({...D,isSaving:!1,accessCard:{accessCardNumber:U,status:Et.l.pendingActivation,oldAccessCardNumber:null}})));var V=e(63373);const mt=(0,t.vy)({isLoaded:!1,isActive:null},(0,t.on)(V.Zj,D=>({...D,isLoaded:!1})),(0,t.on)(V.s8,(D,{isActive:U})=>({...D,isLoaded:!0,isActive:U})),(0,t.on)(V.EA,D=>({...D,isLoaded:!0,isActive:!1})));var Pt=e(12087);const $=(0,t.vy)({partnerOffers:[],selectedCountry:null},(0,t.on)(Pt.rY,(D,{partnerOffers:U})=>({...D,partnerOffers:U})),(0,t.on)(Pt.n2,D=>({...D,partnerOffers:[]})),(0,t.on)(Pt.IH,(D,{selectedCountry:U})=>({...D,selectedCountry:U})),(0,t.on)(Pt.ns,D=>({...D,selectedCountry:null}))),ot={printerPin:s,membershipUsage:function h(D,U){return g(D,U)},benefitsPopup:function P(D,U){return y(D,U)},virtualOfficeEntitlements:function G(D,U){return M(D,U)},qrCode:function H(D,U){return J(D,U)},activeAccessCard:dt,accessCardFeature:mt,benefits:function Z(D,U){return $(D,U)}}},96533:(lt,O,e)=>{e.d(O,{U0:()=>s,_L:()=>g,kK:()=>_,nj:()=>f,vX:()=>n,x8:()=>d});var t=e(59640);const n=(0,t.VP)("[Virtual Office Entitlements] Get Virtual Office Entitlements Force"),d=(0,t.VP)("[Virtual Office Entitlements] Get Virtual Office Entitlements Success",(0,t.xk)()),s=(0,t.VP)("[Virtual Office Entitlements] Get Virtual Office Entitlements Failure"),_=(0,t.VP)("[Virtual Office Entitlements] Get Virtual Office Entitlements Usage"),f=(0,t.VP)("[Virtual Office Entitlements] Get Virtual Office Entitlements Usage Success",(0,t.xk)()),g=(0,t.VP)("[Virtual Office Entitlements] Get Virtual Office Entitlements Usage Failure")},59624:(lt,O,e)=>{e.r(O),e.d(O,{ReferralModule:()=>Kt});var t=e(60177),n=e(4705),d=e(89417),s=e(21413),_=e(5964),f=e(44668),g=e(84572),h=e(96354),C=e(23294),T=e(96697),m=e(56977),I=e(70152),y=e(3950),o=e(3133),P=e(29264),N=e(59640);const a=(0,N.UX)("referral"),M=(0,N.Mz)(a,B=>B.referralConfiguration),G=(0,N.Mz)(a,B=>B.isLoading),k=(0,N.Mz)(a,B=>B.shouldClearForm);var R=e(12851),J=e(69671),H=e(74967),et=e(39086),st=e(41668),Et=e(52052),dt=e(65761),Nt=e(89103),V=e(54438),mt=e(99375),Pt=e(68018),l=e(12262),$=e(69924),Z=e(39642),ot=e(35155),D=e(43896),U=e(69594),gt=e(69188),_t=e(50004),ct=e(76864);function pt(B,W){1&B&&V.nrm(0,"iwg-breadcrumbs")}function x(B,W){1&B&&(V.j41(0,"span",6),V.EFF(1,"REFERRAL.TITLE"),V.k0s())}function it(B,W){1&B&&(V.qex(0),V.j41(1,"div",7)(2,"div",8)(3,"span",9),V.EFF(4,"REFERRAL.FEATURE_NOT_AVAILABLE"),V.k0s()()(),V.bVm())}function q(B,W){if(1&B){const A=V.RV6();V.j41(0,"div",10)(1,"div",7)(2,"div",11)(3,"span",12),V.EFF(4),V.k0s()(),V.j41(5,"div",13)(6,"span",9),V.EFF(7,"REFERRAL.MORE_PEOPLE_JOIN"),V.k0s()(),V.j41(8,"div",14)(9,"div",15),V.nrm(10,"iwg-search-key-features",16),V.
1k0s()(),V.j41(11,"div",17)(12,"span",18),V.EFF(13,"REFERRAL.DETAILS_FOR_PERSON"),V.k0s()(),V.j41(14,"form",19),V.bIt("ngSubmit",function(){V.eBV(A);const ut=V.XpG();return V.Njj(ut.onSubmit())}),V.j41(15,"div",20)(16,"div",21),V.nrm(17,"iwg-text-input-wrapper",22),V.k0s(),V.j41(18,"div",23),V.nrm(19,"iwg-text-input-wrapper",24),V.k0s()(),V.j41(20,"div",20)(21,"div",15),V.nrm(22,"iwg-text-input-wrapper",25),V.k0s()(),V.j41(23,"div",20)(24,"div",15),V.nrm(25,"iwg-phone-number",26),V.k0s()(),V.j41(26,"div",20)(27,"div",15)(28,"iwg-centre-search",27),V.nI1(29,"async"),V.bIt("focusout",function(){V.eBV(A);const ut=V.XpG();return V.Njj(ut.setLocationValidator())}),V.k0s()()(),V.j41(30,"div",20)(31,"div",15)(32,"iwg-checkbox",28),V.nrm(33,"span",29),V.k0s()()(),V.j41(34,"div",30)(35,"iwg-button",31)(36,"span",32),V.EFF(37,"REFERRAL.SUBMIT"),V.k0s()()()()()()}if(2&B){const A=V.XpG();V.R7$(4),V.JRh(A.getHeaderWording()),V.R7$(6),V.Y8G("defaultProductFeatures",A.defaultProductFeatures),V.R7$(4),V.Y8G("formGroup",A.referContactForm),V.R7$(14),V.Y8G("value",A.searchInput)("centreSuggestion",V.bMT(29,9,A.bookingsSuggestions$))("hasIcon",!0)("hideSearchButton",!0),V.R7$(5),V.Y8G("innerHTML",A.getTermsConditions(),V.npT),V.R7$(2),V.Y8G("disabled",A.isButtonDisabled())}}const nt="REFERRAL.REQUIRED";let xt=(()=>{class B extends J.f{constructor(A,w,ut,Wt){super(),this.store$=A,this.uiConfig=w,this.fb=ut,this.translateService=Wt,this.emailRegex=this.uiConfig.get("emailRegex"),this.unsubscribe$=new s.B,this.selectIsoCode=null,this.isReferralDisabled=!1,this.isLoading$=this.store$.select(G),this.bookingsSuggestions$=this.store$.select(H.v),this.searchInput=""}ngOnInit(){this.initializeForm(),this.setupBreadcrumbs(),this.store$.dispatch((0,P.G8)()),this.store$.dispatch((0,et.lE)()),this.store$.dispatch((0,st.d5)());const A=this.store$.select(M).pipe((0,_.p)(Boolean),(0,f.t)(1)),w=(0,g.z)([this.store$.select(dt.sZ),this.store$.select(Et.eH)]).pipe((0,h.T)(([ut,Wt])=>ut?.billingAddress?.countryIsoCode??Wt?.countryIsoCode??null),(0,C.F)());A.pipe((0,T.s)(1),(0,m.Q)(this.unsubscribe$)).subscribe(ut=>{this.referralReward=`${ut.referralReward.amount} ${ut.referralReward.currency.id}`,this.defaultProductFeatures=[{icon:"iwg-icon-multiple-actions-refresh",text:"REFERRAL.TITLE"},{icon:"iwg-icon-check-payment-give",text:"REFERRAL.CONTACT_PURCHASE"},{icon:"iwg-icon-accounting-bills",text:this.translateService.instant("REFERRAL.GET_UP_TO",{ConsumerInput_RewardPrice:this.referralReward})}]}),(0,g.z)([A,w]).pipe((0,m.Q)(this.unsubscribe$)).subscribe(([ut,Wt])=>{this.configuration=ut,this.selectIsoCode=Wt,this.evaluateDisabled()}),this.store$.select(k).pipe((0,_.p)(ut=>ut),(0,m.Q)(this.unsubscribe$)).subscribe(()=>this.clearForm()),this.referContactForm.get("centre").valueChanges.pipe((0,m.Q)(this.unsubscribe$)).subscribe(ut=>this.searchInput=ut)}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}onSubmit(){const{firstName:A,lastName:w,email:ut,phoneNumber:Wt,centre:ht,terms:pe}=this.referContactForm.value;this.store$.dispatch((0,P.bO)({request:{customer:{firstName:A,lastName:w,email:ut,phoneNumber:Wt?.telephoneNumber},location:ht.centreName,agreedToTermsAndConditions:pe}}))}getTermsConditions(){return this.translateService.instant("REFERRAL.TERMS_CONDITIONS",{ConsumerInput_LinkBWTerms:`<a class='text-link' href="${this.configuration?.termsAndConditionsUrl}" target="_blank" rel="noopener">`,ConsumerInput_LinkEnd:"</a>"})}getHeaderWording(){return this.translateService.instant("REFERRAL.MONEY_FOR_REFERRAL",{ConsumerInput_RewardPrice:this.referralReward})}canDeactivateModal(){return this.referContactForm.dirty?{key:"EXIT_MODAL.TITLE",subtitle:"EXIT_MODAL.SUBTITLE"}:null}initializeForm(){this.referContactForm=this.fb.group({firstName:(0,o.Ny)([null,R.m],{required:nt}),lastName:(0,o.Ny)([null,R.m],{required:nt}),email:(0,o.Ny)([null,[d.k0.required,d.k0.pattern(this.emailRegex)]],{required:nt,pattern:"REFERRAL.EMAIL_ERROR_FORMAT"}),phoneNumber:(0,o.Ny)(new d.hs(null,[d.k0.required]),{required:nt}),centre:(0,o.Ny)([null,[d.k0.required]],{required:nt}),terms:(0,o.Ny)([!1,d.k0.requiredTrue],{})})}
1isButtonDisabled(){return this.referContactForm.invalid||this.referContactForm.pending||0===this.referContactForm.get("centre").value?.centreName?.trim().length}setLocationValidator(){const A=this.referContactForm.get("centre");A.setValidators([d.k0.required,Nt.w]),A.updateValueAndValidity(),this.referContactForm.get("centre").markAsTouched()}setupBreadcrumbs(){this.store$.dispatch((0,y.Zz)({breadcrumbs:[{label:"MENU.OPTIONS.ACCOUNT",url:"/account"}]}))}clearForm(){this.referContactForm.reset(),this.referContactForm.statusChanges.pipe((0,T.s)(Object.keys(this.referContactForm.controls).length),(0,I.B)(0),(0,m.Q)(this.unsubscribe$)).subscribe(()=>{this.referContactForm.markAsPristine(),this.referContactForm.markAsUntouched()}),this.store$.dispatch((0,P.q$)({shouldClearForm:!1}))}evaluateDisabled(){this.configuration&&this.selectIsoCode&&(this.isReferralDisabled=(this.configuration.disabledCountries??[]).includes(this.selectIsoCode))}static{this.\u0275fac=function(w){return new(w||B)(V.rXU(N.il),V.rXU(mt.K),V.rXU(d.ze),V.rXU(Pt.c$))}}static{this.\u0275cmp=V.VBU({type:B,selectors:[["iwg-submit-new-referral"]],features:[V.Vt3],decls:10,vars:6,consts:[["headerBreadcrumbs",""],["headerTitle",""],["referralEnabledTpl",""],[1,"bottom-border-desktop",3,"condensed"],[3,"loading"],[4,"ngIf","ngIfElse"],["translate","",1,"text-margins"],[1,"container"],[1,"text-margins","m--t-4"],["translate","",1,"iwg-body1"],[1,"referral-form"],[1,"m--b-3","text-margins"],[1,"iwg-page-title"],[1,"text-margins"],[1,"row","m--b-4"],[1,"col-xs-12"],[3,"defaultProductFeatures"],[1,"m--b-5","text-margins"],["translate","",1,"iwg-h6","font-medium"],[1,"referral-form-wrapper",3,"ngSubmit","formGroup"],[1,"row"],[1,"col-md-6","col-xs-12"],["formControlName","firstName","labelText","REFERRAL.FIRST_NAME","wrapperId","Referral_FirstName"],[1,"col-md-6","col-xs-12","last-name"],["formControlName","lastName","labelText","REFERRAL.SURNAME","wrapperId","Referral_Surname"],["formControlName","email","labelText","REFERRAL.EMAIL","iconTooltip","REFERRAL.EMAIL_TOOLTIP","wrapperId","Referral_Email"],["formControlName","phoneNumber","labelText","REFERRAL.PHONE_NUMBER","wrapperId","Referral_PhoneNumber","iconTooltip","REFERRAL.PHONE_NUMBER_TOOLTIP"],["formControlName","centre","labelText","REFERRAL.PREFERRED_LOCATION","labelTooltip","REFERRAL.PREFERRED_LOCATION_TOOLTIP","wrapperId","Referral_PreferredLocation",3,"focusout","value","centreSuggestion","hasIcon","hideSearchButton"],["id","Referral_TermsAndConditions","formControlName","terms"],[3,"innerHTML"],[1,"button-wrapper","m--b-8"],["wrapperId","Referral_Submit",1,"referral-button",3,"disabled"],["translate",""]],template:function(w,ut){if(1&w&&(V.j41(0,"iwg-page-header",3),V.DNE(1,pt,1,0,"ng-template",null,0,V.C5r)(3,x,2,0,"ng-template",null,1,V.C5r),V.k0s(),V.j41(5,"iwg-loader",4),V.nI1(6,"async"),V.DNE(7,it,5,0,"ng-container",5)(8,q,38,11,"ng-template",null,2,V.C5r),V.k0s()),2&w){const Wt=V.sdS(9);V.Y8G("condensed",!0),V.R7$(5),V.Y8G("loading",V.bMT(6,4,ut.isLoading$)),V.R7$(2),V.Y8G("ngIf",ut.isReferralDisabled)("ngIfElse",Wt)}},dependencies:[t.bT,Pt.Mm,l.Q,$.y,Z.C,d.qT,d.BC,d.cb,d.j4,d.JD,ot.m,D.P,U.D,gt.ud,_t.P,ct.V,t.Jj],styles:[".referral-form[_ngcontent-%COMP%]{padding-top:4.5rem;max-width:80rem;margin-right:auto;margin-left:auto}@media (max-width: 1023.98px){.referral-form[_ngcontent-%COMP%]{padding-top:3rem;margin-right:auto;margin-left:auto}}.referral-form-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--spacing-med, var(--scale-600, 3.2rem))}.button-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}@media (max-width: 1023.98px){.button-wrapper[_ngcontent-%COMP%]{display:block;margin:.4rem}}@media (max-width: 1023.98px){.last-name[_ngcontent-%COMP%]{padding-top:2rem}}.referral-button[_ngcontent-%COMP%]{padding:0}@media (max-width: 1023.98px){.referral-button[_ngcontent-%COMP%]{width:100%}}@media (max-width: 1023.98px){.text-margins[_ngcontent-%COMP%]{margin-left:.5rem;margin-right:0}[dir=rtl]   [_nghost-%COMP%]   .text-margins[_ngcontent-%COMP%]{margin-left:0;margin-right:.5rem}[dir=rtl][_ngcontent-%COMP%]   .text-margins[_ngcontent-%COMP%]{margin-left:0;margin-right:.5rem}[dir=rtl][_nghost-%COMP%]   .text-margins[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .text-margins[_ngcontent-%COMP%]{margin-left:0;margin-right:.5rem}}"]})}}return B})();var Dt=e(58790),oe=e(26592),v=e(24153),_e=e(93826);const bt="REFERRAL.TITLE",Ft=[{path:"",component:(()=>{class B{constructor(A){this.store$=A}
1ngOnInit(){this.store$.dispatch((0,y.Zz)({breadcrumbs:[{label:"MENU.OPTIONS.HOME",url:"/home"}]}))}static{this.\u0275fac=function(w){return new(w||B)(V.rXU(N.il))}}static{this.\u0275cmp=V.VBU({type:B,selectors:[["iwg-referral-view"]],decls:1,vars:0,template:function(w,ut){1&w&&V.nrm(0,"router-outlet")},dependencies:[n.n3],encapsulation:2})}}return B})(),data:{breadcrumb:bt},children:[{path:"",component:xt,canActivate:[oe.a],canDeactivate:[Dt.y],data:{permissions:{only:v.e.CanAccessAccountMenu,redirectTo:"referral/no-access"},breadcrumb:bt,analyticPageName:"Submit New Referral"}},(0,_e.X)("referral",v.e.CanAccessAccountMenu,bt,{pageHeader:bt})]}];let Te=(()=>{class B{static{this.\u0275fac=function(w){return new(w||B)}}static{this.\u0275mod=V.$C({type:B})}static{this.\u0275inj=V.G2t({imports:[n.iI.forChild(Ft),n.iI]})}}return B})();var E=e(66637),F=e(87127),L=e(77339),ft=e(25558),K=e(99437),Tt=e(7673),St=e(98413),ae=e(38207),ne=e(21626);let de=(()=>{class B{constructor(A){this.http=A}getReferralConfiguration(){return this.http.get("referrals/configuration")}submitNewReferral(A){return this.http.post("referrals",A)}static{this.\u0275fac=function(w){return new(w||B)(V.KVO(ne.Qq))}}static{this.\u0275prov=V.jDH({token:B,factory:B.\u0275fac,providedIn:"root"})}}return B})(),vt=(()=>{class B{constructor(A,w){this.actions$=A,this.referralService=w,this.getReferralConfiguration$=(0,L.EH)(()=>this.actions$.pipe((0,L.gp)(P.G8),(0,ft.n)(ut=>this.referralService.getReferralConfiguration()),(0,h.T)(ut=>P.JL({configuration:ut})),(0,K.W)(ut=>(0,Tt.of)(P.qH())))),this.saveReferredContact$=(0,L.EH)(()=>this.actions$.pipe((0,L.gp)(P.bO),(0,ft.n)(ut=>this.referralService.submitNewReferral(ut.request)),(0,h.T)(ut=>P.W7()),(0,K.W)(ut=>(0,Tt.of)(P.qH())))),this.saveReferredContactSuccess$=(0,L.EH)(()=>this.actions$.pipe((0,L.gp)(P.W7),(0,h.T)(()=>(0,St.Ds)({notificationType:ae._.success,text:"REFERRAL.SUBMIT_SUCCESS"})))),this.referralFailure$=(0,L.EH)(()=>this.actions$.pipe((0,L.gp)(P.qH),(0,h.T)(()=>(0,St.Ds)({notificationType:ae._.error,text:"REFERRAL.ERROR"}))))}static{this.\u0275fac=function(w){return new(w||B)(V.KVO(L.En),V.KVO(de))}}static{this.\u0275prov=V.jDH({token:B,factory:B.\u0275fac})}}return B})();var Jt=e(75726),Gt=e(44337),wt=e(6732),ee=e(86049),me=e(96518),Me=e(99252),ye=e(31476),be=e(46351),ve=e(71660),Ct=e(742);let Kt=(()=>{class B{static{this.\u0275fac=function(w){return new(w||B)}}static{this.\u0275mod=V.$C({type:B})}static{this.\u0275inj=V.G2t({providers:[Ct.K,be.Y],imports:[t.MD,N.md.forFeature("referral",Jt.i),L.Vm.forFeature(vt),Te,Pt.h,ve.O,wt.R,$.y,ee.v,me.s,Z.C,Me.D,ye.P,d.X1.withConfig({callSetDisabledState:"whenDisabledForLegacyCode"}),D.P,E.U,F.W,Gt.r]})}}return B})()},79916:(lt,O,e)=>{e.d(O,{q:()=>U});var t=e(54438),n=e(59640),d=e(21413),s=e(84572),_=e(96354),f=e(56977),g=e(96697),h=e(5964),C=e(27337),T=e(86734),m=function(gt){return gt[gt.MainHotline=7e3]="MainHotline",gt}(m||{}),I=e(18224),y=e(59032),o=e(11877),P=e(25473),N=e(5656),a=e(60665),M=e(62253),G=e(69924),k=e(25872),R=e(19662),J=e(4705),H=e(39178),et=e(76864),st=e(60177),Et=e(68018),dt=e(12262),Nt=e(53122),V=e(96518),mt=e(40661);const Pt=gt=>({CustomerInput_SelectedCountryName:gt}),l=(gt,_t)=>({CustomerInput_SelectedCountryName:gt,ConsumerInput_CentrePhoneNumber:_t});function $(gt,_t){if(1&gt&&(t.EFF(0),t.nI1(1,"translate"),t.nI1(2,"translate")),2&gt){const ct=t.XpG(2);t.SpI(" ",ct.isMembershipProduct()?t.bMT(1,1,"SEARCH.MAKE_ENQUIRY.MEMBERSHIP_TITLE"):t.bMT(2,3,"SEARCH.MAKE_ENQUIRY.TITLE")," ")}}function Z(gt,_t){if(1&gt&&(t.j41(0,"div",12),t.EFF(1),t.nI1(2,"translate"),t.k0s(),t.j41(3,"div",13),t.EFF(4),t.nI1(5,"async"),t.nI1(6,"translate"),t.k0s()),2&gt){let ct;const pt=t.XpG().ngIf,x=t.XpG(2);t.R7$(),t.SpI(" ",t.i5U(2,2,"SEARCH.MAKE_ENQUIRY.SUBTITLE_1",t.eq3(10,Pt,pt))," "),t.R7$(3),t.SpI(" ",t.i5U(6,7,"SEARCH.MAKE_ENQUIRY.SUBTITLE_2",t.l_i(12,l,pt,null==(ct=t.bMT(5,5,x.formattedSalePhoneNumber$))?null:ct.formattedNumber))," ")}}function ot(gt,_t){1&gt&&t.DNE(0,Z,7,15,"ng-template",null,1,t.C5r)}function D(gt,_t){if(1&gt){const ct=t.RV6();t.j41(0,"iwg-modal-flyout",3),t.bIt("closeModal",function(){t.eBV(ct);const x=t.XpG();return t.Njj(x.onClose())}),t.j41(1,"iwg-loader",4),t.nI1(2,"async"),t.j41(3,"iwg-page-header",5),t.DNE(4,$,3,5,"ng-template",null,0,t.C5r)(6,ot,2,0,null,6),t.nI1(7,"async"),t.k0s(),t.j41(8,"div",7)(9,"iwg-button",8),t.bIt("click",function(){t.eBV(ct);const x=t.XpG();return t.Njj(x.onMakeEnquiryClick())})("keydown.enter",function(){t.eBV(ct);const x=t.XpG();return t.Njj(x.onMakeEnquiryClick())}),t.j41(10,"span",9),t.EFF(11),t.k0s()()(),t.j41(12,"div",10)(13,"span",11),t.nI1(14,"translate"),t.bIt("linkClick",function(x){t.eBV(ct);const it=t.XpG();return t.Njj(it.onLinkClick(x))}),t.k0s()()()()}if(2&gt){const ct=t.XpG();t.Y8G("isFlyoutOverFlyout",ct.flyoutOverFlyout),t.R7$(),t.Y8G("loading",t.bMT(2,6,ct.isLoading$)),t.R7$(2),t.Y8G("pageSizeType",ct.pageSizeType),t.R7$(3),t.Y8G("ngIf",t.bMT(7,8,ct.selectedCountryName$)),t.R7$(5),t.JRh(ct.isMembershipProduct()?"SEARCH.MAKE_ENQUIRY.MEMBERSHIP_BUTTON":"SEARCH.MAKE_ENQUIRY.BUTTON"),t.R7$(2),t.Y8G("innerHTML",t.i5U(14,10,"SEARCH.MAKE_ENQUIRY.CONTENT",ct.translateParams),t.npT)}}let U=(()=>{class gt{constructor(ct,pt,x,it){this.store$=ct,this.router=pt,this.activatedRoute=x,this.ngxLogger=it,this.unsubscribe$=new d.B,this.pageSizeType=G.l.Flyout,this.open=!1,this.flyoutOverFlyout=!1,this.productType=I.c.VirtualOffice,this.openChange=new t.bkB,this.formattedSalePhoneNumber$=this.store$.select(o.cR).pipe((0,h.p)(q=>!!q)),this.translateParams=null,this.phoneNumberLoading$=this.store$.select(o.Wf),this.isLoading$=(0,s.z)([this.store$.select(k.Di),this.store$.select(o.Wf)]).pipe((0,_.T)(([q,nt])=>q||nt))}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}ngOnInit(){(0,s.z)([this.store$.select(N.Oy),this.store$.select(N.jV)]).pipe((0,f.Q)(this.unsubscribe$)).subscribe(([ct,pt])=>{this.provisionalEnquiryData={centreNumber:this.isMembershipProduct()?pt.productAvailability?.centreNumber:ct.centre.centreNumber,countryIsoCode:this.isMembershipProduct()?pt.countryIsoCode:ct.centre.address.countryIsoCode}
1,this.store$.dispatch((0,y.DA)({countryIsoCode:this.provisionalEnquiryData.countryIsoCode,purpose:m.MainHotline})),this.selectedCountryName$=this.store$.pipe((0,n.Lt)((0,C.LD)(this.provisionalEnquiryData.countryIsoCode)),(0,h.p)(x=>!!x),(0,_.T)(x=>x.name),(0,g.s)(1)),this.translateParams={SelectCountry_LinkStart:'<a class="text-link reselect-product-link">',SelectCountry_LinkEnd:"</a>"}}),this.isMembershipProduct()&&this.ngxLogger.log((0,M.HL)(this.provisionalEnquiryData?.countryIsoCode))}onClose(){const ct=this.activatedRoute?.snapshot?.data?.closeEnquiryUrl;ct?this.router.navigate([ct(this.provisionalEnquiryData.centreNumber)]):this.openChange.emit(!1)}onMakeEnquiryClick(){this.store$.dispatch((0,P.Q9)({isLoading:!0})),this.isMembershipProduct()?this.store$.dispatch((0,T.yE)({isMembershipEnquiry:!0})):this.store$.dispatch((0,T.DL)({centreNumber:this.provisionalEnquiryData.centreNumber,productTypeId:I.c.VirtualOffice}))}isMembershipProduct(){return this.productType===I.c.Membership}onLinkClick(ct){ct.className?.includes("reselect-product-link")&&(this.open=!1,this.router.url.includes("change-country")?(this.store$.select(R.cL).pipe((0,h.p)(pt=>!!pt),(0,g.s)(1),(0,f.Q)(this.unsubscribe$)).subscribe(pt=>{this.store$.dispatch(a.updateProductAvailability({centreNumber:pt.productAvailability?.centreNumber,isProvisional:pt.productAvailability?.isProvisional,countryIsoCode:pt.countryIsoCode}))}),this.router.navigate(["../"],{relativeTo:this.activatedRoute}).then(()=>{this.store$.dispatch((0,T.dN)({productType:this.productType}))})):this.router.navigateByUrl("/").then(()=>this.store$.dispatch((0,T.sx)({productTypeId:this.productType}))))}static{this.\u0275fac=function(pt){return new(pt||gt)(t.rXU(n.il),t.rXU(J.Ix),t.rXU(J.nX),t.rXU(H.so))}}static{this.\u0275cmp=t.VBU({type:gt,selectors:[["iwg-provisional-enquiry-flyout"]],inputs:{open:"open",flyoutOverFlyout:"flyoutOverFlyout",productType:"productType"},outputs:{openChange:"openChange"},decls:1,vars:1,consts:[["headerTitle",""],["headerSubTitle",""],["open","open",3,"isFlyoutOverFlyout","closeModal",4,"iwgModal"],["open","open",3,"closeModal","isFlyoutOverFlyout"],["message","COMMON.PROCESSING",3,"loading"],[1,"no-container","smaller-padding-bottom",3,"pageSizeType"],[4,"ngIf"],[1,"make-enquiry__button"],["wrapperId","Make_Enquiry_Button",1,"button_wrapper",3,"click","keydown.enter"],["translate",""],[1,"m--t-8","iwg-body1"],["iwgLinkHandler","","id","Provisional_enquiry_content",3,"linkClick","innerHTML"],["id","Provisional_enquiry_subtitle1"],["id","Provisional_enquiry_subtitle2",1,"m--t-5"]],template:function(pt,x){1&pt&&t.DNE(0,D,15,13,"iwg-modal-flyout",2),2&pt&&t.Y8G("iwgModal",!0)},dependencies:[et.V,st.bT,Et.Mm,dt.Q,G.y,Nt.h,V.s,mt.u,st.Jj,Et.D9],styles:[".make-enquiry__button[_ngcontent-%COMP%]{display:flex;justify-content:flex-start}@media (max-width: 1023.98px){.make-enquiry__button[_ngcontent-%COMP%]{display:block;width:100%}}@media (max-width: 1023.98px){.make-enquiry__button[_ngcontent-%COMP%]   .button_wrapper[_ngcontent-%COMP%]{display:block}}"]})}}return gt})()},76959:(lt,O,e)=>{e.d(O,{j:()=>Ke});var t=e(89417),n=e(21413),d=e(84412),s=e(84572),_=e(7673),f=e(96354),g=e(56977),h=e(5964),C=e(99172),T=e(96697),m=e(23294),I=e(25558),y=e(44668),o=e(88141),P=e(65245),N=e(13946),a=e(18224),M=e(57308),G=e(38207),k=e(81926),R=e(3133),J=e(86734),H=e(92177),et=e(73636),st=e(22177),Et=e(82627),dt=e(41422),Nt=e(60665),V=e(5656),mt=e(43318),Pt=e(98413),l=e(16487),$=e(69924),Z=e(39086),ot=e(74967),D=e(62253),U=e(34905),gt=e(62233),_t=e(65761),ct=e(21717),pt=e(89103),x=e(60336),it=e(54545),q=e(25872),nt=e(38612),xt=e(19662),Dt=e(59797),oe=e(57928),v=e(54438),_e=e(59640),ue=e(742),re=e(39178),bt=e(57801),Ft=e(4705),Te=e(58324),E=e(76864),F=e(43896),L=e(60177),ft=e(68018),K=e(12262),Tt=e(71660),St=e(97644),ae=e(53122),ne=e(96518),de=e(31476);let vt=(()=>{class Bt{constructor(){this.wrapperId="",this.leadingIconClass="",this.text=""}static{this.\u0275fac=function(X){return new(X||Bt)}}static{this.\u0275cmp=v.VBU({type:Bt,selectors:[["iwg-action-card"]],inputs:{wrapperId:"wrapperId",leadingIconClass:"leadingIconClass",text:"text"},standalone:!0,features:[v.aNF],decls:5,vars:5,consts:[[1,"action-card",3,"id"],[1,"action-card__leading-icon"],["aria-hidden","true"],["translate","",1,"iwg-label3"]],template:function(X,tt){1&X&&(v.j41(0,"div",0)(1,"div",1),v.nrm(2,"i",2),v.k0s(),v.j41(3,"div",3),v.EFF(4),v.k0s()()),2&X&&
1(v.Y8G("id",tt.wrapperId),v.R7$(2),v.ZvI("action-card__leading-icon ",tt.leadingIconClass,""),v.R7$(2),v.JRh(tt.text))},styles:[".action-card[_ngcontent-%COMP%]{display:flex;gap:var(--spacing-xs, var(--scale-400, 1.6rem));padding:var(--spacing-xs, var(--scale-400, 1.6rem));align-items:center;width:100%;box-shadow:var(--box-shadow, 0 19px 39px 0 rgba(0, 0, 0, .05));border:1px solid var(--color-border-search-divider, var(--brand-neutral-100, #E6E6E9));border-radius:var(--radius-sml, var(--scale-200, .8rem))}.action-card__leading-icon[_ngcontent-%COMP%]{font-size:var(--icon-font-size-xs, var(--size-xs, var(--scale-500, 2.4rem)));color:var(--color-bg-accent, var(--brand-primary-500, #E30613))}"]})}}return Bt})();var Jt=e(27566),Gt=e(80492),wt=e(4244),ee=e(69188),me=e(79916);function Me(Bt,he){if(1&Bt&&(v.EFF(0),v.nI1(1,"translate")),2&Bt){const b=v.XpG(2);v.SpI(" ",v.bMT(1,1,b.customTitle||b.searchTitle)," ")}}function ye(Bt,he){if(1&Bt&&(v.EFF(0),v.nI1(1,"translate")),2&Bt){const b=v.XpG(3);v.SpI(" ",v.bMT(1,1,b.customDescription||b.customTitle?b.customDescription:b.searchDescription)," ")}}function be(Bt,he){1&Bt&&v.DNE(0,ye,2,3,"ng-template",null,3,v.C5r)}function ve(Bt,he){if(1&Bt){const b=v.RV6();v.j41(0,"iwg-centre-search",22),v.nI1(1,"async"),v.nI1(2,"async"),v.bIt("loadingLocation",function(tt){v.eBV(b);const Lt=v.XpG(2);return v.Njj(Lt.onLoadingLocation(tt))})("valueChange",function(tt){v.eBV(b);const Lt=v.XpG(2);return v.Njj(Lt.inputSelectionChange(tt))})("focusout",function(){v.eBV(b);const tt=v.XpG(2);return v.Njj(tt.setLocationValidator())}),v.k0s()}if(2&Bt){const b=v.XpG(2);v.Y8G("centreSuggestion",v.bMT(1,6,b.bookingsSuggestions$))("value",b.searchInput)("disabled",b.centreSpecific)("disableSearchButton",b.isLongTermProduct()&&(!b.isLocationValid()||v.bMT(2,8,b.loading$)))("readonly",!!b.booking)("disableSearchButton",!b.isLocationValid())}}function Ct(Bt,he){if(1&Bt&&(v.j41(0,"div",24),v.nrm(1,"iwg-flag",25),v.EFF(2),v.k0s()),2&Bt){const b=v.XpG().$implicit;v.R7$(),v.Y8G("countryIsoCode3",b.isoCodeThreeLetter),v.R7$(),v.SpI(" ",b.name," ")}}function Kt(Bt,he){1&Bt&&v.DNE(0,Ct,3,2,"div",24),2&Bt&&v.vxM(he.$implicit?0:-1)}function B(Bt,he){if(1&Bt&&(v.j41(0,"iwg-dropdown",23),v.nI1(1,"async"),v.DNE(2,Kt,1,1,"ng-template",null,4,v.C5r),v.k0s()),2&Bt){const b=v.XpG(2);v.Y8G("isSearchable",!0)("searchType",b.dropdownIncludesSearchType)("options",v.bMT(1,4,b.countries$))("inputIcon",b.currentLocationFlagIcon())}}function W(Bt,he){if(1&Bt&&(v.j41(0,"iwg-button",16),v.nI1(1,"async"),v.EFF(2),v.k0s()),2&Bt){const b=v.XpG(2);v.Y8G("displayType",b.DisplayType.primary)("disabled",!b.isLocationValid()||v.bMT(1,3,b.loading$)),v.R7$(2),v.SpI(" ","SEARCH.FORM.CONTINUE"," ")}}function A(Bt,he){if(1&Bt&&(v.nrm(0,"iwg-action-card",17),v.nI1(1,"translate")),2&Bt){const b=v.XpG(2);v.Y8G("text",v.bMT(1,2,b.customDescription||b.customTitle?b.customDescription:b.searchDescription))("leadingIconClass","iwg-icon-globe")}}function w(Bt,he){1&Bt&&(v.j41(0,"div",18),v.nrm(1,"iwg-divider"),v.k0s())}function ut(Bt,he){if(1&Bt&&(v.j41(0,"div",26)(1,"div",27),v.nrm(2,"iwg-loader",28),v.k0s()()),2&Bt){const b=v.XpG(2);v.R7$(2),v.Y8G("loading",b.loadingLocation)}}function Wt(Bt,he){if(1&Bt&&(v.j41(0,"div",29),v.nrm(1,"iwg-counter-wrapper",39),v.nI1(2,"translate"),v.k0s()),2&Bt){const b=v.XpG(3);v.R7$(),v.Y8G("labelText",v.bMT(2,3,"SEARCH.FORM.NUMBER_OF_PEOPLE"))("minimumCount",b.currentMinNumberOfPeople)("maximumCount",b.currentMaxNumberOfPeople)}}function ht(Bt,he){if(1&Bt&&(v.j41(0,"div",29),v.nrm(1,"iwg-dropdown",40),v.k0s()),2&Bt){const b=v.XpG(3);v.R7$(),v.Y8G("options",b.roomConfigurations)}}function pe(Bt,he){if(1&Bt&&(v.j41(0,"div",34)(1,"div",41)(2,"iwg-notification-item",42)(3,"span",38),v.EFF(4,"PERMUTATIONS.ZERO_DISCOUNT_SLOT.FLYOUT_MESSAGE"),v.k0s()()()()),2&Bt){const b=v.XpG(3);v.R7$(2),v.Y8G("notificationType",b.NotificationType.info)}}function Vt(Bt,he){if(1&Bt&&(v.j41(0,"div",34)(1,"div",41)(2,"iwg-notification-item",42),v.EFF(3," ** "),v.j41(4,"span",38),v.EFF(5,"SEARCH.FORM.DISCOUNTS.DISCLAIMER"),v.k0s()()()()),2&Bt){const b=v.XpG(3);v.R7$(2),v.Y8G("notificationType",b.NotificationType.info)}}function Zt(Bt,he){if(1&Bt){const b=v.RV6();v.qex(0),v.j41(1,"div",13)(2,"div",29),v.nrm(3,"iwg-dropdown",30),v.k0s(),v.DNE(4,Wt,3,5,"div",31),v.j41(5,"div",29),v.nrm(6,"iwg-datepicker",32),v.nI1(7,"async"),v.k0s(),v.DNE(8,ht,2,1,"div",31),v.k0s(),v.j41(9,"iwg-time-slot-picker",33),v.bIt("valueChange",function(tt){v.eBV(b);const Lt=v.XpG(2);return v.Njj(Lt.onStartAndEndTimeChange(tt))})("customStartTimeChanged",function(tt){v.eBV(b);const Lt=v.XpG(2);return v.Njj(Lt.onCustomStartTimeChange(tt))})("customEndTimeChanged",function(tt){v.eBV(b);const Lt=v.XpG(2);return v.Njj(Lt.onCustomEndTimeChange(tt))}),v.k0s(),v.DNE(10,pe,5,1,"div",34)(11,Vt,6,1,"div",35),v.j41(12,"div",36)(13,"iwg-button",37),v.nI1(14,"async"),v.j41(15,"span",38),v.EFF(16,"SEARCH.FORM.CHECK_AVAILABILITY"),v.k0s()()(),v.bVm()}if(2&Bt){let b;const X=v.XpG(2);v.R7$(3),v.Y8G("options",X.shortStayProducts)("sortAsc",!1),v.R7$(),v.Y8G("ngIf",X.showNumberOfPeople),v.R7$(2),v.Y8G("enableTime",!1)("maxDate",X.maxFromDate)("minDate",X.minFromDate)("utcOffset",null==(b=v.bMT(7,19,X.selectedCentre$))?null:b.utcOffset),v.R7$(2),v.Y8G("ngIf",X.showRoomConfiguration),v.R7$(),v.Y8G("disableHourlySlot",X.disableHourlySlot)("customTimeSlot",X.customTimeSlot)("minToTime",X.minToTime)("timeSlotDiscounts",X.timeSlotDiscounts)("maxFromTime",X.maxFromTime)("minFromTime",X.minFromTime)("hideDiscountLabels",X.hideDiscountLabels)("showAsterisks",X.showDiscountsDisclaimer),v.R7$(),v.vxM(X.noBookableTimeSlot?10:-1),v.R7$(),v.Y8G("ngIf",X.showDiscountsDisclaimer),v.R7$(2),v.Y8G("disabled",X.isDisabled()||v.bMT(14,21,X.loading$))}}function ie(Bt,he){if(1&Bt&&(v.j41(0,"div",43)(1,"span",44),v.EFF(2),v.k0s(),v.j41(3,"span",45),v.EFF(4),v.k0s()()),2&Bt){const b=v.XpG(2);v.R7$(2),v.SpI(" ",b.isProductMembership?"SEARCH.MEMBERSHIP.CONTENT_1":"SEARCH.VIRTUAL_OFFICE.CONTENT_1"," "),v.R7$(2),v.SpI(" ",b.isProductMembership?"SEARCH.MEMBERSHIP.CONTENT_2":"SEARCH.VIRTUAL_OFFICE.CONTENT_2"," ")}}function Fe(Bt,he){if(1&Bt){const b=v.RV6();v.j41(0,"iwg-modal-flyout",7),v.bIt("closeModal",function(){v.eBV(b);const tt=v.XpG();return v.Njj(tt.onClose())}),v.j41(1,"div",8)(2,"iwg-page-header",9),v.DNE(3,Me,2,3,"ng-template",null,0,v.C5r)(5,be,2,0),v.k0s(),v.j41(6,"div",10)(7,"iwg-loader",11),v.nI1(8,"async"),v.j41(9,"form",12),v.bIt("ngSubmit",function(){v.eBV(b);const tt=v.XpG();return v.Njj(tt.onSubmit())}),v.j41(10,"div",13)(11,"div",14),v.DNE(12,ve,3,10,"iwg-centre-search",15)(13,B,4,6,"ng-template",null,1,v.C5r),v.k0s()(),v.DNE(15,W,3,5,"iwg-button",16)(16,A,2,4,"iwg-action-card",17)(17,w,2,0,"div",18)(18,ut,3,1,"div",19)(19,Zt,17,23,"ng-container",20)(20,ie,5,2,"ng-template",null,2,v.C5r),v.k0s()(),v.nrm(22,"iwg-search-key-features",21),v.k0s()()()}
1if(2&Bt){const b=v.sdS(14),X=v.sdS(21),tt=v.XpG();v.R7$(2),v.Y8G("pageSizeType",tt.pageSizeType),v.R7$(3),v.vxM(tt.isLongTermProduct()?-1:5),v.R7$(2),v.Y8G("loading",v.bMT(8,15,tt.loading$)),v.R7$(2),v.Y8G("formGroup",tt.searchFlyoutForm),v.R7$(2),v.HbH(tt.isLongTermProduct()?"centre-search_stretch col-xs-12 col-lg-auto":"col-xs-12 col-12"),v.R7$(),v.Y8G("ngIf",!tt.isProductMembership)("ngIfElse",b),v.R7$(3),v.vxM(tt.isProductMembership?15:-1),v.R7$(),v.vxM(tt.isProductVirtualOffice?16:-1),v.R7$(),v.vxM(tt.isProductMembership?17:-1),v.R7$(),v.Y8G("ngIf",tt.loadingLocation),v.R7$(),v.Y8G("ngIf",!tt.isLongTermProduct())("ngIfElse",X),v.R7$(3),v.Y8G("productTypeId",tt.productTypeIdObservable)}}function He(Bt,he){if(1&Bt){const b=v.RV6();v.j41(0,"iwg-provisional-enquiry-flyout",46),v.nI1(1,"async"),v.bIt("openChange",function(){v.eBV(b);const tt=v.XpG();return v.Njj(tt.closeEnquiryFlyout())}),v.k0s()}if(2&Bt){const b=v.XpG();v.Y8G("open",v.bMT(1,3,b.showProvisionalVOFlyout$))("flyoutOverFlyout",!0)("productType",b.productTypeId)}}let Ke=(()=>{class Bt{static{this.freeVisitsNotificationMessage="SEARCH.NOTIFICATIONS.FREE_VISITS"}constructor(b,X,tt,Lt,zt,ce,le,qt){this.formBuilder=b,this.store=X,this.localizedDatePipe=tt,this.changeDetectorRef=Lt,this.ngxLogger=zt,this.dateService=ce,this.activatedRoute=le,this.router=qt,this.isSelectTierChangeCountryFlow=!1,this.unsubscribe$=new n.B,this.productTypeIdObservable=new d.t(a.c.MeetingRoom),this.pageSizeType=$.l.Flyout,this.NotificationType=G._,this.minFromDate=new Date,this.searchDefaults$=this.store.select(V.xd),this.loading$=(0,s.z)([this.store.select(q.Di),this.store.select(V.N_),this.store.select(xt.Di)]).pipe((0,f.T)(([rt,Yt,Y])=>rt||Yt||this.isSelectTierChangeCountryFlow&&Y),(0,g.Q)(this.unsubscribe$)),this.bookingsSuggestions$=this.store.select(ot.v),this.currentMaxNumberOfPeople=50,this.currentMinNumberOfPeople=1,this.minBookingDuration=60,this.bookingDurationIncrement=30,this.nonCenterSpecificPageSize=12,this.defaultProduct=k.l.MeetingRoom,this.showNumberOfPeople=!0,this.showRoomConfiguration=!1,this.canEditToDate=!0,this.centreSpecific=!1,this.restoredSlot=!1,this.lastCentreNumber=null,this.searchInput="",this.searchTitle="",this.searchDescription="",this.customTitle="",this.customDescription="",this.loadingLocation=!1,this.featureIds=[],this.disableHourlySlot=!1,this.noBookableTimeSlot=!1,this.hideDiscountLabels=!1,this.showDiscountsDisclaimer=!1,this.bookingSlotChecked=!1,this.reviewBookingActive=!1,this.applyingSlotResolution=!1,this.customTimeSlot={customStartTime:new Date,customEndTime:new Date},this.discountsParams$=new d.t({productTypeId:3e3}),this.centreForTimeRestriction$=new d.t(null),this.isProductVirtualOffice=!1,this.isProductMembership=!1,this.showProvisionalVOFlyout$=(0,_.of)(!1),this.DisplayType=nt.t,this.dropdownIncludesSearchType=U.W.Includes,this.countries$=this.store.select(gt.qz),this.centreIsoCode$=this.store.select(_t.uB),this.productAvailabilityCountryCode$=this.store.select(V.jV),this.searchFlyoutForm=this.formBuilder.group({location:(0,R.Ny)([null,t.k0.required],{required:"SEARCH.FORM.VALIDATORS.LOCATION_REQUIRED"}),selectLocation:(0,R.Ny)([null],{required:"SEARCH.FORM.VALIDATORS.LOCATION_REQUIRED"}),productType:(0,R.Ny)([null,t.k0.required],{required:"SEARCH.FORM.VALIDATORS.INVENTORY_TYPE_REQUIRED"}),roomConfigurationType:(0,R.Ny)([null],{required:"SEARCH.FORM.VALIDATORS.ROOM_CONFIGURATION_REQUIRED"}),numberOfPeople:(0,R.Ny)([null,[t.k0.required,rt=>this.currentMinNumberOfPeople<=rt.value&&rt.value<=this.currentMaxNumberOfPeople?void 0:{outOfRange:!0}]],{required:"SEARCH.FORM.VALIDATORS.NUMBER_OF_PEOPLE_REQUIRED"}),date:(0,R.Ny)([new Date,t.k0.required],{required:"SEARCH.FORM.VALIDATORS.FROM_REQUIRED"}),startAndEndTime:(0,R.Ny)([null,t.k0.required],{required:"SEARCH.FORM.VALIDATORS.FROM_REQUIRED"})})}ngAfterViewInit(){this.store.select(it.pe).pipe((0,g.Q)(this.unsubscribe$)).subscribe(b=>this.reviewBookingActive=b),this.subscribeToStore(),this.subscribeToFormChanges(),this.applyFreeVisitNotification(),this.store.dispatch(Et.MV()),(0,s.z)([this.activatedRoute?.queryParams||(0,_.of)({}),this.products$,this.searchDefaults$]).pipe((0,g.Q)(this.unsubscribe$)).subscribe(([b,X,tt])=>{this.featureIds=b.featureIds;const Lt=Number(b.productTypeId??b.inventoryTypeId);if(Lt!==a.c.Membership&&this.store.dispatch((0,Z.lE)()),Lt)return this.isProductVirtualOffice=Lt===a.c.VirtualOffice,this.isProductMembership=Lt===a.c.Membership,this.productTypeId=Lt,this.onSearchDefaultsLoaded(tt),this.rememberRebookedBookingHours(b),this.patchSearchQuery(b,X,tt),void(this.isProductMembership&&(this.router.url.includes("select-tier")&&this.router.url.includes("15000")?this.productAvailabilityCountryCode$.pipe((0,h.p)(zt=>!!zt),(0,g.Q)(this.unsubscribe$)).subscribe(zt=>{this.searchFlyoutForm.get("selectLocation").setValue(zt.countryIsoCode,{emitEvent:!1})}):this.centreIsoCode$.pipe((0,h.p)(zt=>!!zt),(0,g.Q)(this.unsubscribe$)).subscribe(zt=>{this.searchFlyoutForm.get("selectLocation").setValue(zt,{emitEvent:!1})}
1)));this.store.select(H.yW).pipe((0,g.Q)(this.unsubscribe$)).subscribe(zt=>{zt?(this.booking=zt,this.centre=zt.centre,this.productTypeId=this.booking.productTypeId,b={...b,centreNumber:this.booking.centre.centreNumber,productTypeId:this.booking.productTypeId,roomConfigurationId:this.booking.roomConfigurationId,numberOfPeople:this.booking.numberOfOccupants,from:this.booking.startDate,to:this.booking.endDate,discountType:(0,x.u$)(this.booking.price?.priceModifiers)},this.originalBookingHours={from:this.booking.startDate,to:this.booking.endDate}):(b={...b,productTypeId:a.c.MeetingRoom},this.productTypeId=a.c.MeetingRoom),this.patchSearchQuery(b,X,tt),this.onSearchDefaultsLoaded(tt)}),this.customTitle=this.activatedRoute?.routeConfig?.data?.title,this.customDescription=this.activatedRoute?.routeConfig?.data?.description}),this.isLongTermProduct()||(this.minFromDate.setHours(0,0,0),this.store.dispatch(Nt.loadFreeVisits({productTypeId:null})),this.shortTermSubscribeToStore()),(0,s.z)([this.centreForTimeRestriction$,this.searchFlyoutForm.get("date").valueChanges.pipe((0,C.Z)(this.searchFlyoutForm.get("date").value))]).pipe((0,g.Q)(this.unsubscribe$)).subscribe(([b,X])=>{const tt=(0,mt.lE)(b,X,60*(this.maxFromTime?.hours??22)+(this.maxFromTime?.minutes??30),this.lastCentreNumber,this.restoredSlot);if(this.minFromDate=tt.minFromDate,this.lastCentreNumber=tt.lastCentreNumber,tt.reanchorTo){const qt=tt.reanchorTo;setTimeout(()=>this.searchFlyoutForm.get("date").setValue(qt))}if(!(X=tt.date))return;const Lt=(0,mt.Gt)(new Date(X),b);this.minFromTime=(0,mt.Vo)(Lt,b??void 0);const zt=60*(this.maxFromTime?.hours??22)+(this.maxFromTime?.minutes??30),ce=this.searchFlyoutForm.get("startAndEndTime").value,le=this.restoredSlot&&(0,mt.Er)(ce,this.minFromTime,zt);b&&!le&&(Lt?this.setDefaultTimesToFirstAvailable(new Date(X)):(this.customTimeSlot=(0,mt.Ae)(new Date(X),!1,this.minFromTime,this.minBookingDuration,this.workingHours?.start),this.changeMinEndTime(new Date(this.customTimeSlot.customStartTime)),this.selectedDiscountType=void 0,this.searchFlyoutForm.get("startAndEndTime").setValue(this.customTimeSlot,{emitEvent:!1}))),(this.disableHourlySlot||this.inheritedSlotType)&&this.applyTimeSlotResolution(),this.changeDetectorRef.detectChanges()})}getWorkspaceDiscounts(b){return this.store.select((0,dt.Wx)(b))}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}onProductsLoaded(b){if(b&&b.length>0){this.shortStayProducts=b.filter(Lt=>!Lt.isLongTermProduct);const X=b.find(Lt=>Lt.translationKey===this.defaultProduct);this.searchFlyoutForm.get("productType").setValue(X,{emitEvent:!1});const tt=this.numberOfPeople?.[X.id];tt&&(this.currentMinNumberOfPeople=tt.min,this.currentMaxNumberOfPeople=tt.max)}}onSearchDefaultsLoaded(b){if(b){if(this.searchDefaults=b,this.booking?.endDate)this.minToTime={hours:new Date(this.booking?.endDate).getHours(),minutes:new Date(this.booking?.endDate).getMinutes()};else{const X=(0,mt.Hk)((0,mt.i)(b.duration),this.workingHours);this.minToTime={hours:X.getHours(),minutes:X.getMinutes()}}this.maxFromTime={hours:22,minutes:30},this.workingHours={start:new Date(b.startTime).getHours(),end:new Date(b.endTime).getHours()},this.bookingDurationIncrement=(0,mt.i)(b.durationIncrement),this.minBookingDuration=(0,mt.i)(b.duration),this.maxFromDate=new Date(Date.now()+864e5*+b.maximumAdvanceReservation.split(".")[0])}}onProductChange(b){if(b){if(!this.isLongTermProduct())if(this.roomConfigurations=b.roomConfigurations,this.searchFlyoutForm.get("roomConfigurationType").setValue(b.roomConfigurations.find(tt=>tt.id===b.defaultRoomConfigurationId)),this.discountsParams$.next({...this.discountsParams$.value,productTypeId:b.id}),b.roomConfigurations.length>1){const tt=this.searchFlyoutForm.get("roomConfigurationType");tt.setValidators(t.k0.required),tt.updateValueAndValidity(),this.showRoomConfiguration=!0}else this.showRoomConfiguration=!1,this.searchFlyoutForm.get("roomConfigurationType").clearValidators(),this.searchFlyoutForm.get("roomConfigurationType").setValue(null);const X=b.defaultRoomConfigurationId in ct.Wd?this.numberOfPeople?.[b.defaultRoomConfigurationId]:this.numberOfPeople?.[b.id];X&&(this.currentMaxNumberOfPeople=X.max,this.currentMinNumberOfPeople=X.min,this.searchFlyoutForm.get("numberOfPeople").setValue(X.default),this.showNumberOfPeople=X.min!==X.max),this.searchTitle="SEARCH.TITLE."+b.translationKey,this.searchDescription="SEARCH.DESCRIPTION."+b.translationKey,this.productTypeIdObservable.next(b.id)}}setLocationValidator(){const b=this.searchFlyoutForm.get("location");b.setValidators([t.k0.required,pt.w]),b.updateValueAndValidity(),this.searchFlyoutForm.get("location").markAsTouched()}onDateChange(b){(b=this.roundDate(b,this.minFromDate,this.bookingDurationIncrement)).setHours(this.customTimeSlot.customStartTime.getHours()),b.setMinutes(this.customTimeSlot.customStartTime.getMinutes()),this.maxToDate=new Date(b.getFullYear(),b.getMonth(),b.getDate(),23,59,0),this.changeMinEndTime(new Date(b)),this.changeDetectorRef.detectChanges(),this.customTimeSlot.customStartTime=b;const X=new Date(b);X.setHours(this.customTimeSlot.customEndTime.getHours()),X.setMinutes(this.customTimeSlot.customEndTime.getMinutes()),this.customTimeSlot.customEndTime=X,this.discountsParams$.next({...this.discountsParams$.value,weekDay:b.getDay()})}onCustomStartTimeChange(b){const X=this.roundDate(b,this.minFromDate,this.bookingDurationIncrement);this.maxToDate=new Date(X.getFullYear(),X.getMonth(),X.getDate(),23,59,0),this.changeMinEndTime(new Date(X)),this.customTimeSlot.customStartTime=X,this.customTimeSlot.customEndTime=this.minToDate}onCustomEndTimeChange(b){b&&this.canEditToDate&&(this.canEditToDate=!1,this.customTimeSlot.customEndTime=this.roundDate(b,this.customTimeSlot.customStartTime,this.bookingDurationIncrement),this.canEditToDate=!0)}onStartAndEndTimeChange(b){!this.applyingSlotResolution&&this.inheritedSlotType&&(this.inheritedSlotType=(0,x.m$)(b)??this.inheritedSlotType),b.customStartTime?this.searchFlyoutForm.get("startAndEndTime").setValue(b):(this.searchFlyoutForm.get("startAndEndTime").setValue(this.timeSlotDiscounts.find(X=>X.discountType===b)),this.customTimeSlot={customStartTime:this.dateService.create(this.searchFlyoutForm.get("startAndEndTime").value.discountAppliedFrom,"HH:mm:ss").toDate(),customEndTime:this.dateService.create(this.searchFlyoutForm.get("startAndEndTime").value.discountAppliedTo,"HH:mm:ss").toDate()},this.changeMinEndTime(new Date(this.customTimeSlot.customStartTime)))}onSubmit(){this.isLocationValid()&&(this.ngxLogger.log((0,D.oq)(this.productTypeId??this.searchFlyoutForm.value?.productType?.id,this.isProductMembership?this.searchFlyoutForm.controls.selectLocation.value:this.searchFlyoutForm.value.location?.centreName)),this.isProductMembership&&"true"===this.activatedRoute.snapshot.queryParams.fromSelectTier?this.handleSelectTierCountryChange(this.searchFlyoutForm.controls.selectLocation.value):this.isProductMembership?this.onMembershipSubmit():this.isProductVirtualOffice?this.onVirtualOfficeSubmit():this.onShortTermSubmit())}onShortTermSubmit(){if(this.searchFlyoutForm.valid){const b=this.searchFlyoutForm.value,X=this.createFromDate(b),tt=this.createToDate(b),Lt=this.timeSlotDiscounts.find(ce=>ce.discountType===b.startAndEndTime)||b.startAndEndTime,zt={location:b.location?.centreName,featureIds:this.featureIds,productTypeId:b.productType.id,roomConfigurationId:b.productType.defaultRoomConfigurationId in ct.Wd?ct.Wd.EventSpace:b.roomConfigurationType?.id,numberOfPeople:b.numberOfPeople,from:this.localizedDatePipe.transform(X||(0,mt.Hk)(0,this.workingHours),"ISOZoneless"),to:this.localizedDatePipe.transform(tt||(0,mt.Hk)((0,mt.i)(this.searchDefaults.duration),this.workingHours),"ISOZoneless"),bookingRef:+this.booking?.referenceNumber,bookingId:this.booking?.id,bookingPaymentMethodId:this.booking?.paymentMethodId,discountAppliedFrom:Lt.discountAppliedFrom,discountAppliedTo:Lt.discountAppliedTo,discountType:Lt.discountType,discountPercentage:Lt.discountPercentage,weekDay:X.getDay()};this.centreSpecific?(zt.centreNumber=this.centre.centreNumber,zt.centreName=this.centre.name??zt.location,zt.inventoryTypeId=b.productType.id,this.store.dispatch(Et.fQ({searchInventoryQuery:zt}))):(zt.pageSize=this.nonCenterSpecificPageSize,this.store.dispatch(J.t_({query:zt}))),this.store.dispatch(Nt.filterSearchResults({filterValue:zt.featureIds}))}}onVirtualOfficeSubmit(){if(this.isLocationValid()){const X={location:this.searchFlyoutForm.value.location?.centreName,productTypeId:a.c.VirtualOffice,featureIds:this.featureIds};this.centreSpecific?(this.store.dispatch(Nt.getAvailabilityForCentre({centreNumber:this.centre.centreNumber,request:X})),this.showProvisionalVOFlyout$=this.store.select(V.sq)):this.store.dispatch(J.t_({query:X})),this.store.dispatch(Nt.filterSearchResults({filterValue:X.featureIds}))}}onClose(){let b="";this.isProductMembership?b="preserve":this.isRefSearchResults&&(b="merge"),this.store.dispatch(J.Tl({queryParamsHandling:b}))}patchSearchQuery(b,X,tt){if(!(b&&X?.length>0))return;let Lt;this.isRefSearchResults="search-results"===b.ref;
1const zt=b.productTypeId?.toString()??b.inventoryTypeId?.toString();let ce=X.find(rt=>rt.id.toString()===zt);if(ce){const rt=Yt=>Yt.id.toString()===b.roomConfigurationId?.toString();ce=X.find(Yt=>(Lt=Yt.roomConfigurations.find(rt),!!Lt))??ce}else ce=X.find(rt=>rt.id===tt?.workspaceTypeId);this.discountsParams$.next({...this.discountsParams$.value,productTypeId:ce.id}),this.reviewBookingActive&&Number(ce.id)===a.c.DayOffice&&b.discountType&&(this.selectedDiscountType=b.discountType,this.inheritedSlotType=b.discountType),this.roomConfigurations=ce.roomConfigurations,this.showRoomConfiguration=ce.roomConfigurations.length>1,this.restoredSlot=!Number.isNaN(new Date(b.from).getTime());let le=this.restoredSlot?this.dateService.create(b.from).toDate():(0,mt.Hk)(0,this.workingHours),qt=Number.isNaN(new Date(b.to).getTime())?(0,mt.Hk)((0,mt.i)(tt?.duration),this.workingHours):this.dateService.create(b.to).toDate();if(le=this.roundDate(le,this.minFromDate,this.bookingDurationIncrement),this.maxToDate=new Date(le.getFullYear(),le.getMonth(),le.getDate(),23,59,0),this.changeMinEndTime(new Date(le)),qt<le?(qt=new Date(le),qt.setMinutes(qt.getMinutes()+this.minBookingDuration)):qt=this.roundDate(qt,le,this.bookingDurationIncrement),qt>this.maxToDate&&(qt=new Date(this.maxToDate)),this.centreSpecific=b.centreNumber>0,b.centreNumber&&this.selectedCentre$.pipe((0,h.p)(rt=>!!rt),(0,T.s)(1),(0,g.Q)(this.unsubscribe$)).subscribe(rt=>this.centre=rt),b.centreNumber){const rt=+b.centreNumber;this.centreForTimeRestriction$.value?.centreNumber!==rt&&(this.store.dispatch(et.lR({centreNumber:rt})),this.selectedCentre$.pipe((0,h.p)(Yt=>Yt?.centreNumber===rt),(0,T.s)(1),(0,g.Q)(this.unsubscribe$)).subscribe(Yt=>this.centreForTimeRestriction$.next(Yt))),this.discountsParams$.next({...this.discountsParams$.value,locationNumber:b.centreNumber,weekDay:new Date(le).getDay()})}this.fillForm(b,ce,Lt,le,qt)}createFromDate(b){const tt=b.startAndEndTime.discountAppliedFrom?this.dateService.create(b.startAndEndTime.discountAppliedFrom,"HH:mm:ss").toDate():this.customTimeSlot.customStartTime,Lt=new Date(b.date);return Lt.setHours(tt.getHours()),Lt.setMinutes(tt.getMinutes()),Lt}createToDate(b){const tt=b.startAndEndTime.discountAppliedTo?this.dateService.create(b.startAndEndTime.discountAppliedTo,"HH:mm:ss").toDate():this.customTimeSlot.customEndTime,Lt=new Date(b.date);return Lt.setHours(tt.getHours()),Lt.setMinutes(tt.getMinutes()),Lt}setDefaultTimesToFirstAvailable(b){const X=new Date(b);X.setHours(this.minFromTime.hours,this.minFromTime.minutes,0,0);const tt=new Date(X);tt.setMinutes(tt.getMinutes()+this.minBookingDuration),this.customTimeSlot={customStartTime:X,customEndTime:tt},this.changeMinEndTime(new Date(X)),this.selectedDiscountType=void 0,this.searchFlyoutForm.get("startAndEndTime").setValue(this.customTimeSlot,{emitEvent:!1})}changeMinEndTime(b){this.minToDate=b,this.minToDate.setMinutes(this.minToDate.getMinutes()+this.minBookingDuration),this.minToTime={hours:this.minToDate.getHours(),minutes:this.minToDate.getMinutes()}}fillForm(b,X,tt,Lt,zt){let ce=b.location;this.customTimeSlot.customStartTime=new Date(Lt),this.customTimeSlot.customEndTime=new Date(zt),this.centreSpecific&&(ce=this.centre?.name??ce),this.searchFlyoutForm.patchValue({location:{centreName:ce},productType:X,roomConfigurationType:tt||X.roomConfigurations.find(le=>le.id===X.defaultRoomConfigurationId),numberOfPeople:b.numberOfPeople??this.numberOfPeople?.[X.id]?.default,date:new Date(Lt),startAndEndTime:this.selectedDiscountType||this.customTimeSlot}),this.searchInput=ce}inputSelectionChange(b){if(this.centreSpecific=b?.centreNumber>0,this.store.dispatch(et.O_()),!this.centreSpecific)return this.centre=null,this.centreForTimeRestriction$.next(null),void this.discountsParams$.next({...this.discountsParams$.value,locationNumber:void 0});if(this.centre=b,this.store.dispatch(et.lR({centreNumber:b.centreNumber})),this.selectedCentre$.pipe((0,h.p)(X=>X?.centreNumber===b.centreNumber),(0,T.s)(1),(0,g.Q)(this.unsubscribe$)).subscribe(X=>this.centreForTimeRestriction$.next(X)),this.discountsParams$.next({...this.discountsParams$.value,locationNumber:b.centreNumber}),b.type===M.sA.HomeCentre||b.type===M.sA.Favourite){const X=this.searchFlyoutForm.value;X.productType.id===a.c.MeetingRoom&&this.selectedCentre$.pipe((0,h.p)(tt=>null!=tt),(0,g.Q)(this.unsubscribe$)).subscribe(tt=>{this.store.dispatch(J.VA({searchQuery:{location:b.centreName,centreNumber:this.centre.centreNumber,productTypeId:X.productType?.id,roomConfigurationId:X.roomConfigurationType?.id,numberOfPeople:X.numberOfPeople,from:this.localizedDatePipe.transform(X.from??(0,mt.Hk)(0,this.workingHours),"ISOZoneless"),to:this.localizedDatePipe.transform(X.to??(0,mt.Hk)((0,mt.i)(this.searchDefaults.duration),this.workingHours),"ISOZoneless")}}))})}this.isLongTermProduct()&&this.onSubmit()}roundDate(b,X,tt){const Lt=Math.round(b.getMinutes()/tt)*tt;let zt=new Date(b);return zt<X?(zt=new Date(X),zt.setMinutes(Lt<X.getMinutes()?Lt+tt:Lt)):zt.setMinutes(Lt),zt}onLoadingLocation(b){this.loadingLocation=b,this.changeDetectorRef.detectChanges()}subscribeToStore(){if(this.store.dispatch(Nt.loadProductsRequest()),this.store.select(V.gW).pipe((0,g.Q)(this.unsubscribe$)).subscribe(b=>this.numberOfPeople=b),this.products$=(0,s.z)([this.store.select(V.VW),this.store.select(gt.Pe)]).pipe((0,f.T)(([b,X])=>b.filter(tt=>tt.defaultRoomConfigurationId!==ct.Wd.EventSpace||X).map(l.YD)),(0,g.Q)(this.unsubscribe$)),this.products$.pipe((0,g.Q)(this.unsubscribe$)).subscribe(b=>{this.onProductsLoaded(b)}),!this.isLongTermProduct()){const b=this.searchFlyoutForm.get("productType");this.freeVisitData$=b.valueChanges.pipe((0,C.Z)(b.value),(0,h.p)(X=>!!X),(0,f.T)(X=>X?.id),(0,m.F)(),(0,I.n)(X=>this.store.select(V.Ec).pipe((0,h.p)(tt=>!!tt),(0,f.T)(tt=>this.getFreeVisits(tt,X)))),(0,m.F)(([X,tt],[Lt,zt])=>X===Lt&&tt===zt),(0,y.t)(1)),this.isFreeVisit$=(0,s.z)([this.freeVisitData$,this.searchFlyoutForm.get("numberOfPeople").valueChanges.pipe((0,C.Z)(this.searchFlyoutForm.get("numberOfPeople").value))]).pipe((0,f.T)(([[X,tt],Lt])=>X>0&&tt>0&&Lt<=tt))}this.selectedCentre$=this.store.select(st.Nn),this.isTodayDate$=this.searchFlyoutForm.get("date").valueChanges.pipe((0,h.p)(b=>!!b),(0,C.Z)(this.searchFlyoutForm.get("date").value),(0,f.T)(b=>(0,mt.Gt)(new Date(b),this.centre)),(0,g.Q)(this.unsubscribe$))}shortTermSubscribeToStore(){const b=this.discountsParams$.pipe((0,m.F)((tt,Lt)=>tt.locationNumber===Lt.locationNumber&&tt.productTypeId===Lt.productTypeId&&tt.weekDay===Lt.weekDay),(0,o.M)(tt=>this.store.dispatch(Et.dk(tt))),(0,I.n)(tt=>this.getWorkspaceDiscounts(tt)),(0,h.p)(tt=>!!tt),(0,m.F)(),(0,g.Q)(this.unsubscribe$),(0,y.t)(1)),X=this.store.select(it.pe);(0,s.z)([b,this.searchFlyoutForm.get("date").valueChanges.pipe((0,C.Z)(this.searchFlyoutForm.get("date").value)),this.centreForTimeRestriction$,X]).pipe((0,g.Q)(this.unsubscribe$)).subscribe(([tt,Lt,zt,ce])=>{this.timeSlotDiscounts=tt.discounts?.map(qt=>({...qt,isDisabled:this.centreSpecific&&this.checkDisabledTime(qt,zt,new Date(Lt))})),this.disableHourlySlot=(0,x.ak)(tt,ce),this.restoreBookingSlotByTimes(),this.noBookableTimeSlot=!1;const le=(0,x.m$)(this.searchFlyoutForm.get("startAndEndTime").value);this.disableHourlySlot?this.applyTimeSlotResolution():(!tt?.discounts?.length||!this.timeSlotDiscounts.some(qt=>qt.discountType===le))&&this.searchFlyoutForm.get("startAndEndTime").setValue(this.customTimeSlot),this.showDiscountsDisclaimer=!(this.centre||!tt?.discounts?.length)}),(0,s.z)([this.activatedRoute?.queryParams||(0,_.of)({}),b,this.isFreeVisit$,this.centreForTimeRestriction$,this.searchFlyoutForm.get("date").valueChanges.pipe((0,C.Z)(this.searchFlyoutForm.get("date").value)),X]).pipe((0,h.p)(([tt,Lt])=>!!Lt),(0,m.F)(),(0,g.Q)(this.unsubscribe$)).subscribe(([tt,Lt,zt,ce,le,qt])=>{const rt=(0,x.W)(zt,qt,this.discountsParams$.value?.productTypeId);this.timeSlotDiscounts=rt?[]:Lt.discounts?.map(Y=>({...Y,isDisabled:this.centreSpecific&&this.checkDisabledTime(Y,ce,new Date(le))})),this.disableHourlySlot=!rt&&(0,x.ak)(Lt,qt),this.hideDiscountLabels=!rt&&zt,this.selectedDiscountType=this.timeSlotDiscounts?.find(Y=>Y.discountType===tt?.discountType&&!Y.isDisabled)?.discountType||this.selectedDiscountType,this.restoreBookingSlotByTimes(),this.noBookableTimeSlot=!1;const Yt=this.searchFlyoutForm.get("startAndEndTime").value;this.disableHourlySlot?this.applyTimeSlotResolution():(!Lt.discounts?.length||!this.timeSlotDiscounts.some(Y=>Y.discountType===Yt?.discountType&&!Y.isDisabled)&&!this.timeSlotDiscounts.some(Y=>Y.discountType===Yt&&!Y.isDisabled))&&this.searchFlyoutForm.get("startAndEndTime").setValue(this.customTimeSlot),this.showDiscountsDisclaimer=!zt&&!this.centreSpecific&&!!Lt.discounts.length})}applyTimeSlotResolution(){const b=this.searchFlyoutForm.get("startAndEndTime"),X=(0,x.m$)(b.value),tt=(0,x.Md)(this.timeSlotDiscounts,X??this.inheritedSlotType,this.disableHourlySlot,this.discountsParams$.value?.productTypeId);if(this.noBookableTimeSlot="none"===tt.kind,"none"===tt.kind)return this.selectedDiscountType=void 0,void b.setValue(null);"slot"===tt.kind&&tt.slot.discountType!==X&&this.applySlotFromResolution(tt.slot.discountType)}
1applySlotFromResolution(b){this.applyingSlotResolution=!0,this.selectedDiscountType=b,this.onStartAndEndTimeChange(b),this.applyingSlotResolution=!1}rememberRebookedBookingHours(b){!this.reviewBookingActive||!b?.bookingId||Number(b.productTypeId??b.inventoryTypeId)!==a.c.DayOffice||this.store.select(H.yW).pipe((0,h.p)(X=>Number(X?.id)===Number(b.bookingId)),(0,T.s)(1),(0,g.Q)(this.unsubscribe$)).subscribe(X=>this.originalBookingHours={from:X.startDate,to:X.endDate})}restoreBookingSlotByTimes(){if(!this.reviewBookingActive||this.bookingSlotChecked||!this.originalBookingHours||!this.timeSlotDiscounts?.length||Number(this.discountsParams$.value?.productTypeId)!==a.c.DayOffice||(this.bookingSlotChecked=!0,this.selectedDiscountType))return;const b=(0,x.bc)(this.timeSlotDiscounts,this.originalBookingHours.from,this.originalBookingHours.to);b&&(this.inheritedSlotType=b.discountType),b&&!b.isDisabled&&this.applySlotFromResolution(b.discountType)}subscribeToFormChanges(){this.searchFlyoutForm.get("productType").valueChanges.pipe((0,m.F)(),(0,g.Q)(this.unsubscribe$)).subscribe(b=>this.onProductChange(b)),this.subscribeFromDate()}subscribeFromDate(){this.searchFlyoutForm.get("date").valueChanges.pipe((0,h.p)(b=>!!b),(0,g.Q)(this.unsubscribe$)).subscribe(b=>this.onDateChange(b))}applyFreeVisitNotification(){this.freeVisitData$.pipe((0,g.Q)(this.unsubscribe$)).subscribe(([b,X])=>{this.store.dispatch(b<=0?(0,Pt.ZF)({messageTag:Bt.freeVisitsNotificationMessage}):(0,Pt.Ds)({notificationType:G._.info,text:this.getFreeVisitsMessage(b,X),translateParameters:{ConsumerInput_NumberOfDays:b,ConsumerInput_NumberOfPeople:X},messageTag:Bt.freeVisitsNotificationMessage}))})}getFreeVisits(b,X){const tt=b.find(Lt=>Lt.productTypeId===X);return tt?[tt.unlimited?Number.POSITIVE_INFINITY:tt.remainingAmount,tt.maxNumberOfPeople]:[0,null]}getFreeVisitsMessage(b,X){return[Bt.freeVisitsNotificationMessage,b===Number.POSITIVE_INFINITY?"UNLIMITED":"LIMITED",X?"LIMITED_BY_PEOPLE":"UNLIMITED_BY_PEOPLE"].join(".")}checkDisabledTime(b,X,tt){return(0,mt.Rx)(b.discountAppliedFrom,X,tt,this.bookingDurationIncrement)}
1isDisabled(){return this.searchFlyoutForm.invalid||!this.isLocationValid()}isLocationValid(){return this.isProductMembership?!!this.searchFlyoutForm?.controls.selectLocation.value:this.searchFlyoutForm?.controls.location.value?.centreName&&0!==this.searchFlyoutForm?.controls.location.value?.centreName?.trim().length}closeEnquiryFlyout(){this.router.url.includes("change-country")?this.store.select(xt.cL).pipe((0,T.s)(1)).subscribe(b=>{b&&this.store.dispatch(Nt.updateProductAvailability({centreNumber:b.productAvailability.centreNumber,isProvisional:b.productAvailability.isProvisional,countryIsoCode:b.countryIsoCode}))}):this.isProductMembership||this.store.dispatch(Nt.updateProductAvailability(null)),this.showProvisionalVOFlyout$=(0,_.of)(!1)}isLongTermProduct(){return this.productTypeId===a.c.VirtualOffice||this.productTypeId===a.c.Membership}onMembershipSubmit(){if(this.isLocationValid()){const b=this.searchFlyoutForm.controls.selectLocation.value;this.ngxLogger.log((0,D.w_)(b)),this.store.dispatch(Nt.getProductAvailability({productType:this.productTypeId,countryIsoCode:b})),this.loading$.pipe((0,g.Q)(this.unsubscribe$)).subscribe(X=>{this.showProvisionalVOFlyout$=X?(0,_.of)(!1):this.store.select(V.m9)})}}handleSelectTierCountryChange(b){const X=this.store.select(xt.Jx).pipe((0,T.s)(1)),tt=this.store.select(xt.tK).pipe((0,T.s)(1)),Lt=this.store.select(xt.q6).pipe((0,T.s)(1)),zt=this.store.select(V.jV).pipe((0,P.i)(1),(0,h.p)(qt=>!!qt?.productAvailability&&qt.countryIsoCode===b),(0,T.s)(1)),ce=this.store.select(xt.q6).pipe((0,P.i)(1),(0,h.p)(qt=>!!qt&&qt.length>0),(0,T.s)(1)),le=this.store.select(xt.Di).pipe((0,C.Z)(!1),(0,N.J)(),(0,h.p)(([qt,rt])=>qt&&!rt),(0,T.s)(1),(0,o.M)(()=>{this.isSelectTierChangeCountryFlow=!1}));this.store.dispatch(Nt.getProductAvailability({productType:this.productTypeId,countryIsoCode:b,skipNavigation:!0})),(0,s.z)([X,tt,Lt,zt]).pipe((0,I.n)(([qt,rt,Yt,Y])=>Y.productAvailability.isProvisional?(this.isSelectTierChangeCountryFlow=!1,this.showProvisionalVOFlyout$=(0,_.of)(!0),(0,_.of)(null)):(this.isSelectTierChangeCountryFlow=!0,this.store.dispatch(Dt.Ao({centreNumber:Y.productAvailability.centreNumber,productType:a.c.Membership,initialProduct:oe.u.biAnnualRange})),(0,s.z)([ce,le]).pipe((0,f.T)(([kt])=>({availableProducts:kt,selectedPlan:qt,selectedPrice:rt,previousAvailableProducts:Yt}))))),(0,h.p)(qt=>null!==qt),(0,g.Q)(this.unsubscribe$)).subscribe(({availableProducts:qt,selectedPlan:rt,selectedPrice:Yt,previousAvailableProducts:Y})=>{this.reselectPlanFromAvailableProducts(qt,rt,Yt,Y),this.store.dispatch((0,Dt.J8)())})}reselectPlanFromAvailableProducts(b,X,tt,Lt){if(!X||!b?.length)return void this.store.dispatch(J.RX({productType:a.c.Membership}));const zt=Lt?.find(rt=>rt.plans?.some(Yt=>Yt.productVariantId===X.productVariantId&&Yt.minimumTerm===X.minimumTerm&&Yt.maximumTerm===X.maximumTerm)),le=(zt?b.find(rt=>rt.agreementTypeRange===zt.agreementTypeRange):void 0)?.plans?.find(rt=>rt.productVariantId===X.productVariantId),qt=le?.productVariantPricings?.find(rt=>rt.productUsageDays===tt?.productUsageDays);le&&qt&&this.store.dispatch(Dt.Ek({plan:le,price:qt})),this.store.dispatch(J.RX({productType:a.c.Membership}))}currentLocationFlagIcon(){const b=this.searchFlyoutForm?.controls?.selectLocation?.value;return b?`flag32 flag32__${b.toLowerCase()}`:""}static{this.\u0275fac=function(X){return new(X||Bt)(v.rXU(t.ze),v.rXU(_e.il),v.rXU(ue.K),v.rXU(v.gRc),v.rXU(re.so),v.rXU(bt.k),v.rXU(Ft.nX),v.rXU(Ft.Ix))}}static{this.\u0275cmp=v.VBU({type:Bt,selectors:[["iwg-search-flyout"]],decls:3,vars:4,consts:[["headerTitle",""],["selectLocation",""],["longtermContent",""],["headerSubTitle",""],["optionExpandedTemplate",""],["open","true",3,"closeModal",4,"iwgModal"],[3,"open","flyoutOverFlyout","productType","openChange",4,"ngIf"],["open","true",3,"closeModal"],[1,"centre-search-flyout"],[1,"no-container",3,"pageSizeType"],[1,"centre-search-flyout__content"],["message","COMMON.PROCESSING",3,"loading"],[1,"centre-search-flyout__formwrapper",3,"ngSubmit","formGroup"],[1,"row"],[1,"m--b-5","centre-search-flyout__textwrapper"],["formControlName","location","id","Booking_Search_LocationInput",3,"centreSuggestion","value","disabled","disableSearchButton","readonly","loadingLocation","valueChange","focusout",4,"ngIf","ngIfElse"],["wrapperId","Search_CheckAvailability_Button",1,"block",3,"displayType","disabled"],["wrapperId","Virtual_Office_Search_Action_Card",3,"text","leadingIconClass"],[1,"flyout-divider-wrapper"],["class","row center-xs",4,"ngIf"],[4,"ngIf","ngIfElse"],[1,"no-container","flyout","convai-enabled",3,"productTypeId"],["formControlName","location","id","Booking_Search_LocationInput",3,"loadingLocation","valueChange","focusout","centreSuggestion","value","disabled","disableSearchButton","readonly"],["filterKeys","name","wrapperId","Product_Country","formControlName","selectLocation","titleKey","name","idKey","isoCodeThreeLetter","valueKey","isoCodeThreeLetter","labelText","ACCOUNT_DETAILS.LABELS.COUNTRY",1,"flag",3,"isSearchable","searchType","options","inputIcon"],[1,"option-flag-wrapper"],[3,"countryIsoCode3"],[1,"row","center-xs"],[1,"col-xs-auto","m--b-5"],["message","",3,"loading"],[1,"col-xs-12","col-md-3","m--b-5","centre-search-flyout__textwrapper"],["wrapperId","Booking_Search_WorkspaceTypeDropdown","labelText","SEARCH.FORM.PRODUCT_TYPE","formControlName","productType","idKey","translationKey","useIdAsValue","true","titleKey","description",3,"options","sortAsc"],["class","col-xs-12 col-md-3 m--b-5 centre-search-flyout__textwrapper",4,"ngIf"],["wrapperId","Booking_Search_Datepicker","labelText","SEARCH.FORM.DATE","placeholderText","SEARCH.FORM.STARTS","formControlName","date","isRequired","true","dateFormat","long",3,"enableTime","maxDate","minDate","utcOffset"],["formControlName","startAndEndTime",3,"valueChange","customStartTimeChanged","customEndTimeChanged","disableHourlySlot","customTimeSlot","minToTime","timeSlotDiscounts","maxFromTime","minFromTime","hideDiscountLabels","showAsterisks"],[1,"row","m--t-5","m--b-5"],["class","row m--t-5 m--b-5",4,"ngIf"],[1,"form-operations"],["wrapperId","Search_CheckAvailability_Button",1,"block",3,"disabled"],["translate",""],["wrapperId","Booking_Search_NumberOfPeopleCounter","formControlName","numberOfPeople",3,"labelText","minimumCount","maximumCount"],["wrapperId","Booking_Search_RoomConfigurationsDropdown","labelText","SEARCH.FORM.ROOM_CONFIGURATION","formControlName","roomConfigurationType","idKey","id","titleKey","name",3,"options"],[1,"col-xs-12","col-12","padding-mobile"],[3,"notificationType"],[1,"longterm-content"],["translate","",1,"content-1"],["translate","",1,"iwg-body2"],[3,"openChange","open","flyoutOverFlyout","productType"]],template:function(X,tt){1&X&&(v.DNE(0,Fe,23,17,"iwg-modal-flyout",5)(1,He,2,5,"iwg-provisional-enquiry-flyout",6),v.nI1(2,"async")),2&X&&(v.Y8G("iwgModal",!0),v.R7$(),v.Y8G("ngIf",v.bMT(2,2,tt.showProvisionalVOFlyout$)))},dependencies:[Te.z,E.V,t.qT,t.BC,t.cb,t.j4,t.JD,F.P,L.bT,ft.Mm,K.Q,Tt.O,St._,$.y,ae.h,ne.s,de.P,vt,Jt.q,Gt.h,wt.Z,ee.ud,me.q,L.Jj,ft.D9],styles:['body[_ngcontent-%COMP%]{color:var(--color-text-primary, var(--brand-neutral-900, #0A0428))}h1[_ngcontent-%COMP%], .iwg-h1[_ngcontent-%COMP%]{font-family:var(--h1-font-family, var(--font-family-primary, "Merriweather", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--h1-font-size, var(--scale-700, 4rem));font-weight:var(--h1-font-weight, var(--font-weight-light, 300));line-height:var(--h1-line-height, 1.2);letter-spacing:var(--h1-letter-spacing, normal);color:var(--color-text-primary, var(--brand-neutral-900, #0A0428))}@media (max-width: 1023.98px){h1[_ngcontent-%COMP%], .iwg-h1[_ngcontent-%COMP%]{font-family:var(--mobile-h1-font-family, var(--font-family-primary, "Merriweather", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--mobile-h1-font-size, var(--scale-600, 3.2rem));font-weight:var(--mobile-h1-font-weight, var(--font-weight-normal, 400));line-height:var(--mobile-h1-line-height, 1.2);letter-spacing:var(--mobile-h1-letter-spacing, normal)}}.inverted[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%], h1.inverted[_ngcontent-%COMP%], .inverted[_ngcontent-%COMP%]   .iwg-h1[_ngcontent-%COMP%], .iwg-h1.inverted[_ngcontent-%COMP%]{color:var(--global-neutral-100, #FFFFFF)}h2[_ngcontent-%COMP%], .iwg-h2[_ngcontent-%COMP%]{font-family:var(--h2-font-family, var(--font-family-primary, "Merriweather", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--h2-font-size, var(--scale-600, 3.2rem));
1font-weight:var(--h2-font-weight, var(--font-weight-light, 300));line-height:var(--h2-line-height, 1.3);letter-spacing:var(--h2-letter-spacing, normal);color:var(--color-text-primary, var(--brand-neutral-900, #0A0428))}@media (max-width: 1023.98px){h2[_ngcontent-%COMP%], .iwg-h2[_ngcontent-%COMP%]{font-family:var(--mobile-h2-font-family, var(--font-family-primary, "Merriweather", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--mobile-h2-font-size, var(--scale-550, 2.8rem));font-weight:var(--mobile-h2-font-weight, var(--font-weight-normal, 400));line-height:var(--mobile-h2-line-height, 1.3);letter-spacing:var(--mobile-h2-letter-spacing, normal)}}.inverted[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%], h2.inverted[_ngcontent-%COMP%], .inverted[_ngcontent-%COMP%]   .iwg-h2[_ngcontent-%COMP%], .iwg-h2.inverted[_ngcontent-%COMP%]{color:var(--global-neutral-100, #FFFFFF)}h3[_ngcontent-%COMP%], .iwg-h3[_ngcontent-%COMP%]{font-family:var(--h3-font-family, var(--font-family-primary, "Merriweather", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--h3-font-size, var(--scale-550, 2.8rem));font-weight:var(--h3-font-weight, var(--font-weight-light, 300));line-height:var(--h3-line-height, 1.3);letter-spacing:var(--h3-letter-spacing, normal);color:var(--color-text-primary, var(--brand-neutral-900, #0A0428))}@media (max-width: 1023.98px){h3[_ngcontent-%COMP%], .iwg-h3[_ngcontent-%COMP%]{font-family:var(--mobile-h3-font-family, var(--font-family-primary, "Merriweather", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--mobile-h3-font-size, var(--scale-500, 2.4rem));font-weight:var(--mobile-h3-font-weight, var(--font-weight-normal, 400));line-height:var(--mobile-h3-line-height, 1.3);letter-spacing:var(--mobile-h3-letter-spacing, normal)}}.inverted[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%], h3.inverted[_ngcontent-%COMP%], .inverted[_ngcontent-%COMP%]   .iwg-h3[_ngcontent-%COMP%], .iwg-h3.inverted[_ngcontent-%COMP%]{color:var(--global-neutral-100, #FFFFFF)}h4.bold[_ngcontent-%COMP%], .iwg-h4-bold[_ngcontent-%COMP%]{font-family:var(--h4-bold-font-family, var(--font-family-primary, "Merriweather", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--h4-bold-font-size, var(--h4-font-size, var(--scale-500, 2.4rem)));font-weight:var(--h4-bold-font-weight, var(--font-weight-bold, 700));line-height:var(--h4-bold-line-height, var(--h4-line-height, 1.3));letter-spacing:var(--h4-bold-letter-spacing, var(--h4-letter-spacing, normal));color:var(--color-text-primary, var(--brand-neutral-900, #0A0428))}@media (max-width: 1023.98px){h4.bold[_ngcontent-%COMP%], .iwg-h4-bold[_ngcontent-%COMP%]{font-family:var(--mobile-h4-bold-font-family, var(--font-family-primary, "Merriweather", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--mobile-h4-bold-font-size, var(--mobile-h4-font-size, var(--scale-450, 2rem)));font-weight:var(--mobile-h4-bold-font-weight, var(--font-weight-bold, 700));line-height:var(--mobile-h4-bold-line-height, var(--mobile-h4-line-height, 1.3));letter-spacing:var(--mobile-h4-bold-letter-spacing, var(--mobile-h4-letter-spacing, normal))}}.inverted[_ngcontent-%COMP%]   h4.bold[_ngcontent-%COMP%], h4.bold.inverted[_ngcontent-%COMP%], .inverted[_ngcontent-%COMP%]   .iwg-h4-bold[_ngcontent-%COMP%], .iwg-h4-bold.inverted[_ngcontent-%COMP%]{color:var(--global-neutral-100, #FFFFFF)}h4.medium[_ngcontent-%COMP%], .iwg-h4-medium[_ngcontent-%COMP%]{font-family:var(--h4-medium-font-family, var(--font-family-primary, "Merriweather", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--h4-medium-font-size, var(--h4-font-size, var(--scale-500, 2.4rem)));font-weight:var(--h4-medium-font-weight, var(--font-weight-medium, 500));line-height:var(--h4-medium-line-height, var(--h4-line-height, 1.3));letter-spacing:var(--h4-medium-letter-spacing, var(--h4-letter-spacing, normal));color:var(--color-text-primary, var(--brand-neutral-900, #0A0428))}
1@media (max-width: 1023.98px){h4.medium[_ngcontent-%COMP%], .iwg-h4-medium[_ngcontent-%COMP%]{font-family:var(--mobile-h4-medium-font-family, var(--font-family-primary, "Merriweather", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--mobile-h4-medium-font-size, var(--mobile-h4-font-size, var(--scale-450, 2rem)));font-weight:var(--mobile-h4-medium-font-weight, var(--font-weight-medium, 500));line-height:var(--mobile-h4-medium-line-height, var(--mobile-h4-line-height, 1.3));letter-spacing:var(--mobile-h4-medium-letter-spacing, var(--mobile-h4-letter-spacing, normal))}}.inverted[_ngcontent-%COMP%]   h4.medium[_ngcontent-%COMP%], h4.medium.inverted[_ngcontent-%COMP%], .inverted[_ngcontent-%COMP%]   .iwg-h4-medium[_ngcontent-%COMP%], .iwg-h4-medium.inverted[_ngcontent-%COMP%]{color:var(--global-neutral-100, #FFFFFF)}h4[_ngcontent-%COMP%], .iwg-h4[_ngcontent-%COMP%]{font-family:var(--h4-font-family, var(--font-family-primary, "Merriweather", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--h4-font-size, var(--scale-500, 2.4rem));font-weight:var(--h4-font-weight, var(--font-weight-light, 300));line-height:var(--h4-line-height, 1.3);letter-spacing:var(--h4-letter-spacing, normal);color:var(--color-text-primary, var(--brand-neutral-900, #0A0428))}@media (max-width: 1023.98px){h4[_ngcontent-%COMP%], .iwg-h4[_ngcontent-%COMP%]{font-family:var(--mobile-h4-font-family, var(--font-family-primary, "Merriweather", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--mobile-h4-font-size, var(--scale-450, 2rem));font-weight:var(--mobile-h4-font-weight, var(--font-weight-normal, 400));line-height:var(--mobile-h4-line-height, 1.3);letter-spacing:var(--mobile-h4-letter-spacing, normal)}}.inverted[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%], h4.inverted[_ngcontent-%COMP%], .inverted[_ngcontent-%COMP%]   .iwg-h4[_ngcontent-%COMP%], .iwg-h4.inverted[_ngcontent-%COMP%]{color:var(--global-neutral-100, #FFFFFF)}h5.bold[_ngcontent-%COMP%], .iwg-h5-bold[_ngcontent-%COMP%]{font-family:var(--h5-bold-font-family, var(--font-family-primary, "Merriweather", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--h5-bold-font-size, var(--h5-font-size, var(--scale-420, 1.8rem)));font-weight:var(--h5-bold-font-weight, var(--font-weight-bold, 700));line-height:var(--h5-bold-line-height, var(--h5-line-height, 1.3));letter-spacing:var(--h5-bold-letter-spacing, var(--h5-letter-spacing, normal));color:var(--color-text-primary, var(--brand-neutral-900, #0A0428))}@media (max-width: 1023.98px){h5.bold[_ngcontent-%COMP%], .iwg-h5-bold[_ngcontent-%COMP%]{font-family:var(--mobile-h5-bold-font-family, var(--font-family-primary, "Merriweather", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--mobile-h5-bold-font-size, var(--mobile-h5-font-size, var(--scale-400, 1.6rem)));font-weight:var(--mobile-h5-bold-font-weight, var(--font-weight-bold, 700));line-height:var(--mobile-h5-bold-line-height, var(--mobile-h5-line-height, 1.3));letter-spacing:var(--mobile-h5-bold-letter-spacing, var(--mobile-h5-letter-spacing, normal))}}.inverted[_ngcontent-%COMP%]   h5.bold[_ngcontent-%COMP%], h5.bold.inverted[_ngcontent-%COMP%], .inverted[_ngcontent-%COMP%]   .iwg-h5-bold[_ngcontent-%COMP%], .iwg-h5-bold.inverted[_ngcontent-%COMP%]{color:var(--global-neutral-100, #FFFFFF)}h5.medium[_ngcontent-%COMP%], .iwg-h5-medium[_ngcontent-%COMP%]{font-family:var(--h5-medium-font-family, var(--font-family-primary, "Merriweather", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--h5-medium-font-size, var(--h5-font-size, var(--scale-420, 1.8rem)));font-weight:var(--h5-medium-font-weight, var(--font-weight-medium, 500));line-height:var(--h5-medium-line-height, var(--h5-line-height, 1.3));letter-spacing:var(--h5-medium-letter-spacing, var(--h5-letter-spacing, normal));color:var(--color-text-primary, var(--brand-neutral-900, #0A0428))}
1@media (max-width: 1023.98px){h5.medium[_ngcontent-%COMP%], .iwg-h5-medium[_ngcontent-%COMP%]{font-family:var(--mobile-h5-medium-font-family, var(--font-family-primary, "Merriweather", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--mobile-h5-medium-font-size, var(--mobile-h5-font-size, var(--scale-400, 1.6rem)));font-weight:var(--mobile-h5-medium-font-weight, var(--font-weight-medium, 500));line-height:var(--mobile-h5-medium-line-height, var(--mobile-h5-line-height, 1.3));letter-spacing:var(--mobile-h5-medium-letter-spacing, var(--mobile-h5-letter-spacing, normal))}}.inverted[_ngcontent-%COMP%]   h5.medium[_ngcontent-%COMP%], h5.medium.inverted[_ngcontent-%COMP%], .inverted[_ngcontent-%COMP%]   .iwg-h5-medium[_ngcontent-%COMP%], .iwg-h5-medium.inverted[_ngcontent-%COMP%]{color:var(--global-neutral-100, #FFFFFF)}h5[_ngcontent-%COMP%], .iwg-h5[_ngcontent-%COMP%]{font-family:var(--h5-font-family, var(--font-family-primary, "Merriweather", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--h5-font-size, var(--scale-420, 1.8rem));font-weight:var(--h5-font-weight, var(--font-weight-light, 300));line-height:var(--h5-line-height, 1.3);letter-spacing:var(--h5-letter-spacing, normal);color:var(--color-text-primary, var(--brand-neutral-900, #0A0428))}@media (max-width: 1023.98px){h5[_ngcontent-%COMP%], .iwg-h5[_ngcontent-%COMP%]{font-family:var(--mobile-h5-font-family, var(--font-family-primary, "Merriweather", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--mobile-h5-font-size, var(--scale-400, 1.6rem));font-weight:var(--mobile-h5-font-weight, var(--font-weight-normal, 400));line-height:var(--mobile-h5-line-height, 1.3);letter-spacing:var(--mobile-h5-letter-spacing, normal)}}.inverted[_ngcontent-%COMP%]   h5[_ngcontent-%COMP%], h5.inverted[_ngcontent-%COMP%], .inverted[_ngcontent-%COMP%]   .iwg-h5[_ngcontent-%COMP%], .iwg-h5.inverted[_ngcontent-%COMP%]{color:var(--global-neutral-100, #FFFFFF)}h6[_ngcontent-%COMP%], .iwg-h6[_ngcontent-%COMP%]{font-family:var(--h6-font-family, var(--font-family-primary, "Merriweather", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--h6-font-size, var(--scale-400, 1.6rem));font-weight:var(--h6-font-weight, var(--font-weight-light, 300));line-height:var(--h6-line-height, 1.2);letter-spacing:var(--h6-letter-spacing, normal);color:var(--color-text-primary, var(--brand-neutral-900, #0A0428))}@media (max-width: 1023.98px){h6[_ngcontent-%COMP%], .iwg-h6[_ngcontent-%COMP%]{font-family:var(--mobile-h6-font-family, var(--font-family-primary, "Merriweather", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--mobile-h6-font-size, var(--scale-350, 1.4rem));font-weight:var(--mobile-h6-font-weight, var(--font-weight-normal, 400));line-height:var(--mobile-h6-line-height, 1.2);letter-spacing:var(--mobile-h6-letter-spacing, normal)}}.inverted[_ngcontent-%COMP%]   h6[_ngcontent-%COMP%], h6.inverted[_ngcontent-%COMP%], .inverted[_ngcontent-%COMP%]   .iwg-h6[_ngcontent-%COMP%], .iwg-h6.inverted[_ngcontent-%COMP%]{color:var(--global-neutral-100, #FFFFFF)}.iwg-label1[_ngcontent-%COMP%]{font-family:var(--label1-font-family, var(--font-family-secondary, "Roboto", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--label1-font-size, var(--scale-450, 2rem));font-weight:var(--label1-font-weight, var(--font-weight-normal, 400));line-height:var(--label1-line-height, 1.4);letter-spacing:var(--label1-letter-spacing, normal);color:var(--color-text-primary, var(--brand-neutral-900, #0A0428))}@media (max-width: 1023.98px){.iwg-label1[_ngcontent-%COMP%]{font-family:var(--mobile-label1-font-family, var(--font-family-secondary, "Roboto", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--mobile-label1-font-size, var(--scale-450, 2rem));font-weight:var(--mobile-label1-font-weight, var(--font-weight-normal, 400));line-height:var(--mobile-label1-line-height, 1.4);letter-spacing:var(--mobile-label1-letter-spacing, normal)}}.inverted[_ngcontent-%COMP%]   .iwg-label1[_ngcontent-%COMP%], .iwg-label1.inverted[_ngcontent-%COMP%]{color:var(--global-neutral-100, #FFFFFF)}
1.iwg-label1-medium[_ngcontent-%COMP%]{font-family:var(--label1-medium-font-family, var(--label1-font-family, var(--font-family-secondary, "Roboto", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif)));font-size:var(--label1-medium-font-size, var(--label1-font-size, var(--scale-450, 2rem)));font-weight:var(--label1-medium-font-weight, var(--font-weight-medium, 500));line-height:var(--label1-medium-line-height, var(--label1-line-height, 1.4));letter-spacing:var(--label1-medium-letter-spacing, var(--label1-letter-spacing, normal));color:var(--color-text-primary, var(--brand-neutral-900, #0A0428))}@media (max-width: 1023.98px){.iwg-label1-medium[_ngcontent-%COMP%]{font-family:var(--mobile-label1-medium-font-family, var(--mobile-label1-font-family, var(--font-family-secondary, "Roboto", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif)));font-size:var(--mobile-label1-medium-font-size, var(--mobile-label1-font-size, var(--scale-450, 2rem)));font-weight:var(--mobile-label1-medium-font-weight, var(--font-weight-medium, 500));line-height:var(--mobile-label1-medium-line-height, var(--mobile-label1-line-height, 1.4));letter-spacing:var(--mobile-label1-medium-letter-spacing, var(--mobile-label1-letter-spacing, normal))}}.inverted[_ngcontent-%COMP%]   .iwg-label1-medium[_ngcontent-%COMP%], .iwg-label1-medium.inverted[_ngcontent-%COMP%]{color:var(--global-neutral-100, #FFFFFF)}.iwg-label2[_ngcontent-%COMP%]{font-family:var(--label2-font-family, var(--font-family-secondary, "Roboto", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--label2-font-size, var(--scale-420, 1.8rem));font-weight:var(--label2-font-weight, var(--font-weight-normal, 400));line-height:var(--label2-line-height, 1.4);letter-spacing:var(--label2-letter-spacing, normal);color:var(--color-text-primary, var(--brand-neutral-900, #0A0428))}@media (max-width: 1023.98px){.iwg-label2[_ngcontent-%COMP%]{font-family:var(--mobile-label2-font-family, var(--font-family-secondary, "Roboto", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--mobile-label2-font-size, var(--scale-420, 1.8rem));font-weight:var(--mobile-label2-font-weight, var(--font-weight-normal, 400));line-height:var(--mobile-label2-line-height, 1.4);letter-spacing:var(--mobile-label2-letter-spacing, normal)}}.inverted[_ngcontent-%COMP%]   .iwg-label2[_ngcontent-%COMP%], .iwg-label2.inverted[_ngcontent-%COMP%]{color:var(--global-neutral-100, #FFFFFF)}.iwg-label2-medium[_ngcontent-%COMP%]{font-family:var(--label2-medium-font-family, var(--label2-font-family, var(--font-family-secondary, "Roboto", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif)));font-size:var(--label2-medium-font-size, var(--label2-font-size, var(--scale-420, 1.8rem)));font-weight:var(--label2-medium-font-weight, var(--font-weight-medium, 500));line-height:var(--label2-medium-line-height, var(--label2-line-height, 1.4));letter-spacing:var(--label2-medium-letter-spacing, var(--label2-letter-spacing, normal));color:var(--color-text-primary, var(--brand-neutral-900, #0A0428))}@media (max-width: 1023.98px){.iwg-label2-medium[_ngcontent-%COMP%]{font-family:var(--mobile-label2-medium-font-family, var(--mobile-label2-font-family, var(--font-family-secondary, "Roboto", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif)));font-size:var(--mobile-label2-medium-font-size, var(--mobile-label2-font-size, var(--scale-420, 1.8rem)));font-weight:var(--mobile-label2-medium-font-weight, var(--font-weight-medium, 500));line-height:var(--mobile-label2-medium-line-height, var(--mobile-label2-line-height, 1.4));letter-spacing:var(--mobile-label2-medium-letter-spacing, var(--mobile-label2-letter-spacing, normal))}}.inverted[_ngcontent-%COMP%]   .iwg-label2-medium[_ngcontent-%COMP%], .iwg-label2-medium.inverted[_ngcontent-%COMP%]{color:var(--global-neutral-100, #FFFFFF)}.iwg-label3[_ngcontent-%COMP%]{font-family:var(--label3-font-family, var(--font-family-secondary, "Roboto", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--label3-font-size, var(--scale-400, 1.6rem));
1font-weight:var(--label3-font-weight, var(--font-weight-normal, 400));line-height:var(--label3-line-height, 1.3);letter-spacing:var(--label3-letter-spacing, normal);color:var(--color-text-primary, var(--brand-neutral-900, #0A0428))}@media (max-width: 1023.98px){.iwg-label3[_ngcontent-%COMP%]{font-family:var(--mobile-label3-font-family, var(--font-family-secondary, "Roboto", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--mobile-label3-font-size, var(--scale-400, 1.6rem));font-weight:var(--mobile-label3-font-weight, var(--font-weight-normal, 400));line-height:var(--mobile-label3-line-height, 1.3);letter-spacing:var(--mobile-label3-letter-spacing, normal)}}.inverted[_ngcontent-%COMP%]   .iwg-label3[_ngcontent-%COMP%], .iwg-label3.inverted[_ngcontent-%COMP%]{color:var(--global-neutral-100, #FFFFFF)}.iwg-label3-medium[_ngcontent-%COMP%]{font-family:var(--label3-medium-font-family, var(--label3-font-family, var(--font-family-secondary, "Roboto", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif)));font-size:var(--label3-medium-font-size, var(--label3-font-size, var(--scale-400, 1.6rem)));font-weight:var(--label3-medium-font-weight, var(--font-weight-medium, 500));line-height:var(--label3-medium-line-height, 1.4);letter-spacing:var(--label3-medium-letter-spacing, var(--label3-letter-spacing, normal));color:var(--color-text-primary, var(--brand-neutral-900, #0A0428))}@media (max-width: 1023.98px){.iwg-label3-medium[_ngcontent-%COMP%]{font-family:var(--mobile-label3-medium-font-family, var(--mobile-label3-font-family, var(--font-family-secondary, "Roboto", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif)));font-size:var(--mobile-label3-medium-font-size, var(--mobile-label3-font-size, var(--scale-400, 1.6rem)));font-weight:var(--mobile-label3-medium-font-weight, var(--font-weight-medium, 500));line-height:var(--mobile-label3-medium-line-height, 1.4);letter-spacing:var(--mobile-label3-medium-letter-spacing, var(--mobile-label3-letter-spacing, normal))}}.inverted[_ngcontent-%COMP%]   .iwg-label3-medium[_ngcontent-%COMP%], .iwg-label3-medium.inverted[_ngcontent-%COMP%]{color:var(--global-neutral-100, #FFFFFF)}.iwg-body1[_ngcontent-%COMP%]{font-family:var(--body1-font-family, var(--font-family-secondary, "Roboto", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--body1-font-size, 1.6rem);font-weight:var(--body1-font-weight, var(--font-weight-normal, 400));line-height:var(--body1-line-height, 1.4);letter-spacing:var(--body1-letter-spacing, normal);color:var(--color-text-primary, var(--brand-neutral-900, #0A0428))}@media (max-width: 1023.98px){.iwg-body1[_ngcontent-%COMP%]{font-family:var(--mobile-body1-font-family, var(--font-family-secondary, "Roboto", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--mobile-body1-font-size, 1.6rem);font-weight:var(--mobile-body1-font-weight, var(--font-weight-normal, 400));line-height:var(--mobile-body1-line-height, 1.38);letter-spacing:var(--mobile-body1-letter-spacing, normal)}}.inverted[_ngcontent-%COMP%]   .iwg-body1[_ngcontent-%COMP%], .iwg-body1.inverted[_ngcontent-%COMP%]{color:var(--global-neutral-100, #FFFFFF)}.iwg-body2[_ngcontent-%COMP%]{font-family:var(--body2-font-family, var(--font-family-secondary, "Roboto", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--body2-font-size, 1.4rem);font-weight:var(--body2-font-weight, var(--font-weight-normal, 400));line-height:var(--body2-line-height, 1.45);letter-spacing:var(--body2-letter-spacing, normal);color:var(--color-text-primary, var(--brand-neutral-900, #0A0428))}@media (max-width: 1023.98px){.iwg-body2[_ngcontent-%COMP%]{font-family:var(--mobile-body2-font-family, var(--font-family-secondary, "Roboto", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--mobile-body2-font-size, 1.4rem);
1font-weight:var(--mobile-body2-font-weight, var(--font-weight-normal, 400));line-height:var(--mobile-body2-line-height, 1.43);letter-spacing:var(--mobile-body2-letter-spacing, normal)}}.inverted[_ngcontent-%COMP%]   .iwg-body2[_ngcontent-%COMP%], .iwg-body2.inverted[_ngcontent-%COMP%]{color:var(--global-neutral-100, #FFFFFF)}.iwg-body3[_ngcontent-%COMP%]{font-family:var(--body3-font-family, var(--font-family-secondary, "Roboto", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--body3-font-size, 1.2rem);font-weight:var(--body3-font-weight, var(--font-weight-normal, 400));line-height:var(--body3-line-height, 1.5);letter-spacing:var(--body3-letter-spacing, normal);color:var(--color-text-primary, var(--brand-neutral-900, #0A0428))}@media (max-width: 1023.98px){.iwg-body3[_ngcontent-%COMP%]{font-family:var(--mobile-body3-font-family, var(--font-family-secondary, "Roboto", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--mobile-body3-font-size, 1.2rem);
1font-weight:var(--mobile-body3-font-weight, var(--font-weight-normal, 400));line-height:var(--mobile-body3-line-height, 1.5);letter-spacing:var(--mobile-body3-letter-spacing, normal)}}.inverted[_ngcontent-%COMP%]   .iwg-body3[_ngcontent-%COMP%], .iwg-body3.inverted[_ngcontent-%COMP%]{color:var(--global-neutral-100, #FFFFFF)}.iwg-field-hint[_ngcontent-%COMP%]{font-family:var(--body1-font-family, var(--font-family-secondary, "Roboto", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--body1-font-size, 1.6rem);font-weight:var(--body1-font-weight, var(--font-weight-normal, 400));line-height:var(--body1-line-height, 1.4);letter-spacing:var(--body1-letter-spacing, normal);color:var(--color-text-primary, var(--brand-neutral-900, #0A0428))}@media (max-width: 1023.98px){.iwg-field-hint[_ngcontent-%COMP%]{font-family:var(--mobile-body1-font-family, var(--font-family-secondary, "Roboto", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--mobile-body1-font-size, 1.6rem);font-weight:var(--mobile-body1-font-weight, var(--font-weight-normal, 400));line-height:var(--mobile-body1-line-height, 1.38);letter-spacing:var(--mobile-body1-letter-spacing, normal)}}.inverted[_ngcontent-%COMP%]   .iwg-field-hint[_ngcontent-%COMP%], .iwg-field-hint.inverted[_ngcontent-%COMP%]{color:var(--global-neutral-100, #FFFFFF)}.iwg-field-input[_ngcontent-%COMP%]{font-family:var(--body1-font-family, var(--font-family-secondary, "Roboto", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--body1-font-size, 1.6rem);font-weight:var(--body1-font-weight, var(--font-weight-normal, 400));line-height:var(--body1-line-height, 1.4);letter-spacing:var(--body1-letter-spacing, normal);color:var(--color-text-primary, var(--brand-neutral-900, #0A0428))}@media (max-width: 1023.98px){.iwg-field-input[_ngcontent-%COMP%]{font-family:var(--mobile-body1-font-family, var(--font-family-secondary, "Roboto", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--mobile-body1-font-size, 1.6rem);font-weight:var(--mobile-body1-font-weight, var(--font-weight-normal, 400));line-height:var(--mobile-body1-line-height, 1.38);letter-spacing:var(--mobile-body1-letter-spacing, normal)}}.inverted[_ngcontent-%COMP%]   .iwg-field-input[_ngcontent-%COMP%], .iwg-field-input.inverted[_ngcontent-%COMP%]{color:var(--global-neutral-100, #FFFFFF)}.iwg-breadcrumb[_ngcontent-%COMP%]{font-family:var(--body3-font-family, var(--font-family-secondary, "Roboto", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--body3-font-size, 1.2rem);
1font-weight:var(--body3-font-weight, var(--font-weight-normal, 400));line-height:var(--body3-line-height, 1.5);letter-spacing:var(--body3-letter-spacing, normal);color:var(--color-text-primary, var(--brand-neutral-900, #0A0428));color:var(--global-neutral-900, #202020)}@media (max-width: 1023.98px){.iwg-breadcrumb[_ngcontent-%COMP%]{font-family:var(--mobile-body3-font-family, var(--font-family-secondary, "Roboto", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--mobile-body3-font-size, 1.2rem);font-weight:var(--mobile-body3-font-weight, var(--font-weight-normal, 400));line-height:var(--mobile-body3-line-height, 1.5);letter-spacing:var(--mobile-body3-letter-spacing, normal)}}@media screen and (min-width: 1024px) and (max-width: 1290px){.iwg-breadcrumb[_ngcontent-%COMP%]{font-family:var(--body2-font-family, var(--font-family-secondary, "Roboto", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--body2-font-size, 1.4rem);font-weight:var(--body2-font-weight, var(--font-weight-normal, 400));line-height:var(--body2-line-height, 1.45);letter-spacing:var(--body2-letter-spacing, normal);color:var(--color-text-primary, var(--brand-neutral-900, #0A0428))}}@media screen and (min-width: 1024px) and (max-width: 1290px) and (max-width: 1023.98px){.iwg-breadcrumb[_ngcontent-%COMP%]{font-family:var(--mobile-body2-font-family, var(--font-family-secondary, "Roboto", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--mobile-body2-font-size, 1.4rem);font-weight:var(--mobile-body2-font-weight, var(--font-weight-normal, 400));line-height:var(--mobile-body2-line-height, 1.43);letter-spacing:var(--mobile-body2-letter-spacing, normal)}}@media screen and (min-width: 1024px) and (max-width: 1290px){.inverted[_ngcontent-%COMP%]   .iwg-breadcrumb[_ngcontent-%COMP%], .iwg-breadcrumb.inverted[_ngcontent-%COMP%]{color:var(--global-neutral-100, #FFFFFF)}}.inverted[_ngcontent-%COMP%]   .iwg-breadcrumb[_ngcontent-%COMP%], .iwg-breadcrumb.inverted[_ngcontent-%COMP%]{color:var(--global-neutral-100, #FFFFFF)}.iwg-feedback-error[_ngcontent-%COMP%]{font-family:var(--body2-font-family, var(--font-family-secondary, "Roboto", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--body2-font-size, 1.4rem);font-weight:var(--body2-font-weight, var(--font-weight-normal, 400));line-height:var(--body2-line-height, 1.45);letter-spacing:var(--body2-letter-spacing, normal);color:var(--color-text-primary, var(--brand-neutral-900, #0A0428));line-height:normal;color:var(--color-text-error, var(--global-functional-red, #EE421C))}@media (max-width: 1023.98px){.iwg-feedback-error[_ngcontent-%COMP%]{font-family:var(--mobile-body2-font-family, var(--font-family-secondary, "Roboto", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--mobile-body2-font-size, 1.4rem);font-weight:var(--mobile-body2-font-weight, var(--font-weight-normal, 400));line-height:var(--mobile-body2-line-height, 1.43);letter-spacing:var(--mobile-body2-letter-spacing, normal)}}.inverted[_ngcontent-%COMP%]   .iwg-feedback-error[_ngcontent-%COMP%], .iwg-feedback-error.inverted[_ngcontent-%COMP%]{color:var(--global-neutral-100, #FFFFFF)}@media (max-width: 1023.98px){.iwg-feedback-error[_ngcontent-%COMP%]{font-family:var(--body3-font-family, var(--font-family-secondary, "Roboto", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--body3-font-size, 1.2rem);
1font-weight:var(--body3-font-weight, var(--font-weight-normal, 400));line-height:var(--body3-line-height, 1.5);letter-spacing:var(--body3-letter-spacing, normal);color:var(--color-text-primary, var(--brand-neutral-900, #0A0428));line-height:normal;color:var(--color-text-error, var(--global-functional-red, #EE421C))}}@media (max-width: 1023.98px) and (max-width: 1023.98px){.iwg-feedback-error[_ngcontent-%COMP%]{font-family:var(--mobile-body3-font-family, var(--font-family-secondary, "Roboto", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--mobile-body3-font-size, 1.2rem);font-weight:var(--mobile-body3-font-weight, var(--font-weight-normal, 400));line-height:var(--mobile-body3-line-height, 1.5);letter-spacing:var(--mobile-body3-letter-spacing, normal)}}@media (max-width: 1023.98px){.inverted[_ngcontent-%COMP%]   .iwg-feedback-error[_ngcontent-%COMP%], .iwg-feedback-error.inverted[_ngcontent-%COMP%]{color:var(--global-neutral-100, #FFFFFF)}}.iwg-page-header-title[_ngcontent-%COMP%]{font-family:var(--h2-font-family, var(--font-family-primary, "Merriweather", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--h2-font-size, var(--scale-600, 3.2rem));font-weight:var(--h2-font-weight, var(--font-weight-light, 300));line-height:var(--h2-line-height, 1.3);letter-spacing:var(--h2-letter-spacing, normal);color:var(--color-text-primary, var(--brand-neutral-900, #0A0428));margin-bottom:1.6rem}@media (max-width: 1023.98px){.iwg-page-header-title[_ngcontent-%COMP%]{font-family:var(--mobile-h2-font-family, var(--font-family-primary, "Merriweather", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--mobile-h2-font-size, var(--scale-550, 2.8rem));font-weight:var(--mobile-h2-font-weight, var(--font-weight-normal, 400));line-height:var(--mobile-h2-line-height, 1.3);letter-spacing:var(--mobile-h2-letter-spacing, normal)}}.inverted[_ngcontent-%COMP%]   .iwg-page-header-title[_ngcontent-%COMP%], .iwg-page-header-title.inverted[_ngcontent-%COMP%]{color:var(--global-neutral-100, #FFFFFF)}.iwg-page-header-sub-title[_ngcontent-%COMP%]{font-family:var(--body1-font-family, var(--font-family-secondary, "Roboto", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--body1-font-size, 1.6rem);font-weight:var(--body1-font-weight, var(--font-weight-normal, 400));line-height:var(--body1-line-height, 1.4);letter-spacing:var(--body1-letter-spacing, normal);color:var(--color-text-primary, var(--brand-neutral-900, #0A0428))}@media (max-width: 1023.98px){.iwg-page-header-sub-title[_ngcontent-%COMP%]{font-family:var(--mobile-body1-font-family, var(--font-family-secondary, "Roboto", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--mobile-body1-font-size, 1.6rem);font-weight:var(--mobile-body1-font-weight, var(--font-weight-normal, 400));line-height:var(--mobile-body1-line-height, 1.38);letter-spacing:var(--mobile-body1-letter-spacing, normal)}}.inverted[_ngcontent-%COMP%]   .iwg-page-header-sub-title[_ngcontent-%COMP%], .iwg-page-header-sub-title.inverted[_ngcontent-%COMP%]{color:var(--global-neutral-100, #FFFFFF)}.iwg-page-title[_ngcontent-%COMP%]{font-family:var(--h4-font-family, var(--font-family-primary, "Merriweather", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--h4-font-size, var(--scale-500, 2.4rem));font-weight:var(--h4-font-weight, var(--font-weight-light, 300));line-height:var(--h4-line-height, 1.3);letter-spacing:var(--h4-letter-spacing, normal);color:var(--color-text-primary, var(--brand-neutral-900, #0A0428));margin-bottom:2.4rem;display:flex}@media (max-width: 1023.98px){.iwg-page-title[_ngcontent-%COMP%]{font-family:var(--mobile-h4-font-family, var(--font-family-primary, "Merriweather", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--mobile-h4-font-size, var(--scale-450, 2rem));
1font-weight:var(--mobile-h4-font-weight, var(--font-weight-normal, 400));line-height:var(--mobile-h4-line-height, 1.3);letter-spacing:var(--mobile-h4-letter-spacing, normal)}}.inverted[_ngcontent-%COMP%]   .iwg-page-title[_ngcontent-%COMP%], .iwg-page-title.inverted[_ngcontent-%COMP%]{color:var(--global-neutral-100, #FFFFFF)}.iwg-page-title--with-link[_ngcontent-%COMP%]{font-family:var(--h4-font-family, var(--font-family-primary, "Merriweather", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--h4-font-size, var(--scale-500, 2.4rem));font-weight:var(--h4-font-weight, var(--font-weight-light, 300));line-height:var(--h4-line-height, 1.3);letter-spacing:var(--h4-letter-spacing, normal);color:var(--color-text-primary, var(--brand-neutral-900, #0A0428));margin-bottom:2.4rem;display:flex}@media (max-width: 1023.98px){.iwg-page-title--with-link[_ngcontent-%COMP%]{font-family:var(--mobile-h4-font-family, var(--font-family-primary, "Merriweather", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--mobile-h4-font-size, var(--scale-450, 2rem));font-weight:var(--mobile-h4-font-weight, var(--font-weight-normal, 400));line-height:var(--mobile-h4-line-height, 1.3);letter-spacing:var(--mobile-h4-letter-spacing, normal)}}.inverted[_ngcontent-%COMP%]   .iwg-page-title--with-link[_ngcontent-%COMP%], .iwg-page-title--with-link.inverted[_ngcontent-%COMP%]{color:var(--global-neutral-100, #FFFFFF)}@media (max-width: 1023.98px){.iwg-page-title--with-link[_ngcontent-%COMP%]{flex-direction:column;gap:.8rem}}.menu-item-title[_ngcontent-%COMP%]{font-family:var(--body2-font-family, var(--font-family-secondary, "Roboto", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--body2-font-size, 1.4rem);font-weight:var(--body2-font-weight, var(--font-weight-normal, 400));line-height:var(--body2-line-height, 1.45);letter-spacing:var(--body2-letter-spacing, normal);color:var(--color-text-primary, var(--brand-neutral-900, #0A0428))}@media (max-width: 1023.98px){.menu-item-title[_ngcontent-%COMP%]{font-family:var(--mobile-body2-font-family, var(--font-family-secondary, "Roboto", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--mobile-body2-font-size, 1.4rem);font-weight:var(--mobile-body2-font-weight, var(--font-weight-normal, 400));line-height:var(--mobile-body2-line-height, 1.43);letter-spacing:var(--mobile-body2-letter-spacing, normal)}}.inverted[_ngcontent-%COMP%]   .menu-item-title[_ngcontent-%COMP%], .menu-item-title.inverted[_ngcontent-%COMP%]{color:var(--global-neutral-100, #FFFFFF)}@media screen and (min-width: 1024px) and (max-width: 1290px){.menu-item-title[_ngcontent-%COMP%]{font-family:var(--body1-font-family, var(--font-family-secondary, "Roboto", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--body1-font-size, 1.6rem);font-weight:var(--body1-font-weight, var(--font-weight-normal, 400));line-height:var(--body1-line-height, 1.4);letter-spacing:var(--body1-letter-spacing, normal);color:var(--color-text-primary, var(--brand-neutral-900, #0A0428))}}@media screen and (min-width: 1024px) and (max-width: 1290px) and (max-width: 1023.98px){.menu-item-title[_ngcontent-%COMP%]{font-family:var(--mobile-body1-font-family, var(--font-family-secondary, "Roboto", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));font-size:var(--mobile-body1-font-size, 1.6rem);font-weight:var(--mobile-body1-font-weight, var(--font-weight-normal, 400));line-height:var(--mobile-body1-line-height, 1.38);letter-spacing:var(--mobile-body1-letter-spacing, normal)}}@media screen and (min-width: 1024px) and (max-width: 1290px){.inverted[_ngcontent-%COMP%]   .menu-item-title[_ngcontent-%COMP%], .menu-item-title.inverted[_ngcontent-%COMP%]{color:var(--global-neutral-100, #FFFFFF)}}.align-baseline[_ngcontent-%COMP%]{vertical-align:baseline}.align-middle[_ngcontent-%COMP%]{vertical-align:middle}.font-bold[_ngcontent-%COMP%]{font-weight:var(--font-weight-bold, 700)}
1.font-medium[_ngcontent-%COMP%]{font-weight:var(--font-weight-medium, 500)}.font-normal[_ngcontent-%COMP%]{font-weight:var(--font-weight-normal, 400)}.font-light[_ngcontent-%COMP%]{font-weight:var(--font-weight-light, 300)}.singleline-ellipsis[_ngcontent-%COMP%]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.multiline-ellipsis-2[_ngcontent-%COMP%]{overflow:hidden;word-wrap:break-word;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;text-overflow:ellipsis}.multiline-ellipsis-3[_ngcontent-%COMP%]{overflow:hidden;word-wrap:break-word;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;text-overflow:ellipsis}.multiline-ellipsis-4[_ngcontent-%COMP%]{overflow:hidden;word-wrap:break-word;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;text-overflow:ellipsis}.multiline-ellipsis-5[_ngcontent-%COMP%]{overflow:hidden;word-wrap:break-word;display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;text-overflow:ellipsis}.centre-search-flyout[_ngcontent-%COMP%]{flex-grow:1;display:flex;flex-direction:column;min-height:0}.centre-search-flyout__content[_ngcontent-%COMP%]{padding-bottom:1rem;flex-grow:1;overflow:inherit;min-height:100%}.centre-search-flyout__content[_ngcontent-%COMP%]   .row__col--xs-12[_ngcontent-%COMP%]{flex-basis:100%}.centre-search-flyout__content[_ngcontent-%COMP%]   .form-operations[_ngcontent-%COMP%]{margin-top:3rem}@media (max-width: 1023.98px){.centre-search-flyout__content[_ngcontent-%COMP%]   .form-operations[_ngcontent-%COMP%]{margin-top:1rem}}@media (max-width: 1023.98px){.centre-search-flyout__content[_ngcontent-%COMP%]   .row[_ngcontent-%COMP%]{flex-direction:column}}@media (max-width: 1023.98px){.centre-search-flyout[_ngcontent-%COMP%]{padding-top:0}.centre-search-flyout__formwrapper[_ngcontent-%COMP%]{margin:0 1rem}}form[_ngcontent-%COMP%]   iwg-loader[_ngcontent-%COMP%]{height:10rem}@media (max-width: 1023.98px){.padding-mobile[_ngcontent-%COMP%]{padding-inline:var(--spacing-xs, var(--scale-400, 1.6rem))}}.longterm-content[_ngcontent-%COMP%]{flex:1;margin:var(--spacing-med, var(--scale-600, 3.2rem)) var(--spacing-none, var(--scale-0, 0)) var(--spacing-xxxs, var(--scale-200, .8rem))}.longterm-content[_ngcontent-%COMP%]   .content-1[_ngcontent-%COMP%]{display:block;font-family:var(--label1-medium-font-family, var(--label1-font-family, var(--font-family-secondary, "Roboto", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif)));font-size:var(--label1-medium-font-size, var(--label1-font-size, var(--scale-450, 2rem)));font-weight:var(--label1-medium-font-weight, var(--font-weight-medium, 500));line-height:var(--label1-medium-line-height, var(--label1-line-height, 1.4));letter-spacing:var(--label1-medium-letter-spacing, var(--label1-letter-spacing, normal));color:var(--color-text-primary, var(--brand-neutral-900, #0A0428));margin-bottom:var(--spacing-xxxs, var(--scale-200, .8rem))}@media (max-width: 1023.98px){.longterm-content[_ngcontent-%COMP%]   .content-1[_ngcontent-%COMP%]{font-family:var(--mobile-label1-medium-font-family, var(--mobile-label1-font-family, var(--font-family-secondary, "Roboto", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif)));font-size:var(--mobile-label1-medium-font-size, var(--mobile-label1-font-size, var(--scale-450, 2rem)));font-weight:var(--mobile-label1-medium-font-weight, var(--font-weight-medium, 500));line-height:var(--mobile-label1-medium-line-height, var(--mobile-label1-line-height, 1.4));letter-spacing:var(--mobile-label1-medium-letter-spacing, var(--mobile-label1-letter-spacing, normal))}}.inverted[_ngcontent-%COMP%]   .longterm-content[_ngcontent-%COMP%]   .content-1[_ngcontent-%COMP%], .longterm-content[_ngcontent-%COMP%]   .content-1.inverted[_ngcontent-%COMP%]{color:var(--global-neutral-100, #FFFFFF)}.longterm-content[_ngcontent-%COMP%]   .content-1--condensed[_ngcontent-%COMP%]{margin-bottom:0}.search-virtual-office[_ngcontent-%COMP%]{overflow:hidden;padding-top:.5rem}@media (max-width: 1023.98px){.product-button[_ngcontent-%COMP%]{display:block}}.centre-search_stretch[_ngcontent-%COMP%]{flex:1}.flyout-divider-wrapper[_ngcontent-%COMP%]{margin-top:var(--spacing-med, var(--scale-600, 3.2rem))}.option-flag-wrapper[_ngcontent-%COMP%]{display:flex;gap:var(--spacing-xxs, var(--scale-300, 1.2rem));align-items:center}']})}}return Bt})()},69188:(lt,O,e)=>{e.d(O,{ud:()=>C});var t=e(18224),n=e(21413),d=e(56977),s=e(54438),_=e(15693);function f(T,m){if(1&T&&s.nrm(0,"iwg-list-item",1),2&T){const I=m.$implicit,y=s.XpG();s.Y8G("title",y.getTitle(I))("description",y.getDescription(I))("leadingIconClass",I.icon)("wrapperId","Booking_Search_Feature_"+I.icon)}}const g_WIFI="SEARCH.FEATURES.WIFI",g_AV_HELP="SEARCH.FEATURES.AV_HELP",h_WIFI="iwg-icon-wifi";let C=(()=>{class T{constructor(){this.unsubscribe$=new n.B,this.defaultProductFeatures=[{icon:h_WIFI,text:g_WIFI},{icon:"iwg-icon-av-help",text:g_AV_HELP},{icon:"iwg-icon-pencil",text:"SEARCH.FEATURES.FLIPCHARTS"},{icon:"iwg-icon-screen-share",text:"SEARCH.FEATURES.AV_SCREENS"}],this.productFeatures=new Map([[t.c.VirtualOffice,[{icon:"iwg-icon-mail",text:"SEARCH.VIRTUAL_OFFICE_FEATURES.MAIL_POST"},{icon:"iwg-icon-globe",text:"SEARCH.VIRTUAL_OFFICE_FEATURES.BUSINESS_ADDRESS"},{icon:"iwg-icon-phone",text:"SEARCH.VIRTUAL_OFFICE_FEATURES.CONTACT"},{icon:"iwg-icon-contact",text:"SEARCH.VIRTUAL_OFFICE_FEATURES.TELEPHONE"},{icon:"iwg-icon-file",text:"SEARCH.VIRTUAL_OFFICE_FEATURES.ADMIN"},{icon:"iwg-icon-product-coworking",text:"SEARCH.VIRTUAL_OFFICE_FEATURES.PRODUCT_COWORKING"}]],[t.c.Membership,[{icon:"iwg-icon-file-text",title:"SEARCH.MEMBERSHIP.FLEXIBLE_TERMS_TITLE",text:"SEARCH.MEMBERSHIP.FLEXIBLE_TERMS_DESCRIPTION"},{icon:"iwg-icon-globe",title:"SEARCH.MEMBERSHIP.BUSINESS_EVERYWHERE_TITLE",text:"SEARCH.MEMBERSHIP.BUSINESS_EVERYWHERE_DESCRIPTION"},{icon:"iwg-icon-solution-membership",title:"SEARCH.MEMBERSHIP.REAL_BUSINESS_CENTERS_TITLE",text:"SEARCH.MEMBERSHIP.REAL_BUSINESS_CENTERS_DESCRIPTION"}]],[t.c.DayOffice,[{icon:h_WIFI,text:g_WIFI},{icon:"iwg-icon-av-help",text:g_AV_HELP},{icon:"iwg-icon-furniture",text:"SEARCH.FEATURES.FURNITURE_SETUP"}]],[t.c.DayCampus,[{icon:h_WIFI,text:g_WIFI},{icon:"iwg-icon-av-help",text:g_AV_HELP},{icon:"iwg-icon-furniture",text:"SEARCH.FEATURES.DEDICATED_WORKSPACE"}]]])}ngOnInit(){this.productTypeId?.pipe((0,d.Q)(this.unsubscribe$)).subscribe(()=>{this.getProductFeatures()})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}getProductFeatures(){switch(this.productTypeId?.value){case t.c.VirtualOffice:return this.productFeatures.get(t.c.VirtualOffice);case t.c.Membership:return this.productFeatures.get(t.c.Membership);case t.c.DayOffice:return this.productFeatures.get(t.c.DayOffice);case t.c.DayCampus:return this.productFeatures.get(t.c.DayCampus);default:return this.defaultProductFeatures}}getTitle(I){return I.title?I.title:I.text}getDescription(I){return I.title?I.text:null}static{this.\u0275fac=function(y){return new(y||T)}}static{this.\u0275cmp=s.VBU({type:T,selectors:[["iwg-search-key-features"]],inputs:{defaultProductFeatures:"defaultProductFeatures",productTypeId:"productTypeId"}
1,decls:3,vars:0,consts:[[1,"search-key-features"],[1,"not-clickable","accent-icon",3,"title","description","leadingIconClass","wrapperId"]],template:function(y,o){1&y&&(s.j41(0,"div",0),s.Z7z(1,f,1,4,"iwg-list-item",1,s.fX1),s.k0s()),2&y&&(s.R7$(),s.Dyx(o.getProductFeatures()))},dependencies:[_.P],styles:[".search-key-features[_ngcontent-%COMP%]{padding-block:var(--spacing-xs, var(--scale-400, 1.6rem))}@media (max-width: 1023.98px){.flyout[_nghost-%COMP%]   .search-key-features[_ngcontent-%COMP%]{margin:0 var(--scale-250, 1rem)}}"]})}}return T})()},74130:(lt,O,e)=>{e.d(O,{Ti:()=>_,ld:()=>s,sH:()=>d});var t=e(59640),n=e(5545);const d=(0,t.Mz)(n.h,f=>f.bulkUpload.canDeactivate),s=(0,t.Mz)(n.h,f=>f.bulkUpload.uploadProgress),_=(0,t.Mz)(n.h,f=>f.bulkUpload.isDownloading)},1716:(lt,O,e)=>{e.d(O,{Di:()=>_,oU:()=>s,tL:()=>d});var t=e(59640),n=e(5545);const d=(0,t.Mz)(n.h,f=>f.contactInvite.canDeactivate),s=(0,t.Mz)(n.h,f=>f.contactInvite),_=(0,t.Mz)(n.h,f=>f.contactInvite.isLoading)},56958:(lt,O,e)=>{e.d(O,{Nz:()=>_,xS:()=>s});var t=e(59640),n=e(89465),d=e(5545);const s=(0,t.Mz)(d.h,g=>g.contactRequests.contactRequests.filter(h=>h.status===n.Q.Requested).sort((h,C)=>h.requestDate>C.requestDate?1:-1)),_=(0,t.Mz)(d.h,g=>g.contactRequests.isLoading);(0,t.Mz)(d.h,g=>g.contactRequests.error)},53718:(lt,O,e)=>{e.d(O,{Kd:()=>t.Kd,Nz:()=>t.Nz,Vw:()=>t.Vw,ly:()=>t.ly,q7:()=>t.q7,qQ:()=>t.qQ,tL:()=>t.tL,zQ:()=>t.zQ});var t=e(20531)},20581:(lt,O,e)=>{e.d(O,{P:()=>G});var t=e(77339),n=e(7673),d=e(88141),s=e(25558),_=e(96354),f=e(99437),g=e(31397),h=e(70274),C=e(38304),T=e(98413),m=e(27559),I=e(54438),y=e(43066),o=e(71962),P=e(85105),N=e(59640);const a="MY_TEAM.KEYCONTACTS.FETCHINGDETAILSERROR",M="MY_TEAM.KEYCONTACTS.UPDATEFAILURE";let G=(()=>{class k{constructor(J,H,et,st,Et){this.contactService=J,this.keyContactService=H,this.contactRoleService=et,this.actions=st,this.store$=Et,this.getKeyContacts=(0,t.EH)(()=>this.actions.pipe((0,t.gp)(C.Rx),(0,d.M)(()=>this.store$.dispatch((0,T.ZF)({messageTag:a}))),(0,s.n)(()=>this.keyContactService.getAccountKeyContacts().pipe((0,_.T)(dt=>C.yH({keyContacts:dt})),(0,f.W)(()=>(0,n.of)(C.X4(),this.showNotification(a,m._n.error))))))),this.searchAccountContacts=(0,t.EH)(()=>this.actions.pipe((0,t.gp)(C.zz),(0,d.M)(()=>this.store$.dispatch((0,T.ZF)({messageTag:a}))),(0,s.n)(({contactName:dt,role:Nt})=>this.contactService.getAccountContacts(dt,30).pipe((0,_.T)(V=>C.Qm({contacts:V,role:Nt})),(0,f.W)(()=>(0,n.of)(this.showNotification(a,m._n.error))))))),this.getContactRoles=(0,t.EH)(()=>this.actions.pipe((0,t.gp)(C.sZ),(0,d.M)(()=>this.store$.dispatch((0,T.ZF)({messageTag:a}))),(0,s.n)(()=>this.contactRoleService.getCentreRoles().pipe((0,_.T)(dt=>C.LO({permissions:dt})),(0,f.W)(()=>(0,n.of)(this.showNotification(a,m._n.error))))))),this.updateAccountKeyContacts=(0,t.EH)(()=>this.actions.pipe((0,t.gp)(C.nM),(0,d.M)(()=>this.store$.dispatch((0,T.ZF)({messageTag:M}))),(0,s.n)(dt=>this.keyContactService.updateAccountKeyContacts(dt.keycontacts).pipe((0,_.T)(Nt=>C.Vq({keyContacts:Nt})),(0,f.W)(()=>(0,n.of)(this.showNotification(M,m._n.error))))))),this.updateCentreKeyContacts=(0,t.EH)(()=>this.actions.pipe((0,t.gp)(C.Bp),(0,d.M)(()=>this.store$.dispatch((0,T.ZF)({messageTag:M}))),(0,s.n)(dt=>this.keyContactService.updateCentreKeyContacts(dt.centreskeycontacts).pipe((0,_.T)(Nt=>C.Vq({keyContacts:Nt})),(0,f.W)(()=>(0,n.of)(C.X4(),this.showNotification(M,m._n.error))))))),this.updateKeyContactsSuccess=(0,t.EH)(()=>this.actions.pipe((0,t.gp)(C.Vq),(0,g.Z)(()=>[C.em({form:null}),this.showNotification("MY_TEAM.KEYCONTACTS.UPDATESUCCESS",m._n.success)]))),this.getCurrentContactById=(0,t.EH)(()=>this.actions.pipe((0,t.gp)(C.D$),(0,h.H)(({contactId:dt})=>this.contactService.getContactDetails(dt).pipe((0,_.T)(Nt=>C.LV({contact:Nt})),(0,f.W)(()=>(0,n.of)(this.showNotification(a,m._n.error)))))))}showNotification(J,H){return(0,T.Ds)({text:J,notificationType:H})}static{this.\u0275fac=function(H){return new(H||k)(I.KVO(y.T),I.KVO(o.$),I.KVO(P.T),I.KVO(t.En),I.KVO(N.il))}}static{this.\u0275prov=I.jDH({token:k,factory:k.\u0275fac,providedIn:"root"})}}return k})()},20622:(lt,O,e)=>{e.d(O,{BZ:()=>C,DG:()=>P,D_:()=>m,Dy:()=>g,Ft:()=>T,Iv:()=>I,M4:()=>s,WD:()=>h,j$:()=>y,ly:()=>o,pl:()=>f,q7:()=>_});var t=e(59640),n=e(7469),d=e(5545);const s=(0,t.Mz)(d.h,N=>N.keycontacts.accountKeyContacts),_=(0,t.Mz)(d.h,N=>N.keycontacts.contactsAll.get(n.g.primary)),f=(0,t.Mz)(d.h,N=>N.keycontacts.contactsAll.get(n.g.invoicePrimary)),g=(0,t.Mz)(d.h,N=>N.keycontacts.contactsAll.get(n.g.invoiceSecondary)),h=(0,t.Mz)(d.h,N=>N.keycontacts.contactsAll.get(n.g.accountsPayable)),C=(0,t.Mz)(d.h,N=>N.keycontacts.contactRoles),T=(0,t.Mz)(d.h,N=>N.keycontacts.countryFilter),m=(0,t.Mz)(d.h,N=>N.keycontacts.keyContactsForm),I=(0,t.Mz)(d.h,N=>N.keycontacts.resetKeyContactsForm),y=(0,t.Mz)(d.h,N=>N.keycontacts.keyContacts),o=(0,t.Mz)(d.h,N=>N.keycontacts.contactsTotalCount),P=(0,t.Mz)(d.h,N=>N.keycontacts.isLoading)},20531:(lt,O,e)=>{e.d(O,{qQ:()=>n.qQ,YV:()=>n.YV,Kb:()=>n.Kb,Qs:()=>n.Qs,Td:()=>n.Td,vZ:()=>n.vZ,HD:()=>n.HD,Vw:()=>m,tL:()=>t.tL,q7:()=>s.q7,ly:()=>s.ly,hg:()=>n.hg,Nz:()=>_.Nz,zQ:()=>T,Kd:()=>h,i3:()=>n.i3,gf:()=>n.gf});var t=e(1716),n=e(4770),s=(e(74130),e(20622)),_=e(56958),f=e(59640),g=e(5545);const h=(0,f.Mz)(g.h,I=>I.contactView.modelData),T=((0,f.Mz)(g.h,I=>I.contactView.isDeleted),(0,f.Mz)(g.h,I=>I.contactView.loadingDetails)),m=(0,f.Mz)(g.h,I=>I.contactView.deleteInProgress)},14291:(lt,O,e)=>{e.r(O),e.d(O,{TeamModule:()=>Pa});var t=e(54438),n=e(89417),d=e(59640),s=e(77339),_=e(68018),f=e(4705),g=e(7244),h=e(24153),C=e(49232),T=e(65761),m=e(21413),I=e(5964),y=e(56977),o=e(62233),P=e(99375),N=e(69924),a=e(12262),M=e(82341),G=e(35155),k=e(60177),R=e(84572),J=e(28492),H=e(20531),et=e(52671),st=e(95651),Et=e(35361),dt=e(86734),Nt=e(72134);const V=(r,z,i)=>(0,d.Mz)(H.Kb,H.gf,H.YV,(p,c,S)=>({homeCentres:mt(p,c,S,r),adminPermissions:Pt(p,c,S,z),roles:l(c,i)}));function mt(r,z,i,p){const c=S=>({name:S?.name,centreNumber:S?.centreNumber.toString()});return!r.homeCentres?.length&&i?.[Nt.Jo.ContactHomeLocationNumber]&&z?.homeCentres?.length?
1i[Nt.Jo.ContactHomeLocationNumber].filter(Rt=>0!==Number(Rt)).map(Rt=>c(z.homeCentres.find(Qt=>Qt.centreNumber===Number(Rt)))):p?.length?p:z.homeCentres.map(c)}function Pt(r,z,i,p){return null===r.isAdmin&&i?.[Nt.Jo.FilterFieldsContactAllocationProfileRoles]?i[Nt.Jo.FilterFieldsContactAllocationProfileRoles].map(S=>Number(S)===Nt.o9.NonAdminAccessToIWGportal?{id:!1,name:"MY_TEAM.FILTER.BLANKS"}:{id:!0,name:"MY_TEAM.FILTER.PERMISSIONS.ADMIN"}):p?.length?p:z.adminPermissions}function l(r,z){const i=p=>({...p,name:`MY_TEAM.KEY_CONTACT_ROLES.${p?.name.toUpperCase()}`});return r?.contactAllocationContactRoles?.length>0?r.contactAllocationContactRoles.filter(c=>r.keyContactRoles.find(S=>S.id===Number(c))).map(c=>i(r.keyContactRoles.find(S=>S.id===Number(c)))):z?.length?z:r.keyContactRoles.map(i)}var $=e(21687),Z=e(60156),ot=e(52510),D=e(27270),U=e(31476),gt=e(12720),_t=e(96354),ct=e(31397),pt=e(4770),x=e(95095),it=e(72540),q=e(68337),nt=e(69431),xt=e(98692),Dt=e(82970),oe=e(10880),v=e(92874),_e=e(4300);function ue(r,z){if(1&r){const i=t.RV6();t.j41(0,"iwg-filter-section",8)(1,"iwg-filter-checkbox-list",9),t.mxI("valueChange",function(c){t.eBV(i);const S=t.XpG(2);return t.DH7(S.selectedCentres,c)||(S.selectedCentres=c),t.Njj(c)}),t.k0s()()}if(2&r){const i=t.XpG(),p=t.XpG();t.Y8G("selectedFiltersCount",null===p.selectedCentres?0:p.selectedCentres.length),t.R7$(),t.Y8G("options",i),t.R50("value",p.selectedCentres)}}function re(r,z){1&r&&t.DNE(0,ue,2,3,"iwg-filter-section",8),2&r&&t.vxM(z.length?0:-1)}function bt(r,z){if(1&r){const i=t.RV6();t.j41(0,"iwg-filter-section",5)(1,"iwg-filter-radio-list",10),t.nI1(2,"async"),t.mxI("valueChange",function(c){t.eBV(i);const S=t.XpG();return t.DH7(S.selectedHasMembership,c)||(S.selectedHasMembership=c),t.Njj(c)}),t.k0s()()}if(2&r){const i=t.XpG();t.Y8G("selectedFiltersCount",null===i.selectedHasMembership?0:1),t.R7$(),t.Y8G("iwgFilterOption",i.selectedHasMembership)("isSingleSelection",!0),t.R50("value",i.selectedHasMembership),t.Y8G("options",t.bMT(2,5,i.membershipSubscriptions$))}}function Ft(r,z){if(1&r){const i=t.RV6();t.j41(0,"iwg-filter-section",6)(1,"iwg-filter-radio-list",11),t.nI1(2,"async"),t.mxI("valueChange",function(c){t.eBV(i);const S=t.XpG();return t.DH7(S.selectedHasNetworkDevices,c)||(S.selectedHasNetworkDevices=c),t.Njj(c)}),t.k0s()()}if(2&r){const i=t.XpG();t.Y8G("selectedFiltersCount",null===i.selectedHasNetworkDevices?0:1),t.R7$(),t.Y8G("iwgFilterOption",i.selectedHasNetworkDevices)("isSingleSelection",!0),t.R50("value",i.selectedHasNetworkDevices),t.Y8G("options",t.bMT(2,5,i.networkDevices$))}}let Te=(()=>{class r{constructor(i){this.store$=i,this.baseSortOptions=[{display:"MY_TEAM.GRID.FULL_NAME",value:"ContactName"},{display:"MY_TEAM.GRID.HOME_LOCATION",value:"HomeCentreNumbers"},{display:"MY_TEAM.GRID.ADMIN_PERMISSIONS",value:"IsAdmin"}],this.selectedCentres=[],this.selectedRoles=[],this.selectedIsAdmin=null,this.selectedHasMembership=null,this.selectedHasNetworkDevices=null,this.filterPickerOpen=!1,this.isAdmin=!1,this.destroy$=new m.B}initSortOptions(){this.sortOptions=this.baseSortOptions.reduce(q.n,[]),this.sortOptions.length>0&&(this.selectedSortOption=this.sortOptions[0])}initFilterOptions(){const i=this.store$.select(pt.Ll);this.membershipSubscriptions$=this.store$.select(pt.vZ),this.networkDevices$=this.store$.select(pt.HD),this.homeCentres$=this.store$.select(pt.BF);const p=this.store$.select(pt.YP).pipe((0,_t.T)(c=>c.map(S=>({...S,name:`MY_TEAM.KEY_CONTACT_ROLES.${S.name.toUpperCase()}`}))));(0,R.z)([i,p]).pipe((0,ct.Z)(c=>this.store$.select(V([],c[0],c[1]))),(0,y.Q)(this.destroy$)).subscribe(c=>{this.roles=c.roles,this.adminPermissions=c.adminPermissions}),this.store$.select(pt.Kb).pipe((0,y.Q)(this.destroy$)).subscribe(c=>this.updateForm(c))}ngOnInit(){this.initSortOptions(),this.initFilterOptions(),this.store$.pipe((0,d.Lt)(Et.C)).pipe((0,y.Q)(this.destroy$)).subscribe(i=>{const p=i.map(c=>c.centreNumber);this.isAdmin=p.length>0})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}onSortChanged(i){this.store$.dispatch((0,g.oV)({sorting:{sortBy:i.sortField,sortDirection:i.sortOrder===x.x.ascending?"asc":"desc"}}))}
1onFilterChanged(){this.store$.dispatch((0,g._9)({filter:{contactName:this.contactSearchedName,homeCentres:this.selectedCentres||[],hasMemberships:this.selectedHasMembership,hasNetworkDevices:this.selectedHasNetworkDevices,isAdmin:this.selectedIsAdmin,roles:this.selectedRoles||[]}})),this.filterPickerOpen=!1}updateForm(i){this.contactSearchedName=i.contactName,this.selectedCentres=i.homeCentres,this.selectedRoles=i.roles,this.selectedIsAdmin=i.isAdmin,this.selectedHasMembership=i.hasMemberships,this.selectedHasNetworkDevices=i.hasNetworkDevices}static{this.\u0275fac=function(p){return new(p||r)(t.rXU(d.il))}}static{this.\u0275cmp=t.VBU({type:r,selectors:[["iwg-team-filter-mobile"]],viewQuery:function(p,c){if(1&p&&t.GBs(it.q,5),2&p){let S;t.mGM(S=t.lsd())&&(c.picker=S.first)}},decls:11,vars:18,consts:[["clearButtonId","MyTeam.Filter.ClearFields",3,"openChange","filterApply","open","showClearButton"],["wrapperId","MyTeam.Filter.Mobile.IsAdminSection","title","MY_TEAM.FILTER.ADMIN_PERMISSIONS",3,"selectedFiltersCount"],["filterId","Radio.IsAdminFilter","wrapperId","MTFilter_AdminRadios","filterName","isAdmin","filterKeys","name","titleKey","name","valueKey","id",3,"valueChange","iwgFilterOption","isSingleSelection","value","options"],["wrapperId","MyTeam.Filter.Mobile.KeyContactRolesSection","title","MY_TEAM.FILTER.CONTACT_TYPE",3,"selectedFiltersCount"],["wrapperId","MyTeam.Filter.Mobile.KeyContactRoles","titleKey","name","valueKey","id","iwgFilterAnalytic","","name","roles",3,"valueChange","options","value"],["wrapperId","MyTeam.Filter.Mobile.MembershipSubscriptionsSection","title","MY_TEAM.FILTER.MEMBERSHIP_SUBSCRIPTION",3,"selectedFiltersCount"],["wrapperId","MyTeam.Filter.Mobile.NetworkDevicesSection","title","MY_TEAM.FILTER.NETWORK_DEVICES",3,"selectedFiltersCount"],[3,"valueChange","options","value","autoClose"],["wrapperId","MyTeam.Filter.Mobile.HomeCentresSection","title","MY_TEAM.FILTER.HOME_LOCATION",3,"selectedFiltersCount"],["wrapperId","MyTeam.Filter.Mobile.HomeCentres","titleKey","name","valueKey","centreNumber","iwgFilterAnalytic","","name","homeCentres",3,"valueChange","options","value"],["filterId","Radio.MembershipSubscriptionsFilter","wrapperId","MTFilter_MembershipRadios","filterName","membershipSubscription","filterKeys","name","titleKey","name","valueKey","id",3,"valueChange","iwgFilterOption","isSingleSelection","value","options"],["filterId","Radio.NetworkDevicesFilter","wrapperId","MTFilter_NetworkRadios","filterName","networkDevice","filterKeys","name","titleKey","name","valueKey","id",3,"valueChange","iwgFilterOption","isSingleSelection","value","options"]],template:function(p,c){if(1&p&&(t.j41(0,"iwg-sort-filter-wrapper")(1,"iwg-filter-picker",0),t.mxI("openChange",function(Rt){return t.DH7(c.filterPickerOpen,Rt)||(c.filterPickerOpen=Rt),Rt}),t.bIt("filterApply",function(){return c.onFilterChanged()}),t.DNE(2,re,1,1),t.nI1(3,"async"),t.j41(4,"iwg-filter-section",1)(5,"iwg-filter-radio-list",2),t.mxI("valueChange",function(Rt){return t.DH7(c.selectedIsAdmin,Rt)||(c.selectedIsAdmin=Rt),Rt}),t.k0s()(),t.j41(6,"iwg-filter-section",3)(7,"iwg-filter-checkbox-list",4),t.mxI("valueChange",function(Rt){return t.DH7(c.selectedRoles,Rt)||(c.selectedRoles=Rt),Rt}),t.k0s()(),t.DNE(8,bt,3,7,"iwg-filter-section",5)(9,Ft,3,7,"iwg-filter-section",6),t.k0s(),t.j41(10,"iwg-sort-picker",7),t.bIt("valueChange",function(Rt){return c.onSortChanged(Rt)}),t.k0s()()),2&p){let S;t.R7$(),t.R50("open",c.filterPickerOpen),t.Y8G("showClearButton",!0),t.R7$(),t.vxM((S=t.bMT(3,16,c.homeCentres$))?2:-1,S),t.R7$(2),t.Y8G("selectedFiltersCount",null===c.selectedIsAdmin?0:1),t.R7$(),t.Y8G("iwgFilterOption",c.selectedIsAdmin)("isSingleSelection",!0),t.R50("value",c.selectedIsAdmin),t.Y8G("options",c.adminPermissions),t.R7$(),t.Y8G("selectedFiltersCount",null===c.selectedRoles?0:c.selectedRoles.length),t.R7$(),t.Y8G("options",c.roles),t.R50("value",c.selectedRoles),t.R7$(),t.vxM(c.isAdmin?8:-1),t.R7$(),t.vxM(c.isAdmin?9:-1),t.R7$(),t.Y8G("options",c.sortOptions)("value",c.selectedSortOption)("autoClose",!0)}},dependencies:[nt.b,xt.i,it.q,Dt.Z,oe.X,v.l,gt.l,_e.R,k.Jj],styles:["iwg-filter-section[_ngcontent-%COMP%]   iwg-radio-button[_ngcontent-%COMP%]{display:block;width:100%;padding-right:4.5rem;padding-left:4.5rem;margin-bottom:1rem}.text-link[_ngcontent-%COMP%]{font-size:var(--body2-font-size, 1.4rem)}"]})}}return r})();var E=e(87862);function F(r,z){if(1&r&&(t.j41(0,"div",2),t.nrm(1,"iwg-dropdown",14),t.nI1(2,"async"),t.k0s()),2&r){const i=t.XpG();t.R7$(),t.Y8G("sortAsc",!1)("options",t.bMT(2,2,i.membershipSubscriptions$))}}function L(r,z){if(1&r&&(t.j41(0,"div",2),t.nrm(1,"iwg-dropdown",15),t.nI1(2,"async"),t.k0s()),2&r){const i=t.XpG();t.R7$(),t.Y8G("sortAsc",!1)("options",t.bMT(2,2,i.networkDevices$))}}function ft(r,z){1&r&&(t.j41(0,"div",12),t.nrm(1,"iwg-team-filter-mobile"),t.k0s())}function K(r,z){if(1&r){const i=t.RV6();t.j41(0,"div",16)(1,"iwg-download",17),t.nI1(2,"async"),t.bIt("downloadingChange",function(){t.eBV(i);const c=t.XpG();
1return t.Njj(c.downloadExcel())}),t.nrm(3,"i",18),t.k0s(),t.j41(4,"iwg-download",19),t.nI1(5,"async"),t.bIt("downloadingChange",function(){t.eBV(i);const c=t.XpG();return t.Njj(c.downloadCsv())}),t.nrm(6,"i",18),t.k0s()()}if(2&r){const i=t.XpG();t.R7$(),t.Y8G("downloading",t.bMT(2,2,i.isFileDownloading(i.reportFormatType.Excel))),t.R7$(3),t.Y8G("downloading",t.bMT(5,4,i.isFileDownloading(i.reportFormatType.CSV)))}}let Tt=(()=>{class r{constructor(i,p,c,S){this.activatedRoute=i,this.store=p,this.deviceService=c,this.canDownloadExportedTeamMembers=h.e.CanDownloadExportedTeamMembers,this.homeCentres=[],this.adminPermissions=[],this.roles=[],this.isAdmin=!1,this.concatenatedPermissionTooltipTranslations=["MY_TEAM.ADMIN_PERMISSIONS.TOOLTIP_HINT","MY_TEAM.ADMIN_PERMISSIONS.TOOLTIP_HINT_ADMIN_PERMISSION_1","MY_TEAM.ADMIN_PERMISSIONS.TOOLTIP_HINT_ADMIN_PERMISSION_2","MY_TEAM.ADMIN_PERMISSIONS.TOOLTIP_HINT_ADMIN_PERMISSION_3","MY_TEAM.ADMIN_PERMISSIONS.TOOLTIP_HINT_ADMIN_PERMISSION_4","MY_TEAM.ADMIN_PERMISSIONS.TOOLTIP_HINT_KEY_CONTACTS"],this.concatenatedPermissionTooltipTranslationParams={ConsumerInput_AdminBoldStart:"<b>",ConsumerInput_AdminBoldEnd:"</b>",ConsumerInput_KeycontactsBoldStart:"<b>",ConsumerInput_KeycontactsBoldEnd:"</b>"},this.concatenatedkeycontactsTooltipTranslations=["MY_TEAM.KEYCONTACTS.TOOLTIP.CONTACTTYPES","MY_TEAM.KEYCONTACTS.TOOLTIP.PRIMARYCONTACT","MY_TEAM.KEYCONTACTS.TOOLTIP.INVOICEPRIMARYCONTACT","MY_TEAM.KEYCONTACTS.TOOLTIP.INVOICESECONDARYCONTACT","MY_TEAM.KEYCONTACTS.TOOLTIP.ACCOUNTPAYABLECONTACT","MY_TEAM.KEYCONTACTS.TOOLTIP.KEYCONTACTROLE","MY_TEAM.KEYCONTACTS.TOOLTIP.ADMIN"],this.concatenatedkeycontactsTooltipTranslationParams={ConsumerInput_KeycontactsBoldStart:"<b>",ConsumerInput_KeycontactsBoldEnd:"</b>",ConsumerInput_AdminBoldStart:"<b>",ConsumerInput_AdminBoldEnd:"</b>"},this.downloadingFormatType=$.S.CSV,this.reportFormatType=$.S,this.showItems=!1,this.unsubscribe$=new m.B,this.memebersTotalCount=10,this.form=S.group({contactId:[null],dropdowns:S.group({homeCentres:[null],isAdmin:[null],roles:[null],hasMemberships:[null],hasNetworkDevices:[null]})})}ngOnInit(){const i=this.getFilterFromQueryParams();i&&this.store.dispatch(et._9({filter:i})),this.memberNames$=this.store.select(H.Qs),this.membershipSubscriptions$=this.store.select(H.vZ),this.networkDevices$=this.store.select(H.HD),this.isMobile$=this.deviceService.isMobile$,this.store.select(H.Td).pipe((0,J.j)(p=>!p),(0,y.Q)(this.unsubscribe$)).subscribe(p=>{this.memebersTotalCount=p.totalCount}),(0,R.z)([this.store.select(V(this.homeCentres,this.adminPermissions,this.roles))]).pipe((0,y.Q)(this.unsubscribe$)).subscribe(([p])=>{this.homeCentres=p.homeCentres,this.adminPermissions=p.adminPermissions,this.roles=p.roles,this.onHomeCentresChanged(this.homeCentres)}),this.form.controls.contactId.valueChanges.pipe((0,y.Q)(this.unsubscribe$)).subscribe(p=>this.onMemberSelected(p)),this.form.controls.dropdowns.valueChanges.pipe((0,y.Q)(this.unsubscribe$)).subscribe(p=>this.onFilterChanged(p)),this.store.select(H.Kb).pipe((0,y.Q)(this.unsubscribe$)).subscribe(p=>this.updateForm(p)),this.store.pipe((0,d.Lt)(Et.C)).pipe((0,y.Q)(this.unsubscribe$)).subscribe(p=>{const c=p.map(S=>S.centreNumber);this.isAdmin=c.length>0})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}getFilterFromQueryParams(){const i=this.activatedRoute.snapshot.queryParams;return Object.keys(i).length<1?null:{contactName:i.contactName??null,homeCentres:i.homeCentres?[i.homeCentres].flat():null,roles:i.roles?[i.roles].flat().map(Number):null,isAdmin:i.isAdmin?(0,st.AF)(i.isAdmin):null,hasMemberships:i.hasMemberships?(0,st.AF)(i.hasMemberships):null,hasNetworkDevices:i.hasNetworkDevices?(0,st.AF)(i.hasNetworkDevices):null}}onSearchEnterKeyPressed(){this.onFilterChanged(this.form.controls.dropdowns.value)}onSearchChanged(i){i&&this.store.dispatch(et.$C({memberName:i}))}onSearchCleared(){this.onFilterChanged(this.form.controls.dropdowns.value)}onMemberSelected(i){i&&this.store.dispatch((0,dt.ge)({contactId:i}))}downloadCsv(){this.downloadingFormatType=$.S.CSV,this.downloadTeamMembers()}
1downloadExcel(){this.downloadingFormatType=$.S.Excel,this.downloadTeamMembers()}onHomeCentresChanged(i){const p=this.form.get("dropdowns.homeCentres"),c={emitEvent:!1,onlySelf:!0};i.length?p.enable(c):p.disable(c)}onFilterChanged(i){const c={contactName:this.searchedContactName,...i};c.homeCentres=c.homeCentres||[],c.roles=c.roles||[],this.store.dispatch(et._9({filter:c}))}clearFilter(){this.store.dispatch(et.Se())}updateForm(i){this.currentFilter=i,this.searchedContactName=i.contactName,this.form.controls.dropdowns.patchValue(structuredClone(i),{emitEvent:!1,onlySelf:!0})}toggleShowItems(){this.showItems=!this.showItems}isFileDownloading(i){return this.store.pipe((0,d.Lt)(H.hg(i)))}downloadTeamMembers(){this.store.dispatch(et.je({fileType:this.downloadingFormatType,pageSize:this.memebersTotalCount,teamFilter:this.currentFilter}))}static{this.\u0275fac=function(p){return new(p||r)(t.rXU(f.nX),t.rXU(d.il),t.rXU(Z.g),t.rXU(n.ze))}}static{this.\u0275cmp=t.VBU({type:r,selectors:[["iwg-team-filter"]],decls:23,vars:39,consts:[[1,"team-filter"],[1,"team-filter__form",3,"formGroup"],[1,"form__field-wrapper"],[1,"form__field","team-filter__form__search"],["wrapperId","MyTeam.Filter.Search","formControlName","contactId","iwgFilterAnalytic","","placeholderText","MY_TEAM.FILTER.SEARCH_BY_NAME","valueKey","id","displayKey","fullName",3,"searchChanged","clear","enterKey","searchButtonClicked","inputChange","options","input"],[1,"team-filter__form-items",3,"formGroup"],[1,"form__field-wrapper",3,"hidden"],["wrapperId","MyTeam.Filter.HomeLocations","formControlName","homeCentres","iwgFilterAnalytic","","idKey","centreNumber","valueKey","centreNumber","titleKey","name","labelText","MY_TEAM.FILTER.HOME_LOCATION","placeholder","COMMON.ANY","hintText","MY_TEAM.FORM.TOOLTIP_HOME_CENTRES",3,"sortAsc","multiple","options"],["wrapperId","MyTeam.Filter.IsAdmin","formControlName","isAdmin","iwgFilterAnalytic","","idKey","id","valueKey","id","titleKey","name","labelText","MY_TEAM.FILTER.ADMIN_PERMISSIONS","placeholder","COMMON.ANY",3,"sortAsc","hintText","isHintHtml","options"],["wrapperId","MyTeam.Filter.KeyContactRoles","formControlName","roles","iwgFilterAnalytic","","idKey","id","valueKey","id","titleKey","name","labelText","MY_TEAM.FILTER.CONTACT_TYPE","placeholder","COMMON.ANY",3,"sortAsc","multiple","hintText","isHintHtml","options"],[1,"team-filter__clearer","d--none-mobile"],["id","MyTeam.Filter.ClearFields","tabindex","0","translate","",1,"text-link","text-link--regular","text-link--no-underline",3,"click","keydown.enter"],[1,"team-filter__form-mobile-items"],["class","team-filter__form__download_buttons",4,"ngxPermissionsOnly"],["wrapperId","MyTeam.Filter.MembershipSubscription","formControlName","hasMemberships","iwgFilterAnalytic","","idKey","id","valueKey","id","titleKey","name","labelText","MY_TEAM.FILTER.MEMBERSHIP_SUBSCRIPTION","placeholder","COMMON.ANY",3,"sortAsc","options"],["wrapperId","MyTeam.Filter.NetworkDevices","formControlName","hasNetworkDevices","iwgFilterAnalytic","","idKey","id","valueKey","id","titleKey","name","labelText","MY_TEAM.FILTER.NETWORK_DEVICES","placeholder","COMMON.ANY",3,"sortAsc","options"],[1,"team-filter__form__download_buttons"],["wrapperId","Team_TeamView_DownloadExcel","downloadText","MY_TEAM.VIEW.DOWNLOAD_EXCEL",1,"download-component",3,"downloadingChange","downloading"],["aria-hidden","true",1,"iwg-icon-download-excel"],["wrapperId","Team_TeamView_DownloadCSV","downloadText","MY_TEAM.VIEW.DOWNLOAD_CSV",1,"download-component",3,"downloadingChange","downloading"]],template:function(p,c){1&p&&(t.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"iwg-search",4),t.nI1(5,"async"),t.bIt("searchChanged",function(Rt){return c.onSearchChanged(Rt)})("clear",function(){return c.onSearchCleared()})("enterKey",function(){return c.onSearchEnterKeyPressed()})("searchButtonClicked",function(){return c.onSearchEnterKeyPressed()}),t.mxI("inputChange",function(Rt){return t.DH7(c.searchedContactName,Rt)||(c.searchedContactName=Rt),Rt}),t.k0s()()(),t.j41(6,"div",5)(7,"div",6),t.nrm(8,"iwg-dropdown",7),t.k0s(),t.j41(9,"div",2),t.nrm(10,"iwg-dropdown",8),t.nI1(11,"iwgTranslateArray"),t.k0s(),t.j41(12,"div",2),t.nrm(13,"iwg-dropdown",9),t.nI1(14,"iwgTranslateArray"),t.k0s(),t.DNE(15,F,3,4,"div",2)(16,L,3,4,"div",2),t.j41(17,"div",10)(18,"a",11),t.bIt("click",function(){return c.clearFilter()})("keydown.enter",function(){return c.clearFilter()}),t.EFF(19," MY_TEAM.FILTER.CLEAR_FIELDS "),t.k0s()()(),t.DNE(20,ft,2,0,"div",12),t.nI1(21,"async"),t.DNE(22,K,7,
16,"div",13),t.k0s()()),2&p&&(t.R7$(),t.Y8G("formGroup",c.form),t.R7$(3),t.Y8G("options",t.bMT(5,27,c.memberNames$)),t.R50("input",c.searchedContactName),t.R7$(2),t.Y8G("formGroup",c.form.controls.dropdowns),t.R7$(),t.AVh("is-nonAdmin",!c.isAdmin),t.Y8G("hidden",!0),t.R7$(),t.Y8G("sortAsc",!1)("multiple",!0)("options",c.homeCentres),t.R7$(),t.AVh("is-nonAdmin",!c.isAdmin),t.R7$(),t.Y8G("sortAsc",!1)("hintText",t.brH(11,29,c.concatenatedPermissionTooltipTranslations,"<br/><br/>",c.concatenatedPermissionTooltipTranslationParams))("isHintHtml",!0)("options",c.adminPermissions),t.R7$(2),t.AVh("is-nonAdmin",!c.isAdmin),t.R7$(),t.Y8G("sortAsc",!1)("multiple",!0)("hintText",t.brH(14,33,c.concatenatedkeycontactsTooltipTranslations,"<br/><br/>",c.concatenatedkeycontactsTooltipTranslationParams))("isHintHtml",!0)("options",c.roles),t.R7$(2),t.vxM(c.isAdmin?15:-1),t.R7$(),t.vxM(c.isAdmin?16:-1),t.R7$(4),t.vxM(t.bMT(21,37,c.isMobile$)?20:-1),t.R7$(2),t.Y8G("ngxPermissionsOnly",c.canDownloadExportedTeamMembers))},dependencies:[n.BC,n.cb,n.j4,n.JD,_.Mm,ot.S,D.O,U.P,M.f6,gt.l,Te,k.Jj,E.t],styles:[".team-filter[_ngcontent-%COMP%]{display:flex;gap:4rem;margin-bottom:3.2rem}@media (max-width: 1023.98px){.team-filter[_ngcontent-%COMP%]{margin-bottom:2.4rem}}.team-filter__form[_ngcontent-%COMP%]{width:100%}@media (max-width: 1023.98px){.team-filter__form[_ngcontent-%COMP%]{width:100%}}.team-filter__form__search[_ngcontent-%COMP%]{width:50%}@media (max-width: 1023.98px){.team-filter__form__search[_ngcontent-%COMP%]{width:100%}}.team-filter__form__search[_ngcontent-%COMP%]   .form__input[_ngcontent-%COMP%]{font-size:1.6rem}.team-filter__form__search[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{display:none}.team-filter__form-items[_ngcontent-%COMP%]{display:flex;align-items:stretch;gap:var(--spacing-sml, var(--scale-500, 2.4rem))}.team-filter__form-items[_ngcontent-%COMP%]   .form__field-wrapper[_ngcontent-%COMP%]{width:100%}.team-filter__form-items[_ngcontent-%COMP%]   .is-nonAdmin[_ngcontent-%COMP%]{width:calc(30% - 2rem)}@media (max-width: 1023.98px){.team-filter__form-items[_ngcontent-%COMP%]{display:none}}.team-filter__form-mobile-items[_ngcontent-%COMP%]{display:none;margin-top:-.1rem}@media (max-width: 1023.98px){.team-filter__form-mobile-items[_ngcontent-%COMP%]{display:block;margin-bottom:2rem}}.team-filter__form[_ngcontent-%COMP%] > .form__field-wrapper[_ngcontent-%COMP%]{margin-bottom:3rem;display:flex}@media (max-width: 1023.98px){.team-filter__form[_ngcontent-%COMP%] > .form__field-wrapper[_ngcontent-%COMP%]{margin-bottom:0rem}}.team-filter__form__download_buttons[_ngcontent-%COMP%]{margin-top:3rem;margin-bottom:0;display:flex}@media (max-width: 1023.98px){.team-filter__form__download_buttons[_ngcontent-%COMP%]{margin-top:2.5rem;flex-direction:column}}.team-filter__form__download_buttons[_ngcontent-%COMP%]   .download-component[_ngcontent-%COMP%]{margin-right:5rem;margin-top:2rem}[dir=rtl]   [_nghost-%COMP%]   .team-filter__form__download_buttons[_ngcontent-%COMP%]   .download-component[_ngcontent-%COMP%]{margin-right:0;margin-left:5rem}@media (max-width: 1023.98px){[dir=rtl]   [_nghost-%COMP%]   .team-filter__form__download_buttons[_ngcontent-%COMP%]   .download-component[_ngcontent-%COMP%]{margin-left:0}}[dir=rtl][_ngcontent-%COMP%]   .team-filter__form__download_buttons[_ngcontent-%COMP%]   .download-component[_ngcontent-%COMP%]{margin-right:0;margin-left:5rem}@media (max-width: 1023.98px){[dir=rtl][_ngcontent-%COMP%]   .team-filter__form__download_buttons[_ngcontent-%COMP%]   .download-component[_ngcontent-%COMP%]{margin-left:0}}[dir=rtl][_nghost-%COMP%]   .team-filter__form__download_buttons[_ngcontent-%COMP%]   .download-component[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .team-filter__form__download_buttons[_ngcontent-%COMP%]   .download-component[_ngcontent-%COMP%]{margin-right:0;margin-left:5rem}@media (max-width: 1023.98px){[dir=rtl][_nghost-%COMP%]   .team-filter__form__download_buttons[_ngcontent-%COMP%]   .download-component[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .team-filter__form__download_buttons[_ngcontent-%COMP%]   .download-component[_ng
1content-%COMP%]{margin-left:0}}@media (max-width: 1023.98px){.team-filter__form__download_buttons[_ngcontent-%COMP%]   .download-component[_ngcontent-%COMP%]{margin-top:1.5rem;margin-right:0}}.team-filter__form__download_buttons[_ngcontent-%COMP%]   .download-component[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:2.5rem;margin-right:1.2rem}[dir=rtl]   [_nghost-%COMP%]   .team-filter__form__download_buttons[_ngcontent-%COMP%]   .download-component[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{margin-left:1rem;margin-right:0}[dir=rtl][_ngcontent-%COMP%]   .team-filter__form__download_buttons[_ngcontent-%COMP%]   .download-component[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{margin-left:1rem;margin-right:0}[dir=rtl][_nghost-%COMP%]   .team-filter__form__download_buttons[_ngcontent-%COMP%]   .download-component[_ngcontent-%COMP%]   i[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .team-filter__form__download_buttons[_ngcontent-%COMP%]   .download-component[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{margin-left:1rem;margin-right:0}.team-filter__clearer[_ngcontent-%COMP%]{display:flex;align-items:center;width:fit-content;white-space:nowrap}"]})}}return r})();var St=e(96697),ae=e(23294),ne=e(44668),de=e(95087),vt=e(98413),Jt=e(27559),Gt=e(76883),wt=e(44115),ee=e(29823),me=e(35213),Me=e(59756),ye=e(61978),be=e(31208),ve=e(83964),Ct=e(742),Kt=e(94587);let B=(()=>{class r{transform(i,p){return i.roles?p.filter(c=>i.keyContactRoles.includes(c.id)).map(c=>c.name):[]}static{this.\u0275fac=function(p){return new(p||r)}}static{this.\u0275pipe=t.EJ8({name:"keyContactRoles",type:r,pure:!0})}}return r})();const W=["grid"],A=["fullNameTemplate"],w=["fullNameMobileTemplate"],ut=["homeCentreTemplate"],Wt=["permissionsTemplate"],ht=["rolesTemplate"],pe=["hasMembershipTemplate"],Vt=["hasNetworkDevicesTemplate"],Zt=["actionsTemplate"],ie=["dateTemplate"],Fe=r=>({$implicit:r});function He(r,z){1&r&&(t.j41(0,"iwg-pill"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&r&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"MY_TEAM.FILTER.PERMISSIONS.ADMIN")," "))}function Ke(r,z){if(1&r){const i=t.RV6();t.j41(0,"iwg-button",17),t.bIt("click",function(){t.eBV(i);const c=t.XpG(4).$implicit,S=t.XpG();return t.Njj(S.removeMember(c))})("keydown.enter",function(){t.eBV(i);const c=t.XpG(4).$implicit,S=t.XpG();return t.Njj(S.removeMember(c))}),t.EFF(1," ACTIONS_DROPDOWN.REMOVE_MEMBER "),t.k0s()}if(2&r){const i=t.XpG(4).$implicit;t.Y8G("wrapperId",i.id+"_remove_member")}}function Bt(r,z){if(1&r){const i=t.RV6();t.j41(0,"iwg-button",17),t.bIt("click",function(){t.eBV(i);const c=t.XpG(4).$implicit,S=t.XpG();return t.Njj(S.linkTeamMember(c))})("keydown.enter",function(){t.eBV(i);const c=t.XpG(4).$implicit,S=t.XpG();return t.Njj(S.linkTeamMember(c))}),t.EFF(1," ACTIONS_DROPDOWN.LINK_USER "),t.k0s()}if(2&r){const i=t.XpG(4).$implicit;t.Y8G("wrapperId",i.id+"_link_member")}}function he(r,z){if(1&r){const i=t.RV6();t.j41(0,"iwg-button",17),t.bIt("click",function(){t.eBV(i);const c=t.XpG(3).$implicit,S=t.XpG();return t.Njj(S.onRowClick(c))})("keydown.enter",function(){t.eBV(i);const c=t.XpG(3).$implicit,S=t.XpG();return t.Njj(S.onRowClick(c))}),t.EFF(1," ACTIONS_DROPDOWN.EDIT_MEMBERSHIP "),t.k0s(),t.DNE(2,Ke,2,1,"iwg-button",18)(3,Bt,2,1,"iwg-button",18)}if(2&r){const i=t.XpG(3).$implicit,p=t.XpG();t.Y8G("wrapperId",i.id+"_edit_membership"),t.R7$(2),t.vxM(i.id!==p.currentContactId?2:-1),t.R7$(),t.vxM(i.id===p.currentContactId||i.hasUserProfile?-1:3)}}function b(r,z){if(1&r&&(t.j41(0,"iwg-dropdown-actions",15),t.DNE(1,he,4,3,"ng-template",null,10,t.C5r),t.k0s()),2&r){const i=t.XpG(2).$implicit;t.Y8G("wrapperId",i.id)}}function X(r,z){1&r&&t.nrm(0,"span",16)}function tt(r,z){if(1&r&&(t.j41(0,"div",12)(1,"div")(2,"span"),t.EFF(3),t.nI1(4,"iwgNameFormat"),t.k0s(),t.j41(5,"div",14),t.DNE(6,He,3,3,"iwg-pill"),t.k0s()(),t.DNE(7,b,3,1,"iwg-dropdown-actions",15)(8,X,1,0,"span",16),t.k0s()),2&r){const i=t.XpG().$implicit,p=t.XpG();t.R7$(3),t.JRh(t.bMT(4,4,i)),t.R7$(3),t.vxM(i.isAdmin?6:-1),t.R7$(),t.vxM(p.canAccessAddTeamMember?7:-1),t.R7$(),t.vxM(p.canAccessAddTeamMember?-1:8)}}function Lt(r,z){if(1&r&&t.nrm(0,"img",19),2&r){const i=t.XpG(2).$implicit;t.Y8G("src",i.imageUrl,t.B4B)}}function zt(r,z){if(1&r&&(t.j41(0,"span",20),t.EFF(1),t.nI1(2,"iwgNameFormat"),t.k0s()),2&r){const i=t.XpG(2).$implicit,p=t.XpG();
1t.R7$(),t.JRh(t.i5U(2,1,i,p.NameFormat.Initials))}}function ce(r,z){if(1&r&&(t.DNE(0,Lt,1,1,"img",19)(1,zt,3,4,"span",20),t.j41(2,"span",13),t.EFF(3),t.nI1(4,"iwgNameFormat"),t.k0s()),2&r){const i=t.XpG().$implicit;t.vxM(i.imageUrl?0:1),t.R7$(3),t.JRh(t.bMT(4,2,i))}}function le(r,z){if(1&r&&(t.DNE(0,tt,9,6,"div",12),t.nI1(1,"async"),t.DNE(2,ce,5,4,"span",13)),2&r){const i=t.XpG();t.vxM(t.bMT(1,1,i.useMobileLayout$)?0:2)}}function qt(r,z){if(1&r&&t.EFF(0),2&r){const i=t.XpG().$implicit;t.SpI(" ",i.homeCentre.name," ")}}function rt(r,z){1&r&&t.DNE(0,qt,1,1),2&r&&t.vxM(z.$implicit.homeCentre?0:-1)}function Yt(r,z){1&r&&(t.EFF(0),t.nI1(1,"translate")),2&r&&t.SpI(" ",t.bMT(1,1,"MY_TEAM.FILTER.PERMISSIONS.ADMIN")," ")}function Y(r,z){1&r&&t.DNE(0,Yt,2,3),2&r&&t.vxM(z.$implicit.isAdmin?0:-1)}function kt(r,z){1&r&&t.EFF(0," ,\xa0 ")}function It(r,z){if(1&r&&(t.EFF(0),t.nI1(1,"translate"),t.DNE(2,kt,1,0)),2&r){const p=z.$index,c=z.$count;t.SpI(" ",t.bMT(1,2,"MY_TEAM.KEY_CONTACT_ROLES."+z.$implicit.toUpperCase())," "),t.R7$(2),t.vxM(p!==c-1?2:-1)}}function jt(r,z){if(1&r&&(t.j41(0,"span",21),t.Z7z(1,It,3,4,null,null,t.fX1),t.nI1(3,"keyContactRoles"),t.k0s()),2&r){const i=t.XpG().$implicit;t.R7$(),t.Dyx(t.i5U(3,0,i,z))}}function Pe(r,z){if(1&r&&(t.DNE(0,jt,4,3,"span",21),t.nI1(1,"async")),2&r){let i;const p=t.XpG();t.vxM((i=t.bMT(1,1,p.roles$))?0:-1,i)}}function Oe(r,z){1&r&&(t.j41(0,"span",22),t.nrm(1,"i",23),t.k0s())}function gn(r,z){1&r&&t.DNE(0,Oe,2,0,"span",22),2&r&&t.vxM(z.$implicit?0:-1)}function Ne(r,z){1&r&&t.eu8(0)}function _n(r,z){if(1&r&&t.DNE(0,Ne,1,0,"ng-container",24),2&r){const i=z.$implicit;t.XpG();const p=t.sdS(11);t.Y8G("ngTemplateOutlet",p)("ngTemplateOutletContext",t.eq3(2,Fe,i.hasMemberships))}}function tn(r,z){1&r&&t.eu8(0)}function Cn(r,z){if(1&r&&t.DNE(0,tn,1,0,"ng-container",24),2&r){const i=z.$implicit;t.XpG();const p=t.sdS(11);t.Y8G("ngTemplateOutlet",p)("ngTemplateOutletContext",t.eq3(2,Fe,i.hasNetworkDevices))}}function Ue(r,z){if(1&r){const i=t.RV6();t.j41(0,"iwg-button",17),t.bIt("click",function(){t.eBV(i);const c=t.XpG(2).$implicit,S=t.XpG();return t.Njj(S.removeMember(c))})("keydown.enter",function(){t.eBV(i);const c=t.XpG(2).$implicit,S=t.XpG();return t.Njj(S.removeMember(c))}),t.EFF(1," ACTIONS_DROPDOWN.REMOVE_MEMBER "),t.k0s()}if(2&r){const i=t.XpG(2).$implicit;t.Y8G("wrapperId",i.id+"_remove_member")}}function fn(r,z){if(1&r){const i=t.RV6();t.j41(0,"iwg-button",17),t.bIt("click",function(){t.eBV(i);const c=t.XpG(2).$implicit,S=t.XpG();return t.Njj(S.linkTeamMember(c))})("keydown.enter",function(){t.eBV(i);const c=t.XpG(2).$implicit,S=t.XpG();return t.Njj(S.linkTeamMember(c))}),t.EFF(1," ACTIONS_DROPDOWN.LINK_USER "),t.k0s()}if(2&r){const i=t.XpG(2).$implicit;t.Y8G("wrapperId",i.id+"_link_member")}}function ke(r,z){if(1&r){const i=t.RV6();t.j41(0,"iwg-button",17),t.bIt("click",function(){t.eBV(i);const c=t.XpG().$implicit,S=t.XpG();return t.Njj(S.onRowClick(c))})("keydown.enter",function(){t.eBV(i);const c=t.XpG().$implicit,S=t.XpG();return t.Njj(S.onRowClick(c))}),t.EFF(1," ACTIONS_DROPDOWN.EDIT_MEMBERSHIP "),t.k0s(),t.DNE(2,Ue,2,1,"iwg-button",18)(3,fn,2,1,"iwg-button",18)}if(2&r){const i=t.XpG().$implicit,p=t.XpG();t.Y8G("wrapperId",i.id+"_edit_membership"),t.R7$(2),t.vxM(i.id!==p.currentContactId?2:-1),t.R7$(),t.vxM(i.id===p.currentContactId||i.hasUserProfile?-1:3)}}function Tn(r,z){1&r&&(t.j41(0,"iwg-dropdown-actions",15),t.DNE(1,ke,4,3,"ng-template",null,10,t.C5r),t.k0s()),2&r&&t.Y8G("wrapperId",z.$implicit.id)}function ze(r,z){if(1&r&&(t.j41(0,"span",25)(1,"span",26),t.EFF(2),t.nI1(3,"localizedDate"),t.k0s()()),2&r){const i=z.$implicit;t.R7$(),t.Y8G("id",i.id+"_login_date"),t.R7$(),t.JRh(t.i5U(3,2,i.lastSignInDate,"short"))}}let Mn=(()=>{class r{constructor(i,p,c){this.store=i,this.deviceService=p,this.confirmationDialogService=c,this.unsubscribe$=new m.B,this.currentCompany$=this.store.pipe((0,d.Lt)(T.sZ)).pipe((0,y.Q)(this.unsubscribe$)),this.canAccessAddTeamMember=!1,this.centerAlignedCellClass="header-cell--center-aligned",this.NameFormat=Gt.f,this.allColumns=[{colId:"ContactName",headerName:"MY_TEAM.GRI
1D.FULL_NAME",cellRenderer:S=>this.getTemplateRenderer(S,this.fullNameTemplate),sortable:!0,sort:"asc",width:240,cellClass:["aggrid_primary_column","text-overflow-elipsis","cell--no-overflow"],overflowVisible:!0},{colId:"HomeCentreNumbers",headerName:"MY_TEAM.GRID.HOME_LOCATION",cellRenderer:S=>this.getTemplateRenderer(S,this.homeCentreTemplate),sortable:!0,width:220,hideOnMobile:!0,hidden:!0},{colId:"IsAdmin",headerName:"MY_TEAM.GRID.ADMIN_PERMISSIONS",cellRenderer:S=>this.getTemplateRenderer(S,this.permissionsTemplate),sortable:!0,width:130,hideOnMobile:!0},{colId:"Roles",headerName:"MY_TEAM.GRID.TYPE_OF_KEY_CONTACT",cellRenderer:S=>this.getTemplateRenderer(S,this.rolesTemplate),width:230,hideOnMobile:!0},{colId:"LoginDate",headerName:"MY_TEAM.FILTER.LAST_SIGN_IN",cellRenderer:S=>this.getTemplateRenderer(S,this.dateTemplate),width:115,hideOnMobile:!0},{colId:"HasMemberships",headerName:"MY_TEAM.GRID.MEMBERSHIP_SUBSCRIPTION",cellRenderer:S=>this.getTemplateRenderer(S,this.hasMembershipTemplate),cellClass:["cell--center-aligned"],headerClass:[this.centerAlignedCellClass],width:115,hideOnMobile:!0},{colId:"HasNetworkDevices",headerName:"MY_TEAM.GRID.NETWORK_DEVICES",cellRenderer:S=>this.getTemplateRenderer(S,this.hasNetworkDevicesTemplate),cellClass:["cell--center-aligned"],headerClass:[this.centerAlignedCellClass],width:115,minWidth:115,hideOnMobile:!0}],this.columns=[]}removeMember(i){i.keyContactRoles&&i.keyContactRoles.length>0?this.store.dispatch((0,vt.Ds)({notificationType:Jt._n.error,text:"MY_TEAM.VIEWCONTACT.DELETEKEYCONTACTWARNING"})):this.confirmationDialogService.showModal({title:"MY_TEAM.VIEWCONTACT.CONFIRMDELETETITLE",content:"MY_TEAM.VIEWCONTACT.CONFIRMDELETECONTENT",primaryButton:"MY_TEAM.VIEWCONTACT.CONFIRMDELETE",secondaryButton:"MY_TEAM.VIEWCONTACT.CONFIRMCANCEL"}).pipe((0,y.Q)(this.unsubscribe$)).subscribe(p=>{p&&this.store.dispatch((0,et.MO)({contactId:i.id,contactName:`${i.firstName} ${i.lastName}`,accessType:i.isAdmin?wt.C[wt.C.Administrator]:wt.C[wt.C.NonAdmin],company:this.currentCompany}))})}ngOnInit(){this.members$=this.store.select(pt.Td),this.members$.pipe((0,I.p)(i=>!!i),(0,St.s)(1),(0,y.Q)(this.unsubscribe$)).subscribe(i=>this.store.dispatch((0,g.L4)({contactAllocationContactRoles:i.facetResults?.[Nt.Jo.FilterFieldsContactAllocationContactRoles]}))),this.roles$=this.store.select(pt.YP),this.isLoading$=this.store.select(pt.QW),this.useMobileLayout$=(0,R.z)([this.deviceService.isMobile$,this.deviceService.viewportWidth$,this.store.select(ee.p9)]).pipe((0,_t.T)(([i,p,c])=>i||c&&p-me.HX<me.ko),(0,ae.F)(),(0,ne.t)({bufferSize:1,refCount:!0})),this.currentCompany$.pipe((0,y.Q)(this.unsubscribe$)).subscribe(i=>{this.currentCompany=i}),this.store.select(pt.Kb).pipe((0,y.Q)(this.unsubscribe$)).subscribe(()=>this.grid.refreshData()),(0,R.z)([this.store.select(pt.sN),this.store.select(pt.i3)]).pipe((0,I.p)(([i,p])=>i),(0,y.Q)(this.unsubscribe$)).subscribe(([i,p])=>this.onSortingChanged(p)),(0,R.z)([this.store.select(Et.C),this.store.select((0,de.FM)({permissionType:h.e.CanOverrideSeeTeamMembersRoles})),this.store.select((0,de.FM)({permissionType:h.e.CanAccessAddTeamMember}))]).pipe((0,y.Q)(this.unsubscribe$)).subscribe(([i,p,c])=>{const S=i.map(Rt=>Rt.centreNumber);this.columns=S.length>0||p?this.allColumns.map(Rt=>({...Rt})):this.allColumns.slice(0,-2),this.canAccessAddTeamMember=c,c&&this.columns.push({colId:"actionsTemplate",headerName:" ",cellRenderer:Rt=>this.getTemplateRenderer(Rt,this.actionsTemplate),cellClass:["cell--right-aligned"],width:140,minWidth:115,hideOnMobile:!0,overflowVisible:!0})}),this.store.select(de.Hg).pipe((0,y.Q)(this.unsubscribe$)).subscribe(i=>this.currentContactId=i.contactId)}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}onRowClick(i){this.store.dispatch((0,dt.ge)({contactId:i.id}))}onRowItemClick(i){this.canAccessAddTeamMember||this.onRowClick(i)}onSortingChanged(i){this.grid.sortingChanged({colId:i.sortBy,sort:i.sortDirection})}onGetMembers(i){const p={page:i.pageNumber,pageSize:i.pageSize},c=i.sortModel,S=c?{sortBy:c.colId,sortDirection:c.sort?.toLowerCase()}:{sortBy:null,sortDirection:"asc"};this.store.dispatch((0,g.iT)({paging:p,sorting:S,isLoading:!0}))}getTemplateRenderer(i,p){return i.data?p.createEmbeddedView({$implicit:i.data}):null}linkTeamMember(i){this.store.dispatch((0,et.zw)({id:i.id}))}static{this.\u0275fac=function(p){return new(p||r)(t.rXU(d.il),t.rXU(Z.g),t.rXU(Me.N))}}static{this.\u0275cmp=t.VBU({type:r,selectors:[["iwg-team-grid"]],viewQuery:function(p,c){if(1&p&&(t.GBs(W,7),t.GBs(A,7,t.C4Q),t.GBs(w,7,t.C4Q),t.GBs(ut,7,t.C4Q),t.GBs(Wt,7,t.C4Q),t.GBs(ht,7,t.C4Q),t.GBs(pe,7,t.C4Q),t.GBs(Vt,7,t.C4Q),t.GBs(Zt,7,t.C4Q),t.GBs(ie,7,t.C4Q)),2&p){let S;t.mGM(S=t.lsd())&&(c.grid=S.first),t.mGM(S=t.lsd())&&(c.fullNameTemplate=S.first),t.mGM(S=t.lsd())&&(c.fullNameMobileTemplate=S.first),t.mGM(S=t.lsd())&&(c.homeCentreTemplate=S.first),t.mGM(S=t.lsd())&&(c.permissionsTemplate=S.first),t.mGM(S=t.lsd())&&(c.rolesTemplate=S.first),t.mGM(S=t.lsd())&&(c.hasMembershipTemplate=S.first),t.mGM(S=t.lsd())&&(c.hasNetworkDevicesTemplate=S.first),t.mGM(S=t.lsd())&&(c.actionsTemplate=S.first),t.mGM(S=t.lsd())&&(c.dateTemplate=S.first)}},decls:20,vars:5,consts:[["grid",""],["fullNameTemplate",""],["homeCentreTemplate",""],["permissionsTemplate",""],["rolesTemplate",""],["yesOrNoTemplate",""],["hasMembershipTemplate",""],["hasNetworkDevicesTemplate",""],["actionsTemplate",""],["dateTemplate",""],["optionsTemplate",""],["wrapperId","MyTeam.Grid",3,"getRowData","rowClicked","isLoading","dataReceivedCallback","columnDefs","hideHeaderOnMobile","mobileMode$"],[1,"full-name-mobile"],[1,"full-name"],[1,"label"],[3,"wrapperId"],[1,"iwg-icon-chev"],["type","button","displayType","dropdown-item",1,"dropdown-actions-item","block",3,"click","keydown.enter","wrapperId"],["type","button","displayType","dropdown-item",1,"dropdown-actions-item","block",3,"wrapperId"],["alt","",1,"team-member-avatar",3,"src"],[1,"team-member-avatar"],[1,"team-member-roles"],[1,"ag-cell--icon"],["aria-hidden","true",1,"iwg-icon-tick","icon--success"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"custom-row"],[3,"id"]],template:function(p,c){if(1&p){const S=t.RV6();t.j41(0,"iwg-grid",11,0),t.bIt("getRowData",function(Qt){return t.eBV(S),t.Njj(c.onGetMembers(Qt))})("rowClicked",function(Qt){return t.eBV(S),t.Njj(c.onRowItemClick(Qt))}),t.k0s(),t.DNE(2,le,3,3,"ng-template",null,1,t.C5r)(4,rt,1,1,"ng-template",null,2,t.C5r)(6,Y,1,1,"ng-template",null,3,t.C5r)(8,Pe,2,3,"ng-template",null,4,t.C5r)(10,gn,1,1,"ng-template",null,5,t.C5r)(12,_n,1,4,"ng-template",null,6,t.C5r)(14,Cn,1,4,"ng-template",null,7,t.C5r)(16,Tn,3,1,"ng-template",null,8,t.C5r)(18,ze,4,5,"ng-template",null,9,t.C5r)}2&p&&t.Y8G("isLoading",c.isLoading$)("dataReceivedCallback",c.members$)("columnDefs",c.columns)("hideHeaderOnMobile",!0)("mobileMode$",c.useMobileLayout$)},dependencies:[ye._,a.Q,be.T,ve.i,k.T3,_.D9,k.Jj,Ct.K,Kt.X,B],styles:[".iwg-icon-tick[_ngcontent-%COMP%]{line-height:2}.full-name-mobile[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;justify-content:space-between}.full-name-mobile[_ngcontent-%COMP%]   .label[_ngcontent-%COMP%]{display:flex;align-items:center;min-width:fit-content;margin-left:auto;padding-left:1rem}[dir=rtl]   [_nghost-%COMP%]   .full-name-mobile[_ngcontent-%COMP%]   .label[_ngcontent-%COMP%]{margin-left:0rem;margin-right:auto;padding-left:0rem;padding-right:1rem}[dir=rtl][_ngcontent-%COMP%]   .full-name-mobile[_ngcontent-%COMP%]   .label[_ngcontent-%COMP%]{margin-left:0rem;margin-right:auto;padding-left:0rem;padding-right:1rem}[dir=rtl][_nghost-%COMP%]   .full-name-mobile[_ngcontent-%COMP%]   .label[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .full-name-mobile[_ngcontent-%COMP%]   .label[_ngcontent-%COMP%]{margin-left:0rem;margin-right:auto;padding-left:0rem;padding-right:1rem}.full-name-mobile[_ngcontent-%COMP%]   .label[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:1.2rem;color:var(--color-text-accent, var(--brand-primary-500, #E30613));padding-left:1.5rem}[dir=rtl]   [_nghost-%COMP%]   .full-name-mobile[_ngcontent-%COMP%]   .label[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{transform:rotate(180deg)}[dir=rtl][_ngcontent-%COMP%]   .full-name-mobile[_ngcontent-%COMP%]   .label[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{transform:rotate(180deg)}[dir=rtl][_nghost-%COMP%]   .full-name-mobile[_ngcontent-%COMP%]   .label[_ngcontent-%COMP%]   span[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .full-name-mobile[_ngcontent-%COMP%]   .label[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{transform:rotate(180deg)}
1.team-member-avatar[_ngcontent-%COMP%]{width:4rem;height:4rem;min-width:4rem;min-height:4rem;border-radius:50%;margin-right:2rem;display:flex;align-items:center;justify-content:center;font-size:var(--h6-font-size, var(--scale-400, 1.6rem));background-color:var(--color-bg-secondary, var(--global-neutral-200, #F4F4F5))}[dir=rtl]   [_nghost-%COMP%]   .team-member-avatar[_ngcontent-%COMP%]{margin-right:0rem;margin-left:2rem}[dir=rtl][_ngcontent-%COMP%]   .team-member-avatar[_ngcontent-%COMP%]{margin-right:0rem;margin-left:2rem}[dir=rtl][_nghost-%COMP%]   .team-member-avatar[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .team-member-avatar[_ngcontent-%COMP%]{margin-right:0rem;margin-left:2rem}.full-name[_ngcontent-%COMP%]{display:inline!important}@media (max-width: 1023.98px){.team-member-avatar[_ngcontent-%COMP%]{display:flex!important}.full-name-mobile[_ngcontent-%COMP%]   .label[_ngcontent-%COMP%]{padding-left:0!important;padding-right:0!important;margin-top:.5rem}.iwg-icon-chev[_ngcontent-%COMP%]{font-size:1.2rem;color:var(--color-icon-accent, var(--color-text-accent, var(--brand-primary-500, #E30613)));padding-right:1.5rem;text-align:right}[dir=rtl]   [_nghost-%COMP%]   .iwg-icon-chev[_ngcontent-%COMP%]{transform:rotate(180deg);padding-right:0;padding-left:1.5rem;text-align:left;flex-direction:row;display:flex}[dir=rtl][_ngcontent-%COMP%]   .iwg-icon-chev[_ngcontent-%COMP%]{transform:rotate(180deg);padding-right:0;padding-left:1.5rem;text-align:left;flex-direction:row;display:flex}[dir=rtl][_nghost-%COMP%]   .iwg-icon-chev[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .iwg-icon-chev[_ngcontent-%COMP%]{transform:rotate(180deg);padding-right:0;padding-left:1.5rem;text-align:left;flex-direction:row;display:flex}}.team-member-roles[_ngcontent-%COMP%]{display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:3}"]})}}return r})();var Ge=e(53718),en=function(r){return r[r.AllUsers=0]="AllUsers",r[r.AdminsOnly=1]="AdminsOnly",r}(en||{});function En(r,z){1&r&&(t.j41(0,"span",1),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&r&&(t.R7$(),t.JRh(t.bMT(2,1,"MY_TEAM.VIEW.ALL_USERS_PEREFERENCE_DESCRIPTION")))}function nn(r,z){1&r&&(t.j41(0,"span",2),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&r&&(t.R7$(),t.JRh(t.bMT(2,1,"MY_TEAM.VIEW.ADMINS_ONLY_PEREFERENCE_DESCRIPTION")))}let vn=(()=>{class r{constructor(i){this.store=i,this.unsubscribe$=new m.B,this.accesibilityPreferenceType$=this.store.pipe((0,d.Lt)(Ge.qQ)).pipe((0,y.Q)(this.unsubscribe$)),this.TeamAccesibilityPreferenceType=en,this.currentTeamAccesibilityPreferenceType=en.AdminsOnly,this.store.dispatch((0,et.QE)()),this.accesibilityPreferenceType$.pipe((0,y.Q)(this.unsubscribe$)).subscribe(p=>this.currentTeamAccesibilityPreferenceType=+p?.value)}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}openAccessSetting(){this.store.dispatch((0,dt.hF)())}static{this.\u0275fac=function(p){return new(p||r)(t.rXU(d.il))}}static{this.\u0275cmp=t.VBU({type:r,selectors:[["iwg-team-members-access"]],decls:5,vars:1,consts:[[1,"iwg-body1"],["id","teammembersaccess_label_all"],["id","teammembersaccess_label_admins"],["type","button","wrapperId","teammembersaccess_link_change","displayType","text-link-inline",1,"text-link","text-link--no-underline",3,"click","keydown.enter"]],template:function(p,c){1&p&&(t.j41(0,"div",0),t.DNE(1,En,3,3,"span",1)(2,nn,3,3,"span",2),t.j41(3,"iwg-button",3),t.bIt("click",function(){return c.openAccessSetting()})("keydown.enter",function(){return c.openAccessSetting()}),t.EFF(4,"MY_TEAM.VIEW.CHANGE_PEREFERENCE"),t.k0s()()),2&p&&(t.R7$(),t.vxM(c.currentTeamAccesibilityPreferenceType===c.TeamAccesibilityPreferenceType.AllUsers?1:2))},dependencies:[a.Q,_.D9],styles:[".iwg-body1[_ngcontent-%COMP%]{padding-top:1rem;display:flex}@media (max-width: 1023.98px){.iwg-body1[_ngcontent-%COMP%]{flex-flow:column}}.iwg-body1[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{padding-top:.1rem}.iwg-body1[_ngcontent-%COMP%]   #teammembersaccess_label_admins[_ngcontent-%COMP%], .iwg-body1[_ngcontent-%COMP%]   #teammembersaccess_label_all[_ngcontent-%COMP%]{padding-right:1.5rem}[dir=rtl]   [_nghost-%COMP%]   .iwg-body1[_ngcontent-%COMP%]   #teammembersaccess_label_admins[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .iwg-body1[_ngcontent-%COMP%]   #teammembersaccess_label_all[_ngcontent-%COMP%]{padding-right:0;padding-left:1.5rem}[dir=rtl][_ngcontent-%COMP%]   .iwg-body1[_ngcontent-%COMP%]   #teammembersaccess_label_admins[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%]   .iwg-body1[_ngcontent-%COMP%]   #teammembersaccess_label_all[_ngcontent-%COMP%]{padding-right:0;padding-left:1.5rem}[dir=rtl][_nghost-%COMP%]   .iwg-body1[_ngcontent-%COMP%]   #teammembersaccess_label_admins[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .iwg-body1[_ngcontent-%COMP%]   #teammembersaccess_label_admins[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   .iwg-body1[_ngcontent-%COMP%]   #teammembersaccess_label_all[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .iwg-body1[_ngcontent-%COMP%]   #teammembersaccess_label_all[_ngcontent-%COMP%]{padding-right:0;padding-left:1.5rem}"]})}}return r})();function yn(r,z){1&r&&t.nrm(0,"iwg-breadcrumbs")}function bn(r,z){1&r&&t.nrm(0,"iwg-team-members-access")}function Pn(r,z){if(1&r&&(t.j41(0,"div"),t.EFF(1),t.nI1(2,"translate"),t.k0s(),t.DNE(3,bn,1,0,"iwg-team-members-access",8)),2&r){const i=t.XpG(2);t.R7$(),t.JRh(t.bMT(2,2,"MY_TEAM.VIEW.TITLE")),t.R7$(2),t.Y8G("ngxPermissionsOnly",i.canViewAllTeamMembers)}}function In(r,z){if(1&r&&(t.j41(0,"iwg-button",12),t.EFF(1),t.k0s()),2&r){const i=t.XpG(3);t.R7$(),t.SpI(" ",i.bulkUploadButton," ")}}function On(r,z){1&r&&(t.j41(0,"iwg-button",13),t.EFF(1," MY_TEAM.VIEW.ADD_TEAM_MEMBER "),t.k0s())}function u(r,z){if(1&r&&(t.j41(0,"div",9),t.DNE(1,In,2,1,"iwg-button",10)(2,On,2,0,"iwg-button",11),t.k0s()),2&r){const i=t.XpG(2);t.R7$(),t.Y8G("ngxPermissionsOnly",i.addTeamMemberPermission),t.R7$(),t.Y8G("ngxPermissionsOnly",i.addTeamMemberPermission)}}function Q(r,z){1&r&&t.nrm(0,"iwg-button",14),2&r&&t.Y8G("iconClass","iwg-icon-plus")}function j(r,z){if(1&r&&(t.j41(0,"div",4)(1,"iwg-page-header",5),t.DNE(2,yn,1,0,"ng-template",null,0,t.C5r)(4,Pn,4,4,"ng-template",null,1,t.C5r)(6,u,3,2,"ng-template",null,2,t.C5r),t.k0s(),t.j41(8,"div",6),t.nrm(9,"iwg-team-filter")(10,"iwg-team-grid")(11,"router-outlet"),t.DNE(12,Q,1,1,"iwg-button",7),t.k0s()()),2&r){const i=t.XpG();t.R7$(12),t.Y8G("ngxPermissionsOnly",i.addTeamMemberPermission)}}let at=(()=>
1{class r{constructor(i,p,c,S){this.activatedRoute=i,this.store=p,this.uiConfigService=c,this.router=S,this.addTeamMemberPermission=h.e.CanAccessAddTeamMember,this.canViewAllTeamMembers=h.e.CanViewAllTeamMembers,this.unsubscribe$=new m.B,this.currentAccount$=this.store.pipe((0,d.Lt)(T.sZ)),this.showContent=!0,this.canAccessAddTeamMember$=this.store.pipe((0,d.Lt)(o.FM({permissionType:h.e.CanAccessAddTeamMember}))),this.updateShowContent()}ngOnInit(){this.router.events.pipe((0,I.p)(i=>i instanceof f.wF),(0,y.Q)(this.unsubscribe$)).subscribe(()=>this.updateShowContent()),this.currentAccount$.pipe((0,I.p)(i=>!!i),(0,y.Q)(this.unsubscribe$)).subscribe(i=>{this.currentAccount=i}),this.addMultipleUsersConfig=this.uiConfigService.get("addMultipleUsersConfig"),this.store.dispatch(g.gC()),this.store.dispatch(g.I$()),this.store.dispatch((0,C.Z_)())}updateShowContent(){this.permissionSub?.unsubscribe(),this.activatedRoute.snapshot.firstChild?this.permissionSub=this.canAccessAddTeamMember$.pipe((0,y.Q)(this.unsubscribe$)).subscribe(i=>{this.showContent=!!i}):this.showContent=!0}get canAddMultipleUsers(){return this.addMultipleUsersConfig.enabled&&this.addMultipleUsersConfig.customerTypeIds.includes(this.currentAccount?.primaryFinancialAccount?.customerTypeId)}get bulkUploadButton(){return this.canAddMultipleUsers?"MY_TEAM.VIEW.ADD_MULTIPLE_USERS":"MY_TEAM.VIEW.BULK_UPLOAD_TEAM"}ngOnDestroy(){this.permissionSub?.unsubscribe(),this.unsubscribe$.next(),this.unsubscribe$.complete(),this.store.dispatch(g.Ho())}static{this.\u0275fac=function(p){return new(p||r)(t.rXU(f.nX),t.rXU(d.il),t.rXU(P.K),t.rXU(f.Ix))}}static{this.\u0275cmp=t.VBU({type:r,selectors:[["iwg-team-view"]],decls:1,vars:1,consts:[["headerBreadcrumbs",""],["headerTitle",""],["headerContent",""],["class","team-view",4,"ngIf"],[1,"team-view"],[1,"bottom-border-desktop"],[1,"container"],["class","d--mobile-only new-account-fab mobile-offset","displayType","icon-primary","wrapperId","Team_TeamView_AddMember_Mobile","routerLink","add",3,"iconClass",4,"ngxPermissionsOnly"],[4,"ngxPermissionsOnly"],[1,"d--none-mobile","page-header-content"],["wrapperId","Team_TeamView_BulkUpload","displayType","secondary","routerLink","bulk",4,"ngxPermissionsOnly"],["wrapperId","Team_TeamView_AddMember","displayType","primary","routerLink","add",4,"ngxPermissionsOnly"],["wrapperId","Team_TeamView_BulkUpload","displayType","secondary","routerLink","bulk"],["wrapperId","Team_TeamView_AddMember","displayType","primary","routerLink","add"],["displayType","icon-primary","wrapperId","Team_TeamView_AddMember_Mobile","routerLink","add",1,"d--mobile-only","new-account-fab","mobile-offset",3,"iconClass"]],template:function(p,c){1&p&&t.DNE(0,j,13,1,"div",3),2&p&&t.Y8G("ngIf",c.showContent)},dependencies:[f.n3,f.Wk,N.y,a.Q,M.f6,G.m,k.bT,Tt,Mn,vn,_.D9],styles:[".mobile-offset[_ngcontent-%COMP%]{margin-right:1.2rem}.team-view[_ngcontent-%COMP%]{padding-bottom:5rem;position:relative}.team-view[_ngcontent-%COMP%]   .page-header-content[_ngcontent-%COMP%]{text-align:right}[dir=rtl]   [_nghost-%COMP%]   .team-view[_ngcontent-%COMP%]   .page-header-content[_ngcontent-%COMP%]{text-align:left}[dir=rtl][_ngcontent-%COMP%]   .team-view[_ngcontent-%COMP%]   .page-header-content[_ngcontent-%COMP%]{text-align:left}[dir=rtl][_nghost-%COMP%]   .team-view[_ngcontent-%COMP%]   .page-header-content[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .team-view[_ngcontent-%COMP%]   .page-header-content[_ngcontent-%COMP%]{text-align:left}.team-view[_ngcontent-%COMP%]   iwg-button[_ngcontent-%COMP%]{margin-top:.5rem;margin-bottom:.5rem}.team-view[_ngcontent-%COMP%]   iwg-button[_ngcontent-%COMP%]:last-child{margin-left:3rem}[dir=rtl]   [_nghost-%COMP%]   .team-view[_ngcontent-%COMP%]   iwg-button[_ngcontent-%COMP%]:last-child{margin-left:0;margin-right:3rem}[dir=rtl][_ngcontent-%COMP%]   .team-view[_ngcontent-%COMP%]   iwg-button[_ngcontent-%COMP%]:last-child{margin-left:0;margin-right:3rem}[dir=rtl][_nghost-%COMP%]   .team-view[_ngcontent-%COMP%]   iwg-button[_ngcontent-%COMP%]:last-child, [dir=rtl]   [_nghost-%COMP%]   .team-view[_ngcontent-%COMP%]   iwg-button[_ngcontent-%COMP%]:last-child{margin-left:0;margin-right:3rem}.team-view[_ngcontent-%COMP%] > .container[_ngcontent-%COMP%]{padding-top:6rem}@media (max-width: 1023.98px){.team-view[_ngcontent-%COMP%] > .container[_ngcontent-%COMP%]{padding-top:0rem}}.team-view[_ngcontent-%COMP%]   .new-account-fab[_ngcontent-%COMP%]{position:sticky;bottom:3rem;width:5rem;height:5rem;float:right;margin-bottom:3rem}[dir=rtl]   [_nghost-%COMP%]   .team-view[_ngcontent-%COMP%]   .new-account-fab[_ngcontent-%COMP%]{float:right}[dir=rtl][_ngcontent-%COMP%]   .team-view[_ngcontent-%COMP%]   .new-account-fab[_ngcontent-%COMP%]{float:right}[dir=rtl][_nghost-%COMP%]   .team-view[_ngcontent-%COMP%]   .new-account-fab[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .team-view[_ngcontent-%COMP%]   .new-account-fab[_ngcontent-%COMP%]{float:right}.team-view[_ngcontent-%COMP%]   .new-account-fab[_ngcontent-%COMP%]   i.iwg-icon-plus[_ngcontent-%COMP%]{font-size:2.5rem;width:2.5rem;display:inline-block}"]})}}return r})();var Mt=e(1716),At=e(41034),$t=e(69671),yt=e(68831),Ut=e(82630),Ht=e(51148),Ot=e(45131),Xt=e(68996),te=e(85211),se=e(20443),Ce=e(76864),Ve=e(96518),je=e(53122),Qe=e(29055);function Ye(r,z){1&r&&(t.j41(0,"span",8),t.EFF(1,"MY_TEAM.CONTACT.NEW_MEMBER_TITLE"),t.k0s())}function Je(r,z){1&r&&(t.j41(0,"div",9)(1,"div",10),t.EFF(2,"MY_TEAM.CONTACT.UPLOAD_WHOLE"),t.k0s(),t.j41(3,"div",11)(4,"a",12)(5,"div",13),t.EFF(6,"MY_TEAM.CONTACT.BULK_UPLOAD"),t.k0s()()()())}function ln(r,z){if(1&r){const i=t.RV6();t.j41(0,"iwg-modal-flyout",3),t.bIt("closeModal",function(){t.eBV(i);const c=t.XpG();return t.Njj(c.onFormCancel())}),t.j41(1,"iwg-loader",4),t.nI1(2,"async"),t.j41(3,"div",5)(4,"iwg-page-header",6),t.DNE(5,Ye,2,0,"ng-template",null,0,t.C5r)(7,Je,7,0,"ng-template",null,1,t.C5r),t.k0s(),t.j41(9,"iwg-contact-form",7),t.nI1(10,"async"),t.nI1(11,"async"),t.nI1(12,"async"),t.nI1(13,"async"),t.bIt("formSubmit",function(c){t.eBV(i);const S=t.XpG();return t.Njj(S.onFormSubmit(c))})("formCancelButton",function(){t.eBV(i);const c=t.XpG();return t.Njj(c.onFormCancelButton())})("formResendInvite",function(c){t.eBV(i);const S=t.XpG();return t.Njj(S.onFormResendInvite(c))}),t.k0s()()()()}if(2&r){const i=t.XpG();t.R7$(),t.Y8G("loading",t.bMT(2,8,i.isLoading$)),t.R7$(3),t.Y8G("pageSizeType",i.pageSizeType),t.R7$(5),t.Y8G("showEmailTeamMemberAlreadyExistsMessage",i.showEmailTeamMemberAlreadyExistsMessage)("showEmailInviteAlreadySe
1ntMessage",i.showEmailInviteAlreadySentMessage)("titles",t.bMT(10,10,i.titles$))("homeCentres",t.bMT(11,12,i.homeCentres$))("centreRoles",t.bMT(12,14,i.centreRoles$))("companyName",t.bMT(13,16,i.currentCompanyName$))}}let qn=(()=>{class r extends $t.f{ngOnInit(){this.store.pipe((0,d.Lt)(Mt.tL)).pipe((0,y.Q)(this.unsubscribe$)).subscribe(i=>this.canDeactivate=i),this.store.select(Mt.oU).pipe((0,y.Q)(this.unsubscribe$)).subscribe(i=>{this.showEmailInviteAlreadySentMessage=i&&i.errorStatus===te.G.Conflict,this.showEmailTeamMemberAlreadyExistsMessage=i&&i.errorStatus===te.G.BadRequest&&i.errorCode===se.E.TeamMemberWithEmailAlreadyExists}),this.currentCompany$.pipe((0,y.Q)(this.unsubscribe$)).subscribe(i=>{this.company=i}),this.store.dispatch((0,Ut.iz)()),this.store.dispatch((0,Ot.Z_)()),this.store.dispatch((0,Xt.Ud)())}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}constructor(i){super(),this.store=i,this.canShowFlyout$=this.store.pipe((0,d.Lt)(o.FM({permissionType:h.e.CanAccessAddTeamMember})),(0,_t.T)(p=>!0===p)),this.titles$=this.store.pipe((0,d.Lt)(o.dq)),this.homeCentres$=this.store.pipe((0,d.Lt)(yt.RK)),this.currentCompany$=this.store.pipe((0,d.Lt)(T.sZ)),this.currentCompanyName$=this.currentCompany$.pipe((0,_t.T)(p=>p.name)),this.centreRoles$=this.store.pipe((0,d.Lt)(Ht.C)).pipe((0,_t.T)(p=>p.map(c=>({...c,isAdmin:!1})))),this.isLoading$=this.store.pipe((0,d.Lt)(Mt.Di)),this.canDeactivate=!0,this.unsubscribe$=new m.B,this.pageSizeType=N.l.Flyout,this.showEmailInviteAlreadySentMessage=!1,this.showEmailTeamMemberAlreadyExistsMessage=!1}onFormSubmit(i){this.store.dispatch((0,At.Jg)({contactInvite:i,company:this.company}))}onFormCancel(){this.store.dispatch((0,dt.F3)())}onFormCancelButton(){this.canDeactivate=!0,this.onFormCancel()}onFormResendInvite(i){this.store.dispatch((0,At.AP)({contactInvite:i}))}canDeactivateModal(){return this.canDeactivate?null:{key:"EXIT_MODAL.TITLE",subtitle:"EXIT_MODAL.SUBTITLE"}}static{this.\u0275fac=function(p){return new(p||r)(t.rXU(d.il))}}static{this.\u0275cmp=t.VBU({type:r,selectors:[["iwg-contact-add"]],features:[t.Vt3],decls:2,vars:3,consts:[["headerTitle",""],["headerSubTitle",""],["id","Teams_ContactAdd_Flyout",3,"closeModal",4,"iwgModal"],["id","Teams_ContactAdd_Flyout",3,"closeModal"],[1,"loader",3,"loading"],[1,"contact-add"],[1,"no-container",3,"pageSizeType"],[3,"formSubmit","formCancelButton","formResendInvite","showEmailTeamMemberAlreadyExistsMessage","showEmailInviteAlreadySentMessage","titles","homeCentres","centreRoles","companyName"],["translate","",1,"contact-add__title"],[1,"contact-add__bulk-upload__container"],["translate",""],[1,"text--primary"],["id","Teams_ContactAdd_BulkUploadLink","routerLink","/team/manage/bulk",1,"contact-add__bulk-upload__link"],["translate","",1,"contact-add__bulk-upload__text"]],template:function(p,c){1&p&&(t.DNE(0,ln,14,18,"iwg-modal-flyout",2),t.nI1(1,"async")),2&p&&t.Y8G("iwgModal",t.bMT(1,1,c.canShowFlyout$))},dependencies:[f.Wk,_.Mm,N.y,Ce.V,Ve.s,je.h,Qe.q,k.Jj],encapsulation:2})}}return r})();var Ze=e(58790),Dn=e(74130),dn=function(r){return r.Add="Add",r.Remove="Remove",r}(dn||{}),ti=e(13997),ei=e(47192);const ni=r=>({ConsumerInput_MaxRow:r});function ii(r,z){if(1&r&&(t.j41(0,"span",14),t.EFF(1),t.k0s()),2&r){const i=t.XpG(2);t.AVh("capitalize",i.canAddMultipleUsers),t.R7$(),t.JRh(i.bulkHeading)}}function oi(r,z){1&r&&(t.j41(0,"p",15),t.EFF(1,"MY_TEAM.BULK.DESCRIPTION.IMPORTING_ENTERPRISE"),t.k0s())}function ai(r,z){if(1&r&&(t.j41(0,"span",14),t.EFF(1,"MY_TEAM.BULK.DESCRIPTION.IMPORTING"),t.k0s(),t.nrm(2,"br"),t.DNE(3,oi,2,0,"p",15)),2&r){const i=t.XpG(2);t.R7$(3),t.vxM(i.canAddMultipleUsers?3:-1)}}function si(r,z){if(1&r&&(t.j41(0,"span",16),t.EFF(1),t.nI1(2,"number"),t.nI1(3,"translate"),t.k0s()),2&r){const i=t.XpG(3);t.R7$(),t.SpI(" ",t.i5U(3,3,"GENERIC.COMPONENT.FILEUPLOAD.FILEUPLOADHINT_MAXROWS",t.eq3(6,ni,t.bMT(2,1,i.maxRows)))," ")}}function ri(r,z){1&r&&t.DNE(0,si,4,8,"ng-template",null,2,t.C5r)}function ci(r,z){if(1&r){const i=t.RV6();t.j41(0,"iwg-modal-flyout",4),t.bIt("closeModal",function(){t.eBV(i);const c=t.XpG();return t.Njj(c.onFormCancel())}),t.j41(1,"iwg-page-header",5),t.DNE(2,ii,2,3,"ng-template",null,0,t.C5r)(4,ai,4,1,"ng-template",null,1,t.C5r),t.k0s(),t.j41(6,"div",6)(7,"span",7)(8,"span",8),t.EFF(9,"MY_TEAM.BULK.HOW_TO"),t.k0s(),t.j41(10,"iwg-download",9),t.nI1(11,"async"),t.bIt("downloadingChange",function(){t.eBV(i);const c=t.XpG();return t.Njj(c.downloadTemplate(c.BulkActionType.Add))}),t.k0s()()(),t.j41(12,"form",10),t.bIt("submit",function(){t.eBV(i);const c=t.XpG();return t.Njj(c.handleSubmit())}),t.j41(13,"iwg-fileupload",11),t.DNE(14,ri,2,0),t.k0s(),t.nrm(15,"div",12),t.j41(16,"iwg-button",13),t.EFF(17,"MY_TEAM.BULK.UPLOAD.BUTTON"),t.k0s()()()}if(2&r){const i=t.XpG();t.R7$(),t.Y8G("pageSizeType",i.pageSizeType),t.R7$(9),t.Y8G("downloading",t.bMT(11,7,i.isDownloading$)),t.R7$(2),t.Y8G("formGroup",i.bulkUploadForm),t.R7$(),t.Y8G("acceptExtensions",i.acceptExtensions)("maxFileSizeMB",i.fileSizeMB),t.R7$(),t.vxM(i.maxRows?14:-1),t.R7$(2),t.Y8G("disabled",i.bulkUploadForm.invali
1d)}}let li=(()=>{class r extends $t.f{constructor(i,p,c){super(),this.formBuilder=i,this.store=p,this.uiConfigService=c,this.bulkUploadForm=this.formBuilder.group({fileUpload:["",n.k0.required]}),this.acceptExtensions=".xlsx",this.stepsCountLimit=1,this.fileSizeMB=1,this.pageSizeType=N.l.Flyout,this.canDeactivate=!0,this.unsubscribe$=new m.B,this.canShowFlyout$=this.store.pipe((0,d.Lt)(o.FM({permissionType:h.e.CanAccessAddTeamMember})),(0,_t.T)(S=>!0===S)),this.uploadProgress$=this.store.pipe((0,d.Lt)(Dn.ld)),this.isDownloading$=this.store.pipe((0,d.Lt)(Dn.Ti)),this.currentTemplateType=null,this.BulkActionType=dn,this.currentAccount$=this.store.pipe((0,d.Lt)(T.sZ)),this.templateTypes=[{name:"MY_TEAM.BULK.DOWNLOAD.TEMPLATE_TYPE_ADD",value:dn.Add},{name:"MY_TEAM.BULK.DOWNLOAD.TEMPLATE_TYPE_REMOVE",value:dn.Remove}],this.addMultipleUsersConfig=this.uiConfigService.get("addMultipleUsersConfig")}selectedTemplateType(i){this.currentTemplateType=i}downloadTemplate(i){this.store.dispatch(et.ZQ({currentTemplateType:i})),this.currentTemplateType=null}handleSubmit(){this.store.dispatch(et.sA({file:this.bulkUploadForm.controls.fileUpload.value[0]}))}onFormCancel(){this.navigateBack()}canDeactivateModal(){return this.canDeactivate?null:{key:"EXIT_MODAL.TITLE",subtitle:"EXIT_MODAL.SUBTITLE"}}navigateBack(){this.store.dispatch((0,dt.Tl)({}))}ngOnInit(){this.currentAccount$.pipe((0,I.p)(i=>!!i),(0,y.Q)(this.unsubscribe$)).subscribe(i=>{this.currentAccount=i}),this.store.pipe((0,d.Lt)(Dn.sH),(0,y.Q)(this.unsubscribe$)).subscribe(i=>this.canDeactivate=i),this.bulkUploadForm.controls.fileUpload.valueChanges.pipe((0,ti.ec)(),(0,y.Q)(this.unsubscribe$)).subscribe(i=>{this.receiveFile(i)})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete(),this.store.dispatch(et.wU())}receiveFile(i){this.store.dispatch(i?et.z2():et.gj())}get canAddMultipleUsers(){return this.addMultipleUsersConfig.enabled&&this.addMultipleUsersConfig.customerTypeIds.includes(this.currentAccount.primaryFinancialAccount?.customerTypeId)}get maxRows(){return this.canAddMultipleUsers?this.addMultipleUsersConfig.maxRows:null}get bulkHeading(){return this.canAddMultipleUsers?"MY_TEAM.BULK.HEADING_ENTERPRISE":"MY_TEAM.BULK.HEADING"}static{this.\u0275fac=function(p){return new(p||r)(t.rXU(n.ze),t.rXU(d.il),t.rXU(P.K))}}static{this.\u0275cmp=t.VBU({type:r,selectors:[["iwg-bulk-upload"]],features:[t.Vt3],decls:2,vars:3,consts:[["headerTitle",""],["headerSubTitle",""],["fileUploadHint",""],["id","bulk_flyout",3,"closeModal",4,"iwgModal"],["id","bulk_flyout",3,"closeModal"],[1,"no-container",3,"pageSizeType"],[1,"download_template"],[1,"label-wrapper","form-field-label"],["translate","",1,"iwg-body2"],["wrapperId","bulk_upload_download_template_download_link","downloadText","MY_TEAM.BULK.DOWNLOAD.TEMPLATE",1,"download-component",3,"downloadingChange","downloading"],["id","bulk_form",3,"submit","formGroup"],["id","bulk_choose.file","formControlName","fileUpload","placeholder","GENERIC.COMPONENT.FILEUPLOAD.FILENOTSELECTED",1,"upload__component",3,"acceptExtensions","maxFileSizeMB"],[1,"stretch"],["wrapperId","bulk_upload.button","displayType","primary","type","submit","translate","",1,"upload__button",3,"disabled"],["translate",""],["translate","",1,"m--b-a"],["id","fileUpload_HintMessage",1,"iwg-body2"]],template:function(p,c){1&p&&(t.DNE(0,ci,18,9,"iwg-modal-flyout",3),t.nI1(1,"async")),2&p&&t.Y8G("iwgModal",t.bMT(1,1,c.canShowFlyout$))},dependencies:[n.qT,n.BC,n.cb,n.j4,n.JD,_.Mm,D.O,N.y,ei.j,a.Q,Ve.s,je.h,_.D9,k.Jj,k.QX],styles:[".parent__wrapper[_ngcontent-%COMP%]{height:100%}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-grow:1;margin-right:8.4rem;margin-left:0}@media (max-width: 1023.98px){form[_ngcontent-%COMP%]{margin-right:0;margin-top:2rem}}[dir=rtl]   [_nghost-%COMP%]   form[_ngcontent-%COMP%]{margin-right:0;margin-left:8.4rem}@media (max-width: 1023.98px){[dir=rtl]   [_nghost-%COMP%]   form[_ngcontent-%COMP%]{margin-left:0}}[dir=rtl][_ngcontent-%COMP%]   form[_ngcontent-%COMP%]{margin-right:0;margin-left:8.4rem}@media (max-width: 1023.98px){[dir=rtl][_ngcontent-%COMP%]   form[_ngcontent-%COMP%]{margin-left:0}}[dir=rtl][_nghost-%COMP%]   form[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   form[_ngcontent-%COMP%]{margin-right:0;margin-left:8.4rem}@media (max-width: 1023.98px){[dir=rtl][_nghost-%COMP%]   form[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   form[_ngcontent-%COMP%]{margin-left:0}}.download_template[_ngcontent-%COMP%]{margin-right:8.4rem;justify-content:space-between;align-items:flex-end;display:flex;flex-flow:row;margin-bottom:2.4rem}.download_template[_ngcontent-%COMP%]   .form-field-label[_ngcontent-%COMP%]{flex-flow:column}.download_template[_ngcontent-%COMP%]   .form-field-label[_ngcontent-%COMP%] >
1 .download-component[_ngcontent-%COMP%]{margin-top:1rem}@media (max-width: 1023.98px){.download_template[_ngcontent-%COMP%]{margin-right:0;align-items:normal;flex-flow:column}.download_template[_ngcontent-%COMP%]   .upload__button[_ngcontent-%COMP%]{margin-top:1rem}}[dir=rtl]   [_nghost-%COMP%]   .download_template[_ngcontent-%COMP%]{margin-right:0;margin-left:8.4rem}@media (max-width: 1023.98px){[dir=rtl]   [_nghost-%COMP%]   .download_template[_ngcontent-%COMP%]{margin-left:0}}[dir=rtl][_ngcontent-%COMP%]   .download_template[_ngcontent-%COMP%]{margin-right:0;margin-left:8.4rem}@media (max-width: 1023.98px){[dir=rtl][_ngcontent-%COMP%]   .download_template[_ngcontent-%COMP%]{margin-left:0}}[dir=rtl][_nghost-%COMP%]   .download_template[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .download_template[_ngcontent-%COMP%]{margin-right:0;margin-left:8.4rem}@media (max-width: 1023.98px){[dir=rtl][_nghost-%COMP%]   .download_template[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .download_template[_ngcontent-%COMP%]{margin-left:0}}@media (max-width: 1023.98px){.stretch[_ngcontent-%COMP%]{flex-grow:1}}.upload__button[_ngcontent-%COMP%]{margin-top:5rem;font-size:var(--body3-font-size, 1.2rem);letter-spacing:.2rem;text-align:center;min-width:18rem;align-self:flex-end;-webkit-appearance:none}@media (max-width: 1023.98px){.upload__button[_ngcontent-%COMP%]{width:100%;margin-bottom:3.8rem}}.stepper__wrapper[_ngcontent-%COMP%]{width:7.5rem;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:10}.capitalize[_ngcontent-%COMP%]{text-transform:capitalize}"]})}}return r})();var di=e(35335),Ie=e(20622),Le=e(38304),Ae=e(7469),An=e(3950),Un=e(25068),mi=e(34905);let pi=(()=>{class r{set isDisabled(i){this.keepFormDisabled=i,this.disableFields(i)}get value(){return this.formGroup.valid?this.formArray.value:null}set value(i){this.addKeyContacts(i),this.valueChanged(i)}get formArray(){return this.formGroup.get("localKeyContacts")}set keyContacts(i){i&&(this.prepareKeyContacts(i,this.roleType.primary),this.prepareKeyContacts(i,this.roleType.invoicePrimary),this.prepareKeyContacts(i,this.roleType.invoiceSecondary),this.prepareKeyContacts(i,this.roleType.accountsPayable))}set contactsPrimaryAll(i){i&&(this.contactsPrimary=this.prepareContacts(i,this.roleType.primary))}set contactsInvoicePrimaryAll(i){i&&(this.contactsInvoicePrimary=this.prepareContacts(i,this.roleType.invoicePrimary))}set contactsInvoiceSecondaryAll(i){i&&(this.contactsInvoiceSecondary=this.prepareContacts(i,this.roleType.invoiceSecondary))}set contactsPayableAll(i){i&&(this.contactsPayable=this.prepareContacts(i,this.roleType.accountsPayable))}constructor(i,p,c,S){this.store=i,this.formBuilder=p,this.translate=c,this.iwgNameFormat=S,this.unsubscribe$=new m.B,this.subscriptions=[],this.wrapperId="",this.contactsPrimary=[],this.contactsInvoicePrimary=[],this.contactsInvoiceSecondary=[],this.contactsPayable=[],this.selectedContacts=new Map([]),this.concatenatedkeycontactsTooltipTranslations=["MY_TEAM.KEYCONTACTS.TOOLTIP.CONTACTTYPES","MY_TEAM.KEYCONTACTS.TOOLTIP.PRIMARYCONTACT","MY_TEAM.KEYCONTACTS.TOOLTIP.INVOICEPRIMARYCONTACT","MY_TEAM.KEYCONTACTS.TOOLTIP.INVOICESECONDARYCONTACT","MY_TEAM.KEYCONTACTS.TOOLTIP.ACCOUNTPAYABLECONTACT","MY_TEAM.KEYCONTACTS.TOOLTIP.KEYCONTACTROLE","MY_TEAM.KEYCONTACTS.TOOLTIP.ADMIN"],this.concatenatedTooltipTranslationParams={ConsumerInput_KeycontactsBoldStart:"<b>",ConsumerInput_KeycontactsBoldEnd:"</b>",ConsumerInput_AdminBoldStart:"<b>",ConsumerInput_AdminBoldEnd:"</b>"},this.dropdownIncludesSearchType=mi.W.Includes,this.roleType=Ae.g,this.onChanged=()=>{},this.onTouched=()=>{},this.formGroup=p.group({localKeyContacts:p.array([])}),this.subscriptions.push(this.formArray.valueChanges.pipe((0,ae.F)(),(0,y.Q)(this.unsubscribe$)).subscribe(Rt=>{this.valueChanged(Rt),Rt.forEach(Qt=>{if(this.selectedContacts.get(Qt.contactRoleId)?.id!==Qt.contactId)switch(Qt.contactRoleId){case this.roleType.primary:this.selectedContacts.set(Qt.contactRoleId,this.contactsPrimary.find(ge=>ge.id===Qt.contactId));break;case this.roleType.invoicePrimary:this.selectedContacts.set(Qt.contactRoleId,this.contactsInvoicePrimary.find(ge=>ge.id===Qt.contactId));break;case this.roleType.invoiceSecondary:this.selectedContacts.set(Qt.contactRoleId,this.contactsInvoiceSecondary.find(ge=>ge.id===Qt.contactId));break;case this.roleType.accountsPayable:this.selectedContacts.set(Qt.contactRoleId,this.contactsPayable.find(ge=>ge.id===Qt.contactId))}})}))}writeValue(i){i&&(this.value=i),null===i&&this.formArray.clear()}registerOnChange(i){this.onChanged=i}registerOnTouched(i){this.onTouched=i}
1valueChanged(i){this.onChanged(i),this.onTouched()}addKeyContacts(i){this.formArray.clear(),[this.createItem(this.findKeyContact(i,Ae.g.primary),!0),this.createItem(this.findKeyContact(i,Ae.g.invoicePrimary),!0),this.createItem(this.findKeyContact(i,Ae.g.invoiceSecondary),!1),this.createItem(this.findKeyContact(i,Ae.g.accountsPayable),!0)].forEach(p=>this.formArray.push(p))}createItem(i,p){return this.formBuilder.group({contactId:new n.hs({value:i.contactId?i.contactId:"",disabled:this.keepFormDisabled},p?[n.k0.required]:null),contactRoleId:i.contactRoleId.toString()})}getErrorObject(i){const p=this.formArray.get(i);if(!p.valid&&(p.dirty||p.touched))switch(i){case"0":return{required:"MY_TEAM.KEYCONTACTS.REQUIRED.PRIMARYCONTACT"};case"1":return{required:"MY_TEAM.KEYCONTACTS.REQUIRED.INVOICEPRIMARYCONTACT"};case"3":return{required:"MY_TEAM.KEYCONTACTS.REQUIRED.ACCOUNTPAYABLECONTACT"}}return null}findKeyContact(i,p){let c;return this.keyContactsAll=i,i&&i.length>0&&(c=i.filter(S=>S.contactRoleId===p)),c&&c.length>0?c[0]:{contactId:null,contactRoleId:p}}disableFields(i){if(this.formArray&&this.formArray.length>0)for(const p of this.formArray.controls)i?p.get("contactId").disable():p.get("contactId").enable()}onInvoiceContactFilterChanged(i,p){this.contactsTotalCount>30&&this.store.dispatch((0,et.zz)({contactName:i,role:p}))}prepareContacts(i,p){const c=this.selectedContacts.get(p);return[{id:"",name:"MY_TEAM.KEYCONTACTS.NOCONTACTLABEL"},...[...i.map(Rt=>({id:Rt.id,name:this.iwgNameFormat.transform(Rt)})),...c&&!i.some(Rt=>Rt.id===c.id)&&""!==c.id?[c]:[]].sort((Rt,Qt)=>Rt.name.localeCompare(Qt.name,this.translate.currentLang?this.translate.currentLang:this.translate.defaultLang))]}prepareKeyContacts(i,p){const c=i.find(S=>S.contactId===this.findKeyContact(this.keyContactsAll,p).contactId);if(c)switch(this.selectedContacts.set(p,{id:c.contactId,name:this.iwgNameFormat.transform(c)}),p){case Ae.g.primary:this.contactsPrimary.some(S=>S.id===c.contactId)||this.contactsPrimary.push({id:c.contactId,name:this.iwgNameFormat.transform(c)});break;case this.roleType.invoicePrimary:this.contactsInvoicePrimary.some(S=>S.id===c.contactId)||this.contactsInvoicePrimary.push({id:c.contactId,name:this.iwgNameFormat.transform(c)});break;case this.roleType.invoiceSecondary:this.contactsInvoiceSecondary.some(S=>S.id===c.contactId)||this.contactsInvoiceSecondary.push({id:c.contactId,name:this.iwgNameFormat.transform(c)});break;case this.roleType.accountsPayable:this.contactsPayable.some(S=>S.id===c.contactId)||this.contactsPayable.push({id:c.contactId,name:this.iwgNameFormat.transform(c)})}}ngOnDestroy(){this.subscriptions.forEach(i=>i.unsubscribe()),this.unsubscribe$.next(),this.unsubscribe$.complete()}static{this.\u0275fac=function(p){return new(p||r)(t.rXU(d.il),t.rXU(n.ze),t.rXU(_.c$),t.rXU(Kt.X))}}static{this.\u0275cmp=t.VBU({type:r,selectors:[["iwg-key-contacts-edit"]],inputs:{isDisabled:"isDisabled",wrapperId:"wrapperId",keyContacts:"keyContacts",contactsPrimaryAll:"contactsPrimaryAll",contactsInvoicePrimaryAll:"contactsInvoicePrimaryAll",contactsInvoiceSecondaryAll:"contactsInvoiceSecondaryAll",contactsPayableAll:"contactsPayableAll",contactsTotalCount:"contactsTotalCount"},features:[t.Jv_([{provide:n.kq,useExisting:(0,t.Rfq)(()=>r),multi:!0}])],decls:14,vars:62,consts:[[1,"form","dropdown-container",3,"formGroup","id"],["formArrayName","localKeyContacts"],[1,"form__field-wrapper","keycontacts-label",3,"formGroupName","id"],["formControlName","contactId","labelText","MY_TEAM.KEYCONTACTS.PRIMARYCONTACT","idKey","id","titleKey","name","valueKey","id","filterKeys","name",3,"filterChanged","wrapperId","sortAsc","options","errors","hintText","isHintHtml","id","isSearchable","searchType"],["formControlName","contactId","labelText","MY_TEAM.KEYCONTACTS.INVOICEPRIMARYCONTACT","idKey","id","titleKey","name","valueKey","id","filterKeys","name",3,"filterChanged","wrapperId","sortAsc","options","errors","hintText","isHintHtml","id","isSearchable","searchType"],["formControlName","contactId","labelText","MY_TEAM.KEYCONTACTS.INVOICESECONDARYCONTACT","idKey","id","titleKey","name","valueKey","id","filterKeys","name",3,"filterChanged","wrapperId","sortAsc","options","errors","hintText","isHintHtml","id","isSearchable","searchType"],["formControlName","contactId","labelText","MY_TEAM.KEYCONTACTS.ACCOUNTPAYABLECONTACT","idKey","id","titleKey","name","valueKey","id","filterKeys","name",3,"filterChanged","wrapperId","sortAsc","options","errors","hintText","isHintHtml","id","isSearchable","searchType"]],template:function(p,c){1&p&&(t.j41(0,"form",0)(1,"div",1)(2,"div",2)(3,"iwg-dropdown",3),t.nI1(4,"iwgTranslateArray"),t.bIt("filterChanged",function(Rt){return c.onInvoiceContactFilterChanged(Rt,c.roleType.primary)}),t.k0s()(),t.j41(5,"div",2)(6,"iwg-dropdown",4),t.nI1(7,"iwgTranslateArray"),t.bIt("filterChanged",function(Rt){return c.onInvoiceContactFilterChanged(Rt,c.roleType.invoicePrimary)}),t.k0s()(),t.j41(8,"div",2)(9,"iwg-dropdown",5),t.nI1(10,"iwgTranslateArray"),t.bIt("filterChanged",function(Rt){return c.onInvoiceContactFilterChanged(Rt,c.roleType.invoiceSecondary)}),t.k0s()(),t.j41(11,"div",2)(12,"iwg-dropdown",6),t.nI1(13,"iwgTranslateArray"),t.bIt("filterChanged",function(Rt){return c.onInvoiceContactFilterChanged(Rt,c.roleType.accountsPayable)}),t.k0s()()()()),2&p&&(t.FS9("id",c.wrapperId+"_EditForm"),t.Y8G("formGroup",c.formGroup),t.R7$(2),t.FS9("id",c.wrapperId+"_PrimaryLabelDiv"),t.Y8G("formGroupName",0),t.R7$(),t.FS9("wrapperId",c.wrapperId+"_edit_1"),t.FS9("id",c.wrapperId+"_edit_1_Wrapper"),t.Y8G("sortAsc",!1)("options",c.contactsPrimary)("errors",c.getErrorObject("0"))("hintText",t.brH(4,46,c.concatenatedkeycontactsTooltipTranslations,"<br/><br/>",c.concatenatedTooltipTranslationParams))("isHintHtml",!0)("isSearchable",!0)("searchType",c.dropdownIncludesSearchType),t.R7$(2),t.FS9("id",c.wrapperId+"_InvoicePrimaryLabelDiv"),t.Y8G("formGroupName",1),t.R7$(),t.FS9("wrapperId",c.wrapperId+"_edit_2"),t.FS9("id",c.wrapperId+"_edit_2_Wrapper"),t.Y8G("sortAsc",!1)("options",c.contactsInvoicePrimary)("errors",c.getErrorObject("1"))("hintText",t.brH(7,50,c.concatenatedkeycontactsTooltipTranslations,"<br/><br/>",c.concatenatedTooltipTranslationParams))("isHintHtml",!0)("isSearchable",!0)("searchType",c.dropdownIncludesSearchType),t.R7$(2),t.FS9("id",c.wrapperId+"_InvoiceSecondaryLabelDiv"),t.Y8G("formGroupName",2),t.R7$(),t.FS9("wrapperId",c.wrapperId+"_edit_3"),t.FS9("id",c.wrapperId+"_edit_3_Wrapper"),t.Y8G("sortAsc",!1)("options",c.contactsInvoiceSecondary)("errors",c.getErrorObject("2"))("hintText",t.brH(10,54,c.concatenatedkeycontactsTooltipTranslations,"<br/><br/>",c.concatenatedTooltipTranslationParams))("isHintHtml",!0)("isSearchable",!0)("searchType",c.dropdownIncludesSearchType),t.R7$(2),t.FS9("id",c.wrapperId+"_AccountPayableLabelDiv"),t.Y8G("formGroupName",3),t.R7$(),t.FS9("wrapperId",c.wrapperId+"_edit_4"),t.FS9("id",c.wrapperId+"_edit_5_Wrapper"),t.Y8G("sortAsc",!1)("options",c.contactsPayable)("errors",c.getErrorObject("3"))("hintText",t.brH(13,58,c.concatenatedkeycontactsTooltipTranslations,"<br/><br/>",c.concatenatedTooltipTranslationParams))("isHintHtml",!0)("isSearchable",!0)("searchType",c.dropdownIncludesSearchType))},dependencies:[n.qT,n.BC,n.cb,n.j4,n.JD,n.$R,n.v8,U.P,E.t],encapsulation:2})}}return r})();function ui(r,z){if(1&r&&(t.j41(0,"span",10),t.EFF(1),t.k0s()),2&r){const i=t.XpG(),p=i.$implicit,c=i.$index,S=t.XpG(3);
1t.FS9("id","team_KeyContacts_CentreName"+c),t.R7$(),t.JRh(S.isOpsCentre(p.get("centreNumber").value)?"MY_TEAM.KEYCONTACTS.OPSCENTRE":p.get("centreName").value)}}function hi(r,z){if(1&r&&t.nrm(0,"iwg-key-contacts-edit",12),2&r){const i=t.XpG(2).$implicit,p=t.XpG(3);t.Y8G("isDisabled",!p.checkEnabled(i.get("centreNumber").value))("contactsPrimaryAll",p.contactsPrimary)("contactsInvoicePrimaryAll",p.contactsInvoicePrimary)("contactsInvoiceSecondaryAll",p.contactsInvoiceSecondary)("contactsPayableAll",p.contactsPayable)("keyContacts",p.keyContacts)("contactsTotalCount",p.contactsTotalCount)}}function gi(r,z){if(1&r&&(t.j41(0,"div",11),t.DNE(1,hi,1,7,"iwg-key-contacts-edit",12),t.k0s()),2&r){const i=t.XpG().$index,p=t.XpG(3);t.FS9("id","team_KeyContacts_CentreContent"+i),t.R7$(),t.vxM(p.contactsPrimary?1:-1)}}function _i(r,z){if(1&r){const i=t.RV6();t.j41(0,"iwg-accordion",9),t.bIt("openChanged",function(c){const S=t.eBV(i).$index,Rt=t.XpG(3);return t.Njj(c&&Rt.onCentreOpened(S))}),t.DNE(1,ui,2,2,"ng-template",null,0,t.C5r)(3,gi,2,2,"ng-template",null,1,t.C5r),t.k0s()}if(2&r){const i=z.$implicit,p=z.$index;t.FS9("id","team_KeyContacts_CentreAccordion"+p),t.FS9("rowId",i.get("centreNumber").value),t.Y8G("formGroupName",p)}}function Ci(r,z){if(1&r&&(t.j41(0,"div",5)(1,"form",6)(2,"div",7),t.Z7z(3,_i,5,3,"iwg-accordion",8,t.fX1),t.k0s()()()),2&r){const i=t.XpG(2);t.R7$(),t.Y8G("formGroup",i.keyContactsForm),t.R7$(2),t.Dyx(i.formArray.controls)}}function fi(r,z){if(1&r&&(t.j41(0,"div",3)(1,"span",4),t.EFF(2),t.k0s(),t.DNE(3,Ci,5,1,"div",5),t.k0s()),2&r){const i=t.XpG();t.R7$(2),t.JRh(i.getCountry(i.localFilter)),t.R7$(),t.vxM(i.keyContactsForm?3:-1)}}let Vn=(()=>{class r extends $t.f{constructor(i,p,c){super(),this.formBuilder=i,this.store=p,this.activeRoute=c,this.unsubscribe$=new m.B,this.isEditDataValid=!0,this.canUpdateKeyContactsAsStaff=!1,this.keyContactsLoaded=!1,this.contactsTotalCount=0,this.isLoading$=this.store.select(Ie.DG),this.activeRoute.params.pipe((0,y.Q)(this.unsubscribe$)).subscribe(S=>{this.routeFilter=S.country,this.localFilter!==this.routeFilter&&this.store.dispatch((0,Le.$u)({filter:this.routeFilter}))}),this.keyContactsForm=this.formBuilder.group({centreKeyContacts:this.formBuilder.array([])}),this.keyContactsForm.valueChanges.pipe((0,y.Q)(this.unsubscribe$)).subscribe(S=>{const Rt=S&&S.centreKeyContacts.length>0?S.centreKeyContacts.filter(Qt=>this.checkEnabled(Qt.centreNumber)&&!this.checkIfKeyContactsAreValid(Qt.keyContacts)):null;this.isEditDataValid=!(Rt&&Rt.length>0),this.store.dispatch((0,Le.em)({form:{centreKeyContacts:this.keyContactsForm.value.centreKeyContacts,isDirty:this.keyContactsForm.dirty,isValid:this.isEditDataValid}}))})}checkIfKeyContactsAreValid(i){const p=i.filter(c=>(!c.contactId||""===c.contactId)&&c.contactRoleId!==Ae.g.invoiceSecondary);return!(p&&p.length>0)}ngOnInit(){this.store.pipe((0,d.Lt)(o.iU),(0,y.Q)(this.unsubscribe$)).subscribe(i=>{this.countriesList=i}),this.store.select((0,o.FM)({permissionType:h.e.CanOverrideUpdateKeyContacts})).pipe((0,y.Q)(this.unsubscribe$)).subscribe(i=>{this.canUpdateKeyContactsAsStaff=i}),this.store.pipe((0,d.Lt)(T.Nl),(0,I.p)(i=>!!i),(0,y.Q)(this.unsubscribe$)).subscribe(i=>{i&&this.store.dispatch((0,An.xc)({breadcrumbs:[{label:"MY_TEAM.KEY_CONTACTS",url:"/team/keycontacts"},{label:i,url:""}]}))}),this.store.pipe((0,d.Lt)(Ie.M4),(0,I.p)(i=>!!i),(0,y.Q)(this.unsubscribe$)).subscribe(i=>{this.accountKeyContacts=i,this.localFilter=this.routeFilter?this.localFilter:this.accountKeyContacts.centresKeyContacts[0].countryIsoCode,this.routeFilter||this.store.dispatch((0,Le.$u)({filter:this.localFilter})),this.loadCentresForFilter()}),(0,R.z)([this.store.select(Ie.q7),this.store.select(Ie.j$),this.store.select(Ie.ly),this.store.select(Ie.M4)]).pipe((0,I.p)(([i,p,c,S])=>!!i&&i?.length>0&&!!c&&!!S),(0,y.Q)(this.unsubscribe$)).subscribe(([i,p,c,S])=>{this.contactsPrimary=i,this.keyContacts=p,c>30&&i.length>0&&!this.keyContactsLoaded&&(this.contactsTotalCount=c,this.loadKeyContactsDetails())}),this.store.pipe((0,d.Lt)(Ie.pl),(0,I.p)(i=>!!i&&i.length>0),(0,y.Q)(this.unsubscribe$)).subscribe(i=>{this.contactsInvoicePrimary=i}),this.store.pipe((0,d.Lt)(Ie.Dy),(0,I.p)(i=>!!i&&i.length>0),(0,y.Q)(this.unsubscribe$)).subscribe(i=>{this.contactsInvoiceSecondary=i}),this.store.pipe((0,d.Lt)(Ie.WD),(0,I.p)(i=>!!i&&i.length>0),(0,y.Q)(this.unsubscribe$)).subscribe(i=>{this.contactsPayable=i}),this.store.pipe((0,d.Lt)(Ie.BZ),(0,y.Q)(this.unsubscribe$)).subscribe(i=>{this.contactRoles=i,this.loadCentresForFilter()}),this.store.pipe((0,d.Lt)(Ie.Ft),(0,y.Q)(this.unsubscribe$)).subscribe(i=>{this.localFilter=i,this.loadCentresForFilter()}),this.store.pipe((0,d.Lt)(Ie.D_),(0,y.Q)(this.unsubscribe$)).subscribe(i=>{this.updatedData=i}),this.store.pipe((0,d.Lt)(Ie.Iv),(0,y.Q)(this.unsubscribe$)).subscribe(i=>{i&&(this.loadCentresForFilter(),this.store.dispatch((0,Le.AT)({reset:!1})))})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}ngAfterViewInit(){this.centreAccordions.changes.pipe((0,di.c)(0),(0,y.Q)(this.unsubscribe$)).subscribe(i=>{i?.length&&this.openCentreFromQueryParams()})}get formArray(){return this.keyContactsForm.get("centreKeyContacts")}
1checkEnabled(i){if(this.canUpdateKeyContactsAsStaff)return!0;if(!this.contactRoles||0===this.contactRoles.length)return!1;{const p=this.contactRoles.filter(c=>c.centreNumber.toString()===i.toString());return!(!p||0===p.length)&&p[0].isAdmin}}getCountry(i){if(this.countriesList){const p=this.countriesList.filter(c=>c.isoCodeThreeLetter===i);return p&&p.length>0?p[0].name:i}return null}loadCentresForFilter(){this.accountKeyContacts&&this.contactRoles&&(this.formArray.clear(),this.keyContactsForm.markAsPristine(),this.accountKeyContacts.centresKeyContacts.filter(i=>i.countryIsoCode===this.localFilter).forEach(i=>{this.formArray.push(this.formBuilder.group({keyContacts:new n.hs(i.keyContacts,[n.k0.required]),useDefault:[!1],centreNumber:[i.centreNumber],financialAccountId:[i.financialAccountId],centreName:[i.centreName],defaults:new n.hs({value:this.accountKeyContacts.defaultKeyContacts,disabled:!0})}))}),this.store.dispatch((0,Le.em)({form:null})))}isOpsCentre(i){if(!this.contactRoles||0===this.contactRoles.length)return!1;{const p=this.contactRoles.filter(c=>c.centreNumber.toString()===i.toString());return!(!p||0===p.length)&&p[0].isOpsCentre}}canDeactivateModal(){return this.updatedData?{key:"EXIT_MODAL.TITLE",subtitle:"EXIT_MODAL.SUBTITLE"}:null}onCentreOpened(i){this.centreAccordions.forEach((p,c)=>{i!==c&&(p.open=!1)})}openCentreFromQueryParams(){const i=this.activeRoute.snapshot.queryParams;Object.keys(i).length>=1&&this.openCentre(i.centre)}openCentre(i){this.centreAccordions.filter(p=>p.rowId===i).forEach(p=>{p.open=!0})}loadKeyContactsDetails(){this.accountKeyContacts?.centresKeyContacts?.forEach(i=>{const p=[];
1i.keyContacts.forEach(c=>{p.some(S=>S.contactId===c.contactId)||p.push(c)}),p.forEach(c=>{this.contactsPrimary.some(S=>S.id===c.contactId)||this.keyContacts?.find(S=>S.id===c.contactId)||this.store.dispatch((0,Le.D$)({contactId:c.contactId}))})}),this.keyContactsLoaded=!0}static{this.\u0275fac=function(p){return new(p||r)(t.rXU(n.ze),t.rXU(d.il),t.rXU(f.nX))}}static{this.\u0275cmp=t.VBU({type:r,selectors:[["iwg-key-contacts-centres"]],viewQuery:function(p,c){if(1&p&&t.GBs(Un.M,5),2&p){let S;t.mGM(S=t.lsd())&&(c.centreAccordions=S)}},features:[t.Vt3],decls:3,vars:4,consts:[["header",""],["content",""],[1,"loader",3,"loading"],[1,"container"],[1,"section-title","iwg-page-title"],["id","team_KeyContacts_CentreskeyContactsDiv"],["id","team_KeyContacts_CentresForm",3,"formGroup"],["formArrayName","centreKeyContacts","id","team_KeyContacts_CentresFormArray"],["rightAccordion","true",3,"id","rowId","formGroupName"],["rightAccordion","true",3,"openChanged","id","rowId","formGroupName"],["translate","",3,"id"],[1,"centre-accordion-content",3,"id"],["formControlName","keyContacts","wrapperId","team_KeyContacts_Centres","id","team_KeyContacts_CentresWrapper",3,"isDisabled","contactsPrimaryAll","contactsInvoicePrimaryAll","contactsInvoiceSecondaryAll","contactsPayableAll","keyContacts","contactsTotalCount"]],template:function(p,c){1&p&&(t.j41(0,"iwg-loader",2),t.nI1(1,"async"),t.DNE(2,fi,4,2,"div",3),t.k0s()),2&p&&(t.Y8G("loading",t.bMT(1,2,c.isLoading$)),t.R7$(2),t.vxM(c.accountKeyContacts?2:-1))},dependencies:[n.qT,n.BC,n.cb,n.j4,n.JD,n.$R,n.v8,_.Mm,Un.M,Ce.V,pi,k.Jj],encapsulation:2})}}return r})();var Ti=e(44693);function Mi(r,z){if(1&r){const i=t.RV6();t.j41(0,"li",7)(1,"a",8),t.bIt("click",function(){const c=t.eBV(i).$implicit,S=t.XpG(2);return t.Njj(S.navigateTo("/team/keycontacts/"+c))}),t.j41(2,"span",9),t.EFF(3),t.k0s()()()}if(2&r){const i=z.$implicit,p=t.XpG(2);t.Y8G("ngClass",p.filter===i?"active":""),t.R7$(),t.FS9("id","Team_KeyContactsFilter_"+i),t.R7$(),t.FS9("id","Team_KeyContactsFilter_"+i+"Link"),t.R7$(),t.JRh(p.getCountry(i))}}function Ei(r,z){if(1&r&&(t.j41(0,"li",5)(1,"span",6),t.EFF(2,"MY_TEAM.KEYCONTACTS.FILTER.CENTRES"),t.k0s(),t.j41(3,"ul"),t.Z7z(4,Mi,4,4,"li",7,t.fX1),t.nI1(6,"filterCentres"),t.k0s()()),2&r){const i=t.XpG();t.R7$(4),t.Dyx(t.bMT(6,0,i.accountKeyContacts.centresKeyContacts))}}let vi=(()=>{class r{constructor(i){this.store=i,this.filter=null,this.filterChanged=new t.bkB,this.isMobileFilterOpenChanged=new t.bkB,this.subscriptions=[],this.isMobileFilterOpen=!1}ngOnInit(){this.subscriptions.push(this.store.pipe((0,d.Lt)(de.iU)).subscribe(i=>{this.countriesList=i}))}showCentres(){return this.accountKeyContacts?.centresKeyContacts?.length>0}showDefaultContacts(){return null!==this.accountKeyContacts?.defaultKeyContacts}getCountry(i){if(this.countriesList){const p=this.countriesList.filter(c=>c.isoCodeThreeLetter===i);return p&&p.length>0?p[0].name:i}return null}ngOnDestroy(){this.subscriptions.forEach(i=>i.unsubscribe())}toggleMobileFilterMenu(){this.isMobileFilterOpen=!this.isMobileFilterOpen,this.isMobileFilterOpenChanged.emit(this.isMobileFilterOpen)}navigateTo(i){this.filterChanged.emit(i)}static{this.\u0275fac=function(p){return new(p||r)(t.rXU(d.il))}}static{this.\u0275cmp=t.VBU({type:r,selectors:[["iwg-key-contacts-filter"]],inputs:{accountKeyContacts:"accountKeyContacts",filter:"filter"},outputs:{filterChanged:"filterChanged",isMobileFilterOpenChanged:"isMobileFilterOpenChanged"},decls:9,vars:2,consts:[[1,"sidenav"],[3,"ngClass"],["translate","","id","Team_KeyContactsFilter_WebTitle",1,"sidenav__group__title","container","d--none-mobile","section-title","iwg-page-title"],["translate","","id","Team_KeyContactsFilter_MobileTitle",1,"container","sidenav__group__title","d--mobile-only",3,"click"],[1,"sidenav__group__centres","container"],["id","Team_KeyContactsFilter_CentreContainer"],["translate","","id","Team_KeyContactsFilter_CentreHeader",1,"filter-centre","iwg-h5-medium"],["translate","",3,"ngClass"],[3,"click","id"],[1,"iwg-body1",3,"id"]],template:function(p,c){1&p&&(t.j41(0,"nav",0)(1,"div",1)(2,"div",2),t.EFF(3,"MY_TEAM.KEYCONTACTS.FILTER.MOBILETITLE"),t.k0s(),t.j41(4,"a",3),t.bIt("click",function(){return c.toggleMobileFilterMenu()}),t.EFF(5,"MY_TEAM.KEYCONTACTS.FILTER.MOBILETITLE"),t.k0s(),t.j41(6,"div",4)(7,"ul"),t.DNE(8,Ei,7,2,"li",5),t.k0s()()()()),2&p&&(t.R7$(),t.Y8G("ngClass",!0===c.isMobileFilterOpen?"sidenav__group active":"sidenav__group"),t.R7$(7),t.vxM(c.showCentres()?8:-1))},dependencies:()=>[_.Mm,k.YU,yi],encapsulation:2})}}return r})(),yi=(()=>{class r{transform(i){const p=i.map(c=>c.countryIsoCode).filter((c,S,Rt)=>c&&Rt.indexOf(c)===S);return new Set(p)}static{this.\u0275fac=function(p){return new(p||r)}}static{this.\u0275pipe=t.EJ8({name:"filterCentres",type:r,pure:!1})}}return r})();function bi(r,z){1&r&&t.nrm(0,"iwg-breadcrumbs")}function Pi(r,z){1&r&&(t.j41(0,"span",10),t.EFF(1,"MY_TEAM.KEYCONTACTS.HEADER"),t.k0s())}function Ii(r,z){1&r&&(t.j41(0,"span",10),t.EFF(1,"MY_TEAM.KEYCONTACTS.DESCRIPTION"),t.k0s())}function Oi(r,z){1&r&&(t.j41(0,"div",8)(1,"iwg-page-header",9),t.DNE(2,bi,1,0,"ng-template",null,2,t.C5r)(4,Pi,2,0,"ng-template",null,3,t.C5r)(6,Ii,2,0,"ng-template",null,4,t.C5r),t.k0s()())}function Di(r,z){if(1&r){const i=t.RV6();t.j41(0,"iwg-key-contacts-filter",12),t.nI1(1,"async"),t.bIt("isMobileFilterOpenChanged",function(c){t.eBV(i);const S=t.XpG(2);return t.Njj(S.toggleMobileFilterOpen(c))})("filterChanged",function(c){t.eBV(i);const S=t.XpG(2);return t.Njj(S.navigateToFilter(c))}),t.k0s()}if(2&r){const i=t.XpG(2);t.Y8G("accountKeyContacts",i.accountKeyContacts)("filter",t.bMT(1,2,i.filter$))}}function Ai(r,z){if(1&r&&t.DNE(0,Di,2,4,"iwg-key-contacts-filter",11),2&r){const i=t.XpG();t.vxM(i.accountKeyContacts?0:-1)}}function Si(r,z){if(1&r){const i=t.RV6();t.j41(0,"div",7)(1,"iwg-button",13),t.bIt("click",function(){t.eBV(i);const c=t.XpG();return t.Njj(c.onCancelClick())})("keydown.enter",function(){t.eBV(i);const c=t.XpG();return t.Njj(c.onCancelClick())}),t.EFF(2," SHARED.GUARDS.EXIT.CANCEL "),t.k0s(),t.j41(3,"iwg-button",14),t.bIt("click",function(){t.eBV(i);const c=t.XpG();return t.Njj(c.applyChanges())})("keydown.enter",function(){t.eBV(i);const c=t.XpG();return t.Njj(c.applyChanges())}),t.j41(4,"span",10),t.EFF(5,"MY_TEAM.KEYCONTACTS.APPLYBUTTON"),t.k0s()()()}if(2&r){const i=t.XpG();t.R7$(3),t.Y8G("disabled",!i.updatedData.isValid)}}let Ri=(()=>
1{class r{constructor(i,p){this.store=i,this.router=p,this.filter$=this.store.pipe((0,d.Lt)(Ie.Ft)),this.saveProcedure={addkeyContactUsers:"",updateIndex:null,updateCentre:null},this.isMobileFilterOpen=!1,this.isLoading$=this.store.select(Ie.DG),this.unsubscribe$=new m.B,this.store.pipe((0,d.Lt)(T.Nl),(0,I.p)(c=>!!c),(0,y.Q)(this.unsubscribe$)).subscribe(c=>{c&&this.store.dispatch((0,An.xc)({breadcrumbs:[{label:c,url:""}]}))}),this.store.pipe((0,d.Lt)(Ie.M4),(0,I.p)(c=>!!c),(0,y.Q)(this.unsubscribe$)).subscribe(c=>{this.accountKeyContacts=c})}ngOnInit(){this.store.dispatch((0,Le.Rx)()),this.store.dispatch((0,Le.zz)(null)),this.store.dispatch((0,Le.sZ)()),this.store.pipe((0,d.Lt)(Ie.D_),(0,y.Q)(this.unsubscribe$)).subscribe(i=>{this.updatedData=i})}ngOnDestroy(){this.store.dispatch((0,Le.$V)()),this.unsubscribe$.next(),this.unsubscribe$.complete()}saveCentresWiseData(){this.resetUpdation(),this.verifyDataToUpdate()}resetUpdation(){this.updatedCentre=this.updatedData.centreKeyContacts.find(i=>i.centreNumber===this.saveProcedure.updateCentre),this.keyContactsToUpdate={centreNumber:this.saveProcedure.updateCentre,financialAccountId:this.updatedCentre.financialAccountId,contactRoles:[],useDefault:!1}}verifyDataToUpdate(){const i=this.accountKeyContacts.centresKeyContacts.find(p=>p.centreNumber===this.updatedCentre.centreNumber);
1this.updatedCentre.keyContacts.forEach(p=>{const c=i.keyContacts.filter(S=>S.contactRoleId===p.contactRoleId);c&&c.length>0?p.contactId!==c[0].contactId&&this.keyContactsToUpdate.contactRoles.push({contactId:p.contactId,contactRoleId:p.contactRoleId}):null!==p.contactId&&(this.saveProcedure.addkeyContactUsers+=p.contactId+" ",this.keyContactsToUpdate.contactRoles.push({contactId:p.contactId,contactRoleId:p.contactRoleId}))}),this.keyContactsToUpdate.contactRoles&&this.keyContactsToUpdate.contactRoles.length>0&&this.keyContactsToUpdateCollection.push(this.keyContactsToUpdate)}updateKeyContacts(){this.store.dispatch((0,Le.Bp)({centreskeycontacts:this.keyContactsToUpdateCollection}))}applyChanges(){this.updatedData.isValid&&(this.keyContactsToUpdateCollection=[],this.saveProcedure.addkeyContactUsers="",this.updatedData&&this.updatedData.centreKeyContacts.length>0&&this.updatedData.centreKeyContacts.forEach(i=>{this.saveProcedure.updateCentre=i.centreNumber,this.saveCentresWiseData()}),this.keyContactsToUpdateCollection.length>0?this.updateKeyContacts():this.store.dispatch((0,vt.Ds)({text:"MY_TEAM.KEYCONTACTS.UPDATESUCCESS",notificationType:Jt._n.success})))}navigateToFilter(i){this.router.navigate([i])}toggleMobileFilterOpen(i){this.isMobileFilterOpen=i}onCancelClick(){this.store.dispatch((0,Le.AT)({reset:!0}))}static{this.\u0275fac=function(p){return new(p||r)(t.rXU(d.il),t.rXU(f.Ix))}}static{this.\u0275cmp=t.VBU({type:r,selectors:[["iwg-key-contacts"]],decls:12,vars:8,consts:[["header",""],["dynamicLinks",""],["headerBreadcrumbs",""],["headerTitle",""],["headerDescription",""],[1,"key-contacts-main"],[1,"loader",3,"loading"],["id","apply-container",1,"apply-container","container"],[1,"page-header"],[1,"bottom-border-desktop"],["translate",""],[1,"key-contact-filter",3,"accountKeyContacts","filter"],[1,"key-contact-filter",3,"isMobileFilterOpenChanged","filterChanged","accountKeyContacts","filter"],["displayType","secondary","type","button","wrapperId","update_keycontacts_cancelbutton","translate","",1,"cancel-button",3,"click","keydown.enter"],["type","button","wrapperId","Team_KeyContacts_ApplyChanges",1,"update-button",3,"click","keydown.enter","disabled"]],template:function(p,c){1&p&&(t.j41(0,"div",5)(1,"iwg-navigation-secondary"),t.DNE(2,Oi,8,0,"ng-template",null,0,t.C5r),t.j41(4,"iwg-loader",6),t.nI1(5,"async"),t.DNE(6,Ai,1,1,"ng-template",null,1,t.C5r),t.j41(8,"div"),t.nrm(9,"router-outlet"),t.k0s()()(),t.DNE(10,Si,6,1,"div",7),t.nI1(11,"async"),t.k0s()),2&p&&(t.R7$(4),t.Y8G("loading",t.bMT(5,4,c.isLoading$)),t.R7$(4),t.AVh("content-when-mobilefilteropen",c.isMobileFilterOpen),t.R7$(2),t.vxM(c.accountKeyContacts&&c.updatedData&&!t.bMT(11,6,c.isLoading$)?10:-1))},dependencies:[f.n3,_.Mm,N.y,a.Q,Ti.k,G.m,Ce.V,vi,k.Jj],styles:[".key-contacts-main[_ngcontent-%COMP%]{height:100%;display:flex;flex-flow:column}.loader[_ngcontent-%COMP%]{min-height:100%}"]})}}return r})();var Sn=e(56958),Se=e(86e3),wi=e(33962);const Fi=(r,z)=>({ConsumerInputRequestorFullName:r,ConsumerInputCompanyName:z}),Rn=r=>({ConsumerInputRequestorEmail:r});function Ni(r,z){1&r&&(t.j41(0,"div",4),t.nrm(1,"span",10),t.k0s())}function xi(r,z){1&r&&(t.j41(0,"div",5)(1,"span",11),t.nrm(2,"span",12)(3,"span",13),t.k0s()())}function Li(r,z){1&r&&(t.j41(0,"div",5)(1,"span",14),t.nrm(2,"span",12)(3,"span",13)(4,"span",15),t.k0s()())}function Bi(r,z){if(1&r&&(t.j41(0,"div")(1,"span"),t.nrm(2,"span",16),t.nI1(3,"iwgNameFormat"),t.nI1(4,"async"),t.nI1(5,"translate"),t.k0s(),t.nrm(6,"br"),t.j41(7,"div",17)(8,"a",18),t.EFF(9),t.k0s()()()),2&r){let i;const p=t.XpG();t.R7$(2),t.Y8G("innerHtml",t.i5U(5,6,"MY_TEAM.REQUEST.REQUESTED_JOIN",t.l_i(9,Fi,"<b>"+t.bMT(3,2,p.requestValue)+"</b><br class='d--mobile-only'>",null==(i=t.bMT(4,4,p.currentCompany$))?null:i.name)),t.npT),t.R7$(7),t.JRh(null==p.requestValue?null:p.requestValue.email)}}function $i(r,z){if(1&r&&(t.j41(0,"div")(1,"strong",19),t.EFF(2,"MY_TEAM.REQUEST.ACCEPTED"),t.k0s(),t.nrm(3,"br"),t.j41(4,"div",20)(5,"span"),t.nrm(6,"span",16),t.nI1(7,"translate"),t.k0s()()()),2&r){const i=t.XpG();t.R7$(4),t.AVh("display-none",!i.showMessage),t.R7$(2),t.Y8G("innerHtml",t.i5U(7,3,"MY_TEAM.REQUEST.WILL_NOTIFIED",t.eq3(6,Rn,"<a class='text-link'>"+(null==i.requestValue?null:i.requestValue.email)+"</a>")),t.npT)}}function Ui(r,z){if(1&r&&(t.j41(0,"div")(1,"strong",19),t.EFF(2,"MY_TEAM.REQUEST.REJECTED"),t.k0s(),t.nrm(3,"br"),t.j41(4,"div",20)(5,"span"),t.nrm(6,"span",16),t.nI1(7,"translate"),t.k0s()()()),2&r){const i=t.XpG();t.R7$(4),t.AVh("display-none",!i.showMessage),t.R7$(2),t.Y8G("innerHtml",t.i5U(7,3,"MY_TEAM.REQUEST.WILL_NOTIFIED",t.eq3(6,Rn,"<a class='text-link'>"+(null==i.requestValue?null:i.requestValue.email)+"</a>")),t.npT)}}function Vi(r,z){if(1&r&&(t.j41(0,"div",6),t.nrm(1,"span",16),t.nI1(2,"translate"),t.k0s()),2&r){const i=t.XpG();t.R7$(),t.Y8G("innerHtml",t.i5U(2,1,"MY_TEAM.REQUEST.WILL_NOTIFIED",t.eq3(4,Rn,"<a class='text-link'>"+(null==i.requestValue?null:i.requestValue.email)+"</a>")),t.npT)}}function ki(r,z){if(1&r){const i=t.RV6();t.j41(0,"div",9)(1,"iwg-button",21),t.nI1(2,"translate"),t.bIt("click",function(){t.eBV(i);const c=t.XpG();return t.Njj(c.rejectRequest(c.requestValue))})("keydown.enter",function(){t.eBV(i);const c=t.XpG();return t.Njj(c.rejectRequest(c.requestValue))}),t.j41(3,"div",22),t.nrm(4,"em",23),t.j41(5,"span",24),t.EFF(6,"MY_TEAM.REQUEST.REJECT"),t.k0s()()(),t.j41(7,"iwg-button",25),t.nI1(8,"translate"),t.bIt("click",function(){t.eBV(i);const c=t.XpG();return t.Njj(c.approveRequest(c.requestValue))})("keydown.enter",function(){t.eBV(i);const c=t.XpG();return t.Njj(c.approveRequest(c.requestValue))}),t.j41(9,"div",22),t.nrm(10,"em",26),t.j41(11,"span",24),t.EFF(12,"\xa0MY_TEAM.REQUEST.ACCEPT"),t.k0s()()()()}2&r&&(t.R7$(),t.BMQ("aria-label",t.bMT(2,2,"MY_TEAM.REQUEST.REJECT")),t.R7$(6),t.BMQ("aria-label",t.bMT(8,4,"MY_TEAM.REQUEST.ACCEPT")))}function Gi(r,z){if(1&r){const i=t.RV6();t.j41(0,"div",9)(1,"iwg-button",27),t.bIt("click",function(){t.eBV(i);const c=t.XpG();return t.Njj(c.navigateToEditPemissions(null==c.requestValue?null:c.requestValue.contactId))})("keydown.enter",function(){t.eBV(i);const c=t.XpG();return t.Njj(c.navigateToEditPemissions(null==c.requestValue?null:c.requestValue.contactId))}),t.j41(2,"span",28),t.EFF(3,"MY_TEAM.REQUEST.EDIT_MEMBERS_PERMISSION"),t.k0s()()()}}let ji=(()=>
1{class r{constructor(i,p){this.store=i,this.accountStore=p,this.loading$=this.store.pipe((0,d.Lt)(Sn.Nz)),this.requestStatus=wi.I,this.currentCompany$=this.accountStore.select(T.sZ)}set request(i){this.requestValue=i,this.requestDate=i?new Date(i.requestDate):null}approveRequest(i){this.store.dispatch((0,Se.Nb)({contactRequest:i}))}rejectRequest(i){this.store.dispatch((0,Se.xV)({contactRequest:i}))}navigateToEditPemissions(i){this.store.dispatch((0,dt.Jy)({contactId:i}))}static{this.\u0275fac=function(p){return new(p||r)(t.rXU(d.il),t.rXU(d.il))}}static{this.\u0275cmp=t.VBU({type:r,selectors:[["iwg-contact-request"]],inputs:{showMessage:"showMessage",request:"request"},decls:20,vars:24,consts:[[1,"invitation-card","row"],[1,"invitation-card__content","col-lg-9","col-md-12","col-sm-12","col-xs-12"],[1,"row"],[1,"invitation-card__col","col-lg-9","col-sm-12","col-md-10","col-xs-12"],[1,"invitation-card__icon","pending","d--none-mobile"],[1,"invitation-card__icon"],[1,"card-notified","col-sm-12","col-xs-12"],[1,"invitation-card__col--date","col-lg-3","col-md-2","col-sm-12","col-xs-12"],[1,"time",3,"ngClass"],[1,"invitation-card__actions","col-lg-3","col-md-12","col-sm-12","col-xs-12"],[1,"iwg-icon-profile-41"],[1,"iwg-icon-filled-green-tick"],[1,"path1"],[1,"path2"],[1,"iwg-icon-filled-warning-tick"],[1,"path3"],[3,"innerHtml"],[1,"style"],[1,"email","text"],["translate","",1,"invitation-card__title"],[1,"d--none-mobile"],["displayType","tertiary","id","team-request_contact-request_rejectButton",1,"no-borders","no-paddings","border-radius-btn-none",3,"click","keydown.enter"],[1,"button-text-wrapper"],["aria-hidden","true","id","team-request_contact-request_rejectIcon",1,"iwg-icon-close","text--error"],["translate","",1,"button-text"],["displayType","tertiary","id","team-request_contact-request_acceptButton",1,"no-borders","no-paddings","border-radius-btn-none",3,"click","keydown.enter"],["id","team-request_contact-request_acceptIcon",1,"iwg-icon-tick","text--success"],["displayType","link","id","team-request_contact-request_ediPermissinonButton",1,"button","text-link","text-link--small","button--link","button--icon-right",3,"click","keydown.enter"],["translate","",1,"text-link","text-link--regular"]],template:function(p,c){1&p&&(t.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),t.DNE(4,Ni,2,0,"div",4)(5,xi,4,0,"div",5)(6,Li,5,0,"div",5)(7,Bi,10,12,"div")(8,$i,8,8,"div")(9,Ui,8,8,"div"),t.k0s(),t.DNE(10,Vi,3,6,"div",6),t.j41(11,"div",7)(12,"span"),t.EFF(13),t.nI1(14,"localizedDate"),t.k0s(),t.j41(15,"span",8),t.EFF(16),t.nI1(17,"localizedDate"),t.k0s()()()(),t.DNE(18,ki,13,6,"div",9)(19,Gi,4,0,"div",9),t.k0s()),2&p&&(t.AVh("accepted",void 0!==(null==c.requestValue?null:c.requestValue.requestStatus)),t.R7$(3),t.AVh("approved-or-rejected",void 0!==(null==c.requestValue?null:c.requestValue.requestStatus)),t.R7$(),t.vxM(void 0===(null==c.requestValue?null:c.requestValue.requestStatus)?4:-1),t.R7$(),t.vxM((null==c.requestValue?null:c.requestValue.requestStatus)===c.requestStatus.approvedRequest?5:-1),t.R7$(),t.vxM((null==c.requestValue?null:c.requestValue.requestStatus)===c.requestStatus.rejectedRequest?6:-1),t.R7$(),t.vxM(void 0===(null==c.requestValue?null:c.requestValue.requestStatus)?7:-1),t.R7$(),t.vxM((null==c.requestValue?null:c.requestValue.requestStatus)===c.requestStatus.approvedRequest?8:-1),t.R7$(),t.vxM((null==c.requestValue?null:c.requestValue.requestStatus)===c.requestStatus.rejectedRequest?9:-1),t.R7$(),t.vxM(void 0!==(null==c.requestValue?null:c.requestValue.requestStatus)&&c.showMessage?10:-1),t.R7$(),t.AVh("changed",void 0!==(null==c.requestValue?null:c.requestValue.requestStatus)),t.R7$(2),t.JRh(t.i5U(14,18,c.requestDate,"short")),t.R7$(2),t.Y8G("ngClass",void 0!==(null==c.requestValue?null:c.requestValue.requestStatus)?"d--none-mobile":""),t.R7$(),t.SpI(" ",t.i5U(17,21,c.requestDate,"time"),""),t.R7$(2),t.vxM(void 0===(null==c.requestValue?null:c.requestValue.requestStatus)?18:-1),t.R7$(),t.vxM((null==c.requestValue?null:c.requestValue.requestStatus)===c.requestStatus.approvedRequest?19:-1))},dependencies:[_.Mm,a.Q,k.YU,_.D9,k.Jj,Ct.K,Kt.X],styles:[".invitation-card[_ngcontent-%COMP%]{outline:.1rem solid var(--color-border, var(--global-neutral-300, #C3C3C3));display:flex;flex-direction:row;align-items:center;margin:2rem 0rem}.invitation-card.accepted[_ngcontent-%COMP%]{background-color:var(--brand-secondary-200, #F9F5F0)}.invitation-card__content[_ngcontent-%COMP%]{flex:1;display:flex;align-items:center;font-size:var(--h6-font-size, var(--scale-400, 1.6rem));min-height:8rem;background-color:var(--brand-secondary-200, #F9F5F0)}.invitation-card__col[_ngcontent-%COMP%]{display:flex;align-items:center;flex:1;word-break:break-word}.invitation-card__col--date[_ngcontent-%COMP%]{align-items:center;display:flex}.invitation-card__col--main[_ngcontent-%COMP%]{flex:2}.invitation-card__icon[_ngcontent-%COMP%]{margin:0 1rem;word-break:normal}.invitation-card__icon[_ngcontent-%COMP%]   em[_ngcontent-%COMP%]{width:4.1rem;height:4.1rem;display:flex;align-items:center;justify-content:center}.invitation-card__actions[_ngcontent-%COMP%]{display:flex;align-self:stretch;padding:0;max-width:none}@media (max-width: 1023.98px){.invitation-card[_ngcontent-%COMP%]{flex-direction:column;margin:2rem 0rem;min-width:34.3rem}
1.invitation-card__d--none-mobile[_ngcontent-%COMP%], .invitation-card__icon.pending[_ngcontent-%COMP%]{display:none}.invitation-card__title[_ngcontent-%COMP%]{margin-top:1.5rem}.invitation-card__actions[_ngcontent-%COMP%]{background-color:var(--color-bg-primary, var(--global-neutral-100, #FFFFFF));outline:.1rem solid var(--color-border, var(--global-neutral-300, #C3C3C3))}.invitation-card__content[_ngcontent-%COMP%]{width:100%;flex-direction:column;align-items:flex-start;padding:1rem;min-height:18rem}.invitation-card__col[_ngcontent-%COMP%]{font-size:var(--h6-font-size, var(--scale-400, 1.6rem));line-height:var(--h6-line-height, 1.2);align-items:stretch;margin-top:1rem}.invitation-card__col.approved-or-rejected[_ngcontent-%COMP%]{align-items:center;margin-top:0rem}.invitation-card__col--date[_ngcontent-%COMP%]{margin-top:3rem}.invitation-card__col--date.changed[_ngcontent-%COMP%]{margin-left:1rem;margin-right:1rem}}.button--link[_ngcontent-%COMP%]{width:100%;padding:0;word-break:break-word;outline:0px}@media (max-width: 1023.98px){.style[_ngcontent-%COMP%]{margin-top:.5rem}}.card-notified[_ngcontent-%COMP%]{display:none}@media (max-width: 1023.98px){.card-notified[_ngcontent-%COMP%]{display:flex;padding:0 3rem;font-size:var(--mobile-h5-font-size, var(--scale-400, 1.6rem));word-break:break-word}}.email[_ngcontent-%COMP%]{color:var(--color-text-accent, var(--brand-primary-500, #E30613));cursor:pointer;word-break:break-word;font-weight:var(--font-weight-normal, 400);font-style:normal;line-height:normal;letter-spacing:normal}iwg-button[_ngcontent-%COMP%]{outline:.1rem solid var(--color-border, var(--global-neutral-300, #C3C3C3));min-height:8rem;width:50%}.button-text-wrapper[_ngcontent-%COMP%]{padding:2rem 1.5rem;display:flex;align-items:center;justify-content:center}.button-text-wrapper[_ngcontent-%COMP%]   .button-text[_ngcontent-%COMP%]{margin-left:1rem;font-size:var(--body1-font-size, 1.6rem);text-transform:none;font-weight:var(--font-weight-normal, 400);font-style:normal;letter-spacing:normal;word-break:break-all}[dir=rtl]   [_nghost-%COMP%]   .button-text-wrapper[_ngcontent-%COMP%]   .button-text[_ngcontent-%COMP%]{margin-right:1rem;margin-left:0}[dir=rtl][_ngcontent-%COMP%]   .button-text-wrapper[_ngcontent-%COMP%]   .button-text[_ngcontent-%COMP%]{margin-right:1rem;margin-left:0}[dir=rtl][_nghost-%COMP%]   .button-text-wrapper[_ngcontent-%COMP%]   .button-text[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .button-text-wrapper[_ngcontent-%COMP%]   .button-text[_ngcontent-%COMP%]{margin-right:1rem;margin-left:0}.text--success[_ngcontent-%COMP%]{color:var(--color-text-success, var(--global-functional-green, #23A983));font-size:2.33rem}.text--error[_ngcontent-%COMP%]{color:var(--color-text-error, var(--global-functional-red, #EE421C));font-size:2.33rem}.display-none[_ngcontent-%COMP%]{display:none}.time[_ngcontent-%COMP%]{margin:0 .5rem}"]})}}return r})();function Yi(r,z){1&r&&t.nrm(0,"iwg-breadcrumbs")}function Hi(r,z){1&r&&(t.j41(0,"span",6),t.EFF(1,"MY_TEAM.REQUEST.REVIEW_ACCESS"),t.k0s())}function Ki(r,z){1&r&&(t.j41(0,"iwg-page-header",5),t.DNE(1,Yi,1,0,"ng-template",null,0,t.C5r)(3,Hi,2,0,"ng-template",null,1,t.C5r),t.k0s())}function Wi(r,z){1&r&&t.nrm(0,"iwg-contact-request",10),2&r&&t.Y8G("request",z.$implicit)("showMessage",!0)}function Xi(r,z){1&r&&(t.j41(0,"span",11),t.EFF(1,"MY_TEAM.REQUEST.NO_PENDING_REQUESTS"),t.k0s())}function zi(r,z){if(1&r&&(t.j41(0,"div",7)(1,"div",8),t.EFF(2,"MY_TEAM.REQUEST.PENDING"),t.k0s(),t.j41(3,"iwg-loader",9,2),t.nI1(5,"async"),t.Z7z(6,Wi,1,2,"iwg-contact-request",10,t.fX1),t.nI1(8,"async"),t.k0s(),t.DNE(9,Xi,2,0,"span",11),t.nI1(10,"async"),t.k0s()),2&r){const i=t.XpG();t.R7$(3),t.Y8G("loading",t.bMT(5,2,i.loading$)),t.R7$(3),t.Dyx(t.bMT(8,4,i.contactRequests$)),t.R7$(3),t.vxM(t.bMT(10,6,i.contactRequests$).length?-1:9)}}let Qi=(()=>{class r{constructor(i){this.store=i,this.unsubscribe$=new m.B,this.contactRequests$=this.store.pipe((0,d.Lt)(Sn.xS)),this.loading$=this.store.pipe((0,d.Lt)(Sn.Nz)),this.canAccessRequests$=this.store.pipe((0,d.Lt)((0,o.FM)({permissionType:h.e.CanAccessTeamRequests})))}ngOnInit(){this.canAccessRequests$.pipe((0,I.p)(i=>!!i),(0,St.s)(1),(0,y.Q)(this.unsubscribe$)).subscribe(()=>
1this.store.dispatch((0,Se.yV)()))}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}static{this.\u0275fac=function(p){return new(p||r)(t.rXU(d.il))}}static{this.\u0275cmp=t.VBU({type:r,selectors:[["iwg-team-requests"]],decls:4,vars:6,consts:[["headerBreadcrumbs",""],["headerTitle",""],["invitationRequestLoader",""],["class","bottom-border",4,"ngIf"],["class","iwg-team-requests container",4,"ngIf"],[1,"bottom-border"],["translate",""],[1,"iwg-team-requests","container"],["translate","",1,"iwg-page-title"],[1,"loader",3,"loading"],[3,"request","showMessage"],["translate","",1,"iwg-body1"]],template:function(p,c){1&p&&(t.DNE(0,Ki,5,0,"iwg-page-header",3),t.nI1(1,"async"),t.DNE(2,zi,11,8,"div",4),t.nI1(3,"async")),2&p&&(t.Y8G("ngIf",t.bMT(1,2,c.canAccessRequests$)),t.R7$(2),t.Y8G("ngIf",t.bMT(3,4,c.canAccessRequests$)))},dependencies:[_.Mm,N.y,G.m,Ce.V,k.bT,ji,k.Jj],styles:[".iwg-team-requests[_ngcontent-%COMP%]{padding-top:4.8rem;padding-bottom:4.8rem}"]})}}return r})();var Ji=e(99172),Zi=e(35334),kn=e(66893),We=e(38207),Gn=e(39642),qi=e(48337),to=e(91699);const wn=r=>({ConsumerInputNoOfCentres:r}),jn=()=>["/network-devices"],Fn=r=>({contactId:r}),eo=()=>["/network-devices/manage/devices/add"];function no(r,z){if(1&r&&t.nrm(0,"iwg-text-input-wrapper",13),2&r){const i=t.XpG();t.Y8G("isDisabled",!0)("placeholderText",i.getHomeCentre())}}function io(r,z){if(1&r&&t.nrm(0,"iwg-dropdown",14),2&r){const i=t.XpG();t.Y8G("options",i.homeCentres)}}function oo(r,z){1&r&&(t.j41(0,"a",28),t.EFF(1,"MY_TEAM.VIEWCONTACT.MANAGE.KEYCONTACTS"),t.k0s())}function ao(r,z){if(1&r&&(t.j41(0,"div",18)(1,"div",26)(2,"span",27),t.EFF(3,"MY_TEAM.VIEWCONTACT.LABELS.NONE"),t.k0s()(),t.DNE(4,oo,2,0,"a",28),t.k0s()),2&r){const i=t.XpG();t.R7$(4),t.vxM(i.isAdminOrStaff&&!i.isCurrentUser?4:-1)}}function so(r,z){if(1&r&&(t.j41(0,"span"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&r){const i=t.XpG(2).$implicit;t.R7$(),t.SpI(" ",t.i5U(2,1,"MY_TEAM.VIEWCONTACT.LABELS.KEYCONTACTSCOMPANYCENTRE",t.eq3(4,wn,i.KeyContactData))," ")}}function ro(r,z){1&r&&(t.j41(0,"span",27),t.EFF(1," MY_TEAM.VIEWCONTACT.LABELS.KEYCONTACTSCOMPANY "),t.k0s())}function co(r,z){if(1&r&&t.DNE(0,so,3,6,"span")(1,ro,2,0,"span",27),2&r){const i=t.XpG().$implicit;t.vxM(i.KeyContactData>0?0:-1),t.R7$(),t.vxM(i.KeyContactData<=0?1:-1)}}function lo(r,z){if(1&r&&(t.j41(0,"span"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&r){const i=t.XpG(2).$implicit;t.R7$(),t.SpI(" ",t.i5U(2,1,"MY_TEAM.VIEWCONTACT.LABELS.KEYCONTACTSCENTRE",t.eq3(4,wn,i.KeyContactData))," ")}}function mo(r,z){if(1&r&&(t.j41(0,"span"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&r){const i=t.XpG(2).$implicit;t.R7$(),t.SpI(" ",t.i5U(2,1,"MY_TEAM.VIEWCONTACT.LABELS.KEYCONTACTSMULTIPLECENTRE",t.eq3(4,wn,i.KeyContactData))," ")}}function po(r,z){if(1&r&&t.DNE(0,lo,3,6,"span")(1,mo,3,6,"span"),2&r){const i=t.XpG().$implicit;t.vxM(1===i.KeyContactData?0:-1),t.R7$(),t.vxM(i.KeyContactData>1?1:-1)}}function uo(r,z){if(1&r&&(t.j41(0,"a",32),t.EFF(1," MY_TEAM.VIEWCONTACT.MANAGE.KEYCONTACTS "),t.k0s()),2&r){const i=t.XpG().$index;t.Mz_("id","contactView_ManageKeyContacts_",i,"")}}function ho(r,z){if(1&r&&(t.j41(0,"div",18)(1,"div",29)(2,"span",30),t.EFF(3),t.k0s(),t.nrm(4,"span",31),t.DNE(5,co,2,2)(6,po,2,2),t.k0s(),t.DNE(7,uo,2,2,"a",32),t.k0s()),2&r){const i=z.$implicit,p=z.$index,c=t.XpG(2);t.R7$(),t.FS9("id","contactView_"+i.KeyContactTitle),t.R7$(2),t.JRh(i.KeyContactTitle),t.R7$(),t.FS9("id","contactView_keycontactsnumbers_"+(p+1)),t.R7$(),t.vxM(i.CompanyKeyContact?5:-1),t.R7$(),t.vxM(i.CompanyKeyContact?-1:6),t.R7$(),t.vxM(0===p&&c.isAdminOrStaff&&!c.isCurrentUser?7:-1)}}function go(r,z){if(1&r&&(t.j41(0,"div"),t.Z7z(1,ho,8,6,"div",18,t.fX1),t.k0s()),2&r){const i=t.XpG();t.R7$(),t.Dyx(i.keyContactsSummary)}}function _o(r,z){1&r&&(t.j41(0,"a",34),t.EFF(1,"MY_TEAM.VIEWCONTACT.MANAGE.MEMEBERSUBSCRIPTION"),t.k0s())}function Co(r,z){if(1&r&&(t.j41(0,"div",18)(1,"div",26)(2,"span",27),t.EFF(3,"MY_TEAM.VIEWCONTACT.LABELS.NONE"),t.k0s()(),t.DNE(4,_o,2,0,"a",34),t.k0s()),2&r){const i=t.XpG(2);t.R7$(4),t.vxM(i.isAdminOrStaff&&!i.isCurrentUser?4:-1)}}function fo(r,z){if(1&r&&(t.j41(0,"a",35),t.EFF(1,"MY_TEAM.VIEWCONTACT.MANAGE.MEMEBERSUBSCRIPTION"),t.k0s()),2&r){const i=t.XpG().$index;t.Mz_("id","contactView_ManageSubscriptions_",i,"")}}function To(r,z){if(1&r&&(t.j41(0,"div",18)(1,"div",26)(2,"span",31),t.EFF(3),t.nI1(4,"translate"),t.k0s()(),t.DNE(5,fo,2,2,"a",35),t.k0s()),2&r){const i=z.$implicit,p=z.$index,c=t.XpG(3);t.R7$(2),t.FS9("id","contactView_membership_"+i.id),t.R7$(),t.JRh(t.bMT(4,3,c.getMembershipTypeText(i))),t.R7$(2),t.vxM(0===p&&c.isAdminOrStaff&&!c.isCurrentUser?5:-1)}}function Mo(r,z){if(1&r&&(t.j41(0,"div"),t.Z7z(1,To,6,5,"div",18,t.fX1),t.k0s()),2&r){const i=t.XpG(2);t.R7$(),t.Dyx(i.contactData.membershipDetails)}}function Eo(r,z){if(1&r&&(t.j41(0,"div",19)(1,"div",6)(2,"span",33),t.EFF(3,"MY_TEAM.VIEWCONTACT.LABELS.MEMBERSUBSCRIPTION"),t.k0s(),t.j41(4,"div",17,1),t.DNE(6,Co,5,1,"div",18)(7,Mo,3,0,"div"),t.k0s()()()),2&r){const i=t.XpG();t.R7$(4),t.Y8G("ngClass",i.isAdminOrStaff&&!i.isCurrentUser?"preview-card":"preview-card disabled"),t.R7$(2),t.vxM(i.isMembershipAvailable()?-1:6),t.R7$(),t.vxM(i.isMembershipAvailable()?7:-1)}}function vo(r,z){if(1&r&&(t.j41(0,"a",38),t.EFF(1,"MY_TEAM.VIEWCONTACT.MANAGE.NETWORKDEVICES"),t.k0s()),2&r){const i=t.XpG(3);t.Y8G("routerLink",t.lJ4(2,jn))("queryParams",t.eq3(3,Fn,null==i.contactData||null==i.contactData.contactDetails?null:i.contactData.contactDetails.contactId))}}function yo(r,z){if(1&r&&(t.j41(0,"div",18)(1,"div",26)(2,"span",27),t.EFF(3,"MY_TEAM.VIEWCONTACT.LABELS.NONE"),t.k0s()(),t.DNE(4,vo,2,5,"a",38),t.k0s()),2&r){const i=t.XpG(2);t.R7$(4),t.vxM(i.isAdminOrStaff||i.isCurrentUser?4:-1)}}function bo(r,z){if(1&r&&(t.j41(0,"a",41),t.EFF(1,"MY_TEAM.VIEWCONTACT.MANAGE.NETWORKDEVICES"),t.k0s()),2&r){const i=t.XpG().$index,p=t.XpG(3);t.Mz_("id","contactView_ManageNetworkDevices_",i,""),t.Y8G("routerLink",t.lJ4(4,jn))("queryParams",t.eq3(5,Fn,null==p.contactData||null==p.contactData.contactDetails?null:p.contactData.contactDetails.contactId))}}function Po(r,z){if(1&r&&(t.j41(0,"div",18)(1,"div",29)(2,"p",39),t.EFF(3),t.j41(4,"span",40),t.EFF(5),t.k0s()()(),t.DNE(6,bo,2,7,"a",41),t.k0s()),2&r){const i=z.$implicit,p=z.$index,c=t.XpG(3);t.R7$(),t.FS9("id","contactView_"+i.macAddress),t.R7$(2),t.SpI("",i.deviceName," "),t.R7$(2),t.SpI("(",i.macAddress,")"),t.R7$(),t.vxM(0===p&&(c.isAdminOrStaff||c.isCurrentUser)?6:-1)}}function Io(r,z){if(1&r&&(t.j41(0,"div"),t.Z7z(1,Po,7,4,"div",18,t.fX1),t.k0s()),2&r){const i=t.XpG(2);t.R7$(),t.Dyx(i.contactData.networkDevices)}}function Oo(r,z){if(1&r&&(t.j41(0,"span",37),t.nrm(1,"i",42),t.j41(2,"a",43),t.EFF(3,"MY_TEAM.VIEWCONTACT.ADDNETWORKDEVICES"),t.k0s()()),2&r){const i=t.XpG(2);t.Y8G("routerLink",t.lJ4(2,eo))("queryParams",t.eq3(3,Fn,null==i.contactData||null==i.contactData.contactDetails?null:i.contactData.contactDetails.contactId))}}function Do(r,z){if(1&r&&(t.j41(0,"div",20)(1,"div",6)(2,"span",36),t.EFF(3,"MY_TEAM.VIEWCONTACT.LABELS.NETWORKDEVICES"),t.k0s(),t.j41(4,"div",17,2),t.DNE(6,yo,5,1,"div",18)(7,Io,3,0,"div")(8,Oo,4,5,"span",37),t.k0s()()()),2&r){const i=t.XpG();t.R7$(4),t.Y8G("ngClass",i.isAdminOrStaff?"preview-card":"preview-card disabled"),t.R7$(2),t.vxM(i.isNetworkDevicesAvailable()?-1:6),t.R7$(),t.vxM(i.isNetworkDevicesAvailable()?7:-1),t.R7$(),t.vxM(i.isAdminOrStaff?8:-1)}}function Ao(r,z){if(1&r){const i=t.RV6();t.j41(0,"iwg-button",44),t.nI1(1,"async"),t.bIt("click",function(){t.eBV(i);const c=t.XpG();return t.Njj(c.deleteClick())})("keydown.enter",function(){t.eBV(i);const c=t.XpG();return t.Njj(c.deleteClick())}),t.EFF(2,"MY_TEAM.VIEWCONTACT.DELETE"),t.k0s()}if(2&r){const i=t.XpG();t.Y8G("disabled",t.bMT(1,1,i.deleteInProgress$))}}function So(r,z){if(1&r){const i=t.RV6();t.j41(0,"iwg-button",45),t.bIt("click",function(){t.eBV(i);const c=t.XpG();return t.Njj(c.saveClick(c.formContact.value))})("keydown.enter",function(){t.eBV(i);const c=t.XpG();return t.Njj(c.saveClick(c.formContact.value))}),t.EFF(1,"MY_TEAM.VIEWCONTACT.SAVE"),t.k0s()}if(2&r){const i=t.XpG();
1t.Y8G("disabled",i.formContact.pristine||i.formContact.invalid)}}let Yn=(()=>{class r{static permissionValidator(i,p,c){return S=>{const Rt=S.get(i);let Qt=!1;const ge=new Set(Rt.value.filter(Re=>!Re.isAdmin).map(Re=>Re.centreNumber));return p.centresKeyContacts.filter(Re=>ge.has(Re.centreNumber)).forEach(Re=>{const fe=Re.keyContacts.filter(Ee=>Ee.contactId===c);fe&&fe.length>0&&(Qt=!0)}),Qt?(S.get(i).setErrors({permissionInvalid:!0}),{permissionInvalid:!0}):null}}constructor(i,p,c,S){this.formBuilder=i,this.translate=p,this.confirmationDialogService=c,this.store=S,this.isCurrentUser=!1,this.isAdmin=!1,this.companyName="",this.save=new t.bkB,this.delete=new t.bkB,this.isAdminOrStaff=!1,this.isAdminPermissionsAllowed=!1,this.areHomeCentresAvailable=!1,this.keyContactsSummary=[],this.supportedMembershipTypes=[232,233,234,235,236,237,251,252],this.deleteInProgress$=this.store.pipe((0,d.Lt)(Ge.Vw)),this.unsubscribe$=new m.B}ngOnInit(){this.initializeForm(),this.store.pipe((0,d.Lt)(o.Pe),(0,y.Q)(this.unsubscribe$)).subscribe(i=>this.isAdminOrStaff=i||this.isAdmin)}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}ngOnChanges(){this.initializeForm()}saveInitialState(){this.initialFormState={homeCentre:this.contactData?.contactDetails?.homeCentreNumber>0?this.contactData.contactDetails.homeCentreNumber:0,contactroles:this.contactData.contactRoles,keyContactsData:this.keyContactsSummary}}initializeForm(){this.contactData?.contactDetails&&(this.addKeyContactsSummary(),this.formContact?(this.formContact.get("homeCentre").setValue(this.contactData?.contactDetails?.homeCentreNumber>0?this.contactData.contactDetails.homeCentreNumber:0),this.formContact.get("contactroles").setValue(this.contactData.contactRoles),this.formContact.setValidators(r.permissionValidator("contactroles",this.contactData?.keyContacts,this.contactData?.contactDetails?.contactId))):(this.formContact=this.formBuilder.group({homeCentre:new n.hs(this.contactData?.contactDetails?.homeCentreNumber>0?this.contactData.contactDetails.homeCentreNumber:0),contactroles:new n.hs(this.contactData.contactRoles),keyContactsData:new n.hs(this.keyContactsSummary)},{validators:r.permissionValidator("contactroles",this.contactData?.keyContacts,this.contactData?.contactDetails?.contactId)}),this.formContact.valueChanges.pipe((0,y.Q)(this.unsubscribe$)).subscribe(i=>{i.homeCentre===this.initialFormState.homeCentre&&JSON.stringify(this.initialFormState.contactroles.map(p=>({centreNumber:p.centreNumber,isAdmin:p.isAdmin})))===JSON.stringify(i.contactroles.map(p=>({centreNumber:p.centreNumber,isAdmin:p.isAdmin})))&&this.markFormPristine()})),this.saveInitialState(),this.isAdminPermissionsAllowed=this.contactData?.contactRoles?.length>0,this.areHomeCentresAvailable=this.contactData?.homeCentresList?.length>0,this.areHomeCentresAvailable&&(this.homeCentres=[{centreNumber:0,name:"MY_TEAM.VIEWCONTACT.LABELS.NONE"},...this.contactData.homeCentresList]),this.markFormPristine())}saveClick(i){this.save.emit(i),this.markFormPristine()}deleteClick(){this.store.dispatch((0,vt.ZF)({messageTag:"MY_TEAM.VIEWCONTACT.DELETEKEYCONTACTWARNING"})),this.keyContactsSummary&&this.keyContactsSummary.length>0?this.store.dispatch((0,vt.Ds)({notificationType:We._.error,text:"MY_TEAM.VIEWCONTACT.DELETEKEYCONTACTWARNING"})):this.confirmationDialogService.showModal({title:"MY_TEAM.VIEWCONTACT.CONFIRMDELETETITLE",content:"MY_TEAM.VIEWCONTACT.CONFIRMDELETECONTENT",primaryButton:"MY_TEAM.VIEWCONTACT.CONFIRMDELETE",secondaryButton:"MY_TEAM.VIEWCONTACT.CONFIRMCANCEL"}).pipe((0,y.Q)(this.unsubscribe$)).subscribe(i=>i&&this.delete.emit(this.contactData.contactDetails?.contactId?.toString()))}addKeyContactsSummary(){this.keyContactsSummary=[],this.contactData.keyContacts?.centresKeyContacts&&(this.keyContactsSummary.push({KeyContactTitle:"MY_TEAM.VIEWCONTACT.LABELS.KEYCONTACTSPRIMARY",KeyContactData:this.checkForLocationKeyContact(Ae.g.primary),CompanyKeyContact:this.checkForCompanyKeyContact(Ae.g.primary)},{KeyContactTitle:"MY_TEAM.VIEWCONTACT.LABELS.KEYCONTACTSINVOICEPRIMARY",KeyContactData:this.checkForLocationKeyContact(Ae.g.invoicePrimary),CompanyKeyContact:this.checkForCompanyKeyContact(Ae.g.invoicePrimary)},{KeyContactTitle:"MY_TEAM.VIEWCONTACT.LABELS.KEYCONTACTSINVOICESECONDARY",KeyContactData:this.checkForLocationKeyContact(Ae.g.invoiceSecondary),CompanyKeyContact:this.checkForCompanyKeyContact(Ae.g.invoiceSecondary)},{KeyContactTitle:"MY_TEAM.VIEWCONTACT.LABELS.KEYCONTACTSCOLLECTION",KeyContactData:this.checkForLocationKeyContact(Ae.g.accountsPayable),CompanyKeyContact:this.checkForCompanyKeyContact(Ae.g.accountsPayable)}),this.keyContactsSummary=this.keyContactsSummary.filter(i=>i.KeyContactData>0||i.CompanyKeyContact))}checkForLocationKeyContact(i){let p=0;
1return this.contactData.keyContacts.centresKeyContacts.forEach(c=>{c.keyContacts.some(S=>S.contactRoleId===i&&S.contactId===this.contactData.contactDetails?.contactId)&&p++}),p}checkForCompanyKeyContact(i){return!!this.contactData.keyContacts.defaultKeyContacts.some(p=>p.contactRoleId===i&&p.contactId===this.contactData.contactDetails?.contactId)}markFormPristine(){Object.keys(this.formContact.controls).forEach(i=>{this.formContact.controls[i].markAsPristine()}),this.formContact.markAsPristine()}isFormPristine(){return!this.formContact||this.formContact.pristine}isNetworkDevicesAvailable(){return this.contactData.networkDevices&&this.contactData.networkDevices.length>0}isMembershipAvailable(){return this.contactData.membershipDetails&&this.contactData.membershipDetails.length>0}isKeyContactsAvailable(){return this.keyContactsSummary&&this.keyContactsSummary.length>0}getHomeCentre(){let i="";const p=this.translate.currentLang?this.translate.currentLang:this.translate.defaultLang;if(this.translate.translations[p]&&(i=this.translate.translations[p]["MY_TEAM.VIEWCONTACT.LABELS.NONE"]),this.areHomeCentresAvailable){const c=this.contactData.homeCentresList.filter(S=>S.centreNumber===this.contactData.contactDetails?.homeCentreNumber);return c&&c.length>0?c[0].name:i}return i}getMembershipTypeText(i){let p="MY_TEAM.VIEWCONTACT.MEMBERSHIPS";return this.supportedMembershipTypes.includes(i.classificationId)&&(p+="."+i.classificationId),p+("LIMITED"===i.entitlementPerMonthType.toUpperCase()?".LIMITED":".UNLIMITED")}static{this.\u0275fac=function(p){return new(p||r)(t.rXU(n.ze),t.rXU(_.c$),t.rXU(Me.N),t.rXU(d.il))}}static{this.\u0275cmp=t.VBU({type:r,selectors:[["iwg-contact-privilege"]],inputs:{contactData:"contactData",isCurrentUser:"isCurrentUser",isAdmin:"isAdmin",companyName:"companyName"},outputs:{save:"save",delete:"delete"},features:[t.OA$],decls:31,vars:16,consts:[["keycontacts",""],["membership",""],["networkdevices",""],[1,"contact-privilege"],[1,"form",3,"formGroup"],["id","contactView_section_company",1,"form__field-wrapper"],[1,"form__field","form__field--fluid"],["id","contactView_label_company","translate","",1,"form__label"],["wrapperId","contactView_CompanyName","maxLength","60",3,"isDisabled","placeholderText"],["id","contactView_section_homecentre",1,"form__field-wrapper",3,"hidden"],[1,"form__label"],["translate","","id","contactView_label_homecentre"],["wrapperId","contact_privledge","message","MY_TEAM.VIEWCONTACT.HOMECENTRETOOLTIP",1,"iwg-hint-align"],["wrapperId","contactView_HomeCentre_Text","translate","","maxLength","60",3,"isDisabled","placeholderText"],["wrapperId","contactView_HomeCentre","formControlName","homeCentre","idKey","centreNumber","titleKey","name","valueKey","centreNumber","placeholder","MY_TEAM.VIEWCONTACT.HOMECENTREPLACEHOLDER",1,"large-arrow-icon",3,"options"],["id","contactView_section_keycontacts",1,"form__field-wrapper"],["translate","","id","contactView_label_keycontacts",1,"form__label"],[3,"ngClass"],[1,"preview-card__row"],["id","contactView_section_membership",1,"form__field-wrapper"],["id","contactView_section_networkdevices",1,"form__field-wrapper"],["id","contactView_section_adminpermission",1,"form__field-wrapper"],["wrapperId","contactView_AdminPermissions","formControlName","contactroles",3,"currentCompanyName","isDisabled","isAdminPermissionsAllowed"],["id","contactView_section_actionbuttons",1,"contact-actions"],["wrapperId","contactView_Delete","displayType","secondary","translate","",3,"disabled"],["wrapperId","contactView_Save","displayType","primary","translate","",3,"disabled"],[1,"preview-card__row__title"],["translate",""],["id","contactView_ManageKeyContacts_None","routerLink","/team/keycontacts","translate","",1,"text-link","text-link--regular"],[1,"preview-card__row__title",3,"id"],["translate","",1,"text--sm","m--b-1"],[3,"id"],["routerLink","/team/keycontacts","translate","",1,"text-link","text-link--regular",3,"id"],["translate","","id","contactView_label_membership",1,"form__label"],["id","contactView_ManageSubscriptions_None","routerLink","/account/manage-products-and-services/memberships","translate","",1,"text-link","text-link--regular"],["routerLink","/account/manage-products-and-services/memberships","translate","",1,"text-link","text-link--regular",3,"id"],["translate","","id","contactView_label_networkdevices",1,"form__label"],["id","contactView_AddNetworkDevices",1,"text-link__content","text-link--regular","team-link",3,"routerLink","queryParams"],["id","contactView_ManageNetworkDevices_None","translate","",1,"text-link","text-link--regular",3,"routerLink","queryParams"],[1,"device-item"],[1,"mac-address"],["translate","",1,"text-link","text-link--regular",3,"id","routerLink","queryParams"],["aria-hidden","true",1,"iwg-icon-plus"],["translate","",1,"text-link"],["wrapperId","contactView_Delete","displayType","secondary","translate","",3,"click","keydown.enter","disabled"],["wrapperId","contactView_Save","displayType","primary","translate","",3,"click","keydown.enter","disabled"]],template:function(p,c){1&p&&(t.j41(0,"div",3)(1,"form",4)(2,"div",5)(3,"div",6)(4,"span",7),t.EFF(5,"MY_TEAM.VIEWCONTACT.LABELS.COMPANY"),t.k0s(),t.nrm(6,"iwg-text-input-wrapper",8),t.k0s()(),t.j41(7,"div",9)(8,"div",6)(9,"div",10)(10,"span",11),t.EFF(11,"MY_TEAM.VIEWCONTACT.LABELS.HOMECENTRE"),t.k0s(),t.nrm(12,"iwg-hint",12),t.k0s(),t.j41(13,"div"),t.DNE(14,no,1,2,"iwg-text-input-wrapper",13)(15,io,1,1,"iwg-dropdown",14),t.k0s()()(),t.j41(16,"div",15)(17,"div",6)(18,"span",16),t.EFF(19,"MY_TEAM.VIEWCONTACT.LABELS.KEYCONTACTS"),t.k0s(),t.j41(20,"div",17,0
1),t.DNE(22,ao,5,1,"div",18)(23,go,3,0,"div"),t.k0s()()(),t.DNE(24,Eo,8,3,"div",19)(25,Do,9,4,"div",20),t.j41(26,"div",21),t.nrm(27,"iwg-admin-permissions",22),t.k0s(),t.j41(28,"div",23),t.DNE(29,Ao,3,3,"iwg-button",24)(30,So,2,1,"iwg-button",25),t.k0s()()()),2&p&&(t.R7$(),t.Y8G("formGroup",c.formContact),t.R7$(5),t.Y8G("isDisabled",!0)("placeholderText",c.companyName),t.R7$(),t.Y8G("hidden",!0),t.R7$(7),t.vxM(c.isAdminOrStaff&&c.areHomeCentresAvailable?-1:14),t.R7$(),t.vxM(c.isAdminOrStaff&&c.areHomeCentresAvailable?15:-1),t.R7$(5),t.Y8G("ngClass",c.isAdminOrStaff&&!c.isCurrentUser?"preview-card":"preview-card disabled"),t.R7$(2),t.vxM(c.isKeyContactsAvailable()?-1:22),t.R7$(),t.vxM(c.isKeyContactsAvailable()?23:-1),t.R7$(),t.vxM(c.isAdminOrStaff||c.isCurrentUser?24:-1),t.R7$(),t.vxM(c.isAdminOrStaff||c.isCurrentUser?25:-1),t.R7$(2),t.Y8G("currentCompanyName",c.companyName)("isDisabled",!c.isAdminOrStaff||c.isCurrentUser)("isAdminPermissionsAllowed",c.isAdminPermissionsAllowed),t.R7$(2),t.vxM(c.isAdminOrStaff&&!c.isCurrentUser?29:-1),t.R7$(),t.vxM(c.isAdminOrStaff?30:-1))},dependencies:[f.Wk,n.qT,n.BC,n.cb,n.j4,n.JD,_.Mm,Gn.C,U.P,qi.p,a.Q,k.YU,to.l,_.D9,k.Jj],styles:[".device-item[_ngcontent-%COMP%]{margin:0 0 1rem}.mac-address[_ngcontent-%COMP%]{white-space:nowrap}"]})}}return r})();function Ro(r,z){1&r&&(t.j41(0,"span",2),t.EFF(1,"MY_TEAM.VIEWCONTACT.HEADER"),t.k0s())}function wo(r,z){1&r&&(t.j41(0,"a",3),t.EFF(1,"MY_TEAM.VIEWCONTACT.LINKS.MYPROFILE "),t.nrm(2,"br"),t.k0s())}function Fo(r,z){if(1&r&&(t.j41(0,"span",6),t.EFF(1),t.nI1(2,"iwgNameFormat"),t.k0s()),2&r){const i=t.XpG();t.R7$(),t.SpI(" ",t.i5U(2,1,i.contact,i.NameFormat.Initials)," ")}}function No(r,z){if(1&r&&(t.j41(0,"span",9),t.EFF(1),t.k0s()),2&r){const i=t.XpG();t.R7$(),t.JRh(i.contact.primaryPhoneNumber.telephoneNumber)}}function xo(r,z){1&r&&(t.j41(0,"a",10),t.nrm(1,"br"),t.EFF(2,"MY_TEAM.VIEWCONTACT.LINKS.MYPROFILE "),t.nrm(3,"br"),t.k0s())}let Lo=(()=>{class r{constructor(i){this.deviceService=i,this.isCurrentUser=!1,this.isMobile$=this.deviceService.isMobile$,this.NameFormat=Gt.f}static{this.\u0275fac=function(p){return new(p||r)(t.rXU(Z.g))}}static{this.\u0275cmp=t.VBU({type:r,selectors:[["iwg-contact-personal"]],inputs:{contact:"contact",isCurrentUser:"isCurrentUser"},decls:17,vars:16,consts:[[1,"contact-personal"],[1,"personal-header"],["translate","",1,"iwg-h6","font-bold"],["id","contactView_MyProfileLink","routerLink","/profile/personal-details","translate","",1,"text-link","text-link--regular"],[1,"profile-card"],["id","contactView_ProfileImage",1,"profile-card__user__image"],["id","contactView_ProfileInitials",1,"profile-card__user__initials"],["id","contactView_UserName",1,"profile-card__user__text"],["id","contactView_UserEmail",1,"personal-content"],["id","contactView_UserNumber",1,"personal-content","phone-number-rtl"],["id","contactView_MyProfileLink_Mobile","routerLink","/profile/personal-details","translate","",1,"text-link","text-link--regular"]],template:function(p,c){1&p&&(t.j41(0,"div",0)(1,"div",1),t.DNE(2,Ro,2,0,"span",2),t.nI1(3,"async"),t.DNE(4,wo,3,0,"a",3),t.k0s(),t.j41(5,"div",4)(6,"div",5),t.DNE(7,Fo,3,4,"span",6),t.j41(8,"div",7),t.EFF(9),t.nI1(10,"iwgNameFormat"),t.k0s()(),t.j41(11,"span",8),t.EFF(12),t.k0s(),t.DNE(13,No,2,1,"span",9),t.nrm(14,"br")(15,"br"),t.k0s()(),t.DNE(16,xo,4,0,"a",10)),2&p&&(t.AVh("margin-with-profile",c.isCurrentUser),t.R7$(2),t.vxM(t.bMT(3,12,c.isMobile$)?-1:2),t.R7$(2),t.vxM(c.isCurrentUser?4:-1),t.R7$(2),t.xc7("background-image",c.contact.image&&""!==c.contact.image?"url(data:image/jpeg;base64,"+c.contact.image+")":""),t.R7$(),t.vxM(c.contact.image&&""!==c.contact.image?-1:7),t.R7$(2),t.JRh(t.bMT(10,14,c.contact)),t.R7$(3),t.JRh(c.contact.emailAddress),t.R7$(),t.vxM(c.contact.primaryPhoneNumber?13:-1),t.R7$(3),t.vxM(c.isCurrentUser?16:-1))},dependencies:[f.Wk,_.Mm,k.Jj,Kt.X],encapsulation:2})}}return r})();const Bo=(r,z,i,p)=>({modelData:r,isCurrentUser:z,isAdmin:i,centreAdminRoles:p});function $o(r,z){1&r&&t.nrm(0,"iwg-breadcrumbs")}function Uo(r,z){if(1&r&&(t.j41(0,"span",5),t.EFF(1),t.nI1(2,"async"),t.k0s()),2&r){const i=t.XpG();t.R7$(),t.JRh(t.bMT(2,1,i.userName$))}}function Vo(r,z){if(1&r&&t.nrm(0,"iwg-contact-personal",6),2&r){const i=t.XpG();t.Y8G("isCurrentUser",i.isCurrentUser)("contact",i.modelData.contactDetails)}}function ko(r,z){if(1&r){const i=t.RV6();t.j41(0,"iwg-contact-privilege",8),t.bIt("save",function(c){t.eBV(i);const S=t.XpG(),Rt=t.XpG();return t.Njj(Rt.onSave(S.modelData,S.isCurrentUser,c))})("delete",function(){t.eBV(i);const c=t.XpG(),S=t.XpG();return t.Njj(S.onDelete(c.modelData))}),t.k0s()}if(2&r){const i=t.XpG(),p=t.XpG();t.Y8G("contactData",i.modelData)("companyName",null==p.currentCompany?null:p.currentCompany.name)("isAdmin",i.isAdmin)("isCurrentUser",i.isCurrentUser)}}function Go(r,z){if(1&r&&t.DNE(0,Vo,1,2,"iwg-contact-personal",6)(1,ko,1,4,"iwg-contact-privilege",7),2&r){const i=z;t.vxM(i.modelData&&i.modelData.contactDetails?0:-1),t.R7$(),t.vxM(i.modelData?1:-1)}}let jo=(()=>{class r extends $t.f{ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}constructor(i,p,c){super(),this.store=i,this.route=p,this.iwgNameFormat=c,this.unsubscribe$=new m.B,this.dataFetched=!1,this.currentCompany$=this.store.pipe((0,d.Lt)(T.sZ)).pipe((0,y.Q)(this.unsubscribe$)),this.loadingDetails$=this.store.pipe((0,d.Lt)(Ge.zQ)).pipe((0,y.Q)(this.unsubscribe$)),this.route.paramMap.pipe((0,y.Q)(this.unsubscribe$)).subscribe(S=>this.currentContactId=S.get("contactId"))}ngOnInit(){this.store.dispatch((0,C.Z_)()),this.isCurrentUser$=this.store.pipe((0,d.Lt)(o.Hg),(0,_t.T)(i=>i&&this.currentContactId===i.contactId)),this.centreAdminRoles$=this.store.pipe((0,d.Lt)(kn.C),(0,_t.T)(i=>(i??[]).map(p=>p.centreNumber)),(0,Ji.Z)([])),this.isAdmin$=this.centreAdminRoles$.pipe((0,_t.T)(i=>i&&i.length>0)),this.isStaff$=this.store.pipe((0,d.Lt)(o.Pe)),this.modelData$=(0,R.z)([this.isCurrentUser$,this.store.pipe((0,d.Lt)(Ge.Kd),(0,I.p)(i=>!!i)),this.centreAdminRoles$,this.isStaff$]).pipe((0,_t.T)(([i,p,c,S])=>({...p,contactRoles:(p.contactRoles??[]).map(Rt=>({...Rt,isDisabled:i||!(c??[]).includes(Rt.centreNumber)&&!S}))}))),this.userName$=this.modelData$.pipe((0,_t.T)(i=>i?.contactDetails?this.iwgNameFormat.transform(i.contactDetails):"")),this.userName$.pipe((0,I.p)(i=>!!i),(0,Zi.d)(),(0,y.Q)(this.unsubscribe$)).subscribe(i=>{this.store.dispatch((0,An.xc)({breadcrumbs:[{label:"MY_TEAM.MANAGE_MY_TEAM",url:"/team/manage"},{label:i,url:""}]}))}),(0,R.z)([this.isCurrentUser$,this.centreAdminRoles$.pipe((0,_t.T)(i=>(i?.length??0)>0)),this.isStaff$]).pipe((0,y.Q)(this.unsubscribe$)).subscribe(([i,p,c])=>this.store.dispatch((0,et.zJ)({isOwner:i,hasAdminRoles:p||c,contactId:this.currentContactId}))),this.store.pipe((0,d.Lt)(kn.C)).pipe((0,y.Q)(this.unsubscribe$)).subscribe(i=>{this.currentContactRoles=(i??[]).map(p=>p.centreNumber)}),this.currentCompany$.pipe((0,y.Q)(this.unsubscribe$)).subscribe(i=>{this.currentCompany=i})}onSave(i,p,c){const S=i.contactRoles,Rt={homeCentre:0===c.homeCentre?null:c.homeCentre};if(p)this.store.dispatch((0,et.i0)({updatedHomeCentre:Rt,contactId:i.contactDetails.contactId}));else{const Qt=[];
1c.contactroles.forEach(ge=>{S.find(fe=>fe.centreNumber===ge.centreNumber).isAdmin!==ge.isAdmin&&Qt.push(ge)}),this.store.dispatch((0,et.qe)({updatedHomeCentre:Rt,updatedRoles:{contactId:i.contactDetails.contactId,accountId:i.contactDetails.accountId,centres:Qt},contactId:i.contactDetails.contactId}))}}onDelete(i){this.store.dispatch((0,et.MO)({contactId:this.currentContactId,contactName:this.iwgNameFormat.transform(i.contactDetails),accessType:this.isAdmin()?wt.C[wt.C.Administrator]:wt.C[wt.C.NonAdmin],company:this.currentCompany}))}isAdmin(){return this.currentContactRoles&&this.currentContactRoles.length>0}canDeactivateModal(){return this.contactPrivilegeComponent&&!this.contactPrivilegeComponent.isFormPristine()?{key:"EXIT_MODAL.TITLE",subtitle:"EXIT_MODAL.SUBTITLE"}:null}static{this.\u0275fac=function(p){return new(p||r)(t.rXU(d.il),t.rXU(f.nX),t.rXU(Kt.X))}}static{this.\u0275cmp=t.VBU({type:r,selectors:[["iwg-contact-view"]],viewQuery:function(p,c){if(1&p&&t.GBs(Yn,5),2&p){let S;t.mGM(S=t.lsd())&&(c.contactPrivilegeComponent=S.first)}},features:[t.Vt3],decls:14,vars:17,consts:[["headerBreadcrumbs",""],["headerTitle",""],[1,"contact-view-page-loader",3,"loading"],[1,"bottom-border"],[1,"contact-container"],[1,"header-username"],[3,"isCurrentUser","contact"],[3,"contactData","companyName","isAdmin","isCurrentUser"],[3,"save","delete","contactData","companyName","isAdmin","isCurrentUser"]],template:function(p,c){if(1&p&&(t.j41(0,"iwg-loader",2),t.nI1(1,"async"),t.j41(2,"div")(3,"iwg-page-header",3),t.DNE(4,$o,1,0,"ng-template",null,0,t.C5r)(6,Uo,3,3,"ng-template",null,1,t.C5r),t.k0s(),t.j41(8,"div",4),t.DNE(9,Go,2,2),t.nI1(10,"async"),t.nI1(11,"async"),t.nI1(12,"async"),t.nI1(13,"async"),t.k0s()()()),2&p){let S;t.Y8G("loading",t.bMT(1,2,c.loadingDetails$)),t.R7$(9),t.vxM((S=t.ziG(12,Bo,t.bMT(10,4,c.modelData$),t.bMT(11,6,c.isCurrentUser$),t.bMT(12,8,c.isAdmin$),t.bMT(13,10,c.centreAdminRoles$)))?9:-1,S)}},dependencies:[N.y,G.m,Ce.V,Lo,Yn,k.Jj],encapsulation:2})}}return r})();var Xe=e(26592),on=e(93826),Yo=e(38612),Ho=e(77818);function Ko(r,z){1&r&&(t.j41(0,"span",11),t.EFF(1,"MY_TEAM.ACCESS_SETTING.TITLE"),t.k0s())}function Wo(r,z){if(1&r){const i=t.RV6();t.j41(0,"iwg-modal-flyout",2),t.bIt("closeModal",function(){t.eBV(i);const c=t.XpG();return t.Njj(c.closeModalDialog(void 0,!1))}),t.j41(1,"iwg-page-header",3),t.DNE(2,Ko,2,0,"ng-template",null,0,t.C5r),t.k0s(),t.j41(4,"div",4)(5,"iwg-radio-button",5),t.bIt("selectedValueChange",function(c){t.eBV(i);const S=t.XpG();return t.Njj(S.selectedValueChange(c))}),t.j41(6,"span",6),t.EFF(7,"MY_TEAM.ACCESS_SETTING.ALL_USERS"),t.k0s()(),t.j41(8,"iwg-radio-button",5),t.bIt("selectedValueChange",function(c){t.eBV(i);const S=t.XpG();return t.Njj(S.selectedValueChange(c))}),t.j41(9,"span",6),t.EFF(10,"MY_TEAM.ACCESS_SETTING.ADMINS_ONLY"),t.k0s()()(),t.nrm(11,"div",7),t.j41(12,"div",8)(13,"iwg-button",9),t.bIt("click",function(){t.eBV(i);const c=t.XpG();return t.Njj(c.closeModalDialog(!1,!0))})("keydown.enter",function(){t.eBV(i);const c=t.XpG();return t.Njj(c.closeModalDialog(!1,!0))}),t.EFF(14,"MY_TEAM.ACCESS_SETTING.CANCEL"),t.k0s(),t.j41(15,"iwg-button",10),t.bIt("click",function(){t.eBV(i);const c=t.XpG();return t.Njj(c.closeModalDialog(!0,!0))})("keydown.enter",function(){t.eBV(i);const c=t.XpG();return t.Njj(c.closeModalDialog(!0,!0))}),t.EFF(16,"MY_TEAM.ACCESS_SETTING.UPDATE"),t.k0s()()()}if(2&r){const i=t.XpG();t.R7$(),t.Y8G("pageSizeType",i.pageSizeType),t.R7$(4),t.Y8G("selectedValue",i.selectedTeamAccesibilityPreferenceType)("wrapperId","Team_View_Settings_type_all")("value",i.TeamAccesibilityPreferenceType.AllUsers),t.R7$(3),t.Y8G("selectedValue",i.selectedTeamAccesibilityPreferenceType)("wrapperId","Team_View_Settings_type_admins")("value",i.TeamAccesibilityPreferenceType.AdminsOnly),t.R7$(5),t.Y8G("displayType",i.DisplayType.secondary)("wrapperId","Team_View_Settings_Secondary_Button"),t.R7$(2),t.Y8G("displayType",i.DisplayType.primary)("wrapperId","Team_View_Settings_Primary_Button")("disabled",!i.valueChanged)}}const mn="MY_TEAM.MANAGE_MY_TEAM",Nn="Bulk Upload",xn="Key Contacts Centres",zo=[{path:"",redirectTo:"manage",pathMatch:"full"},{path:"manage",data:{breadcrumb:mn},children:[{path:"",component:at,canActivate:[Xe.a],data:{breadcrumb:mn,permissions:{only:h.e.CanAccessTeam,redirectTo:"team/manage/no-access"},analyticPageName:"Team View"},children:[{path:"add",component:qn,canActivate:[Xe.a],canDeactivate:[Ze.
1y],data:{permissions:{only:h.e.CanAccessAddTeamMember,redirectTo:"team/manage/add/no-access"},analyticPageName:"Contact Add"}},{path:"bulk",component:li,canDeactivate:[Ze.y],canActivate:[Xe.a],data:{permissions:{only:h.e.CanAccessAddTeamMember,redirectTo:"team/manage/bulk/no-access"},analyticPageName:Nn}},{path:"view-settings",component:(()=>{class r extends $t.f{constructor(i){super(),this.store=i,this.DisplayType=Yo.t,this.TeamAccesibilityPreferenceType=en,this.selectedType$=this.store.select(Ge.qQ),this.accesibilityPreferenceType$=this.store.select(Ge.qQ),this.pageSizeType=N.l.Flyout,this.valueChanged=!1,this.canDeactivate=!0,this.unsubscribe$=new m.B,this.selectedType$.pipe((0,y.Q)(this.unsubscribe$)).subscribe(p=>{this.selectedType={...p},this.selectedTeamAccesibilityPreferenceType=+p?.value})}closeModalDialog(i,p){this.canDeactivate=p,i&&this.store.dispatch((0,et.Hl)({preferenceSetting:this.selectedType})),this.store.dispatch((0,dt.Tl)({}))}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}selectedValueChange(i){this.canDeactivate=!1,this.valueChanged=!0,this.selectedType.value=i}canDeactivateModal(){return this.valueChanged?this.canDeactivateCheck():null}canDeactivateCheck(){return this.canDeactivate?null:{key:"EXIT_MODAL.TITLE",subtitle:"EXIT_MODAL.SUBTITLE"}}static{this.\u0275fac=function(p){return new(p||r)(t.rXU(d.il))}}static{this.\u0275cmp=t.VBU({type:r,selectors:[["iwg-access-setting"]],features:[t.Vt3],decls:1,vars:1,consts:[["headerTitle",""],["class","confirm-modal-container",3,"closeModal",4,"iwgModal"],[1,"confirm-modal-container",3,"closeModal"],[1,"no-container",3,"pageSizeType"],[1,"access-settings"],["name","radioButtons",1,"block-radio",3,"selectedValueChange","selectedValue","wrapperId","value"],["translate",""],[1,"stretch"],[1,"button_wrapper"],["type","button",1,"cancel_button",3,"click","keydown.enter","displayType","wrapperId"],["translate","","type","button",3,"click","keydown.enter","displayType","wrapperId","disabled"],["id","Team_View_Settings_Title","translate",""]],template:function(p,c){1&p&&t.DNE(0,Wo,17,12,"iwg-modal-flyout",1),2&p&&t.Y8G("iwgModal",!0)},dependencies:[_.Mm,N.y,a.Q,Ho.d,Ve.s,je.h],styles:[".access-settings[_ngcontent-%COMP%]{display:flex;flex-direction:column}.access-settings[_ngcontent-%COMP%]   iwg-radio-button[_ngcontent-%COMP%]{margin-bottom:1rem}.confirm-title[_ngcontent-%COMP%]{margin-top:0}.button_wrapper[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;padding-top:5rem}@media (max-width: 1023.98px){.button_wrapper[_ngcontent-%COMP%]{padding-top:1rem;flex-direction:column;margin-bottom:3.8rem}}@media (max-width: 1023.98px){.stretch[_ngcontent-%COMP%]{flex-grow:1}}.cancel_button[_ngcontent-%COMP%]{margin-right:2rem}[dir=rtl]   [_nghost-%COMP%]   .cancel_button[_ngcontent-%COMP%]{margin-left:2rem;margin-right:0}@media (max-width: 1023.98px){[dir=rtl]   [_nghost-%COMP%]   .cancel_button[_ngcontent-%COMP%]{margin-left:0}}[dir=rtl][_ngcontent-%COMP%]   .cancel_button[_ngcontent-%COMP%]{margin-left:2rem;margin-right:0}@media (max-width: 1023.98px){[dir=rtl][_ngcontent-%COMP%]   .cancel_button[_ngcontent-%COMP%]{margin-left:0}}[dir=rtl][_nghost-%COMP%]   .cancel_button[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .cancel_button[_ngcontent-%COMP%]{margin-left:2rem;margin-right:0}@media (max-width: 1023.98px){[dir=rtl][_nghost-%COMP%]   .cancel_button[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .cancel_button[_ngcontent-%COMP%]{margin-left:0}}@media (max-width: 1023.98px){.cancel_button[_ngcontent-%COMP%]{width:100%;margin-top:0;margin-right:0;margin-bottom:3rem}}"]})}}return r})(),canDeactivate:[Ze.y],canActivate:[Xe.a],data:{permissions:{only:h.e.CanAccessAddTeamMember,redirectTo:"team/manage/view-settings/no-access"}
1,analyticPageName:"Access Settings"}}]},(0,on.X)("team/manage",h.e.CanAccessTeam,Nn,{pageHeader:mn})]},{path:"manage",data:{breadcrumb:mn},children:[{path:"add",children:[(0,on.X)("team/manage/add",h.e.CanAccessAddTeamMember,"Contact Add")]},{path:"bulk",children:[(0,on.X)("team/manage/bulk",h.e.CanAccessAddTeamMember,Nn)]}]},{path:"key-contacts",data:{breadcrumb:"MY_TEAM.KEY_CONTACTS"},children:[(0,on.X)("team/key-contacts",h.e.CanAccessKeyContacts,xn,{pageHeader:"MY_TEAM.KEY_CONTACTS"})]},{path:"keycontacts",component:Ri,children:[{path:"",component:Vn,canActivate:[Xe.a],canDeactivate:[Ze.y],data:{permissions:{only:h.e.CanAccessKeyContacts,redirectTo:"team/key-contacts/no-access"},analyticPageName:xn}},{path:":country",component:Vn,canActivate:[Xe.a],canDeactivate:[Ze.y],data:{permissions:{only:h.e.CanAccessKeyContacts,redirectTo:"team/key-contacts/no-access"},analyticPageName:xn}}]},{path:"contact/:contactId",component:jo,canDeactivate:[Ze.y],data:{analyticPageName:"Contact View"}},{path:"requests",data:{breadcrumb:"MY_TEAM.REVIEW_AND_APPROVE_ACCESS_REQUESTS"}
1,children:[{path:"",component:Qi,canActivate:[Xe.a],data:{permissions:{only:h.e.CanAccessTeamRequests,redirectTo:"team/requests/no-access"},analyticPageName:"Team Requests"}},(0,on.X)("team/requests",h.e.CanAccessTeamRequests,"Team Requests",{pageHeader:"MY_TEAM.REVIEW_AND_APPROVE_ACCESS_REQUESTS"})]}];let Hn=(()=>{class r{static{this.\u0275fac=function(p){return new(p||r)}}static{this.\u0275mod=t.$C({type:r})}static{this.\u0275inj=t.G2t({imports:[f.iI.forChild(zo),f.iI]})}}return r})();var Ln=e(44337),Qo=e(94409),Kn=e(99252),Jo=e(21211),Be=e(7673),De=e(88141),qe=e(25558),xe=e(99437),an=e(62253),Bn=e(56445),sn=e(21626),Zo=e(95076);let Wn=(()=>{class r{constructor(i){this.http=i}uploadFile(i,p=null){const c=new FormData;return c.append("excel",i,i.name),this.http.post("invitations/bulk",c,{reportProgress:!0,observe:"events"}).pipe((0,De.M)(S=>p&&S.type===sn.hv.UploadProgress&&p(S)),(0,I.p)(S=>S.type===sn.hv.Response),(0,_t.T)(S=>S.type===sn.hv.Response&&S.body))}sendContactInvite(i){return this.http.post("invitations",i)}resendContactInvite(i){return this.http.post("invitations/resend",i)}downloadTemplate(i){return this.http.get(`invitations/bulk/template/${i}`,{responseType:"blob",observe:"response"}).pipe((0,_t.T)(p=>(0,Zo.a)(p)))}static{this.\u0275fac=function(p){return new(p||r)(t.KVO(sn.Qq))}}static{this.\u0275prov=t.jDH({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var pn=e(39178),qo=e(98217);let Xn=(()=>{class r{constructor(i,p,c,S,Rt){this.actions$=i,this.store$=p,this.invitationsRestService=c,this.ngxLogger=S,this.accountsService=Rt,this.sendContactInviteRequest$=(0,s.EH)(()=>this.actions$.pipe((0,s.gp)(At.Jg),(0,De.M)(()=>this.store$.dispatch((0,vt.ZF)({messageTag:"MY_TEAM.BULK.UPLOAD.FAIL"}))),(0,qe.n)(Qt=>this.invitationsRestService.sendContactInvite(Qt.contactInvite).pipe((0,_t.T)(()=>{const ge=Qt?.contactInvite?.centreRoles?.find(Re=>Re.isAdmin)?wt.C.Administrator:wt.C.NonAdmin;return this.ngxLogger.log((0,an.Lo)(ge,Qt?.company,Bn.t.Manual)),At.QD()}),(0,xe.W)(ge=>(0,Be.of)(this.sendContactInviteRequestFailure(ge))))))),this.resendContactInviteRequest$=(0,s.EH)(()=>this.actions$.pipe((0,s.gp)(At.AP),(0,De.M)(()=>this.store$.dispatch((0,vt.ZF)({messageTag:"MY_TEAM.BULK.UPLOAD.FAIL"}))),(0,qe.n)(Qt=>this.invitationsRestService.resendContactInvite(Qt.contactInvite).pipe((0,_t.T)(()=>At.QD()),(0,xe.W)(ge=>(0,Be.of)(this.sendContactInviteRequestFailure(ge))))))),this.sendContactInviteRequestSuccess$=(0,s.EH)(()=>this.actions$.pipe((0,s.gp)(At.QD),(0,ct.Z)(()=>[(0,dt.F3)(),(0,vt.Ds)({text:"MY_TEAM.CONTACT.INVITE_SUCCESS",notificationType:Jt._n.success})]))),this.sendContactInviteRequestFailure$=(0,s.EH)(()=>this.actions$.pipe((0,s.gp)(At.Tf),(0,_t.T)(()=>(0,vt.Ds)({text:"MY_TEAM.CONTACT.INVITE_FAILED",notificationType:Jt._n.error})))),this.linkContact$=(0,s.EH)(()=>this.actions$.pipe((0,s.gp)(At.zw),(0,De.M)(()=>this.store$.dispatch((0,vt.ZF)({messageTag:"COMMON.ERROR"}))),(0,qe.n)(Qt=>this.accountsService.linkContact(Qt.id).pipe((0,_t.T)(()=>At.iL()),(0,xe.W)(ge=>(0,Be.of)(At.pz({error:ge}))))))),this.linkContactSuccess$=(0,s.EH)(()=>this.actions$.pipe((0,s.gp)(At.iL),(0,ct.Z)(()=>[(0,dt.F3)(),(0,vt.Ds)({text:"MY_TEAM.CONTACT.INVITE_SUCCESS",notificationType:Jt._n.success})]))),this.linkContactFailure$=(0,s.EH)(()=>this.actions$.pipe((0,s.gp)(At.pz),(0,_t.T)(({error:Qt})=>(0,vt.Ds)({text:this.getLinkContactErrorMessageKey(Qt),notificationType:Jt._n.error,messageTag:"COMMON.ERROR"}))))}getLinkContactErrorMessageKey(i){return 409===i.status?"MY_TEAM.CONTACT.INVITE_ALREADY_SENT":"MY_TEAM.CONTACT.INVITE_FAILED"}sendContactInviteRequestFailure(i){return At.Tf({status:i.status,errorCode:i.error})}static{this.\u0275fac=function(p){return new(p||r)(t.KVO(s.En),t.KVO(d.il),t.KVO
1(Wn),t.KVO(pn.so),t.KVO(qo.a))}}static{this.\u0275prov=t.jDH({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var zn=e(27468),ta=e(30786),Qn=e(53993),ea=e(2530);const rn="MY_TEAM.BULK.UPLOAD.FAIL";let na=(()=>{class r{constructor(i,p,c,S,Rt,Qt,ge,Re){this.store=i,this.actions=p,this.invitationsRestService=c,this.router=S,this.fileService=Rt,this.translate=Qt,this.ngxLogger=ge,this.uiConfigService=Re,this.enterpriseAddMultiUsersConfig=this.uiConfigService.get("addMultipleUsersConfig"),this.uploadFileEffect=(0,s.EH)(()=>this.actions.pipe((0,s.gp)(et.sA),(0,De.M)(()=>this.store.dispatch((0,vt.ZF)({messageTag:rn}))),(0,ta.p)(fe=>this.invitationsRestService.uploadFile(fe.file,({loaded:Ee,total:we})=>this.store.dispatch(et.PD({progress:Ee/we}))).pipe((0,Qn.E)(this.store.select(T.sZ)),(0,ct.Z)(([Ee,we])=>(this.ngxLogger.log((0,an.Lo)(wt.C.NonAdmin,we,Bn.t.Bulk)),this.store.dispatch((0,dt.F3)()),[et.aE(),(0,vt.Ds)({text:this.enterpriseAddMultiUsersConfig.customerTypeIds.includes(we.primaryFinancialAccount.customerTypeId)&&this.enterpriseAddMultiUsersConfig?.enabled?"MY_TEAM.BULK.ENTERPRISE_SOLUTIONS.UPLOAD.SUCCESSFUL":"MY_TEAM.BULK.UPLOAD.SUCCESSFUL",notificationType:Jt._n.success})])),(0,xe.W)(Ee=>{const{customData:we}=Ee.error.validationMessages[0],hn=[...we.inFields,...we.inRows,...we.inFile];return(0,zn.p)(hn.map(({fields:cn,rows:Ia,errorMessage:Oa,maxNumberOfRows:Da})=>this.translate.get(Oa,{ConsumerInputRows:Ia?.join(", "),ConsumerInputFields:cn?.join(", "),ConsumeInput_NumberOfRows:Da}))).pipe((0,_t.T)(cn=>cn.join("\n\n")),(0,_t.T)(cn=>(this.store.dispatch(et.YQ()),(0,vt.Ds)({text:cn,notificationType:Jt._n.error,messageTag:rn}))))}))))),this.uploadRequestActionEffect=(0,s.EH)(()=>this.actions.pipe((0,s.gp)(et.z2),(0,De.M)(()=>this.store.dispatch((0,vt.ZF)({messageTag:rn})))),{dispatch:!1}),this.uploadCancelActionEffect=(0,s.EH)(()=>this.actions.pipe((0,s.gp)(et.gj),(0,De.M)(()=>this.store.dispatch((0,vt.ZF)({messageTag:rn})))),{dispatch:!1}),this.downloadTemplate$=(0,s.EH)(()=>this.actions.pipe((0,s.gp)(et.ZQ),(0,ct.Z)(fe=>this.invitationsRestService.downloadTemplate(fe.currentTemplateType).pipe((0,_t.T)(Ee=>et.UB(Ee)),(0,De.M)(Ee=>this.fileService.saveAs(Ee.blob,Ee.name)),(0,xe.W)(Ee=>(0,Be.of)(et.Wu()))))),{dispatch:!0}),this.downloadTemplateFailedEffect$=(0,s.EH)(()=>this.actions.pipe((0,s.gp)(et.Wu),(0,_t.T)(()=>(0,vt.Ds)({text:rn,notificationType:Jt._n.error}))))}static{this.\u0275fac=function(p){return new(p||r)(t.KVO(d.il),t.KVO
1(s.En),t.KVO(Wn),t.KVO(f.Ix),t.KVO(ea.E),t.KVO(_.c$),t.KVO(pn.so),t.KVO(P.K))}}static{this.\u0275prov=t.jDH({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var ia=e(20581),oa=e(16653),Jn=e(56374),Zn=e(26728);let aa=(()=>{class r{constructor(i){this.http=i}getRequests(){return this.http.get("/accountaccessrequests")}approveRequest(i){return this.http.put(`/accountaccessrequests/${i}/approve`,"")}rejectRequest(i){return this.http.put(`/accountaccessrequests/${i}/reject`,"")}static{this.\u0275fac=function(p){return new(p||r)(t.KVO(sn.Qq))}}static{this.\u0275prov=t.jDH({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})(),sa=(()=>{class r{constructor(i,p,c,S){this.actions=i,this.store$=p,this.contactRequestService=c,this.ngxLogger=S,this.loadAllRequests=(0,s.EH)(()=>this.actions.pipe((0,s.gp)(Se.yV),(0,De.M)(()=>this.removeMessagesByTag()),(0,ct.Z)(()=>this.contactRequestService.getRequests().pipe((0,_t.T)(Rt=>Se.PV({contactRequests:Rt})),(0,xe.W)(Rt=>(0,Be.of)(Se.cR({error:Rt}))))))),this.approveRequest=(0,s.EH)(()=>this.actions.pipe((0,s.gp)(Se.Nb),(0,De.M)(()=>this.removeMessagesByTag()),(0,ct.Z)(Rt=>this.contactRequestService.approveRequest(Rt.contactRequest.id).pipe((0,De.M)(()=>{this.ngxLogger.log((0,an.Ln)(Zn.X.Accept,Jn.j.Company))}),(0,_t.T)(Qt=>Se.QY({contactRequest:Rt.contactRequest,contactId:Qt.contactId})),(0,xe.W)(Qt=>(0,Be.of)(Se.Ly({error:Qt}))))))),this.rejectRequest=(0,s.EH)(()=>this.actions.pipe((0,s.gp)(Se.xV),(0,De.M)(()=>this.removeMessagesByTag()),(0,ct.Z)(Rt=>this.contactRequestService.rejectRequest(Rt.contactRequest.id).pipe((0,De.M)(()=>{this.ngxLogger.log((0,an.Ln)(Zn.X.Reject,Jn.j.Company))}),(0,_t.T)(Qt=>Se.YW({contactRequest:Rt.contactRequest})),(0,xe.W)(Qt=>(0,Be.of)(Se.$Y({error:Qt}))))))),this.loadAllRequestFailure$=(0,s.EH)(()=>this.actions.pipe((0,s.gp)(Se.cR),(0,ct.Z)(()=>[(0,vt.Ds)({text:"MY_TEAM.REQUEST.LOAD_FAILURE",notificationType:Jt._n.error})]))),this.approveContactRequestFailure$=(0,s.EH)(()=>this.actions.pipe((0,s.gp)(Se.Ly),(0,ct.Z)(()=>[(0,vt.Ds)({text:"MY_TEAM.REQUEST.APPROVE_FAILURE",notificationType:Jt._n.error})]))),this.rejectContactRequestFailure$=(0,s.EH)(()=>this.actions.pipe((0,s.gp)(Se.$Y),(0,ct.Z)(()=>[(0,vt.Ds)({text:"MY_TEAM.REQUEST.REJECT_FAILURE",notificationType:Jt._n.error})])))}removeMessagesByTag(){this.store$.dispatch((0,vt.ZF)({messageTag:"MY_TEAM.REQUEST.LOAD_FAILURE"})),this.store$.dispatch((0,vt.ZF)({messageTag:"MY_TEAM.REQUEST.APPROVE_FAILURE"})),this.store$.dispatch((0,vt.ZF)({messageTag:"MY_TEAM.REQUEST.REJECT_FAILURE"}))}static{this.\u0275fac=function(p){return new(p||r)(t.KVO(s.En),t.KVO(d.il),t.KVO
1(aa),t.KVO(pn.so))}}static{this.\u0275prov=t.jDH({token:r,factory:r.\u0275fac})}}return r})();var $e=e(16642),ra=e(19468),ca=e(43066),la=e(67273),da=e(71962),ma=e(85105),pa=e(4174);const un="MY_TEAM.VIEWCONTACT.UPDATECONTACTFAILURE",$n="MY_TEAM.VIEWCONTACT.DELETEFAILURE",ha=[Xn,oa.T,Xn,na,ia.P,(()=>{class r{getDeleteErrorMessageKey(i){return i.status===te.G.Conflict?"MY_TEAM.VIEWCONTACT.DELETE_CONFLICT":$n}constructor(i,p,c,S,Rt,Qt,ge,Re){this.contactService=i,this.networkDeviceService=p,this.accountKeyContactsService=c,this.contactRolesService=S,this.memberhsipsService=Rt,this.actions=Qt,this.store$=ge,this.ngxLogger=Re,this.getContactDetails=(0,s.EH)(()=>this.actions.pipe((0,s.gp)($e.zJ),(0,ct.Z)(({contactId:fe,hasAdminRoles:Ee,isOwner:we})=>Ee||we?this.getContactData(fe):this.getPartialContactData(fe)))),this.updateHomeCentre=(0,s.EH)(()=>this.actions.pipe((0,s.gp)($e.i0),(0,De.M)(()=>this.store$.dispatch((0,vt.ZF)({messageTag:un}))),(0,qe.n)(fe=>this.contactService.updateContactHomeCentre(fe.updatedHomeCentre,fe.contactId).pipe((0,ct.Z)(Ee=>[$e.X8({updatedContactDetails:Ee}),this.showNotification("MY_TEAM.VIEWCONTACT.UPDATECONTACTSUCCESS",We._.success)]),(0,xe.W)(()=>(0,Be.of)(this.showNotification(un,We._.error))))))),this.updateHomeCentreAndContactRoles=(0,s.EH)(()=>this.actions.pipe((0,s.gp)($e.qe),(0,De.M)(()=>this.store$.dispatch((0,vt.ZF)({messageTag:un}))),(0,qe.n)(fe=>(0,zn.p)([this.contactService.updateContactHomeCentre(fe.updatedHomeCentre,fe.contactId),this.contactRolesService.updateContactRoles(fe.updatedRoles,fe.contactId)]).pipe((0,ct.Z)(([Ee,we])=>[$e.em({updatedRoles:we}),$e.X8({updatedContactDetails:Ee}),this.showNotification("MY_TEAM.VIEWCONTACT.UPDATECONTACTSUCCESS",We._.success)]),(0,xe.W)(()=>(0,Be.of)(this.showNotification(un,We._.error))))))),this.deleteContact=(0,s.EH)(()=>this.actions.pipe((0,s.gp)($e.MO),(0,De.M)(()=>this.store$.dispatch((0,vt.ZF)({messageTag:$n}))),(0,Qn.E)(this.store$.select(H.Kb),this.store$.select(H.i3)),(0,qe.n)(([fe,Ee,we])=>this.contactService.deleteTeamMember(fe.contactId).pipe((0,ct.Z)(()=>(this.ngxLogger.log((0,an.tM)(wt.C[fe?.accessType],fe?.company,Bn.t.Manual)),[$e.Hv({response:!0}),(0,dt.g)(),(0,vt.Ds)({text:"MY_TEAM.VIEWCONTACT.DELETESUCCESS",translateParameters:{ConsumerInput_Name:fe.contactName},notificationType:We._.success}),(0,et.rI)({filter:Ee,paging:null,sorting:we})])),(0,xe.W)(hn=>(0,Be.of)($e.w3({error:hn}),(0,vt.Ds)({text:this.getDeleteErrorMessageKey(hn),notificationType:We._.error,messageTag:$n}))))))),this.getAllLongTermCentres$=(0,s.EH)(()=>this.actions.pipe((0,s.gp)($e.yY),(0,_t.T)(()=>ra.iz())))}getContactData(i){return(0,R.z)([this.contactService.getContactDetails(i),this.networkDeviceService.getNetworkDevices({contactId:i,page:1,pageSize:20,sortBy:"DeviceDescription",sortDirection:"ASC"}),this.accountKeyContactsService.getAccountKeyContacts(),this.memberhsipsService.getMembershipsByContactId(i),this.contactRolesService.getContactRolesByContactId(i)]).pipe((0,_t.T)(([p,c,S,Rt,Qt])=>$e.yY({modelData:{contactDetails:p,keyContacts:S,networkDevices:c?c.results:null,membershipDetails:Rt,contactRoles:Qt}})),(0,xe.W)(()=>(0,Be.of)((0,dt.g)())))}getPartialContactData(i){return(0,R.z)([this.contactService.getContactDetails(i),this.accountKeyContactsService.getAccountKeyContacts(),this.contactRolesService.getContactRolesByContactId(i)]).pipe((0,_t.T)(([p,c,S])=>$e.yY({modelData:{contactDetails:p,keyContacts:c,networkDevices:[],membershipDetails:[],contactRoles:S}})),(0,xe.W)(()=>(0,Be.of)((0,dt.g)())))}showNotification(i,p){return(0,vt.Ds)({text:i,notificationType:p})}static{this.\u0275fac=function(p){return new(p||r)(t.KVO(ca.T),t.KVO(la.x),t.KVO(da.$),t.KVO(ma.T),t.KVO(pa.n),t.KVO(s.En),t.KVO(d.il),t.KVO
1(pn.so))}}static{this.\u0275prov=t.jDH({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})(),sa];var ga=e(4997),_a=e(93827),Ca=e(1623),fa=e(82064),Ta=e(17747),Ma=e(86049),Ea=e(2370),va=e(6732),ya=e(46351),ba=e(71660);let Pa=(()=>{class r{static{this.\u0275fac=function(p){return new(p||r)}}static{this.\u0275mod=t.$C({type:r})}static{this.\u0275inj=t.G2t({providers:[ya.Y,{provide:t.xe9,useValue:"en-GB"},Kt.X,Ct.K],imports:[Hn,n.X1.withConfig({callSetDisabledState:"whenDisabledForLegacyCode"}),_.h,Ln.r,Qo.p,ot.S,Kn.D,n.YN,Kn.D,Ln.r,ba.O,va.R,N.y,Gn.C,U.P,Hn,Ln.r,ga.F,d.md.forFeature("team",Jo.G),s.Vm.forFeature(ha),M.Ov.forChild(),_a.L,Ea.X,xt.i,it.q,oe.X,Ca.ProfileModule,fa.x,ve.i,k.MD,Ve.s,Ma.v,Ta.h]})}}return r})()},48345:(lt,O,e)=>{e.r(O),e.d(O,{UserProfileModule:()=>qt});var t=e(60177),n=e(80262),d=e(44701),s=e(4705),_=e(34978),f=e(59640),g=e(21413),h=e(84572),C=e(56977),T=e(5964),m=e(41598),I=e(35376),y=e(38207),o=e(72134),P=e(65761),N=e(37632),a=e(54438),M=e(68018),G=e(12262),k=e(97644),R=e(69924),J=e(35155),H=e(76864);let et=(()=>{class rt{static{this.\u0275fac=function(kt){return new(kt||rt)}}static{this.\u0275cmp=a.VBU({type:rt,selectors:[["iwg-account-list-header"]],decls:12,vars:0,consts:[[1,"header","iwg-body2"],["translate","",1,"company-name"],["translate","",1,"location","column-gap"],["translate","",1,"product","column-gap"],["translate","",1,"primary-contact","column-gap"],["translate","",1,"account-number","column-gap"],[1,"column-gap","actions"]],template:function(kt,It){1&kt&&(a.j41(0,"div",0)(1,"div",1),a.EFF(2," USER_PROFILE.ACCOUNTS_LIST.COMPANY_NAME "),a.k0s(),a.j41(3,"div",2),a.EFF(4," USER_PROFILE.ACCOUNTS_LIST.LOCATION "),a.k0s(),a.j41(5,"div",3),a.EFF(6," USER_PROFILE.ACCOUNTS_LIST.PRODUCT "),a.k0s(),a.j41(7,"div",4),a.EFF(8," USER_PROFILE.ACCOUNTS_LIST.PRIMARY_CONTACT "),a.k0s(),a.j41(9,"div",5),a.EFF(10," USER_PROFILE.ACCOUNTS_LIST.ACCOUNT_NUMBER "),a.k0s(),a.nrm(11,"div",6),a.k0s())},dependencies:[M.Mm],styles:[".header[_ngcontent-%COMP%]{display:flex;border:1px solid var(--color-border, var(--global-neutral-300, #C3C3C3));background-color:var(--color-bg-table-header, var(--global-neutral-300, #C3C3C3));height:6rem;align-items:center;margin-left:0;margin-right:0}@media (max-width: 1023.98px){.header[_ngcontent-%COMP%]{display:none}}.company-name[_ngcontent-%COMP%]{flex-basis:25%;max-width:25%;margin-left:2rem;word-break:break-word}[dir=rtl]   [_nghost-%COMP%]   .company-name[_ngcontent-%COMP%]{margin-left:0;margin-right:2rem}[dir=rtl][_ngcontent-%COMP%]   .company-name[_ngcontent-%COMP%]{margin-left:0;margin-right:2rem}[dir=rtl][_nghost-%COMP%]   .company-name[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .company-name[_ngcontent-%COMP%]{margin-left:0;margin-right:2rem}@media (max-width: 1023.98px){.company-name[_ngcontent-%COMP%]{margin-right:2rem;margin-left:0}}.account-number[_ngcontent-%COMP%]{flex-basis:14%;max-width:13%}.location[_ngcontent-%COMP%]{flex-basis:23%;max-width:23%}.product[_ngcontent-%COMP%]{flex-basis:15%;max-width:15%}.primary-contact[_ngcontent-%COMP%]{flex-basis:13%;max-width:13%;word-break:break-word}.swicth[_ngcontent-%COMP%]{flex-basis:15%;max-width:15%}@media (min-width: 1024px){.column-gap[_ngcontent-%COMP%]{padding-left:1.5rem}}.actions[_ngcontent-%COMP%]{flex-basis:14%;max-width:13%}"]})}}return rt})();var st=e(31635),Et=e(42092),dt=e(60156),Nt=e(68996),V=e(59756),mt=e(83964);function Pt(rt,Yt){if(1&rt&&(a.qex(0),a.EFF(1),a.bVm()),2&rt){const Y=a.XpG(2);a.R7$(),a.SpI(" / ",Y.account.primaryFinancialAccount.membershipTierName,"")}}function l(rt,Yt){1&rt&&(a.j41(0,"span",11),a.EFF(1,"USER_PROFILE.ACCOUNTS_LIST.PRIMARY_CONTACT_MOBILE"),a.k0s())}function $(rt,Yt){1&rt&&(a.j41(0,"span",11),a.EFF(1,"USER_PROFILE.ACCOUNTS_LIST.ACCOUNT_NUMBER_MOBILE"),a.k0s())}function Z(rt,Yt){if(1&rt){const Y=a.RV6();a.j41(0,"iwg-button",15),a.bIt("click",function(It){a.eBV(Y);const jt=a.XpG(4);return jt.switchToContact(jt.account.contactId),a.Njj(It.stopPropagation())})("keydown.enter",function(It){a.eBV(Y);const jt=a.XpG(4);return jt.switchToContact(jt.account.contactId),a.Njj(It.stopPropagation())}
1),a.EFF(1," USER_PROFILE.ACCOUNTS_LIST.SWITCH_TO_ACCOUNT "),a.k0s(),a.j41(2,"iwg-button",15),a.bIt("click",function(It){a.eBV(Y);const jt=a.XpG(4);return jt.unlinkAccount(jt.account.contactId),a.Njj(It.stopPropagation())})("keydown.enter",function(It){a.eBV(Y);const jt=a.XpG(4);return jt.unlinkAccount(jt.account.contactId),a.Njj(It.stopPropagation())}),a.EFF(3," USER_PROFILE.ACCOUNTS_LIST.UNLINK_ACCOUNT "),a.k0s()}if(2&rt){const Y=a.XpG(4);a.Y8G("wrapperId","account_list_row_switch_"+Y.account.id),a.R7$(2),a.Y8G("wrapperId","account_list_row_unlink_"+Y.account.id)}}function ot(rt,Yt){if(1&rt&&(a.j41(0,"iwg-dropdown-actions",14),a.DNE(1,Z,4,2,"ng-template",null,0,a.C5r),a.k0s()),2&rt){const Y=a.XpG(3);a.Y8G("wrapperId",Y.account.id)}}function D(rt,Yt){if(1&rt){const Y=a.RV6();a.j41(0,"div",17),a.bIt("click",function(It){a.eBV(Y);const jt=a.XpG(4);return jt.switchToContact(jt.account.contactId),a.Njj(It.stopPropagation())})("keypress",function(It){a.eBV(Y);const jt=a.XpG(4);return jt.switchToContact(jt.account.contactId),a.Njj(It.stopPropagation())}),a.EFF(1," USER_PROFILE.ACCOUNTS_LIST.SWITCH_TO_ACCOUNT "),a.k0s()}if(2&rt){const Y=a.XpG(4);a.Y8G("id","account_list_row_switch_"+Y.account.id)}}function U(rt,Yt){if(1&rt){const Y=a.RV6();a.j41(0,"div",17),a.bIt("click",function(It){a.eBV(Y);const jt=a.XpG(4);return jt.unlinkAccount(jt.account.contactId),a.Njj(It.stopPropagation())})("keypress",function(It){a.eBV(Y);const jt=a.XpG(4);return jt.unlinkAccount(jt.account.contactId),a.Njj(It.stopPropagation())}),a.EFF(1," USER_PROFILE.ACCOUNTS_LIST.UNLINK_ACCOUNT "),a.k0s()}if(2&rt){const Y=a.XpG(4);a.Y8G("id","account_list_row_unlink_"+Y.account.id)}}function gt(rt,Yt){if(1&rt&&a.DNE(0,D,2,1,"div",16)(1,U,2,1,"div",16),2&rt){const Y=a.XpG(3);a.vxM((null==Y.account?null:Y.account.contactId)!==Y.selectedContactId?0:-1),a.R7$(),a.vxM((null==Y.account?null:Y.account.contactId)!==Y.selectedContactId?1:-1)}}function _t(rt,Yt){if(1&rt&&a.DNE(0,ot,3,1,"iwg-dropdown-actions",14)(1,gt,2,2),2&rt){const Y=a.XpG(2);a.vxM(Y.isMobile?1:0)}}function ct(rt,Yt){if(1&rt){const Y=a.RV6();a.j41(0,"div",2)(1,"button",3),a.bIt("click",function(){a.eBV(Y);const It=a.XpG();return a.Njj(It.rowClicked.emit(It.account.id))}),a.j41(2,"div",4)(3,"div",5),a.EFF(4),a.k0s(),a.j41(5,"div",6),a.EFF(6),a.k0s()(),a.j41(7,"div",7),a.EFF(8),a.k0s(),a.j41(9,"div",8),a.EFF(10),a.DNE(11,Pt,2,1,"ng-container",9),a.k0s(),a.j41(12,"div",10),a.DNE(13,l,2,0,"span",11),a.EFF(14),a.k0s(),a.j41(15,"div",12),a.DNE(16,$,2,0,"span",11),a.EFF(17),a.k0s()(),a.j41(18,"div",13),a.DNE(19,_t,2,1),a.k0s()()}if(2&rt){const Y=a.XpG();a.AVh("isSelected",Y.isSelected()),a.R7$(3),a.Y8G("ngClass",Y.isMobile?"iwg-body1":""),a.R7$(),a.SpI(" ",Y.account.name,""),a.R7$(2),a.SpI("(",Y.account.contactName,")"),a.R7$(2),a.SpI(" ",null==Y.account.primaryFinancialAccount?null:Y.account.primaryFinancialAccount.centreName," "),a.R7$(2),a.SpI(" ",null==Y.account.primaryFinancialAccount?null:Y.account.primaryFinancialAccount.customerType,""),a.R7$(),a.Y8G("ngIf",null==Y.account.primaryFinancialAccount?null:Y.account.primaryFinancialAccount.membershipTierName),a.R7$(),a.AVh("text-ellipsis",Y.isMobile),a.R7$(),a.vxM(Y.isMobile?13:-1),a.R7$(),a.SpI(" ",null==Y.account.primaryFinancialAccount?null:Y.account.primaryFinancialAccount.primaryContact," "),a.R7$(2),a.vxM(Y.isMobile?16:-1),a.R7$(),a.SpI(" ",null==Y.account.primaryFinancialAccount?null:Y.account.primaryFinancialAccount.id," "),a.R7$(2),a.vxM((null==Y.account?null:Y.account.contactId)!==Y.selectedContactId?19:-1)}}class pt{constructor(Yt,Y,kt){this.store$=Yt,this.deviceService=Y,this.confirmationDialogService=kt,this.unsubscribe$=new g.B,this.isHeader=!1,this.rowClicked=new a.bkB,this.account$.pipe((0,C.Q)(this.unsubscribe$)).subscribe(It=>{this.account=It}),this.deviceService.deviceType$.pipe((0,C.Q)(this.unsubscribe$)).subscribe(It=>this.isMobile=It!==dt.b.desktop)}switchToContact(Yt){this.store$.dispatch((0,Nt.Do)({id:Yt}))}unlinkAccount(Yt){this.confirmationDialogService.showModal({title:"USER_PROFILE.ACCOUNTS_LIST.UNLINK_ACCOUNT_CONFIRMATION_TITLE",primaryButton:"COMMON.YES",secondaryButton:"COMMON.NO"}).pipe((0,C.Q)(this.unsubscribe$)).subscribe(Y=>
1Y&&this.store$.dispatch((0,Nt.wm)({id:Yt})))}isSelected(){return!this.isHeader&&this.account&&this.account.contactId===this.selectedContactId}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}static{this.\u0275fac=function(Y){return new(Y||pt)(a.rXU(f.il),a.rXU(dt.g),a.rXU(V.N))}}static{this.\u0275cmp=a.VBU({type:pt,selectors:[["iwg-account-list-row"]],inputs:{account$:"account$",selectedContactId:"selectedContactId",isHeader:"isHeader"},outputs:{rowClicked:"rowClicked"},decls:1,vars:1,consts:[["optionsTemplate",""],[1,"info",3,"isSelected"],[1,"info"],["type","button",1,"iwg-body2","account-wrapper","text-link--button",3,"click"],[1,"company-name"],[1,"iwg-field-input","multiline",3,"ngClass"],[1,"iwg-body2","paranthesis"],[1,"location","column-gap"],["translate","",1,"product","column-gap"],[4,"ngIf"],[1,"primary-contact","column-gap"],["translate",""],[1,"account-number","column-gap"],[1,"actions-wrapper"],[3,"wrapperId"],["type","button","displayType","dropdown-item",1,"dropdown-actions-item","block",3,"click","keydown.enter","wrapperId"],["translate","",1,"switch","column-gap",3,"id"],["translate","",1,"switch","column-gap",3,"click","keypress","id"]],template:function(Y,kt){1&Y&&a.DNE(0,ct,20,15,"div",1),2&Y&&a.vxM(kt.account?0:-1)},dependencies:[t.YU,t.bT,M.Mm,G.Q,mt.i],styles:['@charset "UTF-8";.info[_ngcontent-%COMP%]{display:flex;margin-left:0;margin-right:0;align-items:center;min-height:6rem;padding-top:2rem;padding-bottom:2.1rem;cursor:pointer;border:1px solid var(--color-border, var(--global-neutral-300, #C3C3C3));border-top:0;padding-right:1rem}[dir=rtl]   [_nghost-%COMP%]   .info[_ngcontent-%COMP%]{padding-left:1rem}[dir=rtl][_ngcontent-%COMP%]   .info[_ngcontent-%COMP%]{padding-left:1rem}[dir=rtl][_nghost-%COMP%]   .info[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .info[_ngcontent-%COMP%]{padding-left:1rem}@media (max-width: 1023.98px){.info[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start;padding-left:1.4rem;border:1px solid var(--color-bg-secondary, var(--global-neutral-200, #F4F4F5));padding-bottom:0}[dir=rtl]   [_nghost-%COMP%]   .info[_ngcontent-%COMP%]{padding-right:1.4rem}[dir=rtl][_ngcontent-%COMP%]   .info[_ngcontent-%COMP%]{padding-right:1.4rem}[dir=rtl][_nghost-%COMP%]   .info[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .info[_ngcontent-%COMP%]{padding-right:1.4rem}}.isSelected[_ngcontent-%COMP%]{background-color:var(--color-bg-table-selected, var(--global-neutral-200, #F4F4F5))}.account-wrapper[_ngcontent-%COMP%]{display:flex;flex:auto;align-items:center}@media (max-width: 1023.98px){.account-wrapper[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start}}.company-name[_ngcontent-%COMP%]{margin-left:2rem;line-height:2.2rem;flex-basis:25%;max-width:25%;display:flex;flex-direction:column;word-break:break-word}[dir=rtl]   [_nghost-%COMP%]   .company-name[_ngcontent-%COMP%]{margin-left:0;margin-right:2rem}@media (max-width: 1023.98px){[dir=rtl]   [_nghost-%COMP%]   .company-name[_ngcontent-%COMP%]{margin-right:0}}[dir=rtl][_ngcontent-%COMP%]   .company-name[_ngcontent-%COMP%]{margin-left:0;margin-right:2rem}@media (max-width: 1023.98px){[dir=rtl][_ngcontent-%COMP%]   .company-name[_ngcontent-%COMP%]{margin-right:0}}[dir=rtl][_nghost-%COMP%]   .company-name[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .company-name[_ngcontent-%COMP%]{margin-left:0;margin-right:2rem}@media (max-width: 1023.98px){[dir=rtl][_nghost-%COMP%]   .company-name[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .company-name[_ngcontent-%COMP%]{margin-right:0}}@media (max-width: 1023.98px){.company-name[_ngcontent-%COMP%]{padding-bottom:0;margin-right:0;margin-left:0;max-width:100%;flex-basis:100%;letter-spacing:0}}.switch[_ngcontent-%COMP%]{color:var(--color-text-accent-secondary, var(--brand-primary-600, #B6050F));flex-basis:12%;max-width:12%;margin-right:2rem;display:flex}[dir=rtl]   [_nghost-%COMP%]   .switch[_ngcontent-%COMP%]{margin-right:0;margin-left:2rem}[dir=rtl][_ngcontent-%COMP%]   .switch[_ngcontent-%COMP%]{margin-right:0;margin-left:2rem}[dir=rtl][_nghost-%COMP%]   .switch[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .switch[_ngcontent-%COMP%]{margin-right:0;margin-left:2rem}@media (max-width: 1023.98px){.switch[_ngcontent-%COMP%]{padding-bottom:2rem;max-width:100%;flex-basis:100%}}.account-number[_ngcontent-%COMP%]{max-width:9%;flex-basis:9%}@media (max-width: 1023.98px){.account-number[_ngcontent-%COMP%]{padding-bottom:1.3rem;max-width:100%;flex-basis:100%;display:flex;flex-direction:row;white-space:pre}}.location[_ngcontent-%COMP%]{flex-basis:23%;max-width:23%}@media (max-width: 1023.98px){.location[_ngcontent-%COMP%]{max-width:100%;flex-basis:100%}}.product[_ngcontent-%COMP%]{flex-basis:15%;max-width:15%}@media (max-width: 1023.98px){.product[_ngcontent-%COMP%]{max-width:100%;flex-basis:100%}}.primary-contact[_ngcontent-%COMP%]{flex-basis:13%;max-width:13%;word-break:break-word}@media (max-width: 1023.98px){.primary-contact[_ngcontent-%COMP%]{max-width:100%;flex-basis:100%;display:flex;flex-direction:row;white-space:nowrap}}@media (max-width: 1023.98px){.primary-contact[_ngcontent-%COMP%]{display:inline-block}}.multiline[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;display:block;display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical}.paranthesis[_ngcontent-%COMP%]:after, .paranthesis[_ngcontent-%COMP%]:before{content:"\\200e\\200e"}@media (min-width: 1024px){.column-gap[_ngcontent-%COMP%]{padding-left:1.5rem}}.actions-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;flex-basis:4%}@media (max-width: 1023.98px){.actions-wrapper[_ngcontent-%COMP%]{max-width:100%;flex-basis:100%;flex-direction:column}}']})}}(0,st.Cg)([(0,Et.W)()],pt.prototype,"account$",void 0);var x=e(53993),it=e(89417),q=e(31476),nt=e(52510),xt=e(69431),Dt=e(72540),oe=e(82970),v=e(1088
10),_e=e(12720);const ue=["searchTerm"];let re=(()=>{class rt{constructor(Y,kt,It){this.store$=Y,this.hideMobileItems=!0,this.centres=[],this.products=[],this.filterPickerOpen=!1,this.unsubscribe$=new g.B,this.form=kt.group({searchText:[null],location:[null],product:[null]}),this.form.valueChanges.pipe((0,x.E)(It.isMobile$,(jt,Pe)=>({val:jt,isMobile:Pe})),(0,T.p)(({isMobile:jt})=>!jt),(0,C.Q)(this.unsubscribe$)).subscribe(({val:jt})=>{this.updateFilter(jt)})}searchTextUpdated(Y){this.form.controls.searchText.setValue(Y),this.form.updateValueAndValidity({onlySelf:!1,emitEvent:!0})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}ngOnInit(){(0,h.z)([this.store$.select(I.S7)]).pipe((0,C.Q)(this.unsubscribe$)).subscribe(([Y])=>{this.centres=Y.centres?Y.centres:this.centres,this.products=Y.products?Y.products:this.products}),this.store$.dispatch((0,m.ax)())}updateFilter(Y){const kt={page:1,pageSize:10,centres:Y.location?Y.location.map(It=>It.centreNumber):[],products:Y.product?Y.product.map(It=>It.id):[],searchText:Y.searchText,includePrimaryContactInfo:!0,facets:[o.Jo.PrimaryFinancialAccountLocationNumber,o.Jo.PrimaryFinancialAccountCustomerTypeId]};this.store$.dispatch((0,m.N2)({filter:kt}))}mobileFilterChange(){this.filterPickerOpen=!1,this.updateFilter(this.form.value)}clearFilter(){this.form.patchValue({searchText:null,location:null,product:null})}static{this.\u0275fac=function(kt){return new(kt||rt)(a.rXU(f.il),a.rXU(it.ze),a.rXU(dt.g))}}static{this.\u0275cmp=a.VBU({type:rt,selectors:[["iwg-account-list-filter"]],viewQuery:function(kt,It){if(1&kt&&a.GBs(ue,5),2&kt){let jt;a.mGM(jt=a.lsd())&&(It.searchTerm=jt.first)}},decls:18,vars:13,consts:[["searchTerm",""],[3,"formGroup"],[1,"searchTerm"],["formControlName","searchText","placeholderText","USER_PROFILE.ACCOUNTS_LIST.SEARCH_PLACEHOLDER","id","searchText","wrapperId","UserProfile.ManageCompanies.Search",3,"searchChanged","enterKey","searchButtonClicked"],[1,"desktop-filter"],[1,"filter-fields-with-clear"],[1,"filter-fields"],["wrapperId","UserProfile.ManageCompanies.Search.Location","multiple","true","idKey","centreNumber","id","location","formControlName","location","iwgFilterAnalytic","","isSearchable","true","filterKeys","name","placeholder","COMMON.ANY",1,"location",3,"labelText","titleKey","options"],["wrapperId","UserProfile.ManageCompanies.Search.Product","multiple","true","idKey","id","id","product","formControlName","product","iwgFilterAnalytic","","isSearchable","true","filterKeys","description","placeholder","COMMON.ANY",1,"product",3,"labelText","titleKey","options"],["type","button","displayType","text-link-inline",1,"clear-fields","text-link","text-link--regular","text-link--no-underline",3,"click","keydown.enter"],[1,"mobile-filter"],["clearButtonId","UserProfile.ManageCompanies.ClearFields",3,"openChange","filterApply","open","showClearButton"],["wrapperId","UserProfile.ManageCompanies.Search.LocationSection","title","USER_PROFILE.ACCOUNTS_LIST.LOCATION",3,"selectedFiltersCount"],["formControlName","location","iwgFilterAnalytic","","idKey","centreNumber","id","UserProfile.ManageCompanies.Search.MobileLocation","wrapperId","UserProfile.ManageCompanies.Search.MobileLocation","titleKey","name",3,"options"],["wrapperId","UserProfile.ManageCompanies.Search.ProductSection","title","USER_PROFILE.ACCOUNTS_LIST.PRODUCT",3,"selectedFiltersCount"],["formControlName","product","iwgFilterAnalytic","","idKey","id","id","UserProfile.ManageCompanies.Search.MobileProduct","wrapperId","UserProfile.ManageCompanies.Search.MobileProduct","titleKey","description",3,"options"]],template:function(kt,It){if(1&kt){const jt=a.RV6();a.j41(0,"div",1)(1,"div",2,0)(3,"iwg-search",3),a.bIt("searchChanged",function(Oe){return a.eBV(jt),a.Njj(It.searchTextUpdated(Oe))})("enterKey",function(Oe){return a.eBV(jt),a.Njj(It.searchTextUpdated(Oe))})("searchButtonClicked",function(Oe){return a.eBV(jt),a.Njj(It.searchTextUpdated(Oe))}),a.k0s()(),a.j41(4,"div",4)(5,"div",5)(6,"div",6),a.nrm(7,"iwg-dropdown",7)(8,"iwg-dropdown",8),a.k0s(),a.j41(9,"iwg-button",9),a.bIt("click",function(){return a.eBV(jt),a.Njj(It.clearFilter())})("keydown.enter",function(){return a.eBV(jt),a.Njj(It.clearFilter())}),a.EFF(10," USER_PROFILE.ACCOUNTS_LIST.CLEAR_FIELDS "),a.k0s()()(),a.j41(11,"div",10)(12,"iwg-sort-filter-wrapper")(13,"iwg-filter-picker",11),a.mxI("openChange",function(Oe){return a.eBV(jt),a.DH7(It.filterPickerOpen,Oe)||(It.filterPickerOpen=Oe),a.Njj(Oe)}),a.bIt("filterApply",function(){return a.eBV(jt),a.Njj(It.mobileFilterChange())}),a.j41(14,"iwg-filter-section",12),a.nrm(15,"iwg-filter-checkbox-list",13),a.k0s(),a.j41(16,"iwg-filter-section",14),a.nrm(17,"iwg-filter-checkbox-list",15),a.k0s()()()()()}2&kt&&(a.Y8G("formGroup",It.form),a.R7$(7),a.Y8G("labelText","USER_PROFILE.ACCOUNTS_LIST.LOCATION")("titleKey","name")("options",It.centres),a.R7$(),a.Y8G("labelText","USER_PROFILE.ACCOUNTS_LIST.PRODUCT")("titleKey","description")("options",It.products),a.R7$(5),a.R50("open",It.filterPickerOpen),a.Y8G("showClearButton",!0),a.R7$(),a.Y8G("selectedFiltersCount",null==It.form||null==It.form.value.location?null:It.form.value.location.length),a.R7$(),a.Y8G("options",It.centres),a.R7$(),a.Y8G("selectedFiltersCount",null==It.form||null==It.form.value.product?null:It.form.value.product.length),a.R7$(),a.Y8G("options",It.products))},dependencies:[G.Q,q.P,it.BC,it.cb,it.j4,it.JD,nt.S,xt.b,Dt.q,oe.Z,v.X,_e.l],styles:[".filter-fields-with-clear[_ngcontent-%COMP%]{display:inline-flex;width:100%;margin-bottom:var(--spacing-lrg, var(--scale-700, 4rem))}@media (max-width: 1023.98px){.filter-fields-with-clear[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:3rem;margin-bottom:0}}.filter-fields[_ngcontent-%COMP%]{display:inline-flex}@media (max-width: 1023.98px){.filter-fields[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column}}.location[_ngcontent-%COMP%]{width:29rem;margin-right:var(--spacing-lrg, var(--scale-700, 4rem))}[lang=it-IT]   [_nghost-%COMP%]   .location[_ngcontent-%COMP%]{width:31rem}@media (max-width: 1023.98px){[lang=it-IT]   [_nghost-%COMP%]   .location[_ngcontent-%COMP%]{width:100%}}[lang=it-IT][_ngcontent-%COMP%]   .location[_ngcontent-%COMP%]{width:31rem}@media (max-width: 1023.98px){[lang=it-IT][_ngcontent-%COMP%]   .location[_ngcontent-%COMP%]{width:100%}}[lang=it-IT][_nghost-%COMP%]   .location[_ngcontent-%COMP%], [lang=it-IT]   [_nghost-%COMP%]   .location[_ngcontent-%COMP%]{width:31rem}@media (max-width: 1023.98px){[lang=it-IT][_nghost-%COMP%]   .location[_ngcontent-%COMP%], [lang=it-IT]   [_nghost-%COMP%]   .location[_ngcontent-%COMP%]{width:100%}}[dir=rtl]   [_nghost-%COMP%]   .location[_ngcontent-%COMP%]{margin-right:0}[dir=rtl][_ngcontent-%COMP%]   .location[_ngcontent-%COMP%]{margin-right:0}[dir=rtl][_nghost-%COMP%]   .location[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .location[_ngcontent-%COMP%]{margin-right:0}@media (max-width: 1023.98px){.location[_ngcontent-%COMP%]{width:100%}}.product[_ngcontent-%COMP%]{width:29rem}[lang=it-IT]   [_nghost-%COMP%]   .product[_ngcontent-%COMP%]{width:31rem}@media (max-width: 1023.98px){[lang=it-IT]   [_nghost-%COMP%]   .product[_ngcontent-%COMP%]{width:100%}}[lang=it-IT][_ngcontent-%COMP%]   .product[_ngcontent-%COMP%]{width:31rem}@media (max-width: 1023.98px){[lang=it-IT][_ngcontent-%COMP%]   .product[_ngcontent-%COMP%]{width:100%}}[lang=it-IT][_nghost-%COMP%]   .product[_ngcontent-%COMP%], [lang=it-IT]   [_nghost-%COMP%]   .product[_ngcontent-%COMP%]{width:31rem}@media (max-width: 1023.98px){[lang=it-IT][_nghost-%COMP%]   .product[_ngcontent-%COMP%], [lang=it-IT]   [_nghost-%COMP%]   .product[_ngcontent-%COMP%]{width:100%}}[dir=rtl]   [_nghost-%COMP%]   .product[_ngcontent-%COMP%]{margin-right:var(--spacing-lrg, var(--scale-700, 4rem))}[dir=rtl][_ngcontent-%COMP%]   .product[_ngcontent-%COMP%]{margin-right:var(--spacing-lrg, var(--scale-700, 4rem))}[dir=rtl][_nghost-%COMP%]   .product[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .product[_ngcontent-%COMP%]{margin-right:var(--spacing-lrg, var(--scale-700, 4rem))}@media (max-width: 1023.98px){.product[_ngcontent-%COMP%]{width:100%;padding-top:2rem}}.clear-fields[_ngcontent-%COMP%]{margin-top:var(--spacing-xs, var(--scale-400, 1.6rem));margin-left:var(--spacing-lrg, var(--scale-700, 4rem));cursor:pointer}[dir=rtl]   [_nghost-%COMP%]   .clear-fields[_ngcontent-%COMP%]{margin-right:var(--spacing-lrg, var(--scale-700, 4rem))}[dir=rtl][_ngcontent-%COMP%]   .clear-fields[_ngcontent-%COMP%]{margin-right:var(--spacing-lrg, var(--scale-700, 4rem))}[dir=rtl][_nghost-%COMP%]   .clear-fields[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .clear-fields[_ngcontent-%COMP%]{margin-right:var(--spacing-lrg, var(--scale-700, 4rem))}@media (max-width: 1023.98px){.clear-fields[_ngcontent-%COMP%]{margin-top:3rem;align-self:center;margin-left:0}[dir=rtl]   [_nghost-%COMP%]   .clear-fields[_ngcontent-%COMP%]{margin-right:0}[dir=rtl][_ngcontent-%COMP%]   .clear-fields[_ngcontent-%COMP%]{margin-right:0}[dir=rtl][_nghost-%COMP%]   .clear-fields[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .clear-fields[_ngcontent-%COMP%]{margin-right:0}}
1.searchTerm[_ngcontent-%COMP%]{width:62rem;margin-bottom:var(--spacing-med, var(--scale-600, 3.2rem))}[lang=it-IT]   [_nghost-%COMP%]   .searchTerm[_ngcontent-%COMP%]{width:66rem}@media (max-width: 1023.98px){[lang=it-IT]   [_nghost-%COMP%]   .searchTerm[_ngcontent-%COMP%]{width:100%}}[lang=it-IT][_ngcontent-%COMP%]   .searchTerm[_ngcontent-%COMP%]{width:66rem}@media (max-width: 1023.98px){[lang=it-IT][_ngcontent-%COMP%]   .searchTerm[_ngcontent-%COMP%]{width:100%}}[lang=it-IT][_nghost-%COMP%]   .searchTerm[_ngcontent-%COMP%], [lang=it-IT]   [_nghost-%COMP%]   .searchTerm[_ngcontent-%COMP%]{width:66rem}@media (max-width: 1023.98px){[lang=it-IT][_nghost-%COMP%]   .searchTerm[_ngcontent-%COMP%], [lang=it-IT]   [_nghost-%COMP%]   .searchTerm[_ngcontent-%COMP%]{width:100%}}@media (max-width: 1023.98px){.searchTerm[_ngcontent-%COMP%]{width:100%;margin-bottom:var(--spacing-med, var(--scale-600, 3.2rem))}}@media (max-width: 1023.98px){.desktop-filter[_ngcontent-%COMP%]{display:none}}@media (min-width: 1024px){.mobile-filter[_ngcontent-%COMP%]{display:none}}"]})}}return rt})();const bt=["accountListFilterComponent"];function Ft(rt,Yt){1&rt&&a.nrm(0,"iwg-breadcrumbs")}function Te(rt,Yt){1&rt&&(a.j41(0,"span",18),a.EFF(1,"USER_PROFILE.ACCOUNTS_LIST.TITLE"),a.k0s())}function E(rt,Yt){if(1&rt){const Y=a.RV6();a.j41(0,"iwg-button",19),a.bIt("click",function(){a.eBV(Y);const It=a.XpG();return a.Njj(It.openAddFlyout())})("keydown.enter",function(){a.eBV(Y);const It=a.XpG();return a.Njj(It.openAddFlyout())}),a.EFF(1," USER_PROFILE.ACCOUNTS_LIST.ADD_NEW_ACCOUNT "),a.k0s()}}function F(rt,Yt){if(1&rt&&(a.j41(0,"iwg-notification-item",20)(1,"span",22),a.EFF(2," USER_PROFILE.ACCOUNTS_LIST.INCOMPLETE_ACCOUNT "),a.k0s()()),2&rt){const Y=a.XpG(2);a.Y8G("notificationType",Y.notificationType.info)}}function L(rt,Yt){if(1&rt&&a.nrm(0,"iwg-account-list-row",23),2&rt){const Y=Yt.$implicit,kt=a.XpG(3);a.Y8G("account$",Y)("selectedContactId",kt.selectedContactId)}}function ft(rt,Yt){if(1&rt&&a.Z7z(0,L,1,2,"iwg-account-list-row",23,a.fX1),2&rt){const Y=a.XpG().$implicit;a.Dyx(Y.childAccounts)}}function K(rt,Yt){if(1&rt){const Y=a.RV6();a.DNE(0,F,3,1,"iwg-notification-item",20),a.j41(1,"iwg-account-list-row",21),a.bIt("rowClicked",function(){const It=a.eBV(Y).$implicit,jt=a.XpG();return a.Njj(jt.openDetails(It.id))}),a.k0s(),a.DNE(2,ft,2,0)}if(2&rt){const Y=Yt.$implicit,kt=a.XpG();a.vxM(kt.isAccountComplete(Y)?-1:0),a.R7$(),a.Y8G("account$",Y)("selectedContactId",kt.selectedContactId),a.R7$(),a.vxM(Y.childAccounts?2:-1)}}let Tt=(()=>{class rt{constructor(Y){this.store=Y,this.accounts$=this.store.select(I.QT),this.selectedAccount$=this.store.select(P.sZ),this.paging$=this.store.select(I.wF),this.totalCount$=this.store.select(I.hg),this.dataChangedFromPager$=this.store.select(I.lJ),this.notificationType=y._,this.unsubscribe$=new g.B,this.saving$=this.store.select(P.hJ)}ngOnInit(){this.isLoading$=this.store.select(I.QW),this.store.dispatch(m.N2({filter:this.getDefaultRequest()})),this.selectedAccount$.pipe((0,C.Q)(this.unsubscribe$)).subscribe(Y=>{this.selectedContactId=Y?Y.contactId:"",this.selectedAccount=Y}),this.paging$.pipe((0,C.Q)(this.unsubscribe$)).subscribe(Y=>{this.paging=Y}),(0,h.z)([this.accounts$,this.dataChangedFromPager$]).pipe((0,C.Q)(this.unsubscribe$)).subscribe(([Y,kt])=>{Y&&(Y.totalCount!==this.totalCount&&(this.totalCount=Y.totalCount,this.store.dispatch(m.N8({totalCount:Y.totalCount}))),this.accounts=Y.results?.filter(It=>!It.parentAccountId||!Y.results.some(jt=>jt.id===It.parentAccountId)),this.accounts&&(this.accounts=this.accounts.map(It=>({...It,childAccounts:Y.results.filter(jt=>jt.parentAccountId===It.id)})),this.accountListFilterComponent&&kt&&(this.accountListFilterComponent.searchTerm.nativeElement.scrollIntoView({behavior:"smooth"}),this.store.dispatch(m.xT()))))}),this.store.pipe((0,f.Lt)(I.NI),(0,T.p)(Y=>Y),(0,C.Q)(this.unsubscribe$)).subscribe(()=>{this.store.dispatch(m.N2({filter:this.getDefaultRequest()}))})}getDefaultRequest(){return{page:this.paging?this.paging.page:1,pageSize:this.paging?this.paging.pageSize:10,includePrimaryContactInfo:!0,facets:[o.Jo.PrimaryFinancialAccountLocationNumber,o.Jo.PrimaryFinancialAccountCustomerTypeId]}}openDetails(Y){this.store.dispatch((0,N.xI)({id:Y}))}openAddFlyout(){this.store.dispatch((0,N._q)())}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}isAccountComplete(Y){return Y.name&&(""===Y.name||"Blank"!==Y.name)}
1pageChange(Y){this.paging.page!==Y&&this.store.dispatch(m.yd({page:Y}))}static{this.\u0275fac=function(kt){return new(kt||rt)(a.rXU(f.il))}}static{this.\u0275cmp=a.VBU({type:rt,selectors:[["iwg-accounts-list"]],viewQuery:function(kt,It){if(1&kt&&a.GBs(bt,5),2&kt){let jt;a.mGM(jt=a.lsd())&&(It.accountListFilterComponent=jt.first)}},decls:35,vars:16,consts:[["headerBreadcrumbs",""],["headerTitle",""],["headerContent",""],["accountListFilterComponent",""],[3,"loading"],[1,"iwg-accounts-list"],[1,"header"],[1,"bottom-border"],[1,"container"],["translate","",1,"selected-company","iwg-page-title"],[1,"selected-company-info"],[3,"rowClicked","account$","isHeader","selectedContactId"],["translate","",1,"sub-header","iwg-page-title"],["translate","",1,"switch-desc","iwg-body1"],[1,"account-list"],[1,"m--t-5"],[3,"pageChange","totalRecords","pageSize"],["id","UserProfile_AccountsList_AddNewAccountFloating","displayType","icon-primary",1,"d--mobile-only","new-account-fab","mobile-offset",3,"click","keydown.enter","iconClass"],["id","UserProfile_AccountsList_Title","translate",""],["id","UserProfile_AccountsList_AddNewAccount","translate","",1,"header-content",3,"click","keydown.enter"],[3,"notificationType"],[3,"rowClicked","account$","selectedContactId"],["translate",""],[3,"account$","selectedContactId"]],template:function(kt,It){if(1&kt){const jt=a.RV6();a.j41(0,"iwg-loader",4),a.nI1(1,"async"),a.j41(2,"div",5)(3,"div",6)(4,"iwg-page-header",7),a.DNE(5,Ft,1,0,"ng-template",null,0,a.C5r)(7,Te,2,0,"ng-template",null,1,a.C5r)(9,E,2,0,"ng-template",null,2,a.C5r),a.k0s()(),a.j41(11,"section",8)(12,"div",9),a.EFF(13,"USER_PROFILE.ACCOUNTS_LIST.YOUR_SELECTED_COMPANY_ACCOUNT"),a.k0s(),a.j41(14,"div",10),a.nrm(15,"iwg-account-list-header"),a.j41(16,"iwg-account-list-row",11),a.bIt("rowClicked",function(){return a.eBV(jt),a.Njj(It.openDetails(It.selectedAccount.id))}),a.k0s()(),a.j41(17,"div",12),a.EFF(18," USER_PROFILE.ACCOUNTS_LIST.ALL_COMPANY_ACCOUNTS "),a.k0s(),a.j41(19,"div",13),a.EFF(20,"USER_PROFILE.ACCOUNTS_LIST.SWITCH_DESC"),a.k0s(),a.nrm(21,"iwg-account-list-filter",null,3)(23,"iwg-account-list-header"),a.j41(24,"iwg-loader",4),a.nI1(25,"async"),a.j41(26,"div",14),a.Z7z(27,K,3,4,null,null,a.fX1),a.j41(29,"div",15)(30,"iwg-pagination",16),a.nI1(31,"async"),a.nI1(32,"async"),a.bIt("pageChange",function(Oe){return a.eBV(jt),a.Njj(It.pageChange(Oe))}),a.k0s()()()(),a.j41(33,"iwg-button",17),a.bIt("click",function(){return a.eBV(jt),a.Njj(It.openAddFlyout())})("keydown.enter",function(){return a.eBV(jt),a.Njj(It.openAddFlyout())}),a.k0s()(),a.nrm(34,"router-outlet"),a.k0s()()}if(2&kt){let jt;a.Y8G("loading",a.bMT(1,8,It.saving$)),a.R7$(16),a.Y8G("account$",It.selectedAccount)("isHeader",!0)("selectedContactId",It.selectedContactId),a.R7$(8),a.Y8G("loading",a.bMT(25,10,It.isLoading$)),a.R7$(3),a.Dyx(It.accounts),a.R7$(3),a.Y8G("totalRecords",a.bMT(31,12,It.totalCount$))("pageSize",null==(jt=a.bMT(32,14,It.paging$))?null:jt.pageSize),a.R7$(3),a.Y8G("iconClass","iwg-icon-plus")}},dependencies:[s.n3,M.Mm,G.Q,k._,R.y,n.e,J.m,H.V,et,pt,re,t.Jj],styles:[".mobile-offset[_ngcontent-%COMP%]{margin-right:1.2rem}.sub-header[_ngcontent-%COMP%]{margin-top:5.6rem;margin-bottom:2.4rem}@media (max-width: 1023.98px){.sub-header[_ngcontent-%COMP%]{margin-top:3.2rem;margin-bottom:2.4rem}}.switch-desc[_ngcontent-%COMP%]{margin-bottom:3.9rem}.selected-company[_ngcontent-%COMP%]{padding-top:4.8rem}@media (max-width: 1023.98px){.selected-company[_ngcontent-%COMP%]{padding-top:2.4rem}}.selected-company-info[_ngcontent-%COMP%]{border:1px solid var(--global-neutral-900, #202020);box-shadow:0 .2rem 1rem 0 var(--color-border, var(--global-neutral-300, #C3C3C3))}@media (max-width: 1023.98px){.selected-company-info[_ngcontent-%COMP%]{box-shadow:0 .2rem 1rem 0 var(--color-border, var(--global-neutral-300, #C3C3C3)),0 .2rem 1rem 0 var(--color-border, var(--global-neutral-300, #C3C3C3))}}.account-list[_ngcontent-%COMP%]{padding-bottom:3rem}@media (min-width: 1024px){.account-list[_ngcontent-%COMP%]{min-height:72rem}}@media (max-width: 1023.98px){.account-list[_ngcontent-%COMP%]{padding-top:2rem}}.pager[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;padding-bottom:7rem}.new-account-fab[_ngcontent-%COMP%]{position:sticky;bottom:3rem;width:5rem;height:5rem;float:right;margin-bottom:3rem}[dir=rtl]   [_nghost-%COMP%]   .new-account-fab[_ngcontent-%COMP%]{float:right}[dir=rtl][_ngcontent-%COMP%]   .new-account-fab[_ngcontent-%COMP%]{float:right}[dir=rtl][_nghost-%COMP%]   .new-account-fab[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .new-account-fab[_ngcontent-%COMP%]{float:right}.new-account-fab[_ngcontent-%COMP%]   i.iwg-icon-plus[_ngcontent-%COMP%]{font-size:2.5rem;width:2.5rem;display:inline-block}@media (max-width: 1023.98px){.header-content[_ngcontent-%COMP%]{display:none}}"]})}}return rt})();var St=e(53491),ae=e(85986),ne=e(2274),de=e(53952),vt=e(85196),Jt=e(3135),Gt=e(84412),wt=e(69671),ee=e(86734),me=e(15144),Me=e(5404),ye=e(96518),be=e(53122),ve=e(93720);const Ct=(rt,Yt)=>[rt,Yt];function Kt(rt,Yt){1&rt&&(a.j41(0,"span",13),a.EFF(1,"ONBOARDING.ADD_COMPANY_PAYMENT.PAGE_TITLE"),a.k0s())}function B(rt,Yt){1&rt&&a.nrm(0,"iwg-stepper",14),2&rt&&a.Y8G("wrapperId","AddCompanyPaymentDesktopStepper")("stepsCount",2)("currentStep",1)}function W(rt,Yt){1&rt&&a.DNE(0,B,1,3,"ng-template",8,4,a.C5r)}function A(rt,Yt){if(1&rt){const Y=a.RV6();a.j41(0,"iwg-button",15),a.bIt("click",function(){a.eBV(Y);const It=a.XpG(2);return a.Njj(It.skip())})("keydown.enter",function(){a.eBV(Y);const It=a.XpG(2);return a.Njj(It.skip())}),a.EFF(1,"ONBOARDING.FOOTER.SKIP_STEP"),a.k0s()}}function w(rt,Yt){if(1&rt){const Y=a.RV6();a.j41(0,"iwg-button",16),a.bIt("click",function(){a.eBV(Y);const It=a.XpG(2);return a.Njj(It.skip())})("keydown.enter",function(){a.eBV(Y);const It=a.XpG(2);return a.Njj(It.skip())}),a.EFF(1,"ONBOARDING.FOOTER.SKIP_STEP "),a.k0s()}}function ut(rt,Yt){1&rt&&a.nrm(0,"div",17)}function Wt(rt,Yt){if(1&rt){const Y=a.RV6();a.j41(0,"iwg-modal-flyout",6),a.bIt("closeModal",function(){a.eBV(Y);const It=a.XpG();return a.Njj(It.closeFlyout())}),a.j41(1,"iwg-page-header",7),a.DNE(2,Kt,2,0,"ng-template",null,0,a.C5r)(4,W,2,0,null,8),a.nI1(5,"async"),a.k0s(),a.j41(6,"footer")(7,"iwg-sticky-footer"),a.DNE(8,A,2,0,"ng-template",null,1,a.C5r)(10,w,2,0,"ng-template",null,2,a.C5r)(12,ut,1,0,"ng-template",null,3,a.C5r),a.k0s()(),a.nrm(14,"iwg-add-payment-method",9),a.j41(15,"header",10)(16,"div",11),a.nrm(17,"iwg-stepper",12),a.k0s()()()}if(2&rt){const Y=a.XpG();a.R7$(),a.Y8G("pageSizeType",Y.pageSizeType),a.R7$(3),a.vxM(a.bMT(5,8,Y.deviceService$.isMobile$)?-1:4),a.R7$(10),a.Y8G("paymentMethods",a.l_i(10,Ct,Y.PaymentMethodType.paymentCard,Y.PaymentMethodType.directDebit))("listType",Y.PaymentMethodsListType.company)("storeAccount",!0),a.R7$(3),a.Y8G("stepsCount",2)("currentStep",1)("wrapperId","AddCompanyPaymentMobileStepper")}}let ht=(()=>{class rt extends wt.f{constructor(Y,kt){super(),this.deviceService$=Y,this.store$=kt,this.PaymentMethodType=de.eq,this.PaymentMethodsListType=de.pI,this.canDeactivate=!1,this.isCompany=new Gt.t(!0),this.pageSizeType=R.l.Flyout}
1ngOnInit(){this.store$.dispatch((0,Jt.NP)()),this.store$.dispatch((0,vt.YA)({params:{listType:de.pI.company}}))}addCard(Y){this.canDeactivate=!0,this.closeFlyout()}ngOnDestroy(){this.store$.dispatch((0,Jt.j2)()),this.store$.dispatch((0,vt.Zb)())}closeFlyout(){this.store$.dispatch((0,ee.Tl)({}))}canDeactivateModal(){return this.canDeactivate?null:{key:"EXIT_MODAL.TITLE",subtitle:"EXIT_MODAL.SUBTITLE"}}skip(){this.canDeactivate=!0,this.closeFlyout()}static{this.\u0275fac=function(kt){return new(kt||rt)(a.rXU(dt.g),a.rXU(f.il))}}static{this.\u0275cmp=a.VBU({type:rt,selectors:[["iwg-add-company-payment-flyout"]],features:[a.Jv_([{provide:ae._,useExisting:(0,a.Rfq)(()=>rt)},{provide:ne.n,useExisting:(0,a.Rfq)(()=>rt)}]),a.Vt3],decls:1,vars:1,consts:[["headerTitle",""],["leftContent",""],["middleContent",""],["button",""],["headerIcon",""],[3,"closeModal",4,"iwgModal"],[3,"closeModal"],[1,"no-container",3,"pageSizeType"],[1,"non-mobile"],[3,"paymentMethods","listType","storeAccount"],[1,"add-payment-header"],[1,"header_stepper","stepper-icon","mobile"],[3,"stepsCount","currentStep","wrapperId"],["translate",""],[3,"wrapperId","stepsCount","currentStep"],["type","button","displayType","text-link-inline",1,"text-link","text-link--regular",3,"click","keydown.enter"],["type","button","displayType","text-link-inline",1,"text-link","text-link--regular","mobile",3,"click","keydown.enter"],[1,"button-place-holder"]],template:function(kt,It){1&kt&&a.DNE(0,Wt,18,13,"iwg-modal-flyout",5),2&kt&&a.Y8G("iwgModal",!0)},dependencies:[M.Mm,G.Q,R.y,me.G,Me.d,ye.s,be.h,ve.o,t.Jj],styles:["@media (min-width: 1024px){.mobile[_ngcontent-%COMP%]{display:none}}.button-place-holder[_ngcontent-%COMP%]{width:100%;height:6rem}@media (max-width: 1023.98px){.non-mobile[_ngcontent-%COMP%]{display:none}}.add-payment-header[_ngcontent-%COMP%]{border:0}header[_ngcontent-%COMP%]   .stepper-icon[_ngcontent-%COMP%]{width:4.5rem;height:4.5rem;flex-shrink:0;margin:0 0 1rem 1.6rem;align-self:flex-start;order:1}[dir=rtl]   [_nghost-%COMP%]   header[_ngcontent-%COMP%]   .stepper-icon[_ngcontent-%COMP%]{margin:0 1.6rem 1rem 0}[dir=rtl][_ngcontent-%COMP%]   header[_ngcontent-%COMP%]   .stepper-icon[_ngcontent-%COMP%]{margin:0 1.6rem 1rem 0}[dir=rtl][_nghost-%COMP%]   header[_ngcontent-%COMP%]   .stepper-icon[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   header[_ngcontent-%COMP%]   .stepper-icon[_ngcontent-%COMP%]{margin:0 1.6rem 1rem 0}"]})}}return rt})();var pe=e(58790);const Vt=[{path:"",redirectTo:"manage",pathMatch:"full"},{path:"manage",component:Tt,canActivate:[_.W],data:{breadcrumb:"USER_PROFILE.MANAGE_COMPANIES",analyticPageName:"Accounts List"},children:[{path:"add-company",component:St.R,canDeactivate:[pe.y],data:{analyticPageName:"Add Company"}},{path:"add-payment",component:ht,canDeactivate:[pe.y],data:{analyticPageName:"Add Company Payment"}}]}];let Zt=(()=>{class rt{static{this.\u0275fac=function(kt){return new(kt||rt)}}static{this.\u0275mod=a.$C({type:rt})}static{this.\u0275inj=a.G2t({imports:[s.iI.forChild(Vt),s.iI]})}}return rt})();var ie=e(4169),Fe=e(44337),He=e(65932),Ke=e(1623),Bt=e(86049),he=e(98692),b=e(2370),X=e(6732),tt=e(39642),Lt=e(99252),zt=e(46351),ce=e(71660),le=e(742);let qt=(()=>{class rt{static{this.\u0275fac=function(kt){return new(kt||rt)}}static{this.\u0275mod=a.$C({type:rt})}static{this.\u0275inj=a.G2t({providers:[le.K,zt.Y],imports:[t.MD,Zt,M.h,ce.O,X.R,R.y,tt.C,Lt.D,q.P,d.R,ie.D,n.e,ye.s,Bt.v,it.X1.withConfig({callSetDisabledState:"whenDisabledForLegacyCode"}),nt.S,b.X,he.i,Dt.q,v.X,Fe.r,He.O,Ke.ProfileModule,mt.i]})}}return rt})()},27270:(lt,O,e)=>{e.d(O,{O:()=>f});var t=e(54438),n=e(68018);const d=["*"];function s(g,h){1&g&&(t.j41(0,"span",3),t.EFF(1,"COMMON.DOWNLOADING"),t.k0s())}function _(g,h){if(1&g&&(t.j41(0,"span",4),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&g){const C=t.XpG();t.R7$(),t.JRh(t.bMT(2,1,C.downloadText||"COMMON.DOWNLOAD"))}}let f=(()=>{class g{constructor(){this.downloading=!1,this.disabled=!1,this.downloadingChange=new t.bkB}startDownload(){this.downloading||this.downloadingChange.emit(this.downloading)}static{this.\u0275fac=function(T){return new(T||g)}}static{this.\u0275cmp=t.VBU({type:g,selectors:[["iwg-download"]],inputs:{downloadText:"downloadText",downloading:"downloading",wrapperId:"wrapperId",disabled:"disabled"},outputs:{downloadingChange:"downloadingChange"},standalone:!0,features:[t.aNF],ngContentSelectors:d,decls:6,vars:7,consts:[["type","button",1,"download-wrapper","text-link--small","text-link--no-underline","text-link--button",3,"click","id","disabled"],[1,"icon-wrapper"],[1,"download-text",3,"id"],["translate",""],[1,"download-label"]],template:function(T,m){1&T&&(t.NAR(),t.j41(0,"button",0),t.bIt("click",function(){return m.startDownload()}
1),t.j41(1,"div",1),t.SdG(2),t.k0s(),t.j41(3,"div",2),t.DNE(4,s,2,0,"span",3)(5,_,3,3,"span",4),t.k0s()()),2&T&&(t.AVh("text-link--disabled",m.downloading||m.disabled),t.Y8G("id",m.wrapperId+"__download_wrapper")("disabled",m.downloading||m.disabled),t.R7$(3),t.Y8G("id",m.wrapperId+"__download_text"),t.R7$(),t.vxM(m.downloading?4:-1),t.R7$(),t.vxM(m.downloading?-1:5))},dependencies:[n.Mm,n.D9],styles:[".download-wrapper[_ngcontent-%COMP%]{display:inline-flex;cursor:pointer}.download-wrapper[_ngcontent-%COMP%]   .icon-wrapper[_ngcontent-%COMP%]{display:block}.download-wrapper[_ngcontent-%COMP%]   .download-text[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.download-wrapper[_ngcontent-%COMP%]:hover   .download-label[_ngcontent-%COMP%]{text-decoration:underline}"]})}}return g})()},83964:(lt,O,e)=>{e.d(O,{i:()=>I});var t=e(54438),n=e(60177),d=e(68018),s=e(12262);const _=["optionsTemplate"],f=["dotsButton"],g=y=>({disabled:y}),h=y=>({"dropdown-actions-items--show":y});function C(y,o){if(1&y&&(t.j41(0,"div",5),t.eu8(1,6),t.k0s()),2&y){const P=t.XpG
1();t.R7$(),t.Y8G("ngTemplateOutlet",P.optionsTemplate)}}function T(y,o){if(1&y){const P=t.RV6();t.j41(0,"iwg-button",8),t.bIt("click",function(){const a=t.eBV(P).$implicit,M=t.XpG(2);return t.Njj(M.dropdownItemClicked(a))})("keydown.enter",function(){const a=t.eBV(P).$implicit,M=t.XpG(2);return t.Njj(M.dropdownItemClicked(a))}),t.EFF(1),t.nI1(2,"translate"),t.k0s()}if(2&y){const P=o.$implicit,N=t.XpG(2);t.Y8G("wrapperId",N.wrapperId+"_option_"+P[N.idKey]),t.R7$(),t.SpI(" ",t.bMT(2,2,P[N.titleKey])," ")}}function m(y,o){if(1&y&&t.Z7z(0,T,3,4,"iwg-button",7,t.fX1),2&y){const P=t.XpG();t.Dyx(P.options)}}let I=(()=>{class y{constructor(){this.options=[],this.disabled=!1,this.wrapperId="",this.titleKey="",this.idKey="",this.optionItemClicked=new t.bkB,this.isOpen=!1}toggleDropDown(){this.disabled||(this.isOpen=!this.isOpen)}dropdownItemClicked(P){this.optionItemClicked.emit(P)}clickout(P){this.isOpen&&!this.dotsButton.nativeElement.contains(P.target)&&(this.isOpen=!1)}static{this.\u0275fac=function(N){return new(N||y)}}static{this.\u0275cmp=t.VBU({type:y,selectors:[["iwg-dropdown-actions"]],contentQueries:function(N,a,M){if(1&N&&t.wni(M,_,5),2&N){let G;t.mGM(G=t.lsd())&&(a.optionsTemplate=G.first)}},viewQuery:function(N,a){if(1&N&&t.GBs(f,5),2&N){let M;t.mGM(M=t.lsd())&&(a.dotsButton=M.first)}},hostBindings:function(N,a){1&N&&t.bIt("click",function(G){return a.clickout(G)},!1,t.EBC)},inputs:{options:"options",disabled:"disabled",wrapperId:"wrapperId",titleKey:"titleKey",idKey:"idKey"},outputs:{optionItemClicked:"optionItemClicked"},standalone:!0,features:[t.aNF],decls:8,vars:12,consts:[["dotsButton",""],[1,"dropdown-actions",3,"ngClass"],["type","button","aria-haspopup","true",1,"dropdown-action-dots","text-link--button",3,"click","disabled"],["aria-hidden","true",1,"iwg-icon-three-dots-icon"],[1,"dropdown-actions-items",3,"ngClass"],[1,"sub-title"],[3,"ngTemplateOutlet"],["type","button","displayType","dropdown-item",1,"dropdown-actions-item","block",3,"wrapperId"],["type","button","displayType","dropdown-item",1,"dropdown-actions-item","block",3,"click","keydown.enter","wrapperId"]],template:function(N,a){if(1&N){const M=t.RV6();t.j41(0,"div",1)(1,"button",2,0),t.nI1(3,"translate"),t.bIt("click",function(){return t.eBV(M),t.Njj(a.toggleDropDown())}),t.nrm(4,"i",3),t.k0s(),t.j41(5,"div",4),t.DNE(6,C,2,1,"div",5)(7,m,2,0),t.k0s()()}2&N&&(t.Y8G("ngClass",t.eq3(8,g,a.disabled)),t.R7$(),t.Y8G("disabled",a.disabled),t.BMQ("aria-expanded",a.isOpen)("aria-label",t.bMT(3,6,"COMMON.A11Y.ACTIONS")),t.R7$(4),t.Y8G("ngClass",t.eq3(10,h,!0===a.isOpen)),t.R7$(),t.vxM(a.optionsTemplate?6:7))},dependencies:[n.YU,n.T3,d.h,d.D9,s.Q],styles:[".dropdown-actions[_ngcontent-%COMP%]{position:relative}.dropdown-actions.disabled[_ngcontent-%COMP%]{cursor:text}.dropdown-actions.disabled[_ngcontent-%COMP%]   .form-field-label[_ngcontent-%COMP%]   span[_ngcontent-%COMP%], .dropdown-actions.disabled[_ngcontent-%COMP%]   .form-field-label[_ngcontent-%COMP%]:after{color:var(--color-text-secondary, var(--brand-neutral-700, #544F69))}.dropdown-actions[_ngcontent-%COMP%]   .dropdown-actions-items[_ngcontent-%COMP%]{right:0;cursor:pointer;max-height:0;display:block;overflow:hidden;box-sizing:content-box;position:absolute;background-color:var(--color-bg-primary, var(--global-neutral-100, #FFFFFF))}[dir=rtl]   [_nghost-%COMP%]   .dropdown-actions[_ngcontent-%COMP%]   .dropdown-actions-items[_ngcontent-%COMP%]{left:0;right:auto}[dir=rtl][_ngcontent-%COMP%]   .dropdown-actions[_ngcontent-%COMP%]   .dropdown-actions-items[_ngcontent-%COMP%]{left:0;right:auto}[dir=rtl][_nghost-%COMP%]   .dropdown-actions[_ngcontent-%COMP%]   .dropdown-actions-items[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .dropdown-actions[_ngcontent-%COMP%]   .dropdown-actions-items[_ngcontent-%COMP%]{left:0;right:auto}@media (max-width: 1023.98px){.dropdown-actions[_ngcontent-%COMP%]   .dropdown-actions-items[_ngcontent-%COMP%]{right:0;left:auto}[dir=rtl]   [_nghost-%COMP%]   .dropdown-actions[_ngcontent-%COMP%]   .dropdown-actions-items[_ngcontent-%COMP%]{right:auto;left:0}[dir=rtl][_ngcontent-%COMP%]   .dropdown-actions[_ngcontent-%COMP%]   .dropdown-actions-items[_ngcontent-%COMP%]{right:auto;left:0}[dir=rtl][_nghost-%COMP%]   .dropdown-actions[_ngcontent-%COMP%]   .dropdown-actions-items[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .dropdown-actions[_ngcontent-%COMP%]   .dropdown-actions-items[_ngcontent-%COMP%]{right:auto;left:0}}.dropdown-actions[_ngcontent-%COMP%]   .dropdown-actions-items--show[_ngcontent-%COMP%]{z-index:1001!important;max-height:100rem;border:1px solid var(--color-border, var(--global-neutral-300, #C3C3C3));padding:1rem;transition:max-height .25s ease-in;width:max-content}.dropdown-actions[_ngcontent-%COMP%]   .dropdown-action-dots[_ngcontent-%COMP%]{cursor:pointer}.dropdown-actions[_ngcontent-%COMP%]   .dropdown-action-dots[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:4rem;color:var(--color-icon-accent, var(--color-text-accent, var(--brand-primary-500, #E30613)))}"]})}}return y})()},59216:(lt,O,e)=>{e.d(O,{M:()=>t});var t=function(n){return n.CoworkingDeskUsage="ACCOUNT.MANAGE_PRODUCTS_SERVICES.BENEFIT.COWORKING_DESK_USAGE",n.PrivateOfficeUsage="ACCOUNT.MANAGE_PRODUCTS_SERVICES.BENEFIT.PRIVATE_OFFICE_USAGE",n.UnlimitedCoworkingUsage="ACCOUNT.MANAGE_PRODUCTS_SERVICES.BENEFIT.UNLIMITED_COWORKING_USAGE",n.UnlimitedCoworkingAndOfficeUsage="ACCOUNT.MANAGE_PRODUCTS_SERVICES.BENEFIT.UNLIMITED_COWORKING_OR_OFFICE_USAGE",n.UnlimitedLoungeUsage="ACCOUNT.MANAGE_PRODUCTS_SERVICES.BENEFIT.UNLIMITED_LOUNGE_USAGE",n.XDaysCoworkingDeskUsePerMonth="ACCOUNT.MANAGE_PRODUCTS_SERVICES.BENEFIT.X_DAYS_COWORKING_USAGE",n.XDaysCoworkingDeskOrPrivateOfficeUsePerMonth="ACCOUNT.MANAGE_PRODUCTS_SERVICES.BENEFIT.X_DAYS_COWORKING_OR_OFFICE_USAGE",n.AccessToBusinessLounges="ACCOUNT.MANAGE_PRODUCTS_SERVICES.BENEFIT.BUSINESS_LOUNGES",n.FreeInternetAccess="ACCOUNT.MANAGE_PRODUCTS_SERVICES.BENEFIT.FREE_INTERNET",n.DiscountsOnMeetingRoomVideoComunicationsAndDayOffices="ACCOUNT.MANAGE_PRODUCTS_SERVICES.BENEFIT.DISCOUNTS",n.AccessToProfessionalAdministrativeSupport="ACCOUNT.MANAGE_PRODUCTS_SERVICES.BENEFIT.ADMIN_SUPPORT",n}(t||{})},28906:(lt,O,e)=>{e.d(O,{d:()=>t});var t=function(n){return n.Coworking="ACCOUNT.MANAGE_PRODUCTS_SERVICES.MEMBERSHIP.TYPES.COWORKING",n.Lounge="ACCOUNT.MANAGE_PRODUCTS_SERVICES.MEMBERSHIP.TYPES.LOUNGE",n.Member="ACCOUNT.MANAGE_PRODUCTS_SERVICES.MEMBERSHIP.TYPES.MEMBER",n.Office="ACCOUNT.MANAGE_PRODUCTS_SERVICES.MEMBERSHIP.TYPES.OFFICE",n.EnterpriseMembership="ACCOUNT.MANAGE_PRODUCTS_SERVICES.MEMBERSHIP.TYPES.ENTERPRISE_MEMBERSHIP",n.PreferredMembership="ACCOUNT.MANAGE_PRODUCTS_SERVICES.MEMBERSHIP.TYPES.PREFERRED_MEMBERSHIP",n.MemberOfNetwork="ACCOUNT.MANAGE_PRODUCTS_SERVICES.MEMBERSHIP.TYPES.MEMBER_OF_NETWORK",n}(t||{})},76325:(lt,O,e)=>{e.d(O,{_:()=>t});var t=function(n){return n.Unknown="Unknown",n.Unlimited="Unlimited",n.Limited="Limited",n.LimitedPerLocation="LimitedPerLocation",n}(t||{})},25766:(lt,O,e)=>{e.d(O,{T:()=>t});var t=function(n){return n[n.NotTiedToMembershipBooking=0]="NotTiedToMembershipBooking",n[n.AutoRenewing=1e3]="AutoRenewing",n[n.NonRenewing=2e3]="NonRenewing",n[n.ProjectTenant=3e3]="ProjectTenant",n}(t||{})},97479:(lt,O,e)=>{e.d(O,{GH:()=>n,VM:()=>t,nH:()=>d});var t=function(s){return s[s.OfficeAccount=232]="OfficeAccount",s[s.Office=233]="Office",s[s.LoungeAccount=234]="LoungeAccount",s[s.Lounge=235]="Lounge",s[s.MemberAccount=236]="MemberAccount",s[s.Member=237]="Member",s[s.CoworkingAccount=251]="CoworkingAccount",s[s.Coworking=252]="Coworking",s[s.EnterpriseMembership=269]="EnterpriseMembership",s[s.PreferredMembership10Percent=295]="PreferredMembership10Percent",s[s.PreferredMembership15Percent=310]="PreferredMembership15Percent",s[s.MemberOfNetwork=-1]="MemberOfNetwork",s}(t||{});const n=[t.OfficeAccount,t.Office,t.LoungeAccount,t.Lounge,t.MemberAccount,t.Member,t.CoworkingAccount,t.Coworking,t.PreferredMembership10Percent,t.PreferredMembership15Percent,t.EnterpriseMembership],d=[{classificationId:t.Coworking,queryIds:[t.Coworking,t.CoworkingAccount]},{classificationId:t.Office,queryIds:[t.Office,t.OfficeAccount]},{classificationId:t.Lounge,queryIds:[t.Lounge,t.LoungeAccount]},{classificationId:t.Member,queryIds:[t.Member,t.MemberAccount]},{classificationId:t.PreferredMembership10Percent,queryIds:[t.PreferredMembership10Percent,t.PreferredMembership15Percent]},{classificationId:t.EnterpriseMembership,queryIds:[t.EnterpriseMembership]},{classificationId:t.MemberOfNetwork,queryIds:[t.MemberOfNetwork]}]},74941:(lt,O,e)=>{e.d(O,{f:()=>t});var t=function(n){return n.Domestic="domestic",n.International="international",n}(t||{})},21687:(lt,O,e)=>{e.d(O,{S:()=>t});var t=function(n){return n.Excel="excel",n.Pdf="pdf",n.CSV="csv",n}(t||{})},41613:(lt,O,e)=>{e.d(O,{D:()=>t});var t=function(n){return n.Statement="statement",n.Invoice="invoice",n.TaxDetails="taxDetails",n}(t||{})},64199:(lt,O,e)=>{e.d(O,{C:()=>g});var t=e(60177),n=e(68018),d=e(59640),s=e(62233),_=e(90495),f=e(54438);let g=(()=>{class h{static{this.\u0275fac=function(m){return new(m||h)}}static{this.\u0275mod=f.$C({type:h})}
1static{this.\u0275inj=f.G2t({imports:[t.MD,n.h,d.md.forFeature("core",s.gz),_.U]})}}return h})()},47192:(lt,O,e)=>{e.d(O,{j:()=>M});var t=e(54438),n=e(41434),d=e(60177),s=e(12262),_=e(68018),f=e(89417);const g=["fileUploadHint"],h=["fileInput"],C=["fileInputText"],T=G=>({ConsumerInput_Size:G}),m=G=>({ConsumerInput_FileTypes:G});function I(G,k){if(1&G&&(t.j41(0,"span",8),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&G){const R=t.XpG(2);t.R7$(),t.SpI(" ",t.i5U(2,1,"GENERIC.COMPONENT.FILEUPLOAD.FILEUPLOADHINT",t.eq3(4,T,R.maxFileSizeMB))," ")}}function y(G,k){if(1&G&&t.eu8(0,9),2&G){const R=t.XpG(2);t.Y8G("ngTemplateOutlet",R.fileUploadHint)}}function o(G,k){if(1&G&&(t.j41(0,"span",10),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&G){const R=t.XpG(2);t.R7$(),t.SpI(" ",t.i5U(2,1,"GENERIC.COMPONENT.FILEUPLOAD.ACCEPTEDFILETYPES",t.eq3(4,m,R.acceptedFileTypes))," ")}}function P(G,k){if(1&G&&(t.j41(0,"div"),t.DNE(1,I,3,6,"span",8)(2,y,1,1,"ng-container",9)(3,o,3,6,"span",10),t.k0s()),2&G){const R=t.XpG();t.R7$(),t.vxM(R.fileUploadHint?-1:1),t.R7$(),t.vxM(R.fileUploadHint?2:-1),t.R7$(),t.vxM(R.acceptedFileTypes?3:-1)}}function N(G,k){if(1&G&&(t.j41(0,"span",5),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&G){const R=t.XpG();t.R7$(),t.JRh(t.i5U(2,1,R.errorMessage,t.eq3(4,T,R.maxFileSizeMB)))}}var a=function(G){return G[G.Hint=0]="Hint",G[G.Filled=1]="Filled",G[G.Error=2]="Error",G}(a||{});let M=(()=>{class G extends n.G{static{this.oneMB=1048576}constructor(R){super(),this.ngControl=R,this.maxFileSizeMB=10,this.isDisabled=!1,this.acceptedFileTypes="",this.filesUploaded=new t.bkB,this.selectedFiles=null,this.currentState=a.Hint,this.errorMessage="",this.FileUploadStatus=a,this.ngControl&&(this.ngControl.valueAccessor=this)}get fileNames(){return this.selectedFiles&&this.selectedFiles.length>0?Array.prototype.reduce.call(Array.prototype.slice.call(this.selectedFiles,1),(R,J)=>R+`, ${J.name}`,`${this.selectedFiles[0].name}`):""}get placeholderLocal(){return""===this.fileNames?this.placeholder:this.fileNames}ngOnInit(){(!this.placeholder||""===this.placeholder)&&(this.placeholder="GENERIC.COMPONENT.FILEUPLOAD.FILENOTSELECTED")}chooseFile(){this.fileInput?.nativeElement&&(this.fileInput.nativeElement.value=null,this.fileInput.nativeElement.click())}fileSelected(R){if(R?.target){if(R.target.files&&R.target.files.length<1)return this.selectedFiles=null,this.currentState=a.Hint,void this.fileUpload();this.selectedFiles=R.target.files,this.currentState=this.validateFileExtensionsAndSize(R.target.files)?a.Filled:a.Error,this.fileUpload()}}fileUpload(){const R=this.currentState===a.Filled?this.selectedFiles:null;this.filesUploaded.emit(R),this.onChange(R)}validateFileExtensionsAndSize(R){if(!(R&&R.length>0))return!1;{let H,et,J=0;for(const st of R){if(J+=st.size,H=st.name,et=H.substring(H.lastIndexOf("."))?.toLowerCase(),this.acceptExtensions&&""!==this.acceptExtensions&&!this.acceptExtensions.split(",").includes(et))return this.errorMessage="GENERIC.COMPONENT.FILEUPLOAD.FILENOTALLOWED_CONTINUATION",!1;if(J/G.oneMB>this.maxFileSizeMB)return this.errorMessage="GENERIC.COMPONENT.FILEUPLOAD.FILESIZEEXCEED",!1}}return!0}writeValue(){}setDisabledState(R){this.isDisabled=R}static{this.\u0275fac=function(J){return new(J||G)(t.rXU(f.vO,10))}}static{this.\u0275cmp=t.VBU({type:G,selectors:[["iwg-fileupload"]],contentQueries:function(J,H,et){if(1&J&&t.wni(et,g,5),2&J){let st;t.mGM(st=t.lsd())&&(H.fileUploadHint=st.first)}},viewQuery:function(J,H){if(1&J&&(t.GBs(h,5),t.GBs(C,5)),2&J){let et;t.mGM(et=t.lsd())&&(H.fileInput=et.first),t.mGM(et=t.lsd())&&(H.fileInputText=et.first)}},inputs:{placeholder:"placeholder",acceptExtensions:"acceptExtensions",maxFileSizeMB:"maxFileSizeMB",isDisabled:"isDisabled",acceptedFileTypes:"acceptedFileTypes"},outputs:{filesUploaded:"filesUploaded"},standalone:!0,features:[t.Vt3,t.aNF],decls:11,vars:8,consts:[["fileInputText",""],["fileInput",""],[1,"upload-container"],[1,"file-container"],["type","text","id","fileUpload_Text","disabled","","aria-label","File upload text",3,"ngClass","placeholder"],["id","fileUpload_ErrorMessage",1,"disclaimer-span","disclaimer-span-error"],["id","fileUpload_ChooseButton","translate","","displayType","secondary","type","button",1,"file-button",3,"click","keydown.enter","disabled"],["type","file","name","iwgFileupload","id","fileInput","aria-labelledby","fileUpload_ChooseButton",1,"form__input",3,"change","accept"],["id","fileUpload_HintMessage",1,"disclaimer-span"],[3,"ngTemplateOutlet"],["id","fileUpload_AcceptedTypesMessage",1,"disclaimer-span"]],template:function(J,H){if(1&J){const et=t.RV6();t.j41(0,"div",2)(1,"div",3),t.nrm(2,"input",4,0),t.nI1(4,"translate"),t.DNE(5,P,4,3,"div")(6,N,3,6,"span",5),t.k0s(),t.j41(7,"iwg-button",6),t.bIt("click",function(){return t.eBV(et),t.Njj(H.chooseFile())})("keydown.enter",function(){return t.eBV(et),t.Njj(H.chooseFile())}),t.EFF(8," GENERIC.COMPONENT.FILEUPLOAD.CHOOSEFILETEXT "),t.k0s(),t.j41(9,"input",7,1),t.bIt("change",function(Et){return t.eBV(et),t.Njj(H.fileSelected(Et))}),t.k0s()()}2&J&&(t.R7$(2),t.Y8G("ngClass",H.currentState===H.FileUploadStatus.Error?"file-error":"file-label")("placeholder",t.bMT(4,6,H.placeholderLocal)),t.R7$(3),t.vxM(H.currentState===H.FileUploadStatus.Hint||H.currentState===H.FileUploadStatus.Filled?5:-1),t.R7$(),t.vxM(H.currentState===H.FileUploadStatus.Error?6:-1),t.R7$(),t.Y8G("disabled",H.isDisabled),t.R7$(2),t.Y8G("accept",H.acceptExtensions))},dependencies:[d.YU,d.T3,s.Q,_.Mm,_.D9],styles:[".divider-top[_ngcontent-%COMP%]{border-top:var(--spacing-nano, var(--scale-25, .1rem)) solid var(--color-border, var(--global-neutral-300, #C3C3C3))}.divider-bottom[_ngcontent-%COMP%]{border-bottom:var(--spacing-nano, var(--scale-25, .1rem)) solid var(--color-border, var(--global-neutral-300, #C3C3C3))}.divider-both[_ngcontent-%COMP%]{border-top:var(--spacing-nano, var(--scale-25, .1rem)) solid var(--color-border, var(--global-neutral-300, #C3C3C3));border-bottom:var(--spacing-nano, var(--scale-25, .1rem)) solid var(--color-border, var(--global-neutral-300, #C3C3C3))}input[type=file][_ngcontent-%COMP%]{height:3rem;display:none}.upload-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}@media (max-width: 1023.98px){.upload-container[_ngcontent-%COMP%]{display:block}}.disclaimer-span[_ngcontent-%COMP%]{word-wrap:break-word;min-height:2rem;font-size:var(--body2-font-size, 1.4rem);line-height:1.43;color:var(--color-text-primary, var(--brand-neutral-900, #0A0428))}@media (max-width: 1023.98px){.disclaimer-span[_ngcontent-%COMP%]{min-width:0;width:100%}}.disclaimer-span-error[_ngcontent-%COMP%]{color:var(--color-text-error, var(--global-functional-red, #EE421C));font-size:var(--body2-font-size, 1.4rem)}.file-container[_ngcontent-%COMP%]{min-width:29rem;flex:1}@media (max-width: 1023.98px){.file-container[_ngcontent-%COMP%]{min-width:100%}}.file-label[_ngcontent-%COMP%], .file-error[_ngcontent-%COMP%]{height:6rem;border:solid 1px var(--color-border, var(--global-neutral-300, #C3C3C3));background-color:var(--color-bg-input-disabled, var(--color-bg-secondary, var(--global-neutral-200, #F4F4F5)));font-size:var(--h6-font-size, var(--scale-400, 1.6rem));line-height:1.38;margin-bottom:.8rem;padding-left:1.5rem;width:100%;border-radius:var(--radius-btn, var(--scale-200, .8rem))}@media (max-width: 1023.98px){.file-label[_ngcontent-%COMP%], .file-error[_ngcontent-%COMP%]{margin-right:0;min-width:0}}[dir=rtl]   [_nghost-%COMP%]   .file-label[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .file-error[_ngcontent-%COMP%]{padding-left:0;padding-right:1.5rem}[dir=rtl][_ngcontent-%COMP%]   .file-label[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%]   .file-error[_ngcontent-%COMP%]{padding-left:0;padding-right:1.5rem}[dir=rtl][_nghost-%COMP%]   .file-label[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .file-label[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%]   .file-error[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .file-error[_ngcontent-%COMP%]{padding-left:0;padding-right:1.5rem}.file-button[_ngcontent-%COMP%]{font-size:var(--body3-font-size, 1.2rem);letter-spacing:.2rem;text-align:center;margin-left:4rem;height:6rem;min-width:18rem;-webkit-appearance:none}[dir=rtl]   [_nghost-%COMP%]   .file-button[_ngcontent-%COMP%]{margin-left:0;margin-right:4rem}@media (max-width: 1023.98px){[dir=rtl]   [_nghost-%COMP%]   .file-button[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:4rem;width:100%}}[dir=rtl][_ngcontent-%COMP%]   .file-button[_ngcontent-%COMP%]{margin-left:0;margin-right:4rem}@media (max-width: 1023.98px){[dir=rtl][_ngcontent-%COMP%]   .file-button[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:4rem;width:100%}}[dir=rtl][_nghost-%COMP%]   .file-button[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .file-button[_ngcontent-%COMP%]{margin-left:0;margin-right:4rem}@media (max-width: 1023.98px){[dir=rtl][_nghost-%COMP%]   .file-button[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .file-button[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:4rem;width:100%}}@media (max-width: 1023.98px){.file-button[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:3rem;width:100%;-webkit-appearance:none}}.file-error[_ngcontent-%COMP%]{border:solid 1px var(--color-border-error, var(--global-functional-red, #EE421C));background-color:var(--color-bg-input-error, var(--color-bg-error-light, #fff5f5))}"]})}}return G})()},90495:(lt,O,e)=>{e.d(O,{U:()=>d});var t=e(60177),n=e(54438);let d=(()=>{class s{static{this.\u0275fac=function(g){return new(g||s)}}static{this.\u0275mod=n.$C({type:s})}static{this.\u0275inj=n.G2t({imports:[t.MD]})}}return s})()},91604:(lt,O,e)=>{e.d(O,{k:()=>f});var t=e(59216),n=e(28906),d=e(97479);const s="platinum-card-icon",f=[{id:d.VM.Member,cardType:n.d.Member,cardIconClass:"blue-card-icon",benefits:[t.M.AccessToProfessionalAdministrativeSupport]},{id:d.VM.Lounge,cardType:n.d.Lounge,cardIconClass:"gold-card-icon",benefits:[t.M.AccessToBusinessLounges,t.M.FreeInternetAccess,t.M.DiscountsOnMeetingRoomVideoComunicationsAndDayOffices,t.M.AccessToProfessionalAdministrativeSupport,t.M.UnlimitedLoungeUsage]},{id:d.VM.Office,cardType:n.d.Office,cardIconClass:"platinum-plus-card-icon",benefits:[t.M.CoworkingDeskUsage,t.M.PrivateOfficeUsage,t.M.
1XDaysCoworkingDeskOrPrivateOfficeUsePerMonth,t.M.UnlimitedCoworkingAndOfficeUsage,t.M.AccessToBusinessLounges,t.M.FreeInternetAccess,t.M.DiscountsOnMeetingRoomVideoComunicationsAndDayOffices,t.M.AccessToProfessionalAdministrativeSupport]},{id:d.VM.Coworking,cardType:n.d.Coworking,cardIconClass:s,benefits:[t.M.CoworkingDeskUsage,t.M.UnlimitedCoworkingUsage,t.M.AccessToBusinessLounges,t.M.FreeInternetAccess,t.M.DiscountsOnMeetingRoomVideoComunicationsAndDayOffices,t.M.AccessToProfessionalAdministrativeSupport,t.M.XDaysCoworkingDeskUsePerMonth]},{id:d.VM.PreferredMembership10Percent,cardType:n.d.PreferredMembership,cardIconClass:s,benefits:[t.M.CoworkingDeskUsage,t.M.PrivateOfficeUsage,t.M.AccessToBusinessLounges,t.M.FreeInternetAccess,t.M.UnlimitedCoworkingAndOfficeUsage,t.M.DiscountsOnMeetingRoomVideoComunicationsAndDayOffices,t.M.AccessToProfessionalAdministrativeSupport,t.M.XDaysCoworkingDeskOrPrivateOfficeUsePerMonth]},{id:d.VM.PreferredMembership15Percent,cardType:n.d.PreferredMembership,cardIconClass:s,benefits:[t.M.CoworkingDeskUsage,t.M.PrivateOfficeUsage,t.M.AccessToBusinessLounges,t.M.FreeInternetAccess,t.M.UnlimitedCoworkingAndOfficeUsage,t.M.DiscountsOnMeetingRoomVideoComunicationsAndDayOffices,t.M.AccessToProfessionalAdministrativeSupport,t.M.XDaysCoworkingDeskOrPrivateOfficeUsePerMonth]},{id:d.VM.EnterpriseMembership,cardType:n.d.EnterpriseMembership,cardIconClass:"enterprise-card-icon",benefits:[t.M.AccessToBusinessLounges,t.M.FreeInternetAccess,t.M.DiscountsOnMeetingRoomVideoComunicationsAndDayOffices,t.M.AccessToProfessionalAdministrativeSupport,t.M.XDaysCoworkingDeskOrPrivateOfficeUsePerMonth]},{id:d.VM.MemberOfNetwork,cardType:n.d.MemberOfNetwork,benefits:[]}]},89837:(lt,O,e)=>{e.d(O,{AM:()=>m,D8:()=>I,FA:()=>s,Fj:()=>T,HC:()=>y,uK:()=>_});var t=e(28906),n=e(59216),d=e(97479),s=function(o){return o.OfficeUsage="ACCOUNT.MANAGE_PRODUCTS_SERVICES.MEMBERSHIP_USAGE.OFFICE_USAGE",o.CoworkingUsage="ACCOUNT.MANAGE_PRODUCTS_SERVICES.MEMBERSHIP_USAGE.COWORKING_USAGE",o.EntitlementsUnlimitedVisits="ACCOUNT.MANAGE_PRODUCTS_SERVICES.MEMBERSHIP.MEMBERSHIP_ENTITLEMENTS_UNLIMITED_VISITS",o.EntitlementsUnlimitedPerMonth="ACCOUNT.MANAGE_PRODUCTS_SERVICES.MEMBERSHIP.MEMBERSHIP_ENTITLEMENTS_UNLIMITED_VISITS_PER_MONTH",o.EntitlementsNoFreeVisits="ACCOUNT.MANAGE_PRODUCTS_SERVICES.MEMBERSHIP.MEMBERSHIP_ENTITLEMENTS_NO_FREE_VISITS",o.EntitlementsNoFreeVisitsPerMonth="ACCOUNT.MANAGE_PRODUCTS_SERVICES.MEMBERSHIP.MEMBERSHIP_ENTITLEMENTS_NO_FREE_VISITS_PER_MONTH",o.EntitlementsXVisits="ACCOUNT.MANAGE_PRODUCTS_SERVICES.MEMBERSHIP.MEMBERSHIP_ENTITLEMENTS",o.EntitlementsXVisitsPerMonth="ACCOUNT.MANAGE_PRODUCTS_SERVICES.MEMBERSHIP.MEMBERSHIP_ENTITLEMENTS_PER_MONTH",o.Worldwide="ACCOUNT.MANAGE_PRODUCTS_SERVICES.MEMBERSHIP.MEMBERSHIP_WORLDWIDE",o.GlobalAccess="ACCOUNT.MANAGE_PRODUCTS_SERVICES.MEMBERSHIP.GLOBAL_ACCESS",o.RenewalDate="ACCOUNT.MANAGE_PRODUCTS_SERVICES.PRODUCT_DETAILS.RENEWS_ON",o.ExpiryDate="ACCOUNT.MANAGE_PRODUCTS_SERVICES.MEMBERSHIP.EXPIRY",o.ContractTermMonthly="ACCOUNT.MANAGE_PRODUCTS_SERVICES.CONTACT_TERM.MONTHLY",o.ContractTermYearly="ACCOUNT.MANAGE_PRODUCTS_SERVICES.CONTACT_TERM.X-MONTH",o.AutoRenewing="ACCOUNT.MANAGE_PRODUCTS_SERVICES.RENEWAL_OPTION.AUTO-RENEWING",o.NonRenewing="ACCOUNT.MANAGE_PRODUCTS_SERVICES.RENEWAL_OPTION.NON-RENEWING",o.AgreementStartDate="ACCOUNT.MANAGE_PRODUCTS_SERVICES.MEMBERSHIP.MEMBERSHIP_START_DATE",o.AgreementContractTerm="ACCOUNT.MANAGE_PRODUCTS_SERVICES.MEMBERSHIP.MEMBERSHIP_CONTRACT_TERM",o.StartDate="ACCOUNT.MANAGE_PRODUCTS_SERVICES.PRODUCT_DETAILS.STARTS_ON",o}(s||{});const _={[d.VM.Coworking]:{title:t.d.Coworking,usage:{limited:n.M.XDaysCoworkingDeskUsePerMonth,unlimited:n.M.UnlimitedCoworkingUsage}},[d.VM.CoworkingAccount]:{title:t.d.Coworking,usage:{limited:n.M.XDaysCoworkingDeskUsePerMonth,unlimited:n.M.UnlimitedCoworkingUsage}},[d.VM.Office]:{title:t.d.Office,usage:{limited:n.M.XDaysCoworkingDeskOrPrivateOfficeUsePerMonth,unlimited:n.M.UnlimitedCoworkingAndOfficeUsage}},[d.VM.OfficeAccount]:{title:t.d.Office,usage:{limited:n.M.XDaysCoworkingDeskOrPrivateOfficeUsePerMonth,unlimited:n.M.UnlimitedCoworkingAndOfficeUsage}},[d.VM.Lounge]:{title:t.d.Lounge,usage:{limited:s.EntitlementsXVisitsPerMonth,unlimited:n.M.UnlimitedLoungeUsage}},[d.VM.LoungeAccount]:{title:t.d.Lounge,usage:{limited:s.EntitlementsXVisitsPerMonth,unlimited:n.M.UnlimitedLoungeUsage}},[d.VM.Member]:{title:t.d.Member,usage:{limited:s.EntitlementsXVisitsPerMonth,unlimited:s.EntitlementsUnlimitedPerMonth}},[d.VM.MemberAccount]:{title:t.d.Member,usage:{limited:s.EntitlementsXVisitsPerMonth,unlimited:s.EntitlementsUnlimitedPerMonth}},[d.VM.EnterpriseMembership]:{title:t.d.EnterpriseMembership,usage:{limited:s.EntitlementsXVisitsPerMonth,unlimited:s.EntitlementsUnlimitedPerMonth}},[d.VM.PreferredMembership10Percent]:{title:t.d.PreferredMembership,usage:{limited:s.EntitlementsXVisitsPerMonth,unlimited:s.EntitlementsUnlimitedPerMonth}},[d.VM.PreferredMembership15Percent]:{title:t.d.PreferredMembership,usage:{limited:s.EntitlementsXVisitsPerMonth,unlimited:s.EntitlementsUnlimitedPerMonth}},[d.VM.MemberOfNetwork]:{title:t.d.MemberOfNetwork,usage:{limited:s.EntitlementsXVisitsPerMonth,unlimited:s.EntitlementsUnlimitedPerMonth}}};var f=function(o){return o.QUICK_ACCESS_MEMBERSHIP_LOUNGE="QUICK_ACCESS.MEMBERSHIP.LOUNGE",o.QUICK_ACCESS_MEMBERSHIP_MEMBER="QUICK_ACCESS.MEMBERSHIP.MEMBER",o.QUICK_ACCESS_MEMBERSHIP_PREFERRED_MEMBERSHIP="QUICK_ACCESS.MEMBERSHIP.PREFERRED_MEMBERSHIP",o.QUICK_ACCESS_MEMBERSHIP_ENTERPRISE_MEMBERSHIP="QUICK_ACCESS.MEMBERSHIP.ENTERPRISE_MEMBERSHIP",o.QUICK_ACCESS_MEMBERSHIP_MEMBER_OF_NETWORK="QUICK_ACCESS.MEMBERSHIP.MEMBER_OF_NETWORK",o}(f||{});const g={Coworking:"QUICK_ACCESS.MEMBERSHIP.COWORKING",Office:"QUICK_ACCESS.MEMBERSHIP.OFFICE",Lounge:f.QUICK_ACCESS_MEMBERSHIP_LOUNGE,Member:f.QUICK_ACCESS_MEMBERSHIP_MEMBER,PreferredMembership:f.QUICK_ACCESS_MEMBERSHIP_PREFERRED_MEMBERSHIP,EnterpriseMembership:f.QUICK_ACCESS_MEMBERSHIP_ENTERPRISE_MEMBERSHIP,MemberOfNetwork:f.QUICK_ACCESS_MEMBERSHIP_MEMBER_OF_NETWORK},h={Coworking:"QUICK_ACCESS.MEMBERSHIP.COWORKING_LIMITED",Office:"QUICK_ACCESS.MEMBERSHIP.OFFICE_LIMITED",Lounge:f.QUICK_ACCESS_MEMBERSHIP_LOUNGE,Member:f.QUICK_ACCESS_MEMBERSHIP_MEMBER,PreferredMembership:f.QUICK_ACCESS_MEMBERSHIP_PREFERRED_MEMBERSHIP,EnterpriseMembership:f.QUICK_ACCESS_MEMBERSHIP_ENTERPRISE_MEMBERSHIP,MemberOfNetwork:f.QUICK_ACCESS_MEMBERSHIP_MEMBER_OF_NETWORK},C={Coworking:"QUICK_ACCESS.MEMBERSHIP.COWORKING_UNLIMITED",Office:"QUICK_ACCESS.MEMBERSHIP.OFFICE_UNLIMITED",Lounge:f.QUICK_ACCESS_MEMBERSHIP_LOUNGE,Member:f.QUICK_ACCESS_MEMBERSHIP_MEMBER,PreferredMembership:f.QUICK_ACCESS_MEMBERSHIP_PREFERRED_MEMBERSHIP,EnterpriseMembership:f.QUICK_ACCESS_MEMBERSHIP_ENTERPRISE_MEMBERSHIP,MemberOfNetwork:f.QUICK_ACCESS_MEMBERSHIP_MEMBER_OF_NETWORK},T={[d.VM.Coworking]:g.Coworking,[d.VM.CoworkingAccount]:g.Coworking,[d.VM.Office]:g.Office,[d.VM.OfficeAccount]:g.Office,[d.VM.Lounge]:g.Lounge,[d.VM.LoungeAccount]:g.Lounge,[d.VM.Member]:g.Member,[d.VM.MemberAccount]:g.Member,[d.VM.PreferredMembership10Percent]:g.PreferredMembership,[d.VM.PreferredMembership15Percent]:g.PreferredMembership,[d.VM.EnterpriseMembership]:g.EnterpriseMembership,[d.VM.MemberOfNetwork]:g.MemberOfNetwork},m={[d.VM.Coworking]:h.Coworking,[d.VM.CoworkingAccount]:h.Coworking,[d.VM.Office]:h.Office,[d.VM.OfficeAccount]:h.Office,[d.VM.Lounge]:h.Lounge,[d.VM.LoungeAccount]:h.Lounge,[d.VM.Member]:h.Member,[d.VM.MemberAccount]:h.Member,[d.VM.PreferredMembership10Percent]:h.PreferredMembership,[d.VM.PreferredMembership15Percent]:h.PreferredMembership,[d.VM.EnterpriseMembership]:h.EnterpriseMembership,[d.VM.MemberOfNetwork]:h.MemberOfNetwork},I={[d.VM.Coworking]:C.Coworking,[d.VM.CoworkingAccount]:C.Coworking,[d.VM.Office]:C.Office,[d.VM.OfficeAccount]:C.Office,[d.VM.Lounge]:C.Lounge,[d.VM.LoungeAccount]:C.Lounge,[d.VM.Member]:C.Member,[d.VM.MemberAccount]:C.Member,[d.VM.PreferredMembership10Percent]:C.PreferredMembership,[d.VM.PreferredMembership15Percent]:C.PreferredMembership,[d.VM.EnterpriseMembership]:C.EnterpriseMembership,[d.VM.MemberOfNetwork]:C.MemberOfNetwork};var y=function(o){return o.GLOBAL="GLOBAL",o.LIMITED="LIMITED",o}(y||{})},99832:(lt,O,e)=>{e.d(O,{G:()=>t});
1var t=function(n){return n.NotSet="0",n.NewSale="1000",n.Renewal="2000",n.Move="3000",n.Extension="4000",n.Expansion="5000",n.Termination="6000",n.Merge="7000",n.AwaitingTermination="8000",n}(t||{})},84598:(lt,O,e)=>{e.d(O,{U:()=>t});var t=function(n){return n.VALID="VALID",n.INVALID="INVALID",n}(t||{})},7667:(lt,O,e)=>{e.d(O,{h:()=>G});const t={pageTitle:"NO_ACCESS_CONTENT.PAGE_TITLE",pageDescription:"NO_ACCESS_CONTENT.PAGE_DESCRIPTION"},n={pageTitle:"NO_ACCESS_CONTENT.COMPLETE_ACCOUNT_PAGE_TITLE",pageDescription:"NO_ACCESS_CONTENT.COMPLETE_ACCOUNT_PAGE_DESCRIPTION",buttonOptions:{buttonTitle:"COMMON.SETUP_COMPANY_ACCOUNT",buttonLink:"/home/add-company",wrapperId:"profile_add_company_button"}};var d=e(24153),s=e(56977),_=e(62233),f=e(21413),g=e(54438),h=e(4705),C=e(59640),T=e(12262),m=e(35155),I=e(69924),y=e(68018);function o(k,R){1&k&&g.nrm(0,"iwg-breadcrumbs")}function P(k,R){if(1&k&&(g.j41(0,"span"),g.EFF(1),g.nI1(2,"translate"),g.k0s()),2&k){const J=g.XpG(3);g.R7$(),g.JRh(g.bMT(2,1,J.content.pageHeader))}}function N(k,R){1&k&&(g.j41(0,"iwg-page-header",3),g.DNE(1,o,1,0,"ng-template",null,0,g.C5r)(3,P,3,3,"ng-template",null,1,g.C5r),g.k0s())}function a(k,R){if(1&k&&(g.j41(0,"iwg-button",9),g.EFF(1),g.nI1(2,"translate"),g.k0s()),2&k){const J=R;g.Y8G("wrapperId",J.wrapperId+"__button")("routerLink",J.buttonLink),g.R7$(),g.SpI(" ",g.bMT(2,3,J.buttonTitle)," ")}}function M(k,R){if(1&k&&(g.DNE(0,N,5,0,"iwg-page-header",3),g.j41(1,"div",4)(2,"div",5)(3,"div",6),g.EFF(4),g.nI1(5,"translate"),g.k0s(),g.j41(6,"div",7)(7,"div",8),g.EFF(8),g.nI1(9,"translate"),g.k0s(),g.DNE(10,a,3,5,"iwg-button",9),g.k0s()()()),2&k){let J;const H=g.XpG();g.vxM(H.content.pageHeader?0:-1),g.R7$(),g.AVh("content-center",H.content.pageHeader),g.R7$(3),g.JRh(g.bMT(5,6,H.content.pageTitle)),g.R7$(4),g.JRh(g.bMT(9,8,H.content.pageDescription)),g.R7$(2),g.vxM((J=null==H.content?null:H.content.buttonOptions)?10:-1,J)}}let G=(()=>{class k{constructor(J,H){this.route=J,this.store=H,this.unsubscribe$=new f.B}ngOnInit(){this.store.select((0,_.FM)({permissionType:d.e.CanAccessCompleteAccount})).pipe((0,s.Q)(this.unsubscribe$)).subscribe(J=>this.shouldCompleteCompanyAccount=J),this.route.data.pipe((0,s.Q)(this.unsubscribe$)).subscribe(J=>this.routeData=J)}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}get content(){let J=t;return this.shouldCompleteCompanyAccount&&(J=n),this.routeData?.noAccessContent?{...J,...this.routeData.noAccessContent}:{...J}}static{this.\u0275fac=function(H){return new(H||k)(g.rXU(h.nX),g.rXU(C.il))}}static{this.\u0275cmp=g.VBU({type:k,selectors:[["iwg-no-access-with-button"]],decls:2,vars:1,consts:[["headerBreadcrumbs",""],["headerTitle",""],[1,"container","no-access-container",3,"content-center"],[1,"bottom-border"],[1,"container","no-access-container"],[1,"container-body"],[1,"iwg-h4-medium"],[1,"no-access-content"],[1,"iwg-body1"],["displayType","primary",1,"no-access-button",3,"wrapperId","routerLink"]],template:function(H,et){1&H&&(g.qex(0),g.DNE(1,M,11,10,"div",2),g.bVm()),2&H&&(g.R7$(),g.vxM(et.content?1:-1))},dependencies:[T.Q,h.Wk,m.m,I.y,y.D9],styles:[".no-access-container[_ngcontent-%COMP%]{display:flex;height:100%}@media (max-width: 1023.98px){.no-access-container[_ngcontent-%COMP%]{width:100%}}.content-center[_ngcontent-%COMP%]{justify-content:center}@media (max-width: 1023.98px){.content-center[_ngcontent-%COMP%]   .container-body[_ngcontent-%COMP%]{width:100%;height:100%}}.no-access-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;width:62rem}@media (max-width: 1023.98px){.no-access-content[_ngcontent-%COMP%]{justify-content:space-between;width:100%}}.no-access-button[_ngcontent-%COMP%]{align-self:flex-end;padding-top:4.8rem}@media (max-width: 1023.98px){.no-access-button[_ngcontent-%COMP%]{padding-top:2.4rem;margin-bottom:3.2rem;width:100%}}"]})}}return k})()},93826:(lt,O,e)=>{e.d(O,{X:()=>d});var t=e(7667),n=e(26592);function d(s,_,f,g){const h=g?{...g}:null;return{path:"no-access",canActivate:[n.a],component:t.h,data:{permissions:{except:_,redirectTo:s},noAccessContent:h,analyticPageName:`No access to ${f}`}}}},80262:(lt,O,e)=>{e.d(O,{e:()=>f});var t=e(54438),n=e(68018);const d=(g,h,C)=>({fromRow:g,toRow:h,totalRows:C}),s=(g,h)=>({pageNumber:g,totalPageNumber:h});function _(g,h){if(1&g){const C=t.RV6();t.j41(0,"div",0)(1,"div",1)(2,"span",2),t.EFF(3),t.nI1(4,"translate"),t.k0s(),t.j41(5,"div",3)(6,"div")(7,"button",4),t.bIt("click",function(){t.eBV(C);const m=t.XpG();return t.Njj(m.onChangePageClicked(m.activePageNumber-1))})("keydown.enter",function(){t.eBV(C);const m=t.XpG();return t.Njj(m.onChangePageClicked(m.activePageNumber-1))}),t.nrm(8,"i",5),t.k0s()(),t.j41(9,"div",6),t.EFF(10),t.nI1(11,"translate"),t.k0s(),t.j41(12,"div")(13,"button",7),t.bIt("click",function(){t.eBV(C);const m=t.XpG();return t.Njj(m.onChangePageClicked(m.activePageNumber+1))})("keydown.enter",function(){t.eBV(C);const m=t.XpG();return t.Njj(m.onChangePageClicked(m.activePageNumber+1))}),t.nrm(14,"i",5),t.k0s()()()()()}if(2&g){const C=t.XpG();t.R7$(3),t.SpI(" ",t.i5U(4,4,"GENERIC.COMPONENT.PAGINATION.PAGEMESSAGE",t.sMw(10,d,C.fromRecord,C.toRecord,C.totalRecords))," "),t.R7$(4),t.Y8G("disabled",1===C.activePageNumber),t.R7$(3),t.SpI(" ",t.i5U(11,7,"GENERIC.COMPONENT.PAGINATION.PAGEMESSAGE_MOBILE",t.l_i(14,s,C.activePageNumber,C.pages.length))," "),t.R7$(3),t.Y8G("disabled",C.activePageNumber===C.pages.length)}}let f=(()=>{class g{constructor(){this.totalRecords=0,this.pageSize=0,this.maxPages=4,this.activePageNumber=0,this.pageChange=new t.bkB,this.pages=[],this.start=0,this.end=0}set activePage(C){this.changePage(C)}get fromRecord(){return this.activePageNumber*this.pageSize-this.pageSize+1}get toRecord(){return Math.min(this.activePageNumber*this.pageSize,this.totalRecords)}ngOnChanges(C){(C.totalRecords&&C.totalRecords.previousValue!==C.totalRecords.currentValue||C.pageSize&&C.pageSize.previousValue!==C.pageSize.currentValue)&&(this.reset(),this.pageChange.emit(1))}reset(){const C=this.getPageCount();this.pages=this.getArrayOfPage(C),this.activePageNumber=1}changePage(C){return C<1?(this.activePageNumber=1,!1):C>this.pages.length?(this.activePageNumber=this.pages.length,!1):(this.activePageNumber=C,!0)}onChangePageClicked(C){this.changePage(C)&&this.pageChange.emit(this.activePageNumber)}hidePage(C){if(this.pages.length<=this.maxPages)return!1;const T=Math.floor(this.maxPages/2);for(this.start=this.activePageNumber-T,this.end=this.maxPages%2==0?this.activePageNumber+T-1:this.activePageNumber+T;this.start<=0;)this.start++,this.end++;for(;this.end>this.pages.length;)this.start--,this.end--;return C<this.start||C>this.end}getPageCount(){let C=0;if(this.totalRecords>0&&this.pageSize>0){const T=this.totalRecords/this.pageSize,m=Math.floor(T);C=m<T?m+1:m}return C}getArrayOfPage(C){const T=[];
1if(C>0)for(let m=1;m<=C;m++)T.push(m);return T}static{this.\u0275fac=function(T){return new(T||g)}}static{this.\u0275cmp=t.VBU({type:g,selectors:[["iwg-pagination"]],inputs:{totalRecords:"totalRecords",pageSize:"pageSize",maxPages:"maxPages",activePage:"activePage"},outputs:{pageChange:"pageChange"},standalone:!0,features:[t.OA$,t.aNF],decls:1,vars:1,consts:[[1,"iwg-pagination"],[1,"pagination-panel"],[1,"pagination-text","iwg-body2"],[1,"mobile-paging","iwg-body2"],["id","Pagination_Previous",1,"pager-button","button","button--secondary","previous",3,"click","keydown.enter","disabled"],["aria-hidden","true",1,"iwg-icon-chev","ag-icon-height","text--primary"],[1,"mobile-only"],["id","Pagination_Next",1,"pager-button","button","button--secondary","next",3,"click","keydown.enter","disabled"]],template:function(T,m){1&T&&t.DNE(0,_,15,17,"div",0),2&T&&t.vxM(m.pages.length>1?0:-1)},dependencies:[n.h,n.D9],styles:[".iwg-pagination[_ngcontent-%COMP%]   .pagination-panel[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end}[dir=rtl]   [_nghost-%COMP%]   .iwg-pagination[_ngcontent-%COMP%]   .pagination-panel[_ngcontent-%COMP%]{text-align:left}[dir=rtl][_ngcontent-%COMP%]   .iwg-pagination[_ngcontent-%COMP%]   .pagination-panel[_ngcontent-%COMP%]{text-align:left}[dir=rtl][_nghost-%COMP%]   .iwg-pagination[_ngcontent-%COMP%]   .pagination-panel[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .iwg-pagination[_ngcontent-%COMP%]   .pagination-panel[_ngcontent-%COMP%]{text-align:left}@media (max-width: 1023.98px){.iwg-pagination[_ngcontent-%COMP%]   .pagination-panel[_ngcontent-%COMP%]{justify-content:space-between;width:100%}}.iwg-pagination[_ngcontent-%COMP%]   .pagination-panel[_ngcontent-%COMP%]   .pagination-text[_ngcontent-%COMP%]{vertical-align:super;margin-right:2rem}@media (max-width: 1023.98px){.iwg-pagination[_ngcontent-%COMP%]   .pagination-panel[_ngcontent-%COMP%]   .pagination-text[_ngcontent-%COMP%]{display:none}}[dir=rtl]   [_nghost-%COMP%]   .iwg-pagination[_ngcontent-%COMP%]   .pagination-panel[_ngcontent-%COMP%]   .pagination-text[_ngcontent-%COMP%]{margin-right:unset;margin-left:2rem}[dir=rtl][_ngcontent-%COMP%]   .iwg-pagination[_ngcontent-%COMP%]   .pagination-panel[_ngcontent-%COMP%]   .pagination-text[_ngcontent-%COMP%]{margin-right:unset;margin-left:2rem}[dir=rtl][_nghost-%COMP%]   .iwg-pagination[_ngcontent-%COMP%]   .pagination-panel[_ngcontent-%COMP%]   .pagination-text[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .iwg-pagination[_ngcontent-%COMP%]   .pagination-panel[_ngcontent-%COMP%]   .pagination-text[_ngcontent-%COMP%]{margin-right:unset;margin-left:2rem}.iwg-pagination[_ngcontent-%COMP%]   .pagination-panel[_ngcontent-%COMP%]   .mobile-paging[_ngcontent-%COMP%]{display:flex;justify-content:inherit;align-items:center}@media (max-width: 1023.98px){.iwg-pagination[_ngcontent-%COMP%]   .pagination-panel[_ngcontent-%COMP%]   .mobile-paging[_ngcontent-%COMP%]{width:100%}}.iwg-pagination[_ngcontent-%COMP%]   .pagination-panel[_ngcontent-%COMP%]   .pager-button[_ngcontent-%COMP%]{width:4.5rem;height:4.5rem;min-width:0rem;padding:0;color:var(--color-text-accent-secondary, var(--brand-primary-600, #B6050F));border-color:var(--color-border, var(--global-neutral-300, #C3C3C3))}@media (max-width: 1023.98px){.iwg-pagination[_ngcontent-%COMP%]   .pagination-panel[_ngcontent-%COMP%]   .pager-button.previous[_ngcontent-%COMP%]{order:0}}.iwg-pagination[_ngcontent-%COMP%]   .pagination-panel[_ngcontent-%COMP%]   .pager-button.previous[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{display:inline-flex;transform:rotate(180deg)}[dir=rtl]   [_nghost-%COMP%]   .iwg-pagination[_ngcontent-%COMP%]   .pagination-panel[_ngcontent-%COMP%]   .pager-button.previous[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{transform:unset}[dir=rtl][_ngcontent-%COMP%]   .iwg-pagination[_ngcontent-%COMP%]   .pagination-panel[_ngcontent-%COMP%]   .pager-button.previous[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{transform:unset}[dir=rtl][_nghost-%COMP%]   .iwg-pagination[_ngcontent-%COMP%]   .pagination-panel[_ngcontent-%COMP%]   .pager-button.previous[_ngcontent-%COMP%]   i[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .iwg-pagination[_ngcontent-%COMP%]   .pagination-panel[_ngcontent-%COMP%]   .pager-button.previous[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{transform:unset}@media (max-width: 1023.98px){.iwg-pagination[_ngcontent-%COMP%]   .pagination-panel[_ngcontent-%COMP%]   .pager-button.next[_ngcontent-%COMP%]{order:2}}.iwg-pagination[_ngcontent-%COMP%]   .pagination-panel[_ngcontent-%COMP%]   .pager-button.next[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{display:inline-flex}[dir=rtl]   [_nghost-%COMP%]   .iwg-pagination[_ngcontent-%COMP%]   .pagination-panel[_ngcontent-%COMP%]   .pager-button.next[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{transform:rotate(180deg)}[dir=rtl][_ngcontent-%COMP%]   .iwg-pagination[_ngcontent-%COMP%]   .pagination-panel[_ngcontent-%COMP%]   .pager-button.next[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{transform:rotate(180deg)}[dir=rtl][_nghost-%COMP%]   .iwg-pagination[_ngcontent-%COMP%]   .pagination-panel[_ngcontent-%COMP%]   .pager-button.next[_ngcontent-%COMP%]   i[_ngcontent-%COMP%], [dir=rtl]   [_nghost-%COMP%]   .iwg-pagination[_ngcontent-%COMP%]   .pagination-panel[_ngcontent-%COMP%]   .pager-button.next[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{transform:rotate(180deg)}.iwg-pagination[_ngcontent-%COMP%]   .pagination-panel[_ngcontent-%COMP%]   .pager-button[_ngcontent-%COMP%]:focus-visible{border:2px solid var(--global-neutral-900, #202020)}.iwg-pagination[_ngcontent-%COMP%]   .pagination-panel[_ngcontent-%COMP%]   .pager-button[_ngcontent-%COMP%]:hover, .iwg-pagination[_ngcontent-%COMP%]   .pagination-panel[_ngcontent-%COMP%]   .pager-button[disabled][_ngcontent-%COMP%]{background:transparent}.iwg-pagination[_ngcontent-%COMP%]   .pagination-panel[_ngcontent-%COMP%]   .pager-button[disabled][_ngcontent-%COMP%]{color:var(--color-text-disabled, var(--brand-neutral-600, #6C687E))}@media (max-width: 1023.98px){.iwg-pagination[_ngcontent-%COMP%]   .pagination-panel[_ngcontent-%COMP%]   .pager-button[disabled][_ngcontent-%COMP%]{border:none;color:transparent}}"]})}}return g})()},22732:(lt,O,e)=>{e.d(O,{l:()=>n});var t=e(54438);let n=(()=>{class d{constructor(){this.radius=16,this.autoStart=!0,this.intervalStep=1e3,this.strokeColor="#878889",this.timerDone=new t.bkB}ngOnInit(){this.autoStart&&(this.currentPercentage=this.maxValue,this.interval=setInterval(()=>{this.currentPercentage--,this.currentPercentage<=0&&this.timerDone.emit()},this.intervalStep))}ngOnDestroy(){this.interval&&clearInterval(this.interval)}getViewBox(){const _=2*this.radius;return`0 0 ${_} ${_}`}drawPercentage(){return`${Math.floor(this.currentPercentage/this.maxValue*100)} 100`}static{this.\u0275fac=function(f){return new(f||d)}}static{this.\u0275cmp=t.VBU({type:d,selectors:[["iwg-pie-chart-timer"]],inputs:{autoStart:"autoStart",intervalStep:"intervalStep",currentPercentage:"currentPercentage",maxValue:"maxValue",strokeColor:"strokeColor",wrapperId:"wrapperId"},outputs:{timerDone:"timerDone"},standalone:!0,features:[t.aNF],decls:2,vars:8,consts:[[1,"pie"],[1,"pie__circle"]],template:function(f,g){1&f&&(t.qSk(),t.j41(0,"svg",0),t.nrm(1,"circle",1),t.k0s()),2&f&&(t.BMQ("id",g.wrapperId)("viewB
1ox",g.getViewBox()),t.R7$(),t.BMQ("r",g.radius)("cx",g.radius)("cy",g.radius)("stroke",g.strokeColor)("stroke-width",2*g.radius)("stroke-dasharray",g.drawPercentage()))},styles:[".pie[_ngcontent-%COMP%]{transform:rotate(90deg) scaleX(-1);border-radius:50%;width:100%;height:100%;fill:transparent}.pie__circle[_ngcontent-%COMP%]{transition:stroke-dasharray 1s linear}[_nghost-%COMP%]{display:block;width:3.5rem;height:3.5rem;position:relative}"]})}}return d})()},87862:(lt,O,e)=>{e.d(O,{t:()=>d});var t=e(68018),n=e(54438);let d=(()=>{class s extends t.D9{transform(f,g,...h){return f?f.map(C=>super.transform(C,...h)).join(g):""}static{this.\u0275fac=(()=>{let f;return function(h){return(f||(f=n.xGo(s)))(h||s)}})()}static{this.\u0275pipe=n.EJ8({name:"iwgTranslateArray",type:s,pure:!0,standalone:!0})}}return s})()},10430:(lt,O,e)=>{e.d(O,{I:()=>d});var t=e(54438),n=e(68018);let d=(()=>{class s{constructor(f){this.translate=f}transform(f,g){const h=g.defaultPhrase??f.concat(".","DEFAULT");if(!g.countryIsoCode)return h;const C=f.concat(".",g.countryIsoCode);return this.isTranslated(this.translatePhrase(C),f.split(".")[0])?C:h}translatePhrase(f){return this.translate.instant(f)}isTranslated(f,g){return f&&!f.toUpperCase().startsWith(g)}static{this.\u0275fac=function(g){return new(g||s)(t.rXU(n.c$,16))}}static{this.\u0275pipe=t.EJ8({name:"translateStateWithFallback",type:s,pure:!0,standalone:!0})}}return s})()},12720:(lt,O,e)=>{e.d(O,{l:()=>h});var t=e(23294),n=e(56977),d=e(84412),s=e(21413),_=e(2668),f=e(54438),g=e(89417);let h=(()=>{class C{set ngModel(m){this.value$.next(this.isFilterActive(m))}set value(m){this.value$.next(!this.filterId&&this.isFilterActive(m))}set filterState(m){this.value$.next(m)}get filterName(){return this.filterId||this.name||this.ngControl?.name&&String(this.ngControl?.name)||this.wrapperId}constructor(m,I){this.ngControl=m,this.filterProvider=I,this.value$=new d.t(null),this.destroy$=new s.B}ngOnInit(){this.value$.pipe((0,t.F)(),(0,n.Q)(this.destroy$)).subscribe(m=>{this.ngControl&&!this.ngControl.dirty||this.filterProvider&&(this.isFilterActive(m)?this.filterProvider.addFilterAnalytic(this.filterName):this.filterProvider.removeFilterAnalytic(this.filterName))}),this.ngControl&&(this.value$.next(this.ngControl.value),this.ngControl.valueChanges.pipe((0,n.Q)(this.destroy$)).subscribe(m=>{this.value$.next(m)}))}ngOnDestroy(){this.value$.next(null),this.destroy$.next(),this.destroy$.complete()}isFilterActive(m){return Array.isArray(m)?m.length>0:null!==m&&m}dateAndDropdownChanged(m){this.value$.next(m)}valueChanged(m){this.value$.next(m)}static{this.\u0275fac=function(I){return new(I||C)(f.rXU(g.vO,10),f.rXU(_.Y,8))}}static{this.\u0275dir=f.FsC({type:C,selectors:[["","iwgFilterAnalytic",""]],hostBindings:function(I,y){1&I&&f.bIt("ngModelChange",function(P){return y.dateAndDropdownChanged(P)})("valueChange",function(P){return y.valueChanged(P)})},inputs:{ngModel:"ngModel",value:"value",wrapperId:"wrapperId",name:"name",filterId:"filterId",filterState:[0,"iwgFilterAnalytic","filterState"]},standalone:!0})}}return C})()},4300:(lt,O,e)=>{e.d(O,{R:()=>C});var t=e(54438),n=e(42092),d=e(92874),s=e(56977),_=e(77818),f=e(68018),g=e(89417);function h(T,m){if(1&T){const I=t.RV6();t.j41(0,"iwg-radio-button",2),t.bIt("selectedValueChange",function(o){t.eBV(I);
1const P=t.XpG();return t.Njj(P.onOptionChange(o))}),t.EFF(1),t.nI1(2,"translate"),t.k0s()}if(2&T){const I=m.$implicit,y=m.$index,o=t.XpG();t.Y8G("name",o.filterName)("wrapperId",o.wrapperId+y)("value",o.getOptionValue(I))("selectedValue",o.value),t.R7$(),t.SpI(" ",t.bMT(2,5,I[o.titleKey])," ")}}let C=(()=>{class T extends n.G{constructor(I){super(),this.ngControl=I,this.filterName="iwgFilterRadioList",this.valueChange=new t.bkB,this.ngControl&&(this.ngControl.valueAccessor=this),this.valueChange.pipe((0,s.Q)(this.unsubscribe$)).subscribe(y=>this.onChange(y))}getOptionValue(I){return this.valueKey?I[this.valueKey]:I}onOptionChange(I){this.value=I,this.valueChange.emit(this.value)}writeValue(I){this.value=I,this.valueChange.emit(I)}setDisabledState(){}static{this.\u0275fac=function(y){return new(y||T)(t.rXU(g.vO,10))}}static{this.\u0275cmp=t.VBU({type:T,selectors:[["iwg-filter-radio-list"]],viewQuery:function(y,o){if(1&y&&t.GBs(d.l,5),2&y){let P;t.mGM(P=t.lsd())&&(o.radioButtonChildren=P)}},inputs:{wrapperId:"wrapperId",options:"options",value:"value",titleKey:"titleKey",idKey:"idKey",valueKey:"valueKey",filterName:"filterName"},outputs:{valueChange:"valueChange"},standalone:!0,features:[t.Vt3,t.aNF],decls:3,vars:0,consts:[[1,"filter-checkbox-list-container"],[3,"name","wrapperId","value","selectedValue"],[3,"selectedValueChange","name","wrapperId","value","selectedValue"]],template:function(y,o){1&y&&(t.j41(0,"div",0),t.Z7z(1,h,3,7,"iwg-radio-button",1,t.fX1),t.k0s()),2&y&&(t.R7$(),t.Dyx(o.options))},dependencies:[_.d,f.D9],styles:["iwg-radio-button[_ngcontent-%COMP%]{display:block;width:100%;margin-bottom:1rem;padding:var(--spacing-xs, var(--scale-400, 1.6rem)) var(--spacing-sml, var(--scale-500, 2.4rem))}"]})}}return T})()},82970:(lt,O,e)=>{e.d(O,{Z:()=>o});var t=e(2668),n=e(21413),d=e(5964),s=e(56977),_=e(85630),f=e(25068),g=e(31208),h=e(68018),C=e(54438);const T=["*"];function m(P,N){if(1&P&&(C.j41(0,"iwg-pill",5)(1,"span"),C.EFF(2),C.k0s()()),2&P){const a=C.XpG(2);C.Y8G("type",a.PillTypes.counter),C.R7$(2),C.JRh(a.selectedFiltersCount)}}function I(P,N){if(1&P&&(C.j41(0,"span",4),C.EFF(1),C.nI1(2,"translate"),C.k0s(),C.DNE(3,m,3,2,"iwg-pill",5)),2&P){const a=C.XpG();
1C.R7$(),C.JRh(C.bMT(2,2,a.title)),C.R7$(2),C.vxM(a.selectedFiltersCount>0?3:-1)}}function y(P,N){1&P&&C.SdG(0)}let o=(()=>{class P{constructor(a){this.filterProvider=a,this.accordionOpen=!1,this.selectedFiltersCount=0,this.unsubscribe$=new n.B,this.PillTypes=_.f,this.setAccordionValue()}setAccordionValue(){this.filterProvider.onSectionOpened.pipe((0,d.p)(a=>this.accordionOpen&&a!==this.wrapperId),(0,s.Q)(this.unsubscribe$)).subscribe(a=>this.accordionOpen=!1)}onOpenChange(a){this.accordionOpen=a,a&&this.filterProvider.filterSectionOpened(this.wrapperId)}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}static{this.\u0275fac=function(M){return new(M||P)(C.rXU(t.Y))}}static{this.\u0275cmp=C.VBU({type:P,selectors:[["iwg-filter-section"]],inputs:{title:"title",wrapperId:"wrapperId",selectedFiltersCount:"selectedFiltersCount"},standalone:!0,features:[C.aNF],ngContentSelectors:T,decls:6,vars:3,consts:[["acordion",""],["header",""],["content",""],[1,"filter-section",3,"openChanged","rowId","rightAccordion","open"],[1,"iwg-filter-section--title"],[3,"type"]],template:function(M,G){if(1&M){const k=C.RV6();C.NAR(),C.j41(0,"iwg-accordion",3,0),C.bIt("openChanged",function(J){return C.eBV(k),C.Njj(G.onOpenChange(J))}),C.DNE(2,I,4,4,"ng-template",null,1,C.C5r)(4,y,1,0,"ng-template",null,2,C.C5r),C.k0s()}2&M&&C.Y8G("rowId",G.wrapperId)("rightAccordion",!0)("open",G.accordionOpen)},dependencies:[f.M,g.T,h.D9],styles:['[_nghost-%COMP%]{display:block;width:100%}[_nghost-%COMP%]   .iwg-filter-section--title[_ngcontent-%COMP%]{margin:.4rem 0;font-family:var(--h5-font-family, var(--font-family-primary, "Merriweather", "Open Sans", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif));line-height:1.25;width:100%}[_nghost-%COMP%]   iwg-accordion[_ngcontent-%COMP%]{display:block}[_nghost-%COMP%]     iwg-filter-checkbox-list .filter-checkbox-list-container{padding-left:4.5rem;padding-right:4.5rem}']})}}return P})()},69431:(lt,O,e)=>{e.d(O,{b:()=>d});var t=e(54438);const n=["*"];let d=(()=>{class s{static{this.\u0275fac=function(g){return new(g||s)}}static{this.\u0275cmp=t.VBU({type:s,selectors:[["iwg-sort-filter-wrapper"]],standalone:!0,features:[t.aNF],ngContentSelectors:n,decls:1,vars:0,template:function(g,h){1&g&&(t.NAR(),t.SdG(0))},styles:["[_nghost-%COMP%]{position:relative;display:flex;min-height:3.5rem;gap:var(--scale-450, 2rem)}@media (max-width: 1023.98px){[_nghost-%COMP%]{gap:0}}[_nghost-%COMP%]    >*:last-child .iwg-picker-wrapper--mobile{border-right-width:1px}[dir=rtl]   [_nghost-%COMP%]   -shadowcsshost    >*:last-child .iwg-picker-wrapper--mobile{border-left-width:1px}[dir=rtl]   [_nghost-%COMP%]    >*:last-child .iwg-picker-wrapper--mobile{border-left-width:1px}[dir=rtl]   [_nghost-%COMP%]    >*:last-child .iwg-picker-wrapper--mobile{border-left-width:1px}[dir=rtl]   [_nghost-%COMP%]   -shadowcsshost    >*:first-child .iwg-picker-wrapper--mobile{border-right-width:1px}[dir=rtl]   [_nghost-%COMP%]    >*:first-child .iwg-picker-wrapper--mobile{border-right-width:1px}[dir=rtl]   [_nghost-%COMP%]    >*:first-child .iwg-picker-wrapper--mobile{border-right-width:1px}[_nghost-%COMP%]     iwg-picker-wrapper .iwg-picker-wrapper--mobile{border:solid 1px var(--color-border, var(--global-neutral-300, #C3C3C3));border-right-width:0}[dir=rtl]   [_nghost-%COMP%]   -shadowcsshost     iwg-picker-wrapper .iwg-picker-wrapper--mobile{border-right-width:1px;border-left-width:0px}[dir=rtl]   [_nghost-%COMP%]     iwg-picker-wrapper .iwg-picker-wrapper--mobile{border-right-width:1px;border-left-width:0px}[dir=rtl]   [_nghost-%COMP%]     iwg-picker-wrapper .iwg-picker-wrapper--mobile{border-right-width:1px;border-left-width:0px}[_nghost-%COMP%]     iwg-filter-picker:first-child:last-child{display:none}"]})}}return s})()},5404:(lt,O,e)=>{e.d(O,{d:()=>C});var t=e(54438),n=e(32266),d=e(60177);const s=["cricle"];function _(T,m){if(1&T&&(t.qSk(),t.j41(0,"svg",1)(1,"defs")(2,"clipPath"),t.nrm(3,"path"),t.k0s()(),t.nrm(4,"circle",2,0)(6,"circle",3),t.j41(7,"text",4),t.EFF(8),t.k0s(),t.j41(9,"text",5),t.EFF(10),t.k0s()()),2&T){const I=t.XpG();
1t.BMQ("viewBox",I.getViewBox()),t.R7$(2),t.BMQ("id",I.wrapperId),t.R7$(),t.BMQ("d",I.getProgressPath()),t.R7$(),t.BMQ("stroke-width",I.getStrokeWidth())("stroke-dashoffset",I.getStrokeDashOffset())("stroke-dasharray",I.getStrokeDashArray())("r",I.getCricleRadius()),t.R7$(2),t.BMQ("stroke-width",I.getStrokeWidth())("stroke-dashoffset",I.getStrokeDashOffset())("stroke-dasharray",I.getStrokeDashArray())("r",I.getCricleRadius())("clip-path",I.clipPath),t.R7$(2),t.Lme(" ",I.currentStep+1,"/",I.stepsCount," "),t.R7$(2),t.Lme(" ",I.currentStep+1,"/",I.stepsCount," ")}}const f=[0,1,2,3,4,5,6,7,8,9,10,11];let C=(()=>{class T{static{this.radius=60}static{this.cricleStrokeWidth=8}static{this.stepLag=4}constructor(I,y){this.deviceService=I,this.platformLocation=y,this.currentStep=0,this.stepsCount=0}get clipPath(){const I=this.deviceService.getDeviceInfo();return["iOS"===I.os,"Safari"===I.browser,f.some(o=>I.browser_version.startsWith(`${o}`))].every(Boolean)?`url(${this.platformLocation.href}#${this.wrapperId})`:`url(#${this.wrapperId})`}getViewBox(){const I=2*T.radius;return`0 0 ${I} ${I}`}getStrokeWidth(){return T.cricleStrokeWidth}getStrokeDashOffset(){return 2*(T.radius-T.cricleStrokeWidth)*Math.PI/4-T.stepLag/2}getStrokeDashArray(){const o=T.stepLag;return`${2*(T.radius-T.cricleStrokeWidth)*Math.PI/this.stepsCount-o} ${o}`}getCricleRadius(){return T.radius-T.cricleStrokeWidth}getProgressPath(){const I=2*Math.PI*(this.currentStep+1)/this.stepsCount-Math.PI/2,y=T.radius,o=y,N=y,a=y,M=Math.cos(I)*y+N-.01;return`M ${o} 0 A ${y} ${y}, 0, ${M<N?1:0}, 1 ${M} ${Math.sin(I)*y+a} L ${N} ${a} Z`}static{this.\u0275fac=function(y){return new(y||T)(t.rXU(n.Kg),t.rXU(d.Vw))}}static{this.\u0275cmp=t.VBU({type:T,selectors:[["iwg-stepper"]],viewQuery:function(y,o){if(1&y&&t.GBs(s,7),2&y){let P;t.mGM(P=t.lsd())&&(o.cricle=P.first)}},inputs:{currentStep:"currentStep",stepsCount:"stepsCount",wrapperId:"wrapperId"},standalone:!0,features:[t.aNF],decls:1,vars:1,consts:[["cricle",""],[1,"iwg-stepper"],["fill","transparent","cx","50%","cy","50%",1,"background"],["fill","transparent","cx","50%","cy","50%",1,"foreground"],["text-anchor","middle","x","50%","y","50%","font-size","40","alignment-baseline","middle",1,"stepper-text"],["text-anchor","middle","x","50%","y","60%","font-size","40","alignment-baseline","middle",1,"stepper-text-ie"]],template:function(y,o){1&y&&t.DNE(0,_,11,16,":svg:svg",1),2&y&&t.vxM(o.stepsCount?0:-1)},styles:[".iwg-stepper[_ngcontent-%COMP%]   .background[_ngcontent-%COMP%]{stroke:var(--color-border, var(--global-neutral-300, #C3C3C3))}.iwg-stepper[_ngcontent-%COMP%]   .foreground[_ngcontent-%COMP%]{stroke:var(--color-icon-accent, var(--color-text-accent, var(--brand-primary-500, #E30613)))}.stepper-text[_ngcontent-%COMP%]{display:block;transform:translate(0)}.stepper-text-ie[_ngcontent-%COMP%]{display:none}@-moz-document url-prefix(){.stepper-text{transform:translateY(1rem)!important}}@media screen and (-ms-high-contrast: active),(-ms-high-contrast: none){.stepper-text[_ngcontent-%COMP%]{display:none}.stepper-text-ie[_ngcontent-%COMP%]{display:block}}@supports (-ms-ime-align: auto){.stepper-text[_ngcontent-%COMP%]{transform:translateY(1rem)}}"],changeDetection:0})}}return T})()},86016:(lt,O,e)=>{e.d(O,{w:()=>g});var t=e(4705),n=e(54438);const d=["*"];let s=(()=>{class h{constructor(){this.isStaff=!1}static{this.\u0275fac=function(m){return new(m||h)}}static{this.\u0275cmp=n.VBU({type:h,selectors:[["iwg-tab-item"]],hostVars:2,hostBindings:function(m,I){2&m&&n.AVh("is-staff",I.isStaff)},inputs:{isStaff:"isStaff"},standalone:!0,features:[n.aNF],ngContentSelectors:d,decls:2,vars:0,consts:[[1,"iwg-h5-bold"]],template:function(m,I){1&m&&(n.NAR(),n.j41(0,"span",0),n.SdG(1),n.k0s())},styles:["[_nghost-%COMP%]{display:inline-block;padding:calc(1rem - 1px);border-bottom:1px solid var(--color-border, var(--global-neutral-300, #C3C3C3));cursor:pointer;outline:none}[_nghost-%COMP%]   span[_ngcontent-%COMP%]{color:var(--color-text-primary, var(--brand-neutral-900, #0A0428))}.active[_nghost-%COMP%]{padding:calc(1rem - 3px);border-bottom:3px solid var(--color-text-accent, var(--color-text-accent, var(--brand-primary-500, #E30613)));margin-bottom:.1rem}.active[_nghost-%COMP%]   span[_ngcontent-%COMP%]{color:var(--color-text-accent-secondary, var(--brand-primary-600, #B6050F))}.active.is-staff[_nghost-%COMP%]{border-bottom-color:var(--color-icon-staff-mode, var(--color-staff, #6116e2))}.active.is-staff[_nghost-%COMP%]   span[_ngcontent-%COMP%]{color:var(--color-icon-staff-mode, var(--color-staff, #6116e2))}"]})}}return h})();var _=e(68018);function f(h,C){if(1&h&&(n.j41(0,"iwg-tab-item",0),n.EFF(1),n.nI1(2,"translate"),n.k0s()),2&h){const T=C.$implicit,m=n.XpG();
1n.Y8G("routerLink",T.route)("isStaff",m.isStaff),n.R7$(),n.SpI(" ",n.bMT(2,3,T.caption)," ")}}let g=(()=>{class h{constructor(T){this.route=T,this.isStaff=!1}ngOnInit(){this.routeItems=this.route.routeConfig?.children&&this.getNestedRoutes(this.route.routeConfig.children)}getNestedRoutes(T){const m=[];for(const I of T){const y=I.data;y?.tabCaption&&m.push({caption:y.tabCaption,route:[".",I.path]})}return m}static{this.\u0275fac=function(m){return new(m||h)(n.rXU(t.nX))}}static{this.\u0275cmp=n.VBU({type:h,selectors:[["iwg-tab-bar-navigation"]],inputs:{isStaff:"isStaff"},standalone:!0,features:[n.aNF],decls:2,vars:0,consts:[["routerLinkActive","active",3,"routerLink","isStaff"]],template:function(m,I){1&m&&n.Z7z(0,f,3,5,"iwg-tab-item",0,n.fX1),2&m&&n.Dyx(I.routeItems)},dependencies:[s,t.iI,t.Wk,t.wQ,_.h,_.D9],styles:["[_nghost-%COMP%]{display:flex;align-items:center}"]})}}return h})()},83483:(lt,O,e)=>{e.d(O,{M:()=>_,r:()=>g});var t=e(59640),n=e(19724),d=e(96354),s=e(62233);function _(h,C){return!C?.length||C.some(T=>f(h,T))}function f(h,C){return C.title?.includes(h)||!!C.children?.some(T=>f(h,T))}function g(h,C){return(0,n.H)(h.get(t.il).select(s.ZW)).pipe((0,d.T)(T=>_(C,T?.config?.sitemapItems)))}},53341:(lt,O,e)=>{e.d(O,{E:()=>t,z:()=>n});const t=d=>d&&`${d[0].toLocaleUpperCase()}${d.substring(1)}`,n=d=>d&&`${d[0].toLocaleUpperCase()}${d.substring(1).toLocaleLowerCase()}`},85798:(lt,O,e)=>{e.d(O,{h:()=>n});var t=e(89417);
1class n extends t.k0{static isInvalidIban(s){return _=>{if(!_.value||["TZA","GHA"].includes(s))return null;let h=_.value.replaceAll(/\s/g,"");if(!h.match(/^[\dA-Z]+$/))return{isInvalidIban:!0};h=h.substr(4)+h.substr(0,4);let C="";for(let m=0;m<h.length;m+=1)C+=Number.parseInt(h.charAt(m),36);let T=Number.parseInt(C.substring(0,15),10)%97;for(C=C.substring(15);C;C=C.substring(13))T=Number.parseInt(T+C.substring(0,13),10)%97;return Number.isNaN(T)||1!==T?{isInvalidIban:!0}:null}}}},89103:(lt,O,e)=>{function t(n){const d=n.value;return("string"==typeof d?d:d?.centreName)?.trim()?null:{required:!0}}e.d(O,{w:()=>t})},69465:(lt,O,e)=>{e.d(O,{Y:()=>n});var t=e(56977);function n(d,s){let _;return f=>{if(f.parent){const g=f.parent.controls[d];if(_?.unsubscribe(),g)return _=g.valueChanges.pipe((0,t.Q)(s)).subscribe(()=>{f.updateValueAndValidity()}),f.value===g.value?null:{nomatch:!0}}return{nomatch:!0}}}}}]);

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.