@zeniai/web-app-ui 5.0.33-dev → 5.0.34-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 (122) hide show
  1. package/dist/assets/AddressRoutes-CGzHGxRT.js +1 -0
  2. package/dist/assets/{AddressScreen-D8SzP-BI.js → AddressScreen-AFAxFcr6.js} +2 -2
  3. package/dist/assets/{AiCfoScreen-BNNwor5L.js → AiCfoScreen-DmKyGqNi.js} +3 -3
  4. package/dist/assets/{BillPayApprovalRoutes-cEfkVGzt.js → BillPayApprovalRoutes-DAmbafPP.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-CnCOl4NR.js → BillPayRoutes-y8D5pwFQ.js} +1 -1
  6. package/dist/assets/{BusinessVerificationPageScreen-Cq2q9mY8.js → BusinessVerificationPageScreen-C_EI-uLX.js} +2 -2
  7. package/dist/assets/{ChargeCardRoutes-C98znKtc.js → ChargeCardRoutes-Bfy_R6BT.js} +1 -1
  8. package/dist/assets/CompanyPassportScreen-B-4IBE60.js +1 -0
  9. package/dist/assets/ConnectionAuthScreen-C3BprUlv.js +11 -0
  10. package/dist/assets/CustomerOnboardingAuthScreen-CV1Bn8WP.js +1 -0
  11. package/dist/assets/{CustomerOnboardingRoutes-4yrAjE13.js → CustomerOnboardingRoutes-BBj1ArYm.js} +6 -6
  12. package/dist/assets/{DashboardRoutes-znnp5Yrf.js → DashboardRoutes-6ZUmgonA.js} +3 -3
  13. package/dist/assets/DefaultTenantHome-BDDHNoZd.js +1 -0
  14. package/dist/assets/DomesticWireDetailScreen-DD4EK2xs.js +18 -0
  15. package/dist/assets/DrawerScreen-D1vug7Su.js +1 -0
  16. package/dist/assets/EntityDetailRoutes-DCqyq3fO.js +1 -0
  17. package/dist/assets/{ExpenseAutomationRoutes-BAIBrDeZ.js → ExpenseAutomationRoutes-BhsC8wfD.js} +3 -3
  18. package/dist/assets/FeaturePreviewScreen-EBGRCzCx.js +1 -0
  19. package/dist/assets/MagicLinkRoutes-j5LyzYMu.js +72 -0
  20. package/dist/assets/MagicLinkSignInScreen-y1GjWrZS.js +12 -0
  21. package/dist/assets/{MobileAppDrawer-DA8JHC4T.js → MobileAppDrawer-C_-9cGqZ.js} +1 -1
  22. package/dist/assets/NotFoundScreen-DSiFIhWD.js +1 -0
  23. package/dist/assets/NotificationRoutes-BOVxdh9J.js +1 -0
  24. package/dist/assets/{PandLWithForecastRoutes-tewoGCp7.js → PandLWithForecastRoutes-ClpUJFh8.js} +1 -1
  25. package/dist/assets/PeopleRoutes-B3fsx3EP.js +22 -0
  26. package/dist/assets/PerformanceRoutes-CSdn3j19.js +1 -0
  27. package/dist/assets/{Preview-Bz8E3H0F.js → Preview-DAblAbpj.js} +1 -1
  28. package/dist/assets/{QBOConnectionScreen-CMiidefF.js → QBOConnectionScreen-C-sunuvd.js} +1 -1
  29. package/dist/assets/ReferralListScreen-Qn8W3bhC.js +5 -0
  30. package/dist/assets/{ReimbursementApprovalRoutes-BtjcUUOE.js → ReimbursementApprovalRoutes-hDXh-CX1.js} +1 -1
  31. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-C8tvuERG.js → ReimbursementApprovalRuleDetailScreen-kyHtSpq0.js} +1 -1
  32. package/dist/assets/{ReimbursementRoutes-C3rqqmCU.js → ReimbursementRoutes-Cm59fVqI.js} +9 -9
  33. package/dist/assets/{ReportsRoutes-CuH5t9qk.js → ReportsRoutes-WM0xdLh1.js} +1 -1
  34. package/dist/assets/RewardsRoutes-CrTfYe3R.js +1 -0
  35. package/dist/assets/ScreenRoutes-DNKRkVOP.js +2 -0
  36. package/dist/assets/{SettingsRoutes-DlGHyMGd.js → SettingsRoutes-8vIYIDnj.js} +7 -7
  37. package/dist/assets/{SetupPagesScreen-DVerh3cI.js → SetupPagesScreen-BOIC8eCo.js} +5 -5
  38. package/dist/assets/{SignInScreen-DsQIZnYy.js → SignInScreen-BkALz30W.js} +1 -1
  39. package/dist/assets/SignOutScreen-74CQEWcD.js +9 -0
  40. package/dist/assets/{TaskListScreen-DVaADe8u.js → TaskListScreen-CsUTsKBi.js} +2 -2
  41. package/dist/assets/TaskRoutes-DkPm7AnC.js +9 -0
  42. package/dist/assets/TransactionDetailRoutes-BpNPK9Vy.js +1 -0
  43. package/dist/assets/{TransactionDetailScreen-BPZmu039.js → TransactionDetailScreen-BsTrwOAd.js} +2 -2
  44. package/dist/assets/{TransactionListRoutes-CFWvcLjK.js → TransactionListRoutes-i8s0WF_Q.js} +1 -1
  45. package/dist/assets/TreasuryRoutes-BRD3Rl3h.js +37 -0
  46. package/dist/assets/{VendorsRoutes-D9IguX0B.js → VendorsRoutes-EtZz9bTZ.js} +1 -1
  47. package/dist/assets/{WiseConfirmationScreen-CDkv_p9m.js → WiseConfirmationScreen-C2OctdPH.js} +2 -2
  48. package/dist/assets/{ZeniAccountRoutes-C65zo0W4.js → ZeniAccountRoutes-CN875CoG.js} +7 -7
  49. package/dist/assets/ZeniAccountStatementScreen-BAiLbvsx.js +9 -0
  50. package/dist/assets/{accountMappingHelper-B6bZQ8yR.js → accountMappingHelper-1H6YzkWh.js} +1 -1
  51. package/dist/assets/{analytics-Ch-ak7gp.js → analytics-D6PJZcCm.js} +1 -1
  52. package/dist/assets/{analyticsHelper-DaApF_Ry.js → analyticsHelper-edBX1gRH.js} +1 -1
  53. package/dist/assets/{core-CeHHCRsO.js → core-C33SxPr0.js} +1 -1
  54. package/dist/assets/{decodeURIComponentSafe-Dp-U0ChB.js → decodeURIComponentSafe-DBubftdA.js} +1 -1
  55. package/dist/assets/{dnd-hZIw-3DZ.js → dnd-WhcD1exD.js} +1 -1
  56. package/dist/assets/{empty-BnIIm6SS.js → empty-CH-y1nWQ.js} +1 -1
  57. package/dist/assets/{empty-Cy0_m91q.js → empty-CdwAoCYs.js} +1 -1
  58. package/dist/assets/{emptyVideoElement-DHFCQtyU.js → emptyVideoElement-D7Jr7Sdq.js} +1 -1
  59. package/dist/assets/{epic-HUhsfx8y.js → epic-CWZablXh.js} +1 -1
  60. package/dist/assets/getLocaleForTenant-Xh1uaNO2.js +1 -0
  61. package/dist/assets/{index-DOWxjRti.js → index-B0trrGH2.js} +1 -1
  62. package/dist/assets/{index-ClT4aCIz.js → index-DOtJS3_4.js} +2 -2
  63. package/dist/assets/{index-D5XKh55a.js → index-DZESz0T9.js} +1 -1
  64. package/dist/assets/{index-zy4Z27td.js → index-DorjXAyZ.js} +1 -1
  65. package/dist/assets/{index-C1Nz4ObA.js → index-VKfxo2ml.js} +1 -1
  66. package/dist/assets/{index-C_gae4SI.js → index-li9kl9K_.js} +1 -1
  67. package/dist/assets/{index-D-YRQyi6.js → index-pUXlb0zY.js} +13130 -13316
  68. package/dist/assets/{lexical-BRvRsnRt.js → lexical-QnRSjOj3.js} +1 -1
  69. package/dist/assets/{liveblocks-ktikibPc.js → liveblocks-CobNzJQ8.js} +1 -1
  70. package/dist/assets/{lottie-BZnwKWVQ.js → lottie-C3pXl1t7.js} +1 -1
  71. package/dist/assets/{mui-BcN8nM6l.js → mui-BZJL7p2F.js} +1 -1
  72. package/dist/assets/{pathToGoBack-BTubduSA.js → pathToGoBack-CZlpwtCa.js} +1 -1
  73. package/dist/assets/{pdf-CeFSGDZc.js → pdf-B8JyBdKX.js} +4 -4
  74. package/dist/assets/{pdf-lib-B3JeYCZ4.js → pdf-lib-ALX3DMYD.js} +1 -1
  75. package/dist/assets/{plaid-BIfn11py.js → plaid-JaP9Mc6f.js} +1 -1
  76. package/dist/assets/{pusher-J1MfJQfv.js → pusher-D0u2ilRO.js} +1 -1
  77. package/dist/assets/{react-Ukgqh5im.js → react-6yjdboHz.js} +1 -1
  78. package/dist/assets/{react-BlDA8qLA.js → react-CrQJkVRu.js} +1 -1
  79. package/dist/assets/{react-B82e5ew1.js → react-D2VdXtRP.js} +1 -1
  80. package/dist/assets/{react-BWlFoOhS.js → react-D9j1suk9.js} +1 -1
  81. package/dist/assets/{react-D-Y63YAu.js → react-DCJPlJgN.js} +1 -1
  82. package/dist/assets/{react-DnMl3IJe.js → react-i0rXVvq8.js} +1 -1
  83. package/dist/assets/{recharts-BoGmRVv5.js → recharts-DgAB7GKe.js} +1 -1
  84. package/dist/assets/{routePaths-B6C74NEk.js → routePaths-LaBmoMCH.js} +1 -1
  85. package/dist/assets/{sentry-B-Fm9h-1.js → sentry-4KELney1.js} +1 -1
  86. package/dist/assets/{url-C-8gN_nt.js → url-Bgtn40KH.js} +1 -1
  87. package/dist/assets/{url-DKh_C2jl.js → url-xkPMMYm1.js} +1 -1
  88. package/dist/assets/useAskAiCfoHostNavButtonProps-AnwBVkwu.js +1 -0
  89. package/dist/assets/{useDeviceId-BixMum0t.js → useDeviceId-aR311Sxi.js} +1 -1
  90. package/dist/assets/useFetchSuggestedQuestionsWhenReady-CooyddDy.js +1 -0
  91. package/dist/assets/{useInitialThreadRequest-BzNb-ryN.js → useInitialThreadRequest-wLyFIlY1.js} +1 -1
  92. package/dist/assets/{utils-BgeAfdtF.js → utils-BZbMXTZs.js} +1 -1
  93. package/dist/assets/{withTransactionSidePanel-DA2GIY9y.js → withTransactionSidePanel-Chqi629s.js} +3 -3
  94. package/dist/assets/{zeni-epic-state-CFbdjqYE.js → zeni-epic-state-Bc0tGzp_.js} +3 -3
  95. package/dist/index.html +1 -1
  96. package/package.json +2 -2
  97. package/dist/assets/AddressRoutes-CzsaZkMP.js +0 -1
  98. package/dist/assets/CompanyPassportScreen-CukyqNdg.js +0 -1
  99. package/dist/assets/ConnectionAuthScreen-4F6bDLJv.js +0 -11
  100. package/dist/assets/CustomerOnboardingAuthScreen-DFNLLpap.js +0 -1
  101. package/dist/assets/DefaultTenantHome-BUrzO0Kf.js +0 -1
  102. package/dist/assets/DomesticWireDetailScreen-BXuss5HS.js +0 -18
  103. package/dist/assets/DrawerScreen-D8S_TfMM.js +0 -1
  104. package/dist/assets/EntityDetailRoutes-ng8MEGmi.js +0 -1
  105. package/dist/assets/FeaturePreviewScreen-Cv2kzDhk.js +0 -1
  106. package/dist/assets/MagicLinkRoutes-buwkPtQG.js +0 -72
  107. package/dist/assets/MagicLinkSignInScreen-Z9MDbBXy.js +0 -12
  108. package/dist/assets/NotFoundScreen-CsUvANsv.js +0 -1
  109. package/dist/assets/NotificationRoutes-CrI51KOk.js +0 -1
  110. package/dist/assets/PeopleRoutes-ptEq_L_f.js +0 -22
  111. package/dist/assets/PerformanceRoutes-CpXe0PsH.js +0 -1
  112. package/dist/assets/ReferralListScreen-CGEAY0Y0.js +0 -5
  113. package/dist/assets/RewardsRoutes-MZF-Hn1d.js +0 -1
  114. package/dist/assets/ScreenRoutes-CayafrDx.js +0 -2
  115. package/dist/assets/SignOutScreen-CaRMQGOm.js +0 -9
  116. package/dist/assets/TaskRoutes-BBXITxsO.js +0 -9
  117. package/dist/assets/TransactionDetailRoutes-CvsvmD8w.js +0 -1
  118. package/dist/assets/TreasuryRoutes-Cs53U3__.js +0 -37
  119. package/dist/assets/ZeniAccountStatementScreen-Cy4IuKEc.js +0 -9
  120. package/dist/assets/getLocaleForTenant-vlRgj9iJ.js +0 -1
  121. package/dist/assets/useAskAiCfoHostNavButtonProps-DVYXzaC3.js +0 -1
  122. package/dist/assets/useFetchSuggestedQuestionsWhenReady-DfAF9l9n.js +0 -1
