@zeniai/web-app-ui 5.3.64-dev → 5.3.65-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/dist/assets/AccountMappingScreen-6_GKC9vx.js +9 -0
  2. package/dist/assets/ActualMatchingMatchDetailScreen-BtJ1PRf_.js +1 -0
  3. package/dist/assets/AddressRoutes-BGo6E_l0.js +1 -0
  4. package/dist/assets/{AddressScreen-CrPViFiu.js → AddressScreen-BYfgTsTg.js} +2 -2
  5. package/dist/assets/{AiCfoScreen-DXsXYKZU.js → AiCfoScreen-HIFRX9qy.js} +5 -5
  6. package/dist/assets/AppDrawer-HGV6a9mb.js +10 -0
  7. package/dist/assets/{BillPayApprovalRoutes-CMAUuUUB.js → BillPayApprovalRoutes-CJFVAxhN.js} +1 -1
  8. package/dist/assets/{BillPayRoutes-Dmusj5HX.js → BillPayRoutes-9qxDDuw-.js} +7 -7
  9. package/dist/assets/{BusinessVerificationPageScreen-C-aPhqey.js → BusinessVerificationPageScreen-ClHDLcIn.js} +2 -2
  10. package/dist/assets/CardsAiCfoScreen-HQpPf571.js +14 -0
  11. package/dist/assets/{ChargeCardRoutes-JBiL4Thy.js → ChargeCardRoutes-D5HxBR-m.js} +6 -6
  12. package/dist/assets/CompanyPassportScreen-NKCcjvTx.js +1 -0
  13. package/dist/assets/ConnectionAuthScreen-5_efBSJK.js +11 -0
  14. package/dist/assets/CustomerOnboardingAuthScreen-LnGpx7c7.js +1 -0
  15. package/dist/assets/CustomerOnboardingRoutes-DvA4xflo.js +30 -0
  16. package/dist/assets/{DashboardRoutes-B3_TJQND.js → DashboardRoutes-BrD8wr4t.js} +4 -4
  17. package/dist/assets/DefaultTenantHome-UgTfgsWU.js +1 -0
  18. package/dist/assets/DomesticWireDetailScreen-CnA3RoGS.js +18 -0
  19. package/dist/assets/DrawerScreen-Uxjfm6D_.js +1 -0
  20. package/dist/assets/EntityDetailRoutes-DtNSByJA.js +1 -0
  21. package/dist/assets/ExpenseAutomationRoutes-CyGyQy2q.js +38 -0
  22. package/dist/assets/FeaturePreviewScreen-C1hVuos1.js +1 -0
  23. package/dist/assets/HubSpotOAuthCallbackScreen-BZRaCcdu.js +1 -0
  24. package/dist/assets/InboxNotificationsProvider-J2K-16R3.js +1 -0
  25. package/dist/assets/InvoicingRoutes-BER5-vbp.js +2 -0
  26. package/dist/assets/MagicLinkRoutes-BGZcWo6O.js +72 -0
  27. package/dist/assets/MagicLinkSignInScreen-BclRPUfZ.js +12 -0
  28. package/dist/assets/MobileAppDrawer-B_zpLZqx.js +1 -0
  29. package/dist/assets/NotFoundScreen-BXryZNID.js +1 -0
  30. package/dist/assets/NotificationRoutes-CQasJ3IU.js +1 -0
  31. package/dist/assets/OAuthConsentScreen-Bo-ewMPc.js +1 -0
  32. package/dist/assets/PandLWithForecastRoutes-DdmupK5y.js +1 -0
  33. package/dist/assets/{PaymentLinkScreen-Bh4jK9uE.js → PaymentLinkScreen-CAg7Uc1V.js} +5 -5
  34. package/dist/assets/PeopleRoutes-CYUsZeQt.js +22 -0
  35. package/dist/assets/PerformanceRoutes-DqTbj0rB.js +1 -0
  36. package/dist/assets/{Preview-Cqz8sG2s.js → Preview-DB5CbRio.js} +1 -1
  37. package/dist/assets/{QBOConnectionScreen-DreC-yDW.js → QBOConnectionScreen-CRdIfjOg.js} +1 -1
  38. package/dist/assets/ReimbursementApprovalRoutes-CgCsp1OP.js +1 -0
  39. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BxglZgWl.js → ReimbursementApprovalRuleDetailScreen-ChXGgpkg.js} +1 -1
  40. package/dist/assets/ReimbursementRoutes-DKUCzczr.js +68 -0
  41. package/dist/assets/{ReportsRoutes-BZjyXdiB.js → ReportsRoutes-CSUm6Emn.js} +1 -1
  42. package/dist/assets/RewardsRoutes-DWpcmti-.js +1 -0
  43. package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-PbMzJVD9.js → ScheduleDetailsPrepaidExpensesScreen-CuQHddsr.js} +5 -5
  44. package/dist/assets/ScreenRoutes-evald5rF.js +2 -0
  45. package/dist/assets/{SettingsRoutes-hveOvbi9.js → SettingsRoutes-B7gRIVJU.js} +6 -6
  46. package/dist/assets/{SetupPagesScreen-B8kiMdZf.js → SetupPagesScreen-CabDNVlS.js} +5 -5
  47. package/dist/assets/SignInScreen-DfTwbUKW.js +1 -0
  48. package/dist/assets/SignOutScreen-CH6sLo8r.js +9 -0
  49. package/dist/assets/{TaskListScreen-Bi73r_uo.js → TaskListScreen-d8rT1QCC.js} +2 -2
  50. package/dist/assets/TaskRoutes-DVZrk18e.js +9 -0
  51. package/dist/assets/TransactionDetailRoutes-CkeAEzHU.js +1 -0
  52. package/dist/assets/{TransactionDetailScreen-DVFrl6h2.js → TransactionDetailScreen-hIkUAVjY.js} +2 -2
  53. package/dist/assets/TransactionListRoutes-BVLahxTu.js +1 -0
  54. package/dist/assets/{TreasuryRoutes-BPVOZ6Bj.js → TreasuryRoutes-D4vqz1Fs.js} +5 -5
  55. package/dist/assets/{VendorsRoutes-CHDVO5Sr.js → VendorsRoutes-Dd9qfBZi.js} +10 -10
  56. package/dist/assets/WiseConfirmationScreen-B9ReE25J.js +12 -0
  57. package/dist/assets/{ZeniAccountRoutes-BzLWpyYJ.js → ZeniAccountRoutes-BtAMcoNj.js} +11 -11
  58. package/dist/assets/ZeniAccountStatementScreen-B3egvFmp.js +9 -0
  59. package/dist/assets/{accountMappingHelper-Gh8rpbjD.js → accountMappingHelper-mjWJVrZb.js} +1 -1
  60. package/dist/assets/{analytics-S5MhEivL.js → analytics-cC2XJoxx.js} +1 -1
  61. package/dist/assets/{analyticsHelper-Ch9SsWjb.js → analyticsHelper-DoCIxX19.js} +1 -1
  62. package/dist/assets/{core-Cc7wW2EM.js → core-BBG4mxvC.js} +1 -1
  63. package/dist/assets/{decodeURIComponentSafe-DhqIXi_U.js → decodeURIComponentSafe-DgKmvHaP.js} +1 -1
  64. package/dist/assets/{dnd-DEyyKSEC.js → dnd-oIrpOltC.js} +1 -1
  65. package/dist/assets/{empty-CjY9w6q2.js → empty-BVUnugO_.js} +1 -1
  66. package/dist/assets/{empty-6MFM8UPN.js → empty-zUa_Ywzm.js} +1 -1
  67. package/dist/assets/{emptyVideoElement-MGXFhhLz.js → emptyVideoElement-WG4m8gNp.js} +1 -1
  68. package/dist/assets/epic-Du6qCFYI.js +2 -0
  69. package/dist/assets/expenseAutomationHelper-BkZxz0F-.js +1 -0
  70. package/dist/assets/getLocaleForTenant-BYuz_wJa.js +1 -0
  71. package/dist/assets/{index-Cm43WhAF.js → index-B9QH_oKn.js} +2 -2
  72. package/dist/assets/{index-DpnxiqBj.js → index-Bgwcwudg.js} +1 -1
  73. package/dist/assets/{index-ldlm2cjp.js → index-BlZF-J3g.js} +1 -1
  74. package/dist/assets/{index-D2oCZR3F.js → index-CD8RychW.js} +1 -1
  75. package/dist/assets/{index-gtGWrJ79.js → index-CyCQjJen.js} +1 -1
  76. package/dist/assets/{index-vIt7RQvO.js → index-De2R2YuA.js} +15538 -15403
  77. package/dist/assets/{index-BZ6qOKkD.js → index-DlbH0-p0.js} +1 -1
  78. package/dist/assets/{index-2QCkbhu2.js → index-lbu92FYh.js} +1 -1
  79. package/dist/assets/{lexical-DXgKWO29.js → lexical-BRrdO5Cu.js} +1 -1
  80. package/dist/assets/{liveblocks-CgHUgeBY.js → liveblocks-CzCs-qU3.js} +1 -1
  81. package/dist/assets/{lottie-C1A2hiZE.js → lottie-ULJlrwjP.js} +1 -1
  82. package/dist/assets/{mui-C4zFSCiU.js → mui-B2F_PvWe.js} +1 -1
  83. package/dist/assets/{pathToGoBack-C17GqrA7.js → pathToGoBack-e0pJACvC.js} +1 -1
  84. package/dist/assets/{pdf-rXyPRm1U.js → pdf-CeVn9A9c.js} +3 -3
  85. package/dist/assets/{pdf-lib-CsM74zBq.js → pdf-lib-DiMa7ymi.js} +1 -1
  86. package/dist/assets/{plaid-vsHcqLdj.js → plaid-BWZxX3Bn.js} +1 -1
  87. package/dist/assets/{pusher-C0EhdUPA.js → pusher-wcP4-1ih.js} +1 -1
  88. package/dist/assets/{react-CzfY0Vx3.js → react-3Jh1nOTX.js} +1 -1
  89. package/dist/assets/{react-DG8YneWb.js → react-BrDYknqm.js} +1 -1
  90. package/dist/assets/{react-Yy9ZuxR6.js → react-CGMaXwI-.js} +1 -1
  91. package/dist/assets/{react-BU_8yW5D.js → react-Chuw6ptT.js} +1 -1
  92. package/dist/assets/{react-CEepHjWP.js → react-D7hd8riP.js} +1 -1
  93. package/dist/assets/{react-Gc0eJCMR.js → react-Dv-IwMT5.js} +1 -1
  94. package/dist/assets/{recharts-DJGeJ2v_.js → recharts-CzGMTm3v.js} +1 -1
  95. package/dist/assets/{routePaths-C0UIXwMQ.js → routePaths-BRju88LA.js} +1 -1
  96. package/dist/assets/{sentry-DSWD_gIh.js → sentry-CWp8Ph3h.js} +1 -1
  97. package/dist/assets/{stripSplatSuffix-kLnY55Qt.js → stripSplatSuffix-BWJSV6oD.js} +1 -1
  98. package/dist/assets/{url-DCbpXgdk.js → url-CnTmKJO0.js} +1 -1
  99. package/dist/assets/{url-DUlo21cY.js → url-DV6CtKQ5.js} +1 -1
  100. package/dist/assets/useActualMatchingMatchDetail-lnPRleqr.js +1 -0
  101. package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-DuZAl-a1.js +1 -0
  102. package/dist/assets/useAskAiCfoHostNavButtonProps-Bq-fQXG8.js +1 -0
  103. package/dist/assets/useChargeCardPusherEvents-CrB7Excu.js +1 -0
  104. package/dist/assets/{useDeviceId-B5zol9VP.js → useDeviceId-Bzw6IkAe.js} +1 -1
  105. package/dist/assets/useEmailConnectResultRefresh-x1GFiNhw.js +1 -0
  106. package/dist/assets/useInitialThreadRequest-C1rKRZSH.js +1 -0
  107. package/dist/assets/useTaskManagerAccess-CoE1FF6T.js +1 -0
  108. package/dist/assets/useTaskManagerPusherEvents-CgOrop-a.js +1 -0
  109. package/dist/assets/{utils-DiIEQ7_h.js → utils-u0mlLj2I.js} +1 -1
  110. package/dist/assets/withTransactionSidePanel-CbnU34fe.js +25 -0
  111. package/dist/assets/{zeni-epic-state-BVJjEVAA.js → zeni-epic-state-FRanwwFO.js} +6 -6
  112. package/dist/index.html +1 -1
  113. package/package.json +4 -4
  114. package/dist/assets/AccountMappingScreen-xfXO279W.js +0 -9
  115. package/dist/assets/ActualMatchingMatchDetailScreen-ByqHVLf7.js +0 -1
  116. package/dist/assets/AddressRoutes-BWVJyPk8.js +0 -1
  117. package/dist/assets/AppDrawer-B2rHD8Zo.js +0 -10
  118. package/dist/assets/CardsAiCfoScreen-CTX5PjYy.js +0 -14
  119. package/dist/assets/CompanyPassportScreen-Df3GjmsH.js +0 -1
  120. package/dist/assets/ConnectionAuthScreen-CRXLzdg9.js +0 -11
  121. package/dist/assets/CustomerOnboardingAuthScreen-DSYY256B.js +0 -1
  122. package/dist/assets/CustomerOnboardingRoutes-C2sAsjXY.js +0 -30
  123. package/dist/assets/DefaultTenantHome-4mMU5w7G.js +0 -1
  124. package/dist/assets/DomesticWireDetailScreen-DQXD1NSK.js +0 -18
  125. package/dist/assets/DrawerScreen-DyQejCID.js +0 -1
  126. package/dist/assets/EntityDetailRoutes-0npRYuOC.js +0 -1
  127. package/dist/assets/ExpenseAutomationRoutes-SlF4KM3u.js +0 -38
  128. package/dist/assets/FeaturePreviewScreen-OtBPdCPK.js +0 -1
  129. package/dist/assets/HubSpotOAuthCallbackScreen-CtTG0u9D.js +0 -1
  130. package/dist/assets/InboxNotificationsProvider-CYNlrTK-.js +0 -1
  131. package/dist/assets/InvoicingRoutes-DBwLj6Ir.js +0 -2
  132. package/dist/assets/MagicLinkRoutes-D5UwoWcf.js +0 -72
  133. package/dist/assets/MagicLinkSignInScreen-B_572HKC.js +0 -12
  134. package/dist/assets/MobileAppDrawer-DLFLa7hS.js +0 -1
  135. package/dist/assets/NotFoundScreen-DzxbROot.js +0 -1
  136. package/dist/assets/NotificationRoutes-D7MHUmyT.js +0 -1
  137. package/dist/assets/OAuthConsentScreen-iNKlAsfd.js +0 -1
  138. package/dist/assets/PandLWithForecastRoutes-COCZ3G6X.js +0 -1
  139. package/dist/assets/PeopleRoutes-BkRUXc0D.js +0 -22
  140. package/dist/assets/PerformanceRoutes-BzDFWREu.js +0 -1
  141. package/dist/assets/ReimbursementApprovalRoutes-DPScUcq4.js +0 -1
  142. package/dist/assets/ReimbursementRoutes-DveTyQyE.js +0 -68
  143. package/dist/assets/RewardsRoutes-zL93sOaR.js +0 -1
  144. package/dist/assets/ScreenRoutes-Bl2EONFe.js +0 -2
  145. package/dist/assets/SignInScreen-CGBu1NjI.js +0 -1
  146. package/dist/assets/SignOutScreen-D0F6FeVm.js +0 -9
  147. package/dist/assets/TaskRoutes-DCW1uZnF.js +0 -9
  148. package/dist/assets/TransactionDetailRoutes-CWMSCIXL.js +0 -1
  149. package/dist/assets/TransactionListRoutes-B3tJhd_n.js +0 -1
  150. package/dist/assets/WiseConfirmationScreen-Du3rEKnE.js +0 -12
  151. package/dist/assets/ZeniAccountStatementScreen-DaV7I7ku.js +0 -9
  152. package/dist/assets/epic-D9Y6xcsI.js +0 -2
  153. package/dist/assets/expenseAutomationHelper-iXuIUZiF.js +0 -1
  154. package/dist/assets/getLocaleForTenant-Bgt5rFzV.js +0 -1
  155. package/dist/assets/useActualMatchingMatchDetail-CwcmHDQ8.js +0 -1
  156. package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-BFr557mr.js +0 -1
  157. package/dist/assets/useAskAiCfoHostNavButtonProps-7-6nPEHY.js +0 -1
  158. package/dist/assets/useChargeCardPusherEvents-BVr00Fos.js +0 -1
  159. package/dist/assets/useEmailConnectResultRefresh-HcMCYvt9.js +0 -1
  160. package/dist/assets/useInitialThreadRequest-D4Y8xhXu.js +0 -1
  161. package/dist/assets/useTaskManagerAccess-BeNfkHpZ.js +0 -1
  162. package/dist/assets/useTaskManagerPusherEvents-X_H33C0C.js +0 -1
  163. package/dist/assets/withTransactionSidePanel-DkQdwLfY.js +0 -25
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-vIt7RQvO.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-DSWD_gIh.js"><link rel="modulepreload" crossorigin href="/assets/core-Cc7wW2EM.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-BVJjEVAA.js"><link rel="modulepreload" crossorigin href="/assets/mui-C4zFSCiU.js"><link rel="modulepreload" crossorigin href="/assets/analytics-S5MhEivL.js"><link rel="modulepreload" crossorigin href="/assets/utils-DiIEQ7_h.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-De2R2YuA.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-CWp8Ph3h.js"><link rel="modulepreload" crossorigin href="/assets/core-BBG4mxvC.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-FRanwwFO.js"><link rel="modulepreload" crossorigin href="/assets/mui-B2F_PvWe.js"><link rel="modulepreload" crossorigin href="/assets/analytics-cC2XJoxx.js"><link rel="modulepreload" crossorigin href="/assets/utils-u0mlLj2I.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.64-dev",
3
+ "version": "5.3.65-dev",
4
4
  "files": [
5
5
  "dist/**/*"
6
6
  ],
@@ -28,9 +28,9 @@
28
28
  "@sentry/core": "^9.42.1",
29
29
  "@sentry/react": "^9.42.1",
30
30
  "@stripe/stripe-js": "^4.4.0",
31
- "@zeniai/client-analytics": "2.0.95",
32
- "@zeniai/client-epic-state": "5.2.62",
33
- "@zeniai/web-components": "4.4.1",
31
+ "@zeniai/client-analytics": "2.0.96",
32
+ "@zeniai/client-epic-state": "5.2.63",
33
+ "@zeniai/web-components": "4.4.3",
34
34
  "color": "3.1.3",
35
35
  "crypto-js": "4.2.0",
36
36
  "dnd-core": "^16.0.1",
