@zeniai/web-app-ui 5.2.19-prod → 5.2.20-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/dist/assets/AddressRoutes-EXo_W2G8.js +1 -0
  2. package/dist/assets/AddressScreen-2BaT3oA-.js +9 -0
  3. package/dist/assets/AiCfoScreen-D51UIBd5.js +22 -0
  4. package/dist/assets/{BillPayApprovalRoutes-guz2sdH1.js → BillPayApprovalRoutes-DmH2FpGv.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-D0Ag3ATI.js → BillPayRoutes-DfJ2aUyG.js} +12 -12
  6. package/dist/assets/{BusinessVerificationPageScreen-BohezKn6.js → BusinessVerificationPageScreen-Bj1xk_4H.js} +2 -2
  7. package/dist/assets/{CardsAiCfoScreen-GOQqQudn.js → CardsAiCfoScreen-BgnMfnsv.js} +1 -1
  8. package/dist/assets/{ChargeCardRoutes-C3e575qW.js → ChargeCardRoutes-OCtj3EGu.js} +10 -10
  9. package/dist/assets/{CompanyPassportScreen-CxVFTUSz.js → CompanyPassportScreen-DZx6t9Ym.js} +1 -1
  10. package/dist/assets/ConnectionAuthScreen-MT-IQAtA.js +11 -0
  11. package/dist/assets/CustomerOnboardingAuthScreen-LgV5vbRx.js +1 -0
  12. package/dist/assets/CustomerOnboardingRoutes-wfQZLitF.js +30 -0
  13. package/dist/assets/{DashboardRoutes-BCmwgis8.js → DashboardRoutes-DZ3q6bkK.js} +4 -4
  14. package/dist/assets/{DefaultTenantHome-CC2FeaFy.js → DefaultTenantHome-p5Sm1nZ3.js} +1 -1
  15. package/dist/assets/DomesticWireDetailScreen-CkUpa35c.js +18 -0
  16. package/dist/assets/DrawerScreen-C0UDia2K.js +1 -0
  17. package/dist/assets/EntityDetailRoutes-CVYJbbdy.js +1 -0
  18. package/dist/assets/ExpenseAutomationRoutes-DlWNUUJC.js +25 -0
  19. package/dist/assets/FeaturePreviewScreen-BnJlO_wg.js +1 -0
  20. package/dist/assets/HubSpotOAuthCallbackScreen-CSIQ97oS.js +1 -0
  21. package/dist/assets/MagicLinkRoutes-BjPIElfX.js +72 -0
  22. package/dist/assets/MagicLinkSignInScreen-91bKq8wl.js +12 -0
  23. package/dist/assets/MobileAppDrawer-CinzTjr5.js +1 -0
  24. package/dist/assets/NotFoundScreen-0K6cd0N1.js +1 -0
  25. package/dist/assets/{NotificationRoutes-dRraueia.js → NotificationRoutes-D6XmhJmY.js} +1 -1
  26. package/dist/assets/OAuthConsentScreen-BoXeHjzR.js +1 -0
  27. package/dist/assets/PandLWithForecastRoutes-CSWL87A6.js +1 -0
  28. package/dist/assets/PeopleRoutes-DYYpRS5n.js +22 -0
  29. package/dist/assets/PerformanceRoutes-D39M8yO2.js +1 -0
  30. package/dist/assets/{Preview-CxHKvNb3.js → Preview-K7kVfJNZ.js} +1 -1
  31. package/dist/assets/{QBOConnectionScreen-vAHPaqo7.js → QBOConnectionScreen-OLT5sXwr.js} +1 -1
  32. package/dist/assets/ReimbursementApprovalRoutes-DBKdGYm6.js +1 -0
  33. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BdQmAA7j.js → ReimbursementApprovalRuleDetailScreen-DwTxQqE3.js} +1 -1
  34. package/dist/assets/{ReimbursementRoutes-OiL1KOsA.js → ReimbursementRoutes-BGm8wHdZ.js} +8 -8
  35. package/dist/assets/{ReportsRoutes-cJ_74y1a.js → ReportsRoutes-NgI0ftPw.js} +1 -1
  36. package/dist/assets/RewardsRoutes-BR5NZ2Mx.js +1 -0
  37. package/dist/assets/ScreenRoutes-CXSdkcuS.js +2 -0
  38. package/dist/assets/SettingsRoutes-BaPhIBve.js +57 -0
  39. package/dist/assets/{SetupPagesScreen-DqGd8bGY.js → SetupPagesScreen-Cvdlisb9.js} +5 -5
  40. package/dist/assets/SignInScreen-D4Abp5hF.js +1 -0
  41. package/dist/assets/SignOutScreen-iBWPMOhx.js +9 -0
  42. package/dist/assets/TaskListScreen-C2zap0Rn.js +9 -0
  43. package/dist/assets/TaskRoutes-CZVLK5dG.js +9 -0
  44. package/dist/assets/{TransactionDetailRoutes-D9ZuqZEq.js → TransactionDetailRoutes-Dxvv503N.js} +1 -1
  45. package/dist/assets/TransactionDetailScreen-4CysuAHi.js +5 -0
  46. package/dist/assets/{TransactionListRoutes-t_0rbITT.js → TransactionListRoutes-DNSGDUp4.js} +1 -1
  47. package/dist/assets/TreasuryRoutes-CVqgaqHD.js +37 -0
  48. package/dist/assets/{VendorsRoutes-Ba7d72j7.js → VendorsRoutes-DVTbhmec.js} +15 -15
  49. package/dist/assets/WiseConfirmationScreen-TxMYz6AU.js +12 -0
  50. package/dist/assets/{ZeniAccountRoutes-DdIrrwcf.js → ZeniAccountRoutes-BvMIfD-Y.js} +11 -11
  51. package/dist/assets/ZeniAccountStatementScreen-D9RVH8zp.js +9 -0
  52. package/dist/assets/{accountMappingHelper-BmtW64tm.js → accountMappingHelper-gMZWceAt.js} +1 -1
  53. package/dist/assets/{analytics-C2MbRoEp.js → analytics-BP5D4JyB.js} +1 -1
  54. package/dist/assets/{analyticsHelper-DqO64pHt.js → analyticsHelper-BgeHTAVC.js} +1 -1
  55. package/dist/assets/{core-D2KaS3N5.js → core-BfWJ7zKT.js} +1 -1
  56. package/dist/assets/{decodeURIComponentSafe-CD_zntJd.js → decodeURIComponentSafe-D2jiQ7Do.js} +1 -1
  57. package/dist/assets/{dnd-D-AkKI2c.js → dnd-tQgCG5z3.js} +1 -1
  58. package/dist/assets/{empty-ByGkxZf5.js → empty-0zu7mfa-.js} +1 -1
  59. package/dist/assets/{empty-D1hMU_8M.js → empty-D4KL-CgN.js} +1 -1
  60. package/dist/assets/{emptyVideoElement-B0o6h5Gb.js → emptyVideoElement-D2WpBqYb.js} +1 -1
  61. package/dist/assets/epic-_aUX4Son.js +2 -0
  62. package/dist/assets/getLocaleForTenant-BJ1a_Zja.js +1 -0
  63. package/dist/assets/{index-D6D50L1U.js → index-BtVRjclm.js} +1 -1
  64. package/dist/assets/{index-BQPo7Zt4.js → index-C2k_pBZi.js} +1 -1
  65. package/dist/assets/{index-CHRJI22G.js → index-CiS2dMrM.js} +1 -1
  66. package/dist/assets/index-Cx4f0JbF.css +1 -0
  67. package/dist/assets/{index-CivdpZRT.js → index-DWJVmwhz.js} +35734 -34803
  68. package/dist/assets/{index-Dyy6NuL-.js → index-DpTDwQon.js} +1 -1
  69. package/dist/assets/{index-BFVwI6w6.js → index-edb9TugW.js} +1 -1
  70. package/dist/assets/{index-nz48Z_9j.js → index-oBgu7-MV.js} +2 -2
  71. package/dist/assets/{index-CjrIzFQ1.js → index-zYcXrqlT.js} +1 -1
  72. package/dist/assets/{lexical-BQ-Po3YF.js → lexical-Bg8ldM3i.js} +1 -1
  73. package/dist/assets/liveblocks-DJbBe3tc.js +54 -0
  74. package/dist/assets/{lottie-Dz6JZ58r.js → lottie-BaCgeYyk.js} +1 -1
  75. package/dist/assets/{mui-C1ThRyKO.js → mui-ts7KHm6i.js} +1 -1
  76. package/dist/assets/{pathToGoBack-Du20FI7g.js → pathToGoBack-DG10zCZ4.js} +1 -1
  77. package/dist/assets/{pdf-2k8d7AeQ.js → pdf-C9HGpLCu.js} +4 -4
  78. package/dist/assets/{pdf-lib-DqPqgk_2.js → pdf-lib-DX6kz8a9.js} +1 -1
  79. package/dist/assets/{plaid-Do7hhR27.js → plaid-Cv0mPYlm.js} +1 -1
  80. package/dist/assets/{pusher-TY6R8jm6.js → pusher-CgG6vGRj.js} +1 -1
  81. package/dist/assets/{react-CASCBfCG.js → react-Bu9a3mw7.js} +1 -1
  82. package/dist/assets/{react-D8jfsv_0.js → react-CdB2kFeI.js} +1 -1
  83. package/dist/assets/{react-Bfs0rs07.js → react-Dp-aIPjg.js} +1 -1
  84. package/dist/assets/{react-DPqkDk9u.js → react-LH5dN4Ph.js} +1 -1
  85. package/dist/assets/{react-BReY6fnO.js → react-r7Nkvi02.js} +1 -1
  86. package/dist/assets/{react-CCcFi-WD.js → react-tqWON72J.js} +1 -1
  87. package/dist/assets/{recharts-jHFM5Sob.js → recharts-DNnhB5R_.js} +1 -1
  88. package/dist/assets/routePaths-DqVKIcAE.js +1 -0
  89. package/dist/assets/{sentry-DW4kKH26.js → sentry-C6T1HHHS.js} +1 -1
  90. package/dist/assets/{url-8bOSIiqX.js → url-CJ3E3PSB.js} +1 -1
  91. package/dist/assets/{url-GR46giUc.js → url-Xy6MI2YY.js} +1 -1
  92. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-CuA1dWGl.js → useAiCfoDashboardSuggestedQuestionsChips-BH6Wd98D.js} +1 -1
  93. package/dist/assets/useAskAiCfoHostNavButtonProps-DJm2npkG.js +1 -0
  94. package/dist/assets/useCashManagementBanner-Bjdnpen4.js +1 -0
  95. package/dist/assets/{useChargeCardPusherEvents-9ezHPs6j.js → useChargeCardPusherEvents-Bfrohee4.js} +1 -1
  96. package/dist/assets/{useDeviceId-CHTVQQ8G.js → useDeviceId-DNuYTM17.js} +1 -1
  97. package/dist/assets/{useEmailConnectResultRefresh-Ddee2XH0.js → useEmailConnectResultRefresh-DFbMcoeq.js} +1 -1
  98. package/dist/assets/{useInitialThreadRequest-UA6eH2dj.js → useInitialThreadRequest-D3K2ol9C.js} +1 -1
  99. package/dist/assets/{utils-DIwqH7uj.js → utils-xWcqC4Wl.js} +1 -1
  100. package/dist/assets/withTransactionSidePanel-BMpiKSmG.js +21 -0
  101. package/dist/assets/{zeni-epic-state-BJ_gdj7r.js → zeni-epic-state-kow6PLud.js} +6 -6
  102. package/dist/index.html +1 -1
  103. package/package.json +7 -4
  104. package/dist/assets/AddressRoutes-B7ET6G-y.js +0 -1
  105. package/dist/assets/AddressScreen-CGTYstNo.js +0 -9
  106. package/dist/assets/AiCfoScreen-CA8qqox4.js +0 -22
  107. package/dist/assets/ConnectionAuthScreen-CDBmxiL_.js +0 -11
  108. package/dist/assets/CustomerOnboardingAuthScreen-DbN5QLGb.js +0 -1
  109. package/dist/assets/CustomerOnboardingRoutes-C6q0UB9j.js +0 -30
  110. package/dist/assets/DomesticWireDetailScreen-qVcyg1bS.js +0 -18
  111. package/dist/assets/DrawerScreen-YrXahOEM.js +0 -1
  112. package/dist/assets/EntityDetailRoutes-CteWzOFU.js +0 -1
  113. package/dist/assets/ExpenseAutomationRoutes-ChtLHwSX.js +0 -25
  114. package/dist/assets/FeaturePreviewScreen-C_bWMNSt.js +0 -1
  115. package/dist/assets/HubSpotOAuthCallbackScreen-CFlu3uRE.js +0 -1
  116. package/dist/assets/MagicLinkRoutes-B6CyGV5n.js +0 -72
  117. package/dist/assets/MagicLinkSignInScreen-CU5qkDL2.js +0 -12
  118. package/dist/assets/MobileAppDrawer-O95nPlSQ.js +0 -1
  119. package/dist/assets/NotFoundScreen-BeJq256C.js +0 -1
  120. package/dist/assets/OAuthConsentScreen-CRSd0T8_.js +0 -1
  121. package/dist/assets/PandLWithForecastRoutes-DdDF5n8o.js +0 -1
  122. package/dist/assets/PeopleRoutes-DPUju30P.js +0 -22
  123. package/dist/assets/PerformanceRoutes-BSNXb7w3.js +0 -1
  124. package/dist/assets/ReimbursementApprovalRoutes-DhrGnU7Q.js +0 -1
  125. package/dist/assets/RewardsRoutes-DaWb-BQo.js +0 -1
  126. package/dist/assets/ScreenRoutes-CRY8MlH6.js +0 -2
  127. package/dist/assets/SettingsRoutes-B0QfLxKl.js +0 -57
  128. package/dist/assets/SignInScreen-wUhLdLU-.js +0 -1
  129. package/dist/assets/SignOutScreen-BChwhvvy.js +0 -9
  130. package/dist/assets/TaskListScreen-q9ElonDb.js +0 -9
  131. package/dist/assets/TaskRoutes-B9S8VECk.js +0 -9
  132. package/dist/assets/TransactionDetailScreen-B77dqrVQ.js +0 -5
  133. package/dist/assets/TreasuryRoutes-C2A809wv.js +0 -37
  134. package/dist/assets/WiseConfirmationScreen-AJ6Zf-xE.js +0 -12
  135. package/dist/assets/ZeniAccountStatementScreen-BUgkOPv6.js +0 -9
  136. package/dist/assets/epic-C_V7SCDP.js +0 -2
  137. package/dist/assets/getLocaleForTenant--JGxRDjE.js +0 -1
  138. package/dist/assets/index-Czu7h9lW.css +0 -1
  139. package/dist/assets/liveblocks-BBLi67DG.js +0 -54
  140. package/dist/assets/routePaths-TRamKMNj.js +0 -1
  141. package/dist/assets/useAskAiCfoHostNavButtonProps-CNoSipqI.js +0 -1
  142. package/dist/assets/useCashManagementBanner-COk5CYpf.js +0 -1
  143. package/dist/assets/withTransactionSidePanel-DWx4OX2G.js +0 -21
package/dist/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en"><head><meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate"><meta http-equiv="expires" content="0"><meta http-equiv="pragma" content="no-cache"><meta charset="UTF-8"><link rel="icon" type="image/svg+xml" href="/assets/favicon-D56XvgAH.ico"><meta name="ROBOTS" content="NOINDEX, NOFOLLOW"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1"><meta name="theme-color" content="#000000"><meta name="description" content="Zeni - Modern Finance Team For Startups"><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&family=Manrope:wght@200..800&display=swap"><link rel="apple-touch-icon" href="/assets/logo192-CqcTe-t4.png"><link rel="manifest" href="/assets/manifest-icT4lOF5.json"><title>Zeni - Modern Finance Team For Startups</title><script src="/theme-detect.js"></script><style>:root{--logo-color-from:#D4DCDD;--logo-color-to:#E9F0F0;--bar-color-from:#E9F0F0;--bar-color-to:#D4DCDD;--sidebar-bg:#F3F7F7;--main-bg:#FAFCFC;--divider-color:#D4DCDD}html{background-color:#f3f7f7}html[data-theme=dark]{background-color:#1b1c1c;--logo-color-from:#545B5C;--logo-color-to:#3E4343;--bar-color-from:#3E4343;--bar-color-to:#545B5C;--sidebar-bg:#1B1C1C;--main-bg:#202222;--divider-color:#545B5C}.app-shell-loader{position:fixed;inset:0;display:flex;background-color:var(--sidebar-bg);z-index:9999}.app-shell-sidebar{width:210px;flex-shrink:0;background-color:var(--sidebar-bg);padding:16px 16px 0;display:flex;flex-direction:column;gap:36px;border-right:1px solid var(--divider-color);box-sizing:border-box}.app-shell-sidebar-group{display:flex;flex-direction:column;gap:10px}.app-shell-bar{height:10px;border-radius:5px;background-color:var(--bar-color-from);animation:app-shell-bar-shimmer 1.6s linear infinite}.app-shell-navbar{height:56px;display:flex;flex-direction:row;border-bottom:1px solid var(--divider-color);padding:0 32px;align-items:center;justify-content:space-between;box-sizing:border-box}@keyframes app-shell-bar-shimmer{0%,100%{background-color:var(--bar-color-from)}50%{background-color:var(--bar-color-to)}}.app-shell-main{flex:1;background-color:var(--main-bg)}.app-shell-logo{display:inline-flex;width:100%;height:calc(100vh - 56px);justify-content:center;align-items:center}.app-shell-logo svg path{animation:app-shell-color-cycle 1.6s linear infinite}@keyframes app-shell-color-cycle{0%,100%{fill:var(--logo-color-from)}50%{fill:var(--logo-color-to)}}@media (max-width:899px){.app-shell-sidebar{display:none}.app-shell-main{background-color:var(--sidebar-bg)}}</style><noscript><style>.app-shell-loader{display:none}</style></noscript><script async type="module" crossorigin src="/assets/index-CivdpZRT.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-DW4kKH26.js"><link rel="modulepreload" crossorigin href="/assets/core-D2KaS3N5.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-BJ_gdj7r.js"><link rel="modulepreload" crossorigin href="/assets/mui-C1ThRyKO.js"><link rel="modulepreload" crossorigin href="/assets/analytics-C2MbRoEp.js"><link rel="modulepreload" crossorigin href="/assets/utils-DIwqH7uj.js"><link rel="stylesheet" crossorigin href="/assets/index-Czu7h9lW.css"></head><body style="margin:0"><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><div class="app-shell-loader" id="app-shell-loader"><div class="app-shell-sidebar"><div class="app-shell-sidebar-group"><div class="app-shell-bar zeni-logo" style="width:96px;height:20px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:78px;height:16px"></div><div class="app-shell-bar" style="width:46px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:110px;height:16px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div><div class="app-shell-bar" style="width:64px;height:16px"></div></div></div><div class="app-shell-main"><div class="app-shell-navbar"><div class="app-shell-bar" style="width:106px;height:27px"></div><div class="app-shell-bar" style="width:111px;height:32px"></div></div><div class="app-shell-logo"><svg width="96" height="96" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.768 0.0270284C16.571 -0.055168 16.348 0.0572476 16.2913 0.267574C16.2713 0.342517 16.2489 0.417461 16.2253 0.491196C16.0094 1.15723 15.6459 1.76645 15.148 2.27776C14.3056 3.14203 13.1847 3.61949 11.9918 3.6207H11.9883C10.7978 3.6207 9.67689 3.14565 8.83445 2.2838C8.33653 1.7737 7.97077 1.16448 7.75367 0.499657C7.73007 0.425922 7.70765 0.350979 7.68641 0.276035C7.62978 0.065709 7.40678 -0.0454978 7.20974 0.0366985C6.05463 0.522624 4.98565 1.17899 4.0323 1.97436C3.91195 2.07468 3.87301 2.24512 3.93083 2.39259C3.9792 2.51589 4.03112 2.63797 4.08539 2.75764C4.51133 3.70894 5.10364 4.5853 5.84815 5.34682C7.48937 7.0246 9.66863 7.9493 11.9871 7.9493H11.9954C14.3162 7.94689 16.4978 7.01855 18.1379 5.33595C18.8812 4.57321 19.4711 3.69564 19.8959 2.74434C19.9502 2.62347 20.0009 2.50138 20.0493 2.37809C20.1071 2.23062 20.0682 2.06018 19.9478 1.95985C18.9933 1.16569 17.9231 0.511745 16.768 0.0270284Z"/><path d="M19.9102 21.2422C19.4843 20.2933 18.8931 19.4194 18.151 18.6603C16.5086 16.9801 14.3223 16.053 12.0038 16.0578C8.50304 16.0614 5.48371 18.1961 4.11031 21.2603C4.05722 21.38 4.0053 21.5009 3.95575 21.623C3.89675 21.7704 3.93569 21.9421 4.05722 22.0436C5.01175 22.8366 6.08073 23.4893 7.23466 23.9728C7.4317 24.055 7.65352 23.9438 7.71134 23.7335C7.73139 23.6573 7.75381 23.5836 7.77859 23.5086C8.37207 21.6979 10.0416 20.3888 12.0073 20.3864H12.012C13.2025 20.3864 14.3234 20.8614 15.1659 21.7233C15.6626 22.231 16.026 22.8378 16.2431 23.5002C16.2679 23.5739 16.2903 23.6489 16.3104 23.7238C16.3682 23.9341 16.59 24.0453 16.787 23.9619C17.9422 23.476 19.01 22.8209 19.9633 22.0255C20.0837 21.9252 20.1226 21.7535 20.0648 21.606C20.0164 21.4828 19.9645 21.3631 19.9102 21.2422Z"/><path d="M0.132148 10.1666C0.158105 9.98769 0.305591 9.85352 0.482575 9.85352L23.5093 9.81726C23.6863 9.81726 23.8338 9.95022 23.8609 10.1291C23.9518 10.7347 23.999 11.3548 23.999 11.9858C24.0001 12.6131 23.9541 13.2284 23.8668 13.8292C23.8408 14.0081 23.6934 14.1422 23.5164 14.1422L0.489654 14.1773C0.312671 14.1773 0.165185 14.0443 0.138047 13.8654C0.0471956 13.2598 0 12.6397 0 12.0088C0 11.3826 0.0448358 10.7673 0.132148 10.1666Z"/></svg></div></div></div></body></html>
1
+ <!DOCTYPE html><html lang="en"><head><meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate"><meta http-equiv="expires" content="0"><meta http-equiv="pragma" content="no-cache"><meta charset="UTF-8"><link rel="icon" type="image/svg+xml" href="/assets/favicon-D56XvgAH.ico"><meta name="ROBOTS" content="NOINDEX, NOFOLLOW"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1"><meta name="theme-color" content="#000000"><meta name="description" content="Zeni - Modern Finance Team For Startups"><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&family=Manrope:wght@200..800&display=swap"><link rel="apple-touch-icon" href="/assets/logo192-CqcTe-t4.png"><link rel="manifest" href="/assets/manifest-icT4lOF5.json"><title>Zeni - Modern Finance Team For Startups</title><script src="/theme-detect.js"></script><style>:root{--logo-color-from:#D4DCDD;--logo-color-to:#E9F0F0;--bar-color-from:#E9F0F0;--bar-color-to:#D4DCDD;--sidebar-bg:#F3F7F7;--main-bg:#FAFCFC;--divider-color:#D4DCDD}html{background-color:#f3f7f7}html[data-theme=dark]{background-color:#1b1c1c;--logo-color-from:#545B5C;--logo-color-to:#3E4343;--bar-color-from:#3E4343;--bar-color-to:#545B5C;--sidebar-bg:#1B1C1C;--main-bg:#202222;--divider-color:#545B5C}.app-shell-loader{position:fixed;inset:0;display:flex;background-color:var(--sidebar-bg);z-index:9999}.app-shell-sidebar{width:210px;flex-shrink:0;background-color:var(--sidebar-bg);padding:16px 16px 0;display:flex;flex-direction:column;gap:36px;border-right:1px solid var(--divider-color);box-sizing:border-box}.app-shell-sidebar-group{display:flex;flex-direction:column;gap:10px}.app-shell-bar{height:10px;border-radius:5px;background-color:var(--bar-color-from);animation:app-shell-bar-shimmer 1.6s linear infinite}.app-shell-navbar{height:56px;display:flex;flex-direction:row;border-bottom:1px solid var(--divider-color);padding:0 32px;align-items:center;justify-content:space-between;box-sizing:border-box}@keyframes app-shell-bar-shimmer{0%,100%{background-color:var(--bar-color-from)}50%{background-color:var(--bar-color-to)}}.app-shell-main{flex:1;background-color:var(--main-bg)}.app-shell-logo{display:inline-flex;width:100%;height:calc(100vh - 56px);justify-content:center;align-items:center}.app-shell-logo svg path{animation:app-shell-color-cycle 1.6s linear infinite}@keyframes app-shell-color-cycle{0%,100%{fill:var(--logo-color-from)}50%{fill:var(--logo-color-to)}}@media (max-width:899px){.app-shell-sidebar{display:none}.app-shell-main{background-color:var(--sidebar-bg)}}</style><noscript><style>.app-shell-loader{display:none}</style></noscript><script async type="module" crossorigin src="/assets/index-DWJVmwhz.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-C6T1HHHS.js"><link rel="modulepreload" crossorigin href="/assets/core-BfWJ7zKT.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-kow6PLud.js"><link rel="modulepreload" crossorigin href="/assets/mui-ts7KHm6i.js"><link rel="modulepreload" crossorigin href="/assets/analytics-BP5D4JyB.js"><link rel="modulepreload" crossorigin href="/assets/utils-xWcqC4Wl.js"><link rel="stylesheet" crossorigin href="/assets/index-Cx4f0JbF.css"></head><body style="margin:0"><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><div class="app-shell-loader" id="app-shell-loader"><div class="app-shell-sidebar"><div class="app-shell-sidebar-group"><div class="app-shell-bar zeni-logo" style="width:96px;height:20px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:78px;height:16px"></div><div class="app-shell-bar" style="width:46px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:110px;height:16px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div><div class="app-shell-bar" style="width:64px;height:16px"></div></div></div><div class="app-shell-main"><div class="app-shell-navbar"><div class="app-shell-bar" style="width:106px;height:27px"></div><div class="app-shell-bar" style="width:111px;height:32px"></div></div><div class="app-shell-logo"><svg width="96" height="96" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.768 0.0270284C16.571 -0.055168 16.348 0.0572476 16.2913 0.267574C16.2713 0.342517 16.2489 0.417461 16.2253 0.491196C16.0094 1.15723 15.6459 1.76645 15.148 2.27776C14.3056 3.14203 13.1847 3.61949 11.9918 3.6207H11.9883C10.7978 3.6207 9.67689 3.14565 8.83445 2.2838C8.33653 1.7737 7.97077 1.16448 7.75367 0.499657C7.73007 0.425922 7.70765 0.350979 7.68641 0.276035C7.62978 0.065709 7.40678 -0.0454978 7.20974 0.0366985C6.05463 0.522624 4.98565 1.17899 4.0323 1.97436C3.91195 2.07468 3.87301 2.24512 3.93083 2.39259C3.9792 2.51589 4.03112 2.63797 4.08539 2.75764C4.51133 3.70894 5.10364 4.5853 5.84815 5.34682C7.48937 7.0246 9.66863 7.9493 11.9871 7.9493H11.9954C14.3162 7.94689 16.4978 7.01855 18.1379 5.33595C18.8812 4.57321 19.4711 3.69564 19.8959 2.74434C19.9502 2.62347 20.0009 2.50138 20.0493 2.37809C20.1071 2.23062 20.0682 2.06018 19.9478 1.95985C18.9933 1.16569 17.9231 0.511745 16.768 0.0270284Z"/><path d="M19.9102 21.2422C19.4843 20.2933 18.8931 19.4194 18.151 18.6603C16.5086 16.9801 14.3223 16.053 12.0038 16.0578C8.50304 16.0614 5.48371 18.1961 4.11031 21.2603C4.05722 21.38 4.0053 21.5009 3.95575 21.623C3.89675 21.7704 3.93569 21.9421 4.05722 22.0436C5.01175 22.8366 6.08073 23.4893 7.23466 23.9728C7.4317 24.055 7.65352 23.9438 7.71134 23.7335C7.73139 23.6573 7.75381 23.5836 7.77859 23.5086C8.37207 21.6979 10.0416 20.3888 12.0073 20.3864H12.012C13.2025 20.3864 14.3234 20.8614 15.1659 21.7233C15.6626 22.231 16.026 22.8378 16.2431 23.5002C16.2679 23.5739 16.2903 23.6489 16.3104 23.7238C16.3682 23.9341 16.59 24.0453 16.787 23.9619C17.9422 23.476 19.01 22.8209 19.9633 22.0255C20.0837 21.9252 20.1226 21.7535 20.0648 21.606C20.0164 21.4828 19.9645 21.3631 19.9102 21.2422Z"/><path d="M0.132148 10.1666C0.158105 9.98769 0.305591 9.85352 0.482575 9.85352L23.5093 9.81726C23.6863 9.81726 23.8338 9.95022 23.8609 10.1291C23.9518 10.7347 23.999 11.3548 23.999 11.9858C24.0001 12.6131 23.9541 13.2284 23.8668 13.8292C23.8408 14.0081 23.6934 14.1422 23.5164 14.1422L0.489654 14.1773C0.312671 14.1773 0.165185 14.0443 0.138047 13.8654C0.0471956 13.2598 0 12.6397 0 12.0088C0 11.3826 0.0448358 10.7673 0.132148 10.1666Z"/></svg></div></div></div></body></html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/web-app-ui",
3
- "version": "5.2.19-prod",
3
+ "version": "5.2.20-dev",
4
4
  "files": [
5
5
  "dist/**/*"
6
6
  ],
