PageSourceSearch

https://bomaenspire.ca/_next/static/chunks/pages/my-applications-c5b58b5c0b45ed7e.js

js bomaenspire.ca collected 2026-10-04 01:49:44 UTC 98,258 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1222],{112:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var i=a(37876);a(14232);var n=a(66438),l=a(12392);let o=(0,n.Ay)(e=>(0,i.jsx)(l.A,{focusVisibleClassName:".Mui-focusVisible",disableRipple:!0,...e}))(e=>{let{theme:t}=e;return{width:42,height:26,padding:0,"& .MuiSwitch-switchBase":{padding:0,margin:2,transitionDuration:"200ms","&.Mui-checked":{transform:"translateX(16px)",color:"#fff","& + .MuiSwitch-track":{backgroundColor:"#174992",opacity:1,border:0,...t.applyStyles("dark",{backgroundColor:"#2ECA45"})},"&.Mui-disabled + .MuiSwitch-track":{opacity:.5}},"&.Mui-focusVisible .MuiSwitch-thumb":{color:"#33cf4d",border:"6px solid #fff"},"&.Mui-disabled .MuiSwitch-thumb":{color:t.palette.grey[100],...t.applyStyles("dark",{color:t.palette.grey[600]})},"&.Mui-disabled + .MuiSwitch-track":{opacity:.7,...t.applyStyles("dark",{opacity:.3})}},"& .MuiSwitch-thumb":{boxSizing:"border-box",width:22,height:22},"& .MuiSwitch-track":{borderRadius:13,backgroundColor:"#E9E9EA",opacity:1,transition:t.transitions.create(["background-color"],{duration:300}),...t.applyStyles("dark",{backgroundColor:"#39393D"})}}})},2273:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/my-applications",function(){return a(90174)}])},16621:(e,t,a)=>{"use strict";a.d(t,{Gv:()=>y,dA:()=>h});var i=a(28888),n=a(37876),l=a(34823);a(14232);var o=a(89408);function r(){let e=(0,i._)(["\n display:flex;\n flex-direction:column;\n gap:1%;\n @media only screen and (min-width: 768px) {\n    flex-direction:row;\n }\n"]);return r=function(){return e},e}function c(){let e=(0,i._)(["\n display:flex;\n flex-direction:column;\n padding:1%;\n margin-left: 2%;\n margin-right: 2%;  \n"]);return c=function(){return e},e}function s(){let e=(0,i._)(["\nbackground-color:#F9FDFF;\ndisplay:flex;\nflex-direction:column;\nheight:100%;\noverflow-y:auto;\nbox-shadow: 2px 4px 20px rgba(19, 62, 115, 0.25);\nborder-radius: 10px;\npadding:20px;\n"]);return s=function(){return e},e}function d(){let e=(0,i._)(["\nbackground-color:#F9FDFF;\ndisplay:flex;\nflex-direction:column;\noverflow-y:hidden;\nbox-shadow: 2px 4px 20px rgba(19, 62, 115, 0.25);\nborder-radius: 10px;\npadding:20px;\nmargin-left: 10px;\nmargin-right: 10px;\n"]);return d=function(){return e},e}function p(){let e=(0,i._)(["\n display:flex;\n flex-direction:column;\n padding:1%;\n margin-left: 2%;\n margin-right: 2%; \n border:1px;\n"]);return p=function(){return e},e}function u(){let e=(0,i._)(["\n display:grid;\n border:1px solid "," ;\n margin:5px;\n padding:10px;\n border-radius:10px;\n"]);return u=function(){return e},e}function m(){let e=(0,i._)(["\n  display: grid;\n  margin: 5px;\n  padding: 10px;\n  border-radius: 10px;\n"]);return m=function(){return e},e}function x(){let e=(0,i._)(["\n display:flex;\n justify-content:flex-end;\n flex-direction:row;\n margin-top:1.2em;\n"]);return x=function(){return e},e}function f(){let e=(0,i._)(["\n display:flex;\n justify-content:center;\n flex-direction:row;\n font-size:1.4em;\n weight: 600;\n color: #001633;\n margin-bottom:20px;\n"]);return f=function(){return e},e}let h=l.A.div(r());l.A.div(c()),l.A.div(s()),l.A.div(d()),l.A.div(p()),l.A.div(u(),e=>(null==e?void 0:e.borderColor)||"#C2D1E3"),l.A.div(m()),l.A.div(x()),l.A.div(f());let y=e=>{let{children:t,loading:a=!1}=e;return(0,n.jsx)("div",{className:"flex grow flex-col mt-5 overflow-y-auto overflow-x-hidden",children:!0===a?(0,n.jsx)("div",{className:"flex flex-1 items-center justify-center flex-col",children:(0,n.jsx)(o.A,{})}):t})}},38110:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var i=a(37876);a(14232);var n=a(5135),l=a(11187);let o=e=>{let{children:t,index:a=0,hover:o=!0,className:r,style:c}=e,s=(0,n.I)();return(0,i.jsx)(l.P.div,{className:r,initial:{opacity:0,y:8*!s},animate:{opacity:1,y:0},transition:{duration:s?.1:.24,ease:"easeOut",delay:s?0:.04*a},...o&&!s?{whileHover:{y:-2,boxShadow:"0 8px 24px rgba(23, 73, 146, 0.12)",transition:{duration:.18,ease:"easeOut"}}}:{},style:{...c,borderRadius:12},children:t})}},55710:(e,t,a)=>{"use strict";a.d(t,{A:()=>p});var i=a(28888),n=a(37876),l=a(76744),o=a(50723),r=a(34823),c=a(73665),s=a(82777);function d(){let e=(0,i._)(["\nbackground-color:white;\ndisplay:flex;\nflex-direction:column;\nbackground: #FFFFFF;\nbox-shadow: 2px 4px 20px rgba(19, 62, 115, 0.25);\nborder-radius: 10px;\npadding:20px;\nheight: 100%;\noverflow: hidden\n"]);return d=function(){return e},e}r.A.div(d());let p=e=>{let{children:t,title:a,breadcrumbs:i,secondaryText:r,secondaryTextColor:d}=e,p=(0,c.A)(),u=i&&i.length>0,m=u?"h-[calc(100%-250px)]":"h-[calc(100%-185px)]";return(0,n.jsxs)("div",{className:"px-[0.5rem] h-full sm:px-10 flex flex-col gap-4",children:[u&&(0,n.jsx)(l.m,{paths:i}),(0,n.jsxs)("div",{className:"flex flex-col items-baseline justify-between px-2 lg:flex-row gap-1",children:[(0,n.jsx)(o.sT,{children:a}),(0,n.jsx)(s.A,{variant:"button3",fontWeight:"normal",className:"text-[".concat(d||"#6F829A","]"),children:r})]}),(0,n.jsx)("div",{className:"flex flex-col shadow-lg shadow-[#133e7340] rounded-[10px] p-[20px] ".concat(m," md:h-full overflow-auto"),style:{backgroundColor:p.palette.background.default},children:t})]})}},83121:(e,t,a)=>{"use strict";a.d(t,{A:()=>p});var i=a(37876);a(14232);var n=a(66438),l=a(92228),o=a(92165),r=a(13384),c=a(82777),s=a(34846);let d=(0,n.Ay)(l.A)(()=>({color:"#8DC63F",borderColor:"#8DC63F",backgroundColor:"#FFF !important",borderRadius:"10px","&:hover":{backgroundColor:"#F4F9EC !important"},"&.MuiButton-root":{borderColor:"#8DC63F",color:"#8DC63F"}
1,"&:focus-visible":{outline:"2px solid #27AAE1",outlineOffset:"2px"}}));function p(e){let{t}=(0,s.Bd)();if("true"===e.filtersApplied){var a;return(0,i.jsx)(o.A,{spacing:2,direction:"row",className:e.className,children:(0,i.jsx)(d,{variant:"outlined",disabled:e.disabled,size:"medium",startIcon:(0,i.jsx)(r.A,{}),fullWidth:!0,onClick:e.onClick,"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-label":e["aria-label"],children:(0,i.jsx)(c.A,{variant:"button3",color:"backgroundVariants.green",children:"".concat(t("buttons.filters")," (").concat(null!=(a=e.count)?a:0,")")})})})}return(0,i.jsx)(o.A,{spacing:2,direction:"row",className:e.className,children:(0,i.jsx)(l.A,{disabled:e.disabled,variant:"contained",size:"medium",startIcon:(0,i.jsx)(r.A,{}),fullWidth:!0,onClick:e.onClick,"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-label":e["aria-label"],sx:{minWidth:"157px",color:"#fff",backgroundColor:"#8DC63F",borderRadius:"10px","&:hover":{backgroundColor:"#7BAF36"},"&:focus-visible":{outline:"2px solid #27AAE1",outlineOffset:"2px"}},children:(0,i.jsx)(c.A,{variant:"button3",color:"primary.contrastText",children:t("buttons.filters")})})})}},83673:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var i=a(37876),n=a(14232),l=a(60774);let o=function(e){let{id:t,children:a}=e,[o,r]=(0,n.useState)(!1),c=()=>{try{l.W.getPermissions().then(e=>{localStorage.setItem("permissions",JSON.stringify(e.result))})}catch(e){console.error("error in permission component...",e)}};return((0,n.useEffect)(()=>{var e,a,i,n,l;let o=localStorage.getItem("permissions"),s=null==(a=JSON.parse(localStorage.getItem("accounts")))||null==(e=a.filter(e=>e.accountId===localStorage.getItem("accountShortCode")))?void 0:e[0],d=null==s?void 0:s.participantType;if(o){let e=null==(i=JSON.parse(o)[localStorage.getItem("role")])?void 0:i[d],a=null==e?void 0:e[t];if(void 0===a&&e&&"object"==typeof e)for(let i of Object.values(e)){if(i&&"object"==typeof i){for(let e of Object.values(i))if(e&&"object"==typeof e&&void 0!==e[t]){a=null!=(l=null==(n=e[t])?void 0:n.permission)?l:e[t];break}}if(void 0!==a)break}"object"==typeof a&&null!==a&&(a=a.permission),r(!!a)}else c()},[]),(0,n.useEffect)(()=>{c()},[localStorage.getItem("role")]),o)?(0,i.jsx)(i.Fragment,{children:a}):(0,i.jsx)(i.Fragment,{})}},90174:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>eW});var i=a(37876),n=a(55710),l=a(73665),o=a(53318),r=a(92228),c=a(76068),s=a(96524),d=a(44808),p=a(74912),u=a(69984),m=a(74509),x=a(42008),f=a(82777),h=a(86063),y=a(28332),v=a(56486),g=a(1959),A=a(26675),b=a(65566),j=a(14476),C=a(60591),N=a(50090),P=a(77328),w=a.n(P),S=a(89099),k=a(14232),D=a(34846),F=a(62974),T=a(71834),I=a(3417),B=a(69585),M=a(80686),R=a(85752),O=a(54587),E=a.n(O);let _={src:"/_next/static/media/Payee.5eeb2dc8.svg",height:21,width:37,blurWidth:0,blurHeight:0},L=e=>{let{id:t,appId:a,title:n,applicationStatus:o,projectContactName:d,date:p,time:u,address:m,propertyId:x,fundingSupport:h,grossFloorArea:y,units:v,status:g,buttonText:A,onButtonClick:b,appStage:j,tier:C,payee:N,recomendedFundingAmount:P}=e,w=(0,S.useRouter)(),F=(0,l.A)(),{t:T}=(0,D.Bd)(),O=localStorage.getItem("accountId"),[L,W]=(0,k.useState)(null),V=O===(null==N?void 0:N.accountId);return(0,i.jsxs)("div",{className:"w-full md:w-[380px] min-h-[420px] max-h-[500px] \n             border border-[".concat(F.palette.borderColors.primary,"] rounded-[10px] flex flex-col\n             bg-[linear-gradient(0deg,_#FFFFFF,_#FFFFFF),_rgba(27,157,240,0.15)]"),children:[(0,i.jsxs)("div",{className:"bg-[".concat(F.palette.textColors.quaternary,"] rounded-t-[10px] py-3 text-center relative"),children:[V&&(0,i.jsx)(I.A,{title:T("payee"),placement:"top",slotProps:{tooltip:{className:"text-[14px] px-3 py-2"}},children:(0,i.jsx)(E(),{src:_,alt:"Payee",className:"absolute top-[15px] left-[10px]"})}),(0,i.jsxs)(f.A,{variant:"mainH5Bold",color:"primary.contrastText",children:["#",a]})]}),(0,i.jsxs)("div",{style:{background:"Post-Project"===j&&"Application Submitted"===o?"rgba(190, 228, 227, 0.25)":({"Application Draft":"rgba(249, 221, 200, 0.75)","Application Waitlisted":"rgba(190, 228, 227, 0.25)","Application Draft Submitted":"rgba(190, 228, 227, 0.25)","Application Draft Under Review":"rgba(190, 228, 227, 0.25)","Application Information Requested":"rgba(255, 181, 0, 0.25)","Application Rejected":"rgba(186, 19, 26, 0.25)","Ineligible For Funding":"rgba(186, 19, 26, 0.25)","Application Draft Approved":"rgba(249, 221, 200, 0.75)","Application Submitted":"rgba(255, 181, 0, 0.25)","Application Under Review":"rgba(190, 228, 227, 0.25)","Funding Recommended":"rgba(190, 228, 227, 0.25)","Payee Details Pending":"rgba(249, 221, 200, 0.75)","Payee Details Submitted":"rgba(190, 228, 227, 0.25)","Payee Details In Review":"rgba(190, 228, 227, 0.25)","Revise Payee Details":"rgba(255, 181, 0, 0.25)","Payee Details Approved":"rgba(190, 228, 227, 0.25)","Funding Claim Approved":"rgba(0, 150, 57, 0.25)","Funding Claim Payment Completed":"rgba(0, 150, 57, 0.25)","Claim Payment Reconciled":"rgba(0, 150, 57, 0.25)","Funding Claim Approval Pending":"rgba(190, 228, 227, 0.25)","Funding Claim Payment in Progress":"rgba(0, 150, 57, 0.25)"})[o]||"#fff"},className:"flex flex-col gap-[15px] flex-grow pb-2",children:[(0,i.jsx)("div",{style:{backgroundColor:{"Application Draft":"#935306","Application Waitlisted":"","Application Draft Submitted":"#174992","Application Draft Under Review":"","Application Information Requested":"#ED901F","Application Rejected":"#EC3838","Application Draft Approved":"#935306","Application Submitted":"#174992","Funding Recommended":"#009639","Payee Details Pending":"#ED901F","Payee Details Submitted":"#174992","Payee Details In Review":"#174992","Revise Payee Details":"#935306","Payee Details Approved":"#009639"}[o]||"#174992"},className:"w-[169px] h-[39px] rounded-br-[10px] px-2 text-center flex items-center justify-center",children:(0,i.jsx)(f.A,{variant:"mainBody4",color:"primary.contrastText",children:o})}),(0,i.jsxs)("div",{className:"w-full px-4 flex flex-col gap-[15px]",children:[(0,i.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,i.jsx)(f.A,{variant:"mainH5",color:"Pending Project Stream"===n?"grayColors.darker":"textColors.tertiary",title:n,className:"line-clamp-1 text-ellipsis overflow-hidden",children:n}),(0,i.jsxs)(f.A,{variant:"mainBody3",color:"grayColors.darker",className:"capitalize",children:[d," | ",p,", ",u]})]}),(0,i.jsx)(f.A,{variant:"mainBody2",color:"textColors.tertiary",title:m,className:"line-clamp-1 text-ellipsis overflow-hidden",children:m}),(0,i.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,i.jsxs)(f.A,{variant:"mainBody4Medium",color:"grayColors.darker",children:[T("myApplications.cardKeys.propertyId"),":"]}),(0,i.jsx)(f.A,{variant:"button3",color:"textColors.quaternary",children:x})]}),(0,i.jsxs)("div",{className:"flex flex-col",children:[(0,i.jsxs)(f.A,{variant:"mainBody4Medium",color:"grayColors.darker",children:[T("Payment"===j?"myApplications.cardKeys.recomendedFundingAmount":"myApplications.cardKeys.fundingSupport"),":"]}),(0,i.jsx)(f.A,{variant:"button3",color:"textColors.quaternary",children:"Payment"===j?R.W.currencyFormatterCAD(P):R.W.currencyFormatterCAD(h)})]}),(0,i.jsxs)("div",{className:"flex flex-col",children:[(0,i.jsxs)(f.A,{variant:"mainBody4Medium",color:"grayColors.darker",children:[T("myApplications.cardKeys.grossFloorArea"),":"]}),(0,i.jsxs)(f.A,{variant:"button3",color:"textColors.quaternary",children:[y&&!isNaN(Number(y))?"".concat(Number(y).toLocaleStr
1ing()):"N/A"," ",v," ",C?" - ".concat(C):""]})]}),(0,i.jsxs)("div",{className:"flex flex-row items-center justify-center gap-[5px] px-[5px] py-[3px] rounded-[5px] w-[62px] h-[26px]\n    ".concat("Active"===g?"bg-[#9CD4B133]":"bg-[#FCBEBE33]","\n  "),children:[(0,i.jsx)("div",{className:"w-[6px] h-[6px] rounded-full ".concat("Active"===g?"bg-[".concat(F.palette.success.main,"]"):"bg-[".concat(F.palette.error.main,"]"))}),(0,i.jsx)(f.A,{variant:"mainBody3",color:"Active"===g?"success.main":"error.main",className:"font-bold",children:g||"N/A"})]})]})]}),(0,i.jsxs)("div",{className:"w-full flex flex-row items-center p-[10px] gap-2",children:[(0,i.jsx)(r.A,{disabled:A===T("myApplications.buttonText.noActionNeeded"),variant:"contained",className:"h-[50px] rounded-[10px] w-full",onClick:b,sx:{textTransform:"uppercase",backgroundColor:A===T("myApplications.buttonText.viewApplication")?"":"#8DC63F","&:hover":{backgroundColor:A===T("myApplications.buttonText.viewApplication")?"":"#7AB535"},":disabled":{backgroundColor:A===T("myApplications.buttonText.noActionNeeded")||A===T("myApplications.buttonText.sharePayeeDetails")?F.palette.grayColors.medium:"",color:F.palette.blueVariants.primary}},children:A}),(0,i.jsxs)("div",{className:"w-[35px] h-[35px] bg-[".concat(F.palette.backgroundColor.main,"] rounded flex items-center justify-center"),children:[(0,i.jsx)(B.A,{onClick:e=>{W(e.currentTarget)},className:"w-full h-full",children:(0,i.jsx)(M.A,{className:"text-[".concat(F.palette.textColors.tertiary,"]")})}),(0,i.jsx)(c.A,{anchorEl:L,open:!!L,onClose:()=>{W(null)},children:(0,i.jsx)(s.A,{onClick:()=>{w.push("/my-applications/".concat(a))},children:(0,i.jsx)(f.A,{variant:"mainBody3",children:T("Payment"===j?"myApplications.buttonText.viewApplicationOptionPayments":"myApplications.buttonText.viewApplicationOption")})})})]})]})]})};var W=a(38110),V=a(16621),z=a(17457),U=a(83121),H=a(10927),q=a(60774),Y=a(69002),K=a(82851),J=a.n(K),X=a(89408),$=a(83673),G=a(88025),Z=a(11806),Q=a(112),ee=a(66438),et=a(75807);let ea=(0,ee.Ay)(A.A)(e=>{let{theme:t}=e;return{"& .MuiDialogContent-root":{padding:t.spacing(2)},"& .MuiDialogActions-root":{padding:t.spacing(1)},borderRadius:"100px"}});function ei(e){let{children:t,onClose:a,...n}=e;return(0,l.A)(),(0,i.jsx)(b.A,{sx:{m:0,pt:{sm:3,md:6},fontFamily:"Roboto",color:"#174992",fontWeight:800,fontSize:{sm:"20px",md:"24px"}},...n,children:t})}function en(e){let{children:t,title:a,onClose:n,show:l,actionComponent:o,maxWidth:r="md",showCloseIcon:c}=e,s=()=>{n()};return k.useEffect(()=>{},[l,r]),(0,i.jsxs)(ea,{onClose:s,"aria-labelledby":"customized-dialog-title",open:l,maxWidth:r,fullWidth:!0,children:[a&&(0,i.jsx)(ei,{id:"customized-dialog-title",onClose:s,children:(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsx)("div",{className:"w-[40px]"}),(0,i.jsx)(f.A,{variant:"mainH4",color:"textColors.meta",className:"flex-grow uppercase text-center",children:a}),c?(0,i.jsx)(B.A,{onClick:s,children:(0,i.jsx)(et.A,{})}):(0,i.jsx)("div",{className:"w-[40px]"})]})}),(0,i.jsx)(j.A,{className:"overflow-y-auto",children:t}),o?(0,i.jsx)("div",{className:"flex flex-row space-x-5 items-center justify-center md:justify-end mb-[40px] mr-[0px] md:mr-[40px]",children:o}):""]})}var el=a(19655);let eo=(0,ee.Ay)(A.A)(e=>{let{theme:t}=e;return{"& .MuiDialogContent-root":{padding:t.spacing(2)},"& .MuiDialogActions-root":{padding:t.spacing(1)},"& .MuiDialog-paper":{maxheight:"calc(100% - 48px)"},borderRadius:"100px"}});function er(e){let t=(0,l.A)(),{children:a,onClose:n,...o}=e;return(0,i.jsx)(b.A,{className:"m-0 font-['Roboto'] text-[".concat(t.palette.primary.contrastText,"] bg-[").concat(t.palette.primary.main,"] font-extrabold text-[20px] md:text-[24px]"),...o,children:a})}function ec(e){let{children:t,title:a,onClose:n,show:r,actionComponent:c,maxWidth:s="md",showCloseIcon:d}=e,p=(0,l.A)(),u=(0,o.A)(p.breakpoints.down(600)),m=()=>{n()};return k.useEffect(()=>{},[r,s]),(0,i.jsxs)(eo,{onClose:m,"aria-labelledby":"customized-dialog-title",open:r,maxWidth:s,fullWidth:!0,PaperProps:{style:{width:"100%",position:u?"fixed":"relative",bottom:0,borderRadius:u?"20px 20px 0 0":"20px",marginBottom:0}},children:[a&&(0,i.jsx)(er,{id:"customized-dialog-title",onClose:m,children:(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsx)("div",{style:{width:40}}),(0,i.jsx)(f.A,{variant:"mainH4",textTransform:"uppercase",textAlign:"center",sx:{flexGrow:1},children:a}),d?(0,i.jsx)(B.A,{onClick:m,children:(0,i.jsx)(et.A,{sx:{color:"white"}})}):(0,i.jsx)("div",{style:{width:40}})]})}),(0,i.jsx)(j.A,{sx:{overflowY:"auto"},children:t}),c?(0,i.jsx)("div",{className:"flex flex-row space-x-5 items-center justify-center mt-[10px] mb-[10px] md:mb-[20px] mr-[0px] md:mr-[40px]",children:c}):""]})}let es=e=>{var t,a,n;let{selectedApplication:o,payeeCheckedItems:c,handleTogglePayeeCheckboxList:s,handleProceedSharePayeeCheckList:d,PayeeTerms:p,showChecklistPayeeMod
1al:m,onClose:x}=e,{t:h}=(0,D.Bd)(),y=(0,l.A)(),g=c.length!==p.length;return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(ec,{title:h("myApplications.buttonText.sharePayeeDetails"),show:m,maxWidth:"lg",actionComponent:(0,i.jsx)("div",{children:(0,i.jsx)(r.A,{variant:"contained",disabled:g,className:"bg-[".concat(y.palette.backgroundVariants.green,"] hover:bg-[").concat(y.palette.backgroundVariants.green,"] w-full h-[50px] px-[30px] rounded-[10px]"),onClick:d,children:h("sharePayee.proceedToPayeeDetails")})}),onClose:()=>{x()},showCloseIcon:!0,children:(0,i.jsxs)("div",{className:"flex flex-col gap-[15px] lg:gap-[30px] items-center justify-center lg:p-[20px]",children:[(0,i.jsxs)("div",{className:"contents",children:[(0,i.jsxs)(f.A,{variant:"mainBody2",color:"textColors.meta",className:"text-center",children:[h("sharePayee.payeeChecklistDeclerationText1")," ",(0,i.jsxs)("span",{className:"font-bold",children:["$",(null==o?void 0:o.reviewerRecomendedFundingAmount)?Number(o.reviewerRecomendedFundingAmount).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):"N/A"]})," ",h("sharePayee.payeeChecklistDeclerationText2")," ",(0,i.jsxs)("span",{className:"font-bold",children:["#",null!=(a=null==o?void 0:o.applicationId)?a:"N/A"]}),","," ",(0,i.jsx)("span",{className:"font-bold",children:null!=(n=null==o||null==(t=o.payee)?void 0:t.fullLegalName)?n:"N/A"})," ",h("sharePayee.payeeChecklistDeclerationText3"),"."]}),(0,i.jsxs)(f.A,{variant:"mainBody2",color:"textColors.meta",className:"text-center mt-[10px]",children:[h("sharePayee.payeeChecklistDeclerationText4"),":"]})]}),(0,i.jsx)("div",{className:"border border-[".concat(y.palette.backgroundVariants.lgrey,"] bg-[").concat(y.palette.backgroundVariants.lighter,"] p-[10px]"),children:p.map((e,t)=>(0,i.jsx)(u.A,{control:(0,i.jsx)(v.A,{checked:c.includes(t),onChange:()=>s(t)}),label:(0,i.jsx)(f.A,{variant:"mainBody3",color:"#000000DE",children:e}),sx:{marginBottom:t!==p.length-1?"10px":0}},t))}),(0,i.jsxs)(f.A,{variant:"mainBody2",color:"textColors.meta",className:"text-center",children:[(0,i.jsx)("span",{className:"font-bold",children:h("sharePayee.paymentTimeline")})," ",h("sharePayee.paymentTimelineDescription"),"."]})]})})})};var ed=a(57995),ep=a(856),eu=a(22997),em=a(95063),ex=a(3707),ef=a(74350),eh=a(50223),ey=a(91408),ev=a(52604),eg=a(92914);let eA={src:"/_next/static/media/solar_eye-outline.7f6f66b3.svg",height:20,width:20,blurWidth:0,blurHeight:0};var eb=a(58315);let ej=e=>{let{type:t,message:a,duration:n=2e3}=e,[l,o]=k.useState(!!t);return(k.useEffect(()=>{if(t){o(!0);let e=setTimeout(()=>o(!1),n);return()=>clearTimeout(e)}o(!1)},[t,a,n]),t)?(0,i.jsx)("div",{children:(0,i.jsx)(ed.A,{sx:{color:"#fff",background:"#00163380",zIndex:e=>e.zIndex.modal+2},open:l,onClick:()=>o(!1),children:(0,i.jsx)("div",{style:{position:"fixed",left:"0",right:"0",margin:"0 auto",display:"flex",justifyContent:"center",width:"100%",bottom:"25px"},children:(0,i.jsx)(ef.A,{severity:t,className:"rounded-full px-10 text-center py-0 text-sm font-thin",children:a})})})}):null},eC=e=>{var t,a,n;let{onClose:o,openPayeeDetailFormModal:c,selectedApplication:p,onGoBack:m,prefillFromApi:x=!1,onSuccess:h}=e,{t:y}=(0,D.Bd)(),A=(0,l.A)(),b=(0,k.useRef)(null),j=(0,k.useRef)(null),[C,N]=(0,k.useState)(!1),[P,w]=(0,k.useState)(!1),[S,F]=(0,k.useState)(!1),[T,M]=(0,k.useState)(!1),[R,O]=(0,k.useState)(!1),[_,L]=(0,k.useState)(!1),[W,V]=(0,k.useState)({type:null,message:"",id:0}),[z,U]=(0,k.useState)([]),[H,Y]=(0,k.useState)([]),[K,J]=k.useState(!1),[$,G]=k.useState(!1),[Z,Q]=k.useState(!1),ee=[".pdf",".jpeg",".jpg",".png",".heic"],et=new Set(ee.map(e=>e.toLowerCase())),ea=e=>{let t=e.name.toLowerCase(),a=t.lastIndexOf(".");if(-1===a)return!1;let i=t.substring(a);return et.has(i)},ei={accountHolderName:null!=(a=null==p||null==(t=p.payee)?void 0:t.fullLegalName)?a:"",isNameOnBankAccountDifferent:!1,accountNumber:"",accountType:"",institutionName:"",institutionCode:"",transitCode:"",verificationDocument:null,officerCertificateDocument:null},[en,el]=(0,k.useState)(ei),eo=(e,t)=>{V({type:e,message:t,id:Date.now()})};k.useEffect(()=>{var e,t;c&&!1===x&&el({accountHolderName:null!=(t=null==p||null==(e=p.payee)?void 0:e.fullLegalName)?t:"",isNameOnBankAccountDifferent:!1,accountNumber:"",accountType:"",institutionName:"",institutionCode:"",transitCode:"",verificationDocument:null,officerCertificateDocument:null})},[c,x,null==p?void 0:p._id]),k.useEffect(()=>{(async()=>
1{if(c&&x&&(null==p?void 0:p._id))try{var e,t,a,i,n,l,o,r,s;F(!0);let c=await q.W.getPayeeBankDetail(null==p?void 0:p._id),d=(null==c?void 0:c.result)||(null==c||null==(e=c.data)?void 0:e.result)||(null==c?void 0:c.data);if(d){let e=(null==d?void 0:d.verificationDocument)||(null==d?void 0:d.document),c=e?{docIds:(null==e?void 0:e._id)||(null==e?void 0:e.docIds),imageCDNUrl:null==e?void 0:e.imageCDNUrl,originalFileName:(null==e?void 0:e.originalFileName)||(null==e?void 0:e.fileName)||"Uploaded document",fileName:(null==e?void 0:e.fileName)||(null==e?void 0:e.originalFileName),fileType:null==e?void 0:e.fileType,objectFileName:null==e?void 0:e.objectFileName}:null;c&&(U([c]),G(!0));let u=null==d?void 0:d.officerCertificateDocument,m=u?{docIds:(null==u?void 0:u._id)||(null==u?void 0:u.docIds),imageCDNUrl:null==u?void 0:u.imageCDNUrl,originalFileName:(null==u?void 0:u.originalFileName)||(null==u?void 0:u.fileName)||"Uploaded document",fileName:(null==u?void 0:u.fileName)||(null==u?void 0:u.originalFileName),fileType:null==u?void 0:u.fileType,objectFileName:null==u?void 0:u.objectFileName}:null;m&&(Y([m]),Q(!0)),el({accountHolderName:null!=(i=null!=(a=null==d?void 0:d.accountHolderName)?a:null==p||null==(t=p.payee)?void 0:t.fullLegalName)?i:"",isNameOnBankAccountDifferent:!!(null==d?void 0:d.isNameOnBankAccountDifferent),accountNumber:null!=(n=null==d?void 0:d.accountNumber)?n:"",accountType:null!=(l=null==d?void 0:d.accountType)?l:"",institutionName:null!=(o=null==d?void 0:d.institutionName)?o:"",institutionCode:null!=(r=null==d?void 0:d.institutionCode)?r:"",transitCode:null!=(s=null==d?void 0:d.transitCode)?s:"",verificationDocument:c,officerCertificateDocument:m})}}catch(e){console.error("Failed to fetch payee bank details:",e),eo("error","Failed to load existing payee details")}finally{F(!1)}})()},[c,x,null==p?void 0:p._id]);let er=ey.Ik().shape({accountHolderName:ey.Yj().required(y("sharePayee.sharePayeeDetailForm.formField.errorNameonBankAcountDifferent")),isNameOnBankAccountDifferent:ey.zM().required("Please specify if the name is different"),accountNumber:ey.Yj().required(y("sharePayee.sharePayeeDetailForm.formField.errorAccountNumberIsRequired")).matches(/^[0-9]+$/,"Account Number must contain only numbers").min(6,y("sharePayee.sharePayeeDetailForm.formField.errorAccountMustBeSix")).max(18,"Account Number cannot exceed 18 digits"),accountType:ey.Yj().oneOf(["Chequing","Savings"],"Please select a valid Account Type").required(y("sharePayee.sharePayeeDetailForm.formField.errorAccountTypeIsRequired")),institutionName:ey.Yj().matches(/^[A-Za-z\s]+$/,"Institution Name can only contain alphabets and spaces").required(y("sharePayee.sharePayeeDetailForm.formField.errorInstitutionNameIsRequired")),institutionCode:ey.Yj().required(y("sharePayee.sharePayeeDetailForm.formField.errorInstitutionCodeIsRequired")).matches(/^\d{3}$/,y("sharePayee.sharePayeeDetailForm.formField.errorInstituteCodeMustBeThree")),transitCode:ey.Yj().required(y("sharePayee.sharePayeeDetailForm.formField.errorTransitCodeIsRequired")).matches(/^\d{5}$/,y("sharePayee.sharePayeeDetailForm.formField.errorTransitCodeMustBeFive")),verificationDocument:ey.gl().required("Verification document is required"),officerCertificateDocument:ey.gl().required(y("sharePayee.sharePayeeDetailForm.formField.errorOfficerCertificateRequired"))}),es=e=>{var t;return null==(t=e.name.split(".").pop())?void 0:t.toLowerCase()},ed=async(e,t)=>{if(e.filter(e=>e.size>0x1900000).length>
10){eo("error","File size exceeds the 25MB limit. Please upload a smaller file."),b.current&&(b.current.value=""),t&&t("verificationDocument",null);return}G(!1),M(!0);let a=e.map(e=>{let t=es(e);return{file:e.name,fileType:e.type||("heic"===t?"image/heic":"unknown")}});console.log("print the metadata at the time of file uplaod:---",a);let i={applicationId:null==p?void 0:p._id,files:a,applicationStage:"Payment"};try{let a=(await q.W.uploadImage(i)).result;await Promise.all(e.map((e,t)=>{var i;if(!(null==(i=a[t])?void 0:i.preSignedUrl))throw Error("Missing preSignedUrl for file index ".concat(t));return q.W.putImageToS3(e,a[t].preSignedUrl)}));let n=a.map((t,a)=>{var i,n;return{fileType:(null==t||null==(n=t.fileType)||null==(i=n.split("/")[1])?void 0:i.toUpperCase())||"Unknown",fileName:(null==t?void 0:t.originalFileName)||e[a].name,uploadTime:new Date(t.createdAt).toLocaleString("en-CA",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!0}).replace(",","").replace(" AM"," am").replace(" PM"," pm").replace(":","."),objectFileName:t.objectFileName,docIds:t._id,imageCDNUrl:t.imageCDNUrl,originalFileName:(null==t?void 0:t.originalFileName)||e[a].name}});U(e=>[...e,...n]),t&&n.length>0&&t("verificationDocument",n[n.length-1]),eo("success",y("sharePayee.sharePayeeDetailForm.formField.verificationDocUploadedSuccessfully")),G(!0)}catch(e){console.error("Batch upload error:",e),eo("error",e.message||"File upload failed"),G(!1)}finally{M(!1),b.current&&(b.current.value="")}},ef=async(e,t)=>{if(e.filter(e=>e.size>0x1900000).length>
10){eo("error","File size exceeds the 25MB limit. Please upload a smaller file."),j.current&&(j.current.value=""),t&&t("officerCertificateDocument",null);return}Q(!1),O(!0);let a=e.map(e=>{let t=es(e);return{file:e.name,fileType:e.type||("heic"===t?"image/heic":"unknown")}}),i={applicationId:null==p?void 0:p._id,files:a,applicationStage:"Payment",subfolder:"officers-certificate"};try{let a=(await q.W.uploadImage(i)).result;await Promise.all(e.map((e,t)=>{var i;let n=null==(i=a[t])?void 0:i.preSignedUrl;if(!n)throw Error("Missing preSignedUrl for file index ".concat(t));return q.W.putImageToS3(e,n)}));let n=a.map((t,a)=>{var i,n;return{fileType:(null==t||null==(n=t.fileType)||null==(i=n.split("/")[1])?void 0:i.toUpperCase())||"Unknown",fileName:(null==t?void 0:t.originalFileName)||e[a].name,uploadTime:new Date(t.createdAt).toLocaleString("en-CA",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!0}).replace(",","").replace(" AM"," am").replace(" PM"," pm").replace(":","."),objectFileName:t.objectFileName,docIds:t._id,imageCDNUrl:t.imageCDNUrl,originalFileName:(null==t?void 0:t.originalFileName)||e[a].name}});Y(e=>[...e,...n]),t&&n.length>0&&t("officerCertificateDocument",n[n.length-1]),eo("success",y("sharePayee.sharePayeeDetailForm.formField.officerCertificateUploadedSuccessfully")),Q(!0)}catch(e){console.error("Batch upload error (officer cert):",e),eo("error",e.message||"File upload failed"),Q(!1)}finally{O(!1),j.current&&(j.current.value="")}},eC=async(e,t)=>{if(!e)return void t("officerCertificateDocument",null);let a={applicationId:null==p?void 0:p._id,applicationStage:null==p?void 0:p.applicationStage,docIds:(null==e?void 0:e.docIds)?[e.docIds]:[],files:(null==e?void 0:e.objectFileName)?[{objectFileName:e.objectFileName}]:[]};try{O(!0);let i=await q.W.uploadRemove(a);(null==i?void 0:i.success)?(Y(t=>t.filter(t=>t.docIds!==e.docIds)),t("officerCertificateDocument",null),Q(!1),eo("success",i.message)):eo("error",i.message)}catch(e){console.error("Delete error (officer cert):",e),eo("error",e.message)}finally{O(!1)}},eN=async()=>{if(null==p?void 0:p._id){L(!0);try{let e=await q.W.downloadOfficersCertificate(p._id),t=new Blob([e.data],{type:"application/pdf"}),a=window.URL.createObjectURL(t),i=document.createElement("a");i.href=a,i.download="OfficersCertificate_".concat(p.applicationId||p._id,".pdf"),document.body.appendChild(i),i.click(),document.body.removeChild(i),window.URL.revokeObjectURL(a)}catch(i){var e;console.error("Download template error:",i);let t="",a=null==i||null==(e=i.response)?void 0:e.data;if(a&&"function"==typeof a.text)try{let e=await a.text(),i=JSON.parse(e);t=(null==i?void 0:i.message)||""}catch(e){}eo("error",t||"Failed to download Officer's Certificate")}finally{L(!1)}}},eP=async(e,t)=>{if(!e){console.warn("⚠️ No uploadItem found to delete"),t("verificationDocument",null);return}let a={applicationId:null==p?void 0:p._id,applicationStage:null==p?void 0:p.applicationStage,docIds:(null==e?void 0:e.docIds)?[e.docIds]:[],files:(null==e?void 0:e.objectFileName)?[{objectFileName:e.objectFileName}]:[]};try{M(!0);let i=await q.W.uploadRemove(a);(null==i?void 0:i.success)?(U(t=>t.filter(t=>t.docIds!==e.docIds)),t("verificationDocument",null),G(!1),eo("success",i.message)):eo("error",i.message)}catch(e){console.error("Delete error:",e),eo("error",e.message)}finally{M(!1)}};k.useEffect(()=>{(c||x)&&J(!1)},[c,x]);let ew=async e=>{var t,a,i,n,l,o;if(!K)return void J(!0);try{let l=null==e?void 0:e.verificationDocument,o=null!=(i=null==l?void 0:l.docIds)?i:(null==l?void 0:l.name)?null==(t=z.find(e=>e.fileName===l.name||e.originalFileName===l.name))?void 0:t.docIds:void 0;if(!o)return void eo("error","Please upload a verification document before submitting");let r=null==e?void 0:e.officerCertificateDocument,c=null!=(n=null==r?void 0:r.docIds)?n:(null==r?void 0:r.name)?null==(a=H.find(e=>e.fileName===r.name||e.originalFileName===r.name))?void 0:a.docIds:void 0;if(!c)return void eo("error","Please upload the Officer's Certificate before submitting");let s={...e,accountNumber:(null==e?void 0:e.accountNumber)!==void 0&&(null==e?void 0:e.accountNumber)!==null?String(e.accountNumber):"",institutionCode:(null==e?void 0:e.institutionCode)!==void 0&&(null==e?void 0:e.institutionCode)!==null?String(e.institutionCode):"",transitCode:(null==e?void 0:e.transitCode)!==void 0&&(null==e?void 0:e.transitCode)!==null?String(e.transitCode):"",verificationDocument:o,officerCertificateDocument:c}
1,d=await q.W.shareBankDetails(null==p?void 0:p._id,s);(null==d?void 0:d.success)?(eo("success",d.message),h&&h(),J(!1),G(!1),Q(!1)):(console.log("print the error response:--",d),eo("error",null==d?void 0:d.message))}catch(e){console.log("API error: ---",e),eo("error",(null==e||null==(o=e.response)||null==(l=o.data)?void 0:l.message)||"Unexpected error occurred"),J(!1)}},eS=async e=>{try{if(null==e?void 0:e.imageCDNUrl){var t;let a=(null==e||null==(t=e.objectFileName)?void 0:t.split("/").pop())||"document";await (0,eb.h)(e.imageCDNUrl,a)}else if(e instanceof File){let t=e.name,a=window.URL.createObjectURL(e),i=document.createElement("a");i.href=a,i.download=t,i.rel="noopener",document.body.appendChild(i),i.click(),setTimeout(()=>{document.body.removeChild(i),window.URL.revokeObjectURL(a)},0)}else eo("error","No valid file found to download.")}catch(e){console.error("Download error:",e),eo("error","File download failed.")}};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ec,{title:K?y("sharePayee.sharePayeeDetailForm.confirmPayeeDetails"):y("myApplications.buttonText.sharePayeeDetails"),show:c,maxWidth:"md",actionComponent:null,onClose:o,children:(0,i.jsxs)("div",{className:"flex flex-col gap-[20px] md:gap-[30px] items-center justify-center lg:p-[15px] mt-[10px]",children:[(0,i.jsxs)(f.A,{variant:"mainBody2",color:"textColors.meta",className:"text-center",children:[K?y("sharePayee.sharePayeeDetailForm.formConfirmText1"):y("sharePayee.sharePayeeDetailForm.formText1")," ",(0,i.jsxs)("span",{className:"font-bold",children:["#",null!=(n=null==p?void 0:p.applicationId)?n:"N/A"]})]}),(0,i.jsxs)(f.A,{variant:"mainBody2",color:"textColors.meta",className:"text-center",children:[(0,i.jsxs)("span",{className:"font-bold",children:[y("properties.note"),":"]})," ",y("sharePayee.sharePayeeDetailForm.formText2")]}),(0,i.jsx)(eh.l1,{enableReinitialize:!0,initialValues:en,validationSchema:er,onSubmit:ew,children:e=>{var t,a,n,l,c,h;let{values:k,errors:D,touched:F,setFieldValue:M}=e;return(0,i.jsxs)(eh.lV,{className:"w-full",children:[S?(0,i.jsx)(X.A,{compact:!0}):(0,i.jsxs)("div",{className:"border border-[".concat(A.palette.backgroundVariants.grey,"] rounded-[25px] lg:px-[40px] px-[20px] py-[16px] flex flex-col gap-[10px] max-h-[400px] overflow-y-auto"),children:[(0,i.jsxs)("div",{children:[(0,i.jsx)(f.A,{variant:"mainBody3",color:"text.secondary",className:"mb-[10px]",children:y("sharePayee.sharePayeeDetailForm.formField.nameOnBankAccount")}),(0,i.jsx)(eh.D0,{as:d.A,name:"accountHolderName",fullWidth:!0,disabled:!k.isNameOnBankAccountDifferent||K,error:F.accountNumber&&!!D.accountHolderName,helperText:F.accountNumber&&D.accountHolderName,placeholder:y("sharePayee.sharePayeeDetailForm.formField.enterNmaeBankAccount"),sx:{"& .MuiInputBase-input.Mui-disabled":{backgroundColor:"#E9ECEF",WebkitTextFillColor:"#808080",cursor:"not-allowed"},"& .MuiOutlinedInput-root.Mui-disabled .MuiOutlinedInput-notchedOutline":{borderColor:"#CED4DA"}}}),!K&&(0,i.jsx)(u.A,{className:"mt-[10px]",control:(0,i.jsx)(v.A,{checked:k.isNameOnBankAccountDifferent,onChange:e=>{let t=e.target.checked;if(M("isNameOnBankAccountDifferent",t),!t){var a,i,n;M("accountHolderName",x?null!=(i=null==en?void 0:en.accountHolderName)?i:"":null!=(n=null==p||null==(a=p.payee)?void 0:a.fullLegalName)?n:"")}},disabled:K}),label:(0,i.jsx)(f.A,{color:"text.secondary",className:"text-xs sm:text-sm ",children:y("sharePayee.sharePayeeDetailForm.formField.nameOnBankAccountDifferent")})})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)(f.A,{variant:"mainBody3",color:"text.secondary",className:"mb-[10px]",children:y("sharePayee.sharePayeeDetailForm.formField.accountNumber")}),(0,i.jsx)(eh.D0,{as:d.A,name:"accountNumber",fullWidth:!0,disabled:K,placeholder:y("sharePayee.sharePayeeDetailForm.formField.enterBankAccountNumber"),error:F.accountNumber&&!!D.accountNumber,helperText:F.accountNumber&&D.accountNumber,inputProps:{minLength:6,maxLength:18,inputMode:"numeric",pattern:"[0-9]*"},onInput:e=>{e.target.value=e.target.value.replace(/[^0-9]/g,"")},sx:{"& .MuiInputBase-input.Mui-disabled":{backgroundColor:"#E9ECEF",WebkitTextFillColor:"#808080",cursor:"not-allowed"},"& .MuiOutlinedInput-root.Mui-disabled .MuiOutlinedInput-notchedOutline":{borderColor:"#CED4DA"}}})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)(f.A,{variant:"mainBody3",color:"text.secondary",className:"mb-[10px]",children:y("sharePayee.sharePayeeDetailForm.formField.accountType")}),(0,i.jsx)(eh.D0,{name:"accountType",children:e=>{let{field:t,form:a}=e;return(0,i.jsxs)(ep.A,{fullWidth:!0,disabled:K,error:a.touched.accountType&&!!a.errors.accountType,children:[(0,i.jsxs)(g.A,{...t,displayEmpty:!0,renderValue:e=>e?"Chequing"===e?y("sharePayee.sharePayeeDetailForm.formField.chequing"):"Savings"===e?y("sharePayee.sharePayeeDetailForm.formField.savings"):e:(0,i.jsx)("span",{className:"text-[".concat(A.palette.grayColors.darker,"]"),children:y("sharePayee.sharePayeeDetailForm.formField.selectedAccountType")}),sx:{fontSize:"16px",fontWeight:400,color:"#212529","& .MuiSelect-select":{fontSize:"16px !important",fontWeight:400,color:"#212529"},"& .MuiSelect-select.Mui-disabled":{backgroundColor:"#E9ECEF",WebkitTextFillColor:"#808080",cursor:"not-allowed"},"& .MuiOutlinedInput-root.Mui-disabled .MuiOutlinedInput-notchedOutline":{borderColor:"#CED4DA"}},children:[(0,i.jsx)(s.A,{value:"",disabled:!0,className:"text-base text-gray-400",children:y("sharePayee.sharePayeeDetailForm.formField.selectedAccountType")}),(0,i.jsx)(s.A,{value:"Chequing",className:"text-base",children:y("sharePayee.sharePayeeDetailForm.formField.chequing")}),(0,i.jsx)(s.A,{value:"Savings",className:"text-base",children:y("sharePayee.sharePayeeDetailForm.formField.savings")})]}),a.touched.accountType&&a.errors.accountType&&(0,i.jsx)(eu.A,{children:a.errors.accountType})]})}})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)(f.A,{variant:"mainBody3",color:"text.secondary",className:"mb-[10px]",children:y("sharePayee.sharePayeeDetailForm.formField.insitituteName")}
1),(0,i.jsx)(eh.D0,{as:d.A,name:"institutionName",fullWidth:!0,disabled:K,placeholder:y("sharePayee.sharePayeeDetailForm.formField.enterBankName"),error:F.institutionName&&!!D.institutionName,helperText:F.institutionName&&D.institutionName,onKeyPress:e=>{/^[A-Za-z\s]$/.test(e.key)||e.preventDefault()},sx:{"& .MuiInputBase-input.Mui-disabled":{backgroundColor:"#E9ECEF",WebkitTextFillColor:"#808080",cursor:"not-allowed"},"& .MuiOutlinedInput-root.Mui-disabled .MuiOutlinedInput-notchedOutline":{borderColor:"#CED4DA"}}})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)(f.A,{variant:"mainBody3",color:"text.secondary",className:"mb-[10px]",children:y("sharePayee.sharePayeeDetailForm.formField.instituteCode")}),(0,i.jsx)(eh.D0,{as:d.A,name:"institutionCode",fullWidth:!0,disabled:K,placeholder:y("sharePayee.sharePayeeDetailForm.formField.enterInstituteCode"),error:F.institutionCode&&!!D.institutionCode,helperText:F.institutionCode&&D.institutionCode,inputProps:{maxLength:3,inputMode:"numeric",pattern:"[0-9]*"},onInput:e=>{e.target.value=e.target.value.replace(/[^0-9]/g,"")},sx:{"& .MuiInputBase-input.Mui-disabled":{backgroundColor:"#E9ECEF",WebkitTextFillColor:"#808080",cursor:"not-allowed"},"& .MuiOutlinedInput-root.Mui-disabled .MuiOutlinedInput-notchedOutline":{borderColor:"#CED4DA"}}})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)(f.A,{variant:"mainBody3",color:"text.secondary",className:"mb-[10px]",children:y("sharePayee.sharePayeeDetailForm.formField.transitCode")}),(0,i.jsx)(eh.D0,{as:d.A,name:"transitCode",fullWidth:!0,disabled:K,placeholder:y("sharePayee.sharePayeeDetailForm.formField.enterTransitCode"),error:F.transitCode&&!!D.transitCode,helperText:F.transitCode&&D.transitCode,inputProps:{maxLength:5,inputMode:"numeric",pattern:"[0-9]*"},onInput:e=>{e.target.value=e.target.value.replace(/[^0-9]/g,"")},sx:{"& .MuiInputBase-input.Mui-disabled":{backgroundColor:"#E9ECEF",WebkitTextFillColor:"#808080",cursor:"not-allowed"},"& .MuiOutlinedInput-root.Mui-disabled .MuiOutlinedInput-notchedOutline":{borderColor:"#CED4DA"}}})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)(f.A,{variant:"mainBody3",color:"text.secondary",className:"mb-[10px]",children:y("sharePayee.sharePayeeDetailForm.formField.uploadDocVerification")}),k.verificationDocument?(0,i.jsxs)("div",{className:"flex justify-between items-center bg-[".concat(A.palette.grayColors.medium,"] border border-[").concat(A.palette.backgroundVariants.lgrey,"] p-3 rounded-lg"),children:[(0,i.jsx)(f.A,{variant:"mainBody2",color:"#808080",className:"truncate max-w-[70%] md:max-w-[80%] lg:max-w-[85%]",children:(null==k||null==(t=k.verificationDocument)?void 0:t.name)||(null==k||null==(a=k.verificationDocument)?void 0:a.fileName)||(null==k||null==(n=k.verificationDocument)?void 0:n.originalFileName)}),(0,i.jsx)("div",{className:"flex gap-1 md:gap-3",children:T?(0,i.jsx)(em.A,{size:24}):(0,i.jsxs)(i.Fragment,{children:[!K&&(0,i.jsx)(B.A,{disabled:K,onClick:()=>{let e=null==k?void 0:k.verificationDocument,t=(null==e?void 0:e.docIds)?e:z.find(t=>t.fileName===(null==e?void 0:e.name)||t.originalFileName===(null==e?void 0:e.name))||null;if(!t)return void eo("info","Upload in progress. Please wait...");eP(t,M)},className:"",children:(0,i.jsx)(E(),{src:eg.A,alt:"Delete",className:"w-[18px] md:w-[24px] h-[24px]"})}),(0,i.jsx)(B.A,{onClick:()=>eS(null==k?void 0:k.verificationDocument),className:"",children:(0,i.jsx)(E(),{src:eA,alt:"View",className:"w-[18px] md:w-[24px] h-[24px]"})})]})})]}):(0,i.jsxs)("div",{className:"w-full flex flex-col sm:flex-row justify-center items-center uppercase font text-[".concat(A.palette.primary.main,"] gap-[10px] border-[1px] border-dashed rounded-[10px] p-[15px] md:p-[29px] cursor-pointer ").concat(C?"bg-[".concat(A.palette.backgroundVariants.accent,"]"):"border-[".concat(A.palette.primary.main,"]")),onClick:()=>{var e;return null==(e=b.current)?void 0:e.click()},onDragEnter:e=>{e.preventDefault(),e.stopPropagation(),N(!0)},onDragLeave:e=>{e.preventDefault(),e.stopPropagation(),N(!1)},onDragOver:e=>{e.preventDefault(),e.stopPropagation()},onDrop:e=>{var t;e.preventDefault(),e.stopPropagation(),N(!1);let a=null==(t=e.dataTransfer)?void 0:t.files;(null==a?void 0:a.length)&&ed(Array.from(a),M)},children:[(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)(E(),{src:ev.A,alt:"uploadIcon",width:24,height:24}),(0,i.jsx)(f.A,{variant:"mainBody2",className:"font-semibold",children:y("uploadDocument")})]}),(0,i.jsx)("span",{className:"border border-[".concat(A.palette.primary.main,"] h-[35px] hidden sm:flex")}),(0,i.jsxs)("div",{className:"flex flex-col items-center",children:[(0,i.jsx)(f.A,{className:"capitalize text-black italic",variant:"mainBody3",children:y("fileFormats")}),(0,i.jsx)("div",{children:ee.map((e,t)=>(0,i.jsxs)(f.A,{variant:"mainBody3",className:"text-black lowercase mr-1",children:[e,t<ee.length-1&&","]},t))})]})]}),(0,i.jsx)("input",{type:"file",ref:b,onChange:e=>((e,t)=>{let a=e.target.files;if(null==a?void 0:a.length){let i=Array.from(a).filter(ea);if(0===i.length){eo("error","Only ".concat(ee.join(", ")," files are allowed")),e.target.value="";return}t("verificationDocument",i[0]),ed(i,t),e.target.value=""}})(e,M),className:"hidden",accept:ee.join(","),multiple:!0})]})]}),!S&&(0,i.jsxs)("div",{className:"border border-[".concat(A.palette.backgroundVariants.grey,"] rounded-[25px] lg:px-[40px] px-[20px] py-[16px] flex flex-col gap-[10px] mt-[20px]"),children:[(0,i.jsxs)("div",{className:"flex items-center gap-[6px] mb-[4px]",children:[(0,i.jsx)(f.A,{variant:"mainBody2",color:"text.secondary",className:"font-semibold",children:y("sharePayee.sharePayeeDetailForm.formField.officerCertificateLabel")}),(0,i.jsx)(I.A,{title:y("sharePayee.sharePayeeDetailForm.formField.officerCertificateTooltip"),arrow:!0,placement:"top",enterTouchDelay:0,leaveTouchDelay:6e3,children:(0,i.jsx)(B.A,{size:"small","aria-label":"Officer's Certificate help",className:"p-[2px]",children:(0,i.jsx)(ex.A,{fontSize:"small"})})})]}),!K&&(0,i.jsx)("div",{children:(0,i.jsx)(r.A,{variant:"outlined",onClick:eN,disabled:_,className:"rounded-[8px]",startIcon:_?(0,i.jsx)(em.A,{size:16}):null,children:y("sharePayee.sharePayeeDetailForm.formField.downloadOfficerCertificate")})}),(0,i.jsxs)("div",{children:[(0,i.jsx)(f.A,{variant:"mainBody3",color:"text.secondary",className:"mb-[10px]",children:y("sharePayee.sharePayeeDetailForm.formField.uploadSignedOfficerCertificate")}),k.officerCertificateDocument?(0,i.jsxs)("div",{className:"flex justify-between items-center bg-[".concat(A.palette.grayColors.medium,"] border border-[").concat(A.palette.backgroundVariants.lgrey,"] p-3 rounded-lg"),children:[(0,i.jsx)(f.A,{variant:"mainBody2",color:"#808080",className:"truncate max-w-[70%] md:max-w-[80%] lg:max-w-[85%]",children:(null==k||null==(l=k.officerCertificateDocument)?void 0:l.name)||(null==k||null==(c=k.officerCertificateDocument)?void 0:c.fileName)||(null==k||null==(h=k.officerCertificateDocument)?void 0:h.originalFileName)}),(0,i.jsx)("div",{className:"flex gap-1 md:gap-3",children:R?(0,i.jsx)(em.A,{size:24}):(0,i.jsxs)(i.Fragment,{children:[!K&&(0,i.jsx)(B.A,{disabled:K,onClick:()=>{let e=null==k?void 0:k.officerCertificateDocument,t=(null==e?void 0:e.docIds)?e:H.find(t=>t.fileName===(null==e?void 0:e.name)||t.originalFileName===(null==e?void 0:e.name))||null;if(!t)return void eo("info","Upload in progress. Please wait...");eC(t,M)},children:(0,i.jsx)(E(),{src:eg.A,alt:"Delete",className:"w-[18px] md:w-[24px] h-[24px]"})}),(0,i.jsx)(B.A,{onClick:()=>eS(null==k?void 0:k.officerCertificateDocument),children:(0,i.jsx)(E(),{src:eA,alt:"View",className:"w-[18px] md:w-[24px] h-[24px]"})})]})})]}):(0,i.jsxs)("div",{className:"w-full flex flex-col sm:flex-row justify-center items-center uppercase font text-[".concat(A.palette.primary.main,"] gap-[10px] border-[1px] border-dashed rounded-[10px] p-[15px] md:p-[29px] curs
1or-pointer ").concat(P?"bg-[".concat(A.palette.backgroundVariants.accent,"]"):"border-[".concat(A.palette.primary.main,"]")),onClick:()=>{var e;return null==(e=j.current)?void 0:e.click()},onDragEnter:e=>{e.preventDefault(),e.stopPropagation(),w(!0)},onDragLeave:e=>{e.preventDefault(),e.stopPropagation(),w(!1)},onDragOver:e=>{e.preventDefault(),e.stopPropagation()},onDrop:e=>{var t;e.preventDefault(),e.stopPropagation(),w(!1);let a=null==(t=e.dataTransfer)?void 0:t.files;(null==a?void 0:a.length)&&ef(Array.from(a),M)},children:[(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)(E(),{src:ev.A,alt:"uploadIcon",width:24,height:24}),(0,i.jsx)(f.A,{variant:"mainBody2",className:"font-semibold",children:y("uploadDocument")})]}),(0,i.jsx)("span",{className:"border border-[".concat(A.palette.primary.main,"] h-[35px] hidden sm:flex")}),(0,i.jsxs)("div",{className:"flex flex-col items-center",children:[(0,i.jsx)(f.A,{className:"capitalize text-black italic",variant:"mainBody3",children:y("fileFormats")}),(0,i.jsx)("div",{children:ee.map((e,t)=>(0,i.jsxs)(f.A,{variant:"mainBody3",className:"text-black lowercase mr-1",children:[e,t<ee.length-1&&","]},t))})]})]}),(0,i.jsx)("input",{type:"file",ref:j,onChange:e=>((e,t)=>{let a=e.target.files;if(null==a?void 0:a.length){let i=Array.from(a).filter(ea);if(0===i.length){eo("error","Only ".concat(ee.join(", ")," files are allowed")),e.target.value="";return}t("officerCertificateDocument",i[0]),ef(i,t),e.target.value=""}})(e,M),className:"hidden",accept:ee.join(","),multiple:!0})]})]}),(0,i.jsxs)("div",{className:"flex justify-center mt-4 flex-col gap-[10px] md:flex-row",children:[(0,i.jsx)(r.A,{variant:"outlined",onClick:()=>{K?J(!1):"function"==typeof m?m():o()},className:"rounded-[8px] py-[13px] min-w-[185px] md:mr-4",children:y("goBack")}),(0,i.jsx)(r.A,{type:"submit",variant:"contained",disabled:!K&&(!$||!Z||Object.keys(D).length>0),className:"bg-[".concat(A.palette.backgroundVariants.green,"] hover:bg-[").concat(A.palette.backgroundVariants.green,"] rounded-[8px] py-[13px] min-w-[185px]"),children:K?y("login.confirmButton"):y("sharePayee.sharePayeeDetailForm.submitDetails")})]})]})}})]})}),W.type&&(0,i.jsx)(ej,{type:W.type,message:W.message},W.id)]})};var eN=a(48059);let eP=[{english:"Institution Number does not match verification document",french:"Le num\xe9ro d'institution ne correspond pas au document de v\xe9rification"},{english:"Bank account number does not match verification document",french:"Le num\xe9ro de compte bancaire ne correspond pas au document de v\xe9rification"},{english:"Transit number does not match verification document",french:"Le num\xe9ro de transit ne correspond pas au document de v\xe9rification"},{english:"Name on Bank Account does not match the Payee Name within application",french:"Le nom figurant sur le compte bancaire ne correspond pas au nom du b\xe9n\xe9ficiaire dans la demande"},{english:"Name on Bank Account is spelled incorrectly compared to verification document",french:"Le nom figurant sur le compte bancaire est mal orthographi\xe9 par rapport au document de v\xe9rification"},{english:"Name on Bank Account does not match verification document",french:"Le nom figurant sur le compte bancaire ne correspond pas au document de v\xe9rification"},{english:"Bank Name does not match verification document",french:"Le nom de la banque ne correspond pas au document de v\xe9rification"},{english:"Verification document is not legible",french:"Le document de v\xe9rification n'est pas lisible"},{english:"Officer's Certificate details do not align with the Payee organization/application details",french:"Les d\xe9tails du certificat d'officier ne correspondent pas \xe0 l'organisation/demande du b\xe9n\xe9ficiaire"},{english:"Other (Reason in notes)",french:"Autre (raison dans les notes)"}],ew=e=>{var t,a;let{openRevisePayeeDetailReasonModal:n,selectedApplication:o,onClose:c,onUpdate:s}=e,{t:d}=(0,D.Bd)(),p=(0,l.A)(),u=localStorage.getItem("language")||"EN",m=((e,t)=>{if(!e)return"N/A";if("EN"===t)return e;let a=eP.find(t=>t.english===e);return a&&"FR"===t?a.french:e})(null==o?void 0:o.reasonForRevisePayeeDetails,u);return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(ec,{title:d("myApplications.buttonText.revisePayeeDetails"),show:n,maxWidth:"lg",actionComponent:(0,i.jsx)("div",{className:"flex justify-center",children:(0,i.jsx)(r.A,{variant:"contained",className:"bg-[".concat(p.palette.backgroundVariants.green,"] hover:bg-[").concat(p.palette.backgroundVariants.green,"] min-w-[240px] h-[50px] px-[30px] rounded-[10px]"),onClick:()=>{"function"==typeof s&&s()},children:d("sharePayee.revisePayeeDetailReasonModal.updatePayeeDetail")})}),onClose:()=>{c()},showCloseIcon:!0,children:(0,i.jsxs)("div",{className:"px-[16px] py-[27px] border border-[".concat(p.palette.backgroundVariants.grey,"] rounded-[25px] mt-[20px]"),children:[(0,i.jsxs)("div",{className:"flex flex-col gap-[10px] items-start mb-[20px]",children:[(0,i.jsxs)(f.A,{variant:"mainBody2",color:"textColors.meta",children:[d("sharePayee.revisePayeeDetailReasonModal.modalText1")," ",(0,i.jsxs)("span",{className:"font-bold",children:["#",null!=(t=null==o?void 0:o.applicationId)?t:"N/A"]})," ",d("sharePayee.revisePayeeDetailReasonModal.modalText2")]}),(0,i.jsx)(f.A,{variant:"mainBody2",color:"textColors.meta",className:"mt-[10px]",children:d("sharePayee.revisePayeeDetailReasonModal.modalText3")})]}),(0,i.jsxs)("div",{className:"border border-[".concat(p.palette.grayColors.darker,"] bg-[").concat(p.palette.backgroundColor.lighter,"] p-[15px] rounded-[10px] flex flex-col gap-[20px]"),children:[(0,i.jsx)(f.A,{variant:"mainBody2",className:"font-extrabold",children:m||"N/A"}),(0,i.jsx)(f.A,{variant:"mainBody3",color:"grayColors.coolDark",className:"",children:null!=(a=(0,eN.dG)(null==o?void 0:o.notesForRevisePayeeDetails))?a:"N/A"})]})]})})})};var eS=a(4526),ek=a(61016),eD=a(53912),eF=a(93032),eT=a(34051),eI=a(40872),eB=a(69233),eM=a(13473);let eR=["Funding Recommended","Payee Details Pending","Payee Details Submitted","Payee Details In Review","Revise Payee Details"];function eO(e,t){return"Post-Project"===e||"Payment"===e&&eR.includes(t||"")}let eE=e=>{let{open:t,onClose:a,showToast:n}=e,c=(0,l.A)(),{t:s}=(0,D.Bd)(),u=(0,o.A)(c.breakpoints.down("sm")),h=(0,o.A)(c.breakpoints.down("md")),[y,g]=(0,k.useState)(!1),[A,b]=(0,k.useState)(!1),[j,C]=(0,k.useState)([]),[N,P]=(0,k.useState)(""),[w,S]=(0,k.useState)(new Set),[F,T]=(0,k.useState)(0),[I,M]=(0,k.useState)(10),[R,O]=(0,k.useState)("applicationId"),[E,_]=(0,k.useState)("asc");(0,k.useEffect)(()=>
1{if(!t)return;let e=!1;return(async()=>{var t,a,i,l;g(!0);try{let i,n;try{let e=JSON.parse(localStorage.getItem("accounts")||"[]"),t=localStorage.getItem("accountShortCode"),a=e.find(e=>(null==e?void 0:e.accountId)===t);i=null==a?void 0:a.participantType}catch(e){}"Service Provider"===i&&(n=localStorage.getItem("accountId")||void 0);let l={limit:500,page:1,applicationState:"true,false",...n?{serviceProvider:n}:{}},[o,r]=await Promise.all([q.W.fetchAllMyApplications({...l,applicationStage:"Post-Project"}),q.W.fetchAllMyApplications({...l,applicationStage:"Payment",applicationStatus:eR.join(",")})]);if(e)return;let c=[...(null==o?void 0:o.success)&&(null==o||null==(t=o.data)?void 0:t.applications)||[],...(null==r?void 0:r.success)&&(null==r||null==(a=r.data)?void 0:a.applications)||[]],s=new Set,d=localStorage.getItem("accountId")||"",p=c.filter(e=>eO(null==e?void 0:e.applicationStage,null==e?void 0:e.applicationStatus)).filter(e=>{var t;return String((null==e||null==(t=e.payee)?void 0:t.accountId)||"")===String(d)}).filter(e=>{let t=String((null==e?void 0:e._id)||"");return!(!t||s.has(t))&&(s.add(t),!0)}).map(e=>{var t,a,i;return{_id:e._id,applicationId:e.applicationId,applicationStage:e.applicationStage,applicationStatus:e.applicationStatus,propertyName:(null==e||null==(t=e.property)?void 0:t.propertyId)||(null==e||null==(i=e.property)||null==(a=i.id)?void 0:a.propertyId)||"--",reviewerRecomendedFundingAmount:null==e?void 0:e.reviewerRecomendedFundingAmount}});C(p)}catch(e){n("error",(null==e||null==(l=e.response)||null==(i=l.data)?void 0:i.message)||"Failed to load applications")}finally{e||g(!1)}})(),()=>{e=!0}},[t]),(0,k.useEffect)(()=>{t||(S(new Set),P(""),T(0),O("applicationId"),_("asc"))},[t]);let L=(0,k.useMemo)(()=>{let e=N.trim().toLowerCase();return e?j.filter(t=>{var a,i;return(null==(a=t.applicationId)?void 0:a.toLowerCase().includes(e))||(null==(i=t.propertyName)?void 0:i.toLowerCase().includes(e))}):j},[j,N]),W=(0,k.useMemo)(()=>{let e=[...L];return e.sort((e,t)=>{let a=e[R],i=t[R];if("reviewerRecomendedFundingAmount"===R){let e=Number(a||0),t=Number(i||0);return"asc"===E?e-t:t-e}let n=String(a||"").toLowerCase(),l=String(i||"").toLowerCase();return"asc"===E?n.localeCompare(l):l.localeCompare(n)}),e},[L,R,E]),V=(0,k.useMemo)(()=>{let e=F*I;return W.slice(e,e+I)},[W,F,I]),U=L.length>0&&L.every(e=>w.has(e._id)),H=L.some(e=>w.has(e._id))&&!U,Y=e=>{let t=new Set(w);t.has(e)?t.delete(e):t.add(e),S(t)},K=async()=>{if(0!==w.size){b(!0);try{let e=Array.from(w),t=await q.W.downloadOfficersCertificatesBulk(e),a=new Blob([t.data],{type:"application/zip"}),i=window.URL.createObjectURL(a),l=document.createElement("a");l.href=i,l.download="OfficersCertificates.zip",document.body.appendChild(l),l.click(),document.body.removeChild(l),window.URL.revokeObjectURL(i),n("success",s("sharePayee.officerCertificateBulk.downloadStarted"))}catch(i){var e;console.error("Bulk download error:",i);let t="",a=null==i||null==(e=i.response)?void 0:e.data;if(a&&"function"==typeof a.text)try{let e=await a.text(),i=JSON.parse(e);t=(null==i?void 0:i.message)||""}catch(e){}n("error",t||s("sharePayee.officerCertificateBulk.downloadFailed"))}finally{b(!1)}}},J={backgroundColor:c.palette.grayColors.light,color:c.palette.textColors.primary,fontWeight:600,fontSize:"13px",borderBottom:"1px solid ".concat(c.palette.borderColors.primary),whiteSpace:"nowrap"},X={fontSize:"14px",color:c.palette.textColors.secondary,borderBottom:"1px solid ".concat(c.palette.grayColors.medium)},$=function(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"left";return(0,i.jsx)(eS.A,{sx:J,align:a,children:(0,i.jsx)(ek.A,{active:R===e,direction:R===e?E:"asc",onClick:()=>{R===e?_("asc"===E?"desc":"asc"):(O(e),_("asc"))},children:t})})};return(0,i.jsx)(ed.A,{open:t,sx:{zIndex:e=>e.zIndex.drawer+1,background:"rgba(0, 22, 51, 0.5)"},children:(0,i.jsxs)(eD.Ay,{anchor:u?"bottom":"right",open:t,variant:"persistent",onClose:a,sx:{"& .MuiDrawer-paper":{width:u?"100%":h?"90%":"80%",height:"100%",display:"flex",flexDirection:"column",padding:u?"20px":"32px 40px",borderRadius:u?"15px 15px 0 0":0,backgroundColor:c.palette.backgroundColor.main}},children:[(0,i.jsxs)(x.A,{className:"flex justify-between items-start gap-4",children:[(0,i.jsxs)(x.A,{className:"flex-1",children:[(0,i.jsx)(f.A,{variant:"h5",sx:{color:c.palette.textColors.primary,fontWeight:700,fontSize:{xs:"18px",md:"22px"},textTransform:"uppercase",letterSpacing:"0.5px"},children:s("sharePayee.officerCertificateBulk.title")}),(0,i.jsx)(f.A,{variant:"body2",sx:{mt:"8px",color:c.palette.grayColors.darker},children:s("sharePayee.officerCertificateBulk.description")})]}),(0,i.jsx)(B.A,{onClick:a,"aria-label":"close",children:(0,i.jsx)(et.A,{})})]}),(0,i.jsx)(x.A,{className:"mt-[20px] mb-[12px]",children:(0,i.jsx)(d.A,{variant:"outlined",size:"small",fullWidth:!0,placeholder:s("sharePayee.officerCertificateBulk.searchPlaceholder"),value:N,onChange:e=>{P(e.target.value),T(0)},sx:{maxWidth:{xs:"100%",md:480},"& .MuiOutlinedInput-root":{borderRadius:"10px",backgroundColor:c.palette.backgroundColor.main}},slotProps:{input:{startAdornment:(0,i.jsx)(p.A,{position:"start",children:(0,i.jsx)(z.A,{sx:{color:c.palette.grayColors.darker}})})}}})}),(0,i.jsx)(x.A,{className:"flex-1 overflow-auto",children:y?(0,i.jsx)(x.A,{className:"flex justify-center items-center py-12",children:(0,i.jsx)(em.A,{})}):0===W.length?(0,i.jsx)(x.A,{sx:{width:"100%",bgcolor:c.palette.grayColors.medium,border:"1px solid ".concat(c.palette.backgroundVariants.lgrey),borderRadius:"10px",padding:"24px",fontSize:13,fontWeight:600,color:c.palette.textColors.primary,textAlign:"center"},children:s("sharePayee.officerCertificateBulk.noEligibleApplications")}):(0,i.jsxs)(eF.A,{sx:{border:"1px solid ".concat(c.palette.borderColors.primary),borderRadius:"10px",overflow:"hidden"},children:[(0,i.jsxs)(eT.A,{size:"small",stickyHeader:!0,children:[(0,i.jsx)(eI.A,{children:(0,i.jsxs)(eB.A,{children:[(0,i.jsx)(eS.A,{padding:"checkbox",sx:J,children:(0,i.jsx)(v.A,{indeterminate:H,checked:U,onChange:()=>{let e=new Set(w);if(U)for(let t of L)e.delete(t._id);else for(let t of L)e.add(t._id);S(e)},inputProps:{"aria-label":s("sharePayee.officerCertificateBulk.selectAll")}})}),$("applicationId",s("sharePayee.officerCertificateBulk.tableHeaderApplicationId")),$("propertyName",s("sharePayee.officerCertificateBulk.tableHeaderProperty")),$("applicationStage",s("sharePayee.officerCertificateBulk.tableHeaderStage")),$("applicationStatus",s("sharePayee.officerCertificateBulk.tableHeaderStatus")),$("reviewerRecomendedFundingAmount",s("sharePayee.officerCertificateBulk.tableHeaderFunding"),"right")]})}),(0,i.jsx)(eM.A,{children:V.map(e=>
1{let t=w.has(e._id);return(0,i.jsxs)(eB.A,{hover:!0,selected:t,onClick:()=>Y(e._id),sx:{cursor:"pointer","&.Mui-selected":{backgroundColor:c.palette.backgroundVariants.accent}},children:[(0,i.jsx)(eS.A,{padding:"checkbox",sx:X,children:(0,i.jsx)(v.A,{checked:t,onChange:()=>Y(e._id),onClick:e=>e.stopPropagation()})}),(0,i.jsx)(eS.A,{sx:{...X,fontWeight:500},children:e.applicationId}),(0,i.jsx)(eS.A,{sx:X,children:e.propertyName||"--"}),(0,i.jsx)(eS.A,{sx:X,children:e.applicationStage||"--"}),(0,i.jsx)(eS.A,{sx:X,children:e.applicationStatus||"--"}),(0,i.jsx)(eS.A,{sx:X,align:"right",children:(e=>null==e||0===Number(e)?"--":Number(e).toLocaleString("en-CA",{style:"currency",currency:"CAD",minimumFractionDigits:0,maximumFractionDigits:0}))(e.reviewerRecomendedFundingAmount)})]},e._id)})})]}),(0,i.jsx)(m.A,{component:"div",count:W.length,page:F,onPageChange:(e,t)=>T(t),rowsPerPage:I,rowsPerPageOptions:[10,25,50,100],onRowsPerPageChange:e=>{M(parseInt(e.target.value,10)),T(0)},sx:{backgroundColor:c.palette.grayColors.light,borderTop:"1px solid ".concat(c.palette.borderColors.primary)}})]})}),(0,i.jsxs)(x.A,{className:"flex justify-between items-center gap-3 flex-wrap",sx:{pt:"16px",mt:"16px",borderTop:"1px solid ".concat(c.palette.borderColors.primary)},children:[(0,i.jsx)(f.A,{variant:"body2",sx:{color:c.palette.grayColors.darker,fontWeight:500},children:s("sharePayee.officerCertificateBulk.selectedSummary",{count:w.size,total:W.length})}),(0,i.jsxs)(x.A,{className:"flex gap-3",children:[(0,i.jsx)(r.A,{variant:"outlined",onClick:a,disabled:A,sx:{borderRadius:"8px",minWidth:140,py:"10px"},children:s("sharePayee.officerCertificateBulk.cancel")}),(0,i.jsx)(r.A,{variant:"contained",onClick:K,disabled:0===w.size||A,startIcon:A?(0,i.jsx)(em.A,{size:16,color:"inherit"}):null,sx:{borderRadius:"8px",minWidth:200,py:"10px",backgroundColor:c.palette.backgroundVariants.green,"&:hover":{backgroundColor:c.palette.backgroundVariants.green,opacity:.9}},children:s("sharePayee.officerCertificateBulk.downloadSelected")})]})]})]})})},e_=e=>{let{succesPaayeeDetailModal:t,setSuccessPayeeDetailModal:a,selectedApplication:n,onConfirm:l}=e,{t:o}=(0,D.Bd)();return(0,i.jsx)(A.A,{open:t,onClose:()=>a(!1),"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:(0,i.jsxs)(x.A,{className:"pt-[20px] pb-[20px]",children:[(0,i.jsx)(b.A,{id:"alert-dialog-title",variant:"mainH4",className:"pb-[40px] uppercase",children:o("sharePayee.payeeDetailSubmitted")}),(0,i.jsx)(j.A,{className:"pb-[30px] pl-[50px] pr-[50px]",children:(0,i.jsx)(C.A,{id:"alert-dialog-description",children:(0,i.jsxs)(f.A,{variant:"mainBody2",color:"textColors.meta",className:"text-center inline-block w-full mb-[20px]",children:[o("sharePayee.submitModalText1")," ",(0,i.jsxs)("span",{className:"font-bold",children:["#",null==n?void 0:n.applicationId]})," "," ",o("sharePayee.submitModalText2")]})})}),(0,i.jsx)(N.A,{className:"flex justify-center",children:(0,i.jsx)(r.A,{variant:"outlined",sx:{minWidth:"140px",paddingY:"15px",paddingX:"30px",borderRadius:"10px",borderColor:"#8DC63F",color:"#8DC63F",fontWeight:500,"&:hover":{backgroundColor:"transparent",borderColor:"#8DC63F",color:"#8DC63F"}},onClick:()=>{a(!1),"function"==typeof l&&l()},children:"Okay"})})]})})},eL=()=>{var e,t,a,n,P;let I=(0,l.A)(),{t:B}=(0,D.Bd)(),M=(0,S.useRouter)(),[O,E]=k.useState("EN"),[_,K]=(0,k.useState)(!1),[Z,ee]=(0,k.useState)(0),[et,ea]=(0,k.useState)(!1),[ei,eo]=(0,k.useState)(!1),[er,ec]=(0,k.useState)(null),[ed,ep]=k.useState(0),[eu,em]=(0,k.useState)(""),[ex,ef]=k.useState(!1),[eh,ey]=(0,k.useState)(null),[ev,eg]=(0,k.useState)(!1),[eA,eb]=(0,k.useState)(!1),ej=(0,o.A)(I.breakpoints.up(1200)),[eN,eP]=(0,k.useState)(0),[eS,ek]=(0,k.useState)(10),[eD,eF]=(0,k.useState)(0),[eT,eI]=(0,k.useState)(""),[eB,eM]=(0,k.useState)([]),[eL,eW]=(0,k.useState)([]),[eV,ez]=(0,k.useState)(null),[eU,eH]=(0,k.useState)(!1),eq=B("myApplications.tabHeadings",{returnObjects:!0}),eY=null==(t=JSON.parse(localStorage.getItem("accounts")))||null==(e=t.filter(e=>e.accountId===localStorage.getItem("accountShortCode")))?void 0:e[0],[eK,eJ]=(0,k.useState)({type:null,message:""}),[eX,e$]=(0,k.useState)(!1),[eG,eZ]=(0,k.useState)(null),[eQ,e0]=(0,k.useState)(!0),[e1,e2]=(0,k.useState)(!1),[e3,e5]=(0,k.useState)(!1),[e8,e4]=(0,k.useState)(!1),[e6,e9]=(0,k.useState)(!1),[e7,te]=(0,k.useState)(!1),tt=!(e3&&e8&&e6),[ta,ti]=(0,k.useState)(!1),[tn,tl]=(0,k.useState)(!1),[to,tr]=(0,k.useState)(!1),[tc,ts]=(0,k.useState)(null),[td,tp]=(0,k.useState)([]),[tu,tm]=(0,k.useState)(!1),[tx,tf]=(0,k.useState)([]),[th,ty]=(0,k.useState)(""),[tv,tg]=(0,k.useState)(!1),[tA,tb]=(0,k.useState)(!1),[tj,tC]=(0,k.useState)(!1),[tN,tP]=(0,k.useState)(!1),[tw,tS]=(0,k.useState)(!1),tk=localStorage.getItem("accountId"),[tD,tF]=(0,k.useState)(!1),tT=(e,t)=>
1{eJ({type:e,message:t}),setTimeout(()=>{eJ({type:null,message:""})},2e3)},tI=[(0,i.jsx)(i.Fragment,{children:B("sharePayee.payeeTermsCheckboxList.check1")}),(0,i.jsxs)(i.Fragment,{children:[B("sharePayee.payeeTermsCheckboxList.check2")," ",(0,i.jsxs)("span",{className:"font-bold",children:["#",null!=(P=null==er?void 0:er.applicationId)?P:"N/A"]}),"."]}),(0,i.jsx)(i.Fragment,{children:B("sharePayee.payeeTermsCheckboxList.check3")}),(0,i.jsx)(i.Fragment,{children:B("sharePayee.payeeTermsCheckboxList.check4")}),(0,i.jsx)(i.Fragment,{children:B("sharePayee.payeeTermsCheckboxList.check5")}),(0,i.jsx)(i.Fragment,{children:B("sharePayee.payeeTermsCheckboxList.check6")}),(0,i.jsx)(i.Fragment,{children:B("sharePayee.payeeTermsCheckboxList.check7")}),(0,i.jsx)(i.Fragment,{children:B("sharePayee.payeeTermsCheckboxList.check8")})],tB=async()=>{let{applicationStatus:e,applicationStage:t,_id:a,step:i,...n}=er;te(!0);try{let e={stepName:"Property Selection",id:null==er?void 0:er._id,stream:null==er?void 0:er.stream,applicationStage:"Post-Project",data:{...n,applicationStage:"Post-Project"},applicationStatus:"Application Draft"},t=await q.W.createApplication(e);!0===t.success?(te(!1),ti(!1),eo(!0)):(te(!1),tT("error",null==t?void 0:t.message))}catch(e){var l,o;te(!1),tT("error",null==e||null==(o=e.response)||null==(l=o.data)?void 0:l.message)}},tM=["Application Draft","Application Waitlisted","Application Draft Submitted","Application Draft Under Review","Application Information Requested"],tR=["Application Draft Approved","Application Submitted"],tO=["Application Draft","Application Submitted","Application Under Review","Application Information Requested","Ineligible For Funding"],tE=["Funding Recommended","Payee Details Pending","Payee Details Submitted","Revise Payee Details","Payee Details Approved","Payee Details In Review","Funding Claim Approval Pending","Funding Claim Approved","Funding Claim Payment in Progress","Funding Claim Payment Completed","Claim Payment Reconciled"],t_=async e=>{var t,a,i;try{let a=await q.W.fetchApplicationFilters();if(!0===a.success){let i=(null==a||null==(t=a.data)?void 0:t.statuses)||[],n=[];0===e&&(i=i.filter(e=>"Application Draft Approved"!==e&&"Application Submitted"!==e),n=tM),1===e&&(i=i.filter(e=>"Application Draft Approved"===e||"Application Submitted"===e),n=tR),2===e&&(n=tO),3===e&&(n=tE);let l=n.length>0?n.filter(e=>i.includes(e)):i;eM(l),eW(["Active","Inactive"])}}catch(e){tT("error",null==(i=e.response)||null==(a=i.data)?void 0:a.message)}};(0,k.useEffect)(()=>{var e,t;(null==(e=M.query)?void 0:e.openDrawer)==="true"&&ea(!0),(null==(t=M.query)?void 0:t.openModal)==="true"&&tl(!0)},[null==(a=M.query)?void 0:a.openDrawer,null==(n=M.query)?void 0:n.openModal]),(0,k.useEffect)(()=>{let e=setInterval(()=>{ee(e=>(e+1)%2)},5e3);return()=>clearInterval(e)},[Z]),(0,k.useEffect)(()=>{K(!0),Promise.allSettled([tL(),tW(eT,eu,eS,eN,ed,eQ),t_(ed)]).then(e=>{J().delay(function(){K(!1)},2e3)})},[]),(0,k.useEffect)(()=>{if(3!==ed||(null==eY?void 0:eY.participantType)!=="Service Provider")return void tS(!1);let e=!1;return(async()=>{try{var t,a;let i=null==eY?void 0:eY.participantType,n="Service Provider"===i&&localStorage.getItem("accountId")||void 0,l={limit:500,page:1,applicationState:"true,false",...n?{serviceProvider:n}:{}},[o,r]=await Promise.all([q.W.fetchAllMyApplications({...l,applicationStage:"Post-Project"}),q.W.fetchAllMyApplications({...l,applicationStage:"Payment",applicationStatus:eR.join(",")})]);if(e)return;let c=[...(null==o?void 0:o.success)&&(null==o||null==(t=o.data)?void 0:t.applications)||[],...(null==r?void 0:r.success)&&(null==r||null==(a=r.data)?void 0:a.applications)||[]],s=localStorage.getItem("accountId")||"",d=c.filter(e=>{var t;return eO(null==e?void 0:e.applicationStage,null==e?void 0:e.applicationStatus)&&String((null==e||null==(t=e.payee)?void 0:t.accountId)||"")===String(s)});tS(d.length>0)}catch(t){e||tS(!1)}})(),()=>{e=!0}},[ed,null==eY?void 0:eY.participantType]);let tL=async()=>{eH(!0);try{let t=await q.W.fetchAllMyApplications({applicationStage:"Pre-Approval",applicationType:"RRI",limit:500,page:eN+1});if(!0===t.success){var e;let a=null==t||null==(e=t.data)?void 0:e.applications.filter(e=>"Application Submitted"===e.applicationStatus);tp(a)}}catch(e){}finally{eH(!1)}},tW=async(e,t,a,i,n,l)=>{eH(!0);try{let c={applicationStage:0===n?"Pre-Project":1===n?"Pre-Approval":2===n?"Post-Project":3===n?"Payment":"",limit:a,page:i+1,...t&&{search:t},..."Service Provider"===eY.participantType&&{serviceProvider:localStorage.getItem("accountId")},...e.applicationType&&e.applicationType.length>0&&{applicationType:e.applicationType.join(",")},...e.applicationStatus&&e.applicationStatus.length>0&&{applicationStatus:e.applicationStatus.join(",")},...e.applicationState&&e.applicationState.length>0?{applicationState:e.applicationState.includes("Active")&&e.applicationState.includes("Inactive")?"true,false":!!e.applicationState.includes("Active")}:{applicationState:!1===l?"true":"true,false"},...e.date&&e.date.startDate&&e.date.endDate&&{fromDate:e.date.startDate,toDate:e.date.endDate}},s=await q.W.fetchAllMyApplications(c);if(!0===s.success){var o,r;ez(null==s||null==(o=s.data)?void 0:o.applications),eF(null==(r=s.data)?void 0:r.totalCount)}}catch(e){}finally{eH(!1)}},tV=k.useRef(null),tz=async e=>
1{em(e),tV.current&&clearTimeout(tV.current),eP(0),tV.current=setTimeout(async()=>{J().isEmpty(e)?tW(eT,"",eS,0,ed,eQ):tW(eT,e,eS,0,ed,eQ)},500)},tU=function(e,t,a){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"BPE",n={"Application Draft":!1===t?[B("myApplications.buttonText.reactivateApplication")]:"Service Provider"===eY.participantType&&"No"===a?[B("myApplications.buttonText.viewApplication")]:"RRI"===i?[B("myApplications.buttonText.completeApplication")]:[B("myApplications.buttonText.noActionNeeded"),B("myApplications.buttonText.viewApplication")],"Application Waitlisted":[B("myApplications.buttonText.viewApplication")],"Application Draft Submitted":!1===t?[B("myApplications.buttonText.reactivateApplication")]:[B("myApplications.buttonText.noActionNeeded"),B("myApplications.buttonText.viewApplication")],"Application Draft Under Review":!1===t?[B("myApplications.buttonText.reactivateApplication")]:[B("myApplications.buttonText.viewApplication")],"Application Information Requested":!1===t?[B("myApplications.buttonText.reactivateApplication")]:"Service Provider"===eY.participantType&&"No"===a?[B("myApplications.buttonText.viewApplication")]:[B("myApplications.buttonText.shareInformation"),B("myApplications.buttonText.viewApplication")],"Application Rejected":[B("myApplications.buttonText.noActionNeeded"),B("myApplications.buttonText.viewApplication")]},l=[B("myApplications.buttonText.completeApplication"),B("myApplications.buttonText.shareInformation"),B("myApplications.buttonText.noActionNeeded"),B("myApplications.buttonText.viewApplication"),B("myApplications.buttonText.reactivateApplication")],o=n[e]||[];return l.find(e=>o.includes(e))||B("myApplications.buttonText.viewApplication")},tH=(e,t,a)=>{let i={"Application Draft":!1===t?[B("myApplications.buttonText.reactivateApplication")]:(null==eY?void 0:eY.participantType)==="Service Provider"&&"No"===a?[B("myApplications.buttonText.viewApplication")]:[B("myApplications.buttonText.completeApplication")],"Application Submitted":!1===t?[B("myApplications.buttonText.reactivateApplication")]:[B("myApplications.buttonText.noActionNeeded"),B("myApplications.buttonText.viewApplication")],"Application Under Review":!1===t?[B("myApplications.buttonText.reactivateApplication")]:[B("myApplications.buttonText.viewApplication")],"Application Information Requested":!1===t?[B("myApplications.buttonText.reactivateApplication")]:(null==eY?void 0:eY.participantType)==="Service Provider"&&"No"===a?[B("myApplications.buttonText.viewApplication")]:[B("myApplications.buttonText.shareInformation"),B("myApplications.buttonText.viewApplication")],"Application Rejected":[B("myApplications.buttonText.noActionNeeded"),B("myApplications.buttonText.viewApplication")]},n=[B("myApplications.buttonText.completeApplication"),B("myApplications.buttonText.shareInformation"),B("myApplications.buttonText.noActionNeeded"),B("myApplications.buttonText.viewApplication"),B("myApplications.buttonText.reactivateApplication")],l=i[e]||[];return n.find(e=>l.includes(e))||B("myApplications.buttonText.viewApplication")},tq=(e,t,a,i)=>{let n=tk===(null==i?void 0:i.accountId),l={"Funding Recommended":!1===t?[B("myApplications.buttonText.reactivateApplication")]:[B("myApplications.buttonText.noActionNeeded"),B("myApplications.buttonText.viewApplication")],"Payee Details Pending":!1===t?[B("myApplications.buttonText.reactivateApplication")]:n?[B("myApplications.buttonText.sharePayeeDetails"),B("myApplications.buttonText.viewApplication")]:[B("myApplications.buttonText.noActionNeeded"),B("myApplications.buttonText.viewApplication")],"Payee Details Approved":!1===t?[B("myApplications.buttonText.reactivateApplication")]:[B("myApplications.buttonText.noActionNeeded"),B("myApplications.buttonText.viewApplication")],"Revise Payee Details":!1===t?[B("myApplications.buttonText.reactivateApplication")]:n?[B("myApplications.buttonText.revisePayeeDetails"),B("myApplications.buttonText.viewApplication")]:[B("myApplications.buttonText.noActionNeeded"),B("myApplications.buttonText.viewApplication")],"Payee Details Submitted":!1===t?[B("myApplications.buttonText.reactivateApplication")]:[B("myApplications.buttonText.noActionNeeded"),B("myApplications.buttonText.viewApplication")]},o=[B("myApplications.buttonText.sharePayeeDetails"),B("myApplications.buttonText.revisePayeeDetails"),B("myApplications.buttonText.reactivateApplication"),B("myApplications.buttonText.noActionNeeded"),B("myApplications.buttonText.viewApplication")],r=l[e]||[];return o.find(e=>r.includes(e))||B("myApplications.buttonText.viewApplication")},tY=!!(null==eu?void 0:eu.trim());return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(w(),{children:[(0,i.jsx)("meta",{name:"viewport",content:"initial-scale=1, width=device-width"}),(0,i.jsx)("title",{children:"BOMA Enspire | My Applications"}),(0,i.jsx)("meta",{name:"description",content:"BOMA Enspire participant portal. Manage your building profile, access resources, track applications, and engage with program initiatives."}),(0,i.jsx)("meta",{name:"keywords",content:"BOMA Enspire portal,building retrofit dashboard,program participant area, energy efficie
1ncy resources, building performance tracking"}),(0,i.jsx)("meta",{property:"og:title",content:"BOMA Enspire Program Portal"}),(0,i.jsx)("meta",{property:"og:description",content:"Access your participant dashboard to manage building profiles, track applications, and utilize program resources"}),(0,i.jsx)("meta",{property:"og:image",content:"https://bomaenspire.ca/_next/static/media/shutterstock.d7df94fd.svg"}),(0,i.jsx)("meta",{property:"og:url",content:"https://bomaenspire.ca/"}),(0,i.jsx)("meta",{property:"og:type",content:"website"}),(0,i.jsx)("meta",{name:"twitter:card",content:"summary"}),(0,i.jsx)("meta",{name:"twitter:title",content:"BOMA Enspire Program Portal"}),(0,i.jsx)("meta",{name:"twitter:description",content:"Your dashboard for managing building profiles, tracking applications, and accessing exclusive program resources."}),(0,i.jsx)("meta",{name:"twitter:image",content:"https://bomaenspire.ca/_next/static/media/shutterstock.d7df94fd.svg"})]}),_?(0,i.jsx)(X.A,{}):(0,i.jsxs)("div",{className:"w-full h-full flex px-1 md:px-[20px] space-y-5 overflow-y-auto flex-col",children:[(0,i.jsxs)("div",{className:"w-full",children:[(0,i.jsx)("div",{className:"relative w-full overflow-hidden rounded-2xl",children:(0,i.jsxs)("div",{className:"flex transition-transform duration-700 ease-in-out",style:{transform:"translateX(-".concat(100*Z,"%)")},children:[(0,i.jsxs)("div",{className:"w-full flex-shrink-0 min-w-full md:min-h-[228px] flex flex-col justify-center text-center px-4 md:px-10 py-10 space-y-5 bg-[linear-gradient(269.7deg,#6265A6_0.15%,#174992_99.63%)]",children:[(0,i.jsxs)("div",{className:"flex flex-row items-center justify-center gap-[10px] px-[15px] py-[5px] w-[280px] h-[35px] rounded-[10px]",style:{backgroundColor:I.palette.backgroundVariants.green},children:[(0,i.jsx)("div",{className:"w-[16px] h-[16px] rounded-full",style:{backgroundColor:I.palette.backgroundVariants.light}}),(0,i.jsx)(f.A,{variant:"mainH5",color:"grayColors.light",children:B("rriInitiatives.acceptingApplications")})]}),(0,i.jsx)(f.A,{variant:"mainH3",color:"primary.contrastText",children:B("rriInitiatives.title")}),(0,i.jsx)(f.A,{variant:"mainBody1",color:"primary.contrastText",children:B("rriInitiatives.description")})]}),(0,i.jsxs)("div",{className:"w-full flex-shrink-0 min-w-full md:min-h-[228px] flex flex-col justify-center text-center px-4 md:px-10 py-10 space-y-5 bg-[linear-gradient(269.7deg,#6265A6_0.15%,#174992_99.63%)]",children:[(0,i.jsxs)("div",{className:"flex flex-row items-center justify-center gap-[10px] px-[15px] py-[5px] w-[280px] h-[35px] rounded-[10px]",style:{backgroundColor:I.palette.backgroundVariants.red},children:[(0,i.jsx)("div",{className:"w-[16px] h-[16px] rounded-full",style:{backgroundColor:I.palette.backgroundVariants.light}}),(0,i.jsx)(f.A,{variant:"mainH5",color:"grayColors.light",children:B("myApplications.mainHeading")})]}),(0,i.jsx)(f.A,{variant:"mainH3",color:"primary.contrastText",children:B("myApplications.title")}),(0,i.jsx)(f.A,{variant:"mainBody1",color:"primary.contrastText",children:B("myApplications.description")})]})]})}),(0,i.jsx)("div",{className:"flex justify-center gap-2 mt-3",children:[0,1].map(e=>(0,i.jsx)("button",{onClick:()=>ee(e),className:"w-3 h-3 rounded-full transition-colors duration-300 ".concat(Z===e?"bg-[#174992]":"bg-gray-300")},e))})]}),(0,i.jsx)(h.A,{value:ed,onChange:(e,t)=>
1{ep(t),eP(0),ek(10),eb(!eA),ey(0),tW("",eu,10,0,t,eQ),t_(t)},"aria-label":"events status tab",variant:ej?"fullWidth":"scrollable",className:"w-full md:w-[815px] overflow-y-hidden",sx:{"& .MuiTabs-indicator":{backgroundColor:"#174992"},overflowY:"hidden"},children:Object.entries(eq).map((e,t)=>{let[a,n]=e;return(0,i.jsx)(y.A,{label:(0,i.jsx)(f.A,{variant:"mainH5",textTransform:"capitalize",children:n})},a)})}),(0,i.jsxs)("div",{className:"h-full w-full space-y-5",children:[(0,i.jsx)(V.dA,{className:"w-full md:space-y-0 space-y-5 flex flex-col md:flex-row",children:(0,i.jsxs)("div",{className:"flex flex-col md:flex-row justify-between w-full gap-4",children:[(0,i.jsx)(d.A,{className:"w-full md:flex-1".concat(3===ed&&tw?" md:max-w-[420px]":""),variant:"outlined",type:"text",size:"small",placeholder:B("myApplications.searchPlaceholder"),value:eu,onChange:e=>tz(e.target.value),sx:{"& .MuiInputBase-root":{maxHeight:46}},slotProps:{input:{startAdornment:(0,i.jsx)(p.A,{position:"start",className:"text-[".concat(I.palette.grayColors.dark,"]"),children:(0,i.jsx)(z.A,{})})}}},"user_name_key"),(0,i.jsxs)("div",{className:"flex flex-col md:flex-row justify-end w-full md:w-auto gap-4",children:[(0,i.jsx)(u.A,{control:(0,i.jsx)(Q.A,{checked:eQ,onChange:()=>{e0(!eQ),tW(eT,eu,eS,eN,ed,!eQ)}}),label:!1===eQ?B("hideAll"):B("showAll"),sx:{marginLeft:"10px","& .MuiFormControlLabel-label":{marginLeft:"8px",color:"#6C757D",fontSize:"14px"}}}),(0,i.jsx)($.A,{id:"My Applications-Start Application",children:(0,i.jsx)(r.A,{variant:"contained",className:"bg-[#8DC63F] hover:bg-[#8DC63F] h-[50px] rounded-[10px] min-w-[150px]",onClick:()=>{ec(null),ea(!0)},startIcon:(0,i.jsx)(F.A,{}),sx:{typography:I.typography.button3},children:B("myApplications.buttonText.startPreProject")})}),(0,i.jsx)($.A,{id:"My Applications-Filters",children:(0,i.jsx)(U.A,{disabled:(null==eV?void 0:eV.length)<1&&!ex,filtersApplied:ex.toString(),onClick:()=>{eg(!0)},count:eh})}),3===ed&&tw&&(0,i.jsx)(r.A,{variant:"outlined",onClick:()=>tP(!0),className:"rounded-[8px]",children:B("sharePayee.officerCertificateBulk.buttonText")})]})]})}),eU?(0,i.jsx)(X.A,{}):(null==eV?void 0:eV.length)>0?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"flex flex-wrap grow overflow-auto gap-[24px] overflow-y-auto bg-[".concat(I.palette.backgroundVariants.light,"] py-5 md:p-3 rounded-lg"),children:eV.map((e,t)=>{var a,n,l,o,r,c,s,d,p;let u=(null==e?void 0:e.applicationStage)==="Pre-Project"?tU(null==e?void 0:e.applicationStatus,null==e?void 0:e.applicationState,null==e?void 0:e.serviceProviderAccess,null==e?void 0:e.applicationType):(null==e?void 0:e.applicationStage)==="Pre-Approval"?((e,t,a)=>{let i={"Application Submitted":"Service Provider"===eY.participantType?[B("myApplications.buttonText.viewApplication")]:!1===t?[B("myApplications.buttonText.reactivateApplication")]:[B("myApplications.buttonText.startPostProject")],"Application Draft Submitted":[B("myApplications.buttonText.reactivateApplication")],"Application Draft Approved":!1===t?[B("myApplications.buttonText.reactivateApplication")]:"Service Provider"===eY.participantType?[B("myApplications.buttonText.viewApplication")]:[B("myApplications.buttonText.submitApplication")]},n=[B("myApplications.buttonText.startPostProject"),B("myApplications.buttonText.reactivateApplication"),B("myApplications.buttonText.submitApplication"),B("myApplications.buttonText.noActionNeeded")],l=i[e]||[];return n.find(e=>l.includes(e))||B("myApplications.buttonText.viewApplication")})(null==e?void 0:e.applicationStatus,null==e?void 0:e.applicationState,null==e||e.serviceProviderAccess):(null==e?void 0:e.applicationStage)==="Post-Project"?tH(null==e?void 0:e.applicationStatus,null==e?void 0:e.applicationState,null==e?void 0:e.serviceProviderAccess):(null==e?void 0:e.applicationStage)==="Payment"?tq(null==e?void 0:e.applicationStatus,null==e?void 0:e.applicationState,null==e?void 0:e.serviceProviderAccess,null==e?void 0:e.payee):"";return(0,i.jsx)(W.A,{index:t,children:(0,i.jsx)(L,{id:null==e?void 0:e._id,appId:null==e?void 0:e.applicationId,title:(null==e?void 0:e.stream)?null==e?void 0:e.stream:"Pending Project Stream",applicationStatus:null==e?void 0:e.applicationStatus,projectContactName:(null==e?void 0:e.projectContactName)?null==e?void 0:e.projectContactName:"Pending Project Contact Details",date:R.W.formatDateYYYYMMDD(null==e?void 0:e.createdAt),time:R.W.formatLocaleTime(null==e?void 0:e.createdAt),address:(null==e||null==(n=e.property)||null==(a=n.id)?void 0:a.propertyLocation)?null==e||null==(o=e.property)||null==(l=o.id)?void 0:l.propertyLocation:"-",propertyId:null==e||null==(r=e.property)?void 0:r.propertyId,fundingSupport:(null==e?void 0:e.calculatedEligibleAmount)?null==e?void 0:e.calculatedEligibleAmount:"-",recomendedFundingAmount:(null==e?void 0:e.reviewerRecomendedFundingAmount)?null==e?void 0:e.reviewerRecomendedFundingAmount:"-",grossFloorArea:(null==e||null==(s=e.property)||null==(c=s.id)?void 0:c.grossFloorAreaSft)?null==e||null==(p=e.property)||null==(d=p.id)?void 0:d.grossFloorAreaSft:"-",units:"Square Feet",status:(null==e?void 0:e.applicationState)===!0?"Active":"Inactive",payee:null==e?void 0:e.payee,buttonText:u,onButtonClick:()=>
1{if(u===B("myApplications.buttonText.reactivateApplication")){eZ(e),e$(!0);return}tU(null==e?void 0:e.applicationStatus,null==e?void 0:e.applicationState,null==e?void 0:e.serviceProviderAccess,null==e?void 0:e.applicationType)===B("myApplications.buttonText.completeApplication")&&"Pre-Project"===e.applicationStage&&(ec(e),ea(!0)),tH(null==e?void 0:e.applicationStatus,null==e?void 0:e.applicationState,null==e?void 0:e.serviceProviderAccess)===B("myApplications.buttonText.completeApplication")&&"Post-Project"===e.applicationStage&&(ec(e),eo(!0)),1===ed?(null==e?void 0:e.applicationStage)==="Pre-Approval"&&(u===B("myApplications.buttonText.submitApplication")?M.push("my-applications/".concat(null==e?void 0:e._id,"/submitApplication")):u===B("myApplications.buttonText.viewApplication")?M.push("/my-applications/".concat(null==e?void 0:e.applicationId)):u===B("myApplications.buttonText.startPostProject")&&(ec(e),e2(!0))):2===ed?(tH(null==e?void 0:e.applicationStatus,null==e?void 0:e.applicationState,null==e?void 0:e.serviceProviderAccess)===B("myApplications.buttonText.viewApplication")&&M.push("/my-applications/".concat(null==e?void 0:e.applicationId)),tH(null==e?void 0:e.applicationStatus,null==e?void 0:e.applicationState,null==e?void 0:e.serviceProviderAccess)===B("myApplications.buttonText.shareInformation")&&M.push("/my-applications/".concat(null==e?void 0:e.applicationId,"/post-project-shareInfo"))):3===ed?tq(null==e?void 0:e.applicationStatus,null==e?void 0:e.applicationState,null==e?void 0:e.serviceProviderAccess,null==e?void 0:e.payee)===B("myApplications.buttonText.sharePayeeDetails")?(ec(e),tm(!0)):tq(null==e?void 0:e.applicationStatus,null==e?void 0:e.applicationState,null==e?void 0:e.serviceProviderAccess,null==e?void 0:e.payee)===B("myApplications.buttonText.revisePayeeDetails")?(ec(e),tm(!1),tC(!0)):tH(null==e?void 0:e.applicationStatus,null==e?void 0:e.applicationState,null==e?void 0:e.serviceProviderAccess)===B("myApplications.buttonText.viewApplication")&&M.push("/my-applications/".concat(null==e?void 0:e.applicationId)):tU(null==e?void 0:e.applicationStatus,null==e?void 0:e.applicationState,null==e?void 0:e.serviceProviderAccess,null==e?void 0:e.applicationType)===B("myApplications.buttonText.viewApplication")&&M.push("/my-applications/".concat(null==e?void 0:e.applicationId)),(0===ed||1===ed)&&tU(null==e?void 0:e.applicationStatus,null==e?void 0:e.applicationState,null==e?void 0:e.serviceProvider,null==e?void 0:e.applicationType)===B("myApplications.buttonText.shareInformation")&&M.push("/my-applications/".concat(null==e?void 0:e.applicationId,"/shareInfo")),u===B("myApplications.buttonText.reactivateApplication")&&(eZ(e),e$(!0))},appStage:null==e?void 0:e.applicationStage,tier:null==e?void 0:e.bpePropertyTier},null==e?void 0:e._id)},null==e?void 0:e._id)})}),(0,i.jsx)(m.A,{rowsPerPageOptions:[10,25,50,100],component:"div",count:eD,rowsPerPage:eS,page:eN,onPageChange:(e,t)=>
1{eP(t),tW(eT,eu,eS,t,ed,eQ)},onRowsPerPageChange:e=>{let t=parseInt(e.target.value,10);ek(t),eP(0),setTimeout(()=>{tW(eT,eu,t,0,ed,eQ)},0)},labelRowsPerPage:"",sx:{overflowY:"hidden",overflowX:"auto",flexShrink:0,"& .MuiTablePagination-toolbar":{paddingLeft:{xs:"6px",sm:"16px"},justifyContent:"flex-start",minHeight:{xs:"48px",md:"52px"}},"& .MuiTablePagination-spacer":{display:"none"},"& .MuiTablePagination-selectLabel":{display:"none"},"& .MuiInputBase-root":{marginLeft:{xs:"4px",sm:"8px"},marginRight:{xs:"6px",sm:"32px"}},"& .MuiTablePagination-actions":{marginLeft:{xs:"2px !important",sm:"20px !important"}}}})]}):(0,i.jsx)(i.Fragment,{children:[0,1,2,3].includes(ed)&&(0,i.jsx)(x.A,{className:"w-full h-full text-center p-2 text-[13px] min-h-[200px] font-semibold flex flex-col items-center justify-center bg-[".concat(I.palette.backgroundVariants.accent,"]"),children:tY||ex||eh>0?(0,i.jsx)(i.Fragment,{children:""!==eu?(0,i.jsxs)("div",{children:[B("myApplications.nullSearchMessage")," ",(0,i.jsx)("br",{}),(0,i.jsx)(f.A,{className:"font-normal text-center max-w-[420px]",children:B("noRecordKnowledgeCenterSubTitle")})]}):(0,i.jsxs)("div",{children:[B("myApplications.nullMessage")," ",(0,i.jsx)("br",{}),(0,i.jsx)(f.A,{className:"font-normal text-center max-w-[420px]",children:B("myApplications.noApplicationsMessage")})]})}):(0,i.jsxs)(i.Fragment,{children:[0===ed&&(0,i.jsxs)(x.A,{children:[(0,i.jsx)(f.A,{variant:"mainH5",display:"block",gutterBottom:!0,children:B("myApplications.noApplicationsYet")}),(0,i.jsx)(f.A,{variant:"mainBody2",color:"textColors.meta",children:B("myApplications.startApplicationPrompt")})]}),1===ed&&(0,i.jsxs)(x.A,{children:[(0,i.jsx)(f.A,{variant:"mainH5",display:"block",gutterBottom:!0,children:B("myApplications.noApplicationsYet")}),(0,i.jsx)(f.A,{variant:"mainBody2",color:"textColors.meta",children:B("noCurrApplications")})]}),2===ed&&(0,i.jsxs)(x.A,{children:[(0,i.jsx)(f.A,{variant:"mainH5",display:"block",gutterBottom:!0,children:B("myApplications.noApplicationsYet")}),(0,i.jsx)(f.A,{variant:"mainBody2",color:"textColors.meta",children:B("appearApplications")})]}),3===ed&&(0,i.jsxs)(x.A,{children:[(0,i.jsx)(f.A,{variant:"mainH5",display:"block",gutterBottom:!0,children:B("myApplications.noApplicationsYet")}),(0,i.jsx)(f.A,{variant:"mainBody2",color:"textColors.meta",children:B("noPaymentAppSubMessage")})]})]})})})]})]}),et&&(0,i.jsx)(T.A,{isOpen:et,selectedApplication:er,applicationType:"RRI",onClose:()=>{ea(!1),ec(null),tW(eT,eu,eS,eN,ed,eQ)}}),(0,i.jsx)(en,{title:B("postProject.postProjectStart"),maxWidth:"sm",actionComponent:null,onClose:()=>{e2(!1)},show:e1,children:(0,i.jsxs)("div",{className:"flex flex-col space-y-4 md:space-y-8 p-[10px] rounded-[10px] md:min-h-[450px]",children:[(0,i.jsx)(f.A,{variant:"mainH5",color:"blueVariants.primary",textAlign:"center",children:(null==er?void 0:er.applicationId)?"Application ID:".concat(er.applicationId):""}),(0,i.jsx)(f.A,{variant:"mainBody1",color:"textColors.meta",textAlign:"center",children:B("postProject.modalSubHeading")}),(0,i.jsxs)("div",{className:"flex flex-col gap-[15px]",children:[(0,i.jsxs)("div",{className:"flex items-center gap-[10px]",children:[(0,i.jsx)(v.A,{className:"text-[".concat(I.palette.text.disabled,"]"),checked:e3,onChange:e=>e5(e.target.checked)}),(0,i.jsx)(f.A,{variant:"mainBody3",color:"text.primary",textAlign:"start",children:B("postProject.terms.term1")})]}),(0,i.jsxs)("div",{className:"flex items-center gap-[10px]",children:[(0,i.jsx)(v.A,{className:"text-[".concat(I.palette.text.disabled,"]"),checked:e8,onChange:e=>e4(e.target.checked)}),(0,i.jsx)(f.A,{variant:"mainBody3",color:"text.primary",textAlign:"start",children:B("postProject.terms.term2")})]}),(0,i.jsxs)("div",{className:"flex items-center gap-[10px]",children:[(0,i.jsx)(v.A,{className:"text-[".concat(I.palette.text.disabled,"]"),checked:e6,onChange:e=>e9(e.target.checked)}),(0,i.jsx)(f.A,{variant:"mainBody3",color:"text.primary",textAlign:"start",children:B("postProject.terms.term3")})]})]}),(0,i.jsxs)("div",{className:"flex flex-col md:flex-row gap-[10px] items-center justify-center w-full",children:[(0,i.jsx)(r.A,{variant:"outlined",onClick:()=>{e2(!1),e5(!1),e4(!1),e9(!1)},className:"border-[".concat(I.palette.backgroundVariants.green,"] hover:bg-[").concat(I.palette.backgroundVariants.green,"4d] hover:border-[").concat(I.palette.backgroundVariants.green,"] text-[").concat(I.palette.backgroundVariants.green,"] w-full md:w-[200px] h-[50px] rounded-[10px]"),children:B("cancel")}),(0,i.jsx)(r.A,{variant:"contained",disabled:tt,className:"bg-[".concat(I.palette.backgroundVariants.green,"] hover:bg-[").concat(I.palette.backgroundVariants.green,"] w-full md:w-[200px] h-[50px] rounded-[10px]"),onClick:()=>{e2(!1),ti(!0),e5(!1),e4(!1),e9(!1)},children:B("buttons.continue")})]})]})}),(0,i.jsx)(G.A,{title:B("postProject.postProjectStart"),isOpen:ta,primaryButtonTitle:"CANCEL",primaryButtonClick:()=>ti(!1),secondaryButtonTitle:"CONFIRM",secondaryButtonClick:e=>{tB()},isLoading:e7,children:(0,i.jsx)(x.A,{className:"w-full flex flex-col p-8 text-center",children:(0,i.jsxs)(f.A,{variant:"mainBody2",color:"textColors.meta",className:"text-center",children:[B("postProject.appplicationSubheading"),
1(null==er?void 0:er.applicationId)?"Application ID:".concat(er.applicationId):"",B("postProject.appplicationSubheading2")]})})}),ei&&(0,i.jsx)(el.A,{isOpen:ei,selectedApplication:er,applicationType:(null==er?void 0:er.applicationType)||"BPE",onClose:()=>{eo(!1),ec(null),Promise.all([tL(),tW(eT,eu,eS,eN,ed,eQ)])}}),(0,i.jsx)(H.A,{handlefilter:eA,open:ev,onClose:()=>{eg(!1)},setFilters:e=>{let t=0;Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length:e&&"object"==typeof e?t+=1:e&&(t+=1)}),ey(t),e?(ef(!0),eI(e)):(ef(!1),eI("")),eP(0),tW(e,eu,eS,0,ed,eQ)},filters:{componentFilters:{header:3===ed?B("myApplications.filters.appFundingDate"):B("myApplications.filters.appDate"),type:"date"},checkboxFilterList:[{header:B("myApplications.filters.appType"),filterKey:"applicationType",filterItemList:[{name:"Building Performance Excellence",_id:"BPE"},{name:"Retrofit Ready Initiative",_id:"RRI"}]},{header:B("myApplications.filters.appStatus"),filterKey:"applicationStatus",filterItemList:null==eB?void 0:eB.map(e=>{let t={};return t.name=e,t._id=e,t})}]}}),eK.type&&(0,i.jsx)("div",{className:"z-[9999]",children:(0,i.jsx)(Y.A,{type:eK.type,message:eK.message,handleToggle:!0})}),!et&&!ev&&(null==eY?void 0:eY.participantType)!=="Service Provider"&&(()=>{let e=()=>{tr(!1),ts(null)};return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)($.A,{id:"My Applications-Start Application",children:[(0,i.jsx)(r.A,{variant:"contained",onClick:e=>{ts(e.currentTarget),tr(!0)},className:"\n  hidden md:flex\n  fixed\n  ".concat(ej?"bottom-[120px] right-[80px]":"bottom-[90px] right-[70px]","\n  w-[60px] h-[60px]\n  bg-[").concat(I.palette.backgroundVariants.green,"] rounded-full\n  shadow-[0_2px_6px_2px_rgba(0,0,0,0.15)]\n  drop-shadow-[0_1px_2px_rgba(0,0,0,0.3)]\n  min-w-0 p-0\n  z-[999]\n  justify-center items-center\n  hover:bg-[").concat(I.palette.backgroundVariants.green,"]\n"),children:(0,i.jsx)(F.A,{className:"text-[".concat(I.palette.primary.contrastText,"] text-[36px]")})}),(0,i.jsxs)(c.A,{id:"floating-menu",open:to,onClose:e,anchorEl:tc,anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"right"},slotProps:{paper:{className:"w-[250px] py-0"}},children:[(0,i.jsx)(s.A,{onClick:()=>{ec(null),ea(!0),e()},className:"text-[14px] uppercase text-center justify-center py-2 px-2",sx:{"&:hover":{backgroundColor:I.palette.backgroundVariants.green,color:I.palette.primary.contrastText}},children:B("myApplications.buttonText.startPreProject")}),(0,i.jsx)(s.A,{onClick:()=>{ec(null),tl(!0),e()},className:"text-[14px] uppercase text-center justify-center py-2 px-2",sx:{"&:hover":{backgroundColor:I.palette.backgroundVariants.green,color:I.palette.primary.contrastText}},children:B("myApplications.buttonText.startPostProject")})]})]})})})(),(0,i.jsx)(G.A,{title:B("postProject.postProjectStart"),isOpen:tn,primaryButtonTitle:B("cancel"),primaryButtonClick:()=>{tl(!1),ty("")},secondaryButtonTitle:"PROCEED",secondaryButtonClick:e=>{tl(!1),e2(!0),ty("")},secondaryButtonDisabled:!th,children:(0,i.jsx)(x.A,{className:"w-full flex flex-col p-8 text-center items-center",children:eU?(0,i.jsx)("div",{className:"flex flex-col md:flex-row items-center px-[20px] py-[10px] max-h-[200px] w-full justify-center",children:(0,i.jsx)(X.A,{compact:!0})}):td.length>0?(0,i.jsxs)("div",{className:"rounded-[10px] flex flex-col md:flex-row items-center px-[20px] py-[10px]",style:{backgroundColor:I.palette.backgroundVariants.lighter},children:[(0,i.jsx)(f.A,{variant:"mainBody3",color:"textColors.meta",className:"text-start min-w-[170px] flex-0",children:B("postProject.selectAp
1plication")}),(0,i.jsx)(g.A,{labelId:"select-app-label",value:th,onChange:e=>{ty(e.target.value),ec(td.find(t=>t.applicationId===e.target.value)||null)},className:"w-full text-start flex-1",sx:{"& .MuiSelect-select .notranslate::after":{content:'"'.concat(B("postProject.selectApplication"),'"'),color:"grey",backgroundColor:"white"},"& .MuiSelect-select":{backgroundColor:"#174992",color:"white"},"& .MuiSelect-icon":{color:th?"white":"inherit"}},children:null==td?void 0:td.map(e=>(0,i.jsx)(s.A,{value:e.applicationId,className:"p-4",children:e.applicationId},e._id))})]}):(0,i.jsx)(x.A,{className:"w-full md:w-[90%] h-full text-center p-4 text-[13px] min-h-[100px] font-semibold flex flex-col items-center justify-center",style:{backgroundColor:I.palette.backgroundVariants.lighter},children:B("noApplication")})})}),eG&&(0,i.jsx)(A.A,{open:eX,onClose:()=>e$(!1),"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:(0,i.jsxs)(x.A,{className:"pt-[20px] pb-[20px]",children:[(0,i.jsx)(b.A,{id:"alert-dialog-title",variant:"mainH4",className:"pb-[40px] uppercase",children:B("postProject.reactivateApplication")}),(0,i.jsx)(j.A,{className:"pb-[30px] pl-[50px] pr-[50px]",children:(0,i.jsx)(C.A,{id:"alert-dialog-description",children:(0,i.jsxs)(f.A,{variant:"mainBody2",color:"textColors.meta",className:"text-center inline-block w-full mb-[20px]",children:[B("yourApplication")," ",(0,i.jsxs)("strong",{children:["#",null==eG?void 0:eG.applicationId]})," ",B("inactiveApplication")]})})}),(0,i.jsx)(N.A,{className:"flex justify-center",children:(0,i.jsx)(r.A,{variant:"outlined",className:"min-w-[140px] py-[15px] px-[30px] rounded-[10px] border border-[".concat(I.palette.backgroundVariants.green,"] text-[").concat(I.palette.backgroundVariants.green,"] font-medium hover:bg-transparent hover:border-[").concat(I.palette.backgroundVariants.green,"] hover:text-[").concat(I.palette.backgroundVariants.green,"]"),onClick:()=>{e$(!1)},children:B("postProject.goBack")})})]})}),(0,i.jsx)(es,{showChecklistPayeeModal:tu,onClose:()=>{tm(!1),tf([]),ec(null)},selectedApplication:er,payeeCheckedItems:tx,handleTogglePayeeCheckboxList:e=>{tf(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},handleProceedSharePayeeCheckList:()=>{tg(!0),tm(!1),tb(!1)},PayeeTerms:tI}),(0,i.jsx)(eC,{openPayeeDetailFormModal:tv,prefillFromApi:tA,onClose:()=>{tg(!1),tm(!1),tf([]),ec(null)},selectedApplication:er,onGoBack:()=>{tg(!1),tA||tm(!0)},onSuccess:()=>{tF(!0),tg(!1),tf([])}}),(0,i.jsx)(eE,{open:tN,onClose:()=>tP(!1),showToast:tT}),(0,i.jsx)(ew,{openRevisePayeeDetailReasonModal:tj,selectedApplication:er,onClose:()=>{tC(!1),ec(null)},onUpdate:async()=>{tC(!1),tg(!0),tb(!0)}}),(0,i.jsx)(e_,{succesPaayeeDetailModal:tD,setSuccessPayeeDetailModal:tF,selectedApplication:er,onConfirm:()=>{tF(!1),tg(!1),tW(eT,eu,eS,eN,ed,eQ),ec(null)}})]})};eL.getLayout=function(e){return(0,i.jsx)(n.A,{breadcrumbs:[],title:(0,Z.t)("pages.myApplications"),secondaryText:(0,Z.t)("secondaryText.myApplications"),children:e})};let eW=eL}},e=>{e.O(0,[3716,9422,4808,6486,7675,8383,5820,3417,6716,7008,406,9662,305,4176,7001,6063,3531,7985,4802,927,6915,5059,735,1834,9655,636,6593,8792],()=>e(e.s=2273)),_N_E=e.O()}]);

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.