@zeniai/web-app-ui 5.1.15-qa → 5.1.16-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/dist/assets/AddressRoutes-B5vhUf_a.js +1 -0
  2. package/dist/assets/{AddressScreen-XfX1kp62.js → AddressScreen-DBouO1VO.js} +2 -2
  3. package/dist/assets/{AiCfoScreen-x5NHCHRo.js → AiCfoScreen-aXbJ6KSx.js} +1 -1
  4. package/dist/assets/{BillPayApprovalRoutes-CFQgShwe.js → BillPayApprovalRoutes-B5D_PAjl.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-DvTUP6rq.js → BillPayRoutes-FFIKyMFm.js} +11 -11
  6. package/dist/assets/{BusinessVerificationPageScreen-Dj41dw8l.js → BusinessVerificationPageScreen-TnL4anaK.js} +2 -2
  7. package/dist/assets/{ChargeCardRoutes-BQne54x9.js → ChargeCardRoutes-BY6tS3Wb.js} +1 -1
  8. package/dist/assets/{CompanyPassportScreen-CAC-cT_8.js → CompanyPassportScreen-bH4fNATt.js} +1 -1
  9. package/dist/assets/{ConnectionAuthScreen-tD0_PtVP.js → ConnectionAuthScreen-CMk95vCD.js} +1 -1
  10. package/dist/assets/CustomerOnboardingAuthScreen-DQxGGH-q.js +1 -0
  11. package/dist/assets/{CustomerOnboardingRoutes-D3ESAcUa.js → CustomerOnboardingRoutes-BhhCxfgh.js} +4 -4
  12. package/dist/assets/{DashboardRoutes-DQ1Dp9uI.js → DashboardRoutes-40IT1Z0g.js} +1 -1
  13. package/dist/assets/{DefaultTenantHome-jK-v7jep.js → DefaultTenantHome-B9JgziWy.js} +1 -1
  14. package/dist/assets/{DomesticWireDetailScreen-Cbv4IV8n.js → DomesticWireDetailScreen-9HJqc589.js} +3 -3
  15. package/dist/assets/DrawerScreen-BybsWSA5.js +1 -0
  16. package/dist/assets/EntityDetailRoutes-BUvOPb-7.js +1 -0
  17. package/dist/assets/{ExpenseAutomationRoutes-eCkx5Ut6.js → ExpenseAutomationRoutes-Brjv5P_k.js} +3 -3
  18. package/dist/assets/FeaturePreviewScreen-Bphl5iMx.js +1 -0
  19. package/dist/assets/{HubSpotOAuthCallbackScreen-D9RslBQV.js → HubSpotOAuthCallbackScreen-D-Ds4I7w.js} +1 -1
  20. package/dist/assets/{MagicLinkRoutes-PvUwhqYz.js → MagicLinkRoutes-Db0vw5Xy.js} +18 -18
  21. package/dist/assets/{MagicLinkSignInScreen-BG8fbosP.js → MagicLinkSignInScreen-BXCAHwMh.js} +1 -1
  22. package/dist/assets/{MobileAppDrawer-xuap2lNE.js → MobileAppDrawer-CC3m6ocd.js} +1 -1
  23. package/dist/assets/NotFoundScreen-s_JkYzit.js +1 -0
  24. package/dist/assets/{NotificationRoutes-Di2OqF18.js → NotificationRoutes-G_I_Fqq4.js} +1 -1
  25. package/dist/assets/OAuthConsentScreen-B6lC7aDz.js +1 -0
  26. package/dist/assets/{PandLWithForecastRoutes-Db7fCkIK.js → PandLWithForecastRoutes-BebAbrxn.js} +1 -1
  27. package/dist/assets/{PeopleRoutes-Cy-egEbq.js → PeopleRoutes-BDcKbU9-.js} +3 -3
  28. package/dist/assets/PerformanceRoutes-DPRRdEyH.js +1 -0
  29. package/dist/assets/{Preview-CY8yGmDF.js → Preview-66XUlFvA.js} +1 -1
  30. package/dist/assets/{QBOConnectionScreen-lGQVRIlH.js → QBOConnectionScreen-BKWCwccg.js} +1 -1
  31. package/dist/assets/ReferralListScreen-CYkdj1RR.js +5 -0
  32. package/dist/assets/{ReimbursementApprovalRoutes-BZFWQG9c.js → ReimbursementApprovalRoutes-Bp_J5FzR.js} +1 -1
  33. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-De84Dj6E.js → ReimbursementApprovalRuleDetailScreen-B9EiOv54.js} +1 -1
  34. package/dist/assets/{ReimbursementRoutes-xYPgAD9q.js → ReimbursementRoutes-B1Nl-zRm.js} +4 -4
  35. package/dist/assets/{ReportsRoutes-QDUa8Ybd.js → ReportsRoutes-C3b86U_H.js} +1 -1
  36. package/dist/assets/RewardsRoutes-DTPnLY3t.js +1 -0
  37. package/dist/assets/{ScreenRoutes-B3FC1KKK.js → ScreenRoutes-D89vz8Oi.js} +2 -2
  38. package/dist/assets/{SettingsRoutes-CD1kUlcH.js → SettingsRoutes-D5MRBSK0.js} +1 -1
  39. package/dist/assets/{SetupPagesScreen-DDSG8uf9.js → SetupPagesScreen-BoBhqmkV.js} +5 -5
  40. package/dist/assets/{SignInScreen-syjJmQAD.js → SignInScreen-D_bTvPFM.js} +1 -1
  41. package/dist/assets/{SignOutScreen-CCviEJSl.js → SignOutScreen-CpmpaRrq.js} +1 -1
  42. package/dist/assets/{TaskListScreen-e2ILo3-4.js → TaskListScreen-BMzL57Bz.js} +2 -2
  43. package/dist/assets/{TaskRoutes-Cu0lgdyi.js → TaskRoutes-C81rJJIj.js} +2 -2
  44. package/dist/assets/{TransactionDetailRoutes-CBSFri2k.js → TransactionDetailRoutes-BzmMWScT.js} +1 -1
  45. package/dist/assets/{TransactionDetailScreen-F9A6USKI.js → TransactionDetailScreen-BJQjuEtN.js} +2 -2
  46. package/dist/assets/{TransactionListRoutes-DRbZmMNG.js → TransactionListRoutes-85ND4ehv.js} +1 -1
  47. package/dist/assets/{TreasuryRoutes-BOLsgAFV.js → TreasuryRoutes-3aQLHcRb.js} +5 -5
  48. package/dist/assets/{VendorsRoutes-CMthxQkB.js → VendorsRoutes-khWvhYOg.js} +1 -1
  49. package/dist/assets/WiseConfirmationScreen-BS1xn_5k.js +12 -0
  50. package/dist/assets/{ZeniAccountRoutes-DHbpnSAQ.js → ZeniAccountRoutes-CGvM8YX_.js} +11 -11
  51. package/dist/assets/ZeniAccountStatementScreen-FvmVdq9p.js +9 -0
  52. package/dist/assets/{accountMappingHelper-BXM5BmBC.js → accountMappingHelper-C4AkxjBv.js} +1 -1
  53. package/dist/assets/{analytics-B8luzlgO.js → analytics-BF065rkR.js} +1 -1
  54. package/dist/assets/{analyticsHelper-D1azBz5I.js → analyticsHelper-_j1-XtaH.js} +1 -1
  55. package/dist/assets/{core-hvWPs2BT.js → core-DYMASrCh.js} +1 -1
  56. package/dist/assets/{decodeURIComponentSafe-DNWFxSVm.js → decodeURIComponentSafe-D5DqYXdU.js} +1 -1
  57. package/dist/assets/{dnd-o-askzEj.js → dnd-CRD-B3s8.js} +1 -1
  58. package/dist/assets/{empty-ljDb8rQ7.js → empty-IVFtS8fQ.js} +1 -1
  59. package/dist/assets/{empty-B82_IWTi.js → empty-lbtKgQje.js} +1 -1
  60. package/dist/assets/{emptyVideoElement-6N2QhoT0.js → emptyVideoElement-C4sSXFWP.js} +1 -1
  61. package/dist/assets/{epic-D-6jma-n.js → epic-06cV1AWQ.js} +1 -1
  62. package/dist/assets/{getLocaleForTenant-CS9Lb4sj.js → getLocaleForTenant-DpqPZP9g.js} +1 -1
  63. package/dist/assets/{index-DMjYSAPV.js → index-9GNLj45_.js} +1 -1
  64. package/dist/assets/{index-C3hO3Q77.js → index-BHo22hBN.js} +8 -9
  65. package/dist/assets/{index-BllzniH0.js → index-C1vSwCiO.js} +1 -1
  66. package/dist/assets/{index-Ddf8OgPt.js → index-C5lWaLVP.js} +1 -1
  67. package/dist/assets/{index-CCzAyR4f.js → index-Co30SmGl.js} +2 -2
  68. package/dist/assets/{index-CYY55Wnh.js → index-Deprigob.js} +1 -1
  69. package/dist/assets/{index-oQjFSd94.js → index-R4-cuc1t.js} +1 -1
  70. package/dist/assets/{index-Cwg_Y7fA.js → index-zqRFpa6m.js} +1 -1
  71. package/dist/assets/{lexical-DqrCfay7.js → lexical-B6vQ07gu.js} +1 -1
  72. package/dist/assets/{liveblocks-jYXQYs7P.js → liveblocks-C5h4gZcw.js} +1 -1
  73. package/dist/assets/{lottie-BLlGs_6Q.js → lottie-CB2hfJTV.js} +1 -1
  74. package/dist/assets/{mui-CeHC_BmF.js → mui-DU2Ylp5t.js} +1 -1
  75. package/dist/assets/{pathToGoBack-MsNMGBDu.js → pathToGoBack-C3wo5yar.js} +1 -1
  76. package/dist/assets/{pdf-Cl92kK1w.js → pdf-DkjHIM4s.js} +3 -3
  77. package/dist/assets/{pdf-lib-BadVnXbc.js → pdf-lib-ZvmhOCui.js} +1 -1
  78. package/dist/assets/{plaid-Byy7X9QI.js → plaid-C8pIAKRb.js} +1 -1
  79. package/dist/assets/{pusher-DYBPzr6x.js → pusher-BXx1_xap.js} +1 -1
  80. package/dist/assets/{react-DLttYMD6.js → react--ixl0RH1.js} +1 -1
  81. package/dist/assets/{react-BJJY8Rpp.js → react-BFHcVKHq.js} +1 -1
  82. package/dist/assets/{react-Cqi33cD_.js → react-BiPsIo7k.js} +1 -1
  83. package/dist/assets/{react-BTe_wt6i.js → react-CAZmN7nA.js} +1 -1
  84. package/dist/assets/{react-BpHZFHe_.js → react-CVMbkEJu.js} +1 -1
  85. package/dist/assets/{react-D9cAGMq-.js → react-DtOSzLW9.js} +1 -1
  86. package/dist/assets/{recharts-C4CmAqBJ.js → recharts-Bs0ZBuwz.js} +1 -1
  87. package/dist/assets/{routePaths-BgS6eID-.js → routePaths-BF6NDp7Z.js} +1 -1
  88. package/dist/assets/{sentry-BSVS1PdG.js → sentry-bxHUuQF3.js} +1 -1
  89. package/dist/assets/{url-CQaynP8g.js → url-DRrgCaIA.js} +1 -1
  90. package/dist/assets/{url-DhDn0d1t.js → url-Y9mKri7j.js} +1 -1
  91. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-C0bGttFg.js → useAiCfoDashboardSuggestedQuestionsChips-RT4mJ366.js} +1 -1
  92. package/dist/assets/useAskAiCfoHostNavButtonProps-6Bz-IzWM.js +1 -0
  93. package/dist/assets/{useDeviceId-BksjOci6.js → useDeviceId-KonxiFyE.js} +1 -1
  94. package/dist/assets/{useInitialThreadRequest-DiOtjijO.js → useInitialThreadRequest-DW9MWJGL.js} +1 -1
  95. package/dist/assets/{utils-4kl_5TF9.js → utils-Cry9nEwK.js} +1 -1
  96. package/dist/assets/{withTransactionSidePanel-DT0mq7yA.js → withTransactionSidePanel-DyR_oiJH.js} +3 -3
  97. package/dist/assets/{zeni-epic-state-B5RvQRIo.js → zeni-epic-state-901GvRjQ.js} +3 -3
  98. package/dist/index.html +1 -1
  99. package/package.json +2 -2
  100. package/dist/assets/AddressRoutes-DzAh-Dhn.js +0 -1
  101. package/dist/assets/CustomerOnboardingAuthScreen-GjLQh__S.js +0 -1
  102. package/dist/assets/DrawerScreen-DVdaRr3g.js +0 -1
  103. package/dist/assets/EntityDetailRoutes-Kipeu5Q3.js +0 -1
  104. package/dist/assets/FeaturePreviewScreen-DS9Qs3mU.js +0 -1
  105. package/dist/assets/NotFoundScreen-Meha4IJ4.js +0 -1
  106. package/dist/assets/OAuthConsentScreen-CU5b2HNK.js +0 -1
  107. package/dist/assets/PerformanceRoutes-BxAGMKVU.js +0 -1
  108. package/dist/assets/ReferralListScreen-CHrbkzB9.js +0 -5
  109. package/dist/assets/RewardsRoutes-BB6GIYJQ.js +0 -1
  110. package/dist/assets/WiseConfirmationScreen-BD59hJgA.js +0 -12
  111. package/dist/assets/ZeniAccountStatementScreen-CJf3N25S.js +0 -9
  112. package/dist/assets/useAskAiCfoHostNavButtonProps-DhVdwSwf.js +0 -1