@@ -27,9 +27,9 @@
27
27
  "@sentry/core": "^9.42.1",
28
28
  "@sentry/react": "^9.42.1",
29
29
  "@stripe/stripe-js": "^4.4.0",
30
- "@zeniai/client-analytics": "2.0.40",
31
- "@zeniai/client-epic-state": "5.1.45",
32
- "@zeniai/web-components": "4.2.43",
30
+ "@zeniai/client-analytics": "2.0.44",
31
+ "@zeniai/client-epic-state": "5.1.46",
32
+ "@zeniai/web-components": "4.2.44",
33
33
  "color": "3.1.3",
34
34
  "cross-fetch": "^4.0.0",
35
35
  "crypto-js": "4.2.0",
@@ -57,6 +57,7 @@
57
57
  "react-router-dom": "^6.30.4",
58
58
  "recharts": "^2.15.1",
59
59
  "redux": "^4.1.2",
60
+ "reselect": "4.1.8",
60
61
  "url-parse": "^1.5.10",
61
62
  "vite-plugin-minify": "^2.1.0",
62
63
  "vite-plugin-optimize-css-modules": "^1.2.0",
@@ -71,6 +72,7 @@
71
72
  "@originjs/vite-plugin-commonjs": "^1.0.3",
72
73
  "@rollup/plugin-terser": "^0.4.4",
73
74
  "@sentry/vite-plugin": "^2.21.2",
75
+ "@testing-library/react": "^16.3.2",
74
76
  "@trivago/prettier-plugin-sort-imports": "^5.2.2",
75
77
  "@types/color": "3.0.2",
76
78
  "@types/crypto-js": "^4.1.0",
@@ -93,6 +95,7 @@
93
95
  "events": "^3.3.0",
94
96
  "globals": "^16.0.0",
95
97
  "husky": "^9.0.11",
98
+ "jsdom": "^29.1.1",
96
99
  "madge": "^8.0.0",
97
100
  "node-jq": "^6.0.1",
98
101
  "prettier": "^3.5.3",
