PageSourceSearch

https://osvhub.com/chunk-KDWIKRXT.js

js osvhub.com collected 2026-09-24 09:28:33 UTC 106,752 bytes, 1 lines download raw bytes

1import{B as ci,C as Dt,E as li,F as ft,G as pi,H as mi,I as _i,J as ui,K as Ci,c as Zt,j as Jt,n as ai,s as ri,t as si,u as te,v as di}from"./chunk-XIE7O7EE.js";import{a as ht}from"./chunk-3BFEXYNN.js";import{c as oi}from"./chunk-GCLVZ3LO.js";import{a as fi}from"./chunk-PJ3MZ74Q.js";import"./chunk-V6KWSR4I.js";import"./chunk-TR2VW3LA.js";import{a as Xt,d as ni}from"./chunk-SZ4ED4GF.js";import{$a as R,$d as mt,$e as zt,$f as xt,Aa as p,Ac as L,Ad as Ye,Be as je,Bg as Ke,Ca as K,Cc as w,Da as Q,Db as Ue,Dc as Fe,E as x,Ea as s,Eb as he,Fa as r,Fh as Je,Ga as v,Gc as ct,Gg as qt,H as Pe,Hb as Ge,Hd as D,Hg as Ct,Hi as ei,I as Me,Ic as Le,Jd as ot,K as et,Ka as M,Kc as Be,L as O,La as y,M as b,Ma as c,N as Te,Nc as Se,Ni as At,Ob as nt,Of as Kt,Pa as Et,Pb as st,Pc as Oe,Pf as Qt,Pi as ii,Qa as Ae,Qc as wt,R as g,Ra as De,S as P,Sb as dt,Ta as X,Tf as ut,U as Re,Ua as Z,V as F,Va as J,Ve as H,Vf as Rt,W as fe,Xc as kt,Ya as it,Yd as pt,Za as m,_a as f,_c as Vt,_e as Ht,_f as He,ab as vt,bb as Ne,bd as we,ca as Y,d as q,dh as bt,di as ti,ee as k,fa as o,fg as ze,ga as S,ia as xe,ib as Ie,jb as A,je as Tt,jh as Qe,kd as ke,kf as _t,kh as We,l as rt,lb as U,ld as Ve,m as St,mb as $,md as Yt,nd as $t,pb as l,pg as Wt,qa as u,qb as _,ra as be,rb as h,s as It,se as jt,sh as qe,ta as C,th as Xe,v as Lt,va as Ft,vh as Ze,w as Ut,wc as Bt,wd as lt,y as j,yc as Ot,z as Gt,ze as $e}from"./chunk-5QQHIOOS.js";import{a as W,b as Mt}from"./chunk-3YTLEYK6.js";var Ii=["listingGrid"],hi=(e,a)=>({date:e,reason:a}),Ui=e=>({value:e});function Gi(e,a){e&1&&v(0,"th",9)}function Fi(e,a){e&1&&(s(0,"th",11),m(1),l(2,"translate"),r()),e&2&&(o(),f(_(2,1,"LABEL.AMOUNT")))}function Li(e,a){if(e&1&&(s(0,"tr"),u(1,Gi,1,0,"th",9),s(2,"th"),m(3),l(4,"translate"),r(),s(5,"th",10),m(6),l(7,"translate"),r(),u(8,Fi,3,3,"th",11),r()),e&2){let t=c();o(),p(t.showIconColumn?1:-1),o(2),f(_(4,4,"LABEL.FORM")),o(3),f(_(7,6,"LABEL.DATE")),o(2),p(t.showAmountColumn?8:-1)}}function Bi(e,a){if(e&1&&(s(0,"div",15),v(1,"i",16),l(2,"date"),l(3,"translate"),v(4,"span",17),r()),e&2){let t=c(2).$implicit,i=c();o(),Et("pTooltip",h(3,5,"MESSAGE.TRANSACTION_REJECTED",$(8,hi,h(2,2,t.record.rejectionDate,"M/d/yyyy"),t.record.rejectionMessage))),o(3),C("innerHTML",i.getRejectionMessageHtml(t.record),Y)}}function Oi(e,a){if(e&1&&(s(0,"div",15),v(1,"i",18),l(2,"date"),l(3,"translate"),v(4,"span",17),r()),e&2){let t=c(2).$implicit,i=c();o(),Et("pTooltip",h(3,5,"MESSAGE.TRANSACTION_REFUNDED",$(8,hi,h(2,2,t.record.refundDate,"M/d/yyyy"),t.record.refundReason))),o(3),C("innerHTML",i.getRefundMessageHtml(t.record),Y)}}function wi(e,a){if(e&1&&(s(0,"td",9),u(1,Bi,5,11,"div",15)(2,Oi,5,11,"div",15),r()),e&2){let t=c().$implicit;o(),p(t.record.isRejected?1:-1),o(),p(t.record.isRefunded?2:-1)}}function ki(e,a){if(e&1&&(s(0,"span"),m(1),l(2,"currency"),r()),e&2){let t=c(3).$implicit;Ft("strikethrough",t.record.isRefunded||(t.record.status==null?null:t.record.status.toUpperCase())==="DECLINED"||(t.record.status==null?null:t.record.status.toUpperCase())==="SKIPPED"||t.record.isRejected),o(),f(_(2,3,t.record.amount))}}function Vi(e,a){if(e&1&&(s(0,"span"),m(1),l(2,"currency"),r()),e&2){let t=c(3).$implicit;o(),f(_(2,1,t.record.effectiveAmount))}}function Yi(e,a){if(e&1&&u(0,ki,3,5,"span",19)(1,Vi,3,3,"span"),e&2){let t=c(2).$implicit;p(t.record.effectiveAmount===0?0:-1),o(),p(t.record.effectiveAmount>0?1:-1)}}function $i(e,a){if(e&1&&(s(0,"td",14)(1,"span",13),m(2),l(3,"translate"),r(),u(4,Yi,2,2),r()),e&2){let t=c().$implicit;o(2),f(_(3,2,"LABEL.AMOUNT")),o(2),p(t.record.amount?4:-1)}}function ji(e,a){if(e&1){let t=M();s(0,"tr",12),y("click",function(){let n=g(t).$implicit,d=c();return P(d.handleRowClick(n.record.id))}),u(1,wi,3,2,"td",9),s(2,"td")(3,"span",13),m(4),l(5,"translate"),r(),m(6),r(),s(7,"td")(8,"span",13),m(9),l(10,"translate"),r(),m(11),l(12,"date"),r(),u(13,$i,5,4,"td",14),r()}if(e&2){let t=a.$implicit,i=c();Ft("refunded",t.record.isRefunded)("rejected",t.record.isRejected),Et("id",t.record.id),o(),p(i.showIconColumn?1:-1),o(3),f(_(5,11,"LABEL.FORM")),o(2),R(" ",t.record.formName," "),o(3),f(_(10,13,"LABEL.DATE")),o(2),R(" ",h(12,15,t.record.dateSubmitted,"M/d/yyyy")," "),o(2),p(i.showAmountColumn?13:-1)}}function Hi(e,a){}function zi(e,a){if(e&1&&(s(0,"span",20),m(1),l(2,"translate"),r()),e&2){let t=c(2);
1o(),f(h(2,1,"LABEL.TOTAL_WITH_VALUE",U(4,Ui,t.totalRecords)))}}function Ki(e,a){if(e&1&&u(0,zi,3,6,"span",20),e&2){let t=c();p(t.totalRecords!==void 0?0:-1)}}var ee=(()=>{class e{constructor(t){this.translate=t,this.locale="en-US",this.breakpointSvc=O(ot),this.isMobile=this.breakpointSvc.underTablet,this.cardId="userFormSubmissionsCard",this.cardTitle="LABEL.MY_FORM_SUBMISSIONS",this.zeroStateMessage="MESSAGE.NO_FORM_SUBMISSIONS",this.dataLoading=!1,this.pageLinks=lt.PAGE_LINKS_SIZE,this.pageSize=lt.PAGE_SIZE,this.gridItems=[],this.showIconColumn=!0,this.showAmountColumn=!0,this.loadData=new fe,this.rowClicked=new fe}set dataResults(t){t&&(this.gridItems=t.data.map(i=>({record:i})),this.showIconColumn=t.data.some(i=>i.isRefunded||i.isRejected),this.showAmountColumn=t.data.some(i=>i.amount),this.totalRecords=t.totalCount)}handleSearch(){this.listingTable.reset()}onLoadData(t){this.loadData.emit(t)}handleRowClick(t){this.rowClicked.emit(t)}getRejectionMessageHtml(t){return this.nl2br(this.translate.instant("MESSAGE.TRANSACTION_REJECTED",{date:he(t.rejectionDate,"M/d/yyyy",this.locale),reason:t.rejectionMessage}))}getRefundMessageHtml(t){return this.nl2br(this.translate.instant("MESSAGE.TRANSACTION_REFUNDED",{date:he(t.refundDate,"M/d/yyyy",this.locale),reason:t.refundReason}))}nl2br(t){return typeof t!="string"?t:t.replace(/(?:\r\n|\r|\n)/g,"<br />")}static{this.\u0275fac=function(i){return new(i||e)(S(L))}}static{this.\u0275cmp=b({type:e,selectors:[["app-user-form-submissions-card"]],viewQuery:function(i,n){if(i&1&&X(Ii,5),i&2){let d;
1Z(d=J())&&(n.listingTable=d.first)}},inputs:{cardId:"cardId",cardTitle:"cardTitle",zeroStateMessage:"zeroStateMessage",dataLoading:"dataLoading",dataResults:"dataResults"},outputs:{loadData:"loadData",rowClicked:"rowClicked"},standalone:!0,features:[A],decls:12,vars:16,consts:[["listingGrid",""],["styleClass","detail-card no-min-width",1,"noactionwrap",3,"id","zeroStateMessage","showZeroState"],[1,"app-card-header","name","flex","nowrap"],[1,"p-card-title"],["loadingIcon","pi pi-spin pi-spinner",3,"onLazyLoad","id","lazy","loading","pageLinks","paginator","rows","totalRecords","value","rowHover"],["pTemplate","header"],["pTemplate","body"],["pTemplate","paginatorleft"],["pTemplate","paginatorright"],[1,"icon-column"],[1,"date-column"],[1,"small-col"],[1,"cursor-pointer",3,"click","id"],[1,"p-column-title"],[1,"text-right"],[1,"flex"],["tooltipPosition","bottom",1,"app-icons","icon-font-size","icon-error","error-icon","cursor-pointer",3,"pTooltip"],[1,"p-column-title","pl-0.5",3,"innerHTML"],["tooltipPosition","bottom",1,"app-icons","icon-font-size","icon-refund","cursor-pointer",3,"pTooltip"],[3,"strikethrough"],[1,"record-count"]],template:function(i,n){if(i&1){let d=M();s(0,"app-card",1)(1,"p-header")(2,"div",2)(3,"div",3),m(4),l(5,"translate"),r()()(),s(6,"p-table",4,0),y("onLazyLoad",function(T){return g(d),P(n.onLoadData(T))}),u(8,Li,9,8,"ng-template",5)(9,ji,14,18,"ng-template",6)(10,Hi,0,0,"ng-template",7)(11,Ki,1,1,"ng-template",8),r()()}i&2&&(C("id",n.cardId)("zeroStateMessage",n.zeroStateMessage)("showZeroState",!n.dataLoading&&(!n.gridItems||!n.gridItems.length)),o(4),f(_(5,14,n.cardTitle)),o(2),Ae("id","",n.cardId,"ListingGrid"),C("lazy",!0)("loading",n.dataLoading)("pageLinks",n.pageLinks)("paginator",!0)("rows",n.pageSize)("totalRecords",n.totalRecords)("value",n.gridItems)("rowHover",!0))},dependencies:[Rt,Bt,Qt,Kt,Ot,zt,Ht,dt,st,w],encapsulation:2})}}return e})();var ne=(()=>{class e{constructor(t,i,n,d,E){this.formsSvc=t,this.notificationSvc=i,this.publicLinkSvc=n,this.publicRegistrationSvc=d,this.route=E,this.breakpointSvc=O(ot),this.destroyRef=O(F),this.dataLoading=!1,this.isMobile=this.breakpointSvc.underWideTablet,this.suspendedReRegistrations=[],this.upcomingDonorContributions=void 0}ngOnInit(){this.upcomingDonorContributions=this.route.snapshot.data.donorGifts,this.loadSuspendedReRegistrations()}loadSuspendedReRegistrations(){this.publicRegistrationSvc.getSuspendedReRegistrations().pipe(D(this.destroyRef)).subscribe({next:t=>{this.suspendedReRegistrations=t}})}loadData(t){this.dataLoading=!0;let i=1;t&&(i=t.first/lt.PAGE_SIZE+1),this.formsSvc.userGetFormSubmissions(i,lt.PAGE_SIZE).subscribe({next:n=>{this.formSubmissions=n,this.dataLoading=!1},error:n=>(this.formSubmissions=void 0,this.dataLoading=!1,this.notificationSvc.errorBanner({title:"LABEL.ERROR",message:"ERROR.RETRIEVING_FORM_SUBMISSIONS",interpolatedParams:{errorMessage:n.message}}),null)})}goToFormSubmissionDetail(t){let i=this.formSubmissions.data.find(n=>n.id===t);i?this.publicLinkSvc.navigate(this.publicLinkSvc.userFormSubmission(i.formId,t)):this.notificationSvc.toast({title:"LABEL.ERROR",message:"MESSAGE.FORM_SUBMISSION_NOT_FOUND",severity:"error"})}static{this.\u0275fac=function(i){return new(i||e)(S(fi),S(k),S(jt),S(ht),S(ct))}}static{this.\u0275cmp=b({type:e,selectors:[["app-public-profile-form-submissions-view"]],standalone:!0,features:[A],decls:3,vars:5,consts:[[1,"grid"],[1,"span",3,"buttonPosition","suspendedReRegistrations","upcomingContributions"],[3,"loadData","rowClicked","dataResults","dataLoading"]],template:function(i,n){i&1&&(s(0,"div",0),v(1,"app-suspended-gifts-alert",1),s(2,"app-user-form-submissions-card",2),y("loadData",function(E){return n.loadData(E)})("rowClicked",function(E){return n.goToFormSubmissionDetail(E)}),r()()),i&2&&(o(),C("buttonPosition",n.isMobile()?"bottom":"right")("suspendedReRegistrations",n.suspendedReRegistrations)("upcomingContributions",n.upcomingDonorContributions),o(),C("dataResults",n.formSubmissions)("dataLoading",n.dataLoading))},dependencies:[Dt,ee],encapsulation:2})}}return e})();var Qi=["editGiftSidesheet"],Wi=["upcomingContributions"],qi=["transactionsList"];function Xi(e,a){if(e&1){let t=M();v(0,"app-giving-by-fund-card",8),s(1,"app-pledges-card",9),y("pledgeDetailsUpdated",function(){g(t);let n=c(2);return P(n.onPledgeDetailsUpdated())})("pledgeStatusUpdated",function(n){g(t);let d=c(2);return P(d.onPledgeStatusUpdated(n))}),r()}if(e&2){let t=c(2);C("donorId",t.donorId),o(),C("donorId",t.donorId)("orgNumber",t.activeTenant.number)}}function Zi(e,a){if(e&1){let t=M();s(0,"div",3),v(1,"app-suspended-gifts-alert",4),u(2,Xi,2,3),s(3,"app-upcoming-contributions-card",5,0),y("editGift",function(n){g(t);let d=c();return P(d.onEditGift(n))})("pledgeStatusUpdated",function(){g(t);let n=c();
1return P(n.updatePledgesDueToGiftUpdate())}),r(),s(5,"app-transactions-list",6,1),y("pledgeAssociationChanged",function(){g(t);let n=c();return P(n.handlePledgeAssociationChanged())}),r()(),v(7,"app-edit-gift-sidesheet",7,2)}if(e&2){let t=c();o(),C("buttonPosition",t.isMobile()?"bottom":"right")("suspendedReRegistrations",t.suspendedReRegistrations)("upcomingContributions",t.upcomingDonorContributions),o(),p(t.donorId?2:-1),o(),C("caller",t.caller)("donorId",t.donorId)("orgNumber",t.activeTenant.number)("upcomingDonorGifts",t.upcomingDonorContributions),o(2),C("donorId",t.donorId)("getTransactions",t.handleGetTransactions)("orgNumber",t.activeTenant.number),o(2),C("activeTenant",t.activeTenant)("donorId",t.donorId)}}var oe=(()=>{class e{constructor(t,i,n,d,E,T,B,at){this.activePublicTenantSvc=t,this.destroyRef=i,this.profileSvc=n,this.publicFundsSvc=d,this.publicRegistrationSvc=E,this.route=T,this.transactionSvc=B,this.publicProfileGiftsViewSvc=at,this.breakpointSvc=O(ot),this.injector=O(Re),this.caller=lt.PARENT_TYPE.ACCOUNT,this.donorId=null,this.isMobile=this.breakpointSvc.underWideTablet,this.suspendedReRegistrations=[],this.upcomingDonorContributions=[],this.hasAttemptedToFindDonorId=!1}ngOnInit(){this.upcomingDonorContributions=this.route.snapshot.data.donorGifts??[],this.loadSuspendedReRegistrations(),St([this.activePublicTenantSvc.activeTenant,this.profileSvc.activeUser$]).pipe(It(([t,i])=>!!t&&!!i),x(([t,i])=>{let n=this.donorId;this.activeTenant=t,this.user=i;let E=(this.user?.memberships||[]).find(T=>T.number===t.number&&T.isDonor);this.donorId=E?.id??null,!this.donorId&&!this.hasAttemptedToFindDonorId&&(this.hasAttemptedToFindDonorId=!0,this.profileSvc.loadProfile(!1).then(T=>{let at=(T?.memberships||[]).find(Pt=>Pt.number===t.number&&Pt.isDonor);this.donorId=at?.id??null}).catch(()=>{})),!n&&this.donorId&&be(()=>{this.transactionsList?.reloadTransactions(),this.upcomingContributions?.reloadContributions()},{injector:this.injector})}),D(this.destroyRef)).subscribe()}onEditGift(t){this.publicFundsSvc.getPublicFund(t.fundId).subscribe({next:i=>{this.editGiftSidesheet?.editGift(t,i.fundAllowedGiftFrequencies,i.associatedOrganizationSelection)}})}handleGetTransactions(t,i,n,d){return this.transactionSvc.getTransactionsForUser(t,n,d)}handlePledgeAssociationChanged(){this.reloadPublicPledges()}onPledgeStatusUpdated(t){this.upcomingContributions?.reloadContributions(),this.transactionsList?.reloadTransactions()}onPledgeDetailsUpdated(){this.upcomingContributions?.reloadContributions(),this.transactionsList?.reloadTransactions()}updatePledgesDueToGiftUpdate(){this.reloadPublicPledges()}reloadPublicPledges(){this.donorId&&this.publicProfileGiftsViewSvc.getPledges({donorId:this.donorId,directoryId:"",donorQuery:{onlyPledgesVisibleToDonor:!0}}).pipe(D(this.destroyRef)).subscribe()}loadSuspendedReRegistrations(){this.publicRegistrationSvc.getSuspendedReRegistrations().pipe(D(this.destroyRef)).subscribe({next:t=>{this.suspendedReRegistrations=t}})}static{this.\u0275fac=function(i){return new(i||e)(S(pt),S(F),S(Tt),S(Jt),S(ht),S(ct),S(si),S(ri))}}static{this.\u0275cmp=b({type:e,selectors:[["app-public-profile-gifts-view"]],viewQuery:function(i,n){if(i&1&&(X(Qi,5),X(Wi,5),X(qi,5)),i&2){let d;
1Z(d=J())&&(n.editGiftSidesheet=d.first),Z(d=J())&&(n.upcomingContributions=d.first),Z(d=J())&&(n.transactionsList=d.first)}},standalone:!0,features:[A],decls:2,vars:1,consts:[["upcomingContributions",""],["transactionsList",""],["editGiftSidesheet",""],[1,"grid","column"],[1,"span",3,"buttonPosition","suspendedReRegistrations","upcomingContributions"],[1,"span",3,"editGift","pledgeStatusUpdated","caller","donorId","orgNumber","upcomingDonorGifts"],[1,"span",3,"pledgeAssociationChanged","donorId","getTransactions","orgNumber"],[3,"activeTenant","donorId"],[1,"centered",3,"donorId"],[1,"span",3,"pledgeDetailsUpdated","pledgeStatusUpdated","donorId","orgNumber"]],template:function(i,n){i&1&&(v(0,"app-header-image"),u(1,Zi,9,13)),i&2&&(o(),p(n.user&&n.activeTenant?1:-1))},dependencies:[Xt,Dt,li,pi,_i,mi,ci],styles:[".grid.column[_ngcontent-%COMP%]{margin:0 auto;max-width:58.5rem}@supports (container-type: inline-size){@container content-container (min-width: 960px){.grid.column[_ngcontent-%COMP%]{grid-template-columns:repeat(4,1fr)}}}@supports not (container: content-container){@media (min-width: 960px){.grid.column[_ngcontent-%COMP%]{grid-template-columns:repeat(4,1fr)}}}@supports (container-type: inline-size){@container content-container (min-width: 960px){.grid.column[_ngcontent-%COMP%]   .centered[_ngcontent-%COMP%]{grid-column:2/span 2}}}@supports not (container: content-container){@media (min-width: 960px){.grid.column[_ngcontent-%COMP%]   .centered[_ngcontent-%COMP%]{grid-column:2/span 2}}}@supports (container-type: inline-size){@container content-container (min-width: 960px){.grid[_ngcontent-%COMP%]   .span[_ngcontent-%COMP%]{grid-column-end:span 4}}}@supports not (container: content-container){@media (min-width: 960px){.grid[_ngcontent-%COMP%]   .span[_ngcontent-%COMP%]{grid-column-end:span 4}}}"]})}}return e})();function Ji(e,a){e&1&&(s(0,"tr")(1,"th"),m(2),l(3,"translate"),r(),v(4,"th"),r()),e&2&&(o(2),f(_(3,1,"LABEL.ALL_AVAILABLE_STATEMENTS")))}function tn(e,a){if(e&1){let t=M();s(0,"button",11),l(1,"translate"),y("click",function(){g(t);let n=c().$implicit,d=c(2);return P(d.downloadTaxReport(n))}),s(2,"span",12),m(3,"download"),r()()}e&2&&Et("pTooltip",_(1,1,"LABEL.DOWNLOAD"))}function en(e,a){if(e&1){let t=M();s(0,"button",13),l(1,"translate"),y("click",function(){g(t);let n=c().$implicit,d=c(2);return P(d.downloadTaxReport(n))}),r()}e&2&&Et("label",_(1,1,"LABEL.DOWNLOAD"))}function nn(e,a){if(e&1&&(s(0,"tr",7)(1,"td"),m(2),l(3,"translate"),r(),s(4,"td",8),u(5,tn,4,3,"button",9)(6,en,2,3,"button",10),r()()),e&2){let t=a.$implicit,i=c(2);De("id","current_statements_",t.organizationId,"_",t.dateRangeType,""),o(2),Ne("",t.yearDisplay," ",t.organizationName," ",_(3,7,"LABEL.TAX_STATEMENT"),""),o(3),p(i.hasTouchPointer()?6:5)}}function on(e,a){if(e&1&&(s(0,"div",3)(1,"p-table",4),u(2,Ji,5,3,"ng-template",5)(3,nn,7,9,"ng-template",6),r()()),e&2){let t=c();o(),C("loading",t.isLoading)("value",t.currentStatements)}}var ae=(()=>{class e{constructor(t,i,n){this.profileSvc=t,this.notify=i,this.telerikReportingService=n,this.breakpointSvc=O(ot),this.translate=O(L),this.hasTouchPointer=this.breakpointSvc.hasTouchPointer,this.isLoading=!1,this.yearRangeSpan=7}ngOnInit(){this.profileSvc.activeUser$.subscribe(t=>{if(!t)return;this.currentStatements=[];let i=t.memberships.filter(d=>d.isDonor).sort((d,E)=>this.compareOrgsByName(d,E)).map(d=>d),n=new Date().getFullYear();for(let d=0;d<this.yearRangeSpan;d++){let E=(n-d).toString();for(let T=0;T<i.length;++T){let B=i[T],at={organizationId:B.id,organizationName:B.name,organizationNumber:B.number,dateRangeType:E,yearDisplay:d===0?this.translate.instant("LABEL.CURRENT_YEAR"):E,startDate:mt.fromFormat("01/01/"+E,"MM/dd/yyyy").toFormat("MM/dd/yyyy"),endDate:mt.fromFormat("12/31/"+E,"MM/dd/yyyy").toFormat("MM/dd/yyyy")};this.currentStatements.push(at)}}})}compareOrgsByName(t,i){let n=t.name.toUpperCase(),d=i.name.toUpperCase();return n<d?-1:n>d?1:0}downloadTaxReport(t){this.isLoading=!0,this.telerikReportingService.getTaxReportForDonor(t).subscribe({next:i=>{i&&(Ke(i.content,i.fileName),this.notify.toast({title:"LABEL.REPORT_GENERATED",message:"MESSAGE.TAX_STATEMENT_GENERATED_SUCCESS"})),this.isLoading=!1},error:()=>{this.isLoading=!1,this.notify.errorBanner({title:"LABEL.ERROR",message:"ERROR.CREATING_TAX_STATEMENT"})}})}static{this.\u0275fac=function(i){return new(i||e)(S(Tt),S(k),S(oi))}}static{this.\u0275cmp=b({type:e,selectors:[["app-user-tax-statements"]],standalone:!0,features:[A],decls:7,vars:7,consts:[["id","user_tax_statements","rememberCollapsedState","public.user.profile.userTaxStatements","zeroStateMessage","MESSAGE.NO_AVAILABLE_STATEMENTS",3,"collapsible","collapsed","showZeroState"],[1,"app-card-header","flex","justify-content-space-between","spaced"],[1,"p-card-title"],[1,"flex","flex-full-width","flex-row-wrap"],[1,"w-full","p-datatable",3,"loading","value"],["pTemplate","header"],["pTemplate","body"],[3,"id"],[1,"text-right"],["pButton","","tooltipPosition","bottom",1,"p-button-rounded","p-button-text","p-button-icon-only","p-button-plain","p-button-sm",3,"pTooltip"],["pButton","",1,"p-button-outlined","mobile-btn",3,"label"],["pButton","","tooltipPosition","bottom",1,"p-button-rounded","p-button-text","p-button-icon-only","p-button-plain","p-button-sm",3,"click","pTooltip"],[1,"material-symbols-outlined"],["pButton","",1,"p-button-outlined","mobile-btn",3,"click","label"]],template:function(i,n){i&1&&(s(0,"app-card",0)(1,"p-header")(2,"div",1)(3,"div",2),m(4),l(5,"translate"),r()()(),u(6,on,4,2,"div",3),r()),i&2&&(C("collapsible",!0)("collapsed",!0)("showZeroState",n.currentStatements.length<=0),o(4),f(_(5,5,"LABEL.TAX_STATEMENTS")),o(2),p(n.currentStatements.length>0?6:-1))},dependencies:[Rt,Bt,Qt,Kt,Ot,H,zt,Ht,w],encapsulation:2})}}return e})();var re=(()=>{class e{constructor(t,i,n){this.activePublicTenantSvc=t,this.publicRegistrationSvc=i,this.route=n,this.breakpointSvc=O(ot),this.destroyRef=O(F),this.isMobile=this.breakpointSvc.underWideTablet,this.suspendedReRegistrations=[],this.upcomingDonorContributions=void 0}ngOnInit(){this.activePublicTenantSvc.activeTenant.pipe(D(this.destroyRef)).subscribe(t=>{this.activeTenant=t}
1),this.upcomingDonorContributions=this.route.snapshot.data.donorGifts,this.loadSuspendedReRegistrations()}loadSuspendedReRegistrations(){this.publicRegistrationSvc.getSuspendedReRegistrations().pipe(D(this.destroyRef)).subscribe({next:t=>{this.suspendedReRegistrations=t}})}static{this.\u0275fac=function(i){return new(i||e)(S(pt),S(ht),S(ct))}}static{this.\u0275cmp=b({type:e,selectors:[["ng-component"]],standalone:!0,features:[A],decls:7,vars:3,consts:[[1,"grid","public-profile"],[3,"buttonPosition","suspendedReRegistrations","upcomingContributions"],["styleClass","font-normal","accountType","Donor"]],template:function(i,n){i&1&&(v(0,"app-header-image"),s(1,"div",0),v(2,"app-suspended-gifts-alert",1)(3,"app-user-profile")(4,"app-email-preferences",2)(5,"app-user-tax-statements")(6,"app-wallet"),r()),i&2&&(o(2),C("buttonPosition",n.isMobile()?"bottom":"right")("suspendedReRegistrations",n.suspendedReRegistrations)("upcomingContributions",n.upcomingDonorContributions))},dependencies:[Xt,Dt,ei,ti,ae,ui],styles:[".public-profile[_ngcontent-%COMP%]{max-width:58.5rem;margin:0 auto;padding:0 1rem}"]})}}return e})();var N=function(e){return e.IsLoading="isLoading",e.IsLoadError="isLoadError",e.IsComplete="isComplete",e}(N||{}),I=function(e){return e.ActivePaymentMethods="activePaymentMethods",e.ReactivateGifts="reactivateGifts",e.SuspendedReRegistrations="suspendedReRegistrations",e.UpcomingContributions="upcomingContributions",e}(I||{});var G=function(e){return e.Summary="summary",e.PaymentMethodSelection="payment-method-selection",e.AddPaymentMethod="add-payment-method",e.ReactivatePaymentMethod="reactivate-payment-method",e.GiftsEdit="gifts-edit",e.GiftsConfirmation="gifts-confirmation",e}(G||{});var V=(()=>{class e{constructor(t,i,n,d,E,T,B,at,Pt){this.contributionPublicSvc=t,this.giftSvc=i,this.location=n,this.notifySvc=d,this.publicLinkSvc=E,this.publicRegistrationSvc=T,this.router=B,this.translate=at,this.userPaymentMethodSvc=Pt,this.tomorrowsDate=mt.local().startOf("day").plus({days:1}).toJSDate(),this._reRegistrationProcessDates=new Map,this.activePaymentMethods=new q([]),this.currentPaymentMethod=new q(null),this.loadStatus=new q(this.initializeLoadStatus()),this.reactivateProcessInfo=new q({isCurrentPaymentMethodActive:!1,step:G.Summary,title:""}),this.suspendedGiftsNotResumed=new q([]),this.suspendedReRegistrations=new q([]),this.suspendedReRegistrationsNotResumed=new q([]),this.updatedPaymentMethod=new q(null),this.userInfo=new q(null),this.userUpcomingContributions=new q([]),this.activePaymentMethods$=this.activePaymentMethods.asObservable(),this.currentPaymentMethod$=this.currentPaymentMethod.asObservable(),this.loadStatus$=this.loadStatus.asObservable(),this.reactivateProcessInfo$=this.reactivateProcessInfo.asObservable(),this.suspendedGiftsNotResumed$=this.suspendedGiftsNotResumed.asObservable(),this.suspendedReRegistrations$=this.suspendedReRegistrations.asObservable(),this.suspendedReRegistrationsNotResumed$=this.suspendedReRegistrationsNotResumed.asObservable(),this.updatedPaymentMethod$=this.updatedPaymentMethod.asObservable(),this.userInfo$=this.userInfo.asObservable(),this.userUpcomingContributions$=this.userUpcomingContributions.asObservable(),this.userReactivateDetails$=St([this.currentPaymentMethod$,this.updatedPaymentMethod$,this.userUpcomingContributions$,this.userInfo$,this.suspendedGiftsNotResumed$,this.suspendedReRegistrations$,this.suspendedReRegistrationsNotResumed$]).pipe(rt(([gi,Pi,Mi,Ti,Ri,xi,bi])=>({currentPaymentMethod:gi,updatedPaymentMethod:Pi,upcomingContributions:Mi,userInfo:Ti,suspendedGiftsNotResumed:Ri,suspendedReRegistrations:xi,suspendedReRegistrationsNotResumed:bi}))),this.setTitle()}get tenantId(){return this.publicLinkSvc.getCurrentTenantId()}getActivePaymentMethods(){return this.setLoadStatus(I.ActivePaymentMethods,N.IsLoading,!0),this.userPaymentMethodSvc.getAllPaymentMethods().subscribe({next:t=>{this.setLoadStatus(I.ActivePaymentMethods,N.IsComplete,!0),this.setLoadStatus(I.ActivePaymentMethods,N.IsLoading,!1);let n=t.filter(d=>d.statusText==="Active"&&!d.isRejected&&!d.isSuspended&&!this.isPaymentMethodExpired(d));this.activePaymentMethods.next(n)},error:()=>{this.notifySvc.toast({title:"LABEL.ERROR",message:"FINANCE.ERRORS.GETTING_CONTRIBUTION_METHODS",severity:"error"}),this.setLoadStatus(I.ActivePaymentMethods,N.IsLoadError,!0),this.setLoadStatus(I.ActivePaymentMethods,N.IsLoading,!1)}})}getPaymentTypeMapping(t){return He[t]??null}getTomorrowsDate(){return this.tomorrowsDate}setReRegistrationProcessDates(t){this._reRegistrationProcessDates=t}getReRegistrationProcessDate(t){return this._reRegistrationProcessDates.get(t)??this.tomorrowsDate}hasScheduleDatePassed(t){return mt.fromJSDate(new Date(t)).toJSDate()<this.tomorrowsDate}checkForEqualDates(t,i){return mt.fromJSDate(t).equals(mt.fromJSDate(i))}onReactivateGifts(t,i,n,d){let E=t.id,T=i.id;this.setLoadStatus(I.ReactivateGifts,N.IsLoading,!0),this.giftSvc.resumeSuspendedPayments(E,T,n,d).subscribe({next:B=>{this.setLoadStatus(I.ReactivateGifts,N.IsComplete,!0),this.setLoadStatus(I.ReactivateGifts,N.IsLoading,!1),this.suspendedGiftsNotResumed.next(B.suspendedGiftsNotResumed),this.suspendedReRegistrationsNotResumed.next(B.suspendedReRegistrationsNotResumed)},error:()=>{this.notifySvc.toast({title:"LABEL.ERROR",message:"MESSAGE.GIFTS_RESUME_FAILURE",severity:"error"}),this.setLoadStatus(I.ReactivateGifts,N.IsLoadError,!0),this.setLoadStatus(I.ReactivateGifts,N.IsLoading,!1)}})}navigateToPage(t){if(this.tenantId)switch(t){case"my-gifts":this.router.navigateByUrl(`${this.tenantId}/user/account/gifts`);break;case"funds":default:this.router.navigateByUrl(`${this.tenantId}/giving/funds`)}else this.location.back()}setCurrentPaymentMethod(t){this.currentPaymentMethod.next(t)}setCurrentPaymentMethodActiveStatus(t){this.reactivateProcessInfo.next(Mt(W({},this.reactivateProcessInfo.getValue()),{isCurrentPaymentMethodActive:t}))}setLoadStatus(t,i,n){let d=this.loadStatus.getValue(),E={[t]:Mt(W({},d[t]),{[i]:n})};this.loadStatus.next(W(W({},d),E))}setNextStep(t){this.reactivateProcessInfo.next(Mt(W({},this.reactivateProcessInfo.getValue()),{step:t}))}setTitle(t){this.reactivateProcessInfo.next(Mt(W({},this.reactivateProcessInfo.getValue()),{title:t??this.translate.instant("LABEL.REACTIVATE")}))}setUpdatedPaymentMethod(t){this.updatedPaymentMethod.next(t)}
1skipSuspendedReRegistrations(){this.suspendedReRegistrations.next([]),this.setLoadStatus(I.SuspendedReRegistrations,N.IsComplete,!0)}setSuspendedReRegistrations(t){this.setLoadStatus(I.SuspendedReRegistrations,N.IsLoading,!0),this.publicRegistrationSvc.getSuspendedReRegistrations(t.id).subscribe({next:i=>{this.suspendedReRegistrations.next(i??[]),this.setLoadStatus(I.SuspendedReRegistrations,N.IsComplete,!0),this.setLoadStatus(I.SuspendedReRegistrations,N.IsLoading,!1)},error:()=>{this.suspendedReRegistrations.next([]),this.setLoadStatus(I.SuspendedReRegistrations,N.IsComplete,!0),this.setLoadStatus(I.SuspendedReRegistrations,N.IsLoadError,!0),this.setLoadStatus(I.SuspendedReRegistrations,N.IsLoading,!1)}})}setUpcomingContributions(t){this.setLoadStatus(I.UpcomingContributions,N.IsLoading,!0),this.contributionPublicSvc.getUpcomingContributions().subscribe({next:i=>{let n=i.filter(d=>!d.managed&&d.giftStatus==="Suspended"&&t.id===d.paymentMethod.id);this.userUpcomingContributions.next(n),this.setLoadStatus(I.UpcomingContributions,N.IsComplete,!0),this.setLoadStatus(I.UpcomingContributions,N.IsLoading,!1)},error:()=>{this.notifySvc.errorBanner({title:"LABEL.ERROR",message:"FINANCE.ERRORS.UPCOMING_CONTRIBUTIONS"}),this.setLoadStatus(I.UpcomingContributions,N.IsLoadError,!0),this.setLoadStatus(I.UpcomingContributions,N.IsLoading,!1)}})}setUserInfo(t){this.userInfo.next(t)}initializeLoadStatus(){let t={},i={};return Object.values(N).forEach(n=>{t[n]=!1}),Object.values(I).forEach(n=>{i=Mt(W({},i),{[n]:t})}),i}getEnterValidBankReactivateTranslationKey(t,i){return t>0&&i>0?"RESUME_SUSPENDED_PAYMENTS.ENTER_VALID_BANK_REACTIVATE.BOTH":i>0?"RESUME_SUSPENDED_PAYMENTS.ENTER_VALID_BANK_REACTIVATE.PAYMENTS":"RESUME_SUSPENDED_PAYMENTS.ENTER_VALID_BANK_REACTIVATE.GIFTS"}getEnterValidCardReactivateTranslationKey(t,i){return t>0&&i>0?"RESUME_SUSPENDED_PAYMENTS.ENTER_VALID_CARD_REACTIVATE.BOTH":i>0?"RESUME_SUSPENDED_PAYMENTS.ENTER_VALID_CARD_REACTIVATE.PAYMENTS":"RESUME_SUSPENDED_PAYMENTS.ENTER_VALID_CARD_REACTIVATE.GIFTS"}getAddPaymentMethodForAllTranslationKey(t,i){return t>0&&i>0?"RESUME_SUSPENDED_PAYMENTS.ADD_PAYMENT_METHOD_FOR_ALL.BOTH_COUNT":i>0?"RESUME_SUSPENDED_PAYMENTS.ADD_PAYMENT_METHOD_FOR_ALL.PAYMENTS_COUNT":t>0?"RESUME_SUSPENDED_PAYMENTS.ADD_PAYMENT_METHOD_FOR_ALL.GIFTS_COUNT":"RESUME_SUSPENDED_PAYMENTS.ADD_PAYMENT_METHOD_FOR_ALL.GIFTS"}getChooseEligiblePaymentMethodTranslationKey(t,i){return t>0&&i>0?"RESUME_SUSPENDED_PAYMENTS.CHOOSE_ELIGIBLE_PAYMENT_METHOD_OR_ADD.BOTH_COUNT":i>0?"RESUME_SUSPENDED_PAYMENTS.CHOOSE_ELIGIBLE_PAYMENT_METHOD_OR_ADD.PAYMENTS_COUNT":t>0?"RESUME_SUSPENDED_PAYMENTS.CHOOSE_ELIGIBLE_PAYMENT_METHOD_OR_ADD.GIFTS_COUNT":"RESUME_SUSPENDED_PAYMENTS.CHOOSE_ELIGIBLE_PAYMENT_METHOD_OR_ADD.GIFTS"}getSummaryIntroTranslationKey(t,i){return t>0&&i>0?"RESUME_SUSPENDED_PAYMENTS.SUMMARY.INTRO_BOTH":i>0?"RESUME_SUSPENDED_PAYMENTS.SUMMARY.INTRO_RE_ONLY":"RESUME_SUSPENDED_PAYMENTS.SUMMARY.INTRO_GIFTS_ONLY"}getEditInstructionTranslationKey(t,i){return t>0&&i>0?"RESUME_SUSPENDED_PAYMENTS.EDIT.INSTRUCTION_BOTH":i>0?"RESUME_SUSPENDED_PAYMENTS.EDIT.INSTRUCTION_RE_ONLY":"RESUME_SUSPENDED_PAYMENTS.EDIT.INSTRUCTION_GIFTS_ONLY"}getEditTitleTranslationKey(t,i){return t>0&&i>0?"RESUME_SUSPENDED_PAYMENTS.EDIT.TITLE_BOTH":i>0?"RESUME_SUSPENDED_PAYMENTS.EDIT.TITLE_RE_ONLY":"RESUME_SUSPENDED_PAYMENTS.EDIT.TITLE_GIFTS_ONLY"}getConfirmationSuccessTranslationKey(t,i){return t>0&&i>0?"RESUME_SUSPENDED_PAYMENTS.CONFIRMATION.SUCCESS_BOTH":i>0?"RESUME_SUSPENDED_PAYMENTS.CONFIRMATION.SUCCESS_RE_ONLY":"RESUME_SUSPENDED_PAYMENTS.CONFIRMATION.SUCCESS_GIFTS_ONLY"}getReFrequencyTranslationKey(t){return t==="Weekly"?"RESUME_SUSPENDED_PAYMENTS.RE_FREQUENCY.Weekly":t==="BiWeekly"?"RESUME_SUSPENDED_PAYMENTS.RE_FREQUENCY.BiWeekly":t==="Quarterly"?"RESUME_SUSPENDED_PAYMENTS.RE_FREQUENCY.Quarterly":t==="SemiAnnually"?"RESUME_SUSPENDED_PAYMENTS.RE_FREQUENCY.SemiAnnually":t==="Annually"?"RESUME_SUSPENDED_PAYMENTS.RE_FREQUENCY.Annually":"RESUME_SUSPENDED_PAYMENTS.RE_FREQUENCY.Monthly"}getScheduledContributionTranslationKey(t){return this.hasScheduleDatePassed(t)?"RESUME_SUSPENDED_PAYMENTS.LAST_CONTRIBUTION":"RESUME_SUSPENDED_PAYMENTS.NEXT_CONTRIBUTION"}isPaymentMethodExpired(t){return t.accountType==="Checking"||t.accountType==="Savings"?!1:t.daysUntilExpired<=0}static{this.\u0275fac=function(i){return new(i||e)(et(Zt),et(ai),et(Ue),et(k),et(jt),et(ht),et(Le),et(L),et(Wt))}}static{this.\u0275prov=Pe({token:e,factory:e.\u0275fac})}}return e})();var an=(e,a)=>a.id,rn=(e,a)=>a.registrationId,ye=e=>({count:e}),sn=(e,a)=>({amount:e,frequency:a}),dn=(e,a)=>({amount:e,date:a});function cn(e,a){if(e&1&&(s(0,"p",1),m(1),l(2,"translate"),r()),e&2){let t=c(2),i=c();o(),R(" ",_(2,1,i.getSummaryIntroTranslationKey(t))," ")}}function ln(e,a){e&1&&(s(0,"strong",2),m(1),l(2,"translate"),r()),e&2&&(o(),f(_(2,1,"RESUME_SUSPENDED_PAYMENTS.SUMMARY.SUSPENDED_PAYMENT_METHOD")))}function pn(e,a){e&1&&(s(0,"strong",2),m(1),l(2,"translate"),r()),e&2&&(o(),f(_(2,1,"RESUME_SUSPENDED_PAYMENTS.SUMMARY.CURRENT_PAYMENT_METHOD")))}function mn(e,a){e&1&&v(0,"app-icon",8)}
1function _n(e,a){e&1&&v(0,"app-icon",9)}function un(e,a){if(e&1&&(s(0,"div",7),u(1,mn,1,0,"app-icon",8)(2,_n,1,0,"app-icon",9),s(3,"div")(4,"strong",10)(5,"span",11),m(6),r(),s(7,"span"),m(8),l(9,"currency"),r()(),v(10,"div",12),l(11,"displayOnlyDate"),r()()),e&2){let t=a.$implicit,i=c(4);o(),p(t.giftStatus==="Scheduled"?1:-1),o(),p(t.giftStatus!=="Scheduled"?2:-1),o(4),R("",t.fundName," "),o(2),f(h(9,5,t.amount,"USD")),o(2),C("innerHTML",i.getScheduledContributionHtml(t.giftFrequency,_(11,8,t.scheduledDate),t.scheduledDate),Y)}}function Cn(e,a){if(e&1&&(s(0,"strong"),m(1),l(2,"translate"),r(),K(3,un,12,10,"div",7,an)),e&2){let t=c(2);o(),f(h(2,1,"RESUME_SUSPENDED_PAYMENTS.SUMMARY.AFFECTED_GIFTS",U(4,ye,t.upcomingContributions.length))),o(2),Q(t.upcomingContributions)}}function fn(e,a){e&1&&v(0,"app-icon",14)}function hn(e,a){e&1&&v(0,"app-icon",9)}function Sn(e,a){if(e&1&&(s(0,"span",16),m(1),l(2,"currency"),r()),e&2){let t=c().$implicit;o(),f(h(2,1,t.missedAmount,"USD"))}}function En(e,a){e&1&&(s(0,"span",18),m(1),l(2,"translate"),r()),e&2&&(o(),f(_(2,1,"RESUME_SUSPENDED_PAYMENTS.AMOUNT_DUE")))}function vn(e,a){if(e&1&&(m(0),l(1,"date"),l(2,"date")),e&2){let t=c(2).$implicit;vt(" ",h(1,2,t.nextScheduledDate,"MM/dd/yyyy")," - ",h(2,5,t.lastScheduledDate,"MM/dd/yyyy")," ")}}function yn(e,a){if(e&1&&(m(0),l(1,"date")),e&2){let t=c(2).$implicit;R(" ",h(1,1,t.nextScheduledDate,"MM/dd/yyyy")," ")}}function gn(e,a){if(e&1&&(s(0,"div"),m(1),l(2,"translate"),r()),e&2){let t=c(2).$implicit;o(),f(h(2,1,"RESUME_SUSPENDED_PAYMENTS.UPCOMING_PAYMENTS",U(4,ye,t.futurePaymentCount)))}}function Pn(e,a){if(e&1&&(s(0,"div",17)(1,"span"),m(2),l(3,"currency"),l(4,"translate"),l(5,"translate"),r(),u(6,En,3,3,"span",18),r(),s(7,"div"),u(8,vn,3,8)(9,yn,2,4),r(),u(10,gn,3,6,"div")),e&2){let t=c().$implicit,i=c(4);o(2),f(h(5,9,"RESUME_SUSPENDED_PAYMENTS.AMOUNT_PER_FREQUENCY",$(12,sn,h(3,4,t.paymentAmount,"USD"),_(4,7,i.getReFrequencyTranslationKey(t.paymentPlanType))))),o(4),p(t.missedAmount>0?6:-1),o(2),p(t.nextScheduledDate&&t.lastScheduledDate&&t.nextScheduledDate!==t.lastScheduledDate?8:t.nextScheduledDate?9:-1),o(2),p(t.futurePaymentCount>0?10:-1)}}function Mn(e,a){if(e&1&&(s(0,"div"),m(1),l(2,"currency"),l(3,"date"),l(4,"translate"),r()),e&2){let t=c().$implicit;o(),f(h(4,7,"RESUME_SUSPENDED_PAYMENTS.AMOUNT_ON_DATE",$(10,dn,h(2,1,t.balanceDue,"USD"),h(3,4,t.nextScheduledDate,"MM/dd/yyyy"))))}}function Tn(e,a){if(e&1&&(s(0,"div",7),u(1,fn,1,0,"app-icon",14)(2,hn,1,0,"app-icon",9),s(3,"div")(4,"strong",15)(5,"span",11),m(6),r(),u(7,Sn,3,4,"span",16),r(),u(8,Pn,11,15)(9,Mn,5,13,"div"),r()()),e&2){let t=a.$implicit;o(),p(t.missedAmount>0?1:2),o(5),f(t.termName),o(),p(t.missedAmount>0?7:-1),o(),p(t.paymentPlanType!=="OneTime"?8:9)}}function Rn(e,a){if(e&1&&(s(0,"strong",13),m(1),l(2,"translate"),r(),K(3,Tn,10,4,"div",7,rn)),e&2){let t=c(2);o(),f(h(2,1,"RESUME_SUSPENDED_PAYMENTS.SUMMARY.AFFECTED_RE_PAYMENTS",U(4,ye,t.suspendedReRegistrations.length))),o(2),Q(t.suspendedReRegistrations)}}function xn(e,a){if(e&1){let t=M();u(0,cn,3,3,"p",1)(1,ln,3,3,"strong",2)(2,pn,3,3,"strong",2),v(3,"app-match-stick-payment-method",3),u(4,Cn,5,6)(5,Rn,5,6),s(6,"div",4)(7,"button",5),y("click",function(){g(t);let n=c(2);return P(n.onNextStep())}),m(8),r(),s(9,"button",6),l(10,"translate"),y("click",function(){g(t);let n=c(2);return P(n.onCancel())}),r()()}if(e&2){let t=c(),i=c();p(t.upcomingContributions.length>0||(t.suspendedReRegistrations==null?null:t.suspendedReRegistrations.length)>0?0:-1),o(),p(t.currentPaymentMethod.isSuspended||t.currentPaymentMethod.isRejected?1:2),o(2),C("donorWalletPaymentMethod",t.currentPaymentMethod),o(),p(t.upcomingContributions.length>0?4:-1),o(),p((t.suspendedReRegistrations==null?null:t.suspendedReRegistrations.length)>0?5:-1),o(2),C("disabled",i.isLoadErrorOnUpcomingContributions),o(),f(i.displayNextButtonLabel(t.currentPaymentMethod.statusCode)),o(),C("label",_(10,8,"LABEL.CANCEL"))}}function bn(e,a){e&1&&v(0,"app-loading-spinner",0)}function An(e,a){if(e&1&&u(0,xn,11,10)(1,bn,1,0,"app-loading-spinner",0),e&2){let t=c();p(t.isLoadingUpcomingContributions?1:0)}}var de=(()=>{class e{constructor(t,i,n,d,E){this.destroyRef=t,this.notifySvc=i,this.reactivatePaymentMethodsAndGiftsSvc=n,this.translate=d,this.cloudinary=E,this.isLoadErrorOnUpcomingContributions=!1,this.isLoadingUpcomingContributions=!0,this.ACH_INSUFFICIENT_FUNDS="R01",this.CC_INSUFFICIENT_FUNDS="000051"}ngOnInit(){this.userReactivateDetails$=this.reactivatePaymentMethodsAndGiftsSvc.userReactivateDetails$,this.reactivatePaymentMethodsAndGiftsSvc.loadStatus$.pipe(x(t=>{this.isLoadingUpcomingContributions=t.upcomingContributions.isLoading||t.suspendedReRegistrations?.isLoading,this.isLoadErrorOnUpcomingContributions=t.upcomingContributions.isLoadError}),D(this.destroyRef)).subscribe(),this.reactivatePaymentMethodsAndGiftsSvc.currentPaymentMethod$.pipe(x(t=>{t?(this.currentPaymentMethod=t,this.reactivatePaymentMethodsAndGiftsSvc.setUpcomingContributions(t)):this.notifySvc.toast({title:"LABEL.ERROR",message:"FINANCE.LABELS.PAYMENT_METHOD_ERROR",severity:"error"})}),j(1)).subscribe()}ngAfterViewInit(){this.updateTitle()}updateTitle(){St([this.reactivatePaymentMethodsAndGiftsSvc.userUpcomingContributions$,this.reactivatePaymentMethodsAndGiftsSvc.suspendedReRegistrations$]).pipe(x(([t,i])=>{this.reactivatePaymentMethodsAndGiftsSvc.setTitle(this.translate.instant(this.reactivatePaymentMethodsAndGiftsSvc.getEditTitleTranslationKey(t?.length??0,i?.length??0)))}),D(this.destroyRef)).subscribe()}getSummaryIntroTranslationKey(t){return this.reactivatePaymentMethodsAndGiftsSvc.getSummaryIntroTranslationKey(t.upcomingContributions?.length??0,t.suspendedReRegistrations?.length??0)}getReFrequencyTranslationKey(t){return this.reactivatePaymentMethodsAndGiftsSvc.getReFrequencyTranslationKey(t)}displayNextButtonLabel(t){return t===this.ACH_INSUFFICIENT_FUNDS||t===this.CC_INSUFFICIENT_FUNDS?this.translate.instant("LABEL.REACTIVATE"):this.translate.instant("LABEL.NEXT")}getScheduledContributionHtml(t,i,n){return this.translate.instant(this.reactivatePaymentMethodsAndGiftsSvc.getScheduledContributionTranslationKey(n),Ct({frequency:t,date:i}))}getPaymentTypeMapping(t){return this.reactivatePaymentMethodsAndGiftsSvc.getPaymentTypeMapping(t)}onCancel(){this.reactivatePaymentMethodsAndGiftsSvc.navigateToPage("funds")}onNextStep(){St([this.reactivatePaymentMethodsAndGiftsSvc.userUpcomingContributions$,this.reactivatePaymentMethodsAndGiftsSvc.suspendedReRegistrations$]).pipe(x(([t,i])=>{t.length>0||i.length>0?this.reactivatePaymentMethodsAndGiftsSvc.setNextStep(G.PaymentMethodSelection):this.reactivatePaymentMethodsAndGiftsSvc.setNextStep(G.ReactivatePaymentMethod)}),j(1)).subscribe()}static{this.\u0275fac=function(i){return new(i||e)(S(F),S(k),S(V),S(L),S(xt))}}static{this.\u0275cmp=b({type:e,selectors:[["app-payment-method-and-gifts-summary"]],standalone:!0,features:[A],decls:2,vars:3,consts:[[1,"mb-1"],[1,"mt-0"],[1,"block","mb-1"],[3,"donorWalletPaymentMethod"],[1,"grid","gap-1","mt-1"],["pButton","",1,"p-button","justify-content-center","w-full",3,"click","disabled"],["pButton","",1,"p-button","p-button-link","justify-self-center",3,"click","label"],[1,"grid","gap-0","tab:template-cols-auto-1","align-items-center","py-0.5","border-bottom-solid"],["severity","success"],["severity","warning","icon","report_problem"],[1,"grid","template-cols-1-auto","font-size-1.125","
1justify-content-space-between"],[1,"truncate-text"],[3,"innerHTML"],[1,"block","mt-1"],["severity","error"],[1,"grid","tab:template-cols-1-auto","font-size-1.125","mb-0.5","justify-content-space-between"],[1,"color-error"],[1,"flex","justify-content-space-between"],[1,"font-size-sm"]],template:function(i,n){if(i&1&&(u(0,An,2,1),l(1,"async")),i&2){let d;p((d=_(1,1,n.userReactivateDetails$))?0:-1,d)}},dependencies:[ft,ut,H,_t,nt,dt,st,At,w],encapsulation:2})}}return e})();var Dn=(e,a)=>a.id,Si=(e,a)=>a.registrationId,Nn=(e,a)=>a.giftId,Nt=e=>({count:e}),Ei=(e,a)=>({amount:e,frequency:a}),vi=(e,a)=>({amount:e,date:a});function In(e,a){if(e&1&&v(0,"app-affirmation",2),e&2){let t=c(3);C("message",t.successMessage)}}function Un(e,a){e&1&&(v(0,"app-affirmation",3),l(1,"translate")),e&2&&C("message",_(1,1,"ERROR.GENERIC"))}function Gn(e,a){if(e&1&&v(0,"app-match-stick-payment-method",4),e&2){let t=c(2);C("donorWalletPaymentMethod",t.updatedPaymentMethod)}}function Fn(e,a){if(e&1&&(v(0,"div",11),l(1,"displayOnlyDate"),l(2,"displayOnlyDate")),e&2){let t=c(2).$implicit,i=c(4);C("innerHTML",i.getMissedContributionProcessHtml(_(1,1,t.scheduledDate),_(2,3,i.tomorrowsDate)),Y)}}function Ln(e,a){if(e&1&&(v(0,"div",11),l(1,"displayOnlyDate")),e&2){let t=c(2).$implicit,i=c(4);C("innerHTML",i.getNextContributionHtml(t.giftFrequency,_(1,1,t.scheduledDate)),Y)}}function Bn(e,a){if(e&1&&(v(0,"app-icon",8),s(1,"div")(2,"strong",9)(3,"span",10),m(4),r(),s(5,"span"),m(6),l(7,"currency"),r()(),u(8,Fn,3,5,"div",11)(9,Ln,2,3,"div",11),r()),e&2){let t=c().$implicit,i=c(4);o(4),R("",t.fundName," "),o(2),f(h(7,3,t.amount,"USD")),o(2),p(i.hasScheduledDatePassed(t.scheduledDate)?8:9)}}function On(e,a){if(e&1&&(s(0,"div",7),u(1,Bn,10,6),r()),e&2){let t=a.$implicit;o(),p(t.giftStatus==="Scheduled"?1:-1)}}function wn(e,a){if(e&1&&(s(0,"strong"),m(1),l(2,"translate"),r(),K(3,On,2,1,"div",7,Dn)),e&2){let t=c(3);o(),f(h(2,1,"RESUME_SUSPENDED_PAYMENTS.CONFIRMATION.UPDATED_GIFTS",U(4,Nt,t.successfulSubmittedContributions.length))),o(2),Q(t.successfulSubmittedContributions)}}function kn(e,a){if(e&1&&(m(0),l(1,"date"),l(2,"date")),e&2){let t=c(2).$implicit;vt(" ",h(1,2,t.nextScheduledDate,"MM/dd/yyyy")," - ",h(2,5,t.lastScheduledDate,"MM/dd/yyyy")," ")}}function Vn(e,a){if(e&1&&(m(0),l(1,"date")),e&2){let t=c(2).$implicit;R(" ",h(1,1,t.nextScheduledDate,"MM/dd/yyyy")," ")}}function Yn(e,a){if(e&1&&(s(0,"div"),m(1),l(2,"translate"),r()),e&2){let t=c(2).$implicit;o(),f(h(2,1,"RESUME_SUSPENDED_PAYMENTS.UPCOMING_PAYMENTS",U(4,Nt,t.futurePaymentCount)))}}function $n(e,a){if(e&1&&(s(0,"div"),m(1),l(2,"currency"),l(3,"translate"),l(4,"translate"),r(),s(5,"div"),u(6,kn,3,8)(7,Vn,2,4),r(),u(8,Yn,3,6,"div")),e&2){let t=c().$implicit,i=c(4);o(),f(h(4,8,"RESUME_SUSPENDED_PAYMENTS.AMOUNT_PER_FREQUENCY",$(11,Ei,h(2,3,t.paymentAmount,"USD"),_(3,6,i.getReFrequencyTranslationKey(t.paymentPlanType))))),o(5),p(t.nextScheduledDate&&t.lastScheduledDate&&t.nextScheduledDate!==t.lastScheduledDate?6:t.nextScheduledDate?7:-1),o(2),p(t.futurePaymentCount>0?8:-1)}}function jn(e,a){if(e&1&&(s(0,"div"),m(1),l(2,"currency"),l(3,"date"),l(4,"translate"),r()),e&2){let t=c().$implicit;o(),f(h(4,7,"RESUME_SUSPENDED_PAYMENTS.AMOUNT_ON_DATE",$(10,vi,h(2,1,t.balanceDue,"USD"),h(3,4,t.nextScheduledDate,"MM/dd/yyyy"))))}}function Hn(e,a){if(e&1&&(v(0,"div",11),l(1,"date")),e&2){let t=c(2).$implicit,i=c(4);C("innerHTML",i.getPastDueAmountProcessHtml(h(1,1,i.getProcessDate(t.registrationId),"MM/dd/yyyy"),!1),Y)}}function zn(e,a){if(e&1&&(v(0,"div",11),l(1,"date")),e&2){let t=c(2).$implicit,i=c(4);C("innerHTML",i.getPastDueAmountProcessHtml(h(1,1,i.getProcessDate(t.registrationId),"MM/dd/yyyy"),!0),Y)}}function Kn(e,a){if(e&1&&u(0,Hn,2,4,"div",11)(1,zn,2,4,"div",11),e&2){let t=c().$implicit;p(t.paymentPlanType!=="OneTime"?0:1)}}function Qn(e,a){if(e&1&&(s(0,"div",7),v(1,"app-icon",8),s(2,"div")(3,"strong",9)(4,"span",10),m(5),r()(),u(6,$n,9,14)(7,jn,5,13,"div")(8,Kn,2,1),r()()),e&2){let t=a.$implicit;o(5),f(t.termName),o(),p(t.paymentPlanType!=="OneTime"?6:7),o(2),p(t.missedAmount>0?8:-1)}}function Wn(e,a){if(e&1&&(s(0,"strong",12),m(1),l(2,"translate"),r(),K(3,Qn,9,3,"div",7,Si)),e&2){let t=c(3);o(),f(h(2,1,"RESUME_SUSPENDED_PAYMENTS.CONFIRMATION.UPDATED_RE_PAYMENTS",U(4,Nt,t.resumedReRegistrations.length))),o(2),Q(t.resumedReRegistrations)}}function qn(e,a){e&1&&(s(0,"span"),m(1,","),r())}function Xn(e,a){if(e&1&&(s(0,"strong"),m(1),l(2,"translate"),u(3,qn,2,0,"span"),r()),e&2){let t=c(2).$implicit;o(),f(_(2,2,"RESUME_SUSPENDED_PAYMENTS.CONFIRMATION.CHECKING_SAVINGS")),o(2),p(t.acceptsCreditCard||t.acceptsAmex?3:-1)}}function Zn(e,a){e&1&&(s(0,"strong"),m(1),l(2,"translate"),r()),e&2&&(o(),f(_(2,1,"RESUME_SUSPENDED_PAYMENTS.CONFIRMATION.CREDIT_CARD")))}function Jn(e,a){e&1&&(s(0,"strong"),m(1),l(2,"translate"),r()),e&2&&(o(),f(_(2,1,"RESUME_SUSPENDED_PAYMENTS.CONFIRMATION.CREDIT_CARD_NO_AMEX")))}function to(e,a){if(e&1&&(v(0,"app-icon",13),l(1,"translate"),s(2,"div")(3,"strong",9)(4,"span",10),m(5),r(),s(6,"span"),m(7),l(8,"currency"),r()(),s(9,"div"),m(10),l(11,"translate"),u(12,Xn,4,4,"strong")(13,Zn,3,3,"strong")(14,Jn,3,3,"strong"),r()()),e&2){let t=c().$implicit;C("tooltip",_(1,8,"RESUME_SUSPENDED_PAYMENTS.CONFIRMATION.GIFT_NOT_RESUMED_TOOLTIP"))("cursorPointer",!0),o(5),R("",t.fundName," "),o(2),f(h(8,10,t.giftAmount,"USD")),o(3),R(" ",_(11,13,"RESUME_SUSPENDED_PAYMENTS.CONFIRMATION.ACCEPTED_METHODS")," "),o(2),p(t.acceptsAch?12:-1),o(),p(t.acceptsCreditCard&&t.acceptsAmex?13:-1),o(),p(t.acceptsCreditCard&&!t.acceptsAmex?14:-1)}}function eo(e,a){if(e&1&&(s(0,"div",7),u(1,to,15,15),r()),e&2){let t=a.$implicit;o(),p(t.giftStatus==="Suspended"?1:-1)}}function io(e,a){if(e&1&&(s(0,"strong",12),m(1),l(2,"translate"),r(),K(3,eo,2,1,"div",7,Nn)),e&2){let t=c(2);o(),f(h(2,1,"RESUME_SUSPENDED_PAYMENTS.CONFIRMATION.GIFTS_NOT_RESUMED",U(4,Nt,t.suspendedGiftsNotResumed.length))),o(2),Q(t.suspendedGiftsNotResumed)}}function no(e,a){if(e&1&&(s(0,"span",14),m(1),l(2,"currency"),r()),e&2){let t=c().$implicit;o(),f(h(2,1,t.missedAmount,"USD"))}}function oo(e,a){if(e&1&&(m(0),l(1,"date"),l(2,"date")),e&2){let t=c(2).$implicit;
1vt(" ",h(1,2,t.nextScheduledDate,"MM/dd/yyyy")," - ",h(2,5,t.lastScheduledDate,"MM/dd/yyyy")," ")}}function ao(e,a){if(e&1&&(m(0),l(1,"date")),e&2){let t=c(2).$implicit;R(" ",h(1,1,t.nextScheduledDate,"MM/dd/yyyy")," ")}}function ro(e,a){if(e&1&&(s(0,"div"),m(1),l(2,"translate"),r()),e&2){let t=c(2).$implicit;o(),f(h(2,1,"RESUME_SUSPENDED_PAYMENTS.UPCOMING_PAYMENTS",U(4,Nt,t.futurePaymentCount)))}}function so(e,a){if(e&1&&(s(0,"div"),m(1),l(2,"currency"),l(3,"translate"),l(4,"translate"),r(),s(5,"div"),u(6,oo,3,8)(7,ao,2,4),r(),u(8,ro,3,6,"div")),e&2){let t=c().$implicit,i=c(4);o(),f(h(4,8,"RESUME_SUSPENDED_PAYMENTS.AMOUNT_PER_FREQUENCY",$(11,Ei,h(2,3,t.paymentAmount,"USD"),_(3,6,i.getReFrequencyTranslationKey(t.paymentPlanType))))),o(5),p(t.nextScheduledDate&&t.lastScheduledDate&&t.nextScheduledDate!==t.lastScheduledDate?6:t.nextScheduledDate?7:-1),o(2),p(t.futurePaymentCount>0?8:-1)}}function co(e,a){if(e&1&&(s(0,"div"),m(1),l(2,"currency"),l(3,"date"),l(4,"translate"),r()),e&2){let t=c().$implicit;o(),f(h(4,7,"RESUME_SUSPENDED_PAYMENTS.AMOUNT_ON_DATE",$(10,vi,h(2,1,t.balanceDue,"USD"),h(3,4,t.nextScheduledDate,"MM/dd/yyyy"))))}}function lo(e,a){e&1&&(s(0,"span"),m(1,","),r())}function po(e,a){if(e&1&&(s(0,"strong"),m(1),l(2,"translate"),u(3,lo,2,0,"span"),r()),e&2){let t=c().$implicit;o(),f(_(2,2,"RESUME_SUSPENDED_PAYMENTS.CONFIRMATION.CHECKING_SAVINGS")),o(2),p(t.acceptsCreditCard||t.acceptsAmex?3:-1)}}function mo(e,a){e&1&&(s(0,"strong"),m(1),l(2,"translate"),r()),e&2&&(o(),f(_(2,1,"RESUME_SUSPENDED_PAYMENTS.CONFIRMATION.CREDIT_CARD")))}function _o(e,a){e&1&&(s(0,"strong"),m(1),l(2,"translate"),r()),e&2&&(o(),f(_(2,1,"RESUME_SUSPENDED_PAYMENTS.CONFIRMATION.CREDIT_CARD_NO_AMEX")))}function uo(e,a){if(e&1&&(s(0,"div",7),v(1,"app-icon",13),l(2,"translate"),s(3,"div")(4,"strong",9)(5,"span",10),m(6),r(),u(7,no,3,4,"span",14),r(),u(8,so,9,14)(9,co,5,13,"div"),s(10,"div"),m(11),l(12,"translate"),u(13,po,4,4,"strong")(14,mo,3,3,"strong")(15,_o,3,3,"strong"),r()()()),e&2){let t=a.$implicit;o(),C("tooltip",_(2,9,"RESUME_SUSPENDED_PAYMENTS.CONFIRMATION.RE_NOT_RESUMED_TOOLTIP"))("cursorPointer",!0),o(5),f(t.termName),o(),p(t.missedAmount>0?7:-1),o(),p(t.paymentPlanType!=="OneTime"?8:9),o(3),R(" ",_(12,11,"RESUME_SUSPENDED_PAYMENTS.CONFIRMATION.ACCEPTED_METHODS")," "),o(2),p(t.acceptsAch?13:-1),o(),p(t.acceptsCreditCard&&t.acceptsAmex?14:-1),o(),p(t.acceptsCreditCard&&!t.acceptsAmex?15:-1)}}function Co(e,a){if(e&1&&(s(0,"strong",12),m(1),l(2,"translate"),r(),K(3,uo,16,13,"div",7,Si)),e&2){let t=c(2);o(),f(h(2,1,"RESUME_SUSPENDED_PAYMENTS.CONFIRMATION.RE_NOT_RESUMED",U(4,Nt,t.suspendedReRegistrationsNotResumed.length))),o(2),Q(t.suspendedReRegistrationsNotResumed)}}function fo(e,a){if(e&1){let t=M();u(0,In,1,1,"app-affirmation",2)(1,Un,2,3,"app-affirmation",3)(2,Gn,1,1,"app-match-stick-payment-method",4)(3,wn,5,6)(4,Wn,5,6)(5,io,5,6)(6,Co,5,6),s(7,"div",0)(8,"button",5),l(9,"translate"),y("click",function(){g(t);let n=c(2);return P(n.onGoToMyGifts())}),r(),s(10,"button",6),l(11,"translate"),y("click",function(){g(t);let n=c(2);return P(n.onViewFunds())}),r()()}if(e&2){let t=c(),i=c();p(!i.isLoadErrorOnUpcomingContributions&&t.updatedPaymentMethod&&!t.updatedPaymentMethod.isRejected&&!t.updatedPaymentMethod.isSuspended?0:-1),o(),p(i.isLoadErrorOnUpcomingContributions||t.updatedPaymentMethod&&(t.updatedPaymentMethod.isRejected||t.updatedPaymentMethod.isSuspended)?1:-1),o(),p(t.updatedPaymentMethod&&!t.updatedPaymentMethod.isRejected&&!t.updatedPaymentMethod.isSuspended?2:-1),o(),p(i.successfulSubmittedContributions&&(i.successfulSubmittedContributions==null?null:i.successfulSubmittedContributions.length)>0?3:-1),o(),p((i.resumedReRegistrations==null?null:i.resumedReRegistrations.length)>0?4:-1),o(),p(t.suspendedGiftsNotResumed&&(t.suspendedGiftsNotResumed==null?null:t.suspendedGiftsNotResumed.length)>0?5:-1),o(),p((t.suspendedReRegistrationsNotResumed==null?null:t.suspendedReRegistrationsNotResumed.length)>0?6:-1),o(2),C("label",_(9,9,"LABEL.GO_TO_MY_GIFTS")),o(2),C("label",_(11,11,"LABEL.VIEW_FUNDS"))}}function ho(e,a){e&1&&v(0,"app-loading-spinner",1)}function So(e,a){if(e&1&&u(0,fo,12,13,"div",0)(1,ho,1,0,"app-loading-spinner",1),e&2){let t=c();p(t.isLoadingUpcomingContributions?1:0)}}var ce=(()=>{class e{constructor(t,i,n,d,E,T){this.contributionPublicSvc=t,this.destroyRef=i,this.notifySvc=n,this.reactivatePaymentMethodsAndGiftsSvc=d,this.translate=E,this.cloudinary=T,this.isLoadErrorOnUpcomingContributions=!1,this.isLoadingUpcomingContributions=!0,this.resumedReRegistrations=[]}ngOnInit(){this.userReactivateDetails$=this.reactivatePaymentMethodsAndGiftsSvc.userReactivateDetails$,this.reactivatePaymentMethodsAndGiftsSvc.loadStatus$.pipe(x(t=>{this.isLoadingUpcomingContributions=t.upcomingContributions.isLoading,this.isLoadErrorOnUpcomingContributions=t.upcomingContributions.isLoadError}),D(this.destroyRef)).subscribe(),this.tomorrowsDate=this.reactivatePaymentMethodsAndGiftsSvc.getTomorrowsDate().toString(),this.loadSuccessfulSubmittedContributions(),this.loadResumedReRegistrations()}get successMessage(){return this.translate.instant(this.reactivatePaymentMethodsAndGiftsSvc.getConfirmationSuccessTranslationKey(this.successfulSubmittedContributions?.length??0,this.resumedReRegistrations?.length??0))}getProcessDate(t){return this.reactivatePaymentMethodsAndGiftsSvc.getReRegistrationProcessDate(t)}ngAfterViewInit(){this.reactivatePaymentMethodsAndGiftsSvc.setTitle(this.translate.instant("RESUME_SUSPENDED_PAYMENTS.CONFIRMATION.TITLE"))}getPaymentTypeMapping(t){return this.reactivatePaymentMethodsAndGiftsSvc.getPaymentTypeMapping(t)}hasScheduledDatePassed(t){return this.reactivatePaymentMethodsAndGiftsSvc.hasScheduleDatePassed(t)}getNextContributionHtml(t,i){return this.translate.instant("RESUME_SUSPENDED_PAYMENTS.NEXT_CONTRIBUTION",Ct({frequency:t,date:i}))}getMissedContributionProcessHtml(t,i){return this.translate.instant("RESUME_SUSPENDED_PAYMENTS.CONFIRMATION.MISSED_CONTRIBUTION_PROCESS",Ct({date:t,processDate:i}))}getPastDueAmountProcessHtml(t,i){let n=i?"RESUME_SUSPENDED_PAYMENTS.CONFIRMATION.PAST_DUE_AMOUNT_PROCESS_ONE_TIME":"RESUME_SUSPENDED_PAYMENTS.CONFIRMATION.PAST_DUE_AMOUNT_PROCESS";return this.translate.instant(n,Ct({date:t}))}getReFrequencyTranslationKey(t){return this.reactivatePaymentMethodsAndGiftsSvc.getReFrequencyTranslationKey(t)}onGoToMyGifts(){this.reactivatePaymentMethodsAndGiftsSvc.navigateToPage("my-gifts")}onViewFunds(){this.reactivatePaymentMethodsAndGiftsSvc.navigateToPage("funds")}loadSuccessfulSubmittedContributions(){this.reactivatePaymentMethodsAndGiftsSvc.userUpcomingContributions$.pipe(Ut(t=>this.updateSubmittedContributions(t)),Ut(t=>this.verifySubmittedContributionsWithUpdatedPaymentMethod(t)),x(t=>{this.successfulSubmittedContributions=t}),j(1)).subscribe()}updateSubmittedContributions(t){return this.contributionPublicSvc.getUpcomingContributions().pipe(rt(i=>this.mapSubmittedContributionsToUpdatedContributions(t,i)),Lt(i=>{throw this.notifySvc.toast({title:"LABEL.ERROR",message:"FINANCE.ERRORS.UPCOMING_CONTRIBUTIONS",severity:"error"}),i}),j(1))}verifySubmittedContributionsWithUpdatedPaymentMethod(t){return this.userReactivateDetails$.pipe(rt(i=>{let n=i.updatedPaymentMethod,d=[];return n?d=t.filter(E=>E.paymentMethod.id===n.id):this.notifySvc.toast({title:"LABEL.ERROR",message:"FINANCE.LABELS.PAYMENT_METHOD_ERROR",severity:"error"}),d}),j(1))}mapSubmittedContributionsToUpdatedContributions(t,i){return i.filter(d=>t.some(E=>E.id===d.id))}loadResumedReRegistrations(){this.reactivatePaymentMethodsAndGiftsSvc.suspendedReRegistrations$.pipe(x(t=>{this.resumedReRegistrations=t.filter(i=>i.canBeResumedWithPaymentMethod)}),j(1)).subscribe()}static{this.\u0275fac=function(i){return new(i||e)(S(Zt),S(F),S(k),S(V),S(L),S(xt))}}static{this.\u0275cmp=b({type:e,selectors:[["app-gifts-confirmation"]],standalone:!0,features:[A],decls:2,vars:3,consts:[[1,"grid","gap-1","tab:template-cols-1-1","mt-1.5"],[1,"mb-1"],["severity","success",1,"mb-1",3,"message"],["severity","error",1,"mb-1",3,"message"],[3,"donorWalletPaymentMethod"],["pButton","",1,"p-button","p-button-outlined",3,"click","label"],["pButton","",1,"p-button","justify-content-center","w-full",3,"click","label"],[1,"grid","gap-0","tab:template-cols-auto-1","align-items-center","border-bottom-solid","py-0.5"],["severity","success"],[1,"grid","tab:template-cols-1-auto","font-size-1.125","mb-0.5","
1justify-content-space-between"],[1,"truncate-text"],[3,"innerHTML"],[1,"block","mt-1"],["severity","warning","icon","report_problem",3,"tooltip","cursorPointer"],[1,"color-error"]],template:function(i,n){if(i&1&&(u(0,So,2,1),l(1,"async")),i&2){let d;p((d=_(1,1,n.userReactivateDetails$))?0:-1,d)}},dependencies:[Je,ft,ut,H,_t,nt,dt,st,At,w],styles:["[_nghost-%COMP%]     app-affirmation .affirmation{display:grid;grid-template-columns:auto 1fr}[_nghost-%COMP%]     app-affirmation p{font-size:1rem!important;font-weight:400!important;text-align:left!important}"]})}}return e})();var vo=(e,a)=>a.upcomingContribution.id,yo=(e,a)=>a.registrationId,ge=e=>({count:e}),go=e=>({status:e}),Po=(e,a)=>({count:e,amount:a}),Mo=(e,a)=>({amount:e,frequency:a}),To=(e,a)=>({amount:e,date:a});function Ro(e,a){if(e&1){let t=M();s(0,"app-match-stick-payment-method",15),l(1,"translate"),y("iconClicked",function(n){g(t);let d=c(4);return P(d.onIconClicked(n))}),r()}if(e&2){let t=c(3);C("tooltip",_(1,2,"RESUME_SUSPENDED_PAYMENTS.EDIT.CHANGE_PAYMENT_METHOD"))("donorWalletPaymentMethod",t.updatedPaymentMethod)}}function xo(e,a){if(e&1&&v(0,"app-match-stick-payment-method",14),e&2){let t=c(3);C("donorWalletPaymentMethod",t.updatedPaymentMethod)}}function bo(e,a){if(e&1&&u(0,Ro,2,4,"app-match-stick-payment-method",13)(1,xo,1,1,"app-match-stick-payment-method",14),e&2){let t=c(3);p(t.isCurrentPaymentMethodActive?1:0)}}function Ao(e,a){if(e&1&&(s(0,"strong"),m(1),l(2,"translate"),r()),e&2){let t=c(3);o(),f(h(2,1,"RESUME_SUSPENDED_PAYMENTS.EDIT.AFFECTED_GIFTS",U(4,ge,t.validatedContributions.length)))}}function Do(e,a){if(e&1){let t=M();s(0,"app-icon",33),y("click",function(n){g(t);let d=c(4);return P(d.onStatusIcon(n))}),r()}}function No(e,a){if(e&1){let t=M();s(0,"app-icon",34),l(1,"translate"),y("click",function(n){g(t);let d=c(4);return P(d.onStatusIcon(n))}),r()}if(e&2){let t=c().$implicit;C("cursorPointer",!0)("tooltip",h(1,2,"RESUME_SUSPENDED_PAYMENTS.EDIT.GIFT_STATUS_TOOLTIP",U(5,go,t.upcomingContribution.giftStatus)))}}function Io(e,a){if(e&1){let t=M();s(0,"app-icon",35),l(1,"translate"),y("click",function(n){g(t);let d=c(4);return P(d.onStatusIcon(n))}),r()}e&2&&C("cursorPointer",!0)("tooltip",_(1,2,"RESUME_SUSPENDED_PAYMENTS.EDIT.GIFT_CANNOT_RESUME"))}function Uo(e,a){if(e&1&&(v(0,"div",22),l(1,"displayOnlyDate")),e&2){let t=c().$implicit,i=c(3);C("innerHTML",i.getScheduledContributionHtml(t.upcomingContribution.giftFrequency,_(1,1,t.upcomingContribution.scheduledDate),t.upcomingContribution.scheduledDate),Y)}}function Go(e,a){e&1&&(s(0,"span"),m(1,","),r())}function Fo(e,a){if(e&1&&(s(0,"strong"),m(1),l(2,"translate"),u(3,Go,2,0,"span"),r()),e&2){let t=c(2).$implicit;o(),f(_(2,2,"RESUME_SUSPENDED_PAYMENTS.EDIT.CHECKING_SAVINGS")),o(2),p(t.acceptsCreditCard||t.acceptsAmex?3:-1)}}function Lo(e,a){e&1&&(s(0,"strong"),m(1),l(2,"translate"),r()),e&2&&(o(),f(_(2,1,"RESUME_SUSPENDED_PAYMENTS.EDIT.CREDIT_CARD")))}function Bo(e,a){e&1&&(s(0,"strong"),m(1),l(2,"translate"),r()),e&2&&(o(),f(_(2,1,"RESUME_SUSPENDED_PAYMENTS.EDIT.CREDIT_CARD_NO_AMEX")))}function Oo(e,a){if(e&1&&(s(0,"div",36),m(1),l(2,"translate"),r(),s(3,"div"),m(4),l(5,"translate"),u(6,Fo,4,4,"strong")(7,Lo,3,3,"strong")(8,Bo,3,3,"strong"),r()),e&2){let t=c().$implicit;o(),R(" ",_(2,5,"RESUME_SUSPENDED_PAYMENTS.EDIT.GIFT_CANNOT_RESUME")," "),o(3),R(" ",_(5,7,"RESUME_SUSPENDED_PAYMENTS.EDIT.ACCEPTED_METHODS")," "),o(2),p(t.acceptsAch?6:-1),o(),p(t.acceptsCreditCard&&t.acceptsAmex?7:-1),o(),p(t.acceptsCreditCard&&!t.acceptsAmex?8:-1)}}function wo(e,a){e&1&&(s(0,"p",28),m(1),l(2,"translate"),r()),e&2&&(o(),f(_(2,1,"RESUME_SUSPENDED_PAYMENTS.EDIT.ENTER_VALID_DATE")))}function ko(e,a){e&1&&(s(0,"p",29),m(1),l(2,"translate"),r()),e&2&&(o(),f(_(2,1,"RESUME_SUSPENDED_PAYMENTS.EDIT.REQUIRED")))}function Vo(e,a){if(e&1){let t=M();s(0,"div",7)(1,"div",16),u(2,Do,1,0,"app-icon",17)(3,No,2,7,"app-icon",18)(4,Io,2,4,"app-icon",19),s(5,"div")(6,"strong",20)(7,"span",21),m(8),r(),s(9,"span"),m(10),l(11,"currency"),r()(),u(12,Uo,2,3,"div",22)(13,Oo,9,9),r(),s(14,"button",23),y("click",function(){g(t);let n=it(18),d=c(3);return P(d.onToggleScheduledDateEdit(n))}),s(15,"i",24),m(16,"edit"),r()()(),s(17,"div",25,0)(19,"div",26),v(20,"app-calendar",27,1),u(22,wo,3,3,"p",28)(23,ko,3,3,"p",29),r(),s(24,"div",30)(25,"button",31),l(26,"translate"),y("click",function(){let n=g(t).$implicit,d=it(18),E=c(3);return P(E.onCancelEditDate(n.upcomingContribution.id,d))}),r(),s(27,"button",32),l(28,"translate"),y("click",function(){let n=g(t).$implicit,d=it(18),E=it(21),T=c(3);return P(T.onApplyEditDate(n.upcomingContribution.id,E.value,d))}),r()()()()}if(e&2){let t=a.$implicit,i=c(3);o(2),p(t.upcomingContribution.giftStatus==="Scheduled"?2:-1),o(),p(t.upcomingContribution.giftStatus!=="Scheduled"&&t.canGiftBeResumed?3:-1),o(),p(t.upcomingContribution.giftStatus!=="Scheduled"&&!t.canGiftBeResumed?4:-1),o(4),R("",t.upcomingContribution.fundName," "),o(2),f(h(11,12,t.upcomingContribution.amount,"USD")),o(2),p(t.canGiftBeResumed?12:13),o(8),C("formControlName",i.formControlNamePrefix+t.upcomingContribution.id)("minDate",i.tomorrowsDate),o(2),p(i.scheduledDateFormGroup.get(i.formControlNamePrefix+t.upcomingContribution.id).invalid?22:23),o(3),C("label",_(26,15,"LABEL.CANCEL")),o(2),C("disabled",i.scheduledDateFormGroup.get(i.formControlNamePrefix+t.upcomingContribution.id).invalid)("label",_(28,17,"LABEL.APPLY"))}}function Yo(e,a){if(e&1){let t=M();s(0,"app-icon",41),l(1,"translate"),y("click",function(n){g(t);let d=c(5);return P(d.onStatusIcon(n))}),r()}e&2&&C("cursorPointer",!0)("tooltip",_(1,2,"RESUME_SUSPENDED_PAYMENTS.EDIT.RE_CANNOT_RESUME"))}function $o(e,a){if(e&1){let t=M();s(0,"app-icon",43),l(1,"currency"),l(2,"translate"),y("click",function(n){g(t);let d=c(6);return P(d.onStatusIcon(n))}),r()}if(e&2){let t=c(2).$implicit;C("cursorPointer",!0)("tooltip",h(2,5,"RESUME_SUSPENDED_PAYMENTS.EDIT.RE_MISSED_TOOLTIP",$(8,Po,t.missedPaymentCount,h(1,2,t.missedAmount,"USD"))))}}function jo(e,a){if(e&1){let t=M();s(0,"app-icon",34),l(1,"translate"),y("click",function(n){g(t);let d=c(6);return P(d.onStatusIcon(n))}),r()}e&2&&C("cursorPointer",!0)("tooltip",_(1,2,"RESUME_SUSPENDED_PAYMENTS.EDIT.RE_SUSPENDED_TOOLTIP"))}function Ho(e,a){if(e&1&&u(0,$o,3,11,"app-icon",42)(1,jo,2,4,"app-icon",18),e&2){let t=c().$implicit;p(t.missedAmount>0?0:1)}}function zo(e,a){if(e&1&&(s(0,"span",39),m(1),l(2,"currency"),r()),e&2){let t=c().$implicit;o(),f(h(2,1,t.missedAmount,"USD"))}}function Ko(e,a){e&1&&(s(0,"span",45),m(1),l(2,"translate"),r()),e&2&&(o(),f(_(2,1,"RESUME_SUSPENDED_PAYMENTS.AMOUNT_DUE")))}function Qo(e,a){if(e&1&&(m(0),l(1,"date"),l(2,"date")),e&2){let t=c(3).$implicit;
1vt(" ",h(1,2,t.nextScheduledDate,"MM/dd/yyyy")," - ",h(2,5,t.lastScheduledDate,"MM/dd/yyyy")," ")}}function Wo(e,a){if(e&1&&(m(0),l(1,"date")),e&2){let t=c(3).$implicit;R(" ",h(1,1,t.nextScheduledDate,"MM/dd/yyyy")," ")}}function qo(e,a){if(e&1&&(s(0,"div"),m(1),l(2,"translate"),r()),e&2){let t=c(3).$implicit;o(),f(h(2,1,"RESUME_SUSPENDED_PAYMENTS.UPCOMING_PAYMENTS",U(4,ge,t.futurePaymentCount)))}}function Xo(e,a){if(e&1&&(s(0,"div",44)(1,"span"),m(2),l(3,"currency"),l(4,"translate"),l(5,"translate"),r(),u(6,Ko,3,3,"span",45),r(),s(7,"div"),u(8,Qo,3,8)(9,Wo,2,4),r(),u(10,qo,3,6,"div")),e&2){let t=c(2).$implicit,i=c(4);o(2),f(h(5,9,"RESUME_SUSPENDED_PAYMENTS.AMOUNT_PER_FREQUENCY",$(12,Mo,h(3,4,t.paymentAmount,"USD"),_(4,7,i.getReFrequencyTranslationKey(t.paymentPlanType))))),o(4),p(t.missedAmount>0?6:-1),o(2),p(t.nextScheduledDate&&t.lastScheduledDate&&t.nextScheduledDate!==t.lastScheduledDate?8:t.nextScheduledDate?9:-1),o(2),p(t.futurePaymentCount>0?10:-1)}}function Zo(e,a){if(e&1&&(s(0,"div"),m(1),l(2,"currency"),l(3,"date"),l(4,"translate"),r()),e&2){let t=c(2).$implicit;o(),f(h(4,7,"RESUME_SUSPENDED_PAYMENTS.AMOUNT_ON_DATE",$(10,To,h(2,1,t.balanceDue,"USD"),h(3,4,t.nextScheduledDate,"MM/dd/yyyy"))))}}function Jo(e,a){if(e&1&&(s(0,"div",39),m(1),l(2,"translate"),s(3,"strong"),m(4),l(5,"date"),r()()),e&2){let t=c(2).$implicit,i=c(4);o(),R(" ",_(2,2,"RESUME_SUSPENDED_PAYMENTS.EDIT.PAST_DUE_PROCESS_ON")," "),o(3),f(h(5,4,i.reProcessDates[t.registrationId],"MM/dd/yyyy"))}}function ta(e,a){if(e&1&&u(0,Xo,11,15)(1,Zo,5,13,"div")(2,Jo,6,7,"div",39),e&2){let t=c().$implicit;p(t.paymentPlanType!=="OneTime"?0:1),o(2),p(t.missedAmount>0?2:-1)}}function ea(e,a){e&1&&(s(0,"span"),m(1,","),r())}function ia(e,a){if(e&1&&(s(0,"strong"),m(1),l(2,"translate"),u(3,ea,2,0,"span"),r()),e&2){let t=c(2).$implicit;o(),f(_(2,2,"RESUME_SUSPENDED_PAYMENTS.EDIT.CHECKING_SAVINGS")),o(2),p(t.acceptsCreditCard||t.acceptsAmex?3:-1)}}function na(e,a){e&1&&(s(0,"strong"),m(1),l(2,"translate"),r()),e&2&&(o(),f(_(2,1,"RESUME_SUSPENDED_PAYMENTS.EDIT.CREDIT_CARD")))}function oa(e,a){e&1&&(s(0,"strong"),m(1),l(2,"translate"),r()),e&2&&(o(),f(_(2,1,"RESUME_SUSPENDED_PAYMENTS.EDIT.CREDIT_CARD_NO_AMEX")))}function aa(e,a){if(e&1&&(s(0,"div",46),m(1),l(2,"translate"),r(),s(3,"div"),m(4),l(5,"translate"),u(6,ia,4,4,"strong")(7,na,3,3,"strong")(8,oa,3,3,"strong"),r()),e&2){let t=c().$implicit;o(),R(" ",_(2,5,"RESUME_SUSPENDED_PAYMENTS.EDIT.RE_CANNOT_RESUME")," "),o(3),R(" ",_(5,7,"RESUME_SUSPENDED_PAYMENTS.EDIT.ACCEPTED_METHODS")," "),o(2),p(t.acceptsAch?6:-1),o(),p(t.acceptsCreditCard&&t.acceptsAmex?7:-1),o(),p(t.acceptsCreditCard&&!t.acceptsAmex?8:-1)}}function ra(e,a){if(e&1){let t=M();s(0,"button",23),y("click",function(){g(t),c();let n=it(13),d=c(4);return P(d.onToggleScheduledDateEdit(n))}),s(1,"i",24),m(2,"edit"),r()()}}function sa(e,a){e&1&&(s(0,"p",28),m(1),l(2,"translate"),r()),e&2&&(o(),f(_(2,1,"RESUME_SUSPENDED_PAYMENTS.EDIT.ENTER_VALID_DATE")))}function da(e,a){e&1&&(s(0,"p",29),m(1),l(2,"translate"),r()),e&2&&(o(),f(_(2,1,"RESUME_SUSPENDED_PAYMENTS.EDIT.REQUIRED")))}function ca(e,a){if(e&1){let t=M();s(0,"div",26),v(1,"app-calendar",47,3),u(3,sa,3,3,"p",28)(4,da,3,3,"p",29),r(),s(5,"div",30)(6,"button",31),l(7,"translate"),y("click",function(){g(t),c();let n=it(13),d=c(4);return P(d.onToggleScheduledDateEdit(n))}),r(),s(8,"button",32),l(9,"translate"),y("click",function(){g(t);let n=c().$implicit,d=it(13),E=c(4);return P(E.onApplyReDate(d,n.registrationId))}),r()()}if(e&2){let t,i,n=c().$implicit,d=c(4);o(),C("formControlName",d.reFormControlNamePrefix+n.registrationId)("minDate",d.tomorrowsDate),o(2),p((t=d.scheduledDateFormGroup.get(d.reFormControlNamePrefix+n.registrationId))!=null&&t.invalid?3:4),o(3),C("label",_(7,6,"LABEL.CANCEL")),o(2),C("disabled",(i=d.scheduledDateFormGroup.get(d.reFormControlNamePrefix+n.registrationId))==null?null:i.invalid)("label",_(9,8,"LABEL.APPLY"))}}function la(e,a){if(e&1&&(s(0,"div",7)(1,"div",16),u(2,Yo,2,4,"app-icon",38)(3,Ho,2,1),s(4,"div")(5,"strong",20)(6,"span",21),m(7),r(),u(8,zo,3,4,"span",39),r(),u(9,ta,3,2)(10,aa,9,9),r(),u(11,ra,3,0,"button",40),r(),s(12,"div",25,2),u(14,ca,10,10),r()()),e&2){let t=a.$implicit;o(2),p(t.canBeResumedWithPaymentMethod?3:2),o(5),f(t.termName),o(),p(t.missedAmount>0?8:-1),o(),p(t.canBeResumedWithPaymentMethod?9:10),o(2),p(t.canBeResumedWithPaymentMethod&&t.missedAmount>0?11:-1),o(3),p(t.canBeResumedWithPaymentMethod&&t.missedAmount>0?14:-1)}}function pa(e,a){if(e&1&&(s(0,"strong",37),m(1),l(2,"translate"),r(),K(3,la,15,6,"div",7,yo)),e&2){let t=c(3);o(),f(h(2,1,"RESUME_SUSPENDED_PAYMENTS.EDIT.AFFECTED_RE_PAYMENTS",U(4,ge,t.suspendedReRegistrations.length))),o(2),Q(t.suspendedReRegistrations)}}function ma(e,a){e&1&&(s(0,"span"),m(1),l(2,"translate"),r()),e&2&&(o(),f(_(2,1,"RESUME_SUSPENDED_PAYMENTS.EDIT.VALIDATION_GIFTS")))}function _a(e,a){e&1&&(s(0,"span"),m(1),l(2,"translate"),r()),e&2&&(o(),f(_(2,1,"RESUME_SUSPENDED_PAYMENTS.EDIT.VALIDATION_PAYMENTS")))}function ua(e,a){if(e&1&&(s(0,"p",8),u(1,ma,3,3,"span")(2,_a,3,3,"span"),r()),e&2){let t=c(3);o(),p((t.validatedContributions==null?null:t.validatedContributions.length)>0&&(t.suspendedReRegistrations==null?null:t.suspendedReRegistrations.length)<=0?1:2)}}function Ca(e,a){if(e&1){let t=M();s(0,"button",48),l(1,"translate"),y("click",function(){g(t);let n=c(3);return P(n.onPrevious())}),r()}if(e&2){let t=c(3);C("disabled",t.isReactivating)("label",_(1,2,"LABEL.PREVIOUS"))}}function fa(e,a){if(e&1){let t=M();s(0,"p",6),m(1),r(),u(2,bo,2,1)(3,Ao,3,6,"strong"),K(4,Vo,29,19,"div",7,vo),u(6,pa,5,6)(7,ua,3,1,"p",8),s(8,"div",9),u(9,Ca,2,4,"button",10),v(10,"app-loading-button",11),l(11,"translate"),l(12,"translate"),s(13,"button",12),l(14,"translate"),y("click",function(){g(t);let n=c(2);return P(n.onCancel())}),r()()}if(e&2){let t=c(),i=c();o(),f(i.instructionalText),o(),p(t.updatedPaymentMethod&&!t.updatedPaymentMethod.isRejected&&!t.updatedPaymentMethod.isSuspended?2:-1),o(),p((i.validatedContributions==null?null:i.validatedContributions.length)>0?3:-1),o(),Q(i.validatedContributions),o(2),p((i.suspendedReRegistrations==null?null:i.suspendedReRegistrations.length)>0?6:-1),o(),p(i.scheduledDateFormGroup.valid?-1:7),o(),C("ngClass",i.isCurrentPaymentMethodActive?"gap-0 tab:template-cols-1-auto":"gap-1 tab:template-cols-1-1"),o(),p(i.isCurrentPaymentMethodActive?-1:9),o(),C("disabled",i.isReactivating||!i.scheduledDateFormGroup.valid)("isLoading",i.isReactivating)("label",_(11,15,"LABEL.REACTIVATE"))("loadingLabel",_(12,17,"LABEL.REACTIVATING")),o(3),Ft("mt-1",i.isCurrentPaymentMethodActive),C("disabled",i.isReactivating)("label",_(14,19,"LABEL.CANCEL"))}}function ha(e,a){e&1&&v(0,"app-loading-spinner",5)}function Sa(e,a){if(e&1&&u(0,fa,15,21)(1,ha,1,0,"app-loading-spinner",5),e&2){let t=c();
1p(!t.isLoadingUpcomingContributions&&((t.validatedContributions==null?null:t.validatedContributions.length)>0||(t.suspendedReRegistrations==null?null:t.suspendedReRegistrations.length)>0)?0:1)}}var le=(()=>{class e{constructor(t,i,n,d,E,T,B,at,Pt){this.destroyRef=t,this.formBuilder=i,this.notifySvc=n,this.paymentMethodUtilitySvc=d,this.publicFundsSvc=E,this.reactivatePaymentMethodsAndGiftsSvc=T,this.renderer=B,this.translate=at,this.cloudinary=Pt,this.formControlNamePrefix="schedule-date-input-",this.reFormControlNamePrefix="re-schedule-date-input-",this.hasSetupScheduledDateForm=!1,this.hasReactivatedGifts=!1,this.ifFormValid=!1,this.isCurrentPaymentMethodActive=!1,this.isLoadErrorOnUpcomingContributions=!1,this.isLoadingUpcomingContributions=!0,this.isReactivating=!1,this.isReRegistrationsLoaded=!1,this.reProcessDates={},this.suspendedReRegistrations=[],this.upcomingContributionsRetryCount=0,this.validatedContributions=[]}ngOnInit(){this.scheduledDateFormGroup=this.formBuilder.group({}),this.tomorrowsDate=this.reactivatePaymentMethodsAndGiftsSvc.getTomorrowsDate(),this.userReactivateDetails$=this.reactivatePaymentMethodsAndGiftsSvc.userReactivateDetails$,this.setupReRegistrations(),this.setupGiftEdit(),this.reactivatePaymentMethodsAndGiftsSvc.loadStatus$.pipe(x(t=>{this.isLoadingUpcomingContributions=t.upcomingContributions.isLoading||t.suspendedReRegistrations?.isLoading,this.isLoadErrorOnUpcomingContributions=t.upcomingContributions.isLoadError,this.isReactivating=t.reactivateGifts.isLoading,t.suspendedReRegistrations?.isComplete&&!this.isReRegistrationsLoaded&&(this.isReRegistrationsLoaded=!0,this.checkNoPaymentsToReactivate()),!this.hasReactivatedGifts&&t.reactivateGifts.isComplete&&!t.reactivateGifts.isLoading&&(this.hasReactivatedGifts=!0,this.onReactivateGiftsComplete())}),D(this.destroyRef)).subscribe(),this.reactivatePaymentMethodsAndGiftsSvc.reactivateProcessInfo$.pipe(x(t=>{this.isCurrentPaymentMethodActive=t.isCurrentPaymentMethodActive}),D(this.destroyRef)).subscribe(),this.reactivatePaymentMethodsAndGiftsSvc.currentPaymentMethod$.pipe(x(t=>{t?(this.currentPaymentMethod=t,this.reactivatePaymentMethodsAndGiftsSvc.setUpcomingContributions(t)):this.notifySvc.toast({title:"LABEL.ERROR",message:"FINANCE.LABELS.PAYMENT_METHOD_ERROR",severity:"error"})}),j(1)).subscribe(),this.reactivatePaymentMethodsAndGiftsSvc.updatedPaymentMethod$.pipe(x(t=>{t?this.updatedPaymentMethod=t:this.notifySvc.toast({title:"LABEL.ERROR",message:"FINANCE.LABELS.PAYMENT_METHOD_ERROR",severity:"error"})}),j(1)).subscribe()}get instructionalText(){return this.translate.instant(this.reactivatePaymentMethodsAndGiftsSvc.getEditInstructionTranslationKey(this.validatedContributions?.length??0,this.suspendedReRegistrations?.length??0))}ngAfterViewInit(){this.updateTitle()}updateTitle(){this.reactivatePaymentMethodsAndGiftsSvc.setTitle(this.translate.instant(this.reactivatePaymentMethodsAndGiftsSvc.getEditTitleTranslationKey(this.validatedContributions?.length??0,this.suspendedReRegistrations?.length??0)))}getScheduledContributionHtml(t,i,n){return this.translate.instant(this.reactivatePaymentMethodsAndGiftsSvc.getScheduledContributionTranslationKey(n),Ct({frequency:t,date:i}))}getReFrequencyTranslationKey(t){return this.reactivatePaymentMethodsAndGiftsSvc.getReFrequencyTranslationKey(t)}getPaymentTypeMapping(t){return this.reactivatePaymentMethodsAndGiftsSvc.getPaymentTypeMapping(t)}onApplyEditDate(t,i,n){this.validatedContributions.forEach(d=>{let E=d.upcomingContribution;E.id===t&&(E.scheduledDate=i)}),this.onToggleScheduledDateEdit(n)}onCancel(){this.reactivatePaymentMethodsAndGiftsSvc.navigateToPage("funds")}onCancelEditDate(t,i){this.validatedContributions.forEach(n=>{let d=n.upcomingContribution;if(d.id===t){let E=`${this.formControlNamePrefix}${d.id}`,T=this.formatNextScheduledDate(d.scheduledDate);this.scheduledDateFormGroup.get(E).setValue(T)}}),this.onToggleScheduledDateEdit(i)}onIconClicked(t){t&&this.onPrevious()}onPrevious(){this.reactivatePaymentMethodsAndGiftsSvc.setNextStep(G.PaymentMethodSelection)}onToggleScheduledDateEdit(t){t.classList.contains("hide")?this.renderer.removeClass(t,"hide"):this.renderer.addClass(t,"hide")}onStatusIcon(t){t.preventDefault()}onApplyReDate(t,i){let n=this.scheduledDateFormGroup.get(`${this.reFormControlNamePrefix}${i}`);this.reProcessDates[i]=n?.value??this.tomorrowsDate,this.renderer.addClass(t,"hide")}onSubmit(){if(this.scheduledDateFormGroup.valid){let t=this.setupGiftNextScheduleDates(),i=this.setupRegistrationNextScheduleDates();this.saveReRegistrationProcessDates(),this.reactivatePaymentMethodsAndGiftsSvc.onReactivateGifts(this.currentPaymentMethod,this.updatedPaymentMethod,t,i)}}setupGiftEdit(){this.reactivatePaymentMethodsAndGiftsSvc.userUpcomingContributions$.pipe(It(t=>this.checkUpcomingContributions(t)),x(t=>{this.updateUpcomingContributions=t}),Ut(t=>this.getContributionFundDetails(t)),rt(t=>this.getValidatedContributions(t,this.updateUpcomingContributions)),x(t=>{this.buildScheduledDateFormControls(t)}),D(this.destroyRef)).subscribe()}buildScheduledDateFormControls(t){!this.hasSetupScheduledDateForm&&this.scheduledDateFormGroup&&t.length>0&&(this.hasSetupScheduledDateForm=!0,this.validatedContributions=t,this.updateTitle(),this.validatedContributions.forEach(i=>
1{let n=i.upcomingContribution,d=`${this.formControlNamePrefix}${n.id}`,E=this.formatNextScheduledDate(n.scheduledDate);this.scheduledDateFormGroup.addControl(d,this.formBuilder.control(E,Se.required))}))}getContributionFundDetails(t){return this.publicFundsSvc.getAllPublicFunds().pipe(rt(i=>i.filter(d=>t.some(E=>E.fundId===d.id))),Lt(i=>{throw this.notifySvc.toast({title:"LABEL.ERROR",message:"FINANCE.ERRORS.CANNOT_LOAD_FUNDS",severity:"error"}),this.onCancel(),i}),j(1))}checkNoPaymentsToReactivate(){this.upcomingContributionsRetryCount>=1&&this.suspendedReRegistrations.length===0&&(!this.updateUpcomingContributions||this.updateUpcomingContributions.length===0)&&(this.notifySvc.toast({title:"FINANCE.LABELS.RESUME_GIFTS",message:"FINANCE.MESSAGES.NO_GIFTS_REACTIVATE",severity:"warn"}),this.onCancel())}checkUpcomingContributions(t){return t.length>0?t.some(d=>d.giftStatus!=="Suspended")?(this.notifySvc.toast({title:"FINANCE.LABELS.RESUME_GIFTS",message:"FINANCE.MESSAGES.CANNOT_PROCEED_SCHEDULED_GIFTS",severity:"warn"}),this.onCancel(),!1):!0:(this.upcomingContributionsRetryCount>=1&&this.isReRegistrationsLoaded&&this.suspendedReRegistrations.length===0&&(this.notifySvc.toast({title:"FINANCE.LABELS.RESUME_GIFTS",message:"FINANCE.MESSAGES.NO_GIFTS_REACTIVATE",severity:"warn"}),this.onCancel()),++this.upcomingContributionsRetryCount,!1)}getValidatedContributions(t,i){return i.map(n=>{let d=t.find(B=>B.id===n.fundId),E=this.isCurrentPaymentMethodActive?this.currentPaymentMethod.accountType:this.updatedPaymentMethod.accountType,T=!1;return d&&(this.paymentMethodUtilitySvc.isAch(E)?T=d.acceptsAch:this.paymentMethodUtilitySvc.isCc(E)&&(E==="AmericanExpress"?T=d.acceptsCreditCard&&d.acceptsAmex:T=d.acceptsCreditCard)),{acceptsAch:d.acceptsAch??!1,acceptsAmex:d.acceptsAmex??!1,acceptsCreditCard:d.acceptsCreditCard??!1,canGiftBeResumed:T,upcomingContribution:n}})}formatNextScheduledDate(t){return new Date(t??"")}onReactivateGiftsComplete(){this.reactivatePaymentMethodsAndGiftsSvc.setNextStep(G.GiftsConfirmation)}setupGiftNextScheduleDates(){return this.validatedContributions?.length?this.validatedContributions.filter(t=>t.canGiftBeResumed).map(t=>{let i=t.upcomingContribution,n=`${this.formControlNamePrefix}${i.id}`,E=this.scheduledDateFormGroup.get(n)?.value??i.scheduledDate;return{giftId:i.id,nextScheduledDate:this.formatNextScheduledDate(E)}}):[]}setupReRegistrations(){this.reactivatePaymentMethodsAndGiftsSvc.suspendedReRegistrations$.pipe(It(t=>t.length>0),x(t=>{this.suspendedReRegistrations=t,this.buildReRegistrationFormControls(t),this.updateTitle()}),D(this.destroyRef)).subscribe()}buildReRegistrationFormControls(t){t.filter(i=>i.missedAmount>0).forEach(i=>{let n=`${this.reFormControlNamePrefix}${i.registrationId}`;this.scheduledDateFormGroup.get(n)||this.scheduledDateFormGroup.addControl(n,this.formBuilder.control(this.tomorrowsDate,Se.required)),this.reProcessDates[i.registrationId]=this.tomorrowsDate})}setupRegistrationNextScheduleDates(){return this.suspendedReRegistrations.filter(t=>t.canBeResumedWithPaymentMethod).map(t=>{let i=`${this.reFormControlNamePrefix}${t.registrationId}`,d=this.scheduledDateFormGroup.get(i)?.value??this.tomorrowsDate;return{registrationId:t.registrationId,nextScheduledDate:new Date(d).toISOString()}})}saveReRegistrationProcessDates(){let t=new Map;this.suspendedReRegistrations.filter(i=>i.canBeResumedWithPaymentMethod&&i.missedAmount>0).forEach(i=>{t.set(i.registrationId,this.reProcessDates[i.registrationId]??this.tomorrowsDate)}),this.reactivatePaymentMethodsAndGiftsSvc.setReRegistrationProcessDates(t)}static{this.\u0275fac=function(i){return new(i||e)(S(F),S(ke),S(k),S($e),S(Jt),S(V),S(xe),S(L),S(xt))}}static{this.\u0275cmp=b({type:e,selectors:[["app-gifts-edit"]],standalone:!0,features:[A],decls:3,vars:4,consts:[["editContributionElement",""],["scheduleDateCalendar",""],["editReElement",""],["reScheduleDateCalendar",""],["id","reactivate_payment_form",3,"ngSubmit","formGroup"],[1,"mb-1"],[1,"mt-0"],[1,"border-bottom-solid"],[1,"error","text-center"],[1,"grid","mt-1",3,"ngClass"],["pButton","","id","previous_button","type","button",1,"p-button","p-button-outlined",3,"disabled","label"],["buttonId","reactivate_button","buttonClasse
1s","w-full","type","submit",1,"w-full",3,"disabled","isLoading","label","loadingLabel"],["pButton","","id","cancel_button","type","button",1,"p-button","p-button-link","span-2","justify-self-center",3,"click","disabled","label"],["icon","edit","iconSize","md","iconSeverity","primary",3,"tooltip","donorWalletPaymentMethod"],[3,"donorWalletPaymentMethod"],["icon","edit","iconSize","md","iconSeverity","primary",3,"iconClicked","tooltip","donorWalletPaymentMethod"],[1,"grid","gap-0","tab:template-cols-auto-1-auto","align-items-center","py-0.5"],["severity","success"],["severity","warning","icon","report_problem",3,"cursorPointer","tooltip"],["severity","error","icon","report_problem",3,"cursorPointer","tooltip"],[1,"grid","tab:template-cols-1-auto","font-size-1.125","mb-0.5","justify-content-space-between"],[1,"truncate-text"],[3,"innerHTML"],["pButton","","type","button",1,"p-button","p-button-link","justify-content-center",3,"click"],[1,"material-icons"],[1,"edit-scheduled-date","mt-0.5","hide"],[1,"position-relative"],["label","LABEL.NEXT_PAYMENT_DATE",1,"span-2",3,"formControlName","minDate"],[1,"-mt-1","ml-1","font-size-xs","error"],[1,"-mt-1","ml-1","font-size-xs"],[1,"grid","gap-1","row-gap-0","tab:template-cols-1-1"],["pButton","","type","button",1,"p-button","p-button-outlined","p-button-plain","mb-1",3,"click","label"],["pButton","","type","button",1,"p-button","p-button-outlined","mb-1",3,"click","disabled","label"],["severity","success",3,"click"],["severity","warning","icon","report_problem",3,"click","cursorPointer","tooltip"],["severity","error","icon","report_problem",3,"click","cursorPointer","tooltip"],[1,"gifts-cannot-be-resumed","mb-1","dt:hide"],[1,"block","mt-1"],["severity","error","icon","error",3,"cursorPointer","tooltip"],[1,"color-error"],["pButton","","type","button",1,"p-button","p-button-link","justify-content-center"],["severity","error","icon","error",3,"click","cursorPointer","tooltip"],["severity","error",3,"cursorPointer","tooltip"],["severity","error",3,"click","cursorPointer","tooltip"],[1,"flex","justify-content-space-between"],[1,"font-size-sm"],[1,"gifts-cannot-be-resumed","mb-1"],["label","RESUME_SUSPENDED_PAYMENTS.EDIT.NEXT_PAYMENT_DATE",1,"span-2",3,"formControlName","minDate"],["pButton","","id","previous_button","type","button",1,"p-button","p-button-outlined",3,"click","disabled","label"]],template:function(i,n){if(i&1&&(s(0,"form",4),y("ngSubmit",function(){return n.onSubmit()}),u(1,Sa,2,1),l(2,"async"),r()),i&2){let d;C("formGroup",n.scheduledDateFormGroup),o(),p((d=_(2,2,n.userReactivateDetails$))?1:-1,d)}},dependencies:[Yt,kt,Oe,wt,$t,Vt,we,ft,ut,H,Qe,We,Ge,bt,_t,nt,dt,st,At,w],encapsulation:2})}}return e})();var Ea=["addDonorPaymentMethodComponent"],va=e=>({count:e}),pe=(()=>{class e{constructor(t,i,n){this.notifySvc=t,this.reactivatePaymentMethodsAndGiftsSvc=i,this.translateSvc=n,this.suspendedReRegistrations=[]}ngOnInit(){this.reactivatePaymentMethodsAndGiftsSvc.userReactivateDetails$.pipe(x(t=>{this.upcomingContributions=t.upcomingContributions??[],this.suspendedReRegistrations=t.suspendedReRegistrations??[]})).subscribe()}get affectedPaymentsCount(){return(this.upcomingContributions?.length??0)+(this.suspendedReRegistrations?.length??0)}get addPaymentMethodIntroKey(){return this.reactivatePaymentMethodsAndGiftsSvc.getAddPaymentMethodForAllTranslationKey(this.upcomingContributions?.length??0,this.suspendedReRegistrations?.length??0)}ngAfterViewInit(){this.reactivatePaymentMethodsAndGiftsSvc.setTitle(this.translateSvc.instant("LABEL.ADD_PAYMENT_METHOD"))}onPaymentMethodAdded(t){if(t)if(this.notifySvc.toast({title:"LABEL.SUCCESS",message:"MESSAGE.ADD_NEW_PAYMENT_METHOD_SUCCESS"}),this.upcomingContributions?.length>0||this.suspendedReRegistrations?.length>0){let i=W({},t);this.reactivatePaymentMethodsAndGiftsSvc.setUpdatedPaymentMethod(i),this.reactivatePaymentMethodsAndGiftsSvc.setNextStep(G.GiftsEdit)}else this.navigateToPreviousUrl();else this.notifySvc.toast({title:"LABEL.ERROR",message:"ERROR.ADDING_PAYMENT_METHOD",severity:"error"})}onCancel(){this.reactivatePaymentMethodsAndGiftsSvc.navigateToPage("funds")}onPrevious(){this.reactivatePaymentMethodsAndGiftsSvc.setNextStep(G.PaymentMethodSelection)}onSubmit(){this.addDonorPaymentMethodComponent.addPaymentMethod()}
1navigateToPreviousUrl(){this.reactivatePaymentMethodsAndGiftsSvc.navigateToPage("funds")}static{this.\u0275fac=function(i){return new(i||e)(S(k),S(V),S(L))}}static{this.\u0275cmp=b({type:e,selectors:[["app-add-payment-method"]],viewQuery:function(i,n){if(i&1&&X(Ea,5),i&2){let d;Z(d=J())&&(n.addDonorPaymentMethodComponent=d.first)}},standalone:!0,features:[A],decls:14,vars:22,consts:[["addDonorPaymentMethodComponent",""],[1,"block","mt-0"],[3,"paymentMethodAdded","isFormFullWidth"],[1,"grid","gap-1","tab:template-cols-1-1","mt-1"],["pButton","","id","previous_button","type","button",1,"p-button","p-button-outlined",3,"click","label"],["type","button","buttonId","add_payment_button","buttonClasses","w-full",1,"w-full",3,"label","loadingLabel","isLoading","buttonOnClick","disabled"],["pButton","","id","cancel_button","type","button",1,"p-button","p-button-link","span-2","justify-self-center",3,"click","label"]],template:function(i,n){if(i&1){let d=M();s(0,"section")(1,"p",1),m(2),l(3,"translate"),r(),s(4,"app-add-donor-payment-method",2,0),y("paymentMethodAdded",function(T){return g(d),P(n.onPaymentMethodAdded(T))}),r(),s(6,"section",3)(7,"button",4),l(8,"translate"),y("click",function(){return g(d),P(n.onPrevious())}),r(),v(9,"app-loading-button",5),l(10,"translate"),l(11,"translate"),s(12,"button",6),l(13,"translate"),y("click",function(){return g(d),P(n.onCancel())}),r()()()}if(i&2){let d=it(5);o(2),R(" ",h(3,9,n.addPaymentMethodIntroKey,U(20,va,n.affectedPaymentsCount))," "),o(2),C("isFormFullWidth",!0),o(3),C("label",_(8,12,"LABEL.PREVIOUS")),o(2),C("label",_(10,14,"LABEL.ADD_PAYMENT_METHOD"))("loadingLabel",_(11,16,"LABEL.ADD_PAYMENT_METHOD"))("isLoading",d.isButtonLoading())("buttonOnClick",n.onSubmit.bind(n))("disabled",d.disableSubmitButton()),o(3),C("label",_(13,18,"LABEL.CANCEL"))}},dependencies:[Ze,H,bt,w],encapsulation:2})}}return e})();var ya=(e,a)=>a.id,ga=e=>({count:e});function Pa(e,a){if(e&1){let t=M();s(0,"strong",7),m(1),l(2,"translate"),r(),s(3,"app-match-stick-payment-method",8),y("click",function(){g(t);let n=c(),d=c();return P(d.onReactivatePaymentMethod(n.currentPaymentMethod))}),r()}if(e&2){let t=c();o(),f(_(2,5,"LABEL.UPDATE_SUSPENDED_PAYMENT_METHOD")),o(2),C("donorWalletPaymentMethod",t.currentPaymentMethod)("icon","chevron_right")("iconSize","2xl")("isPaymentMethodInteractive",!0)}}function Ma(e,a){if(e&1){let t=M();s(0,"strong",7),m(1),l(2,"translate"),r(),s(3,"app-match-stick-payment-method",8),y("click",function(){g(t);let n=c(),d=c();return P(d.onSelectActivePaymentMethod(n.currentPaymentMethod,n.upcomingContributions,n.suspendedReRegistrations))}),r()}if(e&2){let t=c();o(),f(_(2,5,"LABEL.CURRENT_CONTRIBUTION_METHOD")),o(2),C("donorWalletPaymentMethod",t.currentPaymentMethod)("icon","chevron_right")("iconSize","2xl")("isPaymentMethodInteractive",!0)}}function Ta(e,a){if(e&1){let t=M();s(0,"app-match-stick-payment-method",8),y("click",function(){g(t);let n=c().$implicit,d=c(3),E=c();return P(E.onSelectActivePaymentMethod(n,d.upcomingContributions,d.suspendedReRegistrations))}),r()}if(e&2){let t=c().$implicit;C("donorWalletPaymentMethod",t)("icon","chevron_right")("iconSize","2xl")("isPaymentMethodInteractive",!0)}}function Ra(e,a){if(e&1&&(s(0,"div"),u(1,Ta,1,4,"app-match-stick-payment-method",9),r()),e&2){let t=a.$implicit,i=c(3);o(),p(t.id!==i.currentPaymentMethod.id?1:-1)}}function xa(e,a){if(e&1&&(s(0,"section")(1,"strong",7),m(2),l(3,"translate"),r(),K(4,Ra,2,1,"div",null,ya),r()),e&2){let t=c(2),i=c();o(2),R(" ",h(3,1,i.getChooseEligibleIntroKey(t),U(4,ga,i.getAffectedPaymentsCount(t)))," "),o(2),Q(a)}}function ba(e,a){if(e&1&&(u(0,xa,6,6,"section"),l(1,"async")),e&2){let t,i=c(2);p((t=_(1,1,i.allActivePaymentMethods$))?0:-1,t)}}function Aa(e,a){e&1&&v(0,"app-loading-spinner",0)}function Da(e,a){if(e&1){let t=M();s(0,"button",10),l(1,"translate"),y("click",function(){g(t);let n=c(2);return P(n.onPrevious())}),r()}e&2&&C("label",_(1,1,"LABEL.PREVIOUS"))}function Na(e,a){if(e&1){let t=M();u(0,Pa,4,7)(1,Ma,4,7)(2,ba,2,3)(3,Aa,1,0,"app-loading-spinner",0),s(4,"section",1),y("click",function(){g(t);let n=c();return P(n.onAddPaymentMethod())}),v(5,"app-icon",2),s(6,"strong",3),m(7),l(8,"translate"),r()(),s(9,"section",4),u(10,Da,2,3,"button",5),s(11,"button",6),l(12,"translate"),y("click",function(){g(t);let n=c();return P(n.onCancel())}),r()()}if(e&2){let t=a,i=c();p(t.currentPaymentMethod.isSuspended||t.currentPaymentMethod.isRejected?0:1),o(2),p(i.isLoadingPaymentMethods?3:2),o(5),R(" ",_(8,5,"LABEL.ADD_PAYMENT_METHOD")," "),o(3),p(t!=null&&t.currentPaymentMethod?10:-1),o(),C("label",_(12,7,"LABEL.CANCEL"))}}var me=(()=>{class e{constructor(t,i,n){this.destroyRef=t,this.reactivatePaymentMethodsAndGiftsSvc=i,this.translateSvc=n,this.isLoadErrorPaymentMethods=!1,this.isLoadingPaymentMethods=!0}ngOnInit(){this.allActivePaymentMethods$=this.reactivatePaymentMethodsAndGiftsSvc.activePaymentMethods$,this.userReactivateDetails$=this.reactivatePaymentMethodsAndGiftsSvc.userReactivateDetails$,this.reactivatePaymentMethodsAndGiftsSvc.loadStatus$.pipe(x(t=>{this.isLoadingPaymentMethods=t.activePaymentMethods.isLoading,this.isLoadErrorPaymentMethods=t.activePaymentMethods.isLoadError}),D(this.destroyRef)).subscribe(),this.reactivatePaymentMethodsAndGiftsSvc.getActivePaymentMethods()}ngAfterViewInit(){this.reactivatePaymentMethodsAndGiftsSvc.setTitle(this.translateSvc.instant("RESUME_SUSPENDED_PAYMENTS.CHOOSE_PAYMENT_METHOD"))}onAddPaymentMethod(){this.reactivatePaymentMethodsAndGiftsSvc.setNextStep(G.AddPaymentMethod)}onCancel(){this.reactivatePaymentMethodsAndGiftsSvc.navigateToPage("funds")}onPrevious(){this.reactivatePaymentMethodsAndGiftsSvc.setNextStep(G.Summary)}onReactivatePaymentMethod(t){(t.isSuspended||t.isRejected)&&this.reactivatePaymentMethodsAndGiftsSvc.setNextStep(G.ReactivatePaymentMethod)}onSelectActivePaymentMethod(t,i,n){i?.length>0||n?.length>0?(this.reactivatePaymentMethodsAndGiftsSvc.setUpdatedPaymentMethod(t),this.reactivatePaymentMethodsAndGiftsSvc.setNextStep(G.GiftsEdit)):this.reactivatePaymentMethodsAndGiftsSvc.navigateToPage("funds")}getAffectedPaymentsCount(t){return(t.upcomingContributions?.length??0)+(t.suspendedReRegistrations?.length??0)}getChooseEligibleIntroKey(t){return this.reactivatePaymentMethodsAndGiftsSvc.getChooseEligiblePaymentMethodTranslationKey(t.upcomingContributions?.length??0,t.suspendedReRegistrations?.length??0)}static{this.\u0275fac=function(i){return new(i||e)(S(F),S(V),S(L))}}static{this.\u0275cmp=b({type:e,selectors:[["app-payment-method-selection"]],standalone:!0,features:[A],decls:2,vars:3,consts:[[1,"mt-3","mb-1"],[1,"add-contribution-method","grid","gap-1","template-cols-auto-1","align-items-center","p-1","mb-1",3,"click"],["icon","add_circle"],[1,"font-size-1.12"],[1,"grid","gap-0","template-cols-1-auto","mt-1"],["pButton","","id","previous_button","type","button",1,"p-button","p-button-outlined",3,"label"],["pButton","","id","cancel_button","type","button",1,"p-button","p-button-link","span-2","justify-self-center",3,"click","label"],[1,"block","mb-1"],[3,"click","donorWalletPaymentMethod","icon","iconSize","isPaymentMethodInteractive"],[3,"donorWalletPaymentMethod","icon","iconSize","isPaymentMethodInteractive"],["pButton","","id","previous_button","type","button",1,"p-button","p-button-outlined",3,"click","label"]],template:function(i,n){if(i&1&&(u(0,Na,13,9),l(1,"async")),i&2){let d;p((d=_(1,1,n.userReactivateDetails$))?0:-1,d)}},dependencies:[ft,_t,ut,H,nt,w],styles:[".add-contribution-method[_ngcontent-%COMP%]{border-width:.0625rem;border-style:solid;border-color:transparent;cursor:pointer}.add-contribution-method[_ngcontent-%COMP%]:active{border-color:var(--primary-color);box-shadow:inset 0 0 0 .125rem var(--primary-color)}.add-contribution-method[_ngcontent-%COMP%]:hover{border-width:.0625rem;border-style:solid;border-color:#000!important}"]})}}return e})();var Ia=["reactivateDonorBankAccountComponent"],Ua=["reactivateDonorCreditCardComponent"],Ga=e=>({count:e});function Fa(e,a){e&1&&(s(0,"p",3),m(1),l(2,"translate"),r()),e&2&&(o(),R(" ",_(2,1,"RESUME_SUSPENDED_PAYMENTS.ENTE
1R_VALID_SAVINGS_OR_CHECKING")," "))}function La(e,a){if(e&1&&(s(0,"p",3),m(1),l(2,"translate"),r()),e&2){let t=c(3);o(),R(" ",h(2,1,t.getEnterValidBankReactivateTranslationKey(),U(4,Ga,t.affectedPaymentsCount))," ")}}function Ba(e,a){if(e&1){let t=M();s(0,"app-add-donor-bank-account",5,0),y("bankAccountReactivated",function(n){g(t);let d=c(3);return P(d.onPaymentServicesBankAccountReactivated(n))}),r()}if(e&2){let t=c(3);C("externalPaymentSvc",t.externalPaymentSvc)}}function Oa(e,a){if(e&1&&u(0,Fa,3,3,"p",3)(1,La,3,6,"p",3)(2,Ba,2,1,"app-add-donor-bank-account",4),e&2){let t=c(2);p(t.affectedPaymentsCount<=0?0:-1),o(),p(t.affectedPaymentsCount>0?1:-1),o(),p(t.externalPaymentSvc?2:-1)}}function wa(e,a){if(e&1&&v(0,"p",6),e&2){let t=c(3);C("innerHTML",t.enterValidCardHtml,Y)}}function ka(e,a){if(e&1&&v(0,"p",6),e&2){let t=c(3);C("innerHTML",t.enterValidCardReactivateHtml,Y)}}function Va(e,a){if(e&1){let t=M();s(0,"app-add-donor-credit-card",7,1),y("creditCardReactivated",function(n){g(t);let d=c(3);return P(d.onPaymentServicesCreditCardReactivated(n))}),r()}if(e&2){let t=c(3);C("externalPaymentSvc",t.externalPaymentSvc)}}function Ya(e,a){if(e&1&&u(0,wa,1,1,"p",6)(1,ka,1,1,"p",6)(2,Va,2,1,"app-add-donor-credit-card",4),e&2){let t=c(2);p(t.affectedPaymentsCount<=0?0:-1),o(),p(t.affectedPaymentsCount>0?1:-1),o(),p(t.externalPaymentSvc?2:-1)}}function $a(e,a){if(e&1&&u(0,Oa,3,3)(1,Ya,3,3),e&2){let t=c();p(t.isAch?0:-1),o(),p(t.isCreditCard?1:-1)}}function ja(e,a){if(e&1){let t=M();s(0,"section",8)(1,"button",10),l(2,"translate"),y("click",function(){g(t);let n=c(2);return P(n.onPrevious())}),r(),s(3,"app-loading-button",11),l(4,"translate"),l(5,"translate"),y("click",function(){g(t);let n=c(2);return P(n.onSubmit())}),r(),s(6,"button",12),l(7,"translate"),y("click",function(){g(t);let n=c(2);return P(n.onCancel())}),r()()}if(e&2){let t=c(2);o(),C("label",_(2,6,"LABEL.PREVIOUS")),o(2),C("disabled",t.isSubmitButtonDisabled())("isLoading",t.isReactivating)("label",_(4,8,"LABEL.REACTIVATE"))("loadingLabel",_(5,10,"LABEL.REACTIVATING")),o(3),C("label",_(7,12,"LABEL.CANCEL"))}}function Ha(e,a){if(e&1&&(s(0,"section",9),v(1,"app-loading-button",13),l(2,"translate"),l(3,"translate"),r()),e&2){let t=c(2);o(),C("disabled",!0)("isLoading",t.isReactivating)("label",_(2,4,"LABEL.REACTIVATE"))("loadingLabel",_(3,6,"LABEL.REACTIVATING"))}}function za(e,a){if(e&1&&u(0,ja,8,14,"section",8)(1,Ha,4,8,"section",9),e&2){let t=c();p(t.currentPaymentMethod.statusCode!==t.ACH_INSUFFICIENT_FUNDS&&t.currentPaymentMethod.statusCode!==t.CC_INSUFFICIENT_FUNDS?0:1)}}var _e=(()=>{class e{constructor(t,i,n,d,E,T,B){this.destroyRef=t,this.formBuilder=i,this.notifySvc=n,this.paymentMethodSvc=d,this.reactivatePaymentMethodsAndGiftsSvc=E,this.scriptSvc=T,this.translateSvc=B,this.isAch=!1,this.isCreditCard=!1,this.isReactivating=!1,this.suspendedReRegistrations=[],this.ACH_INSUFFICIENT_FUNDS="R01",this.CC_INSUFFICIENT_FUNDS="000051"}ngOnInit(){this.reactivatePaymentMethodFormGroup=this.formBuilder.group({}),this.scriptSvc.load("paymentService").then(()=>{this.externalPaymentSvc=new PaymentServices}).catch(t=>{this.notifySvc.errorBanner({title:"ERROR.LOADING_REACTIVATE_PAYMENT_METHOD_VIEW",message:t.message})}),this.reactivatePaymentMethodsAndGiftsSvc.userReactivateDetails$.pipe(x(t=>{this.currentPaymentMethod=t.currentPaymentMethod,this.currentPaymentMethodType=this.displayAccountType(this.currentPaymentMethod.accountType),this.upcomingContributions=t.upcomingContributions??[],this.suspendedReRegistrations=t.suspendedReRegistrations??[],this.isAch=this.currentPaymentMethod.accountType==="Checking"||this.currentPaymentMethod.accountType==="Savings",this.isCreditCard=!this.isAch,this.isAch?this.reactivateInsufficientFundsBankAccount(this.currentPaymentMethod):this.isCreditCard&&this.reactivateInsufficientFundsCreditCard(this.currentPaymentMethod)}),j(1)).subscribe()}get affectedPaymentsCount(){return(this.upcomingContributions?.length??0)+(this.suspendedReRegistrations?.length??0)}getEnterValidBankReactivateTranslationKey(){return this.reactivatePaymentMethodsAndGiftsSvc.getEnterValidBankReactivateTranslationKey(this.upcomingContributions?.length??0,this.suspendedReRegistrations?.length??0)}getEnterValidCardReactivateTranslationKey(){return this.reactivatePaymentMethodsAndGiftsSvc.getEnterValidCardReactivateTranslationKey(this.upcomingContributions?.length??0,this.suspendedReRegistrations?.length??0)}get enterValidCardHtml(){return this.translateSvc.instant("RESUME_SUSPENDED_PAYMENTS.ENTE
1R_VALID_CARD",{cardType:qt(this.currentPaymentMethodType)})}get enterValidCardReactivateHtml(){return this.translateSvc.instant(this.getEnterValidCardReactivateTranslationKey(),{cardType:qt(this.currentPaymentMethodType),count:qt(this.affectedPaymentsCount)})}ngAfterViewInit(){this.reactivateBankAccounts&&this.reactivateBankAccounts.changes.pipe(Gt(0),x(t=>{this.addDonorBankAccountComponent=t.first,this.addDonorBankAccountComponent&&(this.addDonorBankAccountComponent.initializeBankAccountInfo(this.currentPaymentMethod),this.buildPaymentServicesForm())}),D(this.destroyRef)).subscribe(),this.reactivateCreditCards&&this.reactivateCreditCards.changes.pipe(Gt(0),x(t=>{this.addDonorCreditCardComponent=t.first,this.addDonorCreditCardComponent&&(this.addDonorCreditCardComponent.initializeCreditCardInfo(this.currentPaymentMethod),this.buildPaymentServicesForm())}),D(this.destroyRef)).subscribe(),this.reactivatePaymentMethodsAndGiftsSvc.setTitle(this.translateSvc.instant("LABEL.UPDATE_PAYMENT_METHOD"))}ngOnDestroy(){this.externalPaymentSvc&&(this.externalPaymentSvc.removeAllListeners(),this.externalPaymentSvc.remove())}isSubmitButtonDisabled(){return this.isInvalid()}onCancel(){this.reactivatePaymentMethodsAndGiftsSvc.navigateToPage("funds")}onPrevious(){this.upcomingContributions.length>0?this.reactivatePaymentMethodsAndGiftsSvc.setNextStep(G.PaymentMethodSelection):this.reactivatePaymentMethodsAndGiftsSvc.setNextStep(G.Summary)}onSubmit(){this.isInvalid()?this.notifySvc.errorBanner({title:"LABEL.ERROR",message:"ERROR.REACTIVATE_PAYMENT_METHOD_FAILURE"}):(this.isReactivating=!0,this.reactivatePaymentMethod())}onPaymentServicesBankAccountReactivated(t){this.paymentMethodSvc.userReactivateBankAccount(this.currentPaymentMethod.id,t,this.reactivatePaymentMethodFormGroup.value.addBankAccountForm.routingNumber,this.reactivatePaymentMethodFormGroup.value.addBankAccountForm.bankAccountTypes).subscribe({next:i=>this.onPaymentMethodReactivatedSuccess(i),error:i=>this.onPaymentMethodReactivatedError(i)})}onPaymentServicesCreditCardReactivated(t){this.paymentMethodSvc.userReactivateCreditCard(this.currentPaymentMethod.id,t).subscribe({next:i=>this.onPaymentMethodReactivatedSuccess(i),error:i=>this.onPaymentMethodReactivatedError(i)})}buildPaymentServicesForm(){this.addDonorBankAccountComponent&&this.reactivatePaymentMethodFormGroup.addControl("addBankAccountForm",this.addDonorBankAccountComponent.addBankAccountForm.form),this.addDonorCreditCardComponent&&this.reactivatePaymentMethodFormGroup.addControl("addCreditCardForm",this.addDonorCreditCardComponent.addCreditCardForm.form)}displayAccountType(t){return t==="AmericanExpress"?this.translateSvc.instant("LABEL.AMERICAN_EXPRESS"):t==="MasterCard"?this.translateSvc.instant("LABEL.MASTER_CARD"):t}isInvalid(){return this.addDonorBankAccountComponent?this.reactivatePaymentMethodFormGroup.invalid||!this.addDonorBankAccountComponent.acctNumValid||!this.addDonorBankAccountComponent.validRoutingNumber:this.addDonorCreditCardComponent?this.reactivatePaymentMethodFormGroup.invalid||!this.addDonorCreditCardComponent.cardNumValid||!this.addDonorCreditCardComponent.sameAsPreviousCardType||!this.addDonorCreditCardComponent.expireMonthValid||!this.addDonorCreditCardComponent.expireYearValid:this.reactivatePaymentMethodFormGroup.invalid}navigateToPreviousUrl(){this.reactivatePaymentMethodsAndGiftsSvc.navigateToPage("funds")}onPaymentMethodReactivatedSuccess(t){if(this.isReactivating=!1,this.notifySvc.toast({title:"LABEL.SUCCESS",message:"MESSAGE.REACTIVATED_PAYMENT_METHOD"}),this.upcomingContributions?.length>0||this.suspendedReRegistrations?.length>0){let i=W({},t);this.currentPaymentMethod.id===i.id&&this.reactivatePaymentMethodsAndGiftsSvc.setCurrentPaymentMethod(i),this.reactivatePaymentMethodsAndGiftsSvc.setUpdatedPaymentMethod(i),this.reactivatePaymentMethodsAndGiftsSvc.setNextStep(G.GiftsEdit)}else this.navigateToPreviousUrl()}onPaymentMethodReactivatedError(t){this.isReactivating=!1,this.notifySvc.errorBanner({title:"ERROR.REACTIVATING_PAYMENT_METHOD",message:t.message})}reactivateInsufficientFundsBankAccount(t){t.statusCode===this.ACH_INSUFFICIENT_FUNDS&&(this.isReactivating=!0,this.paymentMethodSvc.userReactivateBankAccount(t.id,t.lastFour,t.routingNumber,t.accountType).subscribe({next:i=>this.onPaymentMethodReactivatedSuccess(i),error:i=>this.onPaymentMethodReactivatedError(i)}))}reactivateInsufficientFundsCreditCard(t){if(t.statusCode===this.CC_INSUFFICIENT_FUNDS){let i={cardType:t.accountType,lastFour:t.lastFour};this.isReactivating=!0,this.paymentMethodSvc.userReactivateCreditCard(t.id,i).subscribe({next:n=>this.onPaymentMethodReactivatedSuccess(n),error:n=>this.onPaymentMethodReactivatedError(n)})}}reactivateAchPaymentMethod(){this.currentPaymentMethod.statusCode===this.ACH_INSUFFICIENT_FUNDS?this.reactivateInsufficientFundsBankAccount(this.currentPaymentMethod):this.addDonorBankAccountComponent?this.addDonorBankAccountComponent.updateBankAccount():this.onPaymentMethodReactivatedError({message:"ERROR.PAYMENT_METHOD_ENTRY_MISSING"})}reactivateCcPaymentMethod(){this.currentPaymentMethod.statusCode===this.CC_INSUFFICIENT_FUNDS?this.reactivateInsufficientFundsCreditCard(this.currentPaymentMethod):this.addDonorCreditCardComponent?this.addDonorCreditCardComponent.updateCreditCard():this.onPaymentMethodReactivatedError({message:"ERROR.PAYMENT_METHOD_ENTRY_MISSING"})}reactivatePaymentMethod(){this.isAch?this.reactivateAchPaymentMethod():this.isCreditCard?this.reactivateCcPaymentMethod():this.onPaymentMethodReactivatedError({message:"ERROR.UNKNOWN_PAYMENT_METHOD_TYPE"})}static{this.\u0275fac=function(i){return new(i||e)(S(F),S(Ve),S(k),S(Wt),S(V),S(je),S(L))}}static{this.\u0275cmp=b({type:e,selectors:[["app-reactivate-payment-method"]],viewQuery:function(i,n){if(i&1&&(X(Ia,5),X(Ua,5)),i&2){let d;
1Z(d=J())&&(n.reactivateBankAccounts=d),Z(d=J())&&(n.reactivateCreditCards=d)}},standalone:!0,features:[A],decls:3,vars:3,consts:[["reactivateDonorBankAccountComponent",""],["reactivateDonorCreditCardComponent",""],["id","reactivate_payment_form",3,"ngSubmit","formGroup"],[1,"mt-0"],[3,"externalPaymentSvc"],[3,"bankAccountReactivated","externalPaymentSvc"],[1,"mt-0",3,"innerHTML"],[3,"creditCardReactivated","externalPaymentSvc"],[1,"grid","gap-1","tab:template-cols-1-1","mt-1"],[1,"grid","gap-1"],["pButton","","id","previous_button","type","button",1,"p-button","p-button-outlined",3,"click","label"],["buttonId","reactivate_button","buttonClasses","w-full","type","submit",1,"w-full",3,"click","disabled","isLoading","label","loadingLabel"],["pButton","","id","cancel_button","type","button",1,"p-button","p-button-link","span-2","justify-self-center",3,"click","label"],["buttonId","reactivate_button","buttonClasses","w-full","type","button",1,"w-full",3,"disabled","isLoading","label","loadingLabel"]],template:function(i,n){i&1&&(s(0,"form",2),y("ngSubmit",function(){return n.onSubmit()}),u(1,$a,2,2)(2,za,2,1),r()),i&2&&(C("formGroup",n.reactivatePaymentMethodFormGroup),o(),p(n.currentPaymentMethod.statusCode!==n.ACH_INSUFFICIENT_FUNDS&&n.currentPaymentMethod.statusCode!==n.CC_INSUFFICIENT_FUNDS?1:-1),o(),p(n.externalPaymentSvc&&(n.isAch||n.isCreditCard)?2:-1))},dependencies:[Yt,kt,wt,$t,Vt,qe,Xe,H,bt,w],encapsulation:2})}}return e})();function Ka(e,a){e&1&&v(0,"app-payment-method-and-gifts-summary")}function Qa(e,a){e&1&&v(0,"app-payment-method-selection")}function Wa(e,a){e&1&&v(0,"app-reactivate-payment-method")}function qa(e,a){e&1&&v(0,"app-add-payment-method")}function Xa(e,a){e&1&&v(0,"app-gifts-edit")}function Za(e,a){e&1&&v(0,"app-gifts-confirmation")}function Ja(e,a){if(e&1&&(s(0,"app-card",0),u(1,Ka,1,0,"app-payment-method-and-gifts-summary")(2,Qa,1,0,"app-payment-method-selection")(3,Wa,1,0,"app-reactivate-payment-method")(4,qa,1,0,"app-add-payment-method")(5,Xa,1,0,"app-gifts-edit")(6,Za,1,0,"app-gifts-confirmation"),r()),e&2){let t,i=a;C("header",i.title),o(),p((t=i.step)==="summary"?1:t==="payment-method-selection"?2:t==="reactivate-payment-method"?3:t==="add-payment-method"?4:t==="gifts-edit"?5:t==="gifts-confirmation"?6:-1)}}var ue=(()=>{class e{constructor(t,i,n){this.activatedRoute=t,this.activePublicTenantSvc=i,this.reactivatePaymentMethodsAndGiftsSvc=n;let E=this.activePublicTenantSvc.getActiveTenant()?.products?.find(T=>T.name===Ye.ReligiousEd);this.isReligiousEdActive=!!E&&!["None","Cancelled"].includes(E.status)}ngOnInit(){if(this.currentPaymentMethod=this.activatedRoute.snapshot.data.paymentMethod,!this.user||!this.orgNumber){this.cancelPaymentMethodAndGiftsReactivation();return}this.currentPaymentMethod.isSuspended||this.currentPaymentMethod.isRejected?(this.setupReactivatePaymentMethodAndGiftsFlow(),this.reactivatePaymentMethodsAndGiftsSvc.setCurrentPaymentMethodActiveStatus(!1),this.reactivatePaymentMethodsAndGiftsSvc.setCurrentPaymentMethod(this.currentPaymentMethod),this.isReligiousEdActive?this.reactivatePaymentMethodsAndGiftsSvc.setSuspendedReRegistrations(this.currentPaymentMethod):this.reactivatePaymentMethodsAndGiftsSvc.skipSuspendedReRegistrations(),this.reactivatePaymentMethodsAndGiftsSvc.setNextStep(G.Summary)):this.currentPaymentMethod.statusText==="Active"?(this.setupReactivatePaymentMethodAndGiftsFlow(),this.reactivatePaymentMethodsAndGiftsSvc.setCurrentPaymentMethodActiveStatus(!0),this.reactivatePaymentMethodsAndGiftsSvc.setCurrentPaymentMethod(this.currentPaymentMethod),this.reactivatePaymentMethodsAndGiftsSvc.setUpdatedPaymentMethod(this.currentPaymentMethod),this.isReligiousEdActive?this.reactivatePaymentMethodsAndGiftsSvc.setSuspendedReRegistrations(this.currentPaymentMethod):this.reactivatePaymentMethodsAndGiftsSvc.skipSuspendedReRegistrations(),this.reactivatePaymentMethodsAndGiftsSvc.setNextStep(G.GiftsEdit)):this.cancelPaymentMethodAndGiftsReactivation()}cancelPaymentMethodAndGiftsReactivation(){this.reactivatePaymentMethodsAndGiftsSvc.navigateToPage("funds")}setupReactivatePaymentMethodAndGiftsFlow(){this.reactivateProcessInfo$=this.reactivatePaymentMethodsAndGiftsSvc.reactivateProcessInfo$.pipe(Gt(0)),this.reactivatePaymentMethodsAndGiftsSvc.setUserInfo({donorId:this.donorId,details:this.user,orgNumber:this.orgNumber})}static{this.\u0275fac=function(i){return new(i||e)(S(ct),S(pt),S(V))}}static{this.\u0275cmp=b({type:e,selectors:[["app-reactivate-payment-method-and-gifts"]],inputs:{donorId:"donorId",orgNumber:"orgNumber",user:"user"},standalone:!0,features:[Ie([V]),A],decls:2,vars:3,consts:[[1,"w-full","max-w-30","mx-auto",3,"header"]],template:function(i,n){if(i&1&&(u(0,Ja,7,2,"app-card",0),l(1,"async")),i&2){let d;p((d=_(1,1,n.reactivateProcessInfo$))?0:-1,d)}},dependencies:[Rt,de,me,_e,pe,le,ce,nt],encapsulation:2})}}return e})();
1var Ce=(()=>{class e{constructor(t,i){this.activePublicTenantSvc=t,this.profileSvc=i,this.destroyRef=O(F)}ngOnInit(){this.user=this.profileSvc.getUserDetail(),this.activePublicTenantSvc.activeTenant.pipe(D(this.destroyRef)).subscribe(t=>{this.orgNumber=t.number;let i=this.user.memberships.find(n=>n.number===this.orgNumber&&n.isDonor);i&&(this.donorId=i.id)})}static{this.\u0275fac=function(i){return new(i||e)(S(pt),S(Tt))}}static{this.\u0275cmp=b({type:e,selectors:[["ng-component"]],standalone:!0,features:[A],decls:2,vars:3,consts:[[1,"reactivate-payment-method","flex","flex-column","justify-content-center"],[3,"donorId","orgNumber","user"]],template:function(i,n){i&1&&(s(0,"div",0),v(1,"app-reactivate-payment-method-and-gifts",1),r()),i&2&&(o(),C("donorId",n.donorId)("orgNumber",n.orgNumber)("user",n.user))},dependencies:[ue],styles:[".reactivate-payment-method[_ngcontent-%COMP%]{max-width:58.5rem;margin:0 auto}"]})}}return e})();var yi=[{path:"",children:[{path:"account",children:[{path:"",component:re,data:{titleKey:"FINANCE.LABELS.MY_ACCOUNT"},resolve:{donorGifts:te}},{path:"mfa",canActivate:[ze],data:{titleKey:"LABEL.SECURITY_SETTINGS"},loadChildren:()=>import("./chunk-AI3RKBUG.js").then(e=>e.SecurityMfaConfigVerifyModule)},{path:"gifts",children:[{path:"",component:oe,data:{titleKey:"FINANCE.LABELS.MY_GIFTS"},resolve:{donorGifts:te}}]},{path:"form-submissions",component:ne,data:{titleKey:"LABEL.MY_FORM_SUBMISSIONS"},resolve:{donorGifts:te}}]},{path:"payment_methods/:paymentMethodId",resolve:{paymentMethod:di},children:[{path:"reactivate",component:Ce,data:{titleKey:"LABEL.REACTIVATE_PAYMENT_METHOD"}}]}]}];var Fl=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=Te({type:e})}static{this.\u0275inj=Me({imports:[Ci,ni,Be.forChild(yi),ii,Fe.forChild(),pe,ce,le,de,me,ne,oe,re,ue,_e,Ce,ee,ae]})}}return e})();export{pe as AddPaymentMethodComponent,ce as GiftsConfirmationComponent,le as GiftsEditComponent,N as LoadState,I as LoadType,de as PaymentMethodAndGiftsSummaryComponent,me as PaymentMethodSelectionComponent,ne as PublicProfileFormSubmissionsViewComponent,oe as PublicProfileGiftsViewComponent,re as PublicProfileViewComponent,Fl as PublicUserProfileModule,ue as ReactivatePaymentMethodAndGiftsComponent,G as ReactivatePaymentMethodAndGiftsSteps,_e as ReactivatePaymentMethodComponent,Ce as ReactivatePaymentMethodViewComponent,ee as UserFormSubmissionsCardComponent,ae as UserTaxStatementsComponent};

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.