@zeniai/web-app-ui 5.3.69-qa → 5.3.70-qa

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/dist/assets/{AccountMappingScreen-_ej4z-IR.js → AccountMappingScreen-DqcX7eSX.js} +2 -2
  2. package/dist/assets/{ActualMatchingMatchDetailScreen-BSTuCiFK.js → ActualMatchingMatchDetailScreen-YIiKaKQ5.js} +1 -1
  3. package/dist/assets/AddressRoutes-BQwEhrxO.js +1 -0
  4. package/dist/assets/{AddressScreen--Jfrmx_9.js → AddressScreen-i3P2ph6T.js} +2 -2
  5. package/dist/assets/AiCfoScreen-BssUSHKh.js +22 -0
  6. package/dist/assets/{AppDrawer-DNmwo9UW.js → AppDrawer-Dql_QZ37.js} +1 -1
  7. package/dist/assets/{BillPayApprovalRoutes-DGYCNZA8.js → BillPayApprovalRoutes-BCU4pCRz.js} +1 -1
  8. package/dist/assets/{BillPayRoutes-CjVYIUwf.js → BillPayRoutes-7r9rU7sl.js} +18 -18
  9. package/dist/assets/{BusinessVerificationPageScreen-BCj56xYx.js → BusinessVerificationPageScreen-BtYE51TA.js} +2 -2
  10. package/dist/assets/{CardsAiCfoScreen-CQF7LKPV.js → CardsAiCfoScreen-C4xeVeSy.js} +1 -1
  11. package/dist/assets/{ChargeCardRoutes-D6qT0B9p.js → ChargeCardRoutes-BKebJlhL.js} +1 -1
  12. package/dist/assets/CompanyPassportScreen-BTV6sqcv.js +1 -0
  13. package/dist/assets/ConnectionAuthScreen-CxytsIZE.js +11 -0
  14. package/dist/assets/CustomerOnboardingAuthScreen-BihvMY31.js +1 -0
  15. package/dist/assets/CustomerOnboardingRoutes-DNk5fzPY.js +30 -0
  16. package/dist/assets/{DashboardRoutes-WoUbyotK.js → DashboardRoutes-D-v8IdFM.js} +4 -4
  17. package/dist/assets/{DefaultTenantHome-Nt1b5wse.js → DefaultTenantHome-Ctr8hbVg.js} +1 -1
  18. package/dist/assets/DomesticWireDetailScreen-BhmYhgk9.js +18 -0
  19. package/dist/assets/{DrawerScreen-0K7kuSzC.js → DrawerScreen-CiI0UwZ_.js} +1 -1
  20. package/dist/assets/EntityDetailRoutes-DvFtuOf8.js +1 -0
  21. package/dist/assets/{ExpenseAutomationRoutes-BiJEeP3A.js → ExpenseAutomationRoutes-gNYcLYcp.js} +7 -7
  22. package/dist/assets/{FeaturePreviewScreen-CtNAe1_H.js → FeaturePreviewScreen-DiNAV9z-.js} +1 -1
  23. package/dist/assets/HubSpotOAuthCallbackScreen-DweVccIt.js +1 -0
  24. package/dist/assets/{InboxNotificationsProvider-D6GwXgCp.js → InboxNotificationsProvider-RMyde6sE.js} +1 -1
  25. package/dist/assets/{InvoicingRoutes-Dt22Vt58.js → InvoicingRoutes-OgCHCVmr.js} +2 -2
  26. package/dist/assets/MagicLinkRoutes-BwkRRCJu.js +72 -0
  27. package/dist/assets/MagicLinkSignInScreen-wnNTguw6.js +12 -0
  28. package/dist/assets/{MobileAppDrawer-BrOHAjwP.js → MobileAppDrawer-C0d1iVMA.js} +1 -1
  29. package/dist/assets/NotFoundScreen-BEmDKBPw.js +1 -0
  30. package/dist/assets/NotificationRoutes-CI7va7e0.js +1 -0
  31. package/dist/assets/OAuthConsentScreen-DV8WsAVC.js +1 -0
  32. package/dist/assets/{PandLWithForecastRoutes-Bh5hYQzx.js → PandLWithForecastRoutes-B1Gfn6ud.js} +1 -1
  33. package/dist/assets/{PaymentLinkScreen-CMriKz_8.js → PaymentLinkScreen-CUXZafMx.js} +1 -1
  34. package/dist/assets/PeopleRoutes-Bn8rhJs3.js +22 -0
  35. package/dist/assets/PerformanceRoutes-CvtwCDup.js +1 -0
  36. package/dist/assets/{Preview-CCdAPHVf.js → Preview-CHfSVeda.js} +1 -1
  37. package/dist/assets/{QBOConnectionScreen-CzL0viYI.js → QBOConnectionScreen-2QWv8Ryp.js} +1 -1
  38. package/dist/assets/ReimbursementApprovalRoutes-EobIM3L1.js +1 -0
  39. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DsMDfZXO.js → ReimbursementApprovalRuleDetailScreen-Wh8YBERv.js} +1 -1
  40. package/dist/assets/{ReimbursementRoutes-BA1_AB5H.js → ReimbursementRoutes-Cn40tr84.js} +4 -4
  41. package/dist/assets/{ReportsRoutes-ZTT__qgG.js → ReportsRoutes-DnLayxiF.js} +1 -1
  42. package/dist/assets/RewardsRoutes-xdDqPM6d.js +1 -0
  43. package/dist/assets/ScheduleDetailsPrepaidExpensesScreen-CwSWMHf6.js +33 -0
  44. package/dist/assets/ScreenRoutes-B8Lww7Hb.js +2 -0
  45. package/dist/assets/{SettingsRoutes-BUmZV8nU.js → SettingsRoutes-C253rFo8.js} +1 -1
  46. package/dist/assets/{SetupPagesScreen-BzFDkOVI.js → SetupPagesScreen-K8aynBOv.js} +5 -5
  47. package/dist/assets/{SignInScreen-DRFey9on.js → SignInScreen-B673IWUl.js} +1 -1
  48. package/dist/assets/SignOutScreen-BY00T1e6.js +9 -0
  49. package/dist/assets/{TaskListScreen-CxhPrz3Y.js → TaskListScreen-DqA1P3PO.js} +2 -2
  50. package/dist/assets/TaskRoutes-BXCCg41Z.js +9 -0
  51. package/dist/assets/TransactionDetailRoutes-fr5aBjbx.js +1 -0
  52. package/dist/assets/{TransactionDetailScreen-BG6zUFU-.js → TransactionDetailScreen-ZbhuUtai.js} +2 -2
  53. package/dist/assets/TransactionListRoutes-skEyucsa.js +1 -0
  54. package/dist/assets/{TreasuryRoutes-U7YfCj52.js → TreasuryRoutes-DULHfT4a.js} +5 -5
  55. package/dist/assets/{VendorsRoutes-B66p2onP.js → VendorsRoutes-DDjSbdmH.js} +10 -10
  56. package/dist/assets/WiseConfirmationScreen-BeEAkT2z.js +12 -0
  57. package/dist/assets/{ZeniAccountRoutes-DRW5DlBI.js → ZeniAccountRoutes-ZpQZTXfH.js} +10 -10
  58. package/dist/assets/ZeniAccountStatementScreen-fYBBQyBB.js +9 -0
  59. package/dist/assets/{accountMappingHelper-D-qmKFUw.js → accountMappingHelper-CDXfdGYB.js} +1 -1
  60. package/dist/assets/{analytics-C6U4wpfB.js → analytics-Bwul-sh2.js} +1 -1
  61. package/dist/assets/{analyticsHelper-DdV5jqT5.js → analyticsHelper-CJXbjLla.js} +1 -1
  62. package/dist/assets/{core-Dk5JD2l2.js → core-BTRpO5kD.js} +1 -1
  63. package/dist/assets/{decodeURIComponentSafe-NBY1IhYb.js → decodeURIComponentSafe-gQrUmSgy.js} +1 -1
  64. package/dist/assets/{dnd-CSZKLHxv.js → dnd-2ZjyQ0g9.js} +1 -1
  65. package/dist/assets/{empty-CDCQLT9Y.js → empty-Cb7Nu9Hh.js} +1 -1
  66. package/dist/assets/{empty-D0msLZIr.js → empty-W69oI4tU.js} +1 -1
  67. package/dist/assets/{emptyVideoElement-EOYyzQLg.js → emptyVideoElement-BykFTq6U.js} +1 -1
  68. package/dist/assets/epic-dVflju6K.js +2 -0
  69. package/dist/assets/expenseAutomationHelper-D83VUSa4.js +1 -0
  70. package/dist/assets/{getLocaleForTenant-C8sqw5jB.js → getLocaleForTenant-COzbHLDP.js} +1 -1
  71. package/dist/assets/{index-Cr97VFCj.js → index-BNStHB6B.js} +1 -1
  72. package/dist/assets/{index-B_zuMfAK.js → index-BpHR89qw.js} +1 -1
  73. package/dist/assets/{index-CTXzqHUs.js → index-CyWlZL1X.js} +2 -2
  74. package/dist/assets/{index-uoDX7H4L.js → index-D-DXs1ug.js} +15939 -15922
  75. package/dist/assets/{index-BFxiz-4U.js → index-Ds59pPsN.js} +1 -1
  76. package/dist/assets/{index-B_rhGKNa.js → index-Dt8qJC5s.js} +1 -1
  77. package/dist/assets/{index-BzY7ptmA.js → index-EIrua76A.js} +1 -1
  78. package/dist/assets/{index-Cos3hzZM.js → index-O5NQ6O4f.js} +1 -1
  79. package/dist/assets/{lexical-BtWXzxnq.js → lexical-B4Vx7iXM.js} +1 -1
  80. package/dist/assets/{liveblocks-DtuUpF5h.js → liveblocks-CSh_vLcI.js} +1 -1
  81. package/dist/assets/{lottie-BlG_vWSt.js → lottie-CkDkDB9t.js} +1 -1
  82. package/dist/assets/{mui-DAOUhz91.js → mui-DxxQrDXb.js} +1 -1
  83. package/dist/assets/{pathToGoBack-CcxULKW_.js → pathToGoBack-CVTu70jh.js} +1 -1
  84. package/dist/assets/{pdf-iocWnEuY.js → pdf-B5u-xbSo.js} +3 -3
  85. package/dist/assets/{pdf-lib-BLLTrAOR.js → pdf-lib-reHt5MEc.js} +1 -1
  86. package/dist/assets/{plaid-DBHSfOGH.js → plaid-BETTZw7O.js} +1 -1
  87. package/dist/assets/{pusher-3cjBHlw_.js → pusher-Ckps79Gu.js} +1 -1
  88. package/dist/assets/{react-DLzgi1In.js → react-2QuTt-Yq.js} +1 -1
  89. package/dist/assets/{react-vdYrKzLj.js → react-BEHSpArB.js} +1 -1
  90. package/dist/assets/{react-BTlfsyLA.js → react-BwbSXuKk.js} +1 -1
  91. package/dist/assets/{react-DzzhDNXC.js → react-CnCpDB3_.js} +1 -1
  92. package/dist/assets/{react-CNVeotaZ.js → react-D5AIOkBV.js} +1 -1
  93. package/dist/assets/{react-D62BIM3q.js → react-DAYatQOH.js} +1 -1
  94. package/dist/assets/{recharts-BMD3jyO6.js → recharts-TU-ixTpA.js} +1 -1
  95. package/dist/assets/{routePaths-DzLOO7Om.js → routePaths-BpwABclb.js} +1 -1
  96. package/dist/assets/{sentry-BWDuLt7o.js → sentry-BbRn6Rps.js} +1 -1
  97. package/dist/assets/{stripSplatSuffix-KkY0P5Vm.js → stripSplatSuffix-CHEOIiL-.js} +1 -1
  98. package/dist/assets/{url-CCl9sM9J.js → url-COMcQU2v.js} +1 -1
  99. package/dist/assets/{url-YYqHrm-X.js → url-DFeqMB02.js} +1 -1
  100. package/dist/assets/{useActualMatchingMatchDetail-CM9S8AAl.js → useActualMatchingMatchDetail-CCjKruLV.js} +1 -1
  101. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-BNl2X51l.js → useAiCfoDashboardSuggestedQuestionsChips-BeQw4E92.js} +1 -1
  102. package/dist/assets/useAskAiCfoHostNavButtonProps-B9dKaXC2.js +1 -0
  103. package/dist/assets/{useChargeCardPusherEvents-4gxE-aSe.js → useChargeCardPusherEvents-6cwlQnL1.js} +1 -1
  104. package/dist/assets/{useDeviceId-BRjUTxWs.js → useDeviceId-BNqfuCC6.js} +1 -1
  105. package/dist/assets/{useEmailConnectResultRefresh-B85Z7XsM.js → useEmailConnectResultRefresh-CD4x3asD.js} +1 -1
  106. package/dist/assets/{useInitialThreadRequest-DGvbt9bY.js → useInitialThreadRequest-CVcZLc8x.js} +1 -1
  107. package/dist/assets/{useTaskManagerAccess-OjN4ZWFp.js → useTaskManagerAccess-DkfJ_Uxt.js} +1 -1
  108. package/dist/assets/{useTaskManagerPusherEvents-BDQMuf8L.js → useTaskManagerPusherEvents-QjRM_WrB.js} +1 -1
  109. package/dist/assets/{utils-CWVNtCN5.js → utils-CG6WKZWt.js} +1 -1
  110. package/dist/assets/{withTransactionSidePanel-MoXr5b9J.js → withTransactionSidePanel-_2doqhuK.js} +5 -5
  111. package/dist/assets/{zeni-epic-state-BtP47QJT.js → zeni-epic-state-GGdMfKwk.js} +6 -6
  112. package/dist/index.html +1 -1
  113. package/package.json +3 -3
  114. package/dist/assets/AddressRoutes-C517WDi1.js +0 -1
  115. package/dist/assets/AiCfoScreen-BNc_vpRn.js +0 -22
  116. package/dist/assets/CompanyPassportScreen-SOXe4P3g.js +0 -1
  117. package/dist/assets/ConnectionAuthScreen-Czc08mTJ.js +0 -11
  118. package/dist/assets/CustomerOnboardingAuthScreen-DHWDR-Cl.js +0 -1
  119. package/dist/assets/CustomerOnboardingRoutes-ByIsWpfM.js +0 -30
  120. package/dist/assets/DomesticWireDetailScreen-BmflEZ_q.js +0 -18
  121. package/dist/assets/EntityDetailRoutes-CePCCMqT.js +0 -1
  122. package/dist/assets/HubSpotOAuthCallbackScreen-DDXKwaXx.js +0 -1
  123. package/dist/assets/MagicLinkRoutes-DlZzQsp9.js +0 -72
  124. package/dist/assets/MagicLinkSignInScreen-_mXKvM1u.js +0 -12
  125. package/dist/assets/NotFoundScreen-CyVGP3Vp.js +0 -1
  126. package/dist/assets/NotificationRoutes-Cmigr5ed.js +0 -1
  127. package/dist/assets/OAuthConsentScreen-CLk1l_3O.js +0 -1
  128. package/dist/assets/PeopleRoutes-sCx80LTz.js +0 -22
  129. package/dist/assets/PerformanceRoutes-C99Rjk0q.js +0 -1
  130. package/dist/assets/ReimbursementApprovalRoutes-D9FySrGh.js +0 -1
  131. package/dist/assets/RewardsRoutes-tAzEgpq8.js +0 -1
  132. package/dist/assets/ScheduleDetailsPrepaidExpensesScreen-kyZJN89C.js +0 -33
  133. package/dist/assets/ScreenRoutes-C4-I9-wk.js +0 -2
  134. package/dist/assets/SignOutScreen-D2m0H2Zh.js +0 -9
  135. package/dist/assets/TaskRoutes-C0SyfIZR.js +0 -9
  136. package/dist/assets/TransactionDetailRoutes-BeM7Nvfr.js +0 -1
  137. package/dist/assets/TransactionListRoutes-CnM0i_qu.js +0 -1
  138. package/dist/assets/WiseConfirmationScreen-CJytbhsa.js +0 -12
  139. package/dist/assets/ZeniAccountStatementScreen-B-cwN_qc.js +0 -9
  140. package/dist/assets/epic-BwpjzDGA.js +0 -2
  141. package/dist/assets/expenseAutomationHelper-BwdyIQYD.js +0 -1
  142. package/dist/assets/useAskAiCfoHostNavButtonProps-CsMZr2YE.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-uoDX7H4L.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-BWDuLt7o.js"><link rel="modulepreload" crossorigin href="/assets/core-Dk5JD2l2.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-BtP47QJT.js"><link rel="modulepreload" crossorigin href="/assets/mui-DAOUhz91.js"><link rel="modulepreload" crossorigin href="/assets/analytics-C6U4wpfB.js"><link rel="modulepreload" crossorigin href="/assets/utils-CWVNtCN5.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-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>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/web-app-ui",