@@ -1,4 +1,4 @@
1
- import{j as e}from"./liveblocks-jYXQYs7P.js";import{h as B,g as U,u as P,i as V,j as f,N as L,n as M,o as Te,p as k}from"./core-hvWPs2BT.js";import{cm as N,eP as D,NM as O,DS as ae,fh as H,DA as ne,NO as we,DV as Ie,NK as Ce,NL as se,O1 as ke,C0 as je,sP as be,NQ as Ae,E4 as Ee,NN as re,cO as Z,wX as oe,eY as ve,e_ as De,OX as Fe,OY as Le,DB as Be,OZ as Ue,DC as Pe,DL as Oe,bt as Re,bF as Ve,cx as Me,bG as Ne,cl as _e,fg as ze,bs as Ge,Jq as $e,ck as qe}from"./zeni-epic-state-B5RvQRIo.js";import{k as _,aq as He,z as A,G as z,c as j,c5 as Ze,c6 as Je,c7 as q,J,h as Xe,V as Ke,X as We,v as ie,I as v,x as Ye,B as Qe,c8 as et,at as X,n as tt,c9 as at,p as K,ca as nt,E as Y,cb as st,a9 as rt}from"./index-C3hO3Q77.js";import{D as ot,n as R,S as it}from"./mui-CeHC_BmF.js";import ct from"./NotFoundScreen-Meha4IJ4.js";import{S as Q}from"./SetupPagesScreen-DDSG8uf9.js";import{a as d}from"./sentry-BSVS1PdG.js";import{u as lt}from"./useAskAiCfoHostNavButtonProps-DhVdwSwf.js";import{u as ut}from"./useInitialThreadRequest-DiOtjijO.js";import{M as ce}from"./MobileAppDrawer-xuap2lNE.js";import{F as dt}from"./FeaturePreviewScreen-DS9Qs3mU.js";import{a as ee}from"./analyticsHelper-D1azBz5I.js";import"./recharts-C4CmAqBJ.js";import"./analytics-B8luzlgO.js";import"./plaid-Byy7X9QI.js";import"./dnd-o-askzEj.js";import"./stripe-DMRn4zHo.js";import"./lottie-BLlGs_6Q.js";import"./lexical-DqrCfay7.js";import"./pdf-Cl92kK1w.js";import"./utils-4kl_5TF9.js";import"./routePaths-BgS6eID-.js";import"./BusinessVerificationPageScreen-Dj41dw8l.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="25c7e747-9073-4c50-9d8b-68c82016e8eb",t._sentryDebugIdIdentifier="sentry-dbid-25c7e747-9073-4c50-9d8b-68c82016e8eb")}catch{}})();const pt=M(function(t,a){const{companyId:n}=a;return{treasurySetupView:O(t,n),analytics:j}},function(t,a){const{navigate:n,analytics:o,treasurySetupView:p}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=p.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(Ie(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(we(r))}}})(Ze);function mt(){const t=B(),a=U(),n=P(),{tenantEmailDomain:o}=V(),p=_(),r=f(C=>C.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=He(r),s=N(p?.loggedInUserRoleMap),[l,i]=d.useState(!1),[g,I]=d.useState(!1),[u,c]=d.useState(!1),h=f(C=>D(C)),y=A.getSignedInUserTenant(o)?.companyId??h.companyId,T=A.getSignedInUser(),S=f(C=>O(C,y)),w=f(C=>C.treasurySetupViewState.fetchState),x=f(C=>C.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=f(C=>C.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(T==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{l||w!=="Not-Started"||y==null||(i(!0),n(ae(y,!0,!1)))},[l,w,y,n]),d.useEffect(()=>{u||F!=="Not-Started"||y==null||(c(!0),n(H()))},[u,F,y,n]),d.useEffect(()=>{g||x!=="Not-Started"||y==null||(I(!0),n(ne()))},[g,x,y,n]),d.useEffect(()=>{m==="In-Progress"&&r==="Completed"&&t("../")},[m,r,t]),h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(L,{to:"../promo"});const E=h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||w!=="Completed";return e.jsxs(e.Fragment,{children:[!E&&e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(pt,{navigate:t,location:a,companyId:y,isEditMode:!0,isLoading:E,isReadOnly:!s,treasurySetupView:S,analytics:j})]})}const ft=M(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:ke(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:O(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{q(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{q(a.analytics,"confirm",r,m,"Transfer"),t(Ee())},onSaveChangesToLocalStore:s=>{t(Ae(s))},onFetchLinkTokenClick:s=>{t(be("treasury_setup",s))},onEstablishConnectionClick:s=>{t(je(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(Je),yt=({isFirstTransfer:t})=>{const a=B(),{tenantEmailDomain:n}=V(),o=P(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[l,i]=d.useState(!1),[g,I]=d.useState(!1),u=f(x=>x.treasurySetupViewState.fetchState),c=f(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),h=f(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),y=f(x=>D(x)),T=A.getSignedInUserTenant(n)?.companyId??y.companyId,S=f(x=>Ce(x)),w=f(x=>O(x,T));if(A.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||T==null||(s(!0),o(ae(T,!0,!1)))},[m,u,T,o]),d.useEffect(()=>{l||c!=="Not-Started"||T==null||(i(!0),o(H()))},[l,c,T,o]),d.useEffect(()=>{g||h!=="Not-Started"||T==null||(I(!0),o(ne()))},[g,h,T,o]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(ft,{analytics:j,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:y,treasurySetupView:w,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{q(j,"review",S.treasuryTransferMoneyLocalData,w.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},gt=R.div`
1
+ import{j as e}from"./liveblocks-C5h4gZcw.js";import{h as B,g as U,u as P,i as V,j as f,N as L,n as M,o as Te,p as k}from"./core-DYMASrCh.js";import{cm as N,eP as D,NM as O,DS as ae,fh as H,DA as ne,NO as we,DV as Ie,NK as Ce,NL as se,O1 as ke,C0 as je,sP as Ae,NQ as be,E4 as Ee,NN as re,cO as Z,wX as oe,eY as ve,e_ as De,OX as Fe,OY as Le,DB as Be,OZ as Ue,DC as Pe,DL as Oe,bt as Re,bF as Ve,cx as Me,bG as Ne,cl as _e,fg as ze,bs as Ge,Jq as $e,ck as qe}from"./zeni-epic-state-901GvRjQ.js";import{k as _,aq as He,z as b,x as z,c as j,c5 as Ze,c6 as Je,c7 as q,J,h as Ye,V as Ke,Y as We,v as ie,I as v,A as Xe,B as Qe,c8 as et,at as Y,m as tt,c9 as at,j as K,ca as nt,E as X,cb as st,a9 as rt}from"./index-BHo22hBN.js";import{D as ot,n as R,S as it}from"./mui-DU2Ylp5t.js";import ct from"./NotFoundScreen-s_JkYzit.js";import{S as Q}from"./SetupPagesScreen-BoBhqmkV.js";import{a as d}from"./sentry-bxHUuQF3.js";import{u as lt}from"./useAskAiCfoHostNavButtonProps-6Bz-IzWM.js";import{u as ut}from"./useInitialThreadRequest-DW9MWJGL.js";import{M as ce}from"./MobileAppDrawer-CC3m6ocd.js";import{F as dt}from"./FeaturePreviewScreen-Bphl5iMx.js";import{a as ee}from"./analyticsHelper-_j1-XtaH.js";import"./recharts-Bs0ZBuwz.js";import"./analytics-BF065rkR.js";import"./plaid-C8pIAKRb.js";import"./dnd-CRD-B3s8.js";import"./stripe-DMRn4zHo.js";import"./lottie-CB2hfJTV.js";import"./lexical-B6vQ07gu.js";import"./pdf-DkjHIM4s.js";import"./utils-Cry9nEwK.js";import"./routePaths-BF6NDp7Z.js";import"./BusinessVerificationPageScreen-TnL4anaK.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="e1a75051-d220-4651-91f1-ed5950ed4158",t._sentryDebugIdIdentifier="sentry-dbid-e1a75051-d220-4651-91f1-ed5950ed4158")}catch{}})();const pt=M(function(t,a){const{companyId:n}=a;return{treasurySetupView:O(t,n),analytics:j}},function(t,a){const{navigate:n,analytics:o,treasurySetupView:p}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=p.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(Ie(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(we(r))}}})(Ze);function mt(){const t=B(),a=U(),n=P(),{tenantEmailDomain:o}=V(),p=_(),r=f(C=>C.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=He(r),s=N(p?.loggedInUserRoleMap),[l,i]=d.useState(!1),[g,I]=d.useState(!1),[u,c]=d.useState(!1),h=f(C=>D(C)),y=b.getSignedInUserTenant(o)?.companyId??h.companyId,T=b.getSignedInUser(),S=f(C=>O(C,y)),w=f(C=>C.treasurySetupViewState.fetchState),x=f(C=>C.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=f(C=>C.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(T==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{l||w!=="Not-Started"||y==null||(i(!0),n(ae(y,!0,!1)))},[l,w,y,n]),d.useEffect(()=>{u||F!=="Not-Started"||y==null||(c(!0),n(H()))},[u,F,y,n]),d.useEffect(()=>{g||x!=="Not-Started"||y==null||(I(!0),n(ne()))},[g,x,y,n]),d.useEffect(()=>{m==="In-Progress"&&r==="Completed"&&t("../")},[m,r,t]),h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(L,{to:"../promo"});const E=h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||w!=="Completed";return e.jsxs(e.Fragment,{children:[!E&&e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(pt,{navigate:t,location:a,companyId:y,isEditMode:!0,isLoading:E,isReadOnly:!s,treasurySetupView:S,analytics:j})]})}const ft=M(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:ke(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:O(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{q(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{q(a.analytics,"confirm",r,m,"Transfer"),t(Ee())},onSaveChangesToLocalStore:s=>{t(be(s))},onFetchLinkTokenClick:s=>{t(Ae("treasury_setup",s))},onEstablishConnectionClick:s=>{t(je(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(Je),yt=({isFirstTransfer:t})=>{const a=B(),{tenantEmailDomain:n}=V(),o=P(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[l,i]=d.useState(!1),[g,I]=d.useState(!1),u=f(x=>x.treasurySetupViewState.fetchState),c=f(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),h=f(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),y=f(x=>D(x)),T=b.getSignedInUserTenant(n)?.companyId??y.companyId,S=f(x=>Ce(x)),w=f(x=>O(x,T));if(b.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||T==null||(s(!0),o(ae(T,!0,!1)))},[m,u,T,o]),d.useEffect(()=>{l||c!=="Not-Started"||T==null||(i(!0),o(H()))},[l,c,T,o]),d.useEffect(()=>{g||h!=="Not-Started"||T==null||(I(!0),o(ne()))},[g,h,T,o]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(ft,{analytics:j,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:y,treasurySetupView:w,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{q(j,"review",S.treasuryTransferMoneyLocalData,w.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},gt=R.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -6,7 +6,7 @@ import{j as e}from"./liveblocks-jYXQYs7P.js";import{h as B,g as U,u as P,i as V,
6
6
  flex-direction: column;
7
7
  align-items: center;
8
8
  background-color: ${t=>t.theme.colors.grey4};
9
- `,ht={overlayWidth:new Ye(100,100,48)},St=M(function(t,a){const n=re(t),{companyId:o}=a;return{treasuryDetail:n,treasurySetupView:O(t,o),downloadEndPoint:`${X.bankingMicroServiceBaseUrl}/1.0/treasury-account/statements?query={"statement_type":"tax_statement"}`}},function(t,a){const{navigate:n,currentTenant:o,location:p,handleDrawerToggle:r,analytics:m}=a,{tenantEmailDomain:s}=o;return{onSettingsClick:()=>{m.trackAccountsListPageClicked("Settings Icon"),n("setup")},onReloadTransactions:()=>{t(oe(!0))},handleTreasuryOptionSelection:l=>{let i="page-not-found";l==="editPortfolio"?i=xt(s):l==="statements"?i=Tt(s):l==="taxLetter"?i=wt(s):l==="settings"&&(i=It(s));const g=tt(p.state?.pathnameStackToGoBack,p.pathname);n(i,{state:{pathnameStackToGoBack:g}})},onColumnSortConfigChanged:(l,i)=>{t(Fe({uiState:{sortKey:l,sortOrder:i}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{r(!0)},onAutoTransferClick:()=>{n("../../checking/auto-transfer")}}})(et);function $({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=U(),o=B(),p=P(),r=J(),m=Xe(),s=f(b=>D(b)),{tenantEmailDomain:l}=V(),i=s.companyId??A.getSignedInUserTenant(l)?.companyId,[g,I]=d.useState(!1),u=f(b=>re(b)),c=u.fetchState,h=u.accountSummary?.totalBalance?.amount,y=f(b=>b.treasurySetupViewState.treasuryFundsDetails?.fetchStatus),T=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",S=_(),w=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=N(S?.loggedInUserRoleMap),F=Z(S?.loggedInUserRoleMap),{areTenantIdsInSync:E}=Ke();d.useEffect(()=>{c==="Not-Started"&&!g&&E&&(I(!0),p(oe(!0)))},[g,p,c,E]),d.useEffect(()=>{u.transactionsFetchState.fetchState==="Completed"&&u.transactions.length===0&&!n.pathname.includes("transfer")&&x&&o("./transfer")},[u.transactionsFetchState.fetchState,u.transactions.length]);const C=()=>{o("..")},[le,ue]=d.useState(!1),W=b=>{ue(b)},{isAiCfoAccessEnabled:de,onAskAiCfoClick:pe}=lt({mobileExploreReferrer:"Treasury"});We({isDataReady:c==="Completed"});const{useFeatureGate:G}=ie(),{isFeatureEnabled:me}=G(v.isDebitCardFeatureEnabled),{isFeatureEnabled:fe}=G(v.isAutoTransferRuleEnabled),{isFeatureEnabled:ye}=G(v.isTreasuryCommentingEnabled),ge=ut(i,{clearParams:c==="Completed"&&y?.fetchState==="Completed"}),he=ve(s),Se=De(me,s);if(he===!0&&Se!==!0)return e.jsx(dt,{});if(T){const b=y?.fetchState!=="Completed"||u.accountSummaryFetchState.fetchState!=="Completed";return e.jsxs(e.Fragment,{children:[u.accountSummaryFetchState.fetchState==="Completed"&&y?.fetchState==="Completed"&&t===!1&&a===!1?e.jsx(z,{analytics:j,onLoad:()=>{}}):null,e.jsx(ot,{onClose:C,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:ht.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:m.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(Ct,{onClick:xe=>xe.stopPropagation(),children:[t===!0?e.jsx(yt,{isFirstTransfer:u.transactions.length===0||h===0}):null,a===!0?e.jsx(mt,{}):null]})}),e.jsxs(gt,{windowSize:r,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:W}),e.jsx(St,{treasuryDetailsView:u,isAutoTransferRuleEnabled:fe,navigate:o,currentTenant:s,location:n,companyId:i,analytics:j,isTreasuryCommentingEnabled:ye,handleDrawerToggle:W,initialOpenThreadRequest:ge,isLoading:b,isAiCfoAccessEnabled:de,onAskAiCfoClick:pe})]})]})}return w&&x?e.jsx(L,{to:"../setup"}):s.companyTreasuryInfo?.info&&!w&&F?e.jsx(L,{to:"../promo",state:n.state}):e.jsx(Qe,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const xt=t=>`/${t}/treasury/edit-portfolio`,Tt=t=>`/${t}/treasury/statements`,wt=t=>`/${t}/treasury/tax-letter`,It=t=>`/${t}/treasury/setup`,Ct=R(it)`
9
+ `,ht={overlayWidth:new Xe(100,100,48)},St=M(function(t,a){const n=re(t),{companyId:o}=a;return{treasuryDetail:n,treasurySetupView:O(t,o),downloadEndPoint:`${Y.bankingMicroServiceBaseUrl}/1.0/treasury-account/statements?query={"statement_type":"tax_statement"}`}},function(t,a){const{navigate:n,currentTenant:o,location:p,handleDrawerToggle:r,analytics:m}=a,{tenantEmailDomain:s}=o;return{onSettingsClick:()=>{m.trackAccountsListPageClicked("Settings Icon"),n("setup")},onReloadTransactions:()=>{t(oe(!0))},handleTreasuryOptionSelection:l=>{let i="page-not-found";l==="editPortfolio"?i=xt(s):l==="statements"?i=Tt(s):l==="taxLetter"?i=wt(s):l==="settings"&&(i=It(s));const g=tt(p.state?.pathnameStackToGoBack,p.pathname);n(i,{state:{pathnameStackToGoBack:g}})},onColumnSortConfigChanged:(l,i)=>{t(Fe({uiState:{sortKey:l,sortOrder:i}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{r(!0)},onAutoTransferClick:()=>{n("../../checking/auto-transfer")}}})(et);function $({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=U(),o=B(),p=P(),r=J(),m=Ye(),s=f(A=>D(A)),{tenantEmailDomain:l}=V(),i=s.companyId??b.getSignedInUserTenant(l)?.companyId,[g,I]=d.useState(!1),u=f(A=>re(A)),c=u.fetchState,h=u.accountSummary?.totalBalance?.amount,y=f(A=>A.treasurySetupViewState.treasuryFundsDetails?.fetchStatus),T=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",S=_(),w=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=N(S?.loggedInUserRoleMap),F=Z(S?.loggedInUserRoleMap),{areTenantIdsInSync:E}=Ke();d.useEffect(()=>{c==="Not-Started"&&!g&&E&&(I(!0),p(oe(!0)))},[g,p,c,E]),d.useEffect(()=>{u.transactionsFetchState.fetchState==="Completed"&&u.transactions.length===0&&!n.pathname.includes("transfer")&&x&&o("./transfer")},[u.transactionsFetchState.fetchState,u.transactions.length]);const C=()=>{o("..")},[le,ue]=d.useState(!1),W=A=>{ue(A)},{isAiCfoAccessEnabled:de,onAskAiCfoClick:pe}=lt({mobileExploreReferrer:"Treasury"});We({isDataReady:c==="Completed"});const{useFeatureGate:G}=ie(),{isFeatureEnabled:me}=G(v.isDebitCardFeatureEnabled),{isFeatureEnabled:fe}=G(v.isAutoTransferRuleEnabled),{isFeatureEnabled:ye}=G(v.isTreasuryCommentingEnabled),ge=ut(i,{clearParams:c==="Completed"&&y?.fetchState==="Completed"}),he=ve(s),Se=De(me,s);if(he===!0&&Se!==!0)return e.jsx(dt,{});if(T){const A=y?.fetchState!=="Completed"||u.accountSummaryFetchState.fetchState!=="Completed";return e.jsxs(e.Fragment,{children:[u.accountSummaryFetchState.fetchState==="Completed"&&y?.fetchState==="Completed"&&t===!1&&a===!1?e.jsx(z,{analytics:j,onLoad:()=>{}}):null,e.jsx(ot,{onClose:C,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:ht.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:m.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(Ct,{onClick:xe=>xe.stopPropagation(),children:[t===!0?e.jsx(yt,{isFirstTransfer:u.transactions.length===0||h===0}):null,a===!0?e.jsx(mt,{}):null]})}),e.jsxs(gt,{windowSize:r,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:W}),e.jsx(St,{treasuryDetailsView:u,isAutoTransferRuleEnabled:fe,navigate:o,currentTenant:s,location:n,companyId:i,analytics:j,isTreasuryCommentingEnabled:ye,handleDrawerToggle:W,initialOpenThreadRequest:ge,isLoading:A,isAiCfoAccessEnabled:de,onAskAiCfoClick:pe})]})]})}return w&&x?e.jsx(L,{to:"../setup"}):s.companyTreasuryInfo?.info&&!w&&F?e.jsx(L,{to:"../promo",state:n.state}):e.jsx(Qe,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const xt=t=>`/${t}/treasury/edit-portfolio`,Tt=t=>`/${t}/treasury/statements`,wt=t=>`/${t}/treasury/tax-letter`,It=t=>`/${t}/treasury/setup`,Ct=R(it)`
10
10
  display: flex;
11
11
  min-height: 100%;
12
12
  flex-direction: column;