@@ -1 +0,0 @@
1
- import{j as e}from"./liveblocks-BBLi67DG.js";import{A as d}from"./AddressScreen-CGTYstNo.js";import i from"./NotFoundScreen-BeJq256C.js";import"./sentry-DW4kKH26.js";import{o as s,p as r}from"./core-D2KaS3N5.js";import"./zeni-epic-state-BJ_gdj7r.js";import"./recharts-jHFM5Sob.js";import"./index-CivdpZRT.js";import"./mui-C1ThRyKO.js";import"./analytics-C2MbRoEp.js";import"./plaid-Do7hhR27.js";import"./dnd-D-AkKI2c.js";import"./stripe-cKAAJElX.js";import"./lottie-Dz6JZ58r.js";import"./lexical-BQ-Po3YF.js";import"./pdf-2k8d7AeQ.js";import"./utils-DIwqH7uj.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="cd0ff2b4-1e27-4329-addf-f475e5a9db34",t._sentryDebugIdIdentifier="sentry-dbid-cd0ff2b4-1e27-4329-addf-f475e5a9db34")}catch{}})();function _(){return e.jsxs(s,{children:[e.jsx(r,{path:"/edit/:addressType/:addressId",element:e.jsx(d,{})}),e.jsx(r,{path:"/new/:addressType",element:e.jsx(d,{})}),e.jsx(r,{path:"*",element:e.jsx(i,{})})]})}export{_ as default};
@@ -1,9 +0,0 @@
1
- import{j as r}from"./liveblocks-BBLi67DG.js";import{a as h}from"./sentry-DW4kKH26.js";import{h as T,u as _,g as E,i as j,j as B,n as $}from"./core-D2KaS3N5.js";import{K as M,y as D,z as K,e as L,B as N,C as R,f as C,h as S,n as z,k as b,p as F}from"./index-CivdpZRT.js";import{N2 as k,h$ as U,eZ as G,N3 as O,c7 as V,N4 as q,lm as H}from"./zeni-epic-state-BJ_gdj7r.js";import{n as Z}from"./mui-C1ThRyKO.js";import J from"./NotFoundScreen-BeJq256C.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]="4d73ce55-b89f-4083-b8c7-6d32edde93d6",e._sentryDebugIdIdentifier="sentry-dbid-4d73ce55-b89f-4083-b8c7-6d32edde93d6")}catch{}})();const Q=Z.div`
2
- display: flex;
3
- height: 100vh;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `,W=$((function(e,t){const{addressId:o,isSubPage:i,addressType:c}=t,l=G(e),a=t.roleMap!=null&&O(t.roleMap),d=i||c==="user_address"||V(l?.userRole??[])||a?void 0:"readonly";if(o==null){const s=q(c,e);return{addressToEdit:s?.addressToCreate,loadingState:s?.status?.fetchState,googleAPIKey:b.googleMapsAPIKey,isDisabled:d,isSubPage:i,dontShowSaveConfirmationPopup:t.dontShowSaveConfirmation}}const n=k(e,o);return{addressToEdit:n.address,loadingState:n.fetchState,googleAPIKey:b.googleMapsAPIKey,isDisabled:d}}),(function(e,t){const{navigate:o,location:i,addressType:c}=t,l=a=>{if(a==="express-pay")o("../express-pay/add-wire");else{const d=i.state,n=F(d?.pathnameStackToGoBack);let s=n.poppedPathname??w();const u=d?.queryParams;if(u){const g=new URLSearchParams(u).toString();g&&(s=`${s}?${g}`)}o(s,{state:{pathnameStackToGoBack:n.newStack}})}};return{onSubmitHandler:a=>{const d=X(a);e(H({addressType:c,addressToCreate:d})),C?.trackSaveAddressClicked(S.Event.saveAddressClicked,{street:a.street.addressString,city:a.city,state:a.state,country:a.country.selectedOption??"",postalCode:a.postalCode,suite:a.suite,secondaryInfo:a.secondaryInfo}),l(t.bankAccountContext)},onCancel:()=>{l(t.bankAccountContext)}}}))(z);function re({isSubPage:e,hideAddressSubTitle:t=!1,hideAddressBackButton:o=!1,dontShowSaveConfirmation:i,accountContext:c,addressTypeParam:l}){const a=T(),d=_(),n=E(),{addressId:s,addressType:u}=j(),g=M(),I=D(),v=K.getSignedInUser(),[f,x]=h.useState(s==null),p=B((m=>s!=null?k(m,s).fetchState:"Not-Started")),A=L();if(v==null)throw Error("Can't access address page without signing in...");const P=m=>m.trackPageLoaded(s!=null?S.Event.editAddress:S.Event.addAddress),y=l??u;return h.useEffect((()=>{f||s==null||(x(!0),d(U(s,!1)))}),[f,s,d]),y==null||y.match(/(user_address|company_address|company_registered_address|vendor_address|officer_([1-9]|10)_address)$/g)?!f&&p==="Not-Started"||f&&p==="In-Progress"?r.jsx(N,{fetchState:p,style:{backgroundColor:I.colors.grey5}}):s!=null&&p==="Error"?(a(`${w(1)}/new`,{replace:!0}),r.jsx(r.Fragment,{})):r.jsxs(r.Fragment,{children:[r.jsx(R,{analytics:C,onLoad:P}),r.jsx(Q,{windowSize:g,children:r.jsx(W,{location:n,navigate:a,isSubPage:e===!0,hideAddressBackButton:o,hideAddressSubTitle:t,addressId:s,addressType:y,dontShowSaveConfirmation:i,bankAccountContext:c,roleMap:A?.loggedInUserRoleMap})})]}):r.jsx(J,{})}const w=(e=2)=>{let t="../";for(let o=0;o<e;o++)t=`${t}../`;return t},X=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng});export{re as A,X as t};
@@ -1,22 +0,0 @@
1
- import{j as c}from"./liveblocks-BBLi67DG.js";import{a as r}from"./sentry-DW4kKH26.js";import{u as xe,h as Pe,g as we,j as J,i as ye,n as Ee}from"./core-D2KaS3N5.js";import{Z as Te,de as ve,z as Ae,K as Qe,df as _e,dg as Ue,bb as X,dh as se,di as Oe,ba as ae,p as V,C as R,f as I,dj as B,dk as je,dl as Fe,a3 as Le,h as De,a9 as Re,dm as Be,dn as Me,a4 as Ve,dp as $e,dq as Ge,dr as Ne,r as qe,b6 as ze,ds as He}from"./index-CivdpZRT.js";import{gp as We,eY as oe,eZ as Ye,iH as Ze,Ug as Ke,fs as Je,iR as Xe,iN as et,e_ as M,fz as tt,g8 as st,g9 as at,g1 as ot,g5 as ee,ga as nt,gb as it,gc as rt,gd as lt,ge as dt,gf as ct}from"./zeni-epic-state-BJ_gdj7r.js";import{D as ut,n as k,S as mt,P as pt}from"./mui-C1ThRyKO.js";import{u as ht}from"./useAiCfoDashboardSuggestedQuestionsChips-CuA1dWGl.js";import{p as St}from"./pathToGoBack-Du20FI7g.js";import"./recharts-jHFM5Sob.js";import"./analytics-C2MbRoEp.js";import"./plaid-Do7hhR27.js";import"./dnd-D-AkKI2c.js";import"./stripe-cKAAJElX.js";import"./lottie-Dz6JZ58r.js";import"./lexical-BQ-Po3YF.js";import"./pdf-2k8d7AeQ.js";import"./utils-DIwqH7uj.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="44841d80-7306-4161-9b1b-dfced4f377bd",e._sentryDebugIdIdentifier="sentry-dbid-44841d80-7306-4161-9b1b-dfced4f377bd")}catch{}})();const ne="chat-response-generated",gt=Ee((function(e,o){const t=oe(e),m=o.isSubmitting,s=t.uiState?.currentChatSessionId,h=s!=null?tt(e.aiCfoState,s):[],S=Me(e,{allUsers:o.allUsers,onCardPolicyVendorSearchTextChange:o.onCardPolicyVendorSearchTextChange});return{showSampleQuestions:o.sessionFromUrl==="explore"&&t.uiState.currentChatSessionId==null,aiCfoView:t,isSubmitting:m,isNewChatSession:o.sessionFromUrl==="new_chat"||o.sessionFromUrl==="explore",isFullView:!0,tableDownloadEndPoint:`${Ve}/tableDownload`,emailLinkQuestion:o.emailLinkQuestion,autoSubmitEmailLinkQuestion:o.autoSubmitEmailLinkQuestion,onEmailLinkQuestionProcessed:o.onEmailLinkQuestionProcessed,routedInitialQuestionSource:o.routedInitialQuestionSource,routedInitialQuestionSuggestionIndex:o.routedInitialQuestionSuggestionIndex,exploreSuggestedPromptQuestions:o.exploreSuggestedPromptQuestions,exploreSuggestedPromptQuestionsLoading:o.exploreSuggestedPromptQuestionsLoading,isFileUploadEnabled:o.isFileUploadEnabled,isUploadPromoVisible:o.isUploadPromoVisible,onUploadPromoClose:o.onUploadPromoClose,skills:st(e).skills,syntheticAnswers:h,resolveSyntheticAnswerCardTile:Ge(e),resolveSyntheticAnswerPolicyTile:$e(e),...S}}),(function(e,o){const{location:t,currentTenant:m,userId:s,navigate:h,currentChatSessionId:S,allSessionsWithOrderedQuestionAnswers:x,isAiCardCreationEnabled:T,isCardPolicyEnabled:v,setIsAiCfoOpen:b}=o,p=m.tenantEmailDomain;return{onEventReceived:(a,l)=>{if(a===ne&&typeof l.text=="string"&&typeof l.metadata=="object"){const d=l,g=rt(d.type),u=d.metadata.chat_session_id??null,{currentChatSession:n,currentQuestionAnswer:P,currentQuestionAnswerSummary:A}=ae(x,u);g!=="answer"?I.trackAICFOChatResponseGenerated(g,P?.question.questionText??"",d.text,u,He(A,n),d.metadata.message_id??null):I.trackAICFOChatAnswerGenerated(d.text,P?.question.questionText??"",(d.follow_up_questions?.length??0)>0,!!d.assumptions,!!d.insights,d.visualization!=null,lt(d.visualization?.type??"")??null,u,d.summarized_title,d.metadata.message_id??null),e(dt({chatSessionId:d.metadata.chat_session_id,responseType:g,fetchState:{fetchState:"Completed",error:void 0}})),e(ct({chatSessionId:d.metadata.chat_session_id,answerPayload:d,userId:s}))}},onSubmit:(a,l,d,g,u)=>{a&&ze(e,a,l,S,x,s,g,d,void 0,u)},onFetchSkills:()=>{e(it())},updateCurrentInput:a=>{e(ee(a))},onStopSubmit:()=>{},onUpdateScrollYOffset:a=>{e(nt(a))},onSelectSampleQuestion:()=>{},onBackClick:()=>{h(-1)},onCloseClick:()=>{const a=V(t.state?.pathnameStackToGoBack),l=a.poppedPathname??St(1);h(l,{state:{...t.state,pathnameStackToGoBack:a.newStack}}),e(ee(""))},togglePageView:()=>{const a=V(t.state?.pathnameStackToGoBack),l=a.poppedPathname??`/${m.tenantEmailDomain}/dashboard`;h(l,{state:{...se(t.state),pathnameStackToGoBack:a.newStack,message:"open_ai_cfo_drawer"}}),b(!0)},onCopy:()=>{},onThumbsUp:()=>{},onThumbsDown:()=>{},onTogglePageView:()=>{h(-1)},onNewChatClick:()=>{S!=null&&e(ot());const a=qe(t.state?.pathnameStackToGoBack,t.pathname);h(`/${m.tenantEmailDomain}/ai-cfo/new_chat`,{state:{pathnameStackToGoBack:a.slice(0,-1),referrer:"Sidebar"}})},onToggleCotCollapsed:(a,l)=>{e(at({questionAnswerId:a,isCollapsed:l}))},onMenuClick:o.onMenuClick,...Ne(e,{isAiCardCreationEnabled:T,isCardPolicyEnabled:v,currentChatSessionId:S,onAfterCardsCreationSubmit:()=>{b(!0),h(`/${p}/cards`,{state:{...t.state}})},onAfterCardPolicySubmit:()=>{b(!0),h(`/${p}/cards/policy`,{state:{...t.state}})}})}}))(Re(Be)),Rt=({isFileUploadEnabled:e})=>{const{setIsAiCfoOpen:o}=Te(),t=xe(),m=Pe(),s=we(),[h,S]=r.useState(!1),{allUsers:x,isAiCardCreationEnabled:T,isCardPolicyEnabled:v,onCardPolicyVendorSearchTextChange:b}=ve();r.useEffect((()=>{t(We())}),[t]);const p=J((i=>oe(i))),a=Ae.getSignedInUser(),{session_id:l}=ye(),d=Qe(),g=Le(d),u=J((i=>Ye(i))),n=p.uiState.currentChatSessionId,P=u.tenantEmailDomain,{handleUploadPromoClose:A,isUploadPromoVisible:ie}=_e({isFileUploadEnabled:e,tenantEmailDomain:P}),Q=Ue({currentTenant:u,currentChatSessionId:n,aiCfoView:p}),{isSuggestedQuestionsLoading:re,suggestedPromptQuestions:le}=ht(),w=s.state,y=w?.aiCfoInitialQuestion,$=!!w?.aiCfoShouldSubmit;r.useEffect((()=>{const i=s.state;if(i?.[X]!==!0)return;S(!0);const f={...i};delete f[X],m(s,{replace:!0,state:f})}),[s.pathname,s.search,s.state,m]);const[de,_]=r.useState(null),[ce,U]=r.useState(!1),[ue,O]=r.useState(void 0),[me,j]=r.useState(void 0),G=r.useRef(!1);r.useEffect((()=>{if(!G.current&&y!=null&&y!==""){const i=s.state;_(y),U($),O(i?.aiCfoInitialSubmissionSource!=null?i.aiCfoInitialSubmissionSource:void 0);const f=i?.aiCfoSuggestionIndex;j(typeof f=="number"?f:void 0),G.current=!0}}),[y,$,s.state]);const pe=r.useCallback((()=>{_(null),U(!1),O(void 0),j(void 0),m(s.pathname,{replace:!0,state:se(s.state)})}),[s.pathname,s.state,m]),N=r.useMemo((()=>new URLSearchParams(s.search)),[s.search]),q=N.get("ref")??w?.aiCfoRef,F=N.get("emailRefId")??w?.aiCfoEmailRefId,z=r.useRef(!1);r.useEffect((()=>{z.current||q!=="month-end-email"||F==null||n!=null||a==null||(t(Ze("controller",a.userId,F,"MONTH_END_EMAIL")),z.current=!0)}),[q,F,n,t,a]);const E=p.uiState.lastContextMessage;r.useEffect((()=>{E!=null&&E!==""&&n!=null&&(_(E),U(!0),O(void 0),j(void 0),t(Ke()))}),[E,n,t]);const he=u.masterTOSInfo,C=he?.isMasterTOSAccepted??!1,{visitedSessions:H}=Oe(n),L=p.fetchState,D=p.uiState.chatSessionsNextPageToken.hasMore||!p.uiState.chatSessionsFirstPageFetched,W=n!=null?p.fetchChatSessionHistoryByChatSessionId?.[n]?.fetchState??"Not-Started":"Not-Started",Y=n==null||(p.uiState.chatHistoryNextPageToken[n]?.hasMore??!0),Z=p.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:Se}=ae(Z,n),ge=Se.length===0;r.useEffect((()=>{C||g||m("../dashboard",{state:{...s.state,message:"open_ai_cfo_drawer"}})}),[C,g,m,s.state]);const fe=r.useCallback((()=>{const i=V(s.state?.pathnameStackToGoBack),f=u.tenantEmailDomain;m(i.poppedPathname??(f!=null?`/${f}/dashboard`:".."),{state:{...s.state,pathnameStackToGoBack:i.newStack}})}),[u.tenantEmailDomain,s.state,m]);r.useEffect((()=>{n!=null&&l!==n&&m(`../ai-cfo/${n}`,{state:{...s.state}})}),[n,l]),r.useEffect((()=>{l!=null&&n==null&&l!=="new_chat"&&l!=="explore"&&t(Je({sessionId:l,agentId:"controller"}))}),[]);const Ce=r.useMemo((()=>({events:H.map((i=>`private-encrypted-chat-${i}.${ne}`)),eventCallback:(i,f,ke)=>ke.onEventReceived(i,f)})),[H]);r.useEffect((()=>{L!=="In-Progress"&&D&&t(Xe())}),[L,D,t]),r.useEffect((()=>{n!=null&&W!=="In-Progress"&&Y&&a!=null&&L==="Completed"&&!D&&t(et(n,a.userId))}),[W,Y,n,a,t]);const K=i=>i.trackAICFOOnboardingScreenStateChanged("open","first_visit");if(a==null||l==null)throw Error("Can't access AI Controller page without signing in...");const be=n!=null&&p.responseStateByChatSessionId?.[n]?.answer?.fetchState==="In-Progress";if(!C&&g)return c.jsxs(Ct,{children:[c.jsx(R,{analytics:I,onLoad:K}),Q.drawerElement,c.jsx(bt,{children:c.jsx(te,{children:c.jsx(B,{isTOSAccepted:!1,acceptMasterTOSState:p.masterTOSAcceptanceState,onCloseClick:fe,onCompleteClick:()=>{u.userRoleId!=null&&t(M(u.userRoleId))}})})})]});const Ie=c.jsxs(c.Fragment,{children:[h&&!C?c.jsx(R,{analytics:I,onLoad:K}):null,c.jsx(B,{isTOSAccepted:C,acceptMasterTOSState:p.masterTOSAcceptanceState,showHeader:!1,togglePageView:C?()=>S(!1):void 0,onCloseClick:()=>S(!1),onCompleteClick:()=>{C||u.userRoleId==null||t(M(u.userRoleId)),S(!1)}})]});return c.jsxs(c.Fragment,{children:[c.jsxs(ft,{children:[c.jsx(R,{analytics:I,onLoad:i=>i.trackPageLoaded(De.Event.aiCFOPage)}),g&&Q.drawerElement,c.jsx(gt,{...Ce,currentChatSessionId:n,allSessionsWithOrderedQuestionAnswers:Z,allUsers:x,isAiCardCreationEnabled:T,isCardPolicyEnabled:v,openOnboardingPage:()=>S(!0),userId:a.userId,setIsAiCfoOpen:o,navigate:m,sessionFromUrl:l,location:s,isSubmitting:be,isEmptyChatWithSession:ge,currentTenant:u,emailLinkQuestion:de??void 0,autoSubmitEmailLinkQuestion:ce,onEmailLinkQuestionProcessed:pe,routedInitialQuestionSource:ue,routedInitialQuestionSuggestionIndex:me,onCardPolicyVendorSearchTextChange:b,onMenuClick:g?Q.open:void 0,isFileUploadEnabled:e,isUploadPromoVisible:ie,onUploadPromoClose:A,exploreSuggestedPromptQuestions:le,exploreSuggestedPromptQuestionsLoading:re}),h&&g?c.jsx(ut,{anchor:"right",open:h,transitionDuration:250,PaperProps:{component:It,style:{width:"100%"}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>S(!1),children:c.jsx(te,{onClick:i=>i.stopPropagation(),children:c.jsx(B,{isTOSAccepted:C,acceptMasterTOSState:p.masterTOSAcceptanceState,onCloseClick:()=>S(!1),onCompleteClick:()=>{C||u.userRoleId==null||t(M(u.userRoleId)),S(!1)}})})}):null]}),h&&!g?c.jsx(je,{open:h,onClose:()=>S(!1),children:c.jsx(Fe,{children:Ie})}):null]})},te=k(mt)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,ft=k.div`
6
- height: 100vh;
7
- width: 100%;
8
- `,Ct=k.div`
9
- height: 100vh;
10
- width: 100%;
11
- display: flex;
12
- flex-direction: column;
13
- min-height: 0;
14
- `,bt=k.div`
15
- flex: 1;
16
- min-height: 0;
17
- display: flex;
18
- flex-direction: column;
19
- `,It=k(pt)`
20
- box-shadow: ${({theme:e})=>e.colors.elevation2};
21
- color: ${({theme:e})=>e.colors.grey4};
22
- `;export{Rt as default};
@@ -1,11 +0,0 @@
1
- import{j as C}from"./liveblocks-BBLi67DG.js";import{a}from"./sentry-DW4kKH26.js";import{u as D,g as v,j as m,N as w}from"./core-D2KaS3N5.js";import{Md as O,eZ as A,g3 as _,oi as j,gz as E,g2 as U,fC as L,Mk as k}from"./zeni-epic-state-BJ_gdj7r.js";import{u as F,z as p,L as g,O as $,o as z}from"./index-CivdpZRT.js";import{n as H}from"./mui-C1ThRyKO.js";import{t as R}from"./getLocaleForTenant--JGxRDjE.js";import{g as M,Q as P}from"./QBOConnectionScreen-vAHPaqo7.js";import"./recharts-jHFM5Sob.js";import"./analytics-C2MbRoEp.js";import"./plaid-Do7hhR27.js";import"./dnd-D-AkKI2c.js";import"./stripe-cKAAJElX.js";import"./lottie-Dz6JZ58r.js";import"./lexical-BQ-Po3YF.js";import"./pdf-2k8d7AeQ.js";import"./utils-DIwqH7uj.js";import"./empty-D1hMU_8M.js";import"./pdf-lib-DqPqgk_2.js";import"./index-CHRJI22G.js";import"./url-8bOSIiqX.js";import"./index-Dyy6NuL-.js";import"./decodeURIComponentSafe-CD_zntJd.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new t.Error().stack;d&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[d]="9e95b26a-613c-4925-bb44-276fb8272b83",t._sentryDebugIdIdentifier="sentry-dbid-9e95b26a-613c-4925-bb44-276fb8272b83")}catch{}})();const G=H.div`
2
- display: flex;
3
- flex: 1 1 auto;
4
- flex-direction: row;
5
- justify-content: center;
6
- align-items: center;
7
- width: 100%;
8
- height: 100vh;
9
- background-color: ${t=>t.theme.colors.background};
10
- box-shadow: ${t=>`0px 2px ${z.sp1} ${t.theme.colors.dropShadowNormal}`};
11
- `;function ce(){const t=D(),d=v(),{setLoading:i,clearAllLoading:h}=F(),c=a.useRef(!1),f=a.useRef(!1),{code:x,realmId:T,state:y}=M(d.search),N=x!==""&&T!==""&&y!=="",I=m((l=>O(l))),e=m((l=>A(l))),n=m((l=>l.tenantState.fetchState)),r=m((l=>l.tenantState.activeTenantFetchState.fetchState)),o=p.getSignedInUser(),u=p.getActiveTenantForUser()?.tenantId,s=e?.externalConnections?.fetchState,b=e?.externalConnections?.saveConnectionState,S=e.externalConnections?.accounting[0]?.isValid;return a.useLayoutEffect((()=>{i(g.CONNECTION_AUTH)}),[i]),a.useEffect((()=>{c.current||o==null||u==null||(c.current=!0,n==="Completed"||r!=="Not-Started"&&r!=="Error"||(i(g.TENANT_FETCHING),t(_(o.userId,u))))}),[c,n,i]),a.useEffect((()=>{e.tenantId==null&&!f.current&&o!=null&&(f.current=!0,!(u==null||u!=null&&(r==="Completed"||r==="Error"))||n!=="Not-Started"&&n!=="Error"||t(j(o.userId)))}),[f,n,r]),a.useEffect((()=>{o==null||e?.tenantId==null||e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||s==="In-Progress"||b!=="Error"||(i(g.CONNECTION_AUTH),t(E(o.userId,e.tenantId)))}),[b]),a.useEffect((()=>{n!=="Completed"&&r!=="Completed"||o==null||e?.tenantId==null||(t(U(e.tenantId)),p.saveActiveTenantDomainForUser(e.tenantEmailDomain),L(o?.userId,o?.zeniSessionId,e.tenantId),$.updateAppLocaleID(R(k(e))),e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||s==="In-Progress"||o==null||e==null||t(E(o.userId,e.tenantId)))}),[n,r,s]),a.useEffect((()=>{I.tenantsCoreDetailsInOrder.length>0&&n==="Completed"&&p.saveSignedInUserTenants(I.tenantsCoreDetailsInOrder)}),[I.tenantsCoreDetailsInOrder.length,n]),a.useEffect((()=>{n!=="Completed"&&n!=="Error"||r!=="Completed"&&r!=="Error"||s!=="Completed"&&s!=="Error"||h()}),[n,r,s]),e==null||n!=="Completed"&&r!=="Completed"||s!=="Completed"?null:N||S!==!0?C.jsx(G,{children:C.jsx(P,{})}):C.jsx(w,{to:"/",replace:!0})}export{ce as default};
@@ -1 +0,0 @@
1
- import{j as i}from"./liveblocks-BBLi67DG.js";import{z as n}from"./index-CivdpZRT.js";import{g as d}from"./QBOConnectionScreen-vAHPaqo7.js";import"./sentry-DW4kKH26.js";import{g as p,N as s}from"./core-D2KaS3N5.js";import"./zeni-epic-state-BJ_gdj7r.js";import"./recharts-jHFM5Sob.js";import"./mui-C1ThRyKO.js";import"./analytics-C2MbRoEp.js";import"./plaid-Do7hhR27.js";import"./dnd-D-AkKI2c.js";import"./stripe-cKAAJElX.js";import"./lottie-Dz6JZ58r.js";import"./lexical-BQ-Po3YF.js";import"./pdf-2k8d7AeQ.js";import"./utils-DIwqH7uj.js";import"./empty-D1hMU_8M.js";import"./pdf-lib-DqPqgk_2.js";import"./index-CHRJI22G.js";import"./url-8bOSIiqX.js";import"./index-Dyy6NuL-.js";import"./decodeURIComponentSafe-CD_zntJd.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="817363c8-7f1d-4590-b58b-cef70b99ca15",t._sentryDebugIdIdentifier="sentry-dbid-817363c8-7f1d-4590-b58b-cef70b99ca15")}catch{}})();const U=()=>{const t=p(),{code:o,realmId:r,state:e}=d(t.search),m=n.getSignedInUser()?.userId??"";if(f(o,r,e,m)===!0){const a=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return i.jsx(s,{to:a})}return i.jsx(s,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
@@ -1,30 +0,0 @@
1
- import{j as a}from"./liveblocks-BBLi67DG.js";import{t as ht,A as Ne}from"./AddressScreen-CGTYstNo.js";import St from"./NotFoundScreen-BeJq256C.js";import{a as d}from"./sentry-DW4kKH26.js";import{h as be,g as ke,u as ae,i as Ie,j as I,N as B,l as Ct,n as tt,o as bt,p as H}from"./core-D2KaS3N5.js";import{eZ as X,fG as Oe,fE as _e,bs as kt,fU as It,bS as Ot,og as _t,tF as vt,tI as Tt,Nc as xt,Nd as wt,ki as he,kl as nt,MJ as Et,bZ as At,c7 as ue,u7 as ve,tU as Pt,Ne as de,u8 as at,KC as Dt,lm as ot,Nf as jt,Ng as Ft,rD as Bt,hx as Ut,MB as me,hu as Nt,MC as Vt,yk as Rt,rH as Lt,hm as Gt,hp as Ve,Nh as st,Ni as $t,En as Mt,Nj as Kt,Er as Qt,tL as zt,Nk as qt,Nl as Ht,kg as Zt,kj as Wt,uk as Jt,tW as it,u6 as Xt,bE as Re,cA as Yt,uj as Le,rW as en,rK as tn,le as nn,gl as an,gk as on,gj as sn,Nm as rn,tO as cn,ul as dn,uo as un,ur as ln,ux as pn,cZ as mn}from"./zeni-epic-state-BJ_gdj7r.js";import{z as L,A as Te,d as Z,c as gn,r as Q,C as oe,f as U,aq as fn,K as yn,v as rt,e as ct,ar as Ge,k as Se,h as Ce,as as hn,o as $e,at as Me,au as Sn,av as Ke,aw as Cn,ax as bn}from"./index-CivdpZRT.js";import{n as xe}from"./mui-C1ThRyKO.js";import{g as kn,h as In,q as se}from"./QBOConnectionScreen-vAHPaqo7.js";import{u as On,a as _n}from"./useEmailConnectResultRefresh-Ddee2XH0.js";import{u as vn}from"./useChargeCardPusherEvents-9ezHPs6j.js";import"./recharts-jHFM5Sob.js";import"./analytics-C2MbRoEp.js";import"./plaid-Do7hhR27.js";import"./dnd-D-AkKI2c.js";import"./stripe-cKAAJElX.js";import"./lottie-Dz6JZ58r.js";import"./lexical-BQ-Po3YF.js";import"./pdf-2k8d7AeQ.js";import"./utils-DIwqH7uj.js";import"./empty-D1hMU_8M.js";import"./pdf-lib-DqPqgk_2.js";import"./index-CHRJI22G.js";import"./url-8bOSIiqX.js";import"./index-Dyy6NuL-.js";import"./decodeURIComponentSafe-CD_zntJd.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},u=new e.Error().stack;u&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[u]="d0d24812-deb2-4704-a542-3fbf1e17d891",e._sentryDebugIdIdentifier="sentry-dbid-d0d24812-deb2-4704-a542-3fbf1e17d891")}catch{}})();const Qe=e=>{switch(e){case"Complete":return"yes";case"Pending Review":case"Incomplete":return"partially";default:return"no"}},Tn=()=>{const e=be(),u=ke(),i=ae(),[o,l]=d.useState(!1),[c,y]=d.useState(!1),{tenantEmailDomain:S}=Ie(),t=L.getSignedInUser(),{useFeatureGate:n}=Te(),{isFeatureEnabled:s}=n(Z.isApAgingFeatureEnabled),{isFeatureEnabled:C}=n(Z.isArAgingFeatureEnabled),{isFeatureEnabled:O}=n(Z.isReferralFeatureEnabled),{isFeatureEnabled:k}=n(Z.isExpenseAutomationEnabledV2),{isFeatureEnabled:x}=n(Z.isDebitCardFeatureEnabled),r=gn(),g=I((h=>X(h))),p=I((h=>h.onboardingCustomerViewState.fetchState)),_=g.excludedResources,T=g.companyId??L.getSignedInUserTenant(S)?.companyId;if(t==null)throw Error("Can't access onboarding flow without signing in...");const w=Oe(x,g),D=_e(g),m=[],G=_?.resources?.find((h=>h.resource==="/reports/top_expenses"))==null,j=_?.resources?.find((h=>h.resource==="/reports/task_card"))==null,$=g?.userRole!=null&&kt(g?.userRole),M=_?.resources?.find((h=>h.resource==="/bills"))==null&&!$,A=_?.resources?.find((h=>h.resource==="/reimbursements"))==null;G===!1&&m.push("top_expenses"),j===!1&&m.push("task_card"),M===!1&&m.push("bill_pay_card","bill_pay_promo_card"),A===!1&&m.push("reimbursement_card","reimbursement_promo_card"),m.push("zeni_accounts_promo_card","treasury_promo_card"),O===!1&&m.push("rewards_card");const F=I((h=>{const v=[];s===!1&&v.push("accounts_payable_aging"),C===!1&&v.push("accounts_receivable_aging"),v.push("zeni_accounts_promo_card","treasury_promo_card"),O===!1&&v.push("rewards_card"),r===!1&&v.push("expense_automation_card");const W=It(h,v,t,k,r);return Ot(W.reportsInOrder.map((P=>({fetchState:P.fetchState,error:P.error})))).fetchState}));d.useEffect((()=>{p!=="Completed"||o||w||D||(l(!0),i(_t(t.userId,T,g.tenantId,!0,!1,m)))}),[o,p,w,D,t,g.tenantId,i]);const z=d.useRef(!1),K=d.useCallback((()=>{const h={pathnameStackToGoBack:Q(u.state?.pathnameStackToGoBack,u.pathname),message:"activation"};e(w?"../../checking":D?"../../cards":"../../dashboard",{state:h})}),[e,u,w,D]),N=d.useCallback((()=>{z.current||(z.current=!0,K())}),[K]);if(d.useEffect((()=>{const h=setTimeout((()=>y(!0)),3e3);return()=>clearTimeout(h)}),[]),d.useEffect((()=>{const h=setTimeout(N,6e3);return()=>clearTimeout(h)}),[N]),d.useEffect((()=>{w||D||!c||F!=="Completed"&&F!=="Error"||N()}),[c,F,w,D,N]),p!=="Completed")return a.jsx(B,{to:"../"});const V=g.company?.companyOnboardingInfo?.onboardingInfo,q={timeSinceQuoteSign:V?.onboardingTimeSinceQuoteSigned??"",timeSinceQuoteSignInMinutes:V?.onboardingToQuoteSignMinutes??0,isKybDone:Qe(V?.businessVerified?.status),isKycDone:Qe(V?.identityVerified?.status),paymentType:"",paymentSource:"",qboConnectionSource:V?.accountingConnectionCreationMode??""};return a.jsxs(a.Fragment,{children:[a.jsx(oe,{analytics:U,onLoad:h=>h.trackOnboardingDashboardActivation(q)}),a.jsx(fn,{show:!0,onComplete:N})]})},ge=["reading_books","finance_graph","reconciliation","cfo_foundation"],fe=["llm_fine_tuning","rag_knowledge_graph","personalized_context"],ze=(e,u)=>{const i=new Map(e.map((o=>[o.key,o])));return u.map((o=>{return l=i.get(o)?.status,l==="starting"||l==="building"?l:"idle";var l}))},qe=(e,u)=>{if(e.length===0)return!1;const i=new Map(e.map((o=>[o.key,o])));return u.every((o=>i.get(o)?.status==="ready"))},He=xe.div`
2
- display: flex;
3
- height: 100vh;
4
- background-color: ${e=>e.theme.colors.grey4};
5
- `,Ze=xe.div`
6
- display: flex;
7
- flex-direction: column;
8
- align-items: center;
9
- flex: 1;
10
- min-width: 0;
11
-
12
- ${e=>e.skipLegacyDrawerOffset?`
13
- width: 100%;
14
- padding-left: ${$e.sp0};
15
- `:`
16
- min-width: calc(100% - ${Me}px);
17
- padding-left: ${Me}px;
18
- `}
19
-
20
- ${e=>e.theme.breakpoints.down("md")} {
21
- width: 100%;
22
- padding-left: ${$e.sp0};
23
- }
24
-
25
- ${e=>e.windowSize!=="small"?"overflow: auto;":""}
26
- `,We=tt((function(e,u){const{companyId:i,isAdmin:o,currentTenant:l,isOnAddressPage:c}=u,y=L.getSignedInUser(),S=l.tenantId,t={userId:y?.userId??"",sessionId:y?.zeniSessionId??"",tenantId:S??""},n=X(e),s=ve(e,i),C=st(e),O=ue(l?.userRole??[])&&s.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",k=$t(e.userRoleConfigState);return{onboardingCustomerView:s,analytics:U,isRefreshingViewInBackground:!1,isDisabled:O,companyTitles:k.companyTitles,connectedAccountProvider:n.company?.featuresActivationInfo.connectedAccountProvider??"",fileProps:{filesEndPoint:Sn.fileMicroServiceBaseUrl,authParams:t},signedInUser:L.getSignedInUser(),currentTenant:n,isAdmin:o,isOnAddressPage:c,meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true",cardPaymentView:C,isCardPaymentPopupOpen:!1,stripeKey:Se.stripeKey}}),(function(e,u){const{companyId:i,currentTenant:o,themeState:l,navigate:c,location:y}=u,{tenantEmailDomain:S}=o;return{onFetchLinkTokenClick:(t,n)=>{e(pn(t,n))},onEstablishConnectionClick:(t,n)=>{e(ln(t,n))},onUpdatePaymentAccountStatus:(t,n,s)=>{e(un(t,n,s))},onUpdatePaymentAccountLoginStatus:(t,n)=>{e(dn(!1,t,n))},onEstablishConnectionSuccess:()=>{e(cn(i,!0,!1))},handleOnConnectClick:()=>{U.trackOnboardingConnectQBO(),se.handleClick()},updateQBOPopupState:t=>{e(de({isQBOPopupOpen:t}))},onCompanyOfficerUpdated:t=>{const n=t.map((s=>{const{officerType:C,userId:O,name:k,email:x,ssn:r,nationalityCountryCode:g,dob:p,phone:_,syncToken:T,selectDocument:w,role:D,ownership:m,isSelectedForVerification:G,userVerificationStatus:j,fileIds:$,isPhoneVerified:M}=s;let A;return w.selectDocumentType==="driverLicense"?A="driving_license":w.selectDocumentType==="passport"?A="passport":w.selectDocumentType==="stateId"?A="id_document":w.selectDocumentType==="ssnCard"&&(A="social_security_card"),{officerType:C,userId:O,firstName:k.firstName,lastName:k.lastName,email:x,ssn:r,nationalityCountryCode:g?.selectedOption!=null?Ke(g.selectedOption):void 0,phone:_,birthday:p!=null?Re(p?.toString()):p,syncToken:T,titleAtCompany:D.selectedOption,ownershipInCompany:m,documentTypeSelectedForVerification:A,isSelectedForVerification:G,userVerificationStatus:j,fileIds:$,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1,isPhoneVerified:M}}));e(Le({officers:n}))},onGetOtp:(t,n)=>{e(sn(t,"CustomerOnboarding")),n!=null&&e(rn({officerType:n,phone:t}))},onResendOtp:t=>{e(on(t,"CustomerOnboarding"))},onVerifyOtp:(t,n)=>{e(an(t,n,"CustomerOnboarding"))},updateFilesEntity:t=>{e(nn({files:t}))},onDeleteFile:t=>{e(tn(t))},onEditFileName:(t,n)=>{e(en(t,n.split(".")[0]))},onCompanyDetailsChanged:t=>{const{companyDescription:n,companyIndustry:s,companyIndustryType:C,companyLegalName:O,companyTaxId:k,companyWebsite:x,companyPhone:r,primaryContactEmail:g,primaryContactName:p,primaryContactUserId:_,primaryContactSyncToken:T,syncToken:w,fileIds:D,typeOfIncorporation:m,stateOfIncorporation:G,incDate:j,companySourceOfFunds:$,companySourceOfFundsDescription:M,companySubIndustry:A,countriesOfOperations:F,purposeOfAccount:z,purposeOfAccountDescription:K,regulatedStatus:N,regulatedStatusDescription:V,transactionVolume:q,transactionVolumeDescription:h,usNexus:v,usNexusTypes:W}=t,P={companyId:i,companyDescription:n,companyIndustry:s.selectedOption,companyIndustryType:C?.selectedOption??"",companyLegalName:O,taxIdOrEIN:k,website:x!=""&&x!=null?Yt(x):void 0,phone:r,syncToken:w,fileIds:D,incDate:j!=null?Re(j?.toString()):j,typeOfIncorporation:m?.selectedOption??"",stateOfIncorporation:G?.selectedOption??"",companySourceOfFunds:$?.selectedOption??"",companySourceOfFundsDescription:M,companySubIndustry:A?.selectedOption??"",countriesOfOperations:F?.selectedOptions.map((Y=>Y.length===2?Y:Ke(Y)))??[],purposeOfAccount:z?.selectedOption??"",purposeOfAccountDescription:K,regulatedStatus:N??"",regulatedStatusDescription:V,transactionVolume:q?.selectedOption??"",transactionVolumeDescription:h,usNexus:v,usNexusTypes:W?.selectedOptions??[]},le={userId:_,firstName:p.firstName,lastName:p.lastName,email:g,syncToken:T};e(Le({companyDetails:P,primaryContactDetails:le}))},onAddressClick:(t,n)=>{const s=Xe(S,t,n),C=Q(y.state?.pathnameStackToGoBack,y.pathname);c(s,{state:{pathnameStackToGoBack:C}})},onRegisteredAddressClick:(t,n)=>{const s=Xe(S,t,n),C=Q(y.state?.pathnameStackToGoBack,y.pathname);c(s,{state:{pathnameStackToGoBack:C}})},onUpdateCustomerView:(t,n,s)=>{e(Xt(i,!1,n,s,t))},onAddressEditHandler:t=>{if(t!=null){const n=ht(t);e(ot({addressType:"subscription_billing_address",addressToCreate:n}))}},onSkipSetupClick:()=>{const t=Q(y.state?.pathnameStackToGoBack,y.pathname);e(it(i,!1,!1)),c("./activation",{state:{pathnameStackToGoBack:t}})},onUpdateStep:t=>{e(at({step:t}))},onUpdateSubStep:t=>{e(Jt({subStep:t}))},onZeniLogoClick:()=>{l.toggle()},handleLogOutClick:()=>{const t=Q(y.state?.pathnameStackToGoBack,y.pathname);c("/signout",{replace:!0,state:{pathnameStackToGoBack:t,message:"logout"}})},handleCockpitClick:()=>{window.open("/cockpit")},handleReferralsClick:()=>{c(`/${S}/rewards`)},handleCreateCardSetupIntent:t=>{e(nt(t))},handleConfirmCardSetupIntent:t=>{e(Wt(t))},updateCardPaymentModalState:t=>{e(de({isCardPaymentPopupOpen:t}))},handleAddCardPaymentSource:(t,n,s)=>{e(Zt(t,n,s))},handleFetchPaymentSources:()=>{e(he())},resetCardPaymentViewState:()=>{e(Ht())},handleResetCardPaymentErrorStatuses:()=>{e(qt())},redirectToProductSuitePage:()=>{const t=Q(y.state?.pathnameStackToGoBack,y.pathname);c(`/${S}/onboarding/thankyou`,{state:{pathnameStackToGoBack:t,message:"OnboardingThankyou"},replace:!0})},onAcknowledgeAiFinanceTeam:()=>{i!=null&&(U.trackOnboardingAiFinanceTeamAcknowledged(),e(zt(i)))},onIdentityDocumentUploadedForAutofill:t=>{if(i==null)return;const n=Kt(t.documentType);n!=null&&e(Qt({target:"onboarding",companyId:i,officerType:t.officerType,fileId:t.fileId,documentType:n}))},onCompanyDocumentUploadedForAutofill:t=>{i!=null&&e(Mt({target:"onboarding",companyId:i,fileId:t.fileId,documentType:t.documentType}))}}}))(hn),ce=({taxCFOCustomer:e=!1,isOnAddressPage:u=!1,appContent:i})=>{const o=be(),l=ke(),c=ae(),y=yn(),S=rt(),[t,n]=d.useState(!1),[s,C]=d.useState(!1),[O,k]=d.useState(!1),{tenantEmailDomain:x}=Ie(),r=ct(),{useFeatureGate:g}=Te(),{isFeatureEnabled:p}=g(Z.isDebitCardFeatureEnabled),_=Ct("/:tenantEmailDomain/onboarding")!==null&&l.search?.includes("code"),T=I((f=>f.onboardingCustomerViewState.fetchState)),w=I((f=>f.onboardingCustomerViewState.currentStep)),D=I((f=>f.onboardingCustomerViewState.uiState)),m=I((f=>X(f))),G=I((f=>f.userRoleConfigState.fetchState)),j=I((f=>f.cardPaymentViewState)),$=Ge(j.addCardPaymentSourceStatus.fetchState),M=j.addCardPaymentSourceStatus.fetchState,{code:A,realmId:F,state:z}=kn(l.search),K=m.externalConnections?.accounting[0],N=K?.connectionType,V=K?.connectionName,q=K?.connectionId??"",h=L.getSignedInUser()?.userId??"";d.useEffect((()=>{s||(C(!0),c(he()))}),[s,c]),d.useEffect((()=>{O||(nt(["card"]),k(!0))}),[O]),d.useEffect((()=>{$==="In-Progress"&&M==="Completed"&&c(he())}),[$,M]),d.useEffect((()=>{In(A,F,z,q,h)===!0&&m.externalConnections?.saveConnectionState!=="In-Progress"&&T==="Completed"&&(c(Et(m.tenantId,{connection_type:N??"accounting",connection_name:V??"quickbooks_online",authorization_code:A,realm_id:F,connection_id:q,user_id:h},At(window.location.origin+"/onboarding/auth"))),U.trackOnboardingSaveQBOConnection(F,q),o(l.pathname))}),[A,F,z,l.pathname,T]),d.useEffect((()=>{se.isInitiated===!1&&T==="Completed"&&se.init("/onboarding/auth",m.tenantEmailDomain)}),[T]);const v=m.companyId??L.getSignedInUserTenant(x)?.companyId,W=ue(m?.userRole??[]),P=I((f=>ve(f,v)));d.useEffect((()=>{t||T!=="Not-Started"||v==null||(n(!0),c(Pt(v,!0,!_)))}),[t,T,v]),d.useEffect((()=>{m.externalConnections?.saveConnectionState!=="Completed"&&m.externalConnections?.saveConnectionState!=="Error"||!D.isQBOPopupOpen||w!=="connect_ledger"||c(de({isQBOPopupOpen:!1}))}),[m.externalConnections?.saveConnectionState]),d.useEffect((()=>{T==="Completed"&&_&&(c(at({step:"connect_ledger"})),c(de({isQBOPopupOpen:!0})))}),[_,T]),d.useEffect((()=>{G==="Not-Started"&&c(Dt(!0))}),[G,c]);const le=Ge(P.companyDetailsLocalData?.addressStatus);d.useEffect((()=>{P.companyDetailsLocalData?.registeredAddressStatus?.addressToCreate==null&&P.companyDetailsLocalData?.addressStatus?.addressToCreate!=null&&le==null&&c(ot({addressType:"company_registered_address",addressToCreate:P.companyDetailsLocalData?.addressStatus?.addressToCreate}))}),[P.companyDetailsLocalData?.addressStatus?.addressToCreate,P.companyDetailsLocalData?.registeredAddressStatus?.addressToCreate]);const Y=P.isInterimEmailSent,we=L.getSignedInUser();if(we==null)throw Error("Can't access onboarding flow without signing in...");const dt=Oe(p,m),ut=_e(m),Ee=m.company?.companyOnboardingInfo.isOnboardingCompleted,Ae=f=>f.trackPageLoaded(Ce.Event.onboardingPage),Pe=m.productSettings.isOtherProductsEnabled,lt=m.productSettings.isTreasuryEnabled,De=xn({tenantEmailDomain:x??"",signedInUserEmail:we.userEmail??"",companyId:v}),je=(({companyId:f})=>{const R=ae(),ie=I((E=>E.onboardingCustomerViewState?.aiAgentsActivation)),ee=I((E=>X(E).company?.companyOnboardingInfo?.onboardingInfo?.onboardingAiActivationInfo?.isOnboardingAiActivationViewed??!1)),pe=d.useCallback((()=>{R(vt())}),[R]);d.useEffect((()=>{pe()}),[pe]);const Fe=d.useCallback((()=>{f==null||f===""||ee||R(Tt(f))}),[f,ee,R]),pt=d.useMemo((()=>{if(f==null||f==="")return[];const E=`private-encrypted-${f}`;return[`${E}.ledger-ingestion.counts-updated`,`${E}.ai-agents-activation.phase-changed`]}),[f]),mt=d.useCallback(((E,te)=>{if(te==null||typeof te!="object")return;const b=te;if(E!=="ledger-ingestion.counts-updated"){if(E==="ai-agents-activation.phase-changed"){const re=typeof b.phase_key=="string"?b.phase_key:typeof b.key=="string"?b.key:"",J=typeof b.status=="string"?b.status:"idle";if(re==="")return;R(wt({key:re,status:J==="starting"||J==="building"||J==="ready"?J:"idle",startedAt:typeof b.started_at=="string"?b.started_at:void 0,completedAt:typeof b.completed_at=="string"?b.completed_at:void 0}))}}else R(xt({customerCount:typeof b.customer_count=="number"?b.customer_count:void 0,glAccountCount:typeof b.gl_account_count=="number"?b.gl_account_count:void 0,targetTransactionCount:typeof b.target_transaction_count=="number"?b.target_transaction_count:void 0,transactionCount:typeof b.transaction_count=="number"?b.transaction_count:void 0,vendorCount:typeof b.vendor_count=="number"?b.vendor_count:void 0}))}),[R]);return vn({events:pt,onEvent:mt,onSubscribed:pe}),d.useMemo((()=>{const E=ie?.phases??[],te=ze(E,ge),b=ze(E,fe),re=qe(E,ge),J=qe(E,fe),Be=E.some((yt=>yt.status!=="idle")),ne=!ee&&!Be,Ue=ee&&!Be,gt=Ue?ge.map((()=>"building")):te,ft=Ue?fe.map((()=>"building")):b;return{ledgerRowStatuses:ne?void 0:gt,backgroundRowStatuses:ne?void 0:ft,showLedgerReadyInLabel:ne?void 0:re,showBackgroundReadyInLabel:ne?void 0:J,forceContinueEnabled:!ne||void 0,counts:ie?.counts,onContinueClicked:Fe}}),[ie?.phases,ie?.counts,ee,Fe])})({companyId:v});if(Ee===!0){if(!Pe)return lt?a.jsx(B,{to:"../../treasury"}):dt?a.jsx(B,{to:"../../checking"}):ut?a.jsx(B,{to:"../../cards"}):a.jsx(B,{to:"../../dashboard"});const f=P.updateStatus.fetchState==="In-Progress";if(Pe&&!f)return e?a.jsxs(He,{children:[a.jsx(oe,{analytics:U,onLoad:R=>Ae(R)}),a.jsx(We,{navigate:o,location:l,companyId:v,currentTenant:m,isAdmin:W,isOnAddressPage:u,themeState:S,googleAPIKey:Se.googleMapsAPIKey,integrationsSectionProps:De,aiAgentsActivationProps:je}),i!=null?a.jsx(Ze,{windowSize:y,skipLegacyDrawerOffset:u&&m.productSettings.isOtherProductsEnabled!==!0,children:i}):null]}):a.jsx(B,{to:"../../onboarding/thankyou"})}else if(Ee===!1&&r?.loggedInUserRoleMap!=null)return Y===!0?a.jsx(B,{to:"../../onboarding/thankyou"}):a.jsxs(He,{children:[a.jsx(oe,{analytics:U,onLoad:f=>Ae(f)}),a.jsx(We,{navigate:o,location:l,companyId:v,currentTenant:m,isAdmin:W,isOnAddressPage:u,themeState:S,googleAPIKey:Se.googleMapsAPIKey,integrationsSectionProps:De,aiAgentsActivationProps:je}),i!=null?a.jsx(Ze,{windowSize:y,skipLegacyDrawerOffset:u&&m.productSettings.isOtherProductsEnabled!==!0,children:i}):null]});return null},ye="external_integrations",xn=({tenantEmailDomain:e,signedInUserEmail:u,companyId:i})=>{const o=ae(),{pendingAutoFocusTabId:l}=On(),{plaidAccounts:c,onAddPlaidAccount:y}=_n({companyId:i}),S=I((r=>r.plaidAccountViewState.external_account.plaidConnectionDetails)),t=I((r=>X(r))),n=I((r=>r.tenantState.fetchState)),s=I((r=>jt(r,i))),C=I((r=>Ft(r,ye))),O=d.useMemo((()=>new Set(C.map((r=>r.additionalInfo)).filter((r=>r!=null)))),[C]),k=t.tenantId,x=ue(t.userRole??[]);return d.useEffect((()=>{o(Bt(ye))}),[o]),d.useMemo((()=>({isAdmin:x,integrationsView:s,isLoading:n==="In-Progress",notifyMeRegisteredSlugs:O,autoFocusTabId:l??void 0,saveChargeBeeState:s.externalConnections?.saveAPIKeyConnectionState??"Not-Started",saveChargeBeeError:s.externalConnections?.saveAPIKeyConnectionError?.message,saveHubSpotState:s.externalConnections?.saveOAuthConnectionState??"Not-Started",saveHubSpotError:s.externalConnections?.saveOAuthConnectionError?.message,saveConnectorCredentialsStateBySlug:s.externalConnections?.saveConnectorCredentialsStateBySlug??{},saveConnectorCredentialsErrorBySlug:Object.fromEntries(Object.entries(s.externalConnections?.saveConnectorCredentialsErrorBySlug??{}).map((([r,g])=>[r,g?.message]))),deleteConnectionState:s.externalConnections?.deleteConnectionState??"Not-Started",deleteConnectionError:s.externalConnections?.deleteConnectionError?.message,onConnectGmail:()=>{o(Ve(k,"gmail",Je()))},onConnectOutlook:()=>{o(Ve(k,"outlook",Je()))},onConnectHubSpot:(r,g)=>{const p=s.externalConnections?.revenue?.find((T=>T.connectionName==="hubspot"))?.connectionId;if(p==null)return;const _=`${window.location.origin}/oauth/hubspot/callback`;sessionStorage.setItem("hubspot_oauth_pending",JSON.stringify({client_id:r,client_secret:g,connection_id:p,redirect_uri:_,tenant_id:k})),window.location.href=`https://app.hubspot.com/oauth/authorize?client_id=${encodeURIComponent(r)}&scope=${encodeURIComponent("oauth crm.objects.deals.read crm.objects.owners.read")}&redirect_uri=${encodeURIComponent(_)}`},onDisconnect:(r,g)=>{o(Gt(k,r,me(g)))},onNotifyMe:r=>{U.trackIntegrationsNotifyMeClicked("Onboarding",r),o(Lt(ye,r,u))},onReconnectQBO:()=>{se.init("/onboarding/auth",e),se.handleClick()},onRefreshClick:()=>{s.integrations.refreshQBO.fetchState!=="In-Progress"&&o(Rt())},onSaveChargeBeeCredentials:(r,g)=>{const p=s.externalConnections?.revenue?.find((_=>_.connectionName==="chargebee"))?.connectionId;p!=null&&o(Nt(k,p,me("revenue"),Vt("chargebee"),{api_key:r,site:g}))},onSaveConnectorCredentials:r=>{o(Ut(k,me("payments"),r))},plaidAccounts:c,onAddPlaidAccount:y,plaidConnectionDetails:S})),[x,s,n,O,l,k,u,e,o,c,y,S])};function Je(){const e=new URL(window.location.href);return e.searchParams.set("onboarding_step","connect_data_source"),e.toString()}function Xe(e,u,i){let o=`/${e}/onboarding/address`;return o=i!=null?o.concat(`/edit/${u}/${encodeURIComponent(i)}`):o.concat(`/new/${u}`),o}const Ye=xe.div`
27
- display: flex;
28
- height: 100vh;
29
- background-color: ${e=>e.theme.colors.grey4};
30
- `,et=tt((function(e,u){const{companyId:i,currentTenant:o}=u,l=ve(e,i),c=st(e);return{hasVerifiedBankAccount:(l.paymentAccount?.providerVerificationStatus?.code?.includes("verified")??!1)||(c.bankAccountsList[0]?.providerVerificationStatus?.code?.includes("verified")??!1),isDisabled:ue(o?.userRole??[])&&l.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",signedInUser:L.getSignedInUser(),currentTenant:o,meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true"}}),(function(e,u){const{currentTenant:i,themeState:o,navigate:l,location:c}=u,{tenantEmailDomain:y}=i;return{onZeniLogoClick:()=>{o.toggle()},handleLogOutClick:()=>{const S=Q(c.state?.pathnameStackToGoBack,c.pathname);l("/signout",{replace:!0,state:{pathnameStackToGoBack:S,message:"logout"}})},handleCockpitClick:()=>{window.open("/cockpit")},handleReferralsClick:()=>{l(`/${y}/rewards`)},handleUpdatePaymentAddressDetailClick:()=>{const S=Q(c.state?.pathnameStackToGoBack,c.pathname);l(`/${y}/onboarding/billing/edit`,{state:{pathnameStackToGoBack:S,message:"UpdatePaymentAddressDetail"}})}}}))(bn),wn=()=>{const e=be(),u=ae(),i=ke(),o=rt(),{useFeatureGate:l}=Te(),{isFeatureEnabled:c}=l(Z.isDebitCardFeatureEnabled),{tenantEmailDomain:y}=Ie(),S=ct(),[t,n]=d.useState(!1);d.useEffect((()=>{t===!1&&i.state?.message==="OnboardingThankyou"&&n(!0)}),[i.state]);const s=I((p=>X(p))),C=s.productSettings.isOtherProductsEnabled;d.useEffect((()=>{u(it(O,!1,!C))}),[]);const O=s.companyId??L.getSignedInUserTenant(y)?.companyId;if(S.loggedInUser==null)throw Error("Can't access onboarding flow without signing in...");const k=Oe(c,s),x=_e(s),r=I((p=>p.onboardingCustomerViewState.updateStatus.fetchState)),g=s.company?.companyOnboardingInfo.isOnboardingCompleted;if(g!==!0||C)return r==="Completed"&&g===!0&&C&&S?.loggedInUserRoleMap!=null?a.jsxs(Ye,{children:[a.jsx(oe,{analytics:U,onLoad:p=>{p.trackPageLoaded(Ce.Event.onboardingLandingPage,"Onboarding",mn(s.productSettings))}}),a.jsx(et,{navigate:e,showUpdatePaymentDetailButton:C,location:i,companyId:O,currentTenant:s,themeState:o,isVisitingFirstTime:t})]}):r==="Completed"&&g===!1&&S?.loggedInUserRoleMap!=null?a.jsxs(Ye,{children:[a.jsx(oe,{analytics:U,onLoad:p=>{p.trackPageLoaded(Ce.Event.onboardingInterimPage)}}),a.jsx(et,{navigate:e,showUpdatePaymentDetailButton:C,location:i,companyId:O,currentTenant:s,themeState:o,isVisitingFirstTime:t})]}):a.jsx(Cn,{});{const p={pathnameStackToGoBack:i.state?.pathnameStackToGoBack,message:"activation"};return k?a.jsx(B,{to:"../../checking",state:p,replace:!0}):x?a.jsx(B,{to:"../../cards",state:p,replace:!0}):a.jsx(B,{to:"../../dashboard",state:p,replace:!0})}};function ta(){return a.jsxs(bt,{children:[a.jsx(H,{path:"/",element:a.jsx(ce,{})}),a.jsx(H,{path:"/billing/edit",element:a.jsx(ce,{taxCFOCustomer:!0})}),a.jsx(H,{path:"/thankyou",element:a.jsx(wn,{})}),a.jsx(H,{path:"/activation",element:a.jsx(Tn,{})}),a.jsx(H,{path:"/address/edit/:addressType/:addressId",element:a.jsx(ce,{isOnAddressPage:!0,appContent:a.jsx(Ne,{})})}),a.jsx(H,{path:"/address/new/:addressType",element:a.jsx(ce,{isOnAddressPage:!0,appContent:a.jsx(Ne,{})})}),a.jsx(H,{path:"*",element:a.jsx(St,{})})]})}export{ta as default};
@@ -1,18 +0,0 @@
1
- import{j as l}from"./liveblocks-BBLi67DG.js";import{h as w,g as C,j as h,n as A,i as $}from"./core-D2KaS3N5.js";import{Qk as k,Qr as _,gl as W,gk as K,gj as q,jD as J,Nu as L,rN as M,eZ as D,PS as V,jB as T,Ql as S,Qu as j,jz as F,jW as G}from"./zeni-epic-state-BJ_gdj7r.js";import{bz as X,K as N,A as R,z as U,y as z,p,d as v,B as Z,bA as Y,o as O,bB as ee,r as te}from"./index-CivdpZRT.js";import{n as Q}from"./mui-C1ThRyKO.js";import"./sentry-DW4kKH26.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]="f3995963-2004-4347-b2d7-85caa3b65958",e._sentryDebugIdIdentifier="sentry-dbid-f3995963-2004-4347-b2d7-85caa3b65958")}catch{}})();const ne=A(null,(function(e,t){return{onSaveVendor:n=>{e(J(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(L("common")),n!=null&&e(M(n))},onGetOtp:n=>{e(q(n,"BillPayVendor"))},onResendOtp:n=>{e(K(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(W(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(_(n,a,o))}}}))(X);function H({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h((i=>k(i,e)));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=Q.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
- `,oe=A((function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=V(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}}),(function(e,t){const{navigate:n,location:a,vendorId:o}=t;return{onFetchBankName:s=>{e(G(s))},onSaveHandler:s=>{e(F(t.bankAccountContext,s,"standard",o))},onCancel:()=>{(()=>{const s=p(a.state?.pathnameStackToGoBack),i=s.poppedPathname??E();n(i,{state:{pathnameStackToGoBack:s.newStack}})})(),e(S())},onACHDetailsUpdated:s=>{const{bankAccountSection:i}=s;e(j({data:i}))},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")n("../",{relative:"path"});else{const s=p(t.location.state?.pathnameStackToGoBack),i=s.poppedPathname??E(0);t.navigate(i,{state:{pathnameStackToGoBack:s.newStack}})}e(S())}}}))(Y);function me({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=N(),{vendorId:s,billId:i}=$(),d=e??s,{useFeatureGate:r}=R(),c=U.getSignedInUser(),b=h((u=>D(u))),g=z(),x=p(a.state?.pathnameStackToGoBack),m=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),f=h((u=>k(u,d))),{isFeatureEnabled:I}=r(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=r(v.isDepositAccountsFeatureEnabled);if(c==null)throw Error("Can't access address page without signing in...");return m==="billDetail"&&f.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(Z,{fetchState:f.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:g.colors.grey5}}):l.jsxs(ae,{windowSize:o,children:[l.jsx(H,{vendorId:d,billId:i}),l.jsx(oe,{location:a,navigate:n,billId:i,vendorId:d,currentTenant:b,bankAccountContext:m,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const E=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},fe=(e,t,n)=>{let a=`/${e}/bill/${encodeURIComponent(t)}`;return n=="draft"&&(a+="/edit"),a},he=e=>`/${e}/bills`,ke=(e,t)=>{let n=`/${e}/bill`;return n=t!=null?n.concat(`/${t}/edit`):n.concat("/new"),n},B=(e,t,n,a)=>{let o=`/${e}/bill`;return o+=n!=null?`/${n}/edit/vendor`:"/new/vendor",o+=a!=null?`/${a}/edit/${t}`:`/create/${t}`,o};function Se(e,t,n){return B(e,"ach",t,n)}function ve(e,t,n){return B(e,"domestic",t,n)}function ge(e,t,n){return B(e,"international",t,n)}const se=(e,t,n)=>{let a=`/${e}/bill/`;return a=n!=null?a.concat(`${encodeURIComponent(n)}/${t}/`):a.concat(`new/${t}/`),a},re=Q.div`
10
- display: flex;
11
- height: 100vh;
12
- width: 100%;
13
- flex: 1 1 auto;
14
- flex-direction: column;
15
- align-items: center;
16
- background-color: ${e=>e.theme.colors.grey4};
17
- box-shadow: ${e=>`0px 2px ${O.sp1} ${e.theme.colors.dropShadowNormal}`};
18
- `,ie=A((function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=V(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}}),(function(e,t){const{billId:n,navigate:a,location:o,vendorId:s,currentTenant:i}=t,{tenantEmailDomain:d}=i;return{onFetchBankName:r=>{e(G(r))},onSaveHandler:r=>{e(F(t.bankAccountContext,r,"us-domestic",s))},onWireDetailsUpdated:r=>{const{bankAccountSection:c}=r;e(j({data:c}))},onCancel:()=>{(()=>{const r=p(o.state?.pathnameStackToGoBack),c=r.poppedPathname??P();a(c,{state:{pathnameStackToGoBack:r.newStack}})})(),e(S())},onAddressClick:r=>{if(t.bankAccountContext==="express-pay")a("./add-address");else{const c=se(d,r,n),b=te(o.state?.pathnameStackToGoBack,o.pathname);a(c,{state:{pathnameStackToGoBack:b}})}},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")a("../",{relative:"path"});else{const r=p(t.location.state?.pathnameStackToGoBack),c=r.poppedPathname??P(0);t.navigate(c,{state:{pathnameStackToGoBack:r.newStack}})}e(S())}}}))(ee);function xe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=N(),{vendorId:s,billId:i}=$(),d=e??s,r=U.getSignedInUser(),{useFeatureGate:c}=R(),b=z(),g=h((u=>D(u))),x=p(a.state?.pathnameStackToGoBack),m=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),f=h((u=>k(u,d))),{isFeatureEnabled:I}=c(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=c(v.isDepositAccountsFeatureEnabled);if(r==null)throw Error("Can't access address page without signing in...");return m==="billDetail"&&f.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(Z,{fetchState:f.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:b.colors.grey5,boxShadow:`0px 2px ${O.sp1} ${b.colors.dropShadowNormal}`}}):l.jsxs(re,{windowSize:o,children:[l.jsx(H,{vendorId:d,billId:i}),l.jsx(ie,{location:a,navigate:n,billId:i,vendorId:d,currentTenant:g,bankAccountContext:m,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const P=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t};export{me as A,xe as D,H as V,fe as a,se as b,ke as c,ve as d,he as g,ge as i,Se as v};
@@ -1 +0,0 @@
1
- import{j as d}from"./liveblocks-BBLi67DG.js";import{K as b,F as l,y as f}from"./index-CivdpZRT.js";import{D as c}from"./mui-C1ThRyKO.js";import"./sentry-DW4kKH26.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="89fbbb96-b48a-4b8e-a23e-0117ebf93880",e._sentryDebugIdIdentifier="sentry-dbid-89fbbb96-b48a-4b8e-a23e-0117ebf93880")}catch{}})();const p={drawerLeftMargin:new l(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:a}=e,n=b(),s=o?.valuePx(n)??p.drawerLeftMargin.valuePx(n),i=f();return d.jsx(c,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:i.colors.black,opacity:.8,cursor:"pointer"}}},onClose:a,children:t})}export{h as D};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-BBLi67DG.js";import{a as c}from"./sentry-DW4kKH26.js";import{h as N,u as O,g as A,i as B,j as d,N as q,n as F,o as _,p as z}from"./core-D2KaS3N5.js";import{OC as H,eZ as K,N_ as M,lG as R,Kv as I,OH as W,Nt as Y,kG as $,Kw as S,O3 as V,O4 as X,Nv as Z,Nu as J}from"./zeni-epic-state-BJ_gdj7r.js";import{aX as L,f as Q,p as U,r as tt}from"./index-CivdpZRT.js";import"./mui-C1ThRyKO.js";import{d as k}from"./decodeURIComponentSafe-CD_zntJd.js";import{w as et}from"./withTransactionSidePanel-DWx4OX2G.js";import{f as at,c as nt}from"./routePaths-TRamKMNj.js";import"./recharts-jHFM5Sob.js";import"./analytics-C2MbRoEp.js";import"./plaid-Do7hhR27.js";import"./dnd-D-AkKI2c.js";import"./stripe-cKAAJElX.js";import"./lottie-Dz6JZ58r.js";import"./lexical-BQ-Po3YF.js";import"./pdf-2k8d7AeQ.js";import"./utils-DIwqH7uj.js";import"./useAskAiCfoHostNavButtonProps-CNoSipqI.js";import"./TransactionDetailScreen-B77dqrVQ.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="73f378c2-e1b0-4cc0-a56c-7e99ac27e25a",a._sentryDebugIdIdentifier="sentry-dbid-73f378c2-e1b0-4cc0-a56c-7e99ac27e25a")}catch{}})();const ot=F((function(a,t){const e=t.entity,o=W(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:Y(a,"common")},trendWithTransactionsReport:o,analytics:Q,isAccountingClassesEnabled:$(a)}}),(function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,l=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:l}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(Z({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(J("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(V()),a(X()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=U(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??C();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(I(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(L),it=et((function({entityType:a,...t}){const e=N(),o=O(),l=A(),[m,T]=c.useState(!1),[h,D]=c.useState(!1),{tenantEmailDomain:b,entityIdEncoded:v,entityNameEncoded:w}=B(),r=k(v??""),p=k(w??""),u=rt(r,p),G=[r,p].filter((n=>n!=null)),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=d((n=>H(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),j=d((n=>K(n).company?.companyInfo.firstMonthOfFY??1)),f=d((n=>M(n.trendWithTransactionsState,i,"EntityDetail")));c.useEffect((()=>{m===!1&&u===!0&&(T(!0),o(R(i)))}),[m,u,i]);const E=d((n=>n.trendState.fetchState)),P=f?.selectedPeriod?.timePeriod??g,x=(function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y})(f?.selectedPeriod?.timePeriod,g);return c.useEffect((()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(I(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))}),[m,h,E]),u?s.jsx(ot,{firstMonthOfFY:j,tenantEmailDomain:b,location:l,navigate:e,entity:i,defaultTransactionTimePeriod:x,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(q,{to:C(G.length)})})),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,C=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function vt({entityType:a}){return s.jsx(_,{children:s.jsx(z,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{vt as EntityDetailRoutes,vt as default};
@@ -1,25 +0,0 @@
1
- import{j as S}from"./liveblocks-BBLi67DG.js";import ca from"./NotFoundScreen-BeJq256C.js";import{a,b as en}from"./sentry-DW4kKH26.js";import{n as Le,S as ia}from"./mui-C1ThRyKO.js";import{u as Se,h as tn,g as tt,j as w,n as la,i as Bt,o as ra,p as Qe}from"./core-D2KaS3N5.js";import{eZ as Oe,Ti as da,os as ve,f_ as ua,so as ma,Tj as We,fB as nt,Tk as Vt,ei as pa,fk as ha,Tl as Ot,Tm as Be,p8 as ga,Tn as Ca,pp as Sa,oJ as nn,gr as ue,gt as fa,To as Ia,p2 as an,pj as ka,Tp as on,oD as Ea,rW as Ta,fL as ye,Tq as _e,uu as sn,EQ as cn,Tr as ln,Ts as ba,ru as at,OD as _t,OF as ya,kJ as va,OG as Aa,kQ as Pa,c_ as wa,vK as ot,oP as rn,pt as ze,Tt as Ra,Nv as zt,Nu as Ue,Tu as Mt,l5 as xa,Tv as Da,Tw as Fa,Tx as Ua,Ty as Ba,oW as Va,pw as Ve,Tz as Oa,TA as _a,TB as za,pD as Ma,kU as La,kL as ja,TC as qa,kT as Lt,ON as $a,TD as Ga,TE as Na,rq as Ja,r2 as Ya,pu as Ce,r1 as He,TF as Ka,TG as Za,TH as Qa,mo as Wa,bo as Ha,mj as jt,m5 as Xa,TI as eo,gE as to,mg as no,xD as ao,TJ as oo,q2 as so,pZ as co,q1 as io,pO as lo,TK as ro,fO as dn,pc as uo,oS as mo,f$ as qt,py as po,TL as ho,TM as go,pv as un,TN as Co,TO as So,TP as fo,TQ as Io,TR as $t,rC as ko,qV as Eo,Nt as To,TS as bo,TT as yo,kS as vo,TU as Ao,Jw as Po,kR as wo,kG as Ro,fN as xo,qr as mn,qN as Do,ps as Gt,px as Fo,bE as Uo,md as Bo,ma as Vo,TV as Oo,pN as Nt,qJ as Jt,qH as _o,TW as zo,qw as Mo,qc as Lo,qK as jo,TX as qo,TY as $o,qg as Go,TZ as No,q7 as Jo,qf as Yo,qd as Ko,qQ as Zo}from"./zeni-epic-state-BJ_gdj7r.js";import{A as Me,d as K,f as J,r as ie,_ as pn,a0 as hn,cZ as Qo,z as je,c_ as Wo,c$ as Ho,d0 as Xo,au as Ae,d1 as es,d2 as Yt,aZ as Kt,B as gn,d3 as ts,ar as Xe,O as ns,a9 as as,d4 as os,a4 as ss,d5 as cs,Z as is,d6 as ls,d7 as rs,v as ds,e as us,aS as ms,d8 as ps,d9 as hs,be as gs,F as Cs,aV as Ss}from"./index-CivdpZRT.js";import{u as Cn}from"./useAskAiCfoHostNavButtonProps-CNoSipqI.js";import{f as Zt,a as fs,b as Is,g as ks,C as Es}from"./TransactionDetailScreen-B77dqrVQ.js";import{w as Ts}from"./withTransactionSidePanel-DWx4OX2G.js";import{h as bs,v as ys}from"./routePaths-TRamKMNj.js";import{g as et}from"./accountMappingHelper-BmtW64tm.js";import{D as vs}from"./DrawerScreen-YrXahOEM.js";import"./recharts-jHFM5Sob.js";import"./analytics-C2MbRoEp.js";import"./plaid-Do7hhR27.js";import"./dnd-D-AkKI2c.js";import"./stripe-cKAAJElX.js";import"./lottie-Dz6JZ58r.js";import"./lexical-BQ-Po3YF.js";import"./pdf-2k8d7AeQ.js";import"./utils-DIwqH7uj.js";import"./decodeURIComponentSafe-CD_zntJd.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="f5f727af-ec2e-4196-8807-e7a058572001",t._sentryDebugIdIdentifier="sentry-dbid-f5f727af-ec2e-4196-8807-e7a058572001")}catch{}})();const As=()=>{const t=Se(),s=tn(),A=tt(),E=w((u=>Oe(u))),{useFeatureGate:b}=Me(),{isFeatureEnabled:i}=b(K.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:m}=b(K.aiAuditScorePercentage),f=w((u=>u.expenseAutomationViewState.selectedPeriodByTenantId)),c=w((u=>da(u,E.tenantId))),{isAiCfoAccessEnabled:C,onAskAiCfoClick:h}=Cn({mobileExploreReferrer:"Month-End Close Overview"}),P=a.useCallback(((u,z,ae=!1)=>{t(ve({tenantId:z,period:{month:u.month,year:u.year},refreshViewInBackground:ae}))}),[]),v=a.useCallback((u=>{const z=A.state?.referrer;c.monthEndCloseChecks?.auditSummary!=null&&J.trackMonthCloseAuditPage(u.month,u.year,c.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",c.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,z??null),t(ua(E.tenantId,u))}),[E.tenantId,c.monthEndCloseChecks?.auditSummary,c.monthEndCloseChecks?.reportEmailSentDate]),r=f[E.tenantId],p=a.useCallback((()=>{const u=A.state?.referrer;c.monthEndCloseChecks?.auditSummary!=null&&J.trackMonthCloseAuditPage(r.month,r.year,c.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",c.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,u??null),P(r,E.tenantId,!0)}),[P,r,E.tenantId,c.monthEndCloseChecks?.auditSummary,c.monthEndCloseChecks?.reportEmailSentDate]),B=ie(A.state?.pathnameStackToGoBack,A.pathname),R=a.useCallback((()=>{if(c.monthEndCloseChecks!=null&&r!=null){const u=c.monthEndCloseChecks.monthEndCloseCheckList.find((z=>z.progress<100));if(u!=null)return void s(`./${u.id}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:B,message:"comingFromOverview"}});s(`./month_end_insights/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:B,message:"comingFromOverview"}})}}),[c.monthEndCloseChecks,r]),{areTenantIdsInSync:I}=pn();return hn({isDataReady:c.fetchState==="Completed"}),a.useEffect((()=>{r!=null&&c.fetchState!=="In-Progress"&&c.fetchState!=="Completed"&&I&&P(r,E.tenantId)}),[P,r,c.fetchState,E.tenantId,I]),a.useEffect((()=>{r!=null&&c.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&c.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&I&&t(ma(r))}),[r,c.monthClosePerformanceTrendFetchStatus.fetchState,I]),a.useEffect((()=>{const u=setInterval((()=>{c.fetchState!=="In-Progress"&&c.fetchState==="Completed"&&p()}),3e5);return()=>clearInterval(u)}),[c.fetchState]),a.useEffect((()=>{if(c.fetchState==="Completed"&&c.monthEndCloseChecks?.auditSummary!=null){const u=A.state?.referrer;J.trackMonthCloseAuditPage(c.selectedPeriod.month,c.selectedPeriod.year,c.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",c.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,u??null)}}),[c.fetchState,c.selectedPeriod,c.monthEndCloseChecks?.auditSummary,c.monthEndCloseChecks?.reportEmailSentDate]),S.jsx(Ps,{children:S.jsx(Qo,{monthEndCloseChecksView:c,isRealtimeInsightsFeatureEnabled:i,onMonthEndCheckClick:u=>{s(`./${u}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:B,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:v,handleReviewButtonClick:R,onBackClick:()=>{s("../../dashboard")},onReload:p,isAiCfoAccessEnabled:C,onAskAiCfoClick:h,aiAuditScorePercentageEnabled:m})})},Ps=Le.div`
2
- display: flex;
3
- height: 100vh;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- background-color: ${t=>t.theme.colors.grey4};
8
- `,ws=en.memo((({reconciliation:t,selectedDrawerAccountId:s,onClose:A,onFetchLinkTokenClick:E,onEstablishConnectionClick:b})=>{const i=Se(),{useFeatureGate:m}=Me(),{isFeatureEnabled:f}=m(K.isReconV3Enabled),c=je.getSignedInUser(),C=w((k=>Oe(k))),h=t.excludedAccountIDs,P=a.useMemo((()=>({userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:C?.tenantId??""})),[c?.userId,c?.zeniSessionId,C?.tenantId]),{accountReconciliationsByAccountID:v,monthYearPeriod:r,statementUploadChosen:p}=t,B=v[s],R=a.useRef(!1),I=a.useCallback((k=>{R.current=k,Yt(s,k)}),[s]),u=a.useCallback((k=>{i(We({accountId:s,selectedPeriod:r,dismissedToBackground:!0,backgroundCompletedSteps:k.completedSteps,startedAtMs:k.startedAtMs,totalDurationSeconds:k.totalDurationSeconds})),B!=null&&requestAnimationFrame((()=>{R.current||i(nt({messageSection:"statement_parsing_in_progress",messageText:"success",type:"info",showStatusIcon:!0,variables:[{variableName:"_account_name_",variableValue:Wo(B)}]}))}))}),[i,r,B,s]),z=a.useCallback((()=>{i(We({accountId:s,selectedPeriod:r,dismissedToBackground:!1}))}),[i,s,r]),ae=a.useCallback((k=>{i(Vt({accountId:s,selectedPeriod:r,backgroundCompletedSteps:k}))}),[i,r,s]),j=a.useCallback((()=>{i(Vt({accountId:s,selectedPeriod:r,backgroundCompletedSteps:0})),i(We({accountId:s,selectedPeriod:r,dismissedToBackground:!1}))}),[i,r,s]);a.useEffect((()=>()=>{Yt(null,!1)}),[]);const V=B?.parsedStatementData?.statementUpload?.statementMeta?.statementUploadId??B?.accountReconEntity.statementMetaData?.statementUploadId,e=B?.statementDateConflict?.previousReconciliationInfo?.reconciledByUserId,n=w((k=>e!=null&&e!==""?pa(ha(k.userState,e)):"")),l=a.useCallback((()=>{i(Ot({accountId:s,selectedPeriod:r}))}),[i,s,r]),d=a.useCallback((()=>{i(Ot({accountId:s,selectedPeriod:r})),i(Be({statementUploadChosen:!0}))}),[i,s,r]),T=(k,pe)=>{i(Ta(k,pe.split(".")[0]))},g=k=>{V!=null&&i(Ea({accountId:s,selectedPeriod:r,fileId:k,statementUploadId:V}))},y=()=>{i(Be({statementUploadChosen:!1}))},x=k=>{i(ka({accountId:s,selectedPeriod:r,payload:k}))},D=a.useCallback(((k,pe,qe)=>{i(ga({accountId:k,selectedPeriod:pe,statementUploadId:qe}))}),[i]),F=a.useCallback((k=>{i(Ca({accountId:s,selectedPeriod:r,statementUpdateLocalData:k}))}),[i,s,r]),L=a.useCallback((()=>{V!=null&&i(Sa({accountId:s,selectedPeriod:r,statementUploadId:V}))}),[i,s,r,V]),ee=a.useCallback((()=>{i(Be({statementUploadChosen:!0}))}),[i]),H=k=>{i(on({accountId:s,selectedPeriod:r,localData:{accountSource:k}}))},me=a.useCallback((()=>{i(nn({accountId:s}))}),[i,s]),fe=a.useCallback((k=>{i(ue(r,k)),A()}),[i,r,A]),G=a.useCallback((()=>{i(fa({accountId:s,selectedPeriod:r,statementProcessingFailed:!1})),i(Ia({accountId:s,selectedPeriod:r}))}),[i,s,r]),Pe=a.useCallback((()=>{i(an({accountId:s}))}),[i,s]),le=h.includes(s)?t.excludedAccountReconciliationByAccountID[s]:void 0;if(le!=null)return S.jsx(Qt,{children:S.jsx(Wt,{$isV3:f===!0,children:S.jsx(Ho,{excludedAccountReconciliation:le,includeAccountFetch:t.includeAccountFetchState,isReconV3Enabled:f,onDismissClick:A,onIncludeIntoReconciliation:Pe})})});if(B!=null){const k=f===!0?S.jsx(Xo,{excludeAccountFetch:t.excludeAccountFetchState,accountReconciliation:B,monthYearPeriod:r,onDismissClick:A,plaidConnectionDetails:t.plaidConnectionDetails,onFetchLinkTokenClick:E,onEstablishConnectionClick:b,onEditFileName:T,onDeleteFile:g,onSelectSourceType:H,filesEndPoint:Ae.fileMicroServiceBaseUrl,authParams:P,openFilePicker:p,onStatementUploadSuccess:x,onUploadWindowOpenedOnce:y,onExcludeFromReconciliation:me,onRetryParsing:D,onReviewClicked:fe,statementProcessingFailed:B.statementProcessingFailed,statementProcessingDismissedToBackground:B.statementProcessingDismissedToBackground,onDismissStatementProcessingFailed:G,onContinueInBackground:u,onClearStatementProcessingDismissedToBackground:z,onResetStatementProcessingProgress:j,onStatementProcessingProgressChange:ae,onStatementFlowVisibilityChange:I,onReuploadStatement:ee,onStatementFormDataChange:F,onStatementConfirmSave:L,reconciledByName:n,onDismissDateConflict:l,onReuploadAfterDateConflict:d,isReconV3Enabled:f}):S.jsx(es,{excludeAccountFetch:t.excludeAccountFetchState,accountReconciliation:B,monthYearPeriod:r,onDismissClick:A,plaidConnectionDetails:t.plaidConnectionDetails,onFetchLinkTokenClick:E,onEstablishConnectionClick:b,onEditFileName:T,onDeleteFile:g,onSelectSourceType:H,filesEndPoint:Ae.fileMicroServiceBaseUrl,authParams:P,openFilePicker:p,onStatementUploadSuccess:x,onUploadWindowOpenedOnce:y,onExcludeFromReconciliation:me});return S.jsx(Qt,{children:S.jsx(Wt,{$isV3:f===!0,children:k})})}return null})),Qt=Le.div`
9
- display: flex;
10
- flex-direction: column;
11
- height: 100%;
12
- `,Wt=Le.div`
13
- flex: 1;
14
- min-height: 0;
15
- display: flex;
16
- flex-direction: column;
17
- box-sizing: border-box;
18
- min-width: 0;
19
- overflow-x: hidden;
20
- overflow-y: ${t=>t.$isV3===!0?"hidden":"auto"};
21
- `;function Rs({companyId:t,closeCustomerRequestDrawer:s,addCustomerRequest:A,resetCustomerRequest:E}){const b=je.getSignedInUser();if(b==null)throw Error("Can't access Customer Request page without signing in...");const i=w((m=>ba(m,t,b)));return a.useEffect((()=>{E()}),[]),S.jsx(S.Fragment,{children:i.fetchState==="In-Progress"||i.companyMonthEndReportTemplatesData.fetchState==="In-Progress"?S.jsx(gn,{fetchState:"In-Progress"}):S.jsx(ts,{onCloseClick:s,addCustomerRequest:A,snippets:i.companyMonthEndReportTemplatesData,bulletPoints:i.zeniRequestsData??[]})})}const xs=t=>t.sections.generalExpense.vendors.length+t.sections.reimbursement.vendors.length,{common:{strings:{hyphen:Ds,comma:Ht,space:Fs}},dateFormat:Sn}=ns.getLocalizedStrings(),Xt=Zo,Us=la((function(t,s){const{uncategorizedAccounts:A,vendorSearchAutoCompleteData:E,monthEndInsightsCustomerRequestData:b,monthEndInsightsPreviewMode:i,companyId:m,isMissingReceiptsBulkUploadEnabled:f,isTransactionActivityEnabled:c}=s,C=je.getSignedInUser(),h=t.tenantState.currentTenantId,P={userId:C?.userId??"",sessionId:C?.zeniSessionId??"",tenantId:h??""},v=ye(t),{selectedTransactionCategorizationTab:r}=v;return{expenseAutomationViewSelector:v,bulkUploadSelector:f===!0?v.missingReceipts.bulkUpload:void 0,vendorSearchAutoCompleteData:E,authParams:P,receiptUploadEndpoint:`${Ae.accountMicroServiceBaseUrl}`,transactionAttachmentsEndpoint:`${ss}/transaction_attachments`,bulkUploadEndpoint:f===!0?`${Ae.communicationAgentMicroServiceBaseUrl}/1.0/receipts/bulk-upload`:void 0,isDisabled:!1,currentTab:r,monthEndInsightsCustomerRequestData:b,monthEndInsightsPreviewMode:i,allThreadsSectionOpen:!1,enableMonthEndInsightsZeniGPTFeature:!1,loggedInUser:C,uncategorizedAccounts:A,companyId:m,isTransactionActivityEnabled:c}}),(function(t,s){const{themeState:A,isAccountingClassesEnabled:E,isCOTEnabled:b,isUncategorizedExpenseCategoryEnabled:i,isMissingReceiptsBulkUploadEnabled:m,location:f,vendorSearchAutoCompleteData:c,expenseAutomationViewSelector:C,currentTenant:h,uncategorizedAccounts:P,navigate:v,onClickCustomerRequest:r,handleEditClick:p,setActivityLogTransactionId:B}=s,{selectedPeriod:R,currentSelectedView:I,reconciliation:{selectedAccountId:u}}=C,{accountSettingsView:z}=C.jeSchedules,ae=rn(R),j=ze(ae.start),V=ze(ae.end);return{onZeniLogoClick:()=>{A.toggle()},onUploadReceiptAttachment:e=>{J.trackMissingReceiptAttached(R.month,R.year),t(Eo(e))},onUploadTransactionReceipt:(e,n,l,d,T,g)=>{t($t(e,n,{fetchState:"In-Progress"}));const y=()=>t($t(e,n,{fetchState:"Error"}));cs(`${Ae.accountMicroServiceBaseUrl}/1.0/transactions/${n}/attachments`,g,n,l,d,T).then((x=>{x!=null?t(ko(e,x)):y()})).catch(y)},onMissingReceiptsRowClick:(e,n)=>{if(s.openTransactionPanel)return void s.openTransactionPanel(e,n);const l=ie(f.state?.pathnameStackToGoBack,f.pathname);v(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:l,message:"expenseAutomation",origin:"missing_receipts"}})},onUploadReceiptComplete:(e,n)=>{t(Io(e,n)),h!=null&&t(ve({tenantId:h.tenantId,period:n,refreshViewInBackground:!0}))},onUploadReceiptFetchStatus:(e,n,l,d)=>{t(fo(e,{fetchState:n,error:l})),l!=null&&t(nt({messageSection:"missing_receipts_attachment",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"__message__",variableValue:d!=null?Fs+Ds+d+Ht:Ht}]}))},onUpdateJESchedulesUIState:e=>{t(So(e))},onUpdateMissingReceiptsUIState:e=>{t(Co(e))},onFetchMissingReceiptsList:()=>{V!=null&&j!=null&&t(un({start:j,end:V},{amount:75,currencyCode:"USD",currencySymbol:"$"},!0,!1))},...m===!0?{onBulkUploadFiles:e=>{t(Ko(e))},onBulkUploadProgress:e=>{t(Yo(e))},onBulkUploadSuccess:e=>{t(Jo({batchId:e}))},onBulkUploadUploadedFileCount:e=>{t(No(e))},onConfirmBulkUploadMatch:(e,n,l,d,T)=>{t(Go(e,n,l,d,T))},onBulkUploadConfirmMatchAcknowledged:()=>{t($o())},onSetBulkUploadResultsTab:e=>{t(qo(e))},onSetBulkUploadCompletedSubTab:e=>{t(jo(e))},onSetBulkUploadSortConfig:(e,n)=>{t(Jt({sortKey:e,sortOrder:n}))},onClearBulkUpload:()=>{t(Lo())},onSearchTransactionsForManualMatch:(e,n)=>{t(Xt(e,n??void 0))},onLoadMoreManualSearch:()=>{const{manualSearch:e}=C.missingReceipts.bulkUpload;e.nextPageToken!=null&&e.searchQuery!==""&&t(Xt(e.searchQuery,e.nextPageToken))},onFetchCompletedTransactions:(e,n)=>{t(Mo(e,n))},onClearBulkUploadBatchDetailsForScopeChange:()=>{t(zo())},onFetchBulkUploadBatches:e=>{t(mn(e))},onFetchMoreBatchDetails:()=>{t(_o())},onResetBulkUploadSort:()=>{t(Jt({sortKey:void 0,sortOrder:void 0}))}}:{},onClearMissingReceiptsTabNavigation:()=>{t(go())},onSearchTextChanged:e=>{const n=C.currentSelectedView,l=C.selectedTransactionCategorizationTab;n==="transaction_categorization"&&(t(He({selectedTab:l,uiState:{searchString:e}})),V!=null&&j!=null&&t(Ce(l,{start:j,end:V},!0,!1,e,void 0,!1,!0)))},onFiltersChange:e=>{const n=C.selectedTransactionCategorizationTab;t(ho({filters:e,selectedTab:n}))},onRefresh:()=>{s.trackExpenseAutomationTabAnalytics(!0),t(po(i))},onClose:()=>{I==="reconciliation"&&u!=null&&t(qt({selectedAccountId:void 0})),v("../")},onBack:()=>{I==="reconciliation"&&u!=null&&t(qt({selectedAccountId:void 0}))},onSaveReconciliation:e=>{t(mo(e))},onSaveReconciliationReview:e=>{t(uo(e))},onUpdateStep:e=>{const{selectedPeriod:n}=C,l=ie(f.state?.pathnameStackToGoBack,f.pathname);v(`../${e}/${n.month}-${n.year}`,{state:{pathnameStackToGoBack:l,referrer:C.currentSelectedView}}),t(dn(e))},handleLogOutClick:()=>{const e=ie(f.state?.pathnameStackToGoBack,f.pathname);v("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},onJeAccountSettingsChange:e=>{const{vendorsAccountSection:n}=e,{prepaidExpensesAccount:l,fixedAssetsAccount:d,accruedExpensesAccount:T}=n,g=et(z.prepaidExpensesAccountList,l.selectedOptions),y=et(z.fixedAssetsAccountList,d.selectedOptions),x=et(z.accruedExpensesAccountList,T.selectedOptions),D={selectedPrepaidExpensesAccountIds:g.map((F=>F.accountId)),selectedFixedAssetsAccountIds:y.map((F=>F.accountId)),selectedAccruedExpensesAccountIds:x.map((F=>F.accountId))};t(ro({data:D}))},onSaveJeAccountSettingsClick:()=>{t(lo())},onJESchedulesFormDataChange(e,n){const{jeScheduleID:l,accumulatedDepreciationCategory:d,scheduleClass:T,scheduleExpenseCategory:g,vendor:y}=n,{allAccountList:x,allClassList:D,allDepreciationAccountList:F}=C.jeSchedules,L=c.entityAutoCompleteView.vendor.length>0?c.entityAutoCompleteView.vendor.find((G=>G.id===y?.selectedOption)):void 0,ee={id:L?.zeniId??y?.selectedOption??"",name:L?.name??y?.defaultOptions.find((G=>G.value===y?.selectedOption))?.label??"",logo:L?.logo},H=g?.selectedOption!=null?x.find((G=>G.qboId===g.selectedOption)):void 0,me=T?.selectedOption!=null?D.find((G=>G.classId===T.selectedOption)):void 0,fe=d?.selectedOption!=null?F.find((G=>G.qboId===d.selectedOption)):void 0;t(io({scheduledJournalEntryID:e,localData:{jeScheduleID:l,scheduledJournalEntryID:e,updatedCategoryId:H?.accountId,updatedClassId:me?.classId,updatedAccumulatedDepreciationCategoryID:fe?.accountId,updatedVendor:{id:ee.id,name:ee.name}}}))},ignoreRecommendedJeSchedule(e,n){t(co(e,n))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(e,n)=>{e.trim().length>=2?t(zt({searchString:e,entityType:n,searchOrigin:"common"})):e.trim().length===0&&t(Ue("common"))},onCancelAutoComplete:()=>{t(Ue("common"))}},onPostJESchedule(e,n){t(so({scheduledJournalEntryID:e,jeScheduleTransactionKey:n}))},clearJeScheduleLocalData(){t(oo())},handleJeScheduleClick:(e,n,l)=>{t(ao({selectedJEScheduleKey:n}));const d=ie(f.state?.pathnameStackToGoBack,f.pathname);v(`../../vendors/schedules/${l}/details/${e}`,{state:{pathnameStackToGoBack:d,message:"expenseAutomation",origin:"je_schedules"}})},improveMonthEndInsightsUsingZeniGPTClick:e=>{h!=null&&t(no(e,h.companyId,h.tenantId))},onClickCustomerRequest:r,setActivityLogTransactionId:B,onCloseAllThreadsSection:()=>{},onCloseFileAttachmentSnackBar:()=>{t(to())},onOpenFileAttachmentSnackBar:()=>{t(nt({messageSection:"cockpit_month_end_email_attachment_upload",messageText:"failed",type:"error",showStatusIcon:!0}))},onRemoveFileAttachment:e=>{t(eo(e))},onUpdateFileAttachment:e=>{t(Xa({files:e}))},previewMonthEndReport:(e,n,l,d)=>{h!=null&&t(jt(e,h.companyId,n,!0,l,d,h.tenantId))},saveMonthEndReport:(e,n,l,d)=>{h!=null&&t(jt(e,h.companyId,n,!1,l,d,h.tenantId))},onEditMonthEndInsightsClick:p,sendMonthEndReport:e=>{const n=f.state?.referrer,{selectedPeriod:l,auditSummary:d}=C;h!=null&&d?.auditScorePercentage!=null&&(t(Wa(h.companyId,e,h.tenantId)),J.trackInsightsEmailPage(l.month,l.year,!1,"draft",d.auditScorePercentage,Ha().format(Sn.analytics.MMMDDCommaYYYYformat),n??null))},onTransactionCategorizationRowClick:(e,n)=>{if(s.openTransactionPanel)return void s.openTransactionPanel(e,n);const l=ie(f.state?.pathnameStackToGoBack,f.pathname);v(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:l,message:"expenseAutomation",origin:"transaction_categorization"}})},setLocalDataForCategoryAndClass:(e,n,l,d,T,g,y,x,D,F,L,ee,H)=>{t(Qa(e,n,l,d,P,T,g,y,x,D,F,L,ee,H))},onCancelAutoComplete:()=>{t(Ue("common"))},updateExpenseAutomationReconListScrollPosition:e=>{t(Mt({scrollPosition:e}))},onUpdateTab:e=>{s.closeSidePanel?.(),V!=null&&j!=null&&(t(Ce(e,{start:j,end:V},!1,!1)),t(Za(e)))},onUpdateTransactionCategorizationCompletedSubTab:e=>{s.closeSidePanel?.(),V!=null&&j!=null&&(t(Ka(e)),t(Ce("autoCategorized",{start:j,end:V},!1,!1)))},onUpdateTransactionCategorizationUIState:(e,n)=>{t(He({selectedTab:e,uiState:n})),V!=null&&j!=null&&t(Ce(e,{start:j,end:V},!1,!1,n.searchString,null,!0))},onUpdateScrollYOffSetTransactionCategorizationUIState:(e,n)=>{t(He({selectedTab:e,uiState:n}))},onFetchTransactionCategorizationList:(e,n,l,d,T,g,y)=>{V!=null&&j!=null&&t(Ce(e,{start:j,end:V},!0,l,n,d,T,g,y))},resetTransactionCategorizationLocalData:(e,n,l,d,T,g,y,x)=>{t(Ya(e,n,l,d,x??null,T,g,!1,y))},updateSelectedVendorForTransaction:(e,n,l,d,T)=>{t(Lt({selectedTab:e,transactionId:n,lineId:l,selectedTransaction:d,uncategorizedAccounts:P,updatedVendor:T,isAccountingClassesEnabled:E}))},onSaveUpdateTransactionCategorization:(e,n,l)=>{const d=f.state?.referrer;e==="autoCategorized"?J.trackTransactionsAutoCategorisedPage(R.month,R.year,C.transactionView.totalCountByTab.autoCategorized,n.length,!1,d??null):J.trackTransactionsReviewPage(R.month,R.year,C.transactionView.totalCountByTab.review,n.length,!1,d??null),t(Ja(e,n,l,i))},onUpdateSelectedCheckboxTransactionIds:(e,n)=>{t(Na({selectedTab:e,transactionIds:n}))},onFetchRecommendationsForEntityCategorizationWithCustomer:(e,n,l,d,T,g,y)=>{const{transactionId:x,transaction:D,lineIds:F}=n;g!=null&&t($a({transactionId:x,customerUpdates:g})),t(Ga({selectedTab:d,transactionId:x.id,lineId:F[0],selectedTransaction:D,uncategorizedAccounts:P,updatedCustomer:g,selectedEntity:T,isAccountingClassesEnabled:E,isUncategorizedExpenseCategoryEnabled:y})),T!=null&&t(ot({entity:T,amount:e,transactionDetails:n,flowType:"categorization",selectedTab:d,isFetchCOT:b,isUncategorizedExpenseCategoryEnabled:y}))},onFetchRecommendationsForEntityCategorization:(e,n,l,d,T,g,y)=>{const{transactionId:x,transaction:D,lineIds:F}=n;g!=null&&(t(La({transactionId:x,vendorUpdates:{name:g.name,id:g.id?g.id:void 0}})),t(ja({vendorId:g.id?g.id:void 0,localData:{vendorName:g.name,vendorId:g.id?g.id:void 0}}))),g?.id?(t(Lt({selectedTab:d,transactionId:x.id,lineId:F[0],selectedTransaction:D,uncategorizedAccounts:P,updatedVendor:g,selectedEntity:T,isAccountingClassesEnabled:E,isUncategorizedExpenseCategoryEnabled:y})),T!=null&&t(ot({entity:T,amount:e,transactionDetails:n,flowType:"categorization",selectedTab:d,isFetchCOT:b,isUncategorizedExpenseCategoryEnabled:y}))):t(qa({selectedTab:d,transactionId:x.id,lineId:F[0]}))},fetchFluxViewOnScroll:(e,n)=>{t(Ve(e,!0,!1,n,!1,!0))},onFetchFluxViewList:()=>{t(Ve(R,!0,!1,null,!1,!1))},markAsReview:(e,n,l,d)=>{J.trackFluxAnalysisReviewed(l.month,l.year,d??!1,e),t(Ma(n,e,l,d??!1))},onUpdateFluxAnalysisUIState:e=>{t(za(e))},updateOperatingExpensesIdsForReview:e=>{t(_a({operatingExpenseIds:e,selectedPeriod:R}))},redirectToVendorDetailPage:e=>{if(s.tenantEmailDomain!=null){const n=ys(e.id,e.qboId,s.tenantEmailDomain),l=ie(s.location.state?.pathnameStackToGoBack,s.location.pathname);s.navigate(n,{state:{pathnameStackToGoBack:l,message:"expenseAutomation",referrer:"Vendor List",origin:"flux_analysis"}})}},updateSectionIdsForReview:e=>{t(Oa({sectionId:e,selectedPeriod:R}))},onFetchReimbursementView:(e,n,l)=>{t(Ve(e,!0,!1,n,!0,l))},onReviewClicked:e=>{t(ue(R,e))},setOpenDrawerClicked:e=>{t(_e({selectedDrawerAccountId:e}))},onFetchLinkTokenClick:(e,n)=>{t(sn("expense_automation_reconcile",e,n))},onEstablishConnectionClick:(e,n)=>{const l=h?.companyId;l!=null&&(t(cn(e,l,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",n)),t(ln({accountId:n,connectionInProgress:!0})))},onAddStatementClick:e=>{t(_e({selectedDrawerAccountId:e})),t(on({accountId:e,selectedPeriod:R,localData:{accountSource:"bank_statement"}})),t(Be({statementUploadChosen:!0}))},onReloadReconciliationListPage:()=>{t(ue(R,void 0,!0,!1))},onUpdateReconcileTabLocalData:e=>{t(Va({selectedTransactionIds:e}))},onReconTabColumnSortConfigChanged:(e,n)=>{t(Ba({sortKey:e,sortOrder:n}))},onReconReviewTabColumnSortConfigChanged:(e,n)=>{t(Ua({sortKey:e,sortOrder:n}))},onReconTabUpdate:e=>{s.closeSidePanel?.(),t(Fa({selectedTab:e}))},updateReconReviewTabLocalData:(e,n,l)=>{const d=e.vendor?.id;l&&d!=null&&t(xa(d)),t(Da({data:e,transactionId:n}))},onReconMatchedTransactionClick:e=>{if(s.openTransactionPanel)return void s.openTransactionPanel(e,at("bill"));const n=ie(f.state?.pathnameStackToGoBack,f.pathname);v(`../../transaction/bill/${e}`,{state:{pathnameStackToGoBack:n,message:"expenseAutomation",origin:"reconciliation"}})},onReloadPage:()=>{window.location.reload()},onBackClick:()=>{v(-1)},onReconListPageScroll:e=>{t(Mt({scrollPosition:e}))},onVendorAutoCompleteInputChange:e=>{e.trim().length>=2?t(zt({searchString:e,searchOrigin:"common"})):e.trim().length===0&&t(Ue("common"))},onReconNodeCollapseToggled:(e,n)=>{t(Ra({nodeId:e,collapsed:n}))},updateSectionCollapseStatus:()=>{},onExcludeAccountFromReconciliation:e=>{t(nn({accountId:e}))},onIncludeAccountIntoReconciliation:e=>{t(an({accountId:e}))}}}),((t,s,A)=>{const{isMissingReceiptsBulkUploadEnabled:E,...b}=A;return(function(i,m,f){return{...i,...m,...f,onUploadTransactionReceipt:(c,C,h,P,v)=>{m.onUploadTransactionReceipt(c,C,h,P,v,i.authParams)}}})(t,s,b)}))(as(os)),Bs=Ts((function(t){const s=t.displayName??t.name??"Component",A=en.memo(t),E=b=>{const i=Se(),m=(function(){const I=Se(),u=w((z=>ye(z).reconciliation.selectedDrawerAccountId));return{isOpen:u!=null,selectedAccountId:u,openPanel:a.useCallback((z=>{I(_e({selectedDrawerAccountId:z}))}),[I]),closePanel:a.useCallback((()=>{I(_e({selectedDrawerAccountId:void 0}))}),[I])}})(),f=w((I=>ye(I).reconciliation)),c=w((I=>Oe(I))),C=a.useCallback(((I,u)=>{i(sn("expense_automation_reconcile",I,u))}),[i]),h=a.useCallback(((I,u)=>{const z=c?.companyId;z!=null&&(i(cn(I,z,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",u)),i(ln({accountId:u,connectionInProgress:!0})))}),[i,c?.companyId]),P=a.useMemo((()=>{if(m.isOpen&&m.selectedAccountId!=null)return S.jsx(ws,{reconciliation:f,selectedDrawerAccountId:m.selectedAccountId,onClose:m.closePanel,onFetchLinkTokenClick:C,onEstablishConnectionClick:h})}),[m.isOpen,m.selectedAccountId,m.closePanel,f,C,h]),v=a.useMemo((()=>({reconPanelContent:P,reconSidePanelIsOpen:m.isOpen,closeReconSidePanel:m.closePanel})),[P,m.isOpen,m.closePanel]),{useFeatureGate:r}=Me(),{isFeatureEnabled:p}=r(K.isReconV3Enabled),B=a.useContext(Kt),R=a.useMemo((()=>m.isOpen?p===!0?{selectedItemId:m.selectedAccountId}:{closePanel:m.closePanel,selectedItemId:m.selectedAccountId}:B),[m.isOpen,m.closePanel,m.selectedAccountId,B,p]);return S.jsx(Kt.Provider,{value:R,children:S.jsx(A,{...b,...v})})};return E.displayName=`withReconSidePanel(${s})`,E})((({closeSidePanel:t,openTransactionPanel:s,panelContent:A,sidePanelIsFullView:E,sidePanelIsOpen:b,reconPanelContent:i,reconSidePanelIsOpen:m,closeReconSidePanel:f})=>{const{isAiCfoOpen:c,setIsAiCfoOpen:C}=is(),h=ls(),{isOpen:P}=rs(),v=tn(),r=tt(),p=Se(),{isAiCfoAccessEnabled:B,onAskAiCfoClick:R}=Cn({mobileExploreReferrer:"Transaction categorization"}),I=a.useCallback((()=>{b===!0&&E!==!0&&t?.()}),[t,b,E]),{areTenantIdsInSync:u}=pn(),z=(()=>{const o=w((Y=>ye(Y))),_=tt(),{currentSelectedViewFetchState:N,currentSelectedView:$,selectedPeriod:U}=o,te=Xe($),Q=Xe(N.fetchState),X=a.useCallback((Y=>{const ne=_.state?.referrer;$==="transaction_categorization"&&(o.selectedTransactionCategorizationTab==="review"?J.trackTransactionsReviewPage(U.month,U.year,o.transactionView.totalCountByTab.review,0,Y,ne??null):J.trackTransactionsAutoCategorisedPage(U.month,U.year,o.transactionView.totalCountByTab.autoCategorized,0,Y,ne??null)),$==="missing_receipts"&&J.trackMissingReceiptsPage(U.month,U.year,Y,o.missingReceipts.transactions.length,ne??null),$==="je_schedules"&&J.trackMonthCloseScheduleListPage(U.month,U.year,Y,o.jeSchedules.draftSchedules.length,o.jeSchedules.resolveSchedules.length,ne??null),$==="flux_analysis"&&J.trackFluxAnalysisPage(U.month,U.year,Y,xs(o.fluxAnalysis),ne??null),$==="month_end_insights"&&o.auditSummary?.auditScorePercentage!=null&&J.trackInsightsEmailPage(U.month,U.year,Y,"draft",o.auditSummary.auditScorePercentage,null,ne??null)}),[U,o]);return a.useEffect((()=>{Q===N.fetchState&&$===te||N.fetchState!=="Completed"||X(!1)}),[$,N.fetchState,te]),X})(),ae=ds(),[j,V]=a.useState(!1),e=w((o=>_t(o))),n=w((o=>Oe(o))),[l,d]=a.useState(!1),[T,g]=a.useState(!1),[y,x]=a.useState([]),[D,F]=a.useState(null),L=a.useCallback((()=>{F(null)}),[]),ee=D?.contentType==="activity"?D.detail.transactionId:void 0,H=a.useCallback((o=>{o!=null?(c&&C(!1),h(),I(),F({contentType:"activity",detail:{transactionId:o}})):F((_=>_?.contentType==="activity"?null:_))}),[I,c,h,C]),me=a.useCallback((o=>{c&&C(!1),h(),I(),F({contentType:"transfer",detail:o})}),[I,c,h,C]),fe=a.useCallback((()=>{h(),L(),I(),R()}),[I,L,R,h]),G=a.useRef(c);a.useEffect((()=>{c===!0&&G.current===!1&&(h(),L(),I()),G.current=c}),[I,L,c,h]);const Pe=a.useRef(P);a.useEffect((()=>{P===!0&&Pe.current===!1&&(c&&C(!1),L(),b===!0&&E!==!0&&t?.()),Pe.current=P}),[L,t,P,c,C,E,b]);const le=b===!0&&E!==!0,k=a.useRef(le);a.useEffect((()=>{le&&!k.current&&(c&&C(!1),h(),L()),k.current=le}),[L,c,le,h,C]);const[pe,qe]=a.useState(!1),st=a.useRef(!1),{selectedTab:ct}=Bt(),{tenantEmailDomain:fn}=Bt(),[$e,it]=a.useState(r.state?.message==="comingFromTransactionDetail"),lt=r.state?.message==="comingFromOverview",In=us(),Ge=je.getSignedInUser(),{useDynamicConfig:kn,useFeatureGate:oe}=Me(),{configValue:En}=kn(ms.enableUncategorizedExpenseCategory),se=En?.uncategorized_expense_category_enabled===!0,{isFeatureEnabled:rt}=oe(K.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:Ie}=oe(K.isMissingReceiptsBulkUploadEnabled),{isFeatureEnabled:Ne}=oe(K.isTransactionActivityEnabled),{isFeatureEnabled:dt}=oe(K.isCreateTransferEntryFromExpenseEnabled),{isFeatureEnabled:Tn}=oe(K.isExpenseAutomationCommentingEnabled),{isFeatureEnabled:bn}=oe(K.isProjectsTransactionsEnabled),{isFeatureEnabled:yn}=oe(K.isReconV3Enabled),{isFeatureEnabled:vn}=oe(K.isJEScheduleCOTEnabled),An=a.useCallback((o=>{const _=at(o.view==="reconciliation"?"bill":"expense");s?.(o.entityId,_)}),[s]),Pn=w((o=>To(o,"common"))),q=w((o=>ye(o))),{categoryOptions:wn,paymentAccountNames:Rn}=w((o=>bo(o.accountState))),xn=w((o=>yo(o.classState))),{monthEndCloseChecksView:Z,currentSelectedView:O,selectedPeriod:M,selectedTransactionCategorizationTab:Je,currentSelectedViewBackgroundRefreshFetchState:Dn,currentSelectedViewFetchState:he,jeSchedules:Ye,reconciliation:ut}=q;fs(O==="transaction_categorization");const Fn=q.transactionView.saveStatus.fetchState,mt=q.transactionView.transactions,pt=a.useRef(mt);pt.current=mt;const ht=w((o=>o.expenseAutomationTransactionsViewState?.transactionCategorizationView)),gt=w((o=>o.expenseAutomationTransactionsViewState?.selectedTransactionCategorizationTab)),Ct=a.useRef(ht);Ct.current=ht;const St=a.useRef(gt);St.current=gt;const ce=Is(Fn,(()=>{const o=[],_=St.current,N=Ct.current,$=N!=null&&_!=null?N[_]:void 0;if($?.transactionReviewLocalDataById!=null)for(const te of Object.values($.transactionReviewLocalDataById)){const Q=te?.transactionReviewLocalData?.lineItemById;if(Q!=null)for(const X of Object.values(Q)){const Y=X?.account;Y?.accountId!=null&&o.push(Y.accountId)}}const U=pt.current;for(const te of U)for(const Q of te.lines??[])"account"in Q&&Q.account?.accountId!=null&&o.push(Q.account.accountId);return o}));a.useEffect((()=>{O==="transaction_categorization"&&b!==!0||H(void 0)}),[O,H,b]),a.useEffect((()=>{m===!0&&f?.()}),[O,ut.selectedAccountId]);const Un=q.transactionView.selectedTransactionCategorizationCompletedSubTab,we=`${Je}|${Un}`,Re=a.useRef(null);a.useEffect((()=>{Re.current!==null?Re.current!==we&&(Re.current=we,O==="transaction_categorization"&&L()):Re.current=we}),[L,O,we]);const Bn=w((o=>ee==null?void 0:vo(o.transactionState,ee))),re=Bn?.qboId,ft=w((o=>re==null?void 0:Ao(o,re)));a.useEffect((()=>{re!=null&&p(Po(re))}),[p,re]);const{createTransferEntryStatus:It,creditCardTransferAccountsList:kt,transferAccounts:Et}=q.transactionView,Tt=a.useCallback((o=>ks(p,o)),[p]),bt=a.useMemo((()=>O!=="transaction_categorization"||D==null?null:D.contentType==="activity"?Ne===!0?S.jsx(ps,{activityLogView:ft,qboId:re,onClose:()=>F(null),selectedTransactionId:D.detail.transactionId,isQuickViewCardStyle:!0},String(D.detail.transactionId)):null:D.contentType==="transfer"?S.jsx(hs,{createTransferEntryStatus:It,transaction:D.detail,transferAccounts:D.detail.transactionType==="credit_card_payment"?kt:Et,onClose:()=>F(null),onCreateTransfer:Tt,isQuickViewCardStyle:!0},String(D.detail.transactionId)):null),[O,D,Ne,ft,re,It,kt,Et,Tt]),Vn=bt!=null,{selectedAccountId:ke}=ut,yt=Xe(Ye.accountSettingsView.saveState.fetchState),On=w((o=>wo(o.accountState,o.accountListState,"accountList"))),_n=w((o=>Ro(o))),Ee=ct!=null?xo(ct):O,zn=w((o=>o.entityAutoCompleteState.autoCompleteText.common));if(hn({isDataReady:he.fetchState==="Completed"}),Ge==null)throw Error("Can't access expense automation screen without signing in...");const vt=rn(M),Te=ze(vt.start),be=ze(vt.end);if(Te==null||be==null)throw Error(`Invalid start - ${Te} and end - ${be} period from given ${M}`);const Mn=a.useCallback((()=>{d(!1)}),[]),Ln=a.useCallback((()=>{g(!0)}),[]),jn=a.useCallback((o=>{x(o),g(!1)}),[]),qn=a.useCallback((()=>{x([])}),[]),xe=q.missingReceipts.bulkUpload.phase,At=q.missingReceipts.bulkUpload.currentBatchId;a.useEffect((()=>{Ie===!0&&O==="missing_receipts"&&xe==="matching"&&At!=null&&p(mn({cacheOverride:!0}))}),[Ie,O,xe,At,p]);const Pt=Ge?.userId,$n=M.month,Gn=M.year,wt=n?.tenantId;a.useEffect((()=>{O==="missing_receipts"&&Ie!==!1&&xe==="idle"&&Pt!=null&&wt!=null&&p(Do())}),[O,Ie,xe,Pt,wt,$n,Gn,p]),a.useEffect((()=>{e.newVendorState?.vendorDetailLocalData?.vendorName!=null?V(!0):V(!1)}),[e.newVendorState?.vendorDetailLocalData?.vendorName]),a.useEffect((()=>{Ee!=null&&O!==Ee&&p(dn(Ee))}),[Ee]),a.useEffect((()=>{pe===!1&&he.fetchState==="Completed"&&u&&(qe(!0),p(Gt(!1,!1,se)))}),[pe,he,u,se]),a.useEffect((()=>{!lt&&u&&(p(Gt(!1,!1,se)),p(ue(M,ke,!1,!1)))}),[M.month,M.year,u,se]);const Rt=a.useCallback(((o=!1,_=!1)=>{const N={start:Te,end:be};switch(O){case"transaction_categorization":p(Ce(Je,N,o,!$e,void 0,void 0,_,void 0,se)),it(!1);break;case"flux_analysis":p(Ve(M,o,_,null));break;case"month_end_insights":if(_===!1){const $=new Date(M.year,M.month,0),U=Uo($.toDateString()).format(Sn.analytics.YYYYDashMMDashDDFormat);p(Bo(!0,n.companyId,n.tenantId,U)),p(Vo(n.companyId,n.tenantId))}break;case"je_schedules":p(Fo(N,_));break;case"missing_receipts":p(un(N,{amount:75,currencyCode:"USD",currencySymbol:"$"},o,_));break;default:p(ue(M,ke,o,_))}}),[O,Te,be,n.companyId,n.tenantId,Je,M,ke,$e,it,se]);a.useEffect((()=>{O===Ee&&he.fetchState==="Not-Started"&&u&&Rt(!0)}),[he,Te,be,n.companyId,n.tenantId,u]),a.useEffect((()=>{lt||$e||st.current||Dn.fetchState==="In-Progress"||he.fetchState!=="Completed"||(st.current=!0,Rt(!0,!0))}),[]),a.useEffect((()=>{Z.fetchState!=="In-Progress"&&Z.fetchState!=="Completed"&&Z.fetchState!=="Error"&&n?.tenantId!=null&&p(ve({tenantId:n.tenantId,period:M,refreshViewInBackground:!1}))}),[Z.fetchState,n?.tenantId]),a.useEffect((()=>{q.monthEndInsights?.previewMonthEndReportStatus?.fetchState==="Completed"?d(!0):d(!1)}),[q.monthEndInsights?.previewMonthEndReportStatus?.fetchState]),a.useEffect((()=>{q.monthEndInsights?.sendMonthEndReportStatus?.fetchState==="Completed"&&u&&(p(ve({tenantId:n.tenantId,period:M,refreshViewInBackground:!0})),p(Oo({companyId:n.companyId})),v("../"))}),[q.monthEndInsights?.sendMonthEndReportStatus?.fetchState,n.tenantId,M,n.companyId,u]),a.useEffect((()=>{const o=setInterval((()=>{Z.fetchState!=="In-Progress"&&Z.fetchState==="Completed"&&p(ve({tenantId:n.tenantId,period:M,refreshViewInBackground:!0}))}),3e5);return()=>clearInterval(o)}),[Z.fetchState,n.tenantId,M,p]),a.useEffect((()=>{const o=setInterval((()=>{O==="reconciliation"&&ke==null&&q.reconciliation.fetchStatus.fetchState==="Completed"&&q.reconciliation.refreshStatus.fetchState!=="In-Progress"&&p(ue(M,void 0,!0,!0))}),3e5);return()=>clearInterval(o)}),[O,p,q.reconciliation.fetchStatus.fetchState,q.reconciliation.refreshStatus.fetchState,ue,ke,M]);const Nn=Zt();a.useEffect((()=>{const o=(Z.monthEndCloseChecks?.monthEndCloseCheckList.find((_=>_.id==="month_end_insights"))?.isDisabled??!1)&&!rt;O!=="month_end_insights"||!o&&Z.monthEndCloseChecks?.reportEmailSentDate==null||v("../")}),[O,Z.monthEndCloseChecks]);const Jn=m===!0?i:A,Yn=m===!0||b===!0,Kn=m===!0?f:t;a.useEffect((()=>{yt==="In-Progress"&&Ye.accountSettingsView.saveState.fetchState==="Completed"&&p(Nt())}),[yt,Ye.accountSettingsView.saveState.fetchState,Nt]);const{transactionId:xt,onSaveVendor:Zn,onSaveSuccess:Qn,onCancel:Wn,vendorViewDetails:Hn}=(({expenseAutomationViewSelector:o,closeDrawerHandler:_,currentSelectedView:N,isUncategorizedExpenseCategoryEnabled:$})=>{const U=Se();let te,Q,X;const Y=Zt(),ne=o.transactionView;let Dt=()=>{};const{transactions:Xn,selectedTransactionId:ge,selectedTransactionLineId:De,transactionLocalData:ea}=ne;if(N==="transaction_categorization"){const Ke=ea.find((de=>de.transactionId===ge)),W=Xn.find((de=>de.id===ge)),Ft=De!=null?Ke?.transactionReviewLocalData?.lineItemById[De]:void 0,Ut=Ft?.account;Q=Ft?.class?.classId,te=["Uncategorized Income","Uncategorized Expense"].includes(Ut?.accountName??"")?void 0:Ut?.accountId;const na=bs(ge,W?.typeOfTransaction);W!=null&&na&&(X={id:ge,type:at(W.typeOfTransaction)}),Dt=()=>{if(ge!=null&&De!=null&&W!=null){const de=ne.transactionLocalData.find((Fe=>Fe.transactionId===ge))?.transactionReviewLocalData;if(de!=null&&W.lines!=null&&W.lines.length>0){const Fe=de.lineItemById[De];let Ze=de.selectedEntity;if(wa(W)||(Ze=Fe.selectedEntityLine),Ze!=null){const aa=Ze,oa={transactionId:{id:W.id,type:W.type},transaction:W,lineIds:W.lines.map((sa=>sa.id))??[]};U(ot({entity:aa,amount:Fe.amount.amount,transactionDetails:oa,flowType:"categorization",selectedTab:o.selectedTransactionCategorizationTab,isFetchCOT:Y,isUncategorizedExpenseCategoryEnabled:$}))}}}}}const ta=w((Ke=>_t(Ke,void 0,te,Q)));return{transactionId:X,onSaveVendor:()=>{U(Pa(X,void 0,!1,!0))},onSaveSuccess:Dt,onCancel:()=>{X!=null&&U(ya({transactionId:X})),U(va()),U(Aa()),_()},vendorViewDetails:ta}})({expenseAutomationViewSelector:q,closeDrawerHandler:()=>{V(!1)},currentSelectedView:O,isUncategorizedExpenseCategoryEnabled:se});return In?.loggedInUserRoleMap==null?Z.fetchState==="Error"?S.jsx(gs,{onGoHome:()=>v("../",{replace:!0}),onReload:()=>window.location.reload()}):S.jsx(gn,{fetchState:"In-Progress"}):S.jsxs(S.Fragment,{children:[S.jsx(vs,{isOpen:T,drawerLeftMargin:new Cs(0,0,300,650),onClose:()=>{g(!1)},children:S.jsx(Vs,{onClick:o=>o.stopPropagation(),children:S.jsx(Rs,{companyId:n.companyId,closeCustomerRequestDrawer:()=>g(!1),addCustomerRequest:jn,resetCustomerRequest:qn})})}),xt!=null&&j&&S.jsx(Es,{isOpen:j,transactionId:xt,onSaveVendor:Zn,onSaveSuccess:Qn,onCancel:Wn,vendorViewDetails:Hn}),S.jsx(Us,{events:[],eventCallback:(o,_,N)=>{},navigate:v,location:r,themeState:ae,categoryOptions:wn,classesForFilters:xn,accountsForFilters:Rn,vendorSearchAutoCompleteData:{autoCompleteText:zn,entityAutoCompleteView:Pn},expenseAutomationViewSelector:q,isMissingReceiptsBulkUploadEnabled:Ie,monthEndInsightsPreviewMode:l,monthEndInsightsCustomerRequestData:y,isRealtimeInsightsFeatureEnabled:rt,isCreateTransferEntryFromExpenseEnabled:dt,isUncategorizedExpenseCategoryEnabled:se,isAccountingClassesEnabled:_n,isProjectsTransactionsEnabled:bn,isCOTEnabled:Nn,isJEScheduleCOTEnabled:vn,currentTenant:n,companyId:n.companyId,signedInUser:Ge,isTransactionActivityEnabled:Ne,isRightPanelOpen:Vn,rightSidePanel:bt,onOpenTransferRightPanel:dt===!0?me:void 0,uncategorizedAccounts:On,onClickCustomerRequest:Ln,handleEditClick:Mn,tenantEmailDomain:fn,trackExpenseAutomationTabAnalytics:z,setActivityLogTransactionId:H,closeSidePanel:Kn,openTransactionPanel:s,sidePanelIsOpen:Yn,sidePanelIsFullView:m!==!0&&E,panelContent:Jn,isAiCfoAccessEnabled:B,onAskAiCfoClick:fe,isExpenseAutomationCommentingEnabled:Tn,isReconV3Enabled:yn,onExpenseAutomationCommentingThreadClick:An,sidePanelListPercent:m===!0?66:void 0}),ce.showPopup&&ce.popupType!=null&&S.jsx(Ss,{popupType:ce.popupType,currencySymbol:ce.currencySymbol,accountId:ce.popupAccountId??"",accountName:ce.popupAccountName??"",onSubmit:ce.handleSubmit,onDismiss:ce.handleDismiss})]})}))),Vs=Le(ia)`
22
- display: flex;
23
- min-height: 100%;
24
- flex-direction: column;
25
- `;function sc(){return S.jsxs(ra,{children:[S.jsx(Qe,{path:"*",element:S.jsx(As,{})}),S.jsx(Qe,{path:"/:selectedTab/:selectedPeriod/*",element:S.jsx(Bs,{})}),S.jsx(Qe,{path:"*",element:S.jsx(ca,{})})]})}export{sc as default};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-BBLi67DG.js";import{a as r}from"./sentry-DW4kKH26.js";import{a5 as f,a6 as l,a7 as p,p as m}from"./index-CivdpZRT.js";import"./mui-C1ThRyKO.js";import c from"./NotFoundScreen-BeJq256C.js";import{h as u,g as b}from"./core-D2KaS3N5.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]="b50ef9de-1e19-4e43-a9d6-fe41049e3584",e._sentryDebugIdIdentifier="sentry-dbid-b50ef9de-1e19-4e43-a9d6-fe41049e3584")}catch{}})();const _=()=>{const e=u(),a=b(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),d=r.useCallback((()=>{(()=>{const n=m(a.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=f(a.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:d}):s.jsx(c,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{_ as F};
@@ -1 +0,0 @@
1
- import{a as r}from"./sentry-DW4kKH26.js";import{u as l,h as f,g as m}from"./core-D2KaS3N5.js";import{hA as p,MB as g,MC as b}from"./zeni-epic-state-BJ_gdj7r.js";import{u as _,L as h,z as y}from"./index-CivdpZRT.js";import"./liveblocks-BBLi67DG.js";import"./recharts-jHFM5Sob.js";import"./mui-C1ThRyKO.js";import"./analytics-C2MbRoEp.js";import"./plaid-Do7hhR27.js";import"./dnd-D-AkKI2c.js";import"./stripe-cKAAJElX.js";import"./lottie-Dz6JZ58r.js";import"./lexical-BQ-Po3YF.js";import"./pdf-2k8d7AeQ.js";import"./utils-DIwqH7uj.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]="ca75bbe3-d871-4bc5-9043-4e7cf70793fe",e._sentryDebugIdIdentifier="sentry-dbid-ca75bbe3-d871-4bc5-9043-4e7cf70793fe")}catch{}})();function R(){const e=l(),n=f(),o=m(),{setLoading:i,clearAllLoading:d}=_(),s=r.useRef(!1);return r.useLayoutEffect((()=>{i(h.CONNECTION_AUTH)}),[i]),r.useEffect((()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(o.search).get("code"),c=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&c!=null){const t=JSON.parse(c);e(p(t.tenant_id,t.connection_id,g("revenue"),b("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}d();const u=y.getActiveTenantForUser();n(u?.tenantEmailDomain!=null?`/${u.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{R as default};
@@ -1,72 +0,0 @@
1
- import{j as a}from"./liveblocks-BBLi67DG.js";import{i as y,n as x,h as C,g as S,u as ee,t as ae,j as E,N as te,o as ne,p}from"./core-D2KaS3N5.js";import{Mu as k,Mv as v,Mw as M,By as B,Bk as T,Mx as D,My as oe,Mz as se,Bo as ie,fC as $,Bv as le,Bs as re}from"./zeni-epic-state-BJ_gdj7r.js";import{K as f,o as r,m as de,f as j,k as G,n as ce,p as me,q as pe,r as H,A as ue,d as he,s as xe,v as fe,y as ge,x as we,B as be,C as ye,V as Se,D as ke,E as ve,F as je,G as $e}from"./index-CivdpZRT.js";import{n as m}from"./mui-C1ThRyKO.js";import g from"./NotFoundScreen-BeJq256C.js";import{a as I}from"./sentry-DW4kKH26.js";import"./recharts-jHFM5Sob.js";import"./analytics-C2MbRoEp.js";import"./plaid-Do7hhR27.js";import"./dnd-D-AkKI2c.js";import"./stripe-cKAAJElX.js";import"./lottie-Dz6JZ58r.js";import"./lexical-BQ-Po3YF.js";import"./pdf-2k8d7AeQ.js";import"./utils-DIwqH7uj.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]="1df2b55b-ee5e-4779-a10f-aaaaaaf3f4f6",e._sentryDebugIdIdentifier="sentry-dbid-1df2b55b-ee5e-4779-a10f-aaaaaaf3f4f6")}catch{}})();const Ie=m.div`
2
- display: flex;
3
- height: 100%;
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
- box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
10
- `,Ce=x((function(e){const t=k(e),n=v(e),{companyName:o}=t;return{companyName:o,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:t}}),(function(e,t){const{vendorId:n,billId:o}=t;return{onFetchBankName:s=>{e(T(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(B(s,"standard",n,o))},onACHDetailsUpdated:s=>{const{bankAccountSection:l}=s;e(M({data:l}))}}}))(de);function F(){const e=f(),{vendorId:t,billId:n}=y();return t==null||n==null?a.jsx(g,{}):a.jsx(a.Fragment,{children:a.jsx(Ie,{windowSize:e,children:a.jsx(Ce,{vendorId:t,billId:n})})})}const Be=m.div`
11
- display: flex;
12
- height: 100vh;
13
- width: 100%;
14
- flex: 1 1 auto;
15
- flex-direction: column;
16
- align-items: center;
17
- background-color: ${e=>e.theme.colors.grey4};
18
- box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
19
- `,De=x((function(e,t){const{isSubPage:n}=t;return{addressToEdit:D(e),googleAPIKey:G.googleMapsAPIKey,isSubPage:n}}),(function(e,t){const{navigate:n,location:o}=t,s=()=>{const l=me(o.state?.pathnameStackToGoBack),i=l.poppedPathname??Pe();n(i,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const i=ze(l);e(oe({addressToCreate:i})),s()},onCancel:()=>{s()}}}))(ce);function Ae({isSubPage:e}){const t=C(),n=S(),o=f();return a.jsx(a.Fragment,{children:a.jsx(Be,{windowSize:o,children:a.jsx(De,{location:n,navigate:t,isSubPage:e===!0,googleAPIKey:G.googleMapsAPIKey})})})}const Pe=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},ze=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng}),Le=m.div`
20
- display: flex;
21
- height: 100%;
22
- width: 100%;
23
- flex: 1 1 auto;
24
- flex-direction: column;
25
- align-items: center;
26
- background-color: ${e=>e.theme.colors.grey4};
27
- box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
28
- `,Ne=x((function(e){const t=k(e),n=v(e),o=D(e),{companyName:s}=t;return{companyName:s,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}}),(function(e,t){const{navigate:n,location:o,vendorId:s,billId:l}=t;return{onFetchBankName:i=>{e(T(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(B(i,"us-domestic",s,l))},onWireDetailsUpdated:i=>{const{bankAccountSection:d}=i;e(M({data:d}))},onAddressClick:()=>{const i=o.pathname.replace("us-domestic","address"),d=H(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:d}})}}}))(pe);function Ee(){const e=C(),t=S(),n=f(),{vendorId:o,billId:s}=y();return o==null||s==null?a.jsx(g,{}):a.jsx(a.Fragment,{children:a.jsx(Le,{windowSize:n,children:a.jsx(Ne,{location:t,navigate:e,vendorId:o,billId:s})})})}const Fe=m.div`
29
- display: flex;
30
- height: 100%;
31
- width: 100%;
32
- flex: 1 1 auto;
33
- flex-direction: column;
34
- align-items: center;
35
- background-color: ${e=>e.theme.colors.grey4};
36
- box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
37
- `,Me=x((function(e){const t=k(e),n=v(e),o=D(e),{companyName:s}=t;return{companyName:s,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}}),(function(e,t){const{navigate:n,location:o,vendorId:s,billId:l}=t;return{onFetchBankNameBySwift:i=>{e(ie(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(B(i,"international",s,l,t.isLocalCurrencyEnabled))},onBankDetailsUpdated:i=>{const{internationalWireSwiftAccountSection:d}=i;e(se({data:d}))},onAddressClick:()=>{const i=o.pathname.replace("international","address"),d=H(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:d}})}}}))(xe);function Te(){const e=C(),t=S(),n=f(),{vendorId:o,billId:s}=y(),{useFeatureGate:l}=ue(),{isFeatureEnabled:i}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||s==null?a.jsx(g,{}):a.jsx(Fe,{windowSize:n,children:a.jsx(Me,{location:t,navigate:e,vendorId:o,billId:s,isLocalCurrencyEnabled:i})})}const Ge={containerWidth:new je(100,58)},He=m(ke)`
38
- width: ${r.sp4};
39
- height: ${r.sp4};
40
- margin-bottom: ${r.sp3};
41
- margin-top: ${r.sp3};
42
- margin-left: ${r.sp8};
43
- cursor: pointer;
44
- position: absolute;
45
- color: ${e=>e.theme.colors.brandColorJade};
46
- `,Ke=m.div`
47
- display: flex;
48
- height: 100vh;
49
- flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
50
- width: 100vw;
51
- overflow-y: scroll;
52
- background-color: ${e=>e.theme.colors.grey4};
53
- `,_e=m.div`
54
- display: flex;
55
- flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
56
- flex-direction: column;
57
- width: ${e=>`${Ge.containerWidth.value(e.windowSize)}%`};
58
- ${e=>e.windowSize!=="small"?"overflow: auto;":""}
59
- box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
60
- padding-top: ${e=>e.windowSize!=="small"?r.sp2:"0px"};
61
- `,Ve=m.div`
62
- display: flex;
63
- flex-direction: column;
64
- align-items: center;
65
- justify-content: center;
66
- padding: ${e=>e.windowSize==="small"?r.sp3:`62px ${r.sp6} ${r.sp9} ${r.sp8}`};
67
- height: ${e=>e.windowSize==="small"?"490px":"auto"};
68
- overflow: ${e=>e.windowSize==="small"?"unset":"hidden"};
69
- width: ${e=>e.windowSize=="small"?"auto":"42%"};
70
- background-color: ${e=>e.windowSize==="small"?e.theme.colors.grey4:e.theme.colors.background};
71
- margin-top: ${e=>e.windowSize==="small"?e.isAddressPage?"0px":"186px":"unset"};
72
- `,We=x((function(e,t){return{file:t.file,type:t.type}}))(ve);function h({appContent:e}){const t=ee(),n=S(),{tenantEmailDomain:o,vendorId:s,billId:l}=y(),[i]=ae(),d=i.get("token"),K=n.pathname.includes("address"),w=f(),_=fe(),A=ge(),b=we(),V=()=>{_.toggle()},W=E((u=>k(u))),U=E((u=>v(u))),{authParams:q,fetchState:c,billAttachment:J,billFetchState:P,companyName:O,currencySymbol:Q,amount:R}=W,{tenantId:z,userId:L,sessionId:N}=q,{fetchState:X,internationalBankAccountCreateStatus:Y}=U;return I.useEffect((()=>{$()}),[]),I.useEffect((()=>{b&&c==="Not-Started"&&s!=null&&o!=null&&d!=null&&t(le(s,o,d))}),[b,c,s,o,d,t]),I.useEffect((()=>{b&&c==="Completed"&&($(L,N,z),l!=null&&t(re(l)))}),[c,b,L,N,z,l,t]),c==="Error"?a.jsx(g,{}):X==="Completed"||Y.fetchState==="Completed"?($(),a.jsx(te,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?a.jsx(be,{fetchState:c,style:{height:"100vh",backgroundColor:A.colors.grey5,boxShadow:`0px 2px ${r.sp1} ${A.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[c==="Completed"&&P==="Completed"&&a.jsx(ye,{analytics:j,onLoad:u=>(Z=>Z.trackBillPayMagicLinkPageLoad(o??"",s??"",O,l??"",Ue(n.pathname),Q,R))(u)}),a.jsxs(Ke,{windowSize:w,children:[w!=="small"?a.jsx(He,{onClick:V}):null,a.jsx(Ve,{windowSize:w,isAddressPage:K,children:P==="In-Progress"?a.jsx(Se,{size:"ExtraLarge",start:!0}):a.jsx(We,{file:J,type:"bill"})}),a.jsx(_e,{windowSize:w,children:e})]})]})}const Ue=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function qe(){return a.jsx($e,{})}function da(){return a.jsxs(ne,{children:[a.jsx(p,{path:"bank/account/save/success",element:a.jsx(qe,{})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:a.jsx(h,{appContent:a.jsx(F,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:a.jsx(h,{appContent:a.jsx(F,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:a.jsx(h,{appContent:a.jsx(Ae,{isSubPage:!0})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:a.jsx(h,{appContent:a.jsx(Ee,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:a.jsx(h,{appContent:a.jsx(Te,{})})}),a.jsx(p,{path:"*",element:a.jsx(g,{})})]})}export{da as default};
@@ -1,12 +0,0 @@
1
- import{j as g}from"./liveblocks-BBLi67DG.js";import{a as u}from"./sentry-DW4kKH26.js";import{u as F,g as O,h as _,t as w,j as l,N as T}from"./core-D2KaS3N5.js";import{z as r,y as V,O as P,g as A,f as N,h as W,W as Z,V as q,j as R}from"./index-CivdpZRT.js";import{eZ as $,Mf as B,Mp as G,Mg as H,fC as J,g2 as K,Ml as Q,gv as X,cZ as Y,Mq as ee,Mr as te}from"./zeni-epic-state-BJ_gdj7r.js";import{n as ne}from"./mui-C1ThRyKO.js";import{u as se}from"./useDeviceId-CHTVQQ8G.js";import{f as ae}from"./analyticsHelper-DqO64pHt.js";import{t as ie}from"./getLocaleForTenant--JGxRDjE.js";import"./recharts-jHFM5Sob.js";import"./analytics-C2MbRoEp.js";import"./plaid-Do7hhR27.js";import"./dnd-D-AkKI2c.js";import"./stripe-cKAAJElX.js";import"./lottie-Dz6JZ58r.js";import"./lexical-BQ-Po3YF.js";import"./pdf-2k8d7AeQ.js";import"./utils-DIwqH7uj.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]="fbd07177-0cf0-4093-9e2a-ecc046be5c84",t._sentryDebugIdIdentifier="sentry-dbid-fbd07177-0cf0-4093-9e2a-ecc046be5c84")}catch{}})();const C=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function Ce(){const t=F(),a=O(),m=_(),[b]=w(),n=b.get("token"),p=b.get("stytch_token_type"),f=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:c,twoFAPhoneNumber:x,magicLinkEmail:d,verifyDeviceFetchState:z,resendVerifyDeviceOTPFetchState:D}=l((e=>e.tenantState)),S=l((e=>e.tenantState.fetchState)),k=l((e=>e.tenantState.activeTenantFetchState.fetchState)),h=l((e=>e.tenantState.signInState)),I=l((e=>e.tenantState.magicLinkSignInFetchState.fetchState)),s=l((e=>e.tenantState.loggedInUser)),o=l((e=>$(e))),y=l((e=>B(e))),M=r.getSignedInUser(),v=V().mode;u.useEffect((()=>{s?.zeniSessionId==null&&n!=null&&C(n,p)&&i!=null&&f!=null&&(r.saveMagicLinkTriggered(n),t(G(n,i,f)))}),[n,p,t,i,f,s?.zeniSessionId]),u.useEffect((()=>{h!=="In-Progress"||S!=="Completed"&&k!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(H(y.tenantsInOrder),s.zeniSessionId),J(s.userId,s.zeniSessionId,o.tenantId),t(K(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(Q("Completed")),P.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,y.tenantsInOrder),X().then((()=>{const e=R();e!=null&&A(e)})),setTimeout((()=>{N.trackLogin(W.Event.loginSuccess,"email",Y(o.productSettings))}),2e3))}),[h,S,k,s,o,y,v,a.state,t]);const E=u.useCallback((()=>{m("/signin/auth")}),[m]),j=u.useCallback((()=>{i!=null&&c!=null&&d!=null&&t(ee(i,d,c))}),[i,c,t,d]),U=u.useCallback((e=>{i!=null&&n!=null&&d!=null&&c!=null&&t(te(e,i,d,c))}),[i,n,t,d,c]);if(I==="Completed"&&c!=null)return g.jsx(Z,{phoneNumber:x,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:D,onResendOtp:j,onVerifyOtp:U,onCancelVerifyDevice:E});if(h==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||M!=null){const e=a.state?.origin??"/";return g.jsx(T,{to:e,state:{...a.state,origin:""}})}if(!C(n,p)||f==null||I==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return g.jsx(T,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||I==="Error"&&s?.zeniSessionId==null)}})}return g.jsx(oe,{"data-testid":"smooth-loader",children:g.jsx(q,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
2
- position: fixed;
3
- top: 0;
4
- left: 0;
5
- right: 0;
6
- bottom: 0;
7
- display: flex;
8
- align-items: center;
9
- justify-content: center;
10
- z-index: 9999;
11
- background-color: ${t=>t.theme.colors.background};
12
- `;export{Ce as default};
@@ -1 +0,0 @@
1
- import{j as V}from"./liveblocks-BBLi67DG.js";import{a as c}from"./sentry-DW4kKH26.js";import{u as fe,j as n,i as He,g as We,h as Je,l as x}from"./core-D2KaS3N5.js";import{eZ as me,fH as Ke,fI as be,ft as Qe,bn as Xe,eY as qe,fJ as ea,fK as aa,fM as ta,fP as na,fQ as g,fS as sa,fT as de,fW as oa,fU as ia,fV as ra,fX as da,cP as la,fZ as ca,cV as ua,fs as fa,g2 as ma,g3 as ba,g1 as pa}from"./zeni-epic-state-BJ_gdj7r.js";import{a9 as ha,aa as Sa,v as ga,A as Ea,z as k,x as ka,u as Ca,d as r,i as ya,c as Ia,ab as Ta,e as Aa,a as _a,ac as wa,a5 as Da,ad as Fa,ae as va,af as le,ag as ce,L as $a,ah as Pa,ai as ue,f as G,a1 as Ma,r as A,aj as R,ak as xa}from"./index-CivdpZRT.js";import{D as Ga}from"./mui-C1ThRyKO.js";(function(){try{var f=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new f.Error().stack;d&&(f._sentryDebugIds=f._sentryDebugIds||{},f._sentryDebugIds[d]="4fb91689-7102-4a33-9e50-ba12b6f5e67c",f._sentryDebugIdIdentifier="sentry-dbid-4fb91689-7102-4a33-9e50-ba12b6f5e67c")}catch{}})();const Ra=ha((({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=He(),a=We(),C=ga(),o=Je(),B=Qe(),m=fe(),{useFeatureGate:i}=Ea(),N=k.getSignedInUser(),U=Xe(N),s=n((e=>me(e))),pe=s.masterTOSInfo?.isMasterTOSAccepted??!1,O=n((e=>qe(e))),j=O.uiState.currentChatSessionId,y=ka(),{setLoading:he}=Ca(),[_,L]=c.useState(void 0),w=x("/:tenantEmailDomain/dashboard")!==null,Z=x("/:tenantEmailDomain/reports")!==null,I=x("/:tenantEmailDomain/onboarding/*")!==null,Se=!!s.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:ge}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:z}=i(r.isDebitCardFeatureEnabled),Ee=ya(s,ge,z),{isFeatureEnabled:ke}=i(r.isSettingsFeatureEnabled),Y=n((e=>ea(e))),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),D=n((e=>aa(e)));c.useEffect((()=>{y&&T&&!I&&D.fetchState==="Not-Started"&&m(ta(!0))}),[y,T,D.fetchState,I]);const h=k.getSignedInUser(),F=n((e=>e.tenantState)),Ce=n((e=>F.fetchState==="Completed"?na(e):[])),E=n((e=>e.expenseAutomationViewState.selectedPeriodByTenantId)),{isFeatureEnabled:ye}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Ie}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:Te}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:Ae}=i(r.isExpenseAutomationEnabledV2),H=Ia(),{isFeatureEnabled:_e}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:we}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:De}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarNewYearAnimationEnabled),v=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:ve}=i(r.isTaskManagerCustomerUserAccessEnabled),$e=U||!U&&ve,Pe=n((e=>g(e).totalUnreadCount)),Me=n((e=>g(e).reducedFetchCountState)),W=n((e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount)),J=n((e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount)),xe=n((e=>g(e).notificationDetailsByTab.tasks.fetchCountState)),$=n((e=>g(e).notificationDetailsByTab.comments.fetchCountState)),{inboxNotifications:K,isLoading:Q,isFetchingMore:X,hasFetchedAll:q,fetchMore:Ge}=Ta();c.useEffect((()=>{const e=setTimeout((()=>Ge?.()),0);return()=>clearTimeout(e)})),c.useEffect((()=>{if(Q===!1&&X===!1&&q===!0)if(s?.companyId!=null&&K!=null){const e=`dashboard_${s.companyId}`;L(K.filter((u=>u.roomId===e&&u.readAt==null)).length)}else L(0)}),[Q,X,q]),c.useEffect((()=>{y&&!I&&xe.fetchState==="Not-Started"&&B.tenantId!=null&&m(sa("task_manager","dashboard"))}),[y,B.tenantId]),c.useEffect((()=>{I||$.fetchState!=="Not-Started"||m(de({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[]),c.useEffect((()=>{_!=null&&$.fetchState==="In-Progress"&&(m(de({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(be({unreadCount:_},"comments")))}),[_,$.fetchState]);const Re={fetchStatus:Me,count:Pe},ee=t!=null?k.getSignedInUserTenant(t):null,ae=n((e=>ee?.tenantId!=null?oa(e,ee.tenantId):void 0)),S=[];ye===!1&&S.push("accounts_payable_aging"),Ie===!1&&S.push("accounts_receivable_aging"),S.push("zeni_accounts_promo_card","treasury_promo_card"),T===!1&&S.push("rewards_card"),H===!1&&S.push("expense_automation_card");const Ve=Aa(),te=n((e=>ia(e,S,h,Ae,Te).fetchState)),ne=n((e=>ra(e).fetchState)),Be=w&&(te==="Completed"||te==="Error")||Z&&(ne==="Completed"||ne==="Error")||!w&&!Z?void 0:"disabled",Ne=c.useMemo((()=>da(s.userRole)),[s.userRole]),Ue=la(Ne),Oe=s?.rewardsLastViewedTime==null,je=h?.userEmail!=null&&Y.fetchState==="Completed"&&ca(Y.notificationSettings,h.userEmail,z,s),se=_a(),Le=se&&wa(a),oe=ua(Ve?.loggedInUserRoleMap),ie=s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,P=c.useCallback((()=>v&&oe&&!k.getTreasuryPopupSeen(t??"")&&ie===!1&&Da(a.pathname)!=="treasury"),[v,oe,ie,a.pathname,t]),[Ze,re]=c.useState(P);c.useEffect((()=>{re(P())}),[P]);const ze=n((e=>e.treasurySetupViewState.treasuryFundsDetails)).fundsDetails,Ye=Fa(ze);return V.jsx(Ga,{container:window.document.body,variant:"temporary",open:f,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:V.jsx(va,{signedInUser:N,currentTenantId:F.currentTenantId??"",tenants:F.fetchState==="Completed"?Ce:ae!=null?[ae]:[],currentTenant:s,isTenantDropdownDisabled:Be,isSettings:ce(a),isSettingsFeatureEnabled:ke,isVendorsTabVisible:Ue,isZeniAccountEnabled:Se,isChargeCardEnabled:Ee,isTreasuryEnabled:v,treasuryYieldPercentage:Ye,isTreasuryPopupVisible:Ze,isNotificationsTabVisible:je,notificationCountDetails:Re,isExpenseAutomationEnabledForUser:H,selectedMenu:le(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Oe,rewardsPlan:D.rewardsPlan},isAiCfoAccessEnabled:se,onNotificationIconClick:()=>{d(!1);let e=W===0&&J>0?"notifications/comments":"notifications/tasks";ce(a)&&(e=W===0&&J>0?"../../notifications/comments":"../../notifications/tasks");const u=A(a.state?.pathnameStackToGoBack,a.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=A(a.state?.pathnameStackToGoBack,a.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),t==null)return;if(e.type==="ai_cfo"){if(G.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),!pe)return void Ma({location:a,navigate:o,mergeState:{referrer:"Sidebar"}});const p=A(a.state?.pathnameStackToGoBack,a.pathname);return void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:p,referrer:"Sidebar"}})}const u=A(a.state?.pathnameStackToGoBack,a.pathname),l=e.type,b=R(l)&&l!=="command_center";if(R(e.type)&&E[s.tenantId]!=null&&G.trackMonthEndCloseClicked(E[s.tenantId].month,E[s.tenantId].year,"Sidebar"),b&&E[s.tenantId]!=null){const p=E[s.tenantId];return void o(`/${t}/month_end_close_checks/review/${e.type}/${p.month}-${p.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const M=xa(e.type);ue(e.type)?(j!=null&&m(pa()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${M}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${t}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${t}/rewards`)},handleBackClick:()=>{o(`/${t}/dashboard`)},handleTenantSelect:e=>{he($a.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=le(a);let b=`/${encodeURIComponent(u)}/`;const M=R(l);l==="home"?b+="dashboard":l==="users_and_roles"?b+="people":Pa(l)?b+="settings/my_profile":ue(l)?b+=`ai-cfo/${l}`:b+=l==="task_checklist"?"tasks":M?"month_end_close_checks/review":encodeURIComponent(l),o(b,{replace:!0}),h!=null&&(m(ma(e.tenantId)),m(ba(h.userId,e.tenantId,h.zeniSessionId)));const p=e;G.trackCompanySwitch(p.companyId,p.companyName,p.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(t??"",!0),re(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:Le,aiCfoView:O,isOnDashboard:w,updateCurrentChatSessionId:e=>{m(fa({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:_e,isTaskManagerAccessEnabled:$e,thanksGivingAnimationEnabled:we,christmasAnimationEnabled:De,newYearAnimationEnabled:Fe})})})),La=f=>{const d=fe(),t=n((C=>me(C))),a={events:t.userRoleId!=null?[`private-encrypted-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{Sa(o)&&Ke(o.mode)==="dashboard"&&d(be({unreadCount:o.data.unread},"tasks"))}};return V.jsx(Ra,{...f,...a})};export{La as M};