1import{e as c,h as p,m as S}from"./chunk-ACFP23NM.js";import{a as o}from"./chunk-2QNARUL4.js";import{a as v}from"./chunk-4K55WUTD.js";import{a as D}from"./chunk-45KNH7O6.js";import{A as u,B as m,Ea as f,Ja as d}from"./chunk-JPSGLHZF.js";import{h as C}from"./chunk-DGGHC3VO.js";var h=C(D());var T=(()=>{let r=class r{constructor(e,t){this.httpService=e,this.depositMethodService=t}sortNSetExp(e){return e.map(t=>{let s=(0,h.default)("01/"+t.expiryMonth+"/"+t.expiryYear,"DD/MM/YYYY"),i=(0,h.default)(),a=s.diff(i,"days");return t.expired=a<=0,t.expiringSoon=a<=30,t.expDisplayDate=new Date(s),t}),e}getSavedCards(){return this.httpService.get("/api/cards?includeDigitalCards=true").pipe(u(e=>this.sortNSetExp(e)))}updateDefaultCard(e){return this.httpService.put("/api/cards/updateDefaultCard/"+e,{})}deleteCard(e){return this.httpService.delete("/api/cards/"+e)}updateStakeBlackCard(e){return this.httpService.put("/api/cards/updateStakeBlackCard/"+e,{})}getCardsListOptions(e){return m([this.depositMethodService.isApplePayAvailable(),this.depositMethodService.isGooglePayAvailable()]).pipe(u(([t,s])=>{let i=[],a;if(e.length>0){i.push({value:"NEW_CARD",title:"+ New Debit/Credit card"});for(let n of e)i.push({value:n.id,title:"Card ending in "+n.last4,subText:"",icons:[o[n.scheme]]})}else i.push({value:"NEW_CARD",title:"Debit/Credit card",subText:"",icons:[o[p.Mastercard],o[p.Visa]]}),a="NEW_CARD";return t&&i.push({value:c.CheckoutApplePay,title:"Apple pay",subText:"",icons:[o[p.ApplePay]]}),s&&i.push({value:c.CheckoutGooglePay,title:"Google Pay",subText:"",icons:[o[p.GooglePay]]}),{options:i,default:a??i[0].value}}))}};r.\u0275fac=function(t){return new(t||r)(d(v),d(S))},r.\u0275prov=f({token:r,factory:r.\u0275fac,providedIn:"root"});let l=r;return l})();export{T as a};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.