@@ -0,0 +1,37 @@
1
+ import{j as e}from"./liveblocks-CobNzJQ8.js";import{j as L,u as M,h as U,l as O,g as f,N as B,k as V,n as Ce,o as k}from"./core-C33SxPr0.js";import{cj as N,eN as D,MB as R,D7 as ae,fc as H,CR as ne,MD as Te,Da as we,Mz as ke,MA as se,MR as je,Bh as Ae,s6 as be,MF as Ee,Dl as ve,MC as re,cM as W,wc as oe,eR as De,eT as Fe,NM as Be,NN as Le,CS as Me,NO as Ue,CT as Re,D0 as Pe,bv as Oe,bD as Ve,cu as Ne,bE as _e,cO as ze,fb as $e,bs as Ge,Il as Ze,ci as He}from"./zeni-epic-state-Bc0tGzp_.js";import{j as _,al as We,z as b,J as z,e as j,b_ as qe,b$ as Je,c0 as Z,Z as q,h as Ke,K as Qe,I as Xe,a as ie,d as v,y as Ye,B as et,c1 as tt,ao as J,s as at,c2 as nt,q as K,c3 as st,A as X,c4 as rt,a4 as ot}from"./index-pUXlb0zY.js";import{D as it,n as P,S as ct}from"./mui-BZJL7p2F.js";import lt from"./NotFoundScreen-DSiFIhWD.js";import{S as Y}from"./SetupPagesScreen-BOIC8eCo.js";import{a as d}from"./sentry-4KELney1.js";import{u as ut}from"./useAskAiCfoHostNavButtonProps-AnwBVkwu.js";import{c as dt}from"./useFetchSuggestedQuestionsWhenReady-CooyddDy.js";import{M as ce}from"./MobileAppDrawer-C_-9cGqZ.js";import{F as pt}from"./FeaturePreviewScreen-EBGRCzCx.js";import{a as ee}from"./analyticsHelper-edBX1gRH.js";import"./recharts-DgAB7GKe.js";import"./analytics-D6PJZcCm.js";import"./plaid-JaP9Mc6f.js";import"./dnd-WhcD1exD.js";import"./stripe-DMRn4zHo.js";import"./lottie-C3pXl1t7.js";import"./lexical-QnRSjOj3.js";import"./pdf-B8JyBdKX.js";import"./utils-BZbMXTZs.js";import"./routePaths-LaBmoMCH.js";import"./BusinessVerificationPageScreen-C_EI-uLX.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]="128efd2d-e9e2-443f-907f-a4a0641dd4a8",t._sentryDebugIdIdentifier="sentry-dbid-128efd2d-e9e2-443f-907f-a4a0641dd4a8")}catch{}})();const mt=V(function(t,a){const{companyId:n}=a;return{treasurySetupView:R(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(we(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(Te(r))}}})(qe);function ft(){const t=L(),a=M(),n=U(),{tenantEmailDomain:o}=O(),p=_(),r=f(w=>w.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=We(r),s=N(p?.loggedInUserRoleMap),[c,i]=d.useState(!1),[y,T]=d.useState(!1),[u,l]=d.useState(!1),g=f(w=>D(w)),h=b.getSignedInUserTenant(o)?.companyId??g.companyId,I=b.getSignedInUser(),S=f(w=>R(w,h)),C=f(w=>w.treasurySetupViewState.fetchState),x=f(w=>w.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=f(w=>w.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(I==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{c||C!=="Not-Started"||h==null||(i(!0),n(ae(h,!0,!1)))},[c,C,h,n]),d.useEffect(()=>{u||F!=="Not-Started"||h==null||(l(!0),n(H()))},[u,F,h,n]),d.useEffect(()=>{y||x!=="Not-Started"||h==null||(T(!0),n(ne()))},[y,x,h,n]),d.useEffect(()=>{m==="In-Progress"&&r==="Completed"&&t("../")},[m,r,t]),g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(B,{to:"../promo"});const E=g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||C!=="Completed";return e.jsxs(e.Fragment,{children:[!E&&e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(mt,{navigate:t,location:a,companyId:h,isEditMode:!0,isLoading:E,isReadOnly:!s,treasurySetupView:S,analytics:j})]})}const yt=V(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:je(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:R(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{Z(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{Z(a.analytics,"confirm",r,m,"Transfer"),t(ve())},onSaveChangesToLocalStore:s=>{t(Ee(s))},onFetchLinkTokenClick:s=>{t(be("treasury_setup",s))},onEstablishConnectionClick:s=>{t(Ae(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(Je),gt=({isFirstTransfer:t})=>{const a=L(),{tenantEmailDomain:n}=O(),o=U(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[c,i]=d.useState(!1),[y,T]=d.useState(!1),u=f(x=>x.treasurySetupViewState.fetchState),l=f(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),g=f(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),h=f(x=>D(x)),I=b.getSignedInUserTenant(n)?.companyId??h.companyId,S=f(x=>ke(x)),C=f(x=>R(x,I));if(b.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||I==null||(s(!0),o(ae(I,!0,!1)))},[m,u,I,o]),d.useEffect(()=>{c||l!=="Not-Started"||I==null||(i(!0),o(H()))},[c,l,I,o]),d.useEffect(()=>{y||g!=="Not-Started"||I==null||(T(!0),o(ne()))},[y,g,I,o]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(yt,{analytics:j,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:h,treasurySetupView:C,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{Z(j,"review",S.treasuryTransferMoneyLocalData,C.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},ht=P.div`
2
+ display: flex;
3
+ min-height: 100%;
4
+ width: 100%;
5
+ flex: 1 1 auto;
6
+ flex-direction: column;
7
+ align-items: center;
8
+ background-color: ${t=>t.theme.colors.grey4};
9
+ `,St={overlayWidth:new Ye(100,100,48)},xt=V(function(t,a){const n=re(t),{companyId:o}=a;return{treasuryDetail:n,treasurySetupView:R(t,o),downloadEndPoint:`${J.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:c=>{let i="page-not-found";c==="editPortfolio"?i=It(s):c==="statements"?i=Ct(s):c==="taxLetter"?i=Tt(s):c==="settings"&&(i=wt(s));const y=at(p.state?.pathnameStackToGoBack,p.pathname);n(i,{state:{pathnameStackToGoBack:y}})},onColumnSortConfigChanged:(c,i)=>{t(Be({uiState:{sortKey:c,sortOrder:i}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{r(!0)},onAutoTransferClick:()=>{n("../../checking/auto-transfer")}}})(tt);function G({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=M(),o=L(),p=U(),r=q(),m=Ke(),s=f(A=>D(A)),{tenantEmailDomain:c}=O(),i=s.companyId??b.getSignedInUserTenant(c)?.companyId,[y,T]=d.useState(!1),u=f(A=>re(A)),l=u.fetchState,g=u.accountSummary?.totalBalance?.amount,h=f(A=>A.treasurySetupViewState.treasuryFundsDetails?.fetchStatus),I=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",S=_(),C=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=N(S?.loggedInUserRoleMap),F=W(S?.loggedInUserRoleMap),{areTenantIdsInSync:E}=Qe();d.useEffect(()=>{l==="Not-Started"&&!y&&E&&(T(!0),p(oe(!0)))},[y,p,l,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 w=()=>{o("..")},[le,ue]=d.useState(!1),Q=A=>{ue(A)},{isAiCfoOpen:de,setIsAiCfoOpen:pe}=Xe(),{isAiCfoAccessEnabled:me,onAskAiCfoClick:fe}=ut({isAiCfoOpen:de,setIsAiCfoOpen:pe,mobileExploreReferrer:"Treasury"});dt({isDataReady:l==="Completed"});const{useFeatureGate:$}=ie(),{isFeatureEnabled:ye}=$(v.isDebitCardFeatureEnabled),{isFeatureEnabled:ge}=$(v.isAutoTransferRuleEnabled),{isFeatureEnabled:he}=$(v.isTreasuryCommentingEnabled),Se=De(s),xe=Fe(ye,s);if(Se===!0&&xe!==!0)return e.jsx(pt,{});if(I){const A=h?.fetchState!=="Completed"||u.accountSummaryFetchState.fetchState!=="Completed";return e.jsxs(e.Fragment,{children:[u.accountSummaryFetchState.fetchState==="Completed"&&h?.fetchState==="Completed"&&t===!1&&a===!1?e.jsx(z,{analytics:j,onLoad:()=>{}}):null,e.jsx(it,{onClose:w,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:St.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:m.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(kt,{onClick:Ie=>Ie.stopPropagation(),children:[t===!0?e.jsx(gt,{isFirstTransfer:u.transactions.length===0||g===0}):null,a===!0?e.jsx(ft,{}):null]})}),e.jsxs(ht,{windowSize:r,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:Q}),e.jsx(xt,{treasuryDetailsView:u,isAutoTransferRuleEnabled:ge,navigate:o,currentTenant:s,location:n,companyId:i,analytics:j,isTreasuryCommentingEnabled:he,handleDrawerToggle:Q,isLoading:A,isAiCfoAccessEnabled:me,onAskAiCfoClick:fe})]})]})}return C&&x?e.jsx(B,{to:"../setup"}):s.companyTreasuryInfo?.info&&!C&&F?e.jsx(B,{to:"../promo",state:n.state}):e.jsx(et,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const It=t=>`/${t}/treasury/edit-portfolio`,Ct=t=>`/${t}/treasury/statements`,Tt=t=>`/${t}/treasury/tax-letter`,wt=t=>`/${t}/treasury/setup`,kt=P(ct)`
10
+ display: flex;
11
+ min-height: 100%;
12
+ flex-direction: column;
13
+ `,jt=P.div`
14
+ display: flex;
15
+ height: 100vh;
16
+ width: 100%;
17
+ flex: 1 1 auto;
18
+ flex-direction: column;
19
+ align-items: center;
20
+ background-color: ${t=>t.theme.colors.grey4};
21
+ `;function At(){const t=L(),a=U(),n=q(),o=M(),p=`${J.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(l=>Le(l));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),a(Me(!1)))},[r,s.fetchState,a]);const c=b.getSignedInUser(),i=f(l=>D(l)),y={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:i.tenantId??""},T=i.company?.companyInfo.companyLegalName??i.companyName;if(c==null)throw Error("Can't access statements page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(jt,{windowSize:n,children:e.jsx(nt,{currentTenantCompanyName:T,statementListView:s,isLoading:u,onBackClick:()=>{const l=K(o.state?.pathnameStackToGoBack),g=l.poppedPathname??"..";t(g,{state:{pathnameStackToGoBack:l.newStack}})},authParams:y,downloadEndPoint:p})})}const bt=P.div`
22
+ display: flex;
23
+ height: 100vh;
24
+ width: 100%;
25
+ flex: 1 1 auto;
26
+ flex-direction: column;
27
+ align-items: center;
28
+ background-color: ${t=>t.theme.colors.grey4};
29
+ `;function Et(){const t=L(),a=q(),n=M(),o=U(),p=`${J.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(l=>Ue(l));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),o(Re(!1)))},[r,s.fetchState,o]);const c=b.getSignedInUser(),i=f(l=>D(l)),y={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:i.tenantId??""},T=i.company?.companyInfo.companyLegalName??i.companyName;if(c==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(st,{currentTenantCompanyName:T,taxLetterListView:s,isLoading:u,onBackClick:()=>{const l=K(n.state?.pathnameStackToGoBack),g=l.poppedPathname??"..";t(g,{state:{pathnameStackToGoBack:l.newStack}})},authParams:y,downloadEndPoint:p})})}const vt=V(function(t,a){const{companyId:n}=a,o=R(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(Pe(o))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:p=>{n(p?"..":"../setup",{relative:"path"})}}})(rt),Dt=()=>{const t=L(),a=M(),n=U(),{tenantEmailDomain:o}=O(),[p,r]=d.useState(!1),m=f(S=>D(S)),[s,c]=d.useState(!1),i=f(S=>S.treasurySetupViewState.treasuryFundsDetails?.fetchStatus);d.useEffect(()=>{s||i?.fetchState!=="Not-Started"||y==null||(c(!0),n(H()))},[i,n]);const y=b.getSignedInUserTenant(o)?.companyId??m.companyId,T=b.getSignedInUser(),u=!!m.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,l=S=>{r(S)};if(T==null)throw Error("Can't access treasury promo page without signing in...");const g=_(),h=N(g?.loggedInUserRoleMap),I=W(g?.loggedInUserRoleMap);if(u&&h)return e.jsx(B,{to:"../../treasury/setup"});if(m.company?.companyTreasuryInfo&&(!u&&h||I)){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=>(C=>C.trackTreasuryPromoView("Treasury Promo Page"))(S)}),e.jsx(ce,{isAppContentDrawerOpen:p,handleDrawerToggle:l}),e.jsx(vt,{analytics:j,navigate:t,companyId:y,onClickMenuIcon:()=>{l(!0)}})]})}return e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})})},te=P.div`
30
+ display: flex;
31
+ width: 100%;
32
+ height: 100%;
33
+ flex-direction: row;
34
+ justify-content: center;
35
+ align-items: center;
36
+ background-color: ${t=>t.theme.colors.grey5};
37
+ `;function ta(){const t=M(),a=f(E=>D(E)),{useFeatureGate:n}=ie(),{isFeatureEnabled:o}=n(v.isTreasuryEnabled),p=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,r=_(),m=W(r?.loggedInUserRoleMap),s=a?.userRole!=null&&Oe(a?.userRole),c=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!s)&&Ve(r?.loggedInUserRoleMap),i=Ne(r?.loggedInUserRoleMap),y=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!s)&&_e(r?.loggedInUserRoleMap),{isFeatureEnabled:T}=n(v.isDepositAccountsFeatureEnabled),u=T&&!s&&ze(r?.loggedInUserRoleMap),l=a.company!=null&&$e(a.company),g=o&&l===!0&&!s&&N(r?.loggedInUserRoleMap),{isFeatureEnabled:h}=n(v.isChargeCardFeatureEnabled),{isFeatureEnabled:I}=n(v.isDebitCardFeatureEnabled),S=ot(a,h,I)&&!s&&Ge(r?.loggedInUserRoleMap),C=Ze(r?.loggedInUserRoleMap),x=He(r?.loggedInUserRoleMap),F=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified";return e.jsxs(Ce,{children:[x?null:e.jsx(k,{path:"setup",element:e.jsx(Y,{isBillPayAdminLevelAccess:c,isReimbursementAdminLevelAccess:y,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:g,isUserHasOnlyCardAccess:C,isUserHasOnlyBillPayAccess:i,productType:"zeni_treasury",type:"setup"})}),x?null:e.jsx(k,{path:"verification",element:e.jsx(Y,{isBillPayAdminLevelAccess:c,isUserHasOnlyBillPayAccess:i,isReimbursementAdminLevelAccess:y,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:g,isUserHasOnlyCardAccess:C,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(Dt,{})}),e.jsx(k,{path:"statements",element:e.jsx(At,{})}),e.jsx(k,{path:"tax-letter",element:e.jsx(Et,{})}),F?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"/",element:e.jsx(G,{isTransferDrawerOpen:!1,isEditPortfolioDrawerOpen:!1})}),g?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"edit-portfolio",element:e.jsx(G,{isEditPortfolioDrawerOpen:!0,isTransferDrawerOpen:!1})}),e.jsx(k,{path:"transfer",element:e.jsx(G,{isTransferDrawerOpen:!0,isEditPortfolioDrawerOpen:!1})})]}):null,e.jsx(k,{path:"*",element:e.jsx(lt,{})})]}):p&&g?e.jsx(k,{path:"*",element:e.jsx(B,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&m?e.jsx(k,{path:"*",element:e.jsx(B,{to:"../promo",state:t.state})}):e.jsx(k,{path:"*",element:null})]})}export{ta as default};
@@ -1,4 +1,4 @@
1
- import{j as l}from"./liveblocks-ktikibPc.js";import{a as g}from"./sentry-B-Fm9h-1.js";import{j as M,u as q,l as J,g as S,k as G,h as Y,n as nt,o as B,N as K}from"./core-CeHHCRsO.js";import{eN as O,Jh as Ee,Ji as Ue,fP as ee,cp as be,cq as ke,uN as ft,Jj as st,uR as Yt,Hv as te,jr as ae,uL as qt,uF as Ht,Jk as Ne,ux as Wt,uw as Qt,uq as Zt,uC as Xt,uS as ea,Jl as pe,Jm as Me,uy as ta,Jn as he,eY as gt,v5 as vt,u_ as xt,Jo as Tt,nT as Ct,uV as yt,uT as Dt,Jp as It,vc as Et,v9 as bt,uW as kt,vb as Ge,FX as wt,Jq as aa,Jr as na,cs as sa,Js as oa,Jt as la,Ju as me,Jv as ce,Jw as we,Hw as $e,vr as ye,Hu as De,ve as At,uO as Ke,Jx as ia,Hx as W,Jy as ze,uI as ca,Jz as da,JA as ra,JB as Ye,JC as qe,JD as He,JE as We,vl as Ae,JF as jt,v2 as Ft,JG as ua,JH as pa,JI as ha,JJ as ma,JK as Sa,JL as fa,JM as ga,JN as va,si as xa,sj as Ta,GB as Fe,JO as Ca,JP as ya,iQ as Pe,bq as Da,JQ as Ia,JR as Ea,kp as ba,ky as ka,GA as _e,bC as ot,JS as Pt,Gg as _t,JT as wa,JU as Aa,JV as ja,kA as Fa,JW as lt,JX as it,JY as ct,JZ as dt,J_ as Pa,kw as _a,J$ as Va,kz as La,K0 as Oa,K1 as Vt,GX as Lt,jP as Ba,K2 as Ja,K3 as Ve,K4 as Ot,GV as Bt,xE as Ra,K5 as Ua,K6 as Na,k7 as Jt,K7 as Ma,K8 as Ga,H7 as $a,p_ as Ka,K9 as Rt,Ka as rt,H4 as Le,Kb as ut,Kc as za,H9 as Ya,Kd as qa,Ke as Ha,Kf as Wa,Kg as Qa,Kh as Za,q1 as Xa,Ki as en,Hy as tn,Kj as an,GO as Oe,gy as nn,Kk as sn,Kl as on,gw as ln,Km as cn,Kn as dn,xI as rn,Ko as un,Kp as pn,Kq as hn,Kr as mn,jT as Sn,bn as fn,eT as gn,eR as vn}from"./zeni-epic-state-CFbdjqYE.js";import{z as R,al as Be,B as Ut,C as Z,c as P,U as X,ar as xn,y as N,O as Ie,A as de,as as Qe,at as Tn,au as Cn,w as Ze,av as yn,h as Dn,K as re,D as Xe,m as ne,d as z,aw as In,k as et,J as Se,ax as En,ay as Nt,M as bn,az as kn,j as wn,aA as An,ao as Mt,aB as jn,o as Q,S as Fn,F as Gt,G as Pn,aC as _n,aD as Vn,f as tt,aE as Ln,aF as On,s as Bn,aG as Jn,aH as Rn}from"./index-D-YRQyi6.js";import{n as U,D as Un,S as $t}from"./mui-BcN8nM6l.js";import{t as Nn,A as Mn}from"./AddressScreen-D8SzP-BI.js";import ie from"./NotFoundScreen-CsUvANsv.js";import{F as Gn}from"./FeaturePreviewScreen-Cv2kzDhk.js";import{b as H,v as at,c as $n}from"./routePaths-B6C74NEk.js";import{p as Kt}from"./pathToGoBack-BTubduSA.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-DVYXzaC3.js";import{c as ge}from"./useFetchSuggestedQuestionsWhenReady-DfAF9l9n.js";import{M as ve}from"./MobileAppDrawer-DA8JHC4T.js";import{D as Kn}from"./DrawerScreen-D8S_TfMM.js";import{g as zn,m as Yn}from"./accountMappingHelper-B6bZQ8yR.js";import"./recharts-BoGmRVv5.js";import"./analytics-Ch-ak7gp.js";import"./plaid-BIfn11py.js";import"./dnd-hZIw-3DZ.js";import"./stripe-DMRn4zHo.js";import"./lottie-BZnwKWVQ.js";import"./lexical-BRvRsnRt.js";import"./pdf-CeFSGDZc.js";import"./utils-BgeAfdtF.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]="90be5e6a-8538-4793-82c2-464ab6b53d74",e._sentryDebugIdIdentifier="sentry-dbid-90be5e6a-8538-4793-82c2-464ab6b53d74")}catch{}})();const qn=Ie.getLocalizedStrings(),Hn=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(st({selectedTransaction:n}))},onBackClick:()=>{s("..",{relative:"path"})},onCancel(){e(st({selectedTransaction:void 0})),e(Yt()),s("..",{relative:"path"})},onTransactionClick:n=>{const o=`${H(n,a.tenantEmailDomain)}`,c=N(t.state?.pathnameStackToGoBack,t.pathname);s(o,{state:{pathnameStackToGoBack:c}})},onLinkSave(){a.setShouldNavigateBack(!1),e(ft(a.scheduleTab,a.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}})(xn),Wn=({setShouldNavigateBack:e})=>{const a=M(),s=q(),{scheduleDetailId:t,tenantEmailDomain:n}=J(),{scheduleType:o}=J();if(n==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const c=S(f=>O(f)),d=Ee(o)??"accrued_expenses",u=R.getSignedInUser();if(u==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,d)),m=i.selectedJELinkRowIndex,r=S(f=>ee(f,c.companyId)),p=Be(i.updateStatus.fetchState);g.useEffect(()=>{p==="In-Progress"&&i.updateStatus.fetchState==="Completed"&&a("..",{relative:"path"})},[p,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 h=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:[h===!0?l.jsx(Z,{analytics:P,onLoad:()=>{Qn(i,d,r)}}):null,l.jsx(Hn,{signedInUser:u,attachmentEndPoint:`${X}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:i.selectedJEAccruedSchedule.vendor.id??"",location:s,tenantEmailDomain:n,scheduleAccruedDetailsView:i,saveFetchState:i.updateStatus.fetchState,scheduleTab:d,navigate:a,analytics:P,controllerUserDetails:r,saveStatus:i.updateStatus.fetchState,jeAccruedSchedule:i.selectedJEAccruedSchedule,localData:i.scheduleAccruedDetailsLocalData.jeScheduleDetails[m]})]}):null})},zt=e=>{const a=qn.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,d=c.some(m=>m.isRecommendedTransaction===!0),u=be(s.controllers),i=ke(s.controllerUserIds);t!=null&&P.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...zt(t)},scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:d,journalEntryPostingStatus:o?.status.label??""},vendorName:t.vendor.name??null,controllerEmails:u,controllerUserIds:i})},Zn=U.div`
1
+ import{j as l}from"./liveblocks-CobNzJQ8.js";import{a as g}from"./sentry-4KELney1.js";import{j as M,u as q,l as J,g as S,k as G,h as Y,n as nt,o as B,N as K}from"./core-C33SxPr0.js";import{eN as O,Jh as Ee,Ji as Ue,fP as ee,cp as be,cq as ke,uN as ft,Jj as st,uR as Yt,Hv as te,jr as ae,uL as qt,uF as Ht,Jk as Ne,ux as Wt,uw as Qt,uq as Zt,uC as Xt,uS as ea,Jl as pe,Jm as Me,uy as ta,Jn as he,eY as gt,v5 as vt,u_ as xt,Jo as Tt,nT as Ct,uV as yt,uT as Dt,Jp as It,vc as Et,v9 as bt,uW as kt,vb as Ge,FX as wt,Jq as aa,Jr as na,cs as sa,Js as oa,Jt as la,Ju as me,Jv as ce,Jw as we,Hw as $e,vr as ye,Hu as De,ve as At,uO as Ke,Jx as ia,Hx as W,Jy as ze,uI as ca,Jz as da,JA as ra,JB as Ye,JC as qe,JD as He,JE as We,vl as Ae,JF as jt,v2 as Ft,JG as ua,JH as pa,JI as ha,JJ as ma,JK as Sa,JL as fa,JM as ga,JN as va,si as xa,sj as Ta,GB as Fe,JO as Ca,JP as ya,iQ as Pe,bq as Da,JQ as Ia,JR as Ea,kp as ba,ky as ka,GA as _e,bC as ot,JS as Pt,Gg as _t,JT as wa,JU as Aa,JV as ja,kA as Fa,JW as lt,JX as it,JY as ct,JZ as dt,J_ as Pa,kw as _a,J$ as Va,kz as La,K0 as Oa,K1 as Vt,GX as Lt,jP as Ba,K2 as Ja,K3 as Ve,K4 as Ot,GV as Bt,xE as Ra,K5 as Ua,K6 as Na,k7 as Jt,K7 as Ma,K8 as Ga,H7 as $a,p_ as Ka,K9 as Rt,Ka as rt,H4 as Le,Kb as ut,Kc as za,H9 as Ya,Kd as qa,Ke as Ha,Kf as Wa,Kg as Qa,Kh as Za,q1 as Xa,Ki as en,Hy as tn,Kj as an,GO as Oe,gy as nn,Kk as sn,Kl as on,gw as ln,Km as cn,Kn as dn,xI as rn,Ko as un,Kp as pn,Kq as hn,Kr as mn,jT as Sn,bn as fn,eT as gn,eR as vn}from"./zeni-epic-state-Bc0tGzp_.js";import{z as R,al as Be,B as Ut,J as Z,e as P,R as X,ar as xn,s as N,D as Ie,x as de,as as Qe,at as Tn,au as Cn,q as Ze,av as yn,h as Dn,Z as re,y as Xe,a as ne,d as z,aw as In,m as et,I as Se,ax as En,ay as Nt,K as bn,az as kn,j as wn,aA as An,ao as Mt,aB as jn,o as Q,S as Fn,E as Gt,G as Pn,aC as _n,aD as Vn,g as tt,aE as Ln,aF as On,p as Bn,aG as Jn,aH as Rn}from"./index-pUXlb0zY.js";import{n as U,D as Un,S as $t}from"./mui-BZJL7p2F.js";import{t as Nn,A as Mn}from"./AddressScreen-AFAxFcr6.js";import ie from"./NotFoundScreen-DSiFIhWD.js";import{F as Gn}from"./FeaturePreviewScreen-EBGRCzCx.js";import{b as H,v as at,c as $n}from"./routePaths-LaBmoMCH.js";import{p as Kt}from"./pathToGoBack-CZlpwtCa.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-AnwBVkwu.js";import{c as ge}from"./useFetchSuggestedQuestionsWhenReady-CooyddDy.js";import{M as ve}from"./MobileAppDrawer-C_-9cGqZ.js";import{D as Kn}from"./DrawerScreen-D1vug7Su.js";import{g as zn,m as Yn}from"./accountMappingHelper-1H6YzkWh.js";import"./recharts-DgAB7GKe.js";import"./analytics-D6PJZcCm.js";import"./plaid-JaP9Mc6f.js";import"./dnd-WhcD1exD.js";import"./stripe-DMRn4zHo.js";import"./lottie-C3pXl1t7.js";import"./lexical-QnRSjOj3.js";import"./pdf-B8JyBdKX.js";import"./utils-BZbMXTZs.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]="9f386adc-b60b-4ee1-8173-4b71f984cb41",e._sentryDebugIdIdentifier="sentry-dbid-9f386adc-b60b-4ee1-8173-4b71f984cb41")}catch{}})();const qn=Ie.getLocalizedStrings(),Hn=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(st({selectedTransaction:n}))},onBackClick:()=>{s("..",{relative:"path"})},onCancel(){e(st({selectedTransaction:void 0})),e(Yt()),s("..",{relative:"path"})},onTransactionClick:n=>{const o=`${H(n,a.tenantEmailDomain)}`,c=N(t.state?.pathnameStackToGoBack,t.pathname);s(o,{state:{pathnameStackToGoBack:c}})},onLinkSave(){a.setShouldNavigateBack(!1),e(ft(a.scheduleTab,a.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}})(xn),Wn=({setShouldNavigateBack:e})=>{const a=M(),s=q(),{scheduleDetailId:t,tenantEmailDomain:n}=J(),{scheduleType:o}=J();if(n==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const c=S(f=>O(f)),d=Ee(o)??"accrued_expenses",u=R.getSignedInUser();if(u==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,d)),m=i.selectedJELinkRowIndex,r=S(f=>ee(f,c.companyId)),p=Be(i.updateStatus.fetchState);g.useEffect(()=>{p==="In-Progress"&&i.updateStatus.fetchState==="Completed"&&a("..",{relative:"path"})},[p,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 h=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:[h===!0?l.jsx(Z,{analytics:P,onLoad:()=>{Qn(i,d,r)}}):null,l.jsx(Hn,{signedInUser:u,attachmentEndPoint:`${X}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:i.selectedJEAccruedSchedule.vendor.id??"",location:s,tenantEmailDomain:n,scheduleAccruedDetailsView:i,saveFetchState:i.updateStatus.fetchState,scheduleTab:d,navigate:a,analytics:P,controllerUserDetails:r,saveStatus:i.updateStatus.fetchState,jeAccruedSchedule:i.selectedJEAccruedSchedule,localData:i.scheduleAccruedDetailsLocalData.jeScheduleDetails[m]})]}):null})},zt=e=>{const a=qn.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,d=c.some(m=>m.isRecommendedTransaction===!0),u=be(s.controllers),i=ke(s.controllerUserIds);t!=null&&P.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...zt(t)},scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:d,journalEntryPostingStatus:o?.status.label??""},vendorName:t.vendor.name??null,controllerEmails:u,controllerUserIds:i})},Zn=U.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as o}from"./liveblocks-ktikibPc.js";import{a as f}from"./sentry-B-Fm9h-1.js";import{q as u,h,g as y,N as I}from"./core-CeHHCRsO.js";import{IE as b,eO as w,yZ as x}from"./zeni-epic-state-CFbdjqYE.js";import{z as l,B as j,F as S,G as E}from"./index-D-YRQyi6.js";import{n as g}from"./mui-BcN8nM6l.js";import"./recharts-BoGmRVv5.js";import"./analytics-Ch-ak7gp.js";import"./plaid-BIfn11py.js";import"./dnd-hZIw-3DZ.js";import"./stripe-DMRn4zHo.js";import"./lottie-BZnwKWVQ.js";import"./lexical-BRvRsnRt.js";import"./pdf-CeFSGDZc.js";import"./utils-BgeAfdtF.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]="7f13d0b5-8df2-4a44-bac3-2d4534930a24",e._sentryDebugIdIdentifier="sentry-dbid-7f13d0b5-8df2-4a44-bac3-2d4534930a24")}catch{}})();const R=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",p=e.get("profileId")??"",[n,c]=f.useState(!1),a=h(),i=y(m=>b(m)),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(I,{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||(c(!0),a(x(t,p,s)))},[n,a]),i.fetchState==="Error"?o.jsx(D,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(j,{fetchState:"In-Progress"}))},D=g.div`
1
+ import{j as o}from"./liveblocks-CobNzJQ8.js";import{a as f}from"./sentry-4KELney1.js";import{q as u,h,g as y,N as I}from"./core-C33SxPr0.js";import{IE as b,eO as w,yZ as x}from"./zeni-epic-state-Bc0tGzp_.js";import{z as l,B as j,E as S,G as E}from"./index-pUXlb0zY.js";import{n as g}from"./mui-BZJL7p2F.js";import"./recharts-DgAB7GKe.js";import"./analytics-D6PJZcCm.js";import"./plaid-JaP9Mc6f.js";import"./dnd-WhcD1exD.js";import"./stripe-DMRn4zHo.js";import"./lottie-C3pXl1t7.js";import"./lexical-QnRSjOj3.js";import"./pdf-B8JyBdKX.js";import"./utils-BZbMXTZs.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]="3026d4ad-7c33-4a78-9926-87395f9e7bdd",e._sentryDebugIdIdentifier="sentry-dbid-3026d4ad-7c33-4a78-9926-87395f9e7bdd")}catch{}})();const W=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",p=e.get("profileId")??"",[n,c]=f.useState(!1),a=h(),i=y(m=>b(m)),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(I,{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||(c(!0),a(x(t,p,s)))},[n,a]),i.fetchState==="Error"?o.jsx(D,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(j,{fetchState:"In-Progress"}))},D=g.div`
2
2
  display: flex;
3
3
  width: 100%;
4
4
  height: 100vh;
@@ -9,4 +9,4 @@ import{j as o}from"./liveblocks-ktikibPc.js";import{a as f}from"./sentry-B-Fm9h-
9
9
  `,_=g(E.LargeRegular)`
10
10
  display: flex;
11
11
  color: ${S.important};
12
- `;export{R as default};
12
+ `;export{W as default};
@@ -1,4 +1,4 @@
1
- import{j as n}from"./liveblocks-ktikibPc.js";import{j as Z,u as W,h as _,l as H,g as k,k as J,N as ne,n as $e,o as C}from"./core-CeHHCRsO.js";import{eN as N,Nr as we,Ns as He,cO as te,cj as Ge,fb as Ze,wa as Ae,An as We,w4 as Fn,Nt as Rn,Nu as Un,w7 as Ln,we as Ce,w1 as zn,v_ as Mn,Me as pe,Nv as _n,DH as Nn,Jk as Vn,DJ as $n,k8 as Fe,Nw as Hn,pF as Je,pt as Ye,j$ as Ke,k2 as Re,Jl as Ue,Jm as Gn,Nx as Zn,k1 as Wn,ko as Jn,jS as Yn,ip as Kn,io as qn,Ny as Qn,Nz as xe,Do as Xn,NA as et,NB as nt,M7 as De,NC as Le,ND as tt,DU as at,MR as ot,Bh as qe,s6 as Qe,NE as st,DR as rt,NF as Xe,cK as Ie,DY as en,fc as it,eR as nn,eT as Se,DW as ct,Bb as lt,DO as dt,NG as tn,NH as an,Dq as on,DA as ze,NI as ut,Du as pt,NJ as mt,MG as ht,DZ as gt,bv as ft,bD as yt,cu as Ct,bE as xt,bs as kt,Il as wt}from"./zeni-epic-state-CFbdjqYE.js";import{j as ae,m as $,z as A,d as B,h as L,B as oe,bO as At,U as be,K as V,D as Y,w as sn,al as Dt,aa as Me,c as U,bP as It,ao as ve,bQ as St,C as me,bR as bt,f as Ee,aI as G,bS as vt,M as Et,J as rn,a7 as jt,bT as _e,bU as Pt,y as ee,bV as Tt,bW as Ot,bX as Bt,bY as Ft,a4 as Rt,o as Ut}from"./index-D-YRQyi6.js";import{n as z,D as K,S as q}from"./mui-BcN8nM6l.js";import ue from"./NotFoundScreen-CsUvANsv.js";import{S as Ne}from"./SetupPagesScreen-DVerh3cI.js";import{F as cn}from"./FeaturePreviewScreen-Cv2kzDhk.js";import{a as d}from"./sentry-B-Fm9h-1.js";import{M as he}from"./MobileAppDrawer-DA8JHC4T.js";import{A as Lt,D as zt,V as Mt}from"./DomesticWireDetailScreen-BXuss5HS.js";import{A as _t}from"./AddressScreen-D8SzP-BI.js";import{u as ln}from"./useAskAiCfoHostNavButtonProps-DVYXzaC3.js";import{c as dn}from"./useFetchSuggestedQuestionsWhenReady-DfAF9l9n.js";import{Z as Nt}from"./ZeniAccountStatementScreen-Cy4IuKEc.js";import"./recharts-BoGmRVv5.js";import"./analytics-Ch-ak7gp.js";import"./plaid-BIfn11py.js";import"./dnd-hZIw-3DZ.js";import"./stripe-DMRn4zHo.js";import"./lottie-BZnwKWVQ.js";import"./lexical-BRvRsnRt.js";import"./pdf-CeFSGDZc.js";import"./utils-BgeAfdtF.js";import"./analyticsHelper-DaApF_Ry.js";import"./routePaths-B6C74NEk.js";import"./BusinessVerificationPageScreen-Cq2q9mY8.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]="e66d9846-494b-4e69-8270-907baadbd855",e._sentryDebugIdIdentifier="sentry-dbid-e66d9846-494b-4e69-8270-907baadbd855")}catch{}})();const Vt=z.div`
1
+ import{j as n}from"./liveblocks-CobNzJQ8.js";import{j as G,u as W,h as _,l as H,g as k,k as J,N as ne,n as $e,o as C}from"./core-C33SxPr0.js";import{eN as N,Nr as we,Ns as He,cO as te,cj as Ze,fb as Ge,wa as Ae,An as We,w4 as Fn,Nt as Rn,Nu as Un,w7 as Ln,we as Ce,w1 as zn,v_ as Mn,Me as pe,Nv as _n,DH as Nn,Jk as Vn,DJ as $n,k8 as Fe,Nw as Hn,pF as Je,pt as Ye,j$ as Ke,k2 as Re,Jl as Ue,Jm as Zn,Nx as Gn,k1 as Wn,ko as Jn,jS as Yn,ip as Kn,io as qn,Ny as Qn,Nz as xe,Do as Xn,NA as et,NB as nt,M7 as De,NC as Le,ND as tt,DU as at,MR as ot,Bh as qe,s6 as Qe,NE as st,DR as rt,NF as Xe,cK as Ie,DY as en,fc as it,eR as nn,eT as Se,DW as ct,Bb as lt,DO as dt,NG as tn,NH as an,Dq as on,DA as ze,NI as ut,Du as pt,NJ as mt,MG as ht,DZ as gt,bv as ft,bD as yt,cu as Ct,bE as xt,bs as kt,Il as wt}from"./zeni-epic-state-Bc0tGzp_.js";import{j as ae,a as $,z as A,d as B,h as L,B as oe,bO as At,R as be,Z as V,y as Y,q as sn,al as Dt,aa as Me,e as U,bP as It,ao as ve,bQ as St,J as me,bR as bt,g as Ee,aI as Z,bS as vt,K as Et,I as rn,a7 as jt,bT as _e,bU as Pt,s as ee,bV as Tt,bW as Ot,bX as Bt,bY as Ft,a4 as Rt,o as Ut}from"./index-pUXlb0zY.js";import{n as z,D as K,S as q}from"./mui-BZJL7p2F.js";import ue from"./NotFoundScreen-DSiFIhWD.js";import{S as Ne}from"./SetupPagesScreen-BOIC8eCo.js";import{F as cn}from"./FeaturePreviewScreen-EBGRCzCx.js";import{a as d}from"./sentry-4KELney1.js";import{M as he}from"./MobileAppDrawer-C_-9cGqZ.js";import{A as Lt,D as zt,V as Mt}from"./DomesticWireDetailScreen-DD4EK2xs.js";import{A as _t}from"./AddressScreen-AFAxFcr6.js";import{u as ln}from"./useAskAiCfoHostNavButtonProps-AnwBVkwu.js";import{c as dn}from"./useFetchSuggestedQuestionsWhenReady-CooyddDy.js";import{Z as Nt}from"./ZeniAccountStatementScreen-BAiLbvsx.js";import"./recharts-DgAB7GKe.js";import"./analytics-D6PJZcCm.js";import"./plaid-JaP9Mc6f.js";import"./dnd-WhcD1exD.js";import"./stripe-DMRn4zHo.js";import"./lottie-C3pXl1t7.js";import"./lexical-QnRSjOj3.js";import"./pdf-B8JyBdKX.js";import"./utils-BZbMXTZs.js";import"./analyticsHelper-edBX1gRH.js";import"./routePaths-LaBmoMCH.js";import"./BusinessVerificationPageScreen-C_EI-uLX.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]="a1fba6d7-6fdc-45e7-add7-0e1d4c476d73",e._sentryDebugIdIdentifier="sentry-dbid-a1fba6d7-6fdc-45e7-add7-0e1d4c476d73")}catch{}})();const Vt=z.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -6,7 +6,7 @@ import{j as n}from"./liveblocks-ktikibPc.js";import{j as Z,u as W,h as _,l as H,
6
6
  flex-direction: column;