@@ -18,7 +18,7 @@ import{j as e}from"./liveblocks-jYXQYs7P.js";import{h as B,g as U,u as P,i as V,
18
18
  flex-direction: column;
19
19
  align-items: center;
20
20
  background-color: ${t=>t.theme.colors.grey4};
21
- `;function jt(){const t=B(),a=P(),n=J(),o=U(),p=`${X.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(c=>Le(c));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),a(Be(!1)))},[r,s.fetchState,a]);const l=A.getSignedInUser(),i=f(c=>D(c)),g={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i.tenantId??""},I=i.company?.companyInfo.companyLegalName??i.companyName;if(l==null)throw Error("Can't access statements page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(kt,{windowSize:n,children:e.jsx(at,{currentTenantCompanyName:I,statementListView:s,isLoading:u,onBackClick:()=>{const c=K(o.state?.pathnameStackToGoBack),h=c.poppedPathname??"..";t(h,{state:{pathnameStackToGoBack:c.newStack}})},authParams:g,downloadEndPoint:p})})}const bt=R.div`
21
+ `;function jt(){const t=B(),a=P(),n=J(),o=U(),p=`${Y.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(c=>Le(c));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),a(Be(!1)))},[r,s.fetchState,a]);const l=b.getSignedInUser(),i=f(c=>D(c)),g={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i.tenantId??""},I=i.company?.companyInfo.companyLegalName??i.companyName;if(l==null)throw Error("Can't access statements page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(kt,{windowSize:n,children:e.jsx(at,{currentTenantCompanyName:I,statementListView:s,isLoading:u,onBackClick:()=>{const c=K(o.state?.pathnameStackToGoBack),h=c.poppedPathname??"..";t(h,{state:{pathnameStackToGoBack:c.newStack}})},authParams:g,downloadEndPoint:p})})}const At=R.div`
22
22
  display: flex;
23
23
  height: 100vh;
24
24
  width: 100%;
@@ -26,7 +26,7 @@ import{j as e}from"./liveblocks-jYXQYs7P.js";import{h as B,g as U,u as P,i as V,
26
26
  flex-direction: column;
27
27
  align-items: center;
28
28
  background-color: ${t=>t.theme.colors.grey4};
29
- `;function At(){const t=B(),a=J(),n=U(),o=P(),p=`${X.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(c=>Ue(c));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),o(Pe(!1)))},[r,s.fetchState,o]);const l=A.getSignedInUser(),i=f(c=>D(c)),g={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i.tenantId??""},I=i.company?.companyInfo.companyLegalName??i.companyName;if(l==null)throw Error("Can't access tax letter page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(bt,{windowSize:a,children:e.jsx(nt,{currentTenantCompanyName:I,taxLetterListView:s,isLoading:u,onBackClick:()=>{const c=K(n.state?.pathnameStackToGoBack),h=c.poppedPathname??"..";t(h,{state:{pathnameStackToGoBack:c.newStack}})},authParams:g,downloadEndPoint:p})})}const Et=M(function(t,a){const{companyId:n}=a,o=O(t,n);return{treasurySetupView:o,isSetupComplete:o.companyTreasuryInfo?.businessVerificationStatus?.code==="verified",videoUrl:"https://www.youtube.com/watch?v=sqvJWKCMZgk",meetingUrl:"https://meetings.hubspot.com/yoshi-araki/treasury-product-schedule-demo-link?embed=true"}},function(t,a){const{navigate:n,companyId:o}=a;return{onSetupButtonClick:()=>{t(Oe(o))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:p=>{n(p?"..":"../setup",{relative:"path"})}}})(st),vt=()=>{const t=B(),a=U(),n=P(),{tenantEmailDomain:o}=V(),[p,r]=d.useState(!1),m=f(S=>D(S)),[s,l]=d.useState(!1),i=f(S=>S.treasurySetupViewState.treasuryFundsDetails?.fetchStatus);d.useEffect(()=>{s||i?.fetchState!=="Not-Started"||g==null||(l(!0),n(H()))},[i,n]);const g=A.getSignedInUserTenant(o)?.companyId??m.companyId,I=A.getSignedInUser(),u=!!m.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,c=S=>{r(S)};if(I==null)throw Error("Can't access treasury promo page without signing in...");const h=_(),y=N(h?.loggedInUserRoleMap),T=Z(h?.loggedInUserRoleMap);if(u&&y)return e.jsx(L,{to:"../../treasury/setup"});if(m.company?.companyTreasuryInfo&&(!u&&y||T)){if(a.state?.message==="activation"){const S=K(a.state?.pathnameStackToGoBack);t(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:S.newStack}})}return i?.fetchState!=="Completed"?e.jsx(te,{children:e.jsx(Y,{size:"ExtraLarge",start:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:j,onLoad:S=>(w=>w.trackTreasuryPromoView("Treasury Promo Page"))(S)}),e.jsx(ce,{isAppContentDrawerOpen:p,handleDrawerToggle:c}),e.jsx(Et,{analytics:j,navigate:t,companyId:g,onClickMenuIcon:()=>{c(!0)}})]})}return e.jsx(te,{children:e.jsx(Y,{size:"ExtraLarge",start:!0})})},te=R.div`
29
+ `;function bt(){const t=B(),a=J(),n=U(),o=P(),p=`${Y.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(c=>Ue(c));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),o(Pe(!1)))},[r,s.fetchState,o]);const l=b.getSignedInUser(),i=f(c=>D(c)),g={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i.tenantId??""},I=i.company?.companyInfo.companyLegalName??i.companyName;if(l==null)throw Error("Can't access tax letter page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(At,{windowSize:a,children:e.jsx(nt,{currentTenantCompanyName:I,taxLetterListView:s,isLoading:u,onBackClick:()=>{const c=K(n.state?.pathnameStackToGoBack),h=c.poppedPathname??"..";t(h,{state:{pathnameStackToGoBack:c.newStack}})},authParams:g,downloadEndPoint:p})})}const Et=M(function(t,a){const{companyId:n}=a,o=O(t,n);return{treasurySetupView:o,isSetupComplete:o.companyTreasuryInfo?.businessVerificationStatus?.code==="verified",videoUrl:"https://www.youtube.com/watch?v=sqvJWKCMZgk",meetingUrl:"https://meetings.hubspot.com/yoshi-araki/treasury-product-schedule-demo-link?embed=true"}},function(t,a){const{navigate:n,companyId:o}=a;return{onSetupButtonClick:()=>{t(Oe(o))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:p=>{n(p?"..":"../setup",{relative:"path"})}}})(st),vt=()=>{const t=B(),a=U(),n=P(),{tenantEmailDomain:o}=V(),[p,r]=d.useState(!1),m=f(S=>D(S)),[s,l]=d.useState(!1),i=f(S=>S.treasurySetupViewState.treasuryFundsDetails?.fetchStatus);d.useEffect(()=>{s||i?.fetchState!=="Not-Started"||g==null||(l(!0),n(H()))},[i,n]);const g=b.getSignedInUserTenant(o)?.companyId??m.companyId,I=b.getSignedInUser(),u=!!m.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,c=S=>{r(S)};if(I==null)throw Error("Can't access treasury promo page without signing in...");const h=_(),y=N(h?.loggedInUserRoleMap),T=Z(h?.loggedInUserRoleMap);if(u&&y)return e.jsx(L,{to:"../../treasury/setup"});if(m.company?.companyTreasuryInfo&&(!u&&y||T)){if(a.state?.message==="activation"){const S=K(a.state?.pathnameStackToGoBack);t(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:S.newStack}})}return i?.fetchState!=="Completed"?e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:j,onLoad:S=>(w=>w.trackTreasuryPromoView("Treasury Promo Page"))(S)}),e.jsx(ce,{isAppContentDrawerOpen:p,handleDrawerToggle:c}),e.jsx(Et,{analytics:j,navigate:t,companyId:g,onClickMenuIcon:()=>{c(!0)}})]})}return e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})})},te=R.div`
30
30
  display: flex;
31
31
  width: 100%;
32
32
  height: 100%;
@@ -34,4 +34,4 @@ import{j as e}from"./liveblocks-jYXQYs7P.js";import{h as B,g as U,u as P,i as V,
34
34
  justify-content: center;
35
35
  align-items: center;
36
36
  background-color: ${t=>t.theme.colors.grey5};
37
- `;function ea(){const t=U(),a=f(E=>D(E)),{useFeatureGate:n}=ie(),{isFeatureEnabled:o}=n(v.isTreasuryEnabled),p=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,r=_(),m=Z(r?.loggedInUserRoleMap),s=a?.userRole!=null&&Re(a?.userRole),l=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!s)&&Ve(r?.loggedInUserRoleMap),i=Me(r?.loggedInUserRoleMap),g=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!s)&&Ne(r?.loggedInUserRoleMap),{isFeatureEnabled:I}=n(v.isDepositAccountsFeatureEnabled),u=I&&!s&&_e(r?.loggedInUserRoleMap),c=a.company!=null&&ze(a.company),h=o&&c===!0&&!s&&N(r?.loggedInUserRoleMap),{isFeatureEnabled:y}=n(v.isChargeCardFeatureEnabled),{isFeatureEnabled:T}=n(v.isDebitCardFeatureEnabled),S=rt(a,y,T)&&!s&&Ge(r?.loggedInUserRoleMap),w=$e(r?.loggedInUserRoleMap),x=qe(r?.loggedInUserRoleMap),F=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified";return e.jsxs(Te,{children:[x?null:e.jsx(k,{path:"setup",element:e.jsx(Q,{isBillPayAdminLevelAccess:l,isReimbursementAdminLevelAccess:g,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:h,isUserHasOnlyCardAccess:w,isUserHasOnlyBillPayAccess:i,productType:"zeni_treasury",type:"setup"})}),x?null:e.jsx(k,{path:"verification",element:e.jsx(Q,{isBillPayAdminLevelAccess:l,isUserHasOnlyBillPayAccess:i,isReimbursementAdminLevelAccess:g,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:h,isUserHasOnlyCardAccess:w,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(vt,{})}),e.jsx(k,{path:"statements",element:e.jsx(jt,{})}),e.jsx(k,{path:"tax-letter",element:e.jsx(At,{})}),F?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"/",element:e.jsx($,{isTransferDrawerOpen:!1,isEditPortfolioDrawerOpen:!1})}),h?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"edit-portfolio",element:e.jsx($,{isEditPortfolioDrawerOpen:!0,isTransferDrawerOpen:!1})}),e.jsx(k,{path:"transfer",element:e.jsx($,{isTransferDrawerOpen:!0,isEditPortfolioDrawerOpen:!1})})]}):null,e.jsx(k,{path:"*",element:e.jsx(ct,{})})]}):p&&h?e.jsx(k,{path:"*",element:e.jsx(L,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&m?e.jsx(k,{path:"*",element:e.jsx(L,{to:"../promo",state:t.state})}):e.jsx(k,{path:"*",element:null})]})}export{ea as default};
37
+ `;function ea(){const t=U(),a=f(E=>D(E)),{useFeatureGate:n}=ie(),{isFeatureEnabled:o}=n(v.isTreasuryEnabled),p=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,r=_(),m=Z(r?.loggedInUserRoleMap),s=a?.userRole!=null&&Re(a?.userRole),l=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!s)&&Ve(r?.loggedInUserRoleMap),i=Me(r?.loggedInUserRoleMap),g=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!s)&&Ne(r?.loggedInUserRoleMap),{isFeatureEnabled:I}=n(v.isDepositAccountsFeatureEnabled),u=I&&!s&&_e(r?.loggedInUserRoleMap),c=a.company!=null&&ze(a.company),h=o&&c===!0&&!s&&N(r?.loggedInUserRoleMap),{isFeatureEnabled:y}=n(v.isChargeCardFeatureEnabled),{isFeatureEnabled:T}=n(v.isDebitCardFeatureEnabled),S=rt(a,y,T)&&!s&&Ge(r?.loggedInUserRoleMap),w=$e(r?.loggedInUserRoleMap),x=qe(r?.loggedInUserRoleMap),F=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified";return e.jsxs(Te,{children:[x?null:e.jsx(k,{path:"setup",element:e.jsx(Q,{isBillPayAdminLevelAccess:l,isReimbursementAdminLevelAccess:g,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:h,isUserHasOnlyCardAccess:w,isUserHasOnlyBillPayAccess:i,productType:"zeni_treasury",type:"setup"})}),x?null:e.jsx(k,{path:"verification",element:e.jsx(Q,{isBillPayAdminLevelAccess:l,isUserHasOnlyBillPayAccess:i,isReimbursementAdminLevelAccess:g,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:h,isUserHasOnlyCardAccess:w,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(vt,{})}),e.jsx(k,{path:"statements",element:e.jsx(jt,{})}),e.jsx(k,{path:"tax-letter",element:e.jsx(bt,{})}),F?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"/",element:e.jsx($,{isTransferDrawerOpen:!1,isEditPortfolioDrawerOpen:!1})}),h?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"edit-portfolio",element:e.jsx($,{isEditPortfolioDrawerOpen:!0,isTransferDrawerOpen:!1})}),e.jsx(k,{path:"transfer",element:e.jsx($,{isTransferDrawerOpen:!0,isEditPortfolioDrawerOpen:!1})})]}):null,e.jsx(k,{path:"*",element:e.jsx(ct,{})})]}):p&&h?e.jsx(k,{path:"*",element:e.jsx(L,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&m?e.jsx(k,{path:"*",element:e.jsx(L,{to:"../promo",state:t.state})}):e.jsx(k,{path:"*",element:null})]})}export{ea as default};
@@ -1,4 +1,4 @@
1
- import{j as l}from"./liveblocks-jYXQYs7P.js";import{a as g}from"./sentry-BSVS1PdG.js";import{h as J,g as Y,i as R,j as S,n as G,u as z,o as at,p as B,N as K}from"./core-hvWPs2BT.js";import{eP as V,Ks as Ee,Kt as Ue,fT as X,cs as Ie,ct as be,vw as St,Ku as nt,vA as zt,Ix as ee,jG as te,vu as Yt,vo as qt,Kv as Ne,vg as Ht,vf as Qt,v9 as Wt,vl as Zt,vB as Xt,Kw as he,Kx as Me,vh as ea,Ky as pe,f3 as ft,vQ as gt,vJ as vt,Kz as xt,os as Tt,vE as yt,vC as Dt,KA as Ct,vX as Et,vU as It,vF as bt,vW as Je,GU as kt,KB as ta,KC as aa,cv as na,KD as sa,KE as oa,KF as me,KG as ie,KH as ke,Iy as Ge,wa as ye,Iw as De,vZ as wt,vx as Ke,KI as la,Iz as H,KJ as $e,vr as ia,KK as ca,KL as da,KM as ze,KN as Ye,KO as qe,KP as He,w4 as we,KQ as At,vN as jt,KR as ra,KS as ua,KT as ha,KU as pa,KV as ma,KW as Sa,KX as fa,KY as ga,s$ as va,t0 as xa,HD as je,KZ as Ta,K_ as ya,j3 as Fe,bq as Da,K$ as Ca,L0 as Ea,kE as Ia,kN as ba,HC as Le,bE as st,L1 as Ft,Hh as Lt,L2 as ka,L3 as wa,L4 as Aa,kP as ja,L5 as ot,L6 as lt,L7 as it,L8 as ct,L9 as Fa,kL as La,La as Pa,kO as _a,Lb as Va,Lc as Pt,HZ as _t,k2 as Ba,Ld as Oa,Le as Pe,Lf as Vt,HX as Bt,yn as Ra,Lg as Ua,Lh as Na,km as Ot,Li as Ma,Lj as Ja,I9 as Ga,qA as Ka,Lk as Rt,Ll as dt,I6 as _e,Lm as rt,Ln as $a,Ib as za,Lo as Ya,Lp as qa,Lq as Ha,Lr as Qa,Ls as Wa,qD as Za,Lt as Xa,IA as en,Lu as tn,HQ as Ve,gP as an,Lv as nn,Lw as sn,gN as on,Lx as ln,Ly as cn,yr as dn,Lz as rn,LA as un,LB as hn,LC as pn,k6 as mn,bn as Sn,e_ as fn,eY as gn}from"./zeni-epic-state-B5RvQRIo.js";import{z as U,aq as Be,B as Ut,G as W,c as j,a2 as Z,aw as vn,n as M,D as Ce,r as ce,ax as Qe,ay as xn,az as Tn,p as We,aA as yn,h as Dn,J as de,x as Ze,v as ae,I as $,aB as Cn,i as Xe,X as Se,aC as En,aD as Nt,V as In,aE as bn,k as kn,aF as wn,at as Mt,aG as An,o as Q,S as jn,A as Jt,F as Fn,aH as Ln,aI as Pn,e as et,aJ as _n,aK as Vn,Y as Bn,aL as On,aM as Rn}from"./index-C3hO3Q77.js";import{n as N,D as Un,S as Gt}from"./mui-CeHC_BmF.js";import{t as Nn,A as Mn}from"./AddressScreen-XfX1kp62.js";import le from"./NotFoundScreen-Meha4IJ4.js";import{F as Jn}from"./FeaturePreviewScreen-DS9Qs3mU.js";import{c as q,v as tt,d as Gn}from"./routePaths-BgS6eID-.js";import{p as Kt}from"./pathToGoBack-MsNMGBDu.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-DhVdwSwf.js";import{M as ge}from"./MobileAppDrawer-xuap2lNE.js";import{D as Kn}from"./DrawerScreen-DVdaRr3g.js";import{g as $n,m as zn}from"./accountMappingHelper-BXM5BmBC.js";import"./recharts-C4CmAqBJ.js";import"./analytics-B8luzlgO.js";import"./plaid-Byy7X9QI.js";import"./dnd-o-askzEj.js";import"./stripe-DMRn4zHo.js";import"./lottie-BLlGs_6Q.js";import"./lexical-DqrCfay7.js";import"./pdf-Cl92kK1w.js";import"./utils-4kl_5TF9.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="fd333617-43f4-4431-90c2-3ffd5251ad85",e._sentryDebugIdIdentifier="sentry-dbid-fd333617-43f4-4431-90c2-3ffd5251ad85")}catch{}})();const Yn=Ce.getLocalizedStrings(),qn=G(function(e,a){const s=Ue(e,a.scheduleTab),t=e.tenantState.currentTenantId;return{authParams:{userId:a.signedInUser.userId??"",sessionId:a.signedInUser.zeniSessionId??"",tenantId:t??""},linkBillExpenseView:s.linkBillExpenseView,transactions:s.linkBillExpenseView.transactions}},function(e,a){const{navigate:s,location:t}=a;return{onTransactionSelect(n){e(nt({selectedTransaction:n}))},onBackClick:()=>{s("..",{relative:"path"})},onCancel(){e(nt({selectedTransaction:void 0})),e(zt()),s("..",{relative:"path"})},onTransactionClick:n=>{const o=`${q(n,a.tenantEmailDomain)}`,c=M(t.state?.pathnameStackToGoBack,t.pathname);s(o,{state:{pathnameStackToGoBack:c}})},onLinkSave(){a.setShouldNavigateBack(!1),e(St(a.scheduleTab,a.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}})(vn),Hn=({setShouldNavigateBack:e})=>{const a=J(),s=Y(),{scheduleDetailId:t,tenantEmailDomain:n}=R(),{scheduleType:o}=R();if(n==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const c=S(f=>V(f)),r=Ee(o)??"accrued_expenses",h=U.getSignedInUser();if(h==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const i=S(f=>Ue(f,r)),m=i.selectedJELinkRowIndex,d=S(f=>X(f,c.companyId)),u=Be(i.updateStatus.fetchState);g.useEffect(()=>{u==="In-Progress"&&i.updateStatus.fetchState==="Completed"&&a("..",{relative:"path"})},[u,i.updateStatus.fetchState]),g.useEffect(()=>{i.fetchState==="Not-Started"&&a("..",{relative:"path"})},[]),g.useEffect(()=>{i.selectedJEAccruedSchedule!=null&&i.selectedJELinkRowIndex!=null||a("..",{relative:"path"})},[i.selectedJEAccruedSchedule,i.selectedJELinkRowIndex]);const p=i.linkBillExpenseView.fetchState==="Completed";return l.jsx(l.Fragment,{children:i.linkBillExpenseView.fetchState==="In-Progress"?l.jsx(Ut,{fetchState:i.linkBillExpenseView.fetchState}):i.selectedJEAccruedSchedule!=null&&m!=null?l.jsxs(l.Fragment,{children:[p===!0?l.jsx(W,{analytics:j,onLoad:()=>{Qn(i,r,d)}}):null,l.jsx(qn,{signedInUser:h,attachmentEndPoint:`${Z}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:i.selectedJEAccruedSchedule.vendor.id??"",location:s,tenantEmailDomain:n,scheduleAccruedDetailsView:i,saveFetchState:i.updateStatus.fetchState,scheduleTab:r,navigate:a,analytics:j,controllerUserDetails:d,saveStatus:i.updateStatus.fetchState,jeAccruedSchedule:i.selectedJEAccruedSchedule,localData:i.scheduleAccruedDetailsLocalData.jeScheduleDetails[m]})]}):null})},$t=e=>{const a=Yn.dateFormat.analytics.YYYYDashMMDashDDFormat;return{scheduleCreateDate:e.createTime.format(a)??null,scheduleMonthlyAmount:e.recurringAmount??null,startingBalance:e.otherAttributes.startingBalance??null,scheduleAccountCategory:e.jeCredit.account?.accountName??null,description:e.memo,runningBalance:e.balanceAsOfToday??null,currentBalance:e.balanceAsOfToday??null,currentStatus:e.status.label,period:e.period??null,startMonth:e.startDate?.format(a)??null,endMonth:e.endDate?.format(a)??null}},Qn=(e,a,s)=>{const t=e.selectedJEAccruedSchedule,n=e.selectedJELinkRowIndex;let o;n!=null&&t!=null&&(o=t.scheduledJournalEntry[n]);const{transactions:c}=e.linkBillExpenseView,r=c.some(m=>m.isRecommendedTransaction===!0),h=Ie(s.controllers),i=be(s.controllerUserIds);t!=null&&j.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...$t(t)},scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:r,journalEntryPostingStatus:o?.status.label??""},vendorName:t.vendor.name??null,controllerEmails:h,controllerUserIds:i})},Wn=N.div`
1
+ import{j as l}from"./liveblocks-C5h4gZcw.js";import{a as g}from"./sentry-bxHUuQF3.js";import{h as J,g as Y,i as R,j as S,n as G,u as z,o as at,p as B,N as K}from"./core-DYMASrCh.js";import{eP as V,Ks as Ee,Kt as Ue,fT as X,cs as Ie,ct as be,vw as St,Ku as nt,vA as zt,Ix as ee,jG as te,vu as Yt,vo as qt,Kv as Ne,vg as Ht,vf as Qt,v9 as Wt,vl as Zt,vB as Xt,Kw as he,Kx as Me,vh as ea,Ky as pe,f3 as ft,vQ as gt,vJ as vt,Kz as xt,os as Tt,vE as yt,vC as Dt,KA as Ct,vX as Et,vU as It,vF as bt,vW as Je,GU as kt,KB as ta,KC as aa,cv as na,KD as sa,KE as oa,KF as me,KG as ie,KH as ke,Iy as Ge,wa as ye,Iw as De,vZ as wt,vx as Ke,KI as la,Iz as H,KJ as $e,vr as ia,KK as ca,KL as da,KM as ze,KN as Ye,KO as qe,KP as He,w4 as we,KQ as At,vN as jt,KR as ra,KS as ua,KT as ha,KU as pa,KV as ma,KW as Sa,KX as fa,KY as ga,s$ as va,t0 as xa,HD as je,KZ as Ta,K_ as ya,j3 as Fe,bq as Da,K$ as Ca,L0 as Ea,kE as Ia,kN as ba,HC as Le,bE as st,L1 as Ft,Hh as Lt,L2 as ka,L3 as wa,L4 as Aa,kP as ja,L5 as ot,L6 as lt,L7 as it,L8 as ct,L9 as Fa,kL as La,La as Pa,kO as _a,Lb as Va,Lc as Pt,HZ as _t,k2 as Ba,Ld as Oa,Le as Pe,Lf as Vt,HX as Bt,yn as Ra,Lg as Ua,Lh as Na,km as Ot,Li as Ma,Lj as Ja,I9 as Ga,qA as Ka,Lk as Rt,Ll as dt,I6 as _e,Lm as rt,Ln as $a,Ib as za,Lo as Ya,Lp as qa,Lq as Ha,Lr as Qa,Ls as Wa,qD as Za,Lt as Xa,IA as en,Lu as tn,HQ as Ve,gP as an,Lv as nn,Lw as sn,gN as on,Lx as ln,Ly as cn,yr as dn,Lz as rn,LA as un,LB as hn,LC as pn,k6 as mn,bn as Sn,e_ as fn,eY as gn}from"./zeni-epic-state-901GvRjQ.js";import{z as U,aq as Be,B as Ut,x as W,c as j,a2 as Z,aw as vn,m as M,D as Ce,r as ce,ax as Qe,ay as xn,az as Tn,j as We,aA as yn,h as Dn,J as de,A as Ze,v as ae,I as $,aB as Cn,i as Xe,Y as Se,aC as En,aD as Nt,V as In,aE as bn,k as kn,aF as wn,at as Mt,aG as An,o as Q,S as jn,C as Jt,F as Fn,aH as Ln,aI as Pn,e as et,aJ as _n,aK as Vn,Z as Bn,aL as On,aM as Rn}from"./index-BHo22hBN.js";import{n as N,D as Un,S as Gt}from"./mui-DU2Ylp5t.js";import{t as Nn,A as Mn}from"./AddressScreen-DBouO1VO.js";import le from"./NotFoundScreen-s_JkYzit.js";import{F as Jn}from"./FeaturePreviewScreen-Bphl5iMx.js";import{c as q,v as tt,d as Gn}from"./routePaths-BF6NDp7Z.js";import{p as Kt}from"./pathToGoBack-C3wo5yar.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-6Bz-IzWM.js";import{M as ge}from"./MobileAppDrawer-CC3m6ocd.js";import{D as Kn}from"./DrawerScreen-BybsWSA5.js";import{g as $n,m as zn}from"./accountMappingHelper-C4AkxjBv.js";import"./recharts-Bs0ZBuwz.js";import"./analytics-BF065rkR.js";import"./plaid-C8pIAKRb.js";import"./dnd-CRD-B3s8.js";import"./stripe-DMRn4zHo.js";import"./lottie-CB2hfJTV.js";import"./lexical-B6vQ07gu.js";import"./pdf-DkjHIM4s.js";import"./utils-Cry9nEwK.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="edd8e597-4e18-40d6-8a6b-ea8f31b43b84",e._sentryDebugIdIdentifier="sentry-dbid-edd8e597-4e18-40d6-8a6b-ea8f31b43b84")}catch{}})();const Yn=Ce.getLocalizedStrings(),qn=G(function(e,a){const s=Ue(e,a.scheduleTab),t=e.tenantState.currentTenantId;return{authParams:{userId:a.signedInUser.userId??"",sessionId:a.signedInUser.zeniSessionId??"",tenantId:t??""},linkBillExpenseView:s.linkBillExpenseView,transactions:s.linkBillExpenseView.transactions}},function(e,a){const{navigate:s,location:t}=a;return{onTransactionSelect(n){e(nt({selectedTransaction:n}))},onBackClick:()=>{s("..",{relative:"path"})},onCancel(){e(nt({selectedTransaction:void 0})),e(zt()),s("..",{relative:"path"})},onTransactionClick:n=>{const o=`${q(n,a.tenantEmailDomain)}`,c=M(t.state?.pathnameStackToGoBack,t.pathname);s(o,{state:{pathnameStackToGoBack:c}})},onLinkSave(){a.setShouldNavigateBack(!1),e(St(a.scheduleTab,a.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}})(vn),Hn=({setShouldNavigateBack:e})=>{const a=J(),s=Y(),{scheduleDetailId:t,tenantEmailDomain:n}=R(),{scheduleType:o}=R();if(n==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const c=S(f=>V(f)),r=Ee(o)??"accrued_expenses",h=U.getSignedInUser();if(h==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const i=S(f=>Ue(f,r)),m=i.selectedJELinkRowIndex,d=S(f=>X(f,c.companyId)),u=Be(i.updateStatus.fetchState);g.useEffect(()=>{u==="In-Progress"&&i.updateStatus.fetchState==="Completed"&&a("..",{relative:"path"})},[u,i.updateStatus.fetchState]),g.useEffect(()=>{i.fetchState==="Not-Started"&&a("..",{relative:"path"})},[]),g.useEffect(()=>{i.selectedJEAccruedSchedule!=null&&i.selectedJELinkRowIndex!=null||a("..",{relative:"path"})},[i.selectedJEAccruedSchedule,i.selectedJELinkRowIndex]);const p=i.linkBillExpenseView.fetchState==="Completed";return l.jsx(l.Fragment,{children:i.linkBillExpenseView.fetchState==="In-Progress"?l.jsx(Ut,{fetchState:i.linkBillExpenseView.fetchState}):i.selectedJEAccruedSchedule!=null&&m!=null?l.jsxs(l.Fragment,{children:[p===!0?l.jsx(W,{analytics:j,onLoad:()=>{Qn(i,r,d)}}):null,l.jsx(qn,{signedInUser:h,attachmentEndPoint:`${Z}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:i.selectedJEAccruedSchedule.vendor.id??"",location:s,tenantEmailDomain:n,scheduleAccruedDetailsView:i,saveFetchState:i.updateStatus.fetchState,scheduleTab:r,navigate:a,analytics:j,controllerUserDetails:d,saveStatus:i.updateStatus.fetchState,jeAccruedSchedule:i.selectedJEAccruedSchedule,localData:i.scheduleAccruedDetailsLocalData.jeScheduleDetails[m]})]}):null})},$t=e=>{const a=Yn.dateFormat.analytics.YYYYDashMMDashDDFormat;return{scheduleCreateDate:e.createTime.format(a)??null,scheduleMonthlyAmount:e.recurringAmount??null,startingBalance:e.otherAttributes.startingBalance??null,scheduleAccountCategory:e.jeCredit.account?.accountName??null,description:e.memo,runningBalance:e.balanceAsOfToday??null,currentBalance:e.balanceAsOfToday??null,currentStatus:e.status.label,period:e.period??null,startMonth:e.startDate?.format(a)??null,endMonth:e.endDate?.format(a)??null}},Qn=(e,a,s)=>{const t=e.selectedJEAccruedSchedule,n=e.selectedJELinkRowIndex;let o;n!=null&&t!=null&&(o=t.scheduledJournalEntry[n]);const{transactions:c}=e.linkBillExpenseView,r=c.some(m=>m.isRecommendedTransaction===!0),h=Ie(s.controllers),i=be(s.controllerUserIds);t!=null&&j.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...$t(t)},scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:r,journalEntryPostingStatus:o?.status.label??""},vendorName:t.vendor.name??null,controllerEmails:h,controllerUserIds:i})},Wn=N.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -0,0 +1,12 @@
1
+ import{j as o}from"./liveblocks-C5h4gZcw.js";import{a as f}from"./sentry-bxHUuQF3.js";import{s as u,u as h,j as b,N as y}from"./core-DYMASrCh.js";import{JJ as I,eW as w,zI as j}from"./zeni-epic-state-901GvRjQ.js";import{z as l,B as x,C as S,F as D}from"./index-BHo22hBN.js";import{n as c}from"./mui-DU2Ylp5t.js";import"./recharts-Bs0ZBuwz.js";import"./analytics-BF065rkR.js";import"./plaid-C8pIAKRb.js";import"./dnd-CRD-B3s8.js";import"./stripe-DMRn4zHo.js";import"./lottie-CB2hfJTV.js";import"./lexical-B6vQ07gu.js";import"./pdf-DkjHIM4s.js";import"./utils-Cry9nEwK.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="38361b91-3bf2-4c42-9464-c19541bfd9fb",e._sentryDebugIdIdentifier="sentry-dbid-38361b91-3bf2-4c42-9464-c19541bfd9fb")}catch{}})();const q=()=>{const[e]=u(),t=e.get("code")??"",i=e.get("state")??"",p=e.get("profileId")??"",[n,g]=f.useState(!1),a=h(),s=b(m=>I(m)),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(i);if(r==null||d==null)return o.jsx(y,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect(()=>{n||(g(!0),a(j(t,p,i)))},[n,a]),s.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:s.error?.message??""})}):(s.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},E=c.div`
2
+ display: flex;
3
+ width: 100%;
4
+ height: 100vh;
5
+ flex-direction: row;
6
+ justify-content: center;
7
+ align-items: center;
8
+ background-color: ${e=>e.theme.colors.grey5};
9
+ `,_=c(D.LargeRegular)`
10
+ display: flex;
11
+ color: ${S.important};
12
+ `;export{q as default};
@@ -1,4 +1,4 @@
1
- import{j as n}from"./liveblocks-jYXQYs7P.js";import{h as ne,g as W,u as _,i as Y,j as k,n as K,N as Q,o as Ve,p as w}from"./core-hvWPs2BT.js";import{eP as U,OD as Ce,OE as $e,cl as ee,cm as Ne,fg as He,wV as we,B6 as Ze,wP as Tn,OF as On,OG as Bn,wS as Fn,wZ as fe,wM as Rn,wJ as Ln,Np as le,OH as Un,Eq as zn,Kv as Mn,Es as _n,kn as Oe,OI as Vn,qf as Ge,q3 as We,ke as Ye,kh as Be,Kw as Fe,Kx as $n,OJ as Nn,kg as Hn,kD as Zn,k5 as Gn,iE as Wn,iD as Yn,OK as Kn,OL as ye,E7 as qn,OM as Jn,ON as Xn,Ni as ke,OO as Re,OP as Qn,ED as ea,O1 as na,C0 as Ke,sP as qe,OQ as aa,EA as ta,OR as Je,cM as Ae,EH as Xe,fh as oa,eY as Qe,e_ as De,EF as sa,BW as ra,Ex as ia,OS as en,OT as nn,E9 as an,Ej as Le,OU as ca,NR as la,EI as da,bt as ua,bF as pa,cx as ma,bG as ha,bs as ga,Jq as fa}from"./zeni-epic-state-B5RvQRIo.js";import{k as ae,v as N,z as S,I as F,h as z,B as de,bW as ya,a2 as Ie,J as V,x as q,p as tn,aq as xa,af as Ue,c as R,bX as Ca,at as Se,bY as wa,G as ue,bZ as ka,e as be,aN as G,b_ as Aa,V as Da,X as on,ac as Ia,b$ as ze,c0 as Sa,n as ce,c1 as ba,c2 as Ea,c3 as va,a9 as Pa,o as ja}from"./index-C3hO3Q77.js";import{n as M,D as J,S as X}from"./mui-CeHC_BmF.js";import ie from"./NotFoundScreen-Meha4IJ4.js";import{S as Me}from"./SetupPagesScreen-DDSG8uf9.js";import{F as sn}from"./FeaturePreviewScreen-DS9Qs3mU.js";import{a as d}from"./sentry-BSVS1PdG.js";import{M as pe}from"./MobileAppDrawer-xuap2lNE.js";import{A as Ta,D as Oa,V as Ba}from"./DomesticWireDetailScreen-Cbv4IV8n.js";import{A as Fa}from"./AddressScreen-XfX1kp62.js";import{u as rn}from"./useAskAiCfoHostNavButtonProps-DhVdwSwf.js";import{Z as Ra}from"./ZeniAccountStatementScreen-CJf3N25S.js";import"./recharts-C4CmAqBJ.js";import"./analytics-B8luzlgO.js";import"./plaid-Byy7X9QI.js";import"./dnd-o-askzEj.js";import"./stripe-DMRn4zHo.js";import"./lottie-BLlGs_6Q.js";import"./lexical-DqrCfay7.js";import"./pdf-Cl92kK1w.js";import"./utils-4kl_5TF9.js";import"./analyticsHelper-D1azBz5I.js";import"./routePaths-BgS6eID-.js";import"./BusinessVerificationPageScreen-Dj41dw8l.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="a16e0921-7ad9-43b9-aa89-5be78047e1ce",e._sentryDebugIdIdentifier="sentry-dbid-a16e0921-7ad9-43b9-aa89-5be78047e1ce")}catch{}})();const La=M.div`
1
+ import{j as n}from"./liveblocks-C5h4gZcw.js";import{h as ne,g as W,u as _,i as Y,j as k,n as K,N as X,o as Ve,p as w}from"./core-DYMASrCh.js";import{eP as U,OD as Ce,OE as $e,cl as ee,cm as Ne,fg as He,wV as we,B6 as Ze,wP as Tn,OF as On,OG as Bn,wS as Fn,wZ as fe,wM as Rn,wJ as Ln,Np as le,OH as Un,Eq as zn,Kv as Mn,Es as _n,kn as Oe,OI as Vn,qf as Ge,q3 as We,ke as Ye,kh as Be,Kw as Fe,Kx as $n,OJ as Nn,kg as Hn,kD as Zn,k5 as Gn,iE as Wn,iD as Yn,OK as Kn,OL as ye,E7 as qn,OM as Jn,ON as Qn,Ni as ke,OO as Re,OP as Xn,ED as et,O1 as nt,C0 as Ke,sP as qe,OQ as tt,EA as at,OR as Je,cM as Ae,EH as Qe,fh as ot,eY as Xe,e_ as De,EF as st,BW as rt,Ex as it,OS as en,OT as nn,E9 as tn,Ej as Le,OU as ct,NR as lt,EI as dt,bt as ut,bF as pt,cx as mt,bG as ht,bs as gt,Jq as ft}from"./zeni-epic-state-901GvRjQ.js";import{k as te,v as N,z as S,I as F,h as z,B as de,bW as yt,a2 as Ie,J as V,A as q,j as an,aq as xt,af as Ue,c as R,bX as Ct,at as Se,bY as wt,x as ue,bZ as kt,e as be,aN as G,b_ as At,V as Dt,Y as on,ac as It,b$ as ze,c0 as St,m as ce,c1 as bt,c2 as Et,c3 as vt,a9 as Pt,o as jt}from"./index-BHo22hBN.js";import{n as M,D as J,S as Q}from"./mui-DU2Ylp5t.js";import ie from"./NotFoundScreen-s_JkYzit.js";import{S as Me}from"./SetupPagesScreen-BoBhqmkV.js";import{F as sn}from"./FeaturePreviewScreen-Bphl5iMx.js";import{a as d}from"./sentry-bxHUuQF3.js";import{M as pe}from"./MobileAppDrawer-CC3m6ocd.js";import{A as Tt,D as Ot,V as Bt}from"./DomesticWireDetailScreen-9HJqc589.js";import{A as Ft}from"./AddressScreen-DBouO1VO.js";import{u as rn}from"./useAskAiCfoHostNavButtonProps-6Bz-IzWM.js";import{Z as Rt}from"./ZeniAccountStatementScreen-FvmVdq9p.js";import"./recharts-Bs0ZBuwz.js";import"./analytics-BF065rkR.js";import"./plaid-C8pIAKRb.js";import"./dnd-CRD-B3s8.js";import"./stripe-DMRn4zHo.js";import"./lottie-CB2hfJTV.js";import"./lexical-B6vQ07gu.js";import"./pdf-DkjHIM4s.js";import"./utils-Cry9nEwK.js";import"./analyticsHelper-_j1-XtaH.js";import"./routePaths-BF6NDp7Z.js";import"./BusinessVerificationPageScreen-TnL4anaK.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="9290ceb5-1144-48fe-8089-29fe981b2b3e",e._sentryDebugIdIdentifier="sentry-dbid-9290ceb5-1144-48fe-8089-29fe981b2b3e")}catch{}})();const Lt=M.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -6,19 +6,19 @@ import{j as n}from"./liveblocks-jYXQYs7P.js";import{h as ne,g as W,u as _,i as Y
6
6
  flex-direction: column;
7
7
  align-items: center;
8
8
  background-color: ${e=>e.theme.colors.grey4};
9
- `,Ua=K(function(e){return{autoTransferRuleView:Ce(e),downloadAccountDetailEndPoint:`${Ie}/account_details`,transferLimit:5e5,depositAccountListView:Ze(e.depositAccountState,e.depositAccountListState)}},function(e,a){const{navigate:s,handleDrawerToggle:o}=a;return{onBackClick:()=>{s("..")},onClickMenuIcon:()=>{o(!0)},onFetchAutoTransferRules:t=>{e(we(t))},onCreateRule:()=>{e(Ln())},onUpdateRule:t=>{e(fe(t))},onDeleteClick:t=>{e(Rn(t))},onPauseClick:t=>{e(fe(t,!0,!1))},onResumeClick:t=>{e(fe(t,!1,!0))},onActivityClick:(t,r)=>{e(Fn(t,r))},onUpdateRuleLocalData:t=>{e(Bn(t))},clearRuleLocalData:()=>{e(On())},onEditClick:t=>{s(`./${t}/edit`)},onEditDrawerClose:()=>{s("../../",{relative:"path"})},onReviewClick:()=>{e(Tn())}}})(ya);function _e({isEditDrawerOpen:e}){const a=ne(),s=W(),o=_(),t=ae(),{ruleId:r,tenantEmailDomain:u}=Y(),{useFeatureGate:l}=N(),[p,h]=d.useState(!1),[x,i]=d.useState(!1),c=k(y=>U(y)),m=k(y=>Ce(y)),C=m?.fetchState??"Not-Started",b=k(y=>$e(y)),g=c?.companyId??S.getSignedInUserTenant(u)?.companyId,A=ee(t?.loggedInUserRoleMap)||Ne(t?.loggedInUserRoleMap),{isFeatureEnabled:D}=l(F.isTreasuryEnabled),f=c?.company!=null&&He(c.company),I=D&&f,O=S.getSignedInUser(),L=c.tenantId,j={userId:O?.userId??"",sessionId:O?.zeniSessionId??"",tenantId:L??""},v=c.companyName;d.useEffect(()=>{!x&&C==="Not-Started"&&g&&(i(!0),o(we(!0)))},[x,C,g,o]);const E=y=>{h(y)},T=z(),P=!!s.state?.scrollToAddRule;return m?.fetchState!=="Completed"?n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:T.colors.grey5}}):n.jsxs(La,{children:[n.jsx(pe,{isAppContentDrawerOpen:p,handleDrawerToggle:E}),n.jsx(Ua,{navigate:a,location:s,currentTenant:c,companyName:v,handleDrawerToggle:E,isEditDrawerOpen:e,editingRuleId:r,authParams:j,includeTreasuryOption:I,hasAdminLevelAccess:A,zeniAccountsConfigDetail:b,scrollToAddRule:P})]})}const za={overlayWidth:new q(100,100,58)},Ma=({vendorId:e,isDrawerOpen:a,closeDrawerHandler:s})=>{const o=_(),t=z(),r=V();if(S.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return n.jsx(J,{onClose:()=>{s(!0),o(le())},anchor:"right",open:a,PaperProps:{style:{width:za.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:t.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(_a,{onClick:u=>u.stopPropagation(),children:n.jsx(Ta,{vendorIdParam:e,accountContext:"express-pay"})})})},_a=M(X)`
9
+ `,Ut=K(function(e){return{autoTransferRuleView:Ce(e),downloadAccountDetailEndPoint:`${Ie}/account_details`,transferLimit:5e5,depositAccountListView:Ze(e.depositAccountState,e.depositAccountListState)}},function(e,t){const{navigate:s,handleDrawerToggle:o}=t;return{onBackClick:()=>{s("..")},onClickMenuIcon:()=>{o(!0)},onFetchAutoTransferRules:a=>{e(we(a))},onCreateRule:()=>{e(Ln())},onUpdateRule:a=>{e(fe(a))},onDeleteClick:a=>{e(Rn(a))},onPauseClick:a=>{e(fe(a,!0,!1))},onResumeClick:a=>{e(fe(a,!1,!0))},onActivityClick:(a,r)=>{e(Fn(a,r))},onUpdateRuleLocalData:a=>{e(Bn(a))},clearRuleLocalData:()=>{e(On())},onEditClick:a=>{s(`./${a}/edit`)},onEditDrawerClose:()=>{s("../../",{relative:"path"})},onReviewClick:()=>{e(Tn())}}})(yt);function _e({isEditDrawerOpen:e}){const t=ne(),s=W(),o=_(),a=te(),{ruleId:r,tenantEmailDomain:u}=Y(),{useFeatureGate:l}=N(),[p,h]=d.useState(!1),[x,i]=d.useState(!1),c=k(y=>U(y)),m=k(y=>Ce(y)),C=m?.fetchState??"Not-Started",b=k(y=>$e(y)),g=c?.companyId??S.getSignedInUserTenant(u)?.companyId,A=ee(a?.loggedInUserRoleMap)||Ne(a?.loggedInUserRoleMap),{isFeatureEnabled:D}=l(F.isTreasuryEnabled),f=c?.company!=null&&He(c.company),I=D&&f,O=S.getSignedInUser(),L=c.tenantId,j={userId:O?.userId??"",sessionId:O?.zeniSessionId??"",tenantId:L??""},v=c.companyName;d.useEffect(()=>{!x&&C==="Not-Started"&&g&&(i(!0),o(we(!0)))},[x,C,g,o]);const E=y=>{h(y)},T=z(),P=!!s.state?.scrollToAddRule;return m?.fetchState!=="Completed"?n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:T.colors.grey5}}):n.jsxs(Lt,{children:[n.jsx(pe,{isAppContentDrawerOpen:p,handleDrawerToggle:E}),n.jsx(Ut,{navigate:t,location:s,currentTenant:c,companyName:v,handleDrawerToggle:E,isEditDrawerOpen:e,editingRuleId:r,authParams:j,includeTreasuryOption:I,hasAdminLevelAccess:A,zeniAccountsConfigDetail:b,scrollToAddRule:P})]})}const zt={overlayWidth:new q(100,100,58)},Mt=({vendorId:e,isDrawerOpen:t,closeDrawerHandler:s})=>{const o=_(),a=z(),r=V();if(S.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return n.jsx(J,{onClose:()=>{s(!0),o(le())},anchor:"right",open:t,PaperProps:{style:{width:zt.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(_t,{onClick:u=>u.stopPropagation(),children:n.jsx(Tt,{vendorIdParam:e,accountContext:"express-pay"})})})},_t=M(Q)`
10
10
  display: flex;
11
11
  min-height: 100%;
12
12
  flex-direction: column;
13
- `,Va={overlayWidth:new q(100,100,58)},$a=({isDrawerOpen:e,closeDrawerHandler:a})=>{const s=_(),o=z(),t=V();if(S.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return n.jsx(J,{onClose:()=>{a(!0),s(le())},anchor:"right",open:e,PaperProps:{style:{width:Va.overlayWidth.valuePercentage(t),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Na,{onClick:r=>r.stopPropagation(),children:n.jsx(Fa,{accountContext:"express-pay",addressTypeParam:"vendor_address"})})})},Na=M(X)`
13
+ `,Vt={overlayWidth:new q(100,100,58)},$t=({isDrawerOpen:e,closeDrawerHandler:t})=>{const s=_(),o=z(),a=V();if(S.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return n.jsx(J,{onClose:()=>{t(!0),s(le())},anchor:"right",open:e,PaperProps:{style:{width:Vt.overlayWidth.valuePercentage(a),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Nt,{onClick:r=>r.stopPropagation(),children:n.jsx(Ft,{accountContext:"express-pay",addressTypeParam:"vendor_address"})})})},Nt=M(Q)`
14
14
  display: flex;
15
15
  min-height: 100%;
16
16
  flex-direction: column;
17
- `,Ha={overlayWidth:new q(100,100,58)},Za=({vendorId:e,isDrawerOpen:a,closeDrawerHandler:s})=>{const o=_(),t=z(),r=V();if(S.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return n.jsx(J,{onClose:()=>{s(!0),o(le())},anchor:"right",open:a,PaperProps:{style:{width:Ha.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:t.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Ga,{onClick:u=>u.stopPropagation(),children:n.jsx(Oa,{vendorIdParam:e,accountContext:"express-pay"})})})},Ga=M(X)`
17
+ `,Ht={overlayWidth:new q(100,100,58)},Zt=({vendorId:e,isDrawerOpen:t,closeDrawerHandler:s})=>{const o=_(),a=z(),r=V();if(S.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return n.jsx(J,{onClose:()=>{s(!0),o(le())},anchor:"right",open:t,PaperProps:{style:{width:Ht.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Gt,{onClick:u=>u.stopPropagation(),children:n.jsx(Ot,{vendorIdParam:e,accountContext:"express-pay"})})})},Gt=M(Q)`
18
18
  display: flex;
19
19
  min-height: 100%;
20
20
  flex-direction: column;
21
- `,Wa=M.div`
21
+ `,Wt=M.div`
22
22
  display: flex;
23
23
  height: 100vh;
24
24
  width: 100%;
@@ -26,19 +26,19 @@ import{j as n}from"./liveblocks-jYXQYs7P.js";import{h as ne,g as W,u as _,i as Y
26
26
  flex-direction: column;
27
27
  align-items: center;
28
28
  background-color: ${e=>e.theme.colors.grey4};
29
- `,Ya=K(function(e,a){const s=U(e),o=S.getSignedInUser(),t=s.tenantId,r={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:t??""},u=a.expressPayDetails,l=e.entityAutoCompleteState.autoCompleteText.common,p=Mn(e,"common");return{expressPayDetails:u,fileProps:{authParams:r,filesEndPoint:`${Se.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:l,entityAutoCompleteView:p},analytics:a.analytics}},function(e,a){const{navigate:s}=a;return{onSaveVendor:o=>{e(Yn(o,void 0,void 0,!0))},saveVendorDetailLocalData:(o,t)=>{e(Be({vendorId:t,localData:o}))},saveExpressPayLocalData:o=>{e(Wn({localData:o}))},onVendorSelected:o=>{o!=null&&e(Gn(o,!1))},updateSelectedVendorForCreate:o=>{e(Zn(o))},initializeVendorAddress:()=>{e(Hn())},resetVendorSaveStatus:o=>{e(Nn({vendorId:o}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,t)=>{o.trim().length>=2?e($n({searchString:o,entityType:t,searchOrigin:"common"})):o.trim().length===0&&e(Fe("common"))},onCancelAutoComplete:()=>{e(Fe("common"))}},chooseNewVendor:o=>{e(Be({localData:{vendorName:o}}))},onClickAddAccount:o=>{o.method.toLowerCase().indexOf("ach")!==-1?s("./add-ach",{relative:"path"}):o.method.toLowerCase().indexOf("wire")!==-1&&o.method.toLowerCase().indexOf("domestic")!==-1&&s("./add-wire",{relative:"path"})},updateFilesEntity:o=>{e(Ye({files:o}))},onDeleteFile:o=>{e(We(o))},onEditFileName:(o,t)=>{e(Ge(o,t.split(".")[0]))},onBackClick:o=>{o!=null&&e(Oe(o)),e(Oe()),e(Vn()),e(le()),s("../",{relative:"path"})},onSchedulePayment:()=>{e(_n())}}})(Ca);function se({isAddACHDrawerOpen:e,isAddWireDrawerOpen:a,isAddAddressDrawerOpen:s}){const o=ne(),t=W(),r=_(),[u,l]=d.useState(!1),{tenantEmailDomain:p}=Y(),h=ae(),x=k(y=>y.expressPayState.fetchState),i=k(y=>U(y)),c=k(y=>Un(y)),m=c.expressPayLocalData?.vendorId,C=i.companyId??S.getSignedInUserTenant(p)?.companyId,[b,g]=d.useState(!1),[A,D]=d.useState(!1),[f,I]=d.useState(!1),O=tn(t.state?.pathnameStackToGoBack),{poppedPathname:L}=O,j=L?.split("/"),v=j?.[j.length-1];d.useEffect(()=>{e===!0?g(!0):(g(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{a===!0?D(!0):(D(!1),document.body.style.overflow="auto")},[a]),d.useEffect(()=>{s===!0?I(!0):(I(!1),document.body.style.overflow="auto")},[s]),d.useEffect(()=>{x==="Not-Started"&&r(zn(!0,!0))},[x,r]);const E=xa(c.vendorViewDetails.bankAccountCreationState?.fetchState);if(d.useEffect(()=>{E==="In-Progress"&&c.vendorViewDetails.bankAccountCreationState?.fetchState==="Completed"&&P()},[E,c.vendorViewDetails.bankAccountCreationState?.fetchState]),S.getSignedInUser()==null)throw Error("Can't access express pay page without signing in...");const T=y=>{l(y)},P=()=>{g(!1),D(!1),o("../",{relative:"path"})};return n.jsxs(Wa,{children:[Ue(t)?n.jsx(pe,{isAppContentDrawerOpen:u,handleDrawerToggle:T}):null,b===!0?n.jsx(Ma,{vendorId:m,closeDrawerHandler:P,isDrawerOpen:b}):null,A===!0?n.jsx(Za,{vendorId:m,closeDrawerHandler:P,isDrawerOpen:A}):null,f===!0?n.jsx($a,{closeDrawerHandler:P,isDrawerOpen:f}):null,n.jsx(Ba,{vendorId:m,isExpressPayPage:!0}),n.jsx(Ya,{navigate:o,location:t,companyId:C,accountId:v,analytics:R,currentTenant:i,vendorId:m,roleMap:h?.loggedInUserRoleMap,isSettings:Ue(t),expressPayDetails:c,onClickMenuIcon:()=>{T(!0)}})]})}const Ka={overlayWidth:new q(100,100,58)},qa=({authParams:e,downloadAccountDetailEndPoint:a,isAccountInfoDrawerOpen:s,zeniBankAccountDetail:o,closeDrawerHandler:t})=>{const r=z(),u=V(),l=k(i=>$e(i)),p=k(i=>U(i));if(S.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");const h=()=>{t(!0)},x={depositAccount:o,onDismissClick:h,zeniAccountsConfigDetail:l,authParams:e,downloadAccountDetailEndPoint:a,currentTenant:p};return n.jsx(J,{anchor:"right",open:s,PaperProps:{style:{width:Ka.overlayWidth.valuePercentage(u),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>h(),children:n.jsx(Ja,{onClick:i=>i.stopPropagation(),children:n.jsx(wa,{...x})})})},Ja=M(X)`
29
+ `,Yt=K(function(e,t){const s=U(e),o=S.getSignedInUser(),a=s.tenantId,r={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:a??""},u=t.expressPayDetails,l=e.entityAutoCompleteState.autoCompleteText.common,p=Mn(e,"common");return{expressPayDetails:u,fileProps:{authParams:r,filesEndPoint:`${Se.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:l,entityAutoCompleteView:p},analytics:t.analytics}},function(e,t){const{navigate:s}=t;return{onSaveVendor:o=>{e(Yn(o,void 0,void 0,!0))},saveVendorDetailLocalData:(o,a)=>{e(Be({vendorId:a,localData:o}))},saveExpressPayLocalData:o=>{e(Wn({localData:o}))},onVendorSelected:o=>{o!=null&&e(Gn(o,!1))},updateSelectedVendorForCreate:o=>{e(Zn(o))},initializeVendorAddress:()=>{e(Hn())},resetVendorSaveStatus:o=>{e(Nn({vendorId:o}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,a)=>{o.trim().length>=2?e($n({searchString:o,entityType:a,searchOrigin:"common"})):o.trim().length===0&&e(Fe("common"))},onCancelAutoComplete:()=>{e(Fe("common"))}},chooseNewVendor:o=>{e(Be({localData:{vendorName:o}}))},onClickAddAccount:o=>{o.method.toLowerCase().indexOf("ach")!==-1?s("./add-ach",{relative:"path"}):o.method.toLowerCase().indexOf("wire")!==-1&&o.method.toLowerCase().indexOf("domestic")!==-1&&s("./add-wire",{relative:"path"})},updateFilesEntity:o=>{e(Ye({files:o}))},onDeleteFile:o=>{e(We(o))},onEditFileName:(o,a)=>{e(Ge(o,a.split(".")[0]))},onBackClick:o=>{o!=null&&e(Oe(o)),e(Oe()),e(Vn()),e(le()),s("../",{relative:"path"})},onSchedulePayment:()=>{e(_n())}}})(Ct);function se({isAddACHDrawerOpen:e,isAddWireDrawerOpen:t,isAddAddressDrawerOpen:s}){const o=ne(),a=W(),r=_(),[u,l]=d.useState(!1),{tenantEmailDomain:p}=Y(),h=te(),x=k(y=>y.expressPayState.fetchState),i=k(y=>U(y)),c=k(y=>Un(y)),m=c.expressPayLocalData?.vendorId,C=i.companyId??S.getSignedInUserTenant(p)?.companyId,[b,g]=d.useState(!1),[A,D]=d.useState(!1),[f,I]=d.useState(!1),O=an(a.state?.pathnameStackToGoBack),{poppedPathname:L}=O,j=L?.split("/"),v=j?.[j.length-1];d.useEffect(()=>{e===!0?g(!0):(g(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{t===!0?D(!0):(D(!1),document.body.style.overflow="auto")},[t]),d.useEffect(()=>{s===!0?I(!0):(I(!1),document.body.style.overflow="auto")},[s]),d.useEffect(()=>{x==="Not-Started"&&r(zn(!0,!0))},[x,r]);const E=xt(c.vendorViewDetails.bankAccountCreationState?.fetchState);if(d.useEffect(()=>{E==="In-Progress"&&c.vendorViewDetails.bankAccountCreationState?.fetchState==="Completed"&&P()},[E,c.vendorViewDetails.bankAccountCreationState?.fetchState]),S.getSignedInUser()==null)throw Error("Can't access express pay page without signing in...");const T=y=>{l(y)},P=()=>{g(!1),D(!1),o("../",{relative:"path"})};return n.jsxs(Wt,{children:[Ue(a)?n.jsx(pe,{isAppContentDrawerOpen:u,handleDrawerToggle:T}):null,b===!0?n.jsx(Mt,{vendorId:m,closeDrawerHandler:P,isDrawerOpen:b}):null,A===!0?n.jsx(Zt,{vendorId:m,closeDrawerHandler:P,isDrawerOpen:A}):null,f===!0?n.jsx($t,{closeDrawerHandler:P,isDrawerOpen:f}):null,n.jsx(Bt,{vendorId:m,isExpressPayPage:!0}),n.jsx(Yt,{navigate:o,location:a,companyId:C,accountId:v,analytics:R,currentTenant:i,vendorId:m,roleMap:h?.loggedInUserRoleMap,isSettings:Ue(a),expressPayDetails:c,onClickMenuIcon:()=>{T(!0)}})]})}const Kt={overlayWidth:new q(100,100,58)},qt=({authParams:e,downloadAccountDetailEndPoint:t,isAccountInfoDrawerOpen:s,zeniBankAccountDetail:o,closeDrawerHandler:a})=>{const r=z(),u=V(),l=k(i=>$e(i)),p=k(i=>U(i));if(S.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");const h=()=>{a(!0)},x={depositAccount:o,onDismissClick:h,zeniAccountsConfigDetail:l,authParams:e,downloadAccountDetailEndPoint:t,currentTenant:p};return n.jsx(J,{anchor:"right",open:s,PaperProps:{style:{width:Kt.overlayWidth.valuePercentage(u),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>h(),children:n.jsx(Jt,{onClick:i=>i.stopPropagation(),children:n.jsx(wt,{...x})})})},Jt=M(Q)`
30
30
  display: flex;
31
31
  min-height: 100%;
32
32
  flex-direction: column;
33
- `,Xa={overlayWidth:new q(100,100,58)},cn=({isCheckDepositDrawerOpen:e,closeDrawerHandler:a})=>{const s=z(),o=V(),t=_(),r=k(i=>U(i)),u=S.getSignedInUser(),l=r.tenantId,p={userId:u?.userId??"",sessionId:u?.zeniSessionId??"",tenantId:l??""};if(u==null)throw Error("Can't access check deposit page without signing in...");const h=k(i=>Kn(i)),x={analytics:R,checkDeposit:h,filesEndPoint:`${Se.fileMicroServiceBaseUrl}`,authParams:p,onSaveChangesToLocalStore:i=>{t(Jn(i))},updateFilesEntity:i=>{t(Ye({files:i}))},onAnotherTransferClick:()=>{t(ye())},onDeleteFile:i=>{t(We(i))},onEditFileName:(i,c)=>{t(Ge(i,c.split(".")[0]))},onCheckDpositClick:()=>{t(qn())},onDismissClick:()=>{a(!0),t(ye())}};return n.jsxs(n.Fragment,{children:[n.jsx(ue,{analytics:R,onLoad:i=>(c=>c.trackPageLoaded(be.Event.accountsDepositCheckFormViewed))(i)}),n.jsx(J,{anchor:"right",open:e,PaperProps:{style:{width:Xa.overlayWidth.valuePercentage(o),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.75,cursor:"pointer"}}},onClose:(i,c)=>(c==="backdropClick"||c==="escapeKeyDown")&&(a(!0),void t(ye())),children:n.jsx(Qa,{onClick:i=>i.stopPropagation(),children:n.jsx(ka,{...x})})})]})},Qa=M(X)`
33
+ `,Qt={overlayWidth:new q(100,100,58)},cn=({isCheckDepositDrawerOpen:e,closeDrawerHandler:t})=>{const s=z(),o=V(),a=_(),r=k(i=>U(i)),u=S.getSignedInUser(),l=r.tenantId,p={userId:u?.userId??"",sessionId:u?.zeniSessionId??"",tenantId:l??""};if(u==null)throw Error("Can't access check deposit page without signing in...");const h=k(i=>Kn(i)),x={analytics:R,checkDeposit:h,filesEndPoint:`${Se.fileMicroServiceBaseUrl}`,authParams:p,onSaveChangesToLocalStore:i=>{a(Jn(i))},updateFilesEntity:i=>{a(Ye({files:i}))},onAnotherTransferClick:()=>{a(ye())},onDeleteFile:i=>{a(We(i))},onEditFileName:(i,c)=>{a(Ge(i,c.split(".")[0]))},onCheckDpositClick:()=>{a(qn())},onDismissClick:()=>{t(!0),a(ye())}};return n.jsxs(n.Fragment,{children:[n.jsx(ue,{analytics:R,onLoad:i=>(c=>c.trackPageLoaded(be.Event.accountsDepositCheckFormViewed))(i)}),n.jsx(J,{anchor:"right",open:e,PaperProps:{style:{width:Qt.overlayWidth.valuePercentage(o),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.75,cursor:"pointer"}}},onClose:(i,c)=>(c==="backdropClick"||c==="escapeKeyDown")&&(t(!0),void a(ye())),children:n.jsx(Xt,{onClick:i=>i.stopPropagation(),children:n.jsx(kt,{...x})})})]})},Xt=M(Q)`
34
34
  display: flex;
35
35
  min-height: 100%;
36
36
  flex-direction: column;
37
- `,et={overlayWidth:new q(100,100,58)},nt=K(function(e,a){const s=a.currentTenant?.companyId;return{plaidConnectionDetails:na(e,s,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:Ze(e.depositAccountState,e.depositAccountListState)}},function(e,a){return{onReviewClick:()=>e(ta()),clearReviewTransferDetail:()=>e(aa()),onFetchLinkTokenClick:s=>{e(qe("external_account",s))},onEstablishConnectionClick:s=>{e(Ke(s,a.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}})(Aa),ln=({isTransferDrawerOpen:e,authParams:a,downloadAccountDetailEndPoint:s,closeDrawerHandler:o,zeniAccountsConfig:t})=>{const r=k(f=>Xn(f)),u=k(f=>U(f)),l=z(),p=V(),h=_(),{accountId:x}=Y(),[i,c]=d.useState("achTransfer"),[m,C]=d.useState(!1);if(S.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const{useDynamicConfig:b}=N(),{configValue:g}=b(G.zeniAccountsConfig),A=ke(g),D=()=>{o(!0),h(Re())};return d.useEffect(()=>{r.reviewTransferDetail.fetchState==="Completed"&&C(!0)},[C,r.reviewTransferDetail.fetchState]),n.jsxs(n.Fragment,{children:[n.jsx(ue,{analytics:R,onLoad:f=>(I=>I.trackPageLoaded(be.Event.zeniAccountsTransferFormViewed))(f)}),n.jsx(J,{onClose:()=>{(i==="achTransfer"&&m===!1||i==="achTransfer"&&m&&r.fetchState==="Completed")&&D()},anchor:"right",open:e,PaperProps:{style:{width:et.overlayWidth.valuePercentage(p),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:l.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(at,{onClick:f=>f.stopPropagation(),children:n.jsx(nt,{analytics:R,transferDetails:r,authParams:a,downloadAccountDetailEndPoint:s,onTransferClick:()=>{R.trackTransferBetweenAccountsFormClicked("Transfer",r.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning?"Review Split Transfer":"Review Transfer",r.transferDetailLocalData.transferFrom?.label,r.transferDetailLocalData.transferTo?.label,r.transferDetailLocalData.amount.amount,r.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning,r.reviewTransferDetail.reviewTransferMoney.transferSchedules.length,r.transferDetailLocalData.transferFrom?.accType==="paymentAccount"&&r.transferDetailLocalData.transferTo?.accType==="depositAccount"&&t.zeniAccountsConfigDetail.depositProductConfig.depositProducts?.[0].range?.[1]!=null&&r.transferDetailLocalData.amount.amount>t.zeniAccountsConfigDetail.depositProductConfig.depositProducts[0].range[1]),h(ea(x))},onDismissClick:D,onSaveChangesToLocalStore:f=>{h(Qn(f))},onAnotherTransferClick:()=>{C(!1),h(Re())},currentTenant:u,zeniAccountsConfigDetail:t,currentDrawerContent:i,setCurrentDrawerContent:c,showReviewContent:m,setShowReviewContent:C,onBackClick:()=>{},maxInsuredAmount:A.maxInsuredAmount})})})]})},at=M(X)`
37
+ `,ea={overlayWidth:new q(100,100,58)},na=K(function(e,t){const s=t.currentTenant?.companyId;return{plaidConnectionDetails:nt(e,s,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:Ze(e.depositAccountState,e.depositAccountListState)}},function(e,t){return{onReviewClick:()=>e(at()),clearReviewTransferDetail:()=>e(tt()),onFetchLinkTokenClick:s=>{e(qe("external_account",s))},onEstablishConnectionClick:s=>{e(Ke(s,t.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}})(At),ln=({isTransferDrawerOpen:e,authParams:t,downloadAccountDetailEndPoint:s,closeDrawerHandler:o,zeniAccountsConfig:a})=>{const r=k(f=>Qn(f)),u=k(f=>U(f)),l=z(),p=V(),h=_(),{accountId:x}=Y(),[i,c]=d.useState("achTransfer"),[m,C]=d.useState(!1);if(S.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const{useDynamicConfig:b}=N(),{configValue:g}=b(G.zeniAccountsConfig),A=ke(g),D=()=>{o(!0),h(Re())};return d.useEffect(()=>{r.reviewTransferDetail.fetchState==="Completed"&&C(!0)},[C,r.reviewTransferDetail.fetchState]),n.jsxs(n.Fragment,{children:[n.jsx(ue,{analytics:R,onLoad:f=>(I=>I.trackPageLoaded(be.Event.zeniAccountsTransferFormViewed))(f)}),n.jsx(J,{onClose:()=>{(i==="achTransfer"&&m===!1||i==="achTransfer"&&m&&r.fetchState==="Completed")&&D()},anchor:"right",open:e,PaperProps:{style:{width:ea.overlayWidth.valuePercentage(p),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:l.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(ta,{onClick:f=>f.stopPropagation(),children:n.jsx(na,{analytics:R,transferDetails:r,authParams:t,downloadAccountDetailEndPoint:s,onTransferClick:()=>{R.trackTransferBetweenAccountsFormClicked("Transfer",r.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning?"Review Split Transfer":"Review Transfer",r.transferDetailLocalData.transferFrom?.label,r.transferDetailLocalData.transferTo?.label,r.transferDetailLocalData.amount.amount,r.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning,r.reviewTransferDetail.reviewTransferMoney.transferSchedules.length,r.transferDetailLocalData.transferFrom?.accType==="paymentAccount"&&r.transferDetailLocalData.transferTo?.accType==="depositAccount"&&a.zeniAccountsConfigDetail.depositProductConfig.depositProducts?.[0].range?.[1]!=null&&r.transferDetailLocalData.amount.amount>a.zeniAccountsConfigDetail.depositProductConfig.depositProducts[0].range[1]),h(et(x))},onDismissClick:D,onSaveChangesToLocalStore:f=>{h(Xn(f))},onAnotherTransferClick:()=>{C(!1),h(Re())},currentTenant:u,zeniAccountsConfigDetail:a,currentDrawerContent:i,setCurrentDrawerContent:c,showReviewContent:m,setShowReviewContent:C,onBackClick:()=>{},maxInsuredAmount:A.maxInsuredAmount})})})]})},ta=M(Q)`
38
38
  display: flex;
39
39
  min-height: 100%;
40
40
  flex-direction: column;
41
- `,tt=M.div`
41
+ `,aa=M.div`
42
42
  display: flex;
43
43
  min-height: 100%;
44
44
  width: 100%;
@@ -46,7 +46,7 @@ import{j as n}from"./liveblocks-jYXQYs7P.js";import{h as ne,g as W,u as _,i as Y
46
46
  flex-direction: column;
47
47
  align-items: center;
48
48
  background-color: ${e=>e.theme.colors.grey4};
49
- `,ot=K(function(e,a){return{zeniAccountListView:Je(e),isExpressPayEnabled:a.isExpressPayEnabled,analytics:a.analytics}},function(e,a){const{navigate:s,currentTenant:o,location:t,companyId:r,handleDrawerToggle:u,analytics:l,isBillPayEnabled:p,isDebitCardFeatureEnabled:h}=a,{tenantEmailDomain:x}=o;return{onZeniAccountClick:(i,c)=>{l.trackAccountsListPageClicked("Accounts Row Item Click",c,"active");const m=st(x,i),C=ce(t.state?.pathnameStackToGoBack,t.pathname);s(m,{state:{pathnameStackToGoBack:C}})},onSettingsClick:()=>{l.trackAccountsListPageClicked("Settings Icon"),s("setup")},onReloadTransactions:()=>{e(Xe(!1))},handleMoveMoneyOptionSelection:(i,c)=>{let m="page-not-found";i==="sendMoney"&&(m=mn(x)),i==="payBill"?m=dn(o,p,h):i==="transfer"?(m=un(x),c!=null&&e(en(c))):i==="checkDeposit"&&(m=pn(x));const C=ce(t.state?.pathnameStackToGoBack,t.pathname);s(m,{state:{pathnameStackToGoBack:C}})},unlinkPaymentAccount:(i,c)=>{l.trackAccountsListPageClicked("Unlink Account",c),e(ia(i))},onFetchLinkTokenClick:(i,c)=>{e(qe("external_account",i,c))},onUpdatePaymentAccountStatus:(i,c,m)=>{e(ra(i,c,"zeni_accounts","external_account",m))},onEstablishConnectionClick:i=>{e(Ke(i,r,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:i=>{e(sa(i))},onClickMenuIcon:()=>{u(!0)},onTreasuryGetStartedClick:()=>{s("../../treasury/promo")},onAutoTransferClick:i=>{i?s("./auto-transfer",{state:{...t.state,scrollToAddRule:!0}}):s("./auto-transfer")}}})(Sa);function xe({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:a}){const s=W(),o=ne(),t=_(),r=V(),{tenantEmailDomain:u}=Y(),{useDynamicConfig:l,useFeatureGate:p}=N(),h=z(),{configValue:x}=l(G.zeniAccountsConfig),{isFeatureEnabled:i}=p(F.isTreasuryEnabled),{isFeatureEnabled:c}=p(F.isDebitCardFeatureEnabled),{isFeatureEnabled:m}=p(F.isAutoTransferRuleEnabled),{isFeatureEnabled:C}=p(F.isCheckingCommentingEnabled),b=ke(x),g=k(B=>U(B)),A=g.companyId??S.getSignedInUserTenant(u)?.companyId,{configValue:D}=l(G.expressPayConfig),f=D.is_enable_all_tenants===!0||D.tenant_ids!=null&&D.tenant_ids.includes(g.tenantId),[I,O]=d.useState(!1),[L,j]=d.useState(!1),[v,E]=d.useState(!1),[T,P]=d.useState(!1),y=k(B=>Je(B)),$=y.fetchState,te=k(B=>Ce(B)),oe=te?.fetchState??"Not-Started",me=!!g.companyZeniAccountInfo?.info?.isZeniAccountEnabled,H=ae(),Z=!!g.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,hn=!!g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,gn=ee(H?.loggedInUserRoleMap),fn=Ae(H?.loggedInUserRoleMap),yn=!!g.companyBillPayInfo?.info?.isBillPayEnabled,Ee=S.getSignedInUser(),xn={userId:Ee?.userId??"",sessionId:Ee?.zeniSessionId??"",tenantId:g.tenantId??""},Cn=`${Ie}/account_details`,{areTenantIdsInSync:ve}=Da();d.useEffect(()=>{!I&&ve&&(O(!0),t(Xe(!1)))},[I,t,$,ve]),d.useEffect(()=>{!L&&oe==="Not-Started"&&A&&(j(!0),t(we(!0)))},[L,oe,A,t]),d.useEffect(()=>{e!=null&&e===!0?E(!0):(E(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{P(a!=null&&a===!0)},[a]);const Pe=()=>{E(!1),o("..")},[wn,kn]=d.useState(!1),je=B=>{kn(B)},{isAiCfoAccessEnabled:An,onAskAiCfoClick:Dn}=rn({mobileExploreReferrer:"Checking Accounts"});on({isDataReady:$==="Completed"});const In=g.company!=null&&He(g.company),he=(i&&In)===!0&&!hn,[Sn,bn]=d.useState(!1),ge=k(B=>B.treasurySetupViewState.treasuryFundsDetails),En=ge.fundsDetails,vn=Ia(En);d.useEffect(()=>{he!==!0||Sn||ge?.fetchStatus.fetchState!=="Not-Started"||(bn(!0),t(oa()))},[ge.fetchStatus,t]);const Pn=Qe(g),jn=De(c,g);return Pn===!0&&jn!==!0?n.jsx(sn,{}):me?n.jsxs(n.Fragment,{children:[y.fetchState==="Completed"&&v===!1&&T===!1?n.jsx(ue,{analytics:R,onLoad:B=>(Te=>{Te.trackAccountsListPageViewed(y.depositAccountsSelectorView.depositAccounts.length,y.externalAccountsSelectorView.paymentAccounts.length,ze(y.summary?.totalBalance.available.amount??0),ze(y.summary?.totalInterest.available.amount??0),y.zeniAccountsConfig.zeniAccountsConfigDetail.annualPercentageYield),he&&Te.trackTreasuryPromoView("Checking Promo Banner")})(B)}):null,v===!0?n.jsx(ln,{closeDrawerHandler:Pe,isTransferDrawerOpen:v,zeniAccountsConfig:y.zeniAccountsConfig,authParams:xn,downloadAccountDetailEndPoint:Cn}):null,T===!0?n.jsx(cn,{closeDrawerHandler:Pe,isCheckDepositDrawerOpen:T}):null,n.jsxs(tt,{windowSize:r,children:[n.jsx(pe,{isAppContentDrawerOpen:wn,handleDrawerToggle:je}),n.jsx(ot,{zeniBankListView:y,navigate:o,currentTenant:g,location:s,companyId:A,analytics:R,maxInsuredAmount:b.maxInsuredAmount,isExpressPayEnabled:f,isBillPayEnabled:yn,isCheckingCommentingEnabled:C,isDebitCardFeatureEnabled:c,isAutoTransferRuleEnabled:m,handleDrawerToggle:je,showTreasuryPromo:he,treasuryYieldPercentage:vn,treasuryInsuredAmount:5e5,isAiCfoAccessEnabled:An,onAskAiCfoClick:Dn})]})]}):Z&&gn?n.jsx(Q,{to:"../setup"}):g.companyZeniAccountInfo?.info&&!Z&&fn?n.jsx(Q,{to:"../promo",state:s.state}):n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}})}const dn=(e,a,s)=>{const o=De(s,e),{tenantEmailDomain:t}=e;return o===!0||a===!1?`/${t}/bills`:`/${t}/bill/new`},st=(e,a)=>`/${e}/checking/${a}`,un=(e,a)=>a==null?`/${e}/checking/transfer`:`/${e}/checking/${a}/transfer`,pn=(e,a)=>a==null?`/${e}/checking/check-deposit`:`/${e}/checking/${a}/check-deposit`,mn=e=>`/${e}/checking/express-pay`,rt=M.div`
49
+ `,oa=K(function(e,t){return{zeniAccountListView:Je(e),isExpressPayEnabled:t.isExpressPayEnabled,analytics:t.analytics}},function(e,t){const{navigate:s,currentTenant:o,location:a,companyId:r,handleDrawerToggle:u,analytics:l,isBillPayEnabled:p,isDebitCardFeatureEnabled:h}=t,{tenantEmailDomain:x}=o;return{onZeniAccountClick:(i,c)=>{l.trackAccountsListPageClicked("Accounts Row Item Click",c,"active");const m=sa(x,i),C=ce(a.state?.pathnameStackToGoBack,a.pathname);s(m,{state:{pathnameStackToGoBack:C}})},onSettingsClick:()=>{l.trackAccountsListPageClicked("Settings Icon"),s("setup")},onReloadTransactions:()=>{e(Qe(!1))},handleMoveMoneyOptionSelection:(i,c)=>{let m="page-not-found";i==="sendMoney"&&(m=mn(x)),i==="payBill"?m=dn(o,p,h):i==="transfer"?(m=un(x),c!=null&&e(en(c))):i==="checkDeposit"&&(m=pn(x));const C=ce(a.state?.pathnameStackToGoBack,a.pathname);s(m,{state:{pathnameStackToGoBack:C}})},unlinkPaymentAccount:(i,c)=>{l.trackAccountsListPageClicked("Unlink Account",c),e(it(i))},onFetchLinkTokenClick:(i,c)=>{e(qe("external_account",i,c))},onUpdatePaymentAccountStatus:(i,c,m)=>{e(rt(i,c,"zeni_accounts","external_account",m))},onEstablishConnectionClick:i=>{e(Ke(i,r,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:i=>{e(st(i))},onClickMenuIcon:()=>{u(!0)},onTreasuryGetStartedClick:()=>{s("../../treasury/promo")},onAutoTransferClick:i=>{i?s("./auto-transfer",{state:{...a.state,scrollToAddRule:!0}}):s("./auto-transfer")}}})(St);function xe({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:t}){const s=W(),o=ne(),a=_(),r=V(),{tenantEmailDomain:u}=Y(),{useDynamicConfig:l,useFeatureGate:p}=N(),h=z(),{configValue:x}=l(G.zeniAccountsConfig),{isFeatureEnabled:i}=p(F.isTreasuryEnabled),{isFeatureEnabled:c}=p(F.isDebitCardFeatureEnabled),{isFeatureEnabled:m}=p(F.isAutoTransferRuleEnabled),{isFeatureEnabled:C}=p(F.isCheckingCommentingEnabled),b=ke(x),g=k(B=>U(B)),A=g.companyId??S.getSignedInUserTenant(u)?.companyId,{configValue:D}=l(G.expressPayConfig),f=D.is_enable_all_tenants===!0||D.tenant_ids!=null&&D.tenant_ids.includes(g.tenantId),[I,O]=d.useState(!1),[L,j]=d.useState(!1),[v,E]=d.useState(!1),[T,P]=d.useState(!1),y=k(B=>Je(B)),$=y.fetchState,ae=k(B=>Ce(B)),oe=ae?.fetchState??"Not-Started",me=!!g.companyZeniAccountInfo?.info?.isZeniAccountEnabled,H=te(),Z=!!g.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,hn=!!g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,gn=ee(H?.loggedInUserRoleMap),fn=Ae(H?.loggedInUserRoleMap),yn=!!g.companyBillPayInfo?.info?.isBillPayEnabled,Ee=S.getSignedInUser(),xn={userId:Ee?.userId??"",sessionId:Ee?.zeniSessionId??"",tenantId:g.tenantId??""},Cn=`${Ie}/account_details`,{areTenantIdsInSync:ve}=Dt();d.useEffect(()=>{!I&&ve&&(O(!0),a(Qe(!1)))},[I,a,$,ve]),d.useEffect(()=>{!L&&oe==="Not-Started"&&A&&(j(!0),a(we(!0)))},[L,oe,A,a]),d.useEffect(()=>{e!=null&&e===!0?E(!0):(E(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{P(t!=null&&t===!0)},[t]);const Pe=()=>{E(!1),o("..")},[wn,kn]=d.useState(!1),je=B=>{kn(B)},{isAiCfoAccessEnabled:An,onAskAiCfoClick:Dn}=rn({mobileExploreReferrer:"Checking Accounts"});on({isDataReady:$==="Completed"});const In=g.company!=null&&He(g.company),he=(i&&In)===!0&&!hn,[Sn,bn]=d.useState(!1),ge=k(B=>B.treasurySetupViewState.treasuryFundsDetails),En=ge.fundsDetails,vn=It(En);d.useEffect(()=>{he!==!0||Sn||ge?.fetchStatus.fetchState!=="Not-Started"||(bn(!0),a(ot()))},[ge.fetchStatus,a]);const Pn=Xe(g),jn=De(c,g);return Pn===!0&&jn!==!0?n.jsx(sn,{}):me?n.jsxs(n.Fragment,{children:[y.fetchState==="Completed"&&v===!1&&T===!1?n.jsx(ue,{analytics:R,onLoad:B=>(Te=>{Te.trackAccountsListPageViewed(y.depositAccountsSelectorView.depositAccounts.length,y.externalAccountsSelectorView.paymentAccounts.length,ze(y.summary?.totalBalance.available.amount??0),ze(y.summary?.totalInterest.available.amount??0),y.zeniAccountsConfig.zeniAccountsConfigDetail.annualPercentageYield),he&&Te.trackTreasuryPromoView("Checking Promo Banner")})(B)}):null,v===!0?n.jsx(ln,{closeDrawerHandler:Pe,isTransferDrawerOpen:v,zeniAccountsConfig:y.zeniAccountsConfig,authParams:xn,downloadAccountDetailEndPoint:Cn}):null,T===!0?n.jsx(cn,{closeDrawerHandler:Pe,isCheckDepositDrawerOpen:T}):null,n.jsxs(aa,{windowSize:r,children:[n.jsx(pe,{isAppContentDrawerOpen:wn,handleDrawerToggle:je}),n.jsx(oa,{zeniBankListView:y,navigate:o,currentTenant:g,location:s,companyId:A,analytics:R,maxInsuredAmount:b.maxInsuredAmount,isExpressPayEnabled:f,isBillPayEnabled:yn,isCheckingCommentingEnabled:C,isDebitCardFeatureEnabled:c,isAutoTransferRuleEnabled:m,handleDrawerToggle:je,showTreasuryPromo:he,treasuryYieldPercentage:vn,treasuryInsuredAmount:5e5,isAiCfoAccessEnabled:An,onAskAiCfoClick:Dn})]})]}):Z&&gn?n.jsx(X,{to:"../setup"}):g.companyZeniAccountInfo?.info&&!Z&&fn?n.jsx(X,{to:"../promo",state:s.state}):n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}})}const dn=(e,t,s)=>{const o=De(s,e),{tenantEmailDomain:a}=e;return o===!0||t===!1?`/${a}/bills`:`/${a}/bill/new`},sa=(e,t)=>`/${e}/checking/${t}`,un=(e,t)=>t==null?`/${e}/checking/transfer`:`/${e}/checking/${t}/transfer`,pn=(e,t)=>t==null?`/${e}/checking/check-deposit`:`/${e}/checking/${t}/check-deposit`,mn=e=>`/${e}/checking/express-pay`,ra=M.div`
50
50
  display: flex;
51
51
  width: 100%;
52
52
  flex: 1 1 auto;
@@ -54,4 +54,4 @@ import{j as n}from"./liveblocks-jYXQYs7P.js";import{h as ne,g as W,u as _,i as Y
54
54
  align-items: center;
55
55
  min-height: 100vh;
56
56
  background-color: ${e=>e.theme.colors.grey4};
57
- `,it=K(function(e,a){const{currentTenant:s}=a,o=nn(e,a.accountId),t=S.getSignedInUser(),r=e.tenantState.currentTenantId,u={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:r??""},l=o.accountDetail?.id??"";return{currentTenantCompanyName:s.companyName??"",authParams:u,downloadEndPoint:`${Se.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${l}`,zeniAccountDetail:o,isExpressPayEnabled:a.isExpressPayEnabled,fetchState:o.fetchState}},function(e,a){const{navigate:s,currentTenant:o,location:t,accountId:r}=a,{tenantEmailDomain:u}=o;return{handleMoveMoneyOptionSelection:(l,p)=>{let h="page-not-found";l==="sendMoney"?h=mn(u):l==="payBill"?h=dn(o,a.isBillPayEnabled,a.isDebitCardFeatureEnabled):l==="transfer"?(h=un(u,r),p!=null&&e(en(p))):l==="checkDeposit"?(h=pn(u,r),p!=null&&e(ca(p))):l==="accountStatement"&&(h=lt(u,r));const x=ce(t.state?.pathnameStackToGoBack,t.pathname);s(h,{state:{pathnameStackToGoBack:x}})},onAccountDetailClick:()=>{const l=ct(u,r),p=ce(t.state?.pathnameStackToGoBack,t.pathname);s(l,{state:{pathnameStackToGoBack:p}})},onEditNameClick:l=>{e(Le(r,"editName",l))},onReloadZeniAccountDetailPage:()=>{e(an(r,!1))},onCloseAccountClick:()=>{e(Le(r,"closeAccount",""))},onBackClick:()=>{s("../",{relative:"path"})}}})(ba);function re({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:a,isAccountInfoDrawerOpen:s}){const o=W(),t=ne(),r=_(),u=V(),{tenantEmailDomain:l,accountId:p}=Y(),{useDynamicConfig:h}=N(),{useFeatureGate:x}=N(),{isFeatureEnabled:i}=x(F.isDebitCardFeatureEnabled),{isFeatureEnabled:c}=x(F.isCheckingCommentingEnabled),m=k(Z=>U(Z)),{configValue:C}=h(G.expressPayConfig),b=C.is_enable_all_tenants===!0||C.tenant_ids!=null&&C.tenant_ids.includes(m.tenantId),g=!!m.companyBillPayInfo?.info?.isBillPayEnabled,A=S.getSignedInUser(),D=m.companyId??S.getSignedInUserTenant(l)?.companyId,f={userId:A?.userId??"",sessionId:A?.zeniSessionId??"",tenantId:m.tenantId??""},I=`${Ie}/account_details`,[O,L]=d.useState(!1),[j,v]=d.useState(!1),[E,T]=d.useState(!1),[P,y]=d.useState(!1),$=k(Z=>nn(Z,p??"")),te=$.fetchState,{isAiCfoAccessEnabled:oe,onAskAiCfoClick:me}=rn({mobileExploreReferrer:"Checking Account Detail"});on({isDataReady:te==="Completed"}),d.useEffect(()=>{O||(r(an(p??"",!1)),L(!0))},[O,r,te]),d.useEffect(()=>{y(s!=null&&s===!0)},[s]),d.useEffect(()=>{e!=null&&e===!0?v(!0):(v(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{T(a!=null&&a===!0)},[a]);const H=()=>{y(!1),t("..")};return n.jsxs(n.Fragment,{children:[P===!0&&$.accountDetail!=null?n.jsx(qa,{authParams:f,downloadAccountDetailEndPoint:I,closeDrawerHandler:H,isAccountInfoDrawerOpen:P,zeniBankAccountDetail:$.accountDetail}):null,j===!0?n.jsx(ln,{closeDrawerHandler:H,isTransferDrawerOpen:j,zeniAccountsConfig:$.zeniAccountsConfig,authParams:f,downloadAccountDetailEndPoint:I}):null,E===!0?n.jsx(cn,{closeDrawerHandler:H,isCheckDepositDrawerOpen:E}):null,n.jsx(rt,{windowSize:u,children:n.jsx(it,{navigate:t,currentTenant:m,location:o,companyId:D,isDebitCardFeatureEnabled:i,accountId:p??"",isBillPayEnabled:g,isCheckingCommentingEnabled:c,isExpressPayEnabled:b,isAiCfoAccessEnabled:oe,onAskAiCfoClick:me})})]})}const ct=(e,a)=>`/${e}/checking/${a}/account-info`,lt=(e,a)=>`/${e}/checking/${a}/statements`,dt=K(function(e,a){const{companyId:s}=a;return{zeniAccountSetupView:la(e,s),meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true"}},function(e,a){const{navigate:s,companyId:o}=a;return{onSetupButtonClick:()=>{R.trackAccountsPromoPageClicked("Setup Accounts"),e(da(o))},onBackClick:()=>{s("../..",{relative:"path"})},onSetupZeniAccountSuccess:()=>{s("../setup",{relative:"path"})}}})(va),ut=()=>{const e=ne(),a=W(),{tenantEmailDomain:s}=Y(),{useDynamicConfig:o}=N(),t=z(),[r,u]=d.useState(!1),[l,p]=d.useState(!1),h=k(f=>U(f)),{configValue:x}=o(G.zeniAccountsConfig),i=ke(x);d.useEffect(()=>{l===!1&&a.state?.message==="activation"&&p(!0)},[a.state]);const c=S.getSignedInUserTenant(s)?.companyId??h.companyId,m=S.getSignedInUser(),C=!!h.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,b=f=>{u(f)};if(m==null)throw Error("Can't access Zeni account promo page without signing in...");const g=ae(),A=ee(g?.loggedInUserRoleMap),D=Ae(g?.loggedInUserRoleMap);if(C&&A)return n.jsx(Q,{to:"../../checking/setup"});if(h.company?.companyZeniAccountInfo&&(!C&&A||D)){if(a.state?.message==="activation"){const f=tn(a.state?.pathnameStackToGoBack);e(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:f.newStack}})}return n.jsxs(n.Fragment,{children:[n.jsx(Ea,{showConfetti:l}),n.jsx(ue,{analytics:R,onLoad:f=>(I=>I.trackPageLoaded(be.Event.accountsPromoPageViewed))(f)}),n.jsx(pe,{isAppContentDrawerOpen:r,handleDrawerToggle:b}),n.jsx(dt,{analytics:R,navigate:e,companyId:c,onClickMenuIcon:()=>{b(!0)},maxAnnualPercentageYield:i.maxAnnualPercentageYield,maxInsuredAmount:i.maxInsuredAmount,exampleBankBalance:3e6})]})}return n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:t.colors.grey5}})};function Mt(){const e=W(),a=k(P=>U(P)),s=z(),{useFeatureGate:o,useDynamicConfig:t}=N(),r=ae(),u=ee(r?.loggedInUserRoleMap),l=Ae(r?.loggedInUserRoleMap),p=!!a.company?.companyZeniAccountInfo.isZeniAccountEnabled,h=!!a.company?.companyZeniAccountInfo.isZeniAccountTOSAccepted,{isFeatureEnabled:x}=o(F.isChargeCardFeatureEnabled),{isFeatureEnabled:i}=o(F.isDebitCardFeatureEnabled),c=Qe(a),m=De(i,a),C=a?.userRole!=null&&ua(a?.userRole),b=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C)&&pa(r?.loggedInUserRoleMap),g=ma(r?.loggedInUserRoleMap),A=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C)&&ha(r?.loggedInUserRoleMap),{isFeatureEnabled:D}=o(F.isDepositAccountsFeatureEnabled),f=D&&!C,{configValue:I}=t(G.expressPayConfig),O=I.is_enable_all_tenants===!0||I.tenant_ids!=null&&I.tenant_ids.includes(a.tenantId),{isFeatureEnabled:L}=o(F.isAutoTransferRuleEnabled),j=Pa(a,x,i)&&!C&&ga(r?.loggedInUserRoleMap),v=fa(r?.loggedInUserRoleMap),E=f&&ee(r?.loggedInUserRoleMap),T=E||Ne(r?.loggedInUserRoleMap);return n.jsxs(Ve,{children:[n.jsx(w,{path:"setup",element:n.jsx(Me,{isBillPayAdminLevelAccess:b,isUserHasOnlyBillPayAccess:g,isReimbursementAdminLevelAccess:A,isZeniAccountAdminLevelAccess:E,isChargeCardAdminLevelAccess:j,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"setup"})}),n.jsx(w,{path:"verification",element:n.jsx(Me,{isBillPayAdminLevelAccess:b,isUserHasOnlyBillPayAccess:g,isReimbursementAdminLevelAccess:A,isZeniAccountAdminLevelAccess:E,isChargeCardAdminLevelAccess:j,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"verification"})}),L?n.jsxs(n.Fragment,{children:[n.jsx(w,{path:"auto-transfer",element:n.jsx(_e,{})}),T?n.jsx(w,{path:"auto-transfer/:ruleId/edit",element:n.jsx(_e,{isEditDrawerOpen:!0})}):null]}):n.jsx(w,{path:"auto-transfer",element:n.jsx(ie,{})}),O&&u?n.jsxs(n.Fragment,{children:[n.jsx(w,{path:"express-pay",element:n.jsx(se,{})}),n.jsx(w,{path:"express-pay/add-ach",element:n.jsx(se,{isAddACHDrawerOpen:!0})}),n.jsx(w,{path:"express-pay/add-wire/add-address",element:n.jsx(se,{isAddAddressDrawerOpen:!0})}),n.jsx(w,{path:"express-pay/add-wire",element:n.jsx(se,{isAddWireDrawerOpen:!0})})]}):n.jsx(w,{path:"express-pay",element:n.jsx(ie,{})}),n.jsx(w,{path:"promo",element:n.jsx(ut,{})}),c&&!m?n.jsx(w,{path:"/*",element:n.jsx(sn,{})}):p?n.jsxs(n.Fragment,{children:[n.jsx(w,{path:"/",element:n.jsx(xe,{})}),n.jsx(w,{path:"transfer",element:n.jsx(xe,{isTransferDrawerOpen:!0})}),n.jsx(w,{path:"check-deposit",element:n.jsx(xe,{isCheckDepositDrawerOpen:!0})}),n.jsx(w,{path:":accountId/*",element:n.jsx(pt,{})}),n.jsx(w,{path:"*",element:n.jsx(ie,{})})]}):h&&u?n.jsx(w,{path:"*",element:n.jsx(Q,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&l?n.jsx(w,{path:"*",element:n.jsx(Q,{to:"../promo",state:e.state})}):n.jsx(w,{path:"*",element:n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:s.colors.grey5,boxShadow:`0px 2px ${ja.sp1} ${s.colors.dropShadowNormal}`}})})]})}function pt(){return n.jsxs(Ve,{children:[n.jsx(w,{path:"/",element:n.jsx(re,{})}),n.jsx(w,{path:"account-info",element:n.jsx(re,{isAccountInfoDrawerOpen:!0})}),n.jsx(w,{path:"transfer",element:n.jsx(re,{isTransferDrawerOpen:!0})}),n.jsx(w,{path:"check-deposit",element:n.jsx(re,{isCheckDepositDrawerOpen:!0})}),n.jsx(w,{path:"statements",element:n.jsx(Ra,{})}),n.jsx(w,{path:"*",element:n.jsx(ie,{})})]})}export{Mt as default};
57
+ `,ia=K(function(e,t){const{currentTenant:s}=t,o=nn(e,t.accountId),a=S.getSignedInUser(),r=e.tenantState.currentTenantId,u={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:r??""},l=o.accountDetail?.id??"";return{currentTenantCompanyName:s.companyName??"",authParams:u,downloadEndPoint:`${Se.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${l}`,zeniAccountDetail:o,isExpressPayEnabled:t.isExpressPayEnabled,fetchState:o.fetchState}},function(e,t){const{navigate:s,currentTenant:o,location:a,accountId:r}=t,{tenantEmailDomain:u}=o;return{handleMoveMoneyOptionSelection:(l,p)=>{let h="page-not-found";l==="sendMoney"?h=mn(u):l==="payBill"?h=dn(o,t.isBillPayEnabled,t.isDebitCardFeatureEnabled):l==="transfer"?(h=un(u,r),p!=null&&e(en(p))):l==="checkDeposit"?(h=pn(u,r),p!=null&&e(ct(p))):l==="accountStatement"&&(h=la(u,r));const x=ce(a.state?.pathnameStackToGoBack,a.pathname);s(h,{state:{pathnameStackToGoBack:x}})},onAccountDetailClick:()=>{const l=ca(u,r),p=ce(a.state?.pathnameStackToGoBack,a.pathname);s(l,{state:{pathnameStackToGoBack:p}})},onEditNameClick:l=>{e(Le(r,"editName",l))},onReloadZeniAccountDetailPage:()=>{e(tn(r,!1))},onCloseAccountClick:()=>{e(Le(r,"closeAccount",""))},onBackClick:()=>{s("../",{relative:"path"})}}})(bt);function re({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:t,isAccountInfoDrawerOpen:s}){const o=W(),a=ne(),r=_(),u=V(),{tenantEmailDomain:l,accountId:p}=Y(),{useDynamicConfig:h}=N(),{useFeatureGate:x}=N(),{isFeatureEnabled:i}=x(F.isDebitCardFeatureEnabled),{isFeatureEnabled:c}=x(F.isCheckingCommentingEnabled),m=k(Z=>U(Z)),{configValue:C}=h(G.expressPayConfig),b=C.is_enable_all_tenants===!0||C.tenant_ids!=null&&C.tenant_ids.includes(m.tenantId),g=!!m.companyBillPayInfo?.info?.isBillPayEnabled,A=S.getSignedInUser(),D=m.companyId??S.getSignedInUserTenant(l)?.companyId,f={userId:A?.userId??"",sessionId:A?.zeniSessionId??"",tenantId:m.tenantId??""},I=`${Ie}/account_details`,[O,L]=d.useState(!1),[j,v]=d.useState(!1),[E,T]=d.useState(!1),[P,y]=d.useState(!1),$=k(Z=>nn(Z,p??"")),ae=$.fetchState,{isAiCfoAccessEnabled:oe,onAskAiCfoClick:me}=rn({mobileExploreReferrer:"Checking Account Detail"});on({isDataReady:ae==="Completed"}),d.useEffect(()=>{O||(r(tn(p??"",!1)),L(!0))},[O,r,ae]),d.useEffect(()=>{y(s!=null&&s===!0)},[s]),d.useEffect(()=>{e!=null&&e===!0?v(!0):(v(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{T(t!=null&&t===!0)},[t]);const H=()=>{y(!1),a("..")};return n.jsxs(n.Fragment,{children:[P===!0&&$.accountDetail!=null?n.jsx(qt,{authParams:f,downloadAccountDetailEndPoint:I,closeDrawerHandler:H,isAccountInfoDrawerOpen:P,zeniBankAccountDetail:$.accountDetail}):null,j===!0?n.jsx(ln,{closeDrawerHandler:H,isTransferDrawerOpen:j,zeniAccountsConfig:$.zeniAccountsConfig,authParams:f,downloadAccountDetailEndPoint:I}):null,E===!0?n.jsx(cn,{closeDrawerHandler:H,isCheckDepositDrawerOpen:E}):null,n.jsx(ra,{windowSize:u,children:n.jsx(ia,{navigate:a,currentTenant:m,location:o,companyId:D,isDebitCardFeatureEnabled:i,accountId:p??"",isBillPayEnabled:g,isCheckingCommentingEnabled:c,isExpressPayEnabled:b,isAiCfoAccessEnabled:oe,onAskAiCfoClick:me})})]})}const ca=(e,t)=>`/${e}/checking/${t}/account-info`,la=(e,t)=>`/${e}/checking/${t}/statements`,da=K(function(e,t){const{companyId:s}=t;return{zeniAccountSetupView:lt(e,s),meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true"}},function(e,t){const{navigate:s,companyId:o}=t;return{onSetupButtonClick:()=>{R.trackAccountsPromoPageClicked("Setup Accounts"),e(dt(o))},onBackClick:()=>{s("../..",{relative:"path"})},onSetupZeniAccountSuccess:()=>{s("../setup",{relative:"path"})}}})(vt),ua=()=>{const e=ne(),t=W(),{tenantEmailDomain:s}=Y(),{useDynamicConfig:o}=N(),a=z(),[r,u]=d.useState(!1),[l,p]=d.useState(!1),h=k(f=>U(f)),{configValue:x}=o(G.zeniAccountsConfig),i=ke(x);d.useEffect(()=>{l===!1&&t.state?.message==="activation"&&p(!0)},[t.state]);const c=S.getSignedInUserTenant(s)?.companyId??h.companyId,m=S.getSignedInUser(),C=!!h.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,b=f=>{u(f)};if(m==null)throw Error("Can't access Zeni account promo page without signing in...");const g=te(),A=ee(g?.loggedInUserRoleMap),D=Ae(g?.loggedInUserRoleMap);if(C&&A)return n.jsx(X,{to:"../../checking/setup"});if(h.company?.companyZeniAccountInfo&&(!C&&A||D)){if(t.state?.message==="activation"){const f=an(t.state?.pathnameStackToGoBack);e(t.pathname,{state:{...t.state,message:void 0,pathnameStackToGoBack:f.newStack}})}return n.jsxs(n.Fragment,{children:[n.jsx(Et,{showConfetti:l}),n.jsx(ue,{analytics:R,onLoad:f=>(I=>I.trackPageLoaded(be.Event.accountsPromoPageViewed))(f)}),n.jsx(pe,{isAppContentDrawerOpen:r,handleDrawerToggle:b}),n.jsx(da,{analytics:R,navigate:e,companyId:c,onClickMenuIcon:()=>{b(!0)},maxAnnualPercentageYield:i.maxAnnualPercentageYield,maxInsuredAmount:i.maxInsuredAmount,exampleBankBalance:3e6})]})}return n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:a.colors.grey5}})};function Ma(){const e=W(),t=k(P=>U(P)),s=z(),{useFeatureGate:o,useDynamicConfig:a}=N(),r=te(),u=ee(r?.loggedInUserRoleMap),l=Ae(r?.loggedInUserRoleMap),p=!!t.company?.companyZeniAccountInfo.isZeniAccountEnabled,h=!!t.company?.companyZeniAccountInfo.isZeniAccountTOSAccepted,{isFeatureEnabled:x}=o(F.isChargeCardFeatureEnabled),{isFeatureEnabled:i}=o(F.isDebitCardFeatureEnabled),c=Xe(t),m=De(i,t),C=t?.userRole!=null&&ut(t?.userRole),b=(t?.company==null||t.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C)&&pt(r?.loggedInUserRoleMap),g=mt(r?.loggedInUserRoleMap),A=(t?.company==null||t.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C)&&ht(r?.loggedInUserRoleMap),{isFeatureEnabled:D}=o(F.isDepositAccountsFeatureEnabled),f=D&&!C,{configValue:I}=a(G.expressPayConfig),O=I.is_enable_all_tenants===!0||I.tenant_ids!=null&&I.tenant_ids.includes(t.tenantId),{isFeatureEnabled:L}=o(F.isAutoTransferRuleEnabled),j=Pt(t,x,i)&&!C&&gt(r?.loggedInUserRoleMap),v=ft(r?.loggedInUserRoleMap),E=f&&ee(r?.loggedInUserRoleMap),T=E||Ne(r?.loggedInUserRoleMap);return n.jsxs(Ve,{children:[n.jsx(w,{path:"setup",element:n.jsx(Me,{isBillPayAdminLevelAccess:b,isUserHasOnlyBillPayAccess:g,isReimbursementAdminLevelAccess:A,isZeniAccountAdminLevelAccess:E,isChargeCardAdminLevelAccess:j,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"setup"})}),n.jsx(w,{path:"verification",element:n.jsx(Me,{isBillPayAdminLevelAccess:b,isUserHasOnlyBillPayAccess:g,isReimbursementAdminLevelAccess:A,isZeniAccountAdminLevelAccess:E,isChargeCardAdminLevelAccess:j,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"verification"})}),L?n.jsxs(n.Fragment,{children:[n.jsx(w,{path:"auto-transfer",element:n.jsx(_e,{})}),T?n.jsx(w,{path:"auto-transfer/:ruleId/edit",element:n.jsx(_e,{isEditDrawerOpen:!0})}):null]}):n.jsx(w,{path:"auto-transfer",element:n.jsx(ie,{})}),O&&u?n.jsxs(n.Fragment,{children:[n.jsx(w,{path:"express-pay",element:n.jsx(se,{})}),n.jsx(w,{path:"express-pay/add-ach",element:n.jsx(se,{isAddACHDrawerOpen:!0})}),n.jsx(w,{path:"express-pay/add-wire/add-address",element:n.jsx(se,{isAddAddressDrawerOpen:!0})}),n.jsx(w,{path:"express-pay/add-wire",element:n.jsx(se,{isAddWireDrawerOpen:!0})})]}):n.jsx(w,{path:"express-pay",element:n.jsx(ie,{})}),n.jsx(w,{path:"promo",element:n.jsx(ua,{})}),c&&!m?n.jsx(w,{path:"/*",element:n.jsx(sn,{})}):p?n.jsxs(n.Fragment,{children:[n.jsx(w,{path:"/",element:n.jsx(xe,{})}),n.jsx(w,{path:"transfer",element:n.jsx(xe,{isTransferDrawerOpen:!0})}),n.jsx(w,{path:"check-deposit",element:n.jsx(xe,{isCheckDepositDrawerOpen:!0})}),n.jsx(w,{path:":accountId/*",element:n.jsx(pa,{})}),n.jsx(w,{path:"*",element:n.jsx(ie,{})})]}):h&&u?n.jsx(w,{path:"*",element:n.jsx(X,{to:"../setup"})}):t.company?.companyZeniAccountInfo&&l?n.jsx(w,{path:"*",element:n.jsx(X,{to:"../promo",state:e.state})}):n.jsx(w,{path:"*",element:n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:s.colors.grey5,boxShadow:`0px 2px ${jt.sp1} ${s.colors.dropShadowNormal}`}})})]})}function pa(){return n.jsxs(Ve,{children:[n.jsx(w,{path:"/",element:n.jsx(re,{})}),n.jsx(w,{path:"account-info",element:n.jsx(re,{isAccountInfoDrawerOpen:!0})}),n.jsx(w,{path:"transfer",element:n.jsx(re,{isTransferDrawerOpen:!0})}),n.jsx(w,{path:"check-deposit",element:n.jsx(re,{isCheckDepositDrawerOpen:!0})}),n.jsx(w,{path:"statements",element:n.jsx(Rt,{})}),n.jsx(w,{path:"*",element:n.jsx(ie,{})})]})}export{Ma as default};
@@ -0,0 +1,9 @@
1
+ import{j as i}from"./liveblocks-C5h4gZcw.js";import{a as u}from"./sentry-bxHUuQF3.js";import{h as x,u as j,g as B,i as $,j as p}from"./core-DYMASrCh.js";import{IG as s,IF as v,OV as C,eP as P,OW as T}from"./zeni-epic-state-901GvRjQ.js";import{J as z,at as g,h as D,z as E,B as L,c4 as G,j as N}from"./index-BHo22hBN.js";import{n as _}from"./mui-DU2Ylp5t.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b93da8c0-9dcc-47cf-9a9e-fa9288cb5d30",e._sentryDebugIdIdentifier="sentry-dbid-b93da8c0-9dcc-47cf-9a9e-fa9288cb5d30")}catch{}})();const U=_.div`
2
+ display: flex;
3
+ height: 100vh;
4
+ width: 100%;
5
+ flex: 1 1 auto;
6
+ flex-direction: column;
7
+ align-items: center;
8
+ background-color: ${e=>e.theme.colors.grey4};
9
+ `;function W(){const e=x(),n=j(),d=z(),l=B();let{accountId:a}=$(),f=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${a}`;a==null&&l.pathname.includes(`${s}/statements`)&&(a=s,f=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[m,y]=u.useState(!1),h=D();u.useEffect(()=>{m||(y(!0),n(v(a??"",!1)))},[m,n]);const o=p(t=>C(t,a??"")),I=()=>{const t=N(l.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:t.newStack}})},c=E.getSignedInUser(),r=p(t=>P(t)),b={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:r.tenantId??""},w=T(a??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",k=r.company?.companyInfo.companyLegalName??r.companyName;if(c==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?i.jsx(L,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}}):i.jsx(U,{windowSize:d,children:i.jsx(G,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:I,authParams:b,downloadEndPoint:f})})}export{W as Z};
@@ -1 +1 @@
1
- import"./sentry-BSVS1PdG.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="aeade864-8999-4b65-a5fe-284d93c9cae4",e._sentryDebugIdIdentifier="sentry-dbid-aeade864-8999-4b65-a5fe-284d93c9cae4")}catch{}})();function d(e,t){if(t!=null)return e.find(n=>n.qboId===t)}function i(e,t){return e.filter(n=>n.qboId!=null&&t.includes(n.qboId))}function a(e,t){return t.map(n=>({accountId:d(e,n.accountId.selectedOption)?.accountId??"",expenseType:n.expenseType.selectedOption??"",type1099:n.type1099.selectedOption??"",boxType:n.boxType.selectedOption??""}))}export{d as a,i as g,a as m};
1
+ import"./sentry-bxHUuQF3.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="aeade864-8999-4b65-a5fe-284d93c9cae4",e._sentryDebugIdIdentifier="sentry-dbid-aeade864-8999-4b65-a5fe-284d93c9cae4")}catch{}})();function d(e,t){if(t!=null)return e.find(n=>n.qboId===t)}function i(e,t){return e.filter(n=>n.qboId!=null&&t.includes(n.qboId))}function a(e,t){return t.map(n=>({accountId:d(e,n.accountId.selectedOption)?.accountId??"",expenseType:n.expenseType.selectedOption??"",type1099:n.type1099.selectedOption??"",boxType:n.boxType.selectedOption??""}))}export{d as a,i as g,a as m};