3
- "version": "5.3.69-qa",
3
+ "version": "5.3.70-qa",
4
4
  "files": [
5
5
  "dist/**/*"
6
6
  ],
@@ -29,8 +29,8 @@
29
29
  "@sentry/react": "^9.42.1",
30
30
  "@stripe/stripe-js": "^4.4.0",
31
31
  "@zeniai/client-analytics": "2.0.96",
32
- "@zeniai/client-epic-state": "5.2.67",
33
- "@zeniai/web-components": "4.4.8",
32
+ "@zeniai/client-epic-state": "5.2.69",
33
+ "@zeniai/web-components": "4.4.9",
34
34
  "color": "3.1.3",
35
35
  "crypto-js": "4.2.0",
36
36
  "dnd-core": "^16.0.1",
@@ -1 +0,0 @@
1
- import{j as e}from"./liveblocks-DtuUpF5h.js";import{A as i}from"./AddressScreen--Jfrmx_9.js";import s from"./NotFoundScreen-CyVGP3Vp.js";import"./sentry-BWDuLt7o.js";import{n as d,o as r}from"./core-Dk5JD2l2.js";import"./zeni-epic-state-BtP47QJT.js";import"./recharts-BMD3jyO6.js";import"./index-uoDX7H4L.js";import"./mui-DAOUhz91.js";import"./analytics-C6U4wpfB.js";import"./plaid-DBHSfOGH.js";import"./dnd-CSZKLHxv.js";import"./stripe-cKAAJElX.js";import"./lottie-BlG_vWSt.js";import"./lexical-BtWXzxnq.js";import"./pdf-iocWnEuY.js";import"./utils-CWVNtCN5.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-DtuUpF5h.js";import{a as n}from"./sentry-BWDuLt7o.js";import{u as Qt,h as Ut,i as Lt,g as Bt,j as b,l as Ft}from"./core-Dk5JD2l2.js";import{a as Mt,J as Vt,e6 as $t,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 Je,a4 as ge,a8 as ce,m as M,ec as me,ed as Jt,ee as Yt,au as Xt,V as Kt,w as Zt,ef as es,eg as ts,av as ss,eh as ns,ei as as,ej as os,ek as is,p as rs,bk as Fe,el as ls}from"./index-uoDX7H4L.js";import{fH as F,gw as R,Ui as us,a2w as ds,a2x as cs,jP as ms,a2y as Ss,jM as hs,a2z as Se,js as W,jV as J,jy as Ie,jf as he,jd as ps,jX as fs,jH as Ye,Ur as Me,gy as V,gN as gs,Uq as Is,Ub as Ve,fI as Cs,j6 as ks,a2A as bs,gb as vs,jo as Es,jk as Ps,fJ as pe,gi as ys,a2B as ws,a2C as xs,a2D as Rs,gx as Ts,gr as $e,k7 as Ne,gt as He,gz as js,a2E 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-BtP47QJT.js";import{D as Fs,n as $,S as Ms,P as Vs}from"./mui-DAOUhz91.js";import{u as $s}from"./useAiCfoDashboardSuggestedQuestionsChips-BNl2X51l.js";import{p as Ns}from"./pathToGoBack-CcxULKW_.js";import{j as Hs}from"./routePaths-DzLOO7Om.js";import{u as Gs}from"./useTaskManagerPusherEvents-BDQMuf8L.js";import"./recharts-BMD3jyO6.js";import"./analytics-C6U4wpfB.js";import"./plaid-DBHSfOGH.js";import"./dnd-CSZKLHxv.js";import"./stripe-cKAAJElX.js";import"./lottie-BlG_vWSt.js";import"./lexical-BtWXzxnq.js";import"./pdf-iocWnEuY.js";import"./utils-CWVNtCN5.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]="24bd6a09-1861-4818-994b-e76eac733ef7",s._sentryDebugIdIdentifier="sentry-dbid-24bd6a09-1861-4818-994b-e76eac733ef7")}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:J(s).detail,skillDetailError:J(s).fetchState==="Error",skillDetailLoading:J(s).fetchState==="In-Progress",syntheticAnswers:i,resolveSyntheticAnswerCardTile:as(s),resolveSyntheticAnswerPolicyTile:ns(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:(a,o)=>{if(a===Xe&&typeof o.text=="string"&&typeof o.metadata=="object"){const m=o,E=Qs(m.type),v=m.metadata.chat_session_id??null,{currentChatSession:Y,currentQuestionAnswer:j,currentQuestionAnswerSummary:X}=Je(p,v);E!=="answer"?M.trackAICFOChatResponseGenerated(E,j?.question.questionText??"",m.text,v,ls(X,Y),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:(a,o,m,E,v)=>{a&&Fe(s,a,o,f,p,c,E,m,void 0,v)},onFetchSkills:()=>{s(Ye())},onOpenSkill:a=>{s(Ie({macroId:a})),s(Ds({macroId:a}))},onSaveSkill:(a,o)=>{s(qe({draft:a,macroId:o}))},onSaveSkillDraft:a=>{const o=a.displayName?.trim()??"",m=a.name?.trim()??"";s(qe({draft:{name:o.length>0?o:m,description:a.description?.trim()??null,instructions:a.instructions,visibility:"private"}}))},onFetchSkillVersionBody:(a,o)=>{s(_s({macroId:a,version:o}))},onDeleteSkill:a=>{s(Os({macroId:a}))},onSetSkillVisibility:(a,o)=>{s(As({macroId:a,visibility:o}))},onCloseSkillDetail:()=>{s(Ge())},onRunSkill:(a,o)=>{s(V()),s($e()),Fe(s,o,"user_input",void 0,p,c,void 0,void 0,void 0,a),s(Ge())},updateCurrentInput:a=>{s(He(a))},onStopSubmit:()=>{},onUpdateScrollYOffset:a=>{s(js(a))},onSelectSampleQuestion:()=>{},onBackClick:()=>{i(-1)},onCloseClick:()=>{const a=ge(t.state?.pathnameStackToGoBack),o=a.poppedPathname??Ns(1);i(o,{state:{...t.state,pathnameStackToGoBack:a.newStack}}),s(He(""))},togglePageView:()=>{const a=ge(t.state?.pathnameStackToGoBack),o=a.poppedPathname??`/${l.tenantEmailDomain}/dashboard`;i(o,{state:{...We(t.state),pathnameStackToGoBack:a.newStack,message:"open_ai_cfo_drawer"}}),U(!0)},onCopy:()=>{},onThumbsUp:(a,o)=>{f!=null&&o?.messageId!=null&&s(Ne(f,o.messageId,"positive",o.questionText,o.answerText))},onThumbsDown:(a,o)=>{f!=null&&o?.messageId!=null&&s(Ne(f,o.messageId,"negative",o.questionText,o.answerText))},onTogglePageView:()=>{i(-1)},onNewChatClick:()=>{s(V()),f!=null&&s($e());const a=rs(t.state?.pathnameStackToGoBack,t.pathname);i(`/${l.tenantEmailDomain}/ai-cfo/new_chat`,{state:{pathnameStackToGoBack:a.slice(0,-1),referrer:"Sidebar"}})},onToggleCotCollapsed:(a,o)=>{s(Ts({questionAnswerId:a,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)),Cn=({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]=n.useState(!1),O=b((e=>F(e).uiState.isSkillsBrowserOpen===!0)),U=b((e=>R(e).skillsEnabled)),T=b((e=>F(e).uiState.isRoutinesBrowserOpen===!0)),a=b((e=>us(e))),o=b((e=>ds(e))),m=b((e=>cs(e))),[E,v]=n.useState(void 0),[Y,j]=n.useState(!1),[X,Ce]=n.useState(void 0),Ke=n.useCallback((()=>{Ce(void 0),v(void 0),j(!0)}),[]),Ze=n.useCallback((e=>{v(e),j(!0)}),[]),et=n.useCallback((()=>{v(void 0),j(!1)}),[]),tt=n.useCallback((e=>{t(ms({draft:e,...E!=null&&{scheduleId:E.scheduleId}})),v(void 0),j(!1)}),[t,E]),P=f,ke=a.routines.find((e=>e.scheduleId===P)),I=b((e=>Ss(e))),st=n.useCallback((e=>{t(hs({scheduleId:e.scheduleId}))}),[t]);n.useEffect((()=>{t(P!=null?W({scheduleId:P}):Se())}),[t,P]);const B=ke?.macroId,nt=b((e=>J(e))),be=B!=null&&B!==""&&nt.fetchState==="Not-Started";n.useEffect((()=>{be&&B!=null&&t(Ie({macroId:B}))}),[t,be,B]);const at=b((e=>F(e).uiState.currentChatSessionId))??c,C=a.routines.find((e=>e.scheduleId===f))??a.routines.find((e=>e.scheduleId===Vt(at))),A=C?.scheduleId??null,[ve,ot]=n.useState(!0);n.useEffect((()=>{A!=null&&t(W({scheduleId:A}))}),[t,A]);const Ee=I.runs.some((e=>e.status==="claimed"||e.status==="running"))===!0;n.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=n.useCallback((e=>{Ce(e),v(void 0),j(!0)}),[]),rt=n.useCallback((e=>{t(ps({scheduleId:e.scheduleId}))}),[t]),lt=n.useCallback(((e,d)=>{t(fs({enabled:d,scheduleId:e.scheduleId}))}),[t]);n.useEffect((()=>{T&&t(he())}),[t,T]);const Pe=b((e=>R(e).skills)),K=n.useMemo((()=>Pe.map((e=>({macroId:e.macroId,name:e.displayName??e.name})))),[Pe]),ut=n.useCallback((e=>{t(Ie({macroId:e}))}),[t]),Z=n.useCallback((()=>{t(Ye()),t(Me())}),[t]),dt=n.useCallback((()=>{t(V())}),[t]),{allUsers:ct,isAiCardCreationEnabled:mt,isCardPolicyEnabled:St,onCardPolicyVendorSearchTextChange:ht}=$t();n.useEffect((()=>{t(gs())}),[t]);const g=b((e=>F(e))),w=Nt.getSignedInUser();n.useEffect((()=>c==="routines"?(t(V()),void t(Is())):c==="skills"?(t(Se()),t(Ve()),void t(Me())):(A==null&&t(Se()),t(Ve()),void t(V()))),[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=n.useCallback((e=>{L&&l(`/${y}/ai-cfo/routines?routine=${encodeURIComponent(e.scheduleId)}`)}),[L,l,y]),te=n.useCallback((()=>{L&&l(`/${y}/ai-cfo/routines`)}),[L,l,y]),se=n.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=n.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}),ne=zt({currentTenant:k,currentChatSessionId:u,aiCfoView:g,skillsEnabled:U,onCloseSkills:dt,onOpenSkills:Z}),{isSuggestedQuestionsLoading:Ct,suggestedPromptQuestions:kt}=$s(),N=i.state,H=N?.aiCfoInitialQuestion,ye=!!N?.aiCfoShouldSubmit;n.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,ae]=n.useState(null),[vt,oe]=n.useState(!1),[Et,ie]=n.useState(void 0),[Pt,re]=n.useState(void 0),we=n.useRef(!1);n.useEffect((()=>{if(!we.current&&H!=null&&H!==""){const e=i.state;ae(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=n.useCallback((()=>{ae(null),oe(!1),ie(void 0),re(void 0),l(i.pathname,{replace:!0,state:We(i.state)})}),[i.pathname,i.state,l]),xe=n.useMemo((()=>new URLSearchParams(i.search)),[i.search]),Re=xe.get("ref")??N?.aiCfoRef,le=xe.get("emailRefId")??N?.aiCfoEmailRefId,Te=n.useRef(!1);n.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;n.useEffect((()=>{G!=null&&G!==""&&u!=null&&(ae(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}=Je(_e,u),Rt=xt.length===0;n.useEffect((()=>{x||_||l("../dashboard",{state:{...i.state,message:"open_ai_cfo_drawer"}})}),[x,_,l,i.state]);const Tt=n.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=n.useRef(void 0),Qe=n.useRef(void 0);n.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=n.useMemo((()=>({events:je.map((e=>`private-encrypted-chat-${e}.${Xe}`)),eventCallback:(e,d,D)=>D.onEventReceived(e,d)})),[je]);n.useEffect((()=>{q!=="In-Progress"&&z&&t(Es())}),[q,z,t]),n.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=n.useMemo((()=>{return ue==null?[]:[(e=ue,`private-encrypted-routines-${e}.routine-run-updated`)];var e}),[ue]),Ue=n.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(Ys,{children:[h.jsx(ce,{analytics:M,onLoad:Le}),ne.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(Js,{children:[h.jsx(ce,{analytics:M,onLoad:e=>e.trackPageLoaded(Kt.Event.aiCFOPage)}),_&&ne.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:_?ne.open:void 0,isFileUploadEnabled:s,isUploadPromoVisible:It,onUploadPromoClose:gt,exploreSuggestedPromptQuestions:kt,exploreSuggestedPromptQuestionsLoading:Ct,isSkillsOpen:O,isRoutinesOpen:T,routineCanCreate:m,routineEditing:E,routineEditorOpen:Y,routineListError:a.fetchState==="Error",routineListLoading:a.fetchState==="In-Progress",routineMaxRoutines:a.maxRoutines,routineSaveError:o.fetchState==="Error",routineSaving:o.fetchState==="In-Progress",routineSchedulableSkills:K,routines:a.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(Jt,{open:p,onClose:()=>S(!1),children:h.jsx(Yt,{children:_t})}):null]})},ze=$(Ms)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,Js=$.div`
6
- height: 100vh;
7
- width: 100%;
8
- `,Ys=$.div`
9
- height: 100vh;
10
- width: 100%;
11
- display: flex;
12
- flex-direction: column;
13
- min-height: 0;
14
- `,Xs=$.div`
15
- flex: 1;
16
- min-height: 0;
17
- display: flex;
18
- flex-direction: column;
19
- `,Ks=$(Vs)`
20
- box-shadow: ${({theme:s})=>s.colors.elevation2};
21
- color: ${({theme:s})=>s.colors.grey4};
22
- `;export{Cn as default};
@@ -1 +0,0 @@
1
- import{j as m}from"./liveblocks-DtuUpF5h.js";import{a as g}from"./sentry-BWDuLt7o.js";import{h as w,u as x,g as T,i as k,j as O,l as E}from"./core-Dk5JD2l2.js";import{z as N,bs as F,a8 as P,m as V,V as L,s as b,bt as j,ae as A,aG as M,p as U}from"./index-uoDX7H4L.js";import{fI as D,gL as B,BM as G,gG as R,c9 as _,Ys as Y,bn as z,v1 as H,uR as Z,mC as $,ob as S,Yt as q,bF as J,cF as C,om as K,ow as Q}from"./zeni-epic-state-BtP47QJT.js";import"./mui-DAOUhz91.js";import{d as W}from"./routePaths-DzLOO7Om.js";import{M as X}from"./MobileAppDrawer-BrOHAjwP.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="d9431558-e3b8-4742-8e94-6cd3f09d132b",n._sentryDebugIdIdentifier="sentry-dbid-d9431558-e3b8-4742-8e94-6cd3f09d132b")}catch{}})();const ee=E((function(n){const a=R(n),i=N.getSignedInUser(),p=D(n),c=p.tenantId,l={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=_(p?.userRole??[])&&a.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=Y(n.companyConfigState),t=n.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:a.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:a,allIndustries:e.companyIndustries??[],allNationalityCountries:t,isDisabled:f,authParams:l,filesEndPoint:`${A.fileMicroServiceBaseUrl}`,isZeniUser:z(i)}}),(function(n,a){const{companyId:i,currentTenant:p,navigate:c,location:l}=a,{tenantEmailDomain:f}=p;return{onScheduleClick:e=>{let t=e.href;t.includes("http")||(t="https://".concat(t)),window.open(t,"_blank")},onSaveAll:()=>{n(Q())},onAddressClick:e=>{const t=W(f,e),o=U(l.state?.pathnameStackToGoBack,l.pathname);c(t,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{n(K({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:t,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:u}=t,{meetingLink:y}=d,{incDate:s}=o,{taxesFiledYears:h}=r,v={companyInfo:{...t,website:u!=""&&u!=null?C(u):void 0,meetingLink:y!=""&&y!=null?C(y):void 0,industry:t.industry.selectedOption,companyIndustryType:t.companyIndustryType?.selectedOption??void 0,companySubIndustry:t.companySubIndustry?.selectedOption??void 0,businessModel:t.businessModel.selectedOption??"",companySourceOfFunds:t.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:t.companySourceOfFundsDescription??void 0,countriesOfOperations:t.countriesOfOperations?.selectedOptions?.map((I=>I.length===2?I:M(I)))??[],transactionVolume:t.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:t.transactionVolumeDescription??void 0,regulatedStatus:t.regulatedStatus??void 0,regulatedStatusDescription:t.regulatedStatusDescription??void 0,usNexus:t.usNexus??void 0,usNexusTypes:t.usNexusTypes?.selectedOptions??[],purposeOfAccount:t.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:t.purposeOfAccountDescription??void 0},incInfo:{typeOfInc:o.typeOfInc.selectedOption??"",stateOfInc:o.stateOfInc.selectedOption??"",incDate:s!=null?J(s?.toString()):s,fileId:o.fileIds[0]},taxDetails:{taxIdOrEIN:r.taxIdOrEIN,sicCode:r.sicCode,naicsCode:r.naicsCode,dunsNumber:r.dunsNumber,taxesFiledYears:h.selectedOptions.map((I=>parseInt(I))),fileId:r.fileIds[0]}};n(S({companyDetails:v}))},onPrimaryContactDetailsUpdated:e=>{n(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{n(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:void 0}]}))},onNewCompanyOfficerRemoved:e=>{n(q(e))},onCompanyOfficerUpdated:e=>{n(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:e.userId}]}))},updateFilesEntity:e=>{n($({files:e}))},onDeleteFile:e=>{n(Z(e))},onEditFileName:(e,t)=>{n(H(e,t.split(".")[0]))}}}))(j);function de(){const n=w(),a=x(),i=T(),{tenantEmailDomain:p}=k(),[c,l]=g.useState(!1),[f,e]=g.useState(!1),t=O((s=>s.companyViewState.passportView.fetchState)),o=O((s=>s.companyConfigState.fetchState)),r=O((s=>D(s))),d=r.companyId??N.getSignedInUserTenant(p)?.companyId;if(N.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect((()=>{c||t!=="Not-Started"||d==null||(l(!0),a(B(d)))}),[c,t,d,a]),g.useEffect((()=>{o==="Not-Started"&&a(G())}),[o,a]);const u=s=>{e(s)},y=t==="Not-Started"||t==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&t==="Error"?m.jsx(F,{onGoHome:()=>n("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(P,{analytics:V,onLoad:s=>s.trackPageLoaded(L.Event.companyPassport,b(i)?"Settings":"Company Passport")}),b(i)?m.jsx(X,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:n,location:i,isLoading:y,currentTenant:r,isSettings:b(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
@@ -1,11 +0,0 @@
1
- import{j as I}from"./liveblocks-DtuUpF5h.js";import{a as o}from"./sentry-BWDuLt7o.js";import{u as F,h as R,g as H,j as C,N as j}from"./core-Dk5JD2l2.js";import{U6 as q,fI as z,go as G,pV as V,gP as U,gn as Q,gl as B,Uw as J,gk as A}from"./zeni-epic-state-BtP47QJT.js";import{u as K,z as E,L as T,G as M,N as W}from"./index-uoDX7H4L.js";import{n as X}from"./mui-DAOUhz91.js";import{P as b,a as _}from"./AccountMappingScreen-_ej4z-IR.js";import{t as Y}from"./getLocaleForTenant-C8sqw5jB.js";import{g as Z,Q as ee}from"./QBOConnectionScreen-CzL0viYI.js";import"./recharts-BMD3jyO6.js";import"./analytics-C6U4wpfB.js";import"./plaid-DBHSfOGH.js";import"./dnd-CSZKLHxv.js";import"./stripe-cKAAJElX.js";import"./lottie-BlG_vWSt.js";import"./lexical-BtWXzxnq.js";import"./pdf-iocWnEuY.js";import"./utils-CWVNtCN5.js";import"./MobileAppDrawer-BrOHAjwP.js";import"./InboxNotificationsProvider-D6GwXgCp.js";import"./useTaskManagerAccess-OjN4ZWFp.js";import"./accountMappingHelper-D-qmKFUw.js";import"./empty-CDCQLT9Y.js";import"./pdf-lib-BLLTrAOR.js";import"./index-BzY7ptmA.js";import"./url-CCl9sM9J.js";import"./index-BFxiz-4U.js";import"./decodeURIComponentSafe-NBY1IhYb.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]="6ceb3716-cbd8-4ca6-a1db-2f58e70cd1d4",t._sentryDebugIdIdentifier="sentry-dbid-6ceb3716-cbd8-4ca6-a1db-2f58e70cd1d4")}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 je(){const t=F(),i=R(),v=H(),{setLoading:c,clearAllLoading:m}=K(),h=o.useRef(!1),S=o.useRef(!1),N=o.useRef(!1),p=o.useRef(!1),{code:O,realmId:$,state:L}=Z(v.search),f=O!==""&&$!==""&&L!=="";f&&(N.current=!0);const w=sessionStorage.getItem(b),u=w===_.pending,P=w===_.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((()=>{c(T.CONNECTION_AUTH)}),[c]),o.useEffect((()=>{h.current||a==null||g==null||(h.current=!0,n==="Completed"||r!=="Not-Started"&&r!=="Error"||(c(T.TENANT_FETCHING),t(G(a.userId,g))))}),[h,n,c]),o.useEffect((()=>{e.tenantId==null&&!S.current&&a!=null&&(S.current=!0,!(g==null||g!=null&&(r==="Completed"||r==="Error"))||n!=="Not-Started"&&n!=="Error"||t(V(a.userId)))}),[S,n,r]),o.useEffect((()=>{a==null||e?.tenantId==null||e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||l==="In-Progress"||d!=="Error"||(c(T.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 D=e==null||n!=="Completed"&&r!=="Completed"||l!=="Completed";if(o.useEffect((()=>{n!=="Completed"&&n!=="Error"||r!=="Completed"&&r!=="Error"||l!=="Completed"&&l!=="Error"||m()}),[n,r,l]),o.useEffect((()=>{u&&d==="In-Progress"&&(p.current=!0)}),[u,d]),o.useEffect((()=>{if(!u||D)return;const s=e.tenantEmailDomain!=null?`/${e.tenantEmailDomain}/settings/accounting`:"/";return p.current&&d==="Completed"?(sessionStorage.setItem(b,_.ready),m(),void i(s,{replace:!0})):p.current&&d==="Error"?(sessionStorage.removeItem(b),t(A({messageSection:"accounting_projects_qbo_reconnect_failed",messageText:"failed",type:"error"})),m(),void i(s,{replace:!0})):void(f||N.current||p.current||y!==!0||(sessionStorage.removeItem(b),t(A({messageSection:"accounting_projects_qbo_reconnect_failed",messageText:"failed",type:"error"})),m(),i(s,{replace:!0})))}),[u,D,d,f,y,e.tenantEmailDomain,m,t,i]),D)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(j,{to:k,replace:!0}):I.jsx(j,{to:"/",replace:!0})}export{je as default};
@@ -1 +0,0 @@
1
- import{j as i}from"./liveblocks-DtuUpF5h.js";import{z as m}from"./index-uoDX7H4L.js";import{g as n}from"./QBOConnectionScreen-CzL0viYI.js";import"./sentry-BWDuLt7o.js";import{g as p,N as a}from"./core-Dk5JD2l2.js";import"./zeni-epic-state-BtP47QJT.js";import"./recharts-BMD3jyO6.js";import"./mui-DAOUhz91.js";import"./analytics-C6U4wpfB.js";import"./plaid-DBHSfOGH.js";import"./dnd-CSZKLHxv.js";import"./stripe-cKAAJElX.js";import"./lottie-BlG_vWSt.js";import"./lexical-BtWXzxnq.js";import"./pdf-iocWnEuY.js";import"./utils-CWVNtCN5.js";import"./empty-CDCQLT9Y.js";import"./pdf-lib-BLLTrAOR.js";import"./index-BzY7ptmA.js";import"./url-CCl9sM9J.js";import"./index-BFxiz-4U.js";import"./decodeURIComponentSafe-NBY1IhYb.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-DtuUpF5h.js";import{t as wn,A as Ge}from"./AddressScreen--Jfrmx_9.js";import An from"./NotFoundScreen-CyVGP3Vp.js";import{a as d,t as Me}from"./sentry-BWDuLt7o.js";import{h as _e,g as xe,u as se,i as Te,j as E,N as Q,q as Pn,l as cn,n as Dn,o as H}from"./core-Dk5JD2l2.js";import{fI as X,e0 as Ee,d$ as we,bq as jn,Un as Bn,bS as Fn,pT as Vn,Bw as Un,Bz as Rn,VK as Ln,VL as Nn,lx as Oe,lA as dn,U_ as $n,c0 as Gn,c9 as fe,B_ as Ae,BL as Mn,VM as me,B$ as un,Sx as Qn,mK as ln,dj as pn,VN as Kn,VO as zn,uK as qn,UN as Ce,hY as Hn,UM as be,hV as Zn,Gp as Jn,uO as Wn,hN as Yn,hQ as Qe,VP as mn,VQ as Xn,Mf as et,VR as nt,Mj as tt,BC as at,VS as ot,VT as st,lv as rt,ly as it,Cb as ct,BN as gn,BZ as dt,bF as Ke,cF as ut,Ca as ze,v1 as lt,uR as pt,mC as mt,gJ as gt,gI as ft,gH as yt,VU as ht,BF as Ct,Cc as bt,Cf as St,Ci as It,Co as kt,dk as Ot}from"./zeni-epic-state-BtP47QJT.js";import{z,c as Pe,g as W,h as vt,p as q,a8 as re,m as g,aE as _t,ai as fn,a1 as xt,d as yn,Q as hn,l as Y,Z as ge,V as ve,aF as Tt,N as qe,y as He,ae as Et,aG as Ze,aH as wt,aI as At}from"./index-uoDX7H4L.js";import{n as De}from"./mui-DAOUhz91.js";import{g as Pt,h as Dt,q as ie}from"./QBOConnectionScreen-CzL0viYI.js";import{u as jt,a as Bt}from"./useEmailConnectResultRefresh-B85Z7XsM.js";import{u as Ft}from"./useChargeCardPusherEvents-4gxE-aSe.js";import"./recharts-BMD3jyO6.js";import"./analytics-C6U4wpfB.js";import"./plaid-DBHSfOGH.js";import"./dnd-CSZKLHxv.js";import"./stripe-cKAAJElX.js";import"./lottie-BlG_vWSt.js";import"./lexical-BtWXzxnq.js";import"./pdf-iocWnEuY.js";import"./utils-CWVNtCN5.js";import"./empty-CDCQLT9Y.js";import"./pdf-lib-BLLTrAOR.js";import"./index-BzY7ptmA.js";import"./url-CCl9sM9J.js";import"./index-BFxiz-4U.js";import"./decodeURIComponentSafe-NBY1IhYb.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]="9dcde0bb-cb89-4353-a196-e06b5c53fa98",e._sentryDebugIdIdentifier="sentry-dbid-9dcde0bb-cb89-4353-a196-e06b5c53fa98")}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=xe(),i=se(),[a,p]=d.useState(!1),[u,c]=d.useState(!1),{tenantEmailDomain:v}=Te(),n=z.getSignedInUser(),{useFeatureGate:t}=Pe(),{isFeatureEnabled:C}=t(W.isApAgingFeatureEnabled),{isFeatureEnabled:o}=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),x=_?.resources?.find((S=>S.resource==="/bills"))==null&&!r,T=_?.resources?.find((S=>S.resource==="/reimbursements"))==null;U===!1&&D.push("top_expenses"),h===!1&&D.push("task_card"),x===!1&&D.push("bill_pay_card","bill_pay_promo_card"),T===!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"),o===!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((G=>({fetchState:G.fetchState,error:G.error})))).fetchState}));d.useEffect((()=>{P!=="Completed"||a||m||b||(p(!0),i(Vn(n.userId,F,O.tenantId,!0,!1,D)))}),[a,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]),$=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($,6e3);return()=>clearTimeout(S)}),[$]),d.useEffect((()=>{m||b||!u||f!=="Completed"&&f!=="Error"||$()}),[u,f,m,b,$]),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:$})]})},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((a=>[a.key,a])));return l.map((a=>{return p=i.get(a)?.status,p==="starting"||p==="building"?p:"idle";var p}))},Ye=(e,l)=>{if(e.length===0)return!1;const i=new Map(e.map((a=>[a.key,a])));return l.every((a=>i.get(a)?.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:a,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),o=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:a,isOnAddressPage:u,cardPaymentView:o,isCardPaymentPopupOpen:!1,stripeKey:ge.stripeKey}}),(function(e,l){const{companyId:i,currentTenant:a,themeState:p,navigate:u,location:c}=l,{tenantEmailDomain:v}=a;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:o,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:x,isPhoneVerified:T}=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:o,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:x,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1,isPhoneVerified:T}}));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:o,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:x,companySourceOfFundsDescription:T,companySubIndustry:f,countriesOfOperations:j,purposeOfAccount:N,purposeOfAccountDescription:$,regulatedStatus:L,regulatedStatusDescription:ee,transactionVolume:S,transactionVolumeDescription:V,usNexus:Z,usNexusTypes:G}=n,M={companyId:i,companyDescription:t,companyIndustry:C.selectedOption,companyIndustryType:o?.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:x?.selectedOption??"",companySourceOfFundsDescription:T,companySubIndustry:f?.selectedOption??"",countriesOfOperations:j?.selectedOptions.map((R=>R.length===2?R:Ze(R)))??[],purposeOfAccount:N?.selectedOption??"",purposeOfAccountDescription:$,regulatedStatus:L??"",regulatedStatusDescription:ee,transactionVolume:S?.selectedOption??"",transactionVolumeDescription:V,usNexus:Z,usNexusTypes:G?.selectedOptions??[]},ce={userId:F,firstName:_.firstName,lastName:_.lastName,email:P,syncToken:m};e(ze({companyDetails:M,primaryContactDetails:ce}))},onAddressClick:(n,t)=>{const C=an(v,n,t),o=q(c.state?.pathnameStackToGoBack,c.pathname);u(C,{state:{pathnameStackToGoBack:o}})},onRegisteredAddressClick:(n,t)=>{const C=an(v,n,t),o=q(c.state?.pathnameStackToGoBack,c.pathname);u(C,{state:{pathnameStackToGoBack:o}})},onUpdateCustomerView:(n,t,C)=>{e(dt(i,!1,t,C,n))},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})))}}}))(Tt),le=({taxCFOCustomer:e=!1,isOnAddressPage:l=!1,appContent:i})=>{const a=fn(),p=_e(),u=xe(),c=se(),v=xt(),n=yn(),[t,C]=d.useState(!1),[o,A]=d.useState(!1),[w,k]=d.useState(!1),{tenantEmailDomain:O}=Te(),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)),x=E((y=>y.cardPaymentViewState)),T=Y(x.addCardPaymentSourceStatus.fetchState),f=x.addCardPaymentSourceStatus.fetchState,{code:j,realmId:N,state:$}=Pt(u.search),L=h.externalConnections?.accounting[0],ee=L?.connectionType,S=L?.connectionName,V=L?.connectionId??"",Z=z.getSignedInUser()?.userId??"",G=d.useRef({realmId:"",connectionId:""});d.useEffect((()=>{o||(A(!0),c(Oe()))}),[o,c]),d.useEffect((()=>{w||(dn(["card"]),k(!0))}),[w]),d.useEffect((()=>{T==="In-Progress"&&f==="Completed"&&c(Oe())}),[T,f]),d.useEffect((()=>{Dt(j,N,$,V,Z)===!0&&h.externalConnections?.saveConnectionState!=="In-Progress"&&b==="Completed"&&(c($n(h.tenantId,{connection_type:ee??"accounting",connection_name:S??"quickbooks_online",authorization_code:j,realm_id:N,connection_id:V,user_id:Z},Gn(window.location.origin+"/onboarding/auth"))),G.current={realmId:N,connectionId:V},g.trackOnboardingSaveQBOConnection(N,V),p(u.pathname))}),[j,N,$,u.pathname,b]),d.useEffect((()=>{ie.isInitiated===!1&&b==="Completed"&&ie.init("/onboarding/auth",h.tenantEmailDomain)}),[b]);const M=h.companyId??z.getSignedInUserTenant(O)?.companyId,ce=fe(h?.userRole??[]),R=E((y=>Ae(y,M)));d.useEffect((()=>{t||b!=="Not-Started"||M==null||(C(!0),c(Mn(M,!0,!m)))}),[t,b,M]);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(G.current.realmId,G.current.connectionId):g.trackOnboardingQBOConnectionFailed(G.current.realmId,G.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:M}),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,$e=te&&!Ne,xn=$e?Se.map((()=>"building")):ae,Tn=$e?Ie.map((()=>"building")):I;return{ledgerRowStatuses:oe?void 0:xn,backgroundRowStatuses:oe?void 0:Tn,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:M});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:M,currentTenant:h,isAdmin:ce,isOnAddressPage:l,themeState:n,googleAPIKey:ge.googleMapsAPIKey,integrationsSectionProps:Ue,aiAgentsActivationProps:Re,meetingUrl:a("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:M,currentTenant:h,isAdmin:ce,isOnAddressPage:l,themeState:n,googleAPIKey:ge.googleMapsAPIKey,integrationsSectionProps:Ue,aiAgentsActivationProps:Re,meetingUrl:a("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 a=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)),o=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((()=>{a(qn(ke))}),[a]);const P=o.externalConnections?.saveAPIKeyConnectionState,_=o.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=o.externalConnections?.saveOAuthConnectionState,b=o.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=o.externalConnections?.saveConnectorCredentialsStateBySlug,h=Y(U);return d.useEffect((()=>{const r=U??{},x=h??{},T=o.externalConnections?.saveConnectorCredentialsErrorBySlug??{};Object.keys(r).forEach((f=>{if(x[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",T[f]?.message??"")}))}),[U,h,o]),d.useMemo((()=>({isAdmin:O,analytics:g,referrer:"Onboarding",integrationsView:o,isLoading:C==="In-Progress",notifyMeRegisteredSlugs:w,autoFocusTabId:p??void 0,saveChargeBeeState:o.externalConnections?.saveAPIKeyConnectionState??"Not-Started",saveChargeBeeError:o.externalConnections?.saveAPIKeyConnectionError?.message,saveHubSpotState:o.externalConnections?.saveOAuthConnectionState??"Not-Started",saveHubSpotError:o.externalConnections?.saveOAuthConnectionError?.message,saveConnectorCredentialsStateBySlug:o.externalConnections?.saveConnectorCredentialsStateBySlug??{},saveConnectorCredentialsErrorBySlug:Object.fromEntries(Object.entries(o.externalConnections?.saveConnectorCredentialsErrorBySlug??{}).map((([r,x])=>[r,x?.message]))),deleteConnectionState:o.externalConnections?.deleteConnectionState??"Not-Started",deleteConnectionError:o.externalConnections?.deleteConnectionError?.message,onConnectGmail:()=>{g.trackIntegrationConnectClicked("gmail","Onboarding","email"),a(Qe(k,"gmail",tn()))},onConnectOutlook:()=>{g.trackIntegrationConnectClicked("outlook","Onboarding","email"),a(Qe(k,"outlook",tn()))},onConnectHubSpot:(r,x)=>{const T=o.externalConnections?.revenue?.find((j=>j.connectionName==="hubspot"))?.connectionId;if(T==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:x,connection_id:T,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,x)=>{const T=[...o.externalConnections?.accounting??[],...o.externalConnections?.payments??[],...o.externalConnections?.revenue??[]].find((j=>j.connectionId===r))?.connectionName;let f;try{f=T!=null?Ce(T):void 0}catch{f=void 0}f!=null&&g.trackIntegrationDisconnected(f,"Onboarding",x),a(Yn(k,r,be(x)))},onNotifyMe:r=>{g.trackIntegrationsNotifyMeClicked("Onboarding",r),a(Wn(ke,r,l))},onReconnectQBO:()=>{ie.init("/onboarding/auth",e),ie.handleClick()},onRefreshClick:()=>{o.integrations.refreshQBO.fetchState!=="In-Progress"&&a(Jn())},onSaveChargeBeeCredentials:(r,x)=>{const T=o.externalConnections?.revenue?.find((f=>f.connectionName==="chargebee"))?.connectionId;T!=null&&(g.trackIntegrationCredentialsSubmitted("chargebee","Onboarding","revenue"),a(Zn(k,T,be("revenue"),Ce("chargebee"),{api_key:r,site:x})))},onSaveConnectorCredentials:r=>{g.trackIntegrationCredentialsSubmitted(r.connectionName,"Onboarding","payments"),a(Hn(k,be("payments"),r))},plaidAccounts:u,onAddPlaidAccount:c,onReLoginPlaidAccount:v,plaidConnectionDetails:n})),[O,o,C,w,p,k,l,e,a,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 a=`/${e}/onboarding/address`;return a=i!=null?a.concat(`/edit/${l}/${encodeURIComponent(i)}`):a.concat(`/new/${l}`),a}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:a}=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(a?.userRole??[])&&p.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",signedInUser:z.getSignedInUser(),currentTenant:a}}),(function(e,l){const{currentTenant:i,themeState:a,navigate:p,location:u}=l,{tenantEmailDomain:c}=i;return{onZeniLogoClick:()=>{a.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(),a=xe(),p=yn(),{useFeatureGate:u}=Pe(),{isFeatureEnabled:c}=u(W.isDebitCardFeatureEnabled),{tenantEmailDomain:v}=Te(),n=hn(),[t,C]=d.useState(!1);d.useEffect((()=>{t===!1&&a.state?.message==="OnboardingThankyou"&&C(!0)}),[a.state]);const o=E((m=>X(m))),A=o.productSettings.isOtherProductsEnabled,w=A===!0&&!pn(o);d.useEffect((()=>{i(gn(k,!1,!w))}),[]);const k=o.companyId??z.getSignedInUserTenant(v)?.companyId;if(n.loggedInUser==null)throw Error("Can't access onboarding flow without signing in...");const O=Ee(c,o),P=we(o),_=E((m=>m.onboardingCustomerViewState.updateStatus.fetchState)),F=o.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(o.productSettings))}}),s.jsx(sn,{navigate:l,showUpdatePaymentDetailButton:A,location:a,companyId:k,currentTenant:o,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:a,companyId:k,currentTenant:o,themeState:p,isVisitingFirstTime:t,meetingUrl:e("onboarding_overview")})]}):s.jsx(wt,{});{const m={pathnameStackToGoBack:a.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 Me=="function"?Me():void 0}let pe=0;function Lt(){d.useEffect((()=>{if(!ge.sentryDsn?.trim())return;let e,l=!1,i=0;const a=()=>{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)&&a()}),1e3)),()=>{l=!0,a(),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(Ge,{})})}),s.jsx(H,{path:"/address/new/:addressType",element:s.jsx(le,{isOnAddressPage:!0,appContent:s.jsx(Ge,{})})}),s.jsx(H,{path:"*",element:s.jsx(An,{})})]})}export{pa as default};
@@ -1,18 +0,0 @@
1
- import{j as l}from"./liveblocks-DtuUpF5h.js";import{h as w,g as C,j as h,l as E,i as V}from"./core-Dk5JD2l2.js";import{Z5 as k,Zc as J,gJ as Q,gI as W,gH as X,kS as Y,X3 as q,uU as K,fI as B,YE as D,kQ as T,Z6 as S,Zf as F,kO as G,l9 as j}from"./zeni-epic-state-BtP47QJT.js";import{bN as L,a1 as N,c as R,z as Z,E as U,a4 as p,g as v,a7 as O,bO as M,N as H,bP as ee,p as te}from"./index-uoDX7H4L.js";import{n as z}from"./mui-DAOUhz91.js";import"./sentry-BWDuLt7o.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]="d9abe04a-de0f-47f1-8893-67b26e9283f3",e._sentryDebugIdIdentifier="sentry-dbid-d9abe04a-de0f-47f1-8893-67b26e9283f3")}catch{}})();const ae=E(null,(function(e,t){return{onSaveVendor:a=>{e(Y(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(q("common")),a!=null&&e(K(a))},onGetOtp:a=>{e(X(a,"BillPayVendor"))},onResendOtp:a=>{e(W(a,"BillPayVendor"))},onVerifyOtp:(a,n)=>{e(Q(a,n,"BillPayVendor"))},onVerifyOtpSuccess:(a,n,o)=>{e(J(a,n,o))}}}))(L);function _({vendorId:e,billId:t,isExpressPayPage:a}){const n=w(),o=C(),s=h((d=>k(d,e)));return l.jsx(ae,{location:o,navigate:n,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:a??!1})}const ne=z.div`
2
- display: flex;
3
- height: 100vh;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `,oe=E((function(e,t){const{vendorId:a,billId:n}=t,o=k(e,a),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,n);return{billId:n,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}}),(function(e,t){const{navigate:a,location:n,vendorId:o}=t;return{onFetchBankName:s=>{e(j(s))},onSaveHandler:s=>{e(G(t.bankAccountContext,s,"standard",o))},onCancel:()=>{(()=>{const s=p(n.state?.pathnameStackToGoBack),d=s.poppedPathname??P();a(d,{state:{pathnameStackToGoBack:s.newStack}})})(),e(S())},onACHDetailsUpdated:s=>{const{bankAccountSection:d}=s;e(F({data:d}))},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")a("../",{relative:"path"});else{const s=p(t.location.state?.pathnameStackToGoBack),d=s.poppedPathname??P(0);t.navigate(d,{state:{pathnameStackToGoBack:s.newStack}})}e(S())}}}))(M);function fe({vendorIdParam:e,accountContext:t}){const a=w(),n=C(),o=N(),{vendorId:s,billId:d}=V(),c=e??s,{useFeatureGate:r}=R(),i=Z.getSignedInUser(),b=h((u=>B(u))),g=U(),I=p(n.state?.pathnameStackToGoBack),f=t??(I.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h((u=>k(u,c))),{isFeatureEnabled:x}=r(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=r(v.isDepositAccountsFeatureEnabled);if(i==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(O,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:g.colors.grey5}}):l.jsxs(ne,{windowSize:o,children:[l.jsx(_,{vendorId:c,billId:d}),l.jsx(oe,{location:n,navigate:a,billId:d,vendorId:c,currentTenant:b,bankAccountContext:f,isVendorRecommendationEnabled:x,isZeniAccountsFeatureEnabled:y})]})}const P=(e=2)=>{let t="../";for(let a=0;a<e;a++)t=`${t}../`;return t},me=(e,t,a)=>{let n=`/${e}/bill/${encodeURIComponent(t)}`;return a=="draft"&&(n+="/edit"),n},he=e=>`/${e}/bills`,ke=(e,t)=>{let a=`/${e}/bill`;return a=t!=null?a.concat(`/${t}/edit`):a.concat("/new"),a},A=(e,t,a,n)=>{let o=`/${e}/bill`;return o+=a!=null?`/${a}/edit/vendor`:"/new/vendor",o+=n!=null?`/${n}/edit/${t}`:`/create/${t}`,o};function Se(e,t,a){return A(e,"ach",t,a)}function ve(e,t,a){return A(e,"domestic",t,a)}function ge(e,t,a){return A(e,"international",t,a)}const se=(e,t,a)=>{let n=`/${e}/bill/`;return n=a!=null?n.concat(`${encodeURIComponent(a)}/${t}/`):n.concat(`new/${t}/`),n},re=z.div`
10
- display: flex;
11
- height: 100vh;
12
- width: 100%;
13
- flex: 1 1 auto;
14
- flex-direction: column;
15
- align-items: center;
16
- background-color: ${e=>e.theme.colors.grey4};
17
- box-shadow: ${e=>`0px 2px ${H.sp1} ${e.theme.colors.dropShadowNormal}`};
18
- `,de=E((function(e,t){const{vendorId:a,billId:n}=t,o=k(e,a),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,n);return{billId:n,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}}),(function(e,t){const{billId:a,navigate:n,location:o,vendorId:s,currentTenant:d}=t,{tenantEmailDomain:c}=d;return{onFetchBankName:r=>{e(j(r))},onSaveHandler:r=>{e(G(t.bankAccountContext,r,"us-domestic",s))},onWireDetailsUpdated:r=>{const{bankAccountSection:i}=r;e(F({data:i}))},onCancel:()=>{(()=>{const r=p(o.state?.pathnameStackToGoBack),i=r.poppedPathname??$();n(i,{state:{pathnameStackToGoBack:r.newStack}})})(),e(S())},onAddressClick:r=>{if(t.bankAccountContext==="express-pay")n("./add-address");else{const i=se(c,r,a),b=te(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:b}})}},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")n("../",{relative:"path"});else{const r=p(t.location.state?.pathnameStackToGoBack),i=r.poppedPathname??$(0);t.navigate(i,{state:{pathnameStackToGoBack:r.newStack}})}e(S())}}}))(ee);function Ie({vendorIdParam:e,accountContext:t}){const a=w(),n=C(),o=N(),{vendorId:s,billId:d}=V(),c=e??s,r=Z.getSignedInUser(),{useFeatureGate:i}=R(),b=U(),g=h((u=>B(u))),I=p(n.state?.pathnameStackToGoBack),f=t??(I.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h((u=>k(u,c))),{isFeatureEnabled:x}=i(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=i(v.isDepositAccountsFeatureEnabled);if(r==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(O,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:b.colors.grey5,boxShadow:`0px 2px ${H.sp1} ${b.colors.dropShadowNormal}`}}):l.jsxs(re,{windowSize:o,children:[l.jsx(_,{vendorId:c,billId:d}),l.jsx(de,{location:n,navigate:a,billId:d,vendorId:c,currentTenant:g,bankAccountContext:f,isVendorRecommendationEnabled:x,isZeniAccountsFeatureEnabled:y})]})}const $=(e=2)=>{let t="../";for(let a=0;a<e;a++)t=`${t}../`;return t};export{fe as A,Ie as D,_ as V,me as a,se as b,ke as c,ve as d,he as g,ge as i,Se as v};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-DtuUpF5h.js";import{a as d}from"./sentry-BWDuLt7o.js";import{h as q,u as A,g as G,i as W,j as l,N as X,l as F,n as N,o as O}from"./core-Dk5JD2l2.js";import{X8 as _,fI as M,Wp as R,n2 as Y,Sq as k,Xd as $,X2 as z,m2 as V,Sr as S,Wu as H,Wv as J,X4 as K,X3 as L}from"./zeni-epic-state-BtP47QJT.js";import{b8 as Q,m as U,a4 as Z,p as tt}from"./index-uoDX7H4L.js";import"./mui-DAOUhz91.js";import{d as I}from"./decodeURIComponentSafe-NBY1IhYb.js";import{w as et}from"./withTransactionSidePanel-MoXr5b9J.js";import{f as nt,c as at}from"./routePaths-DzLOO7Om.js";import"./recharts-BMD3jyO6.js";import"./analytics-C6U4wpfB.js";import"./plaid-DBHSfOGH.js";import"./dnd-CSZKLHxv.js";import"./stripe-cKAAJElX.js";import"./lottie-BlG_vWSt.js";import"./lexical-BtWXzxnq.js";import"./pdf-iocWnEuY.js";import"./utils-CWVNtCN5.js";import"./useAskAiCfoHostNavButtonProps-CsMZr2YE.js";import"./TransactionDetailScreen-BG6zUFU-.js";import"./useInitialThreadRequest-DGvbt9bY.js";import"./expenseAutomationHelper-BwdyIQYD.js";import"./stripSplatSuffix-KkY0P5Vm.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new n.Error().stack;t&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[t]="347d79e9-d38f-4982-8f41-f442c60be80e",n._sentryDebugIdIdentifier="sentry-dbid-347d79e9-d38f-4982-8f41-f442c60be80e")}catch{}})();const ot=F((function(n,t){const e=t.entity,o=$(n,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:z(n,"common")},trendWithTransactionsReport:o,analytics:U,isAccountingClassesEnabled:V(n)}}),(function(n,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${at(e,t.tenantEmailDomain)}`,c=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:c}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?n(K({searchString:e,searchOrigin:"common"})):e.trim().length===0&&n(L("common"))},onAutoCompleteEntity:e=>{const o=nt(e,t.tenantEmailDomain);n(H()),n(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??b();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&n(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};n(k(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),n(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(Q),it=et((function({entityType:n,...t}){const e=q(),o=A(),c=G(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:v,entityNameEncoded:w}=W(),r=I(v??""),p=I(w??""),f=rt(r,p),x=[r,p].filter((a=>a!=null)),i={name:p,id:r,type:n,zeniId:r,qboId:r},g=l((a=>_(a.customerIncomeState,a.vendorExpenseState,a.trendState,i,"quarter"))),j=l((a=>M(a).company?.companyInfo.firstMonthOfFY??1)),u=l((a=>R(a.trendWithTransactionsState,i,"EntityDetail")));d.useEffect((()=>{m===!1&&f===!0&&(T(!0),o(Y(i)))}),[m,f,i]);const E=l((a=>a.trendState.fetchState)),P=u?.selectedPeriod?.timePeriod??g,B=(function(a,y){return a!=null&&y!=null?{startDate:a.startDate,endDate:y?.endDate}:y})(u?.selectedPeriod?.timePeriod,g);return d.useEffect((()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(k(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))}),[m,h,E]),f?s.jsx(ot,{firstMonthOfFY:j,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:B,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(X,{to:b(x.length)})})),rt=(n,t)=>t!=null&&t.length>0&&n!=null&&n.length>0,b=(n=2)=>{let t="../";for(let e=0;e<n;e++)t=`${t}../`;return t};function jt({entityType:n}){return s.jsx(N,{children:s.jsx(O,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:n})})})}export{jt as EntityDetailRoutes,jt as default};
@@ -1 +0,0 @@
1
- import{a as r}from"./sentry-BWDuLt7o.js";import{u as l,h as f,g as m}from"./core-Dk5JD2l2.js";import{h$ as p,UM as g,UN as _}from"./zeni-epic-state-BtP47QJT.js";import{u as b,L as h,z as y}from"./index-uoDX7H4L.js";import"./liveblocks-DtuUpF5h.js";import"./recharts-BMD3jyO6.js";import"./mui-DAOUhz91.js";import"./analytics-C6U4wpfB.js";import"./plaid-DBHSfOGH.js";import"./dnd-CSZKLHxv.js";import"./stripe-cKAAJElX.js";import"./lottie-BlG_vWSt.js";import"./lexical-BtWXzxnq.js";import"./pdf-iocWnEuY.js";import"./utils-CWVNtCN5.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]="1748819b-70df-45fe-8ed4-429074b6c65e",e._sentryDebugIdIdentifier="sentry-dbid-1748819b-70df-45fe-8ed4-429074b6c65e")}catch{}})();function $(){const e=l(),n=f(),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,72 +0,0 @@
1
- import{j as a}from"./liveblocks-DtuUpF5h.js";import{i as S,l as g,h as C,g as y,u as ee,t as ae,j as E,N as te,n as ne,o as p}from"./core-Dk5JD2l2.js";import{UF as k,UG as v,UH as T,JG as D,Js as G,UI as A,UJ as oe,UK as se,Jw as ie,gl as $,JD as le,JA as de}from"./zeni-epic-state-BtP47QJT.js";import{a1 as x,N as d,a2 as re,m as j,Z as U,a3 as ce,a4 as me,a5 as pe,p as H,c as ue,g as he,a6 as ge,d as xe,E as fe,j as we,a7 as be,a8 as Se,$ as ye,a9 as ke,aa as ve,ab as je,ac as $e}from"./index-uoDX7H4L.js";import{n as m}from"./mui-DAOUhz91.js";import f from"./NotFoundScreen-CyVGP3Vp.js";import{a as I}from"./sentry-BWDuLt7o.js";import"./recharts-BMD3jyO6.js";import"./analytics-C6U4wpfB.js";import"./plaid-DBHSfOGH.js";import"./dnd-CSZKLHxv.js";import"./stripe-cKAAJElX.js";import"./lottie-BlG_vWSt.js";import"./lexical-BtWXzxnq.js";import"./pdf-iocWnEuY.js";import"./utils-CWVNtCN5.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]="61edcafd-b3d5-458d-818a-1e5541461b3e",e._sentryDebugIdIdentifier="sentry-dbid-61edcafd-b3d5-458d-818a-1e5541461b3e")}catch{}})();const Ie=m.div`
2
- display: flex;
3
- height: 100%;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
10
- `,Ce=g((function(e){const t=k(e),n=v(e),{companyName:o}=t;return{companyName:o,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:t}}),(function(e,t){const{vendorId:n,billId:o}=t;return{onFetchBankName:s=>{e(G(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(D(s,"standard",n,o))},onACHDetailsUpdated:s=>{const{bankAccountSection:l}=s;e(T({data:l}))}}}))(re);function F(){const e=x(),{vendorId:t,billId:n}=S();return t==null||n==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(Ie,{windowSize:e,children:a.jsx(Ce,{vendorId:t,billId:n})})})}const De=m.div`
11
- display: flex;
12
- height: 100vh;
13
- width: 100%;
14
- flex: 1 1 auto;
15
- flex-direction: column;
16
- align-items: center;
17
- background-color: ${e=>e.theme.colors.grey4};
18
- box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
19
- `,Ae=g((function(e,t){const{isSubPage:n}=t;return{addressToEdit:A(e),googleAPIKey:U.googleMapsAPIKey,isSubPage:n}}),(function(e,t){const{navigate:n,location:o}=t,s=()=>{const l=me(o.state?.pathnameStackToGoBack),i=l.poppedPathname??Pe();n(i,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const i=ze(l);e(oe({addressToCreate:i})),s()},onCancel:()=>{s()}}}))(ce);function Be({isSubPage:e}){const t=C(),n=y(),o=x();return a.jsx(a.Fragment,{children:a.jsx(De,{windowSize:o,children:a.jsx(Ae,{location:n,navigate:t,isSubPage:e===!0,googleAPIKey:U.googleMapsAPIKey})})})}const Pe=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},ze=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng}),Ne=m.div`
20
- display: flex;
21
- height: 100%;
22
- width: 100%;
23
- flex: 1 1 auto;
24
- flex-direction: column;
25
- align-items: center;
26
- background-color: ${e=>e.theme.colors.grey4};
27
- box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
28
- `,Le=g((function(e){const t=k(e),n=v(e),o=A(e),{companyName:s}=t;return{companyName:s,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}}),(function(e,t){const{navigate:n,location:o,vendorId:s,billId:l}=t;return{onFetchBankName:i=>{e(G(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(D(i,"us-domestic",s,l))},onWireDetailsUpdated:i=>{const{bankAccountSection:r}=i;e(T({data:r}))},onAddressClick:()=>{const i=o.pathname.replace("us-domestic","address"),r=H(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:r}})}}}))(pe);function Ee(){const e=C(),t=y(),n=x(),{vendorId:o,billId:s}=S();return o==null||s==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(Ne,{windowSize:n,children:a.jsx(Le,{location:t,navigate:e,vendorId:o,billId:s})})})}const Fe=m.div`
29
- display: flex;
30
- height: 100%;
31
- width: 100%;
32
- flex: 1 1 auto;
33
- flex-direction: column;
34
- align-items: center;
35
- background-color: ${e=>e.theme.colors.grey4};
36
- box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
37
- `,Te=g((function(e){const t=k(e),n=v(e),o=A(e),{companyName:s}=t;return{companyName:s,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}}),(function(e,t){const{navigate:n,location:o,vendorId:s,billId:l}=t;return{onFetchBankNameBySwift:i=>{e(ie(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(D(i,"international",s,l,t.isLocalCurrencyEnabled))},onBankDetailsUpdated:i=>{const{internationalWireSwiftAccountSection:r}=i;e(se({data:r}))},onAddressClick:()=>{const i=o.pathname.replace("international","address"),r=H(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:r}})}}}))(ge);function Ge(){const e=C(),t=y(),n=x(),{vendorId:o,billId:s}=S(),{useFeatureGate:l}=ue(),{isFeatureEnabled:i}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||s==null?a.jsx(f,{}):a.jsx(Fe,{windowSize:n,children:a.jsx(Te,{location:t,navigate:e,vendorId:o,billId:s,isLocalCurrencyEnabled:i})})}const Ue={containerWidth:new je(100,58)},He=m(ke)`
38
- width: ${d.sp4};
39
- height: ${d.sp4};
40
- margin-bottom: ${d.sp3};
41
- margin-top: ${d.sp3};
42
- margin-left: ${d.sp8};
43
- cursor: pointer;
44
- position: absolute;
45
- color: ${e=>e.theme.colors.brandColorJade};
46
- `,Je=m.div`
47
- display: flex;
48
- height: 100vh;
49
- flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
50
- width: 100vw;
51
- overflow-y: scroll;
52
- background-color: ${e=>e.theme.colors.grey4};
53
- `,Me=m.div`
54
- display: flex;
55
- flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
56
- flex-direction: column;
57
- width: ${e=>`${Ue.containerWidth.value(e.windowSize)}%`};
58
- ${e=>e.windowSize!=="small"?"overflow: auto;":""}
59
- box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
60
- padding-top: ${e=>e.windowSize!=="small"?d.sp2:"0px"};
61
- `,Ke=m.div`
62
- display: flex;
63
- flex-direction: column;
64
- align-items: center;
65
- justify-content: center;
66
- padding: ${e=>e.windowSize==="small"?d.sp3:`62px ${d.sp6} ${d.sp9} ${d.sp8}`};
67
- height: ${e=>e.windowSize==="small"?"490px":"auto"};
68
- overflow: ${e=>e.windowSize==="small"?"unset":"hidden"};
69
- width: ${e=>e.windowSize=="small"?"auto":"42%"};
70
- background-color: ${e=>e.windowSize==="small"?e.theme.colors.grey4:e.theme.colors.background};
71
- margin-top: ${e=>e.windowSize==="small"?e.isAddressPage?"0px":"186px":"unset"};
72
- `,Ve=g((function(e,t){return{file:t.file,type:t.type}}))(ve);function h({appContent:e}){const t=ee(),n=y(),{tenantEmailDomain:o,vendorId:s,billId:l}=S(),[i]=ae(),r=i.get("token"),J=n.pathname.includes("address"),w=x(),M=xe(),B=fe(),b=we(),K=()=>{M.toggle()},V=E((u=>k(u))),_=E((u=>v(u))),{authParams:W,fetchState:c,billAttachment:q,billFetchState:P,companyName:O,currencySymbol:Q,amount:Z}=V,{tenantId:z,userId:N,sessionId:L}=W,{fetchState:R,internationalBankAccountCreateStatus:X}=_;return I.useEffect((()=>{$()}),[]),I.useEffect((()=>{b&&c==="Not-Started"&&s!=null&&o!=null&&r!=null&&t(le(s,o,r))}),[b,c,s,o,r,t]),I.useEffect((()=>{b&&c==="Completed"&&($(N,L,z),l!=null&&t(de(l)))}),[c,b,N,L,z,l,t]),c==="Error"?a.jsx(f,{}):R==="Completed"||X.fetchState==="Completed"?($(),a.jsx(te,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?a.jsx(be,{fetchState:c,style:{height:"100vh",backgroundColor:B.colors.grey5,boxShadow:`0px 2px ${d.sp1} ${B.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[c==="Completed"&&P==="Completed"&&a.jsx(Se,{analytics:j,onLoad:u=>(Y=>Y.trackBillPayMagicLinkPageLoad(o??"",s??"",O,l??"",_e(n.pathname),Q,Z))(u)}),a.jsxs(Je,{windowSize:w,children:[w!=="small"?a.jsx(He,{onClick:K}):null,a.jsx(Ke,{windowSize:w,isAddressPage:J,children:P==="In-Progress"?a.jsx(ye,{size:"ExtraLarge",start:!0}):a.jsx(Ve,{file:q,type:"bill"})}),a.jsx(Me,{windowSize:w,children:e})]})]})}const _e=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function We(){return a.jsx($e,{})}function ra(){return a.jsxs(ne,{children:[a.jsx(p,{path:"bank/account/save/success",element:a.jsx(We,{})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:a.jsx(h,{appContent:a.jsx(F,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:a.jsx(h,{appContent:a.jsx(F,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:a.jsx(h,{appContent:a.jsx(Be,{isSubPage:!0})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:a.jsx(h,{appContent:a.jsx(Ee,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:a.jsx(h,{appContent:a.jsx(Ge,{})})}),a.jsx(p,{path:"*",element:a.jsx(f,{})})]})}export{ra as default};
@@ -1,12 +0,0 @@
1
- import{j as u}from"./liveblocks-DtuUpF5h.js";import{a as g}from"./sentry-BWDuLt7o.js";import{u as O,g as _,h as w,t as V,j as l,N as T}from"./core-Dk5JD2l2.js";import{z as r,E as M,G as P,T as A,m as N,V as X,_ as $,$ as B,X as G}from"./index-uoDX7H4L.js";import{fI as R,U8 as W,UB as q,Us as H,gl as J,gn as K,Ux as Q,gX as Y,dk as Z,UC as ee,UD as te}from"./zeni-epic-state-BtP47QJT.js";import{n as ne}from"./mui-DAOUhz91.js";import{u as se}from"./useDeviceId-BRjUTxWs.js";import{f as ae}from"./analyticsHelper-DdV5jqT5.js";import{t as ie}from"./getLocaleForTenant-C8sqw5jB.js";import"./recharts-BMD3jyO6.js";import"./analytics-C6U4wpfB.js";import"./plaid-DBHSfOGH.js";import"./dnd-CSZKLHxv.js";import"./stripe-cKAAJElX.js";import"./lottie-BlG_vWSt.js";import"./lexical-BtWXzxnq.js";import"./pdf-iocWnEuY.js";import"./utils-CWVNtCN5.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]="62b9ea4d-39d3-4997-b492-be41ff992808",t._sentryDebugIdIdentifier="sentry-dbid-62b9ea4d-39d3-4997-b492-be41ff992808")}catch{}})();const U=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function Ue(){const t=O(),a=_(),m=w(),[k]=V(),n=k.get("token"),p=k.get("stytch_token_type"),f=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:C,resendVerifyDeviceOTPFetchState:D}=l((e=>e.tenantState)),S=l((e=>e.tenantState.fetchState)),y=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=>R(e))),b=l((e=>W(e))),z=r.getSignedInUser(),v=M().mode;g.useEffect((()=>{s?.zeniSessionId==null&&n!=null&&U(n,p)&&i!=null&&f!=null&&(r.saveMagicLinkTriggered(n),t(q(n,i,f)))}),[n,p,t,i,f,s?.zeniSessionId]),g.useEffect((()=>{I!=="In-Progress"||S!=="Completed"&&y!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(H(b.tenantsInOrder),s.zeniSessionId),J(s.userId,s.zeniSessionId,o.tenantId),t(K(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(Q("Completed")),P.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,b.tenantsInOrder),Y().then((()=>{const e=G();e!=null&&A(e)})),setTimeout((()=>{N.trackLogin(X.Event.loginSuccess,"email",Z(o.productSettings))}),2e3))}),[I,S,y,s,o,b,v,a.state,t]);const E=g.useCallback((()=>{m("/signin/auth")}),[m]),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($,{phoneNumber:x,verifyOtpFetchState:C.fetchState,resendVerifyDeviceOTPFetchState:D,onResendOtp:j,onVerifyOtp:F,onCancelVerifyDevice:E});if(I==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||z!=null){const e=a.state?.origin??"/";return u.jsx(T,{to:e,state:{...a.state,origin:""}})}if(!U(n,p)||f==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(B,{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 e}from"./liveblocks-DtuUpF5h.js";import{h as r,l as i}from"./core-Dk5JD2l2.js";import{am as n}from"./index-uoDX7H4L.js";import"./mui-DAOUhz91.js";import"./sentry-BWDuLt7o.js";import"./zeni-epic-state-BtP47QJT.js";import"./recharts-BMD3jyO6.js";import"./analytics-C6U4wpfB.js";import"./plaid-DBHSfOGH.js";import"./dnd-CSZKLHxv.js";import"./stripe-cKAAJElX.js";import"./lottie-BlG_vWSt.js";import"./lexical-BtWXzxnq.js";import"./pdf-iocWnEuY.js";import"./utils-CWVNtCN5.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-DtuUpF5h.js";import ut from"./NotFoundScreen-CyVGP3Vp.js";import{a as k}from"./sentry-BWDuLt7o.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-Dk5JD2l2.js";import{cB as It,Uc as Y,fI as J,h4 as Tt,Ug as S,a1b as Q,Um as m,Ua as E,Az as F,Gg as Ct,a1c as At,U9 as Et,Uo as yt,AE as _t,a1d as $,br as j,gk as x,AI as X,a1e as Nt,cN as Bt,cG as wt}from"./zeni-epic-state-BtP47QJT.js";import{aq as xt,e as Ut,c as vt,g as Gt,as as Dt,dK as Rt,p as B,dL as Pt,w as Mt,dM as $t,i as jt,a4 as Ft}from"./index-uoDX7H4L.js";import"./mui-DAOUhz91.js";import{u as Vt}from"./useAskAiCfoHostNavButtonProps-CsMZr2YE.js";import{u as qt}from"./useTaskManagerAccess-OjN4ZWFp.js";import"./recharts-BMD3jyO6.js";import"./analytics-C6U4wpfB.js";import"./plaid-DBHSfOGH.js";import"./dnd-CSZKLHxv.js";import"./stripe-cKAAJElX.js";import"./lottie-BlG_vWSt.js";import"./lexical-BtWXzxnq.js";import"./pdf-iocWnEuY.js";import"./utils-CWVNtCN5.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]="8106d730-1ab1-4098-93df-c04b7e11b1b3",t._sentryDebugIdIdentifier="sentry-dbid-8106d730-1ab1-4098-93df-c04b7e11b1b3")}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)}))})),zt=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&&yt(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:(a,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",[a],!1))},onCommentNotificationClick:(a,s,d)=>{const r=s.toString().split(`/${h}/`);if(r[1]!=null){d==="unread"&&(I(a),t($([a],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:(a,s)=>{t(E(a,s))},onUpdateNotificationTabState:(a,s)=>{t(m(a,s))},onUpdateNotificationViewCurrentTabAndSubTab:(a,s)=>{t(Q(a,s));const d=`../${a}`,r=B(n.state?.pathnameStackToGoBack,n.pathname);f(d,{state:{pathnameStackToGoBack:r}})},onUpdateNotificationViewSubTab:a=>{t(Nt(a))},onFetchMoreNotifications:(a,s)=>{if(a==="tasks"){const d=[];s==="all"?d.push("read","unread"):s!=="mentions"&&d.push(s),t(F("task_manager","dashboard",d))}else v?.()},onUpdateNotificationStatus:(a,s,d,r)=>{a==="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(E({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:a=>{a==="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(E({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 a=Ft(n.state?.pathnameStackToGoBack),s=a.poppedPathname??"../../dashboard";f(s,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=B(n.state?.pathnameStackToGoBack,n.pathname);f("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}}))(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),a=b((e=>Y(e))),s=b((e=>J(e))),{useFeatureGate:d}=vt(),{isFeatureEnabled:r}=d(Gt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:i,onAskAiCfoClick:T}=Vt({mobileExploreReferrer:"Notifications"});Dt({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((e=>S(e).notificationDetailsByTab.tasks.fetchState)),q=b((e=>S(e).currentTab)),G=b((e=>S(e).currentSubTab)),tt=b((e=>S(e).notificationDetailsByTab.comments.fetchCountState)),D=b((e=>S(e).notificationDetailsByTab.comments.fetchState)),et=b((e=>S(e).notificationDetailsByTab.comments.uiState.unreadCount)),at=b((e=>S(e).allExternalNotifications)).filter((e=>e.inboxNotification.readAt==null)).map((e=>e.inboxNotification.id)),st=Rt().allUsers,{inboxNotifications:w,isLoading:y,hasFetchedAll:C,isFetchingMore:R,fetchMore:ot}=mt(),{threads:L,isLoading:z,fetchMore:W,isFetchingMore:H,hasFetchedAll:K}=lt({query:{metadata:{companyId:s.companyId,application:"dashboard"}}});k.useEffect((()=>{if(q!==c&&c!=null&&o(Q(c)),c==null){const e=`../${q}`,p=B(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}}),[c]),k.useEffect((()=>{tt.fetchState==="Not-Started"&&o(m({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[]),k.useEffect((()=>{if(y===!1&&C===!0&&s?.companyId!=null&&w!=null){const e=`dashboard_${s.companyId}`,p=w.filter((A=>A.roomId===e&&A.readAt==null)).length;o(m({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),o(E({unreadCount:p},"comments"))}}),[y,C]),k.useEffect((()=>{V!=="In-Progress"&&g&&o(F("task_manager","dashboard",["read","unread"]))}),[g]),k.useEffect((()=>{const e=setTimeout((()=>ot?.()),0);return()=>clearTimeout(e)}));const P=y||R===!0||C!==!0||y||R===!0||C!==!0;k.useEffect((()=>{P&&D!=="In-Progress"?o(m({fetchState:"In-Progress",error:void 0},"comments")):P||D!=="In-Progress"||o(m({fetchState:"Completed",error:void 0},"comments"))}),[P,D]),k.useEffect((()=>{o(E({hasMore:C!==!0},"comments"))}),[C]),k.useEffect((()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&I===!1&&(v(!0),o(Ct()))}),[a.fetchState]),k.useEffect((()=>{if(y===!1&&z===!1&&w!=null&&L!=null){const e=`dashboard_${s.companyId}`,p=w.filter((u=>u.roomId===e)).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}:(H||K===!0||W==null||W(),null)})).filter((u=>u!=null));o(m({allNotificationsIds:_},"comments")),o(E({totalCount:_.length,unreadCount:A.length},"comments")),o(At(ct))}}),[y,R,H,C,K,z,w?.length]);const nt={events:s.userRoleId!=null?[`private-encrypted-${s.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(jt(p)){const A=Et(p.mode);if(A==="dashboard"&&o(E({unreadCount:p.data.unread},"tasks")),V!=="In-Progress"){const _=[];G==="all"?_.push("read","unread"):G!=="mentions"&&_.push(G),o(F("task_manager",A,_,!0))}}}},it=ft(),{isTaskManagerAccessEnabled:rt}=qt(f);return N.jsx(zt,{tenantEmailDomain:n,loggedInUserRoleMap:Z,signedInUser:f,externalNotificationsUnreadCount:et,location:l,navigate:t,isDebitCardFeatureEnabled:r,isTaskManagerAccessEnabled:rt,users:st,markInboxNotificationAsRead:it,allUnreadCommentsNotificationIds:at,isAiCfoAccessEnabled:i,onAskAiCfoClick:T,...nt})};function me(){return N.jsxs(St,{children:[N.jsx(O,{path:"/:selectedTab",element:N.jsx(Wt,{})}),N.jsx(O,{path:"*",element:N.jsx(ut,{})})]})}export{me as default};
@@ -1 +0,0 @@
1
- import{j as m}from"./liveblocks-DtuUpF5h.js";import{a as r}from"./sentry-BWDuLt7o.js";import{u as A,g as P,j as o,N as j}from"./core-Dk5JD2l2.js";import{UP as C,fI as R,gp as x,UQ as z,UR as D,US as M,UT as L,pV as k,Tu as N}from"./zeni-epic-state-BtP47QJT.js";import{z as h,ah as I}from"./index-uoDX7H4L.js";import"./mui-DAOUhz91.js";import"./recharts-BMD3jyO6.js";import"./analytics-C6U4wpfB.js";import"./plaid-DBHSfOGH.js";import"./dnd-CSZKLHxv.js";import"./stripe-cKAAJElX.js";import"./lottie-BlG_vWSt.js";import"./lexical-BtWXzxnq.js";import"./pdf-iocWnEuY.js";import"./utils-CWVNtCN5.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]="7bdbc3f5-64b0-4785-9436-87bfe1f4f291",n._sentryDebugIdIdentifier="sentry-dbid-7bdbc3f5-64b0-4785-9436-87bfe1f4f291")}catch{}})();function ee(){const n=A(),s=P(),{params:t,error:i}=r.useMemo((()=>C(s.search)),[s.search]),b=r.useMemo((()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application"),[s.search,t]),f=h.isSignedIn(),a=h.getSignedInUser(),p=o((e=>R(e))),l=o((e=>x(e))),d=o((e=>e.tenantState.fetchState)),w=o(z),y=o(D),u=o(M),[S,U]=r.useState(null),[v,E]=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((()=>{f&&a!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(k(a.userId,a.zeniSessionId??void 0))))}),[f,a,d,n]),r.useEffect((()=>{u!=null&&u!==""&&(window.location.href=u)}),[u]);const _=r.useMemo((()=>{if(p?.tenantId!=null)return p.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some((T=>T.tenantId===e))?e:l.length===1?l[0].tenantId:null}),[p?.tenantId,l]),c=S??_;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):f?m.jsx(I,{variant:"signed_in",clientName:b,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:c,onSelectTenant:U,approveError:v??y,isApproving:w==="In-Progress",showAllowButton:c!=null,onApprove:()=>{t!=null&&a!=null&&c!=null&&n(N(a.userId,a.zeniSessionId??void 0,c,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{E("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,22 +0,0 @@
1
- import{j as a}from"./liveblocks-DtuUpF5h.js";import{VD as re,fI as Q,m2 as _,e0 as X,d$ as le,Su as Y,V0 as ce,D3 as Pe,VE as N,CU as je,Dd as Le,D7 as de,CY as pe,Db as ve,D8 as Te,VF as ue,sw as Ve,g9 as Ae,gG as Fe,VG as G,D0 as me,C$ as ge,Dg as Re,c9 as Oe}from"./zeni-epic-state-BtP47QJT.js";import{a1 as fe,c as J,g as H,z as K,k as he,U as Ce,af as ye,az as be,aA as Be,ab as Se,N as R,ag as De,G as M,aB as Ue,aq as Ze,as as $e,a8 as ze,m as we,V as Ge,p as He,aC as _e,Q as Ke}from"./index-uoDX7H4L.js";import{D as xe,n as W,S as Ie}from"./mui-DAOUhz91.js";import ae from"./NotFoundScreen-CyVGP3Vp.js";import{a as c}from"./sentry-BWDuLt7o.js";import{u as ee,i as Me,j as g,h as We,g as qe,l as Ne,n as se,o as z}from"./core-Dk5JD2l2.js";import{u as Qe}from"./useAskAiCfoHostNavButtonProps-CsMZr2YE.js";import{M as Xe}from"./MobileAppDrawer-BrOHAjwP.js";import"./recharts-BMD3jyO6.js";import"./analytics-C6U4wpfB.js";import"./plaid-DBHSfOGH.js";import"./dnd-CSZKLHxv.js";import"./stripe-cKAAJElX.js";import"./lottie-BlG_vWSt.js";import"./lexical-BtWXzxnq.js";import"./pdf-iocWnEuY.js";import"./utils-CWVNtCN5.js";import"./InboxNotificationsProvider-D6GwXgCp.js";import"./useTaskManagerAccess-OjN4ZWFp.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]="c9fab895-485f-4f3c-ae64-e2142fbe3a8d",e._sentryDebugIdIdentifier="sentry-dbid-c9fab895-485f-4f3c-ae64-e2142fbe3a8d")}catch{}})();const Ye={overlayWidth:new Se(100,100,48)},te=M.getLocalizedStrings().peoplePage.invitePage,ne=M.getLocalizedStrings().common,Je=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:b})=>{const h=fe(),m=ee(),[O,B]=c.useState(!1),[k,S]=c.useState(!1),{userId:D}=Me(),r=g((l=>re(l))),p=g((l=>Q(l))),E=g((l=>_(l))),{useFeatureGate:x}=J(),{isFeatureEnabled:I}=x(H.isDebitCardFeatureEnabled),P=X(I,p),v=le(p),T=Y(p),U=ce(p),Z=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,w=!P&&E&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{m(N()),b()},V=()=>{O===!0?S(!0):C()},$=d.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=x(H.isChargeCardFeatureEnabled),L=he(p,j,I),{isCardsHidden:A}=Ce(p?.tenantId),y=!L||A,F=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:T,isAccountingClassesEnabled:E,isReimbursementDisabled:Z===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:F===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:v,onResetClick:C,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(T))},onCloseClick:V,isLoading:w||r.person==null},o={onOkClick:()=>{S(!1),C()},onCancelClick:()=>{S(!1)}};return c.useEffect((()=>{w===!1&&D!=null&&m(Pe(D))}),[w,D]),c.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&C()}),[r.updatePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:Ye.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:ye.overlayDark,cursor:"pointer"}}},onClose:V,children:a.jsxs(ea,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(be,{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=W(Ie)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,ke=W(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=W(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=M.getLocalizedStrings().peoplePage.invitePage,ie=M.getLocalizedStrings().common,sa=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:f,isInvitePeopleDrawerOpen:i,closeDrawerHandler:b})=>{const h=fe(),m=ee(),[O,B]=c.useState(!1),[k,S]=c.useState(!1),D=g((o=>re(o))),r=g((o=>Q(o))),p=g((o=>_(o))),{useFeatureGate:E}=J(),{isFeatureEnabled:x}=E(H.isDebitCardFeatureEnabled),I=X(x,r),P=le(r),v=Y(r),T=ce(r),U=!!r.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,Z=!I&&p&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const w=()=>{b(),m(N())},C=()=>{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(H.isChargeCardFeatureEnabled),L=he(r,j,x),{isCardsHidden:A}=Ce(r?.tenantId),y=!L||A,F=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:v,onPeopleLocalDataUpdated:o=>{m(de({peopleLocalData:o})),B(!0)},onResetClick:w,onSaveClick:()=>{m(f==="zeni_only"?ve(e):Te())},onCloseClick:C,peopleDetails:D,isAccountingClassesEnabled:p,isReimbursementDisabled:U===!1,isLiteRoleDisabled:T===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:F===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:P,isLoading:Z};return c.useEffect((()=>{D.invitePersonState.fetchState==="Completed"&&(b(),m(N()))}),[D.invitePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:aa.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:ye.overlayDark,cursor:"pointer"}}},onClose:C,children:a.jsxs(ta,{onClick:o=>o.stopPropagation(),children:[k===!0?a.jsx(be,{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(Ue,{...s})]})})},ta=W(Ie)`
19
- display: flex;
20
- min-height: 100%;
21
- flex-direction: column;
22
- `,na=Ne((function(e,t){const d=ue(e),n=K.getSignedInUser();return{data:d,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:_(e),analytics:we}}),(function(e,t){const{navigate:d,companyId:n,shouldFetchClasses:f}=t;return{personAction:{onPersonDelete:(i,b)=>{e(pe(i,b))},onResendInvite:i=>{e(Re(i))},onReloadPeople:()=>{e(me()),e(ge(n,f))},onBackClick:()=>{d("../../")},onModeChange:i=>{e(G({mode:i,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:i=>{e(G({searchText:i}))}}}}))(_e);function q({isInvitePeopleDrawerOpen:e,isEditPeopleDrawerOpen:t}){const d=We(),n=ee(),f=qe(),{areTenantIdsInSync:i}=Ze(),b=K.getSignedInUser(),h=g((s=>Q(s))),{useFeatureGate:m}=J(),{isFeatureEnabled:O}=m(H.isDebitCardFeatureEnabled),B=g((s=>_(s))),k=!X(O,h)&&B,S=Y(h),D=h?.tenantId,{tenantEmailDomain:r}=h,[p,E]=c.useState(!1),[x,I]=c.useState(!1),[P,v]=c.useState(!1),[T,U]=c.useState("off"),[Z,w]=c.useState(!1),C=s=>{w(s)},{isAiCfoAccessEnabled:V,onAskAiCfoClick:$}=Qe({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))),y=h?.companyId;c.useEffect((()=>{p&&T===u.uiState.mode||!i||(n(G({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(u.uiState.mode),E(!0),n(me()))}),[p,b,D,n,u.uiState.mode,i]),c.useEffect((()=>{y!=null&&i&&n(ge(y,k))}),[y,k,i]),c.useEffect((()=>{I(e!=null&&e===!0),v(t!=null&&t===!0&&t)}),[e,t]),c.useEffect((()=>{n(G({searchText:"",sortKey:"name",sortOrder:"ascending"}))}),[]);const F=()=>{I(!1),v(!1),d("../")};return a.jsxs(a.Fragment,{children:[u.fetchState==="Completed"?a.jsx(ze,{analytics:we,onLoad:s=>s.trackPageLoaded(Ge.Event.members)}):null,x===!0?a.jsx(sa,{closeDrawerHandler:F,isInvitePeopleDrawerOpen:x,managersListView:L,companyPassportView:A,classListView:j,companyId:y,mode:u.uiState.mode}):null,P===!0?a.jsx(Je,{closeDrawerHandler:F,isEditPeopleDrawerOpen:P,managersListView:L,companyPassportView:A,classListView:j,companyId:y,mode:u.uiState.mode}):null,a.jsx(Xe,{isAppContentDrawerOpen:Z,handleDrawerToggle:C}),a.jsx(na,{navigate:d,signedInUser:b,isZeni:h.isZeni,isZeniTenant:S,peopleUIState:u.uiState,companyId:y,shouldFetchClasses:k,classList:j,managersView:L,peopleView:u,onInvitePeopleClick:()=>{d("./new")},onColumnSortConfigChanged:(s,o)=>{n(G({sortKey:s,sortOrder:o}))},onRowClick:s=>{const o=`/${r}/people/${encodeURIComponent(s)}/edit`,l=He(f.state?.pathnameStackToGoBack,f.pathname);d(o,{state:{pathnameStackToGoBack:l}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:V,onAskAiCfoClick:$})]})}function ka(){const e=Ke();return Oe(e?.loggedInUserRole??[])?a.jsxs(se,{children:[a.jsx(z,{path:"/",element:a.jsx(q,{})}),a.jsx(z,{path:"new",element:a.jsx(q,{isInvitePeopleDrawerOpen:!0})}),a.jsx(z,{path:":userId/edit",element:a.jsx(q,{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-DtuUpF5h.js";import E from"./NotFoundScreen-CyVGP3Vp.js";import{a as r}from"./sentry-BWDuLt7o.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 b}from"./core-Dk5JD2l2.js";import{fI as N,a1f as h,bo as B,bn as F,iO as V,gk as $}from"./zeni-epic-state-BtP47QJT.js";import{d as q,z as I,as as G,dN as H}from"./index-uoDX7H4L.js";import"./mui-DAOUhz91.js";import{u as J}from"./useAskAiCfoHostNavButtonProps-CsMZr2YE.js";import{M as K}from"./MobileAppDrawer-BrOHAjwP.js";import"./recharts-BMD3jyO6.js";import"./analytics-C6U4wpfB.js";import"./plaid-DBHSfOGH.js";import"./dnd-CSZKLHxv.js";import"./stripe-cKAAJElX.js";import"./lottie-BlG_vWSt.js";import"./lexical-BtWXzxnq.js";import"./pdf-iocWnEuY.js";import"./utils-CWVNtCN5.js";import"./InboxNotificationsProvider-D6GwXgCp.js";import"./useTaskManagerAccess-OjN4ZWFp.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]="299cea4f-875b-4ce2-b15b-8304cbb9ea70",e._sentryDebugIdIdentifier="sentry-dbid-299cea4f-875b-4ce2-b15b-8304cbb9ea70")}catch{}})();const L=P((function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=h(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(),c=q(),o=p((a=>N(a))),{aggregatedReportViewState:n}=p((a=>h(a))),{tenantEmailDomain:f}=M(),u=U(),d=I.getSignedInUser();if(d==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,x=F(d),y=C||k||x,l=r.useCallback(((a,i,T)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&m.current&&(u($({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"||l(a,i,!0),m.current=!0}),[n?.fetchState,l]),j=r.useCallback(((a,i)=>{l(a,i,!1)}),[l]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=J({mobileExploreReferrer:"Performance"});return G({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(K,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(L,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:d,tenantEmailDomain:f,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(O,{to:`/${f}/dashboard`,replace:!0})};function be(){return s.jsxs(z,{children:[s.jsx(b,{path:"*",element:s.jsx(Q,{})}),s.jsx(b,{path:"*",element:s.jsx(E,{})})]})}export{be as default};
@@ -1 +0,0 @@
1
- import{j as r}from"./liveblocks-DtuUpF5h.js";import Z from"./NotFoundScreen-CyVGP3Vp.js";import{a as p}from"./sentry-BWDuLt7o.js";import{h as C,g as N,u as V,j as u,N as k,l as D,n as K,o as g}from"./core-Dk5JD2l2.js";import{fI as E,Zk as h,ZC as R,NV as U,NR as L,NU as f,NK as $,Z$ as B,NO as z,NX as X}from"./zeni-epic-state-BtP47QJT.js";import{z as T,w as O,ca as q,s as W,bT as F,cb as G}from"./index-uoDX7H4L.js";import"./mui-DAOUhz91.js";import{u as H,R as x}from"./ReimbursementApprovalRuleDetailScreen-DsMDfZXO.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]="2b9502b1-b562-48c2-a267-14676c3fb952",e._sentryDebugIdIdentifier="sentry-dbid-2b9502b1-b562-48c2-a267-14676c3fb952")}catch{}})();const j="reimbursement-approval-rule-update",J=D((function(e){return{approvalView:h(e),remiSetupApproverViewUpdateData:R(e).remiSetupApproverViewUpdateData}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(j)&&e(B(!1))},onBackClick:()=>{W(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e($(t,!1))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))}}}))(O(q)),M=({isLoading:e})=>{const s=C(),n=N(),a=V(),[t,l]=p.useState(!1),[v,w]=p.useState(!1),S=u((o=>o.remiSetupApproverViewState.fetchState)),c=u((o=>E(o))),d=u((o=>h(o))),b=u((o=>R(o).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{b?.updateStatus.fetchState==="Completed"&&a(U())}),[b]),p.useEffect((()=>{t||S!=="Not-Started"||e||(l(!0),a(L(!0,!1,!1,!1)))}),[t,S,e,a]),T.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{d.allApprovalRules.length===0&&d.fetchState==="Completed"&&(v||(w(!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(k,{to:"../../promo"}):r.jsx(J,{currentTenant:c,location:n,navigate:s,...m})},A="reimbursement-approval-rule-update",P=D((function(e){const s=h(e),n=R(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(B(!1))},onBackClick:()=>{W(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e($(t,!0))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))},onReorderRules:t=>{e(X(t,!0))}}}))(O(G)),Q=()=>{const e=u((a=>E(a))),{isApprovalRulesV3Enabled:s,isLoading:n}=F(e?.tenantId);return s?r.jsx(Y,{isLoading:n}):r.jsx(M,{isLoading:n})},Y=({isLoading:e})=>{const s=C(),n=N(),a=V(),[t,l]=p.useState(!1),[v,w]=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)));H();const y=u((i=>R(i).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{y?.updateStatus.fetchState==="Completed"&&a(U())}),[y]),p.useEffect((()=>{t||d!=="Not-Started"||e||(l(!0),a(L(!0,!1,!1,!0)))}),[t,d,e,a]),p.useEffect((()=>{v||b!=="Not-Started"||e||(w(!0),a(z(!1,!0)))}),[v,b,e,a]),T.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,_)=>{i.endsWith(A)&&_.onApprovalRulesEventReceived(i)}};return m?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(k,{to:"../../promo"}):r.jsx(P,{currentTenant:m,location:n,navigate:s,isLoading:e,...I})};function le(){return r.jsxs(K,{children:[r.jsx(g,{path:"/",element:r.jsx(Q,{})}),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-DtuUpF5h.js";import{z as b,a8 as N,m as d,V as S,e2 as E,c as I,g as k}from"./index-uoDX7H4L.js";import"./mui-DAOUhz91.js";import g from"./NotFoundScreen-CyVGP3Vp.js";import{a as c}from"./sentry-BWDuLt7o.js";import{u as C,j as h,h as F,g as L,l as _,n as T,o as f,N as y}from"./core-Dk5JD2l2.js";import{fI as U,a2e as w,a2f as p,D_ as V,q2 as P,a2g as q,DY as z}from"./zeni-epic-state-BtP47QJT.js";import"./recharts-BMD3jyO6.js";import"./analytics-C6U4wpfB.js";import"./plaid-DBHSfOGH.js";import"./dnd-CSZKLHxv.js";import"./stripe-cKAAJElX.js";import"./lottie-BlG_vWSt.js";import"./lexical-BtWXzxnq.js";import"./pdf-iocWnEuY.js";import"./utils-CWVNtCN5.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]="cd21eb03-8a36-4a8e-b16b-f86e65636f71",e._sentryDebugIdIdentifier="sentry-dbid-cd21eb03-8a36-4a8e-b16b-f86e65636f71")}catch{}})();const G=_((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])})),d.trackInviteEmailClicked("send",s,r,s.length)}e(z())},onUpdateInviteFormLocalData:s=>{e(q({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&d.trackInviteEmailClicked("cancel")}}}))(E),R=()=>{const e=C(),[t,n]=c.useState(!1),[i,s]=c.useState(!1),r=h((o=>U(o))),m=F(),j=L(),u=b.getSignedInUser();if(u==null)throw Error("Can't access invite referral screen without signing in...");const l=h((o=>w(o))),x=u?.firstName!=null?u.firstName:"User";c.useEffect((()=>{e(p()),r?.rewardsLastViewedTime==null&&i===!1&&(e(V()),s(!0))}),[]),c.useEffect((()=>{t||l.fetchState!=="Not-Started"||(n(!0),e(P(!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:d,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(T,{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};