7
7
  align-items: center;
8
8
  background-color: ${e=>e.theme.colors.grey4};
9
- `,$t=J(function(e){return{autoTransferRuleView:we(e),downloadAccountDetailEndPoint:`${be}/account_details`,transferLimit:5e5,depositAccountListView:We(e.depositAccountState,e.depositAccountListState)}},function(e,t){const{navigate:s,handleDrawerToggle:o}=t;return{onBackClick:()=>{s("..")},onClickMenuIcon:()=>{o(!0)},onFetchAutoTransferRules:a=>{e(Ae(a))},onCreateRule:()=>{e(Mn())},onUpdateRule:a=>{e(Ce(a))},onDeleteClick:a=>{e(zn(a))},onPauseClick:a=>{e(Ce(a,!0,!1))},onResumeClick:a=>{e(Ce(a,!1,!0))},onActivityClick:(a,r)=>{e(Ln(a,r))},onUpdateRuleLocalData:a=>{e(Un(a))},clearRuleLocalData:()=>{e(Rn())},onEditClick:a=>{s(`./${a}/edit`)},onEditDrawerClose:()=>{s("../../",{relative:"path"})},onReviewClick:()=>{e(Fn())}}})(At);function Ve({isEditDrawerOpen:e}){const t=Z(),s=W(),o=_(),a=ae(),{ruleId:r,tenantEmailDomain:l}=H(),{useFeatureGate:c}=$(),[u,h]=d.useState(!1),[x,i]=d.useState(!1),p=k(S=>N(S)),m=k(S=>we(S)),g=m?.fetchState??"Not-Started",v=k(S=>He(S)),y=p?.companyId??A.getSignedInUserTenant(l)?.companyId,w=te(a?.loggedInUserRoleMap)||Ge(a?.loggedInUserRoleMap),{isFeatureEnabled:I}=c(B.isTreasuryEnabled),f=p?.company!=null&&Ze(p.company),D=I&&f,T=A.getSignedInUser(),M=p.tenantId,F={userId:T?.userId??"",sessionId:T?.zeniSessionId??"",tenantId:M??""};d.useEffect(()=>{!x&&g==="Not-Started"&&y&&(i(!0),o(Ae(!0)))},[x,g,y,o]);const E=S=>{h(S)},P=L(),O=!!s.state?.scrollToAddRule;return m?.fetchState!=="Completed"?n.jsx(oe,{fetchState:"In-Progress",style:{backgroundColor:P.colors.grey5}}):n.jsxs(Vt,{children:[n.jsx(he,{isAppContentDrawerOpen:u,handleDrawerToggle:E}),n.jsx($t,{navigate:t,location:s,currentTenant:p,handleDrawerToggle:E,isEditDrawerOpen:e,editingRuleId:r,authParams:F,includeTreasuryOption:D,hasAdminLevelAccess:w,zeniAccountsConfigDetail:v,scrollToAddRule:O})]})}const Ht={overlayWidth:new Y(100,100,58)},Gt=({vendorId:e,isDrawerOpen:t,closeDrawerHandler:s})=>{const o=_(),a=L(),r=V();if(A.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return n.jsx(K,{onClose:()=>{s(!0),o(pe())},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(Zt,{onClick:l=>l.stopPropagation(),children:n.jsx(Lt,{vendorIdParam:e,accountContext:"express-pay"})})})},Zt=z(q)`
9
+ `,$t=J(function(e){return{autoTransferRuleView:we(e),downloadAccountDetailEndPoint:`${be}/account_details`,transferLimit:5e5,depositAccountListView:We(e.depositAccountState,e.depositAccountListState)}},function(e,t){const{navigate:s,handleDrawerToggle:o}=t;return{onBackClick:()=>{s("..")},onClickMenuIcon:()=>{o(!0)},onFetchAutoTransferRules:a=>{e(Ae(a))},onCreateRule:()=>{e(Mn())},onUpdateRule:a=>{e(Ce(a))},onDeleteClick:a=>{e(zn(a))},onPauseClick:a=>{e(Ce(a,!0,!1))},onResumeClick:a=>{e(Ce(a,!1,!0))},onActivityClick:(a,r)=>{e(Ln(a,r))},onUpdateRuleLocalData:a=>{e(Un(a))},clearRuleLocalData:()=>{e(Rn())},onEditClick:a=>{s(`./${a}/edit`)},onEditDrawerClose:()=>{s("../../",{relative:"path"})},onReviewClick:()=>{e(Fn())}}})(At);function Ve({isEditDrawerOpen:e}){const t=G(),s=W(),o=_(),a=ae(),{ruleId:r,tenantEmailDomain:l}=H(),{useFeatureGate:c}=$(),[u,h]=d.useState(!1),[x,i]=d.useState(!1),p=k(S=>N(S)),m=k(S=>we(S)),g=m?.fetchState??"Not-Started",v=k(S=>He(S)),y=p?.companyId??A.getSignedInUserTenant(l)?.companyId,w=te(a?.loggedInUserRoleMap)||Ze(a?.loggedInUserRoleMap),{isFeatureEnabled:I}=c(B.isTreasuryEnabled),f=p?.company!=null&&Ge(p.company),D=I&&f,T=A.getSignedInUser(),M=p.tenantId,F={userId:T?.userId??"",sessionId:T?.zeniSessionId??"",tenantId:M??""};d.useEffect(()=>{!x&&g==="Not-Started"&&y&&(i(!0),o(Ae(!0)))},[x,g,y,o]);const E=S=>{h(S)},P=L(),O=!!s.state?.scrollToAddRule;return m?.fetchState!=="Completed"?n.jsx(oe,{fetchState:"In-Progress",style:{backgroundColor:P.colors.grey5}}):n.jsxs(Vt,{children:[n.jsx(he,{isAppContentDrawerOpen:u,handleDrawerToggle:E}),n.jsx($t,{navigate:t,location:s,currentTenant:p,handleDrawerToggle:E,isEditDrawerOpen:e,editingRuleId:r,authParams:F,includeTreasuryOption:D,hasAdminLevelAccess:w,zeniAccountsConfigDetail:v,scrollToAddRule:O})]})}const Ht={overlayWidth:new Y(100,100,58)},Zt=({vendorId:e,isDrawerOpen:t,closeDrawerHandler:s})=>{const o=_(),a=L(),r=V();if(A.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return n.jsx(K,{onClose:()=>{s(!0),o(pe())},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:l=>l.stopPropagation(),children:n.jsx(Lt,{vendorIdParam:e,accountContext:"express-pay"})})})},Gt=z(q)`
10
10
  display: flex;
