@zeniai/web-app-ui 5.1.99-qa → 5.2.0-qa

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 (136) hide show
  1. package/dist/assets/AddressRoutes-DGCDOoKb.js +1 -0
  2. package/dist/assets/{AddressScreen-CBnElFxM.js → AddressScreen-Dzf83tSk.js} +2 -2
  3. package/dist/assets/AiCfoScreen-TZ---AU4.js +22 -0
  4. package/dist/assets/{BillPayApprovalRoutes-CB55AV0C.js → BillPayApprovalRoutes-iPPwT0JG.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-UVA-u63A.js → BillPayRoutes-U0Aszwdv.js} +17 -17
  6. package/dist/assets/{BusinessVerificationPageScreen-DsowR4fB.js → BusinessVerificationPageScreen-B4os1LkS.js} +2 -2
  7. package/dist/assets/{CardsAiCfoScreen-BaEolMVN.js → CardsAiCfoScreen-Db20Cfsg.js} +3 -3
  8. package/dist/assets/{ChargeCardRoutes-D3n7KJn0.js → ChargeCardRoutes-rxetskAF.js} +10 -10
  9. package/dist/assets/{CompanyPassportScreen-wSnqdrZm.js → CompanyPassportScreen-COm4H_kf.js} +1 -1
  10. package/dist/assets/ConnectionAuthScreen-C5LpJddx.js +11 -0
  11. package/dist/assets/CustomerOnboardingAuthScreen-BIc9nbPF.js +1 -0
  12. package/dist/assets/{CustomerOnboardingRoutes-DT_Ih6lH.js → CustomerOnboardingRoutes-Id7ixv-a.js} +5 -5
  13. package/dist/assets/{DashboardRoutes-B4SpN_q5.js → DashboardRoutes-D_SbIh49.js} +4 -4
  14. package/dist/assets/{DefaultTenantHome-C-Q9oQmt.js → DefaultTenantHome-BsKeybH6.js} +1 -1
  15. package/dist/assets/DomesticWireDetailScreen-BKpkRMty.js +18 -0
  16. package/dist/assets/DrawerScreen-BPgZ_1JF.js +1 -0
  17. package/dist/assets/EntityDetailRoutes-BZ9Mr897.js +1 -0
  18. package/dist/assets/{ExpenseAutomationRoutes-nIGBHuEd.js → ExpenseAutomationRoutes-CN3ihdCO.js} +3 -3
  19. package/dist/assets/FeaturePreviewScreen-Di3PuVRR.js +1 -0
  20. package/dist/assets/HubSpotOAuthCallbackScreen-CW56Ncxa.js +1 -0
  21. package/dist/assets/{MagicLinkRoutes-BTau9CfB.js → MagicLinkRoutes-DJ7vyce1.js} +5 -5
  22. package/dist/assets/MagicLinkSignInScreen-BZfit8o3.js +12 -0
  23. package/dist/assets/MobileAppDrawer-NdU6zrS3.js +1 -0
  24. package/dist/assets/NotFoundScreen-wlhddpbg.js +1 -0
  25. package/dist/assets/{NotificationRoutes-CkKMsCoc.js → NotificationRoutes-DbRksc78.js} +1 -1
  26. package/dist/assets/OAuthConsentScreen-sL3GodJ_.js +1 -0
  27. package/dist/assets/PandLWithForecastRoutes-BoM4q2mR.js +1 -0
  28. package/dist/assets/PeopleRoutes-0fm-JoER.js +22 -0
  29. package/dist/assets/PerformanceRoutes-Cq8pT07f.js +1 -0
  30. package/dist/assets/{Preview-Dh_7Y2V1.js → Preview-CuOg-A8H.js} +1 -1
  31. package/dist/assets/{QBOConnectionScreen-BOAmyhRI.js → QBOConnectionScreen-D9vGR9Iz.js} +1 -1
  32. package/dist/assets/ReimbursementApprovalRoutes-DfMng3xh.js +1 -0
  33. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-B0OjRx8o.js → ReimbursementApprovalRuleDetailScreen-w7TPHMbb.js} +1 -1
  34. package/dist/assets/{ReimbursementRoutes-CnfaWQKq.js → ReimbursementRoutes-uHKvr9EG.js} +8 -8
  35. package/dist/assets/{ReportsRoutes-ZKjtrrXu.js → ReportsRoutes-BosLV3TS.js} +1 -1
  36. package/dist/assets/RewardsRoutes-BPVfq5Np.js +1 -0
  37. package/dist/assets/ScreenRoutes-Drpg91zT.js +2 -0
  38. package/dist/assets/{SettingsRoutes-0RQL-spt.js → SettingsRoutes-BmbweE5j.js} +8 -8
  39. package/dist/assets/{SetupPagesScreen-lXVOcLJ8.js → SetupPagesScreen-HhCCJlo-.js} +5 -5
  40. package/dist/assets/SignInScreen-B8UhmfC2.js +1 -0
  41. package/dist/assets/SignOutScreen-CxWWZOhK.js +9 -0
  42. package/dist/assets/TaskListScreen-B7M-Cqce.js +9 -0
  43. package/dist/assets/TaskRoutes-CyLfJ8Tw.js +9 -0
  44. package/dist/assets/{TransactionDetailRoutes-DFhCPCQa.js → TransactionDetailRoutes-Ct4erWuE.js} +1 -1
  45. package/dist/assets/TransactionDetailScreen-DRzSksYw.js +5 -0
  46. package/dist/assets/{TransactionListRoutes-kn0wMJaj.js → TransactionListRoutes-B191v9kk.js} +1 -1
  47. package/dist/assets/{TreasuryRoutes-h3ROpRx5.js → TreasuryRoutes-DZNZaxYZ.js} +6 -6
  48. package/dist/assets/{VendorsRoutes-x1VmRs4J.js → VendorsRoutes-CvrHlc-r.js} +1 -1
  49. package/dist/assets/WiseConfirmationScreen-B9yx7qcI.js +12 -0
  50. package/dist/assets/{ZeniAccountRoutes-BOVvauFK.js → ZeniAccountRoutes-YPhOuFwx.js} +12 -12
  51. package/dist/assets/ZeniAccountStatementScreen-DJU3198J.js +9 -0
  52. package/dist/assets/{accountMappingHelper-DNCKLg7K.js → accountMappingHelper-SWFIL59M.js} +1 -1
  53. package/dist/assets/{analytics-1WMvk5Rb.js → analytics-DhULAPA0.js} +1 -1
  54. package/dist/assets/{analyticsHelper-C8vUB4gm.js → analyticsHelper-CbsMOq15.js} +1 -1
  55. package/dist/assets/{core-0WK0Zss8.js → core-CnGMK-sC.js} +1 -1
  56. package/dist/assets/{decodeURIComponentSafe-DYdex7Fp.js → decodeURIComponentSafe-uWfgYCNH.js} +1 -1
  57. package/dist/assets/{dnd-Dwsdp5ty.js → dnd-BqCGp7Ed.js} +1 -1
  58. package/dist/assets/{empty-o2YkWI97.js → empty-AGnm4bIq.js} +1 -1
  59. package/dist/assets/{empty-B_vMxB0z.js → empty-CZCaQm4J.js} +1 -1
  60. package/dist/assets/{emptyVideoElement-Cmrnn243.js → emptyVideoElement-Cqm9YLjS.js} +1 -1
  61. package/dist/assets/epic-CTjjWhpg.js +2 -0
  62. package/dist/assets/getLocaleForTenant-BuGWeb9s.js +1 -0
  63. package/dist/assets/{index-DptRs9ko.js → index-BuTuhkuP.js} +2 -2
  64. package/dist/assets/{index-CmH-4r8j.js → index-CUaM5Y1I.js} +1 -1
  65. package/dist/assets/{index-Dy73EgcO.js → index-D7tfVykC.js} +14303 -14311
  66. package/dist/assets/{index-C3zdsXK_.js → index-D88Jaev3.js} +1 -1
  67. package/dist/assets/{index-B4Kzctdg.js → index-S4IFBgph.js} +1 -1
  68. package/dist/assets/{index-CcesBH_n.js → index-XkyLBJ61.js} +1 -1
  69. package/dist/assets/{index-CqKRE3AP.js → index-b64yysEr.js} +1 -1
  70. package/dist/assets/{index-CFATCouK.js → index-uYv86E98.js} +1 -1
  71. package/dist/assets/{lexical-B9WqgH9H.js → lexical-DlqthnSG.js} +1 -1
  72. package/dist/assets/{liveblocks-tpE-grBU.js → liveblocks-s55OcG-D.js} +1 -1
  73. package/dist/assets/{lottie-dQMhiLBj.js → lottie-DMKCl4ti.js} +1 -1
  74. package/dist/assets/{mui-NHWzIwJg.js → mui-CggbPNN2.js} +2 -2
  75. package/dist/assets/{pathToGoBack-BmJj5cme.js → pathToGoBack-DpxbYxCk.js} +1 -1
  76. package/dist/assets/{pdf-C4fX1mA3.js → pdf-BD0zxvar.js} +3 -3
  77. package/dist/assets/{pdf-lib-CxgB1_73.js → pdf-lib-BzRjr6sI.js} +1 -1
  78. package/dist/assets/{plaid-59NT4aqa.js → plaid-d_bwfWrk.js} +1 -1
  79. package/dist/assets/{pusher-CY-7JGv2.js → pusher-Cfk4rd_d.js} +1 -1
  80. package/dist/assets/{react-D8u5JcH6.js → react-BKWnIOym.js} +1 -1
  81. package/dist/assets/{react-C2Lbn6h8.js → react-BdjYstH9.js} +1 -1
  82. package/dist/assets/{react-DhqMtE92.js → react-C8X5xuWi.js} +1 -1
  83. package/dist/assets/{react-SLQy3m4e.js → react-CSLZes-L.js} +1 -1
  84. package/dist/assets/{react-OZ0ubAW7.js → react-D5Ky_KQN.js} +1 -1
  85. package/dist/assets/{react-C3I7c7kB.js → react-onoaKP_J.js} +1 -1
  86. package/dist/assets/{recharts-CUzwcISX.js → recharts-CmLekiCG.js} +1 -1
  87. package/dist/assets/routePaths-CVAI7AUa.js +1 -0
  88. package/dist/assets/{sentry-D58SEIt0.js → sentry-qwy54zvC.js} +1 -1
  89. package/dist/assets/{url-BRZfE6CD.js → url-BKJ8Udjp.js} +1 -1
  90. package/dist/assets/{url-wdUk7Rbg.js → url-CF9Fx3Jk.js} +1 -1
  91. package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-DwtRgARG.js +1 -0
  92. package/dist/assets/useAskAiCfoHostNavButtonProps-Bl-nKTXG.js +1 -0
  93. package/dist/assets/useCashManagementBanner-SbCmMLis.js +1 -0
  94. package/dist/assets/{useChargeCardPusherEvents-DGhBtw5K.js → useChargeCardPusherEvents-Cg9Qn_oP.js} +1 -1
  95. package/dist/assets/{useDeviceId-SayLljl1.js → useDeviceId-DPOieVuC.js} +1 -1
  96. package/dist/assets/useEmailConnectResultRefresh-gsc6JcZn.js +1 -0
  97. package/dist/assets/{useInitialThreadRequest-B7WOjZ27.js → useInitialThreadRequest-CXnpfTcs.js} +1 -1
  98. package/dist/assets/{utils-CHGPa257.js → utils-5Fz6z6US.js} +1 -1
  99. package/dist/assets/{withTransactionSidePanel-BsJ58rSa.js → withTransactionSidePanel-ZQvLeKiY.js} +2 -2
  100. package/dist/assets/{zeni-epic-state-Bx_bp9Xr.js → zeni-epic-state-NrbJoBOX.js} +4 -4
  101. package/dist/index.html +1 -1
  102. package/package.json +3 -3
  103. package/dist/assets/AddressRoutes-ChIEG7ZZ.js +0 -1
  104. package/dist/assets/AiCfoScreen-DXLxFBnQ.js +0 -22
  105. package/dist/assets/ConnectionAuthScreen-RH-ZQnmS.js +0 -11
  106. package/dist/assets/CustomerOnboardingAuthScreen-Bro8vP9Q.js +0 -1
  107. package/dist/assets/DomesticWireDetailScreen-DmspT9Qv.js +0 -18
  108. package/dist/assets/DrawerScreen-CTBdvd2J.js +0 -1
  109. package/dist/assets/EntityDetailRoutes-DPOfKd1l.js +0 -1
  110. package/dist/assets/FeaturePreviewScreen-CS0na0Uv.js +0 -1
  111. package/dist/assets/HubSpotOAuthCallbackScreen-CDdCifUI.js +0 -1
  112. package/dist/assets/MagicLinkSignInScreen-BQxK3HJS.js +0 -12
  113. package/dist/assets/MobileAppDrawer-By5kqJZy.js +0 -1
  114. package/dist/assets/NotFoundScreen-BUpSeNgf.js +0 -1
  115. package/dist/assets/OAuthConsentScreen-BzkRmkhL.js +0 -1
  116. package/dist/assets/PandLWithForecastRoutes-DB98rpg8.js +0 -1
  117. package/dist/assets/PeopleRoutes-BPQhjQKR.js +0 -22
  118. package/dist/assets/PerformanceRoutes-Cu8GwbPn.js +0 -1
  119. package/dist/assets/ReferralListScreen-Bg4MIsqb.js +0 -5
  120. package/dist/assets/ReimbursementApprovalRoutes-CLqW8bjU.js +0 -1
  121. package/dist/assets/RewardsRoutes-Dmsl5Hhz.js +0 -1
  122. package/dist/assets/ScreenRoutes-DtVjvGeB.js +0 -2
  123. package/dist/assets/SignInScreen-Caakz2DY.js +0 -1
  124. package/dist/assets/SignOutScreen-CtzEkEl4.js +0 -9
  125. package/dist/assets/TaskListScreen-BtTYiD21.js +0 -9
  126. package/dist/assets/TaskRoutes-X8P3xHwH.js +0 -9
  127. package/dist/assets/TransactionDetailScreen-CRWTcneH.js +0 -5
  128. package/dist/assets/WiseConfirmationScreen-CIMiBhET.js +0 -12
  129. package/dist/assets/ZeniAccountStatementScreen-DZHjDSg5.js +0 -9
  130. package/dist/assets/epic-BqLIdimv.js +0 -2
  131. package/dist/assets/getLocaleForTenant-CqQ308VG.js +0 -1
  132. package/dist/assets/routePaths-YBRbNv0i.js +0 -1
  133. package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-B3JxpD0o.js +0 -1
  134. package/dist/assets/useAskAiCfoHostNavButtonProps-Dx1w_2sk.js +0 -1
  135. package/dist/assets/useCashManagementBanner-MgmXXc9G.js +0 -1
  136. package/dist/assets/useEmailConnectResultRefresh-CG-YyoOP.js +0 -1
