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

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 (155) hide show
  1. package/dist/assets/{AccountMappingScreen-xfXO279W.js → AccountMappingScreen-C_GVFaoh.js} +2 -2
  2. package/dist/assets/ActualMatchingMatchDetailScreen-Br9CFUye.js +1 -0
  3. package/dist/assets/AddressRoutes-Bw_nh--O.js +1 -0
  4. package/dist/assets/AddressScreen-CvhZrOl1.js +9 -0
  5. package/dist/assets/AiCfoScreen-enlKpZc4.js +22 -0
  6. package/dist/assets/{AppDrawer-B2rHD8Zo.js → AppDrawer-BvDyxQG-.js} +1 -1
  7. package/dist/assets/BillPayApprovalRoutes-D18TxHMc.js +1 -0
  8. package/dist/assets/{BillPayRoutes-Dmusj5HX.js → BillPayRoutes-CloKoO0m.js} +6 -6
  9. package/dist/assets/{BusinessVerificationPageScreen-C-aPhqey.js → BusinessVerificationPageScreen-wzhfqwbN.js} +2 -2
  10. package/dist/assets/CardsAiCfoScreen-CsPjsbB8.js +14 -0
  11. package/dist/assets/{ChargeCardRoutes-JBiL4Thy.js → ChargeCardRoutes-CeG2_2Iv.js} +9 -9
  12. package/dist/assets/CompanyPassportScreen-CTdU0eT4.js +1 -0
  13. package/dist/assets/ConnectionAuthScreen-tQkR0Qdq.js +11 -0
  14. package/dist/assets/CustomerOnboardingAuthScreen-Cfna6QXU.js +1 -0
  15. package/dist/assets/{CustomerOnboardingRoutes-C2sAsjXY.js → CustomerOnboardingRoutes-C2PIK8CC.js} +3 -3
  16. package/dist/assets/{DashboardRoutes-B3_TJQND.js → DashboardRoutes-B6PQcDII.js} +4 -4
  17. package/dist/assets/DefaultTenantHome-R8lvjrth.js +1 -0
  18. package/dist/assets/{DomesticWireDetailScreen-DQXD1NSK.js → DomesticWireDetailScreen-BOXpXEFg.js} +3 -3
  19. package/dist/assets/{DrawerScreen-DyQejCID.js → DrawerScreen-kd-vUIOU.js} +1 -1
  20. package/dist/assets/EntityDetailRoutes-CKVztcFF.js +1 -0
  21. package/dist/assets/ExpenseAutomationRoutes-CZBhc5OO.js +38 -0
  22. package/dist/assets/FeaturePreviewScreen-DlYWStt_.js +1 -0
  23. package/dist/assets/HubSpotOAuthCallbackScreen-BiVfvVOh.js +1 -0
  24. package/dist/assets/{InboxNotificationsProvider-CYNlrTK-.js → InboxNotificationsProvider-jZPrqdDf.js} +1 -1
  25. package/dist/assets/{InvoicingRoutes-DBwLj6Ir.js → InvoicingRoutes-CTeBd6HD.js} +2 -2
  26. package/dist/assets/{MagicLinkRoutes-D5UwoWcf.js → MagicLinkRoutes-DBawNNk_.js} +21 -21
  27. package/dist/assets/MagicLinkSignInScreen-CKyZ86AC.js +12 -0
  28. package/dist/assets/MobileAppDrawer-thURFqdR.js +1 -0
  29. package/dist/assets/NotFoundScreen-CjcmfT5h.js +1 -0
  30. package/dist/assets/{NotificationRoutes-D7MHUmyT.js → NotificationRoutes-B5kGRr3c.js} +1 -1
  31. package/dist/assets/OAuthConsentScreen-DKPtywIw.js +1 -0
  32. package/dist/assets/PandLWithForecastRoutes-DuKFzXpp.js +1 -0
  33. package/dist/assets/{PaymentLinkScreen-Bh4jK9uE.js → PaymentLinkScreen-DgjfMeF_.js} +4 -4
  34. package/dist/assets/PeopleRoutes-BFFXxsrW.js +22 -0
  35. package/dist/assets/PerformanceRoutes-DlDpAJN4.js +1 -0
  36. package/dist/assets/{Preview-Cqz8sG2s.js → Preview-CFep9b6s.js} +1 -1
  37. package/dist/assets/{QBOConnectionScreen-DreC-yDW.js → QBOConnectionScreen-zn7s2M2b.js} +1 -1
  38. package/dist/assets/ReimbursementApprovalRoutes-h6pN24Dd.js +1 -0
  39. package/dist/assets/ReimbursementApprovalRuleDetailScreen-La5bMk76.js +1 -0
  40. package/dist/assets/ReimbursementRoutes-DpjqJ1j9.js +68 -0
  41. package/dist/assets/{ReportsRoutes-BZjyXdiB.js → ReportsRoutes-Tu97hQPr.js} +1 -1
  42. package/dist/assets/RewardsRoutes-C7-L_VuA.js +1 -0
  43. package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-PbMzJVD9.js → ScheduleDetailsPrepaidExpensesScreen-BNVCc0tE.js} +5 -5
  44. package/dist/assets/ScreenRoutes-DUiJb0LC.js +2 -0
  45. package/dist/assets/{SettingsRoutes-hveOvbi9.js → SettingsRoutes-BVrPYY3-.js} +6 -6
  46. package/dist/assets/{SetupPagesScreen-B8kiMdZf.js → SetupPagesScreen-Cx3OOUGr.js} +5 -5
  47. package/dist/assets/SignInScreen-BXBlASFY.js +1 -0
  48. package/dist/assets/SignOutScreen-BN1O2qGb.js +9 -0
  49. package/dist/assets/{TaskListScreen-Bi73r_uo.js → TaskListScreen-DrflApgr.js} +2 -2
  50. package/dist/assets/{TaskRoutes-DCW1uZnF.js → TaskRoutes-BxW92Ol2.js} +2 -2
  51. package/dist/assets/TransactionDetailRoutes-CUdtnWL8.js +1 -0
  52. package/dist/assets/{TransactionDetailScreen-DVFrl6h2.js → TransactionDetailScreen-C2qhnA5b.js} +2 -2
  53. package/dist/assets/TransactionListRoutes-Bt_C_073.js +1 -0
  54. package/dist/assets/{TreasuryRoutes-BPVOZ6Bj.js → TreasuryRoutes-DJK_7z5t.js} +5 -5
  55. package/dist/assets/{VendorsRoutes-CHDVO5Sr.js → VendorsRoutes-dr-KQ_Nk.js} +13 -13
  56. package/dist/assets/WiseConfirmationScreen-BjSMumPA.js +12 -0
  57. package/dist/assets/{ZeniAccountRoutes-BzLWpyYJ.js → ZeniAccountRoutes-mpb2ppPH.js} +11 -11
  58. package/dist/assets/ZeniAccountStatementScreen-C6P6WNnP.js +9 -0
  59. package/dist/assets/{accountMappingHelper-Gh8rpbjD.js → accountMappingHelper-D5I8xPpR.js} +1 -1
  60. package/dist/assets/{analytics-S5MhEivL.js → analytics-CVpLIXYS.js} +1 -1
  61. package/dist/assets/{analyticsHelper-Ch9SsWjb.js → analyticsHelper-DIAaX2E9.js} +1 -1
  62. package/dist/assets/{core-Cc7wW2EM.js → core-BmXpopk3.js} +1 -1
  63. package/dist/assets/{decodeURIComponentSafe-DhqIXi_U.js → decodeURIComponentSafe-CmNiiSLm.js} +1 -1
  64. package/dist/assets/{dnd-DEyyKSEC.js → dnd-CFbFq_On.js} +1 -1
  65. package/dist/assets/{empty-6MFM8UPN.js → empty-0E71-pkh.js} +1 -1
  66. package/dist/assets/{empty-CjY9w6q2.js → empty-IUpx8pFE.js} +1 -1
  67. package/dist/assets/{emptyVideoElement-MGXFhhLz.js → emptyVideoElement-DvAsJwe7.js} +1 -1
  68. package/dist/assets/epic-Dp0UOOW0.js +2 -0
  69. package/dist/assets/expenseAutomationHelper-wsi-w_Qs.js +1 -0
  70. package/dist/assets/{getLocaleForTenant-Bgt5rFzV.js → getLocaleForTenant-CLcFXXBi.js} +1 -1
  71. package/dist/assets/{index-vIt7RQvO.js → index-BH7Z90Ry.js} +16405 -15862
  72. package/dist/assets/{index-BZ6qOKkD.js → index-BwG9RDJd.js} +1 -1
  73. package/dist/assets/{index-Cm43WhAF.js → index-DaYn0dIv.js} +2 -2
  74. package/dist/assets/{index-D2oCZR3F.js → index-Diiw4rJ6.js} +1 -1
  75. package/dist/assets/{index-2QCkbhu2.js → index-_EB0AYfG.js} +1 -1
  76. package/dist/assets/{index-DpnxiqBj.js → index-n9iskFtR.js} +1 -1
  77. package/dist/assets/{index-gtGWrJ79.js → index-nMXCGK26.js} +1 -1
  78. package/dist/assets/{index-ldlm2cjp.js → index-xAn5v5dB.js} +1 -1
  79. package/dist/assets/{lexical-DXgKWO29.js → lexical-CUqOWG_f.js} +1 -1
  80. package/dist/assets/{liveblocks-CgHUgeBY.js → liveblocks-2F3ER8H4.js} +1 -1
  81. package/dist/assets/{lottie-C1A2hiZE.js → lottie-Do5BYuHO.js} +1 -1
  82. package/dist/assets/{mui-C4zFSCiU.js → mui-DpZKsKJ-.js} +1 -1
  83. package/dist/assets/{pathToGoBack-C17GqrA7.js → pathToGoBack-IYhrTF3T.js} +1 -1
  84. package/dist/assets/{pdf-rXyPRm1U.js → pdf-CaVqV5T4.js} +3 -3
  85. package/dist/assets/{pdf-lib-CsM74zBq.js → pdf-lib-DgpGz3__.js} +1 -1
  86. package/dist/assets/{plaid-vsHcqLdj.js → plaid-B0sfsJHV.js} +1 -1
  87. package/dist/assets/{pusher-C0EhdUPA.js → pusher-BZ4RRfso.js} +1 -1
  88. package/dist/assets/{react-BU_8yW5D.js → react-B40uyjvd.js} +1 -1
  89. package/dist/assets/{react-Yy9ZuxR6.js → react-BlQV6oEC.js} +1 -1
  90. package/dist/assets/{react-CzfY0Vx3.js → react-CM6JlJfX.js} +1 -1
  91. package/dist/assets/{react-CEepHjWP.js → react-CVdpmzlC.js} +1 -1
  92. package/dist/assets/{react-DG8YneWb.js → react-Cx2vmGsH.js} +1 -1
  93. package/dist/assets/{react-Gc0eJCMR.js → react-cC2pOmRW.js} +1 -1
  94. package/dist/assets/{recharts-DJGeJ2v_.js → recharts-lgPPofcu.js} +1 -1
  95. package/dist/assets/routePaths-DuFLBwyX.js +1 -0
  96. package/dist/assets/{sentry-DSWD_gIh.js → sentry-Dwi3Xpu2.js} +1 -1
  97. package/dist/assets/{stripSplatSuffix-kLnY55Qt.js → stripSplatSuffix-Cm_Bj9mb.js} +1 -1
  98. package/dist/assets/{url-DCbpXgdk.js → url-B3IdPeRD.js} +1 -1
  99. package/dist/assets/{url-DUlo21cY.js → url-CuCw2GYz.js} +1 -1
  100. package/dist/assets/useActualMatchingMatchDetail-CTL9QRWv.js +1 -0
  101. package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-B1hI9_5p.js +1 -0
  102. package/dist/assets/useAskAiCfoHostNavButtonProps-B82QOIYm.js +1 -0
  103. package/dist/assets/{useChargeCardPusherEvents-BVr00Fos.js → useChargeCardPusherEvents-CNgbxhoK.js} +1 -1
  104. package/dist/assets/{useDeviceId-B5zol9VP.js → useDeviceId-Dklpg4lb.js} +1 -1
  105. package/dist/assets/useEmailConnectResultRefresh-BfOhSDOo.js +1 -0
  106. package/dist/assets/useEnsureVendorListLoaded-BtOYIHPo.js +1 -0
  107. package/dist/assets/{useInitialThreadRequest-D4Y8xhXu.js → useInitialThreadRequest-DagpMHc1.js} +1 -1
  108. package/dist/assets/useTaskManagerAccess-DvrYqbN3.js +1 -0
  109. package/dist/assets/{useTaskManagerPusherEvents-X_H33C0C.js → useTaskManagerPusherEvents-Be2DL4pK.js} +1 -1
  110. package/dist/assets/{utils-DiIEQ7_h.js → utils-DAgs23EZ.js} +1 -1
  111. package/dist/assets/withTransactionSidePanel-Dn8x-lme.js +25 -0
  112. package/dist/assets/{zeni-epic-state-BVJjEVAA.js → zeni-epic-state-DtY6MD5C.js} +6 -6
  113. package/dist/index.html +1 -1
  114. package/package.json +4 -4
  115. package/dist/assets/ActualMatchingMatchDetailScreen-ByqHVLf7.js +0 -1
  116. package/dist/assets/AddressRoutes-BWVJyPk8.js +0 -1
  117. package/dist/assets/AddressScreen-CrPViFiu.js +0 -9
  118. package/dist/assets/AiCfoScreen-DXsXYKZU.js +0 -22
  119. package/dist/assets/BillPayApprovalRoutes-CMAUuUUB.js +0 -1
  120. package/dist/assets/CardsAiCfoScreen-CTX5PjYy.js +0 -14
  121. package/dist/assets/CompanyPassportScreen-Df3GjmsH.js +0 -1
  122. package/dist/assets/ConnectionAuthScreen-CRXLzdg9.js +0 -11
  123. package/dist/assets/CustomerOnboardingAuthScreen-DSYY256B.js +0 -1
  124. package/dist/assets/DefaultTenantHome-4mMU5w7G.js +0 -1
  125. package/dist/assets/EntityDetailRoutes-0npRYuOC.js +0 -1
  126. package/dist/assets/ExpenseAutomationRoutes-SlF4KM3u.js +0 -38
  127. package/dist/assets/FeaturePreviewScreen-OtBPdCPK.js +0 -1
  128. package/dist/assets/HubSpotOAuthCallbackScreen-CtTG0u9D.js +0 -1
  129. package/dist/assets/MagicLinkSignInScreen-B_572HKC.js +0 -12
  130. package/dist/assets/MobileAppDrawer-DLFLa7hS.js +0 -1
  131. package/dist/assets/NotFoundScreen-DzxbROot.js +0 -1
  132. package/dist/assets/OAuthConsentScreen-iNKlAsfd.js +0 -1
  133. package/dist/assets/PandLWithForecastRoutes-COCZ3G6X.js +0 -1
  134. package/dist/assets/PeopleRoutes-BkRUXc0D.js +0 -22
  135. package/dist/assets/PerformanceRoutes-BzDFWREu.js +0 -1
  136. package/dist/assets/ReimbursementApprovalRoutes-DPScUcq4.js +0 -1
  137. package/dist/assets/ReimbursementApprovalRuleDetailScreen-BxglZgWl.js +0 -1
  138. package/dist/assets/ReimbursementRoutes-DveTyQyE.js +0 -68
  139. package/dist/assets/RewardsRoutes-zL93sOaR.js +0 -1
  140. package/dist/assets/ScreenRoutes-Bl2EONFe.js +0 -2
  141. package/dist/assets/SignInScreen-CGBu1NjI.js +0 -1
  142. package/dist/assets/SignOutScreen-D0F6FeVm.js +0 -9
  143. package/dist/assets/TransactionDetailRoutes-CWMSCIXL.js +0 -1
  144. package/dist/assets/TransactionListRoutes-B3tJhd_n.js +0 -1
  145. package/dist/assets/WiseConfirmationScreen-Du3rEKnE.js +0 -12
  146. package/dist/assets/ZeniAccountStatementScreen-DaV7I7ku.js +0 -9
  147. package/dist/assets/epic-D9Y6xcsI.js +0 -2
  148. package/dist/assets/expenseAutomationHelper-iXuIUZiF.js +0 -1
  149. package/dist/assets/routePaths-C0UIXwMQ.js +0 -1
  150. package/dist/assets/useActualMatchingMatchDetail-CwcmHDQ8.js +0 -1
  151. package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-BFr557mr.js +0 -1
  152. package/dist/assets/useAskAiCfoHostNavButtonProps-7-6nPEHY.js +0 -1
  153. package/dist/assets/useEmailConnectResultRefresh-HcMCYvt9.js +0 -1
  154. package/dist/assets/useTaskManagerAccess-BeNfkHpZ.js +0 -1
  155. 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-BH7Z90Ry.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-Dwi3Xpu2.js"><link rel="modulepreload" crossorigin href="/assets/core-BmXpopk3.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-DtY6MD5C.js"><link rel="modulepreload" crossorigin href="/assets/mui-DpZKsKJ-.js"><link rel="modulepreload" crossorigin href="/assets/analytics-CVpLIXYS.js"><link rel="modulepreload" crossorigin href="/assets/utils-DAgs23EZ.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.64-dev-beta0KB",
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.95-beta0KB",
32
+ "@zeniai/client-epic-state": "5.2.62-beta1KB",
33
+ "@zeniai/web-components": "4.4.1-beta5KB",
34
34
  "color": "3.1.3",