11
11
  min-height: 100%;
12
12
  flex-direction: column;
@@ -26,7 +26,7 @@ import{j as n}from"./liveblocks-ktikibPc.js";import{j as Z,u as W,h as _,l as H,
26
26
  flex-direction: column;
27
27
  align-items: center;
28
28
  background-color: ${e=>e.theme.colors.grey4};
29
- `,ea=J(function(e,t){const s=N(e),o=A.getSignedInUser(),a=s.tenantId,r={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:a??""},l=t.expressPayDetails,c=e.entityAutoCompleteState.autoCompleteText.common,u=Vn(e,"common");return{expressPayDetails:l,fileProps:{authParams:r,filesEndPoint:`${ve.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:c,entityAutoCompleteView:u},analytics:t.analytics}},function(e,t){const{navigate:s}=t;return{onSaveVendor:o=>{e(qn(o,void 0,void 0,!0))},saveVendorDetailLocalData:(o,a)=>{e(Re({vendorId:a,localData:o}))},saveExpressPayLocalData:o=>{e(Kn({localData:o}))},onVendorSelected:o=>{o!=null&&e(Yn(o,!1))},updateSelectedVendorForCreate:o=>{e(Jn(o))},initializeVendorAddress:()=>{e(Wn())},resetVendorSaveStatus:o=>{e(Zn({vendorId:o}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,a)=>{o.trim().length>=2?e(Gn({searchString:o,entityType:a,searchOrigin:"common"})):o.trim().length===0&&e(Ue("common"))},onCancelAutoComplete:()=>{e(Ue("common"))}},chooseNewVendor:o=>{e(Re({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(Ke({files:o}))},onDeleteFile:o=>{e(Ye(o))},onEditFileName:(o,a)=>{e(Je(o,a.split(".")[0]))},onBackClick:o=>{o!=null&&e(Fe(o)),e(Fe()),e(Hn()),e(pe()),s("../",{relative:"path"})},onSchedulePayment:()=>{e($n())}}})(It);function le({isAddACHDrawerOpen:e,isAddWireDrawerOpen:t,isAddAddressDrawerOpen:s}){const o=Z(),a=W(),r=_(),[l,c]=d.useState(!1),{tenantEmailDomain:u}=H(),h=ae(),x=L(),i=k(j=>j.expressPayState.fetchState),p=k(j=>N(j)),m=k(j=>_n(j)),g=m.expressPayLocalData?.vendorId,v=p.companyId??A.getSignedInUserTenant(u)?.companyId,[y,w]=d.useState(!1),[I,f]=d.useState(!1),[D,T]=d.useState(!1),M=sn(a.state?.pathnameStackToGoBack),{poppedPathname:F}=M,E=F?.split("/"),P=E?.[E.length-1];d.useEffect(()=>{e===!0?w(!0):(w(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{t===!0?f(!0):(f(!1),document.body.style.overflow="auto")},[t]),d.useEffect(()=>{s===!0?T(!0):(T(!1),document.body.style.overflow="auto")},[s]),d.useEffect(()=>{i==="Not-Started"&&r(Nn(!0,!0))},[i,r]);const O=Dt(m.vendorViewDetails.bankAccountCreationState?.fetchState);if(d.useEffect(()=>{O==="In-Progress"&&m.vendorViewDetails.bankAccountCreationState?.fetchState==="Completed"&&b()},[O,m.vendorViewDetails.bankAccountCreationState?.fetchState]),A.getSignedInUser()==null)throw Error("Can't access express pay page without signing in...");const S=j=>{c(j)},b=()=>{w(!1),f(!1),o("../",{relative:"path"})};return m.fetchState==="Completed"?n.jsxs(Xt,{children:[Me(a)?n.jsx(he,{isAppContentDrawerOpen:l,handleDrawerToggle:S}):null,y===!0?n.jsx(Gt,{vendorId:g,closeDrawerHandler:b,isDrawerOpen:y}):null,I===!0?n.jsx(qt,{vendorId:g,closeDrawerHandler:b,isDrawerOpen:I}):null,D===!0?n.jsx(Jt,{closeDrawerHandler:b,isDrawerOpen:D}):null,n.jsx(Mt,{vendorId:g,isExpressPayPage:!0}),n.jsx(ea,{navigate:o,location:a,companyId:v,accountId:P,analytics:U,currentTenant:p,vendorId:g,roleMap:h?.loggedInUserRoleMap,isSettings:Me(a),expressPayDetails:m,onClickMenuIcon:()=>{S(!0)}})]}):n.jsx(oe,{fetchState:"In-Progress",style:{backgroundColor:x.colors.grey5}})}const na={overlayWidth:new Y(100,100,58)},ta=({authParams:e,downloadAccountDetailEndPoint:t,isAccountInfoDrawerOpen:s,zeniBankAccountDetail:o,closeDrawerHandler:a})=>{const r=L(),l=V(),c=k(i=>He(i)),u=k(i=>N(i));if(A.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");const h=()=>{a(!0)},x={depositAccount:o,onDismissClick:h,zeniAccountsConfigDetail:c,authParams:e,downloadAccountDetailEndPoint:t,currentTenant:u};return n.jsx(K,{anchor:"right",open:s,PaperProps:{style:{width:na.overlayWidth.valuePercentage(l),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>h(),children:n.jsx(aa,{onClick:i=>i.stopPropagation(),children:n.jsx(St,{...x})})})},aa=z(q)`
29
+ `,ea=J(function(e,t){const s=N(e),o=A.getSignedInUser(),a=s.tenantId,r={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:a??""},l=t.expressPayDetails,c=e.entityAutoCompleteState.autoCompleteText.common,u=Vn(e,"common");return{expressPayDetails:l,fileProps:{authParams:r,filesEndPoint:`${ve.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:c,entityAutoCompleteView:u},analytics:t.analytics}},function(e,t){const{navigate:s}=t;return{onSaveVendor:o=>{e(qn(o,void 0,void 0,!0))},saveVendorDetailLocalData:(o,a)=>{e(Re({vendorId:a,localData:o}))},saveExpressPayLocalData:o=>{e(Kn({localData:o}))},onVendorSelected:o=>{o!=null&&e(Yn(o,!1))},updateSelectedVendorForCreate:o=>{e(Jn(o))},initializeVendorAddress:()=>{e(Wn())},resetVendorSaveStatus:o=>{e(Gn({vendorId:o}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,a)=>{o.trim().length>=2?e(Zn({searchString:o,entityType:a,searchOrigin:"common"})):o.trim().length===0&&e(Ue("common"))},onCancelAutoComplete:()=>{e(Ue("common"))}},chooseNewVendor:o=>{e(Re({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(Ke({files:o}))},onDeleteFile:o=>{e(Ye(o))},onEditFileName:(o,a)=>{e(Je(o,a.split(".")[0]))},onBackClick:o=>{o!=null&&e(Fe(o)),e(Fe()),e(Hn()),e(pe()),s("../",{relative:"path"})},onSchedulePayment:()=>{e($n())}}})(It);function le({isAddACHDrawerOpen:e,isAddWireDrawerOpen:t,isAddAddressDrawerOpen:s}){const o=G(),a=W(),r=_(),[l,c]=d.useState(!1),{tenantEmailDomain:u}=H(),h=ae(),x=L(),i=k(j=>j.expressPayState.fetchState),p=k(j=>N(j)),m=k(j=>_n(j)),g=m.expressPayLocalData?.vendorId,v=p.companyId??A.getSignedInUserTenant(u)?.companyId,[y,w]=d.useState(!1),[I,f]=d.useState(!1),[D,T]=d.useState(!1),M=sn(a.state?.pathnameStackToGoBack),{poppedPathname:F}=M,E=F?.split("/"),P=E?.[E.length-1];d.useEffect(()=>{e===!0?w(!0):(w(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{t===!0?f(!0):(f(!1),document.body.style.overflow="auto")},[t]),d.useEffect(()=>{s===!0?T(!0):(T(!1),document.body.style.overflow="auto")},[s]),d.useEffect(()=>{i==="Not-Started"&&r(Nn(!0,!0))},[i,r]);const O=Dt(m.vendorViewDetails.bankAccountCreationState?.fetchState);if(d.useEffect(()=>{O==="In-Progress"&&m.vendorViewDetails.bankAccountCreationState?.fetchState==="Completed"&&b()},[O,m.vendorViewDetails.bankAccountCreationState?.fetchState]),A.getSignedInUser()==null)throw Error("Can't access express pay page without signing in...");const S=j=>{c(j)},b=()=>{w(!1),f(!1),o("../",{relative:"path"})};return m.fetchState==="Completed"?n.jsxs(Xt,{children:[Me(a)?n.jsx(he,{isAppContentDrawerOpen:l,handleDrawerToggle:S}):null,y===!0?n.jsx(Zt,{vendorId:g,closeDrawerHandler:b,isDrawerOpen:y}):null,I===!0?n.jsx(qt,{vendorId:g,closeDrawerHandler:b,isDrawerOpen:I}):null,D===!0?n.jsx(Jt,{closeDrawerHandler:b,isDrawerOpen:D}):null,n.jsx(Mt,{vendorId:g,isExpressPayPage:!0}),n.jsx(ea,{navigate:o,location:a,companyId:v,accountId:P,analytics:U,currentTenant:p,vendorId:g,roleMap:h?.loggedInUserRoleMap,isSettings:Me(a),expressPayDetails:m,onClickMenuIcon:()=>{S(!0)}})]}):n.jsx(oe,{fetchState:"In-Progress",style:{backgroundColor:x.colors.grey5}})}const na={overlayWidth:new Y(100,100,58)},ta=({authParams:e,downloadAccountDetailEndPoint:t,isAccountInfoDrawerOpen:s,zeniBankAccountDetail:o,closeDrawerHandler:a})=>{const r=L(),l=V(),c=k(i=>He(i)),u=k(i=>N(i));if(A.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");const h=()=>{a(!0)},x={depositAccount:o,onDismissClick:h,zeniAccountsConfigDetail:c,authParams:e,downloadAccountDetailEndPoint:t,currentTenant:u};return n.jsx(K,{anchor:"right",open:s,PaperProps:{style:{width:na.overlayWidth.valuePercentage(l),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>h(),children:n.jsx(aa,{onClick:i=>i.stopPropagation(),children:n.jsx(St,{...x})})})},aa=z(q)`
30
30
  display: flex;
31
31
  min-height: 100%;
32
32
  flex-direction: column;
@@ -34,7 +34,7 @@ import{j as n}from"./liveblocks-ktikibPc.js";import{j as Z,u as W,h as _,l as H,
34
34
  display: flex;
35
35
  min-height: 100%;
36
36
  flex-direction: column;
37
- `,ra={overlayWidth:new Y(100,100,58)},ia=J(function(e,t){const s=t.currentTenant?.companyId;return{plaidConnectionDetails:ot(e,s,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:We(e.depositAccountState,e.depositAccountListState)}},function(e,t){return{onReviewClick:()=>e(rt()),clearReviewTransferDetail:()=>e(st()),onFetchLinkTokenClick:s=>{e(Qe("external_account",s))},onEstablishConnectionClick:s=>{e(qe(s,t.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}})(vt),pn=({isTransferDrawerOpen:e,authParams:t,downloadAccountDetailEndPoint:s,closeDrawerHandler:o,zeniAccountsConfig:a})=>{const r=k(f=>nt(f)),l=k(f=>N(f)),c=L(),u=V(),h=_(),{accountId:x}=H(),[i,p]=d.useState("achTransfer"),[m,g]=d.useState(!1);if(A.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const{useDynamicConfig:v}=$(),{configValue:y}=v(G.zeniAccountsConfig),w=De(y),I=()=>{o(!0),h(Le())};return d.useEffect(()=>{r.reviewTransferDetail.fetchState==="Completed"&&g(!0)},[g,r.reviewTransferDetail.fetchState]),n.jsxs(n.Fragment,{children:[n.jsx(me,{analytics:U,onLoad:f=>(D=>D.trackPageLoaded(Ee.Event.zeniAccountsTransferFormViewed))(f)}),n.jsx(K,{onClose:()=>{(i==="achTransfer"&&m===!1||i==="achTransfer"&&m&&r.fetchState==="Completed")&&I()},anchor:"right",open:e,PaperProps:{style:{width:ra.overlayWidth.valuePercentage(u),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:c.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(ca,{onClick:f=>f.stopPropagation(),children:n.jsx(ia,{analytics:U,transferDetails:r,authParams:t,downloadAccountDetailEndPoint:s,onTransferClick:()=>{U.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(at(x))},onDismissClick:I,onSaveChangesToLocalStore:f=>{h(tt(f))},onAnotherTransferClick:()=>{g(!1),h(Le())},currentTenant:l,zeniAccountsConfigDetail:a,currentDrawerContent:i,setCurrentDrawerContent:p,showReviewContent:m,setShowReviewContent:g,onBackClick:()=>{},maxInsuredAmount:w.maxInsuredAmount})})})]})},ca=z(q)`
37
+ `,ra={overlayWidth:new Y(100,100,58)},ia=J(function(e,t){const s=t.currentTenant?.companyId;return{plaidConnectionDetails:ot(e,s,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:We(e.depositAccountState,e.depositAccountListState)}},function(e,t){return{onReviewClick:()=>e(rt()),clearReviewTransferDetail:()=>e(st()),onFetchLinkTokenClick:s=>{e(Qe("external_account",s))},onEstablishConnectionClick:s=>{e(qe(s,t.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}})(vt),pn=({isTransferDrawerOpen:e,authParams:t,downloadAccountDetailEndPoint:s,closeDrawerHandler:o,zeniAccountsConfig:a})=>{const r=k(f=>nt(f)),l=k(f=>N(f)),c=L(),u=V(),h=_(),{accountId:x}=H(),[i,p]=d.useState("achTransfer"),[m,g]=d.useState(!1);if(A.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const{useDynamicConfig:v}=$(),{configValue:y}=v(Z.zeniAccountsConfig),w=De(y),I=()=>{o(!0),h(Le())};return d.useEffect(()=>{r.reviewTransferDetail.fetchState==="Completed"&&g(!0)},[g,r.reviewTransferDetail.fetchState]),n.jsxs(n.Fragment,{children:[n.jsx(me,{analytics:U,onLoad:f=>(D=>D.trackPageLoaded(Ee.Event.zeniAccountsTransferFormViewed))(f)}),n.jsx(K,{onClose:()=>{(i==="achTransfer"&&m===!1||i==="achTransfer"&&m&&r.fetchState==="Completed")&&I()},anchor:"right",open:e,PaperProps:{style:{width:ra.overlayWidth.valuePercentage(u),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:c.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(ca,{onClick:f=>f.stopPropagation(),children:n.jsx(ia,{analytics:U,transferDetails:r,authParams:t,downloadAccountDetailEndPoint:s,onTransferClick:()=>{U.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(at(x))},onDismissClick:I,onSaveChangesToLocalStore:f=>{h(tt(f))},onAnotherTransferClick:()=>{g(!1),h(Le())},currentTenant:l,zeniAccountsConfigDetail:a,currentDrawerContent:i,setCurrentDrawerContent:p,showReviewContent:m,setShowReviewContent:g,onBackClick:()=>{},maxInsuredAmount:w.maxInsuredAmount})})})]})},ca=z(q)`
38
38
  display: flex;
39
39
  min-height: 100%;
40
40
  flex-direction: column;
@@ -46,7 +46,7 @@ import{j as n}from"./liveblocks-ktikibPc.js";import{j as Z,u as W,h as _,l as H,
46
46
  flex-direction: column;
47
47
  align-items: center;
48
48
  background-color: ${e=>e.theme.colors.grey4};
49
- `,da=J(function(e,t){return{zeniAccountListView:Xe(e),isExpressPayEnabled:t.isExpressPayEnabled,analytics:t.analytics}},function(e,t){const{navigate:s,currentTenant:o,location:a,companyId:r,handleDrawerToggle:l,analytics:c,isBillPayEnabled:u,isDebitCardFeatureEnabled:h}=t,{tenantEmailDomain:x}=o;return{onZeniAccountClick:(i,p)=>{c.trackAccountsListPageClicked("Accounts Row Item Click",p,"active");const m=ua(x,i),g=ee(a.state?.pathnameStackToGoBack,a.pathname);s(m,{state:{pathnameStackToGoBack:g}})},onSettingsClick:()=>{c.trackAccountsListPageClicked("Settings Icon"),s("setup")},onReloadTransactions:()=>{e(en(!1))},handleMoveMoneyOptionSelection:(i,p)=>{let m="page-not-found";i==="sendMoney"&&(m=fn(x)),i==="payBill"?m=mn(o,u,h):i==="transfer"?(m=hn(x),p!=null&&e(tn(p))):i==="checkDeposit"&&(m=gn(x));const g=ee(a.state?.pathnameStackToGoBack,a.pathname);s(m,{state:{pathnameStackToGoBack:g}})},unlinkPaymentAccount:(i,p)=>{c.trackAccountsListPageClicked("Unlink Account",p),e(dt(i))},onFetchLinkTokenClick:(i,p)=>{e(Qe("external_account",i,p))},onUpdatePaymentAccountStatus:(i,p,m)=>{e(lt(i,p,"zeni_accounts","external_account",m))},onEstablishConnectionClick:i=>{e(qe(i,r,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:i=>{e(ct(i))},onClickMenuIcon:()=>{l(!0)},onTreasuryGetStartedClick:()=>{s("../../treasury/promo")},onAutoTransferClick:i=>{i?s("./auto-transfer",{state:{...a.state,scrollToAddRule:!0}}):s("./auto-transfer")}}})(Pt);function ke({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:t}){const s=W(),o=Z(),a=_(),r=V(),{tenantEmailDomain:l}=H(),{useDynamicConfig:c,useFeatureGate:u}=$(),h=L(),{configValue:x}=c(G.zeniAccountsConfig),{isFeatureEnabled:i}=u(B.isTreasuryEnabled),{isFeatureEnabled:p}=u(B.isDebitCardFeatureEnabled),{isFeatureEnabled:m}=u(B.isAutoTransferRuleEnabled),{isFeatureEnabled:g}=u(B.isCheckingCommentingEnabled),v=De(x),y=k(R=>N(R)),w=y.companyId??A.getSignedInUserTenant(l)?.companyId,{configValue:I}=c(G.expressPayConfig),f=I.is_enable_all_tenants===!0||I.tenant_ids!=null&&I.tenant_ids.includes(y.tenantId),[D,T]=d.useState(!1),[M,F]=d.useState(!1),[E,P]=d.useState(!1),[O,S]=d.useState(!1),b=k(R=>Xe(R)),j=b.fetchState,se=k(R=>we(R)),re=se?.fetchState??"Not-Started",ge=!!y.companyZeniAccountInfo?.info?.isZeniAccountEnabled,ie=ae(),ce=!!y.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,Q=!!y.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,X=te(ie?.loggedInUserRoleMap),yn=Ie(ie?.loggedInUserRoleMap),Cn=!!y.companyBillPayInfo?.info?.isBillPayEnabled,je=A.getSignedInUser(),xn={userId:je?.userId??"",sessionId:je?.zeniSessionId??"",tenantId:y.tenantId??""},kn=`${be}/account_details`,{areTenantIdsInSync:Pe}=Et();d.useEffect(()=>{!D&&Pe&&(T(!0),a(en(!1)))},[D,a,j,Pe]),d.useEffect(()=>{!M&&re==="Not-Started"&&w&&(F(!0),a(Ae(!0)))},[M,re,w,a]),d.useEffect(()=>{e!=null&&e===!0?P(!0):(P(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{S(t!=null&&t===!0)},[t]);const Te=()=>{P(!1),o("..")},[wn,An]=d.useState(!1),Oe=R=>{An(R)},{isAiCfoOpen:Dn,setIsAiCfoOpen:In}=rn(),{isAiCfoAccessEnabled:Sn,onAskAiCfoClick:bn}=ln({isAiCfoOpen:Dn,setIsAiCfoOpen:In,mobileExploreReferrer:"Checking Accounts"});dn({isDataReady:j==="Completed"});const vn=y.company!=null&&Ze(y.company),fe=(i&&vn)===!0&&!Q,[En,jn]=d.useState(!1),ye=k(R=>R.treasurySetupViewState.treasuryFundsDetails),Pn=ye.fundsDetails,Tn=jt(Pn);d.useEffect(()=>{fe!==!0||En||ye?.fetchStatus.fetchState!=="Not-Started"||(jn(!0),a(it()))},[ye.fetchStatus,a]);const On=nn(y),Bn=Se(p,y);return On===!0&&Bn!==!0?n.jsx(cn,{}):ge?n.jsxs(n.Fragment,{children:[b.fetchState==="Completed"&&E===!1&&O===!1?n.jsx(me,{analytics:U,onLoad:R=>(Be=>{Be.trackAccountsListPageViewed(b.depositAccountsSelectorView.depositAccounts.length,b.externalAccountsSelectorView.paymentAccounts.length,_e(b.summary?.totalBalance.available.amount??0),_e(b.summary?.totalInterest.available.amount??0),b.zeniAccountsConfig.zeniAccountsConfigDetail.annualPercentageYield),fe&&Be.trackTreasuryPromoView("Checking Promo Banner")})(R)}):null,E===!0?n.jsx(pn,{closeDrawerHandler:Te,isTransferDrawerOpen:E,zeniAccountsConfig:b.zeniAccountsConfig,authParams:xn,downloadAccountDetailEndPoint:kn}):null,O===!0?n.jsx(un,{closeDrawerHandler:Te,isCheckDepositDrawerOpen:O}):null,n.jsxs(la,{windowSize:r,children:[n.jsx(he,{isAppContentDrawerOpen:wn,handleDrawerToggle:Oe}),n.jsx(da,{zeniBankListView:b,navigate:o,currentTenant:y,location:s,companyId:w,analytics:U,maxInsuredAmount:v.maxInsuredAmount,isExpressPayEnabled:f,isBillPayEnabled:Cn,isCheckingCommentingEnabled:g,isDebitCardFeatureEnabled:p,isAutoTransferRuleEnabled:m,handleDrawerToggle:Oe,showTreasuryPromo:fe,treasuryYieldPercentage:Tn,treasuryInsuredAmount:5e5,isAiCfoAccessEnabled:Sn,onAskAiCfoClick:bn})]})]}):ce&&X?n.jsx(ne,{to:"../setup"}):y.companyZeniAccountInfo?.info&&!ce&&yn?n.jsx(ne,{to:"../promo",state:s.state}):n.jsx(oe,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}})}const mn=(e,t,s)=>{const o=Se(s,e),{tenantEmailDomain:a}=e;return o===!0||t===!1?`/${a}/bills`:`/${a}/bill/new`},ua=(e,t)=>`/${e}/checking/${t}`,hn=(e,t)=>t==null?`/${e}/checking/transfer`:`/${e}/checking/${t}/transfer`,gn=(e,t)=>t==null?`/${e}/checking/check-deposit`:`/${e}/checking/${t}/check-deposit`,fn=e=>`/${e}/checking/express-pay`,pa=z.div`
49
+ `,da=J(function(e,t){return{zeniAccountListView:Xe(e),isExpressPayEnabled:t.isExpressPayEnabled,analytics:t.analytics}},function(e,t){const{navigate:s,currentTenant:o,location:a,companyId:r,handleDrawerToggle:l,analytics:c,isBillPayEnabled:u,isDebitCardFeatureEnabled:h}=t,{tenantEmailDomain:x}=o;return{onZeniAccountClick:(i,p)=>{c.trackAccountsListPageClicked("Accounts Row Item Click",p,"active");const m=ua(x,i),g=ee(a.state?.pathnameStackToGoBack,a.pathname);s(m,{state:{pathnameStackToGoBack:g}})},onSettingsClick:()=>{c.trackAccountsListPageClicked("Settings Icon"),s("setup")},onReloadTransactions:()=>{e(en(!1))},handleMoveMoneyOptionSelection:(i,p)=>{let m="page-not-found";i==="sendMoney"&&(m=fn(x)),i==="payBill"?m=mn(o,u,h):i==="transfer"?(m=hn(x),p!=null&&e(tn(p))):i==="checkDeposit"&&(m=gn(x));const g=ee(a.state?.pathnameStackToGoBack,a.pathname);s(m,{state:{pathnameStackToGoBack:g}})},unlinkPaymentAccount:(i,p)=>{c.trackAccountsListPageClicked("Unlink Account",p),e(dt(i))},onFetchLinkTokenClick:(i,p)=>{e(Qe("external_account",i,p))},onUpdatePaymentAccountStatus:(i,p,m)=>{e(lt(i,p,"zeni_accounts","external_account",m))},onEstablishConnectionClick:i=>{e(qe(i,r,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:i=>{e(ct(i))},onClickMenuIcon:()=>{l(!0)},onTreasuryGetStartedClick:()=>{s("../../treasury/promo")},onAutoTransferClick:i=>{i?s("./auto-transfer",{state:{...a.state,scrollToAddRule:!0}}):s("./auto-transfer")}}})(Pt);function ke({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:t}){const s=W(),o=G(),a=_(),r=V(),{tenantEmailDomain:l}=H(),{useDynamicConfig:c,useFeatureGate:u}=$(),h=L(),{configValue:x}=c(Z.zeniAccountsConfig),{isFeatureEnabled:i}=u(B.isTreasuryEnabled),{isFeatureEnabled:p}=u(B.isDebitCardFeatureEnabled),{isFeatureEnabled:m}=u(B.isAutoTransferRuleEnabled),{isFeatureEnabled:g}=u(B.isCheckingCommentingEnabled),v=De(x),y=k(R=>N(R)),w=y.companyId??A.getSignedInUserTenant(l)?.companyId,{configValue:I}=c(Z.expressPayConfig),f=I.is_enable_all_tenants===!0||I.tenant_ids!=null&&I.tenant_ids.includes(y.tenantId),[D,T]=d.useState(!1),[M,F]=d.useState(!1),[E,P]=d.useState(!1),[O,S]=d.useState(!1),b=k(R=>Xe(R)),j=b.fetchState,se=k(R=>we(R)),re=se?.fetchState??"Not-Started",ge=!!y.companyZeniAccountInfo?.info?.isZeniAccountEnabled,ie=ae(),ce=!!y.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,Q=!!y.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,X=te(ie?.loggedInUserRoleMap),yn=Ie(ie?.loggedInUserRoleMap),Cn=!!y.companyBillPayInfo?.info?.isBillPayEnabled,je=A.getSignedInUser(),xn={userId:je?.userId??"",sessionId:je?.zeniSessionId??"",tenantId:y.tenantId??""},kn=`${be}/account_details`,{areTenantIdsInSync:Pe}=Et();d.useEffect(()=>{!D&&Pe&&(T(!0),a(en(!1)))},[D,a,j,Pe]),d.useEffect(()=>{!M&&re==="Not-Started"&&w&&(F(!0),a(Ae(!0)))},[M,re,w,a]),d.useEffect(()=>{e!=null&&e===!0?P(!0):(P(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{S(t!=null&&t===!0)},[t]);const Te=()=>{P(!1),o("..")},[wn,An]=d.useState(!1),Oe=R=>{An(R)},{isAiCfoOpen:Dn,setIsAiCfoOpen:In}=rn(),{isAiCfoAccessEnabled:Sn,onAskAiCfoClick:bn}=ln({isAiCfoOpen:Dn,setIsAiCfoOpen:In,mobileExploreReferrer:"Checking Accounts"});dn({isDataReady:j==="Completed"});const vn=y.company!=null&&Ge(y.company),fe=(i&&vn)===!0&&!Q,[En,jn]=d.useState(!1),ye=k(R=>R.treasurySetupViewState.treasuryFundsDetails),Pn=ye.fundsDetails,Tn=jt(Pn);d.useEffect(()=>{fe!==!0||En||ye?.fetchStatus.fetchState!=="Not-Started"||(jn(!0),a(it()))},[ye.fetchStatus,a]);const On=nn(y),Bn=Se(p,y);return On===!0&&Bn!==!0?n.jsx(cn,{}):ge?n.jsxs(n.Fragment,{children:[b.fetchState==="Completed"&&E===!1&&O===!1?n.jsx(me,{analytics:U,onLoad:R=>(Be=>{Be.trackAccountsListPageViewed(b.depositAccountsSelectorView.depositAccounts.length,b.externalAccountsSelectorView.paymentAccounts.length,_e(b.summary?.totalBalance.available.amount??0),_e(b.summary?.totalInterest.available.amount??0),b.zeniAccountsConfig.zeniAccountsConfigDetail.annualPercentageYield),fe&&Be.trackTreasuryPromoView("Checking Promo Banner")})(R)}):null,E===!0?n.jsx(pn,{closeDrawerHandler:Te,isTransferDrawerOpen:E,zeniAccountsConfig:b.zeniAccountsConfig,authParams:xn,downloadAccountDetailEndPoint:kn}):null,O===!0?n.jsx(un,{closeDrawerHandler:Te,isCheckDepositDrawerOpen:O}):null,n.jsxs(la,{windowSize:r,children:[n.jsx(he,{isAppContentDrawerOpen:wn,handleDrawerToggle:Oe}),n.jsx(da,{zeniBankListView:b,navigate:o,currentTenant:y,location:s,companyId:w,analytics:U,maxInsuredAmount:v.maxInsuredAmount,isExpressPayEnabled:f,isBillPayEnabled:Cn,isCheckingCommentingEnabled:g,isDebitCardFeatureEnabled:p,isAutoTransferRuleEnabled:m,handleDrawerToggle:Oe,showTreasuryPromo:fe,treasuryYieldPercentage:Tn,treasuryInsuredAmount:5e5,isAiCfoAccessEnabled:Sn,onAskAiCfoClick:bn})]})]}):ce&&X?n.jsx(ne,{to:"../setup"}):y.companyZeniAccountInfo?.info&&!ce&&yn?n.jsx(ne,{to:"../promo",state:s.state}):n.jsx(oe,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}})}const mn=(e,t,s)=>{const o=Se(s,e),{tenantEmailDomain:a}=e;return o===!0||t===!1?`/${a}/bills`:`/${a}/bill/new`},ua=(e,t)=>`/${e}/checking/${t}`,hn=(e,t)=>t==null?`/${e}/checking/transfer`:`/${e}/checking/${t}/transfer`,gn=(e,t)=>t==null?`/${e}/checking/check-deposit`:`/${e}/checking/${t}/check-deposit`,fn=e=>`/${e}/checking/express-pay`,pa=z.div`
50
50
  display: flex;
51
51
  width: 100%;
52
52
  flex: 1 1 auto;
@@ -54,7 +54,7 @@ import{j as n}from"./liveblocks-ktikibPc.js";import{j as Z,u as W,h as _,l as H,
54
54
  align-items: center;
55
55
  min-height: 100vh;
56
56
  background-color: ${e=>e.theme.colors.grey4};
57
- `,ma=J(function(e,t){const{currentTenant:s}=t,o=an(e,t.accountId),a=A.getSignedInUser(),r=e.tenantState.currentTenantId,l={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:r??""},c=o.accountDetail?.id??"";return{currentTenantCompanyName:s.companyName??"",authParams:l,downloadEndPoint:`${ve.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${c}`,zeniAccountDetail:o,isExpressPayEnabled:t.isExpressPayEnabled,fetchState:o.fetchState}},function(e,t){const{navigate:s,currentTenant:o,location:a,accountId:r}=t,{tenantEmailDomain:l}=o;return{handleMoveMoneyOptionSelection:(c,u)=>{let h="page-not-found";c==="sendMoney"?h=fn(l):c==="payBill"?h=mn(o,t.isBillPayEnabled,t.isDebitCardFeatureEnabled):c==="transfer"?(h=hn(l,r),u!=null&&e(tn(u))):c==="checkDeposit"?(h=gn(l,r),u!=null&&e(ut(u))):c==="accountStatement"&&(h=fa(l,r));const x=ee(a.state?.pathnameStackToGoBack,a.pathname);s(h,{state:{pathnameStackToGoBack:x}})},onViewAllTransactionClick:()=>{const c=ga(l,r),u=ee(a.state?.pathnameStackToGoBack,a.pathname);s(c,{state:{pathnameStackToGoBack:u}})},onAccountDetailClick:()=>{const c=ha(l,r),u=ee(a.state?.pathnameStackToGoBack,a.pathname);s(c,{state:{pathnameStackToGoBack:u}})},onEditNameClick:c=>{e(ze(r,"editName",c))},onReloadZeniAccountDetailPage:()=>{e(on(r,!1))},onCloseAccountClick:()=>{e(ze(r,"closeAccount",""))},onBackClick:()=>{s("../",{relative:"path"})}}})(Tt);function de({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:t,isAccountInfoDrawerOpen:s}){const o=W(),a=Z(),r=_(),l=V(),{tenantEmailDomain:c,accountId:u}=H(),{useDynamicConfig:h}=$(),{useFeatureGate:x}=$(),{isFeatureEnabled:i}=x(B.isDebitCardFeatureEnabled),{isFeatureEnabled:p}=x(B.isCheckingCommentingEnabled),m=k(X=>N(X)),{configValue:g}=h(G.expressPayConfig),v=g.is_enable_all_tenants===!0||g.tenant_ids!=null&&g.tenant_ids.includes(m.tenantId),y=!!m.companyBillPayInfo?.info?.isBillPayEnabled,w=A.getSignedInUser(),I=m.companyId??A.getSignedInUserTenant(c)?.companyId,f={userId:w?.userId??"",sessionId:w?.zeniSessionId??"",tenantId:m.tenantId??""},D=`${be}/account_details`,[T,M]=d.useState(!1),[F,E]=d.useState(!1),[P,O]=d.useState(!1),[S,b]=d.useState(!1),j=k(X=>an(X,u??"")),se=j.fetchState,{isAiCfoOpen:re,setIsAiCfoOpen:ge}=rn(),{isAiCfoAccessEnabled:ie,onAskAiCfoClick:ce}=ln({isAiCfoOpen:re,setIsAiCfoOpen:ge,mobileExploreReferrer:"Checking Account Detail"});dn({isDataReady:se==="Completed"}),d.useEffect(()=>{T||(r(on(u??"",!1)),M(!0))},[T,r,se]),d.useEffect(()=>{b(s!=null&&s===!0)},[s]),d.useEffect(()=>{e!=null&&e===!0?E(!0):(E(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{O(t!=null&&t===!0)},[t]);const Q=()=>{b(!1),a("..")};return n.jsxs(n.Fragment,{children:[S===!0&&j.accountDetail!=null?n.jsx(ta,{authParams:f,downloadAccountDetailEndPoint:D,closeDrawerHandler:Q,isAccountInfoDrawerOpen:S,zeniBankAccountDetail:j.accountDetail}):null,F===!0?n.jsx(pn,{closeDrawerHandler:Q,isTransferDrawerOpen:F,zeniAccountsConfig:j.zeniAccountsConfig,authParams:f,downloadAccountDetailEndPoint:D}):null,P===!0?n.jsx(un,{closeDrawerHandler:Q,isCheckDepositDrawerOpen:P}):null,n.jsx(pa,{windowSize:l,children:n.jsx(ma,{navigate:a,currentTenant:m,location:o,companyId:I,isDebitCardFeatureEnabled:i,accountId:u??"",isBillPayEnabled:y,isCheckingCommentingEnabled:p,isExpressPayEnabled:v,isAiCfoAccessEnabled:ie,onAskAiCfoClick:ce})})]})}const ha=(e,t)=>`/${e}/checking/${t}/account-info`,ga=(e,t)=>`/${e}/checking/${t}/transactions`,fa=(e,t)=>`/${e}/checking/${t}/statements`,ya=z.div`
57
+ `,ma=J(function(e,t){const{currentTenant:s}=t,o=an(e,t.accountId),a=A.getSignedInUser(),r=e.tenantState.currentTenantId,l={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:r??""},c=o.accountDetail?.id??"";return{currentTenantCompanyName:s.companyName??"",authParams:l,downloadEndPoint:`${ve.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${c}`,zeniAccountDetail:o,isExpressPayEnabled:t.isExpressPayEnabled,fetchState:o.fetchState}},function(e,t){const{navigate:s,currentTenant:o,location:a,accountId:r}=t,{tenantEmailDomain:l}=o;return{handleMoveMoneyOptionSelection:(c,u)=>{let h="page-not-found";c==="sendMoney"?h=fn(l):c==="payBill"?h=mn(o,t.isBillPayEnabled,t.isDebitCardFeatureEnabled):c==="transfer"?(h=hn(l,r),u!=null&&e(tn(u))):c==="checkDeposit"?(h=gn(l,r),u!=null&&e(ut(u))):c==="accountStatement"&&(h=fa(l,r));const x=ee(a.state?.pathnameStackToGoBack,a.pathname);s(h,{state:{pathnameStackToGoBack:x}})},onViewAllTransactionClick:()=>{const c=ga(l,r),u=ee(a.state?.pathnameStackToGoBack,a.pathname);s(c,{state:{pathnameStackToGoBack:u}})},onAccountDetailClick:()=>{const c=ha(l,r),u=ee(a.state?.pathnameStackToGoBack,a.pathname);s(c,{state:{pathnameStackToGoBack:u}})},onEditNameClick:c=>{e(ze(r,"editName",c))},onReloadZeniAccountDetailPage:()=>{e(on(r,!1))},onCloseAccountClick:()=>{e(ze(r,"closeAccount",""))},onBackClick:()=>{s("../",{relative:"path"})}}})(Tt);function de({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:t,isAccountInfoDrawerOpen:s}){const o=W(),a=G(),r=_(),l=V(),{tenantEmailDomain:c,accountId:u}=H(),{useDynamicConfig:h}=$(),{useFeatureGate:x}=$(),{isFeatureEnabled:i}=x(B.isDebitCardFeatureEnabled),{isFeatureEnabled:p}=x(B.isCheckingCommentingEnabled),m=k(X=>N(X)),{configValue:g}=h(Z.expressPayConfig),v=g.is_enable_all_tenants===!0||g.tenant_ids!=null&&g.tenant_ids.includes(m.tenantId),y=!!m.companyBillPayInfo?.info?.isBillPayEnabled,w=A.getSignedInUser(),I=m.companyId??A.getSignedInUserTenant(c)?.companyId,f={userId:w?.userId??"",sessionId:w?.zeniSessionId??"",tenantId:m.tenantId??""},D=`${be}/account_details`,[T,M]=d.useState(!1),[F,E]=d.useState(!1),[P,O]=d.useState(!1),[S,b]=d.useState(!1),j=k(X=>an(X,u??"")),se=j.fetchState,{isAiCfoOpen:re,setIsAiCfoOpen:ge}=rn(),{isAiCfoAccessEnabled:ie,onAskAiCfoClick:ce}=ln({isAiCfoOpen:re,setIsAiCfoOpen:ge,mobileExploreReferrer:"Checking Account Detail"});dn({isDataReady:se==="Completed"}),d.useEffect(()=>{T||(r(on(u??"",!1)),M(!0))},[T,r,se]),d.useEffect(()=>{b(s!=null&&s===!0)},[s]),d.useEffect(()=>{e!=null&&e===!0?E(!0):(E(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{O(t!=null&&t===!0)},[t]);const Q=()=>{b(!1),a("..")};return n.jsxs(n.Fragment,{children:[S===!0&&j.accountDetail!=null?n.jsx(ta,{authParams:f,downloadAccountDetailEndPoint:D,closeDrawerHandler:Q,isAccountInfoDrawerOpen:S,zeniBankAccountDetail:j.accountDetail}):null,F===!0?n.jsx(pn,{closeDrawerHandler:Q,isTransferDrawerOpen:F,zeniAccountsConfig:j.zeniAccountsConfig,authParams:f,downloadAccountDetailEndPoint:D}):null,P===!0?n.jsx(un,{closeDrawerHandler:Q,isCheckDepositDrawerOpen:P}):null,n.jsx(pa,{windowSize:l,children:n.jsx(ma,{navigate:a,currentTenant:m,location:o,companyId:I,isDebitCardFeatureEnabled:i,accountId:u??"",isBillPayEnabled:y,isCheckingCommentingEnabled:p,isExpressPayEnabled:v,isAiCfoAccessEnabled:ie,onAskAiCfoClick:ce})})]})}const ha=(e,t)=>`/${e}/checking/${t}/account-info`,ga=(e,t)=>`/${e}/checking/${t}/transactions`,fa=(e,t)=>`/${e}/checking/${t}/statements`,ya=z.div`
58
58
  display: flex;
59
59
  height: 100vh;
60
60
  width: 100%;
@@ -63,4 +63,4 @@ import{j as n}from"./liveblocks-ktikibPc.js";import{j as Z,u as W,h as _,l as H,
63
63
  overflow: auto;
64
64
  align-items: center;
65
65
  background-color: ${e=>e.theme.colors.grey4};
66
- `;function Ca(){const e=Z(),t=_(),s=V(),{accountId:o}=H(),{useFeatureGate:a}=$(),{isFeatureEnabled:r}=a(B.isCheckingCommentingEnabled),[l,c]=d.useState(!1);d.useEffect(()=>{l||(c(!0),t(pt(o??"",!1)))},[l,t]);const u=k(h=>mt(h,o??""));if(A.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return n.jsx(ya,{windowSize:s,children:n.jsx(Ot,{transactionListView:u,depositAccountId:o??"",isCheckingCommentingEnabled:r,onBackClick:()=>{e("../")}})})}const xa=J(function(e,t){const{companyId:s}=t;return{zeniAccountSetupView:ht(e,s),meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true"}},function(e,t){const{navigate:s,companyId:o}=t;return{onSetupButtonClick:()=>{U.trackAccountsPromoPageClicked("Setup Accounts"),e(gt(o))},onBackClick:()=>{s("../..",{relative:"path"})},onSetupZeniAccountSuccess:()=>{s("../setup",{relative:"path"})}}})(Ft),ka=()=>{const e=Z(),t=W(),{tenantEmailDomain:s}=H(),{useDynamicConfig:o}=$(),a=L(),[r,l]=d.useState(!1),[c,u]=d.useState(!1),h=k(f=>N(f)),{configValue:x}=o(G.zeniAccountsConfig),i=De(x);d.useEffect(()=>{c===!1&&t.state?.message==="activation"&&u(!0)},[t.state]);const p=A.getSignedInUserTenant(s)?.companyId??h.companyId,m=A.getSignedInUser(),g=!!h.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,v=f=>{l(f)};if(m==null)throw Error("Can't access Zeni account promo page without signing in...");const y=ae(),w=te(y?.loggedInUserRoleMap),I=Ie(y?.loggedInUserRoleMap);if(g&&w)return n.jsx(ne,{to:"../../checking/setup"});if(h.company?.companyZeniAccountInfo&&(!g&&w||I)){if(t.state?.message==="activation"){const f=sn(t.state?.pathnameStackToGoBack);e(t.pathname,{state:{...t.state,message:void 0,pathnameStackToGoBack:f.newStack}})}return n.jsxs(n.Fragment,{children:[n.jsx(Bt,{showConfetti:c}),n.jsx(me,{analytics:U,onLoad:f=>(D=>D.trackPageLoaded(Ee.Event.accountsPromoPageViewed))(f)}),n.jsx(he,{isAppContentDrawerOpen:r,handleDrawerToggle:v}),n.jsx(xa,{analytics:U,navigate:e,companyId:p,onClickMenuIcon:()=>{v(!0)},maxAnnualPercentageYield:i.maxAnnualPercentageYield,maxInsuredAmount:i.maxInsuredAmount,exampleBankBalance:3e6})]})}return n.jsx(oe,{fetchState:"In-Progress",style:{backgroundColor:a.colors.grey5}})};function Ya(){const e=W(),t=k(S=>N(S)),s=L(),{useFeatureGate:o,useDynamicConfig:a}=$(),r=ae(),l=te(r?.loggedInUserRoleMap),c=Ie(r?.loggedInUserRoleMap),u=!!t.company?.companyZeniAccountInfo.isZeniAccountEnabled,h=!!t.company?.companyZeniAccountInfo.isZeniAccountTOSAccepted,{isFeatureEnabled:x}=o(B.isChargeCardFeatureEnabled),{isFeatureEnabled:i}=o(B.isDebitCardFeatureEnabled),p=nn(t),m=Se(i,t),g=t?.userRole!=null&&ft(t?.userRole),v=(t?.company==null||t.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!g)&&yt(r?.loggedInUserRoleMap),y=Ct(r?.loggedInUserRoleMap),w=(t?.company==null||t.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!g)&&xt(r?.loggedInUserRoleMap),{isFeatureEnabled:I}=o(B.isDepositAccountsFeatureEnabled),f=I&&!g,{configValue:D}=a(G.expressPayConfig),T=D.is_enable_all_tenants===!0||D.tenant_ids!=null&&D.tenant_ids.includes(t.tenantId),{isFeatureEnabled:M}=o(B.isAutoTransferRuleEnabled),F=Rt(t,x,i)&&!g&&kt(r?.loggedInUserRoleMap),E=wt(r?.loggedInUserRoleMap),P=f&&te(r?.loggedInUserRoleMap),O=P||Ge(r?.loggedInUserRoleMap);return n.jsxs($e,{children:[n.jsx(C,{path:"setup",element:n.jsx(Ne,{isBillPayAdminLevelAccess:v,isUserHasOnlyBillPayAccess:y,isReimbursementAdminLevelAccess:w,isZeniAccountAdminLevelAccess:P,isChargeCardAdminLevelAccess:F,isUserHasOnlyCardAccess:E,productType:"zeni_accounts",type:"setup"})}),n.jsx(C,{path:"verification",element:n.jsx(Ne,{isBillPayAdminLevelAccess:v,isUserHasOnlyBillPayAccess:y,isReimbursementAdminLevelAccess:w,isZeniAccountAdminLevelAccess:P,isChargeCardAdminLevelAccess:F,isUserHasOnlyCardAccess:E,productType:"zeni_accounts",type:"verification"})}),M?n.jsxs(n.Fragment,{children:[n.jsx(C,{path:"auto-transfer",element:n.jsx(Ve,{})}),O?n.jsx(C,{path:"auto-transfer/:ruleId/edit",element:n.jsx(Ve,{isEditDrawerOpen:!0})}):null]}):n.jsx(C,{path:"auto-transfer",element:n.jsx(ue,{})}),T&&l?n.jsxs(n.Fragment,{children:[n.jsx(C,{path:"express-pay",element:n.jsx(le,{})}),n.jsx(C,{path:"express-pay/add-ach",element:n.jsx(le,{isAddACHDrawerOpen:!0})}),n.jsx(C,{path:"express-pay/add-wire/add-address",element:n.jsx(le,{isAddAddressDrawerOpen:!0})}),n.jsx(C,{path:"express-pay/add-wire",element:n.jsx(le,{isAddWireDrawerOpen:!0})})]}):n.jsx(C,{path:"express-pay",element:n.jsx(ue,{})}),n.jsx(C,{path:"promo",element:n.jsx(ka,{})}),p&&!m?n.jsx(C,{path:"/*",element:n.jsx(cn,{})}):u?n.jsxs(n.Fragment,{children:[n.jsx(C,{path:"/",element:n.jsx(ke,{})}),n.jsx(C,{path:"transfer",element:n.jsx(ke,{isTransferDrawerOpen:!0})}),n.jsx(C,{path:"check-deposit",element:n.jsx(ke,{isCheckDepositDrawerOpen:!0})}),n.jsx(C,{path:":accountId/*",element:n.jsx(wa,{})}),n.jsx(C,{path:"*",element:n.jsx(ue,{})})]}):h&&l?n.jsx(C,{path:"*",element:n.jsx(ne,{to:"../setup"})}):t.company?.companyZeniAccountInfo&&c?n.jsx(C,{path:"*",element:n.jsx(ne,{to:"../promo",state:e.state})}):n.jsx(C,{path:"*",element:n.jsx(oe,{fetchState:"In-Progress",style:{backgroundColor:s.colors.grey5,boxShadow:`0px 2px ${Ut.sp1} ${s.colors.dropShadowNormal}`}})})]})}function wa(){return n.jsxs($e,{children:[n.jsx(C,{path:"/",element:n.jsx(de,{})}),n.jsx(C,{path:"account-info",element:n.jsx(de,{isAccountInfoDrawerOpen:!0})}),n.jsx(C,{path:"transfer",element:n.jsx(de,{isTransferDrawerOpen:!0})}),n.jsx(C,{path:"check-deposit",element:n.jsx(de,{isCheckDepositDrawerOpen:!0})}),n.jsx(C,{path:"transactions",element:n.jsx(Ca,{})}),n.jsx(C,{path:"statements",element:n.jsx(Nt,{})}),n.jsx(C,{path:"*",element:n.jsx(ue,{})})]})}export{Ya as default};
66
+ `;function Ca(){const e=G(),t=_(),s=V(),{accountId:o}=H(),{useFeatureGate:a}=$(),{isFeatureEnabled:r}=a(B.isCheckingCommentingEnabled),[l,c]=d.useState(!1);d.useEffect(()=>{l||(c(!0),t(pt(o??"",!1)))},[l,t]);const u=k(h=>mt(h,o??""));if(A.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return n.jsx(ya,{windowSize:s,children:n.jsx(Ot,{transactionListView:u,depositAccountId:o??"",isCheckingCommentingEnabled:r,onBackClick:()=>{e("../")}})})}const xa=J(function(e,t){const{companyId:s}=t;return{zeniAccountSetupView:ht(e,s),meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true"}},function(e,t){const{navigate:s,companyId:o}=t;return{onSetupButtonClick:()=>{U.trackAccountsPromoPageClicked("Setup Accounts"),e(gt(o))},onBackClick:()=>{s("../..",{relative:"path"})},onSetupZeniAccountSuccess:()=>{s("../setup",{relative:"path"})}}})(Ft),ka=()=>{const e=G(),t=W(),{tenantEmailDomain:s}=H(),{useDynamicConfig:o}=$(),a=L(),[r,l]=d.useState(!1),[c,u]=d.useState(!1),h=k(f=>N(f)),{configValue:x}=o(Z.zeniAccountsConfig),i=De(x);d.useEffect(()=>{c===!1&&t.state?.message==="activation"&&u(!0)},[t.state]);const p=A.getSignedInUserTenant(s)?.companyId??h.companyId,m=A.getSignedInUser(),g=!!h.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,v=f=>{l(f)};if(m==null)throw Error("Can't access Zeni account promo page without signing in...");const y=ae(),w=te(y?.loggedInUserRoleMap),I=Ie(y?.loggedInUserRoleMap);if(g&&w)return n.jsx(ne,{to:"../../checking/setup"});if(h.company?.companyZeniAccountInfo&&(!g&&w||I)){if(t.state?.message==="activation"){const f=sn(t.state?.pathnameStackToGoBack);e(t.pathname,{state:{...t.state,message:void 0,pathnameStackToGoBack:f.newStack}})}return n.jsxs(n.Fragment,{children:[n.jsx(Bt,{showConfetti:c}),n.jsx(me,{analytics:U,onLoad:f=>(D=>D.trackPageLoaded(Ee.Event.accountsPromoPageViewed))(f)}),n.jsx(he,{isAppContentDrawerOpen:r,handleDrawerToggle:v}),n.jsx(xa,{analytics:U,navigate:e,companyId:p,onClickMenuIcon:()=>{v(!0)},maxAnnualPercentageYield:i.maxAnnualPercentageYield,maxInsuredAmount:i.maxInsuredAmount,exampleBankBalance:3e6})]})}return n.jsx(oe,{fetchState:"In-Progress",style:{backgroundColor:a.colors.grey5}})};function Ya(){const e=W(),t=k(S=>N(S)),s=L(),{useFeatureGate:o,useDynamicConfig:a}=$(),r=ae(),l=te(r?.loggedInUserRoleMap),c=Ie(r?.loggedInUserRoleMap),u=!!t.company?.companyZeniAccountInfo.isZeniAccountEnabled,h=!!t.company?.companyZeniAccountInfo.isZeniAccountTOSAccepted,{isFeatureEnabled:x}=o(B.isChargeCardFeatureEnabled),{isFeatureEnabled:i}=o(B.isDebitCardFeatureEnabled),p=nn(t),m=Se(i,t),g=t?.userRole!=null&&ft(t?.userRole),v=(t?.company==null||t.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!g)&&yt(r?.loggedInUserRoleMap),y=Ct(r?.loggedInUserRoleMap),w=(t?.company==null||t.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!g)&&xt(r?.loggedInUserRoleMap),{isFeatureEnabled:I}=o(B.isDepositAccountsFeatureEnabled),f=I&&!g,{configValue:D}=a(Z.expressPayConfig),T=D.is_enable_all_tenants===!0||D.tenant_ids!=null&&D.tenant_ids.includes(t.tenantId),{isFeatureEnabled:M}=o(B.isAutoTransferRuleEnabled),F=Rt(t,x,i)&&!g&&kt(r?.loggedInUserRoleMap),E=wt(r?.loggedInUserRoleMap),P=f&&te(r?.loggedInUserRoleMap),O=P||Ze(r?.loggedInUserRoleMap);return n.jsxs($e,{children:[n.jsx(C,{path:"setup",element:n.jsx(Ne,{isBillPayAdminLevelAccess:v,isUserHasOnlyBillPayAccess:y,isReimbursementAdminLevelAccess:w,isZeniAccountAdminLevelAccess:P,isChargeCardAdminLevelAccess:F,isUserHasOnlyCardAccess:E,productType:"zeni_accounts",type:"setup"})}),n.jsx(C,{path:"verification",element:n.jsx(Ne,{isBillPayAdminLevelAccess:v,isUserHasOnlyBillPayAccess:y,isReimbursementAdminLevelAccess:w,isZeniAccountAdminLevelAccess:P,isChargeCardAdminLevelAccess:F,isUserHasOnlyCardAccess:E,productType:"zeni_accounts",type:"verification"})}),M?n.jsxs(n.Fragment,{children:[n.jsx(C,{path:"auto-transfer",element:n.jsx(Ve,{})}),O?n.jsx(C,{path:"auto-transfer/:ruleId/edit",element:n.jsx(Ve,{isEditDrawerOpen:!0})}):null]}):n.jsx(C,{path:"auto-transfer",element:n.jsx(ue,{})}),T&&l?n.jsxs(n.Fragment,{children:[n.jsx(C,{path:"express-pay",element:n.jsx(le,{})}),n.jsx(C,{path:"express-pay/add-ach",element:n.jsx(le,{isAddACHDrawerOpen:!0})}),n.jsx(C,{path:"express-pay/add-wire/add-address",element:n.jsx(le,{isAddAddressDrawerOpen:!0})}),n.jsx(C,{path:"express-pay/add-wire",element:n.jsx(le,{isAddWireDrawerOpen:!0})})]}):n.jsx(C,{path:"express-pay",element:n.jsx(ue,{})}),n.jsx(C,{path:"promo",element:n.jsx(ka,{})}),p&&!m?n.jsx(C,{path:"/*",element:n.jsx(cn,{})}):u?n.jsxs(n.Fragment,{children:[n.jsx(C,{path:"/",element:n.jsx(ke,{})}),n.jsx(C,{path:"transfer",element:n.jsx(ke,{isTransferDrawerOpen:!0})}),n.jsx(C,{path:"check-deposit",element:n.jsx(ke,{isCheckDepositDrawerOpen:!0})}),n.jsx(C,{path:":accountId/*",element:n.jsx(wa,{})}),n.jsx(C,{path:"*",element:n.jsx(ue,{})})]}):h&&l?n.jsx(C,{path:"*",element:n.jsx(ne,{to:"../setup"})}):t.company?.companyZeniAccountInfo&&c?n.jsx(C,{path:"*",element:n.jsx(ne,{to:"../promo",state:e.state})}):n.jsx(C,{path:"*",element:n.jsx(oe,{fetchState:"In-Progress",style:{backgroundColor:s.colors.grey5,boxShadow:`0px 2px ${Ut.sp1} ${s.colors.dropShadowNormal}`}})})]})}function wa(){return n.jsxs($e,{children:[n.jsx(C,{path:"/",element:n.jsx(de,{})}),n.jsx(C,{path:"account-info",element:n.jsx(de,{isAccountInfoDrawerOpen:!0})}),n.jsx(C,{path:"transfer",element:n.jsx(de,{isTransferDrawerOpen:!0})}),n.jsx(C,{path:"check-deposit",element:n.jsx(de,{isCheckDepositDrawerOpen:!0})}),n.jsx(C,{path:"transactions",element:n.jsx(Ca,{})}),n.jsx(C,{path:"statements",element:n.jsx(Nt,{})}),n.jsx(C,{path:"*",element:n.jsx(ue,{})})]})}export{Ya as default};
@@ -0,0 +1,9 @@
1
+ import{j as i}from"./liveblocks-CobNzJQ8.js";import{a as u}from"./sentry-4KELney1.js";import{j as x,h as B,u as N,l as $,g as p}from"./core-C33SxPr0.js";import{HE as s,HD as j,NK as v,eN as C,NL as D}from"./zeni-epic-state-Bc0tGzp_.js";import{Z as E,ao as g,h as L,z as T,B as z,bZ as P,q as U}from"./index-pUXlb0zY.js";import{n as _}from"./mui-BZJL7p2F.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]="34e68a83-680e-410e-8c73-f4af2a46ba1e",e._sentryDebugIdIdentifier="sentry-dbid-34e68a83-680e-410e-8c73-f4af2a46ba1e")}catch{}})();const Z=_.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 V(){const e=x(),n=B(),d=E(),l=N();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,h]=u.useState(!1),y=L();u.useEffect(()=>{m||(h(!0),n(j(a??"",!1)))},[m,n]);const o=p(t=>v(t,a??"")),b=()=>{const t=U(l.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:t.newStack}})},r=T.getSignedInUser(),c=p(t=>C(t)),I={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:c.tenantId??""},w=D(a??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",k=c.company?.companyInfo.companyLegalName??c.companyName;if(r==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?i.jsx(z,{fetchState:"In-Progress",style:{backgroundColor:y.colors.grey5}}):i.jsx(Z,{windowSize:d,children:i.jsx(P,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:b,authParams:I,downloadEndPoint:f})})}export{V as Z};
@@ -1 +1 @@
1
- import"./sentry-B-Fm9h-1.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-4KELney1.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};