1"use strict";(self.webpackChunkbddc_customer_portal=self.webpackChunkbddc_customer_portal||[]).push([[802],{8802:(Dt,w,c)=>{c.r(w),c.d(w,{BillingModule:()=>kt});var D=c(6443),U=c(4620),m=c(490),p=c(7912),f=c(3840),C=c(5312),l=c(7941),h=c(4175),u=c(1134),t=c(8559),y=c(1570);function N(n,a){1&n&&t.nrm(0,"mat-spinner",5)}function $(n,a){if(1&n){const i=t.RV6();t.j41(0,"button",8),t.bIt("click",function(){t.eBV(i);const o=t.XpG();return t.Njj(o.setupDirectDebit())}),t.EFF(1," Yes, Set Up Direct Debit "),t.k0s()}}function A(n,a){if(1&n){const i=t.RV6();t.j41(0,"button",9),t.bIt("click",function(){t.eBV(i);const o=t.XpG();return t.Njj(o.noThanks())}),t.EFF(1," No, Continue with One-Time Payment "),t.k0s()}}let I=(()=>{class n{constructor(i,e,o){this.data=i,this.dialogRef=e,this.overlayContainer=o,this.loading=!1,o.getContainerElement().classList.add("direct-debit-dialog_overlay"),o.getContainerElement().classList.remove("mini-calendar-dialog_overlay")}setMobileLayout(){this.dialogRef.updateSize("343px")}setDesktopLayout(){this.dialogRef.updateSize("377px")}noThanks(){this.dialogRef.close("no_thanks")}setupDirectDebit(){this.dialogRef.close("setup_direct_debit")}ngOnDestroy(){this.overlayContainer.getContainerElement().classList.remove("direct-debit-dialog_overlay")}static{this.\u0275fac=function(e){return new(e||n)(t.rXU(l.Vh),t.rXU(l.CP),t.rXU(y.Sf))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["app-direct-debit-dialog"]],standalone:!0,features:[t.aNF],decls:12,vars:3,consts:[[1,"direct-debit-dialog"],[1,"u-flex-center","u-flex-column"],[1,"custom-title","u-flex","grow"],[1,"u-flex","mat-body-medium","override-color"],["mat-dialog-actions","",1,"u-flex-center"],["color","primary","diameter","50"],["mat-raised-button","","color","primary",1,"rounded"],["mat-raised-button","",1,"rounded","bddc-dark-blue","mat-secondary"],["mat-raised-button","","color","primary",1,"rounded",3,"click"],["mat-raised-button","",1,"rounded","bddc-dark-blue","mat-secondary",3,"click"]],template:function(e,o){1&e&&(t.j41(0,"div",0)(1,"div",1)(2,"div",2),t.EFF(3,"Make Payments Easier with Direct Debit!"),t.k0s(),t.j41(4,"p",3),t.EFF(5," Set up direct debit to enjoy automatic, hassle-free payments for your Bruce\u2019s Doggy Day Care subscription! With direct debit, your payments are handled securely, so you can focus on what matters most\u2014your pup's happiness. "),t.k0s(),t.j41(6,"p",3),t.EFF(7," Would you like to set up direct debit now? "),t.k0s()(),t.j41(8,"div",4),t.DNE(9,N,1,0,"mat-spinner",5)(10,$,2,0,"button",6)(11,A,2,0,"button",7),t.k0s()()),2&e&&(t.R7$(9),t.vxM(9,o.loading?9:-1),t.R7$(),t.vxM(10,o.loading?-1:10),t.R7$(),t.vxM(11,o.loading?-1:11))},dependencies:[l.E7,u.LG,h.$z],styles:[".direct-debit-dialog[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;width:100%;height:100%;padding-bottom:30px}.direct-debit-dialog[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{max-width:500px;text-align:center}.direct-debit-dialog[_ngcontent-%COMP%] .custom-title[_ngcontent-%COMP%]{font-family:Lato,sans-serif;color:#003a98;font-weight:700;font-size:24px;line-height:28px;text-align:center}@media (min-width: 1024px){.direct-debit-dialog[_ngcontent-%COMP%] .custom-title[_ngcontent-%COMP%]{font-size:25px;line-height:32px}}.direct-debit-dialog[_ngcontent-%COMP%] .u-flex-center[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.direct-debit-dialog[_ngcontent-%COMP%] [mat-raised-button][_ngcontent-%COMP%]{margin:10px 0;width:auto}.direct-debit-dialog[_ngcontent-%COMP%] .mat-body-medium.override-color[_ngcontent-%COMP%]{color:#667f9b;margin:10px 0 20px}.direct-debit-dialog_form[_ngcontent-%COMP%]{width:100%}.direct-debit-dialog_form[_ngcontent-%COMP%] [mat-dialog-actions][_ngcontent-%COMP%]{margin-top:30px;justify-content:center}"]})}}return n})();var L=c(4437),_=c(4456);let X=(()=>{class n{constructor(i,e,o){this.data=i,this.dialogRef=e,this.overlayContainer=o,this.headerImage="",this.title="",this.buttonText="",o.getContainerElement().classList.remove("mini-calendar-dialog_overlay"),o.getContainerElement().classList.add("notification-dialog_overlay")}ngOnInit(){"success"===this.data.type&&(this.title="Success!",this.headerImage="./../../../assets/images/backgrounds/success_header.png",this.buttonText="THANKS"),"celebration"===this.data.type&&(this.title="Congratulations!",this.headerImage="./../../../assets/images/backgrounds/celebration_header.png",this.buttonText="THANK YOU")}onNoClick(){this.dialogRef.close()}closeDialog(){this.dialogRef.close()}ngOnDestroy(){this.overlayContainer.getContainerElement().classList.remove("notification-dialog_overlay")}static{this.\u0275fac=function(e){return new(e||n)(t.rXU(l.Vh),t.rXU(l.CP),t.rXU(y.Sf))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["app-notification-dialog"]],standalone:!0,features:[t.aNF],decls:13,vars:5,consts:[[1,"notification-dialog"],[1,"notification-dialog_header"],[1,"notification-dialog-header"],[1,"notification-dialog-header_curve"],[1,"notification-dialog_title"],[1,"mat-display-small"],[1,"notification-dialog_description"],[1,"mat-body-medium"],[1,"notification-dialog_action"],["mat-raised-button","","color","primary",3,"click"]],template:function(e,o){1&e&&(t.j41(0,"div",0)(1,"div",1)(2,"header",2),t.nrm(3,"div",3),t.k0s()(),t.j41(4,"div",4)(5,"h1",5),t.EFF(6),t.k0s()(),t.j41(7,"div",6)(8,"p",7),t.EFF(9),t.k0s()(),t.j41(10,"div",8)(11,"button",9),t.bIt("click",function(){return o.closeDialog()}),t.EFF(12),t.k0s()()()),2&e&&(t.R7$(2),t.xc7("background-image","url("+o.headerImage+")"),t.R7$(4),t.JRh(o.title),t.R7$(3),t.JRh(o.data.message),t.R7$(3),t.SpI(" ",o.buttonText," "))},dependencies:[h.$z],styles:[".notification-dialog[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;height:383px;border-radius:8px;overflow:hidden}@media (min-width: 375px){.notification-dialog[_ngcontent-%COMP%]{width:100%}}
1@media (min-width: 1024px){.notification-dialog[_ngcontent-%COMP%]{width:377px;height:384px;border-radius:16px}}.notification-dialog_header[_ngcontent-%COMP%]{background-size:cover;background-repeat:no-repeat;width:100%;height:192px}.notification-dialog_header[_ngcontent-%COMP%] .notification-dialog-header[_ngcontent-%COMP%]{position:relative;background-position:center;background-repeat:no-repeat;background-size:cover;overflow:hidden;display:flex;align-items:center;justify-content:center;height:192px}.notification-dialog_header[_ngcontent-%COMP%] .notification-dialog-header_curve[_ngcontent-%COMP%]{height:50%;background-color:#fff;border-radius:50%;position:absolute;bottom:-60px;width:calc(100% + 45px);left:-22px}@media (min-width: 1024px){.notification-dialog_header[_ngcontent-%COMP%] .notification-dialog-header_curve[_ngcontent-%COMP%]{height:150px;bottom:-108px}}.notification-dialog_title[_ngcontent-%COMP%] *[_ngcontent-%COMP%], .notification-dialog_description[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{margin:0;font-family:Lato,sans-serif;color:#003a98;text-align:center}.notification-dialog_title[_ngcontent-%COMP%]{margin-bottom:15px}.notification-dialog_description[_ngcontent-%COMP%]{margin:0 30px}
1@media (min-width: 1024px){.notification-dialog_description[_ngcontent-%COMP%]{width:317px}}.notification-dialog_description[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#667f9b}.notification-dialog_action[_ngcontent-%COMP%]{margin:30px auto}"]})}}return n})();var G=c(7856);let P=(()=>{class n{constructor(i,e){this.http=i,this.baseApiService=e}getInvoices(){return this.http.get(this.baseApiService.API_URL+"/customer_object/get_invoices",{})}getInvoiceRows(i){return this.http.get(this.baseApiService.API_URL+"/customer_object/get_invoice_rows?id="+i,{})}createPaymentIntent(i){return this.http.get(this.baseApiService.API_URL+"/customer_object/create_pay_intent?invoice_id="+i,{})}sendPaymentLoad(i,e){return this.http.post(this.baseApiService.API_URL+"/customer_object/process_payment_intent",{paymentIntent:i,id:e})}downloadInvoice(i){return this.http.post(this.baseApiService.API_URL+"/customer_object/download_invoice?invoice_id="+i,{})}static{this.\u0275fac=function(e){return new(e||n)(t.KVO(D.Qq),t.KVO(G.v))}}static{this.\u0275prov=t.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var M=c(436);function V(n,a){1&n&&(t.j41(0,"div",7),t.nrm(1,"mat-spinner",15),t.k0s())}function Y(n,a){1&n&&(t.j41(0,"div",7),t.nrm(1,"mat-spinner",15),t.k0s())}function K(n,a){if(1&n&&(t.j41(0,"button",16),t.EFF(1),t.k0s()),2&n){const i=t.XpG();t.R7$(),t.SpI(" CHECKOUT \xa3",i.total," ")}}let v=(()=>{class n{constructor(i,e,o,s,d,r,g,b,k){this.data=i,this.router=e,this.dialog=o,this.dialogRef=s,this.billingService=d,this.overlayContainer=r,this.breakpointObserver=g,this.matIconRegistry=b,this.domSanitizer=k,this.stripePublicKey="",this.hasData=!1,this.loading=!1,this.stripePresence="",r.getContainerElement().classList.remove("mini-calendar-dialog_overlay"),r.getContainerElement().classList.add("stripe-dialog_overlay"),this.matIconRegistry.addSvgIcon("close_icon",this.domSanitizer.bypassSecurityTrustResourceUrl(C.c.base+"assets/images/icons/close_icon.svg")),this.matIconRegistry.addSvgIcon("lock_icon",this.domSanitizer.bypassSecurityTrustResourceUrl(C.c.base+"assets/images/icons/lock_icon.svg"))}ngOnInit(){this.total=this.data.invoiceTotal,this.breakpointObserver.observe([p.Rp.Handset,p.Rp.Tablet]).subscribe(i=>{i.matches?this.setMobileLayout():this.setDesktopLayout()}),this.loadStripe(),this.form=new _.J3({stripeInfo:new _.hs("")})}loadStripe(){if(this.hasData=!1,""!==this.data.stripePublicKey){this.hasData=!0;const i=Stripe(this.data.stripePublicKey),o=i.elements().create("card");o.mount("#card-element"),o.addEventListener("change",d=>{document.getElementById("card-errors").textContent=d.error?d.error.message:""}),document.getElementById("payment-form").addEventListener("submit",d=>{this.loading=!0,d.preventDefault(),i.confirmCardPayment(this.data.intentSecret,{payment_method:{card:o}}).then(r=>{void 0!==r.paymentIntent?r.paymentIntent.error?(this.dialog.open(L.y,{data:{heading:"Failed",body:"Error creating payment",type:"danger"}}),document.getElementById("card-errors").textContent=r.error.message,this.loading=!1):this.billingService.sendPaymentLoad(r.paymentIntent,this.data.invoiceId).subscribe(g=>{g&&(this.loading=!1,this.dialog.open(X,{data:{message:"You payment has been successfully processed.",type:"success"}}),this.dialogRef.close({event:"close",data:g.stripe_api_key_presence}),this.router.navigate(["billing"]))},g=>{console.error("PAYMENT NOT SENT TO SERVER",g)}):this.loading=!1})})}}setMobileLayout(){this.dialogRef.updateSize("90vw","auto")}setDesktopLayout(){this.dialogRef.updateSize("500px","auto")}onNoClick(){this.dialogRef.close()}closeDialog(){this.dialogRef.close({event:"close"})}ngOnDestroy(){this.overlayContainer.getContainerElement().classList.remove("stripe-dialog_overlay")}static{this.\u0275fac=function(e){return new(e||n)(t.rXU(l.Vh),t.rXU(m.Ix),t.rXU(l.bZ),t.rXU(l.CP),t.rXU(P),t.rXU(y.Sf),t.rXU(p.QP),t.rXU(f.tp),t.rXU(M.up))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["app-stripe-dialog"]],standalone:!0,features:[t.aNF],decls:19,vars:2,consts:[[1,"stripe-dialog"],[1,"stripe-dialog__header"],["mat-dialog-title","",1,"stripe-dialog__title"],["mat-icon-button","","aria-label","Close dialog",1,"stripe-dialog__close-btn",3,"click"],["svgIcon","close_icon"],[1,"stripe-dialog__content"],[1,"stripe-dialog__subtitle","mat-body-medium"],[1,"stripe-dialog__loading"],["id","payment-form",1,"stripe-dialog__form"],[1,"stripe-dialog__card-input-wrapper"],["svgIcon","lock_icon","color","primary",1,"stripe-dialog__lock-icon"],[1,"stripe-dialog__card-element-container"],["id","card-element"],["id","card-errors","role","alert",1,"stripe-dialog__errors","mat-body-medium"],["align","center",1,"stripe-dialog__actions"],["color","primary","diameter","50"],["mat-raised-button","","color","primary","type","submit","form","payment-form",1,"stripe-dialog__checkout-btn"]],template:function(e,o){1&e&&(t.j41(0,"div",0)(1,"div",1)(2,"h2",2),t.EFF(3,"Bruce's"),t.k0s(),t.j41(4,"button",3),t.bIt("click",function(){return o.closeDialog()}),t.nrm(5,"mat-icon",4),t.k0s()(),t.j41(6,"mat-dialog-content",5)(7,"p",6),t.EFF(8," Extra fees charged for card payments "),t.k0s(),t.DNE(9,V,2,0,"div",7),t.j41(10,"form",8)(11,"div",9),t.nrm(12,"mat-icon",10),t.j41(13,"div",11),t.nrm(14,"div",12),t.k0s()(),t.nrm(15,"div",13),t.k0s()(),t.j41(16,"mat-dialog-actions",14),t.DNE(17,Y,2,0,"div",7)(18,K,2,1),t.k0s()()),2&e&&(t.R7$(9),t.vxM(9,o.hasData?-1:9),t.R7$(8),t.vxM(17,o.loading?17:18))},dependencies:[f.An,u.LG,_.YN,_.qT,_.cb,_.cV,l.E7,l.BI,l.Yi,h.$z,h.iY],styles:[".stripe-dialog[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;min-height:300px;position:relative}.stripe-dialog__header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:16px 24px 0;margin-bottom:8px;position:relative}.stripe-dialog__title[_ngcontent-%COMP%]{font-family:Lato,sans-serif;color:#003a98;font-weight:700;font-size:24px;line-height:32px;margin:0;text-align:center}@media (min-width: 1024px){.stripe-dialog__title[_ngcontent-%COMP%]{font-size:28px;line-height:36px}}.stripe-dialog__close-btn[_ngcontent-%COMP%]{position:absolute;right:16px;top:8px;width:40px;height:40px;
1display:flex;align-items:center;justify-content:center}.stripe-dialog__close-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:24px;height:24px;font-size:24px}.stripe-dialog__close-btn[_ngcontent-%COMP%]:hover{background-color:#0000000a}.stripe-dialog__content[_ngcontent-%COMP%]{padding:0 24px!important;margin:0!important;overflow-y:auto;max-height:70vh}.stripe-dialog__subtitle[_ngcontent-%COMP%]{color:#667f9b;text-align:center;margin:0 0 24px;font-size:14px;line-height:20px}.stripe-dialog__loading[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;padding:20px 0;min-height:100px}.stripe-dialog__form[_ngcontent-%COMP%]{width:100%}.stripe-dialog__card-input-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:12px;margin-bottom:12px}.stripe-dialog__lock-icon[_ngcontent-%COMP%]{flex-shrink:0;width:32px;height:32px;font-size:32px}.stripe-dialog__card-element-container[_ngcontent-%COMP%]{flex:1;padding:14px 16px;background:#f3f6fa;border-radius:24px;border:2px solid #49c5b1;transition:border-color .3s ease}.stripe-dialog__card-element-container[_ngcontent-%COMP%]:focus-within{border-color:#003a98;box-shadow:0 0 0 1px #003a98}.stripe-dialog__card-element-container[_ngcontent-%COMP%] #card-element[_ngcontent-%COMP%]{font-family:Lato,sans-serif;font-size:16px;color:#003a98}.stripe-dialog__errors[_ngcontent-%COMP%]{color:#ef4136;font-size:14px;min-height:20px;padding:4px 0;text-align:center;margin:0}.stripe-dialog__actions[_ngcontent-%COMP%]{padding:16px 24px 24px!important;margin:0!important;justify-content:center!important}
1.stripe-dialog__checkout-btn[_ngcontent-%COMP%]{min-width:200px;height:48px;font-size:14px;border-radius:24px} .stripe-dialog-container .mat-mdc-dialog-container .mdc-dialog__surface{padding:0!important}"]})}}return n})();var x=c(943),S=c(3777),O=c(6975);function W(n,a){1&n&&(t.j41(0,"div",1),t.nrm(1,"mat-spinner",3),t.k0s())}function H(n,a){if(1&n&&(t.j41(0,"div",2)(1,"h2",4),t.EFF(2),t.k0s(),t.j41(3,"h1",5),t.EFF(4),t.k0s()()),2&n){const i=t.XpG();t.R7$(2),t.SpI(" ",i.accountDetails.accountBalance<0?"Account Balance":"Current balance due"," "),t.R7$(2),t.SpI(" \xa3 ",i.accountDetails?i.accountDetails.accountBalance:"0.00"," ")}}let E=(()=>{class n{constructor(i){this.accountService=i,this.hasData=!1}ngOnInit(){this.fetchAccountData()}fetchAccountData(){this.subscription=this.accountService.getAccountBalance().subscribe(i=>{this.accountDetails=i.accountDetails,this.accountDetails.accountStatus&&("balance due"===this.accountDetails.accountStatus?this.cardStatus="":"balance overdue"===this.accountDetails.accountStatus&&(this.cardStatus="warn")),this.hasData=!0})}ngOnDestroy(){this.subscription.unsubscribe()}static{this.\u0275fac=function(e){return new(e||n)(t.rXU(O.D))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["app-account-balance-billing-card"]],standalone:!0,features:[t.aNF],decls:3,vars:2,consts:[[1,"account-balance-card"],[1,"u-flex-center"],[1,"account-balance-card_content"],["color","primary","diameter","50"],[1,"mat-display-medium","u-text-heading_light-blue"],[1,"mat-display-small","mobile-change"]],template:function(e,o){1&e&&(t.j41(0,"div",0),t.DNE(1,W,2,0,"div",1)(2,H,5,2,"div",2),t.k0s()),2&e&&(t.R7$(),t.vxM(1,o.hasData?-1:1),t.R7$(),t.vxM(2,o.hasData?2:-1))},dependencies:[u.LG],styles:[".account-balance-card[_ngcontent-%COMP%]{width:338px;height:74px;background-color:#fff;box-shadow:1px 2px 20px #658fc033;border-radius:16px;display:flex;justify-content:space-between;padding:20px;transition:.5s}.account-balance-card_content[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-direction:column;text-align:center;justify-content:center;align-items:center}.account-balance-card_status[_ngcontent-%COMP%]{height:100%;background-color:#003a98;margin-right:15px}.account-balance-card_status.warn[_ngcontent-%COMP%]{background-color:#ef4236}@media (min-width: 768px){.account-balance-card_balance[_ngcontent-%COMP%]{margin-right:126px}}.mat-display-medium.bddc-light-blue[_ngcontent-%COMP%]{font-size:25px}.mat-display-small.mobile-change[_ngcontent-%COMP%]{font-size:30px;line-height:36px}@media (max-width: 1279px){.mat-display-medium.bddc-light-blue[_ngcontent-%COMP%]{font-size:25px!important}.mat-display-small.mobile-change[_ngcontent-%COMP%]{font-size:30px!important;line-height:36px!important}}@media (max-width: 840px){.account-balance-card[_ngcontent-%COMP%]{width:176px;height:55px}.mat-display-small.mobile-change[_ngcontent-%COMP%]{font-size:30px;line-height:36px}.mat-display-medium.bddc-light-blue[_ngcontent-%COMP%]{font-size:16px!important}}"]})}}return n})();var R=c(7243),j=c(6493);const J=n=>["invoice_details",n];function Z(n,a){1&n&&(t.j41(0,"div",1)(1,"div",18),t.nrm(2,"mat-spinner",19),t.k0s()())}function Q(n,a){1&n&&(t.j41(0,"div",18),t.nrm(1,"mat-spinner",19),t.k0s())}function q(n,a){1&n&&(t.j41(0,"button",31)(1,"div",18),t.nrm(2,"mat-spinner",33),t.k0s()()),2&n&&t.Y8G("disabled",!0)}function tt(n,a){if(1&n){const i=t.RV6();t.j41(0,"button",34),t.bIt("click",function(){t.eBV(i);const o=t.XpG(2).$implicit,s=t.XpG(2);return t.Njj(s.payInvoice(o.id,o.invoiceTotal))}),t.EFF(1," PAY "),t.k0s()}}function it(n,a){if(1&n&&(t.j41(0,"div"),t.DNE(1,q,3,1,"button",31)(2,tt,2,0,"button",32),t.k0s()),2&n){const i=t.XpG().$implicit,e=t.XpG(2);t.R7$(),t.vxM(1,e.loadingStripe[i.id]?1:-1),t.R7$(),t.vxM(2,e.loadingStripe[i.id]||e.hideButton||i.stripe_presence?-1:2)}}function et(n,a){1&n&&t.nrm(0,"div",28)}function nt(n,a){if(1&n){const i=t.RV6();t.j41(0,"mat-list-item",20)(1,"div",21)(2,"div",22)(3,"div",23)(4,"div",24),t.EFF(5),t.k0s(),t.j41(6,"span"),t.EFF(7),t.k0s()(),t.j41(8,"div",25)(9,"div",26),t.EFF(10),t.k0s()()(),t.j41(11,"div",27),t.DNE(12,it,3,2,"div")(13,et,1,0,"div",28),t.j41(14,"div",29),t.bIt("click",function(){t.eBV(i);const o=t.XpG(2);return t.Njj(o.googleEvent())}),t.j41(15,"span",30),t.EFF(16),t.k0s(),t.j41(17,"mat-icon",14),t.EFF(18,"chevron_right"),t.k0s()()()()()}if(2&n){const i=a.$implicit;t.R7$(5),t.SpI(" ",i.invoiceNumber," "),t.R7$(),t.AVh("state_due","Due"===i.state)("state_partial","Partially Paid"===i.state||"Payment scheduled"===i.state)("state_paid","Paid"===i.state),t.R7$(),t.SpI(" ",i.state," "),t.R7$(3),t.JRh(i.invoiceDate),t.R7$(2),t.vxM(12,i.paid||"Payment scheduled"===i.go_cardless_status?-1:12),t.R7$(),t.vxM(13,i.paid||"Payment scheduled"==i.go_cardless_status?13:-1),t.R7$(),t.Y8G("routerLink",t.eq3(13,J,i.id)),t.R7$(2),t.SpI("\xa3",i.invoiceTotal,"")}}function ot(n,a){if(1&n&&(t.DNE(0,Q,2,0,"div",18),t.Z7z(1,nt,19,15,"mat-list-item",20,t.fX1)),2&n){const i=t.XpG();t.vxM(0,i.hasData?-1:0),t.R7$(),t.Dyx(i.invoices)}}function at(n,a){if(1&n&&(t.j41(0,"div",17)(1,"p",35),t.EFF(2),t.k0s()()),2&n){const i=t.XpG();t.R7$(2),t.JRh(i.invoiceState)}}let F=(()=>{class n{constructor(i,e,o,s,d,r,g,b,k){this.accountService=i,this.dialog=e,this.router=o,this.billingService=s,this.matIconRegistry=r,this.domSanitizer=g,this.googleAnalyticsEvents=b,this.title=k,this.hasData=!1,this.invoiceState="",this.loadingStripe={},this.directDebitLink="",this.stripePublicKey="",this.invoiceTotal="",this.hideButton=!1,this.invoicePaid=!0,this.matIconRegistry.addSvgIcon("chevron_right",this.domSanitizer.bypassSecurityTrustResourceUrl(C.
1c.base+"assets/images/icons/chevron_right.svg")),d.observe([p.Rp.Handset,p.Rp.TabletPortrait]).subscribe(wt=>{this.headerImage=wt.matches?"./../../../../../assets/images/backgrounds/billing/billing_header_mobile.jpg":"./../../../../../assets/images/backgrounds/billing/billing_header_desktop.jpg"})}ngOnInit(){this.title.setTitle("Bruce's | Billing"),this.fetchInvoices()}fetchInvoices(){this.subscription=this.billingService.getInvoices().subscribe(i=>{const e=i.size;this.invoices=i.invoices,0!==e||(this.invoiceState="No invoices available"),this.hasData=!0},i=>{console.log("direct debit status fetch error: ",i)})}payInvoice(i,e){this.invoiceId=i,this.invoiceTotal=e,this.loadingStripe[i]=!0,this.loadStripe(i)}loadStripe(i){this.billingService.createPaymentIntent(i).subscribe(e=>{this.intentSecret=e.intent_secret,this.stripePublicKey=e.stripe_public_key,this.fetchAccountInfo()},e=>{console.error("DID NOT FETCH PAYMENT INTENT ",e)})}fetchAccountInfo(){this.subscription=this.accountService.getDirectDebitStatus().subscribe(i=>{const e=i.response;this.directDebitEnabled=e.enabled,this.gocardlessUrl=e.direct_debit_link,this.customerId=e.customer_id,this.directDebitLink=e.direct_debit_link,this.hasData=!0,this.directDebitEnabled?this.proceedWithStripe():this.dialog.open(I,{data:{gocardlessUrl:this.gocardlessUrl,invoiceId:this.invoiceId}}).afterClosed().subscribe(s=>{"no_thanks"===s?this.proceedWithStripe():"setup_direct_debit"===s&&(window.open(this.gocardlessUrl,"_self"),this.googleAnalyticsEvents.eventEmitter("setup","direct_debit","invoices",10)),this.loadingStripe[this.invoiceId]=!1})},i=>{console.error("GET DIRECT DEBIT STATUS ERROR! ",i)})}proceedWithStripe(){this.loadingStripe[this.invoiceId]=!1,this.dialog.open(v,{data:{intentSecret:this.intentSecret,stripePublicKey:this.stripePublicKey,invoiceTotal:this.invoiceTotal,invoiceId:this.invoiceId}}).afterClosed().subscribe(e=>{const o=e||{event:"close"};"close"===o.event?this.hideButton=!1:""!==o.data&&(this.hideButton=!0,this.invoicePaid=!0)})}ngOnDestroy(){this.subscription.unsubscribe()}navigateTo(i,e,o){this.googleEvent(),"settings"===i&&this.router.navigate(["/settings"])}googleEvent(){this.googleAnalyticsEvents.eventEmitter("invoices","invoice","billing",10)}static{this.\u0275fac=function(e){return new(e||n)(t.rXU(O.D),t.rXU(l.bZ),t.rXU(m.Ix),t.rXU(P),t.rXU(p.QP),t.rXU(f.tp),t.rXU(M.up),t.rXU(j.r),t.rXU(M.hE))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["app-billing"]],standalone:!0,features:[t.aNF],decls:24,vars:4,consts:[["extraClass","billing-page",3,"headerImage"],[1,"app-loader"],[1,"billing"],[1,"billing-content_container"],[1,"billing_title"],[1,"mat-display-small"],[1,"content-wrapper"],[1,"account-balance_container"],[1,"recent-invoices_container"],[1,"recent-invoices_title","margin-bottom-desktop-header","margin-bottom-mobile-header"],[1,"mat-display-medium","bddc-light-blue","margin-bottom-desktop-header","margin-bottom-mobile-header"],[1,"recent-invoices_action","bddc-light-blue","margin-bottom-link-desktop","margin-bottom-link-mobile"],[1,"recent-invoices_action-link"],[1,"bddc-light-blue","mat-body-medium",3,"click"],[1,"bddc-accent"],[1,"invoice-card"],["role","list"],[1,"invoice-card_blank"],[1,"u-flex-center"],["color","primary","diameter","50"],[1,"list-item-borders"],[1,"list-item-content-wrapper"],[1,"invoice-details"],[1,"invoice-card_title"],[1,"gray-blue_bold"],[1,"invoice-card_date"],[1,"gray-blue"],[1,"button-wrapper"],[1,"none-button"],[1,"invoice-card_amount","bddc-light-blue","hover-effect",3,"click","routerLink"],[1,"bddc-light-blue"],["mat-raised-button","","background-color","white",1,"compact-extended-height",3,"disabled"],["mat-raised-button","","color","primary",1,"compact-extended-height"],["color","primary","diameter","20"],["mat-raised-button","","color","primary",1,"compact-extended-height",3,"click"],[1,"mat-body-medium"]],template:function(e,o){1&e&&(t.nrm(0,"app-page-header",0),t.DNE(1,Z,3,0,"div",1),t.j41(2,"div",2)(3,"div",3)(4,"div",4)(5,"h1",5),t.EFF(6,"Billing"),t.k0s()(),t.j41(7,"div",6)(8,"div",7),t.nrm(9,"app-account-balance-billing-card"),t.k0s(),t.j41(10,"div",8)(11,"div",9)(12,"h2",10),t.EFF(13," Recent invoices "),t.k0s()(),t.j41(14,"div",11)(15,"div",12)(16,"span",13),t.bIt("click",function(){return o.navigateTo("settings","re
1cent invoices","payment settings")}),t.EFF(17,"payment settings"),t.k0s(),t.j41(18,"mat-icon",14),t.EFF(19,"chevron_right"),t.k0s()()()(),t.j41(20,"mat-card",15)(21,"mat-list",16),t.DNE(22,ot,3,1)(23,at,3,1,"div",17),t.k0s()()()()()),2&e&&(t.FS9("headerImage",o.headerImage),t.R7$(),t.vxM(1,o.hasData?-1:1),t.R7$(21),t.vxM(22,""===o.invoiceState?22:-1),t.R7$(),t.vxM(23,""!==o.invoiceState?23:-1))},dependencies:[R.y,u.LG,E,f.An,S.RN,x.jt,x.YE,h.$z,m.Wk],styles:[".billing_title[_ngcontent-%COMP%]{margin:0 0 30px;text-align:center}@media (min-width: 768px){.billing_title[_ngcontent-%COMP%]{margin:20px 0 30px;text-align:left}}.billing-content_container[_ngcontent-%COMP%]{width:100%;padding-bottom:60px}@media (min-width: 1024px){.billing-content_container[_ngcontent-%COMP%]{max-width:786px;margin:0 auto}}.billing-content_container[_ngcontent-%COMP%] .content-wrapper[_ngcontent-%COMP%]{padding:0}.billing-content_container[_ngcontent-%COMP%] .account-balance_container[_ngcontent-%COMP%]{height:114px;display:flex;flex-direction:row;justify-content:center;align-items:center;box-sizing:border-box;margin-bottom:60px}.billing-content_container[_ngcontent-%COMP%] .recent-invoices_container[_ngcontent-%COMP%]{display:flex;flex-direction:row;box-sizing:border-box}.billing-content_container[_ngcontent-%COMP%] .recent-invoices_title[_ngcontent-%COMP%]{flex:1 1 0%;box-sizing:border-box}.billing-content_container[_ngcontent-%COMP%] .recent-invoices_action[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:flex-end;justify-content:flex-end;flex:1 1 0%;box-sizing:border-box}.billing-content_container[_ngcontent-%COMP%] .recent-invoices_action-link[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;box-sizing:border-box;cursor:pointer}.billing-content_container[_ngcontent-%COMP%] .list-item-borders[_ngcontent-%COMP%]{border-bottom:1px solid #e5ecf5;height:72px}.billing-content_container[_ngcontent-%COMP%] .list-item-borders[_ngcontent-%COMP%] .list-item-content-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%}.billing-content_container[_ngcontent-%COMP%] .list-item-borders[_ngcontent-%COMP%] .invoice-details[_ngcontent-%COMP%]{flex-grow:1}.billing-content_container[_ngcontent-%COMP%] .list-item-borders[_ngcontent-%COMP%] .button-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;gap:20px}.billing-content_container[_ngcontent-%COMP%] .list-item-borders[_ngcontent-%COMP%] .button-wrapper[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:first-child{width:60px;display:flex;justify-content:center;flex-shrink:0}.billing-content_container[_ngcontent-%COMP%] .list-item-borders[_ngcontent-%COMP%] .button-wrapper[_ngcontent-%COMP%] .none-button[_ngcontent-%COMP%]{width:60px;flex-shrink:0}.billing-content_container[_ngcontent-%COMP%] .list-item-borders[_ngcontent-%COMP%] .button-wrapper[_ngcontent-%COMP%] .invoice-card_amount[_ngcontent-%COMP%]{width:120px;flex-shrink:0;justify-content:flex-end}.invoice-card_wrapper[_ngcontent-%COMP%]{flex:1 1 100%;max-width:70%;box-sizing:border-box}@media (min-width: 458px) and (max-width: 620px){.invoice-card_wrapper[_ngcontent-%COMP%]{max-width:60%}}@media (max-width: 458px){.invoice-card_wrapper[_ngcontent-%COMP%]{max-width:50%}}.invoice-card_title[_ngcontent-%COMP%]{height:20px;display:flex;flex-direction:row;box-sizing:border-box}.invoice-card_date[_ngcontent-%COMP%]{height:18px;display:flex;flex-direction:column;box-sizing:border-box}.invoice-card_date[_ngcontent-%COMP%] .gray-blue[_ngcontent-%COMP%]{flex:1 1 100%;box-sizing:border-box}.invoice-card_amount[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;box-sizing:border-box}.invoice-card_blank[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:center;align-items:center;box-sizing:border-box}.invoice-card.mat-mdc-card[_ngcontent-%COMP%]{padding:0 20px;border-radius:16px;box-shadow:1px 2px 20px #658fc033}.invoice-card.mat-mdc-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:flex;justify-content:center;margin:0;top:-5px}mat-list[_ngcontent-%COMP%]{padding:0}.bddc-light-blue[_ngcontent-%COMP%]{color:#497bb4}
1.bddc-accent[_ngcontent-%COMP%]{color:#c0d1e6}.gray-blue[_ngcontent-%COMP%]{color:#667f9b;font-size:15px;line-height:18px}.gray-blue_bold[_ngcontent-%COMP%]{padding-right:12px;color:#667f9b;font-weight:700}span.mat-body-medium[_ngcontent-%COMP%]{color:#497bb4}mat-list-item[_ngcontent-%COMP%] .mat-mdc-list-item-content[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.hover-effect[_ngcontent-%COMP%]{cursor:pointer}.hover-effect[_ngcontent-%COMP%]:focus{outline:none}span.state_paid[_ngcontent-%COMP%]{padding:2px 10px;border-radius:10px;font-size:13px;background-color:#dff6e2;color:#49c5b1}span.state_due[_ngcontent-%COMP%]{padding:2px 10px;border-radius:10px;font-size:13px;background-color:#ffdcdb;color:#ef4136}span.state_partial[_ngcontent-%COMP%]{padding:2px 10px;border-radius:10px;font-size:10px;height:-moz-fit-content;height:fit-content;background-color:#f8e4c9;color:#ff9300}@media (min-width: 1280px){span.state_partial[_ngcontent-%COMP%]{font-size:13px}}.sidenav[_ngcontent-%COMP%]{width:100%}@media (min-width: 1360px){.sidenav[_ngcontent-%COMP%]{width:200px}}.sidenav[_ngcontent-%COMP%] .mat-toolbar[_ngcontent-%COMP%]{background:inherit}.mat-mdc-toolbar.mat-primary[_ngcontent-%COMP%]{position:sticky;top:0;z-index:1}mat-sidenav-container.mat-mdc-drawer-container-has-open[_ngcontent-%COMP%]{height:100%}mat-sidenav.mat-mdc-sidenav[_ngcontent-%COMP%]{height:100%;width:100%;background-color:#003a98}main[_ngcontent-%COMP%]{padding:10px}mat-icon.mat-mdc-icon[_ngcontent-%COMP%]{color:#003a98}.mat-mdc-list-base[_ngcontent-%COMP%] .mat-mdc-list-item[_ngcontent-%COMP%] .mat-mdc-list-item-content[_ngcontent-%COMP%]{padding:0!important}.margin-bottom-desktop-header[_ngcontent-%COMP%]{margin-bottom:20px}.margin-bottom-link-desktop[_ngcontent-%COMP%]{margin-bottom:13px}@media (max-width: 840px){.billing-content_thumbnail-cards_heading[_ngcontent-%COMP%]{text-align:center}.billing-content_thumbnail-cards_container[_ngcontent-%COMP%]{width:auto;margin:0 16px}.margin-bottom-desktop-header[_ngcontent-%COMP%]{margin-bottom:0}.margin-bottom-mobile-header[_ngcontent-%COMP%]{margin-bottom:10px}.margin-bottom-link-desktop[_ngcontent-%COMP%]{margin-bottom:0}.margin-bottom-link-mobile[_ngcontent-%COMP%]{margin-bottom:10px}}"]})}}return n})();var ct=c(8222),st=c(2337),rt=c(498),T=c(1971),z=c(316),lt=c(1473);const dt=()=>({"font-size_15":!0}),gt=()=>({"font-size_16":!0}),pt=()=>({"invoice-total-style":!0});function mt(n,a){if(1&n&&(t.j41(0,"h3"),t.EFF(1),t.k0s()),2&n){const i=t.XpG(2).$implicit,e=t.XpG(2);t.R7$(),t.JRh(e.getDisplayName(i.key))}}function ht(n,a){if(1&n&&(t.j41(0,"mat-list-item",24)(1,"div",14)(2,"div",25),t.DNE(3,mt,2,1,"h3"),t.nrm(4,"div",26),t.j41(5,"div",27),t.EFF(6),t.k0s()(),t.j41(7,"div",28)(8,"span"),t.EFF(9),t.k0s()()()()),2&n){const i=a.$implicit,e=t.XpG(3);t.Y8G("ngClass",i.description.length>17?"extra-height":""),t.R7$(3),t.vxM(3,e.hasDogSpecificRows(e.invoiceDetails)?3:-1),t.R7$(),t.Y8G("innerHTML",i.description,t.npT),t.R7$(2),t.JRh(i.date),t.R7$(3),t.SpI("\xa3",i.amountExclVat,"")}}function _t(n,a){1&n&&t.Z7z(0,ht,10,5,"mat-list-item",24,t.fX1),2&n&&t.Dyx(a.$implicit.value)}function ut(n,a){if(1&n&&(t.Z7z(0,_t,2,0,null,null,t.fX1),t.nI1(2,"keyvalue"),t.j41(3,"mat-list-item",13)(4,"div",14)(5,"div",15)(6,"div",16),t.EFF(7,"VAT"),t.k0s(),t.j41(8,"div",17),t.EFF(9,"Invoice total"),t.k0s()(),t.j41(10,"div",18)(11,"span",19),t.EFF(12),t.k0s(),t.j41(13,"span"),t.EFF(14),t.k0s()()()(),t.j41(15,"mat-list-item",20)(16,"div",21)(17,"h2",22),t.EFF(18,"Amount due"),t.k0s(),t.j41(19,"h2",23),t.EFF(20),t.k0s()()()),2&n){const i=t.XpG();t.Dyx(t.bMT(2,6,i.invoiceDetails)),t.R7$(5),t.Y8G("ngClass",t.lJ4(8,dt))("ngClass.lt-md",t.lJ4(9,gt)),t.R7$(7),t.SpI("\xa3",i.invoiceVatTotal,""),t.R7$(2),t.SpI("\xa3",i.invoiceTotal,""),t.R7$(5),t.Y8G("ngClass.lt-md",t.lJ4(10,pt)),t.R7$(),t.SpI(" \xa3 ",i.invoiceOutstanding," ")}}function bt(n,a){1&n&&(t.j41(0,"div",8),t.nrm(1,"mat-spinner",29),t.k0s())}function ft(n,a){if(1&n&&(t.j41(0,"div",9)(1,"p",30),t.EFF(2),t.k0s()()),2&n){const i=t.XpG();t.R7$(2),t.JRh(i.invoiceDetailsState)}}function vt(n,a){1&n&&(t.j41(0,"button",11)(1,"div",8),t.nrm(2,"mat-spinner",31),t.k0s()()),2&n&&t.Y8G("disabled",!0)}function xt(n,a){if(1&n){const i=t.RV6();t.j41(0,"button",32),t.bIt("click",function(){t.eBV(i);const o=t.XpG();return t.Njj(o.getDownloadFile())}),t.EFF(1," DOWNLOAD "),t.k0s()}if(2&n){const i=t.XpG();t.Y8G("disabled",i.downloadLoading)}}function Ct(n,a){1&n&&(t.j41(0,"button",33)(1,"div",8),t.nrm(2,"mat-spinner",31),t.k0s()())}function yt(n,a){if(1&n){const i=t.RV6();t.j41(0,"button",35),t.bIt("click",function(){t.eBV(i);const o=t.XpG(2);return t.Njj(o.payInvoice())}),t.EFF(1," PAY INVOICE "),t.k0s()}}function Pt(n,a){if(1&n&&t.DNE(0,Ct,3,0,"button",33)(1,yt,2,0,"button",34),2&n){const i=t.XpG();t.vxM(0,i.loadingStripe?0:-1),t.R7$(),t.vxM(1,i.loadingStripe||i.hideButton?-1:1)}}let B=(()=>{class n{constructor(i,e,o,s,d,r,g){this.accountService=i,this.route=e,this.billingService=o,this.googleAnalyticsEvents=d,this.dialog=r,this.requestService=g,this.hasData=!1,this.invoiceDetailsState="",this.invoiceDate="",this.invoiceTotal="",this.invoiceVatTotal="",this.invoiceNumber="",this.invoiceOutstanding="",this.invoiceState="",this.invoicePaid=!0,this.stripePublicKey="",this.directDebit="",this.loadingStripe=!1,this.hideButton=!0,this.paymentSuccess=!1,this.downloadLoading=!1,this.payLoading=!1,this.fetchingDirectDebitLink=!1,this.directDebitLink="",this.directDebitPaymentScheduled=!1,this.appLoaderAnimation="./../../../../../../assets/images/dogloading.gif",s.observe([p.Rp.Handset,p.Rp.TabletPortrait]).subscribe(b=>{this.headerImage=b.matches?"./../../../../../../assets/images/backgrounds/billing/billing_header_mobile.jpg":"./../../../../../../assets/images/backgrounds/billing/billing_header_desktop.jpg"})}
1ngOnInit(){this.invoiceId=this.route.snapshot.paramMap.get("id"),this.fetchInvoicesRows(this.invoiceId)}getDownloadFile(){this.downloadLoading=!0,this.billingService.downloadInvoice(this.invoiceId).subscribe(i=>{const e=window.atob(i.data),o=new ArrayBuffer(e.length),s=new Uint8Array(o);for(let r=0;r<e.length;r++)s[r]=e.charCodeAt(r);const d=new Blob([s],{type:"application/pdf"});this.downloadLoading=!1,this.googleEvent(this.invoiceNumber,"download"),(0,ct.saveAs)(d,`${this.invoiceNumber}.pdf`)},i=>{console.error("DOWNLOAD INVOICE ERROR! ",i)})}loadStripe(i){this.loadingStripe=!0,this.billingService.createPaymentIntent(i).subscribe(e=>{this.intentSecret=e.intent_secret,this.stripePublicKey=e.stripe_public_key,this.hideButton=!!e.stripe_presence,this.loadingStripe=!1},e=>{console.error("DID NOT FETCH PAYMENT INTENT ",e)})}payInvoice(){this.loadingStripe=!0,this.fetchAccountInfo()}proceedWithStripe(){""===this.stripePublicKey?this.billingService.createPaymentIntent(this.invoiceId).subscribe(i=>{this.intentSecret=i.intent_secret,this.stripePublicKey=i.stripe_public_key,this.loadingStripe=!1,this.dialog.open(v,{data:{intentSecret:this.intentSecret,stripePublicKey:this.stripePublicKey,invoiceTotal:this.invoiceTotal,invoiceId:this.invoiceId},panelClass:"stripe-dialog-container",maxWidth:"90vw",autoFocus:!1}).afterClosed().subscribe(o=>{"close"===o.event?this.hideButton=!1:""!==o.data&&(this.hideButton=!0,this.invoicePaid=!0)})},i=>{console.error("DID NOT FETCH PAYMENT INTENT ",i)}):(this.loadingStripe=!1,this.dialog.open(v,{data:{intentSecret:this.intentSecret,stripePublicKey:this.stripePublicKey,invoiceTotal:this.invoiceTotal,invoiceId:this.invoiceId},panelClass:"stripe-dialog-container",maxWidth:"90vw",autoFocus:!1}).afterClosed().subscribe(e=>{const o=e||{event:"close"};"close"===o.event?this.hideButton=!1:""!==o.data&&(this.hideButton=!0,this.invoicePaid=!0)}))}fetchAccountInfo(){this.subscription=this.accountService.getDirectDebitStatus().subscribe(i=>{const e=i.response;this.directDebitEnabled=e.enabled,this.gocardlessUrl=e.direct_debit_link,this.customerId=e.customer_id,this.directDebitLink=e.direct_debit_link,this.hasData=!0,this.directDebitEnabled?this.proceedWithStripe():this.dialog.open(I,{data:{gocardlessUrl:this.gocardlessUrl,invoiceId:this.invoiceId}}).afterClosed().subscribe(s=>{"no_thanks"===s?this.proceedWithStripe():"setup_direct_debit"===s&&(window.open(this.gocardlessUrl,"_self"),this.googleEvent("direct_debit","setup")),this.loadingStripe=!1})},i=>{console.error("GET DIRECT DEBIT STATUS ERROR! ",i)})}fetchInvoicesRows(i){this.invoiceId=i,this.requestService.addRequest(new st.H("/customer_object/get_dog_specific_invoice_rows?id="+i,rt.Y.GET)),this.requestService.dispatch().subscribe(e=>{this.invoiceState=e[0].state,this.invoiceDetails=e[0].invoiceRows,this.directDebit=e[0].isDirectDebit,this.invoiceTotal=e[0].total,this.invoiceVatTotal=e[0].totalVat,this.invoiceDate=e[0].invoiceDate,this.invoiceNumber=e[0].invoiceNumber,this.invoiceOutstanding=e[0].outstanding,this.invoicePaid=e[0].invoicePaid,void 0!==this.invoiceDetails?(this.hasData=!0,this.hideButton=this.invoicePaid,this.invoicePaid||this.loadStripe(this.invoiceId)):this.invoiceDetailsState="No invoices items available","Payment scheduled"==e[0].go_cardless_status&&(this.directDebitPaymentScheduled=!0)},e=>{console.error("INVOICE ROWS FETCH ERROR! ",e)})}getDisplayName(i){return"misc"!==i?i:"Miscellaneous"}hasDogSpecificRows(i){return Object.keys(i).length>1}ngOnDestroy(){}googleEvent(i,e){this.googleAnalyticsEvents.eventEmitter(e,"invoice details","invoice details",10)}static{this.\u0275fac=function(e){return new(e||n)(t.rXU(O.D),t.rXU(m.nX),t.rXU(P),t.rXU(p.QP),t.rXU(j.r),t.rXU(l.bZ),t.rXU(lt.Y))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["app-invoice-details"]],standalone:!0,features:[t.aNF],decls:20,vars:16,consts:[[3,"headerImage"],[1,"invoice-details"],[1,"invoice-details_title"],[1,"mat-display-small"],[1,"mat-display-medium","bddc-light-blue","margin-bottom_20"],[1,"invoice-details-billing_container"],[1,"invoice-card","margin-bottom_30"],["role","list"],[1,"u-flex-center"],[1,"invoice-card_blank"],[1,"invoice-details-billing_footer"],["mat-raised-button","",1,"rounded","u-margin-left_10",3,"disabled"],["mat-raised-button","",1,"rounded","bddc-dark-blue","margin-right_10","mat-secondary",3,"disabled"],[1,"list-item-borders","height_83","bottom-border_none"],[1,"single-row-layout"],[1,"invoice-details-billing_content-column",3,"ngClass","ngClass.lt-md"],[1,"bddc-light-blue_bold","vat"],[1,"bddc-light-blue_bold","font-size_15"],[1,"invoice-details-billing_content-column","content-right","bddc-light-blue_bold"],[1,"margin-bottom_11"],[1,"list-item-borders","height_72","amount-due-style_left","amount-due-style_right","amount-due-style_background-color","bottom-border_none"],[1,"invoice-details-billing_content"],[1,"mat-display-medium"],[1,"mat-display-medium",3,"ngClass.lt-md"],[1,"list-item-borders","height_72","margin-left_20","margin-right_20",3,"ngClass"],[1,"invoice-details-billing_content-column-description"],[1,"gray-blue_bold",3,"innerHTML"],[1,"gray-blue","height_18"],[1,"bddc-light-blue_bold"],["color","primary","diameter","50"],[1,"mat-body-medium"],["color","primary","diameter","30"],["mat-raised-button","",1,"rounded","bddc-dark-blue","margin-right_10","mat-secondary",3,"click","disabled"],["mat-raised-button","",1,"rounded","u-margin-left_10"],["mat-raised-button","","color","primary",1,"rounded","u-margin-left_10"],["mat-raised-button","","color","primary",1,"rounded","u-margin-left_10",3,"click"]],template:function(e,o){1&e&&(t.nrm(0,"app-page-header",0),t.j41(1,"div",1)(2,"div",2)(3,"h1",3),t.EFF(4),t.k0s(),t.j41(5,"h2",4),t.EFF(6),t.k0s()(),t.j41(7,"div",2)(8,"span"),t.EFF(9),t.k0s()(),t.j41(10,"div",5)(11,"mat-card",6)(12,"mat-list",7),t.DNE(13,ut,21,11)(14,bt,2,0,"div",8)(15,ft,3,1,"div",9),t.k0s()(),t.j41(16,"div",10),t.DNE(17,vt,3,1,"button",11)(18,xt,2,1,"button",12)(19,Pt,2,2),t.k0s()()()),2&e&&(t.FS9("headerImage",o.headerImage),t.R7$(4),t.SpI("Invoice: ",o.invoiceNumber,""),t.R7$(2),t.SpI(" ",o.invoiceDate," "),t.R7$(2),t.AVh("state_due","Due"===o.invoiceState)("state_partial","Partially Paid"===o.invoiceState||"Payment scheduled"===o.invoiceState)("state_paid","Paid"===o.invoiceState),t.R7$(),t.SpI(" ",o.invoiceState," "),t.R7$(4),t.vxM(13,""===o.invoiceDetailsState&&o.hasData?13:-1),t.R7$(),t.vxM(14,o.hasData?-1:14),t.R7$(),t.vxM(15,""!==o.invoiceDetailsState?15:-1),t.R7$(2),t.vxM(17,o.downloadLoading?17:-1),t.R7$(),t.vxM(18,o.downloadLoading?-1:18),t.R7$(),t.vxM(19,o.invoicePaid||o.directDebitPaymentScheduled?-1:19))},dependencies:[R.y,S.RN,x.jt,x.YE,z.YU,T.Cc,T.PW,u.LG,h.$z,z.lG],styles:[".invoice-details[_ngcontent-%COMP%]{width:100%;margin:0 auto}@media (min-width: 1024px){.invoice-details[_ngcontent-%COMP%]{max-width:786px}}.invoice-details_title[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;margin:30px auto}@media (min-width: 1024px){.invoice-details_title[_ngcontent-%COMP%]{width:90%;flex-direction:row;justify-content:space-between;align-items:flex-start}}.invoice-details_title[_ngcontent-%COMP%] h1[_ngcontent-%COMP%], .invoice-details_title[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{text-align:center}.invoice-details[_ngcontent-%COMP%] .invoice-card_blank[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.single-row-layout[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:16px}.single-row-layout[_ngcontent-%COMP%] .bddc-light-blue_bold[_ngcontent-%COMP%]{flex-shrink:0;white-space:nowrap;text-align:right;min-width:80px}.single-row-layout[_ngcontent-%COMP%] .bddc-light-blue_bold.vat[_ngcontent-%COMP%]{text-align:left}.invoice-details-billing_container[_ngcontent-%COMP%]{margin:0 auto;width:90%}.invoice-details-billing_content[_ngcontent-%COMP%]{flex:1 1 100%;max-width:100%;box-sizing:border-box;display:flex;flex-direction:row;justify-content:space-between}.invoice-details-billing_content-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;box-sizing:border-box}.invoice-details-billing_content-row.height_30[_ngcontent-%COMP%]{justify-content:space-between}.invoice-details-billing_content-column-description[_ngcontent-%COMP%]{min-height:45px;display:flex;flex-direction:column;justify-content:space-between;box-sizing:border-box;flex:1;min-width:0}.invoice-details-billing_content-column-description[_ngcontent-%COMP%] .gray-blue_bold[_ngcontent-%COMP%]{word-wrap:break-word;word-break:break-word;white-space:normal}.invoice-details-billing_content-column[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;box-sizing:border-box;min-height:42px}.invoice-details-billing_content-column.content-right[_ngcontent-%COMP%]{align-items:flex-end}.invoice-details-billing_footer[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:center;align-items:center;box-sizing:border-box;margin-bottom:30px}@media (min-width: 1024px){.invoice-details-billing_footer[_ngcontent-%COMP%]{justify-content:flex-end;align-items:center;margin-bottom:60px}}.invoice-card.mat-mdc-card[_ngcontent-%COMP%]{padding:0;border-radius:16px;box-shadow:1px 2px 20px var(--menuBarShadowColorRGBA, rgba(101, 143, 192, .2))}mat-list-item[_ngcontent-%COMP%]{width:100%}mat-list-item[_ngcontent-%COMP%] .mat-mdc-list-item-content[_ngcontent-%COMP%], mat-list-item[_ngcontent-%COMP%] .mat-list-item-content[_ngcontent-%COMP%]{width:100%;padding:20px;box-sizing:border-box}mat-list[_ngcontent-%COMP%]{padding-bottom:0}.list-item-borders[_ngcontent-%COMP%]{border-bottom:1px solid #e5ecf5;padding-bottom:4px;padding-top:4px}.list-item-borders.extra-height[_ngcontent-%COMP%]{height:auto}.bddc-light-blue[_ngcontent-%COMP%]{color:#497bb4}.bddc-light-blue_bold[_ngcontent-%COMP%]{color:#497bb4;font-weight:700}.gray-blue[_ngcontent-%COMP%]{color:#667f9b;font-size:15px;line-height:18px}.gray-blue_bold[_ngcontent-%COMP%]{color:#667f9b;font-weight:700;padding-top:4px}.font-size_16[_ngcontent-%COMP%]{font-size:16px;line-height:20px}.font-size_15[_ngcontent-%COMP%]{font-size:15px;line-height:20px}
1span.mat-body-medium[_ngcontent-%COMP%]{color:#497bb4}mat-list-item.mat-list-item-content[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.amount-due-style_left[_ngcontent-%COMP%]{border-bottom-left-radius:16px}.amount-due-style_right[_ngcontent-%COMP%]{border-bottom-right-radius:16px}.amount-due-style_background-color[_ngcontent-%COMP%]{background-color:#d8ecfd}span.state_paid[_ngcontent-%COMP%]{display:inline-block;width:-moz-fit-content;width:fit-content;font-family:Lato,sans-serif;padding:2px 10px;border-radius:10px;font-size:13px;background-color:#dff6e2;color:#49c5b1}span.state_due[_ngcontent-%COMP%]{display:inline-block;width:-moz-fit-content;width:fit-content;font-family:Lato,sans-serif;padding:2px 10px;border-radius:10px;font-size:13px;background-color:#ffdcdb;color:#ef4136}span.state_partial[_ngcontent-%COMP%]{display:inline-block;width:-moz-fit-content;width:fit-content;font-family:Lato,sans-serif;padding:2px 10px;border-radius:10px;font-size:13px;background-color:#f8e4c9;color:#ff9300}.account-balance_container[_ngcontent-%COMP%]{height:114px}.height_30[_ngcontent-%COMP%] .mat-display-medium.invoice-total-style[_ngcontent-%COMP%]{font-size:24px!important;line-height:28px!important}.sidenav[_ngcontent-%COMP%]{width:100%}@media (min-width: 1360px){.sidenav[_ngcontent-%COMP%]{width:200px}}.sidenav[_ngcontent-%COMP%] .mat-toolbar[_ngcontent-%COMP%]{background:inherit}.mat-toolbar.mat-primary[_ngcontent-%COMP%]{position:sticky;top:0;z-index:1}mat-sidenav-container.mat-drawer-container-has-open[_ngcontent-%COMP%]{height:100%}mat-sidenav[_ngcontent-%COMP%]{height:100%;width:100%;background-color:#003a98}main[_ngcontent-%COMP%]{padding:10px}mat-icon[_ngcontent-%COMP%]{color:#003a98}.bottom-border_none[_ngcontent-%COMP%]{border-bottom:none}mat-list[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-top:0;margin-bottom:8px;color:#497bb4;font-weight:600}.u-margin-left_10[_ngcontent-%COMP%]{margin-left:10px}@media (max-width: 840px){.billing-content_thumbnail-cards_heading[_ngcontent-%COMP%]{text-align:center}.billing-content_thumbnail-cards_container[_ngcontent-%COMP%]{width:auto;margin:0 16px}.margin-bottom_20[_ngcontent-%COMP%], .margin-bottom_13[_ngcontent-%COMP%]{margin-bottom:10px}mat-list[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:16px}}"]})}}return n})();const Mt=[{path:"",component:F},{path:"invoice_details/:id",component:B}];let Ot=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275mod=t.$C({type:n})}static{this.\u0275inj=t.G2t({imports:[m.iI.forChild(Mt),m.iI]})}}return n})(),kt=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275mod=t.$C({type:n})}static{this.\u0275inj=t.G2t({providers:[{provide:D.a7,useClass:U._,multi:!0}],imports:[Ot,F,B,v,E]})}}return n})()}}]); 2//# sourceMappingURL=802.9c70c130420c7ced.js.map
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.