@zeniai/web-app-ui 5.3.70-qa → 5.3.71-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 (150) hide show
  1. package/dist/assets/AccountMappingScreen-wr5e90XY.js +9 -0
  2. package/dist/assets/{ActualMatchingMatchDetailScreen-YIiKaKQ5.js → ActualMatchingMatchDetailScreen-6uqEn8-N.js} +1 -1
  3. package/dist/assets/AddressRoutes-CPs4flxe.js +1 -0
  4. package/dist/assets/{AddressScreen-i3P2ph6T.js → AddressScreen-gHefQKa8.js} +2 -2
  5. package/dist/assets/AiCfoScreen-CEAl0yNI.js +22 -0
  6. package/dist/assets/{AppDrawer-Dql_QZ37.js → AppDrawer-Bn-0lFBO.js} +2 -2
  7. package/dist/assets/{BillPayApprovalRoutes-BCU4pCRz.js → BillPayApprovalRoutes-BiJdZR8U.js} +1 -1
  8. package/dist/assets/{BillPayRoutes-7r9rU7sl.js → BillPayRoutes-DXyhm5fw.js} +18 -18
  9. package/dist/assets/BusinessVerificationPageScreen-BmKmh97q.js +9 -0
  10. package/dist/assets/{CardsAiCfoScreen-C4xeVeSy.js → CardsAiCfoScreen-DQsq0GP-.js} +1 -1
  11. package/dist/assets/{ChargeCardRoutes-BKebJlhL.js → ChargeCardRoutes-DfdupNV2.js} +6 -6
  12. package/dist/assets/{CompanyPassportScreen-BTV6sqcv.js → CompanyPassportScreen-BuvLd6cw.js} +1 -1
  13. package/dist/assets/ConnectionAuthScreen-DjTBqhri.js +11 -0
  14. package/dist/assets/CustomerOnboardingAuthScreen-C8tuILJQ.js +1 -0
  15. package/dist/assets/CustomerOnboardingRoutes-Cy0Po35K.js +30 -0
  16. package/dist/assets/{DashboardRoutes-D-v8IdFM.js → DashboardRoutes-8__sl5wq.js} +3 -3
  17. package/dist/assets/{DefaultTenantHome-Ctr8hbVg.js → DefaultTenantHome-DxwX9QSa.js} +1 -1
  18. package/dist/assets/{DomesticWireDetailScreen-BhmYhgk9.js → DomesticWireDetailScreen-CttDo_kp.js} +4 -4
  19. package/dist/assets/{DrawerScreen-CiI0UwZ_.js → DrawerScreen-BxqxG0PQ.js} +1 -1
  20. package/dist/assets/EntityDetailRoutes-IK763X3v.js +1 -0
  21. package/dist/assets/{ExpenseAutomationRoutes-gNYcLYcp.js → ExpenseAutomationRoutes-D4rJS8i6.js} +6 -6
  22. package/dist/assets/FeaturePreviewScreen-D9YZEx_i.js +1 -0
  23. package/dist/assets/HubSpotOAuthCallbackScreen-D6zpdqh4.js +1 -0
  24. package/dist/assets/{InboxNotificationsProvider-RMyde6sE.js → InboxNotificationsProvider-DKQDEkwT.js} +1 -1
  25. package/dist/assets/{InvoicingRoutes-OgCHCVmr.js → InvoicingRoutes-Dyk-gzDu.js} +2 -2
  26. package/dist/assets/{MagicLinkRoutes-BwkRRCJu.js → MagicLinkRoutes-H-30UeRv.js} +20 -20
  27. package/dist/assets/MagicLinkSignInScreen-D1RkVzRJ.js +12 -0
  28. package/dist/assets/MobileAppDrawer-C8_grDao.js +1 -0
  29. package/dist/assets/NotFoundScreen-ElitTzP9.js +1 -0
  30. package/dist/assets/NotificationRoutes-BjEHHirs.js +1 -0
  31. package/dist/assets/OAuthConsentScreen-CNr6T2co.js +1 -0
  32. package/dist/assets/PandLWithForecastRoutes-CYw1RIs5.js +1 -0
  33. package/dist/assets/{PaymentLinkScreen-CUXZafMx.js → PaymentLinkScreen-Swm1nWjC.js} +5 -5
  34. package/dist/assets/PeopleRoutes-Boqwg3eb.js +22 -0
  35. package/dist/assets/PerformanceRoutes-DeX11Kwz.js +1 -0
  36. package/dist/assets/{Preview-CHfSVeda.js → Preview-_9w2gB0C.js} +1 -1
  37. package/dist/assets/{QBOConnectionScreen-2QWv8Ryp.js → QBOConnectionScreen-DKjMXVLM.js} +1 -1
  38. package/dist/assets/ReimbursementApprovalRoutes-CY-s3rH_.js +1 -0
  39. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-Wh8YBERv.js → ReimbursementApprovalRuleDetailScreen-F2d751hQ.js} +1 -1
  40. package/dist/assets/{ReimbursementRoutes-Cn40tr84.js → ReimbursementRoutes-D0ji16gD.js} +7 -7
  41. package/dist/assets/{ReportsRoutes-DnLayxiF.js → ReportsRoutes-D6NIUgpA.js} +1 -1
  42. package/dist/assets/RewardsRoutes-C1N9iMC3.js +1 -0
  43. package/dist/assets/ScheduleDetailsPrepaidExpensesScreen-BX94snOz.js +33 -0
  44. package/dist/assets/ScreenRoutes-CztUUstz.js +2 -0
  45. package/dist/assets/{SettingsRoutes-C253rFo8.js → SettingsRoutes-CMRE8iHr.js} +6 -6
  46. package/dist/assets/SetupPagesScreen-DYxGkmPi.js +29 -0
  47. package/dist/assets/SignInScreen-eurhSWfY.js +1 -0
  48. package/dist/assets/SignOutScreen-95rXjnV1.js +9 -0
  49. package/dist/assets/TaskListScreen-DGaBfbA4.js +9 -0
  50. package/dist/assets/TaskRoutes-CsEnl9bH.js +9 -0
  51. package/dist/assets/TransactionDetailRoutes-DUZoQUbB.js +1 -0
  52. package/dist/assets/{TransactionDetailScreen-ZbhuUtai.js → TransactionDetailScreen-C-tYoelm.js} +2 -2
  53. package/dist/assets/TransactionListRoutes-DnLBWn4g.js +1 -0
  54. package/dist/assets/{TreasuryRoutes-DULHfT4a.js → TreasuryRoutes-Dq4Gmpbt.js} +4 -4
  55. package/dist/assets/{VendorsRoutes-DDjSbdmH.js → VendorsRoutes-hz5k8whH.js} +13 -13
  56. package/dist/assets/WiseConfirmationScreen-_zEKzS0I.js +12 -0
  57. package/dist/assets/{ZeniAccountRoutes-ZpQZTXfH.js → ZeniAccountRoutes-BA5NYp3W.js} +11 -11
  58. package/dist/assets/ZeniAccountStatementScreen-BpCX0tSO.js +9 -0
  59. package/dist/assets/{accountMappingHelper-CDXfdGYB.js → accountMappingHelper-1el1nsHh.js} +1 -1
  60. package/dist/assets/{analytics-Bwul-sh2.js → analytics-B7hAl0cB.js} +1 -1
  61. package/dist/assets/{analyticsHelper-CJXbjLla.js → analyticsHelper-BfncnDpw.js} +1 -1
  62. package/dist/assets/{core-BTRpO5kD.js → core-CmooL1VE.js} +1 -1
  63. package/dist/assets/{decodeURIComponentSafe-gQrUmSgy.js → decodeURIComponentSafe-XuT8eSZ_.js} +1 -1
  64. package/dist/assets/{dnd-2ZjyQ0g9.js → dnd-DOVValOX.js} +1 -1
  65. package/dist/assets/{empty-Cb7Nu9Hh.js → empty-B6rABti8.js} +1 -1
  66. package/dist/assets/{empty-W69oI4tU.js → empty-DGUQebD_.js} +1 -1
  67. package/dist/assets/{emptyVideoElement-BykFTq6U.js → emptyVideoElement-ChZj1Ygj.js} +1 -1
  68. package/dist/assets/epic-CTQc1g-i.js +2 -0
  69. package/dist/assets/expenseAutomationHelper-C7H1WvS_.js +1 -0
  70. package/dist/assets/{getLocaleForTenant-COzbHLDP.js → getLocaleForTenant-BECA4-x0.js} +1 -1
  71. package/dist/assets/{index-EIrua76A.js → index-9VkJMIRG.js} +1 -1
  72. package/dist/assets/{index-CyWlZL1X.js → index-Bfs9-uOP.js} +2 -2
  73. package/dist/assets/{index-O5NQ6O4f.js → index-CcKNzvE0.js} +1 -1
  74. package/dist/assets/{index-BpHR89qw.js → index-DEI9m138.js} +1 -1
  75. package/dist/assets/{index-Ds59pPsN.js → index-DP7dTvCr.js} +1 -1
  76. package/dist/assets/{index-BNStHB6B.js → index-DfUoN49n.js} +1 -1
  77. package/dist/assets/{index-D-DXs1ug.js → index-LS_Pdivs.js} +16966 -16825
  78. package/dist/assets/{index-Dt8qJC5s.js → index-qN-QWXiP.js} +1 -1
  79. package/dist/assets/{lexical-B4Vx7iXM.js → lexical-BvHYLizv.js} +1 -1
  80. package/dist/assets/{liveblocks-CSh_vLcI.js → liveblocks-C6uJkYDp.js} +1 -1
  81. package/dist/assets/{lottie-CkDkDB9t.js → lottie-fAK2s9Hi.js} +1 -1
  82. package/dist/assets/{mui-DxxQrDXb.js → mui-rM9SB4se.js} +1 -1
  83. package/dist/assets/{pathToGoBack-CVTu70jh.js → pathToGoBack-hFb7er_y.js} +1 -1
  84. package/dist/assets/{pdf-B5u-xbSo.js → pdf-BB_582W7.js} +4 -4
  85. package/dist/assets/{pdf-lib-reHt5MEc.js → pdf-lib-CuUeF_UU.js} +1 -1
  86. package/dist/assets/{plaid-BETTZw7O.js → plaid-FTXMeicc.js} +1 -1
  87. package/dist/assets/{pusher-Ckps79Gu.js → pusher-BUX3wmLc.js} +1 -1
  88. package/dist/assets/{react-2QuTt-Yq.js → react-BDtCLFch.js} +1 -1
  89. package/dist/assets/{react-BwbSXuKk.js → react-BdMxK4It.js} +1 -1
  90. package/dist/assets/{react-D5AIOkBV.js → react-C_Xx03pb.js} +1 -1
  91. package/dist/assets/{react-BEHSpArB.js → react-CuH64ZSw.js} +1 -1
  92. package/dist/assets/{react-DAYatQOH.js → react-DKS-lUPm.js} +1 -1
  93. package/dist/assets/{react-CnCpDB3_.js → react-DSY5pTXE.js} +1 -1
  94. package/dist/assets/{recharts-TU-ixTpA.js → recharts-DKAwX7BS.js} +1 -1
  95. package/dist/assets/{routePaths-BpwABclb.js → routePaths-CMAA0FK7.js} +1 -1
  96. package/dist/assets/{sentry-BbRn6Rps.js → sentry-CcNJwOXe.js} +1 -1
  97. package/dist/assets/{stripSplatSuffix-CHEOIiL-.js → stripSplatSuffix-bj8J_4FB.js} +1 -1
  98. package/dist/assets/{url-COMcQU2v.js → url-CvKbggsF.js} +1 -1
  99. package/dist/assets/{url-DFeqMB02.js → url-DmEjP37W.js} +1 -1
  100. package/dist/assets/useActualMatchingMatchDetail-CKR9mGuu.js +1 -0
  101. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-BeQw4E92.js → useAiCfoDashboardSuggestedQuestionsChips-DK2RBwgq.js} +1 -1
  102. package/dist/assets/useAskAiCfoHostNavButtonProps-B-1FcFXF.js +1 -0
  103. package/dist/assets/{useChargeCardPusherEvents-6cwlQnL1.js → useChargeCardPusherEvents-DdxKTDyN.js} +1 -1
  104. package/dist/assets/{useDeviceId-BNqfuCC6.js → useDeviceId-OT3_gug1.js} +1 -1
  105. package/dist/assets/useEmailConnectResultRefresh-B_ss3xIm.js +1 -0
  106. package/dist/assets/{useInitialThreadRequest-CVcZLc8x.js → useInitialThreadRequest-D0Rb6DJ1.js} +1 -1
  107. package/dist/assets/useTaskManagerAccess-Dav7QmvM.js +1 -0
  108. package/dist/assets/{useTaskManagerPusherEvents-QjRM_WrB.js → useTaskManagerPusherEvents-Rcj3c0Hv.js} +1 -1
  109. package/dist/assets/{utils-CG6WKZWt.js → utils-CKeki_tc.js} +1 -1
  110. package/dist/assets/{withTransactionSidePanel-_2doqhuK.js → withTransactionSidePanel-D42v1kum.js} +4 -4
  111. package/dist/assets/{zeni-epic-state-GGdMfKwk.js → zeni-epic-state-GBqWdYww.js} +5 -5
  112. package/dist/index.html +1 -1
  113. package/package.json +4 -4
  114. package/dist/assets/AccountMappingScreen-DqcX7eSX.js +0 -9
  115. package/dist/assets/AddressRoutes-BQwEhrxO.js +0 -1
  116. package/dist/assets/AiCfoScreen-BssUSHKh.js +0 -22
  117. package/dist/assets/BusinessVerificationPageScreen-BtYE51TA.js +0 -9
  118. package/dist/assets/ConnectionAuthScreen-CxytsIZE.js +0 -11
  119. package/dist/assets/CustomerOnboardingAuthScreen-BihvMY31.js +0 -1
  120. package/dist/assets/CustomerOnboardingRoutes-DNk5fzPY.js +0 -30
  121. package/dist/assets/EntityDetailRoutes-DvFtuOf8.js +0 -1
  122. package/dist/assets/FeaturePreviewScreen-DiNAV9z-.js +0 -1
  123. package/dist/assets/HubSpotOAuthCallbackScreen-DweVccIt.js +0 -1
  124. package/dist/assets/MagicLinkSignInScreen-wnNTguw6.js +0 -12
  125. package/dist/assets/MobileAppDrawer-C0d1iVMA.js +0 -1
  126. package/dist/assets/NotFoundScreen-BEmDKBPw.js +0 -1
  127. package/dist/assets/NotificationRoutes-CI7va7e0.js +0 -1
  128. package/dist/assets/OAuthConsentScreen-DV8WsAVC.js +0 -1
  129. package/dist/assets/PandLWithForecastRoutes-B1Gfn6ud.js +0 -1
  130. package/dist/assets/PeopleRoutes-Bn8rhJs3.js +0 -22
  131. package/dist/assets/PerformanceRoutes-CvtwCDup.js +0 -1
  132. package/dist/assets/ReimbursementApprovalRoutes-EobIM3L1.js +0 -1
  133. package/dist/assets/RewardsRoutes-xdDqPM6d.js +0 -1
  134. package/dist/assets/ScheduleDetailsPrepaidExpensesScreen-CwSWMHf6.js +0 -33
  135. package/dist/assets/ScreenRoutes-B8Lww7Hb.js +0 -2
  136. package/dist/assets/SetupPagesScreen-K8aynBOv.js +0 -29
  137. package/dist/assets/SignInScreen-B673IWUl.js +0 -1
  138. package/dist/assets/SignOutScreen-BY00T1e6.js +0 -9
  139. package/dist/assets/TaskListScreen-DqA1P3PO.js +0 -9
  140. package/dist/assets/TaskRoutes-BXCCg41Z.js +0 -9
  141. package/dist/assets/TransactionDetailRoutes-fr5aBjbx.js +0 -1
  142. package/dist/assets/TransactionListRoutes-skEyucsa.js +0 -1
  143. package/dist/assets/WiseConfirmationScreen-BeEAkT2z.js +0 -12
  144. package/dist/assets/ZeniAccountStatementScreen-fYBBQyBB.js +0 -9
  145. package/dist/assets/epic-dVflju6K.js +0 -2
  146. package/dist/assets/expenseAutomationHelper-D83VUSa4.js +0 -1
  147. package/dist/assets/useActualMatchingMatchDetail-CCjKruLV.js +0 -1
  148. package/dist/assets/useAskAiCfoHostNavButtonProps-B9dKaXC2.js +0 -1
  149. package/dist/assets/useEmailConnectResultRefresh-CD4x3asD.js +0 -1
  150. package/dist/assets/useTaskManagerAccess-DkfJ_Uxt.js +0 -1
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-D-DXs1ug.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-BbRn6Rps.js"><link rel="modulepreload" crossorigin href="/assets/core-BTRpO5kD.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-GGdMfKwk.js"><link rel="modulepreload" crossorigin href="/assets/mui-DxxQrDXb.js"><link rel="modulepreload" crossorigin href="/assets/analytics-Bwul-sh2.js"><link rel="modulepreload" crossorigin href="/assets/utils-CG6WKZWt.js"><link rel="stylesheet" crossorigin href="/assets/index-BhC2LNQw.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-LS_Pdivs.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-CcNJwOXe.js"><link rel="modulepreload" crossorigin href="/assets/core-CmooL1VE.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-GBqWdYww.js"><link rel="modulepreload" crossorigin href="/assets/mui-rM9SB4se.js"><link rel="modulepreload" crossorigin href="/assets/analytics-B7hAl0cB.js"><link rel="modulepreload" crossorigin href="/assets/utils-CKeki_tc.js"><link rel="stylesheet" crossorigin href="/assets/index-BhC2LNQw.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.3.70-qa",
3
+ "version": "5.3.71-dev",
4
4
  "files": [
5
5
  "dist/**/*"
6
6
  ],
@@ -28,9 +28,9 @@
28
28
  "@sentry/core": "^9.42.1",
29
29
  "@sentry/react": "^9.42.1",
30
30
  "@stripe/stripe-js": "^4.4.0",
31
- "@zeniai/client-analytics": "2.0.96",
32
- "@zeniai/client-epic-state": "5.2.69",
33
- "@zeniai/web-components": "4.4.9",
31
+ "@zeniai/client-analytics": "2.0.98",
32
+ "@zeniai/client-epic-state": "5.2.71",
33
+ "@zeniai/web-components": "4.4.10",
34
34
  "color": "3.1.3",
35
35
  "crypto-js": "4.2.0",
36
36
  "dnd-core": "^16.0.1",