@@ -1 +1 @@
1
- import{j as s}from"./liveblocks-tpE-grBU.js";import{h as X,g as U,u as Q,i as Z,j as h,N as z,n as H,o as ve,p as j}from"./core-0WK0Zss8.js";import{eX as K,qU as W,jZ as u,RL as ee,K6 as De,bo as le,RM as be,kA as te,NM as ae,RN as ue,RO as Pe,bE as Y,K2 as ye,RP as Ee,RQ as me,RR as je,K5 as Ae,RS as xe,RT as pe,RU as Me,RV as ge,RW as Le,RX as Ce,RY as fe,Li as Be}from"./zeni-epic-state-Bx_bp9Xr.js";import{a as de,C as ne,G as V,d as G,cq as ce,r as J,q as oe,_ as Re,R as Fe}from"./index-Dy73EgcO.js";import"./mui-NHWzIwJg.js";import{a as g}from"./sentry-D58SEIt0.js";import{w as se}from"./withTransactionSidePanel-BsJ58rSa.js";import{p as ie,c as re}from"./routePaths-YBRbNv0i.js";import{v as Oe}from"./utils-CHGPa257.js";import{d as b}from"./decodeURIComponentSafe-DYdex7Fp.js";import{Z as Ge}from"./ZeniAccountStatementScreen-DZHjDSg5.js";import"./recharts-CUzwcISX.js";import"./analytics-1WMvk5Rb.js";import"./plaid-59NT4aqa.js";import"./dnd-Dwsdp5ty.js";import"./stripe-cKAAJElX.js";import"./lottie-dQMhiLBj.js";import"./lexical-B9WqgH9H.js";import"./pdf-C4fX1mA3.js";import"./useAskAiCfoHostNavButtonProps-Dx1w_2sk.js";import"./TransactionDetailScreen-CRWTcneH.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="0851fa3d-8e10-463f-a32d-accb555a80b6",a._sentryDebugIdIdentifier="sentry-dbid-0851fa3d-8e10-463f-a32d-accb555a80b6")}catch{}})();const ze=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],q=a=>Oe(a),we=H((function(a,e){const t=be(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,q(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=de.getLocalizedStrings(),l=q(e.selectedAccount.tranListType),m=Ne(t,n,c,l,e.bookCloseDate);G.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(ue({uiState:{dateRange:m},type:q(e.selectedAccount.tranListType)})),a(De(l,u(m),!1,l==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(u(m))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=J(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ue({uiState:{scrollYOffset:t},type:q(e.selectedAccount.tranListType)}))}}}))(ce),N=se((function({...a}){const e=X(),t=U(),n=Q(),c=t.pathname.split("/").find((r=>ze.includes(r))),o=c??"uncategorized-expense",{tenantEmailDomain:l}=Z(),m=de.getLocalizedStrings(),{accountType:S,title:T,subTitle:D}=_e(o),y="month",I=h((r=>K(r))),p=I.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:A}=ne(),{isFeatureEnabled:k}=A(V.isProjectsTransactionsEnabled),x=h((r=>W(r)))&&k,{dataAvailable:C,initialTimeframeTick:P}=$e(o,p,I.bookCloseDate),[B,E]=g.useState(!1),[R,F]=g.useState(void 0),f=g.useMemo((()=>{const r=u(P);return{tranListType:o,accountType:ee(S),title:T,subTitle:D,timeframe:y,period:r}}),[o,y,S,C]);g.useEffect((()=>{if(!B&&f!=null){E(!0),G.trackTransactionList(void 0,void 0,void 0,f.title);const r=q(f.tranListType);n(De(r,f.period,!0,r==="missingReceipts"?m.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}}),[B,f,n]);let M=f;return f!=null&&R!=null&&(M={...f,period:R}),c==null||M==null?s.jsx(z,{to:"../"}):s.jsx(we,{firstMonthOfFY:p,tenantEmailDomain:l,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:C,navigate:e,showProjectField:x,selectedAccount:M,referrerType:o,bookCloseDate:I.bookCloseDate,onSelectedTimePeriodChange:r=>F(r),...a})})),_e=a=>{let e="",t="";const n=de.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.uncategorizedTransactionList.expense.title;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.uncategorizedTransactionList.missingReceipt.title}return{accountType:e,title:t,subTitle:""}},$e=(a,e,t)=>{const n=le();let c=le().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:ie(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Ne=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},qe=H((function(a,e){const t=Ee(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??he();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),G.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(ye(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=J(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}}))(ce),Ve=se((function({referrerType:a,...e}){const t=X(),n=U(),c=Q(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,classIdEncoded:S,timeframe:T,startDate:D,endDate:y,titleEncoded:I}=Z(),p=b(l??""),A=b(m??""),k=b(S??""),x=b(I??""),C=h((d=>Pe(d.transactionListState,A,p,k))),[P,B]=g.useState(!1),[E,R]=g.useState(void 0),F=h((d=>K(d))),f=F.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=ne(),{isFeatureEnabled:r}=M(V.isProjectsTransactionsEnabled),w=h((d=>W(d)))&&r;let i;const O=Je(p,A,k,T,D,y,x);if(O){const d={startDate:Y(D,"YYYY-MM-DD"),endDate:Y(y,"YYYY-MM-DD")},_=Ue(C?.dateRange,d);i={accountId:A,accountType:ee(p),classId:k,title:x,timeframe:T,period:_}}g.useEffect((()=>{P||i==null||(B(!0),G.trackTransactionList(i.accountId,void 0,a,i.title),c(ye(i.accountId,i.accountType,i.classId,i.period)))}),[P,i,c]);let L=i;i!=null&&E!=null&&(L={...i,period:E});const $=[l,m,S,T,D,y,I].filter((d=>d!=null));return O&&L!=null?s.jsx(qe,{firstMonthOfFY:f,tenantEmailDomain:o,location:n,navigate:t,showProjectField:w,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>R(d),...e}):s.jsx(z,{to:he($.length)})})),he=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Je=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&l!=null,Ue=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),Ke=H((function(a,e){const t=xe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Se();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),G.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(Ae(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=J(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}}))(ce),Xe=se((function({referrerType:a,...e}){const t=X(),n=U(),c=Q(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,projectIdEncoded:S,timeframe:T,startDate:D,endDate:y,titleEncoded:I}=Z(),p=b(l??""),A=b(m??""),k=b(S??""),x=b(I??""),C=h((d=>je(d.transactionListState,A,p,k))),[P,B]=g.useState(!1),[E,R]=g.useState(void 0),F=h((d=>K(d))),f=F.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=ne(),{isFeatureEnabled:r}=M(V.isProjectsTransactionsEnabled),w=h((d=>W(d)))&&r;let i;const O=Qe(p,A,k,T,D,y,x);if(O){const d={startDate:Y(D,"YYYY-MM-DD"),endDate:Y(y,"YYYY-MM-DD")},_=Ze(C?.dateRange,d);i={accountId:A,accountType:ee(p),projectId:k,title:x,timeframe:T,period:_}}g.useEffect((()=>{P||i==null||(B(!0),G.trackTransactionList(i.accountId,void 0,a,i.title),c(Ae(i.accountId,i.accountType,i.projectId,i.period)))}),[P,i,c]);let L=i;i!=null&&E!=null&&(L={...i,period:E});const $=[l,m,S,T,D,y,I].filter((d=>d!=null));return O&&L!=null?s.jsx(Ke,{firstMonthOfFY:f,tenantEmailDomain:o,location:n,navigate:t,showProjectField:w,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>R(d),...e}):s.jsx(z,{to:Se($.length)})})),Se=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Qe=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&l!=null,Ze=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),He=H((function(a,e){const t=Le(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&Ce(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ie();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),G.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=J(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=tt(e.tenantEmailDomain),n=J(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}}))(ce),Te=se((function({referrerType:a,...e}){const t=X(),n=U(),c=Q(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,timeframe:S,startDate:T,endDate:D,titleEncoded:y,excludeSubAccounts:I}=Z(),p=b(l??""),A=b(m??""),k=b(y??""),x=!(I!=null&&I==="exclude_subaccounts"),C=h((v=>Me(v.transactionListState,A,p))),[P,B]=g.useState(!1),[E,R]=g.useState(void 0),F=h((v=>K(v))),f=F.company?.featuresActivationInfo.connectedAccountProvider==="unit",M=F.company?.companyInfo.firstMonthOfFY??1;let r;const w=We(p,A,S,T,D,k);if(w){const v={startDate:Y(T,"YYYY-MM-DD"),endDate:Y(D,"YYYY-MM-DD")},Ye=et(C?.dateRange,v);r={accountId:A,accountType:ee(p),title:k,timeframe:S,period:Ye}}let i=r;r!=null&&E!=null&&(i={...r,period:E});const{useFeatureGate:O}=ne(),{isFeatureEnabled:L}=O(V.isTransactionCommentingEnabled),{isFeatureEnabled:$}=O(V.isProjectsTransactionsEnabled),d=h((v=>W(v)))&&$,{areTenantIdsInSync:_}=Re();g.useEffect((()=>{!P&&r!=null&&_&&(B(!0),G.trackTransactionList(r.accountId,void 0,a,r.title),c(ge(r.accountId,r.accountType,r.period,void 0,!1,x)))}),[P,r,c,_]);const ke=[l,m,S,T,D,y].filter((v=>v!=null));return w&&i!=null?s.jsx(He,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:f,isTransactionCommentingEnabled:L,showProjectField:d,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:v=>R(v),...e}):s.jsx(z,{to:Ie(ke.length)})})),Ie=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},We=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&Y(n,"YYYY-MM-DD").isValid()&&Y(c,"YYYY-MM-DD").isValid()&&o!=null,et=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),tt=a=>`/${a}/transactions/${Be}/statements`;function kt(){const a=U().state?.referrer,e=h((n=>n.expenseAutomationViewState.selectedPeriodByTenantId))[h((n=>K(n))).tenantId],t=Fe();return s.jsxs(ve,{children:[s.jsx(j,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/zeni-clearing-account/statements",element:s.jsx(Ge,{})}),s.jsx(j,{path:"/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/uncategorized-income/*",element:s.jsx(N,{})}),s.jsx(j,{path:"/uncategorized-expense/*",element:t?s.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${e.month}-${e.year}`}):s.jsx(N,{})}),s.jsx(j,{path:"/miscategorized-income/*",element:s.jsx(N,{})}),s.jsx(j,{path:"/miscategorized-expense/*",element:t?s.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${e.month}-${e.year}`}):s.jsx(N,{})}),s.jsx(j,{path:"/missing-receipts/*",element:t?s.jsx(z,{to:`../../month_end_close_checks/review/missing_receipts/${e.month}-${e.year}`}):s.jsx(N,{})}),s.jsx(j,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Ve,{referrerType:a})}),s.jsx(j,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Xe,{referrerType:a})})]})}export{kt as default};
1
+ import{j as s}from"./liveblocks-s55OcG-D.js";import{h as Q,g as q,u as H,i as W,j as S,N as z,n as Z,o as ve,p as j}from"./core-CnGMK-sC.js";import{eV as U,qT as X,jY as u,RG as ee,K4 as De,bo as le,RH as Pe,kz as te,NK as ae,RI as ue,RJ as Ee,bE as Y,K0 as ye,RK as be,RL as me,RM as je,K3 as Ae,RN as xe,RO as pe,RP as Me,RQ as ge,RR as Le,RS as Ce,RT as fe,Lg as Be}from"./zeni-epic-state-NrbJoBOX.js";import{a as de,C as ne,G as K,d as G,co as ce,v as V,r as oe,_ as Fe,E as Oe}from"./index-D7tfVykC.js";import"./mui-CggbPNN2.js";import{a as g}from"./sentry-qwy54zvC.js";import{w as se}from"./withTransactionSidePanel-ZQvLeKiY.js";import{p as ie,c as re}from"./routePaths-CVAI7AUa.js";import{v as Re}from"./utils-5Fz6z6US.js";import{d as P}from"./decodeURIComponentSafe-uWfgYCNH.js";import{Z as Ge}from"./ZeniAccountStatementScreen-DJU3198J.js";import"./recharts-CmLekiCG.js";import"./analytics-DhULAPA0.js";import"./plaid-d_bwfWrk.js";import"./dnd-BqCGp7Ed.js";import"./stripe-cKAAJElX.js";import"./lottie-DMKCl4ti.js";import"./lexical-DlqthnSG.js";import"./pdf-BD0zxvar.js";import"./useAskAiCfoHostNavButtonProps-Bl-nKTXG.js";import"./TransactionDetailScreen-DRzSksYw.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="4cd31d9f-0a56-4702-a6e2-633ca3c7cf80",a._sentryDebugIdIdentifier="sentry-dbid-4cd31d9f-0a56-4702-a6e2-633ca3c7cf80")}catch{}})();const ze=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],J=a=>Re(a),we=Z((function(a,e){const t=Pe(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,J(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=de.getLocalizedStrings(),l=J(e.selectedAccount.tranListType),m=Ne(t,n,c,l,e.bookCloseDate);G.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(ue({uiState:{dateRange:m},type:J(e.selectedAccount.tranListType)})),a(De(l,u(m),!1,l==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(u(m))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=V(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ue({uiState:{scrollYOffset:t},type:J(e.selectedAccount.tranListType)}))}}}))(ce),N=se((function({...a}){const e=Q(),t=q(),n=H(),c=t.pathname.split("/").find((r=>ze.includes(r))),o=c??"uncategorized-expense",{tenantEmailDomain:l}=W(),m=de.getLocalizedStrings(),{accountType:h,title:T,subTitle:D}=_e(o),y="month",I=S((r=>U(r))),p=I.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:A}=ne(),{isFeatureEnabled:k}=A(K.isProjectsTransactionsEnabled),x=S((r=>X(r)))&&k,{dataAvailable:C,initialTimeframeTick:E}=$e(o,p,I.bookCloseDate),[B,b]=g.useState(!1),[F,O]=g.useState(void 0),f=g.useMemo((()=>{const r=u(E);return{tranListType:o,accountType:ee(h),title:T,subTitle:D,timeframe:y,period:r}}),[o,y,h,C]);g.useEffect((()=>{if(!B&&f!=null){b(!0),G.trackTransactionList(void 0,void 0,void 0,f.title);const r=J(f.tranListType);n(De(r,f.period,!0,r==="missingReceipts"?m.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}}),[B,f,n]);let M=f;return f!=null&&F!=null&&(M={...f,period:F}),c==null||M==null?s.jsx(z,{to:"../"}):s.jsx(we,{firstMonthOfFY:p,tenantEmailDomain:l,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:C,navigate:e,showProjectField:x,selectedAccount:M,referrerType:o,bookCloseDate:I.bookCloseDate,onSelectedTimePeriodChange:r=>O(r),...a})})),_e=a=>{let e="",t="";const n=de.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.uncategorizedTransactionList.expense.title;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.uncategorizedTransactionList.missingReceipt.title}return{accountType:e,title:t,subTitle:""}},$e=(a,e,t)=>{const n=le();let c=le().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:ie(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Ne=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},Je=Z((function(a,e){const t=be(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Se();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),G.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(ye(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=V(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}}))(ce),Ke=se((function({referrerType:a,...e}){const t=Q(),n=q(),c=H(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,classIdEncoded:h,timeframe:T,startDate:D,endDate:y,titleEncoded:I}=W(),p=P(l??""),A=P(m??""),k=P(h??""),x=P(I??""),C=S((d=>Ee(d.transactionListState,A,p,k))),[E,B]=g.useState(!1),[b,F]=g.useState(void 0),O=S((d=>U(d))),f=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=ne(),{isFeatureEnabled:r}=M(K.isProjectsTransactionsEnabled),w=S((d=>X(d)))&&r;let i;const R=Ve(p,A,k,T,D,y,x);if(R){const d={startDate:Y(D,"YYYY-MM-DD"),endDate:Y(y,"YYYY-MM-DD")},_=qe(C?.dateRange,d);i={accountId:A,accountType:ee(p),classId:k,title:x,timeframe:T,period:_}}g.useEffect((()=>{E||i==null||(B(!0),G.trackTransactionList(i.accountId,void 0,a,i.title),c(ye(i.accountId,i.accountType,i.classId,i.period)))}),[E,i,c]);let L=i;i!=null&&b!=null&&(L={...i,period:b});const $=[l,m,h,T,D,y,I].filter((d=>d!=null));return R&&L!=null?s.jsx(Je,{firstMonthOfFY:f,tenantEmailDomain:o,location:n,navigate:t,showProjectField:w,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>F(d),...e}):s.jsx(z,{to:Se($.length)})})),Se=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ve=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&l!=null,qe=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),Ue=Z((function(a,e){const t=xe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??he();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),G.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(Ae(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=V(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}}))(ce),Qe=se((function({referrerType:a,...e}){const t=Q(),n=q(),c=H(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,projectIdEncoded:h,timeframe:T,startDate:D,endDate:y,titleEncoded:I}=W(),p=P(l??""),A=P(m??""),k=P(h??""),x=P(I??""),C=S((d=>je(d.transactionListState,A,p,k))),[E,B]=g.useState(!1),[b,F]=g.useState(void 0),O=S((d=>U(d))),f=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=ne(),{isFeatureEnabled:r}=M(K.isProjectsTransactionsEnabled),w=S((d=>X(d)))&&r;let i;const R=He(p,A,k,T,D,y,x);if(R){const d={startDate:Y(D,"YYYY-MM-DD"),endDate:Y(y,"YYYY-MM-DD")},_=We(C?.dateRange,d);i={accountId:A,accountType:ee(p),projectId:k,title:x,timeframe:T,period:_}}g.useEffect((()=>{E||i==null||(B(!0),G.trackTransactionList(i.accountId,void 0,a,i.title),c(Ae(i.accountId,i.accountType,i.projectId,i.period)))}),[E,i,c]);let L=i;i!=null&&b!=null&&(L={...i,period:b});const $=[l,m,h,T,D,y,I].filter((d=>d!=null));return R&&L!=null?s.jsx(Ue,{firstMonthOfFY:f,tenantEmailDomain:o,location:n,navigate:t,showProjectField:w,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>F(d),...e}):s.jsx(z,{to:he($.length)})})),he=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},He=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&l!=null,We=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),Ze=Z((function(a,e){const t=Le(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&Ce(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ie();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),G.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=V(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=tt(e.tenantEmailDomain),n=V(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}}))(ce),Te=se((function({referrerType:a,...e}){const t=Q(),n=q(),c=H(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,timeframe:h,startDate:T,endDate:D,titleEncoded:y,excludeSubAccounts:I}=W(),p=P(l??""),A=P(m??""),k=P(y??""),x=!(I!=null&&I==="exclude_subaccounts"),C=S((v=>Me(v.transactionListState,A,p))),[E,B]=g.useState(!1),[b,F]=g.useState(void 0),O=S((v=>U(v))),f=O.company?.featuresActivationInfo.connectedAccountProvider==="unit",M=O.company?.companyInfo.firstMonthOfFY??1;let r;const w=Xe(p,A,h,T,D,k);if(w){const v={startDate:Y(T,"YYYY-MM-DD"),endDate:Y(D,"YYYY-MM-DD")},Ye=et(C?.dateRange,v);r={accountId:A,accountType:ee(p),title:k,timeframe:h,period:Ye}}let i=r;r!=null&&b!=null&&(i={...r,period:b});const{useFeatureGate:R}=ne(),{isFeatureEnabled:L}=R(K.isTransactionCommentingEnabled),{isFeatureEnabled:$}=R(K.isProjectsTransactionsEnabled),d=S((v=>X(v)))&&$,{areTenantIdsInSync:_}=Fe();g.useEffect((()=>{!E&&r!=null&&_&&(B(!0),G.trackTransactionList(r.accountId,void 0,a,r.title),c(ge(r.accountId,r.accountType,r.period,void 0,!1,x)))}),[E,r,c,_]);const ke=[l,m,h,T,D,y].filter((v=>v!=null));return w&&i!=null?s.jsx(Ze,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:f,isTransactionCommentingEnabled:L,showProjectField:d,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:v=>F(v),...e}):s.jsx(z,{to:Ie(ke.length)})})),Ie=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Xe=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&Y(n,"YYYY-MM-DD").isValid()&&Y(c,"YYYY-MM-DD").isValid()&&o!=null,et=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),tt=a=>`/${a}/transactions/${Be}/statements`;function kt(){const a=q().state?.referrer,e=S((n=>n.expenseAutomationViewState.selectedPeriodByTenantId))[S((n=>U(n))).tenantId],t=Oe();return s.jsxs(ve,{children:[s.jsx(j,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/zeni-clearing-account/statements",element:s.jsx(Ge,{})}),s.jsx(j,{path:"/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/uncategorized-income/*",element:s.jsx(N,{})}),s.jsx(j,{path:"/uncategorized-expense/*",element:t?s.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${e.month}-${e.year}`}):s.jsx(N,{})}),s.jsx(j,{path:"/miscategorized-income/*",element:s.jsx(N,{})}),s.jsx(j,{path:"/miscategorized-expense/*",element:t?s.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${e.month}-${e.year}`}):s.jsx(N,{})}),s.jsx(j,{path:"/missing-receipts/*",element:t?s.jsx(z,{to:`../../month_end_close_checks/review/missing_receipts/${e.month}-${e.year}`}):s.jsx(N,{})}),s.jsx(j,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Ke,{referrerType:a})}),s.jsx(j,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Qe,{referrerType:a})})]})}export{kt as default};
@@ -1,4 +1,4 @@
1
- import{j as e}from"./liveblocks-tpE-grBU.js";import{h as F,g as B,u as U,i as O,j as g,N as D,n as G,o as Te,p as k}from"./core-0WK0Zss8.js";import{cq as N,eX as E,Qv as L,Gt as ae,fW as H,Gb as ne,Qx as Ie,Gw as ke,Qt as je,Qu as se,QJ as be,EA as Ae,ue as Ee,Qz as ve,GP as De,Qw as re,cU as q,yx as oe,fC as Fe,fE as Be,RI as Ue,RJ as Le,Gc as Pe,RK as Re,Gd as Me,Gm as Ve,bs as Oe,bJ as Ge,cB as Ne,bK as _e,cp as ze,bt as $e,M1 as Qe,co as He}from"./zeni-epic-state-Bx_bp9Xr.js";import{T as _,ar as qe,z as A,D as z,d as j,cj as Ze,ck as Je,cl as Q,m as Z,y as Ke,_ as We,a0 as Xe,C as ie,G as v,E as Ye,B as et,cm as tt,au as J,r as at,cn as nt,q as K,co as st,H as X,cp as rt,i as ot}from"./index-Dy73EgcO.js";import{D as it,n as R,S as ct}from"./mui-NHWzIwJg.js";import lt from"./NotFoundScreen-BUpSeNgf.js";import{S as Y}from"./SetupPagesScreen-lXVOcLJ8.js";import{a as p}from"./sentry-D58SEIt0.js";import{u as ut}from"./useAskAiCfoHostNavButtonProps-Dx1w_2sk.js";import{u as dt}from"./useInitialThreadRequest-B7WOjZ27.js";import{u as pt}from"./useCashManagementBanner-MgmXXc9G.js";import{M as ce}from"./MobileAppDrawer-By5kqJZy.js";import{F as mt}from"./FeaturePreviewScreen-CS0na0Uv.js";import{a as ee}from"./analyticsHelper-C8vUB4gm.js";import"./recharts-CUzwcISX.js";import"./analytics-1WMvk5Rb.js";import"./plaid-59NT4aqa.js";import"./dnd-Dwsdp5ty.js";import"./stripe-cKAAJElX.js";import"./lottie-dQMhiLBj.js";import"./lexical-B9WqgH9H.js";import"./pdf-C4fX1mA3.js";import"./utils-CHGPa257.js";import"./routePaths-YBRbNv0i.js";import"./BusinessVerificationPageScreen-DsowR4fB.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]="c9cb943c-8317-4e68-8678-c6f4e9e0e606",t._sentryDebugIdIdentifier="sentry-dbid-c9cb943c-8317-4e68-8678-c6f4e9e0e606")}catch{}})();const ft=G((function(t,a){const{companyId:n}=a;return{treasurySetupView:L(t,n),analytics:j}}),(function(t,a){const{navigate:n,analytics:r,treasurySetupView:m}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const s=m.fundAllocationLocalData;r.trackTreasuryPortfolioConfirm(s.riskScore,ee(s)),t(ke(!0))},onUpdateFundAllocation:s=>{r.trackTreasuryAllocationAction("update",ee(s)),t(Ie(s))}}}))(Ze);function yt(){const t=F(),a=B(),n=U(),{tenantEmailDomain:r}=O(),m=_(),s=g((I=>I.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState)),f=qe(s),o=N(m?.loggedInUserRoleMap),[u,i]=p.useState(!1),[d,w]=p.useState(!1),[c,l]=p.useState(!1),S=g((I=>E(I))),y=A.getSignedInUserTenant(r)?.companyId??S.companyId,x=A.getSignedInUser(),h=g((I=>L(I,y))),T=g((I=>I.treasurySetupViewState.fetchState)),C=g((I=>I.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),M=g((I=>I.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState));if(x==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(p.useEffect((()=>{u||T!=="Not-Started"||y==null||(i(!0),n(ae(y,!0,!1)))}),[u,T,y,n]),p.useEffect((()=>{c||M!=="Not-Started"||y==null||(l(!0),n(H()))}),[c,M,y,n]),p.useEffect((()=>{d||C!=="Not-Started"||y==null||(w(!0),n(ne()))}),[d,C,y,n]),p.useEffect((()=>{f==="In-Progress"&&s==="Completed"&&t("../")}),[f,s,t]),S.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(D,{to:"../promo"});const P=S.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||T!=="Completed";return e.jsxs(e.Fragment,{children:[!P&&e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(ft,{navigate:t,location:a,companyId:y,isEditMode:!0,isLoading:P,isReadOnly:!o,treasurySetupView:h,analytics:j})]})}const gt=G((function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:be(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:L(t,n)}}),(function(t,a){const{navigate:n,transferDetails:r,treasurySetupView:m}=a,s=r.treasuryTransferMoneyLocalData,f=m.fundAllocationLocalData;return{onCancelClick:()=>{Q(a.analytics,"cancel",s,f,"Transfer"),t(se()),n("../")},onTransferClick:()=>{Q(a.analytics,"confirm",s,f,"Transfer"),t(De())},onSaveChangesToLocalStore:o=>{t(ve(o))},onFetchLinkTokenClick:o=>{t(Ee("treasury_setup",o))},onEstablishConnectionClick:o=>{t(Ae(o,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}}))(Je),ht=({isFirstTransfer:t})=>{const a=F(),{tenantEmailDomain:n}=O(),r=U(),[m,s]=p.useState(!1),[f,o]=p.useState(!1),[u,i]=p.useState(!1),[d,w]=p.useState(!1),c=g((C=>C.treasurySetupViewState.fetchState)),l=g((C=>C.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState)),S=g((C=>C.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),y=g((C=>E(C))),x=A.getSignedInUserTenant(n)?.companyId??y.companyId,h=g((C=>je(C))),T=g((C=>L(C,x)));if(A.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return p.useEffect((()=>{f||c!=="Not-Started"||x==null||(o(!0),r(ae(x,!0,!1)))}),[f,c,x,r]),p.useEffect((()=>{u||l!=="Not-Started"||x==null||(i(!0),r(H()))}),[u,l,x,r]),p.useEffect((()=>{d||S!=="Not-Started"||x==null||(w(!0),r(ne()))}),[d,S,x,r]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(gt,{analytics:j,navigate:a,transferDetails:h,onAnotherTransferClick:()=>{s(!1),r(se())},currentTenant:y,treasurySetupView:T,showReviewContent:m,maxInsuredAmount:5e5,onReviewClick:()=>{Q(j,"review",h.treasuryTransferMoneyLocalData,T.fundAllocationLocalData,"Transfer"),s(!0)},isFirstTransfer:t,setShowReviewContent:s,onBackClick:()=>{}})]})},St=R.div`
1
+ import{j as e}from"./liveblocks-s55OcG-D.js";import{h as F,g as U,u as B,i as O,j as g,N as D,n as N,o as we,p as k}from"./core-CnGMK-sC.js";import{cq as G,eV as E,Qq as L,Gr as ae,fU as H,G9 as ne,Qs as Ie,Gu as ke,Qo as be,Qp as se,QE as je,Ey as Ae,uc as Ee,Qu as ve,GN as De,Qr as re,cU as q,yv as oe,fA as Fe,fC as Ue,RD as Be,RE as Le,Ga as Pe,RF as Re,Gb as Me,Gk as Ve,bs as Oe,bJ as Ne,cB as Ge,bK as _e,cp as $e,bt as ze,L$ as Qe,co as He}from"./zeni-epic-state-NrbJoBOX.js";import{T as _,ar as qe,z as A,x as $,d as b,ch as Ze,ci as Ke,cj as Q,m as Z,y as We,_ as Je,a0 as Xe,C as ie,G as v,F as Ye,B as et,ck as tt,au as K,v as at,cl as nt,r as W,cm as st,H as X,cn as rt,i as ot}from"./index-D7tfVykC.js";import{D as it,n as R,S as ct}from"./mui-CggbPNN2.js";import lt from"./NotFoundScreen-wlhddpbg.js";import{S as Y}from"./SetupPagesScreen-HhCCJlo-.js";import{a as p}from"./sentry-qwy54zvC.js";import{u as ut}from"./useAskAiCfoHostNavButtonProps-Bl-nKTXG.js";import{u as dt}from"./useInitialThreadRequest-CXnpfTcs.js";import{u as pt}from"./useCashManagementBanner-SbCmMLis.js";import{M as ce}from"./MobileAppDrawer-NdU6zrS3.js";import{F as mt}from"./FeaturePreviewScreen-Di3PuVRR.js";import{a as ee}from"./analyticsHelper-CbsMOq15.js";import"./recharts-CmLekiCG.js";import"./analytics-DhULAPA0.js";import"./plaid-d_bwfWrk.js";import"./dnd-BqCGp7Ed.js";import"./stripe-cKAAJElX.js";import"./lottie-DMKCl4ti.js";import"./lexical-DlqthnSG.js";import"./pdf-BD0zxvar.js";import"./utils-5Fz6z6US.js";import"./routePaths-CVAI7AUa.js";import"./BusinessVerificationPageScreen-B4os1LkS.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]="9cb486bc-20f5-490b-b55e-3652a9fe90da",t._sentryDebugIdIdentifier="sentry-dbid-9cb486bc-20f5-490b-b55e-3652a9fe90da")}catch{}})();const ft=N((function(t,a){const{companyId:n}=a;return{treasurySetupView:L(t,n),analytics:b}}),(function(t,a){const{navigate:n,analytics:r,treasurySetupView:m}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const s=m.fundAllocationLocalData;r.trackTreasuryPortfolioConfirm(s.riskScore,ee(s)),t(ke(!0))},onUpdateFundAllocation:s=>{r.trackTreasuryAllocationAction("update",ee(s)),t(Ie(s))}}}))(Ze);function yt(){const t=F(),a=U(),n=B(),{tenantEmailDomain:r}=O(),m=_(),s=g((I=>I.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState)),f=qe(s),o=G(m?.loggedInUserRoleMap),[u,i]=p.useState(!1),[d,T]=p.useState(!1),[c,l]=p.useState(!1),S=g((I=>E(I))),y=A.getSignedInUserTenant(r)?.companyId??S.companyId,x=A.getSignedInUser(),h=g((I=>L(I,y))),w=g((I=>I.treasurySetupViewState.fetchState)),C=g((I=>I.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),M=g((I=>I.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState));if(x==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(p.useEffect((()=>{u||w!=="Not-Started"||y==null||(i(!0),n(ae(y,!0,!1)))}),[u,w,y,n]),p.useEffect((()=>{c||M!=="Not-Started"||y==null||(l(!0),n(H()))}),[c,M,y,n]),p.useEffect((()=>{d||C!=="Not-Started"||y==null||(T(!0),n(ne()))}),[d,C,y,n]),p.useEffect((()=>{f==="In-Progress"&&s==="Completed"&&t("../")}),[f,s,t]),S.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(D,{to:"../promo"});const P=S.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||w!=="Completed";return e.jsxs(e.Fragment,{children:[!P&&e.jsx($,{analytics:b,onLoad:()=>{}}),e.jsx(ft,{navigate:t,location:a,companyId:y,isEditMode:!0,isLoading:P,isReadOnly:!o,treasurySetupView:h,analytics:b})]})}const gt=N((function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:je(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:L(t,n)}}),(function(t,a){const{navigate:n,transferDetails:r,treasurySetupView:m}=a,s=r.treasuryTransferMoneyLocalData,f=m.fundAllocationLocalData;return{onCancelClick:()=>{Q(a.analytics,"cancel",s,f,"Transfer"),t(se()),n("../")},onTransferClick:()=>{Q(a.analytics,"confirm",s,f,"Transfer"),t(De())},onSaveChangesToLocalStore:o=>{t(ve(o))},onFetchLinkTokenClick:o=>{t(Ee("treasury_setup",o))},onEstablishConnectionClick:o=>{t(Ae(o,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}}))(Ke),ht=({isFirstTransfer:t})=>{const a=F(),{tenantEmailDomain:n}=O(),r=B(),[m,s]=p.useState(!1),[f,o]=p.useState(!1),[u,i]=p.useState(!1),[d,T]=p.useState(!1),c=g((C=>C.treasurySetupViewState.fetchState)),l=g((C=>C.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState)),S=g((C=>C.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),y=g((C=>E(C))),x=A.getSignedInUserTenant(n)?.companyId??y.companyId,h=g((C=>be(C))),w=g((C=>L(C,x)));if(A.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return p.useEffect((()=>{f||c!=="Not-Started"||x==null||(o(!0),r(ae(x,!0,!1)))}),[f,c,x,r]),p.useEffect((()=>{u||l!=="Not-Started"||x==null||(i(!0),r(H()))}),[u,l,x,r]),p.useEffect((()=>{d||S!=="Not-Started"||x==null||(T(!0),r(ne()))}),[d,S,x,r]),e.jsxs(e.Fragment,{children:[e.jsx($,{analytics:b,onLoad:()=>{}}),e.jsx(gt,{analytics:b,navigate:a,transferDetails:h,onAnotherTransferClick:()=>{s(!1),r(se())},currentTenant:y,treasurySetupView:w,showReviewContent:m,maxInsuredAmount:5e5,onReviewClick:()=>{Q(b,"review",h.treasuryTransferMoneyLocalData,w.fundAllocationLocalData,"Transfer"),s(!0)},isFirstTransfer:t,setShowReviewContent:s,onBackClick:()=>{}})]})},St=R.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -6,11 +6,11 @@ import{j as e}from"./liveblocks-tpE-grBU.js";import{h as F,g as B,u as U,i as O,
6
6
  flex-direction: column;