35
35
  "crypto-js": "4.2.0",
36
36
  "dnd-core": "^16.0.1",
@@ -1 +0,0 @@
1
- import{j as 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,9 +0,0 @@
1
- import{j as n}from"./liveblocks-CgHUgeBY.js";import{a as h}from"./sentry-DSWD_gIh.js";import{h as P,u as T,g as j,i as E,j as B,l as M}from"./core-Cc7wW2EM.js";import{a2 as $,E as D,z as L,P as V,a8 as K,a9 as U,j as _,U as S,a4 as F,_ as b,a5 as z}from"./index-vIt7RQvO.js";import{Vp as C,ip as R,fF as q,Vq as G,c8 as H,Vr as N,mH as O}from"./zeni-epic-state-BVJjEVAA.js";import{n as J}from"./mui-C4zFSCiU.js";import Q from"./NotFoundScreen-DzxbROot.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="7ff08ddd-13b4-44d5-af43-d1f6de882a17",e._sentryDebugIdIdentifier="sentry-dbid-7ff08ddd-13b4-44d5-af43-d1f6de882a17")}catch{}})();const W=J.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
- `,X=M((function(e,s){const{addressId:o,isSubPage:i,addressType:c}=s,l=q(e),a=s.roleMap!=null&&G(s.roleMap),d=i||c==="user_address"||H(l?.userRole??[])||a?void 0:"readonly";if(o==null){const t=N(c,e);return{addressToEdit:t?.addressToCreate,loadingState:t?.status?.fetchState,googleAPIKey:b.googleMapsAPIKey,isDisabled:d,isSubPage:i,dontShowSaveConfirmationPopup:s.dontShowSaveConfirmation}}const r=C(e,o);return{addressToEdit:r.address,loadingState:r.fetchState,googleAPIKey:b.googleMapsAPIKey,isDisabled:d}}),(function(e,s){const{navigate:o,location:i,addressType:c}=s,l=a=>{if(a==="express-pay")o("../express-pay/add-wire");else{const d=i.state,r=z(d?.pathnameStackToGoBack);let t=r.poppedPathname??v();const u=d?.queryParams;if(u){const f=new URLSearchParams(u).toString();f&&(t=`${t}?${f}`)}o(t,{state:{pathnameStackToGoBack:r.newStack}})}};return{onSubmitHandler:a=>{const d=Y(a);e(O({addressType:c,addressToCreate:d})),_?.trackSaveAddressClicked(S.Event.saveAddressClicked,{street:a.street.addressString,city:a.city,state:a.state,country:a.country.selectedOption??"",postalCode:a.postalCode,suite:a.suite,secondaryInfo:a.secondaryInfo}),l(s.bankAccountContext)},onCancel:()=>{l(s.bankAccountContext)}}}))(F);function ne({isSubPage:e,hideAddressSubTitle:s=!1,hideAddressBackButton:o=!1,dontShowSaveConfirmation:i,accountContext:c,addressTypeParam:l}){const a=P(),d=T(),r=j(),{addressId:t,addressType:u}=E(),f=$(),I=D(),k=L.getSignedInUser(),[g,w]=h.useState(t==null),p=B((m=>t!=null?C(m,t).fetchState:"Not-Started")),x=V();if(k==null)throw Error("Can't access address page without signing in...");const A=m=>m.trackPageLoaded(t!=null?S.Event.editAddress:S.Event.addAddress),y=l??u;return h.useEffect((()=>{g||t==null||(w(!0),d(R(t,!1)))}),[g,t,d]),y==null||y.match(/(user_address|company_address|company_registered_address|vendor_address|officer_([1-9]|10)_address|invoicing_customer_billing_address|invoicing_subscription_shipping_address|invoicing_business_address)$/g)?!g&&p==="Not-Started"||g&&p==="In-Progress"?n.jsx(K,{fetchState:p,style:{backgroundColor:I.colors.grey5}}):t!=null&&p==="Error"?(a(`${v(1)}/new`,{replace:!0}),n.jsx(n.Fragment,{})):n.jsxs(n.Fragment,{children:[n.jsx(U,{analytics:_,onLoad:A}),n.jsx(W,{windowSize:f,children:n.jsx(X,{location:r,navigate:a,isSubPage:e===!0,hideAddressBackButton:o,hideAddressSubTitle:s,addressId:t,addressType:y,dontShowSaveConfirmation:i,bankAccountContext:c,roleMap:x?.loggedInUserRoleMap})})]}):n.jsx(Q,{})}const v=(e=2)=>{let s="../";for(let o=0;o<e;o++)s=`${s}../`;return s},Y=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng});export{ne as A,Y as t};
@@ -1,22 +0,0 @@
1
- import{j as h}from"./liveblocks-CgHUgeBY.js";import{a as n}from"./sentry-DSWD_gIh.js";import{u as _t,h as Dt,i as Lt,g as Bt,j as b,l as Ft}from"./core-Cc7wW2EM.js";import{a as Mt,h as Vt,e7 as $t,z as Nt,a2 as qt,e8 as Gt,e9 as Ht,ea as zt,bq as Be,eb as We,ec as Wt,bp as Je,a5 as ge,a9 as ce,j as M,ed as me,ee as Jt,ef as Kt,av as Yt,U as Xt,w as Zt,eg as es,eh as ts,aw as ss,ei as ns,ej as as,ek as os,el as is,p as rs,bl as Fe,em as ls}from"./index-vIt7RQvO.js";import{fE as F,gt as R,U7 as us,a2h as ds,a2i as cs,jM as ms,a2j as Ss,jJ as hs,a2k as Se,jp as W,jS as J,jv as Ie,jc as he,ja as ps,jU as fs,jE as Ke,Ug as Me,gv as V,gK as gs,Uf as Is,U0 as Ve,fF as Cs,j3 as ks,a2l as bs,g8 as vs,jl as Es,jh as Ps,fG as pe,gf as ys,a2m as ws,a2n as xs,a2o as Rs,gu as Ts,go as $e,k4 as Ne,gq as qe,gw as js,a2p as Ge,jV as Os,je as As,jy as Us,jQ as He,jB as Qs,gx as _s,gy as Ds,gz as Ls,gA as Bs}from"./zeni-epic-state-BVJjEVAA.js";import{D as Fs,n as $,S as Ms,P as Vs}from"./mui-C4zFSCiU.js";import{u as $s}from"./useAiCfoDashboardSuggestedQuestionsChips-BFr557mr.js";import{p as Ns}from"./pathToGoBack-C17GqrA7.js";import{j as qs}from"./routePaths-C0UIXwMQ.js";import{u as Gs}from"./useTaskManagerPusherEvents-X_H33C0C.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 s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new s.Error().stack;r&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[r]="6b33b95e-44da-44b6-af1f-263ccc18525f",s._sentryDebugIdIdentifier="sentry-dbid-6b33b95e-44da-44b6-af1f-263ccc18525f")}catch{}})();const Hs=["claimed","running","succeeded","failed","timeout"],fe=s=>typeof s=="string"&&s!=="",Ye="chat-response-generated";function zs(s,r){if(r.kind!=="save")return;if(r.fetchState==="In-Progress")return{status:"saving"};if(r.fetchState==="Error")return{status:"failed"};if(r.fetchState!=="Completed")return;const t=R(s).skills.find((l=>l.macroId===r.savedMacroId));return t==null?void 0:{status:"saved",command:t.name}}const Ws=Ft((function(s,r){const t=F(s),l=r.isSubmitting,c=t.uiState?.currentChatSessionId,i=c!=null?ys(s.aiCfoState,c):[],f=ts(s,{allUsers:r.allUsers,onCardPolicyVendorSearchTextChange:r.onCardPolicyVendorSearchTextChange}),p=ws(s),S=xs(s),A=Rs(s);return{showSampleQuestions:r.sessionFromUrl==="explore"&&t.uiState.currentChatSessionId==null,aiCfoView:t,isSubmitting:l,isNewChatSession:r.sessionFromUrl==="new_chat"||r.sessionFromUrl==="explore",isFullView:!0,tableDownloadEndPoint:`${ss}/tableDownload`,exportDownloadEndPoint:os(),emailLinkQuestion:r.emailLinkQuestion,autoSubmitEmailLinkQuestion:r.autoSubmitEmailLinkQuestion,onEmailLinkQuestionProcessed:r.onEmailLinkQuestionProcessed,routedInitialQuestionSource:r.routedInitialQuestionSource,routedInitialQuestionSuggestionIndex:r.routedInitialQuestionSuggestionIndex,exploreSuggestedPromptQuestions:r.exploreSuggestedPromptQuestions,exploreSuggestedPromptQuestionsLoading:r.exploreSuggestedPromptQuestionsLoading,isFileUploadEnabled:r.isFileUploadEnabled,isUploadPromoVisible:r.isUploadPromoVisible,onUploadPromoClose:r.onUploadPromoClose,skills:R(s).skills,skillSaveState:zs(s,A),skillsEnabled:R(s).skillsEnabled,skillsList:R(s).skills,skillsListError:R(s).fetchState==="Error",skillsListLoading:R(s).fetchState==="In-Progress",skillsCanPublish:R(s).canPublish,skillSaving:A.fetchState==="In-Progress",skillSaveError:A.fetchState==="Error",skillVersionHistory:p.macroId!=null?{macroId:p.macroId,versions:p.versions,error:p.fetchState==="Error",loading:p.fetchState==="In-Progress"}:void 0,skillRestoreBody:S.macroId!=null&&S.version!=null?{macroId:S.macroId,version:S.version,instructions:S.instructions,error:S.fetchState==="Error",loading:S.fetchState==="In-Progress"}:void 0,skillDetail:J(s).detail,skillDetailError:J(s).fetchState==="Error",skillDetailLoading:J(s).fetchState==="In-Progress",syntheticAnswers:i,resolveSyntheticAnswerCardTile:as(s),resolveSyntheticAnswerPolicyTile:ns(s),...f}}),(function(s,r){const{location:t,currentTenant:l,userId:c,navigate:i,currentChatSessionId:f,allSessionsWithOrderedQuestionAnswers:p,isAiCardCreationEnabled:S,isCardPolicyEnabled:A,setIsAiCfoOpen:D}=r,T=l.tenantEmailDomain;return{onEventReceived:(a,o)=>{if(a===Ye&&typeof o.text=="string"&&typeof o.metadata=="object"){const m=o,E=_s(m.type),v=m.metadata.chat_session_id??null,{currentChatSession:K,currentQuestionAnswer:j,currentQuestionAnswerSummary:Y}=Je(p,v);E!=="answer"?M.trackAICFOChatResponseGenerated(E,j?.question.questionText??"",m.text,v,ls(Y,K),m.metadata.message_id??null):M.trackAICFOChatAnswerGenerated(m.text,j?.question.questionText??"",(m.follow_up_questions?.length??0)>0,!!m.assumptions,!!m.insights,m.visualization!=null,Ds(m.visualization?.type??"")??null,v,m.summarized_title,m.metadata.message_id??null),s(Ls({chatSessionId:m.metadata.chat_session_id,responseType:E,fetchState:{fetchState:"Completed",error:void 0}})),s(Bs({chatSessionId:m.metadata.chat_session_id,answerPayload:m,userId:c}))}},onSubmit:(a,o,m,E,v)=>{a&&Fe(s,a,o,f,p,c,E,m,void 0,v)},onFetchSkills:()=>{s(Ke())},onOpenSkill:a=>{s(Ie({macroId:a})),s(Qs({macroId:a}))},onSaveSkill:(a,o)=>{s(He({draft:a,macroId:o}))},onSaveSkillDraft:a=>{const o=a.displayName?.trim()??"",m=a.name?.trim()??"";s(He({draft:{name:o.length>0?o:m,description:a.description?.trim()??null,instructions:a.instructions,visibility:"private"}}))},onFetchSkillVersionBody:(a,o)=>{s(Us({macroId:a,version:o}))},onDeleteSkill:a=>{s(As({macroId:a}))},onSetSkillVisibility:(a,o)=>{s(Os({macroId:a,visibility:o}))},onCloseSkillDetail:()=>{s(Ge())},onRunSkill:(a,o)=>{s(V()),s($e()),Fe(s,o,"user_input",void 0,p,c,void 0,void 0,void 0,a),s(Ge())},updateCurrentInput:a=>{s(qe(a))},onStopSubmit:()=>{},onUpdateScrollYOffset:a=>{s(js(a))},onSelectSampleQuestion:()=>{},onBackClick:()=>{i(-1)},onCloseClick:()=>{const a=ge(t.state?.pathnameStackToGoBack),o=a.poppedPathname??Ns(1);i(o,{state:{...t.state,pathnameStackToGoBack:a.newStack}}),s(qe(""))},togglePageView:()=>{const a=ge(t.state?.pathnameStackToGoBack),o=a.poppedPathname??`/${l.tenantEmailDomain}/dashboard`;i(o,{state:{...We(t.state),pathnameStackToGoBack:a.newStack,message:"open_ai_cfo_drawer"}}),D(!0)},onCopy:()=>{},onThumbsUp:(a,o)=>{f!=null&&o?.messageId!=null&&s(Ne(f,o.messageId,"positive",o.questionText,o.answerText))},onThumbsDown:(a,o)=>{f!=null&&o?.messageId!=null&&s(Ne(f,o.messageId,"negative",o.questionText,o.answerText))},onTogglePageView:()=>{i(-1)},onNewChatClick:()=>{s(V()),f!=null&&s($e());const a=rs(t.state?.pathnameStackToGoBack,t.pathname);i(`/${l.tenantEmailDomain}/ai-cfo/new_chat`,{state:{pathnameStackToGoBack:a.slice(0,-1),referrer:"Sidebar"}})},onToggleCotCollapsed:(a,o)=>{s(Ts({questionAnswerId:a,isCollapsed:o}))},onMenuClick:r.onMenuClick,...is(s,{isAiCardCreationEnabled:S,isCardPolicyEnabled:A,currentChatSessionId:f,onAfterCardsCreationSubmit:()=>{D(!0),i(`/${T}/cards`,{state:{...t.state}})},onAfterCardPolicySubmit:()=>{D(!0),i(`/${T}/cards/policy`,{state:{...t.state}})}})}}))(Zt(es)),Cn=({isFileUploadEnabled:s})=>{const{setIsAiCfoOpen:r}=Mt(),t=_t(),l=Dt(),{session_id:c}=Lt(),i=Bt(),f=new URLSearchParams(i.search).get("routine")??void 0,[p,S]=n.useState(!1),A=b((e=>F(e).uiState.isSkillsBrowserOpen===!0)),D=b((e=>R(e).skillsEnabled)),T=b((e=>F(e).uiState.isRoutinesBrowserOpen===!0)),a=b((e=>us(e))),o=b((e=>ds(e))),m=b((e=>cs(e))),[E,v]=n.useState(void 0),[K,j]=n.useState(!1),[Y,Ce]=n.useState(void 0),Xe=n.useCallback((()=>{Ce(void 0),v(void 0),j(!0)}),[]),Ze=n.useCallback((e=>{v(e),j(!0)}),[]),et=n.useCallback((()=>{v(void 0),j(!1)}),[]),tt=n.useCallback((e=>{t(ms({draft:e,...E!=null&&{scheduleId:E.scheduleId}})),v(void 0),j(!1)}),[t,E]),P=f,ke=a.routines.find((e=>e.scheduleId===P)),I=b((e=>Ss(e))),st=n.useCallback((e=>{t(hs({scheduleId:e.scheduleId}))}),[t]);n.useEffect((()=>{t(P!=null?W({scheduleId:P}):Se())}),[t,P]);const B=ke?.macroId,nt=b((e=>J(e))),be=B!=null&&B!==""&&nt.fetchState==="Not-Started";n.useEffect((()=>{be&&B!=null&&t(Ie({macroId:B}))}),[t,be,B]);const at=b((e=>F(e).uiState.currentChatSessionId))??c,C=a.routines.find((e=>e.scheduleId===f))??a.routines.find((e=>e.scheduleId===Vt(at))),O=C?.scheduleId??null,[ve,ot]=n.useState(!0);n.useEffect((()=>{O!=null&&t(W({scheduleId:O}))}),[t,O]);const Ee=I.runs.some((e=>e.status==="claimed"||e.status==="running"))===!0;n.useEffect((()=>{if(P==null||Ee!==!0)return;const e=window.setInterval((()=>{t(W({scheduleId:P})),t(he())}),5e3);return()=>window.clearInterval(e)}),[t,Ee,P]);const it=n.useCallback((e=>{Ce(e),v(void 0),j(!0)}),[]),rt=n.useCallback((e=>{t(ps({scheduleId:e.scheduleId}))}),[t]),lt=n.useCallback(((e,d)=>{t(fs({enabled:d,scheduleId:e.scheduleId}))}),[t]);n.useEffect((()=>{T&&t(he())}),[t,T]);const Pe=b((e=>R(e).skills)),X=n.useMemo((()=>Pe.map((e=>({macroId:e.macroId,name:e.displayName??e.name})))),[Pe]),ut=n.useCallback((e=>{t(Ie({macroId:e}))}),[t]),Z=n.useCallback((()=>{t(Ke()),t(Me())}),[t]),dt=n.useCallback((()=>{t(V())}),[t]),{allUsers:ct,isAiCardCreationEnabled:mt,isCardPolicyEnabled:St,onCardPolicyVendorSearchTextChange:ht}=$t();n.useEffect((()=>{t(gs())}),[t]);const g=b((e=>F(e))),w=Nt.getSignedInUser();n.useEffect((()=>c==="routines"?(t(V()),void t(Is())):c==="skills"?(t(Se()),t(Ve()),void t(Me())):(O==null&&t(Se()),t(Ve()),void t(V()))),[t,O,f,c]);const pt=qt(),U=Yt(pt),k=b((e=>Cs(e))),u=g.uiState.currentChatSessionId,y=k.tenantEmailDomain,L=y!=null&&y!=="",ee=n.useCallback((e=>{L&&l(`/${y}/ai-cfo/routines?routine=${encodeURIComponent(e.scheduleId)}`)}),[L,l,y]),te=n.useCallback((()=>{L&&l(`/${y}/ai-cfo/routines`)}),[L,l,y]),se=n.useCallback(((e,d)=>{const Q=e.sessionId??I.sessionId;Q!=null&&L&&l(`/${y}/ai-cfo/${Q}?routine=${encodeURIComponent(d)}`)}),[L,l,I.sessionId,y]),ft=n.useMemo((()=>C==null?void 0:{error:I.fetchState==="Error",kind:"routineRuns",loading:I.fetchState==="In-Progress"||I.fetchState==="Not-Started",routineName:C.name,schedule:Gt(C),skillName:C.isAdHoc===!0?void 0:X.find((e=>e.macroId===C.macroId))?.name,onOpenSkill:C.isAdHoc===!0?void 0:Z,runs:I.runs,tzName:C.tzName,unreadCount:C.unreadRuns,open:ve,onToggle:()=>ot((e=>!e)),onOpenRun:e=>se(e,C.scheduleId),onOpenRoutine:()=>ee(C),onOpenRoutines:te}),[Z,te,ee,se,ve,C,I.fetchState,I.runs,X]),{handleUploadPromoClose:gt,isUploadPromoVisible:It}=Ht({isFileUploadEnabled:s,tenantEmailDomain:y}),ne=zt({currentTenant:k,currentChatSessionId:u,aiCfoView:g,skillsEnabled:D,onCloseSkills:dt,onOpenSkills:Z}),{isSuggestedQuestionsLoading:Ct,suggestedPromptQuestions:kt}=$s(),N=i.state,q=N?.aiCfoInitialQuestion,ye=!!N?.aiCfoShouldSubmit;n.useEffect((()=>{const e=i.state;if(e?.[Be]!==!0)return;S(!0);const d={...e};delete d[Be],l(i,{replace:!0,state:d})}),[i.pathname,i.search,i.state,l]);const[bt,ae]=n.useState(null),[vt,oe]=n.useState(!1),[Et,ie]=n.useState(void 0),[Pt,re]=n.useState(void 0),we=n.useRef(!1);n.useEffect((()=>{if(!we.current&&q!=null&&q!==""){const e=i.state;ae(q),oe(ye),ie(e?.aiCfoInitialSubmissionSource!=null?e.aiCfoInitialSubmissionSource:void 0);const d=e?.aiCfoSuggestionIndex;re(typeof d=="number"?d:void 0),we.current=!0}}),[q,ye,i.state]);const yt=n.useCallback((()=>{ae(null),oe(!1),ie(void 0),re(void 0),l(i.pathname,{replace:!0,state:We(i.state)})}),[i.pathname,i.state,l]),xe=n.useMemo((()=>new URLSearchParams(i.search)),[i.search]),Re=xe.get("ref")??N?.aiCfoRef,le=xe.get("emailRefId")??N?.aiCfoEmailRefId,Te=n.useRef(!1);n.useEffect((()=>{Te.current||Re!=="month-end-email"||le==null||u!=null||w==null||(t(ks("controller",w.userId,le,"MONTH_END_EMAIL")),Te.current=!0)}),[Re,le,u,t,w]);const G=g.uiState.lastContextMessage;n.useEffect((()=>{G!=null&&G!==""&&u!=null&&(ae(G),oe(!0),ie(void 0),re(void 0),t(bs()))}),[G,u,t]);const wt=k.masterTOSInfo,x=wt?.isMasterTOSAccepted??!1,{visitedSessions:je}=Wt(u),H=g.fetchState,z=g.uiState.chatSessionsNextPageToken.hasMore||!g.uiState.chatSessionsFirstPageFetched,Oe=u!=null?g.fetchChatSessionHistoryByChatSessionId?.[u]?.fetchState??"Not-Started":"Not-Started",Ae=u==null||(g.uiState.chatHistoryNextPageToken[u]?.hasMore??!0),Ue=g.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:xt}=Je(Ue,u),Rt=xt.length===0;n.useEffect((()=>{x||U||l("../dashboard",{state:{...i.state,message:"open_ai_cfo_drawer"}})}),[x,U,l,i.state]);const Tt=n.useCallback((()=>{const e=ge(i.state?.pathnameStackToGoBack),d=k.tenantEmailDomain;l(e.poppedPathname??(d!=null?`/${d}/dashboard`:".."),{state:{...i.state,pathnameStackToGoBack:e.newStack}})}),[k.tenantEmailDomain,i.state,l]),Qe=n.useRef(void 0),_e=n.useRef(void 0);n.useEffect((()=>{const e=c!==Qe.current,d=u!==_e.current;Qe.current=c,_e.current=u,c!==u&&(!e||c==null||qs(c)?d&&u!=null&&l(`../ai-cfo/${u}`,{state:{...i.state}}):t(vs({sessionId:c,agentId:"controller"})))}),[u,c]);const jt=n.useMemo((()=>({events:je.map((e=>`private-encrypted-chat-${e}.${Ye}`)),eventCallback:(e,d,Q)=>Q.onEventReceived(e,d)})),[je]);n.useEffect((()=>{H!=="In-Progress"&&z&&t(Es())}),[H,z,t]),n.useEffect((()=>{u!=null&&Oe!=="In-Progress"&&Ae&&w!=null&&(c===u||H==="Completed"&&!z)&&t(Ps(u,w.userId))}),[Oe,H,Ae,z,u,w,c,t]);const ue=w?.userId,Ot=n.useMemo((()=>{return ue==null?[]:[(e=ue,`private-encrypted-routines-${e}.routine-run-updated`)];var e}),[ue]),De=n.useCallback((e=>{const d=e!=null&&(e===P||e===O);(T||d)&&t(he()),d&&t(W({scheduleId:e}))}),[t,T,O,P]);Gs({events:Ot,onSubscribed:()=>De(P??O),onEvent:(e,d)=>{const Q=(de=>{if(de==null||typeof de!="object")return null;const _=de;return fe(_.schedule_id)&&fe(_.run_id)?{scheduleId:_.schedule_id,runId:_.run_id,status:Hs.find((Qt=>Qt===_.status))??null,finishedAt:fe(_.finished_at)?_.finished_at:null}:null})(d);Q!=null&&De(Q.scheduleId)}});const Le=e=>e.trackAICFOOnboardingScreenStateChanged("open","first_visit");if(w==null||c==null)throw Error("Can't access AI Controller page without signing in...");const At=u!=null&&g.responseStateByChatSessionId?.[u]?.answer?.fetchState==="In-Progress";if(!x&&U)return h.jsxs(Ks,{children:[h.jsx(ce,{analytics:M,onLoad:Le}),ne.drawerElement,h.jsx(Ys,{children:h.jsx(ze,{children:h.jsx(me,{isTOSAccepted:!1,acceptMasterTOSState:g.masterTOSAcceptanceState,onCloseClick:Tt,onCompleteClick:()=>{k.userRoleId!=null&&t(pe(k.userRoleId))}})})})]});const Ut=h.jsxs(h.Fragment,{children:[p&&!x?h.jsx(ce,{analytics:M,onLoad:Le}):null,h.jsx(me,{isTOSAccepted:x,acceptMasterTOSState:g.masterTOSAcceptanceState,showHeader:!1,togglePageView:x?()=>S(!1):void 0,onCloseClick:()=>S(!1),onCompleteClick:()=>{x||k.userRoleId==null||t(pe(k.userRoleId)),S(!1)}})]});return h.jsxs(h.Fragment,{children:[h.jsxs(Js,{children:[h.jsx(ce,{analytics:M,onLoad:e=>e.trackPageLoaded(Xt.Event.aiCFOPage)}),U&&ne.drawerElement,h.jsx(Ws,{...jt,currentChatSessionId:u,allSessionsWithOrderedQuestionAnswers:Ue,allUsers:ct,isAiCardCreationEnabled:mt,isCardPolicyEnabled:St,openOnboardingPage:()=>S(!0),userId:w.userId,setIsAiCfoOpen:r,navigate:l,sessionFromUrl:c,location:i,isSubmitting:At,isEmptyChatWithSession:Rt,currentTenant:k,emailLinkQuestion:bt??void 0,autoSubmitEmailLinkQuestion:vt,onEmailLinkQuestionProcessed:yt,routedInitialQuestionSource:Et,routedInitialQuestionSuggestionIndex:Pt,onCardPolicyVendorSearchTextChange:ht,onMenuClick:U?ne.open:void 0,isFileUploadEnabled:s,isUploadPromoVisible:It,onUploadPromoClose:gt,exploreSuggestedPromptQuestions:kt,exploreSuggestedPromptQuestionsLoading:Ct,isSkillsOpen:A,isRoutinesOpen:T,routineCanCreate:m,routineEditing:E,routineEditorOpen:K,routineListError:a.fetchState==="Error",routineListLoading:a.fetchState==="In-Progress",routineMaxRoutines:a.maxRoutines,routineSaveError:o.fetchState==="Error",routineSaving:o.fetchState==="In-Progress",routineSchedulableSkills:X,routines:a.routines,onRoutineCreate:Xe,onRoutineDelete:rt,routineHistoryError:I.fetchState==="Error",routineHistoryLoading:I.fetchState==="In-Progress",chatSidePanel:ft,routineDetail:ke,routineRunningScheduleId:o.runningScheduleId,routineRuns:I.runs,onRoutineEdit:Ze,onRoutineOpenRun:(e,d)=>se(d,e.scheduleId),onRoutineRun:st,onRoutineCloseDetail:te,onRoutineDraft:it,routineDraftPrompt:Y,onRoutineOpenDetail:ee,onRoutineEditorCancel:et,onRoutineLoadSkillInstructions:ut,onRoutineSave:tt,onRoutineSetEnabled:lt,isCreateSkillEnabled:D,promoDismissalScope:y}),p&&U?h.jsx(Fs,{anchor:"right",open:p,transitionDuration:250,PaperProps:{component:Xs,style:{width:"100%"}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>S(!1),children:h.jsx(ze,{onClick:e=>e.stopPropagation(),children:h.jsx(me,{isTOSAccepted:x,acceptMasterTOSState:g.masterTOSAcceptanceState,onCloseClick:()=>S(!1),onCompleteClick:()=>{x||k.userRoleId==null||t(pe(k.userRoleId)),S(!1)}})})}):null]}),p&&!U?h.jsx(Jt,{open:p,onClose:()=>S(!1),children:h.jsx(Kt,{children:Ut})}):null]})},ze=$(Ms)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,Js=$.div`
6
- height: 100vh;
7
- width: 100%;
8
- `,Ks=$.div`
9
- height: 100vh;
10
- width: 100%;
11
- display: flex;
12
- flex-direction: column;
13
- min-height: 0;
14
- `,Ys=$.div`
15
- flex: 1;
16
- min-height: 0;
17
- display: flex;
18
- flex-direction: column;
19
- `,Xs=$(Vs)`
20
- box-shadow: ${({theme:s})=>s.colors.elevation2};
21
- color: ${({theme:s})=>s.colors.grey4};
22
- `;export{Cn as default};
@@ -1 +0,0 @@
1
- import{j as u}from"./liveblocks-CgHUgeBY.js";import{a as d}from"./sentry-DSWD_gIh.js";import{h as U,g as B,u as j,j as y,N as H,l as V,i as W,n as te,o as x}from"./core-Cc7wW2EM.js";import{fF as P,Z0 as w,YJ as R,HL as E,HF as q,HJ as A,Hy as J,YL as K,HC as ae,HN as oe,HB as Y,HQ as z,HM as C}from"./zeni-epic-state-BVJjEVAA.js";import{z as O,w as M,b_ as pe,q as T,bU as Q,b$ as le,E as Z,a8 as G,c0 as se,c1 as ne}from"./index-vIt7RQvO.js";import"./mui-C4zFSCiU.js";import{u as X,i as re}from"./ReimbursementApprovalRuleDetailScreen-BxglZgWl.js";import ie from"./NotFoundScreen-DzxbROot.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]="759eaa3a-209e-418c-8497-a31855b30031",e._sentryDebugIdIdentifier="sentry-dbid-759eaa3a-209e-418c-8497-a31855b30031")}catch{}})();const k="bill-approval-rule-update",ce=V((function(e){return{approvalView:w(e),billPaySetupApproverViewUpdateData:R(e).billPaySetupApproverViewUpdateData}}),(function(e,l){const{navigate:t,location:o}=l;return{onApprovalRulesEventReceived:a=>{a.endsWith(k)&&e(K(!1))},onBackClick:()=>{T(o)?t("../../"):t("../../../bills/setup")},onDeleteRuleClick:a=>{e(J(a,!1))},onEditRuleClick:a=>{a!=null?(e(A(a)),t(`./${a}/edit`)):(e(A()),t("./new"))}}}))(M(pe)),ue=({isLoading:e})=>{const l=U(),t=B(),o=j(),[a,n]=d.useState(!1),[s,v]=d.useState(!1),p=y((r=>r.billPaySetupApproverViewState.fetchState)),f=y((r=>P(r))),c=y((r=>w(r))),S=y((r=>R(r).billPaySetupApproverViewUpdateData));if(d.useEffect((()=>{S?.updateStatus.fetchState==="Completed"&&o(E())}),[S]),d.useEffect((()=>{a||p!=="Not-Started"||e||(n(!0),o(q(!0,!0,!1)))}),[a,p,e,o]),O.getSignedInUser()==null)throw Error("Can't access billpay approval without signing in...");d.useEffect((()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(s||(v(!0),o(A())),l("./new"))}),[s,c,o]);const g={events:f.companyId!=null?[`private-encrypted-${f.companyId}.${k}`]:[],eventCallback:(r,h,I)=>{r.endsWith(k)&&I.onApprovalRulesEventReceived(r)}};return f?.companyBillPayInfo?.info?.isBillPayTOSAccepted===!1?u.jsx(H,{to:"../../promo"}):u.jsx(ce,{currentTenant:f,location:t,navigate:l,...g})},L="bill-approval-rule-update",de=V((function(e){const l=w(e),t=R(e).billPaySetupApproverViewUpdateData,o={};for(const n of Object.values(e.vendorState.vendorByID))n?.id!=null&&(o[n.id]=n.name);const a={};for(const n of Object.values(e.classState.classesByKey))n?.classId!=null&&(a[n.classId]=n.className);return{approvalView:l,billPaySetupApproverViewUpdateData:t,vendorNamesById:o,departmentNamesById:a}}),(function(e,l){const{navigate:t,location:o}=l;return{onApprovalRulesEventReceived:a=>{a.endsWith(L)&&e(K(!1))},onBackClick:()=>{T(o)?t("../../"):t("../../../bills/setup")},onDeleteRuleClick:a=>{e(J(a,!0))},onEditRuleClick:a=>{a!=null?(e(A(a)),t(`./${a}/edit`)):(e(A()),t("./new"))},onReorderRules:a=>{e(oe(a,!0))}}}))(M(le)),ve=()=>{const e=y((o=>P(o))),{isApprovalRulesV3Enabled:l,isLoading:t}=Q(e?.tenantId);return l?u.jsx(fe,{isLoading:t}):u.jsx(ue,{isLoading:t})},fe=({isLoading:e})=>{const l=U(),t=B(),o=j(),[a,n]=d.useState(!1),[s,v]=d.useState(!1),[p,f]=d.useState(!1),c=y((i=>i.billPaySetupApproverViewState.fetchState)),S=y((i=>i.billPaySetupApproverViewState.approverListState.fetchStatus.fetchState)),g=y((i=>P(i)));X();const r=y((i=>w(i))),h=y((i=>R(i).billPaySetupApproverViewUpdateData));if(d.useEffect((()=>{h?.updateStatus.fetchState==="Completed"&&o(E())}),[h]),d.useEffect((()=>{a||c!=="Not-Started"||e||(n(!0),o(q(!0,!0,!0)))}),[a,c,e,o]),d.useEffect((()=>{s||S!=="Not-Started"||e||(v(!0),o(ae(!1,!0)))}),[s,S,e,o]),O.getSignedInUser()==null)throw Error("Can't access billpay approval without signing in...");d.useEffect((()=>{r.allApprovalRules.length===0&&r.fetchState==="Completed"&&(p||(f(!0),o(A())),l("./new"))}),[p,r,o]);const I={events:g.companyId!=null?[`private-encrypted-${g.companyId}.${L}`]:[],eventCallback:(i,b,m)=>{i.endsWith(L)&&m.onApprovalRulesEventReceived(i)}};return g?.companyBillPayInfo?.info?.isBillPayTOSAccepted===!1?u.jsx(H,{to:"../../promo"}):u.jsx(de,{currentTenant:g,location:t,navigate:l,isLoading:e,...I})},ye=V((function(e,l){const t=R(e),o=t.billPaySetupApproverViewUpdateData?.type??"approval_create",a=o==="approval_create"&&t.allApprovalRules.length!==0;let n=t.allApprovalRules.length===0;return l.approvalRuleId&&(n=t.allApprovalRules.findIndex((s=>s.approvalRuleId===l.approvalRuleId))===0),{localData:t,hideUpperBoundField:a,isLowerBoundDisabled:n,approvalUpdateActionType:o}}),(function(e,l){const{navigate:t,approvalUpdateDataView:o,approverViewData:a,approvalRuleId:n}=l,s=o.billPaySetupApproverViewUpdateData?.type,v=T(l.location);return{onApprovalRuleDataUpdated:p=>{const f=S=>{const g=[];return S.forEach((r=>{const h=r.actors.selectedUsers.map((b=>({type:"user",userId:b.userId,isImplicitActor:!1}))),I=r.actors.selectedNonUsers.map((b=>{const m=!!re(b.value);return{type:m?"attribute":"role",subType:b.value,userId:void 0,idType:void 0,isImplicitActor:!m}})),i=h.concat(I);g.push({action:r.stepType.selectedOption,actors:i,operator:i.length>1?r.stepType.selectedOption==="require_approval"?"or":"and":"is"})})),g},c={amount:{type:"amount",comparator:"range",min:{amount:p.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:p.upperBound,currencyCode:"USD",currencySymbol:"$"}}};if(s==="approval_create"){const S={criteria:c,steps:f(p.steps),isApplicableOnPendingApprovalEntity:p.applyToExistingBills.includes("applyToExistingBills")};e(C(S))}else{const S={approvalRuleId:n,criteria:c,steps:f(p.steps),isApplicableOnPendingApprovalEntity:p.applyToExistingBills.includes("applyToExistingBills")};e(C(S))}},onResetClick:()=>{e(E()),s==="approval_update"||v?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(E()),s==="approval_update"||v?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(z(!1))},onSaveRuleSuccess:()=>{t("../")}}}))(se);function Se(){const e=U(),l=j(),t=B(),{approvalRuleId:o}=W(),a=O.getSignedInUser(),n=Z(),s=y((c=>R(c))),v=y((c=>w(c))),[p,f]=d.useState(!1);if(d.useEffect((()=>{p||(f(!0),l(Y(!0)))})),d.useEffect((()=>{v.fetchState==="Not-Started"&&e(o!=null?"../../":"../")}),[v,o]),a==null)throw Error("Can't access address page without signing in...");return s.approverListFetchStatus.fetchState=="Not-Started"||s.approverListFetchStatus.fetchState==="In-Progress"?u.jsx(G,{fetchState:s.approverListFetchStatus.fetchState,style:{backgroundColor:n.colors.grey5}}):u.jsx(ye,{navigate:e,approvalUpdateDataView:s,approvalRuleId:o,approverViewData:v,location:t})}const ge=V((function(e,l){const t=R(e),o=t.billPaySetupApproverViewUpdateData?.type??"approval_create",a=[],n={};for(const s of Object.values(e.vendorState.vendorByID))s?.id!=null&&(a.push(s.id),n[s.id]=s.name);return{localData:t,approvalUpdateActionType:o,allVendorIds:a,vendorNamesById:n,editingRuleId:o==="approval_update"?l.approvalRuleId:void 0,allApprovalRulesWithUser:w(e).allApprovalRules}}),(function(e,l){const{navigate:t,approvalUpdateDataView:o,approverViewData:a,approvalRuleId:n}=l,s=o.billPaySetupApproverViewUpdateData?.type,v=T(l.location);return{onApprovalRuleDataUpdated:p=>{const f=i=>{const b=[];return i.forEach((m=>{const N=m.actorKind?.selectedOption,ee=m.selectedRole?.selectedNonUsers??[];let D=[];N==="role"?D=ee.map((_=>({type:"attribute",subType:_.value,userId:void 0,idType:void 0,isImplicitActor:!1}))):N==="specific_person"&&(D=(m.persons?.selectedUsers??[]).map((_=>({type:"user",userId:_.userId,isImplicitActor:!1}))));const $=m.action??"require_approval";b.push({action:$,actors:D,operator:D.length>1?$==="require_approval"?"or":"and":"is"})})),b},c=p.amountCriteria,S=p.vendorCriteria,g=p.departmentCriteria,r={};if(c!=null&&c.comparator.selectedOption!=null){const i=c.comparator.selectedOption;r.amount={type:"amount",comparator:i,min:i==="less_than"?void 0:c.min,max:i==="greater_than"?void 0:c.max}}const h=S?.selection.selectedOptions??[];h.length>0&&(r.vendor={type:"vendor",operator:S?.operator.selectedOption??"is",vendorIds:h});const I=g?.selection.selectedOptions??[];if(I.length>0&&(r.department={type:"department",operator:g?.operator.selectedOption??"is",departmentIds:I}),s==="approval_create"){const i={name:p.name,description:p.description,separationOfDuties:p.separationOfDuties,criteria:r,steps:f(p.steps),isApplicableOnPendingApprovalEntity:p.applyToExistingBills.includes("applyToExistingBills")};e(C(i))}else{const i={approvalRuleId:n,name:p.name,description:p.description,separationOfDuties:p.separationOfDuties,criteria:r,steps:f(p.steps),isApplicableOnPendingApprovalEntity:p.applyToExistingBills.includes("applyToExistingBills")};e(C(i))}},onResetClick:()=>{e(E()),s==="approval_update"||v?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(E()),s==="approval_update"||v?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(z(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:p=>{e(A(p)),t(s==="approval_update"?`../../${p}/edit`:`../${p}/edit`)}}}))(ne);function F(){const e=y((t=>P(t))),{isApprovalRulesV3Enabled:l}=Q(e?.tenantId);return l?u.jsx(me,{}):u.jsx(Se,{})}function me(){const e=U(),l=j(),t=B(),{approvalRuleId:o}=W(),a=O.getSignedInUser(),n=Z(),s=y((c=>R(c))),v=y((c=>w(c))),[p,f]=d.useState(!1);if(X(),d.useEffect((()=>{p||(f(!0),l(Y(!1)))})),d.useEffect((()=>{v.fetchState==="Not-Started"&&e(o!=null?"../../":"../")}),[v,o]),a==null)throw Error("Can't access address page without signing in...");return s.approverListFetchStatus.fetchState=="Not-Started"||s.approverListFetchStatus.fetchState==="In-Progress"?u.jsx(G,{fetchState:s.approverListFetchStatus.fetchState,style:{backgroundColor:n.colors.grey5}}):u.jsx(ge,{navigate:e,approvalUpdateDataView:s,approvalRuleId:o,approverViewData:v,location:t},o??"new")}function xe(){return u.jsxs(te,{children:[u.jsx(x,{path:"/",element:u.jsx(ve,{})}),u.jsx(x,{path:"/new",element:u.jsx(F,{})}),u.jsx(x,{path:"/:approvalRuleId/edit",element:u.jsx(F,{})}),u.jsx(x,{path:"*",element:u.jsx(ie,{})})]})}export{xe as B};
@@ -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 +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 +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};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-CgHUgeBY.js";import{a as r}from"./sentry-DSWD_gIh.js";import{ax as d,ay as l,D as p,a5 as f}from"./index-vIt7RQvO.js";import"./mui-C4zFSCiU.js";import m from"./NotFoundScreen-DzxbROot.js";import{h as c,g as u}from"./core-Cc7wW2EM.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]="3ed61bc3-b654-468a-ba56-413bbf881034",e._sentryDebugIdIdentifier="sentry-dbid-3ed61bc3-b654-468a-ba56-413bbf881034")}catch{}})();const _=()=>{const e=c(),a=u(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),i=r.useCallback((()=>{(()=>{const n=f(a.state?.pathnameStackToGoBack),b=n.poppedPathname??k();e(b,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=d(a.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:i}):s.jsx(m,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{_ as F};
@@ -1 +0,0 @@
1
- import{a as r}from"./sentry-DSWD_gIh.js";import{u as l,h as f,g as m}from"./core-Cc7wW2EM.js";import{hY as p,UB as g,UC as _}from"./zeni-epic-state-BVJjEVAA.js";import{u as b,L as h,z as y}from"./index-vIt7RQvO.js";import"./liveblocks-CgHUgeBY.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";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2a93d830-e3af-449b-98b3-7756e027ec7c",e._sentryDebugIdIdentifier="sentry-dbid-2a93d830-e3af-449b-98b3-7756e027ec7c")}catch{}})();function j(){const e=l(),n=f(),o=m(),{setLoading:i,clearAllLoading:d}=b(),s=r.useRef(!1);return r.useLayoutEffect((()=>{i(h.CONNECTION_AUTH)}),[i]),r.useEffect((()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(o.search).get("code"),c=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&c!=null){const t=JSON.parse(c);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}d();const u=y.getActiveTenantForUser();n(u?.tenantEmailDomain!=null?`/${u.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{j as default};
@@ -1,12 +0,0 @@
1
- import{j as u}from"./liveblocks-CgHUgeBY.js";import{a as g}from"./sentry-DSWD_gIh.js";import{u as O,g as _,h as w,t as M,j as l,N as L}from"./core-Cc7wW2EM.js";import{z as r,E as P,G as V,T as A,j as N,U as $,$ as q,a0 as G,Y as R}from"./index-vIt7RQvO.js";import{fF as W,TZ as Y,Uq as Z,Uh as B,gi as H,gk as J,Um as K,gU as Q,dj as X,Ur as ee,Us as te}from"./zeni-epic-state-BVJjEVAA.js";import{n as ne}from"./mui-C4zFSCiU.js";import{u as se}from"./useDeviceId-B5zol9VP.js";import{f as ae}from"./analyticsHelper-Ch9SsWjb.js";import{t as ie}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:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="cab6e249-5182-4955-955d-2e0ea82a8c9e",t._sentryDebugIdIdentifier="sentry-dbid-cab6e249-5182-4955-955d-2e0ea82a8c9e")}catch{}})();const T=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function Te(){const t=O(),a=_(),f=w(),[y]=M(),n=y.get("token"),p=y.get("stytch_token_type"),m=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:C,magicLinkEmail:c,verifyDeviceFetchState:x,resendVerifyDeviceOTPFetchState:z}=l((e=>e.tenantState)),S=l((e=>e.tenantState.fetchState)),b=l((e=>e.tenantState.activeTenantFetchState.fetchState)),h=l((e=>e.tenantState.signInState)),I=l((e=>e.tenantState.magicLinkSignInFetchState.fetchState)),s=l((e=>e.tenantState.loggedInUser)),o=l((e=>W(e))),k=l((e=>Y(e))),D=r.getSignedInUser(),v=P().mode;g.useEffect((()=>{s?.zeniSessionId==null&&n!=null&&T(n,p)&&i!=null&&m!=null&&(r.saveMagicLinkTriggered(n),t(Z(n,i,m)))}),[n,p,t,i,m,s?.zeniSessionId]),g.useEffect((()=>{h!=="In-Progress"||S!=="Completed"&&b!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(B(k.tenantsInOrder),s.zeniSessionId),H(s.userId,s.zeniSessionId,o.tenantId),t(J(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(K("Completed")),V.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,k.tenantsInOrder),Q().then((()=>{const e=R();e!=null&&A(e)})),setTimeout((()=>{N.trackLogin($.Event.loginSuccess,"email",X(o.productSettings))}),2e3))}),[h,S,b,s,o,k,v,a.state,t]);const E=g.useCallback((()=>{f("/signin/auth")}),[f]),j=g.useCallback((()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))}),[i,d,t,c]),F=g.useCallback((e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))}),[i,n,t,c,d]);if(I==="Completed"&&d!=null)return u.jsx(q,{phoneNumber:C,verifyOtpFetchState:x.fetchState,resendVerifyDeviceOTPFetchState:z,onResendOtp:j,onVerifyOtp:F,onCancelVerifyDevice:E});if(h==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||D!=null){const e=a.state?.origin??"/";return u.jsx(L,{to:e,state:{...a.state,origin:""}})}if(!T(n,p)||m==null||I==="Error"){const e=a.state?.origin??"/",U=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(L,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:U,magicLinkExpired:!U&&(r.isMagicLinkTriggered(n??"")||I==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(G,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
2
- position: fixed;
3
- top: 0;
4
- left: 0;
5
- right: 0;
6
- bottom: 0;
7
- display: flex;
8
- align-items: center;
9
- justify-content: center;
10
- z-index: 9999;
11
- background-color: ${t=>t.theme.colors.background};
12
- `;export{Te as default};
@@ -1 +0,0 @@
1
- import{j as _}from"./liveblocks-CgHUgeBY.js";import{a as m}from"./sentry-DSWD_gIh.js";import{u as te,j as t,i as $e,g as Ge,h as Me,q as F}from"./core-Cc7wW2EM.js";import{fF as ne,T_ as Ue,T$ as se,g9 as xe,fE as Ne,U8 as Ve,U1 as Pe,U2 as Re,p$ as Oe,gm as je,U5 as b,Ua as Le,Ub as Q,gn as Ze,Uc as ze,Eb as He,h1 as qe,cV as Ye,Ud as We,g8 as Je,go as Ke}from"./zeni-epic-state-BVJjEVAA.js";import{w as Qe,i as Xe,F as ea,N as aa,c as ta,e as na,u as sa,f as c,g as oa,V as ia,z as ra,d as da,k as ca,n as la,r as ua,o as ma,q as X,L as fa,H as ha,I as ba,p as S,j as ee,x as pa,O as ae,A as ga,C as Sa}from"./index-vIt7RQvO.js";import{D as Ea}from"./mui-C4zFSCiU.js";import{u as ka}from"./InboxNotificationsProvider-CYNlrTK-.js";import{u as Ca}from"./useTaskManagerAccess-BeNfkHpZ.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new l.Error().stack;i&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[i]="4aae0ae4-52f9-45cc-8ac8-3cad20bd8379",l._sentryDebugIdIdentifier="sentry-dbid-4aae0ae4-52f9-45cc-8ac8-3cad20bd8379")}catch{}})();const Ta=Qe((({isAppContentDrawerOpen:l,handleDrawerToggle:i})=>{const{tenantEmailDomain:s}=$e(),a=Ge(),E=ea(),n=Me(),B=xe(),r=te(),{useFeatureGate:d}=aa(),p=ta(),{isTaskManagerAccessEnabled:k}=Ca(p),o=t((e=>ne(e))),oe=o.masterTOSInfo?.isMasterTOSAccepted??!1,$=t((e=>Ne(e))),{status:ie}=t(Ve),G=$.uiState.currentChatSessionId,C=na(),{setLoading:re}=sa(),[w,M]=m.useState(void 0),A=F("/:tenantEmailDomain/dashboard")!==null,U=F("/:tenantEmailDomain/reports")!==null,f=F("/:tenantEmailDomain/onboarding/*")!==null,de=!!o.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:ce}=d(c.isChargeCardFeatureEnabled),{isFeatureEnabled:x}=d(c.isDebitCardFeatureEnabled),le=oa(o,ce,x),{isFeatureEnabled:ue}=d(c.isSettingsFeatureEnabled),N=t((e=>Pe(e))),{isFeatureEnabled:T}=d(c.isReferralFeatureEnabled),v=t((e=>Re(e)));m.useEffect((()=>{C&&T&&!f&&v.fetchState==="Not-Started"&&r(Oe(!0))}),[C,T,v.fetchState,f]);const D=t((e=>e.tenantState)),me=t((e=>D.fetchState==="Completed"?je(e):[])),g=t((e=>e.expenseAutomationViewState.selectedPeriodByTenantId)),{isFeatureEnabled:fe}=d(c.isApAgingFeatureEnabled),{isFeatureEnabled:he}=d(c.isArAgingFeatureEnabled),V=ia(),{isFeatureEnabled:be}=d(c.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:pe}=d(c.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:ge}=d(c.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:Se}=d(c.isDashboardSidebarNewYearAnimationEnabled),Ee=o.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",ke=t((e=>b(e).totalUnreadCount)),Ce=t((e=>b(e).reducedFetchCountState)),P=t((e=>b(e).notificationDetailsByTab.tasks.uiState.unreadCount)),R=t((e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount)),O=t((e=>b(e).notificationDetailsByTab.tasks.fetchCountState)),I=t((e=>b(e).notificationDetailsByTab.comments.fetchCountState)),{inboxNotifications:j,isLoading:L,isFetchingMore:Z,hasFetchedAll:z,fetchMore:Te}=ka();m.useEffect((()=>{const e=setTimeout((()=>Te?.()),0);return()=>clearTimeout(e)})),m.useEffect((()=>{if(L===!1&&Z===!1&&z===!0)if(o?.companyId!=null&&j!=null){const e=`dashboard_${o.companyId}`;M(j.filter((u=>u.roomId===e&&u.readAt==null)).length)}else M(0)}),[L,Z,z]),m.useEffect((()=>{C&&k&&!f&&O.fetchState==="Not-Started"&&B.tenantId!=null&&r(Le("task_manager","dashboard"))}),[C,k,f,O.fetchState,B.tenantId,r]),m.useEffect((()=>{f||I.fetchState!=="Not-Started"||r(Q({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[f,I.fetchState,r]),m.useEffect((()=>{w!=null&&I.fetchState==="In-Progress"&&(r(Q({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),r(se({unreadCount:w},"comments")))}),[w,I.fetchState]);const Ie={fetchStatus:Ce,count:ke},H=s!=null?ra.getSignedInUserTenant(s):null,q=t((e=>H?.tenantId!=null?Ze(e,H.tenantId):void 0)),h=[];fe===!1&&h.push("accounts_payable_aging"),he===!1&&h.push("accounts_receivable_aging"),h.push("zeni_accounts_promo_card","treasury_promo_card"),T===!1&&h.push("rewards_card"),V===!1&&h.push("expense_automation_card");const Y=t((e=>ze(e,h).fetchState)),W=t((e=>He(e).fetchState)),ye=A&&(Y==="Completed"||Y==="Error")||U&&(W==="Completed"||W==="Error")||!A&&!U?void 0:"disabled",we=m.useMemo((()=>qe(o.userRole)),[o.userRole]),Ae=Ye(we),ve=o?.rewardsLastViewedTime==null,De=p?.userEmail!=null&&N.fetchState==="Completed"&&We(N.notificationSettings,p.userEmail,x,o,k),J=da(),Fe=J&&ca(a);return _.jsx(Ea,{container:window.document.body,variant:"temporary",open:l,onClose:()=>i(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:_.jsx(la,{signedInUser:p,currentTenantId:D.currentTenantId??"",tenants:D.fetchState==="Completed"?me:q!=null?[q]:[],currentTenant:o,isTenantDropdownDisabled:ye,isSettings:X(a),isInvoicing:ma(a)&&ie==="completed",isSettingsFeatureEnabled:ue,isVendorsTabVisible:Ae,isZeniAccountEnabled:de,isChargeCardEnabled:le,isTreasuryEnabled:Ee,isNotificationsTabVisible:De,notificationCountDetails:Ie,isExpenseAutomationEnabledForUser:V,selectedMenu:ua(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:ve,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:J,onNotificationIconClick:()=>{i(!1);let e=P===0&&R>0?"notifications/comments":"notifications/tasks";X(a)&&(e=P===0&&R>0?"../../notifications/comments":"../../notifications/tasks");const u=S(a.state?.pathnameStackToGoBack,a.pathname);n(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{i(!1);const e=S(a.state?.pathnameStackToGoBack,a.pathname);n("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(i(!1),s==null)return;if(e.type==="invoicing")return void n(`../${s}/invoicing/overview`,{state:{pathnameStackToGoBack:S(a.state?.pathnameStackToGoBack,a.pathname),referrer:"Sidebar"}});if(e.type==="ai_cfo"){if(ee.trackAICFOChatScreenStateChanged("viewed","left_menu",G??null,null),!oe)return void pa({location:a,navigate:n,mergeState:{referrer:"Sidebar"}});const y=S(a.state?.pathnameStackToGoBack,a.pathname);return void n(`/${s}/ai-cfo/explore`,{state:{pathnameStackToGoBack:y,referrer:"Sidebar"}})}const u=S(a.state?.pathnameStackToGoBack,a.pathname),K=e.type,_e=ae(K)&&K!=="command_center";if(ae(e.type)&&g[o.tenantId]!=null&&ee.trackMonthEndCloseClicked(g[o.tenantId].month,g[o.tenantId].year,"Sidebar"),_e&&g[o.tenantId]!=null){const y=g[o.tenantId];return void n(`/${s}/month_end_close_checks/review/${e.type}/${y.month}-${y.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const Be=ga(e.type);Sa(e.type)?(G!=null&&r(Ke()),n(`/${s}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):n(`/${s}/${Be}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{i(!1),n(`/${s}/settings/my_profile`)},handleReferralsClick:()=>{i(!1),n(`/${s}/rewards`)},handleBackClick:()=>{n(`/${s}/dashboard`)},handleTenantSelect:e=>{re(fa.TENANT_SWITCHING),i(!1),ha({dispatch:r,navigate:n,pathToNavigate:ba(e.tenantEmailDomain,a),selectedTenant:e,signedInUser:p})},onZeniLogoClick:()=>{E.toggle()},isAiCfo:Fe,aiCfoView:$,isOnDashboard:A,updateCurrentChatSessionId:e=>{r(Je({sessionId:e,agentId:"controller"})),n(`/${s}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:be,isTaskManagerAccessEnabled:k,thanksGivingAnimationEnabled:pe,christmasAnimationEnabled:ge,newYearAnimationEnabled:Se})})})),Ba=l=>{const i=te(),s=t((E=>ne(E))),a={events:s.userRoleId!=null?[`private-encrypted-${s.userRoleId}.dashboard-user-notification`]:[],eventCallback:(E,n)=>{Xe(n)&&Ue(n.mode)==="dashboard"&&i(se({unreadCount:n.data.unread},"tasks"))}};return _.jsx(Ta,{...l,...a})};export{Ba as M};
@@ -1 +0,0 @@
1
- import{j as e}from"./liveblocks-CgHUgeBY.js";import{h as r,l as n}from"./core-Cc7wW2EM.js";import{an as i}from"./index-vIt7RQvO.js";import"./mui-C4zFSCiU.js";import"./sentry-DSWD_gIh.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";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="3be885cb-07f5-4896-9ae7-ddcb5a1e09f4",o._sentryDebugIdIdentifier="sentry-dbid-3be885cb-07f5-4896-9ae7-ddcb5a1e09f4")}catch{}})();const a=n(null,(function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}}))(i);function _(){const o=r();return e.jsx(a,{navigate:o})}export{_ as default};
@@ -1 +0,0 @@
1
- import{j as f}from"./liveblocks-CgHUgeBY.js";import{a as r}from"./sentry-DSWD_gIh.js";import{u as j,g as A,j as o,N as C}from"./core-Cc7wW2EM.js";import{UE as P,fF as x,gm as z,UF as D,UG as M,UH as R,UI as F,pS as k,Tj as L}from"./zeni-epic-state-BVJjEVAA.js";import{z as h,ai as I}from"./index-vIt7RQvO.js";import"./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 n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="e3455a42-91d2-4bba-97a0-8d29f99e4003",n._sentryDebugIdIdentifier="sentry-dbid-e3455a42-91d2-4bba-97a0-8d29f99e4003")}catch{}})();function ee(){const n=j(),a=A(),{params:t,error:i}=r.useMemo((()=>P(a.search)),[a.search]),w=r.useMemo((()=>new URLSearchParams(a.search).get("client_name")??t?.clientId??"Unknown Application"),[a.search,t]),p=h.isSignedIn(),s=h.getSignedInUser(),m=o((e=>x(e))),l=o((e=>z(e))),d=o((e=>e.tenantState.fetchState)),y=o(D),b=o(M),u=o(R),[S,U]=r.useState(null),[v,E]=r.useState(null);r.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]),r.useEffect((()=>()=>{n(F())}),[n,a.search]),r.useEffect((()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)}),[i]);const g=r.useRef(!1);r.useEffect((()=>{p&&s!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(k(s.userId,s.zeniSessionId??void 0))))}),[p,s,d,n]),r.useEffect((()=>{u!=null&&u!==""&&(window.location.href=u)}),[u]);const _=r.useMemo((()=>{if(m?.tenantId!=null)return m.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some((T=>T.tenantId===e))?e:l.length===1?l[0].tenantId:null}),[m?.tenantId,l]),c=S??_;return i!=null?f.jsx(I,{variant:"invalid_params",paramsError:i}):p?f.jsx(I,{variant:"signed_in",clientName:w,userEmail:s?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:c,onSelectTenant:U,approveError:v??b,isApproving:y==="In-Progress",showAllowButton:c!=null,onApprove:()=>{t!=null&&s!=null&&c!=null&&n(L(s.userId,s.zeniSessionId??void 0,c,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{E("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):f.jsx(C,{to:"/signin/auth",state:{origin:a.pathname+a.search},replace:!0})}export{ee as default};
@@ -1 +0,0 @@
1
- import{j as n}from"./liveblocks-CgHUgeBY.js";import{h as G,u as W,g as z,i as Z,j as d,l as H,n as J,o as S}from"./core-Cc7wW2EM.js";import{fF as v,Ac as R,v5 as K,Vw as w,v0 as C,bq as Q,b$ as X,v1 as ee,Vx as ae,Ve as y,ei as te,E0 as se,Vy as oe,Eo as re,d_ as ne,dZ as ce}from"./zeni-epic-state-BVJjEVAA.js";import{aj as ie,z as le,ar as de,at as me,P as fe,a9 as pe,j as M,aE as ue,p as he,N as Fe,f as ge}from"./index-vIt7RQvO.js";import"./mui-C4zFSCiU.js";import Ie from"./NotFoundScreen-DzxbROot.js";import{F as be}from"./FeaturePreviewScreen-OtBPdCPK.js";import{a as F}from"./sentry-DSWD_gIh.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-7-6nPEHY.js";import{u as ye}from"./useInitialThreadRequest-D4Y8xhXu.js";import{t as Ce}from"./routePaths-C0UIXwMQ.js";import{M as Te}from"./MobileAppDrawer-DLFLa7hS.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"./InboxNotificationsProvider-CYNlrTK-.js";import"./useTaskManagerAccess-BeNfkHpZ.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="209478dc-78a2-49b2-8a34-2ed7ecad5961",s._sentryDebugIdIdentifier="sentry-dbid-209478dc-78a2-49b2-8a34-2ed7ecad5961")}catch{}})();const T=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},xe=H((function(s){const e=ae(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach((r=>{a[r]=o[r]===!1})),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:M}}),(function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(w(a,o)),e.isPandLReportFetched(a)||s(C(a)),T(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(re(a))},onForecastVsActualsCompareToggle:a=>{s(oe(a)),s(y({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(se(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,c;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,c=te(o)):o.balanceTimeFrame==="year"?(r="quarter",c={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),c!=null&&r!=null){const u=Ce(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),m=he(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(u,{state:{pathnameStackToGoBack:m,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(y({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(y({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}}))(ue);function U(){const s=ie(),e=G(),a=W(),o=z(),{forecastId:r,tenantEmailDomain:c}=Z(),[p,u]=F.useState(!1),[m,x]=F.useState(!1),g=le.getSignedInUser(),A=d((t=>v(t))),_=A.company?.companyInfo.firstMonthOfFY??1,i=d((t=>R(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),j=d((t=>t.profitAndLossState)),D=d((t=>t.reportUIOptionsState.selectedForecast)),E=t=>j.pandLByForecastID[t]!=null&&ee(t,j).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:I}=de();me({isDataReady:l});const{isAiCfoAccessEnabled:N,onAskAiCfoClick:V}=Se({mobileExploreReferrer:"Forecast"});F.useEffect((()=>{if(!p&&I)u(!0),l||a(K());else if(l&&!m){x(!0);const t=((f,L,O)=>L!=null?f.forecasts.findIndex((b=>b.id===L)):O!=null?f.forecasts.findIndex((b=>b.id===O)):f.forecasts.length>0?0:-1)(i,r,D?.id);t===-1&&r!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=D?.index?(a(w(i.forecasts[t].id,t)),T(r,i.forecasts[t].id,e,o.search)):r==null&&t!==-1&&T(void 0,i.forecasts[t].id,e,o.search),t!==-1&&!E(i.forecasts[t].id)&&I&&a(C(i.forecasts[t].id))}}),[p,u,a,l,i,m,x,R,C,I]);const P=fe(),B=P?.loggedInUserRole!=null&&Q(P.loggedInUserRole),$=ye(A?.companyId,{clearParams:l&&m}),[q,Y]=F.useState(!1),h=new URL(s("forecast_pandl"));h.searchParams.set("firstname",g?.firstName??""),h.searchParams.set("lastname",g?.lastName??""),h.searchParams.set("email",g?.userEmail??"");const k=t=>{Y(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(pe,{analytics:M,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(Te,{isAppContentDrawerOpen:q,handleDrawerToggle:k}),n.jsx(xe,{firstMonthOfFY:_,tenantEmailDomain:c,forecastIdFromUrlPath:r,navigate:e,location:o,isPandLReportFetched:E,meetingUrl:X(h.toString()),hasTransactionAccess:B,isAiCfoAccessEnabled:N,onAskAiCfoClick:V,initialOpenThreadRequest:$,onClickMenuIcon:()=>{k(!0)}})]})}function Ze(){const s=d((c=>v(c))),{useFeatureGate:e}=Fe(),{isFeatureEnabled:a}=e(ge.isDebitCardFeatureEnabled),o=ne(a,s),r=ce(s);return o===!0||r===!0?n.jsx(be,{}):n.jsxs(J,{children:[n.jsx(S,{path:"/",element:n.jsx(U,{})}),n.jsx(S,{path:"/:forecastId",element:n.jsx(U,{})}),n.jsx(S,{path:"/:forecastId/*",element:n.jsx(Ie,{})})]})}export{Ze as default};