PageSourceSearch

https://parishgiving.org/dist/v20260921162853/chunk-2RAZHOOW.js

js parishgiving.org collected 2026-09-28 10:23:43 UTC 299,719 bytes, 22 lines download raw bytes

1import{a as fe}from"./chunk-DFUEYLHN.js";import"./chunk-CS7H7DZC.js";import{a as ze,b as We,d as Y}from"./chunk-QQGZRKT7.js";import{$a as Kt,A as Pt,B as Tt,Ba as Ut,Da as Yt,Ea as re,Eb as ci,Fa as Gt,Ga as zt,H as Et,Ha as te,I as Dt,Ia as Wt,Ka as Z,La as ke,Lb as Jt,Ma as Oe,Na as Ve,Oa as Le,Pa as Ne,Qa as Be,R as ue,Ra as $e,Sa as He,Ta as Ue,Ua as Ye,Va as Ge,W as It,X as Rt,Xa as ge,Y as Ft,Z as kt,_a as jt,ca as Ot,da as Vt,db as ee,ea as Lt,ec as Xt,jb as qt,kb as Qt,m as Mt,n as yt,p as O,q as Fe,s as At,wa as Nt,xa as Bt,ya as $t,z as wt,za as Ht}from"./chunk-XN62CSWA.js";import"./chunk-UW6QIFMU.js";import"./chunk-2LOHUDOS.js";import"./chunk-C5CDHXWF.js";import{$b as vt,La as ve,Ma as Se,Na as Ae,Pa as ht,Qa as bt,Ra as ut,Zb as be,_a as xt,a as ot,ab as he,d as ce,dc as St,fb as Pe,gb as Ct,hc as ae,i as _e,j as mt,l as lt,mb as Te,o as pe,p as dt,q as ct,qb as Ee,sb as De,tb as di,wb as Ie,y as _t,z as pt}from"./chunk-NQUY3MTI.js";import{c as gt,e as we,g as ft}from"./chunk-6PJ3SB5N.js";import"./chunk-KIKLVHNK.js";import{$b as W,Ab as u,Bb as ne,Cb as it,Lb as r,Mb as o,Nb as E,Ob as C,Pb as M,Rb as P,Tb as S,Ub as _,Wc as le,Xc as de,_b as z,ac as j,bb as m,dc as G,ec as l,fb as N,fc as A,gc as f,hc as Q,hd as nt,ja as oe,jc as ye,jd as at,ka as Xe,kc as I,lc as R,mb as me,mc as F,nb as tt,oa as Ce,qc as q,qd as rt,sb as b,td as st,u as U,vc as J,wa as y,wc as X,xa as v,ya as Ze,za as et,zb as Me}from"./chunk-FQL4FABY.js";import{B as Re}from"./chunk-5LRB2TUR.js";import"./chunk-EU2KAMEK.js";import"./chunk-ICPYR57Y.js";import"./chunk-F7M7O7ON.js";import{a as k,b as L,h as Je,k as H}from"./chunk-BI7C37SH.js";var _i=/\b(contribution|contributions|giving|donation|donations)\b/i,pi=/\b(payment|payments|paid)\b/i,hi=/\b(all members|all parishioners|every member|parish[\s-]*wide|entire parish|across (?:the )?parish)\b/i;function ei(t,s,e){let n=xi(t||{});if(bi(n,s),n?.inputScope?.type!=="fullMemberList"||hi.test(s||""))return n;let i=(e||[]).slice().reverse().find(a=>ui(a)&&a?.plan?.source===n?.source&&gi(a?.plan?.filters)&&fi(a.plan.filters,n?.filters||[]));return i&&(n.inputScope={type:"assistantResult",turnRef:i.turnRef},n.rowSelector={type:"all",index:0}),n}function bi(t,s){let e=_i.test(s||""),n=pi.test(s||"");if(e===n)return;let i=e?"YTDContributionAmount":"YTDPaymentAmount",a=d=>d==="YTDContributionAmount"||d==="YTDPaymentAmount"?i:d;t.filters=(t.filters||[]).map(d=>L(k({},d),{field:a(d?.field)})),t.groupBy=(t.groupBy||[]).map(a),t.metrics=(t.metrics||[]).map(d=>L(k({},d),{field:a(d?.field)})),t.sort=(t.sort||[]).map(d=>L(k({},d),{field:a(d?.field)})),t.chart=L(k({},t.chart||{}),{xField:a(t?.chart?.xField),yField:a(t?.chart?.yField)})}function ui(t){let s=t?.resultSet?.selectedIndexes;return!!t?.turnRef&&s!==void 0&&s!==null}function gi(t){return Array.isArray(t)&&t.length>0}function fi(t,s){let e=new Set((s||[]).map(Zt));return(t||[]).every(n=>e.has(Zt(n)))}function Zt(t){return`${t?.field||""}|${t?.op||""}|${je(t?.value)}`}function je(t){return Array.isArray(t)?`[${t.map(je).join(",")}]`:t&&typeof t=="object"?`{${Object.keys(t).sort().map(s=>`${s}:${je(t[s])}`).join(",")}}`:JSON.stringify(t)}function xi(t){return L(k({},t),{inputScope:k({},t?.inputScope||{}),rowSelector:k({},t?.rowSelector||{}),filters:(t?.filters||[]).map(s=>k({},s)),groupBy:[...t?.groupBy||[]],metrics:(t?.metrics||[]).map(s=>k({},s)),sort:(t?.sort||[]).map(s=>k({},s)),chart:k({},t?.chart||{})})}var se=Je(di()),ie=Je(ci());var ti=(()=>{class t{constructor(){this.legacyDatabaseName="parish-giving-assistant-cache",typeof indexedDB<"u"&&indexedDB.deleteDatabase(this.legacyDatabaseName)}getFullList(e,n){return H(this,null,function*(){return null})}saveFullList(e,n){return H(this,null,function*(){})}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=oe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var ii=100*1024*1024,Mi=/(?:password|passwd|credential|authorization|authentication|authtoken|accesstoken|refreshtoken|token|cookie|session|secret|apikey)/i,yi=new Set(["uc","auc","ac","upwd","pwd","auth","t"]),ni=(()=>{class t{constructor(e,n){this.http=e,this.baseUrl=`${n.assistantBase}/assistant/parish-members`}isEnabled(){return!0}listSessions(e){return U(this.http.get(`${this.baseUrl}/sessions`,{headers:this.headers(e)})).then(n=>n.sessions||[])}createSession(e){return U(this.http.post(`${this.baseUrl}/sessions`,{organizationId:`${e}`},{headers:this.headers(e)}))}getSession(e,n){return U(this.http.get(`${this.baseUrl}/sessions/${encodeURIComponent(n)}`,{headers:this.headers(e)}))}deleteSession(e,n){return U(this.http.delete(`${this.baseUrl}/sessions/${encodeURIComponent(n)}`,{headers:this.headers(e)})).then(()=>{})}
1uploadSnapshot(e,n,i,a){return H(this,null,function*(){a?.({stage:"preparing",uploadedBytes:0,totalBytes:0,partNumber:0,partCount:0});let d=this.createSnapshotBlob(i);if(!d.size||d.size>ii)throw new Error(`The member snapshot is empty or exceeds the ${ii/1024/1024} MiB limit.`);let c=yield this.sha256(yield d.arrayBuffer()),p=yield U(this.http.post(`${this.baseUrl}/sessions/${encodeURIComponent(n)}/snapshot-uploads`,{filename:`parish-members-${new Date().toISOString().replace(/[:.]/g,"-")}.jsonl`,byteCount:d.size,rowCount:i.length,sha256:c},{headers:this.headers(e)})),h=0;for(let x=0;x<p.partCount;x+=1){let w=x*p.chunkSize,T=Math.min(d.size,w+p.chunkSize),D=yield d.slice(w,T).arrayBuffer(),V=yield this.sha256(D),B=this.headers(e).set("Content-Type","application/octet-stream").set("x-content-sha256",V);yield this.withRetry(()=>U(this.http.put(`${this.baseUrl}/sessions/${encodeURIComponent(n)}/snapshot-uploads/${encodeURIComponent(p.uploadId)}/parts/${x}`,D,{headers:B}))),h+=D.byteLength,a?.({stage:"uploading",uploadedBytes:h,totalBytes:d.size,partNumber:x+1,partCount:p.partCount})}return a?.({stage:"completing",uploadedBytes:d.size,totalBytes:d.size,partNumber:p.partCount,partCount:p.partCount}),(yield this.withRetry(()=>U(this.http.post(`${this.baseUrl}/sessions/${encodeURIComponent(n)}/snapshot-uploads/${encodeURIComponent(p.uploadId)}/complete`,{},{headers:this.headers(e)})))).snapshot})}sendMessage(e,n,i,a){return U(this.http.post(`${this.baseUrl}/sessions/${encodeURIComponent(n)}/messages`,{messageId:i,question:a},{headers:this.headers(e)}))}pollMessage(e,n,i){return U(this.http.get(`${this.baseUrl}/sessions/${encodeURIComponent(n)}/messages/${encodeURIComponent(i)}`,{headers:this.headers(e)}))}downloadArtifact(e,n,i){return U(this.http.get(`${this.baseUrl}/sessions/${encodeURIComponent(n)}/artifacts/${encodeURIComponent(i.id)}`,{headers:this.headers(e),responseType:"blob"}))}createSnapshotBlob(e){let n=(e||[]).map(i=>JSON.stringify(this.sanitizeValue(i,new WeakSet,0)));return new Blob([`${n.join(`
2`)}
3`],{type:"application/x-ndjson"})}sanitizeValue(e,n,i){if(e==null)return e??null;if(e instanceof Date)return e.toISOString();if(typeof e!="object")return e;if(i>12||n.has(e))return null;if(n.add(e),Array.isArray(e)){let d=e.map(c=>this.sanitizeValue(c,n,i+1));return n.delete(e),d}let a={};return Object.keys(e).forEach(d=>{let c=d.replace(/[^a-z0-9]/gi,"").toLowerCase();!yi.has(c)&&!Mi.test(c)&&(a[d]=this.sanitizeValue(e[d],n,i+1))}),n.delete(e),a}sha256(e){return H(this,null,function*(){let n=yield crypto.subtle.digest("SHA-256",e);return Array.from(new Uint8Array(n)).map(i=>i.toString(16).padStart(2,"0")).join("")})}withRetry(e,n=3){return H(this,null,function*(){let i;for(let a=1;a<=n;a+=1)try{return yield e()}catch(d){i=d,a<n&&(yield new Promise(c=>setTimeout(c,a*250)))}throw i})}headers(e){let n=sessionStorage.getItem("AUC")||sessionStorage.getItem("UC")||"{}",i={};try{i=JSON.parse(n)}catch{i={}}let a={ID:i?.ID,ut:Number(i?.ut??localStorage.getItem("ut"))};return new rt({Accept:"application/json","Content-Type":"application/json","x-pg-uc":JSON.stringify(a),"x-pg-org-id":`${e}`})}static{this.\u0275fac=function(n){return new(n||t)(Ce(st),Ce(ot))}}static{this.\u0275prov=oe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Si=["memberDataPaginator"],Ai=["pendingDataPaginator"],wi=["pendingDataSort"],ai=()=>["Members"],Pi=()=>[25,100,200],Ti=()=>[25,100,200,500],ri=()=>["status","header","arrow","dbHeader"];function Ei(t,s){if(t&1){let e=P();r(0,"button",85),S("click",function(){y(e),_();let i=G(3),a=_(2);return v(a.searchMember(i))}),r(1,"mat-icon",69),l(2,"filter_list"),o(),l(3,"Apply Filters "),o()}}function Di(t,s){if(t&1){let e=P();r(0,"div",86)(1,"mat-checkbox",87),F("ngModelChange",function(i){y(e);let a=_(3);return R(a.exactMatch,i)||(a.exactMatch=i),v(i)}),l(2," Exact Match Only "),o()()}if(t&2){let e=_(3);m(),I("ngModel",e.exactMatch)}}function Ii(t,s){if(t&1){let e=P();r(0,"button",88),S("click",function(){y(e);let i=_(3);return v(i.showNewDistInpts(1))}),l(1," Create Group from Selected Members "),r(2,"mat-icon",69),l(3,"contact_mail"),o()()}}function Ri(t,s){if(t&1){let e=P();r(0,"mat-form-field",89)(1,"mat-label"),l(2,"Group Name"),o(),r(3,"input",90),F("ngModelChange",function(i){y(e);let a=_(3);return R(a.distributionListName,i)||(a.distributionListName=i),v(i)}),o()()}if(t&2){let e=_(3);m(3),u("value",e.distributionListName),I("ngModel",e.distributionListName)}}function Fi(t,s){if(t&1){let e=P();r(0,"mat-form-field",89)(1,"mat-label"),l(2,"Group Description"),o(),r(3,"input",91),F("ngModelChange",function(i){y(e);let a=_(3);
3return R(a.distributionListDesc,i)||(a.distributionListDesc=i),v(i)}),o()()}if(t&2){let e=_(3);m(3),u("value",e.distributionListDesc),I("ngModel",e.distributionListDesc)}}function ki(t,s){if(t&1){let e=P();r(0,"button",92),S("click",function(){y(e);let i=_(3);return v(i.createDistributionListFromMembers())}),l(1," Save New Group "),o()}}function Oi(t,s){if(t&1){let e=P();r(0,"button",93),S("click",function(){y(e);let i=_(3);return v(i.showNewDistInpts(2))}),l(1," Cancel "),o()}}function Vi(t,s){if(t&1){let e=P();r(0,"button",94),S("click",function(){y(e);let i=_(3);return v(i.checkEditPermission(1001)&&i.openNewMemberDetailsDialog())}),l(1," Add New Member "),r(2,"mat-icon",69),l(3,"group_add"),o()()}}function Li(t,s){if(t&1&&(r(0,"button",100),l(1," Send Communication "),r(2,"mat-icon",69),l(3,"send"),o()()),t&2){_();let e=G(3);u("matMenuTriggerFor",e)}}function Ni(t,s){if(t&1){let e=P();r(0,"button",106),S("click",function(){y(e);let i=_(4);return v(i.openParishMembersAssistant())}),r(1,"span",107),l(2,"auto_awesome"),o(),l(3," Ask AI Assistant "),o()}}function Bi(t,s){if(t&1){let e=P();r(0,"button",108),S("click",function(){y(e);let i=_(4);return v(i.exportMembersCSVFiltered())}),l(1," Export Filtered Members "),r(2,"mat-icon",69),l(3,"file_download"),o()()}}function $i(t,s){if(t&1){let e=P();r(0,"button",109),S("click",function(){y(e);let i=_(4);return v(i.exportM())}),l(1," Export All Members "),r(2,"mat-icon",69),l(3,"file_download"),o()()}}function Hi(t,s){if(t&1){let e=P();r(0,"button",109),S("click",function(){y(e);let i=_(4);return v(i.exportMBF())}),l(1," Export Members by Family "),r(2,"mat-icon",69),l(3,"file_download"),o()()}}function Ui(t,s){if(t&1){let e=P();r(0,"button",110),S("click",function(){y(e);let i=_(4);return v(i.exportMembSch())}),l(1," Export Members Schedule "),r(2,"mat-icon",69),l(3,"file_download"),o()()}}function Yi(t,s){t&1&&(r(0,"div",111),E(1,"mat-spinner"),o())}function Gi(t,s){if(t&1){let e=P();r(0,"div",95),b(1,Li,4,1,"button",96),r(2,"mat-menu",97,1),S("click",function(i){return y(e),v(i.stopPropagation())}),r(4,"button",98),S("click",function(){y(e);let i=_(3);return v(i.customEmail("","custom"))}),l(5," Send Email "),r(6,"mat-icon",69),l(7,"email"),o()(),r(8,"button",99),S("click",function(){y(e);let i=_(3);return v(i.customText("","custom"))}),l(9," Send Text "),r(10,"mat-icon",69),l(11,"textsms"),o()()(),r(12,"button",100),l(13," Export options "),r(14,"mat-icon",69),l(15,"file_download"),o()(),b(16,Ni,4,0,"button",101),r(17,"mat-menu",97,2),S("click",function(i){return y(e),v(i.stopPropagation())}),b(19,Bi,4,0,"button",102)(20,$i,4,0,"button",103)(21,Hi,4,0,"button",103)(22,Ui,4,0,"button",104),o(),b(23,Yi,2,0,"div",105),o()}if(t&2){let e=G(18),n=_(3);m(),u("ngIf",n.checkEditPermission(1004)&&n.checkIfMemberSelected()),m(11),u("matMenuTriggerFor",e),m(4),u("ngIf",!1),m(3),u("ngIf",n.isSearching&&!n.noResults&&!n.refreshLoading&&!n.tableLoading&&!n.uploadingMemberList),m(),u("ngIf",!n.exportingAll&&n.ftag!=""),m(),u("ngIf",!n.exportingAll&&n.ftag!=""),m(),u("ngIf",n.ftag!=""),m(),u("ngIf",n.exportingAll)}}function zi(t,s){t&1&&(r(0,"div",112),E(1,"mat-spinner"),o())}function Wi(t,s){if(t&1){let e=P();r(0,"form",113),S("ngSubmit",function(){y(e);let i=_(3);return v(i.saveCellInfo(i.name,i.val,i.row))}),o()}}function ji(t,s){if(t&1){let e=P();r(0,"div",228)(1,"button",229),S("click",function(){y(e);let i=_(4);return v(i.openMemberHeaderSelector())}),l(2," Edit Table Columns "),r(3,"mat-icon",69),l(4,"view_column"),o()()()}}function Ki(t,s){if(t&1){let e=P();r(0,"th",230)(1,"mat-checkbox",231),S("change",function(i){y(e);let a=_(4);return v(a.toggleSelectAllMembers(i))}),o(),r(2,"span",232),l(3,"Select"),o()()}if(t&2){let e=_(4);m(),u("checked",e.isSelectingAll)}}function qi(t,s){if(t&1){let e=P();r(0,"td",233)(1,"mat-checkbox",234),F("ngModelChange",function(i){let a=y(e).$implicit;return R(a.selected,i)||(a.selected=i),v(i)}),o()()}if(t&2){let e=s.$implicit;m(),I("ngModel",e.selected)}}function Qi(t,s){t&1&&(r(0,"th",235),l(1," Registered to Parish "),o())}function Ji(t,s){if(t&1){let e=P();r(0,"td",233)(1,"mat-checkbox",234),F("ngModelChange",function(i){let a=y(e).$implicit;return R(a.RegisterCensus,i)||(a.RegisterCensus=i),v(i)}),S("ngModelChange",function(){let i=y(e).$implicit,a=_(4);return v(a.updateRegistration(i))}),o()()}if(t&2){let e=s.$implicit;m(),I("ngModel",e.RegisterCensus)}}function Xi(t,s){t&1&&(r(0,"th",235),l(1," Envelope Label "),o())}function Zi(t,s){if(t&1&&(r(0,"td",233),l(1),o()),t&2){let e=s.$implicit;m(),f(" ",e.EnvelopeLable," ")}}function en(t,s){t&1&&(r(0,"th",235),l(1," Envelope "),o())}function tn(t,s){if(t&1){let e=P();r(0,"mat-card",239),S("click",function(i){return y(e),v(i.stopPropagation())}),r(1,"mat-form-field",240)(2,"mat-label"),l(3,"Envelope Number"),o(),r(4,"input",241),F("ngModelChange",function(i){y(e);let a=_(5);return R(a.newEnvNo,i)||(a.newEnvNo=i),v(i)}),o()(),r(5,"button",242),S("click",function(){y(e);let i=_().$implicit,a=_(4);return v(a.updateEnvNo(i))}),l(6,"Save"),o()()}if(t&2){let e=_(5);
3m(4),u("value",e.newEnvNo),I("ngModel",e.newEnvNo)}}function nn(t,s){if(t&1){let e=P();r(0,"td",233)(1,"span",236)(2,"span",237),S("click",function(){let i=y(e).$implicit,a=_(4);return v(a.setSelectedR(i))}),l(3),o(),r(4,"mat-menu",219,4),S("click",function(i){return y(e),v(i.stopPropagation())}),b(6,tn,7,2,"mat-card",238),o()()()}if(t&2){let e=s.$implicit,n=G(5),i=_(4);m(2),u("matMenuTriggerFor",n),m(),f(" ",e.Envelope||"Click to enter"," "),m(3),u("ngIf",i.checkEditPermission(1008))}}function an(t,s){t&1&&(r(0,"th",235),l(1," Child "),o())}function rn(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),f("",e.ChildNames," ")}}function sn(t,s){t&1&&(r(0,"th",235),l(1," Member "),o())}function on(t,s){t&1&&(r(0,"mat-icon",245),l(1," link_off "),o())}function mn(t,s){if(t&1&&(r(0,"td",233)(1,"div",243),b(2,on,2,0,"mat-icon",244),l(3),o()()),t&2){let e=s.$implicit;m(),u("matTooltip",e.ChildNames?e.ChildNames:"")("matTooltipPosition","right"),m(),u("ngIf",e.MOStatus!=1),m(),f(" ",e.DisplayName," ")}}function ln(t,s){t&1&&(r(0,"th",230),l(1," Family Role "),o())}function dn(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),f(" ",e.FamilyRole," ")}}function cn(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("Email")," ")}}function _n(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),f(" ",e.Email," ")}}function pn(t,s){t&1&&(r(0,"th",230),l(1," Cell Phone "),o())}function hn(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit,n=_(4);m(2),f(" ",n.formatPhoneNumber(e.CellPhone)," ")}}function bn(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("Address")," ")}}function un(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),ye(" ",e.Address,", ",e.City,", ",e.State,", ",e.Zip," ")}}function gn(t,s){if(t&1&&(r(0,"th",235)(1,"div",246),l(2),o()()),t&2){let e=_(4);m(2),f(" ",e.acc!=null&&e.acc.CensusSoftware?"Family Contribution YTD":"Contribution YTD"," ")}}function fn(t,s){if(t&1&&(r(0,"span"),l(1),J(2,"currency"),o()),t&2){let e=_().$implicit,n=_(4);m(),f(" ",X(2,1,n.returnSpouseBAttr(e.MemberId,"YTDContributionAmount",e.YTDContributionAmount))," ")}}function xn(t,s){if(t&1&&(r(0,"span"),l(1),J(2,"currency"),o()),t&2){let e=_().$implicit;m(),f(" ",X(2,1,e.YTDContributionAmount)," ")}}function Cn(t,s){if(t&1&&(r(0,"td",233)(1,"span",236),b(2,fn,3,3,"span",247)(3,xn,3,3,"span",247),o()()),t&2){let e=_(4);m(2),u("ngIf",e.filters.family),m(),u("ngIf",!e.filters.family)}}function Mn(t,s){t&1&&(r(0,"th",235),l(1," Payments YTD "),o())}function yn(t,s){if(t&1&&(r(0,"span"),l(1),J(2,"currency"),o()),t&2){let e=_().$implicit,n=_(4);m(),f(" ",X(2,1,n.returnSpouseBAttr(e.MemberId,"YTDPaymentAmount",e.YTDPaymentAmount))," ")}}function vn(t,s){if(t&1&&(r(0,"span"),l(1),J(2,"currency"),o()),t&2){let e=_().$implicit;m(),f(" ",X(2,1,e.YTDPaymentAmount)," ")}}function Sn(t,s){if(t&1&&(r(0,"td",233)(1,"span",236),b(2,yn,3,3,"span",247)(3,vn,3,3,"span",247),o()()),t&2){let e=_(4);m(2),u("ngIf",e.filters.family),m(),u("ngIf",!e.filters.family)}}function An(t,s){t&1&&(r(0,"th",230),l(1," PG Family ID "),o())}function wn(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),f(" ",e.PGFamilyID," ")}}function Pn(t,s){t&1&&(r(0,"th",235),l(1," Sign On Date "),o())}function Tn(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.SignOnDate||"-")}}function En(t,s){t&1&&(r(0,"th",230)(1,"mat-icon",248),l(2," forward_to_inbox "),o()())}function Dn(t,s){if(t&1&&(r(0,"button",253)(1,"mat-icon",254),l(2," forward_to_inbox "),o()()),t&2){_();let e=G(3);u("matMenuTriggerFor",e)}}function In(t,s){if(t&1){let e=P();r(0,"div",255),S("click",function(){y(e);let i=_().$implicit,a=_(4);return v(a.SendWelcomeEmail(i))}),l(1," Send Welcome Email "),o()}}function Rn(t,s){if(t&1){let e=P();r(0,"div",256),S("click",function(){y(e);let i=_().$implicit,a=_(4);return v(a.customEmail(i,"custom"))}),l(1," Send Custom Email "),o()}}function Fn(t,s){if(t&1){let e=P();r(0,"div",256),S("click",function(){y(e);let i=_().$implicit,a=_(4);return v(a.customText(i,"custom"))}),l(1," Send Custom Text "),o()}}function kn(t,s){if(t&1&&(r(0,"td",233),b(1,Dn,3,1,"button",249),r(2,"mat-menu",250,6),b(4,In,2,0,"div",251)(5,Rn,2,0,"div",252)(6,Fn,2,0,"div",252),o()()),t&2){let e=_(4);m(),u("ngIf",e.checkEditPermission(1004)),m(3),u("ngIf",e.checkEditPermission(1004)),m(),u("ngIf",e.checkEditPermission(1004)),m(),u("ngIf",e.checkEditPermission(1004))}}function On(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("Details")," ")}}function Vn(t,s){if(t&1){let e=P();r(0,"td",233)(1,"button",257),S("click",function(){let i=y(e).$implicit,a=_(4);return v(a.openMemberDetailsDialog(i,!1))}),l(2,"Details"),o()()}}function Ln(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("SendEnvelope")," ")}}function Nn(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.SendEnvelope)}}function Bn(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("DateOfDeath")," ")}}function $n(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.DateOfDeath)}}function Hn(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("BaptismDate")," ")}}function Un(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.BaptismDate)}}function Yn(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("BaptismChurch")," ")}}function Gn(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.BaptismChurch)}}function zn(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("ReconciliationDate")," ")}}function Wn(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.ReconciliationDate)}}function jn(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("ReconciliationChurch")," ")}}function Kn(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.ReconciliationChurch)}}function qn(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("CommunionDate")," ")}}function Qn(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.CommunionDate)}}function Jn(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("CommunionChurch")," ")}}function Xn(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.CommunionChurch)}}function Zn(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("ConfirmationDate")," ")}}function ea(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.ConfirmationDate)}}function ta(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("ConfirmationChurch")," ")}}function ia(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.ConfirmationChurch)}}
3function na(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("MarriageCertificate")," ")}}function aa(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.MarriageCertificate)}}function ra(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("BaptismPresiderName")," ")}}function sa(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.BaptismPresiderName)}}function oa(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("BaptismVerified")," ")}}function ma(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.BaptismVerified)}}function la(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("ReconciliationPresiderName")," ")}}function da(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.ReconciliationPresiderName)}}function ca(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("ReconciliationVerified")," ")}}function _a(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.ReconciliationVerified)}}function pa(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("CommunionPresiderName")," ")}}function ha(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.CommunionPresiderName)}}function ba(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("CommunionVerified")," ")}}function ua(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.CommunionVerified)}}function ga(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("ConfirmationPresiderName")," ")}}function fa(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.ConfirmationPresiderName)}}function xa(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("ConfirmationVerified")," ")}}function Ca(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.ConfirmationVerified)}}function Ma(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("BaptismGodParent1")," ")}}function ya(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.BaptismGodParent1)}}function va(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("BaptismGodParent2")," ")}}function Sa(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.BaptismGodParent2)}}function Aa(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("BaptismFatherName")," ")}}function wa(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.BaptismFatherName)}}function Pa(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("BaptismMotherName")," ")}}function Ta(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.BaptismMotherName)}}function Ea(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("ConfirmationName")," ")}}function Da(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.ConfirmationName)}}function Ia(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("ConfirmationSponsorName")," ")}}function Ra(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.ConfirmationSponsorName)}}function Fa(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("ConfirmationFatherName")," ")}}function ka(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.ConfirmationFatherName)}}function Oa(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("ConfirmationMotherName")," ")}}function Va(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.ConfirmationMotherName)}}
3function La(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("BaptismRegistryVol")," ")}}function Na(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.BaptismRegistryVol)}}function Ba(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("BaptismRegistryPage")," ")}}function $a(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.BaptismRegistryPage)}}function Ha(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("BaptismRegistryNo")," ")}}function Ua(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.BaptismRegistryNo)}}function Ya(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("ReconciliationRegistryVol")," ")}}function Ga(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.ReconciliationRegistryVol)}}function za(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("ReconciliationRegistryPage")," ")}}function Wa(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.ReconciliationRegistryPage)}}function ja(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("ReconciliationRegistryNo")," ")}}function Ka(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.ReconciliationRegistryNo)}}function qa(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("CommunionRegistryVol")," ")}}function Qa(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.CommunionRegistryVol)}}function Ja(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("CommunionRegistryPage")," ")}}function Xa(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.CommunionRegistryPage)}}function Za(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("CommunionRegistryNo")," ")}}function er(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.CommunionRegistryNo)}}function tr(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("ConfirmationRegistryVol")," ")}}function ir(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.ConfirmationRegistryVol)}}function nr(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("ConfirmationRegistryPage")," ")}}function ar(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.ConfirmationRegistryPage)}}function rr(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("ConfirmationRegistryNo")," ")}}function sr(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.ConfirmationRegistryNo)}}function or(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("MarriageRegistryVol")," ")}}function mr(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.MarriageRegistryVol)}}function lr(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("MarriageRegistryPage")," ")}}function dr(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.MarriageRegistryPage)}}function cr(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("MarriageRegistryNo")," ")}}function _r(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.MarriageRegistryNo)}}function pr(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("DODRegistryVol")," ")}}function hr(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.DODRegistryVol)}}function br(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("DODRegistryPage")," ")}}function ur(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.DODRegistryPage)}}function gr(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("DODRegistryNo")," ")}}function fr(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.DODRegistryNo)}}function xr(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("FuneralDate")," ")}}function Cr(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.FuneralDate)}}function Mr(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("FuneralChurch")," ")}}function yr(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.FuneralChurch)}}function vr(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("FuneralPresiderName")," ")}}function Sr(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.FuneralPresiderName)}}function Ar(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("FuneralRegistryVol")," ")}}function wr(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.FuneralRegistryVol)}}function Pr(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("FuneralRegistryPage")," ")}}function Tr(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.FuneralRegistryPage)}}function Er(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("FuneralRegistryNo")," ")}}function Dr(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.FuneralRegistryNo)}}function Ir(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("ChildNames")," ")}}function Rr(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.ChildNames)}}function Fr(t,s){t&1&&(r(0,"th",230),l(1," Status "),o())}function kr(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.MOStatus==1?"Linked":"Un-Linked")}}function Or(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("FamilyID")," ")}}function Vr(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.FamilyID)}}function Lr(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("Gender")," ")}}function Nr(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.Gender)}}function Br(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("Volunteer")," ")}}function $r(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.Volunteer)}}function Hr(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("FirstName")," ")}}function Ur(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.FirstName)}}function Yr(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("DOB")," ")}}function Gr(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.DOB)}}function zr(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("CheckEmail")," ")}}function Wr(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.CheckEmail)}}function jr(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("MaidenName")," ")}}function Kr(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.MaidenName)}}function qr(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("Religion")," ")}}function Qr(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.Religion)}}function Jr(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("MiddleName")," ")}}function Xr(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.MiddleName)}}function Zr(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("NotificationEmail")," ")}}function es(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.NotificationEmail)}}function ts(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("Address2")," ")}}function is(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.Address2)}}function ns(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("City")," ")}}function as(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.City)}}function rs(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("State")," ")}}function ss(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.State)}}function os(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("Zip")," ")}}function ms(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.Zip)}}function ls(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("REPrimary")," ")}}function ds(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.REPrimary)}}function cs(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("RESecondary")," ")}}function _s(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.RESecondary)}}function ps(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("CensusPrimary")," ")}}function hs(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.CensusPrimary)}}function bs(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("MarriageCompleted")," ")}}function us(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.MarriageCompleted)}}function gs(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("MarriageDateCompleted")," ")}}function fs(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.MarriageDateCompleted)}}function xs(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("MarriageParish")," ")}}function Cs(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.MarriageParish)}}function Ms(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("Celebrant")," ")}}function ys(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.Celebrant)}}function vs(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("Canonical")," ")}}function Ss(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.Canonical)}}function As(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("HomePhone")," ")}}function ws(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.HomePhone)}}
3function Ps(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("WorkPhone")," ")}}function Ts(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.WorkPhone)}}function Es(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("YTDPaymentAmount")," ")}}function Ds(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.YTDPaymentAmount)}}function Is(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("DisplayName")," ")}}function Rs(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.DisplayName)}}function Fs(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("InParish")," ")}}function ks(t,s){if(t&1&&(r(0,"td",233)(1,"div",236),l(2),o()()),t&2){let e=s.$implicit;m(2),A(e.InParish)}}function Os(t,s){t&1&&E(0,"tr",258)}function Vs(t,s){t&1&&E(0,"tr",259)}function Ls(t,s){if(t&1){let e=P();r(0,"mat-card",260),S("click",function(i){return y(e),v(i.stopPropagation())}),r(1,"mat-form-field",240)(2,"mat-label"),l(3,"Envelope Number"),o(),r(4,"input",241),F("ngModelChange",function(i){y(e);let a=_(4);return R(a.newEnvNo,i)||(a.newEnvNo=i),v(i)}),o()(),r(5,"button",261),S("click",function(){y(e);let i=_(4);return v(i.updateEnvNo())}),l(6,"Save"),o()()}if(t&2){let e=_(4);m(4),u("value",e.newEnvNo),I("ngModel",e.newEnvNo)}}function Ns(t,s){t&1&&(r(0,"th",235),l(1," Select "),o())}function Bs(t,s){if(t&1){let e=P();r(0,"td",233)(1,"mat-checkbox",234),F("ngModelChange",function(i){let a=y(e).$implicit;return R(a.selected,i)||(a.selected=i),v(i)}),o()()}if(t&2){let e=s.$implicit;m(),I("ngModel",e.selected)}}function $s(t,s){t&1&&(r(0,"th",235),l(1," Member "),o())}function Hs(t,s){t&1&&(r(0,"mat-icon",245),l(1," link_off "),o())}function Us(t,s){if(t&1&&(r(0,"td",233)(1,"div",262),b(2,Hs,2,0,"mat-icon",244),l(3),o()()),t&2){let e=s.$implicit;m(2),u("ngIf",e.MOStatus!=1),m(),f(" ",e.DisplayName," ")}}function Ys(t,s){t&1&&(r(0,"th",235),l(1," Amount to Date "),o())}function Gs(t,s){if(t&1&&(r(0,"td",233),l(1),J(2,"currency"),o()),t&2){let e=s.$implicit;m(),f(" ",X(2,1,e.CATD)," ")}}function zs(t,s){t&1&&(r(0,"th",235),l(1," Envelope "),o())}function Ws(t,s){if(t&1){let e=P();r(0,"mat-card",260),S("click",function(i){return y(e),v(i.stopPropagation())}),r(1,"mat-form-field",240)(2,"mat-label"),l(3,"Envelope Number"),o(),r(4,"input",241),F("ngModelChange",function(i){y(e);let a=_(5);return R(a.newEnvNo,i)||(a.newEnvNo=i),v(i)}),o()(),r(5,"button",261),S("click",function(){y(e);let i=_().$implicit,a=_(4);return v(a.updateEnvNo(i))}),l(6,"Save"),o()()}if(t&2){let e=_(5);m(4),u("value",e.newEnvNo),I("ngModel",e.newEnvNo)}}function js(t,s){if(t&1){let e=P();r(0,"td",233)(1,"span")(2,"span",237),S("click",function(){let i=y(e).$implicit,a=_(4);return v(a.setSelectedR(i))}),l(3),o(),r(4,"mat-menu",219,4),S("click",function(i){return y(e),v(i.stopPropagation())}),b(6,Ws,7,2,"mat-card",220),o()()()}if(t&2){let e=s.$implicit,n=G(5),i=_(4);m(2),u("matMenuTriggerFor",n),m(),f(" ",e.Envelope||"Click to enter"," "),m(3),u("ngIf",i.checkEditPermission(1008))}}function Ks(t,s){t&1&&(r(0,"th",235),l(1," Sign-On Date "),o())}function qs(t,s){if(t&1&&(r(0,"td",233),l(1),o()),t&2){let e=s.$implicit;m(),f(" ",e.SignOnDate||"-"," ")}}function Qs(t,s){t&1&&(r(0,"th",235),l(1," Details "),o())}function Js(t,s){if(t&1){let e=P();r(0,"td",233)(1,"button",263),S("click",function(){let i=y(e).$implicit,a=_(4);return v(a.openMemberDetailsDialog(i,!1))}),l(2,"Details"),o()()}}function Xs(t,s){t&1&&E(0,"tr",258)}function Zs(t,s){t&1&&E(0,"tr",259)}function eo(t,s){t&1&&(r(0,"th",235),l(1," Member "),o())}function to(t,s){t&1&&(r(0,"mat-icon",245),l(1," link_off "),o())}function io(t,s){if(t&1){let e=P();r(0,"mat-card",260),S("click",function(i){return y(e),v(i.stopPropagation())}),r(1,"mat-form-field",240)(2,"mat-label"),l(3,"Envelope Number"),o(),r(4,"input",241),F("ngModelChange",function(i){y(e);let a=_(5);return R(a.newEnvNo,i)||(a.newEnvNo=i),v(i)}),o()(),r(5,"button",261),S("click",function(){y(e);let i=_().$implicit,a=_(4);return v(a.updateEnvNo(i))}),l(6,"Save"),o()()}if(t&2){let e=_(5);
3m(4),u("value",e.newEnvNo),I("ngModel",e.newEnvNo)}}function no(t,s){if(t&1){let e=P();r(0,"td",233)(1,"div",264)(2,"mat-expansion-panel",265),S("opened",function(){y(e);let i=_(4);return v(i.panelOpenState=!0)})("closed",function(){y(e);let i=_(4);return v(i.panelOpenState=!1)}),r(3,"mat-expansion-panel-header")(4,"mat-panel-title")(5,"div",262),b(6,to,2,0,"mat-icon",244),l(7),o()(),r(8,"mat-panel-description"),l(9),J(10,"currency"),o()(),r(11,"div")(12,"p"),l(13),o(),r(14,"p"),l(15,"Envelope #: "),r(16,"span")(17,"span",237),S("click",function(){let i=y(e).$implicit,a=_(4);return v(a.setSelectedR(i))}),l(18),o(),r(19,"mat-menu",219,4),S("click",function(i){return y(e),v(i.stopPropagation())}),b(21,io,7,2,"mat-card",220),o()()(),r(22,"p"),l(23),o(),r(24,"button",266),S("click",function(){let i=y(e).$implicit,a=_(4);return v(a.openMemberDetailsDialog(i,!1))}),l(25,"Details"),o()()()()()}if(t&2){let e=s.$implicit,n=G(20),i=_(4);m(6),u("ngIf",e.MOStatus!=1),m(),f(" ",e.DisplayName," "),m(2),f(" Amount to Date: ",X(10,8,e.CATD)," "),m(4),f("Email: ",e.Email," "),m(4),u("matMenuTriggerFor",n),m(),f(" ",e.Envelope||"Click to enter"," "),m(3),u("ngIf",i.checkEditPermission(1008)),m(2),f("Sign-On Date: ",e.SignOnDate||"-","")}}function ao(t,s){t&1&&E(0,"tr",258)}function ro(t,s){t&1&&E(0,"tr",259)}function so(t,s){if(t&1&&(r(0,"div",267),l(1," No result for "),r(2,"h4",268),l(3),o()()),t&2){let e=_(4);m(3),Q(" ",e.searchKB,": ",e.searchTerm," ")}}function oo(t,s){if(t&1){let e=P();r(0,"div",114),b(1,ji,5,0,"div",115),r(2,"div",116)(3,"table",117,3),S("matSortChange",function(i){y(e);let a=_(3);return v(a.sortChanged(i))}),C(5,118),b(6,Ki,4,1,"th",119)(7,qi,2,1,"td",120),M(),C(8,121),b(9,Qi,2,0,"th",122)(10,Ji,2,1,"td",120),M(),C(11,123),b(12,Xi,2,0,"th",122)(13,Zi,2,1,"td",120),M(),C(14,124),b(15,en,2,0,"th",122)(16,nn,7,3,"td",120),M(),C(17,125),b(18,an,2,0,"th",122)(19,rn,3,1,"td",120),M(),C(20,126),b(21,sn,2,0,"th",122)(22,mn,4,4,"td",120),M(),C(23,127),b(24,ln,2,0,"th",119)(25,dn,3,1,"td",120),M(),C(26,128),b(27,cn,2,1,"th",119)(28,_n,3,1,"td",120),M(),C(29,129),b(30,pn,2,0,"th",119)(31,hn,3,1,"td",120),M(),C(32,130),b(33,bn,2,1,"th",119)(34,un,3,4,"td",120),M(),C(35,131),b(36,gn,3,1,"th",122)(37,Cn,4,2,"td",120),M(),C(38,132),b(39,Mn,2,0,"th",122)(40,Sn,4,2,"td",120),M(),C(41,133),b(42,An,2,0,"th",119)(43,wn,3,1,"td",120),M(),C(44,134),b(45,Pn,2,0,"th",122)(46,Tn,3,1,"td",120),M(),C(47,135),b(48,En,3,0,"th",119)(49,kn,7,4,"td",120),M(),C(50,136),b(51,On,2,1,"th",119)(52,Vn,3,0,"td",120),M(),C(53,137),b(54,Ln,2,1,"th",119)(55,Nn,3,1,"td",120),M(),C(56,138),b(57,Bn,2,1,"th",119)(58,$n,3,1,"td",120),M(),C(59,139),b(60,Hn,2,1,"th",119)(61,Un,3,1,"td",120),M(),C(62,140),b(63,Yn,2,1,"th",119)(64,Gn,3,1,"td",120),M(),C(65,141),b(66,zn,2,1,"th",119)(67,Wn,3,1,"td",120),M(),C(68,142),b(69,jn,2,1,"th",119)(70,Kn,3,1,"td",120),M(),C(71,143),b(72,qn,2,1,"th",119)(73,Qn,3,1,"td",120),M(),C(74,144),b(75,Jn,2,1,"th",119)(76,Xn,3,1,"td",120),M(),C(77,145),b(78,Zn,2,1,"th",119)(79,ea,3,1,"td",120),M(),C(80,146),b(81,ta,2,1,"th",119)(82,ia,3,1,"td",120),M(),C(83,147),b(84,na,2,1,"th",119)(85,aa,3,1,"td",120),M(),C(86,148),b(87,ra,2,1,"th",119)(88,sa,3,1,"td",120),M(),C(89,149),b(90,oa,2,1,"th",119)(91,ma,3,1,"td",120),M(),C(92,150),b(93,la,2,1,"th",119)(94,da,3,1,"td",120),M(),C(95,151),b(96,ca,2,1,"th",119)(97,_a,3,1,"td",120),M(),C(98,152),b(99,pa,2,1,"th",119)(100,ha,3,1,"td",120),M(),C(101,153),b(102,ba,2,1,"th",119)(103,ua,3,1,"td",120),M(),C(104,154),b(105,ga,2,1,"th",119)(106,fa,3,1,"td",120),M(),C(107,155),b(108,xa,2,1,"th",119)(109,Ca,3,1,"td",120),M(),C(110,156),b(111,Ma,2,1,"th",119)(112,ya,3,1,"td",120),M(),C(113,157),b(114,va,2,1,"th",119)(115,Sa,3,1,"td",120),M(),C(116,158),b(117,Aa,2,1,"th",119)(118,wa,3,1,"td",120),M(),C(119,159),b(120,Pa,2,1,"th",119)(121,Ta,3,1,"td",120),M(),C(122,160),b(123,Ea,2,1,"th",119)(124,Da,3,1,"td",120),M(),C(125,161),b(126,Ia,2,1,"th",119)(127,Ra,3,1,"td",120),M(),C(128,162),b(129,Fa,2,1,"th",119)(130,ka,3,1,"td",120),M(),C(131,163),b(132,Oa,2,1,"th",119)(133,Va,3,1,"td",120),M(),C(134,164),b(135,La,2,1,"th",119)(136,Na,3,1,"td",120),M(),C(137,165),b(138,Ba,2,1,"th",119)(139,$a,3,1,"td",120),M(),C(140,166),b(141,Ha,2,1,"th",119)(142,Ua,3,1,"td",120),M(),C(143,167),b(144,Ya,2,1,"th",119)(145,Ga,3,1,"td",120),M(),C(146,168),b(147,za,2,1,"th",119)(148,Wa,3,1,"td",120),M(),C(149,169),b(150,ja,2,1,"th",119)(151,Ka,3,1,"td",120),M(),C(152,170),b(153,qa,2,1,"th",119)(154,Qa,3,1,"td",120),M(),C(155,171),b(156,Ja,2,1,"th",119)(157,Xa,3,1,"td",120),M(),C(158,172),b(159,Za,2,1,"th",119)(160,er,3,1,"td",120),M(),C(161,173),b(162,tr,2,1,"th",119)(163,ir,3,1,"td",120),M(),C(164,174),b(165,nr,2,1,"th",119)(166,ar,3,1,"td",120),M(),C(167,175),b(168,rr,2,1,"th",119)(169,sr,3,1,"td",120),M(),C(170,176),b(171,or,2,1,"th",119)(172,mr,3,1,"td",120),M(),C(173,177),b(174,lr,2,1,"th",119)(175,dr,3,1,"td",120),M(),C(176,178),b(177,cr,2,1,"th",119)(178,_r,3,1,"td",120),M(),C(179,179),b(180,pr,2,1,"th",119)(181,hr,3,1,"td",120),M(),C(182,180),b(183,br,2,1,"th",119)(184,ur,3,1,"td",120),M(),C(185,181),b(186,gr,2,1,"th",119)(187,fr,3,1,"td",120),M(),C(188,182),b(189,xr,2,1,"th",119)(190,Cr,3,1,"td",120),M(),C(191,183),b(192,Mr,2,1,"th",119)(193,yr,3,1,"td",120),M(),C(194,184),b(195,vr,2,1,"th",119)(196,Sr,3,1,"td",120),M(),C(197,185),b(198,Ar,2,1,"th",119)(199,wr,3,1,"td",120),M(),C(200,186),b(201,Pr,2,1,"th",119)(202,Tr,3,1,"td",120),M(),C(203,187),b(204,Er,2,1,"th",119)(205,Dr,3,1,"td",120),M(),C(206,188),b(207,Ir,2,1,"th",119)(208,Rr,3,1,"td",120),M(),C(209,189),b(210,Fr,2,0,"th",119)(211,kr,3,1,"td",120),M(),C(212,190),b(213,Or,2,1,"th",119)(214,Vr,3,1,"td",120),M(),C(215,191),b(216,Lr,2,1,"th",119)(217,Nr,3,1,"td",120),M(),C(218,192),b(219,Br,2,1,"th",119)(220,$r,3,1,"td",120),M(),C(221,193),b(222,Hr,2,1,"th",119)(223,Ur,3,1,"td",120),M(),C(224,194),b(225,Yr,2,1,"th",119)(226,Gr,3,1,"td",120),M(),C(227,195),b(228,zr,2,1,"th",119)(229,Wr,3,1,"td",120),M(),C(230,196),b(231,jr,2,1,"th",119)(232,Kr,3,1,"td",120),M(),C(233,197),b(234,qr,2,1,"th",119)(235,Qr,3,1,"td",120),M(),C(236,198),b(237,Jr,2,1,"th",119)(238,Xr,3,1,"td",120),M(),C(239,199),b(240,Zr,2,1,"th",119)(241,es,3,1,"td",120),M(),C(242,200),b(243,ts,2,1,"th",119)(244,is,3,1,"td",120),M(),C(245,201),b(246,ns,2,1,"th",119)(247,as,3,1,"td",120),M(),C(248,202),b(249,rs,2,1,"th",119)(250,ss,3,1,"td",120),M(),C(251,203),b(252,os,2,1,"th",119)(253,ms,3,1,"td",120),M(),C(254,204),b(255,ls,2,1,"th",119)(256,ds,3,1,"td",120),M(),C(257,205),b(258,cs,2,1,"th",119)(259,_s,3,1,"td",120),M(),C(260,206),b(261,ps,2,1,"th",119)(262,hs,3,1,"td",120),M(),C(263,207),b(264,bs,2,1,"th",119)(265,us,3,1,"td",120),M(),C(266,208),b(267,gs,2,1,"th",119)(268,fs,3,1,"td",120),M(),C(269,209),b(270,xs,2,1,"th",119)(271,Cs,3,1,"td",120),M(),C(272,210),b(273,Ms,2,1,"th",119)(274,ys,3,1,"td",120),M(),C(275,211),b(276,vs,2,1,"th",119)(277,Ss,3,1,"td",120),M(),C(278,212),b(279,As,2,1,"th",119)(280,ws,3,1,"td",120),M(),C(281,213),b(282,Ps,2,1,"th",119)(283,Ts,3,1,"td",120),M(),C(284,214),b(285,Es,2,1,"th",119)(286,Ds,3,1,"td",120),M(),C(287,215),b(288,Is,2,1,"th",119)(289,Rs,3,1,"td",120),M(),C(290,216),b(291,Fs,2,1,"th",119)(292,ks,3,1,"td",120),M(),b(293,Os,1,0,"tr",217)(294,Vs,1,0,"tr",218),o(),r(295,"mat-menu",219,4),S("click",function(i){return y(e),v(i.stopPropagation())}),b(297,Ls,7,2,"mat-card",220),o()(),r(298,"div",116)(299,"table",221,3),C(301,118),b(302,Ns,2,0,"th",122)(303,Bs,2,1,"td",120),M(),C(304,126),b(305,$s,2,0,"th",122)(306,Us,4,2,"td",120),M(),C(307,131),b(308,Ys,2,0,"th",122)(309,Gs,3,3,"td",120),M(),C(310,222),b(311,zs,2,0,"th",122)(312,js,7,3,"td",120),M(),C(313,134),b(314,Ks,2,0,"th",122)(315,qs,2,1,"td",120),M(),C(316,136),b(317,Qs,2,0,"th",122)(318,Js,3,0,"td",120),M(),b(319,Xs,1,0,"tr",217)(320,Zs,1,0,"tr",218),o()(),r(321,"table",223,3),C(323,224),b(324,eo,2,0,"th",122)(325,no,26,10,"td",120),M(),b(326,ao,1,0,"tr",225)(327,ro,1,0,"tr",218),o(),b(328,so,4,2,"div",226),r(329,"mat-paginator",227,5),S("page",function(i){y(e);let a=_(3);return v(a.pageChanged(i))}),o()()}if(t&2){let e=_(3);m(),u("ngIf",e.checkEditPermission(1030)||e.isPGUser),m(2),u("dataSource",e.MemberDataSource)("matSortActive",e.sortActive)("matSortDirection",e.sortDir),m(290),u("matHeaderRowDef",e.displayedMemberColumns)("matHeaderRowDefSticky",!0),m(),u("matRowDefColumns",e.displayedMemberColumns),m(3),u("ngIf",e.checkEditPermission(1008)),m(2),u("dataSource",e.MemberDataSource),m(20),u("matHeaderRowDef",e.mobileDisplayedMemberColumns)("matHeaderRowDefSticky",!0),m(),u("matRowDefColumns",e.mobileDisplayedMemberColumns),m(),u("dataSource",e.MemberDataSource),m(5),u("matHeaderRowDef",q(19,ai)),m(),u("matRowDefColumns",q(20,ai)),m(),u("ngIf",(e.MemberDataSource==null||e.MemberDataSource.data==null?null:e.MemberDataSource.data.length)==0&&e.searchKB),m(),u("showFirstLastButtons",!0)("pageSize",e.re
3cordsToGet)("pageSizeOptions",q(21,Pi))}}function mo(t,s){t&1&&(r(0,"div",269),l(1," Your search returned no results. "),o())}function lo(t,s){t&1&&(r(0,"div",270)(1,"mat-icon",271),l(2,"search"),o(),l(3," Make a search to view members. "),o())}function co(t,s){t&1&&(r(0,"div",112),E(1,"mat-spinner"),o())}function _o(t,s){if(t&1){let e=P();r(0,"mat-tab",27)(1,"mat-drawer-container",28)(2,"mat-drawer",29,0)(4,"div",30)(5,"form",31)(6,"div",32)(7,"h4",33),l(8,"Filters"),o(),r(9,"div",34),S("click",function(){y(e);let i=G(3),a=_(2);return v(a.resetFilters(i))}),l(10," Reset "),r(11,"mat-icon",35),l(12,"filter_alt_off"),o()()(),E(13,"mat-divider",36),r(14,"mat-checkbox",37),F("ngModelChange",function(i){y(e);let a=_(2);return R(a.filters.family,i)||(a.filters.family=i),v(i)}),l(15," Group by Family "),o(),r(16,"mat-checkbox",38),F("ngModelChange",function(i){y(e);let a=_(2);return R(a.filters.member,i)||(a.filters.member=i),v(i)}),l(17," Register to Parish "),o(),r(18,"mat-checkbox",39),F("ngModelChange",function(i){y(e);let a=_(2);return R(a.filters.volunteer,i)||(a.filters.volunteer=i),v(i)}),l(19," Interested in Volunteering "),o(),r(20,"mat-checkbox",40),F("ngModelChange",function(i){y(e);let a=_(2);return R(a.filters.includeUnlinkedMember,i)||(a.filters.includeUnlinkedMember=i),v(i)}),S("ngModelChange",function(i){y(e);let a=_(2);return v(a.toggleUnlinkedMember(i,"UnlinkedMemberOnly"))}),l(21," Include delinked member "),o(),r(22,"mat-checkbox",41),F("ngModelChange",function(i){y(e);let a=_(2);return R(a.filters.UnlinkedMemberOnly,i)||(a.filters.UnlinkedMemberOnly=i),v(i)}),S("ngModelChange",function(i){y(e);let a=_(2);return v(a.toggleUnlinkedMember(i,"includeUnlinkedMember"))}),l(23," Unlinked Members Only "),o(),r(24,"mat-checkbox",42),F("ngModelChange",function(i){y(e);let a=_(2);return R(a.filters.InActiveMemberOnly,i)||(a.filters.InActiveMemberOnly=i),v(i)}),l(25," Inactive Members Only "),o(),E(26,"mat-divider",36),r(27,"h4",43),l(28,"Gender"),o(),r(29,"mat-checkbox",44),F("ngModelChange",function(i){y(e);let a=_(2);return R(a.filters.genderFemaleFilter,i)||(a.filters.genderFemaleFilter=i),v(i)}),S("click",function(){y(e);let i=_(2);return v(i.handleRestrictedCheckbox(i.filters.genderFemaleFilter,"genderMaleFilter"))}),l(30," Female Only "),o(),r(31,"mat-checkbox",45),F("ngModelChange",function(i){y(e);let a=_(2);return R(a.filters.genderMaleFilter,i)||(a.filters.genderMaleFilter=i),v(i)}),S("click",function(){y(e);let i=_(2);return v(i.handleRestrictedCheckbox(i.filters.genderMaleFilter,"genderFemaleFilter"))}),l(32," Male Only "),o(),E(33,"mat-divider",36),r(34,"h4",43),l(35,"Age"),o(),r(36,"mat-form-field",46)(37,"mat-label"),l(38,"Minimum Age"),o(),r(39,"input",47),F("ngModelChange",function(i){y(e);let a=_(2);return R(a.filters.Age.Min,i)||(a.filters.Age.Min=i),v(i)}),o()(),r(40,"mat-form-field",48)(41,"mat-label"),l(42,"Maximum Age"),o(),r(43,"input",49),F("ngModelChange",function(i){y(e);let a=_(2);return R(a.filters.Age.Max,i)||(a.filters.Age.Max=i),v(i)}),o()(),E(44,"mat-divider",50),b(45,Ei,4,0,"button",51),o()()(),r(46,"mat-drawer-content")(47,"div",52)(48,"div",30)(49,"form",53),S("ngSubmit",function(){y(e);let i=_(2);return v(i.searchMember())}),r(50,"div",30)(51,"div",54)(52,"mat-form-field",55)(53,"mat-label"),l(54,"Search By"),o(),r(55,"mat-select",56),F("ngModelChange",function(i){y(e);let a=_(2);return R(a.searchType,i)||(a.searchType=i),v(i)}),r(56,"mat-option",57),l(57," Member Name "),o(),r(58,"mat-option",58),l(59," Member Email "),o(),r(60,"mat-option",59),l(61," Member Envelope "),o(),r(62,"mat-option",60),l(63," Child Name "),o(),r(64,"mat-option",61),l(65," Member Phone Number "),o(),r(66,"mat-option",62),l(67," Member Username "),o()()(),r(68,"mat-form-field",63)(69,"mat-label"),l(70,"Search Term"),o(),r(71,"input",64),F("ngModelChange",function(i){y(e);let a=_(2);return R(a.searchTerm,i)||(a.searchTerm=i),v(i)}),o()(),b(72,Di,3,1,"div",65),r(73,"button",66),l(74," Search for Member "),r(75,"mat-icon",67),l(76,"search"),o()(),r(77,"button",68),S("click",function(){y(e);let i=G(3);return v(i.toggle())}),l(78," Filter Your Search "),r(79,"mat-icon",69),l(80,"filter_alt"),o()()()(),r(81,"button",70),S("click",function(){y(e);let i=_(2);return v(i.returnNoEnvMember())}),l(82," View No Envelope Members "),r(83,"mat-icon",69),l(84,"unsubscribe"),o()()(),E(85,"mat-divider",71),r(86,"div",72)(87,"div",73),b(88,Ii,4,0,"button",74)(89,Ri,4,2,"mat-form-field",75)(90,Fi,4,2,"mat-form-field",75)(91,ki,2,0,"button",76)(92,Oi,2,0,"button",77)(93,Vi,4,0,"button",78),o(),b(94,Gi,24,8,"div",79),o()(),b(95,zi,2,0,"div",80)(96,Wi,1,0,"form",81)(97,oo,331,22,"div",82)(98,mo,2,0,"div",83)(99,lo,4,0,"div",84)(100,co,2,0,"div",80),o()()()()}if(t&2){let e=_(2);m(),u("hasBackdrop",!0),m(13),I("ngModel",e.filters.family),m(2),I("ngModel",e.filters.member),m(2),I("ngModel",e.filters.volunteer),m(2),I("ngModel",e.filters.includeUnlinkedMember),m(2),I("ngModel",e.filters.UnlinkedMemberOnly),m(2),I("ngModel",e.filters.InActiveMemberOnly),m(5),I("ngModel",e.filters.genderFemaleFilter),m(2),I("ngModel",e.filters.genderMaleFilter),m(8),I("ngModel",e.filters.Age.Min),m(4),I("ngModel",e.filters.Age.Max),m(2),u("ngIf",!e.filtersLoading),m(10),I("ngModel",e.searchType),m(16),u("value",e.searchTerm),I("ngModel",e.searchTerm),m(),u("ngIf",e.searchType==="memberName"),m(16),u("ngIf",e.checkEditPermission(1004)&&e.checkIfMemberSelected()&&!e.showNewListInputs),m(),u("ngIf",e.showNewListInputs),m(),u("ngIf",e.showNewListInputs),m(),u("ngIf",e.checkEditPermission(1004)&&e.showNewListInputs),m(),u("ngIf",e.showNewListInputs),m(),u("ngIf",!e.showNewListInputs),m(),u("ngIf",!e.showNewListInputs),m(),u("ngIf",e.refreshLoading),m(),u("ngIf",e.checkEditPermission(1001)),m(),u("ngIf",e.isSearching&&!e.noResults&&!e.refreshLoading&&!e.tableLoading&&!e.uploadingMemberList),m(),u("ngIf",e.isSearching&&!e.refreshLoading&&e.noResults),m(),u("ngIf",!e.isSearching&&!e.refreshLoading&&!e.noResults),m(),u("ngIf",e.refreshLoading||e.tableLoading)}}function po(t,s){if(t&1){let e=P();r(0,"button",106),S("click",function(){y(e);let i=_(4);return v(i.openParishMembersAssistant())}),r(1,"span",107),l(2,"auto_awesome"),o(),l(3," Ask AI Assistant "),o()}}function ho(t,s){t&1&&(r(0,"th",235),l(1," Select "),o())}function bo(t,s){if(t&1){let e=P();r(0,"td",233)(1,"mat-checkbox",234),F("ngModelChange",function(i){let a=y(e).$implicit;return R(a.selected,i)||(a.selected=i),v(i)}),o()()}if(t&2){let e=s.$implicit;m(),I("ngModel",e.selected)}}function uo(t,s){t&1&&(r(0,"th",235),l(1," Member "),o())}function go(t,s){t&1&&(r(0,"mat-icon",245),l(1," link_off "),o())}function fo(t,s){if(t&1&&(r(0,"td",233)(1,"div",262),b(2,go,2,0,"mat-icon",244),l(3),o()()),t&2){let e=s.$implicit;m(2),u("ngIf",e.MOStatus!=1),m(),f(" ",e.DisplayName," ")}}function xo(t,s){t&1&&(r(0,"th",235),l(1," Email "),o())}function Co(t,s){if(t&1&&(r(0,"td",233),l(1),o()),t&2){let e=s.$implicit;m(),f(" ",e.Email," ")}}function Mo(t,s){t&1&&(r(0,"th",235),l(1," Cell Phone "),o())}function yo(t,s){if(t&1&&(r(0,"td",233),l(1),o()),t&2){let e=s.$implicit,n=_(4);m(),f(" ",n.formatPhoneNumber(e.CellPhone)," ")}}function vo(t,s){t&1&&(r(0,"th",235),l(1," Address "),o())}function So(t,s){if(t&1&&(r(0,"td",233),l(1),o()),t&2){let e=s.$implicit;m(),ye(" ",e.Address,", ",e.City,", ",e.State,", ",e.Zip," ")}}function Ao(t,s){t&1&&(r(0,"th",235),l(1," PG Family ID "),o())}
3function wo(t,s){if(t&1&&(r(0,"td",233),l(1),o()),t&2){let e=s.$implicit;m(),f(" ",e.PGFamilyID," ")}}function Po(t,s){t&1&&(r(0,"th",235),l(1," Details "),o())}function To(t,s){if(t&1){let e=P();r(0,"td",233)(1,"button",88),S("click",function(){let i=y(e).$implicit,a=_(4);return v(a.openMemberDetailsDialog(i,!0))}),l(2,"Details"),o()()}}function Eo(t,s){t&1&&(r(0,"th",235),l(1," Reject "),o())}function Do(t,s){if(t&1){let e=P();r(0,"button",283),S("click",function(){y(e);let i=_().$implicit,a=_(4);return v(a.rejectPending(i))}),r(1,"span",275),l(2," delete_forever "),o(),l(3," Reject "),o()}}function Io(t,s){if(t&1&&(r(0,"td",233),b(1,Do,4,0,"button",282),o()),t&2){let e=_(4);m(),u("ngIf",e.checkEditPermission(1001)||e.checkEditPermission(1002))}}function Ro(t,s){t&1&&(r(0,"th",235),l(1," Approve "),o())}function Fo(t,s){if(t&1){let e=P();r(0,"button",285),S("click",function(){y(e);let i=_().$implicit,a=_(4);return v(a.approvePending(i))}),r(1,"span",275),l(2," how_to_reg "),o(),l(3," Approve "),o()}}function ko(t,s){if(t&1&&(r(0,"td",233),b(1,Fo,4,0,"button",284),o()),t&2){let e=_(4);m(),u("ngIf",e.checkEditPermission(1001)||e.checkEditPermission(1002))}}function Oo(t,s){t&1&&E(0,"tr",258)}function Vo(t,s){t&1&&E(0,"tr",259)}function Lo(t,s){if(t&1&&(r(0,"div",277),b(1,po,4,0,"button",101),r(2,"div",116)(3,"table",278,7),C(5,118),b(6,ho,2,0,"th",122)(7,bo,2,1,"td",120),M(),C(8,126),b(9,uo,2,0,"th",122)(10,fo,4,2,"td",120),M(),C(11,128),b(12,xo,2,0,"th",122)(13,Co,2,1,"td",120),M(),C(14,129),b(15,Mo,2,0,"th",122)(16,yo,2,1,"td",120),M(),C(17,130),b(18,vo,2,0,"th",122)(19,So,2,4,"td",120),M(),C(20,133),b(21,Ao,2,0,"th",122)(22,wo,2,1,"td",120),M(),C(23,136),b(24,Po,2,0,"th",122)(25,To,3,0,"td",120),M(),C(26,279),b(27,Eo,2,0,"th",122)(28,Io,2,1,"td",120),M(),C(29,280),b(30,Ro,2,0,"th",122)(31,ko,2,1,"td",120),M(),b(32,Oo,1,0,"tr",217)(33,Vo,1,0,"tr",218),o()(),E(34,"mat-paginator",281,8),o()),t&2){let e=_(3);m(),u("ngIf",!1),m(2),u("dataSource",e.PendingDataSource),m(29),u("matHeaderRowDef",e.displayedPendingColumns)("matHeaderRowDefSticky",!0),m(),u("matRowDefColumns",e.displayedPendingColumns),m(),u("showFirstLastButtons",!0)("length",100)("pageSize",25)("pageSizeOptions",q(9,Ti))}}function No(t,s){t&1&&(r(0,"div"),l(1,"No Pending Requests"),o())}function Bo(t,s){t&1&&(r(0,"div",286),E(1,"mat-spinner"),o())}function $o(t,s){if(t&1){let e=P();r(0,"mat-tab",272)(1,"div",52)(2,"div",273)(3,"h4",274),S("click",function(){y(e);let i=_(2);return v(i.openPendingHelpDialog())}),r(4,"span",275),l(5," help_outline "),o(),l(6," Learn about Pending Families "),o()(),b(7,Lo,36,10,"div",276)(8,No,2,0,"div",247)(9,Bo,2,0,"div",14),o()()}if(t&2){let e=_(2);m(7),u("ngIf",!e.pendingLoading&&e.pendingData),m(),u("ngIf",!e.pendingLoading&&!e.pendingData),m(),u("ngIf",e.pendingLoading)}}function Ho(t,s){t&1&&(r(0,"div",112),E(1,"mat-spinner"),o())}function Uo(t,s){t&1&&(r(0,"th",235),l(1," Envelope "),o())}function Yo(t,s){if(t&1&&(r(0,"td",233),l(1),o()),t&2){let e=s.$implicit;m(),f(" ",e.Envelope||"-"," ")}}function Go(t,s){t&1&&(r(0,"th",235),l(1," Member "),o())}function zo(t,s){t&1&&(r(0,"mat-icon",245),l(1," link_off "),o())}function Wo(t,s){if(t&1&&(r(0,"td",233)(1,"div",262),b(2,zo,2,0,"mat-icon",244),l(3),o()()),t&2){let e=s.$implicit;m(2),u("ngIf",e.MOStatus!=1),m(),f(" ",e.DisplayName," ")}}function jo(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("Email")," ")}}function Ko(t,s){if(t&1&&(r(0,"td",233),l(1),o()),t&2){let e=s.$implicit;m(),f(" ",e.Email," ")}}function qo(t,s){t&1&&(r(0,"th",230),l(1," Username "),o())}function Qo(t,s){if(t&1&&(r(0,"td",233),l(1),o()),t&2){let e=s.$implicit;m(),f(" ",e.UserName," ")}}function Jo(t,s){t&1&&(r(0,"th",230),l(1," Cell Phone "),o())}function Xo(t,s){if(t&1&&(r(0,"td",233),l(1),o()),t&2){let e=s.$implicit,n=_(4);m(),f(" ",n.formatPhoneNumber(e.CellPhone)," ")}}function Zo(t,s){t&1&&(r(0,"th",230),l(1," YTD Contribution Amount "),o())}function em(t,s){if(t&1&&(r(0,"td",233),l(1),o()),t&2){let e=s.$implicit;m(),f(" ",e.YTDContributionAmount," ")}}function tm(t,s){t&1&&(r(0,"th",230),l(1," YTD Payment Amount "),o())}function im(t,s){if(t&1&&(r(0,"td",233),l(1),o()),t&2){let e=s.$implicit;m(),f(" ",e.YTDPaymentAmount," ")}}function nm(t,s){t&1&&(r(0,"th",302),l(1," Account to be Merged "),o())}function am(t,s){t&1&&(r(0,"div",305)(1,"span",306),l(2," radio_button_checked "),o()())}function rm(t,s){if(t&1){let e=P();r(0,"div",307),S("click",function(){y(e);let i=_().$implicit,a=_(4);return v(a.checkSelectForMerge("b",i))}),r(1,"span",308),l(2," radio_button_unchecked "),o()()}}function sm(t,s){if(t&1&&(r(0,"td",233),b(1,am,3,0,"div",303)(2,rm,3,0,"div",304),o()),t&2){let e=s.$implicit,n=_(4);m(),u("ngIf",e.MemberId==n.selectedForMergeB.MemberId),m(),u("ngIf",e.MemberId!=n.selectedForMergeB.MemberId)}}function om(t,s){t&1&&(r(0,"th",302),l(1," Account to Keep "),o())}function mm(t,s){t&1&&(r(0,"div",311)(1,"span",312),l(2," radio_button_checked "),o()())}function lm(t,s){if(t&1){let e=P();r(0,"div",313),S("click",function(){y(e);let i=_(2).$implicit,a=_(4);return v(a.checkSelectForMerge("a",i))}),r(1,"span",312),l(2," radio_button_unchecked "),o()()}}function dm(t,s){if(t&1&&(r(0,"div"),b(1,mm,3,0,"div",309)(2,lm,3,0,"div",310),o()),t&2){let e=_().$implicit,n=_(4);m(),u("ngIf",e.MemberId==n.selectedForMergeA.MemberId),m(),u("ngIf",e.MemberId!=n.selectedForMergeA.MemberId)}}function cm(t,s){t&1&&(r(0,"div",311)(1,"span",314),l(2," unpublished "),o()())}function _m(t,s){if(t&1&&(r(0,"td",233),b(1,dm,3,2,"div",247)(2,cm,3,0,"div",309),o()),t&2){let e=s.$implicit;m(),u("ngIf",e.UserName.indexOf(".paynow")==-1&&e.UserName.indexOf(".temp")==-1),m(),u("ngIf",e.UserName.indexOf(".paynow")!=-1||e.UserName.indexOf(".temp")!=-1)}}function pm(t,s){if(t&1&&(r(0,"th",230),l(1),o()),t&2){let e=_(4);m(),f(" ",e.getMemberTableHeaderLabel("Details")," ")}}function hm(t,s){if(t&1){let e=P();r(0,"td",233)(1,"button",88),S("click",function(){let i=y(e).$implicit,a=_(4);return v(a.openMemberDetailsDialog(i,!1))}),l(2,"Details"),o()()}}function bm(t,s){t&1&&E(0,"tr",258)}function um(t,s){t&1&&E(0,"tr",259)}function gm(t,s){if(t&1&&(r(0,"div",295)(1,"table",296,3),C(3,124),b(4,Uo,2,0,"th",122)(5,Yo,2,1,"td",120),M(),C(6,126),b(7,Go,2,0,"th",122)(8,Wo,4,2,"td",120),M(),C(9,128),b(10,jo,2,1,"th",119)(11,Ko,2,1,"td",120),M(),C(12,297),b(13,qo,2,0,"th",119)(14,Qo,2,1,"td",120),M(),C(15,129),b(16,Jo,2,0,"th",119)(17,Xo,2,1,"td",120),M(),C(18,131),b(19,Zo,2,0,"th",119)(20,em,2,1,"td",120),M(),C(21,298),b(22,tm,2,0,"th",119)(23,im,2,1,"td",120),M(),C(24,299),b(25,nm,2,0,"th",300)(26,sm,3,2,"td",120),M(),C(27,301),b(28,om,2,0,"th",300)(29,_m,3,2,"td",120),M(),C(30,136),b(31,pm,2,1,"th",119)(32,hm,3,0,"td",120),M(),b(33,bm,1,0,"tr",217)(34,um,1,0,"tr",218),o()()),t&2){let e=_(3);m(),u("dataSource",e.data.MemberList),m(32),u("matHeaderRowDef",e.mergeMemberColumns)("matHeaderRowDefSticky",!0),m(),u("matRowDefColumns",e.mergeMemberColumns)}}function fm(t,s){t&1&&(r(0,"div",269),l(1," Your search returned no results. "),o())}function xm(t,s){if(t&1&&E(0,"account-card",321),t&2){let e=_(4);u("toKeep",0)("data",e.selectedForMergeB)("uc",e.data.UC)("marital",e.data.MaritalStatus)}}function Cm(t,s){t&1&&(r(0,"mat-card",322),l(1," Select Account To Be Merged. "),o())}function Mm(t,s){t&1&&(r(0,"mat-card",322),l(1," Select Account to keep. "),o())}function ym(t,s){if(t&1&&E(0,"account-card",321),t&2){let e=_(4);u("toKeep",1)("data",e.selectedForMergeA)("uc",e.data.UC)("marital",e.data.MaritalStatus)}}function vm(t,s){if(t&1){let e=P();r(0,"div",328)(1,"h4",329),l(2,"Select the Sign-On Date to Keep:"),o(),r(3,"div",330)(4,"mat-radio-group",331),F("ngModelChange",function(i){y(e);let a=_(5);return R(a.selectedForMergeB.KeepSignOnDate,i)||(a.selectedForMergeB.KeepSignOnDate=i),v(i)}),r(5,"mat-radio-button",332)(6,"div",30)(7,"div"),l(8),o(),r(9,"div"),l(10),o()()(),r(11,"mat-radio-button",332)(12,"div",30)(13,"div"),l(14),o(),r(15,"div"),l(16),o()()()()()()}if(t&2){let e=_(5);
3m(4),I("ngModel",e.selectedForMergeB.KeepSignOnDate),m(),u("value",!0),m(3),f(" ",e.selectedForMergeB.LastName+" "+e.selectedForMergeB.MiddleName+" "+e.selectedForMergeB.FirstName," "),m(2),f(" ",e.selectedForMergeB.SignOnDate," "),m(),u("value",!1)("value",!1),m(3),f(" ",e.selectedForMergeA.LastName+" "+e.selectedForMergeA.MiddleName+" "+e.selectedForMergeA.FirstName," "),m(2),f(" ",e.selectedForMergeA.SignOnDate," ")}}function Sm(t,s){if(t&1){let e=P();r(0,"div",333)(1,"h4",329),l(2,"Select the Username to Keep:"),o(),r(3,"div",330)(4,"mat-radio-group",334),F("ngModelChange",function(i){y(e);let a=_(5);return R(a.selectedForMergeB.KeepUsername,i)||(a.selectedForMergeB.KeepUsername=i),v(i)}),r(5,"mat-radio-button",332)(6,"div",30)(7,"div"),l(8),o(),r(9,"div"),l(10),o()()(),r(11,"mat-radio-button",332)(12,"div",30)(13,"div"),l(14),o(),r(15,"div"),l(16),o()()()()()()}if(t&2){let e=_(5);m(4),I("ngModel",e.selectedForMergeB.KeepUsername),m(),u("value",!0),m(3),f(" ",e.selectedForMergeB.LastName+" "+e.selectedForMergeB.MiddleName+" "+e.selectedForMergeB.FirstName," "),m(2),f(" ",e.selectedForMergeB.UserName," "),m(),u("value",!1)("value",!1),m(3),f(" ",e.selectedForMergeA.LastName+" "+e.selectedForMergeA.MiddleName+" "+e.selectedForMergeA.FirstName," "),m(2),f(" ",e.selectedForMergeA.UserName," ")}}function Am(t,s){if(t&1){let e=P();r(0,"button",335),S("click",function(){y(e);let i=_(5);return v(i.mergeAccounts())}),l(1," Merge Selected Accounts "),r(2,"span",336),l(3," compare_arrows "),o()()}}function wm(t,s){if(t&1&&(r(0,"div",323),b(1,vm,17,8,"div",324)(2,Sm,17,8,"div",325),r(3,"div",326),b(4,Am,4,0,"button",327),o()()),t&2){let e=_(4);m(),u("ngIf",e.selectedForMergeA.MemberId&&e.selectedForMergeB.MemberId),m(),u("ngIf",e.selectedForMergeA.MemberId&&e.selectedForMergeB.MemberId),m(2),u("ngIf",e.selectedForMergeB.KeepUsername!=null&&e.selectedForMergeB.KeepSignOnDate!=null&&e.selectedForMergeA.MemberId&&e.selectedForMergeB.MemberId)}}function Pm(t,s){if(t&1&&(r(0,"div",315)(1,"div",316),b(2,xm,1,4,"account-card",317)(3,Cm,2,0,"mat-card",318),r(4,"span",319),l(5," double_arrow "),o(),b(6,Mm,2,0,"mat-card",318)(7,ym,1,4,"account-card",317),o(),b(8,wm,5,3,"div",320),o()),t&2){let e=_(3);m(2),u("ngIf",e.selectedForMergeB.MemberId),m(),u("ngIf",!e.selectedForMergeB.MemberId),m(3),u("ngIf",!e.selectedForMergeA.MemberId),m(),u("ngIf",e.selectedForMergeA.MemberId),m(),u("ngIf",e.selectedForMergeA.MemberId&&e.selectedForMergeB.MemberId)}}function Tm(t,s){if(t&1){let e=P();r(0,"mat-tab",287)(1,"div",52)(2,"div",30)(3,"div",288)(4,"form",289),S("ngSubmit",function(){y(e);let i=_(2);return v(i.searchDupMember())}),r(5,"div")(6,"mat-form-field",290)(7,"mat-label"),l(8,"Search By Email"),o(),r(9,"input",291),F("ngModelChange",function(i){y(e);let a=_(2);return R(a.searchTerm,i)||(a.searchTerm=i),v(i)}),o()(),r(10,"button",292),l(11," Search for Duplicates "),r(12,"mat-icon",67),l(13,"search"),o()()()()()(),b(14,Ho,2,0,"div",80)(15,gm,35,4,"div",293)(16,fm,2,0,"div",83)(17,Pm,9,5,"div",294),o()()}if(t&2){let e=_(2);m(9),u("value",e.searchTerm),I("ngModel",e.searchTerm),m(5),u("ngIf",e.refreshLoading||e.tableLoading),m(),u("ngIf",e.isSearching&&!e.noResults&&!e.refreshLoading&&!e.tableLoading),m(),u("ngIf",e.isSearching&&!e.refreshLoading&&e.noResults),m(),u("ngIf",e.selectedForMergeA.MemberId||e.selectedForMergeB.MemberId)}}function Em(t,s){t&1&&(r(0,"div",347),l(1," Click to upload or drag and drop Member List (Excel or CSV) "),r(2,"span",348),l(3," attach_file "),o()())}function Dm(t,s){if(t&1&&(r(0,"div",349),l(1),r(2,"span",348),l(3," edit_file "),o(),r(4,"div",350),E(5,"mat-spinner"),o()()),t&2){let e=_(4);m(),f(" ",e.envelopeFile==null?null:e.envelopeFile.name," ")}}function Im(t,s){if(t&1){let e=P();r(0,"div",341),S("drop",function(i){y(e);let a=_(3);return v(a.onFileDrop(i))})("dragover",function(i){y(e);let a=_(3);return v(a.onDragOver(i))}),r(1,"label",342)(2,"input",343),S("change",function(i){y(e);let a=_(3);return v(a.onFileChange(i))}),o(),r(3,"mat-card",344),b(4,Em,4,0,"div",345)(5,Dm,6,1,"div",346),o()()()}if(t&2){let e=_(3);m(4),u("ngIf",!e.fileAttached),m(),u("ngIf",e.fileAttached)}}function Rm(t,s){if(t&1&&(r(0,"div",354)(1,"h4"),l(2,"Supported Fields"),o(),r(3,"h4"),l(4),o()()),t&2){let e=_(4);m(4),Q(" ",e.getSelectedKeysCount()," / ",e.keysArray.length," ")}}function Fm(t,s){if(t&1&&(r(0,"div",351),b(1,Rm,5,2,"div",352),E(2,"mat-progress-bar",353),o()),t&2){let e=_(3);m(),u("ngIf",e.uploadingMemberList),m(),u("value",e.getPercentageProgress())}}function km(t,s){if(t&1&&(r(0,"div",367)(1,"mat-icon",368),l(2,"check_circle"),o(),r(3,"span",268),l(4),o()()),t&2){let e=_().$implicit;m(4),A(e)}}
3function Om(t,s){if(t&1&&(r(0,"div",367)(1,"mat-icon",369),l(2,"error"),o(),r(3,"span",268),l(4),o()()),t&2){let e=_().$implicit;m(4),A(e)}}function Vm(t,s){if(t&1&&(r(0,"div",365),b(1,km,5,1,"div",366)(2,Om,5,1,"div",366),o()),t&2){let e=s.$implicit,n=_(5);m(),u("ngIf",n.didSelect(e)),m(),u("ngIf",!n.didSelect(e))}}function Lm(t,s){if(t&1&&(r(0,"mat-card",361)(1,"h4",362),l(2),o(),r(3,"h4",362),l(4),o(),E(5,"mat-divider",363),r(6,"h4"),l(7,"Required Keys:"),o(),b(8,Vm,3,2,"div",364),o()),t&2){let e=_(4);m(2),f("Supported Headers: ",e.keysArray==null?null:e.keysArray.length,""),m(2),f("File Headers: ",e.headerData==null?null:e.headerData.length,""),m(4),u("ngForOf",e.requiredFields)}}function Nm(t,s){if(t&1){let e=P();r(0,"button",373),S("click",function(){y(e);let i=_(5);return v(i.CancelFileUpload())}),l(1,"Cancel"),o()}}function Bm(t,s){if(t&1){let e=P();r(0,"button",374),S("click",function(){y(e);let i=_(5);return v(i.validateMapping())}),l(1,"Next (Validate Data)"),o()}}function $m(t,s){if(t&1&&(r(0,"div",370),b(1,Nm,2,0,"button",371)(2,Bm,2,0,"button",372),o()),t&2){let e=_(4);m(),u("ngIf",!e.loadingMapper),m(),u("ngIf",!e.loadingMapper)}}function Hm(t,s){t&1&&(r(0,"div",375),E(1,"mat-spinner"),o())}function Um(t,s){t&1&&(r(0,"th",230),l(1," Status "),o())}function Ym(t,s){t&1&&(r(0,"mat-icon",368),l(1,"check_circle"),o())}function Gm(t,s){t&1&&(r(0,"mat-icon",384),l(1,"warning"),o())}function zm(t,s){if(t&1&&(r(0,"td",233),b(1,Ym,2,0,"mat-icon",382)(2,Gm,2,0,"mat-icon",383),o()),t&2){let e=s.$implicit;m(),u("ngIf",e.dbHeader),m(),u("ngIf",!e.dbHeader)}}function Wm(t,s){t&1&&(r(0,"th",230),l(1," File Header "),o())}function jm(t,s){if(t&1&&(r(0,"td",233),l(1),o()),t&2){let e=s.$implicit;m(),f(" ",e.header," ")}}function Km(t,s){t&1&&E(0,"th",230)}function qm(t,s){t&1&&(r(0,"td",233)(1,"mat-icon"),l(2,"arrow_right_alt"),o()())}function Qm(t,s){t&1&&(r(0,"th",230),l(1," DB Header "),o())}function Jm(t,s){if(t&1&&(r(0,"mat-option",389),l(1),o()),t&2){let e=s.$implicit;u("value",e.name),m(),f(" ",e.name,"")}}function Xm(t,s){t&1&&(r(0,"mat-error"),l(1,"You must make a selection"),o())}function Zm(t,s){if(t&1){let e=P();r(0,"td",233)(1,"div",385)(2,"mat-form-field",386)(3,"mat-label"),l(4,"Select DB Column"),o(),r(5,"input",387),F("ngModelChange",function(i){let a=y(e).$implicit;return R(a.dbHeader,i)||(a.dbHeader=i),v(i)}),S("ngModelChange",function(i){let a=y(e).$implicit,d=_(5);return v(d.filterOptions(i,a))}),o(),r(6,"mat-autocomplete",388,9),S("optionSelected",function(i){let a=y(e).$implicit,d=_(5);return v(d.onOptionSelected(i,a))}),r(8,"mat-option",389),l(9," Ignore"),o(),b(10,Jm,2,2,"mat-option",390),o(),b(11,Xm,2,0,"mat-error",247),o(),r(12,"button",391),S("click",function(){let i=y(e).$implicit,a=_(5);return v(a.clearSelection(i))}),r(13,"mat-icon"),l(14,"clear"),o()()()()}if(t&2){let e=s.$implicit,n=G(7),i=_(5);m(5),u("matAutocomplete",n),I("ngModel",e.dbHeader),m(3),u("value","Ignore"),m(2),u("ngForOf",i.filteredOptions),m(),u("ngIf",e.invalid)}}function el(t,s){t&1&&E(0,"tr",258)}function tl(t,s){t&1&&E(0,"tr",259)}function il(t,s){if(t&1&&(r(0,"div",376)(1,"table",377),C(2,378),b(3,Um,2,0,"th",119)(4,zm,3,2,"td",120),M(),C(5,379),b(6,Wm,2,0,"th",119)(7,jm,2,1,"td",120),M(),C(8,380),b(9,Km,1,0,"th",119)(10,qm,3,0,"td",120),M(),C(11,381),b(12,Qm,2,0,"th",119)(13,Zm,15,5,"td",120),M(),b(14,el,1,0,"tr",225)(15,tl,1,0,"tr",218),o()()),t&2){let e=_(4);m(),u("dataSource",e.headerData)("trackBy",e.trackbyFn),m(13),u("matHeaderRowDef",q(4,ri)),m(),u("matRowDefColumns",q(5,ri))}}function nl(t,s){if(t&1&&(r(0,"div",355)(1,"div",356),b(2,Lm,9,3,"mat-card",357)(3,$m,3,2,"div",358)(4,Hm,2,0,"div",359),o(),b(5,il,16,6,"div",360),o()),t&2){let e=_(3);m(2),u("ngIf",e.uploadingMemberList),m(),u("ngIf",e.uploadingMemberList&&!e.showDataTable&&!e.loadingMapper),m(),u("ngIf",e.loadingMapper),m(),u("ngIf",e.uploadingMemberList)}}function al(t,s){if(t&1){let e=P();r(0,"mat-tab",337),S("click",function(){y(e);let i=_(2);return v(i.fileAttached=!0)}),b(1,Im,6,2,"div",338)(2,Fm,3,2,"div",339)(3,nl,6,4,"div",340),o()}if(t&2){let e=_(2);m(),u("ngIf",!e.uploadingMemberList),m(),u("ngIf",e.uploadingMemberList&&!e.showDataTable),m(),u("ngIf",!e.showDataTable)}}function rl(t,s){if(t&1){let e=P();r(0,"mat-tab-group",22),F("selectedIndexChange",function(i){y(e);let a=_();
3return R(a.tabIndex,i)||(a.tabIndex=i),v(i)}),S("selectedTabChange",function(i){y(e);let a=_();return v(a.tabChange(i))}),b(1,_o,101,29,"mat-tab",23)(2,$o,10,3,"mat-tab",24)(3,Tm,18,6,"mat-tab",25)(4,al,4,3,"mat-tab",26),o()}if(t&2){let e=_();u("color",e.black)("backgroundColor",e.white),I("selectedIndex",e.tabIndex),m(),u("ngIf",e.checkEditPermission(1001)||e.checkViewPermission(1001)),m(),u("ngIf",e.checkViewPermission(1002)||e.checkEditPermission(1002)),m(),u("ngIf",e.checkEditPermission(1003)),m(),u("ngIf",e.isPGUser)}}function sl(t,s){if(t&1){let e=P();r(0,"button",412),S("click",function(){y(e);let i=_(2);return v(i.toggleMemberAssistantHistory())}),r(1,"span",107),l(2,"forum"),o()()}}function ol(t,s){t&1&&(r(0,"div",419),l(1," Loading chats... "),o())}function ml(t,s){if(t&1){let e=P();r(0,"button",420),S("click",function(){let i=y(e).$implicit,a=_(3);return v(a.resumeMemberAssistantSession(i))}),r(1,"span")(2,"strong"),l(3),o(),r(4,"small"),l(5),o()(),r(6,"span",421),S("click",function(i){let a=y(e).$implicit,d=_(3);return v(d.deleteMemberAssistantSession(a,i))}),l(7,"delete"),o()()}if(t&2){let e=s.$implicit,n=_(3);it("active",e.id===(n.memberAssistantV2ActiveSession==null?null:n.memberAssistantV2ActiveSession.id)),m(3),A(e.title),m(2),A(n.formatMemberAssistantTime(e.updatedAt))}}function ll(t,s){t&1&&(r(0,"div",422),l(1," No saved chats yet. "),o())}function dl(t,s){if(t&1){let e=P();r(0,"div",413)(1,"div",414)(2,"strong"),l(3,"Saved chats"),o(),r(4,"button",415),S("click",function(){y(e);let i=_(2);return v(i.newMemberAssistantChat())}),l(5,"New chat"),o()(),b(6,ol,2,0,"div",416)(7,ml,8,4,"button",417)(8,ll,2,0,"div",418),o()}if(t&2){let e=_(2);m(6),u("ngIf",e.memberAssistantV2SessionsLoading),m(),u("ngForOf",e.memberAssistantV2Sessions),m(),u("ngIf",!e.memberAssistantV2SessionsLoading&&!e.memberAssistantV2Sessions.length)}}function cl(t,s){if(t&1&&(r(0,"div",423),l(1),o()),t&2){let e=_(2);m(),Q(" Current snapshot: ",e.memberAssistantV2ActiveSession==null||e.memberAssistantV2ActiveSession.snapshot==null?null:e.memberAssistantV2ActiveSession.snapshot.rowCount," members, refreshed ",e.formatMemberAssistantTime(e.memberAssistantV2ActiveSession==null||e.memberAssistantV2ActiveSession.snapshot==null?null:e.memberAssistantV2ActiveSession.snapshot.createdAt),". ")}}function _l(t,s){if(t&1){let e=P();r(0,"div",424)(1,"p"),l(2),o(),r(3,"div",425)(4,"button",415),S("click",function(){y(e);let i=_(2);return v(i.chooseMemberAssistantBroaderScope(!1))}),l(5," Use loaded rows "),o(),r(6,"button",415),S("click",function(){y(e);let i=_(2);return v(i.chooseMemberAssistantBroaderScope(!0))}),l(7," Load data "),o()()()}if(t&2){let e=_(2);m(2),A(e.memberAssistantScopePrompt.message)}}function pl(t,s){t&1&&(r(0,"div",432),l(1," Finding members... "),o())}function hl(t,s){if(t&1){let e=P();r(0,"button",415),S("click",function(){let i=y(e).$implicit,a=_(4);return v(a.selectMemberAssistantLookupCandidate(i))}),l(1),o()}if(t&2){let e=s.$implicit;m(),f(" ",e.DisplayName||e.LastName||"Member"," ")}}function bl(t,s){if(t&1&&(r(0,"div",433),b(1,hl,2,1,"button",434),o()),t&2){let e=_(3);m(),u("ngForOf",e.memberAssistantMemberLookup.candidates)}}function ul(t,s){if(t&1&&(r(0,"div",435),l(1),o()),t&2){let e=_(3);m(),f(" ",e.memberAssistantMemberLookup.error," ")}}function gl(t,s){t&1&&(r(0,"div",436),l(1," No matching member was found. "),o())}function fl(t,s){if(t&1){let e=P();r(0,"div",426)(1,"p"),l(2),o(),b(3,pl,2,0,"div",427)(4,bl,2,1,"div",428)(5,ul,2,1,"div",429)(6,gl,2,0,"div",430),r(7,"button",431),S("click",function(){y(e);let i=_(2);return v(i.cancelMemberAssistantLookup())}),l(8,"Cancel"),o()()}if(t&2){let e=_(2);m(2),A(e.memberAssistantMemberLookup.message),m(),u("ngIf",e.memberAssistantMemberLookupLoading),m(),u("ngIf",e.memberAssistantMemberLookup.candidates==null?null:e.memberAssistantMemberLookup.candidates.length),m(),u("ngIf",e.memberAssistantMemberLookup.error),m(),u("ngIf",!e.memberAssistantMemberLookupLoading&&!e.memberAssistantMemberLookup.error&&!(e.memberAssistantMemberLookup.candidates!=null&&e.memberAssistantMemberLookup.candidates.length))}}function xl(t,s){if(t&1&&(r(0,"div",439),E(1,"div"),o()),t&2){let e=_(3);m(),ne("width",e.memberAssistantV2Progress,"%")}}function Cl(t,s){if(t&1&&(r(0,"div",437)(1,"span"),l(2),o(),b(3,xl,2,2,"div",438),o()),t&2){let e=_(2);m(2),A(e.memberAssistantV2Stage),m(),u("ngIf",e.memberAssistantV2Progress)}}function Ml(t,s){if(t&1){let e=P();r(0,"button",415),S("click",function(){let i=y(e).$implicit,a=_(3);return v(a.chooseMemberAssistantResult(i.turnRef))}),l(1),o()}if(t&2){let e=s.$implicit;m(),f(" ",e.title||"Assistant result"," ")}}function yl(t,s){if(t&1&&(r(0,"div",424)(1,"p"),l(2,"Which earlier assistant result should this follow-up use?"),o(),r(3,"div",440),b(4,Ml,2,1,"button",434),o()()),t&2){let e=_(2);m(4),u("ngForOf",e.memberAssistantResultChoice.candidates)}}function vl(t,s){t&1&&(r(0,"div",441),l(1," Ask about members, families, primary contacts, pending families, missing info, charts, or reports. "),o())}function Sl(t,s){if(t&1&&(r(0,"span"),l(1),o()),t&2){let e=_().$implicit,n=_(2);m(),f("| ",n.formatMemberAssistantRunTime(e.runTimeSeconds),"")}}function Al(t,s){if(t&1&&(r(0,"div",459),l(1),o()),t&2){let e=_().$implicit;m(),f(" ",e.dataScopeLabel," ")}}function wl(t,s){if(t&1&&(r(0,"div",460),l(1),o()),t&2){let e=_().$implicit;m(),f(" ",e.scopeWarning," ")}}function Pl(t,s){if(t&1){let e=P();r(0,"button",461),S("click",function(){y(e);let i=_().$implicit,a=_(2);return v(a.toggleMemberAssistantExplanation(i))}),l(1),o()}if(t&2){let e=_().$implicit;m(),f(" ",e.showExplanation?"Hide explanation":"Explain"," ")}}function Tl(t,s){if(t&1&&(r(0,"span"),l(1),o()),t&2){let e=s.$implicit,n=_(4);m(),A(n.formatMemberAssistantNote(e))}}function El(t,s){if(t&1&&(r(0,"div",462),b(1,Tl,2,1,"span",406),o()),t&2){let e=_().$implicit;m(),u("ngForOf",e.assumptions)}}function Dl(t,s){if(t&1&&(r(0,"span"),l(1),o()),t&2){let e=s.$implicit,n=_(4);m(),A(n.formatMemberAssistantNote(e))}}function Il(t,s){if(t&1&&(r(0,"div",463),b(1,Dl,2,1,"span",406),o()),t&2){let e=_().$implicit;m(),u("ngForOf",e.warnings)}}function Rl(t,s){if(t&1&&(r(0,"div",466)(1,"span"),l(2),o(),r(3,"div",467),E(4,"div",468),o(),r(5,"strong"),l(6),o()()),t&2){let e=s.$implicit;m(2),A(e.label),m(2),ne("width",e.width)("background",e.color),m(2),A(e.formattedValue)}}function Fl(t,s){if(t&1&&(r(0,"div",464),b(1,Rl,7,6,"div",465),o()),t&2){let e=_().$implicit;m(),u("ngForOf",e.chartBars)}}function kl(t,s){if(t&1&&(r(0,"span"),l(1),r(2,"strong"),l(3),o()()),t&2){let e=s.$implicit;m(),f(" ",e.label,""),m(2),A(e.value)}}function Ol(t,s){if(t&1&&(r(0,"div",469),Ze(),r(1,"svg",470),E(2,"polyline"),o(),et(),r(3,"div",471),b(4,kl,4,2,"span",406),o()()),t&2){let e=_().$implicit,n=_(2);m(),Me("aria-label",e.title),m(),Me("points",n.getMemberAssistantLinePoints(e.chartSeries)),m(2),u("ngForOf",e.chartSeries)}}function Vl(t,s){if(t&1&&(r(0,"div",476),E(1,"span"),r(2,"div"),l(3),o(),r(4,"strong"),l(5),o()()),t&2){let e=s.$implicit;m(),ne("background",e.color),m(2),A(e.label),m(2),A(e.formattedValue)}}function Ll(t,s){if(t&1&&(r(0,"div",472),E(1,"div",473),r(2,"div",474),b(3,Vl,6,4,"div",475),o()()),t&2){let e=_().$implicit,n=_(2);m(),ne("background",n.getMemberAssistantPieStyle(e.chartBars)),m(2),u("ngForOf",e.chartBars)}}function Nl(t,s){if(t&1&&(r(0,"th"),l(1),o()),t&2){let e=s.$implicit,n=_(4);m(),A(n.formatMemberAssistantColumn(e))}}function Bl(t,s){if(t&1&&(r(0,"td"),l(1),o()),t&2){let e=s.$implicit,n=_().$implicit,i=_(4);m(),f(" ",i.formatMemberAssistantValue(e,n[e])," ")}}function $l(t,s){if(t&1&&(r(0,"tr"),b(1,Bl,2,1,"td",406),o()),t&2){let e=_(2).$implicit;m(),u("ngForOf",e.columns)}}function Hl(t,s){if(t&1&&(r(0,"div",477)(1,"table",478)(2,"thead")(3,"tr"),b(4,Nl,2,1,"th",406),o()(),r(5,"tbody"),b(6,$l,2,1,"tr",406),o()()()),t&2){let e=_().$implicit;m(4),u("ngForOf",e.columns),m(2),u("ngForOf",e.rows)}}function Ul(t,s){if(t&1&&(r(0,"div",460),l(1),o()),t&2){let e=_().$implicit;m(),Q(" Showing the first ",e.rows==null?null:e.rows.length," of ",e.resultTotal," results. ")}}function Yl(t,s){if(t&1){let e=P();r(0,"button",479),S("click",function(){let i=y(e).$implicit,a=_().$implicit,d=_(2);
3return v(d.downloadMemberAssistantArtifact(a,i))}),l(1),o()}if(t&2){let e=s.$implicit;m(),f(" Download ",e.filename," ")}}function Gl(t,s){t&1&&(r(0,"div",480),l(1," No matching results found. "),o())}function zl(t,s){if(t&1&&(C(0),r(1,"div",442)(2,"div",443),l(3),o(),r(4,"div",444),l(5),o()(),r(6,"div",445)(7,"div",443),l(8),b(9,Sl,2,1,"span",247),o(),r(10,"div",446)(11,"h4"),l(12),o(),r(13,"p",447),l(14),o(),b(15,Al,2,1,"div",448)(16,wl,2,1,"div",449)(17,Pl,2,1,"button",450)(18,El,2,1,"div",451)(19,Il,2,1,"div",452)(20,Fl,2,1,"div",453)(21,Ol,5,3,"div",454)(22,Ll,4,3,"div",455)(23,Hl,7,2,"div",456)(24,Ul,2,2,"div",449)(25,Yl,2,1,"button",457)(26,Gl,2,0,"div",458),o()(),M()),t&2){let e=s.$implicit,n=_(2);m(3),f("You ",n.formatMemberAssistantTime(e.userTime)," "),m(2),A(e.question),m(3),f(" AI Assistant ",n.formatMemberAssistantTime(e.assistantTime)," "),m(),u("ngIf",e.runTimeSeconds),m(3),A(e.title),m(2),A(e.summary),m(),u("ngIf",e.dataScopeLabel),m(),u("ngIf",e.scopeWarning),m(),u("ngIf",e.assumptions==null?null:e.assumptions.length),m(),u("ngIf",(e.assumptions==null?null:e.assumptions.length)&&e.showExplanation),m(),u("ngIf",e.warnings==null?null:e.warnings.length),m(),u("ngIf",(e.chartBars==null?null:e.chartBars.length)&&e.chartType=="bar"),m(),u("ngIf",(e.chartSeries==null?null:e.chartSeries.length)&&e.chartType=="line"),m(),u("ngIf",(e.chartBars==null?null:e.chartBars.length)&&e.chartType=="pie"),m(),u("ngIf",e.showTable),m(),u("ngIf",e.resultTruncated),m(),u("ngForOf",e.artifacts),m(),u("ngIf",!(e.rows!=null&&e.rows.length)&&!(e.chartBars!=null&&e.chartBars.length)&&!e.summary)}}function Wl(t,s){if(t&1&&(r(0,"div",481),l(1),o()),t&2){let e=_(2);m(),f(" ",e.memberAssistantError," ")}}function jl(t,s){t&1&&(r(0,"p",482),l(1," AI responses can make mistakes; verify important information. "),o())}function Kl(t,s){t&1&&(r(0,"p",482),l(1," AI responses can make mistakes; verify important information. "),o())}function ql(t,s){if(t&1){let e=P();r(0,"aside",392)(1,"div",393)(2,"div",394)(3,"span",107),l(4,"auto_awesome"),o(),r(5,"div")(6,"h3"),l(7,"AI Assistant"),o(),r(8,"p"),l(9),o()()(),r(10,"div",395),b(11,sl,3,0,"button",396),r(12,"button",397),S("click",function(){y(e);let i=_();return v(i.clearParishMembersAssistant())}),r(13,"span",107),l(14,"add_comment"),o()(),r(15,"button",398),S("click",function(){y(e);let i=_();return v(i.closeParishMembersAssistant())}),r(16,"span",107),l(17,"close"),o()()()(),b(18,dl,9,3,"div",399),r(19,"div",400),b(20,cl,2,2,"div",401)(21,_l,8,1,"div",402)(22,fl,9,5,"div",403)(23,Cl,4,2,"div",404)(24,yl,5,1,"div",402)(25,vl,2,0,"div",405)(26,zl,27,18,"ng-container",406)(27,Wl,2,1,"div",407),o(),r(28,"form",408),S("ngSubmit",function(){y(e);let i=_();return v(i.askParishMembersAssistant())}),r(29,"textarea",409),F("ngModelChange",function(i){y(e);let a=_();return R(a.memberAssistantQuestion,i)||(a.memberAssistantQuestion=i),v(i)}),o(),r(30,"button",410)(31,"span",107),l(32),o()()(),b(33,jl,2,0,"p",411)(34,Kl,2,0,"p",411),o()}if(t&2){let e=_();m(9),A(e.memberAssistantV2Enabled?(e.memberAssistantV2ActiveSession==null?null:e.memberAssistantV2ActiveSession.title)||"New member chat":"Member assistant"),m(2),u("ngIf",e.memberAssistantV2Enabled),m(7),u("ngIf",e.memberAssistantV2Enabled&&e.memberAssistantV2HistoryOpen),m(2),u("ngIf",e.memberAssistantV2Enabled&&(e.memberAssistantV2ActiveSession==null?null:e.memberAssistantV2ActiveSession.snapshot)),m(),u("ngIf",e.memberAssistantScopePrompt),m(),u("ngIf",e.memberAssistantMemberLookup),m(),u("ngIf",e.memberAssistantLoading&&e.memberAssistantV2Stage),m(),u("ngIf",e.memberAssistantResultChoice),m(),u("ngIf",!e.memberAssistantMessages.length&&!e.memberAssistantError),m(),u("ngForOf",e.memberAssistantMessages),m(),u("ngIf",e.memberAssistantError),m(2),I("ngModel",e.memberAssistantQuestion),u("disabled",e.memberAssistantLoading||e.memberAssistantV2Enabled&&e.memberAssistantV2ActiveSession&&!e.memberAssistantV2SnapshotReady),m(),u("disabled",e.memberAssistantLoading||!e.memberAssistantQuestion.trim()||e.memberAssistantV2Enabled&&e.memberAssistantV2ActiveSession&&!e.memberAssistantV2SnapshotReady),m(2),A(e.memberAssistantLoading?"hourglass_top":"send"),m(),u("ngIf",e.memberAssistantV2Enabled),m(),u("ngIf",!e.memberAssistantV2Enabled)}}function Ql(t,s){t&1&&(r(0,"div",286),E(1,"mat-spinner"),o())}function Jl(t,s){if(t&1){let e=P();r(0,"div",19)(1,"div",483),S("click",function(){y(e);let i=_();return v(i.censusYearsEndR(i.yearsEnds[0],"ParishionerTotal"))}),l(2),o(),r(3,"div",483),S("click",function(){y(e);let i=_();return v(i.censusYearsEndR(i.yearsEnds[0],"ContributionTotal"))}),l(4),o()()}if(t&2){let e=_();
3m(2),f(" ",e.yearsEnds[0]," Parishioner Total (Includes Envelope Giving)"),m(2),f(" ",e.yearsEnds[0]," Contribution Total (Includes Envelope Giving)")}}function Xl(t,s){if(t&1){let e=P();r(0,"div",18)(1,"mat-icon",19),l(2,"drag_indicator"),o(),r(3,"mat-checkbox",20),S("change",function(){let i=y(e).$implicit,a=_();return v(a.moveToAvailable(i))}),l(4),o()()}if(t&2){let e=s.$implicit;m(3),u("checked",!0),m(),f(" ",e.label," ")}}function Zl(t,s){if(t&1&&(r(0,"div",21)(1,"mat-icon",22),l(2,"lock"),o(),r(3,"mat-checkbox",23),l(4),o()()),t&2){let e=s.$implicit;m(3),u("checked",!0)("disabled",!0),m(),f(" ",e.label," ")}}function ed(t,s){t&1&&(r(0,"div",24),l(1," No columns selected. "),o())}function td(t,s){if(t&1){let e=P();r(0,"div",30)(1,"mat-checkbox",20),S("change",function(){let i=y(e).$implicit,a=_(3);return v(a.moveToSelected(i))}),l(2),o()()}if(t&2){let e=s.$implicit;m(),u("checked",!1),m(),f(" ",e.label," ")}}function id(t,s){if(t&1&&(r(0,"div",28),b(1,td,3,2,"div",29),o()),t&2){let e=_().$implicit;m(),u("ngForOf",e.options)}}function nd(t,s){if(t&1){let e=P();r(0,"div")(1,"div",25),S("click",function(){let i=y(e).$implicit,a=_();return v(a.toggleGroup(i.title))}),r(2,"mat-icon",26),l(3),o(),r(4,"span"),l(5),o()(),b(6,id,2,1,"div",27),o()}if(t&2){let e=s.$implicit,n=_();m(3),f(" ",n.isGroupExpanded(e.title)?"expand_more":"chevron_right"," "),m(2),Q("",e.title," (",e.options.length,")"),m(),u("ngIf",n.isGroupExpanded(e.title))}}function ad(t,s){t&1&&(r(0,"div",24),l(1," No matching columns. "),o())}var rd=["sessionPaginator"],sd=["sessionSort"],od=()=>[100,250,500];function md(t,s){t&1&&(r(0,"th",22),l(1," Validation "),o())}function ld(t,s){t&1&&(r(0,"mat-icon",27),l(1,"error"),o())}function dd(t,s){if(t&1&&(r(0,"td",23)(1,"div",24)(2,"div",25),l(3),o(),b(4,ld,2,0,"mat-icon",26),o()()),t&2){let e=s.index,n=_(2);m(3),f(" ",n.sheetDataSource==null?null:n.sheetDataSource.data[e].x," - "),m(),u("ngIf",n.checkErr(n.sheetDataSource==null?null:n.sheetDataSource.data[e]))}}function cd(t,s){if(t&1&&(r(0,"th",31),l(1),o()),t&2){let e=_(),n=e.$implicit,i=e.index,a=_(2);m(),Q(" ",a.excelHeader[i].y," - ",n," ")}}function _d(t,s){if(t&1){let e=P();r(0,"div",35)(1,"input",36),S("ngModelChange",function(i){y(e);let a=_().index,d=_().$implicit,c=_(2);return v(c.mapValueChange(i,c.sheetDataSource.data[a][d],d,a))}),o()()}if(t&2){let e=_().index,n=_().$implicit,i=_(2);m(),u("ngModel",i.sheetDataSource.data[e][n])}}function pd(t,s){if(t&1){let e=P();r(0,"div",37)(1,"input",36),S("ngModelChange",function(i){y(e);let a=_().index,d=_().$implicit,c=_(2);return v(c.mapValueChange(i,c.sheetDataSource.data[a][d],d,a))}),o()()}if(t&2){let e=_().index,n=_().$implicit,i=_(2);m(),u("ngModel",i.sheetDataSource.data[e][n])}}function hd(t,s){if(t&1&&(r(0,"td",32),b(1,_d,2,1,"div",33)(2,pd,2,1,"div",34),o()),t&2){let e=s.index,n=_().$implicit,i=_(2);m(),u("ngIf",!i.sheetDataSource.data[e][n+"_error"]),m(),u("ngIf",i.sheetDataSource.data[e][n+"_error"])}}function bd(t,s){if(t&1&&(C(0,28),b(1,cd,2,2,"th",29)(2,hd,3,2,"td",30),M()),t&2){let e=s.$implicit;u("matColumnDef",e)}}function ud(t,s){t&1&&E(0,"tr",38)}function gd(t,s){t&1&&E(0,"tr",39)}function fd(t,s){if(t&1){let e=P();r(0,"div",3)(1,"div",4)(2,"div",5)(3,"h3",6),l(4,"Confirm Data Mapping "),o(),r(5,"button",7),S("click",function(){y(e);let i=_();return v(i.sortData("errors"))}),r(6,"mat-icon"),l(7,"swap_vert"),o(),l(8," Sort By Warnings "),o(),r(9,"div",8)(10,"input",9),F("ngModelChange",function(i){y(e);let a=_();return R(a.searchKey,i)||(a.searchKey=i),v(i)}),o()(),r(11,"button",10),S("click",function(){y(e);let i=_();return v(i.searchThroughtData())}),l(12,"Search"),o(),r(13,"button",10),S("click",function(){y(e);let i=_();return v(i.resetData())}),r(14,"mat-icon"),l(15,"clear"),o(),l(16," Reset Search "),o()(),r(17,"div",5)(18,"button",11),S("click",function(){y(e);let i=_();return v(i.confirmMapping())}),l(19,"Confirm Mapping & Download File"),o(),r(20,"button",12),S("click",function(){y(e);let i=_();return v(i.cancelMapping())}),l(21,"Cancel"),o()()(),r(22,"div",13)(23,"table",14,0),C(25,15),b(26,md,2,0,"th",16)(27,dd,5,2,"td",17),M(),b(28,bd,3,1,"ng-container",18)(29,ud,1,0,"tr",19)(30,gd,1,0,"tr",20),o(),E(31,"mat-paginator",21,1),o()()}if(t&2){let e=_();
3m(10),I("ngModel",e.searchKey),m(13),u("dataSource",e.sheetDataSource)("trackBy",e.trackbyFn)("matSortActive","Members Last Name"),m(5),u("ngForOf",e.headers),m(),u("matHeaderRowDef",e.tableheaders)("matHeaderRowDefSticky",!0),m(),u("matRowDefColumns",e.tableheaders),m(),u("length",100)("pageSize",50)("pageSizeOptions",q(11,od))}}var si=(()=>{class t{constructor(e,n,i,a,d,c,p,h,g,x,w){this.appData=e,this.memberAssistantCache=n,this.memberAssistantV2=i,this.mainService=a,this.route=d,this.snackBar=c,this.router=p,this.dialog=h,this.formatMoney=g,this.firestore=x,this.firestorage=w,this.loading=!1,this.orgLoading=!1,this.usersLoading=!1,this.refreshLoading=!1,this.pendingLoading=!1,this.isSearching=!1,this.noResults=!1,this.memberName="",this.studentName="",this.searchTerm="",this.filtersExpanded=!1,this.envNo="",this.isMemberEnrolled=!1,this.isStudentsEnrolled=!1,this.exactMatch=!1,this.subscriptionArr=[],this.subIndex=0,this.CTID=0,this.acc={},this.textLabel="Members",this.headers=[],this.headerData=[],this.sheetData=[],this.sheetJSONData=[],this.requiredFields=["Members First Name","Members Last Name","Members_Contact Info Email Address","Families Envelope Number"],this.keysArray=["Families Family DUID","Families Envelope Number","Members Member Type","Members Title","Members First Name","Members Middle Name","Members Last Name","Members Suffix","Members Maiden Name","Families_Contact Info Primary Address 1","Families_Addresses Home City","Families_Addresses Home State","Families_Addresses Home PostalCode","Members_Contact Info Email Address","Members_Contact Info Home Phone","Members_Contact Info Cell Phone","Members Marital Status","Members Religion","Members Gender","Members Birthdate","Ethnicity","Language","Occupation","InterestHobbies","Volunteer","Note","InParish","BaptismDate","Sacraments_Baptism Baptism Parish Name","Sacraments_Baptism Baptism Parish Address 1","Sacraments_Baptism Baptism Parish City","Sacraments_Baptism Baptism Parish State","Sacraments_Baptism Baptism Parish Zip","BaptismPresiderName","BaptismGodParent1","BaptismGodParent2","BaptismVerified","CommunionDate","Sacraments_Eucharist Eucharist Parish Name","Sacraments_Eucharist Eucharist Parish Address 1","Sacraments_Eucharist Eucharist Parish City","Sacraments_Eucharist Eucharist Parish State","Sacraments_Eucharist Eucharist Parish Zip","CommunionPresiderName","CommunionVerified","ReconciliationDate","Sacraments_Reconciliation Prep Reconciliation Parish Name","Sacraments_Reconciliation Prep Reconciliation Parish State","Sacraments_Reconciliation Prep Reconciliation Parish Zip","ReconciliationPresiderName","ReconciliationVerified","ConfirmationDate","Sacraments_Confirmation Confirmation Parish Name","Sacraments_Confirmation Confirmation Parish Address 1","Sacraments_Confirmation Confirmation Parish City","Sacraments_Confirmation Confirmation Parish State","Sacraments_Confirmation Confirmation Parish Zip","ConfirmationName","ConfirmationSponsorName","ConfirmationPresiderName","ConfirmationVerified","MarriageDateCompleted","MarriageParish Name","MarriageParish Address 1","MarriageParish Parish City","MarriageParish State","MarriageParish Zip","Marriage Presider Name","MarriageCompleted","Canonical","Members Date of Death","BaptismRegistryNo","BaptismRegistryPage","BaptismRegistryVol","ConfirmationRegistryNo","ConfirmationRegistryPage","ConfirmationRegistryVol","CommunionRegistryNo","CommunionRegistryPage","CommunionRegistryVol","ReconciliationRegistryNo","ReconciliationRegistryPage","ReconciliationRegistryVol","members createdate"],this.isPGUser=!1,this.memberAssistantQuestion="",this.memberAssistantLoading=!1,this.memberAssistantError="",this.memberAssistantPlan=null,this.memberAssistantSummary="",this.memberAssistantRows=[],this.memberAssistantColumns=[],this.memberAssistantWarnings=[],this.memberAssistantChartBars=[],this.memberAssistantShowTable=!1,this.memberAssistantMessages=[],this.memberAssistantResultContexts=[],this.memberAssistantLastResultSet=null,this.memberAssistantTurnSequence=0,this.memberAssistantResultChoice=null,this.memberAssistantOpen=!1,this.memberAssistantScopePrompt=null,this.memberAssistantPendingQuestion="",this.memberAssistantPendingRequest=null,this.memberAssistantPendingPlan=null,this.memberAssistantPendingWarnings=[],this.memberAssistantPendingSubmittedAt=null,this.memberAssistantPendingStartedAt=0,this.memberAssistantFullResultCache=[],this.memberAssistantUniqueRows=[],this.memberAssistantReferenceSequence=0,this.memberAssistantReferences=new Map,this.memberAssistantReferenceByMemberKey=new Map,this.memberAssistantActiveQuestionTemplate="",this.memberAssistantActiveReferences=[],this.memberAssistantActiveReferenceIsExplicit=!1,this.memberAssistantFocus=null,this.memberAssistantLastExecutionRows=[],this.memberAssistantForcedReference=null,this.memberAssistantMemberLookup=null,this.memberAssistantMemberLookupLoading=!1,this.memberAssistantBroaderLoadProgress=null,this.memberAssistantV2Sessions=[],this.memberAssistantV2ActiveSession=null,this.memberAssistantV2HistoryOpen=!1,this.memberAssistantV2SessionsLoading=!1,this.memberAssistantV2SnapshotReady=!1,this.memberAssistantV2Stage="",this.memberAssistantV2Progress=0,this.memberAssistantV2PollGeneration=0,this.memberAssistantV2SessionsLoaded=!1,this.memberAssistantPersistentCacheMaxAgeMs=24*60*60*1e3,this.memberAssistantStore={scopeKey:"",lastAccessedAt:0,membersById:new Map,familiesByPGFamilyId:new Map,familyDetailsByFamilyId:new Map,coverageBySearchSignature:new Map},this.memberAssistantChartColors=["#8b0e04","#c28f86","#6d665f","#b0492f","#d7b8ac","#3c2722"],this.memberAssistantFamilyRoles=["Husband","Wife","Mother","Father","Head","Adult","Grandmother","Grandfather","Other","Partner","Spouse","Young Adult","Child","Daughter","Son","Granddaughter","Grandson","Unknown"],this.memberAssistantNumericFields=["Age","EnrolledStudentNo","REEnrolledStudentNo","YTDContributionAmount","YTDPaymentAmount","FamilyMemberCount","FamilyPrimaryCount","FamilySecondaryCount","FamilyREPrimaryCount","FamilyRESecondaryCount","FamilyChildCount"],this.memberAssistantAllowedFields=["MemberId","PGFamilyID","DisplayName","FirstName","LastName","FamilyName","FamilyRole","Envelope","Gender","Age","Status","MOStatus","RegisterCensus","Volunteer","InParish","Email","SecondaryEmail","EmailPresent","CellPhone","HomePhone","WorkPhone","SecondaryPhone","SecondaryCellPhone","SecondaryWorkPhone","PhonePresent","Address","Address2","SecondaryAddress1","SecondaryAddress2","City","SecondaryCity","State","SecondaryState","Zip","SecondaryZip","ChildNames","EnrolledStudentNo","REEnrolledStudentNo","SignOnDate","YTDContributionAmount","YTDPaymentAmount","CensusPrimary","CensusSecondary","REPrimary","RESecondary","FamilyMemberCount","FamilyPrimaryCount","FamilySecondaryCount","FamilyREPrimaryCount","FamilyRESecondaryCount","FamilyChildCount","FamilyHasPrimary","FamilyHasSecondary","FamilyHasREPrimary","FamilyHasRESecondary"],this.newMemberRow={Address:"",CTID:0,CellPhone:"",City:"",Custody:"",Email:"",EmergencyEmail:"",EmergencyFirstName:"",EmergencyLastName:"",EmergencyPhone:"",EmergencyRelationship:"",Envelope:"",FamilyID:"",FirstName:"",InParish:1,LastName:"",MaidenName:"",MaritalStatusID:0,MemberID:0,MiddleName:"",Note:"",OrganizationID:0,Orgs:[{OrganizationKey:""}],Pass:"",HomePhone:"",Religion:"",SecondaryAddress1:"",SecondaryCellPhone:"",SecondaryCity:"",SecondaryCustody:"",SecondaryEmail:"",SecondaryFirstName:"",SecondaryLastName:"",SecondaryMaritalStatusID:0,SecondaryPhone:"",SecondaryReligion:"",SecondaryState:"",SecondaryWorkPhone:"",SecondaryZip:"",State:"",Status:1,UserName:"",WorkPhone:"",Zip:"",studentData:[]},this.isYopen=!1,this.uploadingMemberList=!1,this.showDataTable=!1,this.yearsEnds=[],this.envelopeFile=null,this.fileAttached=!1,this.fileName="",this.loadingMapper=!1,this.excelHeader=[],this.selectedSignOnDate=null,this.searchType="memberName",this.selectedForMergeA={},this.selectedForMergeB={},this.exportingAll=!1,this.filteredOptions=[],this.userAccessObject=null,this.checkViewPermission=T=>this.userAccessObject?.userViewAccessIds.includes(T),this.checkEditPermission=T=>this.userAccessObject?.userEditAccessIds.includes(T),this.sortCol="LastName",this.sortDir="",this.startIndex=0,this.recordsToGet=25,this.currentPage=0,this.includeUnlinkedMember=!1,this.tableLoading=!1,this.searchKB="",this.pendingData=!1,this.memberTableId="parish-members-1",this.memberTableDefaultHeaders=["Select","Envelope","LastName","FamilyRole","Email","CellPhone","YTDContributionAmount","PATD","PGFamilyID","SignOnDate","SendWelcomeEmail","Details"],this.memberTableAvailableHeaders=["Select","RegisterCensus","SendEnvelope","DateOfDeath","BaptismDate","BaptismChurch","ReconciliationDate","ReconciliationChurch","CommunionDate","CommunionChurch","ConfirmationDate","ConfirmationChurch","MarriageCertificate","BaptismPresiderName","BaptismVerified","ReconciliationPresiderName","ReconciliationVerified","CommunionPresiderName","CommunionVerified","ConfirmationPresiderName","ConfirmationVerified","BaptismGodParent1","BaptismGodParent2","BaptismFatherName","BaptismMotherName","ConfirmationName","ConfirmationSponsorName","ConfirmationFatherName","ConfirmationMotherName","BaptismRegistryVol","BaptismRegistryPage","BaptismRegistryNo","ReconciliationRegistryVol","ReconciliationRegistryPage","ReconciliationRegistryNo","CommunionRegistryVol","CommunionRegistryPage","CommunionRegistryNo","ConfirmationRegistryVol","ConfirmationRegistryPage","ConfirmationRegistryNo","MarriageRegistryVol","MarriageRegistryPage","MarriageRegistryNo","DODRegistryVol","DODRegistryPage","DODRegistryNo","FuneralDate","FuneralChurch","Fu
3neralPresiderName","FuneralRegistryVol","FuneralRegistryPage","FuneralRegistryNo","ChildNames","MOStatus","FamilyID","PGFamilyID","Gender","Volunteer","FirstName","LastName","DOB","CheckEmail","MaidenName","Religion","MiddleName","Envelope","EnvelopeLable","NotificationEmail","Address","Address2","City","State","Zip","Email","CensusPrimary","FamilyRole","MarriageCompleted","MarriageDateCompleted","MarriageParish","Celebrant","Canonical","CellPhone","HomePhone","WorkPhone","YTDPaymentAmount","YTDContributionAmount","DisplayName","InParish","SendWelcomeEmail","Details"],this.memberTableExtraHeaders=["Child"],this.memberTableLockedTrailingHeaders=["SendWelcomeEmail","Details"],this.memberTableHeaderOptions=[],this.memberTableHeadersLoaded=!1,this.memberTableSelectedHeaders=[],this.memberTableHeaderLabels={RegisterCensus:"Registered to Parish",SendEnvelope:"Send Envelope",DateOfDeath:"Date of Death",DOB:"Date of Birth",MOStatus:"Member Link Status",EnvelopeLable:"Envelope Label",PGFamilyID:"PG Family ID",FamilyID:"Family ID",YTDContributionAmount:"Contribution YTD",YTDPaymentAmount:"Payments YTD",PATD:"Payments YTD",REPrimary:"RE Primary",RESecondary:"RE Secondary",CheckEmail:"Check Email",NotificationEmail:"Notification Email",SignOnDate:"Sign On Date",ChildNames:"Child Names",DODRegistryVol:"DOD Registry Vol",DODRegistryPage:"DOD Registry Page",DODRegistryNo:"DOD Registry No"},this.displayedMemberColumns=["Select","Envelope","LastName","FamilyRole","Email","CellPhone","YTDContributionAmount","PATD","PGFamilyID","SignOnDate","SendWelcomeEmail","Details"],this.mobileDisplayedMemberColumns=["Select","Envelope","LastName","YTDContributionAmount","Details"],this.distributionListName="",this.distributionListDesc="",this.showNewListInputs=!1,this.isSelectingAll=!1,this.mergeMemberColumns=["Envelope","LastName","Email","Username","CellPhone","YTDContributionAmount","YTDPaymentAmount","B","A","Details"],this.MemberDataSource=new ge,this.displayedPendingColumns=["Select","LastName","Email","CellPhone","PGFamilyID","Details","Reject","Approve"],this.mobileDisplayedPendingColumns=["Select","LastName","Details"],this.PendingDataSource=new ge,this.timeNow=new Date,this.count=0,this.filters={family:!0,Age:{},genderMaleFilter:!1,genderFemaleFilter:!1,InActiveMemberOnly:!1,volunteer:!1,member:!1},this.genderFiltersExpanded=!1,this.ageFiltersExpanded=!1,this.groupsFiltersExpanded=!1,this.memberTableHeaderOptions=this.buildMemberTableHeaderOptions(),this.displayedMemberColumns=[...this.memberTableDefaultHeaders],this.memberTableSelectedHeaders=[...this.memberTableDefaultHeaders]}getPercentageProgress(){return this.getSelectedKeysCount()*100/this.keysArray.length}CancelFileUpload(){this.dialog.open(ee,{data:{data:"<h4>Are you sure you want to cancel the upload?</h4>",type:"generalConfirm"}}).afterClosed().subscribe(e=>{e&&(this.envelopeFile=null,this.fileAttached=!1,this.fileName="",this.sheetData=[],this.headerData=[],this.uploadingMemberList=!1,this.showDataTable=!1)})}onFileDrop(e){if(this.fileAttached=!0,e.preventDefault(),e.stopPropagation(),e.dataTransfer?.files.length){let n=Array.from(e.dataTransfer.files);if(n[0]&&n[0].type.match(/.(sheet|excel|csv)$/i))this.fileAttached=!0,this.envelopeFile=n[0];else{let a=this.dialog.open(O,{data:{data:"<h4>Error: Please select an excel file.</h4>",type:"simple-info"}});this.fileAttached=!1;return}if(n.length!==1)throw this.fileAttached=!1,new Error("Cannot use multiple files");this.fileName=n[0].name,this.tableLoading=!0;let i=new FileReader;i.onload=a=>{let d=a.target.result,c=ze(d,{type:"binary"}),p=c.SheetNames[0],h=c.Sheets[p],g=Y.sheet_to_json(h,{header:1});this.sheetJSONData=Y.sheet_to_json(h),console.log("sheetJSONData: ",this.sheetJSONData),this.cleanData();let x=[];this.headers=[],this.sheetData=[],g.forEach((w,T)=>{let D=[];w.forEach((V,B)=>{g[0][B]?(T==0&&this.headers.push(V),D.push(V)):x.push(B)}),this.sheetData.push(D)}),console.log("invalidHeaderIndexes",x),console.log("this.headers",JSON.parse(JSON.stringify(this.headers))),console.log("this.sheetData",this.sheetData[0]),this.headers.forEac
3h(w=>{this.headerData.push({header:w,dbHeader:this.tryAutoMatch(w),invalid:!1})}),this.uploadingMemberList=!0,this.tableLoading=!1},i.readAsBinaryString(n[0])}}onDragOver(e){e.preventDefault()}onFileChange(e){this.fileAttached=!0;let n=e.target.files;if(n[0]&&n[0].type.match(/.(sheet|excel|csv)$/i))this.envelopeFile=n[0];else{let d=this.dialog.open(O,{data:{data:"<h4>Error: Please select an excel file.</h4>",type:"simple-info"}});this.fileAttached=!1;return}let i=e.target;if(i.files.length!==1)throw this.fileAttached=!1,new Error("Cannot use multiple files");this.fileName=i.files[0].name,this.tableLoading=!0;let a=new FileReader;a.onload=d=>{let c=d.target.result,p=ze(c,{type:"binary"}),h=p.SheetNames[0],g=p.Sheets[h],x=Y.sheet_to_json(g,{header:1});this.sheetJSONData=Y.sheet_to_json(g),console.log("sheetJSONData: ",this.sheetJSONData),this.cleanData();let w=[];this.headers=[],this.sheetData=[],x.forEach((T,D)=>{let V=[];T.forEach((B,$)=>{x[0][$]?(D==0&&this.headers.push(B),V.push(B)):w.push($)}),this.sheetData.push(V)}),console.log("invalidHeaderIndexes",w),console.log("this.headers",JSON.parse(JSON.stringify(this.headers))),console.log("this.sheetData",this.sheetData[0]),this.headers.forEach(T=>{this.tryAutoMatch(T),this.headerData.push({header:T,dbHeader:this.tryAutoMatch(T),invalid:!1})}),this.uploadingMemberList=!0,this.tableLoading=!1},a.readAsBinaryString(i.files[0])}cleanData(){this.sheetJSONData.forEach((e,n)=>{for(let i in e)if(e[i]&&(typeof e[i]=="string"&&(e[i]=this.sanitizeWithDashes(e[i])),typeof e[i]=="number"&&(e[i]=e[i].toString()),i.toLowerCase().indexOf("date")!=-1)){let a=this.cleanDate(e[i]);a.error?e[i]="":e[i]=a.date}})}sanitizeWithDashes(e){return typeof e!="string"||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)?e:e.replace(/[^a-zA-Z0-9 )(-/]+/g," ").replace(/-+/g,"-").trim()}cleanDate(e){if(e==null)return e;if(!isNaN(e)&&Number(e)>59&&Number(e)<6e4){let a=new Date(1900,0,1),d=new Date(a.getTime()+(Number(e)-2)*24*60*60*1e3);return{date:(0,ie.default)(d).format("MM/DD/YYYY"),error:!1}}let n=["MM/DD/YYYY","M/D/YYYY","MM-DD-YYYY","M-D-YYYY","YYYY-MM-DD","YYYY/MM/DD","MM/DD/YYYY hh:mm:ss A","M/D/YYYY hh:mm:ss A","MM-DD-YYYY hh:mm:ss A","M-D-YYYY hh:mm:ss A","YYYY-MM-DD hh:mm:ss A","YYYY/MM/DD hh:mm:ss A"],i=(0,ie.default)(e.toString().trim(),n,!0);return i.isValid()?{date:i.format("MM/DD/YYYY"),error:!1}:{date:e,error:!0}}trackByFn(e,n){return e}generateExcelHeaders(e){let n=[],i=1;for(;n.length<e;)n.push(this.convertToExcelHeader(i)),i++;return n}convertToExcelHeader(e){let n="";for(;e>0;)e--,n=String.fromCharCode(65+e%26)+n,e=Math.floor(e/26);return n}validateMapping(){this.loadingMapper=!0,setTimeout(()=>{let e=!0,n=[];if(this.headerData.forEach(i=>{i.dbHeader==""&&(n.push(i.header),i.invalid=!0,e=!1)}),e){let i=[];this.headerData.forEach(d=>{this.sheetJSONData.forEach(c=>{c[d.header]?d.dbHeader=="Ignore"||(c[d.dbHeader]=c[d.header]?c[d.header].toString().slice():"",d.header!=d.dbHeader&&d.dbHeader!="Ignore"&&delete c[d.header]):d.dbHeader=="Ignore"?c[d.header]="":c[d.dbHeader]=""})});for(let d in this.sheetJSONData[0])i.push(d);let a=this.generateExcelHeaders(i.length);console.log("hhd: ",a),this.sheetJSONData.forEach((d,c)=>{this.excelHeader.push({x:c,y:a[c]})}),this.showDataTable=!0,this.dialog.open(Cd,{data:{data:{headers:this.appendIndexToDuplicates(i),sheetData:this.sheetJSONData,keysArray:this.keysArray,CTID:this.CTID,OrgID:this.data.OrgID,UC:this.data.UC,fileName:this.fileName,excelHeader:this.excelHeader},type:"generalConfirm"},panelClass:"full-screen-dialog",maxWidth:"100vw",maxHeight:"100vh",height:"100%",width:"100%"}).afterClosed().subscribe(d=>{d?(this.dialog.open(O,{data:{data:"<h4>Mapping Successful!</h4>",type:"simple-info"}}),this.uploadingMemberList=!1,this.envelopeFile=null,this.fileName="",this.sheetData=[],this.headerData=[],this.fileAttached=!1):this.dialog.open(O,{data:{data:"<h4>Mapping Cancelled!</h4>",type:"simple-info"}}),this.showDataTable=!1,this.loadingMapper=!1})}else{let i=`<h4>Invalid Headers! Please check the mapping.</h4><br /><br />${n.join(", ")}`;this.dialog.open(O,{data:{data:i,type:"simple-info"}}),this.loadingMapper=!1}},1e3)}appendIndexToDuplicates(e){let n={};return e.map(i=>n[i]!==void 0?(n[i]++,`${i} ${n[i]}`):(n[i]=0,i))}expandYR(e){console.log("this.acc: ",this.acc),this.isYopen?(document.getElementById("years-report-btn").style.display="none",document.getElementById("years-end-report").style.width="60px"):(document.getElementById("years-end-report").style.width=this.acc?.CensusSoftware?"450px":"375px",setTimeout(()=>{document.getElementById("years-report-btn").style.display="inline-block"},750)),this.isYopen=!this.isYopen}copyArr(e){for(var n=[],i=0;i<e.length;i++)n[i]=this.copy(e[i]);return n}copy(e){var n={};for(var i in e)n[i]=e[i];return n}InitYearsEnd(){console.log("this.acc: ",this.acc),setTimeout(()=>{document.getElementById("years-end-report")&&document.getElementById("years-report-btn")&&(document.getElementById("years-end-report").style.width=this.acc?.CensusSoftware?"450px":"375px",setTimeout(()=>{document.getElementById("years-report-btn")&&(document.getElementById("years-report-btn").style.display="inline-block",setTimeout(()=>{this.isYopen&&document.getElementById("years-report-btn")&&(document.getElementById("years-report-btn").style.display="none",document.getElementById("years-end-report").style.width="60px",this.isYopen=!1)},1e4))},750))},1e3),this.isYopen=!0}yearsEndR(e,n){this.loading=!0;var i={UC:this.data.UC,year:e,OrgID:this.data.OrgID,reportType:n};this.subIndex++,this.subscriptionArr[this.subIndex]=this.mainService.OrgYearEndReport(i,n).subscribe(a=>{this.loading=!1})}censusYearsEndR(e,n){this.loading=!0;var i={UC:this.data.UC,year:e,OrgID:this.data.OrgID,reportType:n},a="";n=="ParishionerTotal"?a="_ParishionerTotal_IncldEnvGiv":a="_ContributionTotal_IncldEnvGiv",this.subIndex++,this.subscriptionArr[this.subIndex]=this.mainService.OrgCensusYearEndReport(i,a).subscribe(d=>{this.loading=!1})}merge(e,n){var i={};for(var a in e)i[a]=e[a];for(var a in n)i[a]=n[a];return i}mergeAccounts(){if(typeof this.selectedForMergeB.KeepSignOnDate!="boolean"||typeof this.selectedForMergeB.KeepUsern
3ame!="boolean"){this.dialog.open(O,{data:{data:"<h4>Please select the Username and Sign-On date to keep and try again.</h4>",type:"simple-info"}});return}var e=`<div>\u26A0\uFE0F Attention: Account Merge Warning \u26A0\uFE0F</div><br /><div>This action is IRREVERSIBLE. Proceed with caution when merging accounts!</div><br /><div>Please ensure that you have selected the correct account to Merge and to Keep.</div><br /><div>Would you like to continuing merging <span style="color: #c0170b;">${this.selectedForMergeB.LastName+" "+this.selectedForMergeB.MiddleName+" "+this.selectedForMergeB.FirstName}</span> into <span style="color: #c0170b;">${this.selectedForMergeA.LastName+" "+this.selectedForMergeA.MiddleName+" "+this.selectedForMergeA.FirstName}</span> ?</div>`;this.dialog.open(ee,{data:{data:e,type:"generalConfirm"}}).afterClosed().subscribe(n=>{if(n){let i={UC:this.data.UC,UsernameToKeep:this.selectedForMergeA.UserName,UsernameToRemove:this.selectedForMergeB.UserName,KeepSignOnDate:this.selectedForMergeB.KeepSignOnDate,KeepUsername:this.selectedForMergeB.KeepUsername};console.log("Merging accounts with data: ",i),this.mainService.mergeAcc(i).subscribe(a=>{let d;d=a,this.dialog.open(O,{data:{data:`<h4>${d}</h4>`,type:"simple-info"}}),d==="Done!"&&(this.selectedForMergeA={},this.selectedForMergeB={},this.searchDupMember())})}})}openNewMemberDetailsDialog(){var e=this.merge({},this.newMemberRow);e.OrgID=this.data.OrgID,e.CTID=this.CTID,e.Orgs[0].OrganizationKey=this.data.OrganizationID,e.studentData=[],e.isNewMember=!0;var n={CF:{CTID:this.data.defaultCTID,status:1},UC:this.data.UC};n.UC.CTID=this.data.defaultCTID,this.mainService.Contributions(n).subscribe(i=>{var a={parentComponentRoute:"/parish/members",selectedView:"primary",data:e,states:this.data.States,marital:this.data.MaritalStatus,UC:this.data.UC,orgData:this.data,CTID:this.CTID,isNewMember:!0,isSimple:!0,parentComponent:"members",contributions:i.Contributions,selectedStudRow:!1};console.log("d :",a),this.appData.changeSelectedMember(a),this.router.navigate(["/parish/member-details"])})}openMemberDetailsDialog(e,n){e.StudentData=[];var i={CF:{CTID:this.data.defaultCTID,status:1},UC:this.data.UC};i.UC.CTID=this.data.defaultCTID,this.mainService.Contributions(i).subscribe(a=>{var d={parentComponentRoute:"/parish/members",selectedView:"primary",data:e,states:this.data.States,marital:this.data.MaritalStatus,UC:this.data.UC,orgData:this.data,isSimple:!0,isPending:n,CTID:this.data.defaultCTID,parentComponent:"members",contributions:a.Contributions};console.log("d: ",d),this.appData.changeSelectedMember(d),this.router.navigate(["/parish/member-details"])})}approvePending(e){this.pendingLoading=!0;let n={UC:this.data.UC,MemberID:e.MemberId,OrgID:this.data.OrgID,CTID:this.data.CTID};this.mainService.approveCensusPending(n).subscribe(i=>{i.status?this.dialog.open(O,{data:{data:"<h4>Member Approved!</h4>",type:"simple-info"}}).afterClosed().subscribe(d=>{this.initPending()}):this.dialog.open(O,{data:{data:"<h4>Something went wrong. Please try again later. If you continue to have issues, reach out to Parish Giving.</h4>",type:"simple-info"}}).afterClosed().subscribe(d=>{})})}rejectPending(e){this.pendingLoading=!0;let n={UC:this.data.UC,MemberID:e.MemberId,OrgID:this.data.OrgID,CTID:this.data.CTID};this.mainService.rejectCensusPending(n).subscribe(i=>{i.status?this.dialog.open(O,{data:{data:"<h4>Member Rejected! You can still find the member in your list, but they will not be marked as part of your parish.</h4>",type:"simple-info"}}).afterClosed().subscribe(d=>{this.initPending()}):this.dialog.open(O,{data:{data:"<h4>Something went wrong. Please try again later. If you continue to have issues, reach out to Parish Giving.</h4>",type:"simple-info"}}).afterClosed().subscribe(d=>{})})}returnNoEnvMember(){this.filters.noenvelope=!0,this.searchTerm="",this.searchType="envelope",this.filters.member=!1,this.filters.volunteer=!1,this.filters.genderMaleFilter=!1,this.filters.genderFemaleFilter=!1,this.filters.Age.Min="",this.filters.Age.Max="",this.filters.InActiveMemberOnly=!1,this.sortCol="",this.sortDir="",this.startIndex=0,this.updateMemberSearch()}checkSelectForMerge(e,n){e=="a"&&(this.selectedForMergeB.MemberId==n.MemberId&&(this.selectedForMergeB={}),this.selectedForMergeA=n),e=="b"&&(this.selectedForMergeA.MemberId==n.MemberId&&(this.selectedForMergeA={}),this.selectedForMergeB=n),this.selectedForMergeA.MemberId&&this.selectedForMergeB.MemberId&&document.getElementById("mergeSection").scrollIntoView({behavior:"smooth",block:"center"})}searchDupMember(){this.searchTerm&&(this.searchType="email",this.filters.family=!0,this.filters.includeUnlinkedMember=!1,this.filters.UnlinkedMemberOnly=!1,this.filters.member=!1,this.filters.InActiveMemberOnly=!1,this.filters.family=!1,this.updateMemberSearch())}
3searchMember(e){e&&e.toggle(),this.filters.noenvelope=!1,this.updateMemberSearch()}checkDate(e){return e&&e.toString().indexOf("Invalid")==-1&&e.length>4?!!(0,ie.default)(e).isValid():!1}getSignOnDate(e){var n=e.replace(/\s{2,}/g," "),i=new Date(Date.parse(n));return i<=new Date("1/1/1900")?"N/A":i.toLocaleDateString()}refreshData(e,n,i,a,d,c){if(this.noResults=!1,n){if(d){for(var p=0;p<this.data.MemberList.length;p++)for(var h=0;h<e.MemberList.length;h++)if(this.data.MemberList[p].Age=this.getAge(this.data.MemberList[p].DOB),e.MemberList[h].MemberId==this.data.MemberList[p].MemberId){this.data.MemberList[p]=this.merge(this.data.MemberList[p],e.MemberList[h]);break}}if(c)for(var p=0;p<this.data.StudentList.length;p++)for(var h=0;h<e.StudentList.length;h++)this.data.StudentList[p].StudentID==e.StudentList[h].StudentID&&(this.data.StudentList[p]=this.merge(this.data.StudentList[p],e.StudentList[h]))}else d&&(this.data.MemberList=e.MemberList),c&&(this.data.StudentList=e.StudentList);i&&(this.data.MemberList=this.data.StudentList.filter(function(x){return x.EnrolledStudentNo>0}));for(var p=0;p<this.data.MemberList.length;p++)this.data.MemberList[p].Age=this.getAge(this.data.MemberList[p].DOB);this.CTID=this.data.defaultCTID,this.refreshLoading=!1,this.isSearching=!0,d&&setTimeout(()=>{this.MemberDataSource.paginator=this.memberDataPaginator,this.MemberDataSource.sort=this.memberDataSort,this.data.MemberList.forEach(g=>{g.selected=!1,g.SignOnDate=this.getSignOnDate(g.SignOnDate)}),this.MemberDataSource.data=this.data.MemberList,this.MemberDataSource.sortingDataAccessor=(g,x)=>{var w=g;switch(x){case"SignOnDate":return new Date(w.SignOnDate).toString().toLowerCase().indexOf("invalid")==-1?new Date(w.SignOnDate):"";default:return g[x]}},this.MemberDataSource.filteredData.length<1&&(this.noResults=!0)},100)}checkIfMemberSelected(){var e=!1;return this.MemberDataSource.data.forEach(n=>{n.selected&&(e=!0)}),e}exportMembSch(e){var n=this.data.defaultCTID,i={};i.orgTypeID=this.data?.OrgTypeID,i.email="",i.envelope="",i.memberName="",i.orgName="",i.organizationId="";var a=JSON.parse(sessionStorage.getItem("UC")),d={CTID:n,UC:a,MF:i};this.subIndex++,this.subscriptionArr[this.subIndex]=this.mainService.exportMembSchCSV(d).subscribe(c=>{var h=c.k.split("=");window.open("./reports.aspx?ea="+h[1]);var g="MemberSchedule_List",x="reports.aspx?ea="+h[1];this.mainService.saveReportFile(x,g).subscribe(w=>{w?.indexOf("Error")>-1&&this.dialog.open(O,{data:{data:"<h4>No File Found!</h4>",type:"simple-info"}})})})}exportMembersCSVFiltered(e){this.tableLoading=!0;var n={AC:this.data.UC,email:this.searchType=="email"?this.searchTerm:"",envelope:this.searchType=="envelope"?this.filters.noenvelope?"empty":this.searchTerm:"",memberName:this.searchType=="memberName"?this.searchTerm:"",childName:this.searchType=="childName"?this.searchTerm:"",username:this.searchType=="username"?this.searchTerm:"",phoneNumber:this.searchType=="phoneNumber"?this.searchTerm:"",groupByFamilyFilter:this.filters.family,isRegisteredForCensusFilter:this.filters.member,InActiveMemberOnly:this.filters.InActiveMemberOnly,isVolunteeringFilter:this.filters.volunteer,genderMaleFilter:this.filters.genderMaleFilter,genderFemaleFilter:this.filters.genderFemaleFilter,minAgeFilter:this.filters.Age.Min,maxAgeFilter:this.filters.Age.Max,sortingCol:this.sortCol,sortType:this.sortDir?this.sortDir:"asc",skippedRows:0,lastRowToGet:this.MemberDataSource?.paginator?.length||1e4,includeUnlinkedMember:this.filters.includeUnlinkedMember||!1,UnlinkedMemberOnly:this.filters.UnlinkedMemberOnly||!1};this.isSearching=!0,this.subIndex++,this.subscriptionArr[this.subIndex]=this.mainService.exportMembersCSVFiltered(n).subscribe(i=>{this.isSearching=!1,this.tableLoading=!1;var d=i.k.split("="),c="Member_List_Filtered",p="reports.aspx?ea="+d[1];this.mainService.saveReportFile(p,c).subscribe(h=>{h?.indexOf("Error")>-1&&this.dialog.open(O,{data:{data:"<h4>No File Found!</h4>",type:"simple-info"}})})})}exportM(e){var n=this.data.defaultCTID,i={};i.orgTypeID=this.data?.OrgTypeID,i.email="",i.envelope="",i.memberName="",i.orgName="",i.organizationId="";var a=JSON.parse(sessionStorage.getItem("UC")),d={CTID:n,UC:a,MF:i};this.exportingAll=!0,this.subIndex++,this.subscriptionArr[this.subIndex]=this.mainService.exportMembersCSV(d).subscribe(c=>{var h=c.k.split("="),g="All_Member_List",x="reports.aspx?ea="+h[1];console.log("link",x),this.mainService.saveReportFile(x,g).subscribe(w=>
3{this.exportingAll=!1,console.log("dRes",w),w?.indexOf("Error")>-1&&this.dialog.open(O,{data:{data:"<h4>No File Found!</h4>",type:"simple-info"}})})})}exportMBF(e){var n=this.data.defaultCTID,i={};i.orgTypeID=this.data?.OrgTypeID,i.email="",i.envelope="",i.memberName="",i.orgName="",i.organizationId="";var a=JSON.parse(sessionStorage.getItem("UC")),d={CTID:n,UC:a,MF:i};this.exportingAll=!0,this.subIndex++,this.subscriptionArr[this.subIndex]=this.mainService.exportMembersByFamilyCSV(d).subscribe(c=>{var h=c.k.split("="),g="All_Member_List",x="reports.aspx?ea="+h[1];console.log("link",x),this.mainService.saveReportFile(x,g).subscribe(w=>{this.exportingAll=!1,console.log("dRes",w),w?.indexOf("Error")>-1&&this.dialog.open(O,{data:{data:"<h4>No File Found!</h4>",type:"simple-info"}})})})}invalidCredentials(){this.snackBar.open("Invalid credential Please Log back In.","Close",{duration:5e3,panelClass:["warning"]}),sessionStorage.removeItem("t"),sessionStorage.removeItem("UC"),localStorage.removeItem("ut"),sessionStorage.removeItem("SessionStart"),this.router.navigate(["/index"])}ngOnDestroy(){this.memberAssistantV2PollGeneration+=1,this.subb&&this.subb.unsubscribe(),this.subscriptionArr.length>0&&this.subscriptionArr.forEach(e=>{e&&e.unsubscribe()}),this.clearMemberAssistantStore()}ngAfterViewInit(){setTimeout(()=>{this.MemberDataSource.paginator=this.memberDataPaginator,this.MemberDataSource.sort=this.memberDataSort,this.PendingDataSource.paginator=this.pendingDataPaginator,this.PendingDataSource.sort=this.pendingDataSort,setTimeout(()=>{this.tableLength=this.data.totalMemberCount},100)},100)}tryAutoMatch(e){let n="";return this.keysArray.forEach(i=>{i.name.toLowerCase()==e.toLocaleLowerCase()&&(n=i.name,i.selected=!0,i.status="selected")}),n}clearSelection(e){this.keysArray.forEach(n=>{n.name==e.dbHeader&&(n.selected=!1,n.status=this.requiredFields.indexOf(n.name)>-1?"required":"unselected")}),e.dbHeader="",this.filterOptions("")}onOptionSelected(e){console.log("Selected Value:",e.option.value),this.keysArray.forEach(n=>{n.name==e.option.value&&(n.selected=!0,n.status="selected")}),this.filterOptions("")}didSelect(e){let n=!1;return this.keysArray.forEach(i=>{i.name==e&&(n=i.selected)}),n}filterOptions(e){let n=e.toLowerCase();this.filteredOptions=this.keysArray.filter(h=>h.name.toLowerCase().includes(n)&&!h.selected);let i=this.keysArray.filter(h=>h.selected),a=[];i.forEach(h=>{a.push(h.name)});let d=this.headerData.filter(h=>h.dbHeader!="Ignore"&&h.dbHeader!=""&&h.dbHeader!=null),c=[];d.forEach(h=>{c.push(h.dbHeader)});let p=[];a.forEach(h=>{c.indexOf(h)==-1&&p.push(h)}),this.keysArray.forEach(h=>{p.indexOf(h.name)>-1&&(h.selected=!1,h.status="unselected")})}getSelectedKeysCount(){let e=0;return this.keysArray.forEach(n=>{n.selected&&e++}),e}ngOnInit(){Number(localStorage.getItem("ut"))==3&&(this.isPGUser=!0);let e=[];this.keysArray.forEach(i=>{e.push({name:i,selected:!1,required:!1,status:this.requiredFields.indexOf(i)>-1?"required":"unselected",type:i.toLowerCase().indexOf("date")>-1?"date":i.toLowerCase().indexOf("phone")>-1?"phone":i.toLowerCase().indexOf("email")>-1?"email":"text"})}),this.keysArray=e,console.log("this.keysArray",this.keysArray),this.loading=!0,this.filteredOptions=this.keysArray;var n=new Date;this.yearsEnds.push(n.getFullYear()-1),this.yearsEnds.push(n.getFullYear()-2),this.currentMonth=n.getMonth(),this.defaultFilterPredicate=this.MemberDataSource.filterPredicate,this.unsetFilters(),this.subb=this.appData.currentMessage.subscribe(i=>{if(i=="loading")this.loading=!0;else if(this.data){this.memberTableHeadersLoaded||this.loadMemberTableHeaders();var p=sessionStorage.getItem("pm_searchTerm"),h=sessionStorage.getItem("pm_searchType"),g=JSON.parse(sessionStorage.getItem("pm_filters")),x=sessionStorage.getItem("pm_currentPage"),w=JSON.parse(sessionStorage.getItem("pm_filtersReq")),T=sessionStorage.getItem("exactMatch");this.exactMatch=T==="true",p&&(this.currentPage=x?Number(x):0,Number(x)||sessionStorage.setItem("pm_currentPage","0"),this.searchTerm=p,this.searchType=h,this.filters=g,this.updateMemberSearch(w)),this.loading=!1}else{this.data=i,this.acc=JSON.parse(sessionStorage.getItem("acc")),this.memberTableHeadersLoaded||this.loadMemberTableHeaders(),this.appData.currentUserCredential.subscribe(D=>{console.log("credentials: ",D),this.userAccessObject=D}),console.log("this.acc: ",this.acc);var a=i,d={t:a.UC.t};if(this.subIndex++,this.subscriptionArr[this.subIndex]=this.mainService.getMaritalList(this.data.UC).subscribe(D=>{let V=D;this.data.MaritalStatus=V.MaritalStatus,this.subIndex++,this.subscriptionArr[this.subIndex]=this.mainService.getGradesList(this.data.UC).subscribe(B=>{let $=B;this.data.Grades=$.Grades;var K=sessionStorage.getItem("pm_searchTerm"),qe=sessionStorage.getItem("pm_searchType"),mi=JSON.parse(sessionStorage.getItem("pm_filtersReq")),xe=sessionStorage.getItem("pm_currentPage"),Qe=JSON.parse(sessionStorage.getItem("pm_filters")),li=sessionStorage.getItem("exactMatch");
3this.exactMatch=li==="true",(K||qe||Qe)&&(this.currentPage=xe?Number(xe):0,Number(xe)||sessionStorage.setItem("pm_currentPage","0"),this.searchTerm=K,this.searchType=qe,this.filters=Qe,this.updateMemberSearch(mi)),this.loading=!1})}),!localStorage.getItem("dontShowMembTabNewCME")||localStorage.getItem("dontShowMembTabNewCME")!="true"){var c=`<div>
4                          <p>Search for a member using name, email address or envelope number</p>
5                          <p>Need a full member list?  Click on the Export Members Button on the top right hand corner and you will receive a Full Member Excel Report.</p>
6                         <div>Interested in learning more about the new Church Management and Engagement System (CME)?</div>
7                         <br />
8                         <h4>Please email us at <a href="mailto:[email protected]">[email protected]</a>
9                         or call us at
10                         <a href="tel:+18663077140">+1 (866) 307-7140</a></h4>
11                       </div>`;this.dialog.open(ee,{data:{data:c,type:"popupAuthorization"}}).afterClosed().subscribe(D=>{D?localStorage.setItem("dontShowMembTabNewCME","true"):localStorage.setItem("dontShowMembTabNewCME","false")})}}})}handleRestrictedCheckbox(e,n){e&&(this.filters[n]=!1)}askParishMembersAssistant(){let e=(this.memberAssistantQuestion||"").trim();if(!e){this.memberAssistantError="Enter a question for the assistant.";return}this.askParishMembersAssistantV2(e)}chooseMemberAssistantBroaderScope(e){let n=this.memberAssistantPendingQuestion,i=this.memberAssistantPendingRequest,a=this.memberAssistantPendingPlan,d=this.memberAssistantPendingWarnings||[],c=this.memberAssistantPendingSubmittedAt||new Date,p=this.memberAssistantPendingStartedAt||Date.now();if(this.clearMemberAssistantScopePrompt(),!a){this.memberAssistantError="An unexpected error occurred. Please try again. If the problem persists, contact Parish Giving support.",console.log("The assistant did not return an analysis plan.");return}if(e&&i){this.fetchBroaderMemberAssistantRows(n,i,a,d,c,p);return}this.executeMemberAssistantResponse(n,a,d,this.getMemberAssistantSourceRows("loaded",a),"loaded","This answer is limited to the member data currently loaded on this page.",c,p)}runParishMembersAssistantQuestion(e){if(this.ensureMemberAssistantStoreScope(),this.getMemberAssistantActiveSource()==="members"&&!this.getCachedAllMemberAssistantEntry()){this.hydrateMemberAssistantFullList(e);return}let n=this.prepareMemberAssistantQuestion(e);if(n.needsSelection){this.memberAssistantOpen=!0,this.memberAssistantLoading=!1,this.memberAssistantError="",this.memberAssistantMemberLookup=n.lookup,this.loadMemberAssistantLookupCandidates(n.lookup);return}this.memberAssistantLoading=!0,this.memberAssistantOpen=!0,this.clearMemberAssistantScopePrompt(),this.memberAssistantResultChoice=null,this.memberAssistantError="",this.memberAssistantPlan=null,this.memberAssistantSummary="",this.memberAssistantRows=[],this.memberAssistantColumns=[],this.memberAssistantWarnings=[],this.memberAssistantChartBars=[],this.memberAssistantShowTable=!1,this.memberAssistantLastResultSet=null,this.memberAssistantActiveQuestionTemplate=n.questionTemplate,this.memberAssistantActiveReferences=n.references,this.memberAssistantActiveReferenceIsExplicit=n.explicitReference===!0;let i=this.getMemberAssistantActiveSource(),a=i==="pendingFamilies"?this.getMemberAssistantPendingRows():this.getMemberAssistantLoadedRows(),d={question:n.questionTemplate,conversationHistory:this.buildMemberAssistantConversationHistory(),context:{route:"/parish/members",activeTab:this.textLabel||"Members",activeSource:i,loadedRowCount:a.length,totalMatchingMemberCount:this.getMemberAssistantTotalCount(),memberServerScope:this.getMemberAssistantServerScope(),visibleFilterScope:this.getMemberAssistantVisibleFilterScope(),assistantCacheScope:this.getMemberAssistantCacheScope(),pendingScope:{loadedRowCount:this.getMemberAssistantPendingRows().length,pendingData:this.pendingData},familyRules:{familyKey:"PGFamilyID",pageUserType:"Census",primaryMeans:"CensusPrimary",secondaryMeans:"CensusSecondary",reMeans:"Religious Education",familyRoles:this.memberAssistantFamilyRoles},assistantFocus:this.getMemberAssistantFocusManifest(),memberReferences:n.references.map(h=>({ref:h.ref,source:h.source,familyDetailsCached:this.hasCachedMemberAssistantFamilyDetails(h)}))},dataModel:{fields:this.memberAssistantAllowedFields}},c=new Date,p=Date.now();this.mainService.getParishMembersAssistantPlan(d).subscribe(h=>
11{if(this.memberAssistantPlan=h?.plan||null,this.memberAssistantWarnings=h?.warnings||[],!this.memberAssistantPlan){this.memberAssistantError="The assistant did not return an analysis plan.",this.memberAssistantLoading=!1;return}try{this.memberAssistantPlan=this.normalizeMemberAssistantPlan(this.memberAssistantPlan,n.questionTemplate)}catch(g){this.memberAssistantError=g?.message||"The assistant returned an invalid analysis plan.",this.memberAssistantLoading=!1;return}this.continueMemberAssistantPlan(e,this.memberAssistantPlan,this.memberAssistantWarnings,c,p)},h=>{console.error("Parish members assistant error:",h),this.memberAssistantError=h?.error?.error||"Unable to reach the assistant.",this.memberAssistantLoading=!1})}continueMemberAssistantPlan(e,n,i,a,d){if(this.memberAssistantPlan=n,this.memberAssistantWarnings=i||[],n?.inputScope?.type==="clarifyAssistantResult"){this.showMemberAssistantResultChoice(e,n,i,a,d),this.memberAssistantLoading=!1;return}if(this.executeMemberAssistantFamilyRetrieval(e,n,i,a,d))return;let c=this.getMemberAssistantPlanScopeMode(n);if(c==="broader"){let g=this.getMemberAssistantPlanBroaderRequest(n);if(g?.needed){let x=g.useAllMembersCache?this.getCachedAllMemberAssistantRows():g.fetchRequest?this.getCachedMemberAssistantRows(g.fetchRequest,!0):null;if(x){this.executeMemberAssistantResponse(e,n,i,x,"broaderCached","This answer reused a full member search already loaded in memory. The page table was not changed.",a,d);return}this.showMemberAssistantScopePrompt("broader",e,n,i,a,d,g.message,g),this.memberAssistantLoading=!1;return}c="loaded"}let p=n?.inputScope?.type==="assistantResult",h=c==="loaded"||p?this.getCachedAllMemberAssistantRows():null;if(h&&n?.source!=="pendingFamilyRows"){this.executeMemberAssistantResponse(e,n,i,h,"broaderCached","This answer reused the full member list already loaded in memory. The page table was not changed.",a,d);return}this.executeMemberAssistantResponse(e,n,i,this.getMemberAssistantSourceRows(c,n),c,"",a,d)}showMemberAssistantResultChoice(e,n,i,a,d){let c=(this.memberAssistantResultContexts||[]).slice(-20).reverse();if(!c.length){this.memberAssistantError="There is no earlier assistant result in this chat to use for this follow-up.";return}this.memberAssistantResultChoice={question:e,plan:n,warnings:i,submittedAt:a,startedAt:d,candidates:c},this.memberAssistantError=""}chooseMemberAssistantResult(e){let n=this.memberAssistantResultChoice;n&&(this.memberAssistantResultChoice=null,n.plan.inputScope={type:"assistantResult",turnRef:e},this.memberAssistantLoading=!0,this.continueMemberAssistantPlan(n.question,n.plan,n.warnings||[],n.submittedAt||new Date,n.startedAt||Date.now()))}hydrateMemberAssistantFullList(e){this.memberAssistantLoading=!0,this.memberAssistantOpen=!0,this.memberAssistantError="",this.clearMemberAssistantScopePrompt();let n=this.getMemberAssistantStoreScopeKey();this.memberAssistantCache.getFullList(n,this.memberAssistantPersistentCacheMaxAgeMs).then(i=>{let a=this.dedupeMemberAssistantRows(i?.rows||[]);if(i&&i.totalMemberCount>0&&a.length>=i.totalMemberCount){let d=this.buildMemberAssistantBroaderFetchRequest({searchScope:"allMembers"},{source:"memberRows"});this.storeMemberAssistantRows(d,a,{totalMemberCount:i.totalMemberCount,complete:!0}),this.runParishMembersAssistantQuestion(e);return}this.loadMemberAssistantFullList(e)}).catch(()=>{this.loadMemberAssistantFullList(e)})}loadMemberAssistantFullList(e){this.memberAssistantLoading=!0,this.memberAssistantOpen=!0,this.memberAssistantError="",this.clearMemberAssistantScopePrompt();let n=this.buildMemberAssistantBroaderFetchRequest({searchScope:"allMembers"},{source:"memberRows"});this.fetchCompleteMemberAssistantRows(n,(i,a)=>{let d=this.createMemberAssistantCacheRows(i||[]);this.storeMemberAssistantRows(n,d,{totalMemberCount:a,complete:!0}),this.persistMemberAssistantFullList(d,a),this.runParishMembersAssistantQuestion(e)})}clearParishMembersAssistant(){this.newMemberAssistantChat()}resetLegacyMemberAssistantState(){this.memberAssistantQuestion="",this.memberAssistantError="",this.memberAssistantPlan=null,this.memberAssistantSummary="",this.memberAssistantRows=[],this.memberAssistantColumns=[],this.memberAssistantWarnings=[],this.memberAssistantChartBars=[],this.memberAssistantShowTable=!1,this.memberAssistantMessages=[],this.memberAssistantResultContexts=[],this.memberAssistantLastResultSet=null,this.memberAssistantLastExecutionRows=[],this.memberAssistantTurnSequence=0,this.memberAssistantResultChoice=null,this.memberAssistantFocus=null,this.memberAssistantActiveReferenceIsExplicit=!1,this.clearMemberAssistantScopePrompt()}openParishMembersAssistant(){this.canUseParishMembersAssistant&&(this.memberAssistantOpen=!0,this.loadMemberAssistantSessions(),this.memberAssistantV2ActiveSession&&this.resumeMemberAssistantSession(this.memberAssistantV2ActiveSession))}get canUseParishMembersAssistant(){return[2,3,5].includes(Number(localStorage.getItem("ut")))}get parishAssistantPageContext(){return{page:"members",filters:{searchType:this.searchType||"",searchTerm:this.searchTerm||"",registeredOnly:this.filters?.member??null,groupedByHousehold:this.filters?.family??null,inactiveOnly:this.filters?.InActiveMemberOnly??null,missingEnvelope:this.filters?.noenvelope??null,view:"member_directory"}}}get memberAssistantV2Enabled(){return this.memberAssistantV2.isEnabled()}closeParishMembersAssistant(){this.memberAssistantOpen=!1}loadMemberAssistantSessions(e=!1){return H(this,null,function*(){if(!(!this.data?.OrgID||this.memberAssistantV2SessionsLoading||this.memberAssistantV2SessionsLoaded&&!e)){this.memberAssistantV2SessionsLoading=!0;try{this.memberAssistantV2Sessions=yield this.memberAssistantV2.listSessions(this.data.OrgID),this.memberAssistantV2SessionsLoaded=!0}catch(n){this.memberAssistantError=this.getMemberAssistantV2Error(n,"Unable to load saved assistant chats.")}finally{this.memberAssistantV2SessionsLoading=!1}}})}toggleMemberAssistantHistory(){this.memberAssistantV2HistoryOpen=!this.memberAssistantV2HistoryOpen,this.memberAssistantV2HistoryOpen&&this.loadMemberAssistantSessions(!0)}
11newMemberAssistantChat(){this.memberAssistantV2PollGeneration+=1,this.memberAssistantV2ActiveSession=null,this.memberAssistantV2SnapshotReady=!1,this.memberAssistantV2Stage="",this.memberAssistantV2Progress=0,this.memberAssistantV2HistoryOpen=!1,this.resetLegacyMemberAssistantState()}resumeMemberAssistantSession(e){return H(this,null,function*(){if(!e?.id||!this.data?.OrgID||this.memberAssistantLoading)return;let n=++this.memberAssistantV2PollGeneration;this.memberAssistantV2ActiveSession=e,this.memberAssistantV2HistoryOpen=!1,this.memberAssistantV2SnapshotReady=!1,this.memberAssistantLoading=!0,this.memberAssistantError="",this.memberAssistantV2Stage="Loading conversation and current member data...",this.memberAssistantV2Progress=0;try{let i=this.memberAssistantV2.getSession(this.data.OrgID,e.id),a=this.loadMemberAssistantV2SnapshotRows(),d=yield i;if(n!==this.memberAssistantV2PollGeneration)return;d.session.activeMessageId&&(this.memberAssistantV2Stage="Finishing the response already running in this chat...",yield this.pollMemberAssistantV2Message(e.id,d.session.activeMessageId,n),d=yield this.memberAssistantV2.getSession(this.data.OrgID,e.id)),this.memberAssistantV2ActiveSession=d.session,this.memberAssistantMessages=(d.messages||[]).map(h=>this.mapMemberAssistantV2Message(h));let c=yield a;if(n!==this.memberAssistantV2PollGeneration)return;let p=yield this.memberAssistantV2.uploadSnapshot(this.data.OrgID,e.id,c,h=>this.updateMemberAssistantV2UploadProgress(h));if(n!==this.memberAssistantV2PollGeneration)return;this.memberAssistantV2ActiveSession=L(k({},this.memberAssistantV2ActiveSession),{snapshot:p}),this.memberAssistantV2SnapshotReady=!0,this.memberAssistantV2Stage="",this.memberAssistantV2Progress=100,this.replaceMemberAssistantSession(this.memberAssistantV2ActiveSession)}catch(i){n===this.memberAssistantV2PollGeneration&&(this.memberAssistantError=this.getMemberAssistantV2Error(i,"The chat was loaded, but current member data could not be refreshed."),this.memberAssistantV2Stage="")}finally{n===this.memberAssistantV2PollGeneration&&(this.memberAssistantLoading=!1)}})}deleteMemberAssistantSession(e,n){return H(this,null,function*(){if(n?.stopPropagation(),!(!e?.id||!this.data?.OrgID||!window.confirm(`Delete "${e.title}" and its stored member data?`))){this.memberAssistantError="";try{yield this.memberAssistantV2.deleteSession(this.data.OrgID,e.id),this.memberAssistantV2Sessions=this.memberAssistantV2Sessions.filter(i=>i.id!==e.id),this.memberAssistantV2ActiveSession?.id===e.id&&this.newMemberAssistantChat()}catch(i){this.memberAssistantError=this.getMemberAssistantV2Error(i,"Unable to delete the saved chat.")}}})}askParishMembersAssistantV2(e){return H(this,null,function*(){if(this.memberAssistantLoading||!this.data?.OrgID)return;let n=++this.memberAssistantV2PollGeneration,i=new Date;this.memberAssistantLoading=!0,this.memberAssistantOpen=!0,this.memberAssistantError="",this.memberAssistantV2Stage="Preparing current member data...",this.memberAssistantV2Progress=0;try{if(!this.memberAssistantV2ActiveSession){let p=yield this.loadMemberAssistantV2SnapshotRows();if(n!==this.memberAssistantV2PollGeneration)return;let h=yield this.memberAssistantV2.createSession(this.data.OrgID);if(n!==this.memberAssistantV2PollGeneration){this.memberAssistantV2.deleteSession(this.data.OrgID,h.session.id).catch(()=>{});return}this.memberAssistantV2ActiveSession=h.session,this.memberAssistantV2Sessions.unshift(h.session);let g=yield this.memberAssistantV2.uploadSnapshot(this.data.OrgID,h.session.id,p,x=>this.updateMemberAssistantV2UploadProgress(x));if(n!==this.memberAssistantV2PollGeneration)return;this.memberAssistantV2ActiveSession=L(k({},h.session),{snapshot:g}),this.memberAssistantV2SnapshotReady=!0,this.replaceMemberAssistantSession(this.memberAssistantV2ActiveSession)}if(this.memberAssistantV2ActiveSession&&!this.memberAssistantV2SnapshotReady){let p=yield this.loadMemberAssistantV2SnapshotRows();if(n!==this.memberAssistantV2PollGeneration)return;let h=yield this.memberAssistantV2.uploadSnapshot(this.data.OrgID,this.memberAssistantV2ActiveSession.id,p,g=>this.updateMemberAssistantV2UploadProgress(g));if(n!==this.memberAssistantV2PollGeneration)return;this.memberAssistantV2ActiveSession=L(k({},this.memberAssistantV2ActiveSession),{snapshot:h}),this.memberAssistantV2SnapshotReady=!0,this.replaceMemberAssistantSession(this.memberAssistantV2ActiveSession)}if(!this.memberAssistantV2SnapshotReady||!this.memberAssistantV2ActiveSession)throw new Error("Current member data must finish refreshing before a question can be sent.");let a=this.createMemberAssistantV2MessageId();this.memberAssistantQuestion="",this.memberAssistantV2Stage="Analyzing the current member snapshot...",yield this.memberAssistantV2.sendMessage(this.data.OrgID,this.memberAssistantV2ActiveSession.id,a,e);let d=yield this.pollMemberAssistantV2Message(this.memberAssistantV2ActiveSession.id,a,n);if(!d?.answer||n!==this.memberAssistantV2PollGeneration)return;let c={id:a,question:e,userTime:i.toISOString(),assistantTime:d.assistantTime||new Date().toISOString(),answer:d.answer,artifacts:d.artifacts||[]};this.memberAssistantMessages.push(this.mapMemberAssistantV2Message(c)),this.memberAssistantV2ActiveSession=L(k({},this.memberAssistantV2ActiveSession),{title:this.memberAssistantV2ActiveSession.title==="New member chat"?d.answer.title:this.memberAssistantV2ActiveSession.title,updatedAt:d.assistantTime||new Date().toISOString()}),this.replaceMemberAssistantSession(this.memberAssistantV2ActiveSession),this.memberAssistantV2Stage="",setTimeout(()=>{let p=document.querySelector(".member-assistant-thread");p&&(p.scrollTop=p.scrollHeight)})}catch(a){n===this.memberAssistantV2PollGeneration&&(this.memberAssistantError=this.getMemberAssistantV2Error(a,"Unable to complete the assistant request."),this.memberAssistantV2Stage="")}finally{n===this.memberAssistantV2PollGeneration&&(this.memberAssistantLoading=!1)}})}pollMemberAssistantV2Message(e,n,i){return H(this,null,function*(){let a=Date.now()+6e5;for(;i===this.memberAssistantV2PollGeneration&&Date.now()<a;){try{let d=yield this.memberAssistantV2.pollMessage(this.data.OrgID,e,n);if(d.status==="completed")return d;if(["failed","cancelled","incomplete"].includes(d.status))throw new Error(d.error||"The assistant response did not complete.")}catch(d){let c=Number(d?.status||0);if(c&&c!==202)throw d}yield new Promise(d=>setTimeout(d,2e3))}if(i!==this.memberAssistantV2PollGeneration)return null;throw new Error("The assistant is taking longer than expected. Reopen this chat to check the result.")})}loadMemberAssistantV2SnapshotRows(){return H(this,null,function*(){let e=this.buildMemberAssistantBroaderFetchRequest({searchScope:"allMembers"},{source:"memberRows"}),n=99999,i=new Map,a=0,d=0;for(;;){this.memberAssistantV2Stage=`Loading all members${a?` (${i.size} of ${a})`:""}...`;let p=yield U(this.mainService.getMembersPagination(L(k({},e),{skippedRows:d,lastRowToGet:n}))),h=Array.isArray(p?.MemberList)?p.MemberList:[];
11if(a=Number(p?.totalMemberCount||a||0),h.forEach(g=>{let x=g?.MemberId??g?.MemberID,w=this.stableMemberAssistantStringify(g);i.set(x!=null&&`${x}`!=""?`member:${x}`:`row:${w}`,g)}),this.memberAssistantV2Progress=a?Math.min(45,Math.round(i.size/a*45)):0,a>0&&i.size>=a||!a&&h.length<n)break;if(!h.length)throw new Error("The member search ended before the complete parish list was loaded.");d+=h.length}let c=Array.from(i.values());if(!c.length)throw new Error("No member rows are available for this parish.");return c})}updateMemberAssistantV2UploadProgress(e){if(e.stage==="preparing"){this.memberAssistantV2Stage="Preparing member snapshot...",this.memberAssistantV2Progress=45;return}if(e.stage==="completing"){this.memberAssistantV2Stage="Finalizing member snapshot...",this.memberAssistantV2Progress=95;return}let n=e.totalBytes?e.uploadedBytes/e.totalBytes:0;this.memberAssistantV2Stage="Analyzing data...",this.memberAssistantV2Progress=45+Math.round(n*45)}mapMemberAssistantV2Message(e){let n=e.answer,i=(n?.result?.columns||[]).map(p=>p.key),a=(n?.result?.rows||[]).map(p=>i.reduce((h,g,x)=>(h[g]=p[x],h),{})),d=Math.max(1,...(n?.chart?.series||[]).map(p=>Math.abs(Number(p.value||0)))),c=(n?.chart?.series||[]).map((p,h)=>({label:p.label,value:Number(p.value||0),formattedValue:this.formatMemberAssistantValue(n?.chart?.yLabel||"",p.value),width:`${Math.max(2,Math.round(Math.abs(Number(p.value||0))/d*100))}%`,color:this.memberAssistantChartColors[h%this.memberAssistantChartColors.length]}));return{id:e.id,question:e.question,userTime:e.userTime,assistantTime:e.assistantTime,title:this.cleanMemberAssistantSentence(n?.title||"Member assistant result"),summary:this.cleanMemberAssistantSentence(n?.clarification?.needed?n.clarification.question:n?.answer),assumptions:(n?.assumptions||[]).map(p=>this.cleanMemberAssistantSentence(p)),warnings:[],columns:i,rows:a,showTable:a.length>0,chartBars:c,chartSeries:n?.chart?.series||[],chartType:n?.chart?.type||"none",dataScopeLabel:this.cleanMemberAssistantSentence(n?.scope?.label||""),scopeWarning:"",resultTotal:n?.result?.totalRows||0,resultTruncated:n?.result?.truncated===!0,snapshotVersion:n?.resultState?.snapshotVersion||"",report:n?.artifact||{requested:!1,format:"none",filename:""},artifacts:e.artifacts||[]}}getMemberAssistantLinePoints(e){if(!e?.length)return"";let n=e.map(c=>Number(c.value||0)),i=Math.min(...n),d=Math.max(...n)-i||1;return n.map((c,p)=>{let h=e.length===1?50:p/(e.length-1)*100,g=90-(c-i)/d*80;return`${h},${g}`}).join(" ")}downloadMemberAssistantArtifact(e,n){return H(this,null,function*(){if(!(!n||!this.memberAssistantV2ActiveSession||!this.data?.OrgID))try{let i=yield this.memberAssistantV2.downloadArtifact(this.data.OrgID,this.memberAssistantV2ActiveSession.id,n);(0,se.saveAs)(i,n.filename)}catch(i){this.memberAssistantError=this.getMemberAssistantV2Error(i,"Unable to download this report.")}})}createMemberAssistantV2MessageId(){let e=window.crypto;return e.randomUUID?e.randomUUID():`turn-${Date.now()}-${Math.random().toString(16).slice(2)}`}replaceMemberAssistantSession(e){let n=this.memberAssistantV2Sessions.findIndex(i=>i.id===e.id);n>=0?this.memberAssistantV2Sessions[n]=e:this.memberAssistantV2Sessions.unshift(e),this.memberAssistantV2Sessions=[...this.memberAssistantV2Sessions].sort((i,a)=>new Date(a.updatedAt||0).getTime()-new Date(i.updatedAt||0).getTime())}getMemberAssistantV2Error(e,n){return e?.error?.error||e?.error?.message||e?.message||n}executeMemberAssistantResponse(e,n,i,a,d,c,p,h){if(!a.length){this.memberAssistantError="No member rows are available for the selected assistant scope.",this.memberAssistantLoading=!1;return}this.memberAssistantLastExecutionRows=a;let g=this.resolveMemberAssistantInputRows(n,a);if(!g.length){this.memberAssistantError=n?.inputScope?.type==="assistantResult"?"The selected earlier result is no longer available in this chat.":"No member rows are available for the selected assistant scope.",this.memberAssistantLoading=!1;return}this.memberAssistantError="",this.memberAssistantPlan=n,this.memberAssistantWarnings=i||[],this.executeMemberAssistantPlan(n,g);let x=n?.inputScope?.type==="assistantResult"?"assistantResult":d;this.addMemberAssistantMessage(e,n,p,new Date,(Date.now()-h)/1e3,this.getMemberAssistantDataScopeLabel(x,n),c),this.memberAssistantQuestion="",this.memberAssistantLoading=!1}executeMemberAssistantPlan(e,n){if(e?.output?.mode==="records"){let c=this.selectMemberAssistantResultRows(e,n),p=e?.output?.fields||[],h=c.map(g=>{let x=this.pickMemberAssistantFields(g);return p.reduce((w,T)=>L(k({},w),{[T]:x[T]}),{})});this.memberAssistantRows=h,this.memberAssistantColumns=p,this.memberAssistantChartBars=this.getMemberAssistantChartBars(e,h),this.memberAssistantSummary=this.buildMemberAssistantSummary(e,h,p),this.memberAssistantShowTable=h.length>1||!!e?.report?.format&&e.report.format!=="none",this.memberAssistantLastResultSet=this.createMemberAssistantResultSet(e,n,c,c.map(g=>[g]));return}if(e?.comparison?.enabled){this.executeMemberAssistantComparisonPlan(e,n),this.memberAssistantLastResultSet=this.createMemberAssistantResultSet(e,n,this.selectMemberAssistantResultRows(e,n));return}let i=this.getMemberAssistantExecutionRows(e,n).filter(c=>this.rowMatchesMemberAssistantFilters(c,e?.filters||[]));i=this.aggregateMemberAssistantRows(i,e),i=this.sortMemberAssistantRows(i,e?.sort||[]);let a=Number(e?.limit||0);a>0&&(i=i.slice(0,a)),this.memberAssistantRows=i,this.memberAssistantColumns=this.getMemberAssistantColumns(e,i),this.memberAssistantChartBars=this.getMemberAssistantChartBars(e,i),this.memberAssistantSummary=this.buildMemberAssistantSummary(e,i,this.memberAssistantColumns),this.memberAssistantShowTable=i.length>0&&!(i.length===1&&this.memberAssistantColumns.length===1&&!this.memberAssistantChartBars.length);let d=this.selectMemberAssistantResultRows(e,n);this.memberAssistantLastResultSet=this.createMemberAssistantResultSet(e,n,d)}createMemberAssistantResultSet(e,n,i,a=[]){let d=this.dedupeMemberAssistantRows(n||[]),c=new Map;d.forEach((g,x)=>c.set(`${this.getMemberAssistantRowId(g)}`,x));let p=g=>new Uint32Array((g||[]).map(x=>c.get(`${this.getMemberAssistantRowId(x)}`)).filter(x=>x!==void 0)),h=a.length?a:this.getMemberAssistantResultBindings(e,d,i);return{selectedIndexes:p(i),rowBindings:h.map(g=>p(g))}}getMemberAssistantResultBindings(e,n,i){let a=(e?.groupBy||[]).filter(x=>this.memberAssistantAllowedFields.includes(x));if(!a.length)return[i||[]];let d=n.map(x=>({raw:x,value:this.pickMemberAssistantFields(x)})).filter(x=>this.rowMatchesMemberAssistantFilters(x.value,e?.filters||[])),c=new Map;d.forEach(x=>{let w=this.getMemberAssistantGroupKey(x.value,a),T=c.get(w)||[];T.push(x),c.set(w,T)});let p=this.sortMemberAssistantRows(Array.from(c.values()).map(x=>this.buildMemberAssistantAggregateRow(a.reduce((w,T)=>L(k({},w),{[T]:x[0]?.value?.[T]??""}),{}),x.map(w=>w.value),e?.metrics||[])),e?.sort||[]),h=Number(e?.limit||0);
11return(h>0?p.slice(0,h):p).map(x=>c.get(this.getMemberAssistantGroupKey(x,a))?.map(w=>w.raw)||[])}normalizeMemberAssistantPlan(e,n){let i=e?.inputScope||{type:"fullMemberList",turnRef:""},a=["fullMemberList","assistantResult","clarifyAssistantResult"].includes(i?.type)?i:{type:"fullMemberList",turnRef:""},d=e?.output||{mode:e?.comparison?.enabled?"comparison":(e?.groupBy||[]).length?"groupedAggregate":"aggregate",fields:[]},c=L(k({},e),{version:"2",inputScope:a,rowSelector:this.normalizeMemberAssistantRowSelector(e?.rowSelector),output:{mode:["records","aggregate","groupedAggregate","comparison"].includes(d?.mode)?d.mode:"aggregate",fields:(d?.fields||[]).filter(p=>this.memberAssistantAllowedFields.includes(p))}});return c=ei(c,n,this.memberAssistantResultContexts),this.normalizeMemberAssistantFocusPlan(c,n),this.normalizeMemberAssistantFamilyMemberCount(c,n),this.normalizeSimpleMemberAssistantFamilyCount(c,n),this.validateMemberAssistantPlanLocally(c),c}normalizeMemberAssistantFocusPlan(e,n){let i=["fullList","latestResult","latestMember","latestFamily"],a=["all","subjectOnly","excludeSubject"],d=["resultSet","member","family"];e.contextTarget=i.includes(e?.contextTarget)?e.contextTarget:"fullList",e.selectionMode=a.includes(e?.selectionMode)?e.selectionMode:"all",e.focusTarget=d.includes(e?.focusTarget)?e.focusTarget:"resultSet";let c=this.memberAssistantFocus,p=/\b(all members|all parishioners|every member|parish[\s-]*wide|entire parish|across (?:the )?parish)\b/i.test(n||"");!c||p||this.memberAssistantActiveReferenceIsExplicit||(e.contextTarget==="fullList"&&(e.contextTarget=c.type==="family"?"latestFamily":c.type==="member"?"latestMember":"latestResult"),e.contextTarget==="latestResult"&&c.turnRef&&(e.inputScope={type:"assistantResult",turnRef:c.turnRef}),e.contextTarget==="latestFamily"&&c.memberRef&&(e.retrieval={type:"memberFamilyDetails",memberRef:c.memberRef,source:c.source||"regular"},e.inputScope={type:"fullMemberList",turnRef:""}),e.contextTarget==="latestMember"&&c.memberRef&&(e.inputScope={type:"fullMemberList",turnRef:""}),this.isMemberAssistantRemainingFamilyQuestion(n)&&c.type==="family"&&(e.contextTarget="latestFamily",e.selectionMode="excludeSubject",e.focusTarget="family",e.source="memberRows",e.inputScope={type:"fullMemberList",turnRef:""},e.output={mode:"records",fields:["DisplayName","FamilyRole"]},e.filters=[],e.groupBy=[],e.metrics=[],e.sort=[{field:"DisplayName",direction:"asc"}],e.limit=0,e.chart={type:"none",xField:"",yField:""},e.retrieval={type:"memberFamilyDetails",memberRef:c.memberRef,source:c.source||"regular"},e.responseTemplate="The other members of this family are listed below."))}isMemberAssistantRemainingFamilyQuestion(e){let n=`${e||""}`.toLowerCase();return/\b(other|others|else|remaining|rest)\b/.test(n)&&/\b(member|members|people|family)\b/.test(n)}normalizeSimpleMemberAssistantFamilyCount(e,n){let i=`${n||""}`.toLowerCase(),a=/\b(how many|number of|count|total)\b[\s\S]*\b(famil(?:y|ies)|households?)\b/.test(i),d=/\b(?:members?|people)\b[\s\S]*\b(?:this|that|the|his|her|their)\s+famil(?:y|ies)\b/.test(i),c=/\b(by|each|per|list|show|which|top|chart|report|download|export)\b/.test(i);!a||d||c||(e.source="familyRows",e.output={mode:"aggregate",fields:[]},e.groupBy=[],e.metrics=[{name:"familyCount",op:"count",field:""}],e.sort=[],e.limit=0,e.chart={type:"none",xField:"",yField:""},e.responseTemplate="There are {{familyCount}} families.")}normalizeMemberAssistantFamilyMemberCount(e,n){let i=`${n||""}`.toLowerCase(),a=/\b(how many|number of|count)\b/.test(i),d=/\b(members?|people)\b/.test(i),c=/\b(this|that|the|his|her|their)\s+famil(?:y|ies)\b/.test(i),p=(this.memberAssistantActiveReferences||[])[0];!a||!d||!c||!p?.ref||(e.source="familyRows",e.inputScope={type:"fullMemberList",turnRef:""},e.rowSelector={type:"all",index:0},e.contextTarget="latestFamily",e.selectionMode="all",e.focusTarget="family",e.output={mode:"aggregate",fields:[]},e.filters=[],e.groupBy=[],e.metrics=[{name:"familyMemberCount",op:"max",field:"FamilyMemberCount"}],e.sort=[],e.limit=0,e.chart={type:"none",xField:"",yField:""},e.retrieval={type:"memberFamilyDetails",memberRef:p.ref,source:p.source||"regular"},e.responseTemplate="There are {{familyMemberCount}} members in this family.")}normalizeMemberAssistantRowSelector(e){let n=e||{},i=["all","first","last","index"].includes(n?.type)?n.type:"all";return{type:i,index:i==="index"?Math.max(1,Math.min(500,Number(n?.index||1))):0}}validateMemberAssistantPlanLocally(e){let n=e?.output||{};if(n.mode==="records"&&(e.metrics=[],e.groupBy=[],!(n.fields||[]).length))throw new Error("The assistant requested a record view without specifying fields to display.");
11(e?.metrics||[]).forEach(d=>{if(["sum","avg","min","max"].includes(d?.op)&&!this.memberAssistantNumericFields.includes(d?.field))throw new Error("The assistant requested a numeric calculation for a nonnumeric field.")});let i=new Set([...n.fields||[],...e?.groupBy||[],...(e?.metrics||[]).map(d=>d?.name).filter(Boolean)]);if((`${e?.responseTemplate||""}`.match(/{{\s*([\w.]+)\s*}}/g)||[]).some(d=>!i.has(d.replace(/[{}\s]/g,""))))throw new Error("The assistant response refers to a field that is not part of its result.")}resolveMemberAssistantInputRows(e,n){if(e?.contextTarget==="latestMember"){let a=this.memberAssistantReferences.get(this.memberAssistantFocus?.memberRef);return a?.row?[a.row]:[]}let i=e?.inputScope||{type:"fullMemberList",turnRef:""};return i.type!=="assistantResult"?this.dedupeMemberAssistantRows(n||[]):this.resolveMemberAssistantResultRows(i.turnRef,n||[],new Set,e?.rowSelector)}resolveMemberAssistantResultRows(e,n,i,a=null){if(!e||i.has(e))return[];i.add(e);let d=(this.memberAssistantResultContexts||[]).find(h=>h.turnRef===e);if(!d?.plan)return[];if(d?.resultSet?.selectedIndexes){let h=this.normalizeMemberAssistantRowSelector(a),g=this.getMemberAssistantSelectedResultIndexes(d.resultSet,h);return this.getMemberAssistantRowsByIndexes(n,g)}let c=d.plan.inputScope||{type:"fullMemberList",turnRef:""},p=c.type==="assistantResult"?this.resolveMemberAssistantResultRows(c.turnRef,n,i,d.plan?.rowSelector):this.dedupeMemberAssistantRows(n||[]);return this.selectMemberAssistantResultRows(d.plan,p)}getMemberAssistantSelectedResultIndexes(e,n){let i=e?.rowBindings||[];return n?.type==="first"&&i.length?i[0]:n?.type==="last"&&i.length?i[i.length-1]:n?.type==="index"&&i.length?i[Math.min(i.length-1,Math.max(0,Number(n.index||1)-1))]:e.selectedIndexes||new Uint32Array}getMemberAssistantRowsByIndexes(e,n){let i=this.dedupeMemberAssistantRows(e||[]);return Array.from(n||[]).map(a=>i[a]).filter(Boolean)}selectMemberAssistantResultRows(e,n){let i=this.dedupeMemberAssistantRows(n||[]),a=e?.source==="familyRows"||e?.source==="pendingFamilyRows",c=(a?this.buildMemberAssistantFamilyRows(i):i.map(g=>this.pickMemberAssistantFields(g))).filter(g=>this.rowMatchesMemberAssistantFilters(g,e?.filters||[]));if(e?.selectionMode==="excludeSubject"){let g=this.memberAssistantReferences.get(this.memberAssistantFocus?.memberRef),x=g?this.getMemberAssistantEntityKey(g.row):"";c=c.filter(w=>this.getMemberAssistantEntityKey(w)!==x)}e?.comparison?.enabled&&Array.isArray(e?.comparison?.periods)&&e.comparison.periods.length&&(c=c.filter(g=>e.comparison.periods.some(x=>this.rowMatchesMemberAssistantFilters(g,x?.filters||[]))));let p=(e?.groupBy||[]).filter(g=>this.memberAssistantAllowedFields.includes(g));if(p.length){let g=this.sortMemberAssistantRows(this.aggregateMemberAssistantRows(c,e),e?.sort||[]),x=Number(e?.limit||0),w=x>0?g.slice(0,x):g,T=new Set(w.map(D=>this.getMemberAssistantGroupKey(D,p)));c=c.filter(D=>T.has(this.getMemberAssistantGroupKey(D,p)))}else{c=this.sortMemberAssistantRows(c,e?.sort||[]);let g=Number(e?.limit||0);g>0&&(c=c.slice(0,g))}if(a){let g=new Set(c.map(x=>`${x?.PGFamilyID||""}`).filter(Boolean));return i.filter(x=>g.has(`${x?.PGFamilyID||""}`))}let h=new Set(c.map(g=>`${this.getMemberAssistantRowId(g)||""}`).filter(Boolean));return i.filter(g=>h.has(`${this.getMemberAssistantRowId(g)||""}`))}executeMemberAssistantComparisonPlan(e,n){let i=e?.comparison?.dimensionField||e?.groupBy?.[0]||"",a=Array.isArray(e?.comparison?.periods)?e.comparison.periods:[],d=Array.isArray(e?.metrics)&&e.metrics.length?e.metrics:[{name:"rowCount",op:"count",field:""}],c=this.getMemberAssistantExecutionRows(e,n).filter(T=>this.rowMatchesMemberAssistantFilters(T,e?.filters||[])),p=new Set,h=a.map(T=>{let D=c.filter(B=>this.rowMatchesMemberAssistantFilters(B,T?.filters||[])),V=this.groupMemberAssistantRows(D,i);return V.forEach((B,$)=>p.add($)),{label:T?.label||"Period",groupedRows:V}}),g=Array.from(p).map(T=>{let D={};if(i&&(D[i]=T),h.forEach(V=>{let B=this.buildMemberAssistantAggregateRow({},V.groupedRows.get(T)||[],d);d.forEach($=>{let K=$?.name||$?.op||"value";D[this.getMemberAssistantComparisonColumn(V.label,K)]=B[K]})}),e?.comparison?.includeDelta&&h.length>
11=2&&d.length){let V=d[0]?.name||d[0]?.op||"value",B=Number(D[this.getMemberAssistantComparisonColumn(h[0].label,V)]||0),$=Number(D[this.getMemberAssistantComparisonColumn(h[1].label,V)]||0),K=B-$;D[this.getMemberAssistantComparisonDeltaColumn(V)]=K,D[this.getMemberAssistantComparisonPercentColumn(V)]=$?K/$*100:null}return D}),x=this.sortMemberAssistantRows(g,e?.sort||[]),w=Number(e?.limit||0);this.memberAssistantRows=w>0?x.slice(0,w):x,this.memberAssistantColumns=this.getMemberAssistantComparisonColumns(e,this.memberAssistantRows),this.memberAssistantChartBars=this.getMemberAssistantChartBars(e,this.memberAssistantRows),this.memberAssistantSummary=this.buildMemberAssistantSummary(e,this.memberAssistantRows,this.memberAssistantColumns),this.memberAssistantShowTable=this.memberAssistantRows.length>0}addMemberAssistantMessage(e,n,i,a,d,c,p){let h=`assistant_result_${++this.memberAssistantTurnSequence}`,g=this.updateMemberAssistantFocus(n,h),x=g?.memberRef?this.memberAssistantReferences.get(g.memberRef):null,w=[...this.memberAssistantActiveReferences||[],...x?[x]:[]].filter((D,V,B)=>D?.ref&&B.findIndex($=>$?.ref===D.ref)===V),T={turnRef:h,question:e,title:n?.title||"Assistant",summary:this.memberAssistantSummary,dataScopeLabel:c,scopeWarning:p,userTime:i,assistantTime:a,runTimeSeconds:d,assumptions:n?.assumptions||[],showExplanation:!1,warnings:this.memberAssistantWarnings||[],rows:this.memberAssistantRows||[],columns:this.memberAssistantColumns||[],chartBars:this.memberAssistantChartBars||[],chartType:n?.chart?.type||"none",showTable:this.memberAssistantShowTable,report:n?.report||{format:"none",filename:""},plan:n,questionTemplate:"Prior assistant result",resultSet:this.memberAssistantLastResultSet,memberReferences:w.map(D=>({ref:D.ref,source:D.source,familyDetailsCached:this.hasCachedMemberAssistantFamilyDetails(D)}))};this.memberAssistantMessages.push(T),this.memberAssistantResultContexts.push({turnRef:h,title:T.title,questionTemplate:T.questionTemplate,plan:n,dataScopeLabel:c,resultCount:T.rows.length,outputFields:T.columns,outputMode:n?.output?.mode||"aggregate",rowSelector:n?.rowSelector||{type:"all",index:0},resultSet:T.resultSet,chartType:T.chartType,reportFormat:T.report?.format||"none",memberReferences:T.memberReferences,focus:this.getMemberAssistantFocusManifest()}),this.memberAssistantMessages.length>10&&(this.memberAssistantMessages=this.memberAssistantMessages.slice(-10)),this.memberAssistantResultContexts.length>50&&(this.memberAssistantResultContexts=this.memberAssistantResultContexts.slice(-50))}updateMemberAssistantFocus(e,n){let i=(this.memberAssistantActiveReferences||[])[0]||(this.memberAssistantFocus?.memberRef?this.memberAssistantReferences.get(this.memberAssistantFocus.memberRef):null),a=e?.focusTarget||"resultSet";if((a==="family"||e?.contextTarget==="latestFamily"||e?.retrieval?.type==="memberFamilyDetails")&&i?.ref)return this.memberAssistantFocus={type:"family",memberRef:i.ref,source:i.source,familyId:i.familyId||"",turnRef:n,resultSet:this.memberAssistantLastResultSet},this.memberAssistantFocus;if(a==="member"){let c=i?.row||this.getMemberAssistantRepresentativeExecutionRow(),p=i||(c?this.getMemberAssistantReference(c,e?.source==="pendingFamilyRows"?"pending":"regular"):null);if(p?.ref)return this.memberAssistantFocus={type:"member",memberRef:p.ref,source:p.source,familyId:p.familyId||"",turnRef:n,resultSet:this.memberAssistantLastResultSet},this.memberAssistantFocus}return this.memberAssistantFocus={type:"resultSet",memberRef:"",source:e?.source==="pendingFamilyRows"?"pending":"regular",familyId:"",turnRef:n,resultSet:this.memberAssistantLastResultSet},this.memberAssistantFocus}getMemberAssistantRepresentativeExecutionRow(){let e=Array.from(this.memberAssistantLastResultSet?.rowBindings?.[0]||this.memberAssistantLastResultSet?.selectedIndexes||[]);return this.memberAssistantLastExecutionRows?.[Number(e[0])]||null}getMemberAssistantFocusManifest(){let e=this.memberAssistantFocus;if(!e)return{type:"none",memberRef:"",source:"",familyDetailsCached:!1,resultCount:0};let n=e.memberRef?this.memberAssistantReferences.get(e.memberRef):null;return{type:e.type||"resultSet",memberRef:e.memberRef||"",source:e.source||"",familyDetailsCached:n?this.hasCachedMemberAssistantFamilyDetails(n):!1,resultCount:Array.from(e?.resultSet?.selectedIndexes||[]).length}}showMemberAssistantScopePrompt(e,n,i,a,d,c,p,h){this.memberAssistantPendingQuestion=n,this.memberAssistantPendingRequest=h,this.memberAssistantPendingPlan=i,this.memberAssistantPendingWarnings=a||[],this.memberAssistantPendingSubmittedAt=d,this.memberAssistantPendingStartedAt=c,this.memberAssistantScopePrompt={type:e,message:p}}clearMemberAssistantScopePrompt(){this.memberAssistantScopePrompt=null,this.memberAssistantPendingQuestion="",this.memberAssistantPendingRequest=null,this.memberAssistantPendingPlan=null,this.memberAssistantPendingWarnings=[],this.memberAssistantPendingSubmittedAt=null,this.memberAssistantPendingStartedAt=0}getMemberAssistantActiveSource(){return this.textLabel==="Pending Families"?"pendingFamilies":"members"}ensureMemberAssistantStoreScope(){let e=this.getMemberAssistantStoreScopeKey(),n=Date.now();this.memberAssistantStore.scopeKey!==e&&(this.clearMemberAssistantStore(
11),this.memberAssistantStore.scopeKey=e),this.memberAssistantStore.lastAccessedAt=n}getMemberAssistantStoreScopeKey(){let e=this.data?.orgData?.OrgID??this.data?.OrgID??this.data?.orgID??"",n=this.data?.UC?.ID??this.data?.UC?.uname??"";return`${e}:${n}`}clearMemberAssistantStore(){this.memberAssistantFullResultCache=[],this.memberAssistantUniqueRows=[],this.memberAssistantReferenceSequence=0,this.memberAssistantReferences.clear(),this.memberAssistantReferenceByMemberKey.clear(),this.memberAssistantResultContexts=[],this.memberAssistantLastResultSet=null,this.memberAssistantLastExecutionRows=[],this.memberAssistantMessages=[],this.memberAssistantTurnSequence=0,this.memberAssistantResultChoice=null,this.memberAssistantActiveQuestionTemplate="",this.memberAssistantActiveReferences=[],this.memberAssistantActiveReferenceIsExplicit=!1,this.memberAssistantFocus=null,this.memberAssistantForcedReference=null,this.memberAssistantMemberLookup=null,this.memberAssistantBroaderLoadProgress=null,this.memberAssistantStore={scopeKey:"",lastAccessedAt:0,membersById:new Map,familiesByPGFamilyId:new Map,familyDetailsByFamilyId:new Map,coverageBySearchSignature:new Map}}prepareMemberAssistantQuestion(e){let n=this.getMemberAssistantReferenceCandidates(),i=this.memberAssistantForcedReference;if(this.memberAssistantForcedReference=null,i)return{needsSelection:!1,questionTemplate:this.replaceMemberAssistantReferenceText(e,i),references:[i],explicitReference:!0};let a=n.filter(p=>this.memberAssistantQuestionContainsName(e,p));if(a.length===1){let p=this.getMemberAssistantReference(a[0],a[0]?.isPending?"pending":"regular");return{needsSelection:!1,questionTemplate:this.replaceMemberAssistantReferenceText(e,p),references:[p],explicitReference:!0}}let d=this.getMemberAssistantFollowUpReferences(e),c=d.length?"":this.extractMemberAssistantLookupTerm(e);if(a.length>1||c){let p=a.length>1?a:n.filter(h=>this.memberAssistantMemberNameMatches(h,c));return{needsSelection:!0,lookup:{question:e,term:c||"",candidates:p.slice(0,10),message:(p.length>1,"Choose the member you mean before the assistant continues.")}}}return{needsSelection:!1,questionTemplate:this.redactMemberAssistantSensitiveText(e),references:d,explicitReference:!1}}getMemberAssistantReferenceCandidates(){let e=[...this.getMemberAssistantLoadedRows(),...this.getMemberAssistantPendingRows(),...this.memberAssistantUniqueRows,...Array.from(this.memberAssistantStore.membersById.values())];return this.dedupeMemberAssistantRows(e).filter(n=>this.getMemberAssistantDisplayNames(n).length)}getMemberAssistantDisplayNames(e){let n=`${e?.FirstName||""}`.trim(),i=`${e?.LastName||""}`.trim();return Array.from(new Set([`${e?.DisplayName||""}`.trim(),`${n} ${i}`.trim(),`${i}, ${n}`.trim()].filter(a=>a&&a.split(/\s+/).length>=2)))}memberAssistantQuestionContainsName(e,n){let i=this.normalizeMemberAssistantText(e);return this.getMemberAssistantDisplayNames(n).some(a=>i.indexOf(this.normalizeMemberAssistantText(a))>-1)}memberAssistantMemberNameMatches(e,n){let i=this.normalizeMemberAssistantText(n);return!!i&&this.getMemberAssistantDisplayNames(e).some(a=>{let d=this.normalizeMemberAssistantText(a);return d===i||d.indexOf(i)>-1||i.indexOf(d)>-1})}normalizeMemberAssistantText(e){return`${e||""}`.toLowerCase().replace(/[^a-z0-9]+/g," ").replace(/\s+/g," ").trim()}extractMemberAssistantLookupTerm(e){if(/\b(?:his|her|their|its)\s+(?:family|household|member details?|contact details?)\b/i.test(e||""))return"";let n=[/(?:family|household|member details?|contact details?)\s+(?:for|of)\s+([^?.!,]+)/i,/(?:for|of)\s+([^?.!,]+?)\s+(?:family|household|member details?|contact details?)/i,/([^?.!,]+?)'?s\s+(?:family|household|member details?|contact details?)/i,/\b(?:how old is|tell me about|look up|lookup|find)\s+([a-z][a-z'\-]*(?:\s+[a-z][a-z'\-]*){1,2})\s*[?.!]*$/i],i=new Set(["all members","all families","current member","current members","this member","that member","a member","the member","active members","inactive members","pending members","pending families","a pie chart","a chart","a report"]);for(let a of n){let c=`${`${e||""}`.match(a)?.[1]||""}`.replace(/^(?:(?:show|give|tell|list|me|the)\s+)+/i,"").trim();if(c&&!i.has(this.normalizeMemberAssistantText(c)))return c.slice(0,120)}return""}getMemberAssistantReference(e,n){let i=this.getMemberAssistantRowId(e),a=`${n}:${i||`${e?.PGFamilyID||""}:${e?.DisplayName||""}`}`,d=this.memberAssistantReferenceByMemberKey.get(a);if(d)return this.memberAssistantReferences.get(d);let c={ref:`member_ref_${++this.memberAssistantReferenceSequence}`,source:n==="pending"?"pending":"regular",memberId:i,familyId:e?.PGFamilyID||"",row:e};return this.memberAssistantReferences.set(c.ref,c),this.memberAssistantReferenceByMemberKey.set(a,c.ref),i&&this.memberAssistantStore.membersById.set(`${i}`,e),c}replaceMemberAssistantReferenceText(e,n){let i=`${e||""}`,a=n?.row||{};this.getMemberAssistantDisplayNames(a).sort((c,p)=>
11p.length-c.length).forEach(c=>{i=i.replace(new RegExp(this.escapeMemberAssistantRegExp(c),"gi"),n.ref)});let d=`${n?.lookupTerm||this.memberAssistantMemberLookup?.term||""}`.trim();return d&&(i=i.replace(new RegExp(this.escapeMemberAssistantRegExp(d),"gi"),n.ref)),this.redactMemberAssistantSensitiveText(i)}escapeMemberAssistantRegExp(e){return`${e||""}`.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}redactMemberAssistantSensitiveText(e){return`${e||""}`.replace(/[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}/gi,"[email]").replace(/\b(?:\+?1[-.\s]?)?(?:\(?\d{3}\)?[-.\s]?)\d{3}[-.\s]?\d{4}\b/g,"[phone]").replace(/\b(envelope|member\s*id|family\s*id)\s*#?\s*\d+\b/gi,"$1 [identifier]")}getMemberAssistantFollowUpReferences(e){if(!/\b(his|her|their|that member|that family|this member|this family)\b/i.test(e||""))return[];let n=this.memberAssistantMessages.length?this.memberAssistantMessages[this.memberAssistantMessages.length-1]:null,i=Array.isArray(n?.memberReferences)?n.memberReferences.slice(0,1):[];if(i.length)return i;let a=this.memberAssistantResultContexts.length?this.memberAssistantResultContexts[this.memberAssistantResultContexts.length-1]:null,d=this.getMemberAssistantRepresentativeResultRow(a);if(!d)return[];let c=a?.plan?.source==="pendingFamilyRows"?"pending":"regular";return[this.getMemberAssistantReference(d,c)]}getMemberAssistantRepresentativeResultRow(e){let n=e?.resultSet;if(!n)return null;let i=Array.from(n?.rowBindings?.[0]||n?.selectedIndexes||[]),a=e?.plan?.source==="pendingFamilyRows"?this.getMemberAssistantPendingRows():this.getCachedAllMemberAssistantRows();return(a.length?a:this.getMemberAssistantLoadedRows())[Number(i[0])]||null}loadMemberAssistantLookupCandidates(e){if(!e||Array.isArray(e.candidates)&&e.candidates.length)return;let n=`${e.term||""}`.trim();if(!n){e.candidates=this.getMemberAssistantReferenceCandidates().slice(0,10);return}this.memberAssistantMemberLookupLoading=!0;let i=this.buildMemberAssistantCurrentRequest(0,25);i.email="",i.envelope="",i.memberName=n.endsWith("*")?n:`${n}*`,i.childName="",i.username="",i.phoneNumber="",i.InActiveMemberOnly=!1,i.groupByFamilyFilter=!1,i.isRegisteredForCensusFilter=!1,i.isVolunteeringFilter=!1,i.genderMaleFilter=!1,i.genderFemaleFilter=!1,i.minAgeFilter="",i.maxAgeFilter="",i.includeUnlinkedMember=!1,i.UnlinkedMemberOnly=!1,this.subIndex++,this.subscriptionArr[this.subIndex]=this.mainService.getMembersPagination(i).subscribe(a=>{let d=this.normalizeMemberAssistantRows(a?.MemberList||[]);d.forEach(c=>{let p=this.getMemberAssistantRowId(c);p&&this.memberAssistantStore.membersById.set(`${p}`,c)}),this.memberAssistantMemberLookup===e&&(e.candidates=this.sortMemberAssistantBaseRows(this.dedupeMemberAssistantRows(d)).slice(0,10)),this.memberAssistantMemberLookupLoading=!1},()=>{this.memberAssistantMemberLookupLoading=!1,this.memberAssistantMemberLookup===e&&(e.error="Unable to find members right now.")})}selectMemberAssistantLookupCandidate(e){let n=this.memberAssistantMemberLookup;n&&(this.memberAssistantForcedReference=L(k({},this.getMemberAssistantReference(e,e?.isPending?"pending":"regular")),{lookupTerm:n.term}),this.memberAssistantMemberLookup=null,this.runParishMembersAssistantQuestion(n.question))}cancelMemberAssistantLookup(){this.memberAssistantMemberLookup=null,this.memberAssistantMemberLookupLoading=!1}normalizeMemberAssistantRows(e){return this.dedupeMemberAssistantRows(e||[]).map(n=>L(k({},n),{Age:n?.Age||this.getAge(n?.DOB),SignOnDate:n?.SignOnDate?this.getSignOnDate(n.SignOnDate):n?.SignOnDate}))}hasCachedMemberAssistantFamilyDetails(e){let n=`${e?.familyId||""}`;return!!n&&this.memberAssistantStore.familyDetailsByFamilyId.has(n)}executeMemberAssistantFamilyRetrieval(e,n,i,a,d){let c=n?.retrieval;if(c?.type!=="memberFamilyDetails")return!1;let p=this.memberAssistantReferences.get(c.memberRef);if(!p)return this.memberAssistantError="The selected member is no longer available. Please choose the member again.",this.memberAssistantLoading=!1,!0;let h=this.getCachedMemberAssistantFamilyDetails(p);if(h?.length)return this.executeMemberAssistantResponse(e,n,i,h,"familyDetails","This answer used family details already loaded in memory.",a,d),!0;let g={UC:this.data?.UC,MemberID:p.memberId,OrgID:p.row?.OrgID??this.data?.orgData?.OrgID??this.data?.OrgID,CTID:this.data?.CTID??this.CTID,MOStatus:-1};if(!g.MemberID)return this.memberAssistantError="The selected member is missing an ID and family details cannot be loaded.",this.memberAssistantLoading=!1,!0;p.source==="pending"&&delete g.MOStatus;let x=p.source==="pending"?this.mainService.pendingMemberStudentsDetail(g):this.mainService.memberStudentsDetail(g);return this.subIndex++,this.subscriptionArr[this.subIndex]=x.subscribe(w=>{let T=this.getMemberAssistantFamilyRowsFromResponse(w,p);if(!T.length){this.memberAssistantError="No family details were returned for the selected member.",this.memberAssistantLoading=!1;return}this.storeMemberAssistantFamilyDetails(p,T),this.executeMemberAssistantResponse(e,n,i,T,"familyDetails","This answer used family details loaded for the selected member.",a,d)},()=>{this.memberAssistantError="Unable to load family details for the selected member.",this.memberAssistantLoading=!1}),!0}getMemberAssistantFamilyRowsFromResponse(e,n){let i=`${n?.familyId||e?.SpouseA?.PGFamilyID||n?.row?.PGFamilyID||""}`,a=e?.SpouseA&&typeof e.SpouseA=="object"?[e.SpouseA]:[],d=Array.isArray(e?.SpouseB)?e.SpouseB:e?.SpouseB&&typeof e.SpouseB=="object"?[e.SpouseB]:[],c=Array.isArray(e?.Students)?e.Students:[],p=Array.isArray(e?.Dependents)?e.Dependents:[],h=this.normalizeMemberAssistantRows([...a.map(g=>this.normalizeMemberAssistantFamilyEntity(g,i,"member")),...d.map(g=>this.normalizeMemberAssistantFamilyEntity(g,i,"member")),...c.map(g=>this.normalizeMemberAssistantFamilyEntity(g,i,"student")),...p.map(g=>this.normalizeMemberAssistantFamilyEntity(g,i,"dependent"))]);return!h.some(g=>`${this.getMemberAssistantRowId(g)}`==`${n.memberId}`)&&n?.row&&h.push(n.row),this.sortMemberAssistantBaseRows(this.dedupeMemberAssistantRows(h))}normalizeMemberAssistantFamilyEntity(e,n,i){let a=`${e?.FirstName||""}`.trim(),d=`${e?.LastName||""}`.trim(),c=`${e?.DisplayName||`${d}${d&&a?", ":""}${a}
11`}`.trim(),p=e?.MemberID??e?.MemberId??e?.memberId??e?.memberID??e?.Memberid,h=e?.StudentID??e?.StudentId??e?.studentId,g=`${i}:${h||p||`${a}:${d}:${e?.DOB||""}`}`;return L(k({},e),{AssistantEntityId:p||g,PGFamilyID:e?.PGFamilyID||n,DisplayName:c||(i==="student"?"Student":"Family member"),FamilyRole:e?.FamilyRole||(i==="student"?"Child":i==="dependent"?"Adult":"Unknown"),AssistantEntityType:i})}getCachedMemberAssistantFamilyDetails(e){let n=`${e?.familyId||""}`,i=n?this.memberAssistantStore.familyDetailsByFamilyId.get(n):null;return i?.rows?this.dedupeMemberAssistantRows(i.rows):null}storeMemberAssistantFamilyDetails(e,n){let i=this.sortMemberAssistantBaseRows(this.dedupeMemberAssistantRows(n)),a=`${e?.familyId||i[0]?.PGFamilyID||e?.memberId||""}`;a&&(e.familyId=a,this.memberAssistantStore.familyDetailsByFamilyId.set(a,{rows:i,loadedAt:new Date}),this.memberAssistantStore.familiesByPGFamilyId.set(a,i),i.forEach(d=>{let c=this.getMemberAssistantRowId(d);c&&this.memberAssistantStore.membersById.set(`${c}`,d)}))}getMemberAssistantSourceRows(e,n){return n?.source==="pendingFamilyRows"?this.getMemberAssistantPendingRows():e==="visible"?this.getMemberAssistantVisibleRows():this.getMemberAssistantLoadedRows()}getMemberAssistantLoadedRows(){return Array.isArray(this.MemberDataSource?.data)?this.dedupeMemberAssistantRows(this.MemberDataSource.data):[]}getMemberAssistantVisibleRows(){return Array.isArray(this.MemberDataSource?.filteredData)&&`${this.MemberDataSource?.filter||""}`.trim()?this.dedupeMemberAssistantRows(this.MemberDataSource.filteredData):this.getMemberAssistantLoadedRows()}getMemberAssistantPendingRows(){return Array.isArray(this.PendingDataSource?.data)?this.dedupeMemberAssistantRows(this.PendingDataSource.data):[]}getMemberAssistantExecutionRows(e,n){let i=this.dedupeMemberAssistantRows(n||[]),a=e?.source==="familyRows"?this.buildMemberAssistantFamilyRows(i):i.map(p=>this.pickMemberAssistantFields(p)),d=this.memberAssistantReferences.get(this.memberAssistantFocus?.memberRef),c=d?this.getMemberAssistantEntityKey(d.row):"";return e?.selectionMode==="excludeSubject"&&c?a.filter(p=>this.getMemberAssistantEntityKey(p)!==c):e?.selectionMode==="subjectOnly"&&c?a.filter(p=>this.getMemberAssistantEntityKey(p)===c):a}getMemberAssistantGroupKey(e,n){return JSON.stringify((n||[]).map(i=>e?.[i]??""))}pickMemberAssistantFields(e){return{MemberId:this.getMemberAssistantRowId(e),PGFamilyID:e?.PGFamilyID,DisplayName:e?.DisplayName,FirstName:e?.FirstName,LastName:e?.LastName,FamilyName:e?.DisplayName,FamilyRole:e?.FamilyRole||"Unknown",Envelope:`${e?.Envelope||""}`.trim(),Gender:e?.Gender,Age:Number(e?.Age||this.getAge(e?.DOB)||0),Status:e?.Status,MOStatus:e?.MOStatus,RegisterCensus:this.toMemberAssistantBool(e?.RegisterCensus),Volunteer:this.toMemberAssistantBool(e?.Volunteer),InParish:this.toMemberAssistantBool(e?.InParish),Email:e?.Email||"",SecondaryEmail:e?.SecondaryEmail||"",EmailPresent:e?.EmailPresent!==void 0?this.toMemberAssistantBool(e.EmailPresent):`${e?.Email||""}`.trim()!=="",CellPhone:e?.CellPhone||"",HomePhone:e?.HomePhone||"",WorkPhone:e?.WorkPhone||"",SecondaryPhone:e?.SecondaryPhone||"",SecondaryCellPhone:e?.SecondaryCellPhone||"",SecondaryWorkPhone:e?.SecondaryWorkPhone||"",PhonePresent:e?.PhonePresent!==void 0?this.toMemberAssistantBool(e.PhonePresent):`${e?.CellPhone||e?.HomePhone||e?.WorkPhone||e?.SecondaryPhone||""}`.trim()!=="",Address:e?.Address||"",Address2:e?.Address2||"",SecondaryAddress1:e?.SecondaryAddress1||"",SecondaryAddress2:e?.SecondaryAddress2||"",City:e?.City,SecondaryCity:e?.SecondaryCity||"",State:e?.State,SecondaryState:e?.SecondaryState||"",Zip:e?.Zip,SecondaryZip:e?.SecondaryZip||"",ChildNames:e?.ChildNames,EnrolledStudentNo:Number(e?.EnrolledStudentNo||0),REEnrolledStudentNo:Number(e?.REEnrolledStudentNo||0),SignOnDate:e?.SignOnDate,YTDContributionAmount:Number(e?.YTDContributionAmount||0),YTDPaymentAmount:Number(e?.YTDPaymentAmount||0),CensusPrimary:this.toMemberAssistantBool(e?.CensusPrimary),CensusSecondary:this.toMemberAssistantBool(e?.CensusSecondary),REPrimary:this.toMemberAssistantBool(e?.REPrimary),RESecondary:this.toMemberAssistantBool(e?.RESecondary)}}buildMemberAssistantFamilyRows(e){let n=new Map;
11return this.dedupeMemberAssistantRows(e||[]).forEach(i=>{let a=`${i?.PGFamilyID||this.getMemberAssistantRowId(i)||"unknown"}`,d=n.get(a)||[];d.push(i),n.set(a,d)}),Array.from(n.entries()).map(([i,a])=>{let d=a.map(h=>this.pickMemberAssistantFields(h)),c=d.find(h=>h.CensusPrimary)||d.find(h=>h.FamilyRole==="Head")||d[0]||{},p=new Set(["Child","Daughter","Son","Granddaughter","Grandson"]);return L(k({},c),{PGFamilyID:i,FamilyName:c?.DisplayName||`Family ${i}`,FamilyMemberCount:d.length,FamilyPrimaryCount:d.filter(h=>h.CensusPrimary).length,FamilySecondaryCount:d.filter(h=>h.CensusSecondary).length,FamilyREPrimaryCount:d.filter(h=>h.REPrimary).length,FamilyRESecondaryCount:d.filter(h=>h.RESecondary).length,FamilyChildCount:d.filter(h=>p.has(h.FamilyRole)).length,FamilyHasPrimary:d.some(h=>h.CensusPrimary),FamilyHasSecondary:d.some(h=>h.CensusSecondary),FamilyHasREPrimary:d.some(h=>h.REPrimary),FamilyHasRESecondary:d.some(h=>h.RESecondary),YTDContributionAmount:d.reduce((h,g)=>h+Number(g.YTDContributionAmount||0),0),YTDPaymentAmount:d.reduce((h,g)=>h+Number(g.YTDPaymentAmount||0),0)})}).sort((i,a)=>`${i.FamilyName||""}`.localeCompare(`${a.FamilyName||""}`))}rowMatchesMemberAssistantFilters(e,n){return(n||[]).every(i=>{let a=i?.field;if(!this.memberAssistantAllowedFields.includes(a))return!0;let d=e?.[a],c=i?.value,p=i?.op,h=`${d??""}`.toLowerCase().trim();switch(p){case"equals":return h===`${c??""}`.toLowerCase().trim();case"in":return Array.isArray(c)&&c.map(g=>`${g??""}`.toLowerCase().trim()).includes(h);case"contains":return h.indexOf(`${c??""}`.toLowerCase().trim())>-1;case"containsAny":return Array.isArray(c)&&c.some(g=>h.indexOf(`${g??""}`.toLowerCase().trim())>-1);case"between":return this.memberAssistantNumberInRange(d,c);case"dateBetween":return this.memberAssistantDateInRange(d,c);case"gt":return Number(d)>Number(c);case"gte":return Number(d)>=Number(c);case"lt":return Number(d)<Number(c);case"lte":return Number(d)<=Number(c);case"isPresent":return d!=null&&`${d}`.trim()!=="";default:return!0}})}aggregateMemberAssistantRows(e,n){let i=(n?.groupBy||[]).filter(c=>this.memberAssistantAllowedFields.includes(c)),a=Array.isArray(n?.metrics)&&n.metrics.length?n.metrics:[{name:"rowCount",op:"count",field:""}];if(!i.length)return[this.buildMemberAssistantAggregateRow({},e,a)];let d=new Map;return e.forEach(c=>{let p=JSON.stringify(i.map(g=>c?.[g]??"")),h=d.get(p)||[];h.push(c),d.set(p,h)}),Array.from(d.values()).map(c=>{let p={};return i.forEach(h=>{p[h]=c[0]?.[h]??""}),this.buildMemberAssistantAggregateRow(p,c,a)})}buildMemberAssistantAggregateRow(e,n,i){let a=k({},e);return i.forEach(d=>{let c=d?.name||d?.op||"value",p=d?.field,h=p?n.map(x=>x?.[p]):[],g=h.map(x=>Number(x)).filter(x=>Number.isFinite(x));switch(d?.op){case"sum":a[c]=g.reduce((x,w)=>x+w,0);break;case"avg":a[c]=g.length?g.reduce((x,w)=>x+w,0)/g.length:0;break;case"min":a[c]=g.length?Math.min(...g):0;break;case"max":a[c]=g.length?Math.max(...g):0;break;case"distinctCount":a[c]=new Set(h.map(x=>`${x??""}`)).size;break;case"count":default:a[c]=n.length;break}}),a}groupMemberAssistantRows(e,n){let i=new Map;return(e||[]).forEach(a=>{let d=n?`${a?.[n]??"-"}`:"All Members",c=i.get(d)||[];c.push(a),i.set(d,c)}),i}sortMemberAssistantRows(e,n){let i=(n||[])[0];if(!i?.field)return e;let a=i.direction==="asc"?1:-1;return[...e].sort((d,c)=>{let p=d?.[i.field],h=c?.[i.field],g=Number(p),x=Number(h);return Number.isFinite(g)&&Number.isFinite(x)?(g-x)*a:`${p??""}`.localeCompare(`${h??""}`)*a})}getMemberAssistantColumns(e,n){let i=[];return(e?.groupBy||[]).forEach(a=>{n.some(d=>Object.prototype.hasOwnProperty.call(d,a))&&i.push(a)}),(e?.metrics||[]).forEach(a=>{a?.name&&n.some(d=>Object.prototype.hasOwnProperty.call(d,a.name))&&i.push(a.name)}),i.length?i:Object.keys(n[0]||{})}getMemberAssistantComparisonColumns(e,n){if(!n.length)return[];let i=[],a=e?.comparison?.dimensionField||e?.groupBy?.[0]||"";a&&i.push(a);let d=Array.isArray(e?.comparison?.periods)?e.comparison.periods:[],c=Array.isArray(e?.metrics)&&e.metrics.length?e.metrics:[{name:"rowCount",op:"count",field:""}];
11if(d.forEach(p=>{c.forEach(h=>{i.push(this.getMemberAssistantComparisonColumn(p?.label||"Period",h?.name||h?.op||"value"))})}),e?.comparison?.includeDelta&&d.length>=2&&c.length){let p=c[0]?.name||c[0]?.op||"value";i.push(this.getMemberAssistantComparisonDeltaColumn(p)),i.push(this.getMemberAssistantComparisonPercentColumn(p))}return i.filter(p=>n.some(h=>Object.prototype.hasOwnProperty.call(h,p)))}getMemberAssistantComparisonColumn(e,n){return`${e} ${this.formatMemberAssistantColumn(n)}`.trim()}getMemberAssistantComparisonDeltaColumn(e){return`${this.formatMemberAssistantColumn(e)} Difference`}getMemberAssistantComparisonPercentColumn(e){return`${this.formatMemberAssistantColumn(e)} Percent Change`}getMemberAssistantChartBars(e,n){if(!e?.chart||e.chart.type==="none"||!n.length)return[];let i=e.chart.xField||this.memberAssistantColumns[0],a=e.chart.yField||this.memberAssistantColumns[1],d=n.map(h=>Number(h?.[a]||0)),c=Math.max(...d,0),p=d.reduce((h,g)=>h+(Number.isFinite(g)?g:0),0);return!i||!a||c<=0?[]:n.slice(0,12).map(h=>{let g=Number(h?.[a]||0),x=n.indexOf(h);return{label:h?.[i]||"-",value:g,formattedValue:this.formatMemberAssistantValue(a,g),percentage:p>0?g/p*100:0,color:this.memberAssistantChartColors[x%this.memberAssistantChartColors.length],width:`${Math.max(g/c*100,2)}%`}})}getMemberAssistantPieStyle(e){let n=(e||[]).reduce((d,c)=>d+Number(c?.value||0),0);if(!e?.length||n<=0)return"";let i=0;return`conic-gradient(${e.map((d,c)=>{let p=Number(d?.value||0),h=i+p/n*360,g=`${d.color||this.memberAssistantChartColors[c%this.memberAssistantChartColors.length]} ${i}deg ${h}deg`;return i=h,g}).join(", ")})`}buildMemberAssistantSummary(e,n,i){if(!n.length)return"I did not find any matching members in the selected data.";let a=n[0]||{},d=e?.responseTemplate||"",c=this.renderMemberAssistantTemplate(d,a);if(c&&c.indexOf("{{")===-1){let h=this.cleanMemberAssistantSentence(c);if(/{{\s*[\w.]+\s*}}/.test(d))return h;let g=this.getMemberAssistantAggregateResultSentence(n,i);return g?`${h} ${g}`:h}let p=this.getMemberAssistantAggregateResultSentence(n,i);return p||`${this.cleanMemberAssistantSentence(e?.title||"Here are the results.")} I found ${n.length} matching ${n.length===1?"result":"results"}.`}getMemberAssistantAggregateResultSentence(e,n){if(e.length!==1||n.length!==1)return"";let i=n[0],a=e[0]?.[i];if(`${i}`.toLowerCase()==="count"||`${i}`.toLowerCase()==="rowcount"){let d=Number(a||0);return`There ${d===1?"is":"are"} ${this.formatMemberAssistantValue(i,d)} matching ${d===1?"member":"members"}.`}return`The ${this.formatMemberAssistantColumn(i).toLowerCase()} is ${this.formatMemberAssistantValue(i,a)}.`}renderMemberAssistantTemplate(e,n){return e?e.replace(/{{\s*([\w.]+)\s*}}/g,(i,a)=>{let d=n?.[a];return d==null||d===""?i:this.formatMemberAssistantValue(a,d)}):""}formatMemberAssistantColumn(e){let n={MemberId:"Member ID",PGFamilyID:"Family ID",DisplayName:"Member",FamilyName:"Family",FamilyRole:"Family Role",Email:"Email",SecondaryEmail:"Secondary Email",RegisterCensus:"Registered to Parish",EmailPresent:"Has Email",CellPhone:"Cell Phone",HomePhone:"Home Phone",WorkPhone:"Work Phone",SecondaryPhone:"Secondary Phone",SecondaryCellPhone:"Secondary Cell Phone",SecondaryWorkPhone:"Secondary Work Phone",PhonePresent:"Has Phone",Address:"Address",Address2:"Address 2",SecondaryAddress1:"Secondary Address",SecondaryAddress2:"Secondary Address 2",SecondaryCity:"Secondary City",SecondaryState:"Secondary State",SecondaryZip:"Secondary ZIP Code",EnrolledStudentNo:"Enrolled Students",REEnrolledStudentNo:"RE Students",YTDContributionAmount:"Contribution YTD",YTDPaymentAmount:"Payments YTD",CensusPrimary:"Primary Contact",CensusSecondary:"Secondary Contact",REPrimary:"RE Primary",RESecondary:"RE Secondary",FamilyMemberCount:"Family Members",FamilyPrimaryCount:"Primary Contacts",FamilySecondaryCount:"Secondary Contacts",FamilyREPrimaryCount:"RE Primary Contacts",FamilyRESecondaryCount:"RE Secondary Contacts",FamilyChildCount:"Children",FamilyHasPrimary:"Has Primary",FamilyHasSecondary:"Has Secondary",FamilyHasREPrimary:"Has RE Primary",FamilyHasRESecondary:"Has RE Secondary",rowCount:"Number of Records",count:"Number of Records",totalContributionYTD:"Contribution YTD",totalPaymentYTD:"Payments YTD"};return n[e]?n[e]:`${e||""}`.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/_/g," ").replace(/\s+/g," ").trim().replace(/\w\S*/g,i=>i.charAt(0).toUpperCase()+i.slice(1).toLowerCase())}formatMemberAssistantValue(e,n){if(n==null||n==="")return"-";if(typeof n=="boolean")return n?"Yes":"No";let i=`${e||""}`.toLowerCase();if(i.indexOf("percent")>-1){let a=Number(n);if(Number.isFinite(a))return`${a.toFixed(1)}%`}if(i.indexOf("amount")>-1||i.indexOf("contribution")>-1||i.indexOf("payment")>-1){let a=Number(n);if(Number.isFinite(a))return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(a)}return`${n}`}formatMemberAssistantTime(e){let n=e instanceof Date?e:new Date(e);return!e||`${n}`.toLowerCase().indexOf("invalid")>-1?"":new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"2-digit"}).format(n)}formatMemberAssistantRunTime(e){let n=Number(e||0);return Number.isFinite(n)&&n>0?`${n.toFixed(1)}s`:""}toggleMemberAssistantExplanation(e){e.showExplanation=!e.showExplanation}formatMemberAssistantNote(e){return this.cleanMemberAssistantSentence(e||"").replace(/PG Family ID/g,"family ID").replace(/Census Primary/g,"primary contact").replace(/Census Secondary/g,"secondary contact").replace(/containing '([^']+)'/g,'that includes "$1"')}cleanMemberAssistantSentence(e){return`${e||""}`.replace(/Ranked by household using PGFamilyID and household-total YTDContributionAmount,?\s*with duplicate (?:person|member) rows within a household collapsed by member identity\.?/gi,"Each household is counted once, with year-to-date contributions combined across its members.").replace(/(?:grouped|ranked) using PGFamilyID/gi,"grouped by household").replace(/using PGFamilyID/gi,"by household").replace(/duplicate (?:person|member) rows?[^.]*collapsed by member identity/gi,"duplicate member records counted only once").replace(/household-total\s+YTDContributionAmount/gi,"combined household year-to-date contributions").replace(/PGFamilyID/g,"household").replace(/MemberId/g,"member").replace(/DisplayName/g,"member name").replace(/FamilyRole/g,"family role").replace(/RegisterCensus/g,"parish registration").replace(/YTDContributionAmount/g,"year-to-date contribution amount").replace(/YTDPaymentAmount/g,"year-to-date payment amount").replace(/CensusPrimary/g,"primary contact").replace(/CensusSecondary/g,"secondary contact").replace(/REPrimary/g,"religious education primary contact").replace(/RESecondary/g,"religious education secondary contact").replace(/FamilyMemberCount/g,"number of family members").replace(/rowCount/g,"number of records").replace(/totalContributionYTD/g,"total year-to-date contributions").replace(/totalPaymentYTD/g,"total year-to-date payments").replace(/\s+/g," ").trim()}buildMemberAssistantConversationHistory(){return(this.memberAssistantResultContexts||[]).slice(-20).map(e=>({turnRef:e.turnRef,questionTemplate:e.questionTemplate||"",source:e?.plan?.source||"",dataScope:e.dataScopeLabel||"",columns:e.outputFields||[],resultCount:e.resultCount||0,chartType:e.chartType||"none",reportFormat:e.reportFormat||"none",plan:this.compactMemberAssistantPlan(e.plan),memberReferences:e.memberReferences||[]}))}compactMemberAssistantPlan(e){return{intent:e?.intent||"",source:e?.source||"",filters:(e?.filters||[]).map(n=>({field:n?.field||"",op:n?.op||""})),groupBy:e?.groupBy||[],metrics:e?.metrics||[],sort:e?.sort||[],limit:e?.limit||0,comparison:e?.comparison||{enabled:!1,dimensionField:"",periods:[],includeDelta:!1},chart:e?.chart||{type:"none",xField:"",yField:""},report:e?.report||{format:"none",filename:""},retrieval:e?.retrieval||{type:"none",memberRef:"",source:""},inputScope:e?.inputScope||{type:"fullMemberList",turnRef:""},rowSelector:e?.rowSelector||{type:"all",index:0},contextTarget:e?.contextTarget||"fullList",selectionMode:e?.selectionMode||"all",focusTarget:e?.focusTarget||"resultSet",output:{mode:e?.output?.mode||"aggregate",fields:e?.output?.fields||[]}}}getMemberAssistantDataScopeLabel(e,n){if(n?.source==="pendingFamilyRows")return"Based on pending families";switch(e){case"visible":return"Based on visible member table";case"broaderCached":return"Based on previously loaded full member results";case"broader":return"Based on newly loaded full member results";case"familyDetails":return"Based on selected member family details";case"assistantResult":return"Based on an earlier assistant result";case"loaded":default:return"Based on currently loaded member rows"}}getMemberAssistantPlanScopeMode(e){let n=`${e?.dataScope?.mode||""}`.toLowerCase();return n==="visible"||n==="broader"?n:"loaded"}
11getMemberAssistantPlanBroaderRequest(e){if(e?.source==="pendingFamilyRows")return this.getMemberAssistantPendingRows().length?null:{needed:!0,source:"pendingFamilies",fetchRequest:null,message:"This question requires loading pending families. Load them now?"};let n=this.buildMemberAssistantBroaderFetchRequest(e?.dataScope?.broaderRequest||{},e);if(this.getCachedMemberAssistantRows(n,!0))return{needed:!0,source:"members",fetchRequest:n,message:""};let a=this.getCachedAllMemberAssistantEntry();if(a)return{needed:!0,source:"members",fetchRequest:a.fetchRequest,useAllMembersCache:!0,message:""};let d=this.getMemberAssistantTotalCount(),c=this.getMemberAssistantLoadedRows(),p=`${e?.dataScope?.reason||""}`.trim()||"the members table is paginated and the answer may require all matching members",h=d>c.length?` There are ${d} matching members/families and only ${c.length} are loaded.`:"",g=d>200?" This search may take a few minutes.":"";return{needed:!0,source:"members",fetchRequest:n,message:`This question may require loading all matching member data because ${p}.${h}${g} Load it now?`}}fetchBroaderMemberAssistantRows(e,n,i,a,d,c){if(this.memberAssistantLoading=!0,this.memberAssistantOpen=!0,this.memberAssistantError="",n?.source==="pendingFamilies"){this.subIndex++,this.subscriptionArr[this.subIndex]=this.mainService.PendingMembers(this.data.UC).subscribe(g=>{let x=Array.isArray(g?.MemberList)?g.MemberList:[];x.forEach(w=>w.selected=!1),this.pendingData=x.length>0,this.PendingDataSource.data=x,this.executeMemberAssistantResponse(e,i,a,x,"broader","This answer used pending families loaded from the pending registration list.",d,c)},g=>{console.error("Parish members assistant pending load error:",g),this.memberAssistantError="Unable to load pending families for the assistant.",this.memberAssistantLoading=!1});return}let p=n?.fetchRequest,h=n?.useAllMembersCache?this.getCachedAllMemberAssistantRows():this.getCachedMemberAssistantRows(p,!0);if(h){this.executeMemberAssistantResponse(e,i,a,h,"broaderCached","This answer reused full member results already loaded in memory. The page table was not changed.",d,c);return}this.fetchCompleteMemberAssistantRows(p,(g,x)=>{let w=this.dedupeMemberAssistantRows(g||[]);this.storeMemberAssistantRows(p,w,{totalMemberCount:x,complete:!0}),this.executeMemberAssistantResponse(e,i,a,w,"broader","This answer used a temporary full member search. The page table was not changed.",d,c)})}fetchCompleteMemberAssistantRows(e,n){let a=[],d=0;this.memberAssistantBroaderLoadProgress={loaded:0,total:0};let c=p=>{let h=L(k({},e||{}),{skippedRows:p,lastRowToGet:99999});this.subIndex++,this.subscriptionArr[this.subIndex]=this.mainService.getMembersPagination(h).subscribe(g=>{let x=this.normalizeMemberAssistantRows(g?.MemberList||[]),w=Number(g?.totalMemberCount||0);w>0&&(d=w),a.push(...x);let T=this.dedupeMemberAssistantRows(a);if(this.memberAssistantBroaderLoadProgress={loaded:T.length,total:d},!d){this.memberAssistantError="Unable to verify the complete member result set for the assistant.",this.memberAssistantLoading=!1,this.memberAssistantBroaderLoadProgress=null;return}if(T.length>=d){this.memberAssistantBroaderLoadProgress=null,n(T,d);return}if(!x.length){this.memberAssistantError="The member search ended before all matching members were loaded.",this.memberAssistantLoading=!1,this.memberAssistantBroaderLoadProgress=null;return}c(p+x.length)},g=>{console.error("Parish members assistant broader load error:",g),this.memberAssistantError="Unable to load full member data for the assistant.",this.memberAssistantLoading=!1,this.memberAssistantBroaderLoadProgress=null})};c(0)}buildMemberAssistantCurrentRequest(e=this.startIndex,n=this.recordsToGet){let i=this.searchTerm;return this.searchType==="memberName"&&!this.exactMatch&&(i=this.searchTerm+"*"),{AC:this.data?.UC,email:this.searchType=="email"?i:"",envelope:this.searchType=="envelope"?this.filters.noenvelope?"empty":i:"",memberName:this.searchType=="memberName"?i:"",childName:this.searchType=="childName"?i:"",username:this.searchType=="username"?i:"",phoneNumber:this.searchType=="phoneNumber"?i:"",InActiveMemberOnly:this.filters.InActiveMemberOnly,groupBy
11FamilyFilter:this.filters.family,isRegisteredForCensusFilter:this.filters.member,isVolunteeringFilter:this.filters.volunteer,genderMaleFilter:this.filters.genderMaleFilter,genderFemaleFilter:this.filters.genderFemaleFilter,minAgeFilter:this.filters.Age.Min,maxAgeFilter:this.filters.Age.Max,sortingCol:this.sortCol,sortType:this.sortDir?this.sortDir:"asc",skippedRows:e,lastRowToGet:n,includeUnlinkedMember:this.filters.includeUnlinkedMember||!1,UnlinkedMemberOnly:this.filters.UnlinkedMemberOnly||!1}}buildMemberAssistantBroaderFetchRequest(e,n){let i=this.buildMemberAssistantCurrentRequest(0,99999),a=e||{},d=a.searchScope==="allMembers";return d&&(i.email="",i.envelope="",i.memberName="",i.childName="",i.username="",i.phoneNumber="",i.InActiveMemberOnly=!1,i.groupByFamilyFilter=!1,i.isRegisteredForCensusFilter=!1,i.isVolunteeringFilter=!1,i.genderMaleFilter=!1,i.genderFemaleFilter=!1,i.minAgeFilter="",i.maxAgeFilter="",i.includeUnlinkedMember=!1,i.UnlinkedMemberOnly=!1),d||["email","envelope","memberName","childName","username","phoneNumber"].forEach(c=>{a[c]!==void 0&&a[c]!==null&&`${a[c]}`.trim()!==""&&(i[c]=a[c])}),["groupByFamilyFilter","InActiveMemberOnly","isRegisteredForCensusFilter","isVolunteeringFilter","genderMaleFilter","genderFemaleFilter","includeUnlinkedMember","UnlinkedMemberOnly"].forEach(c=>{a[c]!==void 0&&a[c]!==null&&(i[c]=a[c])}),["minAgeFilter","maxAgeFilter"].forEach(c=>{a[c]!==void 0&&a[c]!==null&&`${a[c]}`.trim()!==""&&(i[c]=a[c])}),n?.source==="familyRows"&&a.groupByFamilyFilter===null&&(i.groupByFamilyFilter=!0),n?.source==="memberRows"&&a.groupByFamilyFilter===null&&d&&(i.groupByFamilyFilter=!1),d&&(i.groupByFamilyFilter=!1),i.skippedRows=0,i.lastRowToGet=99999,i}getMemberAssistantServerScope(){return{hasSearch:!!`${this.searchTerm||""}`.trim(),activeFilterFields:this.getMemberAssistantActiveFilterFields(),loadedRowCount:this.getMemberAssistantLoadedRows().length,totalMemberCount:this.getMemberAssistantTotalCount(),serverPagination:!0,completeAllMembersLoaded:!!this.getCachedAllMemberAssistantEntry()}}getMemberAssistantVisibleFilterScope(){return{isFiltered:!!`${this.MemberDataSource?.filter||""}`.trim(),visibleRowCount:this.getMemberAssistantVisibleRows().length,displayedColumns:this.displayedMemberColumns}}getMemberAssistantCacheScope(){let e=this.getCachedAllMemberAssistantEntry();return{fullAllMembersLoaded:!!e,fullAllMembersRowCount:e?this.dedupeMemberAssistantRows(e.rows||[]).length:0,cachedFullSearchCount:(this.memberAssistantFullResultCache||[]).length,familyDetailCount:this.memberAssistantStore.familyDetailsByFamilyId.size}}getMemberAssistantTotalCount(){let e=Number(this.data?.totalMemberCount||this.MemberDataSource?.paginator?.length||0);return Number.isFinite(e)?e:0}getCachedMemberAssistantRows(e,n=!1){let i=this.getMemberAssistantCacheKey(e),a=(this.memberAssistantFullResultCache||[]).find(d=>d?.cacheKey===i);return!a||n&&a.complete!==!0?null:this.dedupeMemberAssistantRows(a.rows||[])}getCachedAllMemberAssistantEntry(){let e=(this.memberAssistantFullResultCache||[]).filter(n=>n?.complete===!0&&this.isMemberAssistantAllMembersFetch(n?.fetchRequest)).sort((n,i)=>new Date(i?.loadedAt||0).getTime()-new Date(n?.loadedAt||0).getTime());return e.length?e[0]:null}getCachedAllMemberAssistantRows(){let e=this.getCachedAllMemberAssistantEntry();return e?this.dedupeMemberAssistantRows(e.rows||[]):null}storeMemberAssistantRows(e,n,i={}){let a=this.getMemberAssistantCacheKey(e),d=this.sortMemberAssistantBaseRows(this.createMemberAssistantCacheRows(n||[])),c=this.memberAssistantFullResultCache.findIndex(g=>g?.cacheKey===a),p={cacheKey:a,fetchRequest:e,rows:d,totalMemberCount:Number(i?.totalMemberCount||0),complete:i?.complete===!0,loadedAt:new Date};c>-1?this.memberAssistantFullResultCache[c]=p:this.memberAssistantFullResultCache.push(p),this.memberAssistantFullResultCache.length>8&&(this.memberAssistantFullResultCache=this.memberAssistantFullResultCache.slice(-8));let h=this.memberAssistantFullResultCache.reduce((g,x)=>[...g,...x?.rows||[]],[]);this.memberAssistantUniqueRows=this.sortMemberAssistantBaseRows(this.dedupeMemberAssistantRows(h)),d.forEach(g=>{let x=this.getMemberAssistantRowId(g);x&&this.memberAssistantStore.membersById.set(`${x}`,g)}),this.memberAssistantStore.coverageBySearchSignature.set(a,{totalMemberCount:p.totalMemberCount,complete:p.complete,loadedAt:p.loadedAt})}createMemberAssistantCacheRows(e){return this.dedupeMemberAssistantRows(e||[]).map(n=>this.pickMemberAssistantFields(n))}persistMemberAssistantFullList(e,n){let i=this.getMemberAssistantStoreScopeKey(),a=this.createMemberAssistantCacheRows(e||[]);this.memberAssistantCache.saveFullList({cacheKey:i,schemaVersion:2,cachedAt:Date.now(),totalMemberCount:n,rows:a},this.memberAssistantPersistentCacheMaxAgeMs).catch(d=>{console.warn("Unable to persist the member assistant cache.",d)})}getMemberAssistantActiveFilterFields(){let e=[];return this.searchType&&`${this.searchTerm||""}`.trim()&&e.push(this.searchType),this.filters?.InActiveMemberOnly&&e.push("inactive"),this.filters?.family&&e.push("family"),this.filters?.member&&e.push("registered"),this.filters?.volunteer&&e.push("volunteer"),this.filters?.genderMaleFilter&&e.push("male"),this.filters?.genderFemaleFilter&&e.push("female"),(this.filters?.Age?.Min!==""||this.filters?.Age?.Max!=="")&&e.push("age"),this.filters?.includeUnlinkedMember&&e.push("includeUnlinked"),this.filters?.UnlinkedMemberOnly&&e.push("unlinkedOnly"),e}getMemberAssistantCacheKey(e){let n=k({},e||{});return delete n.AC,delete n.skippedRows,delete n.lastRowToGet,delete n.sortingCol,delete n.sortType,this.stableMemberAssistantStringify(n)}isMemberAssistantAllMembersFetch(e){if(!e)return!1;let n=e||{},i=["email","envelope","memberName","childName","username","phoneNumber"].every(p=>`${n[p]||""}`.trim()===""),a=["InActiveMemberOnly","isRegisteredForCensusFilter","isVolunteeringFilter","genderMaleFilter","genderFemaleFilter","includeUnlinkedMember","UnlinkedMemberOnly"].every(p=>n[p]===!1||n[p]===null||n[p]===void 0||`${n[p]}`==""),d=`${n.minAgeFilter||""}`.trim()===""&&`${n.maxAgeFilter||""}
11`.trim()==="",c=n.groupByFamilyFilter===!1||n.groupByFamilyFilter==="false"||n.groupByFamilyFilter===null||n.groupByFamilyFilter===void 0;return i&&a&&d&&c}stableMemberAssistantStringify(e){return e===null||typeof e!="object"?JSON.stringify(e):Array.isArray(e)?`[${e.map(n=>this.stableMemberAssistantStringify(n)).join(",")}]`:`{${Object.keys(e).sort().map(n=>`${JSON.stringify(n)}:${this.stableMemberAssistantStringify(e[n])}`).join(",")}}`}dedupeMemberAssistantRows(e){let n=new Set;return(e||[]).filter(i=>{let a=this.getMemberAssistantRowId(i),d=a?`member:${a}`:JSON.stringify([i?.DisplayName||"",i?.PGFamilyID||"",i?.Envelope||"",i?.Email||""]);return n.has(d)?!1:(n.add(d),!0)})}sortMemberAssistantBaseRows(e){return[...e||[]].sort((n,i)=>{let a=`${n?.DisplayName||n?.LastName||""}`.localeCompare(`${i?.DisplayName||i?.LastName||""}`);return a!==0?a:`${this.getMemberAssistantRowId(n)||""}`.localeCompare(`${this.getMemberAssistantRowId(i)||""}`)})}getMemberAssistantRowId(e){return e?.AssistantEntityId??e?.MemberID??e?.MemberId??e?.memberId??e?.memberID??e?.Memberid??""}getMemberAssistantEntityKey(e){let n=this.getMemberAssistantRowId(e);return n?`${n}`:JSON.stringify([e?.PGFamilyID||"",e?.DisplayName||"",e?.FirstName||"",e?.LastName||"",e?.StudentID||""])}toMemberAssistantBool(e){return e===!0||e===1||e==="1"||`${e}`.toLowerCase()==="true"}memberAssistantNumberInRange(e,n){if(!Array.isArray(n)||n.length<2)return!0;let i=Number(e);return Number.isFinite(i)&&i>=Number(n[0])&&i<=Number(n[1])}memberAssistantDateInRange(e,n){if(!Array.isArray(n)||n.length<2)return!0;let i=new Date(e).getTime(),a=new Date(n[0]).getTime(),d=new Date(n[1]).getTime();return Number.isFinite(i)&&Number.isFinite(a)&&Number.isFinite(d)&&i>=a&&i<=d}downloadMemberAssistantReport(e){let n=e?.rows||[],i=e?.columns||[];if(!n.length||!i.length)return;let a=e?.report||{},d=`${(a.filename||"member-assistant-report").replace(/[^\w-]+/g,"-")}`,c=n.map(x=>{let w={};return i.forEach(T=>{w[this.formatMemberAssistantColumn(T)]=this.formatMemberAssistantValue(T,x?.[T])}),w});if(a.format==="csv"){let x=Y.json_to_sheet(c),w=Y.sheet_to_csv(x);(0,se.saveAs)(new Blob([w],{type:"text/csv;charset=utf-8"}),`${d}.csv`);return}let p=Y.json_to_sheet(c),h=Y.book_new();Y.book_append_sheet(h,p,"Report");let g=We(h,{bookType:"xlsx",type:"array"});(0,se.saveAs)(new Blob([g],{type:"application/octet-stream"}),`${d}.xlsx`)}tabChange(e){this.textLabel=e.tab.textLabel,e.tab.textLabel=="Members"?this.searchType="memberName":e.tab.textLabel=="Pending Families"&&this.initPending(),e.tab.textLabel=="Members Merge"}sortChanged(e){let n=e;this.sortCol=n.active,this.sortDir=n.direction,this.tableLength=this.tableLength,this.updateMemberSearch()}updateRegistration(e){var n=e.MemberId;let i={AC:this.data.UC,MemberID:n,RegisterCensus:e.RegisterCensus};this.mainService.updateCensusRegistration(i).subscribe(a=>{let d=a;console.log("res",d.mo.RegisterCensus),d.status===1?this.snackBar.open("Member Registration Updated!","Close",{duration:5e3,panelClass:["success"]}):this.dialog.open(O,{data:{data:d.msg,type:"simple-info"}}).afterClosed().subscribe(c=>{})})}pageChanged(e){this.startIndex=e.pageSize*e.pageIndex,this.recordsToGet=e.pageSize,this.currentPage=e.pageIndex,this.tableLength=this.tableLength,this.updateMemberSearch()}updateMemberSearch(e=null){this.tableLoading=!0,e&&!e.AC&&(e.AC=this.data.UC),console.log("this.acc: ",this.acc),(!this.displayedMemberColumns||this.displayedMemberColumns.length===0)&&this.applyMemberTableHeaders(this.memberTableDefaultHeaders);var n=this.searchType.slice();let i=n.replace(/([a-z])([A-Z])/g,"$1 $2");this.searchKB=i.split(" ").map(c=>c.charAt(0).toLowerCase()+c.slice(1)).join(" ");let a=this.searchTerm;this.searchType==="memberName"&&!this.exactMatch&&(a=this.searchTerm+"*");var d={AC:this.data.UC,email:this.searchType=="email"?a:"",envelope:this.searchType=="envelope"?this.filters.noenvelope?"empty":a:"",memberName:this.searchType=="memberName"?a:"",childName:this.searchType=="childName"?a:"",username:this.searchType=="username"?a:"",phoneNumber:this.searchType=="phoneNumber"?a:"",InActiveMemberOnly:this.filters.InActiveMemberOnly,groupBy
11FamilyFilter:this.filters.family,isRegisteredForCensusFilter:this.filters.member,isVolunteeringFilter:this.filters.volunteer,genderMaleFilter:this.filters.genderMaleFilter,genderFemaleFilter:this.filters.genderFemaleFilter,minAgeFilter:this.filters.Age.Min,maxAgeFilter:this.filters.Age.Max,sortingCol:this.sortCol,sortType:this.sortDir?this.sortDir:"asc",skippedRows:this.startIndex,lastRowToGet:this.recordsToGet,includeUnlinkedMember:this.filters.includeUnlinkedMember||!1,UnlinkedMemberOnly:this.filters.UnlinkedMemberOnly||!1};e&&(this.sortCol=e.sortingCol,this.sortDir=e.sortType,this.startIndex=e.skippedRows,this.recordsToGet=e.lastRowToGet),console.log("contdata",d),this.isSearching=!0;try{this.subIndex++;let c=e||d;this.subscriptionArr[this.subIndex]=this.mainService.getMembersPagination(c).subscribe(p=>{var h=p;if(this.logMemberPaginationWatchIfNeeded(c,h,"updateMemberSearch"),h.status!=1){this.dialog.open(O,{data:{data:"<h4>Something went wrong. Please try again later. If you continue to have issues, reach out to Parish Giving.</h4>",type:"simple-info"}}).afterClosed().subscribe(g=>{});return}sessionStorage.setItem("pm_searchTerm",this.searchTerm),sessionStorage.setItem("pm_searchType",this.searchType),sessionStorage.setItem("pm_filters",JSON.stringify(this.filters)),console.log("this.currentPage: ",this.currentPage),sessionStorage.setItem("pm_currentPage",typeof this.currentPage=="number"?this.currentPage.toString():"0"),sessionStorage.setItem("pm_filtersReq",JSON.stringify(c)),sessionStorage.setItem("exactMatch",this.exactMatch.toString()),this.data.MemberList=h.MemberList,this.data.totalMemberCount=h.totalMemberCount,this.loading=!1,this.tableLoading=!1,setTimeout(()=>{this.MemberDataSource.paginator=this.memberDataPaginator,this.MemberDataSource.sort=this.memberDataSort,this.data.MemberList.forEach(g=>{g.selected=!1,g.SignOnDate=this.getSignOnDate(g.SignOnDate)}),this.MemberDataSource.data=h.MemberList,setTimeout(()=>{this.MemberDataSource.paginator.length=h.totalMemberCount,this.MemberDataSource.paginator.pageIndex=this.currentPage,this.MemberDataSource.sort.direction=this.sortDir,this.MemberDataSource.sort.active=this.sortCol},100)},100)})}catch{}}toggleUnlinkedMember(e,n){console.log("val",e),e&&(this.filters[n]=!1)}initFamilies(){if(this.data.msg!=="")this.loading=!1,this.invalidCredentials(),this.router.navigate(["/index"]);else if(this.data.msg==="")if(this.data.MemberList){for(var n=0;n<this.data.MemberList.length;n++)this.data.MemberList[n].OwedAmount=this.data.MemberList[n].GrandTotal-this.data.MemberList[n].PaidTuition,this.data.MemberList[n].Age=this.getAge(this.data.MemberList[n].DOB);this.CTID=this.data.defaultCTID,this.loading=!1,setTimeout(()=>{this.MemberDataSource.paginator=this.memberDataPaginator,this.MemberDataSource.sort=this.memberDataSort,this.data.MemberList.forEach(i=>{i.selected=!1,i.SignOnDate=this.getSignOnDate(i.SignOnDate)}),this.MemberDataSource.data=this.data.MemberList,this.MemberDataSource.sortingDataAccessor=(i,a)=>{var d=i;switch(a){case"SignOnDate":return new Date(d.SignOnDate).toString().toLowerCase().indexOf("invalid")==-1?new Date(d.SignOnDate):"";default:return i[a]}}},1e3)}else{this.appData.changeMessage(this.data),this.data.UC.CTID=this.data.defaultCTID;var e={AC:this.data.UC,email:"",envelope:"",memberName:"",groupByFamilyFilter:"",isRegisteredForCensusFilter:"",isVolunteeringFilter:"",genderMaleFilter:"",genderFemaleFilter:"",minAgeFilter:"",maxAgeFilter:"",sortingCol:"LastName",sortType:"ASC",skippedRows:"",lastRowToGet:25,includeUnlinkedMember:!1,UnlinkedMemberOnly:!1};this.mainService.getMembersPagination(e).subscribe(i=>{var a=i;if(this.logMemberPaginationWatchIfNeeded(e,a,"initFamilies"),this.data.UC=a.UC,a.msg=="success"){for(var d=[],c=0;c<a.Contributions.length;c++)a.Contributions[c].ContributionType=="Tuition"&&d.push(a.Contributions[c]);this.data.contributions=d,d.length>1?this.data.isMultipleContribution=!0:this.data.isMultipleContribution=!1}sessionStorage.setItem("UC",JSON.stringify(this.data.UC)),this.appData.changeMessage(this.data)});for(var n=0;n<this.data.MemberList.length;n++)this.data.MemberList[n].OwedAmount=this.data.MemberList[n].GrandTotal-this.data.MemberList[n].PaidTuition,this.data.MemberList[n].Age=this.getAge(this.data.MemberList[n].DOB);this.appData.changeStudentlist(this.data.StudentList),this.appData.changeMemberList(this.data.MemberList),this.CTID=this.data.defaultCTID,this.loading=!1,setTimeout(()=>{this.MemberDataSource.paginator=this.memberDataPaginator,this.MemberDataSource.sort=this.memberDataSort,this.data.MemberList.forEach(i=>
11{i.selected=!1,i.SignOnDate=this.getSignOnDate(i.SignOnDate)}),this.MemberDataSource.data=this.data.MemberList,this.MemberDataSource.sortingDataAccessor=(i,a)=>{var d=i;switch(a){case"SignOnDate":return new Date(d.SignOnDate).toString().toLowerCase().indexOf("invalid")==-1?new Date(d.SignOnDate):"";default:return i[a]}}},1e3)}}initPending(){this.pendingLoading=!0;let e=this.data.UC;this.mainService.PendingMembers(e).subscribe(n=>{let i=n;i.MemberList.length?this.pendingData=!0:this.pendingData=!1,this.pendingLoading=!1,i.MemberList.forEach(a=>{a.selected=!1}),this.PendingDataSource.data=i.MemberList,setTimeout(()=>{this.PendingDataSource.paginator=this.pendingDataPaginator,this.PendingDataSource.sort=this.pendingDataSort})})}SendWelcomeEmail(e){var n={MemberID:e.MemberId,OrgID:this.data.OrgID,UC:this.data.UC,RE:0};let i=this.dialog.open(ee,{data:{data:"<h4>Re-send Welcome?</h4>",type:"generalConfirm"}}).afterClosed().subscribe(a=>{if(a)this.subIndex++,this.subscriptionArr[this.subIndex]=this.mainService.ReSendWelEmail(n).subscribe(d=>{let c=d,p=this.dialog.open(O,{data:{data:"<h4>"+c.msg+"</h4>",type:"simple-info"}})});else return})}showNewDistInpts(e){e==1?(this.showNewListInputs=!0,this.distributionListName="",this.distributionListDesc=""):e==2&&(this.showNewListInputs=!1,this.distributionListName="",this.distributionListDesc="")}buildMemberTableHeaderOptions(){return[...this.memberTableDefaultHeaders,...this.memberTableExtraHeaders,...this.memberTableAvailableHeaders].filter(n=>n!=="YTDPaymentAmount").filter((n,i,a)=>a.indexOf(n)===i)}normalizeMemberTableHeaders(e){if(!e||e.length===0)return[...this.memberTableDefaultHeaders];let n=new Set(this.memberTableHeaderOptions),i=[];e.forEach(h=>{let g=h==="YTDPaymentAmount"?"PATD":h;n.has(g)&&i.indexOf(g)===-1&&i.push(g)});let a=new Set(this.memberTableLockedTrailingHeaders),d=i.filter(h=>!a.has(h)),c=this.memberTableLockedTrailingHeaders.filter(h=>n.has(h)),p=[...d,...c];return p.length?p:[...this.memberTableDefaultHeaders]}applyMemberTableHeaders(e){let n=this.normalizeMemberTableHeaders(e);this.displayedMemberColumns=n,this.memberTableSelectedHeaders=n}getMemberTableHeaderDocId(){return this.data?.OrgID?`${this.data.OrgID}_${this.memberTableId}`:null}openMemberHeaderSelector(){this.dialog.open(xd,{width:"700px",maxWidth:"95vw",data:{options:this.memberTableHeaderOptions,selected:this.memberTableSelectedHeaders.length?this.memberTableSelectedHeaders:this.displayedMemberColumns,labels:this.memberTableHeaderLabels,lockedTrailingHeaders:this.memberTableLockedTrailingHeaders,defaultHeaders:this.memberTableDefaultHeaders}}).afterClosed().subscribe(n=>{if(!n)return;if(!Array.isArray(n)||n.length===0){this.snackBar.open("Please select at least one column.","Close",{duration:4e3,panelClass:["warning"]});return}let i=this.normalizeMemberTableHeaders(n);this.applyMemberTableHeaders(i),this.saveMemberTableHeaders(i)})}loadMemberTableHeaders(){let e=this.getMemberTableHeaderDocId();if(!e){this.applyMemberTableHeaders(this.memberTableDefaultHeaders),this.memberTableHeadersLoaded=!0;return}this.firestore.collection("church-table-column").doc(e).get().subscribe(n=>{if(n.exists){let i=n.data(),a=Array.isArray(i?.headers)?i.headers:this.memberTableDefaultHeaders;this.applyMemberTableHeaders(a)}else this.applyMemberTableHeaders(this.memberTableDefaultHeaders);this.memberTableHeadersLoaded=!0},()=>{this.applyMemberTableHeaders(this.memberTableDefaultHeaders),this.memberTableHeadersLoaded=!0})}saveMemberTableHeaders(e){let n=this.getMemberTableHeaderDocId();if(!n)return;let i={churchId:this.data.OrgID,tableId:this.memberTableId,headers:e,updatedAt:Re.firestore.FieldValue.serverTimestamp()};this.firestore.collection("church-table-column").doc(n).set(i,{merge:!0})}getMemberTableHeaderLabel(e){return this.memberTableHeaderLabels[e]?this.memberTableHeaderLabels[e]:e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/ID/g,"ID").replace(/\s+/g," ").trim()}saveDistributionListFilter(e){e.response.GroupID&&this.firestore.collection("group-filters").doc(e.response.GroupID.toString()).set(e)}createDistributionListFromMembers(){let e=[];
11if(!this.distributionListName){this.dialog.open(O,{data:{data:"<h4>Please Enter the distribution list name!</h4>",type:"simple-info"}});return}if(!this.MemberDataSource||!this.MemberDataSource.data)return;if(this.MemberDataSource.data.forEach(i=>{i.selected&&e.push(i.MemberId)}),e.length<1){this.dialog.open(O,{data:{data:"<h4>No Member selected!</h4>",type:"simple-info"}});return}let n={AC:this.data.UC,OrganizationID:this.data.OrgID,groupData:{GroupName:this.distributionListName,GroupID:0,GroupType:3,GroupDescription:this.distributionListDesc,OrganizationID:this.data.OrgID,GroupAdministratorID:"",GroupAdministratorName:"",GroupAdministratorEmail:"",GroupAdministratorPhone:"",GroupCreatorUname:this.data?.UC?.admin||this.data?.UC?.uname,IsDynamic:!1,IsPrivate:!0,ExcludedMembers:"",IncludedMembers:"",InParishFilter:!1,NotInParishFilter:!1,HasChildrenFilter:!1,NotHasChildrenFilter:!1,PrimaryMemberFilter:!1,SecondaryMemberFilter:!1,MinAgeFilter:0,MaxAgeFilter:0,GenderFemaleFilter:!1,GenderMaleFilter:!1,CityFilter:"",StateFilter:"",ZipFilter:"",NoGivingStartDateFilter:null,OccupationCategoryFilter:"",OccupationTitleFilter:"",InterestHobbiesFilter:"",ChildInREFilter:!1,NoChildInSessionFilter:!1,ChildMissingSacramentalFilter:!1,ChildMissingHealthFilter:!1,ChildMinAgeFilter:0,ChildMaxAgeFilter:0,ChildGenderFemaleFilter:!1,ChildGenderMaleFilter:!1,ChildGradeFilter:"",Status:1}};for(let i in n.groupData)typeof n.groupData[i]=="boolean"&&(n.groupData[i]=n.groupData[i]?1:0);this.mainService.SaveGroup(n).subscribe(i=>{let a=i?.groupData;if(!a?.GroupID)return;let d={AC:this.data.UC,GroupID:a.GroupID,GroupMemberString:e.join(",")},c={tab:0,request:n,OrgID:n.OrganizationID,response:i.groupData,studFilterObject:{},membFilterObject:this.filters,isSelectingAll:this.isSelectingAll,isSelectingAllS:!1};c.membFilterObject.LastRowToGet=99999,c.studFilterObject.LastRowToGet=99999,this.saveDistributionListFilter(c),this.mainService.AddGroupMember(d).subscribe(p=>{p?.msg==="Success"&&p?.status&&(this.dialog.open(O,{data:{data:'<h4>Distribution List "'+this.distributionListName+'" Saved!</h4>',type:"simple-info"}}),this.showNewListInputs=!1,this.distributionListName="",this.distributionListDesc="")})})}toggleSelectAllMembers(e){e?.checked?this.selectAllMembersAcrossServer():(this.isSelectingAll=!1,this.MemberDataSource?.data?.length&&this.MemberDataSource.data.forEach(n=>n.selected=!1))}selectAllMembersAcrossServer(){let e=this.searchTerm;this.searchType==="memberName"&&!this.exactMatch&&(e=this.searchTerm+"*");let n={AC:this.data.UC,email:this.searchType=="email"?e:"",envelope:this.searchType=="envelope"?this.filters.noenvelope?"empty":e:"",memberName:this.searchType=="memberName"?e:"",childName:this.searchType=="childName"?e:"",username:this.searchType=="username"?e:"",phoneNumber:this.searchType=="phoneNumber"?e:"",InActiveMemberOnly:this.filters.InActiveMemberOnly,groupByFamilyFilter:this.filters.family,isRegisteredForCensusFilter:this.filters.member,isVolunteeringFilter:this.filters.volunteer,genderMaleFilter:this.filters.genderMaleFilter,genderFemaleFilter:this.filters.genderFemaleFilter,minAgeFilter:this.filters.Age.Min,maxAgeFilter:this.filters.Age.Max,sortingCol:this.sortCol,sortType:this.sortDir?this.sortDir:"asc",skippedRows:0,lastRowToGet:99999,includeUnlinkedMember:this.filters.includeUnlinkedMember||!1,UnlinkedMemberOnly:this.filters.UnlinkedMemberOnly||!1};this.tableLoading=!0,this.subIndex++,this.subscriptionArr[this.subIndex]=this.mainService.getMembersPagination(n).subscribe(i=>{this.tableLoading=!1;let a=i;this.logMemberPaginationWatchIfNeeded(n,a,"selectAllMembersAcrossServer"),a?.MemberList&&Array.isArray(a.MemberList)&&(a.MemberList.forEach(d=>{d.selected=!0,d.SignOnDate=this.getSignOnDate(d.SignOnDate)}),this.isSelectingAll=!0,this.MemberDataSource.data=a.MemberList,this.MemberDataSource.sortingDataAccessor=(d,c)=>{var p=d;switch(c){case"SignOnDate":return new Date(p.SignOnDate).toString().toLowerCase().indexOf("invalid")==-1?new Date(p.SignOnDate):"";default:return d[c]}})})}logMemberPaginationWatchIfNeeded(e,n,i){let a=n?.MemberList,d=Array.isArray(a)?a.length:null,c=Array.isArray(a)&&a.length===0,p=Number(n?.status)===0;if(!c&&!p)return;let h=this.data?.OrgID||e?.AC?.OrgID||e?.AC?.OrganizationID||null,g=this.cleanFirestorePayload({api:"apio/GetFilteredMemberListWithPagination",orgID:h,source:i,reason:p?"status_zero":"empty_member_list",status:n?.status??null,memberListLength:d,request:e,result:n,createdAt:
11Re.firestore.FieldValue.serverTimestamp(),createdAtLocal:new Date().toISOString()});this.firestore.collection("time-out-watch").add(g).catch(x=>{console.error("Unable to save time-out-watch log",x)})}cleanFirestorePayload(e){if(e===void 0)return null;if(e===null||typeof e!="object")return e;if(e instanceof Date)return e.toISOString();if(Array.isArray(e))return e.map(i=>this.cleanFirestorePayload(i));let n={};return Object.keys(e).forEach(i=>{n[i]=this.cleanFirestorePayload(e[i])}),n}formatPhoneNumber(e){var n=(""+e).replace(/\D/g,""),i=n.match(/^(1|)?(\d{3})(\d{3})(\d{4})$/);if(i){var a=i[1]?"+1 ":"";return[a,"(",i[2],") ",i[3],"-",i[4]].join("")}return null}findWithAttr(e,n,i){for(var a=0;a<e.length;a++)if(e[a][n]===i)return a;return-1}returnSpouseBAttr(e,n,i){let a=this.data.MemberList.map(p=>p),d=this.findWithAttr(a,"MemberId",e);a.splice(d,1);let c=this.findWithAttr(a,"PGFamilyID",e);switch(n){case"Envelope":return c>-1&&a[c][n]&&this.data.MemberList[d][n]?", "+a[c][n]:c>-1&&a[c][n]?a[c][n]:"";case"YTDContributionAmount":return c>-1&&a[c][n]?i+a[c][n]:i;case"YTDPaymentAmount":return c>-1&&a[c][n]?i+a[c][n]:i}}showFilters(){this.filtersExpanded=!this.filtersExpanded}unsetFilters(){this.filters.family=!0,this.filters.Age={},this.filters.InActiveMemberOnly=!1,this.filters.genderMaleFilter=!1,this.filters.genderFemaleFilter=!1,this.filters.volunteer=!1,this.filters.InActiveMemberOnly=!1,this.filters.member=!1}resetFilters(e){this.filters={family:!0,Age:{},genderMaleFilter:!1,genderFemaleFilter:!1,volunteer:!1,member:!1},this.searchMember(e)}toggleFilters(e){switch(e){case"gender":{this.genderFiltersExpanded||(this.ageFiltersExpanded=!1,this.groupsFiltersExpanded=!1),this.genderFiltersExpanded=!this.genderFiltersExpanded;break}case"age":{this.ageFiltersExpanded||(this.genderFiltersExpanded=!1,this.groupsFiltersExpanded=!1),this.ageFiltersExpanded=!this.ageFiltersExpanded;break}case"groups":{this.groupsFiltersExpanded||(this.ageFiltersExpanded=!1,this.genderFiltersExpanded=!1),this.groupsFiltersExpanded=!this.groupsFiltersExpanded;break}}}setUpFilter(){this.MemberDataSource.filterPredicate=(e,n)=>{let i=n.split(",");var a=Object.keys(e).reduce(function(w,T){return w+e[T]+"\u25EC"},"").toLowerCase(),d=this.searchTerm.trim().toLowerCase();let c=!Object.values(this.filters.Gender).includes(!0),p=!Object.values(this.filters.Age).includes(!0),h=!this.filters.volunteer,g=!this.filters.member,x=!this.filters.family;return i.forEach((w,T)=>{if(x||e.MemberId==e.PGFamilyID&&(x=!0),g||e.RegisterCensus&&(g=!0),h||e.Volunteer&&(h=!0),c||w==e.Gender&&(c=!0),!p)if(w=="0"){if(e.Age<20)return p=!0,!0;if(!p)return!1}else if(w=="100"){if(e.Age>=100)return p=!0,!0;if(!p)return!1}else{if(e.Age<parseInt(w)+10&&e.Age>parseInt(w)-10)return p=!0,!0;if(!p)return!1}}),a.indexOf(d)!=-1&&x&&p&&c&&h&&g}}applyMemberSearch(){this.noResults=!1,this.refreshLoading=!0,this.isSearching=!0;let e=this.searchTerm;this.MemberDataSource.filterPredicate=this.defaultFilterPredicate,this.MemberDataSource.filter=e.trim().toLowerCase(),this.MemberDataSource.filteredData.length<1?(this.noResults=!0,this.refreshLoading=!1):this.refreshData(this.data,!1,this.isMemberEnrolled,this.isStudentsEnrolled,!0,!1)}getAge(e){var n=new Date,i=new Date(e),a=n.getFullYear()-i.getFullYear(),d=n.getMonth()-i.getMonth();return(d<0||d===0&&n.getDate()<i.getDate())&&a--,a}editCell(e){this.tempValue=e}checkEnrollStudent(e,n,i){for(var a={},d=0;d<this.data.StudentList.length;d++)if(this.data.StudentList[d].StudentID==i.StudentID){a=this.merge({},this.data.StudentList[d]),a[e]=+!n,this.data.StudentList[d][e]=n;break}this.enrollStudent(a)}openPendingHelpDialog(){this.dialog.open(O,{data:{data:`
12        <h4 style="margin: 15px auto">What does Pending Families mean?</h4>
13
14        <p>When a family completes and submits the Parish Registration Form, they are automatically added to the Pending Families list. To ensure accurate records, an administrator must review and approve these submissions.</p>
15
16        <p>Click on the details of each family to open their registration data tab. Verify the contact information and cross-check with existing records to avoid duplicate entries.</p>
17
18        <p>If everything looks correct, click approve. The family is now moved to the Members Family Tab and will receive an automated welcome email with login credentials for a Parish Giving account that was created for them.</p>
19
20        <p>If information is incomplete or a duplicate, click delete and the data will not be saved.</p>
21        `,type:"simple-info"}})}setSelectedR(e){this.selectedR=e,this.newEnvNo=e.Envelope||""}updateEnvNo(){var e=this.selectedR;delete e.OwedAmount,e.Envelope=this.newEnvNo;var n=this.data.UC,n=this.data.UC;n.CTID=this.data.defaultCTID,e.BaptismVerified=e.BaptismVerified?1:0,e.ReconciliationVerified=e.ReconciliationVerified?1:0,e.CommunionVerified=e.CommunionVerified?1:0,e.ConfirmationVerified=e.ConfirmationVerified?1:0,e.SendEnvelope=e.SendEnvelope?1:0,e.RegisterCensus=e.RegisterCensus?1:0,e.OrganizationID=this.data.OrgID;let i={AC:n,data:e,sentEnrollmentEmail:!1};this.mainService.memberInfoUpdate(i).subscribe(a=>{var d=a;this.dialog.open(O,{data:{data:"<h4>"+d.msg+"</h4>",type:"simple-info"}}).afterClosed().subscribe(c=>{}),d.msg.toLowerCase().indexOf("success")>-1&&(this.selectedR.Envelope=this.newEnvNo,this.newEnvNo="",this.addEnv.closeMenu())})}saveCellInfo(e,n,i){for(var a={},d=0;d<this.data.StudentList.length;d++)if(this.data.StudentList[d].StudentID==i.StudentID){if(this.data.StudentList[d][e]=this.tempValue,a=this.data.StudentList[d],e=="GradeName")for(var c=0;c<this.data.Grades.length;c++)this.data.Grades[c].GradeName==this.tempValue&&(this.data.StudentList[d].GradeID=this.data.Grades[c].GradeID,a=this.data.StudentList[d]);break}e=="IsEnrolled"||e=="FinancialAid"?this.enrollStudent(a):this.saveStudent(a),this.studData.closeMenu()}enrollStudent(e){for(var n in e)typeof e[n]=="boolean"&&(e[n]?e[n]=1:e[n]=0);var i={AC:this.data.UC,CTID:this.CTID,data:e};this.subIndex++,this.subscriptionArr[this.subIndex]=this.mainService.EnrollStudent(i).subscribe(a=>{let d=a;this.dialog.open(O,{data:{data:"<h4>"+d.msg+"</h4>",type:"simple-info"}}).afterClosed().subscribe(c=>{})})}saveStudent(e){for(var n in e)typeof e[n]=="boolean"&&(e[n]?e[n]=1:e[n]=0);var i={AC:this.data.UC,CTID:this.CTID,OrganizationID:this.data.OrgID,data:[e],IsRE:!1};this.subIndex++,this.subscriptionArr[this.subIndex]=this.mainService.Upd
21ateStudent(i).subscribe(a=>{let d=a;var c;d.sessionMsg?c="<h4>"+d.msg+"</h4><br /><div> <span style='color: red'>Note: </span>"+d.sessionMsg+"</div>":c=d.msg,this.dialog.open(O,{data:{data:c,type:"simple-info"}}).afterClosed().subscribe(h=>{})})}refreshMembersGrid(){this.refreshLoading=!0;var e={UC:this.data.UC,MF:{CTID:this.data.defaultCTID,envelope:this.envNo,memberName:this.memberName}};this.subIndex++,this.subscriptionArr[this.subIndex]=this.mainService.Members(e).subscribe(n=>{let i=n;this.refreshData(i,!1,this.isMemberEnrolled,this.isStudentsEnrolled,!0,!1)})}getStatus(e){var n="";return e.TuitionTotal==0?n="Not Enrolled":e.GrandTotal==0&&e.GrandTotal-e.AppliedDiscount-e.PaidTuition==0?n="No Balance":e.GrandTotal-e.AppliedDiscount-e.PaidTuition==e.GrandTotal?n="Unpaid":e.GrandTotal-e.AppliedDiscount-e.PaidTuition>0&&e.GrandTotal-e.AppliedDiscount-e.PaidTuition<e.GrandTotal?n="Partial Payment":e.GrandTotal-e.AppliedDiscount-e.PaidTuition==0?n="Paid in Full":e.GrandTotal-e.AppliedDiscount-e.PaidTuition<0&&(n="Over Paid"),n}customText(e){var n=[];e?n.push(e):this.MemberDataSource.data.forEach(a=>{a.selected&&n.push(a)});let i=this.dialog.open(Qt,{data:{group:{},UC:this.data.UC,isGroup:!1,members:n},maxWidth:"100vw",maxHeight:"100vh",height:"80vh",width:"80vw"})}customEmail(e,n){var i=[];e?i.push(e):this.MemberDataSource.data.forEach(d=>{d.selected&&i.push(d)});let a=this.dialog.open(qt,{data:{row:this.copyArr(i),data:this.data,type:n,UC:this.data.UC}})}trackbyFn(e,n){return e}static{this.\u0275fac=function(n){return new(n||t)(N(De),N(ti),N(ni),N(ae),N(gt),N(Ie),N(we),N(Ae),N(ue),N(St),N(Et))}}static{this.\u0275cmp=me({type:t,selectors:[["parish-members"]],viewQuery:function(n,i){if(n&1&&(z(Si,5),z(Z,5),z(Ai,5,te),z(wi,5,Z),z(re,5),z(re,5)),n&2){let a;W(a=j())&&(i.memberDataPaginator=a.first),W(a=j())&&(i.memberDataSort=a.first),W(a=j())&&(i.pendingDataPaginator=a.first),W(a=j())&&(i.pendingDataSort=a.first),W(a=j())&&(i.studData=a.first),W(a=j())&&(i.addEnv=a.first)}},standalone:!1,decls:16,vars:11,consts:[["familyDrawer",""],["censusCommunication","matMenu"],["censusExport","matMenu"],["memberDataSort",""],["addEnv","matMenu"],["memberDataPaginator",""],["emailOptions","matMenu"],["pendingDataSort",""],["pendingDataPaginator",""],["auto","matAutocomplete"],[1,"content"],[3,"color","backgroundColor","selectedIndex","selectedIndexChange","selectedTabChange",4,"ngIf"],["class","member-assistant-drawer",4,"ngIf"],[3,"organizationId","defaultContributionTypeId","credential","pageContext","canUse"],["class","initProgress",4,"ngIf"],["id","years-end-report",1,"mat-elevation-z8",2,"background","#8b0e04","border-top-right-radius","0px","border-bottom-right-radius","0px"],[1,"years-end-btn",3,"click"],["id","years-report-btn"],[2,"display","flex","flex-direction","column","background-color","#8b0e04","border-bottom-right-radius","5px","border-bottom-left-radius","18px"],[2,"display","flex","flex-direction","row","justify-content","space-around"],[1,"yrs-btn","mat-elevation-z8",3,"click"],["style","display: flex; flex-direction: row; justify-content: space-around;",4,"ngIf"],[3,"selectedIndexChange","selectedTabChange","color","backgroundColor","selectedIndex"],["label","Members",4,"ngIf"],["label","Pending Families",4,"ngIf"],["label","Merge Member Accounts",4,"ngIf"],["label","Upload Families (PG Admins Only)",3,"click",4,"ngIf"],["label","Members"],[2,"min-height","600px","width","100%",3,"hasBackdrop"],["mode","side"],[2,"display","flex","flex-direction","column"],[1,"filter-column"],[1,"d-flex","flex-row",2,"justify-content","space-between","flex-wrap","wrap","align-items","baseline"],[2,"margin","10px","color","#8b0e04","text-decoration","underline"],[1,"mat-elevation-z2",2,"cursor","pointer",3,"click"],[2,"margin-left","3px","transform","scale(0.8)","vertical-align","bottom"],[2,"margin","10px 0"],["name","family",2,"margin","10px",3,"ngModelChange","ngModel"],["name","census",2,"margin","10px",3,"ngModelChange","ngModel"],["name","volunteer",2,"margin","10px",3,"ngModelChange","ngModel"],["name","includeUnlinkedMember",2,"margin","10px",3,"ngModelChange","ngModel"],["name","UnlinkedMemberOnly",2,"margin","10px",3,"ngModelChange","ngModel"],["name","InActiveMemberOnly",2,"margin","10px",3,"ngModelChange","ngModel"],[2,"margin-bottom","15px","color","#8b0e04"],["name","genderFemaleFilter",2,"margin","10px",3,"ngModelChange","click","ngModel"],["name","genderMaleFilter",2,"margin","10px",3,"ngModelChange","click","ngModel"],["appearance","fill",2,"min-width","unset !important","
21width","100px","margin-left","15px","margin-top","-15px"],["matInput","","name","MinAge","type","number","min","0","max","100","placeholder","Minimum Age",3,"ngModelChange","ngModel"],["appearance","fill",2,"margin-left","15px","margin-top","-15px","min-width","unset !important","width","100px"],["matInput","","name","MaxAge","type","number","min","0","max","100","placeholder","Maximum Age",3,"ngModelChange","ngModel"],[2,"margin","10px 0px"],["mat-flat-button","","color","primary","type","button","style","margin: 5px;","class","standard-btn",3,"click",4,"ngIf"],[1,"content-div"],[1,"mat-elevation-z8",2,"display","flex","flex-wrap","wrap","flex-direction","row","margin-top","15px","min-height","80px","justify-content","space-between","align-items","center",3,"ngSubmit"],[2,"display","flex","flex-direction","row","align-items","center","flex-wrap","wrap"],["appearance","fill",1,"prog-selector","tour-step2"],["placeholder","Search By","name","searchType",3,"ngModelChange","ngModel"],["value","memberName",2,"font-family","Abel, sans-serif"],["value","email",2,"font-family","Abel, sans-serif"],["value","envelope",2,"font-family","Abel, sans-serif"],["value","childName",2,"font-family","Abel, sans-serif"],["value","phoneNumber",2,"font-family","Abel, sans-serif"],["value","username",2,"font-family","Abel, sans-serif"],["appearance","fill",2,"margin","0px 15px","width","165px"],["matInput","","placeholder","Search Term","name","searchTerm",3,"ngModelChange","value","ngModel"],["style","margin-top: -12px; display: flex; flex-direction: row; justify-content: flex-end; ",4,"ngIf"],["mat-raised-button","","type","submit","color","primary",1,"standard-btn",2,"margin","5px","width","165px","height","35px"],["aria-label","Search"],["mat-raised-button","","type","button",1,"standard-btn",2,"margin","5px","width","165px","height","35px",3,"click"],[1,"notranslate"],["mat-raised-button","","type","button","color","primary",1,"standard-btn",2,"height","35px","margin","5px",3,"click"],[2,"margin","10px 0 20px 0"],[2,"display","flex","flex-direction","row","justify-content","space-between"],[2,"display","flex","flex-direction","row","gap","20px"],["mat-raised-button","","class","standard-btn",3,"click",4,"ngIf"],["appearance","fill","style","margin: 0 10px;",4,"ngIf"],["mat-flat-button","","color","primary","class","standard-btn","type","button","style","max-height: 40px;",3,"click",4,"ngIf"],["mat-flat-button","","color","warn","style","max-height: 40px; border-radius: 999px;","type","button",3,"click",4,"ngIf"],["mat-raised-button","","color","primary","class","standard-btn","style","margin-right: 15px;",3,"click",4,"ngIf"],["style","display: flex; flex-direction: row; gap: 20px; border-radius: 999px;",4,"ngIf"],["class","progress",4,"ngIf"],[3,"ngSubmit",4,"ngIf"],["class","mat-elevation-z8 member-table-shell",4,"ngIf"],["style","padding: 15px",4,"ngIf"],["style","margin: 40px 0px; width: 100%; text-align: center; font-size: 1.3rem;",4,"ngIf"],["mat-flat-button","","color","primary","type","button",1,"standard-btn",2,"margin","5px",3,"click"],[2,"margin-top","-12px","display","flex","flex-direction","row","justify-content","flex-end"],["name","exactMatch",2,"margin-right","30px","margin-top","15px",3,"ngModelChange","ngModel"],["mat-raised-button","",1,"standard-btn",3,"click"],["appearance","fill",2,"margin","0 10px"],["matInput","","placeholder","Group Name","name","distributionListName",3,"ngModelChange","value","ngModel"],["matInput","","placeholder","Group Description","name","distributionListDesc",3,"ngModelChange","value","ngModel"],["mat-flat-button","","color","primary","type","button",1,"standard-btn",2,"max-height","40px",3,"click"],["mat-flat-button","","color","warn","type","button",2,"max-height","40px","border-radius","999px",3,"click"],["mat-raised-button","","color","primary",1,"standard-btn",2,"margin-right","15px",3,"click"],[2,"display","flex","flex-direction","row","gap","20px","border-radius","999px"],["class","standard-btn","mat-raised-button","","color","primary",3,"matMenuTriggerFor",4,"ngIf"],[1,"custom-dropdown",3,"click"],["mat-menu-item","","color","primary",2,"align-self","flex-end","margin-right","15px",3,"click"],["mat-menu-item","","color","primary",2,"border-top","1px solid rgba(176, 73, 47, 0.3)","align-self","flex-end","margin-right","15px",3,"click"],["mat-raised-button","","color","primary",1,"standard-btn",3,"matMenuTriggerFor"],["class","member-assistant-launch","type","button",3,"click",4,"ngIf"],["mat-menu-item","","color","primary","style","margin-right: 10px;",3,"click",4,"ngIf"],["mat-menu-item","","color","primary","style","border-top: 1px solid rgba(176, 73, 47, 0.3); margin-right: 10px;",3,"click",4,"ngIf"],["mat-menu-item","","color","primary","style","border-top: 1px solid rgba(176, 73, 47, 0.3);",3,"click",4,"ngIf"],["class","progress","style","margin-right: 15px; margin-top: 0px;",4,"ngIf"],["type","button",1,"member-assistant-launch",3,"click"],[1,"material-icons"],["mat-menu-item","","color","primary",2,"margin-right","10px",3,"click"],["mat-menu-item","","color","primary",2,"border-top","1px solid rgba(176, 73, 47, 0.3)","margin-right","10px",3,"click"],["mat-menu-item","","color","primary",2,"border-top","1px solid rgba(176, 73, 47, 0.3)",3,"click"],[1,"progress",2,"margin-right","15px","margin-top","0px"],[1,"progress"],[3,"ngSubmit"],[1,"mat-elevation-z8","member-table-shell"],["style","display: flex; justify-content: flex-end; padding: 5px;",4,"ngIf"],[2,"max-height","70vh !important","overflow-y","scroll","width","100%"],["id","desk-member-table","mat-table","","matSort","",2,"background","#faf4ef",3,"matSortChange","dataSource","matSortActive","matSortDirection"],["matColumnDef","Select"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","RegisterCensus"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["matColumnDef","EnvelopeLable"],["matColumnDef","Envelope"],["matColumnDef","Child"],["matColumnDef","LastName"],["matColumnDef","FamilyRole","sticky",""],["matColumnDef","Email","sticky",""],["matColumnDef","CellPhone","sticky",""],["matColumnDef","Address","sticky",""],["matColumnDef","YTDContributionAmount","sticky",""],["matColumnDef","PATD","sticky",""],["matColumnDef","PGFamilyID"],["matColumnDef","SignOnDate","sticky",""],["matColumnDef","SendWelcomeEmail","sticky",""],["matColumnDef","Details","sticky",""],["matColumnDef","SendEnvelope"],["matColumnDef","DateOfDeath"],["matColumnDef","BaptismDate"],["matColumnDef","BaptismChurch"],["matColumnDef","ReconciliationDate"],["matColumnDef","ReconciliationChurch"],["matColumnDef","CommunionDate"],["matColumnDef","CommunionChurch"],["matColumnDef","ConfirmationDate"],["matColumnDef","ConfirmationChurch"],["matColumnDef","MarriageCertificate"],["matColumnDef","BaptismPresiderName"],["matColumnDef","BaptismVerified"],["matColumnDef","ReconciliationPresiderName"],["matColumnDef","ReconciliationVerified"],["matColumnDef","CommunionPresiderName"],["matColumnDef","CommunionVerified"],["matColumnDef","ConfirmationPresiderName"],["matColumnDef","ConfirmationVerified"],["matColumnDef","BaptismGodParent1"],["matColumnDef","BaptismGodParent2"],["matColumnDef","BaptismFatherName"],["matColumnDef","BaptismMotherName"],["matColumnDef","ConfirmationName"],["matColumnDef","ConfirmationSponsorName"],["matColumnDef","ConfirmationFatherName"],["matColumnDef","ConfirmationMotherName"],["matColumnDef","BaptismRegistryVol"],["matColumnDef","BaptismRegistryPage"],["matColumnDef","BaptismRegistryNo"],["matColumnDef","ReconciliationRegistryVol"],["matColumnDef","ReconciliationRegistryPage"],["matColumnDef","ReconciliationRegistryNo"],["matColumnDef","CommunionRegistryVol"],["matColumnDef","CommunionRegistryPage"],["matColumnDef","CommunionRegistryNo"],["matColumnDef","ConfirmationRegistryVol"],["matColumnDef","ConfirmationRegistryPage"],["matColumnDef","ConfirmationRegistryNo"],["matColumnDef","MarriageRegistryVol"],["matColumnDef","MarriageRegistryPage"],["matColumnDef","MarriageRegistryNo"],["matColumnDef","DODRegistryVol"],["matColumnDef","DODRegistryPage"],["matColumnDef","DODRegistryNo"],["matColumnDef","FuneralDate"],["matColumnDef","FuneralChurch"],["matColumnDef","FuneralPresiderName"],["matColumnDef","FuneralRegistryVol"],["matColumnDef","FuneralRegistryPage"],["matColumnDef","FuneralRegistryNo"],["matColumnDef","ChildNames"],["matColumnDef","MOStatus"],["matColumnDef","FamilyID"],["matColumnDef","Gender"],["matColumnDef","Volunteer"],["matColumnDef","FirstName"],["matColumnDef","DOB"],["matColumnDef","CheckEmail"],["matColumnDef","MaidenName"],["matColumnDef","Religion"],["matColumnDef","MiddleName"],["matColumnDef","NotificationEmail"],["matColumnDef","Address2"],["matColumnDef","City"],["matColumnDef","State"],["matColumnDef","Zip"],["matColumnDef","REPrimary"],["matColumnDef","RESecondary"],["matColumnDef","CensusPrimary"],["matColumnDef","MarriageCompleted"],["matColumnDef","MarriageDateCompleted"],["matColumnDef","MarriageParish"],["matColumnDef","Celebrant"],["matColumnDef","Canonical"],["matColumnDef","HomePhone"],["matColumnDef","WorkPhone"],["matColumnDef","YTDPaymentAmount"],["matColumnDef","DisplayName"],["matColumnDef","InParish"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"menu-form-wrapper",3,"click"],["appearance","outlined","style","text-align: center; padding: 25px 7px 7px 7px; height: 120px;",3,"click",4,"ngIf"],["id","mobile-member-table","mat-table","","matSort","",3,"dataSource"],["matColumnDef","Envelope","sticky",""],["id","sm-mobile-contribution-table","mat-table","","matSort","",3,"dataSource"],["matColumnDef","Members"],["mat-header-row","",4,"matHeaderRowDef"],["style","width: 100%; display: flex; flex-direction: row; justify-content: center; padding: 25px;",4,"ngIf"],["aria-label","Select page",1,"paginator",2,"border-bottom-left-radius","18px","border-bottom-right-radius","18px","background","#faf4ef",3,"page","showFirstLastButtons","pageSize","pageSizeOptions"],[2,"display","flex","justify-content","flex-end","padding","5px"],["mat-stroked-button","","color","primary","type","button",1,"standard-btn",2,"border-radius","10px",3,"click"],["mat-header-cell",""],[3,"change","checked"],[2,"margin-left","6px"],["mat-cell",""],["name","volunteer",2,"margin-right","10px",3,"ngModelChange","ngModel"],["mat-header-cell","","mat-sort-header",""],[2,"font-size","small"],[3,"click","matMenuTriggerFor"],["appearance","outlined","style","display: block; justify-content: center; padding: 15px 5px; height: fit-content;",3,"click",4,"ngIf"],["appearance","outlined",2,"display","block","justify-content","center","padding","15px 5px","height","fit-content",3,"click"],["appearance","fill"],["matInput","","placeholder","Envelope Number","name","newEnvN
21o",2,"margin-bottom","7px","width","100%",3,"ngModelChange","value","ngModel"],["mat-raised-button","","color","primary",1,"standard-btn",2,"margin-top","7px","width","10%",3,"click"],[2,"font-size","small",3,"matTooltip","matTooltipPosition"],["style","vertical-align: bottom; font-size: 1.3rem; color: red;",4,"ngIf"],[2,"vertical-align","bottom","font-size","1.3rem","color","red"],[2,"width","100px !important","font-weight","900","font-size","1rem"],[4,"ngIf"],[2,"margin-left","15px"],["mat-raised-button","","class","standard-btn",3,"matMenuTriggerFor",4,"ngIf"],[1,"custom-dropdown"],["mat-menu-item","",3,"click",4,"ngIf"],["mat-menu-item","","style","border-top: 1px solid rgba(176, 73, 47, 0.3);",3,"click",4,"ngIf"],["mat-raised-button","",1,"standard-btn",3,"matMenuTriggerFor"],[2,"color","#8b0e04","margin","auto"],["mat-menu-item","",3,"click"],["mat-menu-item","",2,"border-top","1px solid rgba(176, 73, 47, 0.3)",3,"click"],["mat-raised-button","",1,"standard-btn",2,"font-size","small",3,"click"],["mat-header-row",""],["mat-row",""],["appearance","outlined",2,"text-align","center","padding","25px 7px 7px 7px","height","120px",3,"click"],["mat-raised-button","","color","primary",2,"margin-top","7px","width","80%",3,"click"],[2,"display","flex","flex-direction","row","gap","5px"],["mat-raised-button","",3,"click"],[1,"ct-expansion-panel",2,"margin","5px 0px"],[2,"padding","5px",3,"opened","closed"],["mat-raised-button","","color","primary",3,"click"],[2,"width","100%","display","flex","flex-direction","row","justify-content","center","padding","25px"],[2,"margin-left","5px"],[2,"padding","15px"],[2,"margin","40px 0px","width","100%","text-align","center","font-size","1.3rem"],[2,"font-size","2rem","margin-right","10px"],["label","Pending Families"],[2,"display","flex","flex-direction","row","justify-content","flex-end"],[2,"cursor","pointer",3,"click"],[1,"material-icons","material-symbols-outlined",2,"vertical-align","middle","margin-right","4px"],["class","mat-elevation-z8 member-table-shell","style","margin-top: 10px; padding-top: 60px;",4,"ngIf"],[1,"mat-elevation-z8","member-table-shell",2,"margin-top","10px","padding-top","60px"],["id","desk-pending-table","mat-table","","matSort","",2,"background","#faf4ef",3,"dataSource"],["matColumnDef","Reject","sticky",""],["matColumnDef","Approve","sticky",""],[1,"paginator",2,"background-color","#faf4ef","border-bottom-left-radius","18px","border-bottom-right-radius","18px",3,"showFirstLastButtons","length","pageSize","pageSizeOptions"],["class","standard-btn","mat-raised-button","","style","color:red",3,"click",4,"ngIf"],["mat-raised-button","",1,"standard-btn",2,"color","red",3,"click"],["class","standard-btn","mat-raised-button","","style","color:green",3,"click",4,"ngIf"],["mat-raised-button","",1,"standard-btn",2,"color","green",3,"click"],[1,"initProgress"],["label","Merge Member Accounts"],[2,"margin-top","10px","display","flex","flex-direction","row","justify-content","space-between"],[2,"display","flex","flex-direction","row","justify-content","space-between",3,"ngSubmit"],["appearance","fill",2,"margin","0px 15px"],["matInput","","placeholder","Search By Email","name","searchTerm",3,"ngModelChange","value","ngModel"],["mat-flat-button","","color","primary","type","submit",1,"standard-btn",2,"margin-right","10px","margin-bottom","1.25em","height","35px"],["class","mat-elevation-z8","style","margin-top: 10px; min-height: 90px; padding-top: 40px; padding-bottom: 40px; overflow-x: auto; overflow-y: scroll;",4,"ngIf"],["style","display: flex; flex-direction: column; margin: 20px;",4,"ngIf"],[1,"mat-elevation-z8",2,"margin-top","10px","min-height","90px","padding-top","40px","padding-bottom","40px","overflow-x","auto","overflow-y","scroll"],["id","desk-member-table","mat-table","","matSort","",2,"background","#faf4ef",3,"dataSource"],["matColumnDef","Username","sticky",""],["matColumnDef","YTDPaymentAmount","sticky",""],["matColumnDef","B"],["mat-header-cell","","style","text-align: center !important;",4,"matHeaderCellDef"],["matColumnDef","A"],["mat-header-cell","",2,"text-align","center !important"],["style","min-width: 170px; cursor: pointer; display: flex; flex-direction: row; justify-content: center; margin: 15px 10px;",4,"ngIf"],["style","min-width: 170px; cursor: pointer; display: flex; flex-direction: row; justify-content: center; margin: 15px 10px;",3,"click",4,"ngIf"],[2,"min-width","170px","cursor","pointer","display","flex","flex-direction","row","
21justify-content","center","margin","15px 10px"],[1,"material-icons","material-symbols-outlined",2,"color","red"],[2,"min-width","170px","cursor","pointer","display","flex","flex-direction","row","justify-content","center","margin","15px 10px",3,"click"],[1,"material-icons","material-symbols-outlined"],["style","min-width: 170px; cursor: pointer; display: flex; flex-direction: row; justify-content: center; margin: 5px 10px;",4,"ngIf"],["style","min-width: 170px; cursor: pointer; display: flex; flex-direction: row; justify-content: center; margin: 5px 10px;",3,"click",4,"ngIf"],[2,"min-width","170px","cursor","pointer","display","flex","flex-direction","row","justify-content","center","margin","5px 10px"],[1,"material-icons","material-symbols-outlined",2,"color","green"],[2,"min-width","170px","cursor","pointer","display","flex","flex-direction","row","justify-content","center","margin","5px 10px",3,"click"],["matTooltip","Unable to select this Member",1,"material-icons","material-symbols-outlined",2,"color","gray"],[2,"display","flex","flex-direction","column","margin","20px"],[2,"display","flex","flex-direction","row","justify-content","center"],[3,"toKeep","data","uc","marital",4,"ngIf"],["class","mat-elevation-z8","appearance","outlined","style","width: 400px; margin:10px; font-family: Abel, sans-serif; text-align: center;",4,"ngIf"],[1,"material-icons","material-symbols-outlined",2,"vertical-align","middle","margin","auto -1.5rem","font-size","3rem","color","#8b0e04","border","1px solid rgba(176, 73, 47, 0.3)","z-index","2","background-color","#fdf9f5","border-radius","999px","padding-left","3px"],["class","mat-elevation-z8","appearance","outlined","style","align-self: center; margin-top: 20px; padding-bottom: 15px; width: 40rem;",4,"ngIf"],[3,"toKeep","data","uc","marital"],["appearance","outlined",1,"mat-elevation-z8",2,"width","400px","margin","10px","font-family","Abel, sans-serif","text-align","center"],["appearance","outlined",1,"mat-elevation-z8",2,"align-self","center","margin-top","20px","padding-bottom","15px","width","40rem"],["style","display: flex; flex-direction: column; justify-content: center; margin-top: 15px;",4,"ngIf"],["style","display: flex; flex-direction: column; justify-content: center; margin: 15px;",4,"ngIf"],["id","mergeSection",2,"width","100%","display","flex","align-items","center"],["class","standard-btn","mat-flat-button","","style","margin: 20px auto;","color","primary","type","button",3,"click",4,"ngIf"],[2,"display","flex","flex-direction","column","justify-content","center","margin-top","15px"],[2,"text-align","center","margin-top","15px"],[2,"display","flex","flex-direction","row","justify-content","center","margin-top","10px"],["name","signonDateSelect",3,"ngModelChange","ngModel"],[2,"margin","10px 20px",3,"value"],[2,"display","flex","flex-direction","column","justify-content","center","margin","15px"],["name","usernameSelect",3,"ngModelChange","ngModel"],["mat-flat-button","","color","primary","type","button",1,"standard-btn",2,"margin","20px auto",3,"click"],[1,"material-icons","material-symbols-outlined",2,"vertical-align","middle","margin-right","5px"],["label","Upload Families (PG Admins Only)",3,"click"],["class","drop-zone","style","display: flex; flex-direction: column; height: 350px; width: 610px; margin: 50px auto; border-radius:18px;",3,"drop","dragover",4,"ngIf"],["style","display: flex; flex-direction: column; min-width: 650px; max-width: 80%; margin: 25px auto;",4,"ngIf"],["style","display: flex; flex-direction: row; justify-content: flex-start; flex-wrap: wrap;",4,"ngIf"],[1,"drop-zone",2,"display","flex","flex-direction","column","height","350px","width","610px","margin","50px auto","border-radius","18px",3,"drop","dragover"],[2,"font-size","0.8rem !important","margin-left","15px"],["type","file","accept",".xlsx, .xls, .csv","hidden","",3,"change"],[2,"width","600px","height","340px","display","flex","flex-direction","column","align-items","center","align-content","center","border-radius","18px"],["style","margin: auto; font-size: 1.2rem; cursor: pointer; font-weight: 700 !important; width: fit-content; padding: 7px; border-radius: 5px; color:#8b0e04",4,"ngIf"],["style","margin: auto; font-size: 0.8rem; cursor: pointer; font-weight: 700 !important; width: fit-content; padding: 7px; border-radius: 5px;",4,"ngIf"],[2,"margin","auto","font-size","1.2rem","cursor","pointer","font-weight","700 !important","
21width","fit-content","padding","7px","border-radius","5px","color","#8b0e04"],[1,"material-icons",2,"vertical-align","middle"],[2,"margin","auto","font-size","0.8rem","cursor","pointer","font-weight","700 !important","width","fit-content","padding","7px","border-radius","5px"],[2,"width","60px","height","60px","margin-right","10px","position","relative","display","flex","align-items","center","justify-content","center","margin","auto","padding-top","60px","margin-bottom","60px"],[2,"display","flex","flex-direction","column","min-width","650px","max-width","80%","margin","25px auto"],["style","display: flex; flex-direction: row; justify-content: space-between; align-items: center;",4,"ngIf"],["mode","determinate",3,"value"],[2,"display","flex","flex-direction","row","justify-content","space-between","align-items","center"],[2,"display","flex","flex-direction","row","justify-content","flex-start","flex-wrap","wrap"],[2,"display","flex","flex-direction","column","margin","0px auto"],["class","mat-elevation-z8","style","display: flex; flex-direction: column; justify-content: flex-start; flex-wrap: wrap; padding: 20px;",4,"ngIf"],["style","display: flex; flex-direction: row; margin: 25px; justify-content: center;",4,"ngIf"],["style","width: 100px; height: 100px; margin-right: 10px; position: relative; display: flex; align-items: center; justify-content: center; margin: auto; padding-top: 100px; margin-bottom: 100px;",4,"ngIf"],["style","max-height: 70vh !important; overflow-y: scroll; min-width: 825px; max-width: 70%; margin: 10px auto; padding: 15px;",4,"ngIf"],[1,"mat-elevation-z8",2,"display","flex","flex-direction","column","justify-content","flex-start","flex-wrap","wrap","padding","20px"],[2,"margin","15px 0"],[2,"width","100%","margin","15px 0px"],["style","margin: 15px;",4,"ngFor","ngForOf"],[2,"margin","15px"],["style","display: flex; flex-direction: row; align-items: center; align-content: center;",4,"ngIf"],[2,"display","flex","flex-direction","row","align-items","center","align-content","center"],[2,"color","green"],[2,"color","red"],[2,"display","flex","flex-direction","row","margin","25px","justify-content","center"],["mat-raised-button","","color","warn","style","border-radius: 18px;",3,"click",4,"ngIf"],["mat-raised-button","","color","primary","class","standard-btn","style","margin-left: 30px;",3,"click",4,"ngIf"],["mat-raised-button","","color","warn",2,"border-radius","18px",3,"click"],["mat-raised-button","","color","primary",1,"standard-btn",2,"margin-left","30px",3,"click"],[2,"width","100px","height","100px","margin-right","10px","position","relative","display","flex","align-items","center","justify-content","center","margin","auto","padding-top","100px","margin-bottom","100px"],[2,"max-height","70vh !important","overflow-y","scroll","min-width","825px","max-width","70%","margin","10px auto","padding","15px"],["mat-table","",1,"mat-elevation-z8",2,"width","100%",3,"dataSource","trackBy"],["matColumnDef","status","sticky",""],["matColumnDef","header","sticky",""],["matColumnDef","arrow","sticky","",2,"max-width","50px !important"],["matColumnDef","dbHeader","sticky",""],["style","color: green;",4,"ngIf"],["style","color: orange;",4,"ngIf"],[2,"color","orange"],[2,"display","flex","flex-direction","row","justify-content","flex-start","align-items","center"],[2,"max-width","unset !important","width","450px !important"],["type","text","placeholder","Type to search...","aria-label","Select DB Column","matInput","",3,"ngModelChange","matAutocomplete","ngModel"],[3,"optionSelected"],[3,"value"],[3,"value",4,"ngFor","ngForOf"],["mat-icon-button","",3,"click"],[1,"member-assistant-drawer"],[1,"member-assistant-header"],[1,"member-assistant-title-wrap"],[1,"member-assistant-actions"],["class","member-assistant-icon-btn","type","button","title","Saved chats",3,"click",4,"ngIf"],["type","button","title","New chat",1,"member-assistant-icon-btn",3,"click"],["type","button","title","Close assistant",1,"member-assistant-icon-btn",3,"click"],["class","member-assistant-history",4,"ngIf"],[1,"member-assistant-thread"],["class","member-assistant-snapsh
21ot-notice",4,"ngIf"],["class","member-assistant-scope-prompt",4,"ngIf"],["class","member-assistant-lookup",4,"ngIf"],["class","member-assistant-load-progress",4,"ngIf"],["class","member-assistant-empty-state",4,"ngIf"],[4,"ngFor","ngForOf"],["class","member-assistant-error",4,"ngIf"],[1,"member-assistant-composer",3,"ngSubmit"],["name","memberAssistantQuestion","rows","2","placeholder","Ask about members or families...",3,"ngModelChange","ngModel","disabled"],["type","submit","title","Ask assistant",3,"disabled"],["class","member-assistant-disclaimer",4,"ngIf"],["type","button","title","Saved chats",1,"member-assistant-icon-btn",3,"click"],[1,"member-assistant-history"],[1,"member-assistant-history-heading"],["type","button",3,"click"],["class","member-assistant-history-loading",4,"ngIf"],["type","button","class","member-assistant-history-row",3,"active","click",4,"ngFor","ngForOf"],["class","member-assistant-history-empty",4,"ngIf"],[1,"member-assistant-history-loading"],["type","button",1,"member-assistant-history-row",3,"click"],["title","Delete chat",1,"material-icons","member-assistant-history-delete",3,"click"],[1,"member-assistant-history-empty"],[1,"member-assistant-snapshot-notice"],[1,"member-assistant-scope-prompt"],[1,"member-assistant-scope-actions"],[1,"member-assistant-lookup"],["class","member-assistant-lookup-loading",4,"ngIf"],["class","member-assistant-lookup-options",4,"ngIf"],["class","member-assistant-lookup-error",4,"ngIf"],["class","member-assistant-lookup-empty",4,"ngIf"],["type","button",1,"member-assistant-lookup-cancel",3,"click"],[1,"member-assistant-lookup-loading"],[1,"member-assistant-lookup-options"],["type","button",3,"click",4,"ngFor","ngForOf"],[1,"member-assistant-lookup-error"],[1,"member-assistant-lookup-empty"],[1,"member-assistant-load-progress"],["class","member-assistant-progress-track",4,"ngIf"],[1,"member-assistant-progress-track"],[1,"member-assistant-scope-actions","member-assistant-result-options"],[1,"member-assistant-empty-state"],[1,"member-assistant-user-row"],[1,"member-assistant-message-meta"],[1,"member-assistant-user-bubble"],[1,"member-assistant-answer-row"],[1,"member-assistant-answer"],[1,"member-assistant-summary"],["class","member-assistant-scope-notice",4,"ngIf"],["class","member-assistant-scope-warning",4,"ngIf"],["class","member-assistant-explain-btn","type","button",3,"click",4,"ngIf"],["class","member-assistant-assumptions",4,"ngIf"],["class","member-assistant-warning",4,"ngIf"],["class","member-assistant-chart",4,"ngIf"],["class","member-assistant-line-chart",4,"ngIf"],["class","member-assistant-pie-chart",4,"ngIf"],["class","member-assistant-table-wrap",4,"ngIf"],["class","member-assistant-report-btn","type","button",3,"click",4,"ngFor","ngForOf"],["class","member-assistant-empty",4,"ngIf"],[1,"member-assistant-scope-notice"],[1,"member-assistant-scope-warning"],["type","button",1,"member-assistant-explain-btn",3,"click"],[1,"member-assistant-assumptions"],[1,"member-assistant-warning"],[1,"member-assistant-chart"],["class","member-assistant-bar",4,"ngFor","ngForOf"],[1,"member-assistant-bar"],[1,"member-assistant-bar-track"],[1,"member-assistant-bar-fill"],[1,"member-assistant-line-chart"],["viewBox","0 0 100 100","preserveAspectRatio","none","role","img"],[1,"member-assistant-line-labels"],[1,"member-assistant-pie-chart"],[1,"member-assistant-pie"],[1,"member-assistant-pie-legend"],["class","member-assistant-pie-legend-row",4,"ngFor","ngForOf"],[1,"member-assistant-pie-legend-row"],[1,"member-assistant-table-wrap"],[1,"member-assistant-table"],["type","button",1,"member-assistant-report-btn",3,"click"],[1,"member-assistant-empty"],[1,"member-assistant-error"],[1,"member-assistant-disclaimer"],[1,"yrs-btn","mat-elevation-z8",2,"max-width","175px",3,"click"]],template:function(n,i){n&1&&(r(0,"div",10),b(1,rl,5,7,"mat-tab-group",11)(2,ql,35,17,"aside",12),E(3,"parish-assistant",13),b(4,Ql,2,0,"div",14),o(),r(5,"div",15)(6,"div",16),S("click",function(d){return i.expandYR(d)}),l(7," Year End Reports "),o(),r(8,"div",17)(9,"div",18)(10,"div",19)(11,"div",20),S("click",function(){return i.yearsEndR(i.yearsEnds[0],"ParishionerTotal")}),l(12),o(),r(13,"div",20),S("click",function(){return i.yearsEndR(i.yearsEnds[0],"ContributionTotal")}),l(14),o()(),b(15,Jl,5,2,"div",21),o()()()),n&2&&(m(),u("ngIf",!i.loading),m(),u("ngIf",!1),m(),u("organizationId",i.data==null?null:i.data.OrgID)("defaultContributionTypeId",i.data==null?null:i.data.defaultCTID)("credential",(i.userAccessObject==null?null:i.userAccessObject.UC)||(i.data==null?null:i.data.UC))("pageContext",i.parishAssistantPageContext)("canUse",i.canUseParishMembersAssistant),m(),u("ngIf",i.loading),m(8),f(" ",i.yearsEnds[0]," Parishioner Total"),m(2),f(" ",i.yearsEnds[0]," Contribution Total"),m(),u("ngIf",i.acc==null?null:i.acc.CensusSoftware))},dependencies:[le,de,zt,he,xt,Dt,be,jt,Kt,Ee,Te,Pe,Ct,Yt,Ut,re,Pt,Tt,wt,Gt,Ot,At,Nt,Bt,Ht,$t,Fe,vt,dt,ce,ct,_e,mt,pt,_t,pe,lt,Oe,Le,He,Ne,Ve,Ue,Be,$e,Ye,Ge,Z,ke,Wt,te,Jt,Mt,yt,Vt,Lt,fe,nt],styles:['.content[_ngcontent-%COMP%]{min-height:100vh;background-attachment:fixed;background:linear-gradient(165deg,#fff8f4,#fde6de 52%,#f0f4f9)!important}.columns[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;align-items:flex-start}.vert-center[_ngcontent-%COMP%]{align-items:center}.left-column[_ngcontent-%COMP%]{flex:4;height:100%;padding-right:10px}.right-column[_ngcontent-%COMP%]{flex:3;height:100%;padding-left:10px}.block[_ngcontent-%COMP%]{margin-top:20px}.header-title[_ngcontent-%COMP%]{margin-top:20px;margin-left:30px;margin-bottom:10px}.header-block[_ngcontent-%COMP%]{margin-top:20px;
21display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap}.org-selector[_ngcontent-%COMP%]{min-width:260px;margin-top:15px}.org-actions-block[_ngcontent-%COMP%]{margin:0 30px}.userFeeTable[_ngcontent-%COMP%]{border-spacing:0px;border:1px solid #c5c5c5;border-top:none;border-left:none;margin-top:10px;margin-bottom:20px}.userFeeTD[_ngcontent-%COMP%]{background:#fff;border:1px solid #c5c5c5;padding:5px 10px;border-right:none;border-bottom:none}.students-actions[_ngcontent-%COMP%]{display:flex;flex-direction:row-reverse;flex-wrap:wrap}.links-actions[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;align-items:stretch;flex-wrap:wrap}.links-actions[_ngcontent-%COMP%]   button[_ngcontent-%COMP%], .students-actions[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{margin-top:10px}.students-actions[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:nth-child(1){margin-left:10px}.initProgress[_ngcontent-%COMP%]{width:100px;height:100px;position:relative;display:flex;align-items:center;justify-content:center;margin:auto auto 100px;padding-top:100px}.progress[_ngcontent-%COMP%]{width:100px;height:100px;position:relative;display:flex;align-items:center;justify-content:center;margin:10px auto}.discounts[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin-top:5px}.discounts[_ngcontent-%COMP%]   mat-checkbox[_ngcontent-%COMP%]{margin-right:10px}.headTD[_ngcontent-%COMP%]   b[_ngcontent-%COMP%], .userFeeTD[_ngcontent-%COMP%]   b[_ngcontent-%COMP%]{font-size:20px}.progress[_ngcontent-%COMP%]   mat-spinner[_ngcontent-%COMP%], .initProgress[_ngcontent-%COMP%]   mat-spinner[_ngcontent-%COMP%]{width:100%!important;height:100%!important}.progress[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%], .initProgress[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{width:100%!important;height:100%!important}.addOrgButton[_ngcontent-%COMP%]{margin-right:20px}.tui-selector[_ngcontent-%COMP%]{margin-top:10px;font-size:23px;width:250px}.list-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin:10px 0;flex-wrap:wrap}.list-sandwich[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.list-books[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start}.list-shelf[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start;align-items:center}.list-shelf[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]:first-child{margin-right:10px}.student-edit-button[_ngcontent-%COMP%]{margin-top:4px}.ses-dates[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap}.ses-dates[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:first-child, .ses-dates[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]:first-child{margin-right:10px}.ses-info[_ngcontent-%COMP%]{max-height:200px;overflow-y:auto}.hidden[_ngcontent-%COMP%]{max-height:0;overflow:hidden;transition:max-height .3s ease-out}.expanded[_ngcontent-%COMP%]{max-height:40vh;transition:max-height .3s ease-in}.mobile-stack[_ngcontent-%COMP%]{max-height:70px;display:flex;flex-wrap:wrap;flex-direction:column}.vertical-stack[_ngcontent-%COMP%]{display:flex;flex-direction:row;max-height:calc(40vh - 63px)}.force-vertical-stack[_ngcontent-%COMP%]{flex-direction:column}.force-mobile-vscroll[_ngcontent-%COMP%]{overflow-y:scroll}.hover-red[_ngcontent-%COMP%]{color:#8b0e04;cursor:pointer}.hover-red[_ngcontent-%COMP%]:hover{color:#c0170b}.member-table-shell[_ngcontent-%COMP%]{position:relative}.member-assistant-launch[_ngcontent-%COMP%]{gap:8px;background:#fff;border:1px solid rgba(139,14,4,.28);border-radius:999px;box-shadow:0 2px 8px #0000001f;color:#8b0e04;cursor:pointer;font-weight:700;display:flex;justify-content:flex-end;padding:5px}.member-assistant-drawer[_ngcontent-%COMP%]{position:fixed;top:70px;right:0;bottom:0;width:min(540px,34vw);min-width:430px;
21display:grid;grid-template-rows:auto 1fr auto auto;background:#fff;border-left:1px solid rgba(139,14,4,.18);box-shadow:-8px 0 24px #00000024;z-index:1000}.member-assistant-history[_ngcontent-%COMP%]{position:absolute;top:68px;left:12px;right:12px;max-height:min(520px,100vh - 160px);overflow-y:auto;padding:12px;background:#fff;border:1px solid rgba(139,14,4,.2);border-radius:10px;box-shadow:0 10px 28px #0000002e;z-index:4}.member-assistant-history-heading[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px;color:#3c2722}.member-assistant-history-heading[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{padding:6px 10px;border:1px solid rgba(139,14,4,.25);border-radius:999px;background:#fff;color:#8b0e04;cursor:pointer;font-weight:700}.member-assistant-history-row[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px;border:0;border-top:1px solid rgba(0,0,0,.07);background:#fff;color:#3c2722;cursor:pointer;text-align:left}.member-assistant-history-row.active[_ngcontent-%COMP%], .member-assistant-history-row[_ngcontent-%COMP%]:hover{background:#fff8f4}.member-assistant-history-row[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]:first-child{min-width:0;display:grid;gap:3px}.member-assistant-history-row[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.member-assistant-history-row[_ngcontent-%COMP%]   small[_ngcontent-%COMP%], .member-assistant-history-loading[_ngcontent-%COMP%], .member-assistant-history-empty[_ngcontent-%COMP%]{color:#0000008f}.member-assistant-history-delete[_ngcontent-%COMP%]{flex:0 0 auto;padding:5px;color:#8b0e04;font-size:19px}.member-assistant-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 18px 12px}.member-assistant-title-wrap[_ngcontent-%COMP%], .member-assistant-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}.member-assistant-title-wrap[_ngcontent-%COMP%] > .material-icons[_ngcontent-%COMP%]{color:#8b0e04;font-size:30px}.member-assistant-header[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{margin:0;color:#8b0e04}.member-assistant-header[_ngcontent-%COMP%]   p[_ngcontent-%COMP%], .member-assistant-answer[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:4px 0 0}.member-assistant-icon-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;padding:0;background:transparent;border:0;color:#000000b8;cursor:pointer}.member-assistant-thread[_ngcontent-%COMP%]{padding:10px 18px 16px;overflow-y:auto;display:flex;flex-direction:column;gap:14px}.member-assistant-empty-state[_ngcontent-%COMP%]{margin:auto;color:#00000094;text-align:center}.member-assistant-scope-prompt[_ngcontent-%COMP%]{padding:12px;border:1px solid rgba(139,14,4,.2);border-radius:8px;background:#fff8f4}.member-assistant-scope-prompt[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:0 0 10px;color:#3c2722;font-weight:600;line-height:1.35}.member-assistant-scope-actions[_ngcontent-%COMP%]{display:flex;gap:8px;flex-wrap:wrap}.member-assistant-scope-actions[_ngcontent-%COMP%]   button[_ngcontent-%COMP%], .member-assistant-report-btn[_ngcontent-%COMP%]{padding:7px 10px;border:1px solid rgba(139,14,4,.28);border-radius:999px;background:#fff;color:#8b0e04;cursor:pointer;font-weight:700}.member-assistant-snapshot-notice[_ngcontent-%COMP%]{padding:9px 11px;border-radius:8px;background:#f7f3f0;color:#000000a6;font-size:12px;line-height:1.4}.member-assistant-lookup[_ngcontent-%COMP%], .member-assistant-load-progress[_ngcontent-%COMP%]{padding:12px;border:1px solid rgba(139,14,4,.2);border-radius:8px;background:#fff8f4;color:#3c2722}.member-assistant-lookup[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:0 0 10px;font-weight:600}.member-assistant-load-progress[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{display:block;font-weight:600}.member-assistant-progress-track[_ngcontent-%COMP%]{height:6px;margin-top:9px;overflow:hidden;border-radius:999px;background:#8b0e041f}.member-assistant-progress-track[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{height:100%;border-radius:inherit;background:#8b0e04;transition:width .18s ease}.member-assistant-lookup-options[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px}.member-assistant-lookup-options[_ngcontent-%COMP%]   button[_ngcontent-%COMP%], .member-assistant-lookup-cancel[_ngcontent-%COMP%]{min-height:34px;padding:7px 10px;border:1px solid rgba(139,14,4,.24);border-radius:6px;background:#fff;color:#8b0e04;cursor:pointer;font:inherit;text-align:left}.member-assistant-lookup-cancel[_ngcontent-%COMP%]{margin-top:10px;text-align:center}.member-assistant-lookup-loading[_ngcontent-%COMP%], .member-assistant-lookup-empty[_ngcontent-%COMP%], .member-assistant-lookup-error[_ngcontent-%COMP%]{color:#000000a8}.member-assistant-lookup-error[_ngcontent-%COMP%]{color:#8b0e04}.member-assistant-user-row[_ngcontent-%COMP%], .member-assistant-answer-row[_ngcontent-%COMP%]{display:flex;flex-direction:column}.member-assistant-user-row[_ngcontent-%COMP%]{align-items:flex-end}.member-assistant-answer-row[_ngcontent-%COMP%]{align-items:flex-start}.member-assistant-message-meta[_ngcontent-%COMP%]{margin-bottom:5px;color:#0000009e;font-size:12px}.member-assistant-user-bubble[_ngcontent-%COMP%], .member-assistant-answer[_ngcontent-%COMP%]{max-width:92%;border-radius:8px}.member-assistant-user-bubble[_ngcontent-%COMP%]{padding:10px 12px;background:#faf4ef;border:1px solid rgba(139,14,4,.16);color:#3c2722}.member-assistant-answer[_ngcontent-%COMP%]{padding:12px;background:#fff;border:1px solid rgba(0,0,0,.1)}
21.member-assistant-answer[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{margin:0 0 4px}.member-assistant-summary[_ngcontent-%COMP%]{font-size:14px;font-weight:600;line-height:1.4}.member-assistant-scope-notice[_ngcontent-%COMP%], .member-assistant-scope-warning[_ngcontent-%COMP%]{margin-top:8px;font-size:12px;line-height:1.35}.member-assistant-scope-notice[_ngcontent-%COMP%]{color:#0000008f}.member-assistant-scope-warning[_ngcontent-%COMP%], .member-assistant-error[_ngcontent-%COMP%], .member-assistant-warning[_ngcontent-%COMP%]{color:#8b0e04;font-weight:600}.member-assistant-warning[_ngcontent-%COMP%]   span[_ngcontent-%COMP%], .member-assistant-assumptions[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{display:block;margin-top:4px}.member-assistant-explain-btn[_ngcontent-%COMP%]{margin-top:8px;padding:0;border:0;background:transparent;color:#8b0e04;cursor:pointer;font-size:13px;font-weight:700;text-decoration:underline}.member-assistant-assumptions[_ngcontent-%COMP%]{margin-top:8px;color:#0000009e;font-size:13px}.member-assistant-table-wrap[_ngcontent-%COMP%]{margin-top:12px;overflow-x:auto;max-width:100%}.member-assistant-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}.member-assistant-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], .member-assistant-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:7px 9px;border-bottom:1px solid rgba(0,0,0,.08);text-align:left;white-space:nowrap;font-size:12px}.member-assistant-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{color:#8b0e04;background:#faf4ef;font-weight:700}.member-assistant-chart[_ngcontent-%COMP%]{margin-top:14px;display:grid;gap:8px}.member-assistant-bar[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(90px,150px) 1fr auto;gap:10px;align-items:center;font-size:12px}.member-assistant-bar-track[_ngcontent-%COMP%]{height:12px;overflow:hidden;background:#f2e7e0;border-radius:999px}.member-assistant-bar-fill[_ngcontent-%COMP%]{height:100%;border-radius:999px}.member-assistant-pie-chart[_ngcontent-%COMP%]{margin-top:14px;display:grid;grid-template-columns:120px 1fr;gap:14px;align-items:center}.member-assistant-line-chart[_ngcontent-%COMP%]{margin-top:14px}.member-assistant-line-chart[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{width:100%;height:170px;overflow:visible;border-left:1px solid rgba(0,0,0,.15);border-bottom:1px solid rgba(0,0,0,.15)}.member-assistant-line-chart[_ngcontent-%COMP%]   polyline[_ngcontent-%COMP%]{fill:none;stroke:#8b0e04;stroke-width:2;vector-effect:non-scaling-stroke}.member-assistant-line-labels[_ngcontent-%COMP%]{display:flex;gap:8px;overflow-x:auto;margin-top:7px;color:#0000009e;font-size:11px}.member-assistant-line-labels[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{min-width:70px;display:grid}.member-assistant-pie[_ngcontent-%COMP%]{width:120px;height:120px;border-radius:50%;border:1px solid rgba(0,0,0,.08)}.member-assistant-pie-legend[_ngcontent-%COMP%]{display:grid;gap:7px}.member-assistant-pie-legend-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:10px 1fr auto;gap:7px;align-items:center;font-size:12px}.member-assistant-pie-legend-row[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{width:10px;height:10px;border-radius:50%}.member-assistant-report-btn[_ngcontent-%COMP%]{margin-top:12px}.member-assistant-empty[_ngcontent-%COMP%]{margin-top:10px;color:#00000094}.member-assistant-composer[_ngcontent-%COMP%]{margin:0 18px;padding:10px 0 8px;display:grid;grid-template-columns:1fr 42px;gap:8px;align-items:end}.member-assistant-composer[_ngcontent-%COMP%]   textarea[_ngcontent-%COMP%]{min-height:48px;max-height:120px;resize:vertical;padding:10px 12px;border:1px solid rgba(139,14,4,.24);border-radius:8px;font:inherit}.member-assistant-composer[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{width:42px;height:42px;border:0;border-radius:50%;background:#8b0e04;color:#fff;cursor:pointer}.member-assistant-composer[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:disabled{opacity:.48;cursor:default}.member-assistant-disclaimer[_ngcontent-%COMP%]{margin:0;padding:0 18px 12px;color:#0000008c;text-align:center;font-size:12px}@media (max-width: 900px){.member-assistant-drawer[_ngcontent-%COMP%]{top:60px;width:100vw;min-width:0}}
21#age-filter-name[_ngcontent-%COMP%], #gender-filter-name[_ngcontent-%COMP%], #groups-filter-name[_ngcontent-%COMP%]{display:flex}@media screen and (max-width: 900px){.vertical-stack[_ngcontent-%COMP%]{flex-direction:column}.mobile-vscroll[_ngcontent-%COMP%]{overflow-y:scroll}}@media screen and (max-width: 575px){.left-column[_ngcontent-%COMP%], .right-column[_ngcontent-%COMP%]{padding:0}.mobile-stack[_ngcontent-%COMP%]{max-height:unset}}table[_ngcontent-%COMP%]{width:100%;min-width:271px}th.mat-mdc-sort-header-sorted[_ngcontent-%COMP%]{color:#000}.table-header[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;margin-top:10px;flex-wrap:wrap;padding:0 30px;width:calc(100% - 60px)}.header-element[_ngcontent-%COMP%]{margin-right:10px}.no-trans[_ngcontent-%COMP%]{margin-top:20px;margin-bottom:20px}.hist-table[_ngcontent-%COMP%]{width:calc(100% - 40px);overflow-x:auto;padding:20px}.elements-group[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap}.sessions-header-tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{font-weight:700}header[_ngcontent-%COMP%]{width:100%;height:44px;background-color:#fff;box-shadow:0 2px 1px -1px #0003,0 1px 1px #00000024,0 1px 3px #0000001f;z-index:9999}.filter-column[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100vh;padding:10px;background:#f1e9e2;backdrop-filter:blur(10px)}.mat-elevation-z2[_ngcontent-%COMP%]{border-radius:999px;border:1px solid rgba(176,73,47,.3);background:#fff;color:#8a402d;margin:10px;padding:4px 10px;transform:scale(.9)}.mat-elevation-z8[_ngcontent-%COMP%]{margin-top:10px;border:1px solid rgb(212,212,212);height:auto;border-radius:18px;background:#faf4ef;box-shadow:0 0 10px #c2c2c2dd}  .custom-dropdown{border-radius:18px;border:2px solid rgba(176,73,47,.3)}.standard-btn[_ngcontent-%COMP%]{border-radius:999px;border:1px solid rgba(176,73,47,.3);background:#fff;color:#8a402d;padding:6px 11px}#header-body[_ngcontent-%COMP%], #footer-body[_ngcontent-%COMP%]{max-width:1200px;width:100%;position:relative;margin:auto;height:100%;display:flex;justify-content:space-between;align-items:center}#footer-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;color:#cacaca;justify-content:center;align-items:center;text-align:center;height:fit-content}#footer-body[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{padding:7px}.logoImage[_ngcontent-%COMP%]{background-image:url("./dist/v20260921162853/media/logo_transparent-MAG2LL24.png");background-position:center;background-size:contain;background-repeat:no-repeat;height:80%;min-width:300px;cursor:pointer}.log-in-block[_ngcontent-%COMP%]{display:flex;margin-right:10px;height:100%}.log-in-block.block-column[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-right:0;height:auto}.log-in-block[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{padding:0 25px!important;font-size:20px;height:100%!important;border-radius:0!important}.log-in-block.block-column[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{margin:0;padding:30px 70px!important;height:auto!important;font-size:20px;border-radius:0!important}.log-in-block[_ngcontent-%COMP%]   .mat-mdc-button[_ngcontent-%COMP%]:hover{color:#b9a646}.log-in-block[_ngcontent-%COMP%]   .mat-mdc-unelevated-button[_ngcontent-%COMP%]:hover{background-color:#8b0e04}.mat-mdc-tab-label-content[_ngcontent-%COMP%]{font-size:20px!important}.mat-mdc-tab-header[_ngcontent-%COMP%], .mat-mdc-tab-label[_ngcontent-%COMP%]{height:44px!important;color:#000!important;background-color:#fff!important}.content-div[_ngcontent-%COMP%]{min-height:100vh;padding:5px 20px 20px;background:radial-gradient(circle at 12% 12%,rgba(199,122,82,.24),transparent 42%),radial-gradient(circle at 88% 88%,rgba(74,112,145,.16),transparent 48%),linear-gradient(160deg,#ece4dd,#f6f0ea 54%,#e8edf2)}.menu-form-wrapper[_ngcontent-%COMP%]   .mat-mdc-menu-content[_ngcontent-%COMP%]:not(:empty){padding:0;border-radius:18px}.menu-form-wrapper[_ngcontent-%COMP%]   .menu-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:24px 24px 10px;border-radius:18px}.content-div[_ngcontent-%COMP%]{min-height:100vh;padding:5px 20px 20px}.menu-form[_ngcontent-%COMP%]{margin-top:10px}.menu-form[_ngcontent-%COMP%]   mat-form-field[_ngcontent-%COMP%]{margin-right:10px}.progress[_ngcontent-%COMP%]{width:40px;height:40px;position:relative;display:flex;align-items:center;justify-content:center}.progress[_ngcontent-%COMP%]   mat-spinner[_ngcontent-%COMP%]{width:100%!important;height:100%!important}.progress[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{width:100%!important;height:100%!important}#mobile-member-table[_ngcontent-%COMP%], #sm-mobile-contribution-table[_ngcontent-%COMP%]{display:none}@media screen and (max-width: 750px){#desk-member-table[_ngcontent-%COMP%]{width:100%;display:none}#mobile-member-table[_ngcontent-%COMP%]{display:block}}@media screen and (max-width: 550px){#mobile-member-table[_ngcontent-%COMP%]{display:none}#sm-mobile-contribution-table[_ngcontent-%COMP%]{display:block;margin-top:10px}}#years-end-report[_ngcontent-%COMP%]{position:absolute;top:0;right:0;width:60px;height:50px;background-color:#8b0e04;border-top-left-radius:25px;border-bottom-left-radius:25px;transition:ease-in-out;transition-duration:.7s;z-index:9}.years-end-btn[_ngcontent-%COMP%]{width:51px;height:50px;border-top-left-radius:25px;border-bottom-left-radius:25px;position:absolute;
21left:0;overflow:hidden;color:beige;font-size:.7rem!important;padding-left:10px;padding-top:5px;text-align:center;cursor:pointer;z-index:9;line-height:1rem!important}#years-report-btn[_ngcontent-%COMP%]{display:none;position:absolute;right:0;overflow:hidden;color:#fff;font-size:smaller;text-align:center;cursor:pointer;z-index:9}.yrs-btn[_ngcontent-%COMP%]{display:inline-block;margin:10px;background:#fff;padding:5px;border-radius:999px;border:#ffffff 3px solid;color:#8b0e04;cursor:pointer;z-index:9}.drop-zone[_ngcontent-%COMP%]{cursor:pointer}.drop-zone[_ngcontent-%COMP%]:hover{background-color:#8b0d0469}']})}}return t})(),xd=(()=>{class t{constructor(e,n){this.dialogRef=e,this.data=n,this.availableGroupOrder=["Sacrament related","Contacts","Transactions","Other"],this.selectedOptions=[],this.availableOptions=[],this.availableSearch="",this.labelMap={},this.lockedTrailingHeaders=[],this.defaultHeaders=[],this.groupExpanded={};let i=Array.isArray(this.data?.selected)?this.data.selected:[],a=Array.isArray(this.data?.options)?this.data.options:[];this.labelMap=this.data?.labels||{},this.lockedTrailingHeaders=Array.isArray(this.data?.lockedTrailingHeaders)?this.data.lockedTrailingHeaders:[],this.defaultHeaders=Array.isArray(this.data?.defaultHeaders)?this.data.defaultHeaders:[],this.availableGroupOrder.forEach(d=>this.groupExpanded[d]=!0),this.rebuildOptions(i.length?i:a)}formatLabel(e){return this.labelMap[e]?this.labelMap[e]:e.replace(/([a-z])([A-Z])/g,"$1 $2")}get nonLockedSelectedOptions(){let e=new Set(this.lockedTrailingHeaders);return this.selectedOptions.filter(n=>!e.has(n.key))}get lockedSelectedOptions(){let e={};return this.selectedOptions.forEach(n=>e[n.key]=n),this.lockedTrailingHeaders.filter(n=>!!e[n]).map(n=>e[n])}get filteredAvailableOptions(){let e=(this.availableSearch||"").toLowerCase().trim();return e?this.availableOptions.filter(n=>n.label.toLowerCase().includes(e)||n.key.toLowerCase().includes(e)):this.availableOptions}get groupedAvailableOptions(){let e={};return this.availableGroupOrder.forEach(n=>{e[n]={title:n,options:[]}}),this.filteredAvailableOptions.forEach(n=>{let i=this.getAvailableCategory(n.key);e[i]||(e[i]={title:i,options:[]}),e[i].options.push(n)}),this.availableGroupOrder.map(n=>e[n]).filter(n=>n&&n.options.length>0)}isGroupExpanded(e){return this.groupExpanded[e]===void 0?!0:this.groupExpanded[e]}toggleGroup(e){this.groupExpanded[e]=!this.isGroupExpanded(e)}getAvailableCategory(e){let n=["Baptism","Reconciliation","Communion","Confirmation","Marriage","Funeral","DODRegistry","DateOfDeath","Canonical","Celebrant"],i=["Email","Phone","Address","City","State","Zip","DisplayName","FirstName","LastName","MiddleName","MaidenName","FamilyRole","Gender","DOB","ChildNames"],a=["YTD","PATD","Envelope","Contribution","Payment"];return n.some(d=>e.includes(d))?"Sacrament related":i.some(d=>e.includes(d))?"Contacts":a.some(d=>e.includes(d))?"Transactions":"Other"}selectAll(){this.availableOptions.length!==0&&(this.availableOptions.forEach(e=>e.selected=!0),this.selectedOptions=[...this.selectedOptions,...this.availableOptions],this.availableOptions=[])}resetToDefault(){let e=this.defaultHeaders.length?this.defaultHeaders:[];this.rebuildOptions(e)}moveToSelected(e){e.selected=!0,this.availableOptions=this.availableOptions.filter(n=>n.key!==e.key),this.selectedOptions=[...this.selectedOptions,e]}moveToAvailable(e){this.lockedTrailingHeaders.includes(e.key)||(e.selected=!1,this.selectedOptions=this.selectedOptions.filter(n=>n.key!==e.key),this.availableOptions=[...this.availableOptions,e])}drop(e){if(e.previousIndex===e.currentIndex)return;let n=[...this.nonLockedSelectedOptions];It(n,e.previousIndex,e.currentIndex),this.selectedOptions=[...n,...this.lockedSelectedOptions]}cancel(){this.dialogRef.close()}save(){let e=[...this.nonLockedSelectedOptions.map(n=>n.key),...this.lockedTrailingHeaders];this.dialogRef.close(e)}rebuildOptions(e){let n=Array.isArray(this.data?.options)?this.data.options:[],i=new Set(this.lockedTrailingHeaders),a=new Set(e),c=(e.length?[...e.filter(g=>n.includes(g)),...n.filter(g=>!a.has(g))]:n).map(g=>({key:g,label:this.formatLabel(g),selected:a.has(g)})),p=c.filter(g=>g.selected&&!i.has(g.key)),h=this.lockedTrailingHeaders.map(g=>c.find(x=>x.key===g)).filter(g=>!!g).map(g=>L(k({},g),{selected:!0}));this.selectedOptions=[...p,...h],this.availableOptions=c.filter(g=>!g.selected&&!i.has(g.key))}static{this.\u0275fac=function(n){return new(n||t)(N(ve),N(Se))}}static{this.\u0275cmp=me({type:t,selectors:[["member-table-header-dialog"]],standalone:!1,decls:33,vars:8,consts:[["mat-dialog-title",""],[2,"margin-bottom","10px","font-size","0.9rem"],[2,"display","flex","flex-direction","column","gap","16px"],[1,"mat-elevation-z2","p-4",2,"border-radius","18px"],[2,"font-weight","600","margin-bottom","6px"],["cdkDropList","",2,"display","flex","flex-direction","column","gap","6px",3,"cdkDropListDropped"],["cdkDrag","","style","display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px;",4,"ngFor","ngForOf"],["style","display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; opacity: 0.85;",4,"ngFor","ngForOf"],["style","font-size: 0.9rem; color: #666;",4,"ngIf"],["appearance","fill",2,"width","100%","max-width","420px"],["matInput","","placeholder","Type to filter",3,"ngModelChange","ngModel"],[2,"display","flex","flex-direction","column","gap","12px"],[4,"ngFor","ngForOf"],["align","end",2,"display","flex","gap","8px","flex-wrap","wrap"],["mat-stroked-button","","type","button",2,"border-radius","999px","border","1p
21x solid rgba(176, 73, 47, 0.3)","color","#8a402d",3,"click"],[2,"flex","1 1 auto"],["mat-button","","type","button",2,"border-radius","999px","border","1px solid rgba(176, 73, 47, 0.3)","color","#8a402d",3,"click"],["mat-flat-button","","type","button",2,"border-radius","999px","border","1px solid rgba(176, 73, 47, 0.3)","color","#8a402d",3,"click"],["cdkDrag","",2,"display","flex","align-items","center","gap","8px","padding","6px 8px","border","1px solid #ddd","border-radius","6px"],["cdkDragHandle","",2,"cursor","grab","color","#8b0e04"],[3,"change","checked"],[2,"display","flex","align-items","center","gap","8px","padding","6px 8px","border","1px solid #ddd","border-radius","6px","opacity","0.85"],[2,"color","#8b0e04"],[3,"checked","disabled"],[2,"font-size","0.9rem","color","#666"],[2,"font-weight","600","margin-bottom","6px","color","#8b0e04","display","flex","align-items","center","gap","6px","cursor","pointer",3,"click"],[2,"font-size","20px","width","20px","height","20px"],["style","display: flex; flex-direction: column; gap: 6px;",4,"ngIf"],[2,"display","flex","flex-direction","column","gap","6px"],["style","display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px dashed #ddd; border-radius: 6px;",4,"ngFor","ngForOf"],[2,"display","flex","align-items","center","gap","8px","padding","6px 8px","border","1px dashed #ddd","border-radius","6px"]],template:function(n,i){n&1&&(r(0,"h2",0),l(1,"Edit Table Columns"),o(),r(2,"mat-dialog-content")(3,"div",1),l(4," Selected columns are grouped at the top. Drag selected rows to reorder. "),o(),r(5,"div",2)(6,"div",3)(7,"div",4),l(8),o(),r(9,"div",5),S("cdkDropListDropped",function(d){return i.drop(d)}),b(10,Xl,5,2,"div",6)(11,Zl,5,3,"div",7)(12,ed,2,0,"div",8),o()(),r(13,"div",3)(14,"div",4),l(15),o(),r(16,"mat-form-field",9)(17,"mat-label"),l(18,"Search available columns"),o(),r(19,"input",10),F("ngModelChange",function(d){return R(i.availableSearch,d)||(i.availableSearch=d),d}),o()(),r(20,"div",11),b(21,nd,7,4,"div",12)(22,ad,2,0,"div",8),o()()()(),r(23,"mat-dialog-actions",13)(24,"button",14),S("click",function(){return i.selectAll()}),l(25,"Select All"),o(),r(26,"button",14),S("click",function(){return i.resetToDefault()}),l(27,"Reset to Default"),o(),E(28,"span",15),r(29,"button",16),S("click",function(){return i.cancel()}),l(30,"Cancel"),o(),r(31,"button",17),S("click",function(){return i.save()}),l(32,"Save"),o()()),n&2&&(m(8),f("Selected (",i.selectedOptions.length,")"),m(2),u("ngForOf",i.nonLockedSelectedOptions),m(),u("ngForOf",i.lockedSelectedOptions),m(),u("ngIf",i.selectedOptions.length===0),m(3),f("Available (",i.availableOptions.length,")"),m(4),I("ngModel",i.availableSearch),m(2),u("ngForOf",i.groupedAvailableOptions),m(),u("ngIf",i.groupedAvailableOptions.length===0))},dependencies:[le,de,he,be,Ee,Te,Pe,ht,ut,bt,Fe,ce,_e,pe,kt,Ft,Rt],encapsulation:2})}}return t})(),Cd=(()=>{class t{constructor(e,n,i,a,d,c,p){this.dialogRef=e,this.data=n,this.router=i,this.appData=a,this.mainService=d,this.dialog=c,this.snackBar=p,this.tableheaders=[],this.excelHeader=[],this.headers=[],this.sheetData=[],this.sheetDataSource=new ge,this.keysArray=[],this.CTID="",this.OrgID="",this.UC="",this.tableLoading=!0,this.fileName="",this.indexsToPutInFront=[],this.searchKey="",this.bSheetData=[],this.data=n}trackByFn(e,n){return e}ngOnInit(){console.log("MappingDialog data: ",this.data),this.tableheaders=["Validation",...this.data.data.headers],this.headers=this.data.data.headers,this.bSheetData=this.data.data.sheetData,this.excelHeader=this.data.data.excelHeader,console.log("this.data.data.sheetData[0][84]",this.data.data.sheetData[0][84]);let e=this.data.data.sheetData;e.forEach((n,i)=>{n.x=i+1}),this.sheetData=e,this.CTID=this.data.data.CTID,this.fileName=this.data.data.fileName,this.OrgID=this.data.data.OrgID,this.UC=this.data.data.UC,this.keysArray=this.data.data.keysArray,this.validateDataTypes(this.sheetData),this.validateDataTypes(this.bSheetData),this.tableLoading=!1,this.loadDataSource()}cleanDate(e){if(e==null)return e;if(!isNaN(e)&&Number(e)>59&&Number(e)<6e4){let a=new Date(1900,0,1),d=new Date(a.getTime()+(Number(e)-2)*24*60*60*1e3);return{date:(0,ie.default)(d).format("MM/DD/YYYY"),error:!1}}let n=["MM/DD/YYYY","M/D/YYYY","MM-DD-YYYY","M-D-YYYY","YYYY-MM-DD","YYYY/MM/DD","MM/DD/YYYY hh:mm:ss A","M/D/YYYY hh:mm:ss A","MM-DD-YYYY hh:mm:ss A","M-D-YYYY hh:mm:ss A","YYYY-MM-DD hh:mm:ss A","YYYY/MM/DD hh:mm:ss A"],i=(0,ie.default)(e.toString().trim(),n,!0);return i.isValid()?{date:i.format("MM/DD/YYYY"),error:!1}:{date:e,error:!0}}validateDataTypes(e){for(var n=0;n<this.keysArray.length;n++){let a=this.keysArray[n];for(var i=1;i<e.length;i++){let d=e[i];if(d[a.name])if(a.type=="date"){let c=d[a.name]==34838;c&&console.log("validator.name",a.name),c&&console.log("data[validator.name]",d[a.name]);let p=this.cleanDate(d[a.name]);c&&console.log("cleanDate result: ",p),p.error?(d[a.name+"_error"]=!0,this.indexsToPutInFront.push(i)):(d[a.name+"_error"]=!1,this.sheetData[i][a.name]=p.date),c&&console.log("data[validator.name]",d[a.name])}else if(a.type=="phone")if((d[a.name]?.toString().replace(/\D/g,"")).length<10)d[a.name+"_error"]=!0,this.indexsToPutInFront.push(i);else{let p=d[a.name]?.toString().replace(/\D/g,"");p.length===10?(d[a.name+"_error"]=!1,this.sheetData[i][a.name]=p):(d[a.name+"_error"]=!0,this.indexsToPutInFront.push(i))}else if(a.type=="email"){let c=d[a.name];c?.toString().indexOf("@")>-1&&c?.toString().indexOf(".")>-1?d[a.name+"_error"]=!1:(d[a.name+"_error"]=!0,this.indexsToPutInFront.push(i))}else a.type=="text"&&(d[a.name+"_error"]=!1);else a.required?(d[a.name+"_error"]=!0,this.indexsToPutInFront.push(i)):d[a.name+"_error"]=!1}}}sortData(e){if(e=="errors"){let n=[],i=[];this.validateDataTypes(this.sheetData),this.sheetData.forEach((a,d)=>{this.indexsToPutInFront.includes(d)?n.push(a):i.push(a)}),this.sheetData=[...n,...i],this.loadDataSource()}}loadDataSource(){setTimeout(()=>{this.sheetDataSource.paginator=this.sessionPaginator,this.sheetDataSource.sort=this.sessionSort,this.sheetDataSource.data=this.sheetData},100)}searchThroughtData(){this.searchKey?this.sheetData=this.bSheetData.filter(e=>Object.values(e).some(n=>n.toString().toLowerCase().includes(this.searchKey.toLowerCase()))):this.sheetData=this.data.data.sheetData,this.loadDataSource()}resetData(){this.sheetData=this.bSheetData,this.searchKey="",this.loadDataSource()}cancelMapping(){let e=this.dialog.open(ee,{data:{data:"<h4>Are you sure you want to cancel mapping?</h4>",type:"generalConfirm"}}).afterClosed().subscribe(n=>{n&&this.dialogRef.close(!1)})}confirmMapping(){let e=this.sheetData.filter(n=>this.checkErr(n));if(e.length>0){console.log("data",e);let n=this.dialog.open(ee,{data:{data:"<h4>There are errors in the sheet. Do you want to continue?</h4>",type:"generalConfirm"}}).afterClosed().subscribe(i=>{i&&this.exportToExcel()})}else this.exportToExcel()}trackbyFn(e,n){return e}exportToExcel(){let e=this.sheetData,i=this.fileName.replaceAll(".","_")+".xlsx";if(!e||e.length===0){console.warn("No data available to export.");return}e.forEach(h=>{for(let g in h)(g.indexOf("_error")>-1||g=="x")&&delete h[g]});let a=Y.json_to_sheet(e),d=Y.book_new();Y.book_append_sheet(d,a,"Sheet1");let c=We(d,{bookType:"xlsx",type:"array"}
21),p=new Blob([c],{type:"application/octet-stream"});(0,se.saveAs)(p,i),this.dialogRef.close(!0)}checkErr(e){let n=!1;for(let i in e)i.indexOf("_error")>-1&&e[i]&&(n=!0);return n}mapValueChange(e,n,i,a){console.log("mapValueChange",n,i,d),n=e;for(var d=0;d<this.keysArray.length;d++){let c=this.keysArray[d],p=this.sheetData[a];if(p[c.name])if(c.type=="date"){let h=new Date(p[c.name]);h.toString().toLowerCase().indexOf("invalid")>-1?p[c.name+"_error"]=!0:(p[c.name+"_error"]=!1,p[c.name]=h.toLocaleDateString())}else if(c.type=="phone")if((p[c.name]?.toString().replace(/\D/g,"")).length<10)p[c.name+"_error"]=!0;else{let g=p[c.name]?.toString().replace(/\D/g,"");g.length===10?(p[c.name+"_error"]=!1,p[c.name]=g):p[c.name+"_error"]=!0}else if(c.type=="email"){let h=p[c.name];h?.toString().indexOf("@")>-1&&h?.toString().indexOf(".")>-1?p[c.name+"_error"]=!1:p[c.name+"_error"]=!0}else c.type=="text"&&(p[c.name+"_error"]=!1);else c.required?p[c.name+"_error"]=!0:p[c.name+"_error"]=!1}}close(){this.dialogRef.close()}openLink(e){e.preventDefault(),this.dialogRef.close()}static{this.\u0275fac=function(n){return new(n||t)(N(ve),N(Se),N(we),N(De),N(ae),N(Ae),N(Ie))}}static{this.\u0275cmp=me({type:t,selectors:[["mapping-table"]],viewQuery:function(n,i){if(n&1&&(z(rd,5,te),z(sd,5,Z)),n&2){let a;W(a=j())&&(i.sessionPaginator=a.first),W(a=j())&&(i.sessionSort=a.first)}},standalone:!1,decls:1,vars:1,consts:[["sessionSort",""],["sessionPaginator",""],["style"," height: 100vh;",4,"ngIf"],[2,"height","100vh"],[2,"display","flex","justify-content","space-between","flex-wrap","wrap","align-items","center","height","15vh","margin-top","25px"],[2,"display","flex","justify-content","space-around","align-items","center","height","15vh"],[2,"font-size","2.5rem","margin-right","15px"],["mat-raised-button","","color","primary",2,"margin-right","15px",3,"click"],[1,"form-group",2,"display","flex","flex-direction","row","align-items","center"],["type","text","id","searchKey","placeholder","Search...",1,"form-control",2,"width","200px","margin-right","10px",3,"ngModelChange","ngModel"],["mat-raised-button","","color","primary",2,"margin-right","35px",3,"click"],["mat-raised-button","","color","primary",2,"margin-right","20px",3,"click"],["mat-raised-button","","color","warn",3,"click"],[1,"mat-elevation-z4",2,"display","flex","flex-direction","column","height","80vh","overflow","auto","width","97vw","margin","auto"],["mat-table","","matSort","","matSortDirection","asc",1,"mat-elevation-z8",2,"margin","15px",3,"dataSource","trackBy","matSortActive"],["matColumnDef","Validation","sticky",""],["mat-header-cell","","style","border: 1px gray solid !important; color: white; background-color: #8b0e04;",4,"matHeaderCellDef"],["mat-cell","","style","border: 1px gray solid !important; color: white; background-color: #b9a646;",4,"matCellDef"],["style","min-width: 250px !important;",3,"matColumnDef",4,"ngFor","ngForOf"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"paginator",3,"length","pageSize","pageSizeOptions"],["mat-header-cell","",2,"border","1px gray solid !important","color","white","background-color","#8b0e04"],["mat-cell","",2,"border","1px gray solid !important","color","white","background-color","#b9a646"],[2,"display","flex","flex-direction","row"],[2,"font-weight","bold","margin-right","3px"],["style","color: #8b0e04;",4,"ngIf"],[2,"color","#8b0e04"],[2,"min-width","250px !important",3,"matColumnDef"],["mat-header-cell","","mat-sort-header","","sticky","","style","min-width: 250px !important; border: 1px gray solid !important; color: white; background-color: #8b0e04;",4,"matHeaderCellDef"],["mat-cell","","style","min-width: 250px !important;",4,"matCellDef"],["mat-header-cell","","mat-sort-header","","sticky","",2,"min-width","250px !important","border","1px gray solid !important","color","white","background-color","#8b0e04"],["mat-cell","",2,"min-width","250px !important"],["class","form-group","style","margin: 6px; display: flex; flex-direction: row; align-items: center;",4,"ngIf"],["class","form-group","style","margin: 6px; display: flex; flex-direction: row; align-items: center; border: 2px solid red;",4,"ngIf"],[1,"form-group",2,"margin","6px","display","flex","flex-direction","row","align-items","center"],["type","text","id","exampleInputText","placeholder","...",1,"form-control",3,"ngModelChange","ngModel"],[1,"form-group",2,"margin","6px","display","flex","flex-direction","row","align-items","center","border","2px solid red"],["mat-header-row",""],["mat-row",""]],template:function(n,i){n&1&&b(0,fd,33,12,"div",2),n&2&&u("ngIf",!i.tableLoading)},dependencies:[le,de,he,be,ce,_e,pe,Oe,Le,He,Ne,Ve,Ue,Be,$e,Ye,Ge,Z,ke,te],styles:[`.cdk-overlay-pane{max-height:100vh!important;border-radius:5px!important}
22`],encapsulation:2})}}return t})();var Md=[{path:"",component:si}],oi=ft.forChild(Md);var Lc=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=tt({type:t})}static{this.\u0275inj=Xe({providers:[ae,ue],imports:[at,oi,Xt,fe]})}}return t})();export{Lc as ParishMembersModule};

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.