@@ -1,9 +0,0 @@
1
- import{j as D}from"./liveblocks-CSh_vLcI.js";import{a as o}from"./sentry-BbRn6Rps.js";import{h as W,g as X,u as H,j as m,s as R,l as K}from"./core-BTRpO5kD.js";import{ai as Z,c as ee,g as q,z as te,s as G,aj as ne,m as ae,T as ce}from"./index-D-DXs1ug.js";import{bn as se,fI as oe,gY as ie,oE as Y,UU as re,ib as J,gk as ue,ov as le,UV as de,UW as pe,ug as ge,m2 as me,ot as be,op as Ae,oA as fe,id as Ie,UX as ye,UY as Se}from"./zeni-epic-state-GGdMfKwk.js";import{n as he}from"./mui-DxxQrDXb.js";import{M as Ee}from"./MobileAppDrawer-C0d1iVMA.js";import{q as $}from"./QBOConnectionScreen-2QWv8Ryp.js";import{g as h,a as E,m as ze}from"./accountMappingHelper-CDXfdGYB.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="e99b540c-9cb6-490f-a796-faaaffb9bf7e",a._sentryDebugIdIdentifier="sentry-dbid-e99b540c-9cb6-490f-a796-faaaffb9bf7e")}catch{}})();const u="zeni_pending_projects_enable",l={pending:"pending",ready:"ready"},ve=he.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: ${a=>a.theme.colors.grey4};
9
- `,we=K((function(a,e){return{accountMappingView:e.accountMappingView,isFiling1099FeatureEnabled:e.isFiling1099FeatureEnabled,isAccruedExpensesFeatureEnabled:e.isAccruedExpensesFeatureEnabled,isAccountingClassesEnabled:me(a),isAccountingClassesUpdateInProgress:a.companyViewState.passportView?.accountingClassesUpdateStatus?.fetchState==="In-Progress",isAccountingProjectsEnabled:ge(a),isAccountingProjectsUpdateInProgress:(()=>{const i=sessionStorage.getItem(u),c=i===l.pending||i===l.ready;return a.companyViewState.passportView?.accountingProjectsUpdateStatus?.fetchState==="In-Progress"||c})(),isCapitalizationFeatureEnabled:e.isCapitalizationFeatureEnabled,capitalizableAccounts:e.capitalizableAccounts,accountNamesById:e.accountNamesById,capitalizableAccountOverrides:e.capitalizableAccountOverrides,isCapitalizationThresholdSaving:e.isCapitalizationThresholdSaving,onSaveCapitalizationAccountThreshold:e.onSaveCapitalizationAccountThreshold}}),(function(a,e){const{navigate:i,location:c,isFiling1099FeatureEnabled:b}=e;return{onAccountMappingChange:r=>{const{uncategorizedAccountSection:d,billsAccountSection:z,reimbursementsAccountSection:v,vendorsAccountSection:w,filing1099Section:C}=r,{incomeAccount:x,expenseAccount:F}=d,{billPayAccount:s}=z,{reimbursementsAccount:T}=v,{prepaidExpensesAccount:p,fixedAssetsAccount:V,accruedExpensesAccount:O}=w,{bankAccount:M,expenseCategory1099:j}=C,A=h(e.accountMappingView.incomeAccountList,x.selectedOption),k=h(e.accountMappingView.expenseAccountList,F.selectedOption),f=h(e.accountMappingView.billPayAccountList,s.selectedOption),_=h(e.accountMappingView.reimbursementsAccountList,T.selectedOption),P=E(e.accountMappingView.prepaidExpensesAccountList,p.selectedOptions),U=E(e.accountMappingView.fixedAssetsAccountList,V.selectedOptions),I=E(e.accountMappingView.accruedExpensesAccountList,O.selectedOptions),L=E(e.accountMappingView.bankAccounts1099FilingAccountList,M.selectedOptions),y=ze(e.accountMappingView.expenseAccounts1099FilingAccountList,j),t={selectedIncomeAccountId:A?.accountId,selectedExpenseAccountId:k?.accountId,selectedBillPayAccountId:f?.accountId,selectedReimbursementsAccountId:_?.accountId,selectedPrepaidExpensesAccountIds:P.map((n=>n.accountId)),selectedFixedAssetsAccountIds:U.map((n=>n.accountId)),selectedAccruedExpensesAccountIds:I.map((n=>n.accountId)),selectedBankAccounts1099FilingAccountIds:L.map((n=>n.accountId)),selectedExpenseAccounts1099FilingAccountIds:y};a(Se({data:t}))},onBackClick:()=>{G(c)===!1?(i("../../dashboard"),a(ye())):a(J())},onSaveClick:()=>{a(Ie()),b&&ae.track(ce.Event.vendor1099AccountingSettingsSave)},onAccountingClassesToggle:r=>{a(fe(e.currentTenant.companyId,r))},onAccountingProjectsToggle:r=>{const d=sessionStorage.getItem(u);d===l.pending||d===l.ready||a(r?be(e.currentTenant.companyId):Ae(e.currentTenant.companyId))}}}))(ne),_e=()=>{const a=Z(),e=W(),i=X(),c=H(),{useFeatureGate:b,useDynamicConfig:r}=ee(),{isFeatureEnabled:d}=b(q.isFiling1099FeatureEnabled),{isFeatureEnabled:z}=b(q.isScheduledJEAccruedExpensesFeatureEnabled),{configValue:v,isDynamicConfigLoading:w}=r("transaction_categorization_config"),C=!w&&v?.capitalization_enabled===!0,x=te.getSignedInUser(),F=se(x),s=m((t=>oe(t))),{capitalizableAccounts:T,capitalizableAccountOverrides:p,isCapitalizationThresholdSaving:V,currencySymbol:O}=m((t=>{const n=t.tenantState.currentTenantId,g=n!=null?t.tenantState.tenantsById[n]:void 0,S=ie(t.companyState,s.companyId);return{capitalizableAccounts:g?.capitalizableAccounts??null,capitalizableAccountOverrides:g?.capitalizableAccountOverrides??null,isCapitalizationThresholdSaving:t.companyViewState.passportView?.capitalizationThresholdUpdateStatus?.fetchState==="In-Progress",currencySymbol:S?.company.companyLocaleInfo?.currencySymbol??"$"}}),R),M=o.useCallback(((t,n)=>{c(Y(s.companyId,t,n))}),[c,s.companyId]),j=o.useCallback((t=>{const n={...p??{}},g=Object.entries(t);for(const[B,N]of g)N===null?delete n[B]:n[B]=N;const[S,Q]=g[0]??[];S!=null&&c(Y(s.companyId,S,Q,void 0,Object.keys(n).length>0?n:null))}),[c,s.companyId,p]),A=m((t=>re(t.accountState)),R),k=o.useMemo((()=>{const t={};for(const n of A)n.accountId!=null&&n.accountName!=null&&(t[n.accountId]=n.accountName);return t}),[A]),[f,_]=o.useState(!1),[P,U]=o.useState(!1);o.useEffect((()=>{f===!1&&(c(J()),_(!0))}),[f]);const I=m((t=>t.companyViewState.passportView?.needsQboProjectsReconnect===!0));o.useEffect((()=>{sessionStorage.getItem(u)===l.pending&&(sessionStorage.removeItem(u),c(ue({messageSection:"accounting_projects_qbo_reconnect_failed",messageText:"failed",type:"error"})))}),[c]),o.useEffect((()=>{sessionStorage.getItem(u)===l.ready&&s?.companyId!=null&&(sessionStorage.removeItem(u),c(le(s.companyId)))}),[s?.companyId,c]),o.useEffect((()=>{I&&s?.tenantEmailDomain!=null&&(sessionStorage.setItem(u,l.pending),c(de()),$.init("/connection/auth",s.tenantEmailDomain),$.handleClick())}),[I,s?.tenantEmailDomain,c]);const L=m((t=>pe(t))),y=t=>{U(t)};return D.jsxs(ve,{children:[D.jsx(Ee,{isAppContentDrawerOpen:P,handleDrawerToggle:y}),D.jsx(we,{currentTenant:s,navigate:e,meetingUrl:a("account_mapping"),accountMappingView:L,isFiling1099FeatureEnabled:d&&F,isAccruedExpensesFeatureEnabled:z,isCapitalizationFeatureEnabled:C,capitalizableAccounts:T,accountNamesById:k,capitalizableAccountOverrides:p,currencySymbol:O,isCapitalizationThresholdSaving:V,onSaveCapitalizationAccountThreshold:M,onSaveCapitalizationAccountThresholds:j,location:i,isSettings:G(i),onClickMenuIcon:()=>y(!0)})]})};export{u as P,_e as U,l as a};
@@ -1 +0,0 @@
1
- import{j as e}from"./liveblocks-CSh_vLcI.js";import{A as i}from"./AddressScreen-i3P2ph6T.js";import s from"./NotFoundScreen-BEmDKBPw.js";import"./sentry-BbRn6Rps.js";import{n as d,o as r}from"./core-BTRpO5kD.js";import"./zeni-epic-state-GGdMfKwk.js";import"./recharts-TU-ixTpA.js";import"./index-D-DXs1ug.js";import"./mui-DxxQrDXb.js";import"./analytics-Bwul-sh2.js";import"./plaid-BETTZw7O.js";import"./dnd-2ZjyQ0g9.js";import"./stripe-cKAAJElX.js";import"./lottie-CkDkDB9t.js";import"./lexical-B4Vx7iXM.js";import"./pdf-B5u-xbSo.js";import"./utils-CG6WKZWt.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]="81cbb5c1-1b56-4d87-a240-ae6c03b91825",t._sentryDebugIdIdentifier="sentry-dbid-81cbb5c1-1b56-4d87-a240-ae6c03b91825")}catch{}})();function _(){return e.jsxs(d,{children:[e.jsx(r,{path:"/edit/:addressType/:addressId",element:e.jsx(i,{})}),e.jsx(r,{path:"/new/:addressType",element:e.jsx(i,{})}),e.jsx(r,{path:"*",element:e.jsx(s,{})})]})}export{_ as default};
@@ -1,22 +0,0 @@
1
- import{j as h}from"./liveblocks-CSh_vLcI.js";import{a}from"./sentry-BbRn6Rps.js";import{u as Qt,h as Ut,i as Lt,g as Bt,j as b,l as Ft}from"./core-BTRpO5kD.js";import{a as Mt,k as $t,e6 as Vt,z as Nt,a1 as Ht,e7 as Gt,e8 as qt,e9 as zt,bp as Be,ea as We,eb as Wt,bo as Ye,a4 as ge,a8 as ce,m as M,ec as me,ed as Yt,ee as Jt,au as Xt,T as Kt,w as Zt,ef as es,eg as ts,av as ss,eh as as,ei as ns,ej as os,ek as is,p as rs,bk as Fe,el as ls}from"./index-D-DXs1ug.js";import{fH as F,gw as R,Uh as us,a2v as ds,a2w as cs,jP as ms,a2x as Ss,jM as hs,a2y as Se,js as W,jV as Y,jy as Ie,jf as he,jd as ps,jX as fs,jH as Je,Uq as Me,gy as $,gN as gs,Up as Is,Ua as $e,fI as Cs,j6 as ks,a2z as bs,gb as vs,jo as Es,jk as Ps,fJ as pe,gi as ys,a2A as ws,a2B as xs,a2C as Rs,gx as Ts,gr as Ve,k7 as Ne,gt as He,gz as js,a2D as Ge,jY as As,jh as Os,jB as _s,jT as qe,jE as Ds,gA as Qs,gB as Us,gC as Ls,gD as Bs}from"./zeni-epic-state-GGdMfKwk.js";import{D as Fs,n as V,S as Ms,P as $s}from"./mui-DxxQrDXb.js";import{u as Vs}from"./useAiCfoDashboardSuggestedQuestionsChips-BeQw4E92.js";import{p as Ns}from"./pathToGoBack-CVTu70jh.js";import{j as Hs}from"./routePaths-BpwABclb.js";import{u as Gs}from"./useTaskManagerPusherEvents-QjRM_WrB.js";import"./recharts-TU-ixTpA.js";import"./analytics-Bwul-sh2.js";import"./plaid-BETTZw7O.js";import"./dnd-2ZjyQ0g9.js";import"./stripe-cKAAJElX.js";import"./lottie-CkDkDB9t.js";import"./lexical-B4Vx7iXM.js";import"./pdf-B5u-xbSo.js";import"./utils-CG6WKZWt.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new s.Error().stack;r&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[r]="6e25de1d-2e7b-4804-a6d7-816f31901ca6",s._sentryDebugIdIdentifier="sentry-dbid-6e25de1d-2e7b-4804-a6d7-816f31901ca6")}catch{}})();const qs=["claimed","running","succeeded","failed","timeout"],fe=s=>typeof s=="string"&&s!=="",Xe="chat-response-generated";function zs(s,r){if(r.kind!=="save")return;if(r.fetchState==="In-Progress")return{status:"saving"};if(r.fetchState==="Error")return{status:"failed"};if(r.fetchState!=="Completed")return;const t=R(s).skills.find((l=>l.macroId===r.savedMacroId));return t==null?void 0:{status:"saved",command:t.name}}const Ws=Ft((function(s,r){const t=F(s),l=r.isSubmitting,c=t.uiState?.currentChatSessionId,i=c!=null?ys(s.aiCfoState,c):[],f=ts(s,{allUsers:r.allUsers,onCardPolicyVendorSearchTextChange:r.onCardPolicyVendorSearchTextChange}),p=ws(s),S=xs(s),O=Rs(s);return{showSampleQuestions:r.sessionFromUrl==="explore"&&t.uiState.currentChatSessionId==null,aiCfoView:t,isSubmitting:l,isNewChatSession:r.sessionFromUrl==="new_chat"||r.sessionFromUrl==="explore",isFullView:!0,tableDownloadEndPoint:`${ss}/tableDownload`,exportDownloadEndPoint:os(),emailLinkQuestion:r.emailLinkQuestion,autoSubmitEmailLinkQuestion:r.autoSubmitEmailLinkQuestion,onEmailLinkQuestionProcessed:r.onEmailLinkQuestionProcessed,routedInitialQuestionSource:r.routedInitialQuestionSource,routedInitialQuestionSuggestionIndex:r.routedInitialQuestionSuggestionIndex,exploreSuggestedPromptQuestions:r.exploreSuggestedPromptQuestions,exploreSuggestedPromptQuestionsLoading:r.exploreSuggestedPromptQuestionsLoading,isFileUploadEnabled:r.isFileUploadEnabled,isUploadPromoVisible:r.isUploadPromoVisible,onUploadPromoClose:r.onUploadPromoClose,skills:R(s).skills,skillSaveState:zs(s,O),skillsEnabled:R(s).skillsEnabled,skillsList:R(s).skills,skillsListError:R(s).fetchState==="Error",skillsListLoading:R(s).fetchState==="In-Progress",skillsCanPublish:R(s).canPublish,skillSaving:O.fetchState==="In-Progress",skillSaveError:O.fetchState==="Error",skillVersionHistory:p.macroId!=null?{macroId:p.macroId,versions:p.versions,error:p.fetchState==="Error",loading:p.fetchState==="In-Progress"}:void 0,skillRestoreBody:S.macroId!=null&&S.version!=null?{macroId:S.macroId,version:S.version,instructions:S.instructions,error:S.fetchState==="Error",loading:S.fetchState==="In-Progress"}:void 0,skillDetail:Y(s).detail,skillDetailError:Y(s).fetchState==="Error",skillDetailLoading:Y(s).fetchState==="In-Progress",syntheticAnswers:i,resolveSyntheticAnswerCardTile:ns(s),resolveSyntheticAnswerPolicyTile:as(s),...f}}),(function(s,r){const{location:t,currentTenant:l,userId:c,navigate:i,currentChatSessionId:f,allSessionsWithOrderedQuestionAnswers:p,isAiCardCreationEnabled:S,isCardPolicyEnabled:O,setIsAiCfoOpen:U}=r,T=l.tenantEmailDomain;return{onEventReceived:(n,o)=>{if(n===Xe&&typeof o.text=="string"&&typeof o.metadata=="object"){const m=o,E=Qs(m.type),v=m.metadata.chat_session_id??null,{currentChatSession:J,currentQuestionAnswer:j,currentQuestionAnswerSummary:X}=Ye(p,v);E!=="answer"?M.trackAICFOChatResponseGenerated(E,j?.question.questionText??"",m.text,v,ls(X,J),m.metadata.message_id??null):M.trackAICFOChatAnswerGenerated(m.text,j?.question.questionText??"",(m.follow_up_questions?.length??0)>0,!!m.assumptions,!!m.insights,m.visualization!=null,Us(m.visualization?.type??"")??null,v,m.summarized_title,m.metadata.message_id??null),s(Ls({chatSessionId:m.metadata.chat_session_id,responseType:E,fetchState:{fetchState:"Completed",error:void 0}})),s(Bs({chatSessionId:m.metadata.chat_session_id,answerPayload:m,userId:c}))}},onSubmit:(n,o,m,E,v)=>{n&&Fe(s,n,o,f,p,c,E,m,void 0,v)},onFetchSkills:()=>{s(Je())},onOpenSkill:n=>{s(Ie({macroId:n})),s(Ds({macroId:n}))},onSaveSkill:(n,o)=>{s(qe({draft:n,macroId:o}))},onSaveSkillDraft:n=>{const o=n.displayName?.trim()??"",m=n.name?.trim()??"";s(qe({draft:{name:o.length>0?o:m,description:n.description?.trim()??null,instructions:n.instructions,visibility:"private"}}))},onFetchSkillVersionBody:(n,o)=>{s(_s({macroId:n,version:o}))},onDeleteSkill:n=>{s(Os({macroId:n}))},onSetSkillVisibility:(n,o)=>{s(As({macroId:n,visibility:o}))},onCloseSkillDetail:()=>{s(Ge())},onRunSkill:(n,o)=>{s($()),s(Ve()),Fe(s,o,"user_input",void 0,p,c,void 0,void 0,void 0,n),s(Ge())},updateCurrentInput:n=>{s(He(n))},onStopSubmit:()=>{},onUpdateScrollYOffset:n=>{s(js(n))},onSelectSampleQuestion:()=>{},onBackClick:()=>{i(-1)},onCloseClick:()=>{const n=ge(t.state?.pathnameStackToGoBack),o=n.poppedPathname??Ns(1);i(o,{state:{...t.state,pathnameStackToGoBack:n.newStack}}),s(He(""))},togglePageView:()=>{const n=ge(t.state?.pathnameStackToGoBack),o=n.poppedPathname??`/${l.tenantEmailDomain}/dashboard`;i(o,{state:{...We(t.state),pathnameStackToGoBack:n.newStack,message:"open_ai_cfo_drawer"}}),U(!0)},onCopy:()=>{},onThumbsUp:(n,o)=>{f!=null&&o?.messageId!=null&&s(Ne(f,o.messageId,"positive",o.questionText,o.answerText))},onThumbsDown:(n,o)=>{f!=null&&o?.messageId!=null&&s(Ne(f,o.messageId,"negative",o.questionText,o.answerText))},onTogglePageView:()=>{i(-1)},onNewChatClick:()=>{s($()),f!=null&&s(Ve());const n=rs(t.state?.pathnameStackToGoBack,t.pathname);i(`/${l.tenantEmailDomain}/ai-cfo/new_chat`,{state:{pathnameStackToGoBack:n.slice(0,-1),referrer:"Sidebar"}})},onToggleCotCollapsed:(n,o)=>{s(Ts({questionAnswerId:n,isCollapsed:o}))},onMenuClick:r.onMenuClick,...is(s,{isAiCardCreationEnabled:S,isCardPolicyEnabled:O,currentChatSessionId:f,onAfterCardsCreationSubmit:()=>{U(!0),i(`/${T}/cards`,{state:{...t.state}})},onAfterCardPolicySubmit:()=>{U(!0),i(`/${T}/cards/policy`,{state:{...t.state}})}})}}))(Zt(es)),Ia=({isFileUploadEnabled:s})=>{const{setIsAiCfoOpen:r}=Mt(),t=Qt(),l=Ut(),{session_id:c}=Lt(),i=Bt(),f=new URLSearchParams(i.search).get("routine")??void 0,[p,S]=a.useState(!1),O=b((e=>F(e).uiState.isSkillsBrowserOpen===!0)),U=b((e=>R(e).skillsEnabled)),T=b((e=>F(e).uiState.isRoutinesBrowserOpen===!0)),n=b((e=>us(e))),o=b((e=>ds(e))),m=b((e=>cs(e))),[E,v]=a.useState(void 0),[J,j]=a.useState(!1),[X,Ce]=a.useState(void 0),Ke=a.useCallback((()=>{Ce(void 0),v(void 0),j(!0)}),[]),Ze=a.useCallback((e=>{v(e),j(!0)}),[]),et=a.useCallback((()=>{v(void 0),j(!1)}),[]),tt=a.useCallback((e=>{t(ms({draft:e,...E!=null&&{scheduleId:E.scheduleId}})),v(void 0),j(!1)}),[t,E]),P=f,ke=n.routines.find((e=>e.scheduleId===P)),I=b((e=>Ss(e))),st=a.useCallback((e=>{t(hs({scheduleId:e.scheduleId}))}),[t]);a.useEffect((()=>{t(P!=null?W({scheduleId:P}):Se())}),[t,P]);const B=ke?.macroId,at=b((e=>Y(e))),be=B!=null&&B!==""&&at.fetchState==="Not-Started";a.useEffect((()=>{be&&B!=null&&t(Ie({macroId:B}))}),[t,be,B]);const nt=b((e=>F(e).uiState.currentChatSessionId))??c,C=n.routines.find((e=>e.scheduleId===f))??n.routines.find((e=>e.scheduleId===$t(nt))),A=C?.scheduleId??null,[ve,ot]=a.useState(!0);a.useEffect((()=>{A!=null&&t(W({scheduleId:A}))}),[t,A]);const Ee=I.runs.some((e=>e.status==="claimed"||e.status==="running"))===!0;a.useEffect((()=>{if(P==null||Ee!==!0)return;const e=window.setInterval((()=>{t(W({scheduleId:P})),t(he())}),5e3);return()=>window.clearInterval(e)}),[t,Ee,P]);const it=a.useCallback((e=>{Ce(e),v(void 0),j(!0)}),[]),rt=a.useCallback((e=>{t(ps({scheduleId:e.scheduleId}))}),[t]),lt=a.useCallback(((e,d)=>{t(fs({enabled:d,scheduleId:e.scheduleId}))}),[t]);a.useEffect((()=>{T&&t(he())}),[t,T]);const Pe=b((e=>R(e).skills)),K=a.useMemo((()=>Pe.map((e=>({macroId:e.macroId,name:e.displayName??e.name})))),[Pe]),ut=a.useCallback((e=>{t(Ie({macroId:e}))}),[t]),Z=a.useCallback((()=>{t(Je()),t(Me())}),[t]),dt=a.useCallback((()=>{t($())}),[t]),{allUsers:ct,isAiCardCreationEnabled:mt,isCardPolicyEnabled:St,onCardPolicyVendorSearchTextChange:ht}=Vt();a.useEffect((()=>{t(gs())}),[t]);const g=b((e=>F(e))),w=Nt.getSignedInUser();a.useEffect((()=>c==="routines"?(t($()),void t(Is())):c==="skills"?(t(Se()),t($e()),void t(Me())):(A==null&&t(Se()),t($e()),void t($()))),[t,A,f,c]);const pt=Ht(),_=Xt(pt),k=b((e=>Cs(e))),u=g.uiState.currentChatSessionId,y=k.tenantEmailDomain,L=y!=null&&y!=="",ee=a.useCallback((e=>{L&&l(`/${y}/ai-cfo/routines?routine=${encodeURIComponent(e.scheduleId)}`)}),[L,l,y]),te=a.useCallback((()=>{L&&l(`/${y}/ai-cfo/routines`)}),[L,l,y]),se=a.useCallback(((e,d)=>{const D=e.sessionId??I.sessionId;D!=null&&L&&l(`/${y}/ai-cfo/${D}?routine=${encodeURIComponent(d)}`)}),[L,l,I.sessionId,y]),ft=a.useMemo((()=>C==null?void 0:{error:I.fetchState==="Error",kind:"routineRuns",loading:I.fetchState==="In-Progress"||I.fetchState==="Not-Started",routineName:C.name,schedule:Gt(C),skillName:C.isAdHoc===!0?void 0:K.find((e=>e.macroId===C.macroId))?.name,onOpenSkill:C.isAdHoc===!0?void 0:Z,runs:I.runs,tzName:C.tzName,unreadCount:C.unreadRuns,open:ve,onToggle:()=>ot((e=>!e)),onOpenRun:e=>se(e,C.scheduleId),onOpenRoutine:()=>ee(C),onOpenRoutines:te}),[Z,te,ee,se,ve,C,I.fetchState,I.runs,K]),{handleUploadPromoClose:gt,isUploadPromoVisible:It}=qt({isFileUploadEnabled:s,tenantEmailDomain:y}),ae=zt({currentTenant:k,currentChatSessionId:u,aiCfoView:g,skillsEnabled:U,onCloseSkills:dt,onOpenSkills:Z}),{isSuggestedQuestionsLoading:Ct,suggestedPromptQuestions:kt}=Vs(),N=i.state,H=N?.aiCfoInitialQuestion,ye=!!N?.aiCfoShouldSubmit;a.useEffect((()=>{const e=i.state;if(e?.[Be]!==!0)return;S(!0);const d={...e};delete d[Be],l(i,{replace:!0,state:d})}),[i.pathname,i.search,i.state,l]);const[bt,ne]=a.useState(null),[vt,oe]=a.useState(!1),[Et,ie]=a.useState(void 0),[Pt,re]=a.useState(void 0),we=a.useRef(!1);a.useEffect((()=>{if(!we.current&&H!=null&&H!==""){const e=i.state;ne(H),oe(ye),ie(e?.aiCfoInitialSubmissionSource!=null?e.aiCfoInitialSubmissionSource:void 0);const d=e?.aiCfoSuggestionIndex;re(typeof d=="number"?d:void 0),we.current=!0}}),[H,ye,i.state]);const yt=a.useCallback((()=>{ne(null),oe(!1),ie(void 0),re(void 0),l(i.pathname,{replace:!0,state:We(i.state)})}),[i.pathname,i.state,l]),xe=a.useMemo((()=>new URLSearchParams(i.search)),[i.search]),Re=xe.get("ref")??N?.aiCfoRef,le=xe.get("emailRefId")??N?.aiCfoEmailRefId,Te=a.useRef(!1);a.useEffect((()=>{Te.current||Re!=="month-end-email"||le==null||u!=null||w==null||(t(ks("controller",w.userId,le,"MONTH_END_EMAIL")),Te.current=!0)}),[Re,le,u,t,w]);const G=g.uiState.lastContextMessage;a.useEffect((()=>{G!=null&&G!==""&&u!=null&&(ne(G),oe(!0),ie(void 0),re(void 0),t(bs()))}),[G,u,t]);const wt=k.masterTOSInfo,x=wt?.isMasterTOSAccepted??!1,{visitedSessions:je}=Wt(u),q=g.fetchState,z=g.uiState.chatSessionsNextPageToken.hasMore||!g.uiState.chatSessionsFirstPageFetched,Ae=u!=null?g.fetchChatSessionHistoryByChatSessionId?.[u]?.fetchState??"Not-Started":"Not-Started",Oe=u==null||(g.uiState.chatHistoryNextPageToken[u]?.hasMore??!0),_e=g.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:xt}=Ye(_e,u),Rt=xt.length===0;a.useEffect((()=>{x||_||l("../dashboard",{state:{...i.state,message:"open_ai_cfo_drawer"}})}),[x,_,l,i.state]);const Tt=a.useCallback((()=>{const e=ge(i.state?.pathnameStackToGoBack),d=k.tenantEmailDomain;l(e.poppedPathname??(d!=null?`/${d}/dashboard`:".."),{state:{...i.state,pathnameStackToGoBack:e.newStack}})}),[k.tenantEmailDomain,i.state,l]),De=a.useRef(void 0),Qe=a.useRef(void 0);a.useEffect((()=>{const e=c!==De.current,d=u!==Qe.current;De.current=c,Qe.current=u,c!==u&&(!e||c==null||Hs(c)?d&&u!=null&&l(`../ai-cfo/${u}`,{state:{...i.state}}):t(vs({sessionId:c,agentId:"controller"})))}),[u,c]);const jt=a.useMemo((()=>({events:je.map((e=>`private-encrypted-chat-${e}.${Xe}`)),eventCallback:(e,d,D)=>D.onEventReceived(e,d)})),[je]);a.useEffect((()=>{q!=="In-Progress"&&z&&t(Es())}),[q,z,t]),a.useEffect((()=>{u!=null&&Ae!=="In-Progress"&&Oe&&w!=null&&(c===u||q==="Completed"&&!z)&&t(Ps(u,w.userId))}),[Ae,q,Oe,z,u,w,c,t]);const ue=w?.userId,At=a.useMemo((()=>{return ue==null?[]:[(e=ue,`private-encrypted-routines-${e}.routine-run-updated`)];var e}),[ue]),Ue=a.useCallback((e=>{const d=e!=null&&(e===P||e===A);(T||d)&&t(he()),d&&t(W({scheduleId:e}))}),[t,T,A,P]);Gs({events:At,onSubscribed:()=>Ue(P??A),onEvent:(e,d)=>{const D=(de=>{if(de==null||typeof de!="object")return null;const Q=de;return fe(Q.schedule_id)&&fe(Q.run_id)?{scheduleId:Q.schedule_id,runId:Q.run_id,status:qs.find((Dt=>Dt===Q.status))??null,finishedAt:fe(Q.finished_at)?Q.finished_at:null}:null})(d);D!=null&&Ue(D.scheduleId)}});const Le=e=>e.trackAICFOOnboardingScreenStateChanged("open","first_visit");if(w==null||c==null)throw Error("Can't access AI Controller page without signing in...");const Ot=u!=null&&g.responseStateByChatSessionId?.[u]?.answer?.fetchState==="In-Progress";if(!x&&_)return h.jsxs(Js,{children:[h.jsx(ce,{analytics:M,onLoad:Le}),ae.drawerElement,h.jsx(Xs,{children:h.jsx(ze,{children:h.jsx(me,{isTOSAccepted:!1,acceptMasterTOSState:g.masterTOSAcceptanceState,onCloseClick:Tt,onCompleteClick:()=>{k.userRoleId!=null&&t(pe(k.userRoleId))}})})})]});const _t=h.jsxs(h.Fragment,{children:[p&&!x?h.jsx(ce,{analytics:M,onLoad:Le}):null,h.jsx(me,{isTOSAccepted:x,acceptMasterTOSState:g.masterTOSAcceptanceState,showHeader:!1,togglePageView:x?()=>S(!1):void 0,onCloseClick:()=>S(!1),onCompleteClick:()=>{x||k.userRoleId==null||t(pe(k.userRoleId)),S(!1)}})]});return h.jsxs(h.Fragment,{children:[h.jsxs(Ys,{children:[h.jsx(ce,{analytics:M,onLoad:e=>e.trackPageLoaded(Kt.Event.aiCFOPage)}),_&&ae.drawerElement,h.jsx(Ws,{...jt,currentChatSessionId:u,allSessionsWithOrderedQuestionAnswers:_e,allUsers:ct,isAiCardCreationEnabled:mt,isCardPolicyEnabled:St,openOnboardingPage:()=>S(!0),userId:w.userId,setIsAiCfoOpen:r,navigate:l,sessionFromUrl:c,location:i,isSubmitting:Ot,isEmptyChatWithSession:Rt,currentTenant:k,emailLinkQuestion:bt??void 0,autoSubmitEmailLinkQuestion:vt,onEmailLinkQuestionProcessed:yt,routedInitialQuestionSource:Et,routedInitialQuestionSuggestionIndex:Pt,onCardPolicyVendorSearchTextChange:ht,onMenuClick:_?ae.open:void 0,isFileUploadEnabled:s,isUploadPromoVisible:It,onUploadPromoClose:gt,exploreSuggestedPromptQuestions:kt,exploreSuggestedPromptQuestionsLoading:Ct,isSkillsOpen:O,isRoutinesOpen:T,routineCanCreate:m,routineEditing:E,routineEditorOpen:J,routineListError:n.fetchState==="Error",routineListLoading:n.fetchState==="In-Progress",routineMaxRoutines:n.maxRoutines,routineSaveError:o.fetchState==="Error",routineSaving:o.fetchState==="In-Progress",routineSchedulableSkills:K,routines:n.routines,onRoutineCreate:Ke,onRoutineDelete:rt,routineHistoryError:I.fetchState==="Error",routineHistoryLoading:I.fetchState==="In-Progress",chatSidePanel:ft,routineDetail:ke,routineRunningScheduleId:o.runningScheduleId,routineRuns:I.runs,onRoutineEdit:Ze,onRoutineOpenRun:(e,d)=>se(d,e.scheduleId),onRoutineRun:st,onRoutineCloseDetail:te,onRoutineDraft:it,routineDraftPrompt:X,onRoutineOpenDetail:ee,onRoutineEditorCancel:et,onRoutineLoadSkillInstructions:ut,onRoutineSave:tt,onRoutineSetEnabled:lt,isCreateSkillEnabled:U,promoDismissalScope:y}),p&&_?h.jsx(Fs,{anchor:"right",open:p,transitionDuration:250,PaperProps:{component:Ks,style:{width:"100%"}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>S(!1),children:h.jsx(ze,{onClick:e=>e.stopPropagation(),children:h.jsx(me,{isTOSAccepted:x,acceptMasterTOSState:g.masterTOSAcceptanceState,onCloseClick:()=>S(!1),onCompleteClick:()=>{x||k.userRoleId==null||t(pe(k.userRoleId)),S(!1)}})})}):null]}),p&&!_?h.jsx(Yt,{open:p,onClose:()=>S(!1),children:h.jsx(Jt,{children:_t})}):null]})},ze=V(Ms)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,Ys=V.div`
6
- height: 100vh;
7
- width: 100%;
8
- `,Js=V.div`
9
- height: 100vh;
10
- width: 100%;
11
- display: flex;
12
- flex-direction: column;
13
- min-height: 0;
14
- `,Xs=V.div`
15
- flex: 1;
16
- min-height: 0;
17
- display: flex;
18
- flex-direction: column;
19
- `,Ks=V($s)`
20
- box-shadow: ${({theme:s})=>s.colors.elevation2};
21
- color: ${({theme:s})=>s.colors.grey4};
22
- `;export{Ia as default};
@@ -1,9 +0,0 @@
1
- import{a as C}from"./sentry-BbRn6Rps.js";import{u as K,j as b,h as se,g as oe,i as ie,N as re,l as ce}from"./core-BTRpO5kD.js";import{fI as z,HM as ue,H_ as de,La as pe,O0 as le,OG as me,Pv as fe,Zl as ye,BL as Se,Sw as ge,Zm as Ie,Zn as be,Zo as he,Zp as Te,Zq as De,Zr as Oe,VA as Ce,Yr as ke,VP as Ve,Mm as Ae,Me as we,VQ as Ne,Mi as Fe,mK as ve,gJ as _e,gI as xe,gH as Be,v1 as Ee,uU as ze,uR as Pe,mC as Re,BU as Me,BS as P,bF as R,C4 as M,cF as Ue}from"./zeni-epic-state-GGdMfKwk.js";import{bT as Le,W as Ze,c as je,bi as Ge,z as E,a8 as Ke,m as U,s as x,T as B,bV as qe,ae as He,p as L,aG as Z}from"./index-D-DXs1ug.js";import{n as We}from"./mui-DxxQrDXb.js";import{j as A}from"./liveblocks-CSh_vLcI.js";import{d as j}from"./routePaths-BpwABclb.js";import{M as $e}from"./MobileAppDrawer-C0d1iVMA.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]="a0b41bc0-32b7-4ce9-9d32-3288d455af5e",e._sentryDebugIdIdentifier="sentry-dbid-a0b41bc0-32b7-4ce9-9d32-3288d455af5e")}catch{}})();function it(){const e=K(),r=b((u=>z(u))),a=r?.tenantId,{isApprovalRulesV3Enabled:s,isLoading:p}=Le(a),l=b((u=>u.billPaySetupApproverViewState.fetchState));C.useEffect((()=>{a==null||p||l==="Not-Started"&&e(ue(!0,!0,s))}),[a,p,s,l,e])}function G(e,r,a,s=!1){switch(r){case"zeni_accounts":e(fe(a,!0,s));break;case"zeni_treasury":e(me(a,!0,s));break;case"reimbursement":e(le(a,!0,s));break;case"charge_cards":e(pe(a,!0,s));break;default:e(de(a,!0,s))}}const Je=We.div`
2
- display: flex;
3
- min-height: 100%;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `,Qe=ce((function(e,r){const{businessVerificationDetails:a}=r,s=z(e),p=E.getSignedInUser(),l=s.tenantId,u={userId:p?.userId??"",sessionId:p?.zeniSessionId??"",tenantId:l??""},h=Ce(r.roleMap)&&a.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",t=ke(e.companyConfigState),o=Ve(e.userRoleConfigState);return{businessVerificationDetails:a,verficationDetailsFetchState:a.fetchState,isRefreshingViewInBackground:a.isRefreshingViewInBackground,allNationalityCountries:a.allNationalityCountries,filesEndPoint:`${He.fileMicroServiceBaseUrl}`,authParams:u,isDisabled:h,allIndustries:t.companyIndustries??[],companyTitles:o.companyTitles}}),(function(e,r){const{companyId:a,productType:s,currentTenant:p,navigate:l,location:u}=r,{tenantEmailDomain:h}=p;return{onCompanyDetailsChanged:t=>{const{companyDescription:o,companyIndustry:m,companyIndustryType:k,companyLegalName:V,companyTaxId:y,companyWebsite:f,companyPhone:S,primaryContactEmail:d,primaryContactName:i,primaryContactUserId:T,primaryContactSyncToken:D,syncToken:c,fileIds:O,incDate:n,typeOfIncorporation:g,stateOfIncorporation:w,sourceOfFunds:N,companySubIndustry:F,countriesOfOperations:I,companySourceOfFunds:q,companySourceOfFundsDescription:H,transactionVolume:W,transactionVolumeDescription:$,purposeOfAccount:J,purposeOfAccountDescription:Q,regulatedStatus:Y,regulatedStatusDescription:X,usNexus:ee,usNexusTypes:te}=t,v=k?.selectedOption,ae={companyId:a,companyDescription:o,companyIndustry:m.selectedOption,companyIndustryType:v==null||v===""?void 0:v,companyLegalName:V,taxIdOrEIN:y,website:f!=""&&f!=null?Ue(f):void 0,phone:S,syncToken:c,fileIds:O,incDate:n!=null?R(n?.toString()):n,typeOfIncorporation:g?.selectedOption??"",stateOfIncorporation:w?.selectedOption??"",sourceOfFunds:N?.selectedOption??"",companySubIndustry:F?.selectedOption??"",countriesOfOperations:I?.selectedOptions.map((_=>_.length===2?_:Z(_)))??[],companySourceOfFunds:q?.selectedOption??"",companySourceOfFundsDescription:H,transactionVolume:W?.selectedOption??"",transactionVolumeDescription:$,purposeOfAccount:J?.selectedOption??"",purposeOfAccountDescription:Q,regulatedStatus:Y??"",regulatedStatusDescription:X,usNexus:ee,usNexusTypes:te?.selectedOptions??[]},ne={userId:T,firstName:i.firstName,lastName:i.lastName,email:d,syncToken:D};e(M({companyDetails:ae,primaryContactDetails:ne}))},onCompanyOfficerUpdated:t=>{const o=t.map((m=>{const{officerType:k,userId:V,name:y,email:f,nationalityCountryCode:S,ssn:d,dob:i,phone:T,syncToken:D,selectDocument:c,role:O,ownership:n,isSelectedForVerification:g,userVerificationStatus:w,treasuryUserVerificationStatus:N,fileIds:F}=m;let I;return c.selectDocumentType==="driverLicense"?I="driving_license":c.selectDocumentType==="passport"?I="passport":c.selectDocumentType==="stateId"?I="id_document":c.selectDocumentType==="ssnCard"&&(I="social_security_card"),{officerType:k,userId:V,firstName:y.firstName,lastName:y.lastName,email:f,ssn:d,nationalityCountryCode:S?.selectedOption!=null?Z(S.selectedOption):void 0,phone:T,birthday:i!=null?R(i?.toString()):i,syncToken:D,titleAtCompany:O.selectedOption,ownershipInCompany:n,documentTypeSelectedForVerification:I,isSelectedForVerification:g,userVerificationStatus:w,treasuryUserVerificationStatus:N,fileIds:F,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1}}));e(M({officers:o}))},onSaveDetailsClick:t=>{e(P(a,t,s))},onSendForVerificationClick:t=>{e(P(a,t,s,!0))},onAddressClick:t=>{const o=j(h,t),m=L(u.state?.pathnameStackToGoBack,u.pathname);l(o,{state:{pathnameStackToGoBack:m}})},onRegisteredAddressClick:t=>{const o=j(h,t),m=L(u.state?.pathnameStackToGoBack,u.pathname);l(o,{state:{pathnameStackToGoBack:m}})},onBackClick:()=>{e(Me({companyId:a})),l("../setup")},updateFilesEntity:t=>{e(Re({files:t}))},onDeleteFile:t=>{e(Pe(t))},onDeleteFileList:t=>{e(ze(t))},onEditFileName:(t,o)=>{e(Ee(t,o.split(".")[0]))},onGetOtp:t=>{e(Be(t,"SpendManagementSetup"))},onResendOtp:t=>{e(xe(t,"SpendManagementSetup"))},onVerifyOtp:(t,o)=>{e(_e(t,o,"SpendManagementSetup"))},saveNewAddressInLocalStore:(t,o)=>{e(ve({addressType:t,addressToCreate:o}))},onIdentityDocumentUploadedForAutofill:t=>{if(a==null)return;const o=Ne(t.documentType);o!=null&&e(Fe({target:"setup",companyId:a,officerType:t.officerType,fileId:t.fileId,documentType:o}))},onCompanyDocumentUploadedForAutofill:t=>{a!=null&&e(we({target:"setup",companyId:a,fileId:t.fileId,documentType:t.documentType}))},onResetKycKybClick:()=>{e(Ae())}}}))(qe),rt=({productType:e})=>{const r=se(),a=oe(),s=K(),[p,l]=C.useState(!1),[u,h]=C.useState(!1),{tenantEmailDomain:t}=ie(),o=Ze(),{useDynamicConfig:m}=je(),{configValue:k}=m(Ge.zeniAccountsConfig),V=ye(k),y=b((n=>{switch(e){case"zeni_accounts":return n.zeniAccountSetupViewState.fetchState;case"reimbursement":return n.remiSetupViewState.fetchState;case"charge_cards":return n.chargeCardSetupViewState.fetchState;case"zeni_treasury":return n.treasurySetupViewState.fetchState;default:return n.billPaySetupViewState.fetchState}})),f=b((n=>n.companyConfigState.fetchState)),S=b((n=>n.userRoleConfigState.fetchState)),d=b((n=>z(n))),i=d.companyId??E.getSignedInUserTenant(t)?.companyId;C.useEffect((()=>{f==="Not-Started"&&s(Se()),S==="Not-Started"&&s(ge(!0))}),[f,S,s]),C.useEffect((()=>{p||y!=="Not-Started"||i==null||(l(!0),G(s,e,i))}),[p,y,i,s]);const T=b((n=>{switch(e){case"zeni_accounts":return De(n,i);case"zeni_treasury":return Te(n,i);case"charge_cards":return he(n,i);case"reimbursement":return be(n,i);default:return Ie(n,i)}})),D=T.kycKybResetStatus.fetchState;if(C.useEffect((()=>{D==="Completed"&&i!=null&&(G(s,e,i,!0),s(Oe()))}),[D,i,e,s]),E.getSignedInUser()==null)throw Error("Can't access business verification without signing in...");let c;switch(e){case"zeni_accounts":c=d.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted;break;case"reimbursement":c=d.companyReimbursementInfo?.info?.isReimbursementTOSAccepted;break;case"charge_cards":c=d.companyChargeCardInfo?.info?.isChargeCardTOSAccepted===!0||d.companyDebitCardInfo?.info?.isDebitCardTOSAccepted;break;case"zeni_treasury":c=d.companyTreasuryInfo?.info?.isTreasuryTOSAccepted;break;default:c=d.companyBillPayInfo?.info?.isBillPayTOSAccepted}const O=n=>{h(n)};return c===!1?A.jsx(re,{to:"../promo"}):A.jsxs(Je,{children:[A.jsx(Ke,{analytics:U,onLoad:n=>(g=>{switch(e){case"zeni_accounts":return g.trackPageLoaded(B.Event.zeniAccountsBusinessVerification);case"reimbursement":case"charge_cards":return g.trackPageLoaded(B.Event.reimbursementBusinessVerification);default:return g.trackPageLoaded(B.Event.billPayBusinessVerification,x(a)?"Settings":void 0)}})(n)}),x(a)?A.jsx($e,{isAppContentDrawerOpen:u,handleDrawerToggle:O}):null,A.jsx(Qe,{businessVerificationDetails:T,navigate:r,location:a,companyId:i,analytics:U,currentTenant:d,productType:e,isSettings:x(a),roleMap:o?.loggedInUserRoleMap??{},onClickMenuIcon:()=>{O(!0)},maxInsuredAmount:V.maxInsuredAmount})]})};export{rt as B,G as d,it as u};
@@ -1,11 +0,0 @@
1
- import{j as I}from"./liveblocks-CSh_vLcI.js";import{a as o}from"./sentry-BbRn6Rps.js";import{u as F,h as R,g as H,j as C,N as w}from"./core-BTRpO5kD.js";import{U5 as q,fI as z,go as G,pV as V,gP as U,gn as Q,gl as B,Uv as J,gk as A}from"./zeni-epic-state-GGdMfKwk.js";import{u as K,z as E,L as D,G as M,N as W}from"./index-D-DXs1ug.js";import{n as X}from"./mui-DxxQrDXb.js";import{P as h,a as T}from"./AccountMappingScreen-DqcX7eSX.js";import{t as Y}from"./getLocaleForTenant-COzbHLDP.js";import{g as Z,Q as ee}from"./QBOConnectionScreen-2QWv8Ryp.js";import"./recharts-TU-ixTpA.js";import"./analytics-Bwul-sh2.js";import"./plaid-BETTZw7O.js";import"./dnd-2ZjyQ0g9.js";import"./stripe-cKAAJElX.js";import"./lottie-CkDkDB9t.js";import"./lexical-B4Vx7iXM.js";import"./pdf-B5u-xbSo.js";import"./utils-CG6WKZWt.js";import"./MobileAppDrawer-C0d1iVMA.js";import"./InboxNotificationsProvider-RMyde6sE.js";import"./useTaskManagerAccess-DkfJ_Uxt.js";import"./accountMappingHelper-CDXfdGYB.js";import"./empty-Cb7Nu9Hh.js";import"./pdf-lib-reHt5MEc.js";import"./index-EIrua76A.js";import"./url-COMcQU2v.js";import"./index-Ds59pPsN.js";import"./decodeURIComponentSafe-gQrUmSgy.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="efa2a614-00e1-4012-a1b1-58014dbfd98e",t._sentryDebugIdIdentifier="sentry-dbid-efa2a614-00e1-4012-a1b1-58014dbfd98e")}catch{}})();const te=X.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 ${W.sp1} ${t.theme.colors.dropShadowNormal}`};
11
- `;function we(){const t=F(),i=R(),_=H(),{setLoading:m,clearAllLoading:c}=K(),S=o.useRef(!1),b=o.useRef(!1),N=o.useRef(!1),p=o.useRef(!1),{code:O,realmId:$,state:L}=Z(_.search),f=O!==""&&$!==""&&L!=="";f&&(N.current=!0);const j=sessionStorage.getItem(h),u=j===T.pending,P=j===T.ready,x=C((s=>q(s))),e=C((s=>z(s))),n=C((s=>s.tenantState.fetchState)),r=C((s=>s.tenantState.activeTenantFetchState.fetchState)),a=E.getSignedInUser(),g=E.getActiveTenantForUser()?.tenantId,l=e?.externalConnections?.fetchState,d=e?.externalConnections?.saveConnectionState,y=e.externalConnections?.accounting[0]?.isValid;o.useLayoutEffect((()=>{m(D.CONNECTION_AUTH)}),[m]),o.useEffect((()=>{S.current||a==null||g==null||(S.current=!0,n==="Completed"||r!=="Not-Started"&&r!=="Error"||(m(D.TENANT_FETCHING),t(G(a.userId,g))))}),[S,n,m]),o.useEffect((()=>{e.tenantId==null&&!b.current&&a!=null&&(b.current=!0,!(g==null||g!=null&&(r==="Completed"||r==="Error"))||n!=="Not-Started"&&n!=="Error"||t(V(a.userId)))}),[b,n,r]),o.useEffect((()=>{a==null||e?.tenantId==null||e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||l==="In-Progress"||d!=="Error"||(m(D.CONNECTION_AUTH),t(U(a.userId,e.tenantId)))}),[d]),o.useEffect((()=>{n!=="Completed"&&r!=="Completed"||a==null||e?.tenantId==null||(t(Q(e.tenantId)),E.saveActiveTenantDomainForUser(e.tenantEmailDomain),B(a?.userId,a?.zeniSessionId,e.tenantId),M.updateAppLocaleID(Y(J(e))),e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||l==="In-Progress"||a==null||e==null||t(U(a.userId,e.tenantId)))}),[n,r,l]),o.useEffect((()=>{x.tenantsCoreDetailsInOrder.length>0&&n==="Completed"&&E.saveSignedInUserTenants(x.tenantsCoreDetailsInOrder)}),[x.tenantsCoreDetailsInOrder.length,n]);const v=e==null||n!=="Completed"&&r!=="Completed"||l!=="Completed";if(o.useEffect((()=>{n!=="Completed"&&n!=="Error"||r!=="Completed"&&r!=="Error"||l!=="Completed"&&l!=="Error"||c()}),[n,r,l]),o.useEffect((()=>{u&&d==="In-Progress"&&(p.current=!0)}),[u,d]),o.useEffect((()=>{if(!u||v)return;const s=e.tenantEmailDomain!=null?`/${e.tenantEmailDomain}/settings/accounting`:"/";return p.current&&d==="Completed"?(sessionStorage.setItem(h,T.ready),c(),void i(s,{replace:!0})):p.current&&d==="Error"?(sessionStorage.removeItem(h),t(A({messageSection:"accounting_projects_qbo_reconnect_failed",messageText:"failed",type:"error"})),c(),void i(s,{replace:!0})):void(f||N.current||p.current||y!==!0||(sessionStorage.removeItem(h),t(A({messageSection:"accounting_projects_qbo_reconnect_failed",messageText:"failed",type:"error"})),c(),i(s,{replace:!0})))}),[u,v,d,f,y,e.tenantEmailDomain,c,t,i]),v)return null;if(f||y!==!0)return I.jsx(te,{children:I.jsx(ee,{})});if(u)return null;const k=e.tenantEmailDomain!=null?`/${e.tenantEmailDomain}/settings/accounting`:"/";return P?I.jsx(w,{to:k,replace:!0}):I.jsx(w,{to:"/",replace:!0})}export{we as default};
@@ -1 +0,0 @@
1
- import{j as i}from"./liveblocks-CSh_vLcI.js";import{z as m}from"./index-D-DXs1ug.js";import{g as n}from"./QBOConnectionScreen-2QWv8Ryp.js";import"./sentry-BbRn6Rps.js";import{g as p,N as a}from"./core-BTRpO5kD.js";import"./zeni-epic-state-GGdMfKwk.js";import"./recharts-TU-ixTpA.js";import"./mui-DxxQrDXb.js";import"./analytics-Bwul-sh2.js";import"./plaid-BETTZw7O.js";import"./dnd-2ZjyQ0g9.js";import"./stripe-cKAAJElX.js";import"./lottie-CkDkDB9t.js";import"./lexical-B4Vx7iXM.js";import"./pdf-B5u-xbSo.js";import"./utils-CG6WKZWt.js";import"./empty-Cb7Nu9Hh.js";import"./pdf-lib-reHt5MEc.js";import"./index-EIrua76A.js";import"./url-COMcQU2v.js";import"./index-Ds59pPsN.js";import"./decodeURIComponentSafe-gQrUmSgy.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]="a1205b81-d106-415b-bd92-85aeae53ace3",t._sentryDebugIdIdentifier="sentry-dbid-a1205b81-d106-415b-bd92-85aeae53ace3")}catch{}})();const U=()=>{const t=p(),{code:o,realmId:r,state:e}=n(t.search),s=m.getSignedInUser()?.userId??"";if(f(o,r,e,s)===!0){const d=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return i.jsx(a,{to:d})}return i.jsx(a,{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 s}from"./liveblocks-CSh_vLcI.js";import{t as wn,A as Me}from"./AddressScreen-i3P2ph6T.js";import An from"./NotFoundScreen-BEmDKBPw.js";import{a as d,t as $e}from"./sentry-BbRn6Rps.js";import{h as _e,g as Te,u as se,i as xe,j as E,N as Q,q as Pn,l as cn,n as Dn,o as H}from"./core-BTRpO5kD.js";import{fI as X,e0 as Ee,d$ as we,bq as jn,Um as Bn,bS as Fn,pT as Vn,Bv as Un,By as Rn,VJ as Ln,VK as Nn,lx as Oe,lA as dn,UZ as Gn,c0 as Mn,c9 as fe,BZ as Ae,BK as $n,VL as me,B_ as un,Sw as Qn,mK as ln,dj as pn,VM as Kn,VN as zn,uK as qn,UM as Ce,hY as Hn,UL as be,hV as Zn,Go as Jn,uO as Wn,hN as Yn,hQ as Qe,VO as mn,VP as Xn,Me as et,VQ as nt,Mi as tt,BB as at,VR as ot,VS as st,lv as rt,ly as it,Ca as ct,BM as gn,BY as dt,bF as Ke,cF as ut,C9 as ze,v1 as lt,uR as pt,mC as mt,gJ as gt,gI as ft,gH as yt,VT as ht,BE as Ct,Cb as bt,Ce as St,Ch as It,Cn as kt,dk as Ot}from"./zeni-epic-state-GGdMfKwk.js";import{z,c as Pe,g as W,A as vt,p as q,a8 as re,m as g,aE as _t,ai as fn,a1 as Tt,y as yn,W as hn,l as Y,Z as ge,T as ve,aF as xt,N as qe,C as He,ae as Et,aG as Ze,aH as wt,aI as At}from"./index-D-DXs1ug.js";import{n as De}from"./mui-DxxQrDXb.js";import{g as Pt,h as Dt,q as ie}from"./QBOConnectionScreen-2QWv8Ryp.js";import{u as jt,a as Bt}from"./useEmailConnectResultRefresh-CD4x3asD.js";import{u as Ft}from"./useChargeCardPusherEvents-6cwlQnL1.js";import"./recharts-TU-ixTpA.js";import"./analytics-Bwul-sh2.js";import"./plaid-BETTZw7O.js";import"./dnd-2ZjyQ0g9.js";import"./stripe-cKAAJElX.js";import"./lottie-CkDkDB9t.js";import"./lexical-B4Vx7iXM.js";import"./pdf-B5u-xbSo.js";import"./utils-CG6WKZWt.js";import"./empty-Cb7Nu9Hh.js";import"./pdf-lib-reHt5MEc.js";import"./index-EIrua76A.js";import"./url-COMcQU2v.js";import"./index-Ds59pPsN.js";import"./decodeURIComponentSafe-gQrUmSgy.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new e.Error().stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="d75e2f07-588a-420c-aef4-cef4c0dee99c",e._sentryDebugIdIdentifier="sentry-dbid-d75e2f07-588a-420c-aef4-cef4c0dee99c")}catch{}})();const Je=e=>{switch(e){case"Complete":return"yes";case"Pending Review":case"Incomplete":return"partially";default:return"no"}},Vt=()=>{const e=_e(),l=Te(),i=se(),[o,p]=d.useState(!1),[u,c]=d.useState(!1),{tenantEmailDomain:v}=xe(),n=z.getSignedInUser(),{useFeatureGate:t}=Pe(),{isFeatureEnabled:C}=t(W.isApAgingFeatureEnabled),{isFeatureEnabled:a}=t(W.isArAgingFeatureEnabled),{isFeatureEnabled:A}=t(W.isReferralFeatureEnabled),{isFeatureEnabled:w}=t(W.isDebitCardFeatureEnabled),k=vt(),O=E((S=>X(S))),P=E((S=>S.onboardingCustomerViewState.fetchState)),_=O.excludedResources,F=O.companyId??z.getSignedInUserTenant(v)?.companyId;if(n==null)throw Error("Can't access onboarding flow without signing in...");const m=Ee(w,O),b=we(O),D=[],U=_?.resources?.find((S=>S.resource==="/reports/top_expenses"))==null,h=_?.resources?.find((S=>S.resource==="/reports/task_card"))==null,r=O?.userRole!=null&&jn(O?.userRole),T=_?.resources?.find((S=>S.resource==="/bills"))==null&&!r,x=_?.resources?.find((S=>S.resource==="/reimbursements"))==null;U===!1&&D.push("top_expenses"),h===!1&&D.push("task_card"),T===!1&&D.push("bill_pay_card","bill_pay_promo_card"),x===!1&&D.push("reimbursement_card","reimbursement_promo_card"),D.push("zeni_accounts_promo_card","treasury_promo_card"),A===!1&&D.push("rewards_card");const f=E((S=>{const V=[];C===!1&&V.push("accounts_payable_aging"),a===!1&&V.push("accounts_receivable_aging"),V.push("zeni_accounts_promo_card","treasury_promo_card"),A===!1&&V.push("rewards_card"),k===!1&&V.push("expense_automation_card");const Z=Bn(S,V);return Fn(Z.reportsInOrder.map((M=>({fetchState:M.fetchState,error:M.error})))).fetchState}));d.useEffect((()=>{P!=="Completed"||o||m||b||(p(!0),i(Vn(n.userId,F,O.tenantId,!0,!1,D)))}),[o,P,m,b,n,O.tenantId,i]);const j=d.useRef(!1),N=d.useCallback((()=>{const S={pathnameStackToGoBack:q(l.state?.pathnameStackToGoBack,l.pathname),message:"activation"};e(m?"../../checking":b?"../../cards":"../../dashboard",{state:S})}),[e,l,m,b]),G=d.useCallback((()=>{j.current||(j.current=!0,N())}),[N]);if(d.useEffect((()=>{const S=setTimeout((()=>c(!0)),3e3);return()=>clearTimeout(S)}),[]),d.useEffect((()=>{const S=setTimeout(G,6e3);return()=>clearTimeout(S)}),[G]),d.useEffect((()=>{m||b||!u||f!=="Completed"&&f!=="Error"||G()}),[u,f,m,b,G]),P!=="Completed")return s.jsx(Q,{to:"../"});const L=O.company?.companyOnboardingInfo?.onboardingInfo,ee={timeSinceQuoteSign:L?.onboardingTimeSinceQuoteSigned??"",timeSinceQuoteSignInMinutes:L?.onboardingToQuoteSignMinutes??0,isKybDone:Je(L?.businessVerified?.status),isKycDone:Je(L?.identityVerified?.status),paymentType:"",paymentSource:"",qboConnectionSource:L?.accountingConnectionCreationMode??""};return s.jsxs(s.Fragment,{children:[s.jsx(re,{analytics:g,onLoad:S=>S.trackOnboardingDashboardActivation(ee)}),s.jsx(_t,{show:!0,onComplete:G})]})},Se=["reading_books","finance_graph","reconciliation","cfo_foundation"],Ie=["llm_fine_tuning","rag_knowledge_graph","personalized_context"],We=(e,l)=>{const i=new Map(e.map((o=>[o.key,o])));return l.map((o=>{return p=i.get(o)?.status,p==="starting"||p==="building"?p:"idle";var p}))},Ye=(e,l)=>{if(e.length===0)return!1;const i=new Map(e.map((o=>[o.key,o])));return l.every((o=>i.get(o)?.status==="ready"))},Xe=De.div`
2
- display: flex;
3
- height: 100vh;
4
- background-color: ${e=>e.theme.colors.grey4};
5
- `,en=De.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: ${qe.sp0};
15
- `:`
16
- min-width: calc(100% - ${He}px);
17
- padding-left: ${He}px;
18
- `}
19
-
20
- ${e=>e.theme.breakpoints.down("md")} {
21
- width: 100%;
22
- padding-left: ${qe.sp0};
23
- }
24
-
25
- ${e=>e.windowSize!=="small"?"overflow: auto;":""}
26
- `,nn=cn((function(e,l){const{companyId:i,isAdmin:o,currentTenant:p,isOnAddressPage:u}=l,c=z.getSignedInUser(),v=p.tenantId,n={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:v??""},t=X(e),C=Ae(e,i),a=mn(e),A=fe(p?.userRole??[])&&C.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",w=Xn(e.userRoleConfigState);return{onboardingCustomerView:C,analytics:g,isRefreshingViewInBackground:!1,isDisabled:A,companyTitles:w.companyTitles,connectedAccountProvider:t.company?.featuresActivationInfo.connectedAccountProvider??"",fileProps:{filesEndPoint:Et.fileMicroServiceBaseUrl,authParams:n},signedInUser:z.getSignedInUser(),currentTenant:t,isAdmin:o,isOnAddressPage:u,cardPaymentView:a,isCardPaymentPopupOpen:!1,stripeKey:ge.stripeKey}}),(function(e,l){const{companyId:i,currentTenant:o,themeState:p,navigate:u,location:c}=l,{tenantEmailDomain:v}=o;return{onFetchLinkTokenClick:(n,t)=>{e(kt(n,t))},onEstablishConnectionClick:(n,t)=>{e(It(n,t))},onUpdatePaymentAccountStatus:(n,t,C)=>{e(St(n,t,C))},onUpdatePaymentAccountLoginStatus:(n,t)=>{e(bt(!1,n,t))},onEstablishConnectionSuccess:()=>{e(Ct(i,!0,!1))},handleOnConnectClick:()=>{g.trackOnboardingConnectQBO(),ie.handleClick()},updateQBOPopupState:n=>{e(me({isQBOPopupOpen:n}))},onCompanyOfficerUpdated:n=>{const t=n.map((C=>{const{officerType:a,userId:A,name:w,email:k,ssn:O,nationalityCountryCode:P,dob:_,phone:F,syncToken:m,selectDocument:b,role:D,ownership:U,isSelectedForVerification:h,userVerificationStatus:r,fileIds:T,isPhoneVerified:x}=C;let f;return b.selectDocumentType==="driverLicense"?f="driving_license":b.selectDocumentType==="passport"?f="passport":b.selectDocumentType==="stateId"?f="id_document":b.selectDocumentType==="ssnCard"&&(f="social_security_card"),{officerType:a,userId:A,firstName:w.firstName,lastName:w.lastName,email:k,ssn:O,nationalityCountryCode:P?.selectedOption!=null?Ze(P.selectedOption):void 0,phone:F,birthday:_!=null?Ke(_?.toString()):_,syncToken:m,titleAtCompany:D.selectedOption,ownershipInCompany:U,documentTypeSelectedForVerification:f,isSelectedForVerification:h,userVerificationStatus:r,fileIds:T,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1,isPhoneVerified:x}}));e(ze({officers:t}))},onGetOtp:(n,t)=>{e(yt(n,"CustomerOnboarding")),t!=null&&e(ht({officerType:t,phone:n}))},onResendOtp:n=>{e(ft(n,"CustomerOnboarding"))},onVerifyOtp:(n,t)=>{g.trackOnboardingPhoneVerified(),e(gt(n,t,"CustomerOnboarding"))},updateFilesEntity:n=>{e(mt({files:n}))},onDeleteFile:n=>{e(pt(n))},onEditFileName:(n,t)=>{e(lt(n,t.split(".")[0]))},onCompanyDetailsChanged:n=>{const{companyDescription:t,companyIndustry:C,companyIndustryType:a,companyLegalName:A,companyTaxId:w,companyWebsite:k,companyPhone:O,primaryContactEmail:P,primaryContactName:_,primaryContactUserId:F,primaryContactSyncToken:m,syncToken:b,fileIds:D,typeOfIncorporation:U,stateOfIncorporation:h,incDate:r,companySourceOfFunds:T,companySourceOfFundsDescription:x,companySubIndustry:f,countriesOfOperations:j,purposeOfAccount:N,purposeOfAccountDescription:G,regulatedStatus:L,regulatedStatusDescription:ee,transactionVolume:S,transactionVolumeDescription:V,usNexus:Z,usNexusTypes:M}=n,$={companyId:i,companyDescription:t,companyIndustry:C.selectedOption,companyIndustryType:a?.selectedOption??"",companyLegalName:A,taxIdOrEIN:w,website:k!=""&&k!=null?ut(k):void 0,phone:O,syncToken:b,fileIds:D,incDate:r!=null?Ke(r?.toString()):r,typeOfIncorporation:U?.selectedOption??"",stateOfIncorporation:h?.selectedOption??"",companySourceOfFunds:T?.selectedOption??"",companySourceOfFundsDescription:x,companySubIndustry:f?.selectedOption??"",countriesOfOperations:j?.selectedOptions.map((R=>R.length===2?R:Ze(R)))??[],purposeOfAccount:N?.selectedOption??"",purposeOfAccountDescription:G,regulatedStatus:L??"",regulatedStatusDescription:ee,transactionVolume:S?.selectedOption??"",transactionVolumeDescription:V,usNexus:Z,usNexusTypes:M?.selectedOptions??[]},ce={userId:F,firstName:_.firstName,lastName:_.lastName,email:P,syncToken:m};e(ze({companyDetails:$,primaryContactDetails:ce}))},onAddressClick:(n,t)=>{const C=an(v,n,t),a=q(c.state?.pathnameStackToGoBack,c.pathname);u(C,{state:{pathnameStackToGoBack:a}})},onRegisteredAddressClick:(n,t)=>{const C=an(v,n,t),a=q(c.state?.pathnameStackToGoBack,c.pathname);u(C,{state:{pathnameStackToGoBack:a}})},onUpdateCustomerView:(n,t,C,a)=>{e(dt(i,!1,t,C,n,a))},onAddressEditHandler:n=>{if(n!=null){const t=wn(n);e(ln({addressType:"subscription_billing_address",addressToCreate:t}))}},onSkipSetupClick:()=>{const n=q(c.state?.pathnameStackToGoBack,c.pathname);e(gn(i,!1,!1)),u("./activation",{state:{pathnameStackToGoBack:n}})},onUpdateStep:n=>{e(un({step:n}))},onUpdateSubStep:n=>{e(ct({subStep:n}))},onZeniLogoClick:()=>{p.toggle()},handleLogOutClick:()=>{const n=q(c.state?.pathnameStackToGoBack,c.pathname);u("/signout",{replace:!0,state:{pathnameStackToGoBack:n,message:"logout"}})},handleCockpitClick:()=>{g.trackOnboardingFlowExited("cockpit"),window.open("/cockpit")},handleReferralsClick:()=>{u(`/${v}/rewards`)},handleCreateCardSetupIntent:n=>{e(dn(n))},handleConfirmCardSetupIntent:n=>{e(it(n))},updateCardPaymentModalState:n=>{e(me({isCardPaymentPopupOpen:n}))},handleAddCardPaymentSource:(n,t,C)=>{e(rt(n,t,C))},handleFetchPaymentSources:()=>{e(Oe())},resetCardPaymentViewState:()=>{e(st())},handleResetCardPaymentErrorStatuses:()=>{e(ot())},redirectToProductSuitePage:()=>{g.trackOnboardingFlowExited("product_suite");const n=q(c.state?.pathnameStackToGoBack,c.pathname);u(`/${v}/onboarding/thankyou`,{state:{pathnameStackToGoBack:n,message:"OnboardingThankyou"},replace:!0})},onAcknowledgeAiFinanceTeam:()=>{i!=null&&(g.trackOnboardingAiFinanceTeamAcknowledged(),e(at(i)))},onIdentityDocumentUploadedForAutofill:n=>{if(i==null)return;const t=nt(n.documentType);t!=null&&(g.trackOnboardingDocumentUploaded("kyc",t),e(tt({target:"onboarding",companyId:i,officerType:n.officerType,fileId:n.fileId,documentType:t})))},onCompanyDocumentUploadedForAutofill:n=>{i!=null&&(g.trackOnboardingDocumentUploaded("kyb",n.documentType),e(et({target:"onboarding",companyId:i,fileId:n.fileId,documentType:n.documentType})))}}}))(xt),le=({taxCFOCustomer:e=!1,isOnAddressPage:l=!1,appContent:i})=>{const o=fn(),p=_e(),u=Te(),c=se(),v=Tt(),n=yn(),[t,C]=d.useState(!1),[a,A]=d.useState(!1),[w,k]=d.useState(!1),{tenantEmailDomain:O}=xe(),P=hn(),{useFeatureGate:_}=Pe(),{isFeatureEnabled:F}=_(W.isDebitCardFeatureEnabled),m=Pn("/:tenantEmailDomain/onboarding")!==null&&u.search?.includes("code"),b=E((y=>y.onboardingCustomerViewState.fetchState)),D=E((y=>y.onboardingCustomerViewState.currentStep)),U=E((y=>y.onboardingCustomerViewState.uiState)),h=E((y=>X(y))),r=E((y=>y.userRoleConfigState.fetchState)),T=E((y=>y.cardPaymentViewState)),x=Y(T.addCardPaymentSourceStatus.fetchState),f=T.addCardPaymentSourceStatus.fetchState,{code:j,realmId:N,state:G}=Pt(u.search),L=h.externalConnections?.accounting[0],ee=L?.connectionType,S=L?.connectionName,V=L?.connectionId??"",Z=z.getSignedInUser()?.userId??"",M=d.useRef({realmId:"",connectionId:""});d.useEffect((()=>{a||(A(!0),c(Oe()))}),[a,c]),d.useEffect((()=>{w||(dn(["card"]),k(!0))}),[w]),d.useEffect((()=>{x==="In-Progress"&&f==="Completed"&&c(Oe())}),[x,f]),d.useEffect((()=>{Dt(j,N,G,V,Z)===!0&&h.externalConnections?.saveConnectionState!=="In-Progress"&&b==="Completed"&&(c(Gn(h.tenantId,{connection_type:ee??"accounting",connection_name:S??"quickbooks_online",authorization_code:j,realm_id:N,connection_id:V,user_id:Z},Mn(window.location.origin+"/onboarding/auth"))),M.current={realmId:N,connectionId:V},g.trackOnboardingSaveQBOConnection(N,V),p(u.pathname))}),[j,N,G,u.pathname,b]),d.useEffect((()=>{ie.isInitiated===!1&&b==="Completed"&&ie.init("/onboarding/auth",h.tenantEmailDomain)}),[b]);const $=h.companyId??z.getSignedInUserTenant(O)?.companyId,ce=fe(h?.userRole??[]),R=E((y=>Ae(y,$)));d.useEffect((()=>{t||b!=="Not-Started"||$==null||(C(!0),c($n($,!0,!m)))}),[t,b,$]);const ne=h.externalConnections?.saveConnectionState,je=Y(ne);d.useEffect((()=>{je==="In-Progress"&&(ne==="Completed"||ne==="Error")&&U.isQBOPopupOpen&&D==="connect_ledger"&&(ne==="Completed"?g.trackOnboardingQBOConnectionSuccess(M.current.realmId,M.current.connectionId):g.trackOnboardingQBOConnectionFailed(M.current.realmId,M.current.connectionId,h.externalConnections?.saveOAuthConnectionError?.message??""),c(me({isQBOPopupOpen:!1})))}),[ne,je,U.isQBOPopupOpen,D,g,c]),d.useEffect((()=>{b==="Completed"&&m&&(c(un({step:"connect_ledger"})),c(me({isQBOPopupOpen:!0})))}),[m,b]),d.useEffect((()=>{r==="Not-Started"&&c(Qn(!0))}),[r,c]);const Cn=Y(R.companyDetailsLocalData?.addressStatus);d.useEffect((()=>{R.companyDetailsLocalData?.registeredAddressStatus?.addressToCreate==null&&R.companyDetailsLocalData?.addressStatus?.addressToCreate!=null&&Cn==null&&c(ln({addressType:"company_registered_address",addressToCreate:R.companyDetailsLocalData?.addressStatus?.addressToCreate}))}),[R.companyDetailsLocalData?.addressStatus?.addressToCreate,R.companyDetailsLocalData?.registeredAddressStatus?.addressToCreate]);const bn=R.isInterimEmailSent,Be=z.getSignedInUser();if(Be==null)throw Error("Can't access onboarding flow without signing in...");const Sn=Ee(F,h),In=we(h),Fe=h.company?.companyOnboardingInfo.isOnboardingCompleted,Ve=y=>y.trackPageLoaded(ve.Event.onboardingPage),ye=h.productSettings.isOtherProductsEnabled,kn=ye===!0&&!pn(h),On=h.productSettings.isTreasuryEnabled,Ue=Ut({tenantEmailDomain:O??"",signedInUserEmail:Be.userEmail??"",companyId:$}),Re=(({companyId:y})=>{const K=se(),de=E((B=>B.onboardingCustomerViewState?.aiAgentsActivation)),te=E((B=>X(B).company?.companyOnboardingInfo?.onboardingInfo?.onboardingAiActivationInfo?.isOnboardingAiActivationViewed??!1)),he=d.useCallback((()=>{K(Un())}),[K]);d.useEffect((()=>{he()}),[he]);const Le=d.useCallback((()=>{y==null||y===""||te||K(Rn(y))}),[y,te,K]),vn=d.useMemo((()=>{if(y==null||y==="")return[];const B=`private-encrypted-${y}`;return[`${B}.ledger-ingestion.counts-updated`,`${B}.ai-agents-activation.phase-changed`]}),[y]),_n=d.useCallback(((B,ae)=>{if(ae==null||typeof ae!="object")return;const I=ae;if(B!=="ledger-ingestion.counts-updated"){if(B==="ai-agents-activation.phase-changed"){const ue=typeof I.phase_key=="string"?I.phase_key:typeof I.key=="string"?I.key:"",J=typeof I.status=="string"?I.status:"idle";if(ue==="")return;K(Nn({key:ue,status:J==="starting"||J==="building"||J==="ready"?J:"idle",startedAt:typeof I.started_at=="string"?I.started_at:void 0,completedAt:typeof I.completed_at=="string"?I.completed_at:void 0}))}}else K(Ln({customerCount:typeof I.customer_count=="number"?I.customer_count:void 0,glAccountCount:typeof I.gl_account_count=="number"?I.gl_account_count:void 0,targetTransactionCount:typeof I.target_transaction_count=="number"?I.target_transaction_count:void 0,transactionCount:typeof I.transaction_count=="number"?I.transaction_count:void 0,vendorCount:typeof I.vendor_count=="number"?I.vendor_count:void 0}))}),[K]);return Ft({events:vn,onEvent:_n,onSubscribed:he}),d.useMemo((()=>{const B=de?.phases??[],ae=We(B,Se),I=We(B,Ie),ue=Ye(B,Se),J=Ye(B,Ie),Ne=B.some((En=>En.status!=="idle")),oe=!te&&!Ne,Ge=te&&!Ne,Tn=Ge?Se.map((()=>"building")):ae,xn=Ge?Ie.map((()=>"building")):I;return{ledgerRowStatuses:oe?void 0:Tn,backgroundRowStatuses:oe?void 0:xn,showLedgerReadyInLabel:oe?void 0:ue,showBackgroundReadyInLabel:oe?void 0:J,forceContinueEnabled:!oe||void 0,counts:de?.counts,onContinueClicked:Le}}),[de?.phases,de?.counts,te,Le])})({companyId:$});if(Fe===!0){if(!ye)return On?s.jsx(Q,{to:"../../treasury"}):Sn?s.jsx(Q,{to:"../../checking"}):In?s.jsx(Q,{to:"../../cards"}):s.jsx(Q,{to:"../../dashboard"});const y=R.updateStatus.fetchState==="In-Progress";if(ye&&!y)return e?s.jsxs(Xe,{children:[s.jsx(re,{analytics:g,onLoad:K=>Ve(K)}),s.jsx(nn,{navigate:p,location:u,companyId:$,currentTenant:h,isAdmin:ce,isOnAddressPage:l,themeState:n,googleAPIKey:ge.googleMapsAPIKey,integrationsSectionProps:Ue,aiAgentsActivationProps:Re,meetingUrl:o("onboarding_overview")}),i!=null?s.jsx(en,{windowSize:v,skipLegacyDrawerOffset:l&&h.productSettings.isOtherProductsEnabled!==!0,children:i}):null]}):s.jsx(Q,{to:"../../onboarding/thankyou"})}else if(Fe===!1&&P?.loggedInUserRoleMap!=null)return bn===!0&&kn?s.jsx(Q,{to:"../../onboarding/thankyou"}):s.jsxs(Xe,{children:[s.jsx(re,{analytics:g,onLoad:y=>Ve(y)}),s.jsx(nn,{navigate:p,location:u,companyId:$,currentTenant:h,isAdmin:ce,isOnAddressPage:l,themeState:n,googleAPIKey:ge.googleMapsAPIKey,integrationsSectionProps:Ue,aiAgentsActivationProps:Re,meetingUrl:o("onboarding_overview")}),i!=null?s.jsx(en,{windowSize:v,skipLegacyDrawerOffset:l&&h.productSettings.isOtherProductsEnabled!==!0,children:i}):null]});return null},ke="external_integrations",Ut=({tenantEmailDomain:e,signedInUserEmail:l,companyId:i})=>{const o=se(),{pendingAutoFocusTabId:p}=jt(),{plaidAccounts:u,onAddPlaidAccount:c,onReLoginPlaidAccount:v}=Bt({companyId:i}),n=E((r=>r.plaidAccountViewState.external_account.plaidConnectionDetails)),t=E((r=>X(r))),C=E((r=>r.tenantState.fetchState)),a=E((r=>Kn(r,i))),A=E((r=>zn(r,ke))),w=d.useMemo((()=>new Set(A.map((r=>r.additionalInfo)).filter((r=>r!=null)))),[A]),k=t.tenantId,O=fe(t.userRole??[]);d.useEffect((()=>{o(qn(ke))}),[o]);const P=a.externalConnections?.saveAPIKeyConnectionState,_=a.externalConnections?.saveAPIKeyConnectionError?.message,F=Y(P);d.useEffect((()=>{F==="In-Progress"&&(P==="Completed"?g.trackIntegrationConnected("chargebee","Onboarding","revenue"):P==="Error"&&g.trackIntegrationConnectFailed("chargebee","Onboarding","revenue",_??""))}),[P,F,_]);const m=a.externalConnections?.saveOAuthConnectionState,b=a.externalConnections?.saveOAuthConnectionError?.message,D=Y(m);d.useEffect((()=>{D==="In-Progress"&&(m==="Completed"?g.trackIntegrationConnected("hubspot","Onboarding","revenue"):m==="Error"&&g.trackIntegrationConnectFailed("hubspot","Onboarding","revenue",b??""))}),[m,D,b]);const U=a.externalConnections?.saveConnectorCredentialsStateBySlug,h=Y(U);return d.useEffect((()=>{const r=U??{},T=h??{},x=a.externalConnections?.saveConnectorCredentialsErrorBySlug??{};Object.keys(r).forEach((f=>{if(T[f]!=="In-Progress")return;let j;try{j=Ce(f)}catch{return}r[f]==="Completed"?g.trackIntegrationConnected(j,"Onboarding","payments"):r[f]==="Error"&&g.trackIntegrationConnectFailed(j,"Onboarding","payments",x[f]?.message??"")}))}),[U,h,a]),d.useMemo((()=>({isAdmin:O,analytics:g,referrer:"Onboarding",integrationsView:a,isLoading:C==="In-Progress",notifyMeRegisteredSlugs:w,autoFocusTabId:p??void 0,saveChargeBeeState:a.externalConnections?.saveAPIKeyConnectionState??"Not-Started",saveChargeBeeError:a.externalConnections?.saveAPIKeyConnectionError?.message,saveHubSpotState:a.externalConnections?.saveOAuthConnectionState??"Not-Started",saveHubSpotError:a.externalConnections?.saveOAuthConnectionError?.message,saveConnectorCredentialsStateBySlug:a.externalConnections?.saveConnectorCredentialsStateBySlug??{},saveConnectorCredentialsErrorBySlug:Object.fromEntries(Object.entries(a.externalConnections?.saveConnectorCredentialsErrorBySlug??{}).map((([r,T])=>[r,T?.message]))),deleteConnectionState:a.externalConnections?.deleteConnectionState??"Not-Started",deleteConnectionError:a.externalConnections?.deleteConnectionError?.message,onConnectGmail:()=>{g.trackIntegrationConnectClicked("gmail","Onboarding","email"),o(Qe(k,"gmail",tn()))},onConnectOutlook:()=>{g.trackIntegrationConnectClicked("outlook","Onboarding","email"),o(Qe(k,"outlook",tn()))},onConnectHubSpot:(r,T)=>{const x=a.externalConnections?.revenue?.find((j=>j.connectionName==="hubspot"))?.connectionId;if(x==null)return;g.trackIntegrationCredentialsSubmitted("hubspot","Onboarding","revenue");const f=`${window.location.origin}/oauth/hubspot/callback`;sessionStorage.setItem("hubspot_oauth_pending",JSON.stringify({client_id:r,client_secret:T,connection_id:x,redirect_uri:f,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(f)}`},onDisconnect:(r,T)=>{const x=[...a.externalConnections?.accounting??[],...a.externalConnections?.payments??[],...a.externalConnections?.revenue??[]].find((j=>j.connectionId===r))?.connectionName;let f;try{f=x!=null?Ce(x):void 0}catch{f=void 0}f!=null&&g.trackIntegrationDisconnected(f,"Onboarding",T),o(Yn(k,r,be(T)))},onNotifyMe:r=>{g.trackIntegrationsNotifyMeClicked("Onboarding",r),o(Wn(ke,r,l))},onReconnectQBO:()=>{ie.init("/onboarding/auth",e),ie.handleClick()},onRefreshClick:()=>{a.integrations.refreshQBO.fetchState!=="In-Progress"&&o(Jn())},onSaveChargeBeeCredentials:(r,T)=>{const x=a.externalConnections?.revenue?.find((f=>f.connectionName==="chargebee"))?.connectionId;x!=null&&(g.trackIntegrationCredentialsSubmitted("chargebee","Onboarding","revenue"),o(Zn(k,x,be("revenue"),Ce("chargebee"),{api_key:r,site:T})))},onSaveConnectorCredentials:r=>{g.trackIntegrationCredentialsSubmitted(r.connectionName,"Onboarding","payments"),o(Hn(k,be("payments"),r))},plaidAccounts:u,onAddPlaidAccount:c,onReLoginPlaidAccount:v,plaidConnectionDetails:n})),[O,a,C,w,p,k,l,e,o,u,c,v,n])};function tn(){const e=new URL(window.location.href);return e.searchParams.set("onboarding_step","connect_data_source"),e.toString()}function an(e,l,i){let o=`/${e}/onboarding/address`;return o=i!=null?o.concat(`/edit/${l}/${encodeURIComponent(i)}`):o.concat(`/new/${l}`),o}const on=De.div`
27
- display: flex;
28
- height: 100vh;
29
- background-color: ${e=>e.theme.colors.grey4};
30
- `,sn=cn((function(e,l){const{companyId:i,currentTenant:o}=l,p=Ae(e,i),u=mn(e);return{hasVerifiedBankAccount:(p.paymentAccount?.providerVerificationStatus?.code?.includes("verified")??!1)||(u.bankAccountsList[0]?.providerVerificationStatus?.code?.includes("verified")??!1),isDisabled:fe(o?.userRole??[])&&p.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",signedInUser:z.getSignedInUser(),currentTenant:o}}),(function(e,l){const{currentTenant:i,themeState:o,navigate:p,location:u}=l,{tenantEmailDomain:c}=i;return{onZeniLogoClick:()=>{o.toggle()},handleLogOutClick:()=>{const v=q(u.state?.pathnameStackToGoBack,u.pathname);p("/signout",{replace:!0,state:{pathnameStackToGoBack:v,message:"logout"}})},handleCockpitClick:()=>{window.open("/cockpit")},handleReferralsClick:()=>{p(`/${c}/rewards`)},handleUpdatePaymentAddressDetailClick:()=>{const v=q(u.state?.pathnameStackToGoBack,u.pathname);p(`/${c}/onboarding/billing/edit`,{state:{pathnameStackToGoBack:v,message:"UpdatePaymentAddressDetail"}})}}}))(At),Rt=()=>{const e=fn(),l=_e(),i=se(),o=Te(),p=yn(),{useFeatureGate:u}=Pe(),{isFeatureEnabled:c}=u(W.isDebitCardFeatureEnabled),{tenantEmailDomain:v}=xe(),n=hn(),[t,C]=d.useState(!1);d.useEffect((()=>{t===!1&&o.state?.message==="OnboardingThankyou"&&C(!0)}),[o.state]);const a=E((m=>X(m))),A=a.productSettings.isOtherProductsEnabled,w=A===!0&&!pn(a);d.useEffect((()=>{i(gn(k,!1,!w))}),[]);const k=a.companyId??z.getSignedInUserTenant(v)?.companyId;if(n.loggedInUser==null)throw Error("Can't access onboarding flow without signing in...");const O=Ee(c,a),P=we(a),_=E((m=>m.onboardingCustomerViewState.updateStatus.fetchState)),F=a.company?.companyOnboardingInfo.isOnboardingCompleted;if(F!==!0||w)return _==="Completed"&&F===!0&&w&&n?.loggedInUserRoleMap!=null?s.jsxs(on,{children:[s.jsx(re,{analytics:g,onLoad:m=>{m.trackPageLoaded(ve.Event.onboardingLandingPage,"Onboarding",Ot(a.productSettings))}}),s.jsx(sn,{navigate:l,showUpdatePaymentDetailButton:A,location:o,companyId:k,currentTenant:a,themeState:p,isVisitingFirstTime:t,meetingUrl:e("onboarding_overview")})]}):_==="Completed"&&F===!1&&n?.loggedInUserRoleMap!=null?s.jsxs(on,{children:[s.jsx(re,{analytics:g,onLoad:m=>{m.trackPageLoaded(ve.Event.onboardingInterimPage)}}),s.jsx(sn,{navigate:l,showUpdatePaymentDetailButton:A,location:o,companyId:k,currentTenant:a,themeState:p,isVisitingFirstTime:t,meetingUrl:e("onboarding_overview")})]}):s.jsx(wt,{});{const m={pathnameStackToGoBack:o.state?.pathnameStackToGoBack,message:"activation"};return O?s.jsx(Q,{to:"../../checking",state:m,replace:!0}):P?s.jsx(Q,{to:"../../cards",state:m,replace:!0}):s.jsx(Q,{to:"../../dashboard",state:m,replace:!0})}};function rn(){return typeof $e=="function"?$e():void 0}let pe=0;function Lt(){d.useEffect((()=>{if(!ge.sentryDsn?.trim())return;let e,l=!1,i=0;const o=()=>{e!==void 0&&(clearInterval(e),e=void 0)},p=()=>{const u=rn();return u!==void 0&&(u.flush(),!0)};return pe+=1,p()||(e=setInterval((()=>{i+=1,(l||p()||i>=10)&&o()}),1e3)),()=>{l=!0,o(),pe-=1,queueMicrotask((()=>{pe===0&&(function(){const u=rn();if(u===void 0)return;const c=()=>{if(pe===0)try{u.startBuffering()}catch{}};u.stop().then(c,c)})()}))}}),[])}function pa(){return Lt(),s.jsxs(Dn,{children:[s.jsx(H,{path:"/",element:s.jsx(le,{})}),s.jsx(H,{path:"/billing/edit",element:s.jsx(le,{taxCFOCustomer:!0})}),s.jsx(H,{path:"/thankyou",element:s.jsx(Rt,{})}),s.jsx(H,{path:"/activation",element:s.jsx(Vt,{})}),s.jsx(H,{path:"/address/edit/:addressType/:addressId",element:s.jsx(le,{isOnAddressPage:!0,appContent:s.jsx(Me,{})})}),s.jsx(H,{path:"/address/new/:addressType",element:s.jsx(le,{isOnAddressPage:!0,appContent:s.jsx(Me,{})})}),s.jsx(H,{path:"*",element:s.jsx(An,{})})]})}export{pa as default};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-CSh_vLcI.js";import{a as d}from"./sentry-BbRn6Rps.js";import{h as q,u as A,g as G,i as W,j as c,N as X,l as F,n as N,o as O}from"./core-BTRpO5kD.js";import{X7 as _,fI as M,Wo as R,n2 as Y,Sp as k,Xc as $,X1 as z,m2 as V,Sq as S,Wt as H,Wu as J,X3 as K,X2 as L}from"./zeni-epic-state-GGdMfKwk.js";import{b8 as Q,m as U,a4 as Z,p as tt}from"./index-D-DXs1ug.js";import"./mui-DxxQrDXb.js";import{d as I}from"./decodeURIComponentSafe-gQrUmSgy.js";import{w as et}from"./withTransactionSidePanel-_2doqhuK.js";import{f as at,c as nt}from"./routePaths-BpwABclb.js";import"./recharts-TU-ixTpA.js";import"./analytics-Bwul-sh2.js";import"./plaid-BETTZw7O.js";import"./dnd-2ZjyQ0g9.js";import"./stripe-cKAAJElX.js";import"./lottie-CkDkDB9t.js";import"./lexical-B4Vx7iXM.js";import"./pdf-B5u-xbSo.js";import"./utils-CG6WKZWt.js";import"./useAskAiCfoHostNavButtonProps-B9dKaXC2.js";import"./TransactionDetailScreen-ZbhuUtai.js";import"./useInitialThreadRequest-CVcZLc8x.js";import"./expenseAutomationHelper-D83VUSa4.js";import"./stripSplatSuffix-CHEOIiL-.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]="f3a9daec-1477-489e-9717-5e357a30c8c2",a._sentryDebugIdIdentifier="sentry-dbid-f3a9daec-1477-489e-9717-5e357a30c8c2")}catch{}})();const ot=F((function(a,t){const e=t.entity,o=$(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:z(a,"common")},trendWithTransactionsReport:o,analytics:U,isAccountingClassesEnabled:V(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(K({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(L("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(H()),a(J()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(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(k(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(Q),it=et((function({entityType:a,...t}){const e=q(),o=A(),l=G(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:b,entityIdEncoded:w,entityNameEncoded:x}=W(),r=I(w??""),p=I(x??""),u=rt(r,p),j=[r,p].filter((n=>n!=null)),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=c((n=>_(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),v=c((n=>M(n).company?.companyInfo.firstMonthOfFY??1)),f=c((n=>R(n.trendWithTransactionsState,i,"EntityDetail")));d.useEffect((()=>{m===!1&&u===!0&&(T(!0),o(Y(i)))}),[m,u,i]);const E=c((n=>n.trendState.fetchState)),P=f?.selectedPeriod?.timePeriod??g,B=(function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y})(f?.selectedPeriod?.timePeriod,g);return d.useEffect((()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(k(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))}),[m,h,E]),u?s.jsx(ot,{firstMonthOfFY:v,tenantEmailDomain:b,location:l,navigate:e,entity:i,defaultTransactionTimePeriod:B,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(X,{to:C(j.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(N,{children:s.jsx(O,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{vt as EntityDetailRoutes,vt as default};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-CSh_vLcI.js";import{a as r}from"./sentry-BbRn6Rps.js";import{aw as i,ax as l,v as p,a4 as m}from"./index-D-DXs1ug.js";import"./mui-DxxQrDXb.js";import c from"./NotFoundScreen-BEmDKBPw.js";import{h as u,g as b}from"./core-BTRpO5kD.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="12db23f3-a3af-47a0-ad83-5eba9eef5259",a._sentryDebugIdIdentifier="sentry-dbid-12db23f3-a3af-47a0-ad83-5eba9eef5259")}catch{}})();const _=()=>{const a=u(),e=b(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),d=r.useCallback((()=>{(()=>{const n=m(e.state?.pathnameStackToGoBack),f=n.poppedPathname??k();a(f,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=i(e.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:d}):s.jsx(c,{})},k=(a=2)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e};export{_ as F};
@@ -1 +0,0 @@
1
- import{a as r}from"./sentry-BbRn6Rps.js";import{u as f,h as l,g as m}from"./core-BTRpO5kD.js";import{h$ as p,UL as g,UM as _}from"./zeni-epic-state-GGdMfKwk.js";import{u as b,L as h,z as y}from"./index-D-DXs1ug.js";import"./liveblocks-CSh_vLcI.js";import"./recharts-TU-ixTpA.js";import"./mui-DxxQrDXb.js";import"./analytics-Bwul-sh2.js";import"./plaid-BETTZw7O.js";import"./dnd-2ZjyQ0g9.js";import"./stripe-cKAAJElX.js";import"./lottie-CkDkDB9t.js";import"./lexical-B4Vx7iXM.js";import"./pdf-B5u-xbSo.js";import"./utils-CG6WKZWt.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]="0fdf3891-5c7e-4a9e-b5ea-d15ebfeee038",e._sentryDebugIdIdentifier="sentry-dbid-0fdf3891-5c7e-4a9e-b5ea-d15ebfeee038")}catch{}})();function $(){const e=f(),n=l(),o=m(),{setLoading:i,clearAllLoading:c}=b(),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"),d=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&d!=null){const t=JSON.parse(d);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}c();const u=y.getActiveTenantForUser();n(u?.tenantEmailDomain!=null?`/${u.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{$ as default};
@@ -1,12 +0,0 @@
1
- import{j as u}from"./liveblocks-CSh_vLcI.js";import{a as g}from"./sentry-BbRn6Rps.js";import{u as O,g as _,h as w,t as V,j as l,N as T}from"./core-BTRpO5kD.js";import{z as r,E as A,G as M,S as P,m as N,T as $,_ as B,$ as G,V as R}from"./index-D-DXs1ug.js";import{fI as W,U7 as X,UA as q,Ur as H,gl as J,gn as K,Uw as Q,gX as Y,dk as Z,UB as ee,UC as te}from"./zeni-epic-state-GGdMfKwk.js";import{n as ne}from"./mui-DxxQrDXb.js";import{u as se}from"./useDeviceId-BNqfuCC6.js";import{f as ae}from"./analyticsHelper-CJXbjLla.js";import{t as ie}from"./getLocaleForTenant-COzbHLDP.js";import"./recharts-TU-ixTpA.js";import"./analytics-Bwul-sh2.js";import"./plaid-BETTZw7O.js";import"./dnd-2ZjyQ0g9.js";import"./stripe-cKAAJElX.js";import"./lottie-CkDkDB9t.js";import"./lexical-B4Vx7iXM.js";import"./pdf-B5u-xbSo.js";import"./utils-CG6WKZWt.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]="96d9ce2e-e5e3-4122-a38e-2041804a0d25",t._sentryDebugIdIdentifier="sentry-dbid-96d9ce2e-e5e3-4122-a38e-2041804a0d25")}catch{}})();const U=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function Ue(){const t=O(),a=_(),f=w(),[y]=V(),n=y.get("token"),p=y.get("stytch_token_type"),m=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:C,magicLinkEmail:c,verifyDeviceFetchState:x,resendVerifyDeviceOTPFetchState:z}=l((e=>e.tenantState)),S=l((e=>e.tenantState.fetchState)),b=l((e=>e.tenantState.activeTenantFetchState.fetchState)),I=l((e=>e.tenantState.signInState)),h=l((e=>e.tenantState.magicLinkSignInFetchState.fetchState)),s=l((e=>e.tenantState.loggedInUser)),o=l((e=>W(e))),k=l((e=>X(e))),D=r.getSignedInUser(),v=A().mode;g.useEffect((()=>{s?.zeniSessionId==null&&n!=null&&U(n,p)&&i!=null&&m!=null&&(r.saveMagicLinkTriggered(n),t(q(n,i,m)))}),[n,p,t,i,m,s?.zeniSessionId]),g.useEffect((()=>{I!=="In-Progress"||S!=="Completed"&&b!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(H(k.tenantsInOrder),s.zeniSessionId),J(s.userId,s.zeniSessionId,o.tenantId),t(K(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(Q("Completed")),M.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,k.tenantsInOrder),Y().then((()=>{const e=R();e!=null&&P(e)})),setTimeout((()=>{N.trackLogin($.Event.loginSuccess,"email",Z(o.productSettings))}),2e3))}),[I,S,b,s,o,k,v,a.state,t]);const E=g.useCallback((()=>{f("/signin/auth")}),[f]),j=g.useCallback((()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))}),[i,d,t,c]),F=g.useCallback((e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))}),[i,n,t,c,d]);if(h==="Completed"&&d!=null)return u.jsx(B,{phoneNumber:C,verifyOtpFetchState:x.fetchState,resendVerifyDeviceOTPFetchState:z,onResendOtp:j,onVerifyOtp:F,onCancelVerifyDevice:E});if(I==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||D!=null){const e=a.state?.origin??"/";return u.jsx(T,{to:e,state:{...a.state,origin:""}})}if(!U(n,p)||m==null||h==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(G,{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{Ue as default};
@@ -1 +0,0 @@
1
- import{j as D}from"./liveblocks-CSh_vLcI.js";import{a as m}from"./sentry-BbRn6Rps.js";import{u as te,j as t,i as $e,g as Ge,h as Ue,q as F}from"./core-BTRpO5kD.js";import{fI as ne,U8 as Me,U9 as se,gc as xe,fH as Ne,Ui as Pe,Ub as Re,Uc as Ve,q2 as Oe,gp as Le,Uf as b,Uk as je,Ul as Q,gq as qe,Um as He,Ei as Ze,h4 as ze,cW as We,Un as Ye,gb as Je,gr as Ke}from"./zeni-epic-state-GGdMfKwk.js";import{w as Qe,i as Xe,y as ea,c as aa,d as ta,f as na,u as sa,g as c,h as oa,A as ia,z as ra,e as da,o as ca,q as la,x as ua,r as ma,s as X,L as fa,J as ha,K as ba,p as S,m as ee,D as pa,O as ae,H as ga,I as Sa}from"./index-D-DXs1ug.js";import{D as ka}from"./mui-DxxQrDXb.js";import{u as Ea}from"./InboxNotificationsProvider-RMyde6sE.js";import{u as Ca}from"./useTaskManagerAccess-DkfJ_Uxt.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new l.Error().stack;i&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[i]="b7ac4dfe-3585-4c2b-a939-832f19eb4568",l._sentryDebugIdIdentifier="sentry-dbid-b7ac4dfe-3585-4c2b-a939-832f19eb4568")}catch{}})();const Ta=Qe((({isAppContentDrawerOpen:l,handleDrawerToggle:i})=>{const{tenantEmailDomain:s}=$e(),a=Ge(),k=ea(),n=Ue(),B=xe(),r=te(),{useFeatureGate:d}=aa(),p=ta(),{isTaskManagerAccessEnabled:E}=Ca(p),o=t((e=>ne(e))),oe=o.masterTOSInfo?.isMasterTOSAccepted??!1,$=t((e=>Ne(e))),{status:ie}=t(Pe),G=$.uiState.currentChatSessionId,C=na(),{setLoading:re}=sa(),[w,U]=m.useState(void 0),A=F("/:tenantEmailDomain/dashboard")!==null,M=F("/:tenantEmailDomain/reports")!==null,f=F("/:tenantEmailDomain/onboarding/*")!==null,de=!!o.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:ce}=d(c.isChargeCardFeatureEnabled),{isFeatureEnabled:x}=d(c.isDebitCardFeatureEnabled),le=oa(o,ce,x),{isFeatureEnabled:ue}=d(c.isSettingsFeatureEnabled),N=t((e=>Re(e))),{isFeatureEnabled:T}=d(c.isReferralFeatureEnabled),v=t((e=>Ve(e)));m.useEffect((()=>{C&&T&&!f&&v.fetchState==="Not-Started"&&r(Oe(!0))}),[C,T,v.fetchState,f]);const _=t((e=>e.tenantState)),me=t((e=>_.fetchState==="Completed"?Le(e):[])),g=t((e=>e.expenseAutomationViewState.selectedPeriodByTenantId)),{isFeatureEnabled:fe}=d(c.isApAgingFeatureEnabled),{isFeatureEnabled:he}=d(c.isArAgingFeatureEnabled),P=ia(),{isFeatureEnabled:be}=d(c.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:pe}=d(c.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:ge}=d(c.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:Se}=d(c.isDashboardSidebarNewYearAnimationEnabled),ke=o.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",Ee=t((e=>b(e).totalUnreadCount)),Ce=t((e=>b(e).reducedFetchCountState)),R=t((e=>b(e).notificationDetailsByTab.tasks.uiState.unreadCount)),V=t((e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount)),O=t((e=>b(e).notificationDetailsByTab.tasks.fetchCountState)),I=t((e=>b(e).notificationDetailsByTab.comments.fetchCountState)),{inboxNotifications:L,isLoading:j,isFetchingMore:q,hasFetchedAll:H,fetchMore:Te}=Ea();m.useEffect((()=>{const e=setTimeout((()=>Te?.()),0);return()=>clearTimeout(e)})),m.useEffect((()=>{if(j===!1&&q===!1&&H===!0)if(o?.companyId!=null&&L!=null){const e=`dashboard_${o.companyId}`;U(L.filter((u=>u.roomId===e&&u.readAt==null)).length)}else U(0)}),[j,q,H]),m.useEffect((()=>{C&&E&&!f&&O.fetchState==="Not-Started"&&B.tenantId!=null&&r(je("task_manager","dashboard"))}),[C,E,f,O.fetchState,B.tenantId,r]),m.useEffect((()=>{f||I.fetchState!=="Not-Started"||r(Q({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[f,I.fetchState,r]),m.useEffect((()=>{w!=null&&I.fetchState==="In-Progress"&&(r(Q({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),r(se({unreadCount:w},"comments")))}),[w,I.fetchState]);const Ie={fetchStatus:Ce,count:Ee},Z=s!=null?ra.getSignedInUserTenant(s):null,z=t((e=>Z?.tenantId!=null?qe(e,Z.tenantId):void 0)),h=[];fe===!1&&h.push("accounts_payable_aging"),he===!1&&h.push("accounts_receivable_aging"),h.push("zeni_accounts_promo_card","treasury_promo_card"),T===!1&&h.push("rewards_card"),P===!1&&h.push("expense_automation_card");const W=t((e=>He(e,h).fetchState)),Y=t((e=>Ze(e).fetchState)),ye=A&&(W==="Completed"||W==="Error")||M&&(Y==="Completed"||Y==="Error")||!A&&!M?void 0:"disabled",we=m.useMemo((()=>ze(o.userRole)),[o.userRole]),Ae=We(we),ve=o?.rewardsLastViewedTime==null,_e=p?.userEmail!=null&&N.fetchState==="Completed"&&Ye(N.notificationSettings,p.userEmail,x,o,E),J=da(),Fe=J&&ca(a);return D.jsx(ka,{container:window.document.body,variant:"temporary",open:l,onClose:()=>i(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:D.jsx(la,{signedInUser:p,currentTenantId:_.currentTenantId??"",tenants:_.fetchState==="Completed"?me:z!=null?[z]:[],currentTenant:o,isTenantDropdownDisabled:ye,isSettings:X(a),isInvoicing:ma(a)&&ie==="completed",isSettingsFeatureEnabled:ue,isVendorsTabVisible:Ae,isZeniAccountEnabled:de,isChargeCardEnabled:le,isTreasuryEnabled:ke,isNotificationsTabVisible:_e,notificationCountDetails:Ie,isExpenseAutomationEnabledForUser:P,selectedMenu:ua(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:ve,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:J,onNotificationIconClick:()=>{i(!1);let e=R===0&&V>0?"notifications/comments":"notifications/tasks";X(a)&&(e=R===0&&V>0?"../../notifications/comments":"../../notifications/tasks");const u=S(a.state?.pathnameStackToGoBack,a.pathname);n(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{i(!1);const e=S(a.state?.pathnameStackToGoBack,a.pathname);n("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(i(!1),s==null)return;if(e.type==="invoicing")return void n(`../${s}/invoicing/overview`,{state:{pathnameStackToGoBack:S(a.state?.pathnameStackToGoBack,a.pathname),referrer:"Sidebar"}});if(e.type==="ai_cfo"){if(ee.trackAICFOChatScreenStateChanged("viewed","left_menu",G??null,null),!oe)return void pa({location:a,navigate:n,mergeState:{referrer:"Sidebar"}});const y=S(a.state?.pathnameStackToGoBack,a.pathname);return void n(`/${s}/ai-cfo/explore`,{state:{pathnameStackToGoBack:y,referrer:"Sidebar"}})}const u=S(a.state?.pathnameStackToGoBack,a.pathname),K=e.type,De=ae(K)&&K!=="command_center";if(ae(e.type)&&g[o.tenantId]!=null&&ee.trackMonthEndCloseClicked(g[o.tenantId].month,g[o.tenantId].year,"Sidebar"),De&&g[o.tenantId]!=null){const y=g[o.tenantId];return void n(`/${s}/month_end_close_checks/review/${e.type}/${y.month}-${y.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const Be=ga(e.type);Sa(e.type)?(G!=null&&r(Ke()),n(`/${s}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):n(`/${s}/${Be}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{i(!1),n(`/${s}/settings/my_profile`)},handleReferralsClick:()=>{i(!1),n(`/${s}/rewards`)},handleBackClick:()=>{n(`/${s}/dashboard`)},handleTenantSelect:e=>{re(fa.TENANT_SWITCHING),i(!1),ha({dispatch:r,navigate:n,pathToNavigate:ba(e.tenantEmailDomain,a),selectedTenant:e,signedInUser:p})},onZeniLogoClick:()=>{k.toggle()},isAiCfo:Fe,aiCfoView:$,isOnDashboard:A,updateCurrentChatSessionId:e=>{r(Je({sessionId:e,agentId:"controller"})),n(`/${s}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:be,isTaskManagerAccessEnabled:E,thanksGivingAnimationEnabled:pe,christmasAnimationEnabled:ge,newYearAnimationEnabled:Se})})})),Ba=l=>{const i=te(),s=t((k=>ne(k))),a={events:s.userRoleId!=null?[`private-encrypted-${s.userRoleId}.dashboard-user-notification`]:[],eventCallback:(k,n)=>{Xe(n)&&Me(n.mode)==="dashboard"&&i(se({unreadCount:n.data.unread},"tasks"))}};return D.jsx(Ta,{...l,...a})};export{Ba as M};
@@ -1 +0,0 @@
1
- import{j as e}from"./liveblocks-CSh_vLcI.js";import{h as r,l as i}from"./core-BTRpO5kD.js";import{am as n}from"./index-D-DXs1ug.js";import"./mui-DxxQrDXb.js";import"./sentry-BbRn6Rps.js";import"./zeni-epic-state-GGdMfKwk.js";import"./recharts-TU-ixTpA.js";import"./analytics-Bwul-sh2.js";import"./plaid-BETTZw7O.js";import"./dnd-2ZjyQ0g9.js";import"./stripe-cKAAJElX.js";import"./lottie-CkDkDB9t.js";import"./lexical-B4Vx7iXM.js";import"./pdf-B5u-xbSo.js";import"./utils-CG6WKZWt.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="f2f6ef04-8019-4dfe-8bec-98d5efe59039",o._sentryDebugIdIdentifier="sentry-dbid-f2f6ef04-8019-4dfe-8bec-98d5efe59039")}catch{}})();const f=i(null,(function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}}))(n);function _(){const o=r();return e.jsx(f,{navigate:o})}export{_ as default};
@@ -1 +0,0 @@
1
- import{n as mt,b as lt,o as ft,j as N}from"./liveblocks-CSh_vLcI.js";import ut from"./NotFoundScreen-BEmDKBPw.js";import{a as k}from"./sentry-BbRn6Rps.js";import{h as ht,g as pt,i as kt,u as gt,j as b,l as bt,n as St,o as O}from"./core-BTRpO5kD.js";import{cB as It,Ub as Y,fI as J,h4 as Tt,Uf as S,a1a as Q,Ul as m,U9 as y,Ay as F,Gf as Ct,a1b as At,U8 as yt,Un as Et,AD as _t,a1c as $,br as j,gk as x,AH as X,a1d as Nt,cN as Bt,cG as wt}from"./zeni-epic-state-GGdMfKwk.js";import{aq as xt,d as Ut,c as vt,g as Dt,as as Gt,dK as Rt,p as B,dL as Pt,w as Mt,dM as $t,i as jt,a4 as Ft}from"./index-D-DXs1ug.js";import"./mui-DxxQrDXb.js";import{u as Vt}from"./useAskAiCfoHostNavButtonProps-B9dKaXC2.js";import{u as qt}from"./useTaskManagerAccess-DkfJ_Uxt.js";import"./recharts-TU-ixTpA.js";import"./analytics-Bwul-sh2.js";import"./plaid-BETTZw7O.js";import"./dnd-2ZjyQ0g9.js";import"./stripe-cKAAJElX.js";import"./lottie-CkDkDB9t.js";import"./lexical-B4Vx7iXM.js";import"./pdf-B5u-xbSo.js";import"./utils-CG6WKZWt.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="ac530c8c-03ef-4abc-b1fb-88afa9a20015",t._sentryDebugIdIdentifier="sentry-dbid-ac530c8c-03ef-4abc-b1fb-88afa9a20015")}catch{}})();const Lt=(t,l)=>new Promise(((n,h)=>{const g=t.map((c=>new Promise((o=>{l(c),o()}))));Promise.all(g).then((()=>{setTimeout((()=>{n()}),2e3)})).catch((c=>{h(c)}))})),Ht=bt((function(t,l){const n=Y(t),{signedInUser:h,isDebitCardFeatureEnabled:g,isTaskManagerAccessEnabled:c}=l,o=S(t),f=J(t),{currentTab:I}=o;return{notificationView:o,isNotificationSettingsVisible:h.userEmail!=null&&Et(n.notificationSettings,h.userEmail,g,f,c),isDisabled:o.notificationDetailsByTab[I].fetchState==="In-Progress"?"disabled":void 0}}),(function(t,l){const{location:n,tenantEmailDomain:h,loggedInUserRoleMap:g,externalNotificationsUnreadCount:c,allUnreadCommentsNotificationIds:o,navigate:f,markInboxNotificationAsRead:I,fetchMoreCommentsNotifications:v}=l;return{onNotificationClick:(e,s,d,r)=>{if(r==="task_deleted"){const i=`/${h}/tasks`,T=B(n.state?.pathnameStackToGoBack,n.pathname);f(i,{state:{pathnameStackToGoBack:T,message:"triggerBackClick"}})}else{const i=`/${h}/tasks/${s}`,T=B(n.state?.pathnameStackToGoBack,n.pathname);f(i,{state:{pathnameStackToGoBack:T,message:"triggerBackClick"}})}d==="unread"&&t(X("task_manager","read",[e],!1))},onCommentNotificationClick:(e,s,d)=>{const r=s.toString().split(`/${h}/`);if(r[1]!=null){d==="unread"&&(I(e),t($([e],j())));let i=`/${h}/${r[1]}`;const T=B(n.state?.pathnameStackToGoBack,n.pathname);r[1].startsWith("reimbursement")&&!Bt(g)&&(i="not-found"),r[1].startsWith("bill")&&!wt(g)&&(i="not-found"),f(i,{state:{pathnameStackToGoBack:T,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(e,s)=>{t(y(e,s))},onUpdateNotificationTabState:(e,s)=>{t(m(e,s))},onUpdateNotificationViewCurrentTabAndSubTab:(e,s)=>{t(Q(e,s));const d=`../${e}`,r=B(n.state?.pathnameStackToGoBack,n.pathname);f(d,{state:{pathnameStackToGoBack:r}})},onUpdateNotificationViewSubTab:e=>{t(Nt(e))},onFetchMoreNotifications:(e,s)=>{if(e==="tasks"){const d=[];s==="all"?d.push("read","unread"):s!=="mentions"&&d.push(s),t(F("task_manager","dashboard",d))}else v?.()},onUpdateNotificationStatus:(e,s,d,r)=>{e==="tasks"?t(X("task_manager",d,r)):(t(m({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(r.map((i=>{d==="read"&&(I(i),t($([i],j())))}))).then((()=>{t(m({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:c-r.length>0?c-r.length:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}),(i=>{t(m({markAsReadState:{fetchState:"Error",error:i}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})).catch((i=>{t(m({markAsReadState:{fetchState:"Error",error:i}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onMarkAllNotificationsAsRead:e=>{e==="tasks"?t(_t("task_manager","read")):(t(m({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Lt(o,I).then((()=>{t($(o,j())),t(m({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))})).catch((s=>{t(m({markAsAllReadState:{fetchState:"Error",error:s}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onBackClick:()=>{const e=Ft(n.state?.pathnameStackToGoBack),s=e.poppedPathname??"../../dashboard";f(s,{state:{pathnameStackToGoBack:e.newStack}})},onSettingsClick:()=>{const e=B(n.state?.pathnameStackToGoBack,n.pathname);f("../../settings/notifications",{state:{pathnameStackToGoBack:e}})}}}))(Mt($t)),Wt=()=>{const t=ht(),l=pt(),{tenantEmailDomain:n,selectedTab:h}=kt(),{areTenantIdsInSync:g}=xt(),c=It(h??""),o=gt(),f=Ut(),[I,v]=k.useState(!1),e=b((a=>Y(a))),s=b((a=>J(a))),{useFeatureGate:d}=vt(),{isFeatureEnabled:r}=d(Dt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:i,onAskAiCfoClick:T}=Vt({mobileExploreReferrer:"Notifications"});Gt({isDataReady:!0});const Z=Tt(s.userRole);if(s==null||n==null||s.companyId==null)throw Error("Can't access notifications page without current tenant...");if(f==null)throw Error("Can't access notifications page without signed in...");const V=b((a=>S(a).notificationDetailsByTab.tasks.fetchState)),q=b((a=>S(a).currentTab)),D=b((a=>S(a).currentSubTab)),tt=b((a=>S(a).notificationDetailsByTab.comments.fetchCountState)),G=b((a=>S(a).notificationDetailsByTab.comments.fetchState)),at=b((a=>S(a).notificationDetailsByTab.comments.uiState.unreadCount)),et=b((a=>S(a).allExternalNotifications)).filter((a=>a.inboxNotification.readAt==null)).map((a=>a.inboxNotification.id)),st=Rt().allUsers,{inboxNotifications:w,isLoading:E,hasFetchedAll:C,isFetchingMore:R,fetchMore:ot}=mt(),{threads:L,isLoading:H,fetchMore:W,isFetchingMore:z,hasFetchedAll:K}=lt({query:{metadata:{companyId:s.companyId,application:"dashboard"}}});k.useEffect((()=>{if(q!==c&&c!=null&&o(Q(c)),c==null){const a=`../${q}`,p=B(l.state?.pathnameStackToGoBack,l.pathname);t(a,{state:{pathnameStackToGoBack:p}})}}),[c]),k.useEffect((()=>{tt.fetchState==="Not-Started"&&o(m({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[]),k.useEffect((()=>{if(E===!1&&C===!0&&s?.companyId!=null&&w!=null){const a=`dashboard_${s.companyId}`,p=w.filter((A=>A.roomId===a&&A.readAt==null)).length;o(m({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),o(y({unreadCount:p},"comments"))}}),[E,C]),k.useEffect((()=>{V!=="In-Progress"&&g&&o(F("task_manager","dashboard",["read","unread"]))}),[g]),k.useEffect((()=>{const a=setTimeout((()=>ot?.()),0);return()=>clearTimeout(a)}));const P=E||R===!0||C!==!0||E||R===!0||C!==!0;k.useEffect((()=>{P&&G!=="In-Progress"?o(m({fetchState:"In-Progress",error:void 0},"comments")):P||G!=="In-Progress"||o(m({fetchState:"Completed",error:void 0},"comments"))}),[P,G]),k.useEffect((()=>{o(y({hasMore:C!==!0},"comments"))}),[C]),k.useEffect((()=>{e.fetchState!=="In-Progress"&&e.fetchState!=="Completed"&&I===!1&&(v(!0),o(Ct()))}),[e.fetchState]),k.useEffect((()=>{if(E===!1&&H===!1&&w!=null&&L!=null){const a=`dashboard_${s.companyId}`,p=w.filter((u=>u.roomId===a)).filter((u=>Pt(u.kind))),A=p.filter((u=>u.readAt==null)),_=p.map((u=>u.id)),ct=p.map((u=>{const M=L.find((dt=>{return dt.id===((U=u).kind==="thread"?U.threadId:"subjectId"in U?U.subjectId:void 0);var U}));return M!=null?{inboxNotification:{...u,threadId:M.id},thread:M}:(z||K===!0||W==null||W(),null)})).filter((u=>u!=null));o(m({allNotificationsIds:_},"comments")),o(y({totalCount:_.length,unreadCount:A.length},"comments")),o(At(ct))}}),[E,R,z,C,K,H,w?.length]);const nt={events:s.userRoleId!=null?[`private-encrypted-${s.userRoleId}.dashboard-user-notification`]:[],eventCallback:(a,p)=>{if(jt(p)){const A=yt(p.mode);if(A==="dashboard"&&o(y({unreadCount:p.data.unread},"tasks")),V!=="In-Progress"){const _=[];D==="all"?_.push("read","unread"):D!=="mentions"&&_.push(D),o(F("task_manager",A,_,!0))}}}},it=ft(),{isTaskManagerAccessEnabled:rt}=qt(f);return N.jsx(Ht,{tenantEmailDomain:n,loggedInUserRoleMap:Z,signedInUser:f,externalNotificationsUnreadCount:at,location:l,navigate:t,isDebitCardFeatureEnabled:r,isTaskManagerAccessEnabled:rt,users:st,markInboxNotificationAsRead:it,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:i,onAskAiCfoClick:T,...nt})};function ma(){return N.jsxs(St,{children:[N.jsx(O,{path:"/:selectedTab",element:N.jsx(Wt,{})}),N.jsx(O,{path:"*",element:N.jsx(ut,{})})]})}export{ma as default};
@@ -1 +0,0 @@
1
- import{j as m}from"./liveblocks-CSh_vLcI.js";import{a as r}from"./sentry-BbRn6Rps.js";import{u as A,g as P,j as o,N as j}from"./core-BTRpO5kD.js";import{UO as C,fI as R,gp as x,UP as z,UQ as D,UR as M,US as L,pV as k,Tt as N}from"./zeni-epic-state-GGdMfKwk.js";import{z as h,ah as I}from"./index-D-DXs1ug.js";import"./mui-DxxQrDXb.js";import"./recharts-TU-ixTpA.js";import"./analytics-Bwul-sh2.js";import"./plaid-BETTZw7O.js";import"./dnd-2ZjyQ0g9.js";import"./stripe-cKAAJElX.js";import"./lottie-CkDkDB9t.js";import"./lexical-B4Vx7iXM.js";import"./pdf-B5u-xbSo.js";import"./utils-CG6WKZWt.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new n.Error().stack;s&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[s]="c7e15d0f-8386-4c7a-8877-066d040fdca4",n._sentryDebugIdIdentifier="sentry-dbid-c7e15d0f-8386-4c7a-8877-066d040fdca4")}catch{}})();function ee(){const n=A(),s=P(),{params:t,error:i}=r.useMemo((()=>C(s.search)),[s.search]),w=r.useMemo((()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application"),[s.search,t]),p=h.isSignedIn(),a=h.getSignedInUser(),f=o((e=>R(e))),l=o((e=>x(e))),d=o((e=>e.tenantState.fetchState)),y=o(z),S=o(D),c=o(M),[U,v]=r.useState(null),[E,b]=r.useState(null);r.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]),r.useEffect((()=>()=>{n(L())}),[n,s.search]),r.useEffect((()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)}),[i]);const g=r.useRef(!1);r.useEffect((()=>{p&&a!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(k(a.userId,a.zeniSessionId??void 0))))}),[p,a,d,n]),r.useEffect((()=>{c!=null&&c!==""&&(window.location.href=c)}),[c]);const _=r.useMemo((()=>{if(f?.tenantId!=null)return f.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some((T=>T.tenantId===e))?e:l.length===1?l[0].tenantId:null}),[f?.tenantId,l]),u=U??_;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):p?m.jsx(I,{variant:"signed_in",clientName:w,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:v,approveError:E??S,isApproving:y==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&a!=null&&u!=null&&n(N(a.userId,a.zeniSessionId??void 0,u,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{b("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(j,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
@@ -1 +0,0 @@
1
- import{j as n}from"./liveblocks-CSh_vLcI.js";import{h as W,u as Y,g as z,i as H,j as d,l as J,n as K,o as S}from"./core-BTRpO5kD.js";import{fI as v,Aj as R,vb as Q,VG as M,v6 as T,bq as X,c0 as Z,v7 as ee,VH as ae,Vo as C,ek as te,E7 as se,VI as oe,Ev as re,e0 as ne,d$ as ce}from"./zeni-epic-state-GGdMfKwk.js";import{ai as ie,z as le,aq as de,as as me,W as fe,a8 as pe,m as w,aD as ue,p as he,c as ge,g as Fe}from"./index-D-DXs1ug.js";import"./mui-DxxQrDXb.js";import Ie from"./NotFoundScreen-BEmDKBPw.js";import{F as be}from"./FeaturePreviewScreen-DiNAV9z-.js";import{a as g}from"./sentry-BbRn6Rps.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-B9dKaXC2.js";import{u as Ce}from"./useInitialThreadRequest-CVcZLc8x.js";import{t as Te}from"./routePaths-BpwABclb.js";import{M as ye}from"./MobileAppDrawer-C0d1iVMA.js";import"./recharts-TU-ixTpA.js";import"./analytics-Bwul-sh2.js";import"./plaid-BETTZw7O.js";import"./dnd-2ZjyQ0g9.js";import"./stripe-cKAAJElX.js";import"./lottie-CkDkDB9t.js";import"./lexical-B4Vx7iXM.js";import"./pdf-B5u-xbSo.js";import"./utils-CG6WKZWt.js";import"./InboxNotificationsProvider-RMyde6sE.js";import"./useTaskManagerAccess-DkfJ_Uxt.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="734d085d-f18b-4893-9328-799467b07150",s._sentryDebugIdIdentifier="sentry-dbid-734d085d-f18b-4893-9328-799467b07150")}catch{}})();const y=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},Ae=J((function(s){const e=ae(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach((r=>{a[r]=o[r]===!1})),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:w}}),(function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(M(a,o)),e.isPandLReportFetched(a)||s(T(a)),y(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(re(a))},onForecastVsActualsCompareToggle:a=>{s(oe(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(se(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,c;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,c=te(o)):o.balanceTimeFrame==="year"?(r="quarter",c={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),c!=null&&r!=null){const u=Te(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),m=he(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(u,{state:{pathnameStackToGoBack:m,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}}))(ue);function U(){const s=ie(),e=W(),a=Y(),o=z(),{forecastId:r,tenantEmailDomain:c}=H(),[p,u]=g.useState(!1),[m,A]=g.useState(!1),F=le.getSignedInUser(),D=d((t=>v(t))),q=D.company?.companyInfo.firstMonthOfFY??1,i=d((t=>R(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),x=d((t=>t.profitAndLossState)),j=d((t=>t.reportUIOptionsState.selectedForecast)),k=t=>x.pandLByForecastID[t]!=null&&ee(t,x).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:I}=de();me({isDataReady:l});const{isAiCfoAccessEnabled:V,onAskAiCfoClick:$}=Se({mobileExploreReferrer:"Forecast"});g.useEffect((()=>{if(!p&&I)u(!0),l||a(Q());else if(l&&!m){A(!0);const t=((f,P,O)=>P!=null?f.forecasts.findIndex((b=>b.id===P)):O!=null?f.forecasts.findIndex((b=>b.id===O)):f.forecasts.length>0?0:-1)(i,r,j?.id);t===-1&&r!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=j?.index?(a(M(i.forecasts[t].id,t)),y(r,i.forecasts[t].id,e,o.search)):r==null&&t!==-1&&y(void 0,i.forecasts[t].id,e,o.search),t!==-1&&!k(i.forecasts[t].id)&&I&&a(T(i.forecasts[t].id))}}),[p,u,a,l,i,m,A,R,T,I]);const E=fe(),_=E?.loggedInUserRole!=null&&X(E.loggedInUserRole),B=Ce(D?.companyId,{clearParams:l&&m}),[N,G]=g.useState(!1),h=new URL(s("forecast_pandl"));h.searchParams.set("firstname",F?.firstName??""),h.searchParams.set("lastname",F?.lastName??""),h.searchParams.set("email",F?.userEmail??"");const L=t=>{G(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(pe,{analytics:w,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:N,handleDrawerToggle:L}),n.jsx(Ae,{firstMonthOfFY:q,tenantEmailDomain:c,forecastIdFromUrlPath:r,navigate:e,location:o,isPandLReportFetched:k,meetingUrl:Z(h.toString()),hasTransactionAccess:_,isAiCfoAccessEnabled:V,onAskAiCfoClick:$,initialOpenThreadRequest:B,onClickMenuIcon:()=>{L(!0)}})]})}function He(){const s=d((c=>v(c))),{useFeatureGate:e}=ge(),{isFeatureEnabled:a}=e(Fe.isDebitCardFeatureEnabled),o=ne(a,s),r=ce(s);return o===!0||r===!0?n.jsx(be,{}):n.jsxs(K,{children:[n.jsx(S,{path:"/",element:n.jsx(U,{})}),n.jsx(S,{path:"/:forecastId",element:n.jsx(U,{})}),n.jsx(S,{path:"/:forecastId/*",element:n.jsx(Ie,{})})]})}export{He as default};
@@ -1,22 +0,0 @@
1
- import{j as a}from"./liveblocks-CSh_vLcI.js";import{VC as re,fI as N,m2 as H,e0 as Y,d$ as le,St as J,U$ as ce,D2 as Pe,VD as q,CT as je,Dc as Le,D6 as de,CX as pe,Da as Te,D7 as ve,VE as ue,sw as Ve,g9 as Ae,gG as Fe,VF as _,C$ as me,C_ as ge,Df as Re,c9 as Oe}from"./zeni-epic-state-GGdMfKwk.js";import{a1 as fe,c as Q,g as G,z as W,h as Ce,X as he,af as be,az as ye,aA as Be,ab as Se,N as R,ag as De,G as K,aB as Ze,aq as Ue,as as $e,a8 as ze,m as we,T as _e,p as Ge,aC as He,W as We}from"./index-D-DXs1ug.js";import{D as xe,n as M,S as Ie}from"./mui-DxxQrDXb.js";import ae from"./NotFoundScreen-BEmDKBPw.js";import{a as c}from"./sentry-BbRn6Rps.js";import{u as ee,i as Ke,j as g,h as Me,g as Xe,l as qe,n as se,o as z}from"./core-BTRpO5kD.js";import{u as Ne}from"./useAskAiCfoHostNavButtonProps-B9dKaXC2.js";import{M as Ye}from"./MobileAppDrawer-C0d1iVMA.js";import"./recharts-TU-ixTpA.js";import"./analytics-Bwul-sh2.js";import"./plaid-BETTZw7O.js";import"./dnd-2ZjyQ0g9.js";import"./stripe-cKAAJElX.js";import"./lottie-CkDkDB9t.js";import"./lexical-B4Vx7iXM.js";import"./pdf-B5u-xbSo.js";import"./utils-CG6WKZWt.js";import"./InboxNotificationsProvider-RMyde6sE.js";import"./useTaskManagerAccess-DkfJ_Uxt.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]="6aba9210-11ca-4d27-9b5b-1a677cb75a1f",e._sentryDebugIdIdentifier="sentry-dbid-6aba9210-11ca-4d27-9b5b-1a677cb75a1f")}catch{}})();const Je={overlayWidth:new Se(100,100,48)},te=K.getLocalizedStrings().peoplePage.invitePage,ne=K.getLocalizedStrings().common,Qe=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:y})=>{const C=fe(),m=ee(),[O,B]=c.useState(!1),[k,S]=c.useState(!1),{userId:D}=Ke(),r=g((l=>re(l))),p=g((l=>N(l))),E=g((l=>H(l))),{useFeatureGate:x}=Q(),{isFeatureEnabled:I}=x(G.isDebitCardFeatureEnabled),P=Y(I,p),T=le(p),v=J(p),Z=ce(p),U=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,w=!P&&E&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(W.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const h=()=>{m(q()),y()},V=()=>{O===!0?S(!0):h()},$=d.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=x(G.isChargeCardFeatureEnabled),L=Ce(p,j,I),{isCardsHidden:A}=he(p?.tenantId),b=!L||A,F=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:v,isAccountingClassesEnabled:E,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:b,isTreasuryDisabled:F===!1,isLiteRoleDisabled:Z===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:T,onResetClick:h,onDeleteUser:l=>{m(pe(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(de({peopleLocalData:l})),B(!0)},onSaveClick:()=>{m(f==="zeni_only"?je(e):Le(v))},onCloseClick:V,isLoading:w||r.person==null},o={onOkClick:()=>{S(!1),h()},onCancelClick:()=>{S(!1)}};return c.useEffect((()=>{w===!1&&D!=null&&m(Pe(D))}),[w,D]),c.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&h()}),[r.updatePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:Je.overlayWidth.valuePercentage(C),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:be.overlayDark,cursor:"pointer"}}},onClose:V,children:a.jsxs(ea,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(ye,{titleComponent:a.jsx(ke,{children:te.discardTitle}),descriptionComponent:a.jsx(Ee,{children:te.discardDescription}),primaryButtonText:ne.yes,secondaryButtonText:ne.no,action:o,isEditPopup:!0}):null,a.jsx(Be,{...s})]})})},ea=M(Ie)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,ke=M(De.H6Regular)`
6
- margin-top: ${R.sp7};
7
- padding-left: ${R.sp8};
8
- padding-right: ${R.sp8};
9
- color: ${e=>e.theme.colors.primary};
10
- word-break: break-word;
11
- `,Ee=M(De.LargeRegularSp)`
12
- color: ${e=>e.theme.colors.hero};
13
- padding-left: ${R.sp8};
14
- padding-right: ${R.sp8};
15
- margin-bottom: 30px;
16
- margin-top: ${R.sp4};
17
- white-space: pre-line;
18
- `,aa={overlayWidth:new Se(100,100,48)},oe=K.getLocalizedStrings().peoplePage.invitePage,ie=K.getLocalizedStrings().common,sa=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:f,isInvitePeopleDrawerOpen:i,closeDrawerHandler:y})=>{const C=fe(),m=ee(),[O,B]=c.useState(!1),[k,S]=c.useState(!1),D=g((o=>re(o))),r=g((o=>N(o))),p=g((o=>H(o))),{useFeatureGate:E}=Q(),{isFeatureEnabled:x}=E(G.isDebitCardFeatureEnabled),I=Y(x,r),P=le(r),T=J(r),v=ce(r),Z=!!r.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,U=!I&&p&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(W.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const w=()=>{y(),m(q())},h=()=>{O===!0?S(!0):w()},V={onOkClick:()=>{S(!1),w()},onCancelClick:()=>{S(!1)}},$=d.companyView?.controllers.map((o=>o.user)),u=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=E(G.isChargeCardFeatureEnabled),L=Ce(r,j,x),{isCardsHidden:A}=he(r?.tenantId),b=!L||A,F=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:T,onPeopleLocalDataUpdated:o=>{m(de({peopleLocalData:o})),B(!0)},onResetClick:w,onSaveClick:()=>{m(f==="zeni_only"?Te(e):ve())},onCloseClick:h,peopleDetails:D,isAccountingClassesEnabled:p,isReimbursementDisabled:Z===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:b,isTreasuryDisabled:F===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:P,isLoading:U};return c.useEffect((()=>{D.invitePersonState.fetchState==="Completed"&&(y(),m(q()))}),[D.invitePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:aa.overlayWidth.valuePercentage(C),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:be.overlayDark,cursor:"pointer"}}},onClose:h,children:a.jsxs(ta,{onClick:o=>o.stopPropagation(),children:[k===!0?a.jsx(ye,{titleComponent:a.jsx(ke,{children:oe.discardTitle}),descriptionComponent:a.jsx(Ee,{children:oe.discardDescription}),primaryButtonText:ie.yes,secondaryButtonText:ie.no,action:V}):null,a.jsx(Ze,{...s})]})})},ta=M(Ie)`
19
- display: flex;
20
- min-height: 100%;
21
- flex-direction: column;
22
- `,na=qe((function(e,t){const d=ue(e),n=W.getSignedInUser();return{data:d,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:H(e),analytics:we}}),(function(e,t){const{navigate:d,companyId:n,shouldFetchClasses:f}=t;return{personAction:{onPersonDelete:(i,y)=>{e(pe(i,y))},onResendInvite:i=>{e(Re(i))},onReloadPeople:()=>{e(me()),e(ge(n,f))},onBackClick:()=>{d("../../")},onModeChange:i=>{e(_({mode:i,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:i=>{e(_({searchText:i}))}}}}))(He);function X({isInvitePeopleDrawerOpen:e,isEditPeopleDrawerOpen:t}){const d=Me(),n=ee(),f=Xe(),{areTenantIdsInSync:i}=Ue(),y=W.getSignedInUser(),C=g((s=>N(s))),{useFeatureGate:m}=Q(),{isFeatureEnabled:O}=m(G.isDebitCardFeatureEnabled),B=g((s=>H(s))),k=!Y(O,C)&&B,S=J(C),D=C?.tenantId,{tenantEmailDomain:r}=C,[p,E]=c.useState(!1),[x,I]=c.useState(!1),[P,T]=c.useState(!1),[v,Z]=c.useState("off"),[U,w]=c.useState(!1),h=s=>{w(s)},{isAiCfoAccessEnabled:V,onAskAiCfoClick:$}=Ne({mobileExploreReferrer:"People"}),u=g((s=>ue(s)));$e({isDataReady:u.fetchState==="Completed"});const j=g((s=>Ve(s.classState,s.classListState))),L=g((s=>Ae(s.userState,s.userRoleState,s.userListViewState,"manager"))),A=g((s=>Fe(s))),b=C?.companyId;c.useEffect((()=>{p&&v===u.uiState.mode||!i||(n(_({searchText:"",sortKey:"name",sortOrder:"ascending"})),Z(u.uiState.mode),E(!0),n(me()))}),[p,y,D,n,u.uiState.mode,i]),c.useEffect((()=>{b!=null&&i&&n(ge(b,k))}),[b,k,i]),c.useEffect((()=>{I(e!=null&&e===!0),T(t!=null&&t===!0&&t)}),[e,t]),c.useEffect((()=>{n(_({searchText:"",sortKey:"name",sortOrder:"ascending"}))}),[]);const F=()=>{I(!1),T(!1),d("../")};return a.jsxs(a.Fragment,{children:[u.fetchState==="Completed"?a.jsx(ze,{analytics:we,onLoad:s=>s.trackPageLoaded(_e.Event.members)}):null,x===!0?a.jsx(sa,{closeDrawerHandler:F,isInvitePeopleDrawerOpen:x,managersListView:L,companyPassportView:A,classListView:j,companyId:b,mode:u.uiState.mode}):null,P===!0?a.jsx(Qe,{closeDrawerHandler:F,isEditPeopleDrawerOpen:P,managersListView:L,companyPassportView:A,classListView:j,companyId:b,mode:u.uiState.mode}):null,a.jsx(Ye,{isAppContentDrawerOpen:U,handleDrawerToggle:h}),a.jsx(na,{navigate:d,signedInUser:y,isZeni:C.isZeni,isZeniTenant:S,peopleUIState:u.uiState,companyId:b,shouldFetchClasses:k,classList:j,managersView:L,peopleView:u,onInvitePeopleClick:()=>{d("./new")},onColumnSortConfigChanged:(s,o)=>{n(_({sortKey:s,sortOrder:o}))},onRowClick:s=>{const o=`/${r}/people/${encodeURIComponent(s)}/edit`,l=Ge(f.state?.pathnameStackToGoBack,f.pathname);d(o,{state:{pathnameStackToGoBack:l}})},onClickMenuIcon:()=>{h(!0)},isAiCfoAccessEnabled:V,onAskAiCfoClick:$})]})}function ka(){const e=We();return Oe(e?.loggedInUserRole??[])?a.jsxs(se,{children:[a.jsx(z,{path:"/",element:a.jsx(X,{})}),a.jsx(z,{path:"new",element:a.jsx(X,{isInvitePeopleDrawerOpen:!0})}),a.jsx(z,{path:":userId/edit",element:a.jsx(X,{isEditPeopleDrawerOpen:!0})}),a.jsx(z,{path:"*",element:a.jsx(ae,{})})]}):a.jsx(se,{children:a.jsx(z,{path:"*",element:a.jsx(ae,{})})})}export{ka as default};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-CSh_vLcI.js";import E from"./NotFoundScreen-BEmDKBPw.js";import{a as r}from"./sentry-BbRn6Rps.js";import{h as _,g as v,j as p,i as M,u as U,N as O,l as P,n as z,o as h}from"./core-BTRpO5kD.js";import{fI as N,a1e as b,bo as B,bn as F,iO as V,gk as $}from"./zeni-epic-state-GGdMfKwk.js";import{y as q,z as I,as as G,dN as H}from"./index-D-DXs1ug.js";import"./mui-DxxQrDXb.js";import{u as J}from"./useAskAiCfoHostNavButtonProps-B9dKaXC2.js";import{M as K}from"./MobileAppDrawer-C0d1iVMA.js";import"./recharts-TU-ixTpA.js";import"./analytics-Bwul-sh2.js";import"./plaid-BETTZw7O.js";import"./dnd-2ZjyQ0g9.js";import"./stripe-cKAAJElX.js";import"./lottie-CkDkDB9t.js";import"./lexical-B4Vx7iXM.js";import"./pdf-B5u-xbSo.js";import"./utils-CG6WKZWt.js";import"./InboxNotificationsProvider-RMyde6sE.js";import"./useTaskManagerAccess-DkfJ_Uxt.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]="558d18dd-3411-417b-86e5-cd687711d342",e._sentryDebugIdIdentifier="sentry-dbid-558d18dd-3411-417b-86e5-cd687711d342")}catch{}})();const L=P((function(e){const t=I.getSignedInUser(),d=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:d??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}}),(function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}}))(H),Q=()=>{const e=_(),t=v(),d=q(),o=p((a=>N(a))),{aggregatedReportViewState:n}=p((a=>b(a))),{tenantEmailDomain:u}=M(),g=U(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[w,S]=r.useState(!1),C=B(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,y=F(l),x=C||k||y,c=r.useCallback(((a,i,T)=>{g(V({fromMonth:a,toMonth:i,cacheOverride:T}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&m.current&&(g($({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)}),[n?.fetchState]);const D=r.useCallback(((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||c(a,i,!0),m.current=!0}),[n?.fetchState,c]),j=r.useCallback(((a,i)=>{c(a,i,!1)}),[c]),f=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=J({mobileExploreReferrer:"Performance"});return G({isDataReady:n?.fetchState==="Completed"}),x?s.jsxs(s.Fragment,{children:[s.jsx(K,{isAppContentDrawerOpen:w,handleDrawerToggle:f}),s.jsx(L,{navigate:e,location:t,themeState:d,currentTenant:o,signedInUser:l,tenantEmailDomain:u,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:f,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(O,{to:`/${u}/dashboard`,replace:!0})};function he(){return s.jsxs(z,{children:[s.jsx(h,{path:"*",element:s.jsx(Q,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{he as default};
@@ -1 +0,0 @@
1
- import{j as r}from"./liveblocks-CSh_vLcI.js";import Z from"./NotFoundScreen-BEmDKBPw.js";import{a as p}from"./sentry-BbRn6Rps.js";import{h as C,g as N,u as D,j as u,N as V,l as k,n as z,o as g}from"./core-BTRpO5kD.js";import{fI as E,Zj as h,ZB as w,NU as U,NQ as T,NT as f,NJ as B,Z_ as L,NN as J,NW as K}from"./zeni-epic-state-GGdMfKwk.js";import{z as $,w as W,ca as Q,s as _,bT as q,cb as F}from"./index-D-DXs1ug.js";import"./mui-DxxQrDXb.js";import{u as G,R as x}from"./ReimbursementApprovalRuleDetailScreen-Wh8YBERv.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="d263fb7c-ab3a-4bd0-aa07-45c4db693789",e._sentryDebugIdIdentifier="sentry-dbid-d263fb7c-ab3a-4bd0-aa07-45c4db693789")}catch{}})();const j="reimbursement-approval-rule-update",H=k((function(e){return{approvalView:h(e),remiSetupApproverViewUpdateData:w(e).remiSetupApproverViewUpdateData}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(j)&&e(L(!1))},onBackClick:()=>{_(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(B(t,!1))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))}}}))(W(Q)),M=({isLoading:e})=>{const s=C(),n=N(),a=D(),[t,l]=p.useState(!1),[v,R]=p.useState(!1),S=u((o=>o.remiSetupApproverViewState.fetchState)),c=u((o=>E(o))),d=u((o=>h(o))),b=u((o=>w(o).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{b?.updateStatus.fetchState==="Completed"&&a(U())}),[b]),p.useEffect((()=>{t||S!=="Not-Started"||e||(l(!0),a(T(!0,!1,!1,!1)))}),[t,S,e,a]),$.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{d.allApprovalRules.length===0&&d.fetchState==="Completed"&&(v||(R(!0),a(f())),s("./new"))}),[v,d,a]);const m={events:c.companyId!=null?[`private-encrypted-${c.companyId}.${j}`]:[],eventCallback:(o,y,I)=>{o.endsWith(j)&&I.onApprovalRulesEventReceived(o)}};return c?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(V,{to:"../../promo"}):r.jsx(H,{currentTenant:c,location:n,navigate:s,...m})},A="reimbursement-approval-rule-update",P=k((function(e){const s=h(e),n=w(e).remiSetupApproverViewUpdateData,a={};for(const l of Object.values(e.vendorState.vendorByID))l?.id!=null&&(a[l.id]=l.name);const t={};for(const l of Object.values(e.classState.classesByKey))l?.classId!=null&&(t[l.classId]=l.className);return{approvalView:s,remiSetupApproverViewUpdateData:n,vendorNamesById:a,departmentNamesById:t}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(A)&&e(L(!1))},onBackClick:()=>{_(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(B(t,!0))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))},onReorderRules:t=>{e(K(t,!0))}}}))(W(F)),X=()=>{const e=u((a=>E(a))),{isApprovalRulesV3Enabled:s,isLoading:n}=q(e?.tenantId);return s?r.jsx(Y,{isLoading:n}):r.jsx(M,{isLoading:n})},Y=({isLoading:e})=>{const s=C(),n=N(),a=D(),[t,l]=p.useState(!1),[v,R]=p.useState(!1),[S,c]=p.useState(!1),d=u((i=>i.remiSetupApproverViewState.fetchState)),b=u((i=>i.remiSetupApproverViewState.approverListState.fetchStatus.fetchState)),m=u((i=>E(i))),o=u((i=>h(i)));G();const y=u((i=>w(i).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{y?.updateStatus.fetchState==="Completed"&&a(U())}),[y]),p.useEffect((()=>{t||d!=="Not-Started"||e||(l(!0),a(T(!0,!1,!1,!0)))}),[t,d,e,a]),p.useEffect((()=>{v||b!=="Not-Started"||e||(R(!0),a(J(!1,!0)))}),[v,b,e,a]),$.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{o.allApprovalRules.length===0&&o.fetchState==="Completed"&&(S||(c(!0),a(f())),s("./new"))}),[S,o,a]);const I={events:m.companyId!=null?[`private-encrypted-${m.companyId}.${A}`]:[],eventCallback:(i,ee,O)=>{i.endsWith(A)&&O.onApprovalRulesEventReceived(i)}};return m?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(V,{to:"../../promo"}):r.jsx(P,{currentTenant:m,location:n,navigate:s,isLoading:e,...I})};function le(){return r.jsxs(z,{children:[r.jsx(g,{path:"/",element:r.jsx(X,{})}),r.jsx(g,{path:"/new",element:r.jsx(x,{})}),r.jsx(g,{path:"/:approvalRuleId/edit",element:r.jsx(x,{})}),r.jsx(g,{path:"*",element:r.jsx(Z,{})})]})}export{le as R};
@@ -1 +0,0 @@
1
- import{j as a}from"./liveblocks-CSh_vLcI.js";import{z as b,a8 as N,m as u,T as S,e2 as E,c as I,g as k}from"./index-D-DXs1ug.js";import"./mui-DxxQrDXb.js";import g from"./NotFoundScreen-BEmDKBPw.js";import{a as c}from"./sentry-BbRn6Rps.js";import{u as C,j as h,h as F,g as L,l as T,n as U,o as f,N as y}from"./core-BTRpO5kD.js";import{fI as _,a2d as w,a2e as p,DZ as P,q2 as V,a2f as q,DX as z}from"./zeni-epic-state-GGdMfKwk.js";import"./recharts-TU-ixTpA.js";import"./analytics-Bwul-sh2.js";import"./plaid-BETTZw7O.js";import"./dnd-2ZjyQ0g9.js";import"./stripe-cKAAJElX.js";import"./lottie-CkDkDB9t.js";import"./lexical-B4Vx7iXM.js";import"./pdf-B5u-xbSo.js";import"./utils-CG6WKZWt.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]="8b77e0fe-dbc7-4486-a44e-cebf386b314a",e._sentryDebugIdIdentifier="sentry-dbid-8b77e0fe-dbc7-4486-a44e-cebf386b314a")}catch{}})();const G=T((function(e,t){const n=w(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}}),(function(e,t){const{navigate:n}=t,i=b.getSignedInUser();return{onDismissClick:()=>{e(p()),n("/")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach((m=>{s.push(m.companyName),r.push(m.emailIds[0])})),u.trackInviteEmailClicked("send",s,r,s.length)}e(z())},onUpdateInviteFormLocalData:s=>{e(q({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&u.trackInviteEmailClicked("cancel")}}}))(E),R=()=>{const e=C(),[t,n]=c.useState(!1),[i,s]=c.useState(!1),r=h((o=>_(o))),m=F(),j=L(),d=b.getSignedInUser();if(d==null)throw Error("Can't access invite referral screen without signing in...");const l=h((o=>w(o))),x=d?.firstName!=null?d.firstName:"User";c.useEffect((()=>{e(p()),r?.rewardsLastViewedTime==null&&i===!1&&(e(P()),s(!0))}),[]),c.useEffect((()=>{t||l.fetchState!=="Not-Started"||(n(!0),e(V(!0)))}),[l.fetchState,e]);const D=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[l.fetchState==="Completed"?a.jsx(N,{analytics:u,onLoad:o=>(v=>v.trackPageLoaded(S.Event.inviteEmailViewed))(o)}):null,a.jsx(G,{navigate:m,location:j,currentTenant:r,companyName:D,userName:x,inviteFormCompayData:l.localData})]})};function ne(){const{useFeatureGate:e}=I(),{isFeatureEnabled:t}=e(k.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(f,{path:"/",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(f,{path:"how-it-works",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(f,{path:"refer/*",element:t?a.jsx(R,{}):a.jsx(g,{})}),a.jsx(f,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};