@@ -1,9 +0,0 @@
1
- import{j as D}from"./liveblocks-CgHUgeBY.js";import{a as o}from"./sentry-DSWD_gIh.js";import{h as H,g as W,u as X,j as m,s as q,l as Y}from"./core-Cc7wW2EM.js";import{aj as Z,N as ee,f as $,z as te,q as G,ak as ne,j as ae,U as ce}from"./index-vIt7RQvO.js";import{bn as se,fF as oe,gV as ie,oB as Q,UK as re,i8 as J,gh as le,os as ue,UL as de,UM as pe,ua as ge,l$ as me,oq as Ae,om as be,ox as fe,ia as Ie,UN as ye,UO as Se}from"./zeni-epic-state-BVJjEVAA.js";import{n as he}from"./mui-C4zFSCiU.js";import{M as Ee}from"./MobileAppDrawer-DLFLa7hS.js";import{q as R}from"./QBOConnectionScreen-DreC-yDW.js";import{g as h,a as E,m as ze}from"./accountMappingHelper-Gh8rpbjD.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="b6c9b4fc-f52a-4004-91d5-c333afa9e0e4",a._sentryDebugIdIdentifier="sentry-dbid-b6c9b4fc-f52a-4004-91d5-c333afa9e0e4")}catch{}})();const l="zeni_pending_projects_enable",u={pending:"pending",ready:"ready"},ve=he.div`
2
- display: flex;
3
- height: 100%;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${a=>a.theme.colors.grey4};
9
- `,we=Y((function(a,e){return{accountMappingView:e.accountMappingView,isFiling1099FeatureEnabled:e.isFiling1099FeatureEnabled,isAccruedExpensesFeatureEnabled:e.isAccruedExpensesFeatureEnabled,isAccountingClassesEnabled:me(a),isAccountingClassesUpdateInProgress:a.companyViewState.passportView?.accountingClassesUpdateStatus?.fetchState==="In-Progress",isAccountingProjectsEnabled:ge(a),isAccountingProjectsUpdateInProgress:(()=>{const i=sessionStorage.getItem(l),c=i===u.pending||i===u.ready;return a.companyViewState.passportView?.accountingProjectsUpdateStatus?.fetchState==="In-Progress"||c})(),isCapitalizationFeatureEnabled:e.isCapitalizationFeatureEnabled,capitalizableAccounts:e.capitalizableAccounts,accountNamesById:e.accountNamesById,capitalizableAccountOverrides:e.capitalizableAccountOverrides,isCapitalizationThresholdSaving:e.isCapitalizationThresholdSaving,onSaveCapitalizationAccountThreshold:e.onSaveCapitalizationAccountThreshold}}),(function(a,e){const{navigate:i,location:c,isFiling1099FeatureEnabled:A}=e;return{onAccountMappingChange:r=>{const{uncategorizedAccountSection:d,billsAccountSection:z,reimbursementsAccountSection:v,vendorsAccountSection:w,filing1099Section:x}=r,{incomeAccount:C,expenseAccount:F}=d,{billPayAccount:s}=z,{reimbursementsAccount:V}=v,{prepaidExpensesAccount:p,fixedAssetsAccount:T,accruedExpensesAccount:O}=w,{bankAccount:M,expenseCategory1099:j}=x,b=h(e.accountMappingView.incomeAccountList,C.selectedOption),k=h(e.accountMappingView.expenseAccountList,F.selectedOption),f=h(e.accountMappingView.billPayAccountList,s.selectedOption),_=h(e.accountMappingView.reimbursementsAccountList,V.selectedOption),P=E(e.accountMappingView.prepaidExpensesAccountList,p.selectedOptions),U=E(e.accountMappingView.fixedAssetsAccountList,T.selectedOptions),I=E(e.accountMappingView.accruedExpensesAccountList,O.selectedOptions),L=E(e.accountMappingView.bankAccounts1099FilingAccountList,M.selectedOptions),y=ze(e.accountMappingView.expenseAccounts1099FilingAccountList,j),t={selectedIncomeAccountId:b?.accountId,selectedExpenseAccountId:k?.accountId,selectedBillPayAccountId:f?.accountId,selectedReimbursementsAccountId:_?.accountId,selectedPrepaidExpensesAccountIds:P.map((n=>n.accountId)),selectedFixedAssetsAccountIds:U.map((n=>n.accountId)),selectedAccruedExpensesAccountIds:I.map((n=>n.accountId)),selectedBankAccounts1099FilingAccountIds:L.map((n=>n.accountId)),selectedExpenseAccounts1099FilingAccountIds:y};a(Se({data:t}))},onBackClick:()=>{G(c)===!1?(i("../../dashboard"),a(ye())):a(J())},onSaveClick:()=>{a(Ie()),A&&ae.track(ce.Event.vendor1099AccountingSettingsSave)},onAccountingClassesToggle:r=>{a(fe(e.currentTenant.companyId,r))},onAccountingProjectsToggle:r=>{const d=sessionStorage.getItem(l);d===u.pending||d===u.ready||a(r?Ae(e.currentTenant.companyId):be(e.currentTenant.companyId))}}}))(ne),_e=()=>{const a=Z(),e=H(),i=W(),c=X(),{useFeatureGate:A,useDynamicConfig:r}=ee(),{isFeatureEnabled:d}=A($.isFiling1099FeatureEnabled),{isFeatureEnabled:z}=A($.isScheduledJEAccruedExpensesFeatureEnabled),{configValue:v,isDynamicConfigLoading:w}=r("transaction_categorization_config"),x=!w&&v?.capitalization_enabled===!0,C=te.getSignedInUser(),F=se(C),s=m((t=>oe(t))),{capitalizableAccounts:V,capitalizableAccountOverrides:p,isCapitalizationThresholdSaving:T,currencySymbol:O}=m((t=>{const n=t.tenantState.currentTenantId,g=n!=null?t.tenantState.tenantsById[n]:void 0,S=ie(t.companyState,s.companyId);return{capitalizableAccounts:g?.capitalizableAccounts??null,capitalizableAccountOverrides:g?.capitalizableAccountOverrides??null,isCapitalizationThresholdSaving:t.companyViewState.passportView?.capitalizationThresholdUpdateStatus?.fetchState==="In-Progress",currencySymbol:S?.company.companyLocaleInfo?.currencySymbol??"$"}}),q),M=o.useCallback(((t,n)=>{c(Q(s.companyId,t,n))}),[c,s.companyId]),j=o.useCallback((t=>{const n={...p??{}},g=Object.entries(t);for(const[B,N]of g)N===null?delete n[B]:n[B]=N;const[S,K]=g[0]??[];S!=null&&c(Q(s.companyId,S,K,void 0,Object.keys(n).length>0?n:null))}),[c,s.companyId,p]),b=m((t=>re(t.accountState)),q),k=o.useMemo((()=>{const t={};for(const n of b)n.accountId!=null&&n.accountName!=null&&(t[n.accountId]=n.accountName);return t}),[b]),[f,_]=o.useState(!1),[P,U]=o.useState(!1);o.useEffect((()=>{f===!1&&(c(J()),_(!0))}),[f]);const I=m((t=>t.companyViewState.passportView?.needsQboProjectsReconnect===!0));o.useEffect((()=>{sessionStorage.getItem(l)===u.pending&&(sessionStorage.removeItem(l),c(le({messageSection:"accounting_projects_qbo_reconnect_failed",messageText:"failed",type:"error"})))}),[c]),o.useEffect((()=>{sessionStorage.getItem(l)===u.ready&&s?.companyId!=null&&(sessionStorage.removeItem(l),c(ue(s.companyId)))}),[s?.companyId,c]),o.useEffect((()=>{I&&s?.tenantEmailDomain!=null&&(sessionStorage.setItem(l,u.pending),c(de()),R.init("/connection/auth",s.tenantEmailDomain),R.handleClick())}),[I,s?.tenantEmailDomain,c]);const L=m((t=>pe(t))),y=t=>{U(t)};return D.jsxs(ve,{children:[D.jsx(Ee,{isAppContentDrawerOpen:P,handleDrawerToggle:y}),D.jsx(we,{currentTenant:s,navigate:e,meetingUrl:a("account_mapping"),accountMappingView:L,isFiling1099FeatureEnabled:d&&F,isAccruedExpensesFeatureEnabled:z,isCapitalizationFeatureEnabled:x,capitalizableAccounts:V,accountNamesById:k,capitalizableAccountOverrides:p,currencySymbol:O,isCapitalizationThresholdSaving:T,onSaveCapitalizationAccountThreshold:M,onSaveCapitalizationAccountThresholds:j,location:i,isSettings:G(i),onClickMenuIcon:()=>y(!0)})]})};export{l as P,_e as U,u as a};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-CgHUgeBY.js";import{a as k}from"./sentry-DSWD_gIh.js";import{a5 as I,dQ as g}from"./index-vIt7RQvO.js";import"./mui-C4zFSCiU.js";import{u as y}from"./useActualMatchingMatchDetail-CwcmHDQ8.js";import b from"./NotFoundScreen-DzxbROot.js";import{i as v,h as U,g as w}from"./core-Cc7wW2EM.js";import"./zeni-epic-state-BVJjEVAA.js";import"./recharts-DJGeJ2v_.js";import"./analytics-S5MhEivL.js";import"./plaid-vsHcqLdj.js";import"./dnd-DEyyKSEC.js";import"./stripe-cKAAJElX.js";import"./lottie-C1A2hiZE.js";import"./lexical-DXgKWO29.js";import"./pdf-rXyPRm1U.js";import"./utils-DiIEQ7_h.js";import"./stripSplatSuffix-kLnY55Qt.js";import"./decodeURIComponentSafe-DhqIXi_U.js";import"./routePaths-C0UIXwMQ.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="0b9cbf63-f788-4a28-96e6-d5ee605ae585",t._sentryDebugIdIdentifier="sentry-dbid-0b9cbf63-f788-4a28-96e6-d5ee605ae585")}catch{}})();function J(){const{matchId:t,tenantEmailDomain:e}=v(),n=U(),r=w(),R=y(t??""),a=k.useCallback((()=>{const S=I(r.state?.pathnameStackToGoBack);n(S.poppedPathname??`/${e??""}/month_end_close_checks/review`,{state:{pathnameStackToGoBack:S.newStack}})}),[r.state,n,e]);if(t==null)return s.jsx(b,{});const{match:i,detailFetchState:o,handleOpenBill:l,handleRefresh:c,handleUndoReversal:d,handleContinueMatch:h,lastMatchResults:f,lastUndoResults:m,refreshStatus:p,undoReversalStatus:u}=R;return i==null?o.fetchState==="Not-Started"||o.fetchState==="In-Progress"?s.jsx(g,{detailFetchState:o.fetchState,isUndoInFlight:u.fetchState==="In-Progress",refreshStatus:p.fetchState,onNavigateBack:a,onOpenBill:l,onContinueMatch:()=>{h(),a()},onRefresh:c,onUndoReversal:d,lastMatchResults:f,lastUndoResults:m}):s.jsx(b,{}):s.jsx(g,{match:i,detailFetchState:o.fetchState,isUndoInFlight:u.fetchState==="In-Progress",refreshStatus:p.fetchState,onNavigateBack:a,onOpenBill:l,onContinueMatch:()=>{h(),a()},onRefresh:c,onUndoReversal:d,lastMatchResults:f,lastUndoResults:m})}export{J as default};
@@ -1 +0,0 @@
1
- import{j as e}from"./liveblocks-CgHUgeBY.js";import{A as i}from"./AddressScreen-CrPViFiu.js";import s from"./NotFoundScreen-DzxbROot.js";import"./sentry-DSWD_gIh.js";import{n as d,o as r}from"./core-Cc7wW2EM.js";import"./zeni-epic-state-BVJjEVAA.js";import"./recharts-DJGeJ2v_.js";import"./index-vIt7RQvO.js";import"./mui-C4zFSCiU.js";import"./analytics-S5MhEivL.js";import"./plaid-vsHcqLdj.js";import"./dnd-DEyyKSEC.js";import"./stripe-cKAAJElX.js";import"./lottie-C1A2hiZE.js";import"./lexical-DXgKWO29.js";import"./pdf-rXyPRm1U.js";import"./utils-DiIEQ7_h.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,10 +0,0 @@
1
- import{j as d}from"./liveblocks-CgHUgeBY.js";import{a as o,R as ya}from"./sentry-DSWD_gIh.js";import{u as Me,j as r,g as Ta,h as $a,q as Z}from"./core-Cc7wW2EM.js";import{fF as Fe,T_ as Ba,T$ as Ue,g9 as xa,gv as K,U0 as W,jE as Ie,jc as ve,U1 as Aa,U2 as _a,gO as Da,p$ as Ma,U3 as Fa,U4 as ye,gm as Ua,U5 as $,fE as Ra,gt as Za,U6 as Ga,U7 as Va,U8 as ja,U9 as Te,Ua as Ha,Ub as $e,Uc as Na,Eb as Pa,gn as La,h1 as Oa,cV as za,Ud as qa,Ue as Ya,qC as Ja,g8 as Ka,j6 as Wa,Uf as Qa,Ug as Xa,wu as et,go as at}from"./zeni-epic-state-BVJjEVAA.js";import{w as tt,i as nt,a as ot,F as st,E as rt,N as it,f as m,c as lt,u as dt,d as ct,V as ut,e as mt,g as Ct,B as pt,h as ht,l as ft,z as gt,j as G,p,m as Be,k as bt,n as St,o as xe,q as kt,D as Ae,r as Et,s as wt,v as X,x as Q,y as It,A as vt,C as yt,L as Tt,H as $t,I as Bt,J as ee,K as xt,O as At}from"./index-vIt7RQvO.js";import{A as _t,b as Dt,I as Mt,a as _e,d as Ft,D as De}from"./mui-C4zFSCiU.js";import{u as Ut}from"./InboxNotificationsProvider-CYNlrTK-.js";import{u as Rt}from"./useTaskManagerAccess-BeNfkHpZ.js";import{u as Zt}from"./expenseAutomationHelper-iXuIUZiF.js";import"./recharts-DJGeJ2v_.js";import"./analytics-S5MhEivL.js";import"./plaid-vsHcqLdj.js";import"./dnd-DEyyKSEC.js";import"./stripe-cKAAJElX.js";import"./lottie-C1A2hiZE.js";import"./lexical-DXgKWO29.js";import"./pdf-rXyPRm1U.js";import"./utils-DiIEQ7_h.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},C=new a.Error().stack;C&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[C]="7dcc849f-1712-4677-8e90-8f3bc77b754f",a._sentryDebugIdIdentifier="sentry-dbid-7dcc849f-1712-4677-8e90-8f3bc77b754f")}catch{}})();const B="AppDrawer",c={root:`${B}-root`,drawer:`${B}-drawer`,appBar:`${B}-appBar`,menuButton:`${B}-menuButton`,appBarZenilogo:`${B}-appBarZenilogo`,drawerZenilogo:`${B}-drawerZenilogo`},Gt=ee("div",{slot:"Root"})((({theme:a})=>({[`&.${c.root}`]:{display:"flex"},[`& .${c.drawer}`]:{[a.breakpoints.up("md")]:{width:X,flexShrink:0,backgroundColor:a.colors.background}},[`& .${c.appBar}`]:{color:a.colors.primary,backgroundColor:a.colors.background,boxShadow:"none"},"& .MuiToolbar-root":{backgroundColor:a.colors.background},[`& .${c.menuButton}`]:{marginRight:a.spacing(2),[a.breakpoints.up("md")]:{display:"none"}},[`& .${c.appBarZenilogo}`]:{fill:a.colors.primary,cursor:"pointer",width:"100%",marginLeft:a.spacing(-6)},[`& .${c.drawerZenilogo}`]:{margin:`${a.spacing(3)} ${a.spacing(3)} ${a.spacing(0)}`,fill:a.colors.primary,cursor:"pointer"}}))),Vt=tt((function({tenantEmailDomain:a}){const{isAiCfoOpen:C,setIsAiCfoOpen:b}=ot(),[V,A]=ya.useState(!1),[S,Re]=o.useState(!1),t=Ta(),s=$a(),ae=xa(),te=st(),n=Me(),[Ze,Ge]=o.useState(!1),j=rt(),ne=t.pathname.includes("/ai-cfo/");o.useEffect((()=>{ne||(n(K()),n(W()))}),[n,ne]),o.useEffect((()=>{n(K()),n(W())}),[n,a]);const{useFeatureGate:u}=it(),{isFeatureEnabled:oe}=u(m.isDebitCardFeatureEnabled),k=lt(),i=r((e=>Fe(e))),H=i.masterTOSInfo?.isMasterTOSAccepted??!1,{setLoading:Ve}=dt(),E=ct(),{isTaskManagerAccessEnabled:_,isZeniUser:je}=Rt(k),se=ut(),w=mt();o.useEffect((()=>{w&&E&&(n(Ie()),n(ve()))}),[n,w,i.tenantId,E]);const[N,He]=o.useState(void 0),Ne=!!i.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:Pe}=u(m.isChargeCardFeatureEnabled),Le=Ct(i,Pe,oe),{isFeatureEnabled:Oe}=u(m.isSettingsFeatureEnabled),{isFeatureEnabled:D}=u(m.isReferralFeatureEnabled),ze=i.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",re=r((e=>Aa(e)));o.useEffect((()=>{const e=()=>{Ge(window.scrollY>10)};return window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}}),[]);const P=r((e=>_a(e))),h=r((e=>e.expenseAutomationViewState.selectedPeriodByTenantId)),f=r((e=>Da(e))),{monthEndCloseChecksView:I}=f,qe=Z("/signout")!==null,M=Z("/:tenantEmailDomain/dashboard")!==null,ie=Z("/:tenantEmailDomain/reports")!==null,g=Z("/:tenantEmailDomain/onboarding/*")!==null,le=Zt();o.useEffect((()=>{w&&D&&!g&&P.fetchState==="Not-Started"&&n(Ma(!0))}),[w,D,P.fetchState,g]),o.useEffect((()=>{if(le){const e=t.state?.origin;if(e!=null){const l=Fa(e);l!=null&&n(ye(l))}}}),[le,t.state]);const Ye=qe||g,L=r((e=>e.tenantState)),Je=r((e=>L.fetchState==="Completed"?Ua(e):[])),{isFeatureEnabled:Ke}=u(m.isApAgingFeatureEnabled),{isFeatureEnabled:We}=u(m.isArAgingFeatureEnabled),{isFeatureEnabled:Qe}=u(m.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:Xe}=u(m.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:ea}=u(m.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:aa}=u(m.isDashboardSidebarNewYearAnimationEnabled),ta=r((e=>$(e).totalUnreadCount)),na=r((e=>$(e).notificationDetailsByTab.tasks.uiState.unreadCount)),oa=r((e=>$(e).notificationDetailsByTab.comments.uiState.unreadCount)),sa=r((e=>$(e).reducedFetchCountState)),de=r((e=>$(e).notificationDetailsByTab.tasks.fetchCountState)),O=r((e=>Ra(e))),ra=r((e=>Za(e).skillsEnabled)),ia=r((e=>Ga(e))),ce=r((e=>Va(e).routines)),la=o.useMemo((()=>ce.filter((e=>e.sessionId!=null)).map((e=>({cadence:pt(e),name:e.name,scheduleId:e.scheduleId,sessionId:e.sessionId,unreadRuns:e.unreadRuns})))),[ce]),da=new URLSearchParams(t.search).get("routine")??ht(t.pathname.split("/ai-cfo/")[1])??void 0,ca=o.useCallback(((e,l)=>{s(l!=null&&l!==""?`/${a}/ai-cfo/${encodeURIComponent(l)}`:`/${a}/ai-cfo/routines?routine=${encodeURIComponent(e)}`)}),[s,a]),{status:ue}=r(ja),[v,z]=o.useState(void 0),q=O.uiState.currentChatSessionId,F=v!=null?O.deleteChatSessionStateByChatSessionId[v]?.fetchState:void 0,me=ft(F),{inboxNotifications:Y,isLoading:Ce,isFetchingMore:pe,hasFetchedAll:he,fetchMore:ua}=Ut(),U=r((e=>$(e).notificationDetailsByTab.comments.fetchCountState));o.useEffect((()=>{const e=setTimeout((()=>ua?.()),0);return()=>clearTimeout(e)})),o.useEffect((()=>{if(v!=null)return me==="In-Progress"&&F==="Completed"?(n(Te({chatSessionId:v})),z(void 0),void s(`/${a}/ai-cfo/explore`,{state:{...t.state,referrer:"Sidebar"}})):void(F==="Error"&&(n(Te({chatSessionId:v})),z(void 0)))}),[n,t.state,s,F,v,me,a]),o.useEffect((()=>{if(Ce===!1&&pe===!1&&he===!0&&i?.companyId!=null&&Y!=null){const e=`dashboard_${i.companyId}`;He(Y.filter((l=>l.roomId===e&&l.readAt==null)).length)}}),[Ce,pe,he,i?.companyId,Y]),o.useEffect((()=>{w&&_&&!g&&de.fetchState==="Not-Started"&&ae.tenantId!=null&&n(Ha("task_manager","dashboard"))}),[w,_,g,de.fetchState,ae.tenantId,n]),o.useEffect((()=>{g||U.fetchState!=="Not-Started"||n($e({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[g,U.fetchState,n]),o.useEffect((()=>{if(N!=null){const{fetchState:e}=U;e!=="In-Progress"&&e!=="Completed"||(e==="In-Progress"&&n($e({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),n(Ue({unreadCount:N},"comments")))}}),[N,U.fetchState]);const ma={fetchStatus:sa,count:ta},y=[];Ke===!1&&y.push("accounts_payable_aging"),We===!1&&y.push("accounts_receivable_aging"),y.push("zeni_accounts_promo_card","treasury_promo_card"),D===!1&&y.push("rewards_card"),se===!1&&y.push("expense_automation_card");const fe=r((e=>Na(e,y).fetchState)),ge=r((e=>Pa(e).fetchState)),be=a!=null?gt.getSignedInUserTenant(a):null,Se=r((e=>be?.tenantId!=null?La(e,be.tenantId):void 0)),Ca=M&&(fe==="Completed"||fe==="Error")||ie&&(ge==="Completed"||ge==="Error")||!M&&!ie?void 0:"disabled",pa=o.useMemo((()=>Oa(i.userRole)),[i.userRole]),ha=za(pa),T=e=>{A(e)},fa=ze,ga=i?.rewardsLastViewedTime==null,ba=k?.userEmail!=null&&re.fetchState==="Completed"&&qa(re.notificationSettings,k.userEmail,oe,i,_),Sa=o.useCallback((e=>{const l=t.state?.referrer;if(I.monthEndCloseChecks?.auditSummary!=null&&G.trackMonthCloseAuditPage(e.month,e.year,I.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",I.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,l??null),n(Ya(i.tenantId,e)),h[i.tenantId]!=null){const x=p(t.state?.pathnameStackToGoBack,t.pathname);s(`/${a}/month_end_close_checks/review/${f.currentSelectedView}/${e.month}-${e.year}`,{state:{pathnameStackToGoBack:x,referrer:f.currentSelectedView}})}n(ye(f.currentSelectedView)),f.reconciliation.selectedAccountId!=null&&n(Ja({selectedAccountId:void 0}))}),[f.reconciliation.selectedAccountId,f.currentSelectedView,i.tenantId,I.monthEndCloseChecks?.auditSummary,I.monthEndCloseChecks?.reportEmailSentDate,h,a,t.state,t.pathname]),ka=o.useMemo((()=>({zIndex:S?12:Be[2]})),[S]),Ea=E&&bt(t),ke=d.jsx(St,{signedInUser:k,currentTenantId:L.currentTenantId??"",tenants:L.fetchState==="Completed"?Je:Se!=null?[Se]:[],rewardsConfiguration:{isRewardsTabVisible:D,isRewardsAnimated:ga,rewardsPlan:P.rewardsPlan},selectedMenu:C===!0?Ae("ai_cfo"):xe(t)&&ue!=="completed"?Ae("invoicing"):Et(t),isTenantDropdownDisabled:Ca,isSettings:kt(t),isInvoicing:xe(t)&&ue==="completed",isSettingsFeatureEnabled:Oe,currentTenant:i,isVendorsTabVisible:ha,isZeniAccountEnabled:Ne,isChargeCardEnabled:Le,isTreasuryEnabled:fa,isNotificationsTabVisible:ba,notificationCountDetails:ma,isExpenseAutomationEnabledForUser:se,isAiCfoAccessEnabled:E,skillsEnabled:ra&&E,routinesEnabled:ia===!0&&E,routines:la,selectedRoutineId:da,onRoutineSelect:ca,onNotificationIconClick:()=>{T(!1);const e=je?na===0&&oa>0?"notifications/comments":"notifications/tasks":"notifications/comments",l=p(t.state?.pathnameStackToGoBack,t.pathname);s(`${a}/${e}`,{state:{pathnameStackToGoBack:l}})},onZeniLogoClick:()=>{te.toggle()},handleTenantSelect:e=>{Ve(Tt.TENANT_SWITCHING),T(!1),$t({dispatch:n,navigate:s,pathToNavigate:Bt(e.tenantEmailDomain,t),selectedTenant:e,signedInUser:k})},handleMenuChange:(e,l)=>{if(k!=null&&G.trackSidePanelClicked(e.type,e.group),T(!1),a==null)return;if(e.type==="routines")return H?(n(ve()),n(Qa()),void s(`/${a}/ai-cfo/routines`,{state:{pathnameStackToGoBack:p(t.state?.pathnameStackToGoBack,t.pathname),referrer:"Sidebar"}})):void Q({location:t,navigate:s,mergeState:{referrer:"Sidebar"}});if(e.type==="skills")return H?(n(Ie()),n(Xa()),void s(`/${a}/ai-cfo/skills`,{state:{pathnameStackToGoBack:p(t.state?.pathnameStackToGoBack,t.pathname),referrer:"Sidebar"}})):void Q({location:t,navigate:s,mergeState:{referrer:"Sidebar"}});if(n(K()),n(W()),e.type==="invoicing")return C&&b(!1),n(et({cacheOverride:!1})),void s(`../${a}/invoicing/overview`,{state:{pathnameStackToGoBack:p(t.state?.pathnameStackToGoBack,t.pathname),referrer:"Sidebar"}});if(C&&It(e.type)&&b(!1),e.type==="ai_cfo"){if(G.trackAICFOChatScreenStateChanged("viewed","left_menu",q??null,null),!H)return void Q({location:t,navigate:s,mergeState:{referrer:"Sidebar"}});const R=p(t.state?.pathnameStackToGoBack,t.pathname);return void s(`/${a}/ai-cfo/explore`,{state:{pathnameStackToGoBack:R,referrer:"Sidebar"}})}const x=p(t.state?.pathnameStackToGoBack,t.pathname),J=e.type,we=At(J)&&J!=="command_center";if(J!=="command_center"&&!we||h[i.tenantId]==null||G.trackMonthEndCloseClicked(h[i.tenantId].month,h[i.tenantId].year,"Sidebar"),we&&h[i.tenantId]!=null){const R=h[i.tenantId];return void s(`/${a}/month_end_close_checks/review/${e.type}/${R.month}-${R.year}`,{state:{pathnameStackToGoBack:x,message:l,referrer:"Sidebar"}})}const va=vt(e.type);yt(e.type)?(q!=null&&n(at()),s(`/${a}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:x.slice(0,-1),message:l,referrer:"Sidebar"}})):s(`../${a}/${va}`,{state:{pathnameStackToGoBack:x,message:l,referrer:"Sidebar"}})},onDeleteChatSession:e=>{n(Wa(e)),q===e&&z(e)},handleLogOutClick:()=>{T(!1);const e=p(t.state?.pathnameStackToGoBack,t.pathname);s("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMyProfileClick:()=>{s(`${a}/settings/my_profile`)},handleReferralsClick:()=>{s(`${a}/rewards/refer`)},handleBackClick:()=>{s(`${a}/dashboard`)},handleCockpitClick:()=>{window.open("/cockpit")},monthEndCloseChecksView:I,onPeriodChange:Sa,onCalendarOpen:Re,aiCfoView:O,isAiCfo:Ea,isOnDashboard:M,isTaskManagerAccessEnabled:_,updateCurrentChatSessionId:e=>{n(Ka({sessionId:e,agentId:"controller"})),s(`../${a}/ai-cfo/${e}`,{state:{...t.state}})},halloweenAnimationEnabled:Qe,thanksGivingAnimationEnabled:Xe,christmasAnimationEnabled:ea,newYearAnimationEnabled:aa}),wa=d.jsx(_t,{position:"fixed",className:c.appBar,style:{borderBottom:Ze?`1px solid ${j.colors.grey2}`:""},children:d.jsxs(Dt,{style:{minHeight:wt},children:[d.jsx(Mt,{color:"inherit","aria-label":"open drawer",edge:"start",onClick:()=>T(!0),className:c.menuButton,size:"large",children:d.jsx(jt,{})}),d.jsx(Ht,{className:c.appBarZenilogo,onClick:()=>{te.toggle()}})]})}),Ee=_e((e=>e.breakpoints.up("md"))),Ia=_e((e=>e.breakpoints.down("md")));return a==null?null:d.jsxs(Gt,{className:c.root,children:[d.jsx(Ft,{}),Ye===!1?d.jsxs(d.Fragment,{children:[Ee||!M?null:wa,d.jsxs("nav",{className:c.drawer,children:[Ee?null:d.jsx(De,{container:window.document.body,variant:"temporary",open:V,onClose:()=>T(!1),PaperProps:{sx:{width:X,zIndex:Be[2],borderRight:"none",backgroundImage:"none",backgroundColor:j.colors.background}},ModalProps:{keepMounted:!0},children:ke}),Ia?null:d.jsx(De,{PaperProps:{sx:{width:X,borderRight:"none",backgroundImage:"none",backgroundColor:j.colors.background,...ka}},variant:"permanent",open:!0,children:ke})]})]}):null]})})),r1=({tenantEmailDomain:a})=>{const C=Me(),b=r((A=>Fe(A))),V={events:b.userRoleId!=null?[`private-encrypted-${b.userRoleId}.dashboard-user-notification`]:[],eventCallback:(A,S)=>{nt(S)&&Ba(S.mode)==="dashboard"&&C(Ue({unreadCount:S.data.unread},"tasks"))}};return d.jsx(Vt,{tenantEmailDomain:a,...V})},jt=ee((a=>o.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...a},o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.604839 4.51889C0.333157 4.57797 0.0879194 4.8318 0.0182541 5.12602C-0.00534674 5.22569 -0.00534674 5.4412 0.0182541 5.54086C0.0523791 5.685 0.117181 5.80198 0.22956 5.92229C0.346814 6.04782 0.459133 6.11627 0.600351 6.14826C0.726193 6.17676 23.2738 6.17676 23.3997 6.14826C23.5409 6.11627 23.6532 6.04782 23.7704 5.92229C23.9348 5.74632 24 5.57908 24 5.33344C24 5.1793 23.9797 5.08352 23.9199 4.95575C23.8455 4.79698 23.6879 4.63709 23.5343 4.56468C23.3857 4.49468 24.2116 4.49926 11.9899 4.50058C2.66632 4.50157 0.669677 4.50479 0.604839 4.51889ZM0.669895 11.1732C0.365117 11.2113 0.0889356 11.4752 0.0182179 11.7958C-0.00468131 11.8996 -0.00469357 12.0996 0.0181935 12.2034C0.0806855 12.4867 0.305734 12.7294 0.581516 12.8108C0.65573 12.8327 1.1761 12.8337 12 12.8337C22.8591 12.8337 23.3441 12.8327 23.4192 12.8106C23.6933 12.7297 23.9196 12.4855 23.9818 12.2034C24.0047 12.0996 24.0047 11.8997 23.9818 11.7959C23.9201 11.516 23.7014 11.2776 23.425 11.1888C23.3558 11.1665 22.8817 11.1655 12.0544 11.164C5.84032 11.1631 0.717278 11.1672 0.669895 11.1732ZM0.594774 17.8516C0.458952 17.8831 0.344939 17.9535 0.22956 18.077C0.0652015 18.253 0 18.4202 0 18.6659C0 18.82 0.0203225 18.9158 0.0801289 19.0435C0.154452 19.2023 0.312097 19.3622 0.465726 19.4346C0.614214 19.5046 -0.209758 19.4999 12 19.4999C21.8294 19.4999 23.3082 19.4975 23.3881 19.4811C23.6596 19.4256 23.9122 19.1669 23.9817 18.8733C24.0053 18.7736 24.0053 18.5581 23.9817 18.4584C23.9476 18.3143 23.8828 18.1973 23.7704 18.077C23.6532 17.9515 23.5409 17.883 23.3997 17.851C23.2779 17.8235 0.713601 17.824 0.594774 17.8516Z",fill:"currentColor"}))))`
2
- height: 20px;
3
- width: 20px;
4
- color: ${a=>a.theme.colors.primary};
5
- `,Ht=ee((a=>o.createElement("svg",{viewBox:"0 0 102 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...a},o.createElement("path",{d:"M73.4046 13.2609H57.77C58.0392 15.0844 58.8324 16.5249 60.352 17.5133C61.5784 18.3113 62.9424 18.5733 64.3842 18.407C64.8867 18.3484 65.3952 18.2539 65.8738 18.0935C67.1433 17.6676 68.0945 16.8923 68.4559 15.5031H73.2777C73.1629 16.3885 72.8877 17.1866 72.4845 17.938C71.4734 19.8189 69.9228 21.1159 67.9414 21.8302C64.3076 23.138 60.7875 22.9178 57.5642 20.6588C55.1293 18.9526 53.7318 16.5465 53.3034 13.6055C52.9959 11.4973 53.2065 9.43809 54.1374 7.49857C55.6988 4.2453 58.2761 2.29381 61.8273 1.67642C64.048 1.28995 66.2124 1.54361 68.2202 2.60969C71.2784 4.23333 73.0085 6.79743 73.4405 10.2314C73.5649 11.2161 73.5374 12.202 73.407 13.2621L73.4046 13.2609ZM68.3554 9.72765C68.3278 9.51706 68.3159 9.334 68.2788 9.15692C68.0622 8.12913 67.4915 7.32388 66.6767 6.68735C65.7697 5.97902 64.7264 5.68349 63.5825 5.62486C61.0543 5.49444 58.8289 7.02356 58.0918 9.44408C58.0655 9.52903 58.0595 9.62116 58.0416 9.72765H68.3566H68.3554Z",fill:"currentColor"}),o.createElement("path",{d:"M52.7423 17.86V21.9162C52.7423 22.0478 52.6346 22.1555 52.503 22.1555H34.5854C34.5854 22.1555 34.595 19.9659 34.5783 19.1008C34.5723 18.7861 34.662 18.5528 34.8786 18.3183C38.3664 14.535 41.8458 10.7445 45.3276 6.95397C45.452 6.81877 45.744 6.49093 45.744 6.49093H35.6396C35.5079 6.49093 35.4003 6.38324 35.4003 6.25163V2.14645C35.4003 2.01483 35.5079 1.90715 35.6396 1.90715H52.6334C52.6334 1.90715 52.6274 4.18288 52.6418 5.17239C52.6454 5.41767 52.5341 5.57321 52.3833 5.73713C50.1543 8.15884 41.5048 17.6219 41.5048 17.6219H52.5042C52.6358 17.6219 52.7435 17.7296 52.7435 17.8612L52.7423 17.86Z",fill:"currentColor"}),o.createElement("path",{d:"M94.0631 22.0758H89.7353C89.6037 22.0758 89.496 21.9694 89.496 21.8377C89.4925 20.5539 89.4733 14.3919 89.4769 11.3696C89.4769 10.6397 89.4195 9.92064 89.2041 9.21829C88.6142 7.29553 87.0528 6.12056 85.0367 6.07151C83.7122 6.0392 82.5288 6.37542 81.58 7.34578C80.8406 8.10196 80.4386 9.02686 80.2998 10.0642C80.2388 10.5213 80.2148 10.9879 80.2136 11.4498C80.2076 14.429 80.2088 20.5539 80.21 21.8365C80.21 21.9682 80.1023 22.0758 79.9707 22.0758H75.6047C75.4731 22.0758 75.3654 21.9705 75.3654 21.8389C75.3606 20.512 75.3403 13.9576 75.387 10.6349C75.4205 8.27546 76.1838 6.1433 77.78 4.36411C79.2062 2.77516 80.9973 1.84189 83.1056 1.52243C84.8441 1.258 86.5658 1.3286 88.2254 1.93642C91.4727 3.12454 93.3954 5.47924 94.093 8.83302C94.2557 9.61314 94.3072 10.4268 94.3131 11.226C94.3335 14.3321 94.3083 20.5503 94.3036 21.8401C94.3036 21.9717 94.1959 22.077 94.0643 22.077L94.0631 22.0758Z",fill:"currentColor"}),o.createElement("path",{d:"M97.2196 1.90527H101.482C101.613 1.90527 101.721 2.01176 101.721 2.14338L101.772 21.9035C101.772 22.0363 101.666 22.144 101.533 22.144H97.2256C97.094 22.144 96.9863 22.0363 96.9863 21.9047L96.9803 2.14457C96.9803 2.01296 97.088 1.90527 97.2196 1.90527Z",fill:"currentColor"}),o.createElement("path",{d:"M17.1795 0.0270299C16.9776 -0.0551712 16.7491 0.057251 16.6911 0.267589C16.6706 0.342537 16.6476 0.417486 16.6234 0.491225C16.4022 1.1573 16.0299 1.76655 15.5197 2.27789C14.6566 3.14221 13.5082 3.61971 12.2861 3.62091H12.2825C11.0627 3.62091 9.91435 3.14584 9.05124 2.28394C8.54111 1.77381 8.16636 1.16455 7.94394 0.499687C7.91976 0.425947 7.89679 0.350999 7.87503 0.276051C7.81701 0.0657128 7.58854 -0.0455005 7.38666 0.0367007C6.20321 0.522655 5.108 1.17906 4.13125 1.97447C4.00795 2.07481 3.96806 2.24525 4.02729 2.39273C4.07686 2.51603 4.13004 2.63813 4.18565 2.7578C4.62204 3.70916 5.22888 4.58557 5.99166 5.34714C7.67316 7.02501 9.90589 7.94977 12.2813 7.94977H12.2897C14.6675 7.94736 16.9027 7.01897 18.5829 5.33626C19.3445 4.57348 19.9489 3.69586 20.3841 2.7445C20.4397 2.62362 20.4917 2.50153 20.5413 2.37823C20.6005 2.23075 20.5606 2.0603 20.4373 1.95997C19.4594 1.16576 18.3629 0.511775 17.1795 0.0270299Z",fill:"#97C3B9"}),o.createElement("path",{d:"M20.3984 21.2422C19.962 20.2933 19.3564 19.4193 18.596 18.6602C16.9133 16.9799 14.6733 16.0527 12.2979 16.0575C8.71131 16.0611 5.61789 18.196 4.2108 21.2604C4.1564 21.38 4.10321 21.5009 4.05244 21.623C3.992 21.7705 4.03189 21.9422 4.1564 22.0437C5.13435 22.8367 6.22956 23.4895 7.41181 23.973C7.61369 24.0552 7.84095 23.944 7.90018 23.7337C7.92073 23.6575 7.9437 23.5838 7.96908 23.5088C8.57713 21.698 10.2876 20.3888 12.3016 20.3864H12.3064C13.5261 20.3864 14.6745 20.8615 15.5376 21.7234C16.0466 22.2311 16.4189 22.8379 16.6413 23.5004C16.6667 23.5741 16.6897 23.649 16.7102 23.724C16.7694 23.9343 16.9967 24.0455 17.1986 23.9621C18.382 23.4762 19.476 22.821 20.4528 22.0256C20.5761 21.9252 20.616 21.7536 20.5567 21.6061C20.5072 21.4828 20.454 21.3619 20.3984 21.241V21.2422Z",fill:"#97C3B9"}),o.createElement("path",{d:"M0.494416 9.85376C0.31309 9.85376 0.161985 9.98795 0.13539 10.1669C0.045936 10.7676 0 11.3829 0 12.0091C0 12.6401 0.0483536 13.2603 0.141434 13.8659C0.169238 14.0448 0.320343 14.1778 0.501669 14.1778L24.0934 14.1427C24.2747 14.1427 24.4258 14.0086 24.4524 13.8296C24.5419 13.2288 24.589 12.6135 24.5878 11.9862C24.5878 11.3551 24.5395 10.735 24.4464 10.1294C24.4186 9.95047 24.2675 9.8175 24.0862 9.8175L0.494416 9.85256V9.85376Z",fill:"#97C3B9"}))))`
6
- height: ${xt.sp4};
7
- width: 102px;
8
- color: ${a=>a.theme.colors.primary};
9
- cursor: pointer;
10
- `;export{r1 as default};
@@ -1,14 +0,0 @@
1
- import{j as S}from"./liveblocks-CgHUgeBY.js";import{a as l}from"./sentry-DSWD_gIh.js";import{u as pe,h as he,g as Ce,j as M,i as fe,l as ge}from"./core-Cc7wW2EM.js";import{a as Se,e7 as be,z as ye,e9 as Pe,eb as N,ec as we,bp as W,a9 as Ie,j,ed as H,en as Ee,G as ke,U as Ae,w as xe,eg as Te,eh as Ue,aw as _e,ek as Oe,el as ve,bl as Qe,em as Fe}from"./index-vIt7RQvO.js";import{gK as je,fE as G,fF as $e,g8 as De,jl as Le,jh as Ve,fG as z,gu as qe,go as Re,gq as B,gw as Me,gx as He,gy as ze,gz as Be,gA as Ne}from"./zeni-epic-state-BVJjEVAA.js";import{D as We,n as D,P as Ge,S as Ke}from"./mui-C4zFSCiU.js";import"./recharts-DJGeJ2v_.js";import"./analytics-S5MhEivL.js";import"./plaid-vsHcqLdj.js";import"./dnd-DEyyKSEC.js";import"./stripe-cKAAJElX.js";import"./lottie-C1A2hiZE.js";import"./lexical-DXgKWO29.js";import"./pdf-rXyPRm1U.js";import"./utils-DiIEQ7_h.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="2e6bd76d-48f0-4173-aa4f-6ebfccd03e03",e._sentryDebugIdIdentifier="sentry-dbid-2e6bd76d-48f0-4173-aa4f-6ebfccd03e03")}catch{}})();const K="chat-response-generated",Y="cards/ask",J="card_policy_hero";function $(e){return`/${e}/cards`}function X(e){return`/${e}/cards/policy`}const Ye=ge((function(e,a){const o=G(e),c=a.isSubmitting,d=Ue(e,{allUsers:a.allUsers,onCardPolicyVendorSearchTextChange:a.onCardPolicyVendorSearchTextChange});return{showSampleQuestions:a.sessionFromUrl==="new_chat"&&o.uiState.currentChatSessionId==null,aiCfoView:o,isSubmitting:c,isNewChatSession:a.sessionFromUrl==="new_chat",isFullView:!0,tableDownloadEndPoint:`${_e}/tableDownload`,exportDownloadEndPoint:Oe(),emailLinkQuestion:a.emailLinkQuestion,autoSubmitEmailLinkQuestion:a.autoSubmitEmailLinkQuestion,onEmailLinkQuestionProcessed:a.onEmailLinkQuestionProcessed,isFileUploadEnabled:a.isFileUploadEnabled,isUploadPromoVisible:a.isUploadPromoVisible,onUploadPromoClose:a.onUploadPromoClose,...d}}),(function(e,a){const{location:o,currentTenant:c,userId:d,navigate:m,currentChatSessionId:h,allSessionsWithOrderedQuestionAnswers:E,isAiCardCreationEnabled:x,isCardPolicyEnabled:T,cardPolicyPageContext:U}=a,i=c.tenantEmailDomain,C=o.state?.referrer,p=C===J?X(i):$(i);return{onEventReceived:(n,t)=>{if(n===K&&typeof t.text=="string"&&typeof t.metadata=="object"){const s=t,f=He(s.type),b=s.metadata.chat_session_id??null,{currentChatSession:y,currentQuestionAnswer:u,currentQuestionAnswerSummary:P}=W(E,b);f!=="answer"?j.trackAICFOChatResponseGenerated(f,u?.question.questionText??"",s.text,b,Fe(P,y),s.metadata.message_id??null):j.trackAICFOChatAnswerGenerated(s.text,u?.question.questionText??"",(s.follow_up_questions?.length??0)>0,!!s.assumptions,!!s.insights,s.visualization!=null,ze(s.visualization?.type??"")??null,b,s.summarized_title,s.metadata.message_id??null),e(Be({chatSessionId:s.metadata.chat_session_id,responseType:f,fetchState:{fetchState:"Completed",error:void 0}})),e(Ne({chatSessionId:s.metadata.chat_session_id,answerPayload:s,userId:d}))}},onSubmit:(n,t,s,f)=>{n&&Qe(e,n,t,h,E,d,f,s,U)},updateCurrentInput:n=>{e(B(n))},onStopSubmit:()=>{},onUpdateScrollYOffset:n=>{e(Me(n))},onSelectSampleQuestion:()=>{},onBackClick:()=>{m(-1)},onCloseClick:()=>{m(p,{state:{...o.state}}),e(B(""))},togglePageView:()=>{m(p,{state:N(o.state)}),a.setIsAiCfoOpen(!0)},onCopy:()=>{},onThumbsUp:()=>{},onThumbsDown:()=>{},onTogglePageView:()=>{m(-1)},onNewChatClick:()=>{h!=null&&e(Re()),m((function(n){return`/${n}/${Y}`})(i),{state:{...o.state}})},onToggleCotCollapsed:(n,t)=>{e(qe({questionAnswerId:n,isCollapsed:t}))},...ve(e,{isAiCardCreationEnabled:x,isCardPolicyEnabled:T,currentChatSessionId:h,onAfterCardsCreationSubmit:()=>{a.setIsAiCfoOpen(!0),m($(i),{state:{...o.state}})},onAfterCardPolicySubmit:()=>{a.setIsAiCfoOpen(!0),m(`/${i}/cards/policy`,{state:{...o.state}})}})}}))(xe(Te)),{spendManagement:{chargeCard:{cardsAiCfoHero:Z,cardPolicyAiCfoHero:ee}}}=ke.getLocalizedStrings(),A=Z.pageTitle,Je=ee.pageTitle,Xe=Z.chatHeaderSubtitle,Ze=ee.chatHeaderSubtitle,St=({isFileUploadEnabled:e})=>{const{setIsAiCfoOpen:a}=Se(),o=pe(),c=he(),d=Ce(),[m,h]=l.useState(!1),{allUsers:E,isAiCardCreationEnabled:x,isCardPolicyEnabled:T,onCardPolicyVendorSearchTextChange:U}=be();l.useEffect((()=>{o(je())}),[o]);const i=M((r=>G(r))),C=ye.getSignedInUser(),{session_id:p}=fe(),n=M((r=>$e(r))),t=i.uiState.currentChatSessionId,s=n.tenantEmailDomain,{handleUploadPromoClose:f,isUploadPromoVisible:b}=Pe({isFileUploadEnabled:e,tenantEmailDomain:s}),y=d.state,u=y?.aiCfoInitialQuestion??null,P=!!y?.aiCfoShouldSubmit,w=y?.referrer===J,te=w?"card_policy":void 0,se=l.useMemo((()=>({title:w?Je:A,subtitle:w?Ze:Xe})),[w]),[ae,_]=l.useState(null),[oe,O]=l.useState(!1),v=l.useRef(!1);l.useEffect((()=>{v.current||u==null||u===""||(_(u),O(P),v.current=!0)}),[u,P]);const ne=l.useCallback((()=>{_(null),O(!1),c(d.pathname,{replace:!0,state:N(d.state)})}),[d.pathname,d.state,c]),ie=n.masterTOSInfo,g=ie?.isMasterTOSAccepted??!1,k=l.useRef(null);l.useEffect((()=>{if(g&&k.current!=null){const{question:r,shouldSubmit:I}=k.current;k.current=null,_(r),O(I),v.current=!1}}),[g]);const{visitedSessions:L}=we(t),Q=i.fetchState,F=i.uiState.chatSessionsNextPageToken.hasMore||!i.uiState.chatSessionsFirstPageFetched,V=t!=null?i.fetchChatSessionHistoryByChatSessionId?.[t]?.fetchState??"Not-Started":"Not-Started",q=t==null||(i.uiState.chatHistoryNextPageToken[t]?.hasMore??!0),R=i.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:re}=W(R,t),le=re.length===0;l.useEffect((()=>{t!=null&&p!==t&&c((function(r,I){return`/${r}/${Y}/${I}`})(s,t),{state:{...d.state},replace:!0})}),[t,p,s,c,d.state]),l.useEffect((()=>{p!=null&&t==null&&p!=="new_chat"&&o(De({sessionId:p,agentId:"controller"}))}),[]);const de=l.useMemo((()=>({events:L.map((r=>`private-encrypted-chat-${r}.${K}`)),eventCallback:(r,I,me)=>me.onEventReceived(r,I)})),[L]);if(l.useEffect((()=>{Q!=="In-Progress"&&F&&o(Le())}),[Q,F,o]),l.useEffect((()=>{t!=null&&V!=="In-Progress"&&q&&C!=null&&Q==="Completed"&&!F&&o(Ve(t,C.userId))}),[V,q,t,C,o]),C==null)throw Error("Can't access Cards AI CFO page without signing in...");const ce=p??"new_chat",ue=t!=null&&i.responseStateByChatSessionId?.[t]?.answer?.fetchState==="In-Progress";return S.jsxs(tt,{children:[S.jsx(Ie,{analytics:j,onLoad:r=>r.trackPageLoaded(Ae.Event.aiCFOPage)}),g?S.jsx(Ye,{...de,currentChatSessionId:t,allSessionsWithOrderedQuestionAnswers:R,allUsers:E,isAiCardCreationEnabled:x,isCardPolicyEnabled:T,openOnboardingPage:()=>h(!0),userId:C.userId,setIsAiCfoOpen:a,navigate:c,sessionFromUrl:ce,location:d,isSubmitting:ue,isEmptyChatWithSession:le,customPageTitle:A,chatHeader:se,currentTenant:n,emailLinkQuestion:ae??void 0,autoSubmitEmailLinkQuestion:oe,onEmailLinkQuestionProcessed:ne,isFileUploadEnabled:e,isUploadPromoVisible:b,onUploadPromoClose:f,onCardPolicyVendorSearchTextChange:U,cardPolicyPageContext:te}):S.jsx(H,{isTOSAccepted:g,acceptMasterTOSState:i.masterTOSAcceptanceState,customPageTitle:A,onCloseClick:()=>{c(w?X(s):$(s),{state:{...d.state}})},onCompleteClick:()=>{g||n.userRoleId==null||(u!=null&&u!==""&&(k.current={question:u,shouldSubmit:P}),o(z(n.userRoleId)))}}),S.jsx(We,{anchor:"right",open:m,transitionDuration:250,PaperProps:{component:st,style:{width:`${Ee}vw`}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>h(!1),children:S.jsx(et,{onClick:r=>r.stopPropagation(),children:S.jsx(H,{isTOSAccepted:g,acceptMasterTOSState:i.masterTOSAcceptanceState,customPageTitle:A,onCloseClick:()=>h(!1),onCompleteClick:()=>{g||n.userRoleId==null||o(z(n.userRoleId)),h(!1)}})})})]})},et=D(Ke)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,tt=D.div`
6
- flex: 1 1 auto;
7
- display: flex;
8
- flex-direction: column;
9
- min-height: 0;
10
- width: 100%;
11
- `,st=D(Ge)`
12
- box-shadow: ${({theme:e})=>e.colors.elevation2};
13
- color: ${({theme:e})=>e.colors.grey4};
14
- `;export{St as default};
@@ -1 +0,0 @@
1
- import{j as m}from"./liveblocks-CgHUgeBY.js";import{a as g}from"./sentry-DSWD_gIh.js";import{h as w,u as x,g as T,i as k,j as O,l as E}from"./core-Cc7wW2EM.js";import{z as C,bt as F,a9 as P,j,U as V,q as b,bu as L,af as A,aH as U,p as B}from"./index-vIt7RQvO.js";import{fF as N,gI as M,BE as _,gD as z,c8 as R,Yh as Y,bn as G,uX as H,uL as q,mz as X,o8 as S,Yi as Z,bE as $,cE as D,oj as J,ot as K}from"./zeni-epic-state-BVJjEVAA.js";import"./mui-C4zFSCiU.js";import{d as Q}from"./routePaths-C0UIXwMQ.js";import{M as W}from"./MobileAppDrawer-DLFLa7hS.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new a.Error().stack;n&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[n]="715b9157-85b7-45ab-aea9-ceeb331f7290",a._sentryDebugIdIdentifier="sentry-dbid-715b9157-85b7-45ab-aea9-ceeb331f7290")}catch{}})();const ee=E((function(a){const n=z(a),i=C.getSignedInUser(),p=N(a),c=p.tenantId,l={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=R(p?.userRole??[])&&n.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=Y(a.companyConfigState),t=a.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:n.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:n,allIndustries:e.companyIndustries??[],allNationalityCountries:t,isDisabled:f,authParams:l,filesEndPoint:`${A.fileMicroServiceBaseUrl}`,isZeniUser:G(i)}}),(function(a,n){const{companyId:i,currentTenant:p,navigate:c,location:l}=n,{tenantEmailDomain:f}=p;return{onScheduleClick:e=>{let t=e.href;t.includes("http")||(t="https://".concat(t)),window.open(t,"_blank")},onSaveAll:()=>{a(K())},onAddressClick:e=>{const t=Q(f,e),o=B(l.state?.pathnameStackToGoBack,l.pathname);c(t,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{a(J({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?D(u):void 0,meetingLink:y!=""&&y!=null?D(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:U(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?$(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]}};a(S({companyDetails:v}))},onPrimaryContactDetailsUpdated:e=>{a(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{a(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=>{a(Z(e))},onCompanyOfficerUpdated:e=>{a(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=>{a(X({files:e}))},onDeleteFile:e=>{a(q(e))},onEditFileName:(e,t)=>{a(H(e,t.split(".")[0]))}}}))(L);function de(){const a=w(),n=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=>N(s))),d=r.companyId??C.getSignedInUserTenant(p)?.companyId;if(C.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect((()=>{c||t!=="Not-Started"||d==null||(l(!0),n(M(d)))}),[c,t,d,n]),g.useEffect((()=>{o==="Not-Started"&&n(_())}),[o,n]);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:()=>a("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(P,{analytics:j,onLoad:s=>s.trackPageLoaded(V.Event.companyPassport,b(i)?"Settings":"Company Passport")}),b(i)?m.jsx(W,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:a,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-CgHUgeBY.js";import{a as o}from"./sentry-DSWD_gIh.js";import{u as P,h as R,g as H,j as C,N as w}from"./core-Cc7wW2EM.js";import{TX as q,fF as z,gl as G,pS as K,gM as A,gk as M,gi as Q,Ul as V,gh as O}from"./zeni-epic-state-BVJjEVAA.js";import{u as X,z as E,L as D,G as B,K as J}from"./index-vIt7RQvO.js";import{n as W}from"./mui-C4zFSCiU.js";import{P as h,a as _}from"./AccountMappingScreen-xfXO279W.js";import{t as Y}from"./getLocaleForTenant-Bgt5rFzV.js";import{g as Z,Q as ee}from"./QBOConnectionScreen-DreC-yDW.js";import"./recharts-DJGeJ2v_.js";import"./analytics-S5MhEivL.js";import"./plaid-vsHcqLdj.js";import"./dnd-DEyyKSEC.js";import"./stripe-cKAAJElX.js";import"./lottie-C1A2hiZE.js";import"./lexical-DXgKWO29.js";import"./pdf-rXyPRm1U.js";import"./utils-DiIEQ7_h.js";import"./MobileAppDrawer-DLFLa7hS.js";import"./InboxNotificationsProvider-CYNlrTK-.js";import"./useTaskManagerAccess-BeNfkHpZ.js";import"./accountMappingHelper-Gh8rpbjD.js";import"./empty-6MFM8UPN.js";import"./pdf-lib-CsM74zBq.js";import"./index-2QCkbhu2.js";import"./url-DUlo21cY.js";import"./index-D2oCZR3F.js";import"./decodeURIComponentSafe-DhqIXi_U.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]="f99b5931-2172-45b5-9a70-9fc7fd580dac",t._sentryDebugIdIdentifier="sentry-dbid-f99b5931-2172-45b5-9a70-9fc7fd580dac")}catch{}})();const te=W.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 ${J.sp1} ${t.theme.colors.dropShadowNormal}`};
11
- `;function we(){const t=P(),i=R(),v=H(),{setLoading:c,clearAllLoading:m}=X(),S=o.useRef(!1),b=o.useRef(!1),N=o.useRef(!1),f=o.useRef(!1),{code:U,realmId:$,state:F}=Z(v.search),p=U!==""&&$!==""&&F!=="";p&&(N.current=!0);const j=sessionStorage.getItem(h),u=j===_.pending,L=j===_.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(D.CONNECTION_AUTH)}),[c]),o.useEffect((()=>{S.current||a==null||g==null||(S.current=!0,n==="Completed"||r!=="Not-Started"&&r!=="Error"||(c(D.TENANT_FETCHING),t(G(a.userId,g))))}),[S,n,c]),o.useEffect((()=>{e.tenantId==null&&!b.current&&a!=null&&(b.current=!0,!(g==null||g!=null&&(r==="Completed"||r==="Error"))||n!=="Not-Started"&&n!=="Error"||t(K(a.userId)))}),[b,n,r]),o.useEffect((()=>{a==null||e?.tenantId==null||e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||l==="In-Progress"||d!=="Error"||(c(D.CONNECTION_AUTH),t(A(a.userId,e.tenantId)))}),[d]),o.useEffect((()=>{n!=="Completed"&&r!=="Completed"||a==null||e?.tenantId==null||(t(M(e.tenantId)),E.saveActiveTenantDomainForUser(e.tenantEmailDomain),Q(a?.userId,a?.zeniSessionId,e.tenantId),B.updateAppLocaleID(Y(V(e))),e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||l==="In-Progress"||a==null||e==null||t(A(a.userId,e.tenantId)))}),[n,r,l]),o.useEffect((()=>{x.tenantsCoreDetailsInOrder.length>0&&n==="Completed"&&E.saveSignedInUserTenants(x.tenantsCoreDetailsInOrder)}),[x.tenantsCoreDetailsInOrder.length,n]);const T=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"&&(f.current=!0)}),[u,d]),o.useEffect((()=>{if(!u||T)return;const s=e.tenantEmailDomain!=null?`/${e.tenantEmailDomain}/settings/accounting`:"/";return f.current&&d==="Completed"?(sessionStorage.setItem(h,_.ready),m(),void i(s,{replace:!0})):f.current&&d==="Error"?(sessionStorage.removeItem(h),t(O({messageSection:"accounting_projects_qbo_reconnect_failed",messageText:"failed",type:"error"})),m(),void i(s,{replace:!0})):void(p||N.current||f.current||y!==!0||(sessionStorage.removeItem(h),t(O({messageSection:"accounting_projects_qbo_reconnect_failed",messageText:"failed",type:"error"})),m(),i(s,{replace:!0})))}),[u,T,d,p,y,e.tenantEmailDomain,m,t,i]),T)return null;if(p||y!==!0)return I.jsx(te,{children:I.jsx(ee,{})});if(u)return null;const k=e.tenantEmailDomain!=null?`/${e.tenantEmailDomain}/settings/accounting`:"/";return L?I.jsx(w,{to:k,replace:!0}):I.jsx(w,{to:"/",replace:!0})}export{we as default};
@@ -1 +0,0 @@
1
- import{j as i}from"./liveblocks-CgHUgeBY.js";import{z as m}from"./index-vIt7RQvO.js";import{g as n}from"./QBOConnectionScreen-DreC-yDW.js";import"./sentry-DSWD_gIh.js";import{g as p,N as a}from"./core-Cc7wW2EM.js";import"./zeni-epic-state-BVJjEVAA.js";import"./recharts-DJGeJ2v_.js";import"./mui-C4zFSCiU.js";import"./analytics-S5MhEivL.js";import"./plaid-vsHcqLdj.js";import"./dnd-DEyyKSEC.js";import"./stripe-cKAAJElX.js";import"./lottie-C1A2hiZE.js";import"./lexical-DXgKWO29.js";import"./pdf-rXyPRm1U.js";import"./utils-DiIEQ7_h.js";import"./empty-6MFM8UPN.js";import"./pdf-lib-CsM74zBq.js";import"./index-2QCkbhu2.js";import"./url-DUlo21cY.js";import"./index-D2oCZR3F.js";import"./decodeURIComponentSafe-DhqIXi_U.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-CgHUgeBY.js";import{t as Tt,A as $e}from"./AddressScreen-CrPViFiu.js";import wt from"./NotFoundScreen-DzxbROot.js";import{a as d,t as Me}from"./sentry-DSWD_gIh.js";import{h as _e,g as Ee,u as se,i as xe,j as T,N as Q,q as At,l as it,n as Pt,o as H}from"./core-Cc7wW2EM.js";import{fF as Y,d_ as Te,dZ as we,bq as Dt,Uc as jt,bR as Bt,pQ as Ft,Bo as Vt,Br as Ut,Vz as Rt,VA as Lt,lu as Oe,lx as ct,UP as Nt,b$ as Gt,c8 as fe,BS as Ae,BD as $t,VB as me,BT as dt,Sm as Mt,mH as ut,di as lt,VC as Qt,VD as Kt,uE as zt,UC as Ce,hV as qt,UB as be,hS as Ht,Gh as Jt,uI as Zt,hK as Wt,hN as Qe,VE as pt,VF as Xt,M7 as Yt,VG as en,Mb as tn,Bu as nn,VH as an,VI as on,ls as sn,lv as rn,C3 as cn,BF as mt,BR as dn,bE as Ke,cE as un,C2 as ze,uX as ln,uL as pn,mz as mn,gG as gn,gF as fn,gE as yn,VJ as hn,Bx as Cn,C4 as bn,C7 as Sn,Ca as In,Cg as kn,dj as On}from"./zeni-epic-state-BVJjEVAA.js";import{z,N as Pe,f as W,V as vn,p as q,a9 as re,j as g,aF as _n,aj as gt,a2 as En,F as ft,P as yt,l as X,_ as ge,U as ve,aG as xn,K as qe,v as He,af as Tn,aH as Je,aI as wn,aJ as An}from"./index-vIt7RQvO.js";import{n as De}from"./mui-C4zFSCiU.js";import{g as Pn,h as Dn,q as ie}from"./QBOConnectionScreen-DreC-yDW.js";import{u as jn,a as Bn}from"./useEmailConnectResultRefresh-HcMCYvt9.js";import{u as Fn}from"./useChargeCardPusherEvents-BVr00Fos.js";import"./recharts-DJGeJ2v_.js";import"./analytics-S5MhEivL.js";import"./plaid-vsHcqLdj.js";import"./dnd-DEyyKSEC.js";import"./stripe-cKAAJElX.js";import"./lottie-C1A2hiZE.js";import"./lexical-DXgKWO29.js";import"./pdf-rXyPRm1U.js";import"./utils-DiIEQ7_h.js";import"./empty-6MFM8UPN.js";import"./pdf-lib-CsM74zBq.js";import"./index-2QCkbhu2.js";import"./url-DUlo21cY.js";import"./index-D2oCZR3F.js";import"./decodeURIComponentSafe-DhqIXi_U.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]="e30f413f-7bae-4b4e-9f2b-2c224bb814f3",e._sentryDebugIdIdentifier="sentry-dbid-e30f413f-7bae-4b4e-9f2b-2c224bb814f3")}catch{}})();const Ze=e=>{switch(e){case"Complete":return"yes";case"Pending Review":case"Incomplete":return"partially";default:return"no"}},Vn=()=>{const e=_e(),l=Ee(),i=se(),[a,p]=d.useState(!1),[u,c]=d.useState(!1),{tenantEmailDomain:v}=xe(),t=z.getSignedInUser(),{useFeatureGate:n}=Pe(),{isFeatureEnabled:C}=n(W.isApAgingFeatureEnabled),{isFeatureEnabled:o}=n(W.isArAgingFeatureEnabled),{isFeatureEnabled:A}=n(W.isReferralFeatureEnabled),{isFeatureEnabled:w}=n(W.isDebitCardFeatureEnabled),k=vn(),O=T((S=>Y(S))),P=T((S=>S.onboardingCustomerViewState.fetchState)),_=O.excludedResources,F=O.companyId??z.getSignedInUserTenant(v)?.companyId;if(t==null)throw Error("Can't access onboarding flow without signing in...");const m=Te(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&&Dt(O?.userRole),E=_?.resources?.find((S=>S.resource==="/bills"))==null&&!r,x=_?.resources?.find((S=>S.resource==="/reimbursements"))==null;U===!1&&D.push("top_expenses"),h===!1&&D.push("task_card"),E===!1&&D.push("bill_pay_card","bill_pay_promo_card"),x===!1&&D.push("reimbursement_card","reimbursement_promo_card"),D.push("zeni_accounts_promo_card","treasury_promo_card"),A===!1&&D.push("rewards_card");const f=T((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 J=jt(S,V);return Bt(J.reportsInOrder.map(($=>({fetchState:$.fetchState,error:$.error})))).fetchState}));d.useEffect((()=>{P!=="Completed"||a||m||b||(p(!0),i(Ft(t.userId,F,O.tenantId,!0,!1,D)))}),[a,P,m,b,t,O.tenantId,i]);const j=d.useRef(!1),N=d.useCallback((()=>{const S={pathnameStackToGoBack:q(l.state?.pathnameStackToGoBack,l.pathname),message:"activation"};e(m?"../../checking":b?"../../cards":"../../dashboard",{state:S})}),[e,l,m,b]),G=d.useCallback((()=>{j.current||(j.current=!0,N())}),[N]);if(d.useEffect((()=>{const S=setTimeout((()=>c(!0)),3e3);return()=>clearTimeout(S)}),[]),d.useEffect((()=>{const S=setTimeout(G,6e3);return()=>clearTimeout(S)}),[G]),d.useEffect((()=>{m||b||!u||f!=="Completed"&&f!=="Error"||G()}),[u,f,m,b,G]),P!=="Completed")return s.jsx(Q,{to:"../"});const L=O.company?.companyOnboardingInfo?.onboardingInfo,ee={timeSinceQuoteSign:L?.onboardingTimeSinceQuoteSigned??"",timeSinceQuoteSignInMinutes:L?.onboardingToQuoteSignMinutes??0,isKybDone:Ze(L?.businessVerified?.status),isKycDone:Ze(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(_n,{show:!0,onComplete:G})]})},Se=["reading_books","finance_graph","reconciliation","cfo_foundation"],Ie=["llm_fine_tuning","rag_knowledge_graph","personalized_context"],We=(e,l)=>{const i=new Map(e.map((a=>[a.key,a])));return l.map((a=>{return p=i.get(a)?.status,p==="starting"||p==="building"?p:"idle";var p}))},Xe=(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"))},Ye=De.div`
2
- display: flex;
3
- height: 100vh;
4
- background-color: ${e=>e.theme.colors.grey4};
5
- `,et=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
- `,tt=it((function(e,l){const{companyId:i,isAdmin:a,currentTenant:p,isOnAddressPage:u}=l,c=z.getSignedInUser(),v=p.tenantId,t={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:v??""},n=Y(e),C=Ae(e,i),o=pt(e),A=fe(p?.userRole??[])&&C.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",w=Xt(e.userRoleConfigState);return{onboardingCustomerView:C,analytics:g,isRefreshingViewInBackground:!1,isDisabled:A,companyTitles:w.companyTitles,connectedAccountProvider:n.company?.featuresActivationInfo.connectedAccountProvider??"",fileProps:{filesEndPoint:Tn.fileMicroServiceBaseUrl,authParams:t},signedInUser:z.getSignedInUser(),currentTenant:n,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:(t,n)=>{e(kn(t,n))},onEstablishConnectionClick:(t,n)=>{e(In(t,n))},onUpdatePaymentAccountStatus:(t,n,C)=>{e(Sn(t,n,C))},onUpdatePaymentAccountLoginStatus:(t,n)=>{e(bn(!1,t,n))},onEstablishConnectionSuccess:()=>{e(Cn(i,!0,!1))},handleOnConnectClick:()=>{g.trackOnboardingConnectQBO(),ie.handleClick()},updateQBOPopupState:t=>{e(me({isQBOPopupOpen:t}))},onCompanyOfficerUpdated:t=>{const n=t.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:E,isPhoneVerified:x}=C;let f;return b.selectDocumentType==="driverLicense"?f="driving_license":b.selectDocumentType==="passport"?f="passport":b.selectDocumentType==="stateId"?f="id_document":b.selectDocumentType==="ssnCard"&&(f="social_security_card"),{officerType:o,userId:A,firstName:w.firstName,lastName:w.lastName,email:k,ssn:O,nationalityCountryCode:P?.selectedOption!=null?Je(P.selectedOption):void 0,phone:F,birthday:_!=null?Ke(_?.toString()):_,syncToken:m,titleAtCompany:D.selectedOption,ownershipInCompany:U,documentTypeSelectedForVerification:f,isSelectedForVerification:h,userVerificationStatus:r,fileIds:E,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1,isPhoneVerified:x}}));e(ze({officers:n}))},onGetOtp:(t,n)=>{e(yn(t,"CustomerOnboarding")),n!=null&&e(hn({officerType:n,phone:t}))},onResendOtp:t=>{e(fn(t,"CustomerOnboarding"))},onVerifyOtp:(t,n)=>{g.trackOnboardingPhoneVerified(),e(gn(t,n,"CustomerOnboarding"))},updateFilesEntity:t=>{e(mn({files:t}))},onDeleteFile:t=>{e(pn(t))},onEditFileName:(t,n)=>{e(ln(t,n.split(".")[0]))},onCompanyDetailsChanged:t=>{const{companyDescription:n,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:E,companySourceOfFundsDescription:x,companySubIndustry:f,countriesOfOperations:j,purposeOfAccount:N,purposeOfAccountDescription:G,regulatedStatus:L,regulatedStatusDescription:ee,transactionVolume:S,transactionVolumeDescription:V,usNexus:J,usNexusTypes:$}=t,M={companyId:i,companyDescription:n,companyIndustry:C.selectedOption,companyIndustryType:o?.selectedOption??"",companyLegalName:A,taxIdOrEIN:w,website:k!=""&&k!=null?un(k):void 0,phone:O,syncToken:b,fileIds:D,incDate:r!=null?Ke(r?.toString()):r,typeOfIncorporation:U?.selectedOption??"",stateOfIncorporation:h?.selectedOption??"",companySourceOfFunds:E?.selectedOption??"",companySourceOfFundsDescription:x,companySubIndustry:f?.selectedOption??"",countriesOfOperations:j?.selectedOptions.map((R=>R.length===2?R:Je(R)))??[],purposeOfAccount:N?.selectedOption??"",purposeOfAccountDescription:G,regulatedStatus:L??"",regulatedStatusDescription:ee,transactionVolume:S?.selectedOption??"",transactionVolumeDescription:V,usNexus:J,usNexusTypes:$?.selectedOptions??[]},ce={userId:F,firstName:_.firstName,lastName:_.lastName,email:P,syncToken:m};e(ze({companyDetails:M,primaryContactDetails:ce}))},onAddressClick:(t,n)=>{const C=at(v,t,n),o=q(c.state?.pathnameStackToGoBack,c.pathname);u(C,{state:{pathnameStackToGoBack:o}})},onRegisteredAddressClick:(t,n)=>{const C=at(v,t,n),o=q(c.state?.pathnameStackToGoBack,c.pathname);u(C,{state:{pathnameStackToGoBack:o}})},onUpdateCustomerView:(t,n,C)=>{e(dn(i,!1,n,C,t))},onAddressEditHandler:t=>{if(t!=null){const n=Tt(t);e(ut({addressType:"subscription_billing_address",addressToCreate:n}))}},onSkipSetupClick:()=>{const t=q(c.state?.pathnameStackToGoBack,c.pathname);e(mt(i,!1,!1)),u("./activation",{state:{pathnameStackToGoBack:t}})},onUpdateStep:t=>{e(dt({step:t}))},onUpdateSubStep:t=>{e(cn({subStep:t}))},onZeniLogoClick:()=>{p.toggle()},handleLogOutClick:()=>{const t=q(c.state?.pathnameStackToGoBack,c.pathname);u("/signout",{replace:!0,state:{pathnameStackToGoBack:t,message:"logout"}})},handleCockpitClick:()=>{g.trackOnboardingFlowExited("cockpit"),window.open("/cockpit")},handleReferralsClick:()=>{u(`/${v}/rewards`)},handleCreateCardSetupIntent:t=>{e(ct(t))},handleConfirmCardSetupIntent:t=>{e(rn(t))},updateCardPaymentModalState:t=>{e(me({isCardPaymentPopupOpen:t}))},handleAddCardPaymentSource:(t,n,C)=>{e(sn(t,n,C))},handleFetchPaymentSources:()=>{e(Oe())},resetCardPaymentViewState:()=>{e(on())},handleResetCardPaymentErrorStatuses:()=>{e(an())},redirectToProductSuitePage:()=>{g.trackOnboardingFlowExited("product_suite");const t=q(c.state?.pathnameStackToGoBack,c.pathname);u(`/${v}/onboarding/thankyou`,{state:{pathnameStackToGoBack:t,message:"OnboardingThankyou"},replace:!0})},onAcknowledgeAiFinanceTeam:()=>{i!=null&&(g.trackOnboardingAiFinanceTeamAcknowledged(),e(nn(i)))},onIdentityDocumentUploadedForAutofill:t=>{if(i==null)return;const n=en(t.documentType);n!=null&&(g.trackOnboardingDocumentUploaded("kyc",n),e(tn({target:"onboarding",companyId:i,officerType:t.officerType,fileId:t.fileId,documentType:n})))},onCompanyDocumentUploadedForAutofill:t=>{i!=null&&(g.trackOnboardingDocumentUploaded("kyb",t.documentType),e(Yt({target:"onboarding",companyId:i,fileId:t.fileId,documentType:t.documentType})))}}}))(xn),le=({taxCFOCustomer:e=!1,isOnAddressPage:l=!1,appContent:i})=>{const a=gt(),p=_e(),u=Ee(),c=se(),v=En(),t=ft(),[n,C]=d.useState(!1),[o,A]=d.useState(!1),[w,k]=d.useState(!1),{tenantEmailDomain:O}=xe(),P=yt(),{useFeatureGate:_}=Pe(),{isFeatureEnabled:F}=_(W.isDebitCardFeatureEnabled),m=At("/:tenantEmailDomain/onboarding")!==null&&u.search?.includes("code"),b=T((y=>y.onboardingCustomerViewState.fetchState)),D=T((y=>y.onboardingCustomerViewState.currentStep)),U=T((y=>y.onboardingCustomerViewState.uiState)),h=T((y=>Y(y))),r=T((y=>y.userRoleConfigState.fetchState)),E=T((y=>y.cardPaymentViewState)),x=X(E.addCardPaymentSourceStatus.fetchState),f=E.addCardPaymentSourceStatus.fetchState,{code:j,realmId:N,state:G}=Pn(u.search),L=h.externalConnections?.accounting[0],ee=L?.connectionType,S=L?.connectionName,V=L?.connectionId??"",J=z.getSignedInUser()?.userId??"",$=d.useRef({realmId:"",connectionId:""});d.useEffect((()=>{o||(A(!0),c(Oe()))}),[o,c]),d.useEffect((()=>{w||(ct(["card"]),k(!0))}),[w]),d.useEffect((()=>{x==="In-Progress"&&f==="Completed"&&c(Oe())}),[x,f]),d.useEffect((()=>{Dn(j,N,G,V,J)===!0&&h.externalConnections?.saveConnectionState!=="In-Progress"&&b==="Completed"&&(c(Nt(h.tenantId,{connection_type:ee??"accounting",connection_name:S??"quickbooks_online",authorization_code:j,realm_id:N,connection_id:V,user_id:J},Gt(window.location.origin+"/onboarding/auth"))),$.current={realmId:N,connectionId:V},g.trackOnboardingSaveQBOConnection(N,V),p(u.pathname))}),[j,N,G,u.pathname,b]),d.useEffect((()=>{ie.isInitiated===!1&&b==="Completed"&&ie.init("/onboarding/auth",h.tenantEmailDomain)}),[b]);const M=h.companyId??z.getSignedInUserTenant(O)?.companyId,ce=fe(h?.userRole??[]),R=T((y=>Ae(y,M)));d.useEffect((()=>{n||b!=="Not-Started"||M==null||(C(!0),c($t(M,!0,!m)))}),[n,b,M]);const te=h.externalConnections?.saveConnectionState,je=X(te);d.useEffect((()=>{je==="In-Progress"&&(te==="Completed"||te==="Error")&&U.isQBOPopupOpen&&D==="connect_ledger"&&(te==="Completed"?g.trackOnboardingQBOConnectionSuccess($.current.realmId,$.current.connectionId):g.trackOnboardingQBOConnectionFailed($.current.realmId,$.current.connectionId,h.externalConnections?.saveOAuthConnectionError?.message??""),c(me({isQBOPopupOpen:!1})))}),[te,je,U.isQBOPopupOpen,D,g,c]),d.useEffect((()=>{b==="Completed"&&m&&(c(dt({step:"connect_ledger"})),c(me({isQBOPopupOpen:!0})))}),[m,b]),d.useEffect((()=>{r==="Not-Started"&&c(Mt(!0))}),[r,c]);const ht=X(R.companyDetailsLocalData?.addressStatus);d.useEffect((()=>{R.companyDetailsLocalData?.registeredAddressStatus?.addressToCreate==null&&R.companyDetailsLocalData?.addressStatus?.addressToCreate!=null&&ht==null&&c(ut({addressType:"company_registered_address",addressToCreate:R.companyDetailsLocalData?.addressStatus?.addressToCreate}))}),[R.companyDetailsLocalData?.addressStatus?.addressToCreate,R.companyDetailsLocalData?.registeredAddressStatus?.addressToCreate]);const Ct=R.isInterimEmailSent,Be=z.getSignedInUser();if(Be==null)throw Error("Can't access onboarding flow without signing in...");const bt=Te(F,h),St=we(h),Fe=h.company?.companyOnboardingInfo.isOnboardingCompleted,Ve=y=>y.trackPageLoaded(ve.Event.onboardingPage),ye=h.productSettings.isOtherProductsEnabled,It=ye===!0&&!lt(h),kt=h.productSettings.isTreasuryEnabled,Ue=Un({tenantEmailDomain:O??"",signedInUserEmail:Be.userEmail??"",companyId:M}),Re=(({companyId:y})=>{const K=se(),de=T((B=>B.onboardingCustomerViewState?.aiAgentsActivation)),ne=T((B=>Y(B).company?.companyOnboardingInfo?.onboardingInfo?.onboardingAiActivationInfo?.isOnboardingAiActivationViewed??!1)),he=d.useCallback((()=>{K(Vt())}),[K]);d.useEffect((()=>{he()}),[he]);const Le=d.useCallback((()=>{y==null||y===""||ne||K(Ut(y))}),[y,ne,K]),Ot=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]),vt=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:"",Z=typeof I.status=="string"?I.status:"idle";if(ue==="")return;K(Lt({key:ue,status:Z==="starting"||Z==="building"||Z==="ready"?Z:"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(Rt({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 Fn({events:Ot,onEvent:vt,onSubscribed:he}),d.useMemo((()=>{const B=de?.phases??[],ae=We(B,Se),I=We(B,Ie),ue=Xe(B,Se),Z=Xe(B,Ie),Ne=B.some((xt=>xt.status!=="idle")),oe=!ne&&!Ne,Ge=ne&&!Ne,_t=Ge?Se.map((()=>"building")):ae,Et=Ge?Ie.map((()=>"building")):I;return{ledgerRowStatuses:oe?void 0:_t,backgroundRowStatuses:oe?void 0:Et,showLedgerReadyInLabel:oe?void 0:ue,showBackgroundReadyInLabel:oe?void 0:Z,forceContinueEnabled:!oe||void 0,counts:de?.counts,onContinueClicked:Le}}),[de?.phases,de?.counts,ne,Le])})({companyId:M});if(Fe===!0){if(!ye)return kt?s.jsx(Q,{to:"../../treasury"}):bt?s.jsx(Q,{to:"../../checking"}):St?s.jsx(Q,{to:"../../cards"}):s.jsx(Q,{to:"../../dashboard"});const y=R.updateStatus.fetchState==="In-Progress";if(ye&&!y)return e?s.jsxs(Ye,{children:[s.jsx(re,{analytics:g,onLoad:K=>Ve(K)}),s.jsx(tt,{navigate:p,location:u,companyId:M,currentTenant:h,isAdmin:ce,isOnAddressPage:l,themeState:t,googleAPIKey:ge.googleMapsAPIKey,integrationsSectionProps:Ue,aiAgentsActivationProps:Re,meetingUrl:a("onboarding_overview")}),i!=null?s.jsx(et,{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 Ct===!0&&It?s.jsx(Q,{to:"../../onboarding/thankyou"}):s.jsxs(Ye,{children:[s.jsx(re,{analytics:g,onLoad:y=>Ve(y)}),s.jsx(tt,{navigate:p,location:u,companyId:M,currentTenant:h,isAdmin:ce,isOnAddressPage:l,themeState:t,googleAPIKey:ge.googleMapsAPIKey,integrationsSectionProps:Ue,aiAgentsActivationProps:Re,meetingUrl:a("onboarding_overview")}),i!=null?s.jsx(et,{windowSize:v,skipLegacyDrawerOffset:l&&h.productSettings.isOtherProductsEnabled!==!0,children:i}):null]});return null},ke="external_integrations",Un=({tenantEmailDomain:e,signedInUserEmail:l,companyId:i})=>{const a=se(),{pendingAutoFocusTabId:p}=jn(),{plaidAccounts:u,onAddPlaidAccount:c,onReLoginPlaidAccount:v}=Bn({companyId:i}),t=T((r=>r.plaidAccountViewState.external_account.plaidConnectionDetails)),n=T((r=>Y(r))),C=T((r=>r.tenantState.fetchState)),o=T((r=>Qt(r,i))),A=T((r=>Kt(r,ke))),w=d.useMemo((()=>new Set(A.map((r=>r.additionalInfo)).filter((r=>r!=null)))),[A]),k=n.tenantId,O=fe(n.userRole??[]);d.useEffect((()=>{a(zt(ke))}),[a]);const P=o.externalConnections?.saveAPIKeyConnectionState,_=o.externalConnections?.saveAPIKeyConnectionError?.message,F=X(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=X(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=X(U);return d.useEffect((()=>{const r=U??{},E=h??{},x=o.externalConnections?.saveConnectorCredentialsErrorBySlug??{};Object.keys(r).forEach((f=>{if(E[f]!=="In-Progress")return;let j;try{j=Ce(f)}catch{return}r[f]==="Completed"?g.trackIntegrationConnected(j,"Onboarding","payments"):r[f]==="Error"&&g.trackIntegrationConnectFailed(j,"Onboarding","payments",x[f]?.message??"")}))}),[U,h,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,E])=>[r,E?.message]))),deleteConnectionState:o.externalConnections?.deleteConnectionState??"Not-Started",deleteConnectionError:o.externalConnections?.deleteConnectionError?.message,onConnectGmail:()=>{g.trackIntegrationConnectClicked("gmail","Onboarding","email"),a(Qe(k,"gmail",nt()))},onConnectOutlook:()=>{g.trackIntegrationConnectClicked("outlook","Onboarding","email"),a(Qe(k,"outlook",nt()))},onConnectHubSpot:(r,E)=>{const x=o.externalConnections?.revenue?.find((j=>j.connectionName==="hubspot"))?.connectionId;if(x==null)return;g.trackIntegrationCredentialsSubmitted("hubspot","Onboarding","revenue");const f=`${window.location.origin}/oauth/hubspot/callback`;sessionStorage.setItem("hubspot_oauth_pending",JSON.stringify({client_id:r,client_secret:E,connection_id:x,redirect_uri:f,tenant_id:k})),window.location.href=`https://app.hubspot.com/oauth/authorize?client_id=${encodeURIComponent(r)}&scope=${encodeURIComponent("oauth crm.objects.deals.read crm.objects.owners.read")}&redirect_uri=${encodeURIComponent(f)}`},onDisconnect:(r,E)=>{const x=[...o.externalConnections?.accounting??[],...o.externalConnections?.payments??[],...o.externalConnections?.revenue??[]].find((j=>j.connectionId===r))?.connectionName;let f;try{f=x!=null?Ce(x):void 0}catch{f=void 0}f!=null&&g.trackIntegrationDisconnected(f,"Onboarding",E),a(Wt(k,r,be(E)))},onNotifyMe:r=>{g.trackIntegrationsNotifyMeClicked("Onboarding",r),a(Zt(ke,r,l))},onReconnectQBO:()=>{ie.init("/onboarding/auth",e),ie.handleClick()},onRefreshClick:()=>{o.integrations.refreshQBO.fetchState!=="In-Progress"&&a(Jt())},onSaveChargeBeeCredentials:(r,E)=>{const x=o.externalConnections?.revenue?.find((f=>f.connectionName==="chargebee"))?.connectionId;x!=null&&(g.trackIntegrationCredentialsSubmitted("chargebee","Onboarding","revenue"),a(Ht(k,x,be("revenue"),Ce("chargebee"),{api_key:r,site:E})))},onSaveConnectorCredentials:r=>{g.trackIntegrationCredentialsSubmitted(r.connectionName,"Onboarding","payments"),a(qt(k,be("payments"),r))},plaidAccounts:u,onAddPlaidAccount:c,onReLoginPlaidAccount:v,plaidConnectionDetails:t})),[O,o,C,w,p,k,l,e,a,u,c,v,t])};function nt(){const e=new URL(window.location.href);return e.searchParams.set("onboarding_step","connect_data_source"),e.toString()}function at(e,l,i){let a=`/${e}/onboarding/address`;return a=i!=null?a.concat(`/edit/${l}/${encodeURIComponent(i)}`):a.concat(`/new/${l}`),a}const ot=De.div`
27
- display: flex;
28
- height: 100vh;
29
- background-color: ${e=>e.theme.colors.grey4};
30
- `,st=it((function(e,l){const{companyId:i,currentTenant:a}=l,p=Ae(e,i),u=pt(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"}})}}}))(An),Rn=()=>{const e=gt(),l=_e(),i=se(),a=Ee(),p=ft(),{useFeatureGate:u}=Pe(),{isFeatureEnabled:c}=u(W.isDebitCardFeatureEnabled),{tenantEmailDomain:v}=xe(),t=yt(),[n,C]=d.useState(!1);d.useEffect((()=>{n===!1&&a.state?.message==="OnboardingThankyou"&&C(!0)}),[a.state]);const o=T((m=>Y(m))),A=o.productSettings.isOtherProductsEnabled,w=A===!0&&!lt(o);d.useEffect((()=>{i(mt(k,!1,!w))}),[]);const k=o.companyId??z.getSignedInUserTenant(v)?.companyId;if(t.loggedInUser==null)throw Error("Can't access onboarding flow without signing in...");const O=Te(c,o),P=we(o),_=T((m=>m.onboardingCustomerViewState.updateStatus.fetchState)),F=o.company?.companyOnboardingInfo.isOnboardingCompleted;if(F!==!0||w)return _==="Completed"&&F===!0&&w&&t?.loggedInUserRoleMap!=null?s.jsxs(ot,{children:[s.jsx(re,{analytics:g,onLoad:m=>{m.trackPageLoaded(ve.Event.onboardingLandingPage,"Onboarding",On(o.productSettings))}}),s.jsx(st,{navigate:l,showUpdatePaymentDetailButton:A,location:a,companyId:k,currentTenant:o,themeState:p,isVisitingFirstTime:n,meetingUrl:e("onboarding_overview")})]}):_==="Completed"&&F===!1&&t?.loggedInUserRoleMap!=null?s.jsxs(ot,{children:[s.jsx(re,{analytics:g,onLoad:m=>{m.trackPageLoaded(ve.Event.onboardingInterimPage)}}),s.jsx(st,{navigate:l,showUpdatePaymentDetailButton:A,location:a,companyId:k,currentTenant:o,themeState:p,isVisitingFirstTime:n,meetingUrl:e("onboarding_overview")})]}):s.jsx(wn,{});{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 rt(){return typeof Me=="function"?Me():void 0}let pe=0;function Ln(){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=rt();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=rt();if(u===void 0)return;const c=()=>{if(pe===0)try{u.startBuffering()}catch{}};u.stop().then(c,c)})()}))}}),[])}function pa(){return Ln(),s.jsxs(Pt,{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(Rn,{})}),s.jsx(H,{path:"/activation",element:s.jsx(Vn,{})}),s.jsx(H,{path:"/address/edit/:addressType/:addressId",element:s.jsx(le,{isOnAddressPage:!0,appContent:s.jsx($e,{})})}),s.jsx(H,{path:"/address/new/:addressType",element:s.jsx(le,{isOnAddressPage:!0,appContent:s.jsx($e,{})})}),s.jsx(H,{path:"*",element:s.jsx(wt,{})})]})}export{pa as default};
@@ -1 +0,0 @@
1
- import{j as v}from"./liveblocks-CgHUgeBY.js";import{a as u}from"./sentry-DSWD_gIh.js";import{u as y,j as b,l as w,g as A,N}from"./core-Cc7wW2EM.js";import{TX as U,fF as _,gl as k,TY as L,pS as R,TZ as z}from"./zeni-epic-state-BVJjEVAA.js";import{u as j,z as f,L as C,t as I,G as O,b as $}from"./index-vIt7RQvO.js";import"./mui-C4zFSCiU.js";import{t as P}from"./getLocaleForTenant-Bgt5rFzV.js";import"./recharts-DJGeJ2v_.js";import"./analytics-S5MhEivL.js";import"./plaid-vsHcqLdj.js";import"./dnd-DEyyKSEC.js";import"./stripe-cKAAJElX.js";import"./lottie-C1A2hiZE.js";import"./lexical-DXgKWO29.js";import"./pdf-rXyPRm1U.js";import"./utils-DiIEQ7_h.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="c7c68b6d-a0fe-4cb6-8fa0-27eb89e9b7fb",t._sentryDebugIdIdentifier="sentry-dbid-c7c68b6d-a0fe-4cb6-8fa0-27eb89e9b7fb")}catch{}})();const G=w((function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}}))((function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=A(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map((l=>l.tenantEmailDomain)),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,S=null;const T=E(r.pathname);if(T!=null)c=`../${o.tenantEmailDomain}/${T}`,m="comingFromV2UrlPath",T==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce(((l,x)=>l||i.split("/").find((D=>D===x))!=null),!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,S=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const F=$(c,p);return v.jsx(N,{to:F,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:S}})}}));function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=j(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b((e=>U(e))),n=b((e=>e.tenantState.fetchState)),i=b((e=>e.tenantState.error)),a=b((e=>e.tenantState.activeTenantFetchState.fetchState)),c=b((e=>_(e))),d=f.getSignedInUser();return u.useLayoutEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,h.current=!1,r.current=!1,s(C.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)}),[a,n]),u.useEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&I.shouldFetchActiveTenant(e)&&(h.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(C.TENANT_FETCHING),t(k(d.userId,e))))}),[n,a,d,t]),u.useEffect((()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,S=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&S&&I.shouldFetchAllTenants()&&(r.current=!0,I.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!L(i))&&t(R(e.userId)))}),[n,a,i,d,t]),u.useEffect((()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())}),[m.tenantsCoreDetailsInOrder,n]),u.useEffect((()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(O.updateAppLocaleID(P(c)),o())}),[n,a,c]),v.jsx(G,{})}const Q=["dashboard/cash-balance","dashboard/card-balance","dashboard/operating-expenses","dashboard/revenue","dashboard/burn-rate","dashboard/cash-position","dashboard/top-expenses","dashboard/cash-in-cash-out","dashboard","reports","forecast","uncategorized-expense","uncategorized-income","missing-receipts","bills","cards/activate","cards","reimbursements","wise","checking","aicfo"],q={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of Q)if(t.toLocaleLowerCase().includes(s))return q[s]}export{oe as default};
@@ -1,18 +0,0 @@
1
- import{j as l}from"./liveblocks-CgHUgeBY.js";import{h as w,g as C,j as h,l as E,i as V}from"./core-Cc7wW2EM.js";import{YW as k,Z1 as Y,gG as _,gF as K,gE as L,kP as Q,WU as X,uO as q,fF as B,Yt as D,kN as F,YX as S,Z4 as T,kL as G,l6 as j}from"./zeni-epic-state-BVJjEVAA.js";import{bO as J,a2 as N,N as R,z as U,E as O,a5 as p,f as v,a8 as Z,bP as M,K as z,bQ as ee,p as te}from"./index-vIt7RQvO.js";import{n as H}from"./mui-C4zFSCiU.js";import"./sentry-DSWD_gIh.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]="e597af58-2499-45cd-8b37-82c3cf31ea84",e._sentryDebugIdIdentifier="sentry-dbid-e597af58-2499-45cd-8b37-82c3cf31ea84")}catch{}})();const ae=E(null,(function(e,t){return{onSaveVendor:a=>{e(Q(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(X("common")),a!=null&&e(q(a))},onGetOtp:a=>{e(L(a,"BillPayVendor"))},onResendOtp:a=>{e(K(a,"BillPayVendor"))},onVerifyOtp:(a,n)=>{e(_(a,n,"BillPayVendor"))},onVerifyOtpSuccess:(a,n,o)=>{e(Y(a,n,o))}}}))(J);function W({vendorId:e,billId:t,isExpressPayPage:a}){const n=w(),o=C(),s=h((r=>k(r,e)));return l.jsx(ae,{location:o,navigate:n,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:a??!1})}const ne=H.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),r=s.poppedPathname??P();a(r,{state:{pathnameStackToGoBack:s.newStack}})})(),e(S())},onACHDetailsUpdated:s=>{const{bankAccountSection:r}=s;e(T({data:r}))},onBackClick:()=>{if(e(F({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")a("../",{relative:"path"});else{const s=p(t.location.state?.pathnameStackToGoBack),r=s.poppedPathname??P(0);t.navigate(r,{state:{pathnameStackToGoBack:s.newStack}})}e(S())}}}))(M);function fe({vendorIdParam:e,accountContext:t}){const a=w(),n=C(),o=N(),{vendorId:s,billId:r}=V(),d=e??s,{useFeatureGate:c}=R(),i=U.getSignedInUser(),b=h((u=>B(u))),g=O(),x=p(n.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h((u=>k(u,d))),{isFeatureEnabled:I}=c(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=c(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(Z,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:g.colors.grey5}}):l.jsxs(ne,{windowSize:o,children:[l.jsx(W,{vendorId:d,billId:r}),l.jsx(oe,{location:n,navigate:a,billId:r,vendorId:d,currentTenant:b,bankAccountContext:f,isVendorRecommendationEnabled:I,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},ce=H.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 ${z.sp1} ${e.theme.colors.dropShadowNormal}`};
18
- `,re=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:r}=t,{tenantEmailDomain:d}=r;return{onFetchBankName:c=>{e(j(c))},onSaveHandler:c=>{e(G(t.bankAccountContext,c,"us-domestic",s))},onWireDetailsUpdated:c=>{const{bankAccountSection:i}=c;e(T({data:i}))},onCancel:()=>{(()=>{const c=p(o.state?.pathnameStackToGoBack),i=c.poppedPathname??$();n(i,{state:{pathnameStackToGoBack:c.newStack}})})(),e(S())},onAddressClick:c=>{if(t.bankAccountContext==="express-pay")n("./add-address");else{const i=se(d,c,a),b=te(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:b}})}},onBackClick:()=>{if(e(F({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")n("../",{relative:"path"});else{const c=p(t.location.state?.pathnameStackToGoBack),i=c.poppedPathname??$(0);t.navigate(i,{state:{pathnameStackToGoBack:c.newStack}})}e(S())}}}))(ee);function xe({vendorIdParam:e,accountContext:t}){const a=w(),n=C(),o=N(),{vendorId:s,billId:r}=V(),d=e??s,c=U.getSignedInUser(),{useFeatureGate:i}=R(),b=O(),g=h((u=>B(u))),x=p(n.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h((u=>k(u,d))),{isFeatureEnabled:I}=i(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=i(v.isDepositAccountsFeatureEnabled);if(c==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(Z,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:b.colors.grey5,boxShadow:`0px 2px ${z.sp1} ${b.colors.dropShadowNormal}`}}):l.jsxs(ce,{windowSize:o,children:[l.jsx(W,{vendorId:d,billId:r}),l.jsx(re,{location:n,navigate:a,billId:r,vendorId:d,currentTenant:g,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const $=(e=2)=>{let t="../";for(let a=0;a<e;a++)t=`${t}../`;return t};export{fe as A,xe as D,W 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 c}from"./liveblocks-CgHUgeBY.js";import{a2 as d,ac as f,E as l}from"./index-vIt7RQvO.js";import{D as b}from"./mui-C4zFSCiU.js";import"./sentry-DSWD_gIh.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="c4a1a051-122a-4bbe-9cb2-6f5c19e6b4ff",e._sentryDebugIdIdentifier="sentry-dbid-c4a1a051-122a-4bbe-9cb2-6f5c19e6b4ff")}catch{}})();const p={drawerLeftMargin:new f(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:n,onClose:t}=e,a=d(),s=o?.valuePx(a)??p.drawerLeftMargin.valuePx(a),i=l();return c.jsx(b,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:i.colors.black,opacity:.8,cursor:"pointer"}}},onClose:t,children:n})}export{h as D};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-CgHUgeBY.js";import{a as d}from"./sentry-DSWD_gIh.js";import{h as B,u as A,g as G,i as F,j as l,N as q,l as $,n as N,o as O}from"./core-Cc7wW2EM.js";import{WZ as _,fF as M,We as R,m$ as V,Sf as I,X2 as Y,WT as z,l$ as U,Sg as S,Wj as X,Wk as Z,WV as H,WU as J}from"./zeni-epic-state-BVJjEVAA.js";import{b9 as K,j as L,a5 as Q,p as tt}from"./index-vIt7RQvO.js";import"./mui-C4zFSCiU.js";import{d as k}from"./decodeURIComponentSafe-DhqIXi_U.js";import{w as et}from"./withTransactionSidePanel-DkQdwLfY.js";import{f as at,c as nt}from"./routePaths-C0UIXwMQ.js";import"./recharts-DJGeJ2v_.js";import"./analytics-S5MhEivL.js";import"./plaid-vsHcqLdj.js";import"./dnd-DEyyKSEC.js";import"./stripe-cKAAJElX.js";import"./lottie-C1A2hiZE.js";import"./lexical-DXgKWO29.js";import"./pdf-rXyPRm1U.js";import"./utils-DiIEQ7_h.js";import"./useAskAiCfoHostNavButtonProps-7-6nPEHY.js";import"./TransactionDetailScreen-DVFrl6h2.js";import"./useInitialThreadRequest-D4Y8xhXu.js";import"./expenseAutomationHelper-iXuIUZiF.js";import"./stripSplatSuffix-kLnY55Qt.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="3fa2e616-5463-4b76-994d-6a98513f2d66",a._sentryDebugIdIdentifier="sentry-dbid-3fa2e616-5463-4b76-994d-6a98513f2d66")}catch{}})();const ot=$((function(a,t){const e=t.entity,o=Y(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:z(a,"common")},trendWithTransactionsReport:o,analytics:L,isAccountingClassesEnabled:U(a)}}),(function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(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?a(H({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(J("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(X()),a(Z()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Q(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&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(I(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(K),it=et((function({entityType:a,...t}){const e=B(),o=A(),c=G(),[m,T]=d.useState(!1),[h,g]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:W,entityNameEncoded:j}=F(),r=k(W??""),p=k(j??""),f=rt(r,p),w=[r,p].filter((n=>n!=null)),i={name:p,id:r,type:a,zeniId:r,qboId:r},D=l((n=>_(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),x=l((n=>M(n).company?.companyInfo.firstMonthOfFY??1)),u=l((n=>R(n.trendWithTransactionsState,i,"EntityDetail")));d.useEffect((()=>{m===!1&&f===!0&&(T(!0),o(V(i)))}),[m,f,i]);const E=l((n=>n.trendState.fetchState)),P=u?.selectedPeriod?.timePeriod??D,v=(function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y})(u?.selectedPeriod?.timePeriod,D);return d.useEffect((()=>{m===!0&&h===!1&&E==="Completed"&&(g(!0),P!=null&&o(I(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))}),[m,h,E]),f?s.jsx(ot,{firstMonthOfFY:x,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:v,resetTrendIsFetchedStates:()=>{T(!1),g(!1)},...t}):s.jsx(q,{to:b(w.length)})})),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,b=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function xt({entityType:a}){return s.jsx(N,{children:s.jsx(O,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{xt as EntityDetailRoutes,xt as default};
@@ -1,38 +0,0 @@
1
- import{j as T}from"./liveblocks-CgHUgeBY.js";import{u as he,h as nt,g as Te,j as _,i as Oe,t as Yn,l as Wn,n as Hn,o as He,N as Kn}from"./core-Cc7wW2EM.js";import{fF as ke,a14 as Qn,q0 as _e,Ue as Xn,A3 as Zn,a15 as es,a16 as ts,a17 as as,a18 as gt,a19 as Qe,gh as Tt,a1a as ca,eW as ns,g0 as ss,a1b as ia,a1c as Xe,qT as os,uR as cs,gS as is,gQ as ls,a1d as rs,r4 as ds,rd as us,qb as ms,qp as wa,gP as re,gR as ps,a1e as hs,qL as Ra,re as Ss,qm as gs,qh as Cs,uX as fs,gO as Me,a1f as tt,Cd as Da,MA as Fa,a1g as _a,Fy as Ma,a1h as Is,eZ as ks,e$ as Ts,sS as bt,W_ as la,X0 as bs,m2 as Ps,X1 as ys,m9 as Es,dl as vs,Dw as Pt,a1i as As,a1j as xs,fm as yt,sG as ra,WT as ws,a1k as Rs,a1l as Ds,mb as Fs,a1m as _s,Rg as Ms,ma as Us,l$ as Os,qE as Ua,rj as at,tt as Oa,tP as Bs,U4 as Ba,ri as da,rl as Va,rn as Vs,bE as js,ny as Ls,nv as zs,rm as Ze,rk as pe,a1n as $s,rE as ua,a1o as Gs,a1p as Ns,sK as qs,sL as Js,WP as Ys,VV as Ws,a0y as Hs,a1q as Ks,WV as ma,WU as Ke,a1r as pa,mq as Qs,a1s as Xs,a1t as Zs,a1u as eo,a1v as to,qz as ao,a1w as no,a1x as so,a1y as oo,ru as co,md as io,m4 as lo,a1z as ro,mc as ha,Xb as uo,a1A as mo,a1B as po,us as ho,u3 as So,u2 as Ct,a1C as go,a1D as Co,a1E as fo,a1F as Io,nJ as ko,br as To,nE as Sa,nq as bo,a1G as Po,g$ as yo,nB as Eo,sU as vo,sW as Ao,sD as xo,VY as wo,VZ as Ro,F0 as Do,E$ as Fo,Fg as _o,a1H as ga,sJ as Mo,a1I as Uo,rU as Oo,r_ as Bo,s9 as Vo,rX as jo,a1J as Lo,s8 as zo,sP as $o,a1K as Go,t0 as No,sx as qo,t6 as Jo,sC as Yo,rF as Wo,a1L as Ho,qX as Ko,qv as Qo,qC as Ca,rp as Xo,a1M as Zo,a1N as ec,a1O as tc,a1P as ac,a1Q as nc,a1R as sc,a1S as oc,ta as cc,a1T as ic,a1U as lc,a1V as fa,uD as rc,tW as dc,tL as Ia,tJ as uc,a1W as mc,ty as pc,td as hc,tM as Sc,a1X as gc,a1Y as Cc,tj as fc,a1Z as Ic,te as kc,ti as Tc,tg as bc,tS as Pc}from"./zeni-epic-state-BVJjEVAA.js";import ja from"./NotFoundScreen-DzxbROot.js";import{a as s,R as La}from"./sentry-DSWD_gIh.js";import{n as be,S as yc}from"./mui-C4zFSCiU.js";import{N as Be,f as Q,j as X,p as te,ar as za,at as $a,dP as Ec,dQ as vc,Q as Ga,z as st,dR as Ac,dS as xc,dT as wc,af as Ue,dU as Rc,dV as ka,bb as Ta,dW as Dc,a8 as Na,dX as Fc,l as et,a as _c,dY as Mc,dZ as Uc,F as Oc,P as Bc,d_ as Vc,d$ as jc,e0 as Lc,b5 as zc,bt as $c,ac as Gc,b6 as Nc,b7 as qc,G as Jc,w as Yc,e1 as Wc,aw as ba,e2 as Hc}from"./index-vIt7RQvO.js";import{u as qa}from"./useAskAiCfoHostNavButtonProps-7-6nPEHY.js";import{g as Pa,b as Kc,c as Qc,h as Xc,a as Zc,i as ei,r as ti,C as ai}from"./TransactionDetailScreen-DVFrl6h2.js";import{u as ni}from"./useActualMatchingMatchDetail-CwcmHDQ8.js";import{d as si}from"./decodeURIComponentSafe-DhqIXi_U.js";import{m as Ja,a as Ya}from"./expenseAutomationHelper-iXuIUZiF.js";import{u as Wa,a as Ha,w as oi}from"./withTransactionSidePanel-DkQdwLfY.js";import{b as ci,S as ii,a as li,J as ri}from"./ScheduleDetailsPrepaidExpensesScreen-PbMzJVD9.js";import{s as ya,i as Ka,h as di,v as ui,c as mi}from"./routePaths-C0UIXwMQ.js";import{a as ft}from"./accountMappingHelper-Gh8rpbjD.js";import{D as pi}from"./DrawerScreen-DyQejCID.js";import"./recharts-DJGeJ2v_.js";import"./analytics-S5MhEivL.js";import"./plaid-vsHcqLdj.js";import"./dnd-DEyyKSEC.js";import"./stripe-cKAAJElX.js";import"./lottie-C1A2hiZE.js";import"./lexical-DXgKWO29.js";import"./pdf-rXyPRm1U.js";import"./utils-DiIEQ7_h.js";import"./useInitialThreadRequest-D4Y8xhXu.js";import"./stripSplatSuffix-kLnY55Qt.js";import"./pathToGoBack-C17GqrA7.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="cd35c387-e345-44ea-8cff-ad6c77ee7c49",t._sentryDebugIdIdentifier="sentry-dbid-cd35c387-e345-44ea-8cff-ad6c77ee7c49")}catch{}})();const hi=()=>{const t=he(),n=nt(),f=Te(),I=_((C=>ke(C))),{useFeatureGate:k}=Be(),{isFeatureEnabled:o}=k(Q.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=k(Q.aiAuditScorePercentage),v=_((C=>C.expenseAutomationViewState.selectedPeriodByTenantId)),l=_((C=>Qn(C,I.tenantId))),{isAiCfoAccessEnabled:S,onAskAiCfoClick:R}=qa({mobileExploreReferrer:"Month-End Close Overview"}),x=s.useCallback(((C,h,L=!1)=>{t(_e({tenantId:h,period:{month:C.month,year:C.year},refreshViewInBackground:L}))}),[]),m=s.useCallback((C=>{const h=f.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&X.trackMonthCloseAuditPage(C.month,C.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,h??null),t(Xn(I.tenantId,C))}),[I.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),g=v[I.tenantId],u=s.useCallback((()=>{const C=f.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&X.trackMonthCloseAuditPage(g.month,g.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,C??null),x(g,I.tenantId,!0)}),[x,g,I.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),F=te(f.state?.pathnameStackToGoBack,f.pathname),A=s.useCallback((()=>{if(l.monthEndCloseChecks!=null&&g!=null){const C=l.monthEndCloseChecks.monthEndCloseCheckList.find((h=>h.progress<100));if(C!=null)return void n(`./${C.id}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:F,message:"comingFromOverview"}});n(`./month_end_insights/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:F,message:"comingFromOverview"}})}}),[l.monthEndCloseChecks,g]),{areTenantIdsInSync:p}=za();return $a({isDataReady:l.fetchState==="Completed"}),s.useEffect((()=>{g!=null&&l.fetchState!=="In-Progress"&&l.fetchState!=="Completed"&&p&&x(g,I.tenantId)}),[x,g,l.fetchState,I.tenantId,p]),s.useEffect((()=>{g!=null&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&p&&t(Zn(g))}),[g,l.monthClosePerformanceTrendFetchStatus.fetchState,p]),s.useEffect((()=>{const C=setInterval((()=>{l.fetchState!=="In-Progress"&&l.fetchState==="Completed"&&u()}),3e5);return()=>clearInterval(C)}),[l.fetchState]),s.useEffect((()=>{if(l.fetchState==="Completed"&&l.monthEndCloseChecks?.auditSummary!=null){const C=f.state?.referrer;X.trackMonthCloseAuditPage(l.selectedPeriod.month,l.selectedPeriod.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,C??null)}}),[l.fetchState,l.selectedPeriod,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),T.jsx(Si,{children:T.jsx(Ec,{monthEndCloseChecksView:l,isRealtimeInsightsFeatureEnabled:o,onMonthEndCheckClick:C=>{n(`./${C}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:F,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:m,handleReviewButtonClick:A,onBackClick:()=>{n("../../dashboard")},onReload:u,isAiCfoAccessEnabled:S,onAskAiCfoClick:R,aiAuditScorePercentageEnabled:r})})},Si=be.div`
2
- display: flex;
3
- height: 100vh;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- background-color: ${t=>t.theme.colors.grey4};
8
- `;function gi({isFullView:t,matchId:n,onClose:f}){const{match:I,detailFetchState:k,handleOpenBill:o,handleContinueMatch:r,handleRefresh:v,handleUndoReversal:l,lastMatchResults:S,lastUndoResults:R,refreshStatus:x,undoReversalStatus:m}=ni(n);return T.jsx(vc,{match:I,detailFetchState:k.fetchState,isRenderedInPanel:!t,isUndoInFlight:m.fetchState==="In-Progress",refreshStatus:x.fetchState,onNavigateBack:f,onOpenBill:o,onContinueMatch:r,onRefresh:v,onUndoReversal:l,lastMatchResults:S,lastUndoResults:R})}const Ci=/^match\/([^/?]+)$/,fi=Ha({displayNamePrefix:"withActualMatchingSidePanel",usePanelSetup:function(t){const{useFeatureGate:n}=Be(),{isFeatureEnabled:f}=n(Q.isTransactionDetailSplitViewEnabled),{isFeatureEnabled:I}=n(Q.isAccrualEnabled),k=Ga(),o=(function(v=!0){const l=nt(),S=Te(),R=Oe(),x=Ja(R),m=Wa({childPathPattern:Ci,enabled:v,listPath:x}),g=m.matchGroups[0]!=null&&m.matchGroups[0]!==""?si(m.matchGroups[0]):void 0,u=R.tenantEmailDomain??S.pathname.split("/").find(Boolean)??"",F=s.useRef({isOpen:m.isOpen,matchId:g});F.current={isOpen:m.isOpen,matchId:g};const A=s.useCallback((h=>{!m.isMobile&&v?F.current.isOpen&&F.current.matchId===h?m.closePanel():m.navigateToChild(`match/${encodeURIComponent(h)}`,{replace:F.current.isOpen}):l(`/${u}/expense-automation/actual-matching/${encodeURIComponent(h)}`)}),[l,m.isMobile,m.navigateToChild,m.closePanel,v,u]),p=s.useCallback((()=>{if(g==null)return;const h=te(S.state?.pathnameStackToGoBack,`${S.pathname}${S.search}`);l(`/${u}/expense-automation/actual-matching/${encodeURIComponent(g)}`,{state:{pathnameStackToGoBack:h}})}),[S.pathname,S.search,S.state,g,l,u]),C=m.isOpen&&g!=null;return{closePanel:m.closePanel,isOpen:C,maximize:p,matchId:v&&C?g:void 0,openPanel:A}})(t&&I===!0&&k===!0&&f===!0),r=s.useMemo((()=>{if(o.isOpen&&o.matchId!=null)return T.jsx(gi,{isFullView:!1,matchId:o.matchId,onClose:o.closePanel},o.matchId)}),[o.closePanel,o.isOpen,o.matchId]);return{injectedProps:s.useMemo((()=>({closeMatchSidePanel:o.closePanel,isMatchPanelOpen:o.isOpen,matchPanelContent:r,matchPanelMatchId:o.matchId,openMatchPanel:o.openPanel})),[r,o.closePanel,o.isOpen,o.matchId,o.openPanel]),selectedItemId:o.matchId,sidePanel:{closePanel:o.closePanel,maximize:o.maximize}}}}),Ii=La.memo((({reconciliation:t,selectedDrawerAccountId:n,onClose:f,onFetchLinkTokenClick:I,onEstablishConnectionClick:k})=>{const o=he(),{useFeatureGate:r}=Be(),{isFeatureEnabled:v}=r(Q.isReconV3Enabled),{isFeatureEnabled:l}=r(Q.isReconciliationCombinedStatementEnabled),S=st.getSignedInUser(),R=_((y=>ke(y))),x=s.useMemo((()=>({userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:R?.tenantId??""})),[S?.userId,S?.zeniSessionId,R?.tenantId]),{accountReconciliationsByAccountID:m,excludedAccountIDs:g,monthYearPeriod:u,statementUploadChosen:F}=t,A=m[n],p=s.useMemo((()=>es(m,n)),[m,n]),C=s.useMemo((()=>ts(m)),[m]),h=s.useMemo((()=>as(m,n)),[m,n]),L=s.useRef(!1),G=s.useCallback((y=>{L.current=y,ka(n,y)}),[n]),q=s.useCallback((y=>{o(gt({accountId:n,selectedPeriod:u,dismissedToBackground:!0,backgroundCompletedSteps:y.completedSteps,startedAtMs:y.startedAtMs,totalDurationSeconds:y.totalDurationSeconds})),y.accountMappings!=null&&o(Qe({accountId:n,selectedPeriod:u,localData:{combinedStatementAccountMappings:y.accountMappings}})),A!=null&&requestAnimationFrame((()=>{L.current||o(Tt({messageSection:"statement_parsing_in_progress",messageText:"success",type:"info",showStatusIcon:!0,variables:[{variableName:"_account_name_",variableValue:Ac(A)}]}))}))}),[o,u,A,n]),b=s.useCallback((()=>{o(gt({accountId:n,selectedPeriod:u,dismissedToBackground:!1}))}),[o,n,u]),J=s.useCallback((y=>{o(ca({accountId:n,selectedPeriod:u,backgroundCompletedSteps:y}))}),[o,u,n]),N=s.useCallback((()=>{o(ca({accountId:n,selectedPeriod:u,backgroundCompletedSteps:0})),o(gt({accountId:n,selectedPeriod:u,dismissedToBackground:!1}))}),[o,u,n]);s.useEffect((()=>()=>{ka(null,!1)}),[]);const e=A?.parsedStatementData?.statementUpload?.statementMeta?.statementUploadId??A?.accountReconEntity.statementMetaData?.statementUploadId,a=A?.statementDateConflict?.previousReconciliationInfo?.reconciledByUserId,i=_((y=>a!=null&&a!==""?ns(ss(y.userState,a)):"")),d=s.useCallback((()=>{o(ia({accountId:n,selectedPeriod:u}))}),[o,n,u]),E=s.useCallback((()=>{o(ia({accountId:n,selectedPeriod:u})),o(Xe({statementUploadChosen:!0}))}),[o,n,u]),P=(y,z)=>{o(fs(y,z.split(".")[0]))},D=(y,z)=>{if(z===!0){const K=A?.combinedStatementGroupId??A?.parsedStatementData?.statementUpload?.statementMeta?.combinedStatementGroupId??A?.parsedStatementData?.statementUpload?.combinedStatementDetails?.combinedStatementGroupId;if(K!=null&&K!=="")return void o(gs({accountId:n,selectedPeriod:u,combinedStatementGroupId:K,fileId:y}))}e!=null&&o(Cs({accountId:n,selectedPeriod:u,fileId:y,statementUploadId:e}))},M=()=>{o(Xe({statementUploadChosen:!1}))},Y=y=>{o(Ss({accountId:n,selectedPeriod:u,payload:y,statementAccountScope:l===!0?A?.localData?.statementAccountScope??"single_account":"single_account"}))},W=s.useCallback(((y,z,K)=>{o(os({accountId:y,selectedPeriod:z,statementUploadId:K}))}),[o]),se=s.useCallback(((y,z,K,Z,ge)=>{ge!=null&&ge!==""&&o(cs(ge)),o(Z==null||Z===""?ls({accountId:y,selectedPeriod:z,statementUploadId:K}):is({accountId:y,selectedPeriod:z,statementUploadId:K,combinedStatementGroupId:Z}))}),[o]),oe=s.useCallback(((y,z)=>{z!==""&&o(rs({accountId:n,selectedPeriod:u,statementUpdateLocalData:y,statementUploadId:z}))}),[o,n,u]),Pe=s.useCallback((()=>{e!=null&&o(A?.localData?.statementAccountScope!=="multi_account"?us({accountId:n,selectedPeriod:u,statementUploadId:e}):ds({accountId:n,selectedPeriod:u,statementUploadId:e}))}),[o,A?.localData?.statementAccountScope,n,u,e]),ye=s.useCallback((y=>{e!=null&&o(ms({accountId:n,selectedPeriod:u,statementUploadId:e,accountMappings:y}))}),[o,u,n,e]),Ee=s.useCallback((()=>{o(Xe({statementUploadChosen:!0}))}),[o]),H=y=>{o(Qe({accountId:n,selectedPeriod:u,localData:{accountSource:y}}))},B=y=>{o(Qe({accountId:n,selectedPeriod:u,localData:{statementAccountScope:y}}))},Ve=s.useCallback((()=>{o(wa({accountId:n}))}),[o,n]),ve=s.useCallback((y=>{o(re(u,y,!0)),f()}),[o,u,f]),ot=s.useCallback((()=>{o(ps({accountId:n,selectedPeriod:u,statementProcessingFailed:!1})),o(hs({accountId:n,selectedPeriod:u}))}),[o,n,u]),Se=s.useCallback((()=>{o(Ra({accountId:n}))}),[o,n]),je=g.includes(n)?t.excludedAccountReconciliationByAccountID[n]:void 0;if(je!=null)return T.jsx(Ea,{children:T.jsx(va,{$isV3:v===!0,children:T.jsx(xc,{excludedAccountReconciliation:je,includeAccountFetch:t.includeAccountFetchState,isReconV3Enabled:v,onDismissClick:f,onIncludeIntoReconciliation:Se})})});if(A!=null){const y=v===!0?T.jsx(wc,{excludeAccountFetch:t.excludeAccountFetchState,accountReconciliation:A,monthYearPeriod:u,onDismissClick:f,plaidConnectionDetails:t.plaidConnectionDetails,onFetchLinkTokenClick:I,onEstablishConnectionClick:k,onEditFileName:P,onDeleteFile:D,onSelectSourceType:H,onSelectStatementAccountScope:B,isReconciliationCombinedStatementEnabled:l===!0,ledgerAccounts:p,statementOverrideWarningAccountIds:h,unavailableLedgerAccountIds:C,onConfirmStatementMapping:ye,filesEndPoint:Ue.fileMicroServiceBaseUrl,authParams:x,openFilePicker:F,onStatementUploadSuccess:Y,onUploadWindowOpenedOnce:M,onExcludeFromReconciliation:Ve,onRetryParsing:W,onFetchStatementParseInfo:se,onReviewClicked:ve,statementProcessingFailed:A.statementProcessingFailed,statementProcessingDismissedToBackground:A.statementProcessingDismissedToBackground,onDismissStatementProcessingFailed:ot,onContinueInBackground:q,onClearStatementProcessingDismissedToBackground:b,onResetStatementProcessingProgress:N,onStatementProcessingProgressChange:J,onStatementFlowVisibilityChange:G,onReuploadStatement:Ee,onStatementFormDataChange:oe,onStatementConfirmSave:Pe,reconciledByName:i,onDismissDateConflict:d,onReuploadAfterDateConflict:E,isReconV3Enabled:v}):T.jsx(Rc,{excludeAccountFetch:t.excludeAccountFetchState,accountReconciliation:A,monthYearPeriod:u,onDismissClick:f,plaidConnectionDetails:t.plaidConnectionDetails,onFetchLinkTokenClick:I,onEstablishConnectionClick:k,onEditFileName:P,onDeleteFile:D,onSelectSourceType:H,filesEndPoint:Ue.fileMicroServiceBaseUrl,authParams:x,openFilePicker:F,onStatementUploadSuccess:Y,onUploadWindowOpenedOnce:M,onExcludeFromReconciliation:Ve});return T.jsx(Ea,{children:T.jsx(va,{$isV3:v===!0,children:y})})}return null})),Ea=be.div`
9
- display: flex;
10
- flex-direction: column;
11
- height: 100%;
12
- `,va=be.div`
13
- flex: 1;
14
- min-height: 0;
15
- display: flex;
16
- flex-direction: column;
17
- box-sizing: border-box;
18
- min-width: 0;
19
- overflow-x: hidden;
20
- overflow-y: ${t=>t.$isV3===!0?"hidden":"auto"};
21
- `;function ki({panelType:t,scheduleId:n,onClose:f,onCloseAfterDecision:I}){return T.jsx(bi,{children:T.jsx(Pi,{children:Ti(t,n,f,I)})})}function Ti(t,n,f,I){switch(t){case"one_time_accrual":return T.jsx(ri,{isRenderedInPanel:!0,accrualIdOverride:n,onPanelNavigateBack:f});case"accrued_expenses":return T.jsx(li,{isRenderedInPanel:!0,scheduleDetailIdOverride:n,onPanelNavigateBack:f,onPanelCloseAfterDecision:I});case"fixed_assets":return T.jsx(ii,{isRenderedInPanel:!0,scheduleDetailIdOverride:n,onPanelNavigateBack:f,onPanelCloseAfterDecision:I});case"prepaid_expenses":return T.jsx(ci,{isRenderedInPanel:!0,scheduleDetailIdOverride:n,scheduleTypeOverride:"prepaid_expenses",onPanelNavigateBack:f,onPanelCloseAfterDecision:I})}}const bi=be.div`
22
- display: flex;
23
- flex-direction: column;
24
- height: 100%;
25
- `,Pi=be.div`
26
- flex: 1;
27
- min-height: 0;
28
- display: flex;
29
- flex-direction: column;
30
- box-sizing: border-box;
31
- min-width: 0;
32
- overflow-x: hidden;
33
- overflow-y: auto;
34
- `,yi=/^schedule\/(prepaid_expenses|fixed_assets|accrued_expenses|one_time_accrual)\/([^/?]+)$/,Ei=Ha({displayNamePrefix:"withScheduleSidePanel",usePanelSetup:function(t){const n=(function(m=!0){const g=nt(),u=Te(),F=he(),A=Oe(),p=Wa({childPathPattern:yi,enabled:m}),C=p.matchGroups[0],h=Ka(C)?C:void 0,L=p.matchGroups[1]!=null&&p.matchGroups[1]!==""?p.matchGroups[1]:void 0,G=p.isOpen&&h!=null&&L!=null,q=A.tenantEmailDomain??u.pathname.split("/").find(Boolean)??"",b=s.useRef({isOpen:G,scheduleId:L});b.current={isOpen:G,scheduleId:L};const J=s.useCallback(((e,a,i)=>{i!=null&&(a==="prepaid_expenses"||a==="fixed_assets")&&F(Ma({selectedJEScheduleKey:i})),!p.isMobile&&m?b.current.isOpen&&b.current.scheduleId===e?p.closePanel():p.navigateToChild(`schedule/${a}/${e}`,{replace:b.current.isOpen}):g(ya(a,e,q),{state:{message:"expenseAutomation",origin:"je_schedules"}})}),[F,g,p.isMobile,p.navigateToChild,p.closePanel,m,q]),N=s.useCallback((()=>{if(h==null||L==null)return;const e=te(u.state?.pathnameStackToGoBack,u.pathname);g(ya(h,L,q),{state:{pathnameStackToGoBack:e,message:"expenseAutomation",origin:"je_schedules"}})}),[g,h,L,q,u.pathname,u.state]);return{closePanel:p.closePanel,isOpen:G,maximize:N,openPanel:J,panelType:G?h:void 0,scheduleId:G?L:void 0}})(t),f=s.useRef(null),[I,k]=s.useState(null),o=s.useMemo((()=>({registerPanelDirtyGuard:m=>{f.current=m}})),[]),r=s.useCallback((m=>{f.current?.isDirty()===!0?k((()=>m)):m()}),[]),v=s.useCallback((()=>{r(n.closePanel)}),[r,n.closePanel]),l=s.useCallback((()=>{r(n.maximize)}),[r,n.maximize]),S=s.useCallback(((m,g,u)=>{r((()=>n.openPanel(m,g,u)))}),[r,n.openPanel]),R=s.useMemo((()=>{if(I!=null)return{onCancel:()=>k(null),onDiscard:()=>{f.current=null,k(null),I()}}}),[I]),x=s.useMemo((()=>{if(n.isOpen&&n.panelType!=null&&n.scheduleId!=null)return T.jsx(Dc.Provider,{value:o,children:T.jsx(ki,{panelType:n.panelType,scheduleId:n.scheduleId,onClose:v,onCloseAfterDecision:()=>{f.current=null,n.closePanel()}},`${n.panelType}:${n.scheduleId}`)})}),[n.isOpen,n.panelType,n.scheduleId,n.closePanel,v,o]);return{injectedProps:s.useMemo((()=>({closeSchedulePanel:v,isSchedulePanelOpen:n.isOpen,openSchedulePanel:S,schedulePanelContent:x,schedulePendingDiscardConfirmation:R})),[v,S,x,R,n.isOpen]),selectedItemId:n.scheduleId,sidePanel:{closePanel:v,maximize:l}}}});function vi({companyId:t,closeCustomerRequestDrawer:n,addCustomerRequest:f,resetCustomerRequest:I}){const k=st.getSignedInUser();if(k==null)throw Error("Can't access Customer Request page without signing in...");const o=_((r=>Is(r,t,k)));return s.useEffect((()=>{I()}),[]),T.jsx(T.Fragment,{children:o.fetchState==="In-Progress"||o.companyMonthEndReportTemplatesData.fetchState==="In-Progress"?T.jsx(Na,{fetchState:"In-Progress"}):T.jsx(Fc,{onCloseClick:n,addCustomerRequest:f,snippets:o.companyMonthEndReportTemplatesData,bulletPoints:o.zeniRequestsData??[]})})}const Ai={schedules:"Review Schedules",actual_matching:"Actual Matching",existing_schedules:"Existing Schedules"},xi=()=>{const t=_((R=>Me(R))),n=Te(),{currentSelectedViewFetchState:f,currentSelectedView:I,selectedPeriod:k}=t,o=et(I),r=et(f.fetchState),v=t.jeSchedules.uiState.selectedPageTab??"schedules",l=et(v),S=s.useCallback((R=>{const x=n.state?.referrer;I==="transaction_categorization"&&(t.selectedTransactionCategorizationTab==="review"?X.trackTransactionsReviewPage(k.month,k.year,t.transactionView.totalCountByTab.review,0,R,x??null):X.trackTransactionsAutoCategorisedPage(k.month,k.year,t.transactionView.totalCountByTab.autoCategorized,0,R,x??null)),I==="missing_receipts"&&X.trackMissingReceiptsPage(k.month,k.year,R,t.missingReceipts.transactions.length,x??null),I==="je_schedules"&&X.trackMonthCloseScheduleListPage(k.month,k.year,R,t.jeSchedules.pendingReviewSchedules.length,t.jeSchedules.failedPostings.length,(m=>{const g={accruedCount:0,fixedAssetsCount:0,oneTimeAccrualCount:0,prepaidCount:0};return m.forEach((u=>{if(ks(u))g.oneTimeAccrualCount+=1;else switch(Ts(u)){case"prepaid_expenses":g.prepaidCount+=1;break;case"fixed_assets":g.fixedAssetsCount+=1;break;case"accrued_expenses":g.accruedCount+=1}})),g})(t.jeSchedules.pendingReviewSchedules),Ai[v],x??null),I==="flux_analysis"&&X.trackFluxAnalysisPage(k.month,k.year,R,wi(t.fluxAnalysis),x??null),I==="month_end_insights"&&t.auditSummary?.auditScorePercentage!=null&&X.trackInsightsEmailPage(k.month,k.year,R,"draft",t.auditSummary.auditScorePercentage,null,x??null)}),[k,t,v]);return s.useEffect((()=>{(r!==f.fetchState||I!==o||I==="je_schedules"&&l!=null&&v!==l)&&f.fetchState==="Completed"&&S(!1)}),[I,f.fetchState,o,v,l]),S},wi=t=>t.sections.generalExpense.vendors.length+t.sections.reimbursement.vendors.length,{common:{strings:{hyphen:Ri,comma:Aa,space:Di}},dateFormat:Qa}=Jc.getLocalizedStrings(),xa=Pc,Fi=Wn((function(t,n){const{uncategorizedAccounts:f,vendorSearchAutoCompleteData:I,monthEndInsightsCustomerRequestData:k,monthEndInsightsPreviewMode:o,companyId:r,isMissingReceiptsBulkUploadEnabled:v,isTransactionActivityEnabled:l,newScheduleActiveType:S}=n,R=st.getSignedInUser(),x=t.tenantState.currentTenantId,m={userId:R?.userId??"",sessionId:R?.zeniSessionId??"",tenantId:x??""},g=Me(t),{selectedTransactionCategorizationTab:u}=g,{searchTransactionsResults:F,searchTransactionsFetchState:A}=Gs(t),p=S==="prepaid_expenses"?"prepaid_expenses":"fixed_assets",{accountListNestedAccountHierarchy:C,classListNestedAccountHierarchy:h,allDepreciationAccountListNestedAccountHierarchy:L,newScheduleLocalData:G,saveStatus:q}=Ns(t,p);return{expenseAutomationViewSelector:g,accountListNestedAccountHierarchy:C,allDepreciationAccountListNestedAccountHierarchy:L,baseTransactionSearchFetchState:A,baseTransactionSearchResults:F,classListNestedAccountHierarchy:h,newScheduleLocalData:G,initialSelectedBaseTransaction:G.selectedBaseTransactionId!=null?qs(t.transactionState,Js(G.selectedBaseTransactionId)):void 0,newAccrualAccountsView:Ys(t),newScheduleSaveStatus:q,bulkUploadSelector:v===!0?g.missingReceipts.bulkUpload:void 0,vendorSearchAutoCompleteData:I,authParams:m,receiptUploadEndpoint:`${Ue.accountMicroServiceBaseUrl}`,transactionAttachmentsEndpoint:`${ba}/transaction_attachments`,bulkUploadEndpoint:v===!0?`${Ue.communicationAgentMicroServiceBaseUrl}/1.0/receipts/bulk-upload`:void 0,isDisabled:!1,currentTab:u,selectedTransactionGroup:g.transactionView.selectedTransactionGroup,monthEndInsightsCustomerRequestData:k,monthEndInsightsPreviewMode:o,allThreadsSectionOpen:!1,enableMonthEndInsightsZeniGPTFeature:!1,loggedInUser:R,uncategorizedAccounts:f,companyId:r,isTransactionActivityEnabled:l,receiptsEmail:Hs(t.tenantState,x),downloadParams:{authParams:m,jeScheduleEndPoint:`${ba}/jeScheduleReports`,timezone:Ws(),companyName:ke(t).companyName}}}),(function(t,n){const{themeState:f,isAccountingClassesEnabled:I,isCOTEnabled:k,isMissingReceiptsBulkUploadEnabled:o,location:r,vendorSearchAutoCompleteData:v,expenseAutomationViewSelector:l,currentTenant:S,newScheduleActiveType:R,uncategorizedAccounts:x,navigate:m,onClickCustomerRequest:g,handleEditClick:u,closeSchedulePanel:F,isSchedulePanelOpen:A,openSchedulePanel:p,setActivityLogTransactionId:C}=n,{selectedPeriod:h,currentSelectedView:L,reconciliation:{selectedAccountId:G}}=l,{accountSettingsView:q}=l.jeSchedules,b=Ua(h),J=at(b.start),N=at(b.end);return{onZeniLogoClick:()=>{f.toggle()},onUploadReceiptAttachment:e=>{X.trackMissingReceiptAttached(h.month,h.year),t(dc(e))},onUploadTransactionReceipt:(e,a,i,d,E,P)=>{t(fa(e,a,{fetchState:"In-Progress"}));const D=()=>t(fa(e,a,{fetchState:"Error"}));Hc(`${Ue.accountMicroServiceBaseUrl}/1.0/transactions/${a}/attachments`,P,a,i,d,E).then((M=>{M!=null?t(rc(e,M)):D()})).catch(D)},onMissingReceiptsRowClick:(e,a)=>{if(n.openTransactionPanel)return void n.openTransactionPanel(e,a);const i=te(r.state?.pathnameStackToGoBack,r.pathname);m(`../../transaction/${a}/${e}`,{state:{pathnameStackToGoBack:i,message:"expenseAutomation",origin:"missing_receipts"}})},onUploadReceiptComplete:(e,a)=>{t(lc(e,a)),S!=null&&t(_e({tenantId:S.tenantId,period:a,refreshViewInBackground:!0}))},onUploadReceiptFetchStatus:(e,a,i,d)=>{t(ic(e,{fetchState:a,error:i})),i!=null&&t(Tt({messageSection:"missing_receipts_attachment",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"__message__",variableValue:d!=null?Di+Ri+d+Aa:Aa}]}))},onUpdateJESchedulesUIState:e=>{const a=l.jeSchedules.uiState,i=e.selectedPageTab!=null&&e.selectedPageTab!==a.selectedPageTab,d=e.selectedJETypeFilter!==void 0&&e.selectedJETypeFilter!==a.selectedJETypeFilter;i&&n.closeMatchSidePanel?.(),A===!0&&(i||d)&&F?.(),e.createdGroupCollapsed!=null?t(ac()):e.pendingGroupCollapsed!=null?t(nc()):e.failedGroupCollapsed!=null?t(sc()):e.selectedJETypeFilter!==void 0?t(oc(e.selectedJETypeFilter)):t(cc(e))},onUpdateMissingReceiptsUIState:e=>{t(tc(e))},onFetchMissingReceiptsList:()=>{N!=null&&J!=null&&t(Va({start:J,end:N},{amount:75,currencyCode:"USD",currencySymbol:"$"},!0,!1))},...o===!0?{onBulkUploadFiles:e=>{t(bc(e))},onBulkUploadProgress:e=>{t(Tc(e))},onBulkUploadSuccess:e=>{t(kc({batchId:e}))},onBulkUploadUploadedFileCount:e=>{t(Ic(e))},onConfirmBulkUploadMatch:(e,a,i,d,E)=>{t(fc(e,a,i,d,E))},onBulkUploadConfirmMatchAcknowledged:()=>{t(Cc())},onSetBulkUploadResultsTab:e=>{t(gc(e))},onSetBulkUploadCompletedSubTab:e=>{t(Sc(e))},onSetBulkUploadSortConfig:(e,a)=>{t(Ia({sortKey:e,sortOrder:a}))},onClearBulkUpload:()=>{t(hc())},onSearchTransactionsForManualMatch:(e,a)=>{t(xa(e,a??void 0))},onLoadMoreManualSearch:()=>{const{manualSearch:e}=l.missingReceipts.bulkUpload;e.nextPageToken!=null&&e.searchQuery!==""&&t(xa(e.searchQuery,e.nextPageToken))},onFetchCompletedTransactions:(e,a)=>{t(pc(e,a))},onClearBulkUploadBatchDetailsForScopeChange:()=>{t(mc())},onFetchBulkUploadBatches:e=>{t(Oa(e))},onFetchMoreBatchDetails:()=>{t(uc())},onResetBulkUploadSort:()=>{t(Ia({sortKey:void 0,sortOrder:void 0}))}}:{},onClearMissingReceiptsTabNavigation:()=>{t(ec())},onSearchTextChanged:e=>{const a=l.currentSelectedView,i=l.selectedTransactionCategorizationTab;a==="transaction_categorization"&&(t(Ct({selectedTab:i,uiState:{searchString:e}})),N!=null&&J!=null&&t(pe(i,{start:J,end:N},!0,!1,e,void 0,!1,!0)))},onFiltersChange:e=>{const a=l.selectedTransactionCategorizationTab;t(Zo({filters:e,selectedTab:a}))},onRefresh:()=>{n.trackExpenseAutomationTabAnalytics(!0),t(Xo())},onClose:()=>{L==="reconciliation"&&G!=null&&t(Ca({selectedAccountId:void 0})),m("../")},onBack:()=>{L==="reconciliation"&&G!=null&&t(Ca({selectedAccountId:void 0}))},onSaveReconciliation:e=>{t(Qo(e))},onSaveReconciliationReview:e=>{t(Ko(e))},onUpdateStep:e=>{const{selectedPeriod:a}=l,i=te(r.state?.pathnameStackToGoBack,r.pathname);m(`../${e}/${a.month}-${a.year}`,{state:{pathnameStackToGoBack:i,referrer:l.currentSelectedView}}),t(Ba(e))},handleLogOutClick:()=>{const e=te(r.state?.pathnameStackToGoBack,r.pathname);m("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},onJeAccountSettingsChange:e=>{const{vendorsAccountSection:a}=e,{prepaidExpensesAccount:i,fixedAssetsAccount:d,accruedExpensesAccount:E}=a,P=ft(q.prepaidExpensesAccountList,i.selectedOptions),D=ft(q.fixedAssetsAccountList,d.selectedOptions),M=ft(q.accruedExpensesAccountList,E.selectedOptions),Y={selectedPrepaidExpensesAccountIds:P.map((W=>W.accountId)),selectedFixedAssetsAccountIds:D.map((W=>W.accountId)),selectedAccruedExpensesAccountIds:M.map((W=>W.accountId))};t(Ho({data:Y}))},onSaveJeAccountSettingsClick:()=>{t(Wo())},onJESchedulesFormDataChange(e,a){const{jeScheduleID:i,accumulatedDepreciationCategory:d,scheduleClass:E,scheduleExpenseCategory:P,vendor:D}=a,{allAccountList:M,allClassList:Y,allDepreciationAccountList:W}=l.jeSchedules,se=v.entityAutoCompleteView.vendor.length>0?v.entityAutoCompleteView.vendor.find((H=>H.id===D?.selectedOption)):void 0,oe={id:se?.zeniId??D?.selectedOption??"",name:se?.name??D?.defaultOptions.find((H=>H.value===D?.selectedOption))?.label??"",logo:se?.logo},Pe=P?.selectedOption!=null?M.find((H=>H.qboId===P.selectedOption)):void 0,ye=E?.selectedOption!=null?Y.find((H=>H.classId===E.selectedOption)):void 0,Ee=d?.selectedOption!=null?W.find((H=>H.qboId===d.selectedOption)):void 0;t(Yo({scheduledJournalEntryID:e,localData:{jeScheduleID:i,scheduledJournalEntryID:e,updatedCategoryId:Pe?.accountId,updatedClassId:ye?.classId,updatedAccumulatedDepreciationCategoryID:Ee?.accountId,updatedVendor:{id:oe.id,name:oe.name}}}))},onRevertJeSchedule(e,a,i,d,E){t(Jo(e,a,i,d,E))},ignoreRecommendedJeSchedule(e,a,i,d){t(qo(e,a,i,d))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(e,a)=>{e.trim().length>=2?t(ma({searchString:e,entityType:a,searchOrigin:"common"})):e.trim().length===0&&t(Ke("common"))},onCancelAutoComplete:()=>{t(Ke("common"))}},onPostJESchedule(e,a){t(No({scheduledJournalEntryID:e,jeScheduleTransactionKey:a}))},clearJeScheduleLocalData(){t(Go())},onViewTransaction(e){if(n.tenantEmailDomain==null)return;const a=mi(e,n.tenantEmailDomain),i=te(n.location.state?.pathnameStackToGoBack,`${n.location.pathname}${n.location.search}`);n.navigate(a,{state:{pathnameStackToGoBack:i,message:"expenseAutomation",origin:"je_schedules"}})},onSearchBaseTransaction(e){t($o({query:e,scheduleType:R==="prepaid_expenses"?"prepaid_expenses":"fixed_assets"}))},onNewScheduleFormChange(e,a){const i=yt(e)==="prepaid_expenses"?"prepaid_expenses":"fixed_assets";t(ga({scheduleType:i,localData:a}))},onOpenMatchNewModal(e){t(zo(e))},onCloseMatchNewModal(){t(Lo())},onClearMatchNewModal(){t(jo())},onSearchMatchTransactions(e,a){t(Vo(e,a))},onSearchMatchAccruals(e,a){t(Bo(e,a))},onMatchAndReverse(e){t(Oo(e.transactionId,e.transactionIntegrationId,e.transactionType,e.lineIds,e.transactionSyncToken,e.accrualIds))},onUpdateActualMatchingUIState(e){t(Uo(e))},onSaveSchedule(e,a){const i=e==="prepaid_expenses"?"prepaid_expenses":"fixed_assets",{allAccountList:d,allDepreciationAccountList:E}=l.jeSchedules,P=a.selectedAccount!=null?d.find((M=>M.qboId===a.selectedAccount)):void 0,D=a.selectedAccumulatedDepreciationCategory!=null?E.find((M=>M.qboId===a.selectedAccumulatedDepreciationCategory)):void 0;t(ga({scheduleType:i,localData:{...a,selectedAccount:P?.accountId,selectedAccumulatedDepreciationCategory:D?.accountId}})),t(Mo({scheduleType:i}))},onCreateAccruedSchedule(e){const a="accrued_expenses";t(wo()),t(Ro()),t(Do({scheduleType:a,localData:e,selectedJeScheduleDetailId:void 0})),t(Fo({scheduleType:a})),t(_o(a,void 0))},onCreateOneTimeAccrual(e){t(xo(e))},handleJeScheduleClick:(e,a,i)=>{if((function(E,P){return P!=="accrued_expenses"})(0,i)&&t(Ma({selectedJEScheduleKey:a})),p!=null&&Ka(i))return void p(e,i,a);const d=te(r.state?.pathnameStackToGoBack,r.pathname);m(`../../vendors/schedules/${i}/details/${e}`,{state:{pathnameStackToGoBack:d,message:"expenseAutomation",origin:"je_schedules"}})},onOneTimeAccrualFeedback:(e,a,i,d)=>{t(a!=="revert"?Ao(e,i,d):vo(e,i,d))},onOneTimeAccrualClick:e=>{if(p!=null)return void p(e,"one_time_accrual");const a=te(r.state?.pathnameStackToGoBack,r.pathname);m(`../../vendors/schedules/one_time_accrual/details/${e}`,{state:{pathnameStackToGoBack:a,message:"expenseAutomation",origin:"je_schedules"}})},onOpenMatch:e=>{n.openMatchPanel?.(e)},improveMonthEndInsightsUsingZeniGPTClick:e=>{S!=null&&t(Eo(e,S.companyId,S.tenantId))},onClickCustomerRequest:g,setActivityLogTransactionId:C,onCloseAllThreadsSection:()=>{},onCloseFileAttachmentSnackBar:()=>{t(yo())},onOpenFileAttachmentSnackBar:()=>{t(Tt({messageSection:"cockpit_month_end_email_attachment_upload",messageText:"failed",type:"error",showStatusIcon:!0}))},onRemoveFileAttachment:e=>{t(Po(e))},onUpdateFileAttachment:e=>{t(bo({files:e}))},previewMonthEndReport:(e,a,i,d,E)=>{S!=null&&t(Sa(e,S.companyId,a,!0,i,d,{agentInsightEdits:E,tenantId:S.tenantId}))},saveMonthEndReport:(e,a,i,d,E)=>{S!=null&&t(Sa(e,S.companyId,a,!1,i,d,{agentInsightEdits:E,tenantId:S.tenantId}))},onEditMonthEndInsightsClick:u,sendMonthEndReport:e=>{const a=r.state?.referrer,{selectedPeriod:i,auditSummary:d}=l;S!=null&&d?.auditScorePercentage!=null&&(t(ko(S.companyId,e,S.tenantId)),X.trackInsightsEmailPage(i.month,i.year,!1,"draft",d.auditScorePercentage,To().format(Qa.analytics.MMMDDCommaYYYYformat),a??null))},onTransactionCategorizationRowClick:(e,a)=>{const i=l.transactionView.uiState.searchString??"",d=l.transactionView.transactions,E=d.findIndex((M=>M.id===e)),P=i.length>0?{resultPosition:E>=0?E+1:void 0,resultsCount:d.length,searchTerm:i}:void 0;if(n.openTransactionPanel)return void n.openTransactionPanel(e,a,P);const D=te(r.state?.pathnameStackToGoBack,r.pathname);m(`../../transaction/${a}/${e}`,{state:{pathnameStackToGoBack:D,message:"expenseAutomation",origin:"transaction_categorization",searchContext:P}})},setLocalDataForCategoryAndClass:(e,a,i,d,E,P,D,M,Y,W,se,oe)=>{t(Io(e,a,i,d,x,E,P,D,M,Y,W,se,oe))},onCancelAutoComplete:()=>{t(Ke("common"))},updateExpenseAutomationReconListScrollPosition:e=>{t(pa({scrollPosition:e}))},onUpdateTab:e=>{n.closeSidePanel?.(),N!=null&&J!=null&&(t(pe(e,{start:J,end:N},!1,!1)),t(fo(e)))},onUpdateTransactionCategorizationCompletedSubTab:e=>{n.closeSidePanel?.(),N!=null&&J!=null&&(t(Co(e)),t(pe("autoCategorized",{start:J,end:N},!1,!1)))},onTransactionGroupChange:e=>{n.closeSidePanel?.(),N!=null&&J!=null&&(t(go(e)),t(pe(n.expenseAutomationViewSelector.selectedTransactionCategorizationTab,{start:J,end:N},!1,!1)))},onUpdateTransactionCategorizationUIState:(e,a)=>{t(Ct({selectedTab:e,uiState:a})),N!=null&&J!=null&&t(pe(e,{start:J,end:N},!1,!1,a.searchString,null,!0))},onUpdateScrollYOffSetTransactionCategorizationUIState:(e,a)=>{t(Ct({selectedTab:e,uiState:a}))},onFetchTransactionCategorizationList:(e,a,i,d,E,P)=>{N!=null&&J!=null&&t(pe(e,{start:J,end:N},!0,i,a,d,E,P))},resetTransactionCategorizationLocalData:(e,a,i,d,E,P,D)=>{t(So(e,a,i,d,D??null,E,P,!1)),ti(t,a.map(String))},updateSelectedVendorForTransaction:(e,a,i,d,E)=>{t(ha({selectedTab:e,transactionId:a,lineId:i,selectedTransaction:d,uncategorizedAccounts:x,updatedVendor:E,isAccountingClassesEnabled:I}))},onSaveUpdateTransactionCategorization:(e,a,i)=>{const d=r.state?.referrer;e==="autoCategorized"?X.trackTransactionsAutoCategorisedPage(h.month,h.year,l.transactionView.totalCountByTab.autoCategorized,a.length,!1,d??null):X.trackTransactionsReviewPage(h.month,h.year,l.transactionView.totalCountByTab.review,a.length,!1,d??null),t(ho(e,a,i)),ei(a.map(String))},onUpdateSelectedCheckboxTransactionIds:(e,a)=>{t(po({selectedTab:e,transactionIds:a}))},onFetchRecommendationsForEntityCategorizationWithCustomer:(e,a,i,d,E,P)=>{const{transactionId:D,transaction:M,lineIds:Y}=a;P!=null&&t(uo({transactionId:D,customerUpdates:P})),t(mo({selectedTab:d,transactionId:D.id,lineId:Y[0],selectedTransaction:M,uncategorizedAccounts:x,updatedCustomer:P,selectedEntity:E,isAccountingClassesEnabled:I})),E!=null&&t(Pt({entity:E,amount:e,transactionDetails:a,flowType:"categorization",selectedTab:d,isFetchCOT:k}))},onFetchRecommendationsForEntityCategorization:(e,a,i,d,E,P)=>{const{transactionId:D,transaction:M,lineIds:Y}=a;P!=null&&(t(io({transactionId:D,vendorUpdates:{name:P.name,id:P.id?P.id:void 0}})),t(lo({vendorId:P.id?P.id:void 0,localData:{vendorName:P.name,vendorId:P.id?P.id:void 0}}))),P?.id?(t(ha({selectedTab:d,transactionId:D.id,lineId:Y[0],selectedTransaction:M,uncategorizedAccounts:x,updatedVendor:P,selectedEntity:E,isAccountingClassesEnabled:I})),E!=null&&t(Pt({entity:E,amount:e,transactionDetails:a,flowType:"categorization",selectedTab:d,isFetchCOT:k}))):t(ro({selectedTab:d,transactionId:D.id,lineId:Y[0]}))},fetchFluxViewOnScroll:(e,a)=>{t(Ze(e,!0,!1,a,!1,!0))},onFetchFluxViewList:()=>{t(Ze(h,!0,!1,null,!1,!1))},markAsReview:(e,a,i,d)=>{X.trackFluxAnalysisReviewed(i.month,i.year,d??!1,e),t(co(a,e,i,d??!1))},onUpdateFluxAnalysisUIState:e=>{t(oo(e))},updateOperatingExpensesIdsForReview:e=>{t(so({operatingExpenseIds:e,selectedPeriod:h}))},redirectToVendorDetailPage:e=>{if(n.tenantEmailDomain!=null){const a=ui(e.id,e.qboId,n.tenantEmailDomain),i=te(n.location.state?.pathnameStackToGoBack,n.location.pathname);n.navigate(a,{state:{pathnameStackToGoBack:i,message:"expenseAutomation",referrer:"Vendor List",origin:"flux_analysis"}})}},updateSectionIdsForReview:e=>{t(no({sectionId:e,selectedPeriod:h}))},onFetchReimbursementView:(e,a,i)=>{t(Ze(e,!0,!1,a,!0,i))},onReviewClicked:e=>{t(re(h,e))},setOpenDrawerClicked:e=>{t(tt({selectedDrawerAccountId:e}))},onFetchLinkTokenClick:(e,a)=>{t(Da("expense_automation_reconcile",e,a))},onEstablishConnectionClick:(e,a)=>{const i=S?.companyId;i!=null&&(t(Fa(e,i,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",a)),t(_a({accountId:a,connectionInProgress:!0})))},onAddStatementClick:e=>{t(tt({selectedDrawerAccountId:e})),t(Qe({accountId:e,selectedPeriod:h,localData:{accountSource:"bank_statement"}})),t(Xe({statementUploadChosen:!0}))},onReloadReconciliationListPage:()=>{t(re(h,void 0,!0,!1))},onUpdateReconcileTabLocalData:e=>{t(ao({selectedTransactionIds:e}))},onReconTabColumnSortConfigChanged:(e,a)=>{t(to({sortKey:e,sortOrder:a}))},onReconReviewTabColumnSortConfigChanged:(e,a)=>{t(eo({sortKey:e,sortOrder:a}))},onReconTabUpdate:e=>{n.closeSidePanel?.(),t(Zs({selectedTab:e}))},updateReconReviewTabLocalData:(e,a,i)=>{const d=e.vendor?.id;i&&d!=null&&t(Qs(d)),t(Xs({data:e,transactionId:a}))},onReconMatchedTransactionClick:e=>{if(n.openTransactionPanel)return void n.openTransactionPanel(e,bt("bill"));const a=te(r.state?.pathnameStackToGoBack,r.pathname);m(`../../transaction/bill/${e}`,{state:{pathnameStackToGoBack:a,message:"expenseAutomation",origin:"reconciliation"}})},onReloadPage:()=>{window.location.reload()},onBackClick:()=>{m(-1)},onReconListPageScroll:e=>{t(pa({scrollPosition:e}))},onVendorAutoCompleteInputChange:e=>{e.trim().length>=2?t(ma({searchString:e,searchOrigin:"common"})):e.trim().length===0&&t(Ke("common"))},onReconNodeCollapseToggled:(e,a)=>{t(Ks({nodeId:e,collapsed:a}))},updateSectionCollapseStatus:()=>{},onExcludeAccountFromReconciliation:e=>{t(wa({accountId:e}))},onIncludeAccountIntoReconciliation:e=>{t(Ra({accountId:e}))}}}),((t,n,f)=>{const{isMissingReceiptsBulkUploadEnabled:I,...k}=f;return(function(o,r,v){return{...o,...r,...v,onUploadTransactionReceipt:(l,S,R,x,m)=>{r.onUploadTransactionReceipt(l,S,R,x,m,o.authParams)}}})(t,n,k)}))(Yc(Wc)),It="newScheduleMode",kt="newScheduleType",_i=Ei(oi((function(t){const n=t.displayName??t.name??"Component",f=La.memo(t),I=k=>{const o=he(),r=(function(){const p=he(),C=_((h=>Me(h).reconciliation.selectedDrawerAccountId));return{isOpen:C!=null,selectedAccountId:C,openPanel:s.useCallback((h=>{p(tt({selectedDrawerAccountId:h}))}),[p]),closePanel:s.useCallback((()=>{p(tt({selectedDrawerAccountId:void 0}))}),[p])}})(),v=_((p=>Me(p).reconciliation)),l=_((p=>ke(p))),S=s.useCallback(((p,C)=>{o(Da("expense_automation_reconcile",p,C))}),[o]),R=s.useCallback(((p,C)=>{const h=l?.companyId;h!=null&&(o(Fa(p,h,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",C)),o(_a({accountId:C,connectionInProgress:!0})))}),[o,l?.companyId]),x=s.useMemo((()=>{if(r.isOpen&&r.selectedAccountId!=null)return T.jsx(Ii,{reconciliation:v,selectedDrawerAccountId:r.selectedAccountId,onClose:r.closePanel,onFetchLinkTokenClick:S,onEstablishConnectionClick:R})}),[r.isOpen,r.selectedAccountId,r.closePanel,v,S,R]),m=s.useMemo((()=>({reconPanelContent:x,reconSidePanelIsOpen:r.isOpen,closeReconSidePanel:r.closePanel})),[x,r.isOpen,r.closePanel]),{useFeatureGate:g}=Be(),{isFeatureEnabled:u}=g(Q.isReconV3Enabled),F=s.useContext(Ta),A=s.useMemo((()=>r.isOpen?u===!0?{selectedItemId:r.selectedAccountId}:{closePanel:r.closePanel,selectedItemId:r.selectedAccountId}:F),[r.isOpen,r.closePanel,r.selectedAccountId,F,u]);return T.jsx(Ta.Provider,{value:A,children:T.jsx(f,{...k,...m})})};return I.displayName=`withReconSidePanel(${n})`,I})(fi((({closeMatchSidePanel:t,closeReconSidePanel:n,closeSidePanel:f,matchPanelContent:I,isMatchPanelOpen:k,openMatchPanel:o,openTransactionPanel:r,panelContent:v,reconPanelContent:l,reconSidePanelIsOpen:S,isSchedulePanelOpen:R,closeSchedulePanel:x,openSchedulePanel:m,schedulePanelContent:g,schedulePendingDiscardConfirmation:u,sidePanelIsFullView:F,sidePanelIsOpen:A})=>{const{isAiCfoOpen:p,setIsAiCfoOpen:C}=_c(),h=Mc(),{isOpen:L}=Uc(),G=nt(),q=Te(),b=he(),{isAiCfoAccessEnabled:J,onAskAiCfoClick:N}=qa({mobileExploreReferrer:"Transaction categorization"}),e=s.useCallback((()=>{k===!0&&t?.(),A===!0&&F!==!0&&f?.()}),[t,f,k,F,A]),a=_(As);s.useEffect((()=>{a===!0&&(e(),b(xs()))}),[a,e,b]);const{areTenantIdsInSync:i}=za(),d=xi(),E=Oc(),[P,D]=s.useState(!1),[M,Y]=Yn(),W=s.useCallback((c=>{Y((w=>{const $=new URLSearchParams(w);return c==null?($.delete(It),$.delete(kt),$):($.set(It,c.scheduleDetailsMode),$.set(kt,c.scheduleType),$)}),{replace:!0})}),[Y]),[se,oe]=s.useState(void 0),Pe=s.useCallback(((c,w,$)=>{const j=yt(c);oe(j),W({scheduleDetailsMode:w,scheduleType:c}),b(ra({scheduleType:j==="prepaid_expenses"?"prepaid_expenses":"fixed_assets",shouldResetEnteredData:$}))}),[b,W]),ye=s.useMemo((()=>{const c=M.get(It),w=M.get(kt);return c!=null&&w!=null?{scheduleDetailsMode:c,scheduleType:w}:void 0}),[M]),Ee=s.useCallback((c=>{W(c),c!=null&&b(ra({scheduleType:yt(c.scheduleType)==="prepaid_expenses"?"prepaid_expenses":"fixed_assets",shouldResetEnteredData:!0}))}),[b,W]),H=_((c=>la(c))),B=_((c=>ke(c))),[Ve,ve]=s.useState(!1),[ot,Se]=s.useState(!1),[je,y]=s.useState([]),[z,K]=s.useState(null),Z=s.useCallback((()=>{K(null)}),[]),ge=z?.contentType==="activity"?z.detail.transactionId:void 0,ct=s.useCallback((c=>{c!=null?(p&&C(!1),h(),e(),K({contentType:"activity",detail:{transactionId:c}})):K((w=>w?.contentType==="activity"?null:w))}),[e,p,h,C]),Xa=s.useCallback((c=>{p&&C(!1),h(),e(),K({contentType:"transfer",detail:c})}),[e,p,h,C]),Za=s.useCallback((()=>{h(),Z(),e(),N()}),[e,Z,N,h]),Et=s.useRef(p);s.useEffect((()=>{p===!0&&Et.current===!1&&(h(),Z(),e()),Et.current=p}),[e,Z,p,h]);const vt=s.useRef(L);s.useEffect((()=>{L===!0&&vt.current===!1&&(p&&C(!1),Z(),k===!0&&t?.(),A===!0&&F!==!0&&f?.()),vt.current=L}),[Z,t,f,L,p,k,C,F,A]);const Le=A===!0&&F!==!0||k===!0,At=s.useRef(Le);s.useEffect((()=>{Le&&!At.current&&(p&&C(!1),h(),Z()),At.current=Le}),[Z,p,Le,h,C]);const[xt,en]=s.useState(!1),wt=s.useRef(!1),{selectedTab:tn}=Oe(),{tenantEmailDomain:it}=Oe(),[lt,Rt]=s.useState(q.state?.message==="comingFromTransactionDetail"),Dt=q.state?.message==="comingFromOverview",an=Bc(),rt=st.getSignedInUser(),{useFeatureGate:ce}=Be(),{isFeatureEnabled:Ft}=ce(Q.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:Ae}=ce(Q.isMissingReceiptsBulkUploadEnabled),{isFeatureEnabled:dt}=ce(Q.isTransactionActivityEnabled),{isFeatureEnabled:_t}=ce(Q.isAccrualEnabled),nn=Ga(),de=_t===!0&&nn===!0,{isFeatureEnabled:Mt}=ce(Q.isCreateTransferEntryFromExpenseEnabled),{isFeatureEnabled:sn}=ce(Q.isProjectsTransactionsEnabled),{isFeatureEnabled:on}=ce(Q.isReconV3Enabled),cn=s.useCallback((c=>{const w=bt(c.transactionType??(c.view==="reconciliation"?"bill":"expense")),$=te(q.state?.pathnameStackToGoBack,q.pathname),j=new URLSearchParams({view:"full"});c.threadId!=null&&j.set("thread_id",c.threadId),c.entityType!=null&&j.set("entity_type",c.entityType),G(`/${it}/transaction/${encodeURIComponent(w)}/${c.transactionId??c.entityId}?${j.toString()}`,{state:{pathnameStackToGoBack:$,message:"expenseAutomation"}})}),[G,it,q.state,q.pathname]),ln=_((c=>ws(c,"common"))),V=_((c=>Me(c))),{categoryOptions:rn,paymentAccountNames:dn}=_((c=>Rs(c.accountState))),un=_((c=>Ds(c.classState))),{monthEndCloseChecksView:ee,currentSelectedView:U,selectedPeriod:O,selectedTransactionCategorizationTab:ut,currentSelectedViewBackgroundRefreshFetchState:mn,currentSelectedViewFetchState:ie,jeSchedules:mt,reconciliation:Ut}=V;Kc(U==="transaction_categorization");const pn=V.transactionView.saveStatus.fetchState,ze=V.transactionView.transactions,Ot=s.useRef(ze);Ot.current=ze;const Bt=_((c=>c.expenseAutomationTransactionsViewState?.transactionCategorizationView)),Vt=_((c=>c.expenseAutomationTransactionsViewState?.selectedTransactionCategorizationTab)),jt=s.useRef(Bt);jt.current=Bt;const Lt=s.useRef(Vt);Lt.current=Vt;const $e=_((c=>{const w=c.expenseAutomationTransactionsViewState?.selectedTransactionCategorizationTab;return w!=null?c.expenseAutomationTransactionsViewState?.transactionCategorizationView?.[w]?.filters:void 0})),zt=s.useRef("");s.useEffect((()=>{if(U!=="transaction_categorization")return;const c=V.transactionView.uiState.searchString??"";if(ie.fetchState!=="Completed"||c.length===0||c===zt.current)return;zt.current=c;const w=$e!=null?Vc($e):0,$=$e?.categories.filter((j=>j.values.length>0&&String(j.values[0]??"").trim()!=="")).map((j=>`${j.field}:${j.values.join(",")}`))??[];X.trackAiCloseTransactionSearch({filtersApplied:$,hasResults:ze.length>0,isFiltered:w>0,resultsCount:ze.length,searchTerm:c,searchType:"free_text"})}),[U,ie.fetchState,V.transactionView.uiState.searchString,V.transactionView.transactions,$e]);const le=Qc(pn,(()=>{const c=[],w=Lt.current,$=jt.current,j=$!=null&&w!=null?$[w]:void 0;if(j?.transactionReviewLocalDataById!=null)for(const fe of Object.values(j.transactionReviewLocalDataById)){const ae=fe?.transactionReviewLocalData?.lineItemById;if(ae!=null)for(const pt of Object.values(ae)){const Fe=pt?.account;Fe?.accountId!=null&&c.push(Fe.accountId)}}const Ce=Ot.current;for(const fe of Ce)for(const ae of fe.lines??[])"account"in ae&&ae.account?.accountId!=null&&c.push(ae.account.accountId);return c}));s.useEffect((()=>{U==="transaction_categorization"&&A!==!0||ct(void 0)}),[U,ct,A]),s.useEffect((()=>{S===!0&&n?.()}),[U,Ut.selectedAccountId]);const hn=V.transactionView.selectedTransactionCategorizationCompletedSubTab,Sn=V.transactionView.selectedTransactionGroup,Ge=`${ut}|${hn}|${Sn}`,Ne=s.useRef(null),$t=s.useRef(null);s.useEffect((()=>{Ne.current!==null?Ne.current!==Ge&&(Ne.current=Ge,U==="transaction_categorization"&&Z()):Ne.current=Ge}),[Z,U,Ge]);const gn=_((c=>ge==null?void 0:Fs(c.transactionState,ge))),ue=gn?.qboId,Gt=_((c=>ue==null?void 0:_s(c,ue)));s.useEffect((()=>{ue!=null&&b(Ms(ue))}),[b,ue]);const{createTransferEntryStatus:Nt,creditCardTransferAccountsList:qt,transferAccounts:Jt}=V.transactionView,Yt=s.useCallback((c=>Xc(b,c)),[b]),Wt=s.useMemo((()=>U!=="transaction_categorization"||z==null?null:z.contentType==="activity"?dt===!0?T.jsx(jc,{activityLogView:Gt,qboId:ue,onClose:()=>K(null),selectedTransactionId:z.detail.transactionId,isQuickViewCardStyle:!0},String(z.detail.transactionId)):null:z.contentType==="transfer"?T.jsx(Lc,{createTransferEntryStatus:Nt,creditCardTransferAccountsList:qt,transaction:z.detail,transferAccounts:Jt,onClose:()=>K(null),onCreateTransfer:Yt,isQuickViewCardStyle:!0},String(z.detail.transactionId)):null),[U,z,dt,Gt,ue,Nt,qt,Jt,Yt]),Cn=Wt!=null,{selectedAccountId:xe}=Ut,Ht=et(mt.accountSettingsView.saveState.fetchState),fn=_((c=>Us(c.accountState,c.accountListState,"accountList"))),In=_((c=>Os(c))),we=Ya(tn)??U,kn=_((c=>c.entityAutoCompleteState.autoCompleteText.common));if($a({isDataReady:ie.fetchState==="Completed"}),rt==null)throw Error("Can't access expense automation screen without signing in...");const Kt=Ua(O),Re=at(Kt.start),De=at(Kt.end);if(Re==null||De==null)throw Error(`Invalid start - ${Re} and end - ${De} period from given ${O}`);const Tn=s.useCallback((()=>{ve(!1)}),[]),bn=s.useCallback((()=>{Se(!0)}),[]),Pn=s.useCallback((c=>{y(c),Se(!1)}),[]),yn=s.useCallback((()=>{y([])}),[]),qe=V.missingReceipts.bulkUpload.phase,Qt=V.missingReceipts.bulkUpload.currentBatchId;s.useEffect((()=>{Ae===!0&&U==="missing_receipts"&&qe==="matching"&&Qt!=null&&b(Oa({cacheOverride:!0}))}),[Ae,U,qe,Qt,b]);const Xt=rt?.userId,En=O.month,vn=O.year,Zt=B?.tenantId;s.useEffect((()=>{U==="missing_receipts"&&Ae!==!1&&qe==="idle"&&Xt!=null&&Zt!=null&&b(Bs())}),[U,Ae,qe,Xt,Zt,En,vn,b]),s.useEffect((()=>{H.newVendorState?.vendorDetailLocalData?.vendorName!=null?D(!0):D(!1)}),[H.newVendorState?.vendorDetailLocalData?.vendorName]),s.useEffect((()=>{we!=null&&U!==we&&b(Ba(we))}),[we]),s.useEffect((()=>{xt===!1&&ie.fetchState==="Completed"&&i&&(en(!0),b(da(!1,!1,de)))}),[xt,ie,i,de]),s.useEffect((()=>{const c={month:O.month,year:O.year},w=$t.current;$t.current=c,w===null||w.month===c.month&&w.year===c.year||!Dt&&i&&(b(da(!1,!1,de)),b(re(O,xe,!1,!1)))}),[O.month,O.year,i,de]);const Je=s.useCallback(((c=!1,w=!1)=>{const $={start:Re,end:De};switch(U){case"transaction_categorization":b(pe(ut,$,c,!lt,void 0,void 0,w)),Rt(!1);break;case"flux_analysis":b(Ze(O,c,w,null));break;case"month_end_insights":if(w===!1){const j=new Date(O.year,O.month,0),Ce=js(j.toDateString()).format(Qa.analytics.YYYYDashMMDashDDFormat);b(Ls(!0,B.companyId,B.tenantId,Ce)),b(zs(B.companyId,B.tenantId))}break;case"je_schedules":b(Vs($,w,de));break;case"missing_receipts":b(Va($,{amount:75,currencyCode:"USD",currencySymbol:"$"},c,w));break;default:b(re(O,xe,c,w))}}),[U,Re,De,B.companyId,B.tenantId,ut,O,xe,lt,Rt,de]),An=s.useCallback((()=>{Je(!0,!0)}),[Je]);s.useEffect((()=>{U===we&&ie.fetchState==="Not-Started"&&i&&Je(!0)}),[ie,Re,De,B.companyId,B.tenantId,i]),s.useEffect((()=>{Dt||lt||wt.current||mn.fetchState==="In-Progress"||ie.fetchState!=="Completed"||(wt.current=!0,Je(!0,!0))}),[]),s.useEffect((()=>{ee.fetchState!=="In-Progress"&&ee.fetchState!=="Completed"&&ee.fetchState!=="Error"&&B?.tenantId!=null&&b(_e({tenantId:B.tenantId,period:O,refreshViewInBackground:!1}))}),[ee.fetchState,B?.tenantId]),s.useEffect((()=>{ee.fetchState!=="Completed"||!i||(ee.monthEndCloseChecks?.monthEndCloseCheckList.some((c=>c.id==="reconciliation"))??!1)&&V.reconciliation.fetchStatus.fetchState==="Not-Started"&&b(re(O,void 0,!1,!1))}),[ee.fetchState,i,O.month,O.year,V.reconciliation.fetchStatus.fetchState,b]),s.useEffect((()=>{V.monthEndInsights?.previewMonthEndReportStatus?.fetchState==="Completed"?ve(!0):ve(!1)}),[V.monthEndInsights?.previewMonthEndReportStatus?.fetchState]),s.useEffect((()=>{V.monthEndInsights?.sendMonthEndReportStatus?.fetchState==="Completed"&&i&&(b(_e({tenantId:B.tenantId,period:O,refreshViewInBackground:!0})),b($s({companyId:B.companyId})),G("../"))}),[V.monthEndInsights?.sendMonthEndReportStatus?.fetchState,B.tenantId,O,B.companyId,i]),s.useEffect((()=>{const c=setInterval((()=>{ee.fetchState!=="In-Progress"&&ee.fetchState==="Completed"&&b(_e({tenantId:B.tenantId,period:O,refreshViewInBackground:!0}))}),3e5);return()=>clearInterval(c)}),[ee.fetchState,B.tenantId,O,b]),s.useEffect((()=>{const c=setInterval((()=>{U==="reconciliation"&&xe==null&&V.reconciliation.fetchStatus.fetchState==="Completed"&&V.reconciliation.refreshStatus.fetchState!=="In-Progress"&&b(re(O,void 0,!0,!0))}),3e5);return()=>clearInterval(c)}),[U,b,V.reconciliation.fetchStatus.fetchState,V.reconciliation.refreshStatus.fetchState,re,xe,O]);const xn=Pa(),{isFeatureEnabled:wn}=ce(Q.isRecommendationFeedbackEnabled),ea=zc(),{onRecommendationSelection:ta,popup:Rn}=Zc({isEnabled:wn}),Dn=s.useMemo((()=>({...ea,onRecommendationSelection:ta})),[ea,ta]);s.useEffect((()=>{const c=(ee.monthEndCloseChecks?.monthEndCloseCheckList.find((w=>w.id==="month_end_insights"))?.isDisabled??!1)&&!Ft;U!=="month_end_insights"||!c&&ee.monthEndCloseChecks?.reportEmailSentDate==null||G("../")}),[U,ee.monthEndCloseChecks]);const Fn=S===!0?l:v,_n=S===!0||A===!0,Mn=S===!0?n:f,Un=S!==!0&&F;s.useEffect((()=>{Ht==="In-Progress"&&mt.accountSettingsView.saveState.fetchState==="Completed"&&b(ua())}),[Ht,mt.accountSettingsView.saveState.fetchState,ua]);const{transactionId:aa,onSaveVendor:On,onSaveSuccess:Bn,onCancel:Vn,vendorViewDetails:jn}=(({expenseAutomationViewSelector:c,closeDrawerHandler:w,currentSelectedView:$})=>{const j=he();let Ce,fe,ae;const pt=Pa(),Fe=c.transactionView;let na=()=>{};const{transactions:Ln,selectedTransactionId:Ie,selectedTransactionLineId:Ye,transactionLocalData:zn}=Fe;if($==="transaction_categorization"){const ht=zn.find((me=>me.transactionId===Ie)),ne=Ln.find((me=>me.id===Ie)),sa=Ye!=null?ht?.transactionReviewLocalData?.lineItemById[Ye]:void 0,oa=sa?.account;fe=sa?.class?.classId,Ce=["Uncategorized Income","Uncategorized Expense"].includes(oa?.accountName??"")?void 0:oa?.accountId;const Gn=di(Ie,ne?.typeOfTransaction);ne!=null&&Gn&&(ae={id:Ie,type:bt(ne.typeOfTransaction)}),na=()=>{if(Ie!=null&&Ye!=null&&ne!=null){const me=Fe.transactionLocalData.find((We=>We.transactionId===Ie))?.transactionReviewLocalData;if(me!=null&&ne.lines!=null&&ne.lines.length>0){const We=me.lineItemById[Ye];let St=me.selectedEntity;if(vs(ne)||(St=We.selectedEntityLine),St!=null){const Nn=St,qn={transactionId:{id:ne.id,type:ne.type},transaction:ne,lineIds:ne.lines.map((Jn=>Jn.id))??[]};j(Pt({entity:Nn,amount:We.amount.amount,transactionDetails:qn,flowType:"categorization",selectedTab:c.selectedTransactionCategorizationTab,isFetchCOT:pt}))}}}}}const $n=_((ht=>la(ht,void 0,Ce,fe)));return{transactionId:ae,onSaveVendor:()=>{j(Es(ae,void 0,!1,!0))},onSaveSuccess:na,onCancel:()=>{ae!=null&&j(bs({transactionId:ae})),j(Ps()),j(ys()),w()},vendorViewDetails:$n}})({expenseAutomationViewSelector:V,closeDrawerHandler:()=>{D(!1)},currentSelectedView:U});return an?.loggedInUserRoleMap==null?ee.fetchState==="Error"?T.jsx($c,{onGoHome:()=>G("../",{replace:!0}),onReload:()=>window.location.reload()}):T.jsx(Na,{fetchState:"In-Progress"}):T.jsxs(T.Fragment,{children:[T.jsx(pi,{isOpen:ot,drawerLeftMargin:new Gc(0,0,300,650),onClose:()=>{Se(!1)},children:T.jsx(Mi,{onClick:c=>c.stopPropagation(),children:T.jsx(vi,{companyId:B.companyId,closeCustomerRequestDrawer:()=>Se(!1),addCustomerRequest:Pn,resetCustomerRequest:yn})})}),aa!=null&&P&&T.jsx(ai,{isOpen:P,transactionId:aa,onSaveVendor:On,onSaveSuccess:Bn,onCancel:Vn,vendorViewDetails:jn}),T.jsx(Nc,{toolkit:Dn,children:T.jsx(Fi,{events:[],eventCallback:(c,w,$)=>{},navigate:G,location:q,themeState:E,categoryOptions:rn,classesForFilters:un,accountsForFilters:dn,vendorSearchAutoCompleteData:{autoCompleteText:kn,entityAutoCompleteView:ln},expenseAutomationViewSelector:V,isMissingReceiptsBulkUploadEnabled:Ae,monthEndInsightsPreviewMode:Ve,monthEndInsightsCustomerRequestData:je,isRealtimeInsightsFeatureEnabled:Ft,isCreateTransferEntryFromExpenseEnabled:Mt,isAccountingClassesEnabled:In,isProjectsTransactionsEnabled:sn,isCOTEnabled:xn,currentTenant:B,companyId:B.companyId,signedInUser:rt,isTransactionActivityEnabled:dt,isRightPanelOpen:Cn,rightSidePanel:Wt,onOpenTransferRightPanel:Mt===!0?Xa:void 0,uncategorizedAccounts:fn,newScheduleActiveType:se,isAccrualEnabled:_t,isActualMatchingEnabled:de,newScheduleSelection:ye,onNewScheduleSelectionChange:Ee,onScheduleTypeChange:Pe,onNewScheduleSaved:An,onClickCustomerRequest:bn,handleEditClick:Tn,tenantEmailDomain:it,trackExpenseAutomationTabAnalytics:d,setActivityLogTransactionId:ct,closeMatchSidePanel:t,closeSidePanel:Mn,openTransactionPanel:r,closeSchedulePanel:x,openSchedulePanel:m,openMatchPanel:o,sidePanelIsOpen:_n,sidePanelIsFullView:Un,panelContent:Fn,isAiCfoAccessEnabled:J,onAskAiCfoClick:Za,isReconV3Enabled:on,onExpenseAutomationCommentingThreadClick:cn,sidePanelListPercent:S===!0?66:void 0,isMatchPanelOpen:k,isSchedulePanelOpen:R,matchPanelContent:I,schedulePanelContent:g,schedulePendingDiscardConfirmation:u})}),Rn,le.showPopup&&le.popupType!=null&&T.jsx(qc,{popupType:le.popupType,currencySymbol:le.currencySymbol,accountId:le.popupAccountId??"",accountName:le.popupAccountName??"",onSubmit:le.handleSubmit,onDismiss:le.handleDismiss})]})}))))),Mi=be(yc)`
35
- display: flex;
36
- min-height: 100%;
37
- flex-direction: column;
38
- `;function Ui(){const t=Te(),{selectedTab:n,tenantEmailDomain:f}=Oe(),I=_((r=>ke(r))),k=_((r=>r.expenseAutomationViewState.selectedPeriodByTenantId[I.tenantId]));if(Ya(n)==null)return T.jsx(ja,{});const o=Ja({tenantEmailDomain:f,selectedTab:n,selectedPeriod:k!=null?`${k.month}-${k.year}`:void 0});return o==null?null:T.jsx(Kn,{to:o,replace:!0,state:t.state})}function ul(){return T.jsxs(Hn,{children:[T.jsx(He,{index:!0,element:T.jsx(hi,{})}),T.jsx(He,{path:"/:selectedTab/:selectedPeriod/*",element:T.jsx(_i,{})}),T.jsx(He,{path:"/:selectedTab",element:T.jsx(Ui,{})}),T.jsx(He,{path:"*",element:T.jsx(ja,{})})]})}export{ul as default};