7
7
  align-items: center;
8
8
  background-color: ${t=>t.theme.colors.grey4};
9
- `,xt={overlayWidth:new Ye(100,100,48)},Ct=G((function(t,a){const n=re(t),{companyId:r}=a;return{treasuryDetail:n,treasurySetupView:L(t,r),downloadEndPoint:`${J.bankingMicroServiceBaseUrl}/1.0/treasury-account/statements?query={"statement_type":"tax_statement"}`}}),(function(t,a){const{navigate:n,currentTenant:r,location:m,handleDrawerToggle:s,analytics:f,isCashManagementFeatureEnabled:o}=a,{tenantEmailDomain:u}=r;return{onSettingsClick:()=>{f.trackAccountsListPageClicked("Settings Icon"),n("setup")},onReloadTransactions:()=>{t(oe(!0))},handleTreasuryOptionSelection:i=>{let d="page-not-found";i==="editPortfolio"?d=wt(u):i==="statements"?d=Tt(u):i==="taxLetter"?d=It(u):i==="settings"&&(d=kt(u));const w=at(m.state?.pathnameStackToGoBack,m.pathname);n(d,{state:{pathnameStackToGoBack:w}})},onColumnSortConfigChanged:(i,d)=>{t(Ue({uiState:{sortKey:i,sortOrder:d}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{s(!0)},onAutoTransferClick:()=>{n(o?"../../checking/cash_management/auto-transfer":"../../checking/auto-transfer")},onCashManagementClick:()=>{n(`/${u}/checking/cash_management`)}}}))(tt);function $({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=B(),r=F(),m=U(),s=Z(),f=Ke(),o=g((b=>E(b))),{tenantEmailDomain:u}=O(),i=o.companyId??A.getSignedInUserTenant(u)?.companyId,[d,w]=p.useState(!1),c=g((b=>re(b))),l=c.fetchState,S=c.accountSummary?.totalBalance?.amount,y=g((b=>b.treasurySetupViewState.treasuryFundsDetails?.fetchStatus)),x=o.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",h=_(),T=!!o.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,C=N(h?.loggedInUserRoleMap),M=q(h?.loggedInUserRoleMap),{areTenantIdsInSync:P}=We();p.useEffect((()=>{l==="Not-Started"&&!d&&P&&(w(!0),m(oe(!0)))}),[d,m,l,P]),p.useEffect((()=>{c.transactionsFetchState.fetchState==="Completed"&&c.transactions.length===0&&!n.pathname.includes("transfer")&&C&&r("./transfer")}),[c.transactionsFetchState.fetchState,c.transactions.length]);const I=()=>{r("..")},[le,ue]=p.useState(!1),W=b=>{ue(b)},{isAiCfoAccessEnabled:de,onAskAiCfoClick:pe}=ut({mobileExploreReferrer:"Treasury"});Xe({isDataReady:l==="Completed"});const me=pt(),{useFeatureGate:V}=ie(),{isFeatureEnabled:fe}=V(v.isDebitCardFeatureEnabled),{isFeatureEnabled:ye}=V(v.isAutoTransferRuleEnabled),{isFeatureEnabled:ge}=V(v.isTreasuryCommentingEnabled),{isFeatureEnabled:he}=V(v.isCashManagementFeatureEnabled),Se=dt(i,{clearParams:l==="Completed"&&y?.fetchState==="Completed"}),xe=Fe(o),Ce=Be(fe,o);if(xe===!0&&Ce!==!0)return e.jsx(mt,{});if(x){const b=y?.fetchState!=="Completed"||c.accountSummaryFetchState.fetchState!=="Completed";return e.jsxs(e.Fragment,{children:[c.accountSummaryFetchState.fetchState==="Completed"&&y?.fetchState==="Completed"&&t===!1&&a===!1?e.jsx(z,{analytics:j,onLoad:()=>{}}):null,e.jsx(it,{onClose:I,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:xt.overlayWidth.valuePercentage(s),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:f.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(jt,{onClick:we=>we.stopPropagation(),children:[t===!0?e.jsx(ht,{isFirstTransfer:c.transactions.length===0||S===0}):null,a===!0?e.jsx(yt,{}):null]})}),e.jsxs(St,{windowSize:s,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:W}),e.jsx(Ct,{treasuryDetailsView:c,isAutoTransferRuleEnabled:ye,navigate:r,currentTenant:o,location:n,companyId:i,analytics:j,cashManagementBannerProps:me,isCashManagementFeatureEnabled:he,isTreasuryCommentingEnabled:ge,handleDrawerToggle:W,initialOpenThreadRequest:Se,isLoading:b,isAiCfoAccessEnabled:de,onAskAiCfoClick:pe})]})]})}return T&&C?e.jsx(D,{to:"../setup"}):o.companyTreasuryInfo?.info&&!T&&M?e.jsx(D,{to:"../promo",state:n.state}):e.jsx(et,{fetchState:"In-Progress",style:{backgroundColor:f.colors.grey5}})}const wt=t=>`/${t}/treasury/edit-portfolio`,Tt=t=>`/${t}/treasury/statements`,It=t=>`/${t}/treasury/tax-letter`,kt=t=>`/${t}/treasury/setup`,jt=R(ct)`
9
+ `,xt={overlayWidth:new Ye(100,100,48)},Ct=N((function(t,a){const n=re(t),{companyId:r}=a;return{treasuryDetail:n,treasurySetupView:L(t,r),downloadEndPoint:`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account/statements?query={"statement_type":"tax_statement"}`}}),(function(t,a){const{navigate:n,currentTenant:r,location:m,handleDrawerToggle:s,analytics:f,isCashManagementFeatureEnabled:o}=a,{tenantEmailDomain:u}=r;return{onSettingsClick:()=>{f.trackAccountsListPageClicked("Settings Icon"),n("setup")},onReloadTransactions:()=>{t(oe(!0))},handleTreasuryOptionSelection:i=>{let d="page-not-found";i==="editPortfolio"?d=Tt(u):i==="statements"?d=wt(u):i==="taxLetter"?d=It(u):i==="settings"&&(d=kt(u));const T=at(m.state?.pathnameStackToGoBack,m.pathname);n(d,{state:{pathnameStackToGoBack:T}})},onColumnSortConfigChanged:(i,d)=>{t(Be({uiState:{sortKey:i,sortOrder:d}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{s(!0)},onAutoTransferClick:()=>{n(o?"../../checking/cash_management/auto-transfer":"../../checking/auto-transfer")},onCashManagementClick:()=>{n(`/${u}/checking/cash_management`)}}}))(tt);function z({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=U(),r=F(),m=B(),s=Z(),f=We(),o=g((j=>E(j))),{tenantEmailDomain:u}=O(),i=o.companyId??A.getSignedInUserTenant(u)?.companyId,[d,T]=p.useState(!1),c=g((j=>re(j))),l=c.fetchState,S=c.accountSummary?.totalBalance?.amount,y=g((j=>j.treasurySetupViewState.treasuryFundsDetails?.fetchStatus)),x=o.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",h=_(),w=!!o.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,C=G(h?.loggedInUserRoleMap),M=q(h?.loggedInUserRoleMap),{areTenantIdsInSync:P}=Je();p.useEffect((()=>{l==="Not-Started"&&!d&&P&&(T(!0),m(oe(!0)))}),[d,m,l,P]),p.useEffect((()=>{c.transactionsFetchState.fetchState==="Completed"&&c.transactions.length===0&&!n.pathname.includes("transfer")&&C&&r("./transfer")}),[c.transactionsFetchState.fetchState,c.transactions.length]);const I=()=>{r("..")},[le,ue]=p.useState(!1),J=j=>{ue(j)},{isAiCfoAccessEnabled:de,onAskAiCfoClick:pe}=ut({mobileExploreReferrer:"Treasury"});Xe({isDataReady:l==="Completed"});const me=pt(),{useFeatureGate:V}=ie(),{isFeatureEnabled:fe}=V(v.isDebitCardFeatureEnabled),{isFeatureEnabled:ye}=V(v.isAutoTransferRuleEnabled),{isFeatureEnabled:ge}=V(v.isTreasuryCommentingEnabled),{isFeatureEnabled:he}=V(v.isCashManagementFeatureEnabled),Se=dt(i,{clearParams:l==="Completed"&&y?.fetchState==="Completed"}),xe=Fe(o),Ce=Ue(fe,o);if(xe===!0&&Ce!==!0)return e.jsx(mt,{});if(x){const j=y?.fetchState!=="Completed"||c.accountSummaryFetchState.fetchState!=="Completed";return e.jsxs(e.Fragment,{children:[c.accountSummaryFetchState.fetchState==="Completed"&&y?.fetchState==="Completed"&&t===!1&&a===!1?e.jsx($,{analytics:b,onLoad:()=>{}}):null,e.jsx(it,{onClose:I,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:xt.overlayWidth.valuePercentage(s),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:f.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(bt,{onClick:Te=>Te.stopPropagation(),children:[t===!0?e.jsx(ht,{isFirstTransfer:c.transactions.length===0||S===0}):null,a===!0?e.jsx(yt,{}):null]})}),e.jsxs(St,{windowSize:s,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:J}),e.jsx(Ct,{treasuryDetailsView:c,isAutoTransferRuleEnabled:ye,navigate:r,currentTenant:o,location:n,companyId:i,analytics:b,cashManagementBannerProps:me,isCashManagementFeatureEnabled:he,isTreasuryCommentingEnabled:ge,handleDrawerToggle:J,initialOpenThreadRequest:Se,isLoading:j,isAiCfoAccessEnabled:de,onAskAiCfoClick:pe})]})]})}return w&&C?e.jsx(D,{to:"../setup"}):o.companyTreasuryInfo?.info&&!w&&M?e.jsx(D,{to:"../promo",state:n.state}):e.jsx(et,{fetchState:"In-Progress",style:{backgroundColor:f.colors.grey5}})}const Tt=t=>`/${t}/treasury/edit-portfolio`,wt=t=>`/${t}/treasury/statements`,It=t=>`/${t}/treasury/tax-letter`,kt=t=>`/${t}/treasury/setup`,bt=R(ct)`
10
10
  display: flex;
11
11
  min-height: 100%;
12
12
  flex-direction: column;
13
- `,bt=R.div`
13
+ `,jt=R.div`
14
14
  display: flex;
15
15
  height: 100vh;
16
16
  width: 100%;
@@ -18,7 +18,7 @@ import{j as e}from"./liveblocks-tpE-grBU.js";import{h as F,g as B,u as U,i as O,
18
18
  flex-direction: column;
19
19
  align-items: center;
20
20
  background-color: ${t=>t.theme.colors.grey4};
21
- `;function At(){const t=F(),a=U(),n=Z(),r=B(),m=`${J.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[s,f]=p.useState(!1),o=g((l=>Le(l)));p.useEffect((()=>{s||o.fetchState!=="Not-Started"||(f(!0),a(Pe(!1)))}),[s,o.fetchState,a]);const u=A.getSignedInUser(),i=g((l=>E(l))),d={userId:u?.userId??"",sessionId:u?.zeniSessionId??"",tenantId:i.tenantId??""},w=i.company?.companyInfo.companyLegalName??i.companyName;if(u==null)throw Error("Can't access statements page without signing in...");const c=o.fetchState!=="Completed";return e.jsx(bt,{windowSize:n,children:e.jsx(nt,{currentTenantCompanyName:w,statementListView:o,isLoading:c,onBackClick:()=>{const l=K(r.state?.pathnameStackToGoBack),S=l.poppedPathname??"..";t(S,{state:{pathnameStackToGoBack:l.newStack}})},authParams:d,downloadEndPoint:m})})}const Et=R.div`
21
+ `;function At(){const t=F(),a=B(),n=Z(),r=U(),m=`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[s,f]=p.useState(!1),o=g((l=>Le(l)));p.useEffect((()=>{s||o.fetchState!=="Not-Started"||(f(!0),a(Pe(!1)))}),[s,o.fetchState,a]);const u=A.getSignedInUser(),i=g((l=>E(l))),d={userId:u?.userId??"",sessionId:u?.zeniSessionId??"",tenantId:i.tenantId??""},T=i.company?.companyInfo.companyLegalName??i.companyName;if(u==null)throw Error("Can't access statements page without signing in...");const c=o.fetchState!=="Completed";return e.jsx(jt,{windowSize:n,children:e.jsx(nt,{currentTenantCompanyName:T,statementListView:o,isLoading:c,onBackClick:()=>{const l=W(r.state?.pathnameStackToGoBack),S=l.poppedPathname??"..";t(S,{state:{pathnameStackToGoBack:l.newStack}})},authParams:d,downloadEndPoint:m})})}const Et=R.div`
22
22
  display: flex;
23
23
  height: 100vh;
24
24
  width: 100%;
@@ -26,7 +26,7 @@ import{j as e}from"./liveblocks-tpE-grBU.js";import{h as F,g as B,u as U,i as O,
26
26
  flex-direction: column;
27
27
  align-items: center;
28
28
  background-color: ${t=>t.theme.colors.grey4};
29
- `;function vt(){const t=F(),a=Z(),n=B(),r=U(),m=`${J.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[s,f]=p.useState(!1),o=g((l=>Re(l)));p.useEffect((()=>{s||o.fetchState!=="Not-Started"||(f(!0),r(Me(!1)))}),[s,o.fetchState,r]);const u=A.getSignedInUser(),i=g((l=>E(l))),d={userId:u?.userId??"",sessionId:u?.zeniSessionId??"",tenantId:i.tenantId??""},w=i.company?.companyInfo.companyLegalName??i.companyName;if(u==null)throw Error("Can't access tax letter page without signing in...");const c=o.fetchState!=="Completed";return e.jsx(Et,{windowSize:a,children:e.jsx(st,{currentTenantCompanyName:w,taxLetterListView:o,isLoading:c,onBackClick:()=>{const l=K(n.state?.pathnameStackToGoBack),S=l.poppedPathname??"..";t(S,{state:{pathnameStackToGoBack:l.newStack}})},authParams:d,downloadEndPoint:m})})}const Dt=G((function(t,a){const{companyId:n}=a,r=L(t,n);return{treasurySetupView:r,isSetupComplete:r.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:r}=a;return{onSetupButtonClick:()=>{t(Ve(r))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:m=>{n(m?"..":"../setup",{relative:"path"})}}}))(rt),Ft=()=>{const t=F(),a=B(),n=U(),{tenantEmailDomain:r}=O(),[m,s]=p.useState(!1),f=g((h=>E(h))),[o,u]=p.useState(!1),i=g((h=>h.treasurySetupViewState.treasuryFundsDetails?.fetchStatus));p.useEffect((()=>{o||i?.fetchState!=="Not-Started"||d==null||(u(!0),n(H()))}),[i,n]);const d=A.getSignedInUserTenant(r)?.companyId??f.companyId,w=A.getSignedInUser(),c=!!f.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,l=h=>{s(h)};if(w==null)throw Error("Can't access treasury promo page without signing in...");const S=_(),y=N(S?.loggedInUserRoleMap),x=q(S?.loggedInUserRoleMap);if(c&&y)return e.jsx(D,{to:"../../treasury/setup"});if(f.company?.companyTreasuryInfo&&(!c&&y||x)){if(a.state?.message==="activation"){const h=K(a.state?.pathnameStackToGoBack);t(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:h.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:h=>(T=>T.trackTreasuryPromoView("Treasury Promo Page"))(h)}),e.jsx(ce,{isAppContentDrawerOpen:m,handleDrawerToggle:l}),e.jsx(Dt,{analytics:j,navigate:t,companyId:d,onClickMenuIcon:()=>{l(!0)}})]})}return e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})})},te=R.div`
29
+ `;function vt(){const t=F(),a=Z(),n=U(),r=B(),m=`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[s,f]=p.useState(!1),o=g((l=>Re(l)));p.useEffect((()=>{s||o.fetchState!=="Not-Started"||(f(!0),r(Me(!1)))}),[s,o.fetchState,r]);const u=A.getSignedInUser(),i=g((l=>E(l))),d={userId:u?.userId??"",sessionId:u?.zeniSessionId??"",tenantId:i.tenantId??""},T=i.company?.companyInfo.companyLegalName??i.companyName;if(u==null)throw Error("Can't access tax letter page without signing in...");const c=o.fetchState!=="Completed";return e.jsx(Et,{windowSize:a,children:e.jsx(st,{currentTenantCompanyName:T,taxLetterListView:o,isLoading:c,onBackClick:()=>{const l=W(n.state?.pathnameStackToGoBack),S=l.poppedPathname??"..";t(S,{state:{pathnameStackToGoBack:l.newStack}})},authParams:d,downloadEndPoint:m})})}const Dt=N((function(t,a){const{companyId:n}=a,r=L(t,n);return{treasurySetupView:r,isSetupComplete:r.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:r}=a;return{onSetupButtonClick:()=>{t(Ve(r))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:m=>{n(m?"..":"../setup",{relative:"path"})}}}))(rt),Ft=()=>{const t=F(),a=U(),n=B(),{tenantEmailDomain:r}=O(),[m,s]=p.useState(!1),f=g((h=>E(h))),[o,u]=p.useState(!1),i=g((h=>h.treasurySetupViewState.treasuryFundsDetails?.fetchStatus));p.useEffect((()=>{o||i?.fetchState!=="Not-Started"||d==null||(u(!0),n(H()))}),[i,n]);const d=A.getSignedInUserTenant(r)?.companyId??f.companyId,T=A.getSignedInUser(),c=!!f.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,l=h=>{s(h)};if(T==null)throw Error("Can't access treasury promo page without signing in...");const S=_(),y=G(S?.loggedInUserRoleMap),x=q(S?.loggedInUserRoleMap);if(c&&y)return e.jsx(D,{to:"../../treasury/setup"});if(f.company?.companyTreasuryInfo&&(!c&&y||x)){if(a.state?.message==="activation"){const h=W(a.state?.pathnameStackToGoBack);t(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:h.newStack}})}return i?.fetchState!=="Completed"?e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})}):e.jsxs(e.Fragment,{children:[e.jsx($,{analytics:b,onLoad:h=>(w=>w.trackTreasuryPromoView("Treasury Promo Page"))(h)}),e.jsx(ce,{isAppContentDrawerOpen:m,handleDrawerToggle:l}),e.jsx(Dt,{analytics:b,navigate:t,companyId:d,onClickMenuIcon:()=>{l(!0)}})]})}return e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})})},te=R.div`
30
30
  display: flex;
31
31
  width: 100%;
32
32
  height: 100%;
@@ -34,4 +34,4 @@ import{j as e}from"./liveblocks-tpE-grBU.js";import{h as F,g as B,u as U,i as O,
34
34
  justify-content: center;
35
35
  align-items: center;
36
36
  background-color: ${t=>t.theme.colors.grey5};
37
- `;function na(){const t=B(),a=g((T=>E(T))),{useFeatureGate:n}=ie(),r=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",m=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,s=_(),f=q(s?.loggedInUserRoleMap),o=a?.userRole!=null&&Oe(a?.userRole),u=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!o)&&Ge(s?.loggedInUserRoleMap),i=Ne(s?.loggedInUserRoleMap),d=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!o)&&_e(s?.loggedInUserRoleMap),w=!!a.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!o&&ze(s?.loggedInUserRoleMap),c=r&&!o&&N(s?.loggedInUserRoleMap),{isFeatureEnabled:l}=n(v.isChargeCardFeatureEnabled),{isFeatureEnabled:S}=n(v.isDebitCardFeatureEnabled),y=ot(a,l,S)&&!o&&$e(s?.loggedInUserRoleMap),x=Qe(s?.loggedInUserRoleMap),h=He(s?.loggedInUserRoleMap);return e.jsxs(Te,{children:[h?null:e.jsx(k,{path:"setup",element:e.jsx(Y,{isBillPayAdminLevelAccess:u,isReimbursementAdminLevelAccess:d,isZeniAccountAdminLevelAccess:w,isChargeCardAdminLevelAccess:y,isTreasuryAdminLevelAccess:c,isUserHasOnlyCardAccess:x,isUserHasOnlyBillPayAccess:i,productType:"zeni_treasury",type:"setup"})}),h?null:e.jsx(k,{path:"verification",element:e.jsx(Y,{isBillPayAdminLevelAccess:u,isUserHasOnlyBillPayAccess:i,isReimbursementAdminLevelAccess:d,isZeniAccountAdminLevelAccess:w,isChargeCardAdminLevelAccess:y,isTreasuryAdminLevelAccess:c,isUserHasOnlyCardAccess:x,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(Ft,{})}),e.jsx(k,{path:"statements",element:e.jsx(At,{})}),e.jsx(k,{path:"tax-letter",element:e.jsx(vt,{})}),r?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"/",element:e.jsx($,{isTransferDrawerOpen:!1,isEditPortfolioDrawerOpen:!1})}),c?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"edit-portfolio",element:e.jsx($,{isEditPortfolioDrawerOpen:!0,isTransferDrawerOpen:!1})}),e.jsx(k,{path:"transfer",element:e.jsx($,{isTransferDrawerOpen:!0,isEditPortfolioDrawerOpen:!1})})]}):null,e.jsx(k,{path:"*",element:e.jsx(lt,{})})]}):m&&c?e.jsx(k,{path:"*",element:e.jsx(D,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&f?e.jsx(k,{path:"*",element:e.jsx(D,{to:"../promo",state:t.state})}):e.jsx(k,{path:"*",element:null})]})}export{na as default};
37
+ `;function na(){const t=U(),a=g((w=>E(w))),{useFeatureGate:n}=ie(),r=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",m=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,s=_(),f=q(s?.loggedInUserRoleMap),o=a?.userRole!=null&&Oe(a?.userRole),u=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!o)&&Ne(s?.loggedInUserRoleMap),i=Ge(s?.loggedInUserRoleMap),d=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!o)&&_e(s?.loggedInUserRoleMap),T=!!a.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!o&&$e(s?.loggedInUserRoleMap),c=r&&!o&&G(s?.loggedInUserRoleMap),{isFeatureEnabled:l}=n(v.isChargeCardFeatureEnabled),{isFeatureEnabled:S}=n(v.isDebitCardFeatureEnabled),y=ot(a,l,S)&&!o&&ze(s?.loggedInUserRoleMap),x=Qe(s?.loggedInUserRoleMap),h=He(s?.loggedInUserRoleMap);return e.jsxs(we,{children:[h?null:e.jsx(k,{path:"setup",element:e.jsx(Y,{isBillPayAdminLevelAccess:u,isReimbursementAdminLevelAccess:d,isZeniAccountAdminLevelAccess:T,isChargeCardAdminLevelAccess:y,isTreasuryAdminLevelAccess:c,isUserHasOnlyCardAccess:x,isUserHasOnlyBillPayAccess:i,productType:"zeni_treasury",type:"setup"})}),h?null:e.jsx(k,{path:"verification",element:e.jsx(Y,{isBillPayAdminLevelAccess:u,isUserHasOnlyBillPayAccess:i,isReimbursementAdminLevelAccess:d,isZeniAccountAdminLevelAccess:T,isChargeCardAdminLevelAccess:y,isTreasuryAdminLevelAccess:c,isUserHasOnlyCardAccess:x,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(Ft,{})}),e.jsx(k,{path:"statements",element:e.jsx(At,{})}),e.jsx(k,{path:"tax-letter",element:e.jsx(vt,{})}),r?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"/",element:e.jsx(z,{isTransferDrawerOpen:!1,isEditPortfolioDrawerOpen:!1})}),c?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"edit-portfolio",element:e.jsx(z,{isEditPortfolioDrawerOpen:!0,isTransferDrawerOpen:!1})}),e.jsx(k,{path:"transfer",element:e.jsx(z,{isTransferDrawerOpen:!0,isEditPortfolioDrawerOpen:!1})})]}):null,e.jsx(k,{path:"*",element:e.jsx(lt,{})})]}):m&&c?e.jsx(k,{path:"*",element:e.jsx(D,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&f?e.jsx(k,{path:"*",element:e.jsx(D,{to:"../promo",state:t.state})}):e.jsx(k,{path:"*",element:null})]})}export{na as default};
@@ -1,4 +1,4 @@
1
- import{j as l}from"./liveblocks-tpE-grBU.js";import{a as f}from"./sentry-D58SEIt0.js";import{h as J,g as Y,i as B,j as S,n as G,u as K,o as at,p as N,N as $}from"./core-0WK0Zss8.js";import{eX as L,Na as Ee,Nb as Re,gw as X,cw as be,cx as Ie,x6 as St,Nc as nt,xa as Kt,L9 as ee,kA as te,x4 as Yt,w_ as qt,Nd as Ue,wS as Ht,wR as Qt,wL as Wt,wX as Zt,xb as Xt,Ne as he,Nf as Me,wT as ea,Ng as pe,fJ as ft,xq as gt,xj as vt,Nh as xt,pK as Tt,xe as yt,xc as Dt,Ni as Ct,xx as Et,xu as bt,xf as It,xw as Je,JA as wt,Nj as ta,Nk as aa,cz as na,Nl as sa,Nm as oa,Nn as me,No as ie,Np as we,La as Ge,xM as ye,L8 as De,xz as kt,x7 as $e,Nq as la,Lb as H,Nr as ze,x1 as ia,Ns as ca,Nt as da,Nu as Ke,Nv as Ye,Nw as qe,Nx as He,xG as ke,Ny as At,xn as jt,Nz as ra,NA as ua,NB as ha,NC as pa,ND as ma,NE as Sa,NF as fa,NG as ga,uq as va,uy as xa,ur as Ta,Kg as je,NH as ya,NI as Da,jZ as Fe,bo as Ca,NJ as Ea,NK as ba,ly as Ia,lH as wa,Kf as Pe,bE as st,NL as Ft,JS as Pt,NM as ka,NN as Aa,NO as ja,lJ as Fa,NP as ot,NQ as lt,NR as it,NS as ct,NT as Pa,lF as _a,NU as Va,lI as La,NV as Na,NW as _t,KB as Vt,kY as Oa,NX as Ba,NY as _e,NZ as Lt,Kz as Nt,A2 as Ra,N_ as Ua,N$ as Ma,lg as Ot,O0 as Ja,O1 as Ga,KN as $a,r_ as za,O2 as Bt,O3 as dt,KK as Ve,O4 as rt,O5 as Ka,KP as Ya,O6 as qa,O7 as Ha,O8 as Qa,O9 as Wa,Oa as Za,s1 as Xa,Ob as en,Lc as tn,Oc as an,Ks as Le,hH as nn,Od as sn,Oe as on,hF as ln,Of as cn,Og as dn,A6 as rn,Oh as un,Oi as hn,Oj as pn,Ok as mn,l0 as Sn,bn as fn,fE as gn,fC as vn}from"./zeni-epic-state-Bx_bp9Xr.js";import{z as R,ar as Ne,B as Rt,D as W,d as j,a4 as Z,aB as xn,r as M,a as Ce,Q as ce,aC as Qe,aD as Tn,aE as yn,q as We,aF as Dn,y as Cn,m as de,E as Ze,C as ae,G as z,aG as En,k as Xe,a0 as Se,aH as bn,aI as Ut,_ as In,aJ as wn,T as kn,aK as An,au as Mt,aL as jn,o as Q,S as Fn,I as Jt,K as Pn,aM as _n,aN as Vn,f as et,aO as Ln,aP as Nn,p as On,aQ as Bn,aR as Rn}from"./index-Dy73EgcO.js";import{n as U,D as Un,S as Gt}from"./mui-NHWzIwJg.js";import{t as Mn,A as Jn}from"./AddressScreen-CBnElFxM.js";import le from"./NotFoundScreen-BUpSeNgf.js";import{F as Gn}from"./FeaturePreviewScreen-CS0na0Uv.js";import{c as q,v as tt,d as $n}from"./routePaths-YBRbNv0i.js";import{p as $t}from"./pathToGoBack-BmJj5cme.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-Dx1w_2sk.js";import{M as ge}from"./MobileAppDrawer-By5kqJZy.js";import{D as zn}from"./DrawerScreen-CTBdvd2J.js";import{g as Kn,m as Yn}from"./accountMappingHelper-DNCKLg7K.js";import"./recharts-CUzwcISX.js";import"./analytics-1WMvk5Rb.js";import"./plaid-59NT4aqa.js";import"./dnd-Dwsdp5ty.js";import"./stripe-cKAAJElX.js";import"./lottie-dQMhiLBj.js";import"./lexical-B9WqgH9H.js";import"./pdf-C4fX1mA3.js";import"./utils-CHGPa257.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]="f5a48951-25a4-405c-ae0d-8d8996a7f296",e._sentryDebugIdIdentifier="sentry-dbid-f5a48951-25a4-405c-ae0d-8d8996a7f296")}catch{}})();const qn=Ce.getLocalizedStrings(),Hn=G((function(e,a){const s=Re(e,a.scheduleTab),t=e.tenantState.currentTenantId;return{authParams:{userId:a.signedInUser.userId??"",sessionId:a.signedInUser.zeniSessionId??"",tenantId:t??""},linkBillExpenseView:s.linkBillExpenseView,transactions:s.linkBillExpenseView.transactions}}),(function(e,a){const{navigate:s,location:t}=a;return{onTransactionSelect(n){e(nt({selectedTransaction:n}))},onBackClick:()=>{s("..",{relative:"path"})},onCancel(){e(nt({selectedTransaction:void 0})),e(Kt()),s("..",{relative:"path"})},onTransactionClick:n=>{const o=`${q(n,a.tenantEmailDomain)}`,c=M(t.state?.pathnameStackToGoBack,t.pathname);s(o,{state:{pathnameStackToGoBack:c}})},onLinkSave(){a.setShouldNavigateBack(!1),e(St(a.scheduleTab,a.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}}))(xn),Qn=({setShouldNavigateBack:e})=>{const a=J(),s=Y(),{scheduleDetailId:t,tenantEmailDomain:n}=B(),{scheduleType:o}=B();if(n==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const c=S((g=>L(g))),r=Ee(o)??"accrued_expenses",h=R.getSignedInUser();if(h==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const i=S((g=>Re(g,r))),p=i.selectedJELinkRowIndex,d=S((g=>X(g,c.companyId))),u=Ne(i.updateStatus.fetchState);f.useEffect((()=>{u==="In-Progress"&&i.updateStatus.fetchState==="Completed"&&a("..",{relative:"path"})}),[u,i.updateStatus.fetchState]),f.useEffect((()=>{i.fetchState==="Not-Started"&&a("..",{relative:"path"})}),[]),f.useEffect((()=>{i.selectedJEAccruedSchedule!=null&&i.selectedJELinkRowIndex!=null||a("..",{relative:"path"})}),[i.selectedJEAccruedSchedule,i.selectedJELinkRowIndex]);const m=i.linkBillExpenseView.fetchState==="Completed";return l.jsx(l.Fragment,{children:i.linkBillExpenseView.fetchState==="In-Progress"?l.jsx(Rt,{fetchState:i.linkBillExpenseView.fetchState}):i.selectedJEAccruedSchedule!=null&&p!=null?l.jsxs(l.Fragment,{children:[m===!0?l.jsx(W,{analytics:j,onLoad:()=>{Wn(i,r,d)}}):null,l.jsx(Hn,{signedInUser:h,attachmentEndPoint:`${Z}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:i.selectedJEAccruedSchedule.vendor.id??"",location:s,tenantEmailDomain:n,scheduleAccruedDetailsView:i,saveFetchState:i.updateStatus.fetchState,scheduleTab:r,navigate:a,analytics:j,controllerUserDetails:d,saveStatus:i.updateStatus.fetchState,jeAccruedSchedule:i.selectedJEAccruedSchedule,localData:i.scheduleAccruedDetailsLocalData.jeScheduleDetails[p]})]}):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}},Wn=(e,a,s)=>{const t=e.selectedJEAccruedSchedule,n=e.selectedJELinkRowIndex;let o;n!=null&&t!=null&&(o=t.scheduledJournalEntry[n]);const{transactions:c}=e.linkBillExpenseView,r=c.some((p=>p.isRecommendedTransaction===!0)),h=be(s.controllers),i=Ie(s.controllerUserIds);t!=null&&j.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...zt(t)},scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:r,journalEntryPostingStatus:o?.status.label??""},vendorName:t.vendor.name??null,controllerEmails:h,controllerUserIds:i})},Zn=U.div`
1
+ import{j as l}from"./liveblocks-s55OcG-D.js";import{a as f}from"./sentry-qwy54zvC.js";import{h as J,g as Y,i as B,j as S,n as G,u as K,o as at,p as N,N as $}from"./core-CnGMK-sC.js";import{eV as L,N8 as Ee,N9 as Re,gw as X,cw as be,cx as Ie,x4 as St,Na as nt,x8 as Kt,L7 as ee,kz as te,x2 as Yt,wY as qt,Nb as Ue,wQ as Ht,wP as Qt,wJ as Wt,wV as Zt,x9 as Xt,Nc as he,Nd as Me,wR as ea,Ne as pe,fH as ft,xo as gt,xh as vt,Nf as xt,pJ as Tt,xc as yt,xa as Dt,Ng as Ct,xv as Et,xs as bt,xd as It,xu as Je,Jy as wt,Nh as ta,Ni as aa,cz as na,Nj as sa,Nk as oa,Nl as me,Nm as ie,Nn as we,L8 as Ge,xK as ye,L6 as De,xx as kt,x5 as $e,No as la,L9 as H,Np as ze,w$ as ia,Nq as ca,Nr as da,Ns as Ke,Nt as Ye,Nu as qe,Nv as He,xE as ke,Nw as At,xl as jt,Nx as ra,Ny as ua,Nz as ha,NA as pa,NB as ma,NC as Sa,ND as fa,NE as ga,uo as va,uw as xa,up as Ta,Ke as je,NF as ya,NG as Da,jY as Fe,bo as Ca,NH as Ea,NI as ba,lx as Ia,lG as wa,Kd as Pe,bE as st,NJ as Ft,JQ as Pt,NK as ka,NL as Aa,NM as ja,lI as Fa,NN as ot,NO as lt,NP as it,NQ as ct,NR as Pa,lE as _a,NS as Va,lH as La,NT as Na,NU as _t,Kz as Vt,kX as Oa,NV as Ba,NW as _e,NX as Lt,Kx as Nt,A0 as Ra,NY as Ua,NZ as Ma,lf as Ot,N_ as Ja,N$ as Ga,KL as $a,rZ as za,O0 as Bt,O1 as dt,KI as Ve,O2 as rt,O3 as Ka,KN as Ya,O4 as qa,O5 as Ha,O6 as Qa,O7 as Wa,O8 as Za,s0 as Xa,O9 as en,La as tn,Oa as an,Kq as Le,hH as nn,Ob as sn,Oc as on,hF as ln,Od as cn,Oe as dn,A4 as rn,Of as un,Og as hn,Oh as pn,Oi as mn,k$ as Sn,bn as fn,fC as gn,fA as vn}from"./zeni-epic-state-NrbJoBOX.js";import{z as R,ar as Ne,B as Rt,x as W,d as j,a4 as Z,aB as xn,v as M,a as Ce,Q as ce,aC as Qe,aD as Tn,aE as yn,r as We,aF as Dn,y as Cn,m as de,F as Ze,C as ae,G as z,aG as En,j as Xe,a0 as Se,aH as bn,aI as Ut,_ as In,aJ as wn,T as kn,aK as An,au as Mt,aL as jn,o as Q,S as Fn,I as Jt,K as Pn,aM as _n,aN as Vn,f as et,aO as Ln,aP as Nn,q as On,aQ as Bn,aR as Rn}from"./index-D7tfVykC.js";import{n as U,D as Un,S as Gt}from"./mui-CggbPNN2.js";import{t as Mn,A as Jn}from"./AddressScreen-Dzf83tSk.js";import le from"./NotFoundScreen-wlhddpbg.js";import{F as Gn}from"./FeaturePreviewScreen-Di3PuVRR.js";import{c as q,v as tt,d as $n}from"./routePaths-CVAI7AUa.js";import{p as $t}from"./pathToGoBack-DpxbYxCk.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-Bl-nKTXG.js";import{M as ge}from"./MobileAppDrawer-NdU6zrS3.js";import{D as zn}from"./DrawerScreen-BPgZ_1JF.js";import{g as Kn,m as Yn}from"./accountMappingHelper-SWFIL59M.js";import"./recharts-CmLekiCG.js";import"./analytics-DhULAPA0.js";import"./plaid-d_bwfWrk.js";import"./dnd-BqCGp7Ed.js";import"./stripe-cKAAJElX.js";import"./lottie-DMKCl4ti.js";import"./lexical-DlqthnSG.js";import"./pdf-BD0zxvar.js";import"./utils-5Fz6z6US.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]="0e73632f-8394-48ba-aa84-f1712de749bf",e._sentryDebugIdIdentifier="sentry-dbid-0e73632f-8394-48ba-aa84-f1712de749bf")}catch{}})();const qn=Ce.getLocalizedStrings(),Hn=G((function(e,a){const s=Re(e,a.scheduleTab),t=e.tenantState.currentTenantId;return{authParams:{userId:a.signedInUser.userId??"",sessionId:a.signedInUser.zeniSessionId??"",tenantId:t??""},linkBillExpenseView:s.linkBillExpenseView,transactions:s.linkBillExpenseView.transactions}}),(function(e,a){const{navigate:s,location:t}=a;return{onTransactionSelect(n){e(nt({selectedTransaction:n}))},onBackClick:()=>{s("..",{relative:"path"})},onCancel(){e(nt({selectedTransaction:void 0})),e(Kt()),s("..",{relative:"path"})},onTransactionClick:n=>{const o=`${q(n,a.tenantEmailDomain)}`,c=M(t.state?.pathnameStackToGoBack,t.pathname);s(o,{state:{pathnameStackToGoBack:c}})},onLinkSave(){a.setShouldNavigateBack(!1),e(St(a.scheduleTab,a.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}}))(xn),Qn=({setShouldNavigateBack:e})=>{const a=J(),s=Y(),{scheduleDetailId:t,tenantEmailDomain:n}=B(),{scheduleType:o}=B();if(n==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const c=S((g=>L(g))),r=Ee(o)??"accrued_expenses",h=R.getSignedInUser();if(h==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const i=S((g=>Re(g,r))),p=i.selectedJELinkRowIndex,d=S((g=>X(g,c.companyId))),u=Ne(i.updateStatus.fetchState);f.useEffect((()=>{u==="In-Progress"&&i.updateStatus.fetchState==="Completed"&&a("..",{relative:"path"})}),[u,i.updateStatus.fetchState]),f.useEffect((()=>{i.fetchState==="Not-Started"&&a("..",{relative:"path"})}),[]),f.useEffect((()=>{i.selectedJEAccruedSchedule!=null&&i.selectedJELinkRowIndex!=null||a("..",{relative:"path"})}),[i.selectedJEAccruedSchedule,i.selectedJELinkRowIndex]);const m=i.linkBillExpenseView.fetchState==="Completed";return l.jsx(l.Fragment,{children:i.linkBillExpenseView.fetchState==="In-Progress"?l.jsx(Rt,{fetchState:i.linkBillExpenseView.fetchState}):i.selectedJEAccruedSchedule!=null&&p!=null?l.jsxs(l.Fragment,{children:[m===!0?l.jsx(W,{analytics:j,onLoad:()=>{Wn(i,r,d)}}):null,l.jsx(Hn,{signedInUser:h,attachmentEndPoint:`${Z}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:i.selectedJEAccruedSchedule.vendor.id??"",location:s,tenantEmailDomain:n,scheduleAccruedDetailsView:i,saveFetchState:i.updateStatus.fetchState,scheduleTab:r,navigate:a,analytics:j,controllerUserDetails:d,saveStatus:i.updateStatus.fetchState,jeAccruedSchedule:i.selectedJEAccruedSchedule,localData:i.scheduleAccruedDetailsLocalData.jeScheduleDetails[p]})]}):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}},Wn=(e,a,s)=>{const t=e.selectedJEAccruedSchedule,n=e.selectedJELinkRowIndex;let o;n!=null&&t!=null&&(o=t.scheduledJournalEntry[n]);const{transactions:c}=e.linkBillExpenseView,r=c.some((p=>p.isRecommendedTransaction===!0)),h=be(s.controllers),i=Ie(s.controllerUserIds);t!=null&&j.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...zt(t)},scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:r,journalEntryPostingStatus:o?.status.label??""},vendorName:t.vendor.name??null,controllerEmails:h,controllerUserIds:i})},Zn=U.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -0,0 +1,12 @@
1
+ import{j as o}from"./liveblocks-s55OcG-D.js";import{a as f}from"./sentry-qwy54zvC.js";import{t as u,u as h,j as y,N as I}from"./core-CnGMK-sC.js";import{Mi as b,fy as w,Bl as j}from"./zeni-epic-state-NrbJoBOX.js";import{z as l,B as x,I as S,K as D}from"./index-D7tfVykC.js";import{n as p}from"./mui-CggbPNN2.js";import"./recharts-CmLekiCG.js";import"./analytics-DhULAPA0.js";import"./plaid-d_bwfWrk.js";import"./dnd-BqCGp7Ed.js";import"./stripe-cKAAJElX.js";import"./lottie-DMKCl4ti.js";import"./lexical-DlqthnSG.js";import"./pdf-BD0zxvar.js";import"./utils-5Fz6z6US.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]="ba074be1-d555-4fdd-9875-88d089c27248",e._sentryDebugIdIdentifier="sentry-dbid-ba074be1-d555-4fdd-9875-88d089c27248")}catch{}})();const q=()=>{const[e]=u(),t=e.get("code")??"",i=e.get("state")??"",c=e.get("profileId")??"",[n,g]=f.useState(!1),a=h(),s=y((m=>b(m))),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(i);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||(g(!0),a(j(t,c,i)))}),[n,a]),s.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:s.error?.message??""})}):(s.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},E=p.div`
2
+ display: flex;
3
+ width: 100%;
4
+ height: 100vh;
5
+ flex-direction: row;
6
+ justify-content: center;
7
+ align-items: center;
8
+ background-color: ${e=>e.theme.colors.grey5};
9
+ `,_=p(D.LargeRegular)`
10
+ display: flex;
11
+ color: ${S.important};
12
+ `;export{q as default};
@@ -1,4 +1,4 @@
1
- import{j as e}from"./liveblocks-tpE-grBU.js";import{u as U,h as Z,i as G,j as A,N as Q,n as W,g as J,o as $e,p as f}from"./core-0WK0Zss8.js";import{Rj as Ve,Rk as Un,Bs as zn,Rl as Mn,Rm as $n,bH as Vn,Rn as He,Dv as Ne,Ro as Ze,eX as z,yv as Ge,Pm as We,cp as te,cq as qe,yp as Hn,Rp as Nn,Rq as Zn,ys as Gn,yz as ye,ym as Wn,yj as qn,Rr as Qe,By as Qn,Q8 as de,Rs as Yn,H9 as Jn,Nd as Kn,Hb as Xn,lh as Re,Rt as ea,rF as Ye,rt as Je,l8 as Ke,lb as Be,Ne as Fe,Nf as na,Ru as aa,la as ta,lx as oa,k$ as sa,jy as ra,jx as ia,Rv as ca,Rw as xe,GS as la,Rx as da,Ry as ua,Q1 as we,Rz as Oe,RA as pa,Hm as ma,QJ as fa,EA as Xe,ue as en,RB as ha,Hj as ga,RC as nn,cR as Ae,Bz as an,fW as ya,fC as tn,fE as De,Ho as xa,Eu as Ca,Hg as wa,RD as on,RE as sn,GU as rn,H2 as Le,RF as Aa,QA as Da,Hq as ka,bs as Sa,bJ as Ia,cB as ba,bK as ja,bt as va,M1 as Ea}from"./zeni-epic-state-Bx_bp9Xr.js";import{m as M,c6 as Pa,T as oe,C as N,G as F,z as S,a4 as ke,c7 as Ta,y as $,B as ue,c8 as Ra,E as K,q as cn,ar as Ba,ag as _e,d as _,c9 as Fa,au as Se,ca as Oa,D as pe,cb as La,f as Ie,aS as Y,cc as _a,_ as Ua,a0 as ln,ad as za,cd as Ue,ce as Ma,r as le,cf as $a,cg as Va,ch as Ha,i as Na,o as Za}from"./index-Dy73EgcO.js";import{n as O,D as X,S as ee}from"./mui-NHWzIwJg.js";import{a as p}from"./sentry-D58SEIt0.js";import{u as dn}from"./useCashManagementBanner-MgmXXc9G.js";import H from"./NotFoundScreen-BUpSeNgf.js";import{S as ze}from"./SetupPagesScreen-lXVOcLJ8.js";import{F as un}from"./FeaturePreviewScreen-CS0na0Uv.js";import{M as me}from"./MobileAppDrawer-By5kqJZy.js";import{A as Ga,D as Wa,V as qa}from"./DomesticWireDetailScreen-DmspT9Qv.js";import{A as Qa}from"./AddressScreen-CBnElFxM.js";import{u as pn}from"./useAskAiCfoHostNavButtonProps-Dx1w_2sk.js";import{Z as Ya}from"./ZeniAccountStatementScreen-DZHjDSg5.js";import"./recharts-CUzwcISX.js";import"./analytics-1WMvk5Rb.js";import"./plaid-59NT4aqa.js";import"./dnd-Dwsdp5ty.js";import"./stripe-cKAAJElX.js";import"./lottie-dQMhiLBj.js";import"./lexical-B9WqgH9H.js";import"./pdf-C4fX1mA3.js";import"./utils-CHGPa257.js";import"./analyticsHelper-C8vUB4gm.js";import"./routePaths-YBRbNv0i.js";import"./BusinessVerificationPageScreen-DsowR4fB.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="49aad078-8682-47e1-a560-e1350f75b072",n._sentryDebugIdIdentifier="sentry-dbid-49aad078-8682-47e1-a560-e1350f75b072")}catch{}})();const Ja=O.div`
1
+ import{j as e}from"./liveblocks-s55OcG-D.js";import{u as U,h as Z,i as G,j as A,N as Y,n as W,g as K,o as $e,p as f}from"./core-CnGMK-sC.js";import{Re as Ve,Rf as Un,Bq as Mn,Rg as zn,Rh as $n,bH as Vn,Ri as He,Dt as Ne,Rj as Ze,eV as M,yt as Ge,Pk as We,cp as te,cq as qe,yn as Hn,Rk as Nn,Rl as Zn,yq as Gn,yx as ye,yk as Wn,yh as qn,Rm as Ye,Bw as Yn,Q3 as de,Rn as Qn,H7 as Kn,Nb as Jn,H9 as Xn,lg as Re,Ro as ea,rE as Qe,rs as Ke,l7 as Je,la as Be,Nc as Fe,Nd as na,Rp as aa,l9 as ta,lw as oa,k_ as sa,jx as ra,jw as ia,Rq as ca,Rr as xe,GQ as la,Rs as da,Rt as ua,PY as we,Ru as Oe,Rv as pa,Hk as ma,QE as fa,Ey as Xe,uc as en,Rw as ha,Hh as ga,Rx as nn,cR as Ae,Bx as an,fU as ya,fA as tn,fC as ke,Hm as xa,Es as Ca,He as wa,Ry as on,Rz as sn,GS as rn,H0 as Le,RA as Aa,Qv as ka,Ho as Da,bs as Sa,bJ as Ia,cB as ba,bK as ja,bt as va,L$ as Ea}from"./zeni-epic-state-NrbJoBOX.js";import{m as z,c4 as Pa,T as oe,C as N,G as F,z as S,a4 as De,c5 as Ta,y as $,B as ue,c6 as Ra,F as J,r as cn,ar as Ba,ag as _e,d as _,c7 as Fa,au as Se,c8 as Oa,x as pe,c9 as La,f as Ie,aS as Q,ca as _a,_ as Ua,a0 as ln,ad as Ma,cb as Ue,cc as za,v as le,cd as $a,ce as Va,cf as Ha,i as Na,o as Za}from"./index-D7tfVykC.js";import{n as O,D as X,S as ee}from"./mui-CggbPNN2.js";import{a as p}from"./sentry-qwy54zvC.js";import{u as dn}from"./useCashManagementBanner-SbCmMLis.js";import H from"./NotFoundScreen-wlhddpbg.js";import{S as Me}from"./SetupPagesScreen-HhCCJlo-.js";import{F as un}from"./FeaturePreviewScreen-Di3PuVRR.js";import{M as me}from"./MobileAppDrawer-NdU6zrS3.js";import{A as Ga,D as Wa,V as qa}from"./DomesticWireDetailScreen-BKpkRMty.js";import{A as Ya}from"./AddressScreen-Dzf83tSk.js";import{u as pn}from"./useAskAiCfoHostNavButtonProps-Bl-nKTXG.js";import{Z as Qa}from"./ZeniAccountStatementScreen-DJU3198J.js";import"./recharts-CmLekiCG.js";import"./analytics-DhULAPA0.js";import"./plaid-d_bwfWrk.js";import"./dnd-BqCGp7Ed.js";import"./stripe-cKAAJElX.js";import"./lottie-DMKCl4ti.js";import"./lexical-DlqthnSG.js";import"./pdf-BD0zxvar.js";import"./utils-5Fz6z6US.js";import"./analyticsHelper-CbsMOq15.js";import"./routePaths-CVAI7AUa.js";import"./BusinessVerificationPageScreen-B4os1LkS.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="a6fc1903-d2a0-43af-aafc-b21d7e93ae2f",n._sentryDebugIdIdentifier="sentry-dbid-a6fc1903-d2a0-43af-aafc-b21d7e93ae2f")}catch{}})();const Ka=O.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -6,7 +6,7 @@ import{j as e}from"./liveblocks-tpE-grBU.js";import{u as U,h as Z,i as G,j as A,
6
6
  flex-direction: column;
7
7
  align-items: center;
8
8
  background-color: ${n=>n.theme.colors.grey4};
9
- `,Ka=W((function(n){const a=Ve(n);return{sweepAmount:a.sweepAmount,primaryAccount:a.primaryFundingAccount,treasurySummary:a.treasurySummary,initialRisk:a.formData.risk,initialFrequency:a.formData.frequency,initialMemo:a.formData.memo,isSaving:a.saveStatus.fetchState==="In-Progress"}}),(function(n,a){const{navigate:s}=a,t=o=>({amount:Vn[o],currencyCode:"USD",currencySymbol:"$"});return{onExit:()=>s(-1),onRiskChange:o=>{n($n({bufferAmount:t(o)}))},onSaveDraft:({risk:o,frequency:r,memo:c})=>{n(Mn({bufferAmount:t(o),frequency:r,memo:c}))},onConfirm:()=>{n(zn())}}}))(Pa);function Xa(){const n=U(),a=Z(),s=M(),{tenantEmailDomain:t}=G(),o=A((c=>Ve(c))),r=o.saveStatus.fetchState;return p.useEffect((()=>{r==="Completed"&&(n(Un()),a(`/${t}/checking/cash_management`))}),[n,a,r,t]),o.primaryFundingAccount==null?e.jsx(Q,{to:`/${t}/checking/cash_management`,replace:!0}):e.jsx(Ja,{windowSize:s,children:e.jsx(Ka,{navigate:a})})}function mn({isEditDrawerOpen:n=!1}={}){const a=U(),s=Z(),t=J(),{ruleId:o,tenantEmailDomain:r}=G(),c=oe(),{useFeatureGate:d}=N(),u=A((x=>He(x))),h=A((x=>Ne(x.depositAccountState,x.depositAccountListState))),w=A((x=>Ze(x))),i=A((x=>z(x))),{isFeatureEnabled:l}=d(F.isTreasuryEnabled),m=u?.fetchState??"Not-Started",g=i?.companyId??(r==null?void 0:S.getSignedInUserTenant(r)?.companyId);p.useEffect((()=>{m==="Not-Started"&&g!=null&&a(Ge(!0))}),[a,m,g]);const D=u?.fetchState!=="Completed";if(D)return{autoTransferRulePageProps:void 0,isLoading:D};const I=i?.company!=null&&We(i.company),C=!!(l&&I),k=te(c?.loggedInUserRoleMap)||qe(c?.loggedInUserRoleMap),y=S.getSignedInUser(),b={userId:y?.userId??"",sessionId:y?.zeniSessionId??"",tenantId:i?.tenantId??""},P=!!t.state?.scrollToAddRule;return{isLoading:D,autoTransferRulePageProps:{autoTransferRuleView:u,companyName:i?.companyName??"",hasAdminLevelAccess:k,includeTreasuryOption:C,transferLimit:5e5,authParams:b,currentTenant:i,depositAccountListView:h,downloadAccountDetailEndPoint:`${ke}/account_details`,editingRuleId:o,isEditDrawerOpen:n,scrollToAddRule:P,zeniAccountsConfigDetail:w,onBackClick:()=>s(".."),onCreateRule:()=>{a(qn())},onUpdateRule:x=>{a(ye(x))},onDeleteClick:x=>{a(Wn(x))},onPauseClick:x=>{a(ye(x,!0,!1))},onResumeClick:x=>{a(ye(x,!1,!0))},onActivityClick:(x,T)=>{a(Gn(x,T))},onUpdateRuleLocalData:x=>{a(Zn(x))},clearRuleLocalData:()=>{a(Nn())},onEditClick:x=>{s(`./${x}/edit`)},onEditDrawerClose:()=>{s("../../",{relative:"path"})},onReviewClick:()=>{a(Hn())}}}}const et=O.div`
9
+ `,Ja=W((function(n){const a=Ve(n);return{sweepAmount:a.sweepAmount,primaryAccount:a.primaryFundingAccount,treasurySummary:a.treasurySummary,initialRisk:a.formData.risk,initialFrequency:a.formData.frequency,initialMemo:a.formData.memo,isSaving:a.saveStatus.fetchState==="In-Progress"}}),(function(n,a){const{navigate:s}=a,t=o=>({amount:Vn[o],currencyCode:"USD",currencySymbol:"$"});return{onExit:()=>s(-1),onRiskChange:o=>{n($n({bufferAmount:t(o)}))},onSaveDraft:({risk:o,frequency:r,memo:c})=>{n(zn({bufferAmount:t(o),frequency:r,memo:c}))},onConfirm:()=>{n(Mn())}}}))(Pa);function Xa(){const n=U(),a=Z(),s=z(),{tenantEmailDomain:t}=G(),o=A((c=>Ve(c))),r=o.saveStatus.fetchState;return p.useEffect((()=>{r==="Completed"&&(n(Un()),a(`/${t}/checking/cash_management`))}),[n,a,r,t]),o.primaryFundingAccount==null?e.jsx(Y,{to:`/${t}/checking/cash_management`,replace:!0}):e.jsx(Ka,{windowSize:s,children:e.jsx(Ja,{navigate:a})})}function mn({isEditDrawerOpen:n=!1}={}){const a=U(),s=Z(),t=K(),{ruleId:o,tenantEmailDomain:r}=G(),c=oe(),{useFeatureGate:d}=N(),u=A((x=>He(x))),h=A((x=>Ne(x.depositAccountState,x.depositAccountListState))),w=A((x=>Ze(x))),i=A((x=>M(x))),{isFeatureEnabled:l}=d(F.isTreasuryEnabled),m=u?.fetchState??"Not-Started",g=i?.companyId??(r==null?void 0:S.getSignedInUserTenant(r)?.companyId);p.useEffect((()=>{m==="Not-Started"&&g!=null&&a(Ge(!0))}),[a,m,g]);const k=u?.fetchState!=="Completed";if(k)return{autoTransferRulePageProps:void 0,isLoading:k};const I=i?.company!=null&&We(i.company),C=!!(l&&I),D=te(c?.loggedInUserRoleMap)||qe(c?.loggedInUserRoleMap),y=S.getSignedInUser(),b={userId:y?.userId??"",sessionId:y?.zeniSessionId??"",tenantId:i?.tenantId??""},P=!!t.state?.scrollToAddRule;return{isLoading:k,autoTransferRulePageProps:{autoTransferRuleView:u,companyName:i?.companyName??"",hasAdminLevelAccess:D,includeTreasuryOption:C,transferLimit:5e5,authParams:b,currentTenant:i,depositAccountListView:h,downloadAccountDetailEndPoint:`${De}/account_details`,editingRuleId:o,isEditDrawerOpen:n,scrollToAddRule:P,zeniAccountsConfigDetail:w,onBackClick:()=>s(".."),onCreateRule:()=>{a(qn())},onUpdateRule:x=>{a(ye(x))},onDeleteClick:x=>{a(Wn(x))},onPauseClick:x=>{a(ye(x,!0,!1))},onResumeClick:x=>{a(ye(x,!1,!0))},onActivityClick:(x,T)=>{a(Gn(x,T))},onUpdateRuleLocalData:x=>{a(Zn(x))},clearRuleLocalData:()=>{a(Nn())},onEditClick:x=>{s(`./${x}/edit`)},onEditDrawerClose:()=>{s("../../",{relative:"path"})},onReviewClick:()=>{a(Hn())}}}}const et=O.div`
10
10
  display: flex;
11
11
  min-height: 100%;
12
12
  width: 100%;
@@ -14,7 +14,7 @@ import{j as e}from"./liveblocks-tpE-grBU.js";import{u as U,h as Z,i as G,j as A,
14
14
  flex-direction: column;
15
15
  align-items: center;
16
16
  background-color: ${n=>n.theme.colors.grey4};
17
- `,nt=W((function(n){const a=Qe(n);return{bufferAmount:{amount:1e4,currencyCode:"USD",currencySymbol:"$"},cashBalance:a.cashBalance,cashFlowTotal:a.cashflow,inflows:a.totalInFlow,isOutflowsLoading:a.banner.fetchState!=="Completed",outflowItems:a.outflowEvents,outflows:a.totalOutFlow,projectionData:a.projectionData,totalCash:a.totalCash,treasuryBalance:a.treasuryBalance}}),(function(n,a){const{navigate:s}=a;return{onBackClick:()=>{s(-1)}}}))(Ta);function re({isAutoTransferRulesTabActive:n=!1,isEditDrawerOpen:a=!1}){const s=U(),t=Z(),o=M(),r=A((w=>Qe(w))).banner.fetchState;p.useEffect((()=>{r==="Not-Started"&&s(Qn(!1))}),[s,r]);const{autoTransferRulePageProps:c,isLoading:d}=mn({isEditDrawerOpen:a}),u=dn(),h=n?"autoTransferRules":"overview";return e.jsx(et,{windowSize:o,children:e.jsx(nt,{initialTab:h,autoTransferRulePageProps:c,cashManagementBannerProps:u,isAutoTransferRulesLoading:d,navigate:t})})}const at=O.div`
17
+ `,nt=W((function(n){const a=Ye(n);return{bufferAmount:{amount:1e4,currencyCode:"USD",currencySymbol:"$"},cashBalance:a.cashBalance,cashFlowTotal:a.cashflow,inflows:a.totalInFlow,isOutflowsLoading:a.banner.fetchState!=="Completed",outflowItems:a.outflowEvents,outflows:a.totalOutFlow,projectionData:a.projectionData,totalCash:a.totalCash,treasuryBalance:a.treasuryBalance}}),(function(n,a){const{navigate:s}=a;return{onBackClick:()=>{s(-1)}}}))(Ta);function re({isAutoTransferRulesTabActive:n=!1,isEditDrawerOpen:a=!1}){const s=U(),t=Z(),o=z(),r=A((w=>Ye(w))).banner.fetchState;p.useEffect((()=>{r==="Not-Started"&&s(Yn(!1))}),[s,r]);const{autoTransferRulePageProps:c,isLoading:d}=mn({isEditDrawerOpen:a}),u=dn(),h=n?"autoTransferRules":"overview";return e.jsx(et,{windowSize:o,children:e.jsx(nt,{initialTab:h,autoTransferRulePageProps:c,cashManagementBannerProps:u,isAutoTransferRulesLoading:d,navigate:t})})}const at=O.div`
18
18
  display: flex;
19
19
  min-height: 100%;
20
20
  width: 100%;
@@ -22,15 +22,15 @@ import{j as e}from"./liveblocks-tpE-grBU.js";import{u as U,h as Z,i as G,j as A,
22
22
  flex-direction: column;
23
23
  align-items: center;
24
24
  background-color: ${n=>n.theme.colors.grey4};
25
- `;function Me({isEditDrawerOpen:n}){const a=$(),[s,t]=p.useState(!1),{autoTransferRulePageProps:o,isLoading:r}=mn({isEditDrawerOpen:n});return r||o==null?e.jsx(ue,{fetchState:"In-Progress",style:{backgroundColor:a.colors.grey5}}):e.jsxs(at,{children:[e.jsx(me,{isAppContentDrawerOpen:s,handleDrawerToggle:c=>{t(c)}}),e.jsx(Ra,{...o})]})}const tt={overlayWidth:new K(100,100,58)},ot=({vendorId:n,isDrawerOpen:a,closeDrawerHandler:s})=>{const t=U(),o=$(),r=M();if(S.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return e.jsx(X,{onClose:()=>{s(!0),t(de())},anchor:"right",open:a,PaperProps:{style:{width:tt.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(st,{onClick:c=>c.stopPropagation(),children:e.jsx(Ga,{vendorIdParam:n,accountContext:"express-pay"})})})},st=O(ee)`
25
+ `;function ze({isEditDrawerOpen:n}){const a=$(),[s,t]=p.useState(!1),{autoTransferRulePageProps:o,isLoading:r}=mn({isEditDrawerOpen:n});return r||o==null?e.jsx(ue,{fetchState:"In-Progress",style:{backgroundColor:a.colors.grey5}}):e.jsxs(at,{children:[e.jsx(me,{isAppContentDrawerOpen:s,handleDrawerToggle:c=>{t(c)}}),e.jsx(Ra,{...o})]})}const tt={overlayWidth:new J(100,100,58)},ot=({vendorId:n,isDrawerOpen:a,closeDrawerHandler:s})=>{const t=U(),o=$(),r=z();if(S.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return e.jsx(X,{onClose:()=>{s(!0),t(de())},anchor:"right",open:a,PaperProps:{style:{width:tt.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(st,{onClick:c=>c.stopPropagation(),children:e.jsx(Ga,{vendorIdParam:n,accountContext:"express-pay"})})})},st=O(ee)`
26
26
  display: flex;
27
27
  min-height: 100%;
28
28
  flex-direction: column;
29
- `,rt={overlayWidth:new K(100,100,58)},it=({isDrawerOpen:n,closeDrawerHandler:a})=>{const s=U(),t=$(),o=M();if(S.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return e.jsx(X,{onClose:()=>{a(!0),s(de())},anchor:"right",open:n,PaperProps:{style:{width:rt.overlayWidth.valuePercentage(o),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:t.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(ct,{onClick:r=>r.stopPropagation(),children:e.jsx(Qa,{accountContext:"express-pay",addressTypeParam:"vendor_address"})})})},ct=O(ee)`
29
+ `,rt={overlayWidth:new J(100,100,58)},it=({isDrawerOpen:n,closeDrawerHandler:a})=>{const s=U(),t=$(),o=z();if(S.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return e.jsx(X,{onClose:()=>{a(!0),s(de())},anchor:"right",open:n,PaperProps:{style:{width:rt.overlayWidth.valuePercentage(o),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:t.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(ct,{onClick:r=>r.stopPropagation(),children:e.jsx(Ya,{accountContext:"express-pay",addressTypeParam:"vendor_address"})})})},ct=O(ee)`
30
30
  display: flex;
31
31
  min-height: 100%;
32
32
  flex-direction: column;
33
- `,lt={overlayWidth:new K(100,100,58)},dt=({vendorId:n,isDrawerOpen:a,closeDrawerHandler:s})=>{const t=U(),o=$(),r=M();if(S.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return e.jsx(X,{onClose:()=>{s(!0),t(de())},anchor:"right",open:a,PaperProps:{style:{width:lt.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(ut,{onClick:c=>c.stopPropagation(),children:e.jsx(Wa,{vendorIdParam:n,accountContext:"express-pay"})})})},ut=O(ee)`
33
+ `,lt={overlayWidth:new J(100,100,58)},dt=({vendorId:n,isDrawerOpen:a,closeDrawerHandler:s})=>{const t=U(),o=$(),r=z();if(S.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return e.jsx(X,{onClose:()=>{s(!0),t(de())},anchor:"right",open:a,PaperProps:{style:{width:lt.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(ut,{onClick:c=>c.stopPropagation(),children:e.jsx(Wa,{vendorIdParam:n,accountContext:"express-pay"})})})},ut=O(ee)`
34
34
  display: flex;
35
35
  min-height: 100%;
36
36
  flex-direction: column;
@@ -42,19 +42,19 @@ import{j as e}from"./liveblocks-tpE-grBU.js";import{u as U,h as Z,i as G,j as A,
42
42
  flex-direction: column;
43
43
  align-items: center;
44
44
  background-color: ${n=>n.theme.colors.grey4};
45
- `,mt=W((function(n,a){const s=z(n),t=S.getSignedInUser(),o=s.tenantId,r={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:o??""},c=a.expressPayDetails,d=n.entityAutoCompleteState.autoCompleteText.common,u=Kn(n,"common");return{expressPayDetails:c,fileProps:{authParams:r,filesEndPoint:`${Se.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:d,entityAutoCompleteView:u},analytics:a.analytics}}),(function(n,a){const{navigate:s}=a;return{onSaveVendor:t=>{n(ia(t,void 0,void 0,!0))},saveVendorDetailLocalData:(t,o)=>{n(Be({vendorId:o,localData:t}))},saveExpressPayLocalData:t=>{n(ra({localData:t}))},onVendorSelected:t=>{t!=null&&n(sa(t,!1))},updateSelectedVendorForCreate:t=>{n(oa(t))},initializeVendorAddress:()=>{n(ta())},resetVendorSaveStatus:t=>{n(aa({vendorId:t}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(t,o)=>{t.trim().length>=2?n(na({searchString:t,entityType:o,searchOrigin:"common"})):t.trim().length===0&&n(Fe("common"))},onCancelAutoComplete:()=>{n(Fe("common"))}},chooseNewVendor:t=>{n(Be({localData:{vendorName:t}}))},onClickAddAccount:t=>{t.method.toLowerCase().indexOf("ach")!==-1?s("./add-ach",{relative:"path"}):t.method.toLowerCase().indexOf("wire")!==-1&&t.method.toLowerCase().indexOf("domestic")!==-1&&s("./add-wire",{relative:"path"})},updateFilesEntity:t=>{n(Ke({files:t}))},onDeleteFile:t=>{n(Je(t))},onEditFileName:(t,o)=>{n(Ye(t,o.split(".")[0]))},onBackClick:t=>{t!=null&&n(Re(t)),n(Re()),n(ea()),n(de()),s("../",{relative:"path"})},onSchedulePayment:()=>{n(Xn())}}}))(Fa);function ie({isAddACHDrawerOpen:n,isAddWireDrawerOpen:a,isAddAddressDrawerOpen:s}){const t=Z(),o=J(),r=U(),[c,d]=p.useState(!1),{tenantEmailDomain:u}=G(),h=oe(),w=A((v=>v.expressPayState.fetchState)),i=A((v=>z(v))),l=A((v=>Yn(v))),m=l.expressPayLocalData?.vendorId,g=i.companyId??S.getSignedInUserTenant(u)?.companyId,[D,I]=p.useState(!1),[C,k]=p.useState(!1),[y,b]=p.useState(!1),P=cn(o.state?.pathnameStackToGoBack),{poppedPathname:x}=P,T=x?.split("/"),V=T?.[T.length-1];p.useEffect((()=>{n===!0?I(!0):(I(!1),document.body.style.overflow="auto")}),[n]),p.useEffect((()=>{a===!0?k(!0):(k(!1),document.body.style.overflow="auto")}),[a]),p.useEffect((()=>{s===!0?b(!0):(b(!1),document.body.style.overflow="auto")}),[s]),p.useEffect((()=>{w==="Not-Started"&&r(Jn(!0,!0))}),[w,r]);const R=Ba(l.vendorViewDetails.bankAccountCreationState?.fetchState);if(p.useEffect((()=>{R==="In-Progress"&&l.vendorViewDetails.bankAccountCreationState?.fetchState==="Completed"&&j()}),[R,l.vendorViewDetails.bankAccountCreationState?.fetchState]),S.getSignedInUser()==null)throw Error("Can't access express pay page without signing in...");const B=v=>{d(v)},j=()=>{I(!1),k(!1),t("../",{relative:"path"})};return e.jsxs(pt,{children:[_e(o)?e.jsx(me,{isAppContentDrawerOpen:c,handleDrawerToggle:B}):null,D===!0?e.jsx(ot,{vendorId:m,closeDrawerHandler:j,isDrawerOpen:D}):null,C===!0?e.jsx(dt,{vendorId:m,closeDrawerHandler:j,isDrawerOpen:C}):null,y===!0?e.jsx(it,{closeDrawerHandler:j,isDrawerOpen:y}):null,e.jsx(qa,{vendorId:m,isExpressPayPage:!0}),e.jsx(mt,{navigate:t,location:o,companyId:g,accountId:V,analytics:_,currentTenant:i,vendorId:m,roleMap:h?.loggedInUserRoleMap,isSettings:_e(o),expressPayDetails:l,onClickMenuIcon:()=>{B(!0)}})]})}const ft={overlayWidth:new K(100,100,58)},ht=({authParams:n,downloadAccountDetailEndPoint:a,isAccountInfoDrawerOpen:s,zeniBankAccountDetail:t,closeDrawerHandler:o})=>{const r=$(),c=M(),d=A((i=>Ze(i))),u=A((i=>z(i)));if(S.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");const h=()=>{o(!0)},w={depositAccount:t,onDismissClick:h,zeniAccountsConfigDetail:d,authParams:n,downloadAccountDetailEndPoint:a,currentTenant:u};return e.jsx(X,{anchor:"right",open:s,PaperProps:{style:{width:ft.overlayWidth.valuePercentage(c),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>h(),children:e.jsx(gt,{onClick:i=>i.stopPropagation(),children:e.jsx(Oa,{...w})})})},gt=O(ee)`
45
+ `,mt=W((function(n,a){const s=M(n),t=S.getSignedInUser(),o=s.tenantId,r={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:o??""},c=a.expressPayDetails,d=n.entityAutoCompleteState.autoCompleteText.common,u=Jn(n,"common");return{expressPayDetails:c,fileProps:{authParams:r,filesEndPoint:`${Se.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:d,entityAutoCompleteView:u},analytics:a.analytics}}),(function(n,a){const{navigate:s}=a;return{onSaveVendor:t=>{n(ia(t,void 0,void 0,!0))},saveVendorDetailLocalData:(t,o)=>{n(Be({vendorId:o,localData:t}))},saveExpressPayLocalData:t=>{n(ra({localData:t}))},onVendorSelected:t=>{t!=null&&n(sa(t,!1))},updateSelectedVendorForCreate:t=>{n(oa(t))},initializeVendorAddress:()=>{n(ta())},resetVendorSaveStatus:t=>{n(aa({vendorId:t}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(t,o)=>{t.trim().length>=2?n(na({searchString:t,entityType:o,searchOrigin:"common"})):t.trim().length===0&&n(Fe("common"))},onCancelAutoComplete:()=>{n(Fe("common"))}},chooseNewVendor:t=>{n(Be({localData:{vendorName:t}}))},onClickAddAccount:t=>{t.method.toLowerCase().indexOf("ach")!==-1?s("./add-ach",{relative:"path"}):t.method.toLowerCase().indexOf("wire")!==-1&&t.method.toLowerCase().indexOf("domestic")!==-1&&s("./add-wire",{relative:"path"})},updateFilesEntity:t=>{n(Je({files:t}))},onDeleteFile:t=>{n(Ke(t))},onEditFileName:(t,o)=>{n(Qe(t,o.split(".")[0]))},onBackClick:t=>{t!=null&&n(Re(t)),n(Re()),n(ea()),n(de()),s("../",{relative:"path"})},onSchedulePayment:()=>{n(Xn())}}}))(Fa);function ie({isAddACHDrawerOpen:n,isAddWireDrawerOpen:a,isAddAddressDrawerOpen:s}){const t=Z(),o=K(),r=U(),[c,d]=p.useState(!1),{tenantEmailDomain:u}=G(),h=oe(),w=A((v=>v.expressPayState.fetchState)),i=A((v=>M(v))),l=A((v=>Qn(v))),m=l.expressPayLocalData?.vendorId,g=i.companyId??S.getSignedInUserTenant(u)?.companyId,[k,I]=p.useState(!1),[C,D]=p.useState(!1),[y,b]=p.useState(!1),P=cn(o.state?.pathnameStackToGoBack),{poppedPathname:x}=P,T=x?.split("/"),V=T?.[T.length-1];p.useEffect((()=>{n===!0?I(!0):(I(!1),document.body.style.overflow="auto")}),[n]),p.useEffect((()=>{a===!0?D(!0):(D(!1),document.body.style.overflow="auto")}),[a]),p.useEffect((()=>{s===!0?b(!0):(b(!1),document.body.style.overflow="auto")}),[s]),p.useEffect((()=>{w==="Not-Started"&&r(Kn(!0,!0))}),[w,r]);const R=Ba(l.vendorViewDetails.bankAccountCreationState?.fetchState);if(p.useEffect((()=>{R==="In-Progress"&&l.vendorViewDetails.bankAccountCreationState?.fetchState==="Completed"&&j()}),[R,l.vendorViewDetails.bankAccountCreationState?.fetchState]),S.getSignedInUser()==null)throw Error("Can't access express pay page without signing in...");const B=v=>{d(v)},j=()=>{I(!1),D(!1),t("../",{relative:"path"})};return e.jsxs(pt,{children:[_e(o)?e.jsx(me,{isAppContentDrawerOpen:c,handleDrawerToggle:B}):null,k===!0?e.jsx(ot,{vendorId:m,closeDrawerHandler:j,isDrawerOpen:k}):null,C===!0?e.jsx(dt,{vendorId:m,closeDrawerHandler:j,isDrawerOpen:C}):null,y===!0?e.jsx(it,{closeDrawerHandler:j,isDrawerOpen:y}):null,e.jsx(qa,{vendorId:m,isExpressPayPage:!0}),e.jsx(mt,{navigate:t,location:o,companyId:g,accountId:V,analytics:_,currentTenant:i,vendorId:m,roleMap:h?.loggedInUserRoleMap,isSettings:_e(o),expressPayDetails:l,onClickMenuIcon:()=>{B(!0)}})]})}const ft={overlayWidth:new J(100,100,58)},ht=({authParams:n,downloadAccountDetailEndPoint:a,isAccountInfoDrawerOpen:s,zeniBankAccountDetail:t,closeDrawerHandler:o})=>{const r=$(),c=z(),d=A((i=>Ze(i))),u=A((i=>M(i)));if(S.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");const h=()=>{o(!0)},w={depositAccount:t,onDismissClick:h,zeniAccountsConfigDetail:d,authParams:n,downloadAccountDetailEndPoint:a,currentTenant:u};return e.jsx(X,{anchor:"right",open:s,PaperProps:{style:{width:ft.overlayWidth.valuePercentage(c),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>h(),children:e.jsx(gt,{onClick:i=>i.stopPropagation(),children:e.jsx(Oa,{...w})})})},gt=O(ee)`
46
46
  display: flex;
47
47
  min-height: 100%;
48
48
  flex-direction: column;
49
- `,yt={overlayWidth:new K(100,100,58)},fn=({isCheckDepositDrawerOpen:n,closeDrawerHandler:a})=>{const s=$(),t=M(),o=U(),r=A((i=>z(i))),c=S.getSignedInUser(),d=r.tenantId,u={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:d??""};if(c==null)throw Error("Can't access check deposit page without signing in...");const h=A((i=>ca(i))),w={analytics:_,checkDeposit:h,filesEndPoint:`${Se.fileMicroServiceBaseUrl}`,authParams:u,onSaveChangesToLocalStore:i=>{o(da(i))},updateFilesEntity:i=>{o(Ke({files:i}))},onAnotherTransferClick:()=>{o(xe())},onDeleteFile:i=>{o(Je(i))},onEditFileName:(i,l)=>{o(Ye(i,l.split(".")[0]))},onCheckDpositClick:()=>{o(la())},onDismissClick:()=>{a(!0),o(xe())}};return e.jsxs(e.Fragment,{children:[e.jsx(pe,{analytics:_,onLoad:i=>(l=>l.trackPageLoaded(Ie.Event.accountsDepositCheckFormViewed))(i)}),e.jsx(X,{anchor:"right",open:n,PaperProps:{style:{width:yt.overlayWidth.valuePercentage(t),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.75,cursor:"pointer"}}},onClose:(i,l)=>(l==="backdropClick"||l==="escapeKeyDown")&&(a(!0),void o(xe())),children:e.jsx(xt,{onClick:i=>i.stopPropagation(),children:e.jsx(La,{...w})})})]})},xt=O(ee)`
49
+ `,yt={overlayWidth:new J(100,100,58)},fn=({isCheckDepositDrawerOpen:n,closeDrawerHandler:a})=>{const s=$(),t=z(),o=U(),r=A((i=>M(i))),c=S.getSignedInUser(),d=r.tenantId,u={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:d??""};if(c==null)throw Error("Can't access check deposit page without signing in...");const h=A((i=>ca(i))),w={analytics:_,checkDeposit:h,filesEndPoint:`${Se.fileMicroServiceBaseUrl}`,authParams:u,onSaveChangesToLocalStore:i=>{o(da(i))},updateFilesEntity:i=>{o(Je({files:i}))},onAnotherTransferClick:()=>{o(xe())},onDeleteFile:i=>{o(Ke(i))},onEditFileName:(i,l)=>{o(Qe(i,l.split(".")[0]))},onCheckDpositClick:()=>{o(la())},onDismissClick:()=>{a(!0),o(xe())}};return e.jsxs(e.Fragment,{children:[e.jsx(pe,{analytics:_,onLoad:i=>(l=>l.trackPageLoaded(Ie.Event.accountsDepositCheckFormViewed))(i)}),e.jsx(X,{anchor:"right",open:n,PaperProps:{style:{width:yt.overlayWidth.valuePercentage(t),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.75,cursor:"pointer"}}},onClose:(i,l)=>(l==="backdropClick"||l==="escapeKeyDown")&&(a(!0),void o(xe())),children:e.jsx(xt,{onClick:i=>i.stopPropagation(),children:e.jsx(La,{...w})})})]})},xt=O(ee)`
50
50
  display: flex;
51
51
  min-height: 100%;
52
52
  flex-direction: column;
53
- `,Ct={overlayWidth:new K(100,100,58)},wt=W((function(n,a){const s=a.currentTenant?.companyId;return{plaidConnectionDetails:fa(n,s,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:Ne(n.depositAccountState,n.depositAccountListState)}}),(function(n,a){return{onReviewClick:()=>n(ga()),clearReviewTransferDetail:()=>n(ha()),onFetchLinkTokenClick:s=>{n(en("external_account",s))},onEstablishConnectionClick:s=>{n(Xe(s,a.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}}))(_a),hn=({isTransferDrawerOpen:n,authParams:a,downloadAccountDetailEndPoint:s,closeDrawerHandler:t,zeniAccountsConfig:o})=>{const r=A((y=>ua(y))),c=A((y=>z(y))),d=$(),u=M(),h=U(),{accountId:w}=G(),[i,l]=p.useState("achTransfer"),[m,g]=p.useState(!1);if(S.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const{useDynamicConfig:D}=N(),{configValue:I}=D(Y.zeniAccountsConfig),C=we(I),k=()=>{t(!0),h(Oe())};return p.useEffect((()=>{r.reviewTransferDetail.fetchState==="Completed"&&g(!0)}),[g,r.reviewTransferDetail.fetchState]),e.jsxs(e.Fragment,{children:[e.jsx(pe,{analytics:_,onLoad:y=>(b=>b.trackPageLoaded(Ie.Event.zeniAccountsTransferFormViewed))(y)}),e.jsx(X,{onClose:()=>{(i==="achTransfer"&&m===!1||i==="achTransfer"&&m&&r.fetchState==="Completed")&&k()},anchor:"right",open:n,PaperProps:{style:{width:Ct.overlayWidth.valuePercentage(u),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(At,{onClick:y=>y.stopPropagation(),children:e.jsx(wt,{analytics:_,transferDetails:r,authParams:a,downloadAccountDetailEndPoint:s,onTransferClick:()=>{_.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"&&o.zeniAccountsConfigDetail.depositProductConfig.depositProducts?.[0].range?.[1]!=null&&r.transferDetailLocalData.amount.amount>o.zeniAccountsConfigDetail.depositProductConfig.depositProducts[0].range[1]),h(ma(w))},onDismissClick:k,onSaveChangesToLocalStore:y=>{h(pa(y))},onAnotherTransferClick:()=>{g(!1),h(Oe())},currentTenant:c,zeniAccountsConfigDetail:o,currentDrawerContent:i,setCurrentDrawerContent:l,showReviewContent:m,setShowReviewContent:g,onBackClick:()=>{},maxInsuredAmount:C.maxInsuredAmount})})})]})},At=O(ee)`
53
+ `,Ct={overlayWidth:new J(100,100,58)},wt=W((function(n,a){const s=a.currentTenant?.companyId;return{plaidConnectionDetails:fa(n,s,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:Ne(n.depositAccountState,n.depositAccountListState)}}),(function(n,a){return{onReviewClick:()=>n(ga()),clearReviewTransferDetail:()=>n(ha()),onFetchLinkTokenClick:s=>{n(en("external_account",s))},onEstablishConnectionClick:s=>{n(Xe(s,a.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}}))(_a),hn=({isTransferDrawerOpen:n,authParams:a,downloadAccountDetailEndPoint:s,closeDrawerHandler:t,zeniAccountsConfig:o})=>{const r=A((y=>ua(y))),c=A((y=>M(y))),d=$(),u=z(),h=U(),{accountId:w}=G(),[i,l]=p.useState("achTransfer"),[m,g]=p.useState(!1);if(S.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const{useDynamicConfig:k}=N(),{configValue:I}=k(Q.zeniAccountsConfig),C=we(I),D=()=>{t(!0),h(Oe())};return p.useEffect((()=>{r.reviewTransferDetail.fetchState==="Completed"&&g(!0)}),[g,r.reviewTransferDetail.fetchState]),e.jsxs(e.Fragment,{children:[e.jsx(pe,{analytics:_,onLoad:y=>(b=>b.trackPageLoaded(Ie.Event.zeniAccountsTransferFormViewed))(y)}),e.jsx(X,{onClose:()=>{(i==="achTransfer"&&m===!1||i==="achTransfer"&&m&&r.fetchState==="Completed")&&D()},anchor:"right",open:n,PaperProps:{style:{width:Ct.overlayWidth.valuePercentage(u),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(At,{onClick:y=>y.stopPropagation(),children:e.jsx(wt,{analytics:_,transferDetails:r,authParams:a,downloadAccountDetailEndPoint:s,onTransferClick:()=>{_.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"&&o.zeniAccountsConfigDetail.depositProductConfig.depositProducts?.[0].range?.[1]!=null&&r.transferDetailLocalData.amount.amount>o.zeniAccountsConfigDetail.depositProductConfig.depositProducts[0].range[1]),h(ma(w))},onDismissClick:D,onSaveChangesToLocalStore:y=>{h(pa(y))},onAnotherTransferClick:()=>{g(!1),h(Oe())},currentTenant:c,zeniAccountsConfigDetail:o,currentDrawerContent:i,setCurrentDrawerContent:l,showReviewContent:m,setShowReviewContent:g,onBackClick:()=>{},maxInsuredAmount:C.maxInsuredAmount})})})]})},At=O(ee)`
54
54
  display: flex;
55
55
  min-height: 100%;
56
56
  flex-direction: column;
57
- `,Dt=O.div`
57
+ `,kt=O.div`
58
58
  display: flex;
59
59
  min-height: 100%;
60
60
  width: 100%;
@@ -62,7 +62,7 @@ import{j as e}from"./liveblocks-tpE-grBU.js";import{u as U,h as Z,i as G,j as A,
62
62
  flex-direction: column;
63
63
  align-items: center;
64
64
  background-color: ${n=>n.theme.colors.grey4};
65
- `,kt=W((function(n,a){return{zeniAccountListView:nn(n),isExpressPayEnabled:a.isExpressPayEnabled,analytics:a.analytics}}),(function(n,a){const{navigate:s,currentTenant:t,location:o,companyId:r,handleDrawerToggle:c,analytics:d,isBillPayEnabled:u,isCashManagementFeatureEnabled:h,isDebitCardFeatureEnabled:w}=a,{tenantEmailDomain:i}=t;return{onZeniAccountClick:(l,m)=>{d.trackAccountsListPageClicked("Accounts Row Item Click",m,"active");const g=St(i,l),D=le(o.state?.pathnameStackToGoBack,o.pathname);s(g,{state:{pathnameStackToGoBack:D}})},onSettingsClick:()=>{d.trackAccountsListPageClicked("Settings Icon"),s("setup")},onReloadTransactions:()=>{n(an(!1))},handleMoveMoneyOptionSelection:(l,m)=>{let g="page-not-found";l==="sendMoney"&&(g=Cn(i)),l==="payBill"?g=gn(t,u,w):l==="transfer"?(g=yn(i),m!=null&&n(on(m))):l==="checkDeposit"&&(g=xn(i));const D=le(o.state?.pathnameStackToGoBack,o.pathname);s(g,{state:{pathnameStackToGoBack:D}})},unlinkPaymentAccount:(l,m)=>{d.trackAccountsListPageClicked("Unlink Account",m),n(wa(l))},onFetchLinkTokenClick:(l,m)=>{n(en("external_account",l,m))},onUpdatePaymentAccountStatus:(l,m,g)=>{n(Ca(l,m,"zeni_accounts","external_account",g))},onEstablishConnectionClick:l=>{n(Xe(l,r,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:l=>{n(xa(l))},onClickMenuIcon:()=>{c(!0)},onTreasuryGetStartedClick:()=>{s("../../treasury/promo")},onAutoTransferClick:l=>{const m=h?"./cash_management/auto-transfer":"./auto-transfer";l?s(m,{state:{...o.state,scrollToAddRule:!0}}):s(m)},onCashManagementClick:()=>{s(It(i))}}}))(Ma);function Ce({isTransferDrawerOpen:n,isCheckDepositDrawerOpen:a}){const s=J(),t=Z(),o=U(),r=M(),{tenantEmailDomain:c}=G(),{useDynamicConfig:d,useFeatureGate:u}=N(),h=$(),{configValue:w}=d(Y.zeniAccountsConfig),{isFeatureEnabled:i}=u(F.isTreasuryEnabled),{isFeatureEnabled:l}=u(F.isDebitCardFeatureEnabled),{isFeatureEnabled:m}=u(F.isAutoTransferRuleEnabled),{isFeatureEnabled:g}=u(F.isCheckingCommentingEnabled),{isFeatureEnabled:D}=u(F.isCashManagementFeatureEnabled),I=we(w),C=A((L=>z(L))),k=C.companyId??S.getSignedInUserTenant(c)?.companyId,{configValue:y}=d(Y.expressPayConfig),b=y.is_enable_all_tenants===!0||y.tenant_ids!=null&&y.tenant_ids.includes(C.tenantId),[P,x]=p.useState(!1),[T,V]=p.useState(!1),[R,B]=p.useState(!1),[j,v]=p.useState(!1),E=A((L=>nn(L))),ne=E.fetchState,fe=A((L=>He(L))),se=fe?.fetchState??"Not-Started",ae=!!C.companyZeniAccountInfo?.info?.isZeniAccountEnabled,q=oe(),be=!!C.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,wn=!!C.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,An=te(q?.loggedInUserRoleMap),Dn=Ae(q?.loggedInUserRoleMap),kn=!!C.companyBillPayInfo?.info?.isBillPayEnabled,je=S.getSignedInUser(),Sn={userId:je?.userId??"",sessionId:je?.zeniSessionId??"",tenantId:C.tenantId??""},In=`${ke}/account_details`,{areTenantIdsInSync:ve}=Ua();p.useEffect((()=>{!P&&ve&&(x(!0),o(an(!1)))}),[P,o,ne,ve]),p.useEffect((()=>{!T&&se==="Not-Started"&&k&&(V(!0),o(Ge(!0)))}),[T,se,k,o]),p.useEffect((()=>{n!=null&&n===!0?B(!0):(B(!1),document.body.style.overflow="auto")}),[n]),p.useEffect((()=>{v(a!=null&&a===!0)}),[a]);const Ee=()=>{B(!1),t("..")},[bn,jn]=p.useState(!1),Pe=L=>{jn(L)},{isAiCfoAccessEnabled:vn,onAskAiCfoClick:En}=pn({mobileExploreReferrer:"Checking Accounts"});ln({isDataReady:ne==="Completed"});const Pn=dn(),Tn=C.company!=null&&We(C.company),he=(i&&Tn)===!0&&!wn,[Rn,Bn]=p.useState(!1),ge=A((L=>L.treasurySetupViewState.treasuryFundsDetails)),Fn=ge.fundsDetails,On=za(Fn);p.useEffect((()=>{he!==!0||Rn||ge?.fetchStatus.fetchState!=="Not-Started"||(Bn(!0),o(ya()))}),[ge.fetchStatus,o]);const Ln=tn(C),_n=De(l,C);return Ln===!0&&_n!==!0?e.jsx(un,{}):ae?e.jsxs(e.Fragment,{children:[E.fetchState==="Completed"&&R===!1&&j===!1?e.jsx(pe,{analytics:_,onLoad:L=>(Te=>{Te.trackAccountsListPageViewed(E.depositAccountsSelectorView.depositAccounts.length,E.externalAccountsSelectorView.paymentAccounts.length,Ue(E.summary?.totalBalance.available.amount??0),Ue(E.summary?.totalInterest.available.amount??0),E.zeniAccountsConfig.zeniAccountsConfigDetail.annualPercentageYield),he&&Te.trackTreasuryPromoView("Checking Promo Banner")})(L)}):null,R===!0?e.jsx(hn,{closeDrawerHandler:Ee,isTransferDrawerOpen:R,zeniAccountsConfig:E.zeniAccountsConfig,authParams:Sn,downloadAccountDetailEndPoint:In}):null,j===!0?e.jsx(fn,{closeDrawerHandler:Ee,isCheckDepositDrawerOpen:j}):null,e.jsxs(Dt,{windowSize:r,children:[e.jsx(me,{isAppContentDrawerOpen:bn,handleDrawerToggle:Pe}),e.jsx(kt,{zeniBankListView:E,navigate:t,currentTenant:C,location:s,companyId:k,analytics:_,cashManagementBannerProps:Pn,maxInsuredAmount:I.maxInsuredAmount,isExpressPayEnabled:b,isBillPayEnabled:kn,isCashManagementFeatureEnabled:D,isCheckingCommentingEnabled:g,isDebitCardFeatureEnabled:l,isAutoTransferRuleEnabled:m,handleDrawerToggle:Pe,showTreasuryPromo:he,treasuryYieldPercentage:On,treasuryInsuredAmount:5e5,isAiCfoAccessEnabled:vn,onAskAiCfoClick:En})]})]}):be&&An?e.jsx(Q,{to:"../setup"}):C.companyZeniAccountInfo?.info&&!be&&Dn?e.jsx(Q,{to:"../promo",state:s.state}):e.jsx(ue,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}})}const gn=(n,a,s)=>{const t=De(s,n),{tenantEmailDomain:o}=n;return t===!0||a===!1?`/${o}/bills`:`/${o}/bill/new`},St=(n,a)=>`/${n}/checking/${a}`,yn=(n,a)=>a==null?`/${n}/checking/transfer`:`/${n}/checking/${a}/transfer`,xn=(n,a)=>a==null?`/${n}/checking/check-deposit`:`/${n}/checking/${a}/check-deposit`,Cn=n=>`/${n}/checking/express-pay`,It=n=>`/${n}/checking/cash_management`,bt=O.div`
65
+ `,Dt=W((function(n,a){return{zeniAccountListView:nn(n),isExpressPayEnabled:a.isExpressPayEnabled,analytics:a.analytics}}),(function(n,a){const{navigate:s,currentTenant:t,location:o,companyId:r,handleDrawerToggle:c,analytics:d,isBillPayEnabled:u,isCashManagementFeatureEnabled:h,isDebitCardFeatureEnabled:w}=a,{tenantEmailDomain:i}=t;return{onZeniAccountClick:(l,m)=>{d.trackAccountsListPageClicked("Accounts Row Item Click",m,"active");const g=St(i,l),k=le(o.state?.pathnameStackToGoBack,o.pathname);s(g,{state:{pathnameStackToGoBack:k}})},onSettingsClick:()=>{d.trackAccountsListPageClicked("Settings Icon"),s("setup")},onReloadTransactions:()=>{n(an(!1))},handleMoveMoneyOptionSelection:(l,m)=>{let g="page-not-found";l==="sendMoney"&&(g=Cn(i)),l==="payBill"?g=gn(t,u,w):l==="transfer"?(g=yn(i),m!=null&&n(on(m))):l==="checkDeposit"&&(g=xn(i));const k=le(o.state?.pathnameStackToGoBack,o.pathname);s(g,{state:{pathnameStackToGoBack:k}})},unlinkPaymentAccount:(l,m)=>{d.trackAccountsListPageClicked("Unlink Account",m),n(wa(l))},onFetchLinkTokenClick:(l,m)=>{n(en("external_account",l,m))},onUpdatePaymentAccountStatus:(l,m,g)=>{n(Ca(l,m,"zeni_accounts","external_account",g))},onEstablishConnectionClick:l=>{n(Xe(l,r,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:l=>{n(xa(l))},onClickMenuIcon:()=>{c(!0)},onTreasuryGetStartedClick:()=>{s("../../treasury/promo")},onAutoTransferClick:l=>{const m=h?"./cash_management/auto-transfer":"./auto-transfer";l?s(m,{state:{...o.state,scrollToAddRule:!0}}):s(m)},onCashManagementClick:()=>{s(It(i))}}}))(za);function Ce({isTransferDrawerOpen:n,isCheckDepositDrawerOpen:a}){const s=K(),t=Z(),o=U(),r=z(),{tenantEmailDomain:c}=G(),{useDynamicConfig:d,useFeatureGate:u}=N(),h=$(),{configValue:w}=d(Q.zeniAccountsConfig),{isFeatureEnabled:i}=u(F.isTreasuryEnabled),{isFeatureEnabled:l}=u(F.isDebitCardFeatureEnabled),{isFeatureEnabled:m}=u(F.isAutoTransferRuleEnabled),{isFeatureEnabled:g}=u(F.isCheckingCommentingEnabled),{isFeatureEnabled:k}=u(F.isCashManagementFeatureEnabled),I=we(w),C=A((L=>M(L))),D=C.companyId??S.getSignedInUserTenant(c)?.companyId,{configValue:y}=d(Q.expressPayConfig),b=y.is_enable_all_tenants===!0||y.tenant_ids!=null&&y.tenant_ids.includes(C.tenantId),[P,x]=p.useState(!1),[T,V]=p.useState(!1),[R,B]=p.useState(!1),[j,v]=p.useState(!1),E=A((L=>nn(L))),ne=E.fetchState,fe=A((L=>He(L))),se=fe?.fetchState??"Not-Started",ae=!!C.companyZeniAccountInfo?.info?.isZeniAccountEnabled,q=oe(),be=!!C.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,wn=!!C.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,An=te(q?.loggedInUserRoleMap),kn=Ae(q?.loggedInUserRoleMap),Dn=!!C.companyBillPayInfo?.info?.isBillPayEnabled,je=S.getSignedInUser(),Sn={userId:je?.userId??"",sessionId:je?.zeniSessionId??"",tenantId:C.tenantId??""},In=`${De}/account_details`,{areTenantIdsInSync:ve}=Ua();p.useEffect((()=>{!P&&ve&&(x(!0),o(an(!1)))}),[P,o,ne,ve]),p.useEffect((()=>{!T&&se==="Not-Started"&&D&&(V(!0),o(Ge(!0)))}),[T,se,D,o]),p.useEffect((()=>{n!=null&&n===!0?B(!0):(B(!1),document.body.style.overflow="auto")}),[n]),p.useEffect((()=>{v(a!=null&&a===!0)}),[a]);const Ee=()=>{B(!1),t("..")},[bn,jn]=p.useState(!1),Pe=L=>{jn(L)},{isAiCfoAccessEnabled:vn,onAskAiCfoClick:En}=pn({mobileExploreReferrer:"Checking Accounts"});ln({isDataReady:ne==="Completed"});const Pn=dn(),Tn=C.company!=null&&We(C.company),he=(i&&Tn)===!0&&!wn,[Rn,Bn]=p.useState(!1),ge=A((L=>L.treasurySetupViewState.treasuryFundsDetails)),Fn=ge.fundsDetails,On=Ma(Fn);p.useEffect((()=>{he!==!0||Rn||ge?.fetchStatus.fetchState!=="Not-Started"||(Bn(!0),o(ya()))}),[ge.fetchStatus,o]);const Ln=tn(C),_n=ke(l,C);return Ln===!0&&_n!==!0?e.jsx(un,{}):ae?e.jsxs(e.Fragment,{children:[E.fetchState==="Completed"&&R===!1&&j===!1?e.jsx(pe,{analytics:_,onLoad:L=>(Te=>{Te.trackAccountsListPageViewed(E.depositAccountsSelectorView.depositAccounts.length,E.externalAccountsSelectorView.paymentAccounts.length,Ue(E.summary?.totalBalance.available.amount??0),Ue(E.summary?.totalInterest.available.amount??0),E.zeniAccountsConfig.zeniAccountsConfigDetail.annualPercentageYield),he&&Te.trackTreasuryPromoView("Checking Promo Banner")})(L)}):null,R===!0?e.jsx(hn,{closeDrawerHandler:Ee,isTransferDrawerOpen:R,zeniAccountsConfig:E.zeniAccountsConfig,authParams:Sn,downloadAccountDetailEndPoint:In}):null,j===!0?e.jsx(fn,{closeDrawerHandler:Ee,isCheckDepositDrawerOpen:j}):null,e.jsxs(kt,{windowSize:r,children:[e.jsx(me,{isAppContentDrawerOpen:bn,handleDrawerToggle:Pe}),e.jsx(Dt,{zeniBankListView:E,navigate:t,currentTenant:C,location:s,companyId:D,analytics:_,cashManagementBannerProps:Pn,maxInsuredAmount:I.maxInsuredAmount,isExpressPayEnabled:b,isBillPayEnabled:Dn,isCashManagementFeatureEnabled:k,isCheckingCommentingEnabled:g,isDebitCardFeatureEnabled:l,isAutoTransferRuleEnabled:m,handleDrawerToggle:Pe,showTreasuryPromo:he,treasuryYieldPercentage:On,treasuryInsuredAmount:5e5,isAiCfoAccessEnabled:vn,onAskAiCfoClick:En})]})]}):be&&An?e.jsx(Y,{to:"../setup"}):C.companyZeniAccountInfo?.info&&!be&&kn?e.jsx(Y,{to:"../promo",state:s.state}):e.jsx(ue,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}})}const gn=(n,a,s)=>{const t=ke(s,n),{tenantEmailDomain:o}=n;return t===!0||a===!1?`/${o}/bills`:`/${o}/bill/new`},St=(n,a)=>`/${n}/checking/${a}`,yn=(n,a)=>a==null?`/${n}/checking/transfer`:`/${n}/checking/${a}/transfer`,xn=(n,a)=>a==null?`/${n}/checking/check-deposit`:`/${n}/checking/${a}/check-deposit`,Cn=n=>`/${n}/checking/express-pay`,It=n=>`/${n}/checking/cash_management`,bt=O.div`
66
66
  display: flex;
67
67
  width: 100%;
68
68
  flex: 1 1 auto;
@@ -70,4 +70,4 @@ import{j as e}from"./liveblocks-tpE-grBU.js";import{u as U,h as Z,i as G,j as A,
70
70
  align-items: center;
71
71
  min-height: 100vh;
72
72
  background-color: ${n=>n.theme.colors.grey4};
73
- `,jt=W((function(n,a){const{currentTenant:s}=a,t=sn(n,a.accountId),o=S.getSignedInUser(),r=n.tenantState.currentTenantId,c={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:r??""},d=t.accountDetail?.id??"";return{currentTenantCompanyName:s.companyName??"",authParams:c,downloadEndPoint:`${Se.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${d}`,zeniAccountDetail:t,isExpressPayEnabled:a.isExpressPayEnabled,fetchState:t.fetchState}}),(function(n,a){const{navigate:s,currentTenant:t,location:o,accountId:r}=a,{tenantEmailDomain:c}=t;return{handleMoveMoneyOptionSelection:(d,u)=>{let h="page-not-found";d==="sendMoney"?h=Cn(c):d==="payBill"?h=gn(t,a.isBillPayEnabled,a.isDebitCardFeatureEnabled):d==="transfer"?(h=yn(c,r),u!=null&&n(on(u))):d==="checkDeposit"?(h=xn(c,r),u!=null&&n(Aa(u))):d==="accountStatement"&&(h=Et(c,r));const w=le(o.state?.pathnameStackToGoBack,o.pathname);s(h,{state:{pathnameStackToGoBack:w}})},onAccountDetailClick:()=>{const d=vt(c,r),u=le(o.state?.pathnameStackToGoBack,o.pathname);s(d,{state:{pathnameStackToGoBack:u}})},onEditNameClick:d=>{n(Le(r,"editName",d))},onReloadZeniAccountDetailPage:()=>{n(rn(r,!1))},onCloseAccountClick:()=>{n(Le(r,"closeAccount",""))},onBackClick:()=>{s("../",{relative:"path"})}}}))($a);function ce({isTransferDrawerOpen:n,isCheckDepositDrawerOpen:a,isAccountInfoDrawerOpen:s}){const t=J(),o=Z(),r=U(),c=M(),{tenantEmailDomain:d,accountId:u}=G(),{useDynamicConfig:h}=N(),{useFeatureGate:w}=N(),{isFeatureEnabled:i}=w(F.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=w(F.isCheckingCommentingEnabled),m=A((q=>z(q))),{configValue:g}=h(Y.expressPayConfig),D=g.is_enable_all_tenants===!0||g.tenant_ids!=null&&g.tenant_ids.includes(m.tenantId),I=!!m.companyBillPayInfo?.info?.isBillPayEnabled,C=S.getSignedInUser(),k=m.companyId??S.getSignedInUserTenant(d)?.companyId,y={userId:C?.userId??"",sessionId:C?.zeniSessionId??"",tenantId:m.tenantId??""},b=`${ke}/account_details`,[P,x]=p.useState(!1),[T,V]=p.useState(!1),[R,B]=p.useState(!1),[j,v]=p.useState(!1),E=A((q=>sn(q,u??""))),ne=E.fetchState,{isAiCfoAccessEnabled:fe,onAskAiCfoClick:se}=pn({mobileExploreReferrer:"Checking Account Detail"});ln({isDataReady:ne==="Completed"}),p.useEffect((()=>{P||(r(rn(u??"",!1)),x(!0))}),[P,r,ne]),p.useEffect((()=>{v(s!=null&&s===!0)}),[s]),p.useEffect((()=>{n!=null&&n===!0?V(!0):(V(!1),document.body.style.overflow="auto")}),[n]),p.useEffect((()=>{B(a!=null&&a===!0)}),[a]);const ae=()=>{v(!1),o("..")};return e.jsxs(e.Fragment,{children:[j===!0&&E.accountDetail!=null?e.jsx(ht,{authParams:y,downloadAccountDetailEndPoint:b,closeDrawerHandler:ae,isAccountInfoDrawerOpen:j,zeniBankAccountDetail:E.accountDetail}):null,T===!0?e.jsx(hn,{closeDrawerHandler:ae,isTransferDrawerOpen:T,zeniAccountsConfig:E.zeniAccountsConfig,authParams:y,downloadAccountDetailEndPoint:b}):null,R===!0?e.jsx(fn,{closeDrawerHandler:ae,isCheckDepositDrawerOpen:R}):null,e.jsx(bt,{windowSize:c,children:e.jsx(jt,{navigate:o,currentTenant:m,location:t,companyId:k,isDebitCardFeatureEnabled:i,accountId:u??"",isBillPayEnabled:I,isCheckingCommentingEnabled:l,isExpressPayEnabled:D,isAiCfoAccessEnabled:fe,onAskAiCfoClick:se})})]})}const vt=(n,a)=>`/${n}/checking/${a}/account-info`,Et=(n,a)=>`/${n}/checking/${a}/statements`,Pt=W((function(n,a){const{companyId:s}=a;return{zeniAccountSetupView:Da(n,s),meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true"}}),(function(n,a){const{navigate:s,companyId:t}=a;return{onSetupButtonClick:()=>{_.trackAccountsPromoPageClicked("Setup Accounts"),n(ka(t))},onBackClick:()=>{s("../..",{relative:"path"})},onSetupZeniAccountSuccess:()=>{s("../setup",{relative:"path"})}}}))(Ha),Tt=()=>{const n=Z(),a=J(),{tenantEmailDomain:s}=G(),{useDynamicConfig:t}=N(),o=$(),[r,c]=p.useState(!1),[d,u]=p.useState(!1),h=A((y=>z(y))),{configValue:w}=t(Y.zeniAccountsConfig),i=we(w);p.useEffect((()=>{d===!1&&a.state?.message==="activation"&&u(!0)}),[a.state]);const l=S.getSignedInUserTenant(s)?.companyId??h.companyId,m=S.getSignedInUser(),g=!!h.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,D=y=>{c(y)};if(m==null)throw Error("Can't access Zeni account promo page without signing in...");const I=oe(),C=te(I?.loggedInUserRoleMap),k=Ae(I?.loggedInUserRoleMap);if(g&&C)return e.jsx(Q,{to:"../../checking/setup"});if(h.company?.companyZeniAccountInfo&&(!g&&C||k)){if(a.state?.message==="activation"){const y=cn(a.state?.pathnameStackToGoBack);n(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:y.newStack}})}return e.jsxs(e.Fragment,{children:[e.jsx(Va,{showConfetti:d}),e.jsx(pe,{analytics:_,onLoad:y=>(b=>b.trackPageLoaded(Ie.Event.accountsPromoPageViewed))(y)}),e.jsx(me,{isAppContentDrawerOpen:r,handleDrawerToggle:D}),e.jsx(Pt,{analytics:_,navigate:n,companyId:l,onClickMenuIcon:()=>{D(!0)},maxAnnualPercentageYield:i.maxAnnualPercentageYield,maxInsuredAmount:i.maxInsuredAmount,exampleBankBalance:3e6})]})}return e.jsx(ue,{fetchState:"In-Progress",style:{backgroundColor:o.colors.grey5}})};function ro(){const n=J(),a=A((v=>z(v))),s=$(),{useFeatureGate:t,useDynamicConfig:o}=N(),r=oe(),c=te(r?.loggedInUserRoleMap),d=Ae(r?.loggedInUserRoleMap),u=!!a.company?.companyZeniAccountInfo?.isZeniAccountEnabled,h=!!a.company?.companyZeniAccountInfo?.isZeniAccountTOSAccepted,{isFeatureEnabled:w}=t(F.isChargeCardFeatureEnabled),{isFeatureEnabled:i}=t(F.isDebitCardFeatureEnabled),l=tn(a),m=De(i,a),g=a?.userRole!=null&&Sa(a?.userRole),D=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!g)&&Ia(r?.loggedInUserRoleMap),I=ba(r?.loggedInUserRoleMap),C=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!g)&&ja(r?.loggedInUserRoleMap),k=!!a.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!g,{configValue:y}=o(Y.expressPayConfig),b=y.is_enable_all_tenants===!0||y.tenant_ids!=null&&y.tenant_ids.includes(a.tenantId),{isFeatureEnabled:P}=t(F.isAutoTransferRuleEnabled),x=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified"&&!g,{isFeatureEnabled:T}=t(F.isCashManagementFeatureEnabled),V=Na(a,w,i)&&!g&&va(r?.loggedInUserRoleMap),R=Ea(r?.loggedInUserRoleMap),B=k&&te(r?.loggedInUserRoleMap),j=B||qe(r?.loggedInUserRoleMap);return e.jsxs($e,{children:[e.jsx(f,{path:"setup",element:e.jsx(ze,{isBillPayAdminLevelAccess:D,isUserHasOnlyBillPayAccess:I,isReimbursementAdminLevelAccess:C,isZeniAccountAdminLevelAccess:B,isChargeCardAdminLevelAccess:V,isUserHasOnlyCardAccess:R,productType:"zeni_accounts",type:"setup"})}),e.jsx(f,{path:"verification",element:e.jsx(ze,{isBillPayAdminLevelAccess:D,isUserHasOnlyBillPayAccess:I,isReimbursementAdminLevelAccess:C,isZeniAccountAdminLevelAccess:B,isChargeCardAdminLevelAccess:V,isUserHasOnlyCardAccess:R,productType:"zeni_accounts",type:"verification"})}),P?e.jsxs(e.Fragment,{children:[e.jsx(f,{path:"auto-transfer",element:e.jsx(Me,{})}),j?e.jsx(f,{path:"auto-transfer/:ruleId/edit",element:e.jsx(Me,{isEditDrawerOpen:!0})}):null]}):e.jsx(f,{path:"auto-transfer",element:e.jsx(H,{})}),T&&u&&x?e.jsxs(e.Fragment,{children:[e.jsx(f,{path:"cash_management",element:e.jsx(re,{})}),P?e.jsxs(e.Fragment,{children:[e.jsx(f,{path:"cash_management/auto-transfer",element:e.jsx(re,{isAutoTransferRulesTabActive:!0})}),j?e.jsxs(e.Fragment,{children:[e.jsx(f,{path:"cash_management/auto-transfer/:ruleId/edit",element:e.jsx(re,{isAutoTransferRulesTabActive:!0,isEditDrawerOpen:!0})}),e.jsx(f,{path:"cash_management/:ruleId/edit",element:e.jsx(re,{isAutoTransferRulesTabActive:!0,isEditDrawerOpen:!0})})]}):null]}):e.jsx(f,{path:"cash_management/auto-transfer",element:e.jsx(H,{})}),e.jsx(f,{path:"cash_management/auto_sweep",element:e.jsx(Xa,{})})]}):e.jsxs(e.Fragment,{children:[e.jsx(f,{path:"cash_management",element:e.jsx(H,{})}),e.jsx(f,{path:"cash_management/auto-transfer",element:e.jsx(H,{})}),e.jsx(f,{path:"cash_management/auto_sweep",element:e.jsx(H,{})})]}),b&&c?e.jsxs(e.Fragment,{children:[e.jsx(f,{path:"express-pay",element:e.jsx(ie,{})}),e.jsx(f,{path:"express-pay/add-ach",element:e.jsx(ie,{isAddACHDrawerOpen:!0})}),e.jsx(f,{path:"express-pay/add-wire/add-address",element:e.jsx(ie,{isAddAddressDrawerOpen:!0})}),e.jsx(f,{path:"express-pay/add-wire",element:e.jsx(ie,{isAddWireDrawerOpen:!0})})]}):e.jsx(f,{path:"express-pay",element:e.jsx(H,{})}),e.jsx(f,{path:"promo",element:e.jsx(Tt,{})}),l&&!m?e.jsx(f,{path:"/*",element:e.jsx(un,{})}):u?e.jsxs(e.Fragment,{children:[e.jsx(f,{path:"/",element:e.jsx(Ce,{})}),e.jsx(f,{path:"transfer",element:e.jsx(Ce,{isTransferDrawerOpen:!0})}),e.jsx(f,{path:"check-deposit",element:e.jsx(Ce,{isCheckDepositDrawerOpen:!0})}),e.jsx(f,{path:":accountId/*",element:e.jsx(Rt,{})}),e.jsx(f,{path:"*",element:e.jsx(H,{})})]}):h&&c?e.jsx(f,{path:"*",element:e.jsx(Q,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&d?e.jsx(f,{path:"*",element:e.jsx(Q,{to:"../promo",state:n.state})}):e.jsx(f,{path:"*",element:e.jsx(ue,{fetchState:"In-Progress",style:{backgroundColor:s.colors.grey5,boxShadow:`0px 2px ${Za.sp1} ${s.colors.dropShadowNormal}`}})})]})}function Rt(){return e.jsxs($e,{children:[e.jsx(f,{path:"/",element:e.jsx(ce,{})}),e.jsx(f,{path:"account-info",element:e.jsx(ce,{isAccountInfoDrawerOpen:!0})}),e.jsx(f,{path:"transfer",element:e.jsx(ce,{isTransferDrawerOpen:!0})}),e.jsx(f,{path:"check-deposit",element:e.jsx(ce,{isCheckDepositDrawerOpen:!0})}),e.jsx(f,{path:"statements",element:e.jsx(Ya,{})}),e.jsx(f,{path:"*",element:e.jsx(H,{})})]})}export{ro as default};
73
+ `,jt=W((function(n,a){const{currentTenant:s}=a,t=sn(n,a.accountId),o=S.getSignedInUser(),r=n.tenantState.currentTenantId,c={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:r??""},d=t.accountDetail?.id??"";return{currentTenantCompanyName:s.companyName??"",authParams:c,downloadEndPoint:`${Se.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${d}`,zeniAccountDetail:t,isExpressPayEnabled:a.isExpressPayEnabled,fetchState:t.fetchState}}),(function(n,a){const{navigate:s,currentTenant:t,location:o,accountId:r}=a,{tenantEmailDomain:c}=t;return{handleMoveMoneyOptionSelection:(d,u)=>{let h="page-not-found";d==="sendMoney"?h=Cn(c):d==="payBill"?h=gn(t,a.isBillPayEnabled,a.isDebitCardFeatureEnabled):d==="transfer"?(h=yn(c,r),u!=null&&n(on(u))):d==="checkDeposit"?(h=xn(c,r),u!=null&&n(Aa(u))):d==="accountStatement"&&(h=Et(c,r));const w=le(o.state?.pathnameStackToGoBack,o.pathname);s(h,{state:{pathnameStackToGoBack:w}})},onAccountDetailClick:()=>{const d=vt(c,r),u=le(o.state?.pathnameStackToGoBack,o.pathname);s(d,{state:{pathnameStackToGoBack:u}})},onEditNameClick:d=>{n(Le(r,"editName",d))},onReloadZeniAccountDetailPage:()=>{n(rn(r,!1))},onCloseAccountClick:()=>{n(Le(r,"closeAccount",""))},onBackClick:()=>{s("../",{relative:"path"})}}}))($a);function ce({isTransferDrawerOpen:n,isCheckDepositDrawerOpen:a,isAccountInfoDrawerOpen:s}){const t=K(),o=Z(),r=U(),c=z(),{tenantEmailDomain:d,accountId:u}=G(),{useDynamicConfig:h}=N(),{useFeatureGate:w}=N(),{isFeatureEnabled:i}=w(F.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=w(F.isCheckingCommentingEnabled),m=A((q=>M(q))),{configValue:g}=h(Q.expressPayConfig),k=g.is_enable_all_tenants===!0||g.tenant_ids!=null&&g.tenant_ids.includes(m.tenantId),I=!!m.companyBillPayInfo?.info?.isBillPayEnabled,C=S.getSignedInUser(),D=m.companyId??S.getSignedInUserTenant(d)?.companyId,y={userId:C?.userId??"",sessionId:C?.zeniSessionId??"",tenantId:m.tenantId??""},b=`${De}/account_details`,[P,x]=p.useState(!1),[T,V]=p.useState(!1),[R,B]=p.useState(!1),[j,v]=p.useState(!1),E=A((q=>sn(q,u??""))),ne=E.fetchState,{isAiCfoAccessEnabled:fe,onAskAiCfoClick:se}=pn({mobileExploreReferrer:"Checking Account Detail"});ln({isDataReady:ne==="Completed"}),p.useEffect((()=>{P||(r(rn(u??"",!1)),x(!0))}),[P,r,ne]),p.useEffect((()=>{v(s!=null&&s===!0)}),[s]),p.useEffect((()=>{n!=null&&n===!0?V(!0):(V(!1),document.body.style.overflow="auto")}),[n]),p.useEffect((()=>{B(a!=null&&a===!0)}),[a]);const ae=()=>{v(!1),o("..")};return e.jsxs(e.Fragment,{children:[j===!0&&E.accountDetail!=null?e.jsx(ht,{authParams:y,downloadAccountDetailEndPoint:b,closeDrawerHandler:ae,isAccountInfoDrawerOpen:j,zeniBankAccountDetail:E.accountDetail}):null,T===!0?e.jsx(hn,{closeDrawerHandler:ae,isTransferDrawerOpen:T,zeniAccountsConfig:E.zeniAccountsConfig,authParams:y,downloadAccountDetailEndPoint:b}):null,R===!0?e.jsx(fn,{closeDrawerHandler:ae,isCheckDepositDrawerOpen:R}):null,e.jsx(bt,{windowSize:c,children:e.jsx(jt,{navigate:o,currentTenant:m,location:t,companyId:D,isDebitCardFeatureEnabled:i,accountId:u??"",isBillPayEnabled:I,isCheckingCommentingEnabled:l,isExpressPayEnabled:k,isAiCfoAccessEnabled:fe,onAskAiCfoClick:se})})]})}const vt=(n,a)=>`/${n}/checking/${a}/account-info`,Et=(n,a)=>`/${n}/checking/${a}/statements`,Pt=W((function(n,a){const{companyId:s}=a;return{zeniAccountSetupView:ka(n,s),meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true"}}),(function(n,a){const{navigate:s,companyId:t}=a;return{onSetupButtonClick:()=>{_.trackAccountsPromoPageClicked("Setup Accounts"),n(Da(t))},onBackClick:()=>{s("../..",{relative:"path"})},onSetupZeniAccountSuccess:()=>{s("../setup",{relative:"path"})}}}))(Ha),Tt=()=>{const n=Z(),a=K(),{tenantEmailDomain:s}=G(),{useDynamicConfig:t}=N(),o=$(),[r,c]=p.useState(!1),[d,u]=p.useState(!1),h=A((y=>M(y))),{configValue:w}=t(Q.zeniAccountsConfig),i=we(w);p.useEffect((()=>{d===!1&&a.state?.message==="activation"&&u(!0)}),[a.state]);const l=S.getSignedInUserTenant(s)?.companyId??h.companyId,m=S.getSignedInUser(),g=!!h.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,k=y=>{c(y)};if(m==null)throw Error("Can't access Zeni account promo page without signing in...");const I=oe(),C=te(I?.loggedInUserRoleMap),D=Ae(I?.loggedInUserRoleMap);if(g&&C)return e.jsx(Y,{to:"../../checking/setup"});if(h.company?.companyZeniAccountInfo&&(!g&&C||D)){if(a.state?.message==="activation"){const y=cn(a.state?.pathnameStackToGoBack);n(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:y.newStack}})}return e.jsxs(e.Fragment,{children:[e.jsx(Va,{showConfetti:d}),e.jsx(pe,{analytics:_,onLoad:y=>(b=>b.trackPageLoaded(Ie.Event.accountsPromoPageViewed))(y)}),e.jsx(me,{isAppContentDrawerOpen:r,handleDrawerToggle:k}),e.jsx(Pt,{analytics:_,navigate:n,companyId:l,onClickMenuIcon:()=>{k(!0)},maxAnnualPercentageYield:i.maxAnnualPercentageYield,maxInsuredAmount:i.maxInsuredAmount,exampleBankBalance:3e6})]})}return e.jsx(ue,{fetchState:"In-Progress",style:{backgroundColor:o.colors.grey5}})};function ro(){const n=K(),a=A((v=>M(v))),s=$(),{useFeatureGate:t,useDynamicConfig:o}=N(),r=oe(),c=te(r?.loggedInUserRoleMap),d=Ae(r?.loggedInUserRoleMap),u=!!a.company?.companyZeniAccountInfo?.isZeniAccountEnabled,h=!!a.company?.companyZeniAccountInfo?.isZeniAccountTOSAccepted,{isFeatureEnabled:w}=t(F.isChargeCardFeatureEnabled),{isFeatureEnabled:i}=t(F.isDebitCardFeatureEnabled),l=tn(a),m=ke(i,a),g=a?.userRole!=null&&Sa(a?.userRole),k=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!g)&&Ia(r?.loggedInUserRoleMap),I=ba(r?.loggedInUserRoleMap),C=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!g)&&ja(r?.loggedInUserRoleMap),D=!!a.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!g,{configValue:y}=o(Q.expressPayConfig),b=y.is_enable_all_tenants===!0||y.tenant_ids!=null&&y.tenant_ids.includes(a.tenantId),{isFeatureEnabled:P}=t(F.isAutoTransferRuleEnabled),x=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified"&&!g,{isFeatureEnabled:T}=t(F.isCashManagementFeatureEnabled),V=Na(a,w,i)&&!g&&va(r?.loggedInUserRoleMap),R=Ea(r?.loggedInUserRoleMap),B=D&&te(r?.loggedInUserRoleMap),j=B||qe(r?.loggedInUserRoleMap);return e.jsxs($e,{children:[e.jsx(f,{path:"setup",element:e.jsx(Me,{isBillPayAdminLevelAccess:k,isUserHasOnlyBillPayAccess:I,isReimbursementAdminLevelAccess:C,isZeniAccountAdminLevelAccess:B,isChargeCardAdminLevelAccess:V,isUserHasOnlyCardAccess:R,productType:"zeni_accounts",type:"setup"})}),e.jsx(f,{path:"verification",element:e.jsx(Me,{isBillPayAdminLevelAccess:k,isUserHasOnlyBillPayAccess:I,isReimbursementAdminLevelAccess:C,isZeniAccountAdminLevelAccess:B,isChargeCardAdminLevelAccess:V,isUserHasOnlyCardAccess:R,productType:"zeni_accounts",type:"verification"})}),P?e.jsxs(e.Fragment,{children:[e.jsx(f,{path:"auto-transfer",element:e.jsx(ze,{})}),j?e.jsx(f,{path:"auto-transfer/:ruleId/edit",element:e.jsx(ze,{isEditDrawerOpen:!0})}):null]}):e.jsx(f,{path:"auto-transfer",element:e.jsx(H,{})}),T&&u&&x?e.jsxs(e.Fragment,{children:[e.jsx(f,{path:"cash_management",element:e.jsx(re,{})}),P?e.jsxs(e.Fragment,{children:[e.jsx(f,{path:"cash_management/auto-transfer",element:e.jsx(re,{isAutoTransferRulesTabActive:!0})}),j?e.jsxs(e.Fragment,{children:[e.jsx(f,{path:"cash_management/auto-transfer/:ruleId/edit",element:e.jsx(re,{isAutoTransferRulesTabActive:!0,isEditDrawerOpen:!0})}),e.jsx(f,{path:"cash_management/:ruleId/edit",element:e.jsx(re,{isAutoTransferRulesTabActive:!0,isEditDrawerOpen:!0})})]}):null]}):e.jsx(f,{path:"cash_management/auto-transfer",element:e.jsx(H,{})}),e.jsx(f,{path:"cash_management/auto_sweep",element:e.jsx(Xa,{})})]}):e.jsxs(e.Fragment,{children:[e.jsx(f,{path:"cash_management",element:e.jsx(H,{})}),e.jsx(f,{path:"cash_management/auto-transfer",element:e.jsx(H,{})}),e.jsx(f,{path:"cash_management/auto_sweep",element:e.jsx(H,{})})]}),b&&c?e.jsxs(e.Fragment,{children:[e.jsx(f,{path:"express-pay",element:e.jsx(ie,{})}),e.jsx(f,{path:"express-pay/add-ach",element:e.jsx(ie,{isAddACHDrawerOpen:!0})}),e.jsx(f,{path:"express-pay/add-wire/add-address",element:e.jsx(ie,{isAddAddressDrawerOpen:!0})}),e.jsx(f,{path:"express-pay/add-wire",element:e.jsx(ie,{isAddWireDrawerOpen:!0})})]}):e.jsx(f,{path:"express-pay",element:e.jsx(H,{})}),e.jsx(f,{path:"promo",element:e.jsx(Tt,{})}),l&&!m?e.jsx(f,{path:"/*",element:e.jsx(un,{})}):u?e.jsxs(e.Fragment,{children:[e.jsx(f,{path:"/",element:e.jsx(Ce,{})}),e.jsx(f,{path:"transfer",element:e.jsx(Ce,{isTransferDrawerOpen:!0})}),e.jsx(f,{path:"check-deposit",element:e.jsx(Ce,{isCheckDepositDrawerOpen:!0})}),e.jsx(f,{path:":accountId/*",element:e.jsx(Rt,{})}),e.jsx(f,{path:"*",element:e.jsx(H,{})})]}):h&&c?e.jsx(f,{path:"*",element:e.jsx(Y,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&d?e.jsx(f,{path:"*",element:e.jsx(Y,{to:"../promo",state:n.state})}):e.jsx(f,{path:"*",element:e.jsx(ue,{fetchState:"In-Progress",style:{backgroundColor:s.colors.grey5,boxShadow:`0px 2px ${Za.sp1} ${s.colors.dropShadowNormal}`}})})]})}function Rt(){return e.jsxs($e,{children:[e.jsx(f,{path:"/",element:e.jsx(ce,{})}),e.jsx(f,{path:"account-info",element:e.jsx(ce,{isAccountInfoDrawerOpen:!0})}),e.jsx(f,{path:"transfer",element:e.jsx(ce,{isTransferDrawerOpen:!0})}),e.jsx(f,{path:"check-deposit",element:e.jsx(ce,{isCheckDepositDrawerOpen:!0})}),e.jsx(f,{path:"statements",element:e.jsx(Qa,{})}),e.jsx(f,{path:"*",element:e.jsx(H,{})})]})}export{ro as default};
@@ -0,0 +1,9 @@
1
+ import{j as i}from"./liveblocks-s55OcG-D.js";import{a as u}from"./sentry-qwy54zvC.js";import{h as x,u as B,g as C,i as L,j as g}from"./core-CnGMK-sC.js";import{Lg as s,Lf as $,RB as j,eV as v,RC as T}from"./zeni-epic-state-NrbJoBOX.js";import{m as z,au as p,y as D,z as E,B as P,cg as N,r as U}from"./index-D7tfVykC.js";import{n as _}from"./mui-CggbPNN2.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]="84fc5a66-7436-43e7-8f6d-7232ae6dc97e",e._sentryDebugIdIdentifier="sentry-dbid-84fc5a66-7436-43e7-8f6d-7232ae6dc97e")}catch{}})();const G=_.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 F(){const e=x(),n=B(),d=z(),l=C();let{accountId:a}=L(),f=`${p.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${a}`;a==null&&l.pathname.includes(`${s}/statements`)&&(a=s,f=`${p.bankingMicroServiceBaseUrl}/1.0/${s}`);const[m,y]=u.useState(!1),h=D();u.useEffect((()=>{m||(y(!0),n($(a??"",!1)))}),[m,n]);const o=g((t=>j(t,a??""))),I=()=>{const t=U(l.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:t.newStack}})},r=E.getSignedInUser(),c=g((t=>v(t))),b={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:c.tenantId??""},w=T(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(P,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}}):i.jsx(G,{windowSize:d,children:i.jsx(N,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:I,authParams:b,downloadEndPoint:f})})}export{F as Z};
@@ -1 +1 @@
1
- import"./sentry-D58SEIt0.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-qwy54zvC.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};