@zeniai/web-app-ui 5.1.99-qa → 5.2.0-qa

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/dist/assets/AddressRoutes-DGCDOoKb.js +1 -0
  2. package/dist/assets/{AddressScreen-CBnElFxM.js → AddressScreen-Dzf83tSk.js} +2 -2
  3. package/dist/assets/AiCfoScreen-TZ---AU4.js +22 -0
  4. package/dist/assets/{BillPayApprovalRoutes-CB55AV0C.js → BillPayApprovalRoutes-iPPwT0JG.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-UVA-u63A.js → BillPayRoutes-U0Aszwdv.js} +17 -17
  6. package/dist/assets/{BusinessVerificationPageScreen-DsowR4fB.js → BusinessVerificationPageScreen-B4os1LkS.js} +2 -2
  7. package/dist/assets/{CardsAiCfoScreen-BaEolMVN.js → CardsAiCfoScreen-Db20Cfsg.js} +3 -3
  8. package/dist/assets/{ChargeCardRoutes-D3n7KJn0.js → ChargeCardRoutes-rxetskAF.js} +10 -10
  9. package/dist/assets/{CompanyPassportScreen-wSnqdrZm.js → CompanyPassportScreen-COm4H_kf.js} +1 -1
  10. package/dist/assets/ConnectionAuthScreen-C5LpJddx.js +11 -0
  11. package/dist/assets/CustomerOnboardingAuthScreen-BIc9nbPF.js +1 -0
  12. package/dist/assets/{CustomerOnboardingRoutes-DT_Ih6lH.js → CustomerOnboardingRoutes-Id7ixv-a.js} +5 -5
  13. package/dist/assets/{DashboardRoutes-B4SpN_q5.js → DashboardRoutes-D_SbIh49.js} +4 -4
  14. package/dist/assets/{DefaultTenantHome-C-Q9oQmt.js → DefaultTenantHome-BsKeybH6.js} +1 -1
  15. package/dist/assets/DomesticWireDetailScreen-BKpkRMty.js +18 -0
  16. package/dist/assets/DrawerScreen-BPgZ_1JF.js +1 -0
  17. package/dist/assets/EntityDetailRoutes-BZ9Mr897.js +1 -0
  18. package/dist/assets/{ExpenseAutomationRoutes-nIGBHuEd.js → ExpenseAutomationRoutes-CN3ihdCO.js} +3 -3
  19. package/dist/assets/FeaturePreviewScreen-Di3PuVRR.js +1 -0
  20. package/dist/assets/HubSpotOAuthCallbackScreen-CW56Ncxa.js +1 -0
  21. package/dist/assets/{MagicLinkRoutes-BTau9CfB.js → MagicLinkRoutes-DJ7vyce1.js} +5 -5
  22. package/dist/assets/MagicLinkSignInScreen-BZfit8o3.js +12 -0
  23. package/dist/assets/MobileAppDrawer-NdU6zrS3.js +1 -0
  24. package/dist/assets/NotFoundScreen-wlhddpbg.js +1 -0
  25. package/dist/assets/{NotificationRoutes-CkKMsCoc.js → NotificationRoutes-DbRksc78.js} +1 -1
  26. package/dist/assets/OAuthConsentScreen-sL3GodJ_.js +1 -0
  27. package/dist/assets/PandLWithForecastRoutes-BoM4q2mR.js +1 -0
  28. package/dist/assets/PeopleRoutes-0fm-JoER.js +22 -0
  29. package/dist/assets/PerformanceRoutes-Cq8pT07f.js +1 -0
  30. package/dist/assets/{Preview-Dh_7Y2V1.js → Preview-CuOg-A8H.js} +1 -1
  31. package/dist/assets/{QBOConnectionScreen-BOAmyhRI.js → QBOConnectionScreen-D9vGR9Iz.js} +1 -1
  32. package/dist/assets/ReimbursementApprovalRoutes-DfMng3xh.js +1 -0
  33. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-B0OjRx8o.js → ReimbursementApprovalRuleDetailScreen-w7TPHMbb.js} +1 -1
  34. package/dist/assets/{ReimbursementRoutes-CnfaWQKq.js → ReimbursementRoutes-uHKvr9EG.js} +8 -8
  35. package/dist/assets/{ReportsRoutes-ZKjtrrXu.js → ReportsRoutes-BosLV3TS.js} +1 -1
  36. package/dist/assets/RewardsRoutes-BPVfq5Np.js +1 -0
  37. package/dist/assets/ScreenRoutes-Drpg91zT.js +2 -0
  38. package/dist/assets/{SettingsRoutes-0RQL-spt.js → SettingsRoutes-BmbweE5j.js} +8 -8
  39. package/dist/assets/{SetupPagesScreen-lXVOcLJ8.js → SetupPagesScreen-HhCCJlo-.js} +5 -5
  40. package/dist/assets/SignInScreen-B8UhmfC2.js +1 -0
  41. package/dist/assets/SignOutScreen-CxWWZOhK.js +9 -0
  42. package/dist/assets/TaskListScreen-B7M-Cqce.js +9 -0
  43. package/dist/assets/TaskRoutes-CyLfJ8Tw.js +9 -0
  44. package/dist/assets/{TransactionDetailRoutes-DFhCPCQa.js → TransactionDetailRoutes-Ct4erWuE.js} +1 -1
  45. package/dist/assets/TransactionDetailScreen-DRzSksYw.js +5 -0
  46. package/dist/assets/{TransactionListRoutes-kn0wMJaj.js → TransactionListRoutes-B191v9kk.js} +1 -1
  47. package/dist/assets/{TreasuryRoutes-h3ROpRx5.js → TreasuryRoutes-DZNZaxYZ.js} +6 -6
  48. package/dist/assets/{VendorsRoutes-x1VmRs4J.js → VendorsRoutes-CvrHlc-r.js} +1 -1
  49. package/dist/assets/WiseConfirmationScreen-B9yx7qcI.js +12 -0
  50. package/dist/assets/{ZeniAccountRoutes-BOVvauFK.js → ZeniAccountRoutes-YPhOuFwx.js} +12 -12
  51. package/dist/assets/ZeniAccountStatementScreen-DJU3198J.js +9 -0
  52. package/dist/assets/{accountMappingHelper-DNCKLg7K.js → accountMappingHelper-SWFIL59M.js} +1 -1
  53. package/dist/assets/{analytics-1WMvk5Rb.js → analytics-DhULAPA0.js} +1 -1
  54. package/dist/assets/{analyticsHelper-C8vUB4gm.js → analyticsHelper-CbsMOq15.js} +1 -1
  55. package/dist/assets/{core-0WK0Zss8.js → core-CnGMK-sC.js} +1 -1
  56. package/dist/assets/{decodeURIComponentSafe-DYdex7Fp.js → decodeURIComponentSafe-uWfgYCNH.js} +1 -1
  57. package/dist/assets/{dnd-Dwsdp5ty.js → dnd-BqCGp7Ed.js} +1 -1
  58. package/dist/assets/{empty-o2YkWI97.js → empty-AGnm4bIq.js} +1 -1
  59. package/dist/assets/{empty-B_vMxB0z.js → empty-CZCaQm4J.js} +1 -1
  60. package/dist/assets/{emptyVideoElement-Cmrnn243.js → emptyVideoElement-Cqm9YLjS.js} +1 -1
  61. package/dist/assets/epic-CTjjWhpg.js +2 -0
  62. package/dist/assets/getLocaleForTenant-BuGWeb9s.js +1 -0
  63. package/dist/assets/{index-DptRs9ko.js → index-BuTuhkuP.js} +2 -2
  64. package/dist/assets/{index-CmH-4r8j.js → index-CUaM5Y1I.js} +1 -1
  65. package/dist/assets/{index-Dy73EgcO.js → index-D7tfVykC.js} +14303 -14311
  66. package/dist/assets/{index-C3zdsXK_.js → index-D88Jaev3.js} +1 -1
  67. package/dist/assets/{index-B4Kzctdg.js → index-S4IFBgph.js} +1 -1
  68. package/dist/assets/{index-CcesBH_n.js → index-XkyLBJ61.js} +1 -1
  69. package/dist/assets/{index-CqKRE3AP.js → index-b64yysEr.js} +1 -1
  70. package/dist/assets/{index-CFATCouK.js → index-uYv86E98.js} +1 -1
  71. package/dist/assets/{lexical-B9WqgH9H.js → lexical-DlqthnSG.js} +1 -1
  72. package/dist/assets/{liveblocks-tpE-grBU.js → liveblocks-s55OcG-D.js} +1 -1
  73. package/dist/assets/{lottie-dQMhiLBj.js → lottie-DMKCl4ti.js} +1 -1
  74. package/dist/assets/{mui-NHWzIwJg.js → mui-CggbPNN2.js} +2 -2
  75. package/dist/assets/{pathToGoBack-BmJj5cme.js → pathToGoBack-DpxbYxCk.js} +1 -1
  76. package/dist/assets/{pdf-C4fX1mA3.js → pdf-BD0zxvar.js} +3 -3
  77. package/dist/assets/{pdf-lib-CxgB1_73.js → pdf-lib-BzRjr6sI.js} +1 -1
  78. package/dist/assets/{plaid-59NT4aqa.js → plaid-d_bwfWrk.js} +1 -1
  79. package/dist/assets/{pusher-CY-7JGv2.js → pusher-Cfk4rd_d.js} +1 -1
  80. package/dist/assets/{react-D8u5JcH6.js → react-BKWnIOym.js} +1 -1
  81. package/dist/assets/{react-C2Lbn6h8.js → react-BdjYstH9.js} +1 -1
  82. package/dist/assets/{react-DhqMtE92.js → react-C8X5xuWi.js} +1 -1
  83. package/dist/assets/{react-SLQy3m4e.js → react-CSLZes-L.js} +1 -1
  84. package/dist/assets/{react-OZ0ubAW7.js → react-D5Ky_KQN.js} +1 -1
  85. package/dist/assets/{react-C3I7c7kB.js → react-onoaKP_J.js} +1 -1
  86. package/dist/assets/{recharts-CUzwcISX.js → recharts-CmLekiCG.js} +1 -1
  87. package/dist/assets/routePaths-CVAI7AUa.js +1 -0
  88. package/dist/assets/{sentry-D58SEIt0.js → sentry-qwy54zvC.js} +1 -1
  89. package/dist/assets/{url-BRZfE6CD.js → url-BKJ8Udjp.js} +1 -1
  90. package/dist/assets/{url-wdUk7Rbg.js → url-CF9Fx3Jk.js} +1 -1
  91. package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-DwtRgARG.js +1 -0
  92. package/dist/assets/useAskAiCfoHostNavButtonProps-Bl-nKTXG.js +1 -0
  93. package/dist/assets/useCashManagementBanner-SbCmMLis.js +1 -0
  94. package/dist/assets/{useChargeCardPusherEvents-DGhBtw5K.js → useChargeCardPusherEvents-Cg9Qn_oP.js} +1 -1
  95. package/dist/assets/{useDeviceId-SayLljl1.js → useDeviceId-DPOieVuC.js} +1 -1
  96. package/dist/assets/useEmailConnectResultRefresh-gsc6JcZn.js +1 -0
  97. package/dist/assets/{useInitialThreadRequest-B7WOjZ27.js → useInitialThreadRequest-CXnpfTcs.js} +1 -1
  98. package/dist/assets/{utils-CHGPa257.js → utils-5Fz6z6US.js} +1 -1
  99. package/dist/assets/{withTransactionSidePanel-BsJ58rSa.js → withTransactionSidePanel-ZQvLeKiY.js} +2 -2
  100. package/dist/assets/{zeni-epic-state-Bx_bp9Xr.js → zeni-epic-state-NrbJoBOX.js} +4 -4
  101. package/dist/index.html +1 -1
  102. package/package.json +3 -3
  103. package/dist/assets/AddressRoutes-ChIEG7ZZ.js +0 -1
  104. package/dist/assets/AiCfoScreen-DXLxFBnQ.js +0 -22
  105. package/dist/assets/ConnectionAuthScreen-RH-ZQnmS.js +0 -11
  106. package/dist/assets/CustomerOnboardingAuthScreen-Bro8vP9Q.js +0 -1
  107. package/dist/assets/DomesticWireDetailScreen-DmspT9Qv.js +0 -18
  108. package/dist/assets/DrawerScreen-CTBdvd2J.js +0 -1
  109. package/dist/assets/EntityDetailRoutes-DPOfKd1l.js +0 -1
  110. package/dist/assets/FeaturePreviewScreen-CS0na0Uv.js +0 -1
  111. package/dist/assets/HubSpotOAuthCallbackScreen-CDdCifUI.js +0 -1
  112. package/dist/assets/MagicLinkSignInScreen-BQxK3HJS.js +0 -12
  113. package/dist/assets/MobileAppDrawer-By5kqJZy.js +0 -1
  114. package/dist/assets/NotFoundScreen-BUpSeNgf.js +0 -1
  115. package/dist/assets/OAuthConsentScreen-BzkRmkhL.js +0 -1
  116. package/dist/assets/PandLWithForecastRoutes-DB98rpg8.js +0 -1
  117. package/dist/assets/PeopleRoutes-BPQhjQKR.js +0 -22
  118. package/dist/assets/PerformanceRoutes-Cu8GwbPn.js +0 -1
  119. package/dist/assets/ReferralListScreen-Bg4MIsqb.js +0 -5
  120. package/dist/assets/ReimbursementApprovalRoutes-CLqW8bjU.js +0 -1
  121. package/dist/assets/RewardsRoutes-Dmsl5Hhz.js +0 -1
  122. package/dist/assets/ScreenRoutes-DtVjvGeB.js +0 -2
  123. package/dist/assets/SignInScreen-Caakz2DY.js +0 -1
  124. package/dist/assets/SignOutScreen-CtzEkEl4.js +0 -9
  125. package/dist/assets/TaskListScreen-BtTYiD21.js +0 -9
  126. package/dist/assets/TaskRoutes-X8P3xHwH.js +0 -9
  127. package/dist/assets/TransactionDetailScreen-CRWTcneH.js +0 -5
  128. package/dist/assets/WiseConfirmationScreen-CIMiBhET.js +0 -12
  129. package/dist/assets/ZeniAccountStatementScreen-DZHjDSg5.js +0 -9
  130. package/dist/assets/epic-BqLIdimv.js +0 -2
  131. package/dist/assets/getLocaleForTenant-CqQ308VG.js +0 -1
  132. package/dist/assets/routePaths-YBRbNv0i.js +0 -1
  133. package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-B3JxpD0o.js +0 -1
  134. package/dist/assets/useAskAiCfoHostNavButtonProps-Dx1w_2sk.js +0 -1
  135. package/dist/assets/useCashManagementBanner-MgmXXc9G.js +0 -1
  136. package/dist/assets/useEmailConnectResultRefresh-CG-YyoOP.js +0 -1
package/dist/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en"><head><meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate"><meta http-equiv="expires" content="0"><meta http-equiv="pragma" content="no-cache"><meta charset="UTF-8"><link rel="icon" type="image/svg+xml" href="/assets/favicon-D56XvgAH.ico"><meta name="ROBOTS" content="NOINDEX, NOFOLLOW"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1"><meta name="theme-color" content="#000000"><meta name="description" content="Zeni - Modern Finance Team For Startups"><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&family=Manrope:wght@200..800&display=swap"><link rel="apple-touch-icon" href="/assets/logo192-CqcTe-t4.png"><link rel="manifest" href="/assets/manifest-icT4lOF5.json"><title>Zeni - Modern Finance Team For Startups</title><script src="/theme-detect.js"></script><style>:root{--logo-color-from:#D4DCDD;--logo-color-to:#E9F0F0;--bar-color-from:#E9F0F0;--bar-color-to:#D4DCDD;--sidebar-bg:#F3F7F7;--main-bg:#FAFCFC;--divider-color:#D4DCDD}html{background-color:#f3f7f7}html[data-theme=dark]{background-color:#1b1c1c;--logo-color-from:#545B5C;--logo-color-to:#3E4343;--bar-color-from:#3E4343;--bar-color-to:#545B5C;--sidebar-bg:#1B1C1C;--main-bg:#202222;--divider-color:#545B5C}.app-shell-loader{position:fixed;inset:0;display:flex;background-color:var(--sidebar-bg);z-index:9999}.app-shell-sidebar{width:210px;flex-shrink:0;background-color:var(--sidebar-bg);padding:16px 16px 0;display:flex;flex-direction:column;gap:36px;border-right:1px solid var(--divider-color);box-sizing:border-box}.app-shell-sidebar-group{display:flex;flex-direction:column;gap:10px}.app-shell-bar{height:10px;border-radius:5px;background-color:var(--bar-color-from);animation:app-shell-bar-shimmer 1.6s linear infinite}.app-shell-navbar{height:56px;display:flex;flex-direction:row;border-bottom:1px solid var(--divider-color);padding:0 32px;align-items:center;justify-content:space-between;box-sizing:border-box}@keyframes app-shell-bar-shimmer{0%,100%{background-color:var(--bar-color-from)}50%{background-color:var(--bar-color-to)}}.app-shell-main{flex:1;background-color:var(--main-bg)}.app-shell-logo{display:inline-flex;width:100%;height:calc(100vh - 56px);justify-content:center;align-items:center}.app-shell-logo svg path{animation:app-shell-color-cycle 1.6s linear infinite}@keyframes app-shell-color-cycle{0%,100%{fill:var(--logo-color-from)}50%{fill:var(--logo-color-to)}}@media (max-width:899px){.app-shell-sidebar{display:none}.app-shell-main{background-color:var(--sidebar-bg)}}</style><noscript><style>.app-shell-loader{display:none}</style></noscript><script async type="module" crossorigin src="/assets/index-Dy73EgcO.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-D58SEIt0.js"><link rel="modulepreload" crossorigin href="/assets/core-0WK0Zss8.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-Bx_bp9Xr.js"><link rel="modulepreload" crossorigin href="/assets/mui-NHWzIwJg.js"><link rel="modulepreload" crossorigin href="/assets/analytics-1WMvk5Rb.js"><link rel="modulepreload" crossorigin href="/assets/utils-CHGPa257.js"><link rel="stylesheet" crossorigin href="/assets/index-Czu7h9lW.css"></head><body style="margin:0"><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><div class="app-shell-loader" id="app-shell-loader"><div class="app-shell-sidebar"><div class="app-shell-sidebar-group"><div class="app-shell-bar zeni-logo" style="width:96px;height:20px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:78px;height:16px"></div><div class="app-shell-bar" style="width:46px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:110px;height:16px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div><div class="app-shell-bar" style="width:64px;height:16px"></div></div></div><div class="app-shell-main"><div class="app-shell-navbar"><div class="app-shell-bar" style="width:106px;height:27px"></div><div class="app-shell-bar" style="width:111px;height:32px"></div></div><div class="app-shell-logo"><svg width="96" height="96" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.768 0.0270284C16.571 -0.055168 16.348 0.0572476 16.2913 0.267574C16.2713 0.342517 16.2489 0.417461 16.2253 0.491196C16.0094 1.15723 15.6459 1.76645 15.148 2.27776C14.3056 3.14203 13.1847 3.61949 11.9918 3.6207H11.9883C10.7978 3.6207 9.67689 3.14565 8.83445 2.2838C8.33653 1.7737 7.97077 1.16448 7.75367 0.499657C7.73007 0.425922 7.70765 0.350979 7.68641 0.276035C7.62978 0.065709 7.40678 -0.0454978 7.20974 0.0366985C6.05463 0.522624 4.98565 1.17899 4.0323 1.97436C3.91195 2.07468 3.87301 2.24512 3.93083 2.39259C3.9792 2.51589 4.03112 2.63797 4.08539 2.75764C4.51133 3.70894 5.10364 4.5853 5.84815 5.34682C7.48937 7.0246 9.66863 7.9493 11.9871 7.9493H11.9954C14.3162 7.94689 16.4978 7.01855 18.1379 5.33595C18.8812 4.57321 19.4711 3.69564 19.8959 2.74434C19.9502 2.62347 20.0009 2.50138 20.0493 2.37809C20.1071 2.23062 20.0682 2.06018 19.9478 1.95985C18.9933 1.16569 17.9231 0.511745 16.768 0.0270284Z"/><path d="M19.9102 21.2422C19.4843 20.2933 18.8931 19.4194 18.151 18.6603C16.5086 16.9801 14.3223 16.053 12.0038 16.0578C8.50304 16.0614 5.48371 18.1961 4.11031 21.2603C4.05722 21.38 4.0053 21.5009 3.95575 21.623C3.89675 21.7704 3.93569 21.9421 4.05722 22.0436C5.01175 22.8366 6.08073 23.4893 7.23466 23.9728C7.4317 24.055 7.65352 23.9438 7.71134 23.7335C7.73139 23.6573 7.75381 23.5836 7.77859 23.5086C8.37207 21.6979 10.0416 20.3888 12.0073 20.3864H12.012C13.2025 20.3864 14.3234 20.8614 15.1659 21.7233C15.6626 22.231 16.026 22.8378 16.2431 23.5002C16.2679 23.5739 16.2903 23.6489 16.3104 23.7238C16.3682 23.9341 16.59 24.0453 16.787 23.9619C17.9422 23.476 19.01 22.8209 19.9633 22.0255C20.0837 21.9252 20.1226 21.7535 20.0648 21.606C20.0164 21.4828 19.9645 21.3631 19.9102 21.2422Z"/><path d="M0.132148 10.1666C0.158105 9.98769 0.305591 9.85352 0.482575 9.85352L23.5093 9.81726C23.6863 9.81726 23.8338 9.95022 23.8609 10.1291C23.9518 10.7347 23.999 11.3548 23.999 11.9858C24.0001 12.6131 23.9541 13.2284 23.8668 13.8292C23.8408 14.0081 23.6934 14.1422 23.5164 14.1422L0.489654 14.1773C0.312671 14.1773 0.165185 14.0443 0.138047 13.8654C0.0471956 13.2598 0 12.6397 0 12.0088C0 11.3826 0.0448358 10.7673 0.132148 10.1666Z"/></svg></div></div></div></body></html>
1
+ <!DOCTYPE html><html lang="en"><head><meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate"><meta http-equiv="expires" content="0"><meta http-equiv="pragma" content="no-cache"><meta charset="UTF-8"><link rel="icon" type="image/svg+xml" href="/assets/favicon-D56XvgAH.ico"><meta name="ROBOTS" content="NOINDEX, NOFOLLOW"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1"><meta name="theme-color" content="#000000"><meta name="description" content="Zeni - Modern Finance Team For Startups"><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&family=Manrope:wght@200..800&display=swap"><link rel="apple-touch-icon" href="/assets/logo192-CqcTe-t4.png"><link rel="manifest" href="/assets/manifest-icT4lOF5.json"><title>Zeni - Modern Finance Team For Startups</title><script src="/theme-detect.js"></script><style>:root{--logo-color-from:#D4DCDD;--logo-color-to:#E9F0F0;--bar-color-from:#E9F0F0;--bar-color-to:#D4DCDD;--sidebar-bg:#F3F7F7;--main-bg:#FAFCFC;--divider-color:#D4DCDD}html{background-color:#f3f7f7}html[data-theme=dark]{background-color:#1b1c1c;--logo-color-from:#545B5C;--logo-color-to:#3E4343;--bar-color-from:#3E4343;--bar-color-to:#545B5C;--sidebar-bg:#1B1C1C;--main-bg:#202222;--divider-color:#545B5C}.app-shell-loader{position:fixed;inset:0;display:flex;background-color:var(--sidebar-bg);z-index:9999}.app-shell-sidebar{width:210px;flex-shrink:0;background-color:var(--sidebar-bg);padding:16px 16px 0;display:flex;flex-direction:column;gap:36px;border-right:1px solid var(--divider-color);box-sizing:border-box}.app-shell-sidebar-group{display:flex;flex-direction:column;gap:10px}.app-shell-bar{height:10px;border-radius:5px;background-color:var(--bar-color-from);animation:app-shell-bar-shimmer 1.6s linear infinite}.app-shell-navbar{height:56px;display:flex;flex-direction:row;border-bottom:1px solid var(--divider-color);padding:0 32px;align-items:center;justify-content:space-between;box-sizing:border-box}@keyframes app-shell-bar-shimmer{0%,100%{background-color:var(--bar-color-from)}50%{background-color:var(--bar-color-to)}}.app-shell-main{flex:1;background-color:var(--main-bg)}.app-shell-logo{display:inline-flex;width:100%;height:calc(100vh - 56px);justify-content:center;align-items:center}.app-shell-logo svg path{animation:app-shell-color-cycle 1.6s linear infinite}@keyframes app-shell-color-cycle{0%,100%{fill:var(--logo-color-from)}50%{fill:var(--logo-color-to)}}@media (max-width:899px){.app-shell-sidebar{display:none}.app-shell-main{background-color:var(--sidebar-bg)}}</style><noscript><style>.app-shell-loader{display:none}</style></noscript><script async type="module" crossorigin src="/assets/index-D7tfVykC.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-qwy54zvC.js"><link rel="modulepreload" crossorigin href="/assets/core-CnGMK-sC.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-NrbJoBOX.js"><link rel="modulepreload" crossorigin href="/assets/mui-CggbPNN2.js"><link rel="modulepreload" crossorigin href="/assets/analytics-DhULAPA0.js"><link rel="modulepreload" crossorigin href="/assets/utils-5Fz6z6US.js"><link rel="stylesheet" crossorigin href="/assets/index-Czu7h9lW.css"></head><body style="margin:0"><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><div class="app-shell-loader" id="app-shell-loader"><div class="app-shell-sidebar"><div class="app-shell-sidebar-group"><div class="app-shell-bar zeni-logo" style="width:96px;height:20px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:78px;height:16px"></div><div class="app-shell-bar" style="width:46px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:110px;height:16px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div><div class="app-shell-bar" style="width:64px;height:16px"></div></div></div><div class="app-shell-main"><div class="app-shell-navbar"><div class="app-shell-bar" style="width:106px;height:27px"></div><div class="app-shell-bar" style="width:111px;height:32px"></div></div><div class="app-shell-logo"><svg width="96" height="96" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.768 0.0270284C16.571 -0.055168 16.348 0.0572476 16.2913 0.267574C16.2713 0.342517 16.2489 0.417461 16.2253 0.491196C16.0094 1.15723 15.6459 1.76645 15.148 2.27776C14.3056 3.14203 13.1847 3.61949 11.9918 3.6207H11.9883C10.7978 3.6207 9.67689 3.14565 8.83445 2.2838C8.33653 1.7737 7.97077 1.16448 7.75367 0.499657C7.73007 0.425922 7.70765 0.350979 7.68641 0.276035C7.62978 0.065709 7.40678 -0.0454978 7.20974 0.0366985C6.05463 0.522624 4.98565 1.17899 4.0323 1.97436C3.91195 2.07468 3.87301 2.24512 3.93083 2.39259C3.9792 2.51589 4.03112 2.63797 4.08539 2.75764C4.51133 3.70894 5.10364 4.5853 5.84815 5.34682C7.48937 7.0246 9.66863 7.9493 11.9871 7.9493H11.9954C14.3162 7.94689 16.4978 7.01855 18.1379 5.33595C18.8812 4.57321 19.4711 3.69564 19.8959 2.74434C19.9502 2.62347 20.0009 2.50138 20.0493 2.37809C20.1071 2.23062 20.0682 2.06018 19.9478 1.95985C18.9933 1.16569 17.9231 0.511745 16.768 0.0270284Z"/><path d="M19.9102 21.2422C19.4843 20.2933 18.8931 19.4194 18.151 18.6603C16.5086 16.9801 14.3223 16.053 12.0038 16.0578C8.50304 16.0614 5.48371 18.1961 4.11031 21.2603C4.05722 21.38 4.0053 21.5009 3.95575 21.623C3.89675 21.7704 3.93569 21.9421 4.05722 22.0436C5.01175 22.8366 6.08073 23.4893 7.23466 23.9728C7.4317 24.055 7.65352 23.9438 7.71134 23.7335C7.73139 23.6573 7.75381 23.5836 7.77859 23.5086C8.37207 21.6979 10.0416 20.3888 12.0073 20.3864H12.012C13.2025 20.3864 14.3234 20.8614 15.1659 21.7233C15.6626 22.231 16.026 22.8378 16.2431 23.5002C16.2679 23.5739 16.2903 23.6489 16.3104 23.7238C16.3682 23.9341 16.59 24.0453 16.787 23.9619C17.9422 23.476 19.01 22.8209 19.9633 22.0255C20.0837 21.9252 20.1226 21.7535 20.0648 21.606C20.0164 21.4828 19.9645 21.3631 19.9102 21.2422Z"/><path d="M0.132148 10.1666C0.158105 9.98769 0.305591 9.85352 0.482575 9.85352L23.5093 9.81726C23.6863 9.81726 23.8338 9.95022 23.8609 10.1291C23.9518 10.7347 23.999 11.3548 23.999 11.9858C24.0001 12.6131 23.9541 13.2284 23.8668 13.8292C23.8408 14.0081 23.6934 14.1422 23.5164 14.1422L0.489654 14.1773C0.312671 14.1773 0.165185 14.0443 0.138047 13.8654C0.0471956 13.2598 0 12.6397 0 12.0088C0 11.3826 0.0448358 10.7673 0.132148 10.1666Z"/></svg></div></div></div></body></html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/web-app-ui",
3
- "version": "5.1.99-qa",
3
+ "version": "5.2.0-qa",
4
4
  "files": [
5
5
  "dist/**/*"
6
6
  ],
@@ -28,8 +28,8 @@
28
28
  "@sentry/react": "^9.42.1",
29
29
  "@stripe/stripe-js": "^4.4.0",
30
30
  "@zeniai/client-analytics": "2.0.32",
31
- "@zeniai/client-epic-state": "5.1.27",
32
- "@zeniai/web-components": "4.2.19",
31
+ "@zeniai/client-epic-state": "5.1.28",
32
+ "@zeniai/web-components": "4.2.20",
33
33
  "color": "3.1.3",
34
34
  "cross-fetch": "^4.0.0",
35
35
  "crypto-js": "4.2.0",
@@ -1 +0,0 @@
1
- import{j as e}from"./liveblocks-tpE-grBU.js";import{A as d}from"./AddressScreen-CBnElFxM.js";import i from"./NotFoundScreen-BUpSeNgf.js";import"./sentry-D58SEIt0.js";import{o as s,p as r}from"./core-0WK0Zss8.js";import"./zeni-epic-state-Bx_bp9Xr.js";import"./recharts-CUzwcISX.js";import"./index-Dy73EgcO.js";import"./mui-NHWzIwJg.js";import"./analytics-1WMvk5Rb.js";import"./plaid-59NT4aqa.js";import"./dnd-Dwsdp5ty.js";import"./stripe-cKAAJElX.js";import"./lottie-dQMhiLBj.js";import"./lexical-B9WqgH9H.js";import"./pdf-C4fX1mA3.js";import"./utils-CHGPa257.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="cd0ff2b4-1e27-4329-addf-f475e5a9db34",t._sentryDebugIdIdentifier="sentry-dbid-cd0ff2b4-1e27-4329-addf-f475e5a9db34")}catch{}})();function _(){return e.jsxs(s,{children:[e.jsx(r,{path:"/edit/:addressType/:addressId",element:e.jsx(d,{})}),e.jsx(r,{path:"/new/:addressType",element:e.jsx(d,{})}),e.jsx(r,{path:"*",element:e.jsx(i,{})})]})}export{_ as default};
@@ -1,22 +0,0 @@
1
- import{j as c}from"./liveblocks-tpE-grBU.js";import{a as r}from"./sentry-D58SEIt0.js";import{u as xe,h as Pe,g as we,j as Z,i as ye,n as Ee}from"./core-0WK0Zss8.js";import{Z as Te,dd as ve,z as Ae,m as Qe,de as _e,df as Oe,bb as J,dg as se,dh as Ue,ba as ae,q as V,D as B,d as I,di as R,dj as je,dk as Le,a3 as De,f as Fe,a9 as Be,dl as Re,dm as Me,a4 as Ve,dn as $e,dp as Ge,dq as qe,r as Ne,b6 as We,dr as ze}from"./index-Dy73EgcO.js";import{gl as He,eW as oe,eX as Ye,iA as Ke,T_ as Xe,fq as Ze,iK as Je,iG as et,eY as M,fx as tt,g6 as st,f$ as at,g3 as ee,g7 as ot,g8 as nt,g9 as it,ga as rt,gb as lt}from"./zeni-epic-state-Bx_bp9Xr.js";import{D as dt,n as k,S as ct,P as ut}from"./mui-NHWzIwJg.js";import{u as mt}from"./useAiCfoDashboardSuggestedQuestionsChips-B3JxpD0o.js";import{p as pt}from"./pathToGoBack-BmJj5cme.js";import"./recharts-CUzwcISX.js";import"./analytics-1WMvk5Rb.js";import"./plaid-59NT4aqa.js";import"./dnd-Dwsdp5ty.js";import"./stripe-cKAAJElX.js";import"./lottie-dQMhiLBj.js";import"./lexical-B9WqgH9H.js";import"./pdf-C4fX1mA3.js";import"./utils-CHGPa257.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="cd046674-be5e-4a30-94d7-b413dd61961d",e._sentryDebugIdIdentifier="sentry-dbid-cd046674-be5e-4a30-94d7-b413dd61961d")}catch{}})();const ne="chat-response-generated",ht=Ee((function(e,o){const t=oe(e),u=o.isSubmitting,s=t.uiState?.currentChatSessionId,h=s!=null?tt(e.aiCfoState,s):[],S=Me(e,{allUsers:o.allUsers,onCardPolicyVendorSearchTextChange:o.onCardPolicyVendorSearchTextChange});return{showSampleQuestions:o.sessionFromUrl==="explore"&&t.uiState.currentChatSessionId==null,aiCfoView:t,isSubmitting:u,isNewChatSession:o.sessionFromUrl==="new_chat"||o.sessionFromUrl==="explore",isFullView:!0,tableDownloadEndPoint:`${Ve}/tableDownload`,emailLinkQuestion:o.emailLinkQuestion,autoSubmitEmailLinkQuestion:o.autoSubmitEmailLinkQuestion,onEmailLinkQuestionProcessed:o.onEmailLinkQuestionProcessed,routedInitialQuestionSource:o.routedInitialQuestionSource,routedInitialQuestionSuggestionIndex:o.routedInitialQuestionSuggestionIndex,exploreSuggestedPromptQuestions:o.exploreSuggestedPromptQuestions,exploreSuggestedPromptQuestionsLoading:o.exploreSuggestedPromptQuestionsLoading,isFileUploadEnabled:o.isFileUploadEnabled,isUploadPromoVisible:o.isUploadPromoVisible,onUploadPromoClose:o.onUploadPromoClose,syntheticAnswers:h,resolveSyntheticAnswerCardTile:Ge(e),resolveSyntheticAnswerPolicyTile:$e(e),...S}}),(function(e,o){const{location:t,currentTenant:u,userId:s,navigate:h,currentChatSessionId:S,allSessionsWithOrderedQuestionAnswers:x,isAiCardCreationEnabled:T,isCardPolicyEnabled:v,setIsAiCfoOpen:b}=o,m=u.tenantEmailDomain;return{onEventReceived:(a,l)=>{if(a===ne&&typeof l.text=="string"&&typeof l.metadata=="object"){const d=l,g=nt(d.type),p=d.metadata.chat_session_id??null,{currentChatSession:n,currentQuestionAnswer:P,currentQuestionAnswerSummary:A}=ae(x,p);g!=="answer"?I.trackAICFOChatResponseGenerated(g,P?.question.questionText??"",d.text,p,ze(A,n),d.metadata.message_id??null):I.trackAICFOChatAnswerGenerated(d.text,P?.question.questionText??"",(d.follow_up_questions?.length??0)>0,!!d.assumptions,!!d.insights,d.visualization!=null,it(d.visualization?.type??"")??null,p,d.summarized_title,d.metadata.message_id??null),e(rt({chatSessionId:d.metadata.chat_session_id,responseType:g,fetchState:{fetchState:"Completed",error:void 0}})),e(lt({chatSessionId:d.metadata.chat_session_id,answerPayload:d,userId:s}))}},onSubmit:(a,l,d,g)=>{a&&We(e,a,l,S,x,s,g,d)},updateCurrentInput:a=>{e(ee(a))},onStopSubmit:()=>{},onUpdateScrollYOffset:a=>{e(ot(a))},onSelectSampleQuestion:()=>{},onBackClick:()=>{h(-1)},onCloseClick:()=>{const a=V(t.state?.pathnameStackToGoBack),l=a.poppedPathname??pt(1);h(l,{state:{...t.state,pathnameStackToGoBack:a.newStack}}),e(ee(""))},togglePageView:()=>{const a=V(t.state?.pathnameStackToGoBack),l=a.poppedPathname??`/${u.tenantEmailDomain}/dashboard`;h(l,{state:{...se(t.state),pathnameStackToGoBack:a.newStack,message:"open_ai_cfo_drawer"}}),b(!0)},onCopy:()=>{},onThumbsUp:()=>{},onThumbsDown:()=>{},onTogglePageView:()=>{h(-1)},onNewChatClick:()=>{S!=null&&e(at());const a=Ne(t.state?.pathnameStackToGoBack,t.pathname);h(`/${u.tenantEmailDomain}/ai-cfo/new_chat`,{state:{pathnameStackToGoBack:a.slice(0,-1),referrer:"Sidebar"}})},onToggleCotCollapsed:(a,l)=>{e(st({questionAnswerId:a,isCollapsed:l}))},onMenuClick:o.onMenuClick,...qe(e,{isAiCardCreationEnabled:T,isCardPolicyEnabled:v,currentChatSessionId:S,onAfterCardsCreationSubmit:()=>{b(!0),h(`/${m}/cards`,{state:{...t.state}})},onAfterCardPolicySubmit:()=>{b(!0),h(`/${m}/cards/policy`,{state:{...t.state}})}})}}))(Be(Re)),Dt=({isFileUploadEnabled:e})=>{const{setIsAiCfoOpen:o}=Te(),t=xe(),u=Pe(),s=we(),[h,S]=r.useState(!1),{allUsers:x,isAiCardCreationEnabled:T,isCardPolicyEnabled:v,onCardPolicyVendorSearchTextChange:b}=ve();r.useEffect((()=>{t(He())}),[t]);const m=Z((i=>oe(i))),a=Ae.getSignedInUser(),{session_id:l}=ye(),d=Qe(),g=De(d),p=Z((i=>Ye(i))),n=m.uiState.currentChatSessionId,P=p.tenantEmailDomain,{handleUploadPromoClose:A,isUploadPromoVisible:ie}=_e({isFileUploadEnabled:e,tenantEmailDomain:P}),Q=Oe({currentTenant:p,currentChatSessionId:n,aiCfoView:m}),{isSuggestedQuestionsLoading:re,suggestedPromptQuestions:le}=mt(),w=s.state,y=w?.aiCfoInitialQuestion,$=!!w?.aiCfoShouldSubmit;r.useEffect((()=>{const i=s.state;if(i?.[J]!==!0)return;S(!0);const f={...i};delete f[J],u(s,{replace:!0,state:f})}),[s.pathname,s.search,s.state,u]);const[de,_]=r.useState(null),[ce,O]=r.useState(!1),[ue,U]=r.useState(void 0),[me,j]=r.useState(void 0),G=r.useRef(!1);r.useEffect((()=>{if(!G.current&&y!=null&&y!==""){const i=s.state;_(y),O($),U(i?.aiCfoInitialSubmissionSource!=null?i.aiCfoInitialSubmissionSource:void 0);const f=i?.aiCfoSuggestionIndex;j(typeof f=="number"?f:void 0),G.current=!0}}),[y,$,s.state]);const pe=r.useCallback((()=>{_(null),O(!1),U(void 0),j(void 0),u(s.pathname,{replace:!0,state:se(s.state)})}),[s.pathname,s.state,u]),q=r.useMemo((()=>new URLSearchParams(s.search)),[s.search]),N=q.get("ref")??w?.aiCfoRef,L=q.get("emailRefId")??w?.aiCfoEmailRefId,W=r.useRef(!1);r.useEffect((()=>{W.current||N!=="month-end-email"||L==null||n!=null||a==null||(t(Ke("controller",a.userId,L,"MONTH_END_EMAIL")),W.current=!0)}),[N,L,n,t,a]);const E=m.uiState.lastContextMessage;r.useEffect((()=>{E!=null&&E!==""&&n!=null&&(_(E),O(!0),U(void 0),j(void 0),t(Xe()))}),[E,n,t]);const he=p.masterTOSInfo,C=he?.isMasterTOSAccepted??!1,{visitedSessions:z}=Ue(n),D=m.fetchState,F=m.uiState.chatSessionsNextPageToken.hasMore||!m.uiState.chatSessionsFirstPageFetched,H=n!=null?m.fetchChatSessionHistoryByChatSessionId?.[n]?.fetchState??"Not-Started":"Not-Started",Y=n==null||(m.uiState.chatHistoryNextPageToken[n]?.hasMore??!0),K=m.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:Se}=ae(K,n),ge=Se.length===0;r.useEffect((()=>{C||g||u("../dashboard",{state:{...s.state,message:"open_ai_cfo_drawer"}})}),[C,g,u,s.state]);const fe=r.useCallback((()=>{const i=V(s.state?.pathnameStackToGoBack),f=p.tenantEmailDomain;u(i.poppedPathname??(f!=null?`/${f}/dashboard`:".."),{state:{...s.state,pathnameStackToGoBack:i.newStack}})}),[p.tenantEmailDomain,s.state,u]);r.useEffect((()=>{n!=null&&l!==n&&u(`../ai-cfo/${n}`,{state:{...s.state}})}),[n,l]),r.useEffect((()=>{l!=null&&n==null&&l!=="new_chat"&&l!=="explore"&&t(Ze({sessionId:l,agentId:"controller"}))}),[]);const Ce=r.useMemo((()=>({events:z.map((i=>`private-encrypted-chat-${i}.${ne}`)),eventCallback:(i,f,ke)=>ke.onEventReceived(i,f)})),[z]);r.useEffect((()=>{D!=="In-Progress"&&F&&t(Je())}),[D,F,t]),r.useEffect((()=>{n!=null&&H!=="In-Progress"&&Y&&a!=null&&D==="Completed"&&!F&&t(et(n,a.userId))}),[H,Y,n,a,t]);const X=i=>i.trackAICFOOnboardingScreenStateChanged("open","first_visit");if(a==null||l==null)throw Error("Can't access AI Controller page without signing in...");const be=n!=null&&m.responseStateByChatSessionId?.[n]?.answer?.fetchState==="In-Progress";if(!C&&g)return c.jsxs(gt,{children:[c.jsx(B,{analytics:I,onLoad:X}),Q.drawerElement,c.jsx(ft,{children:c.jsx(te,{children:c.jsx(R,{isTOSAccepted:!1,acceptMasterTOSState:m.masterTOSAcceptanceState,onCloseClick:fe,onCompleteClick:()=>{p.userRoleId!=null&&t(M(p.userRoleId))}})})})]});const Ie=c.jsxs(c.Fragment,{children:[h&&!C?c.jsx(B,{analytics:I,onLoad:X}):null,c.jsx(R,{isTOSAccepted:C,acceptMasterTOSState:m.masterTOSAcceptanceState,showHeader:!1,togglePageView:C?()=>S(!1):void 0,onCloseClick:()=>S(!1),onCompleteClick:()=>{C||p.userRoleId==null||t(M(p.userRoleId)),S(!1)}})]});return c.jsxs(c.Fragment,{children:[c.jsxs(St,{children:[c.jsx(B,{analytics:I,onLoad:i=>i.trackPageLoaded(Fe.Event.aiCFOPage)}),g&&Q.drawerElement,c.jsx(ht,{...Ce,currentChatSessionId:n,allSessionsWithOrderedQuestionAnswers:K,allUsers:x,isAiCardCreationEnabled:T,isCardPolicyEnabled:v,openOnboardingPage:()=>S(!0),userId:a.userId,setIsAiCfoOpen:o,navigate:u,sessionFromUrl:l,location:s,isSubmitting:be,isEmptyChatWithSession:ge,currentTenant:p,emailLinkQuestion:de??void 0,autoSubmitEmailLinkQuestion:ce,onEmailLinkQuestionProcessed:pe,routedInitialQuestionSource:ue,routedInitialQuestionSuggestionIndex:me,onCardPolicyVendorSearchTextChange:b,onMenuClick:g?Q.open:void 0,isFileUploadEnabled:e,isUploadPromoVisible:ie,onUploadPromoClose:A,exploreSuggestedPromptQuestions:le,exploreSuggestedPromptQuestionsLoading:re}),h&&g?c.jsx(dt,{anchor:"right",open:h,transitionDuration:250,PaperProps:{component:Ct,style:{width:"100%"}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>S(!1),children:c.jsx(te,{onClick:i=>i.stopPropagation(),children:c.jsx(R,{isTOSAccepted:C,acceptMasterTOSState:m.masterTOSAcceptanceState,onCloseClick:()=>S(!1),onCompleteClick:()=>{C||p.userRoleId==null||t(M(p.userRoleId)),S(!1)}})})}):null]}),h&&!g?c.jsx(je,{open:h,onClose:()=>S(!1),children:c.jsx(Le,{children:Ie})}):null]})},te=k(ct)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,St=k.div`
6
- height: 100vh;
7
- width: 100%;
8
- `,gt=k.div`
9
- height: 100vh;
10
- width: 100%;
11
- display: flex;
12
- flex-direction: column;
13
- min-height: 0;
14
- `,ft=k.div`
15
- flex: 1;
16
- min-height: 0;
17
- display: flex;
18
- flex-direction: column;
19
- `,Ct=k(ut)`
20
- box-shadow: ${({theme:e})=>e.colors.elevation2};
21
- color: ${({theme:e})=>e.colors.grey4};
22
- `;export{Dt as default};
@@ -1,11 +0,0 @@
1
- import{j as g}from"./liveblocks-tpE-grBU.js";import{a}from"./sentry-D58SEIt0.js";import{u as D,g as v,j as m,N as w}from"./core-0WK0Zss8.js";import{LZ as A,eX as O,g1 as _,oc as j,gs as h,g0 as L,fA as U,M4 as F}from"./zeni-epic-state-Bx_bp9Xr.js";import{u as $,z as c,L as C,a as k,o as H}from"./index-Dy73EgcO.js";import{n as z}from"./mui-NHWzIwJg.js";import{t as R}from"./getLocaleForTenant-CqQ308VG.js";import{g as P,Q as G}from"./QBOConnectionScreen-BOAmyhRI.js";import"./recharts-CUzwcISX.js";import"./analytics-1WMvk5Rb.js";import"./plaid-59NT4aqa.js";import"./dnd-Dwsdp5ty.js";import"./stripe-cKAAJElX.js";import"./lottie-dQMhiLBj.js";import"./lexical-B9WqgH9H.js";import"./pdf-C4fX1mA3.js";import"./utils-CHGPa257.js";import"./empty-o2YkWI97.js";import"./pdf-lib-CxgB1_73.js";import"./index-CqKRE3AP.js";import"./url-wdUk7Rbg.js";import"./index-CmH-4r8j.js";import"./decodeURIComponentSafe-DYdex7Fp.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]="71e2bed2-df1c-4e28-90dd-a536ae15ca18",t._sentryDebugIdIdentifier="sentry-dbid-71e2bed2-df1c-4e28-90dd-a536ae15ca18")}catch{}})();const M=z.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 ${H.sp1} ${t.theme.colors.dropShadowNormal}`};
11
- `;function pe(){const t=D(),i=v(),{setLoading:d,clearAllLoading:x}=$(),p=a.useRef(!1),f=a.useRef(!1),{code:b,realmId:T,state:y}=P(i.search),N=b!==""&&T!==""&&y!=="",I=m((l=>A(l))),e=m((l=>O(l))),n=m((l=>l.tenantState.fetchState)),r=m((l=>l.tenantState.activeTenantFetchState.fetchState)),o=c.getSignedInUser(),u=c.getActiveTenantForUser()?.tenantId,s=e?.externalConnections?.fetchState,E=e?.externalConnections?.saveConnectionState,S=e.externalConnections?.accounting[0]?.isValid;return a.useLayoutEffect((()=>{d(C.CONNECTION_AUTH)}),[d]),a.useEffect((()=>{p.current||o==null||u==null||(p.current=!0,n==="Completed"||r!=="Not-Started"&&r!=="Error"||(d(C.TENANT_FETCHING),t(_(o.userId,u))))}),[p,n,d]),a.useEffect((()=>{e.tenantId==null&&!f.current&&o!=null&&(f.current=!0,!(u==null||u!=null&&(r==="Completed"||r==="Error"))||n!=="Not-Started"&&n!=="Error"||t(j(o.userId)))}),[f,n,r]),a.useEffect((()=>{o==null||e?.tenantId==null||e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||s==="In-Progress"||E!=="Error"||(d(C.CONNECTION_AUTH),t(h(o.userId,e.tenantId)))}),[E]),a.useEffect((()=>{n!=="Completed"&&r!=="Completed"||o==null||e?.tenantId==null||(t(L(e.tenantId)),c.saveActiveTenantDomainForUser(e.tenantEmailDomain),U(o?.userId,o?.zeniSessionId,e.tenantId),k.updateAppLocaleID(R(F(e))),e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||s==="In-Progress"||o==null||e==null||t(h(o.userId,e.tenantId)))}),[n,r,s]),a.useEffect((()=>{I.tenantsCoreDetailsInOrder.length>0&&n==="Completed"&&c.saveSignedInUserTenants(I.tenantsCoreDetailsInOrder)}),[I.tenantsCoreDetailsInOrder.length,n]),a.useEffect((()=>{n!=="Completed"&&n!=="Error"||r!=="Completed"&&r!=="Error"||s!=="Completed"&&s!=="Error"||x()}),[n,r,s]),e==null||n!=="Completed"&&r!=="Completed"||s!=="Completed"?null:N||S===!1?g.jsx(M,{children:g.jsx(G,{})}):g.jsx(w,{to:"/",replace:!0})}export{pe as default};
@@ -1 +0,0 @@
1
- import{j as i}from"./liveblocks-tpE-grBU.js";import{z as n}from"./index-Dy73EgcO.js";import{g as d}from"./QBOConnectionScreen-BOAmyhRI.js";import"./sentry-D58SEIt0.js";import{g as p,N as s}from"./core-0WK0Zss8.js";import"./zeni-epic-state-Bx_bp9Xr.js";import"./recharts-CUzwcISX.js";import"./mui-NHWzIwJg.js";import"./analytics-1WMvk5Rb.js";import"./plaid-59NT4aqa.js";import"./dnd-Dwsdp5ty.js";import"./stripe-cKAAJElX.js";import"./lottie-dQMhiLBj.js";import"./lexical-B9WqgH9H.js";import"./pdf-C4fX1mA3.js";import"./utils-CHGPa257.js";import"./empty-o2YkWI97.js";import"./pdf-lib-CxgB1_73.js";import"./index-CqKRE3AP.js";import"./url-wdUk7Rbg.js";import"./index-CmH-4r8j.js";import"./decodeURIComponentSafe-DYdex7Fp.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="817363c8-7f1d-4590-b58b-cef70b99ca15",t._sentryDebugIdIdentifier="sentry-dbid-817363c8-7f1d-4590-b58b-cef70b99ca15")}catch{}})();const U=()=>{const t=p(),{code:o,realmId:r,state:e}=d(t.search),m=n.getSignedInUser()?.userId??"";if(f(o,r,e,m)===!0){const a=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return i.jsx(s,{to:a})}return i.jsx(s,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
@@ -1,18 +0,0 @@
1
- import{j as l}from"./liveblocks-tpE-grBU.js";import{h as w,g as C,j as h,n as A,i as B}from"./core-0WK0Zss8.js";import{Q7 as k,Qe as _,gh as q,gg as W,gf as X,jx as J,Ne as K,rw as L,eX as D,PF as V,jv as F,Q8 as v,Qh as T,jt as j,jQ as G}from"./zeni-epic-state-Bx_bp9Xr.js";import{bB as M,m as N,C as R,z as U,y as Q,q as p,G as S,B as O,bC as Y,o as Z,bD as ee,r as te}from"./index-Dy73EgcO.js";import{n as z}from"./mui-NHWzIwJg.js";import"./sentry-D58SEIt0.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7fb12b6e-6f17-4e2a-bd77-6a039aa6835c",e._sentryDebugIdIdentifier="sentry-dbid-7fb12b6e-6f17-4e2a-bd77-6a039aa6835c")}catch{}})();const ne=A(null,(function(e,t){return{onSaveVendor:n=>{e(J(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(K("common")),n!=null&&e(L(n))},onGetOtp:n=>{e(X(n,"BillPayVendor"))},onResendOtp:n=>{e(W(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(q(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(_(n,a,o))}}}))(M);function H({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h((i=>k(i,e)));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=z.div`
2
- display: flex;
3
- height: 100vh;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `,oe=A((function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=V(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}}),(function(e,t){const{navigate:n,location:a,vendorId:o}=t;return{onFetchBankName:s=>{e(G(s))},onSaveHandler:s=>{e(j(t.bankAccountContext,s,"standard",o))},onCancel:()=>{(()=>{const s=p(a.state?.pathnameStackToGoBack),i=s.poppedPathname??E();n(i,{state:{pathnameStackToGoBack:s.newStack}})})(),e(v())},onACHDetailsUpdated:s=>{const{bankAccountSection:i}=s;e(T({data:i}))},onBackClick:()=>{if(e(F({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")n("../",{relative:"path"});else{const s=p(t.location.state?.pathnameStackToGoBack),i=s.poppedPathname??E(0);t.navigate(i,{state:{pathnameStackToGoBack:s.newStack}})}e(v())}}}))(Y);function fe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=N(),{vendorId:s,billId:i}=B(),d=e??s,{useFeatureGate:r}=R(),c=U.getSignedInUser(),b=h((u=>D(u))),g=Q(),x=p(a.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h((u=>k(u,d))),{isFeatureEnabled:I}=r(S.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=r(S.isDepositAccountsFeatureEnabled);if(c==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(O,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:g.colors.grey5}}):l.jsxs(ae,{windowSize:o,children:[l.jsx(H,{vendorId:d,billId:i}),l.jsx(oe,{location:a,navigate:n,billId:i,vendorId:d,currentTenant:b,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const E=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},me=(e,t,n)=>{let a=`/${e}/bill/${encodeURIComponent(t)}`;return n=="draft"&&(a+="/edit"),a},he=e=>`/${e}/bills`,ke=(e,t)=>{let n=`/${e}/bill`;return n=t!=null?n.concat(`/${t}/edit`):n.concat("/new"),n},P=(e,t,n,a)=>{let o=`/${e}/bill`;return o+=n!=null?`/${n}/edit/vendor`:"/new/vendor",o+=a!=null?`/${a}/edit/${t}`:`/create/${t}`,o};function ve(e,t,n){return P(e,"ach",t,n)}function Se(e,t,n){return P(e,"domestic",t,n)}function ge(e,t,n){return P(e,"international",t,n)}const se=(e,t,n)=>{let a=`/${e}/bill/`;return a=n!=null?a.concat(`${encodeURIComponent(n)}/${t}/`):a.concat(`new/${t}/`),a},re=z.div`
10
- display: flex;
11
- height: 100vh;
12
- width: 100%;
13
- flex: 1 1 auto;
14
- flex-direction: column;
15
- align-items: center;
16
- background-color: ${e=>e.theme.colors.grey4};
17
- box-shadow: ${e=>`0px 2px ${Z.sp1} ${e.theme.colors.dropShadowNormal}`};
18
- `,ie=A((function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=V(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}}),(function(e,t){const{billId:n,navigate:a,location:o,vendorId:s,currentTenant:i}=t,{tenantEmailDomain:d}=i;return{onFetchBankName:r=>{e(G(r))},onSaveHandler:r=>{e(j(t.bankAccountContext,r,"us-domestic",s))},onWireDetailsUpdated:r=>{const{bankAccountSection:c}=r;e(T({data:c}))},onCancel:()=>{(()=>{const r=p(o.state?.pathnameStackToGoBack),c=r.poppedPathname??$();a(c,{state:{pathnameStackToGoBack:r.newStack}})})(),e(v())},onAddressClick:r=>{if(t.bankAccountContext==="express-pay")a("./add-address");else{const c=se(d,r,n),b=te(o.state?.pathnameStackToGoBack,o.pathname);a(c,{state:{pathnameStackToGoBack:b}})}},onBackClick:()=>{if(e(F({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")a("../",{relative:"path"});else{const r=p(t.location.state?.pathnameStackToGoBack),c=r.poppedPathname??$(0);t.navigate(c,{state:{pathnameStackToGoBack:r.newStack}})}e(v())}}}))(ee);function xe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=N(),{vendorId:s,billId:i}=B(),d=e??s,r=U.getSignedInUser(),{useFeatureGate:c}=R(),b=Q(),g=h((u=>D(u))),x=p(a.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h((u=>k(u,d))),{isFeatureEnabled:I}=c(S.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=c(S.isDepositAccountsFeatureEnabled);if(r==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(O,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:b.colors.grey5,boxShadow:`0px 2px ${Z.sp1} ${b.colors.dropShadowNormal}`}}):l.jsxs(re,{windowSize:o,children:[l.jsx(H,{vendorId:d,billId:i}),l.jsx(ie,{location:a,navigate:n,billId:i,vendorId:d,currentTenant:g,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const $=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t};export{fe as A,xe as D,H as V,me as a,se as b,ke as c,Se as d,he as g,ge as i,ve as v};
@@ -1 +0,0 @@
1
- import{j as i}from"./liveblocks-tpE-grBU.js";import{m as l,E as c,y as f}from"./index-Dy73EgcO.js";import{D as b}from"./mui-NHWzIwJg.js";import"./sentry-D58SEIt0.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="03cb08a8-d655-48ca-b2a4-91d9e047b0a5",e._sentryDebugIdIdentifier="sentry-dbid-03cb08a8-d655-48ca-b2a4-91d9e047b0a5")}catch{}})();const p={drawerLeftMargin:new c(0,0,240)};function m(e){const{isOpen:r,drawerLeftMargin:o,children:n,onClose:t}=e,a=l(),s=o?.valuePx(a)??p.drawerLeftMargin.valuePx(a),d=f();return i.jsx(b,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.8,cursor:"pointer"}}},onClose:t,children:n})}export{m as D};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-tpE-grBU.js";import{a as d}from"./sentry-D58SEIt0.js";import{h as A,u as B,g as q,i as G,j as l,N as O,n as F,o as K,p as _}from"./core-0WK0Zss8.js";import{Om as z,eX as M,NK as R,lA as W,Kf as I,Or as X,Nd as Y,kA as $,Kg as S,NP as Q,NQ as V,Nf as H,Ne as J}from"./zeni-epic-state-Bx_bp9Xr.js";import{aX as L,d as U,q as Z,r as tt}from"./index-Dy73EgcO.js";import"./mui-NHWzIwJg.js";import{d as k}from"./decodeURIComponentSafe-DYdex7Fp.js";import{w as et}from"./withTransactionSidePanel-BsJ58rSa.js";import{f as at,c as nt}from"./routePaths-YBRbNv0i.js";import"./recharts-CUzwcISX.js";import"./analytics-1WMvk5Rb.js";import"./plaid-59NT4aqa.js";import"./dnd-Dwsdp5ty.js";import"./stripe-cKAAJElX.js";import"./lottie-dQMhiLBj.js";import"./lexical-B9WqgH9H.js";import"./pdf-C4fX1mA3.js";import"./utils-CHGPa257.js";import"./useAskAiCfoHostNavButtonProps-Dx1w_2sk.js";import"./TransactionDetailScreen-CRWTcneH.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]="4d2de6c3-1a70-4b46-9fd7-89ba9d927df3",a._sentryDebugIdIdentifier="sentry-dbid-4d2de6c3-1a70-4b46-9fd7-89ba9d927df3")}catch{}})();const ot=F((function(a,t){const e=t.entity,o=X(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:Y(a,"common")},trendWithTransactionsReport:o,analytics:U,isAccountingClassesEnabled:$(a)}}),(function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,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(Q()),a(V()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??b();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(I(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(L),it=et((function({entityType:a,...t}){const e=A(),o=B(),c=q(),[m,T]=d.useState(!1),[h,g]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:N,entityNameEncoded:w}=G(),r=k(N??""),f=k(w??""),p=rt(r,f),x=[r,f].filter((n=>n!=null)),i={name:f,id:r,type:a,zeniId:r,qboId:r},D=l((n=>z(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),j=l((n=>M(n).company?.companyInfo.firstMonthOfFY??1)),u=l((n=>R(n.trendWithTransactionsState,i,"EntityDetail")));d.useEffect((()=>{m===!1&&p===!0&&(T(!0),o(W(i)))}),[m,p,i]);const P=l((n=>n.trendState.fetchState)),E=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&&P==="Completed"&&(g(!0),E!=null&&o(I(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:E})))}),[m,h,P]),p?s.jsx(ot,{firstMonthOfFY:j,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:v,resetTrendIsFetchedStates:()=>{T(!1),g(!1)},...t}):s.jsx(O,{to:b(x.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 Nt({entityType:a}){return s.jsx(K,{children:s.jsx(_,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{Nt as EntityDetailRoutes,Nt as default};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-tpE-grBU.js";import{a as r}from"./sentry-D58SEIt0.js";import{a5 as c,a6 as l,a7 as p,q as b}from"./index-Dy73EgcO.js";import"./mui-NHWzIwJg.js";import m from"./NotFoundScreen-BUpSeNgf.js";import{h as f,g as u}from"./core-0WK0Zss8.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]="527d9e25-3d01-4280-b0c1-0c01931b4bab",e._sentryDebugIdIdentifier="sentry-dbid-527d9e25-3d01-4280-b0c1-0c01931b4bab")}catch{}})();const _=()=>{const e=f(),a=u(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),d=r.useCallback((()=>{(()=>{const n=b(a.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=c(a.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:d}):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-D58SEIt0.js";import{u as f,h as l,g as m}from"./core-0WK0Zss8.js";import{ht as p,Ml as g,Mm as b}from"./zeni-epic-state-Bx_bp9Xr.js";import{u as _,L as h,z as y}from"./index-Dy73EgcO.js";import"./liveblocks-tpE-grBU.js";import"./recharts-CUzwcISX.js";import"./mui-NHWzIwJg.js";import"./analytics-1WMvk5Rb.js";import"./plaid-59NT4aqa.js";import"./dnd-Dwsdp5ty.js";import"./stripe-cKAAJElX.js";import"./lottie-dQMhiLBj.js";import"./lexical-B9WqgH9H.js";import"./pdf-C4fX1mA3.js";import"./utils-CHGPa257.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]="a30d8833-bf4b-4f5a-8a9b-01c95902a64f",e._sentryDebugIdIdentifier="sentry-dbid-a30d8833-bf4b-4f5a-8a9b-01c95902a64f")}catch{}})();function R(){const e=f(),n=l(),o=m(),{setLoading:i,clearAllLoading:d}=_(),a=r.useRef(!1);return r.useLayoutEffect((()=>{i(h.CONNECTION_AUTH)}),[i]),r.useEffect((()=>{if(a.current)return;a.current=!0;const s=new URLSearchParams(o.search).get("code"),u=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),s!=null&&u!=null){const t=JSON.parse(u);e(p(t.tenant_id,t.connection_id,g("revenue"),b("hubspot"),{authorization_code:s,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}d();const c=y.getActiveTenantForUser();n(c?.tenantEmailDomain!=null?`/${c.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{R as default};
@@ -1,12 +0,0 @@
1
- import{j as u}from"./liveblocks-tpE-grBU.js";import{a as g}from"./sentry-D58SEIt0.js";import{u as F,g as O,h as _,t as w,j as l,N as T}from"./core-0WK0Zss8.js";import{z as r,y as A,a as P,e as V,d as N,f as $,x as H,H as R,h as W}from"./index-Dy73EgcO.js";import{eX as X,L$ as Z,M9 as q,M0 as B,fA as G,g0 as J,M5 as K,go as Q,cZ as Y,Ma as ee,Mb as te}from"./zeni-epic-state-Bx_bp9Xr.js";import{n as ne}from"./mui-NHWzIwJg.js";import{u as se}from"./useDeviceId-SayLljl1.js";import{f as ae}from"./analyticsHelper-C8vUB4gm.js";import{t as ie}from"./getLocaleForTenant-CqQ308VG.js";import"./recharts-CUzwcISX.js";import"./analytics-1WMvk5Rb.js";import"./plaid-59NT4aqa.js";import"./dnd-Dwsdp5ty.js";import"./stripe-cKAAJElX.js";import"./lottie-dQMhiLBj.js";import"./lexical-B9WqgH9H.js";import"./pdf-C4fX1mA3.js";import"./utils-CHGPa257.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]="cb408e29-a16c-45b8-b18f-52fac10c9368",t._sentryDebugIdIdentifier="sentry-dbid-cb408e29-a16c-45b8-b18f-52fac10c9368")}catch{}})();const x=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function xe(){const t=F(),a=O(),m=_(),[y]=w(),n=y.get("token"),p=y.get("stytch_token_type"),f=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:c,twoFAPhoneNumber:z,magicLinkEmail:d,verifyDeviceFetchState:C,resendVerifyDeviceOTPFetchState:D}=l((e=>e.tenantState)),S=l((e=>e.tenantState.fetchState)),k=l((e=>e.tenantState.activeTenantFetchState.fetchState)),h=l((e=>e.tenantState.signInState)),I=l((e=>e.tenantState.magicLinkSignInFetchState.fetchState)),s=l((e=>e.tenantState.loggedInUser)),o=l((e=>X(e))),b=l((e=>Z(e))),E=r.getSignedInUser(),v=A().mode;g.useEffect((()=>{s?.zeniSessionId==null&&n!=null&&x(n,p)&&i!=null&&f!=null&&(r.saveMagicLinkTriggered(n),t(q(n,i,f)))}),[n,p,t,i,f,s?.zeniSessionId]),g.useEffect((()=>{h!=="In-Progress"||S!=="Completed"&&k!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(B(b.tenantsInOrder),s.zeniSessionId),G(s.userId,s.zeniSessionId,o.tenantId),t(J(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(K("Completed")),P.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,b.tenantsInOrder),Q().then((()=>{const e=W();e!=null&&V(e)})),setTimeout((()=>{N.trackLogin($.Event.loginSuccess,"email",Y(o.productSettings))}),2e3))}),[h,S,k,s,o,b,v,a.state,t]);const M=g.useCallback((()=>{m("/signin/auth")}),[m]),U=g.useCallback((()=>{i!=null&&c!=null&&d!=null&&t(ee(i,d,c))}),[i,c,t,d]),j=g.useCallback((e=>{i!=null&&n!=null&&d!=null&&c!=null&&t(te(e,i,d,c))}),[i,n,t,d,c]);if(I==="Completed"&&c!=null)return u.jsx(H,{phoneNumber:z,verifyOtpFetchState:C.fetchState,resendVerifyDeviceOTPFetchState:D,onResendOtp:U,onVerifyOtp:j,onCancelVerifyDevice:M});if(h==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return u.jsx(T,{to:e,state:{...a.state,origin:""}})}if(!x(n,p)||f==null||I==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||I==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(R,{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{xe as default};
@@ -1 +0,0 @@
1
- import{j as N}from"./liveblocks-tpE-grBU.js";import{a as l}from"./sentry-D58SEIt0.js";import{u as fe,j as n,i as Ye,g as Qe,h as We,l as M}from"./core-0WK0Zss8.js";import{eX as me,fF as Xe,fG as pe,fr as qe,bn as Ke,eW as Je,fH as ea,fI as aa,fK as ta,fN as na,fO as g,fQ as sa,fR as de,fU as oa,fS as ia,fT as ra,fV as da,cO as ca,fX as la,cU as ua,fq as fa,g0 as ma,g1 as pa,f$ as ba}from"./zeni-epic-state-Bx_bp9Xr.js";import{a9 as ha,aa as Sa,Q as ga,C as Ea,z as k,w as ka,u as Ca,G as r,i as ya,R as Ia,ab as Ta,T as wa,c as Aa,ac as _a,a5 as Fa,ad as Da,ae as va,af as ce,ag as le,L as $a,ah as Ga,ai as ue,d as P,a1 as Ra,r as w,aj as x,ak as Ma}from"./index-Dy73EgcO.js";import{D as Pa}from"./mui-NHWzIwJg.js";(function(){try{var f=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new f.Error().stack;d&&(f._sentryDebugIds=f._sentryDebugIds||{},f._sentryDebugIds[d]="350ceecb-df44-4931-87d1-32d61af3a86d",f._sentryDebugIdIdentifier="sentry-dbid-350ceecb-df44-4931-87d1-32d61af3a86d")}catch{}})();const xa=ha((({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=Ye(),a=Qe(),C=ga(),o=We(),U=qe(),m=fe(),{useFeatureGate:i}=Ea(),V=k.getSignedInUser(),B=Ke(V),s=n((e=>me(e))),be=s.masterTOSInfo?.isMasterTOSAccepted??!1,O=n((e=>Je(e))),j=O.uiState.currentChatSessionId,y=ka(),{setLoading:he}=Ca(),[A,L]=l.useState(void 0),_=M("/:tenantEmailDomain/dashboard")!==null,z=M("/:tenantEmailDomain/reports")!==null,I=M("/:tenantEmailDomain/onboarding/*")!==null,Se=!!s.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:ge}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:Z}=i(r.isDebitCardFeatureEnabled),Ee=ya(s,ge,Z),{isFeatureEnabled:ke}=i(r.isSettingsFeatureEnabled),H=n((e=>ea(e))),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),F=n((e=>aa(e)));l.useEffect((()=>{y&&T&&!I&&F.fetchState==="Not-Started"&&m(ta(!0))}),[y,T,F.fetchState,I]);const h=k.getSignedInUser(),D=n((e=>e.tenantState)),Ce=n((e=>D.fetchState==="Completed"?na(e):[])),E=n((e=>e.expenseAutomationViewState.selectedPeriodByTenantId)),{isFeatureEnabled:ye}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Ie}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:Te}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:we}=i(r.isExpenseAutomationEnabledV2),Y=Ia(),{isFeatureEnabled:Ae}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:_e}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:De}=i(r.isDashboardSidebarNewYearAnimationEnabled),v=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:ve}=i(r.isTaskManagerCustomerUserAccessEnabled),$e=B||!B&&ve,Ge=n((e=>g(e).totalUnreadCount)),Re=n((e=>g(e).reducedFetchCountState)),Q=n((e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount)),W=n((e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount)),Me=n((e=>g(e).notificationDetailsByTab.tasks.fetchCountState)),$=n((e=>g(e).notificationDetailsByTab.comments.fetchCountState)),{inboxNotifications:X,isLoading:q,isFetchingMore:K,hasFetchedAll:J,fetchMore:Pe}=Ta();l.useEffect((()=>{const e=setTimeout((()=>Pe?.()),0);return()=>clearTimeout(e)})),l.useEffect((()=>{if(q===!1&&K===!1&&J===!0)if(s?.companyId!=null&&X!=null){const e=`dashboard_${s.companyId}`;L(X.filter((u=>u.roomId===e&&u.readAt==null)).length)}else L(0)}),[q,K,J]),l.useEffect((()=>{y&&!I&&Me.fetchState==="Not-Started"&&U.tenantId!=null&&m(sa("task_manager","dashboard"))}),[y,U.tenantId]),l.useEffect((()=>{I||$.fetchState!=="Not-Started"||m(de({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[]),l.useEffect((()=>{A!=null&&$.fetchState==="In-Progress"&&(m(de({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(pe({unreadCount:A},"comments")))}),[A,$.fetchState]);const xe={fetchStatus:Re,count:Ge},ee=t!=null?k.getSignedInUserTenant(t):null,ae=n((e=>ee?.tenantId!=null?oa(e,ee.tenantId):void 0)),S=[];ye===!1&&S.push("accounts_payable_aging"),Ie===!1&&S.push("accounts_receivable_aging"),S.push("zeni_accounts_promo_card","treasury_promo_card"),T===!1&&S.push("rewards_card"),Y===!1&&S.push("expense_automation_card");const Ne=wa(),te=n((e=>ia(e,S,h,we,Te).fetchState)),ne=n((e=>ra(e).fetchState)),Ue=_&&(te==="Completed"||te==="Error")||z&&(ne==="Completed"||ne==="Error")||!_&&!z?void 0:"disabled",Ve=l.useMemo((()=>da(s.userRole)),[s.userRole]),Be=ca(Ve),Oe=s?.rewardsLastViewedTime==null,je=h?.userEmail!=null&&H.fetchState==="Completed"&&la(H.notificationSettings,h.userEmail,Z,s),se=Aa(),Le=se&&_a(a),oe=ua(Ne?.loggedInUserRoleMap),ie=s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,G=l.useCallback((()=>v&&oe&&!k.getTreasuryPopupSeen(t??"")&&ie===!1&&Fa(a.pathname)!=="treasury"),[v,oe,ie,a.pathname,t]),[ze,re]=l.useState(G);l.useEffect((()=>{re(G())}),[G]);const Ze=n((e=>e.treasurySetupViewState.treasuryFundsDetails)).fundsDetails,He=Da(Ze);return N.jsx(Pa,{container:window.document.body,variant:"temporary",open:f,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:N.jsx(va,{signedInUser:V,currentTenantId:D.currentTenantId??"",tenants:D.fetchState==="Completed"?Ce:ae!=null?[ae]:[],currentTenant:s,isTenantDropdownDisabled:Ue,isSettings:le(a),isSettingsFeatureEnabled:ke,isVendorsTabVisible:Be,isZeniAccountEnabled:Se,isChargeCardEnabled:Ee,isTreasuryEnabled:v,treasuryYieldPercentage:He,isTreasuryPopupVisible:ze,isNotificationsTabVisible:je,notificationCountDetails:xe,isExpenseAutomationEnabledForUser:Y,selectedMenu:ce(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Oe,rewardsPlan:F.rewardsPlan},isAiCfoAccessEnabled:se,onNotificationIconClick:()=>{d(!1);let e=Q===0&&W>0?"notifications/comments":"notifications/tasks";le(a)&&(e=Q===0&&W>0?"../../notifications/comments":"../../notifications/tasks");const u=w(a.state?.pathnameStackToGoBack,a.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=w(a.state?.pathnameStackToGoBack,a.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),t==null)return;if(e.type==="ai_cfo"){if(P.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),!be)return void Ra({location:a,navigate:o,mergeState:{referrer:"Sidebar"}});const b=w(a.state?.pathnameStackToGoBack,a.pathname);return void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:b,referrer:"Sidebar"}})}const u=w(a.state?.pathnameStackToGoBack,a.pathname),c=e.type,p=x(c)&&c!=="command_center";if(x(e.type)&&E[s.tenantId]!=null&&P.trackMonthEndCloseClicked(E[s.tenantId].month,E[s.tenantId].year,"Sidebar"),p&&E[s.tenantId]!=null){const b=E[s.tenantId];return void o(`/${t}/month_end_close_checks/review/${e.type}/${b.month}-${b.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const R=Ma(e.type);ue(e.type)?(j!=null&&m(ba()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${R}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${t}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${t}/rewards`)},handleBackClick:()=>{o(`/${t}/dashboard`)},handleTenantSelect:e=>{he($a.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,c=ce(a);let p=`/${encodeURIComponent(u)}/`;const R=x(c);c==="home"?p+="dashboard":c==="users_and_roles"?p+="people":Ga(c)?p+="settings/my_profile":ue(c)?p+=`ai-cfo/${c}`:p+=c==="task_checklist"?"tasks":R?"month_end_close_checks/review":encodeURIComponent(c),o(p,{replace:!0}),h!=null&&(m(ma(e.tenantId)),m(pa(h.userId,e.tenantId,h.zeniSessionId)));const b=e;P.trackCompanySwitch(b.companyId,b.companyName,b.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(t??"",!0),re(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:Le,aiCfoView:O,isOnDashboard:_,updateCurrentChatSessionId:e=>{m(fa({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:Ae,isTaskManagerAccessEnabled:$e,thanksGivingAnimationEnabled:_e,christmasAnimationEnabled:Fe,newYearAnimationEnabled:De})})})),La=f=>{const d=fe(),t=n((C=>me(C))),a={events:t.userRoleId!=null?[`private-encrypted-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{Sa(o)&&Xe(o.mode)==="dashboard"&&d(pe({unreadCount:o.data.unread},"tasks"))}};return N.jsx(xa,{...f,...a})};export{La as M};
@@ -1 +0,0 @@
1
- import{j as r}from"./liveblocks-tpE-grBU.js";import{h as n,n as i}from"./core-0WK0Zss8.js";import{V as e}from"./index-Dy73EgcO.js";import"./mui-NHWzIwJg.js";import"./sentry-D58SEIt0.js";import"./zeni-epic-state-Bx_bp9Xr.js";import"./recharts-CUzwcISX.js";import"./analytics-1WMvk5Rb.js";import"./plaid-59NT4aqa.js";import"./dnd-Dwsdp5ty.js";import"./stripe-cKAAJElX.js";import"./lottie-dQMhiLBj.js";import"./lexical-B9WqgH9H.js";import"./pdf-C4fX1mA3.js";import"./utils-CHGPa257.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]="83df1d3c-82df-44f1-96da-d439d2110caa",o._sentryDebugIdIdentifier="sentry-dbid-83df1d3c-82df-44f1-96da-d439d2110caa")}catch{}})();const d=i(null,(function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}}))(e);function _(){const o=n();return r.jsx(d,{navigate:o})}export{_ as default};
@@ -1 +0,0 @@
1
- import{j as f}from"./liveblocks-tpE-grBU.js";import{a as r}from"./sentry-D58SEIt0.js";import{u as T,g as A,j as o,N as j}from"./core-0WK0Zss8.js";import{Mo as C,eX as P,fN as x,Mp as z,Mq as D,Mr as L,Ms as N,oc as R,Ll as q}from"./zeni-epic-state-Bx_bp9Xr.js";import{z as h,M as I}from"./index-Dy73EgcO.js";import"./mui-NHWzIwJg.js";import"./recharts-CUzwcISX.js";import"./analytics-1WMvk5Rb.js";import"./plaid-59NT4aqa.js";import"./dnd-Dwsdp5ty.js";import"./stripe-cKAAJElX.js";import"./lottie-dQMhiLBj.js";import"./lexical-B9WqgH9H.js";import"./pdf-C4fX1mA3.js";import"./utils-CHGPa257.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new n.Error().stack;s&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[s]="0b78d6e1-b96d-4638-bb4b-d1e47a810ce5",n._sentryDebugIdIdentifier="sentry-dbid-0b78d6e1-b96d-4638-bb4b-d1e47a810ce5")}catch{}})();function ee(){const n=T(),s=A(),{params:t,error:i}=r.useMemo((()=>C(s.search)),[s.search]),b=r.useMemo((()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application"),[s.search,t]),p=h.isSignedIn(),a=h.getSignedInUser(),m=o((e=>P(e))),l=o((e=>x(e))),d=o((e=>e.tenantState.fetchState)),w=o(z),y=o(D),c=o(L),[v,S]=r.useState(null),[E,M]=r.useState(null);r.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]),r.useEffect((()=>()=>{n(N())}),[n,s.search]),r.useEffect((()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)}),[i]);const g=r.useRef(!1);r.useEffect((()=>{p&&a!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(R(a.userId,a.zeniSessionId??void 0))))}),[p,a,d,n]),r.useEffect((()=>{c!=null&&c!==""&&(window.location.href=c)}),[c]);const _=r.useMemo((()=>{if(m?.tenantId!=null)return m.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some((U=>U.tenantId===e))?e:l.length===1?l[0].tenantId:null}),[m?.tenantId,l]),u=v??_;return i!=null?f.jsx(I,{variant:"invalid_params",paramsError:i}):p?f.jsx(I,{variant:"signed_in",clientName:b,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:S,approveError:E??y,isApproving:w==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&a!=null&&u!=null&&n(q(a.userId,a.zeniSessionId??void 0,u,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{M("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):f.jsx(j,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
@@ -1 +0,0 @@
1
- import{j as n}from"./liveblocks-tpE-grBU.js";import{h as X,u as K,g as z,i as Z,j as d,n as H,o as J,p as I}from"./core-0WK0Zss8.js";import{eX as O,sf as R,rP as Q,MV as U,rK as T,bs as ee,bn as ae,bY as te,rL as se,MW as oe,MI as C,dK as re,vX as ne,MX as ie,wi as ce,fE as le,fC as de}from"./zeni-epic-state-Bx_bp9Xr.js";import{z as me,_ as fe,a0 as pe,T as ue,C as v,G as w,D as he,d as $,ap as ge,r as Fe}from"./index-Dy73EgcO.js";import"./mui-NHWzIwJg.js";import be from"./NotFoundScreen-BUpSeNgf.js";import{F as Ie}from"./FeaturePreviewScreen-CS0na0Uv.js";import{a as g}from"./sentry-D58SEIt0.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-Dx1w_2sk.js";import{u as Te}from"./useInitialThreadRequest-B7WOjZ27.js";import{t as Se}from"./routePaths-YBRbNv0i.js";import{M as ye}from"./MobileAppDrawer-By5kqJZy.js";import"./recharts-CUzwcISX.js";import"./analytics-1WMvk5Rb.js";import"./plaid-59NT4aqa.js";import"./dnd-Dwsdp5ty.js";import"./stripe-cKAAJElX.js";import"./lottie-dQMhiLBj.js";import"./lexical-B9WqgH9H.js";import"./pdf-C4fX1mA3.js";import"./utils-CHGPa257.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]="d6c8fa4b-e71f-401d-81c5-063313421b30",s._sentryDebugIdIdentifier="sentry-dbid-d6c8fa4b-e71f-401d-81c5-063313421b30")}catch{}})();const S=(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})}},ke=H((function(s){const e=oe(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:$}}),(function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(U(a,o)),e.isPandLReportFetched(a)||s(T(a)),S(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(ce(a))},onForecastVsActualsCompareToggle:a=>{s(ie(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ne(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,i;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,i=re(o)):o.balanceTimeFrame==="year"?(r="quarter",i={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),i!=null&&r!=null){const m=Se(e.tenantEmailDomain,a.accountId,a.accountType,p,r,i),u=Fe(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(m,{state:{pathnameStackToGoBack:u,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}}))(ge);function M(){const s=X(),e=K(),a=z(),{forecastId:o,tenantEmailDomain:r}=Z(),[i,p]=g.useState(!1),[m,u]=g.useState(!1),h=me.getSignedInUser(),y=d((t=>O(t))),_=y.company?.companyInfo.firstMonthOfFY??1,c=d((t=>R(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),k=d((t=>t.profitAndLossState)),A=d((t=>t.reportUIOptionsState.selectedForecast)),D=t=>k.pandLByForecastID[t]!=null&&se(t,k).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=fe();pe({isDataReady:l});const{isAiCfoAccessEnabled:B,onAskAiCfoClick:G}=Ce({mobileExploreReferrer:"Forecast"});g.useEffect((()=>{if(!i&&F)p(!0),l||e(Q());else if(l&&!m){u(!0);const t=((f,j,P)=>j!=null?f.forecasts.findIndex((b=>b.id===j)):P!=null?f.forecasts.findIndex((b=>b.id===P)):f.forecasts.length>0?0:-1)(c,o,A?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=A?.index?(e(U(c.forecasts[t].id,t)),S(o,c.forecasts[t].id,s,a.search)):o==null&&t!==-1&&S(void 0,c.forecasts[t].id,s,a.search),t!==-1&&!D(c.forecasts[t].id)&&F&&e(T(c.forecasts[t].id))}}),[i,p,e,l,c,m,u,R,T,F]);const x=ue(),N=x?.loggedInUserRole!=null&&ee(x.loggedInUserRole),{useFeatureGate:W}=v(),{isFeatureEnabled:E}=W(w.isReportsCommentingEnabled),Y=Te(E?y?.companyId:void 0,{clearParams:l&&m}),[q,V]=g.useState(!1),L=t=>{V(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:$,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:q,handleDrawerToggle:L}),n.jsx(ke,{firstMonthOfFY:_,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:D,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:N,isAiCfoAccessEnabled:B,onAskAiCfoClick:G,isReportsCommentingEnabled:E,isZeniUser:ae(h),initialOpenThreadRequest:Y,onClickMenuIcon:()=>{L(!0)}})]})}function Ve(){const s=d((i=>O(i))),{useFeatureGate:e}=v(),{isFeatureEnabled:a}=e(w.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(J,{children:[n.jsx(I,{path:"/",element:n.jsx(M,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(M,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(be,{})})]})}export{Ve as PandLWithForecastRoutes,Ve as default};
@@ -1,22 +0,0 @@
1
- import{j as a}from"./liveblocks-tpE-grBU.js";import{MR as ne,eX as q,kA as G,fE as X,fC as oe,Kj as Y,Mv as ie,uU as ke,MS as Q,uJ as Ee,v2 as Pe,uY as re,uN as le,v0 as je,uZ as ve,MT as ce,wJ as Te,fo as Le,ge as Ae,MU as _,uR as de,uQ as pe,v5 as Re,c6 as Fe}from"./zeni-epic-state-Bx_bp9Xr.js";import{m as ue,C as ee,G as H,z as W,i as me,J as ge,I as fe,al as he,am as Oe,E as Ce,o as O,K as ye,a as be,an as Ve,_ as Ze,a0 as Ue,D as Be,d as Se,f as $e,r as Me,ao as _e,T as He}from"./index-Dy73EgcO.js";import{D as we,n as J,S as De}from"./mui-NHWzIwJg.js";import se from"./NotFoundScreen-BUpSeNgf.js";import{a as c}from"./sentry-D58SEIt0.js";import{u as ae,i as Ke,j as g,h as ze,g as Ge,n as We,o as te,p as M}from"./core-0WK0Zss8.js";import{u as Je}from"./useAskAiCfoHostNavButtonProps-Dx1w_2sk.js";import{M as Ne}from"./MobileAppDrawer-By5kqJZy.js";import"./recharts-CUzwcISX.js";import"./analytics-1WMvk5Rb.js";import"./plaid-59NT4aqa.js";import"./dnd-Dwsdp5ty.js";import"./stripe-cKAAJElX.js";import"./lottie-dQMhiLBj.js";import"./lexical-B9WqgH9H.js";import"./pdf-C4fX1mA3.js";import"./utils-CHGPa257.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="33637d6e-c942-4eb1-86a5-c360ec50dce8",e._sentryDebugIdIdentifier="sentry-dbid-33637d6e-c942-4eb1-86a5-c360ec50dce8")}catch{}})();const Qe={overlayWidth:new Ce(100,100,48)},K=be.getLocalizedStrings().peoplePage.invitePage,qe=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:b})=>{const h=ue(),m=ae(),[V,Z]=c.useState(!1),[k,S]=c.useState(!1),{userId:w}=Ke(),r=g((l=>ne(l))),p=g((l=>q(l))),E=g((l=>G(l))),{useFeatureGate:x}=ee(),{isFeatureEnabled:I}=x(H.isDebitCardFeatureEnabled),P=X(I,p),T=oe(p),L=Y(p),U=ie(p),B=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,D=!P&&E&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(W.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{m(Q()),b()},A=()=>{V===!0?S(!0):C()},$=d.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=x(H.isChargeCardFeatureEnabled),v=me(p,j,I),{isCardsHidden:R}=ge(p?.tenantId),y=!v||R,F=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:L,isAccountingClassesEnabled:E,isReimbursementDisabled:B===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:F===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:T,onResetClick:C,onDeleteUser:l=>{m(le(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(re({peopleLocalData:l})),Z(!0)},onSaveClick:()=>{m(f==="zeni_only"?Ee(e):Pe(L))},onCloseClick:A,isLoading:D||r.person==null},o={onOkClick:()=>{S(!1),C()},onCancelClick:()=>{S(!1)}};return c.useEffect((()=>{D===!1&&w!=null&&m(ke(w))}),[D,w]),c.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&C()}),[r.updatePersonState.fetchState]),a.jsx(we,{anchor:"right",open:i,PaperProps:{style:{width:Qe.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:fe.overlayDark,cursor:"pointer"}}},onClose:A,children:a.jsxs(Xe,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(he,{titleComponent:a.jsx(xe,{children:K.discardTitle}),descriptionComponent:a.jsx(Ie,{children:K.discardDescription}),primaryButtonText:K.discard,secondaryButtonText:K.no,action:o,isEditPopup:!0}):null,a.jsx(Oe,{...s})]})})},Xe=J(De)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,xe=J(ye.H6Regular)`
6
- margin-top: ${O.sp7};
7
- padding-left: ${O.sp8};
8
- padding-right: ${O.sp8};
9
- color: ${e=>e.theme.colors.primary};
10
- word-break: break-word;
11
- `,Ie=J(ye.LargeRegularSp)`
12
- color: ${e=>e.theme.colors.hero};
13
- padding-left: ${O.sp8};
14
- padding-right: ${O.sp8};
15
- margin-bottom: 30px;
16
- margin-top: ${O.sp4};
17
- white-space: pre-line;
18
- `,Ye={overlayWidth:new Ce(100,100,48)},z=be.getLocalizedStrings().peoplePage.invitePage,ea=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:f,isInvitePeopleDrawerOpen:i,closeDrawerHandler:b})=>{const h=ue(),m=ae(),[V,Z]=c.useState(!1),[k,S]=c.useState(!1),w=g((o=>ne(o))),r=g((o=>q(o))),p=g((o=>G(o))),{useFeatureGate:E}=ee(),{isFeatureEnabled:x}=E(H.isDebitCardFeatureEnabled),I=X(x,r),P=oe(r),T=Y(r),L=ie(r),U=!!r.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,B=!I&&p&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(W.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const D=()=>{b(),m(Q())},C=()=>{V===!0?S(!0):D()},A={onOkClick:()=>{S(!1),D()},onCancelClick:()=>{S(!1)}},$=d.companyView?.controllers.map((o=>o.user)),u=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=E(H.isChargeCardFeatureEnabled),v=me(r,j,x),{isCardsHidden:R}=ge(r?.tenantId),y=!v||R,F=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:T,onPeopleLocalDataUpdated:o=>{m(re({peopleLocalData:o})),Z(!0)},onResetClick:D,onSaveClick:()=>{m(f==="zeni_only"?je(e):ve())},onCloseClick:C,peopleDetails:w,isAccountingClassesEnabled:p,isReimbursementDisabled:U===!1,isLiteRoleDisabled:L===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:F===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:P,isLoading:B};return c.useEffect((()=>{w.invitePersonState.fetchState==="Completed"&&(b(),m(Q()))}),[w.invitePersonState.fetchState]),a.jsx(we,{anchor:"right",open:i,PaperProps:{style:{width:Ye.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:fe.overlayDark,cursor:"pointer"}}},onClose:C,children:a.jsxs(aa,{onClick:o=>o.stopPropagation(),children:[k===!0?a.jsx(he,{titleComponent:a.jsx(xe,{children:z.discardTitle}),descriptionComponent:a.jsx(Ie,{children:z.discardDescription}),primaryButtonText:z.discard,secondaryButtonText:z.no,action:A}):null,a.jsx(Ve,{...s})]})})},aa=J(De)`
19
- display: flex;
20
- min-height: 100%;
21
- flex-direction: column;
22
- `,sa=We((function(e,t){const d=ce(e),n=W.getSignedInUser();return{data:d,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:G(e),analytics:Se}}),(function(e,t){const{navigate:d,companyId:n,shouldFetchClasses:f}=t;return{personAction:{onPersonDelete:(i,b)=>{e(le(i,b))},onResendInvite:i=>{e(Re(i))},onReloadPeople:()=>{e(de()),e(pe(n,f))},onBackClick:()=>{d("../../")},onModeChange:i=>{e(_({mode:i,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:i=>{e(_({searchText:i}))}}}}))(_e);function N({isInvitePeopleDrawerOpen:e,isEditPeopleDrawerOpen:t}){const d=ze(),n=ae(),f=Ge(),{areTenantIdsInSync:i}=Ze(),b=W.getSignedInUser(),h=g((s=>q(s))),{useFeatureGate:m}=ee(),{isFeatureEnabled:V}=m(H.isDebitCardFeatureEnabled),Z=g((s=>G(s))),k=!X(V,h)&&Z,S=Y(h),w=h?.tenantId,{tenantEmailDomain:r}=h,[p,E]=c.useState(!1),[x,I]=c.useState(!1),[P,T]=c.useState(!1),[L,U]=c.useState("off"),[B,D]=c.useState(!1),C=s=>{D(s)},{isAiCfoAccessEnabled:A,onAskAiCfoClick:$}=Je({mobileExploreReferrer:"People"}),u=g((s=>ce(s)));Ue({isDataReady:u.fetchState==="Completed"});const j=g((s=>Te(s.classState,s.classListState))),v=g((s=>Le(s.userState,s.userRoleState,s.userListViewState,"manager"))),R=g((s=>Ae(s))),y=h?.companyId;c.useEffect((()=>{p&&L===u.uiState.mode||!i||(n(_({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(u.uiState.mode),E(!0),n(de()))}),[p,b,w,n,u.uiState.mode,i]),c.useEffect((()=>{y!=null&&i&&n(pe(y,k))}),[y,k,i]),c.useEffect((()=>{I(e!=null&&e===!0),T(t!=null&&t===!0&&t)}),[e,t]),c.useEffect((()=>{n(_({searchText:"",sortKey:"name",sortOrder:"ascending"}))}),[]);const F=()=>{I(!1),T(!1),d("../")};return a.jsxs(a.Fragment,{children:[u.fetchState==="Completed"?a.jsx(Be,{analytics:Se,onLoad:s=>s.trackPageLoaded($e.Event.members)}):null,x===!0?a.jsx(ea,{closeDrawerHandler:F,isInvitePeopleDrawerOpen:x,managersListView:v,companyPassportView:R,classListView:j,companyId:y,mode:u.uiState.mode}):null,P===!0?a.jsx(qe,{closeDrawerHandler:F,isEditPeopleDrawerOpen:P,managersListView:v,companyPassportView:R,classListView:j,companyId:y,mode:u.uiState.mode}):null,a.jsx(Ne,{isAppContentDrawerOpen:B,handleDrawerToggle:C}),a.jsx(sa,{navigate:d,signedInUser:b,isZeni:h.isZeni,isZeniTenant:S,peopleUIState:u.uiState,companyId:y,shouldFetchClasses:k,classList:j,managersView:v,peopleView:u,onInvitePeopleClick:()=>{d("./new")},onColumnSortConfigChanged:(s,o)=>{n(_({sortKey:s,sortOrder:o}))},onRowClick:s=>{const o=`/${r}/people/${encodeURIComponent(s)}/edit`,l=Me(f.state?.pathnameStackToGoBack,f.pathname);d(o,{state:{pathnameStackToGoBack:l}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:A,onAskAiCfoClick:$})]})}function wa(){const e=He();return Fe(e?.loggedInUserRole??[])?a.jsxs(te,{children:[a.jsx(M,{path:"/",element:a.jsx(N,{})}),a.jsx(M,{path:"new",element:a.jsx(N,{isInvitePeopleDrawerOpen:!0})}),a.jsx(M,{path:":userId/edit",element:a.jsx(N,{isEditPeopleDrawerOpen:!0})}),a.jsx(M,{path:"*",element:a.jsx(se,{})})]}):a.jsx(te,{children:a.jsx(M,{path:"*",element:a.jsx(se,{})})})}export{wa as default};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-tpE-grBU.js";import E from"./NotFoundScreen-BUpSeNgf.js";import{a as r}from"./sentry-D58SEIt0.js";import{h as _,g as v,j as p,i as M,u as U,N as z,n as P,o as O,p as h}from"./core-0WK0Zss8.js";import{eX as B,T4 as b,bq as F,bn as N,ie as V,fz as q}from"./zeni-epic-state-Bx_bp9Xr.js";import{Q,z as I,a0 as X,c_ as $}from"./index-Dy73EgcO.js";import"./mui-NHWzIwJg.js";import{u as G}from"./useAskAiCfoHostNavButtonProps-Dx1w_2sk.js";import{M as H}from"./MobileAppDrawer-By5kqJZy.js";import"./recharts-CUzwcISX.js";import"./analytics-1WMvk5Rb.js";import"./plaid-59NT4aqa.js";import"./dnd-Dwsdp5ty.js";import"./stripe-cKAAJElX.js";import"./lottie-dQMhiLBj.js";import"./lexical-B9WqgH9H.js";import"./pdf-C4fX1mA3.js";import"./utils-CHGPa257.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="988f9ee5-f7d3-4e0f-8d47-eefebe831f2b",e._sentryDebugIdIdentifier="sentry-dbid-988f9ee5-f7d3-4e0f-8d47-eefebe831f2b")}catch{}})();const J=P((function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}}),(function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}}))($),K=()=>{const e=_(),t=v(),c=Q(),o=p((a=>B(a))),{aggregatedReportViewState:n}=p((a=>b(a))),{tenantEmailDomain:m}=M(),u=U(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const f=r.useRef(!1),[w,S]=r.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),y=C||k||x,d=r.useCallback(((a,i,A)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:A}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&f.current&&(u(q({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),f.current=!1)}),[n?.fetchState]);const D=r.useCallback(((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),f.current=!0}),[n?.fetchState,d]),j=r.useCallback(((a,i)=>{d(a,i,!1)}),[d]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:T}=G({mobileExploreReferrer:"Performance"});return X({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(H,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(J,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:m,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:T})]}):s.jsx(z,{to:`/${m}/dashboard`,replace:!0})};function ge(){return s.jsxs(O,{children:[s.jsx(h,{path:"*",element:s.jsx(K,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{ge as default};
@@ -1,5 +0,0 @@
1
- import{j as s}from"./liveblocks-tpE-grBU.js";import{a as o}from"./sentry-D58SEIt0.js";import{j as f,h as _,u as H,g as V,n as F}from"./core-0WK0Zss8.js";import{y as M,m as N,z as P,bg as W,E as U,_ as $,a0 as z,D as K,d as l,f as X,a9 as q,bh as G}from"./index-Dy73EgcO.js";import{fI as J,eX as Q,Ps as R,Pt as Y,vN as Z,vD as g,fK as ee,bS as ae,vI as re,Pu as ne}from"./zeni-epic-state-Bx_bp9Xr.js";import{D as te,e as se,n as oe,S as ie}from"./mui-NHWzIwJg.js";import{u as le}from"./useAskAiCfoHostNavButtonProps-Dx1w_2sk.js";import{M as de}from"./MobileAppDrawer-By5kqJZy.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]="d9f3b705-61c5-406e-9f8f-b372ba232a55",e._sentryDebugIdIdentifier="sentry-dbid-d9f3b705-61c5-406e-9f8f-b372ba232a55")}catch{}})();const ce={overlayWidth:new U(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:a})=>{const r=M(),n=N();if(P.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{a(!0)},u=f((d=>J(d)));return s.jsx(te,{anchor:"right",open:e,PaperProps:{style:{width:ce.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:r.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(se,{in:e,direction:"left",children:s.jsx(ue,{onClick:d=>d.stopPropagation(),children:s.jsx(W,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ue=oe(ie)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,I="refer-and-earn-status-update",we=F((function(e){const a=R(e),r=e.referralViewState.rewardsPlanFetchState,n=ae([a,r]);return{inviteList:a.invitations,uiState:a.uiState,pendingBonus:a.pendingBonus,earnedBonus:a.earnedBonus,pendingReferrals:a.pendingReferrals,fetchState:n.fetchState,rewardsPlan:a.rewardsPlan}}),(function(e,a){const{navigate:r}=a;return{onColumnSortConfigChanged:(n,i)=>{e(ne({sortOrder:i,sortkey:n}))},onInviteClick:()=>{l.trackRewardsPageClicked("invite via email"),r("../refer")},onHowItWorksClick:()=>{l.trackRewardsPageClicked("know more"),r("../how-it-works")},onResendInviteClick:n=>{l.trackRewardsPageClicked("resend invite"),e(re(n))},onBackClick:()=>{r("../",{relative:"path"})},onReloadInvitees:()=>{e(g(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===I&&e(g(!0,!0))}}}))(q(G));function ye({isReferralDrawerOpen:e}){const a=_(),r=H(),n=V(),[i,u]=o.useState(!1),[d,D]=o.useState(!1),[x,E]=o.useState(!1),[k,h]=o.useState(!1),w=P.getSignedInUser(),C=f((t=>Q(t))),b=f((t=>R(t))),m=b.fetchState,p=f((t=>t.referralViewState.rewardsPlanFetchState)),v=Y([b,p]),{areTenantIdsInSync:c}=$();o.useEffect((()=>{C?.rewardsLastViewedTime==null&&x===!1&&(r(Z()),E(!0))}),[]),o.useEffect((()=>{!i&&m==="Not-Started"&&c&&(u(!0),r(g(!0)))}),[m,r,c]),o.useEffect((()=>{!d&&p.fetchState==="Not-Started"&&c&&(D(!0),r(ee(!0)))}),[p,r,c]),o.useEffect((()=>{h(e!=null&&e===!0)}),[e]);const[j,A]=o.useState(!1),y=t=>{A(t)},{isAiCfoAccessEnabled:T,onAskAiCfoClick:B}=le({mobileExploreReferrer:"Rewards"});z({isDataReady:v===!0});const O={events:w?.userId!=null?[`private-encrypted-${w.userId}.${I}`]:[],eventCallback:(t,S,L)=>{L.onEventReceived(t)}};return s.jsxs(s.Fragment,{children:[v===!0?s.jsx(K,{analytics:l,onLoad:t=>(S=>{w!=null&&S.trackPageLoaded(X.Event.rewardsPageViewed)})(t)}):null,s.jsx(de,{isAppContentDrawerOpen:j,handleDrawerToggle:y}),k===!0?s.jsx(fe,{closeDrawerHandler:()=>{h(!1),a("..")},isReferralDrawerOpen:k}):null,s.jsx(we,{location:n,navigate:a,currentTenant:C,onClickMenuIcon:()=>{y(!0)},isAiCfoAccessEnabled:T,onAskAiCfoClick:B,...O})]})}export{ye as R};
@@ -1 +0,0 @@
1
- import{j as r}from"./liveblocks-tpE-grBU.js";import O from"./NotFoundScreen-BUpSeNgf.js";import{a as p}from"./sentry-D58SEIt0.js";import{h as A,g as x,u as C,j as u,N as D,n as k,o as W,p as b}from"./core-0WK0Zss8.js";import{eX as j,Qm as g,QC as S,FI as V,ER as U,FH as d,Fy as $,QP as B,FK as _}from"./zeni-epic-state-Bx_bp9Xr.js";import{z as N,a9 as L,b$ as Q,ag as T,bE as K,c0 as z}from"./index-Dy73EgcO.js";import"./mui-NHWzIwJg.js";import{u as H,R as E}from"./ReimbursementApprovalRuleDetailScreen-B0OjRx8o.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="45ba78ff-49b8-42a0-b7b4-844383cdeb85",e._sentryDebugIdIdentifier="sentry-dbid-45ba78ff-49b8-42a0-b7b4-844383cdeb85")}catch{}})();const y="reimbursement-approval-rule-update",P=k((function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}}),(function(e,o){const{navigate:s,location:n}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(y)&&e(B(!1))},onBackClick:()=>{T(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e($(t,!1))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))}}}))(L(Q)),X=({isLoading:e})=>{const o=A(),s=x(),n=C(),[t,i]=p.useState(!1),[m,R]=p.useState(!1),f=u((a=>a.remiSetupApproverViewState.fetchState)),l=u((a=>j(a))),c=u((a=>g(a))),v=u((a=>S(a).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{v?.updateStatus.fetchState==="Completed"&&n(V())}),[v]),p.useEffect((()=>{t||f!=="Not-Started"||e||(i(!0),n(U(!0,!1,!1,!1)))}),[t,f,e,n]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(R(!0),n(d())),o("./new"))}),[m,c,n]);const w={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${y}`]:[],eventCallback:(a,F,h)=>{a.endsWith(y)&&h.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(P,{currentTenant:l,location:s,navigate:o,...w})},I="reimbursement-approval-rule-update",q=k((function(e){const o=g(e),s=S(e).remiSetupApproverViewUpdateData,n={};for(const i of Object.values(e.vendorState.vendorByID))i?.id!=null&&(n[i.id]=i.name);const t={};for(const i of Object.values(e.classState.classesByKey))i?.classId!=null&&(t[i.classId]=i.className);return{approvalView:o,remiSetupApproverViewUpdateData:s,vendorNamesById:n,departmentNamesById:t}}),(function(e,o){const{navigate:s,location:n}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(I)&&e(B(!1))},onBackClick:()=>{T(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e($(t,!0))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))},onReorderRules:t=>{e(_(t,!0))}}}))(L(z)),G=()=>{const e=u((n=>j(n))),{isApprovalRulesV3Enabled:o,isLoading:s}=K(e?.tenantId);return o?r.jsx(J,{isLoading:s}):r.jsx(X,{isLoading:s})},J=({isLoading:e})=>{const o=A(),s=x(),n=C(),[t,i]=p.useState(!1),[m,R]=p.useState(!1),f=u((a=>a.remiSetupApproverViewState.fetchState)),l=u((a=>j(a))),c=u((a=>g(a)));H();const v=u((a=>S(a).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{v?.updateStatus.fetchState==="Completed"&&n(V())}),[v]),p.useEffect((()=>{t||f!=="Not-Started"||e||(i(!0),n(U(!0,!1,!1,!0)))}),[t,f,e,n]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(R(!0),n(d())),o("./new"))}),[m,c,n]);const w={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${I}`]:[],eventCallback:(a,F,h)=>{a.endsWith(I)&&h.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(q,{currentTenant:l,location:s,navigate:o,isLoading:e,...w})};function oe(){return r.jsxs(W,{children:[r.jsx(b,{path:"/",element:r.jsx(G,{})}),r.jsx(b,{path:"/new",element:r.jsx(E,{})}),r.jsx(b,{path:"/:approvalRuleId/edit",element:r.jsx(E,{})}),r.jsx(b,{path:"*",element:r.jsx(O,{})})]})}export{oe as R};
@@ -1 +0,0 @@
1
- import{j as a}from"./liveblocks-tpE-grBU.js";import{C as x,z as w,aS as y,D as E,d as p,f as F,d9 as L,G as T}from"./index-Dy73EgcO.js";import"./mui-NHWzIwJg.js";import m from"./NotFoundScreen-BUpSeNgf.js";import{a as d}from"./sentry-D58SEIt0.js";import{u as P,j as b,h as V,g as A,n as R,o as U,p as f}from"./core-0WK0Zss8.js";import{eX as z,TI as C,Q1 as G,TJ as v,vN as K,fK as Y,TK as J,vL as O}from"./zeni-epic-state-Bx_bp9Xr.js";import{R as j}from"./ReferralListScreen-Bg4MIsqb.js";import"./recharts-CUzwcISX.js";import"./analytics-1WMvk5Rb.js";import"./plaid-59NT4aqa.js";import"./dnd-Dwsdp5ty.js";import"./stripe-cKAAJElX.js";import"./lottie-dQMhiLBj.js";import"./lexical-B9WqgH9H.js";import"./pdf-C4fX1mA3.js";import"./utils-CHGPa257.js";import"./useAskAiCfoHostNavButtonProps-Dx1w_2sk.js";import"./MobileAppDrawer-By5kqJZy.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a6014409-e5ee-4608-8ad4-0fb158c4fdd7",e._sentryDebugIdIdentifier="sentry-dbid-a6014409-e5ee-4608-8ad4-0fb158c4fdd7")}catch{}})();const Q=R((function(e,t){const n=C(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}}),(function(e,t){const{navigate:n}=t,i=w.getSignedInUser();return{onDismissClick:()=>{e(v()),n("..")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach((c=>{s.push(c.companyName),r.push(c.emailIds[0])})),p.trackInviteEmailClicked("send",s,r,s.length)}e(O())},onUpdateInviteFormLocalData:s=>{e(J({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{i!=null&&p.trackInviteEmailClicked("cancel")}}}))(L),X=()=>{const e=P(),[t,n]=d.useState(!1),[i,s]=d.useState(!1),r=b((o=>z(o))),c=V(),D=A(),{useDynamicConfig:g}=x(),u=w.getSignedInUser();if(u==null)throw Error("Can't access invite referral screen without signing in...");const l=b((o=>C(o))),_=u?.firstName!=null?u.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:S}=g(y.zeniAccountsConfig),k=G(S);d.useEffect((()=>{e(v()),r?.rewardsLastViewedTime==null&&i===!1&&(e(K()),s(!0))}),[]),d.useEffect((()=>{t||l.fetchState!=="Not-Started"||(n(!0),e(Y(!0)))}),[l.fetchState,e]);const I=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[l.fetchState==="Completed"?a.jsx(E,{analytics:p,onLoad:o=>(N=>N.trackPageLoaded(F.Event.inviteEmailViewed))(o)}):null,a.jsx(Q,{navigate:c,location:D,currentTenant:r,companyName:I,userName:_,inviteFormCompayData:l.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:k.maxAnnualPercentageYield})]})};function fe(){const{useFeatureGate:e}=x(),{isFeatureEnabled:t}=e(T.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(f,{path:"/",element:t?a.jsx(j,{}):a.jsx(m,{})}),a.jsx(f,{path:"how-it-works",element:t?a.jsx(j,{isReferralDrawerOpen:!0}):a.jsx(m,{})}),a.jsx(f,{path:"refer/*",element:t?a.jsx(X,{}):a.jsx(m,{})}),a.jsx(f,{path:"*",element:a.jsx(m,{})})]})}export{fe as default};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-B4SpN_q5.js","assets/sentry-D58SEIt0.js","assets/core-0WK0Zss8.js","assets/zeni-epic-state-Bx_bp9Xr.js","assets/index-Dy73EgcO.js","assets/mui-NHWzIwJg.js","assets/analytics-1WMvk5Rb.js","assets/utils-CHGPa257.js","assets/withTransactionSidePanel-BsJ58rSa.js","assets/useAskAiCfoHostNavButtonProps-Dx1w_2sk.js","assets/TransactionDetailScreen-CRWTcneH.js","assets/decodeURIComponentSafe-DYdex7Fp.js","assets/routePaths-YBRbNv0i.js","assets/NotFoundScreen-BUpSeNgf.js","assets/useInitialThreadRequest-B7WOjZ27.js","assets/analyticsHelper-C8vUB4gm.js","assets/CompanyPassportScreen-wSnqdrZm.js","assets/MobileAppDrawer-By5kqJZy.js","assets/useAiCfoDashboardSuggestedQuestionsChips-B3JxpD0o.js","assets/FeaturePreviewScreen-CS0na0Uv.js","assets/ReferralListScreen-Bg4MIsqb.js","assets/index-Czu7h9lW.css","assets/BillPayRoutes-UVA-u63A.js","assets/AddressScreen-CBnElFxM.js","assets/DomesticWireDetailScreen-DmspT9Qv.js","assets/DrawerScreen-CTBdvd2J.js","assets/SetupPagesScreen-lXVOcLJ8.js","assets/BusinessVerificationPageScreen-DsowR4fB.js","assets/BillPayApprovalRoutes-CB55AV0C.js","assets/ReimbursementApprovalRuleDetailScreen-B0OjRx8o.js","assets/getLocaleForTenant-CqQ308VG.js","assets/ReimbursementRoutes-CnfaWQKq.js","assets/ReimbursementApprovalRoutes-CLqW8bjU.js","assets/TransactionListRoutes-kn0wMJaj.js","assets/ZeniAccountStatementScreen-DZHjDSg5.js","assets/SettingsRoutes-0RQL-spt.js","assets/accountMappingHelper-DNCKLg7K.js","assets/useEmailConnectResultRefresh-CG-YyoOP.js","assets/QBOConnectionScreen-BOAmyhRI.js","assets/empty-o2YkWI97.js","assets/index-CqKRE3AP.js","assets/url-wdUk7Rbg.js","assets/index-CmH-4r8j.js","assets/ReportsRoutes-ZKjtrrXu.js","assets/ChargeCardRoutes-D3n7KJn0.js","assets/useChargeCardPusherEvents-DGhBtw5K.js","assets/PeopleRoutes-BPQhjQKR.js","assets/ExpenseAutomationRoutes-nIGBHuEd.js","assets/TreasuryRoutes-h3ROpRx5.js","assets/useCashManagementBanner-MgmXXc9G.js","assets/VendorsRoutes-x1VmRs4J.js","assets/pathToGoBack-BmJj5cme.js","assets/ZeniAccountRoutes-BOVvauFK.js","assets/AddressRoutes-ChIEG7ZZ.js","assets/PandLWithForecastRoutes-DB98rpg8.js","assets/CustomerOnboardingRoutes-DT_Ih6lH.js","assets/TransactionDetailRoutes-DFhCPCQa.js","assets/EntityDetailRoutes-DPOfKd1l.js","assets/NotificationRoutes-CkKMsCoc.js","assets/PerformanceRoutes-Cu8GwbPn.js","assets/RewardsRoutes-Dmsl5Hhz.js","assets/TaskRoutes-X8P3xHwH.js","assets/TaskListScreen-BtTYiD21.js","assets/AiCfoScreen-DXLxFBnQ.js","assets/CardsAiCfoScreen-BaEolMVN.js"])))=>i.map(i=>d[i]);
2
- import{_ as t,bn as ls,eX as us,fE as ds,fC as cs,gk as ms,fr as _s,cV as pe,cB as hs,fU as Es,ct as ps,bE as Rs,bo as xs,fY as gs,v as Is,M0 as Ts,bs as js,M1 as As,bK as bs,bJ as Ds,bt as fs,cp as ys,M2 as Cs,M3 as vs,cR as Us,cU as ws,cT as Os,cA as Ps,cH as Fs,oc as Re,fA as xe,gu as Ls,g0 as ge,gr as Ie,gs as Te,g1 as ks}from"./zeni-epic-state-Bx_bp9Xr.js";import{j as e}from"./liveblocks-tpE-grBU.js";import{a as O}from"./sentry-D58SEIt0.js";import{u as Hs,h as Bs,i as Vs,g as Ss,j as G,l as je,N as u,o as Ns,p as a}from"./core-0WK0Zss8.js";import{y as Ms,u as Zs,z as D,C as Gs,c as zs,R as $s,G as z,i as Ys,J as Ws,T as qs,L as F,a as Ae,t as _,P as Js,d as Q,l}from"./index-Dy73EgcO.js";import"./mui-NHWzIwJg.js";import{f as be}from"./analyticsHelper-C8vUB4gm.js";import{t as Ks}from"./getLocaleForTenant-CqQ308VG.js";import"./recharts-CUzwcISX.js";import"./analytics-1WMvk5Rb.js";import"./plaid-59NT4aqa.js";import"./dnd-Dwsdp5ty.js";import"./stripe-cKAAJElX.js";import"./lottie-dQMhiLBj.js";import"./lexical-B9WqgH9H.js";import"./pdf-C4fX1mA3.js";import"./utils-CHGPa257.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},j=new o.Error().stack;j&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[j]="1abd83e8-6be2-445e-9da7-b7db5ddc0055",o._sentryDebugIdIdentifier="sentry-dbid-1abd83e8-6be2-445e-9da7-b7db5ddc0055")}catch{}})();const Xs={dashboard:()=>t((()=>import("./DashboardRoutes-B4SpN_q5.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),bills:()=>t((()=>import("./BillPayRoutes-UVA-u63A.js")),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21])),reimbursement:()=>t((()=>import("./ReimbursementRoutes-CnfaWQKq.js")),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21])),transactions:()=>t((()=>import("./TransactionListRoutes-kn0wMJaj.js")),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21])),settings:()=>t((()=>import("./SettingsRoutes-0RQL-spt.js")),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,42,11,28,29,32,21])),reports:()=>t((()=>import("./ReportsRoutes-ZKjtrrXu.js")),__vite__mapDeps([43,1,2,3,4,5,6,7,13,19,14,12,17,21])),chargeCards:()=>t((()=>import("./ChargeCardRoutes-D3n7KJn0.js")),__vite__mapDeps([44,1,2,3,4,5,6,7,9,17,26,13,15,12,27,14,45,23,21])),people:()=>t((()=>import("./PeopleRoutes-BPQhjQKR.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,13,9,17,21])),expenseAutomation:()=>t((()=>import("./ExpenseAutomationRoutes-nIGBHuEd.js")),__vite__mapDeps([47,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21])),treasury:()=>t((()=>import("./TreasuryRoutes-h3ROpRx5.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,49,19,21])),vendors:()=>t((()=>import("./VendorsRoutes-x1VmRs4J.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,23,13,19,12,51,9,17,25,36,21])),zeniAccounts:()=>t((()=>import("./ZeniAccountRoutes-BOVvauFK.js")),__vite__mapDeps([52,1,2,3,4,5,6,7,49,13,26,17,15,12,27,19,24,23,9,34,21]))},Qs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},et=l((()=>t((()=>import("./ReportsRoutes-ZKjtrrXu.js")),__vite__mapDeps([43,1,2,3,4,5,6,7,13,19,14,12,17,21])))),st=l((()=>t((()=>import("./AddressRoutes-ChIEG7ZZ.js")),__vite__mapDeps([53,1,2,3,23,4,5,6,7,13,21])))),tt=l((()=>t((()=>import("./PeopleRoutes-BPQhjQKR.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,13,9,17,21])))),nt=l((()=>t((()=>import("./PandLWithForecastRoutes-DB98rpg8.js")),__vite__mapDeps([54,1,2,3,4,5,6,7,13,19,9,14,12,17,21])))),at=l((()=>t((()=>import("./CustomerOnboardingRoutes-DT_Ih6lH.js")),__vite__mapDeps([55,1,2,3,23,4,5,6,7,13,38,39,40,41,42,11,37,45,21])))),ot=l((()=>t((()=>import("./VendorsRoutes-x1VmRs4J.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,23,13,19,12,51,9,17,25,36,21])))),rt=l((()=>t((()=>import("./TransactionDetailRoutes-DFhCPCQa.js")),__vite__mapDeps([56,1,2,3,13,4,5,6,7,10,9,11,12,21])))),De=l((()=>t((()=>import("./EntityDetailRoutes-DPOfKd1l.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,11,8,9,10,12,21])))),it=l((()=>t((()=>import("./DashboardRoutes-B4SpN_q5.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])))),fe=l((()=>t((()=>import("./BillPayRoutes-UVA-u63A.js")),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21])))),lt=l((()=>t((()=>import("./SettingsRoutes-0RQL-spt.js")),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,42,11,28,29,32,21])))),ye=l((()=>t((()=>import("./ReimbursementRoutes-CnfaWQKq.js")),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21])))),ut=l((()=>t((()=>import("./ZeniAccountRoutes-BOVvauFK.js")),__vite__mapDeps([52,1,2,3,4,5,6,7,49,13,26,17,15,12,27,19,24,23,9,34,21])))),dt=l((()=>t((()=>import("./TreasuryRoutes-h3ROpRx5.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,49,19,21])))),ct=l((()=>t((()=>import("./TransactionListRoutes-kn0wMJaj.js")),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21])))),mt=l((()=>t((()=>import("./ChargeCardRoutes-D3n7KJn0.js")),__vite__mapDeps([44,1,2,3,4,5,6,7,9,17,26,13,15,12,27,14,45,23,21])))),_t=l((()=>t((()=>import("./NotificationRoutes-CkKMsCoc.js")),__vite__mapDeps([58,1,2,3,13,4,5,6,7,9,21])))),ht=l((()=>t((()=>import("./PerformanceRoutes-Cu8GwbPn.js")),__vite__mapDeps([59,1,2,3,13,4,5,6,7,9,17,21])))),Et=l((()=>t((()=>import("./ExpenseAutomationRoutes-nIGBHuEd.js")),__vite__mapDeps([47,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21])))),pt=l((()=>t((()=>import("./RewardsRoutes-Dmsl5Hhz.js")),__vite__mapDeps([60,1,2,3,4,5,6,7,13,20,9,17,21])))),Rt=l((()=>t((()=>import("./TaskRoutes-X8P3xHwH.js")),__vite__mapDeps([61,1,2,3,13,4,5,6,7,14,17,62,9,21])))),xt=l((()=>t((()=>import("./AiCfoScreen-DXLxFBnQ.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,18,51,21])))),Ce=l((()=>t((()=>import("./CardsAiCfoScreen-BaEolMVN.js")),__vite__mapDeps([64,1,2,3,4,5,6,7,21])))),y=l((()=>t((()=>import("./NotFoundScreen-BUpSeNgf.js")),__vite__mapDeps([13,1,2,3,4,5,6,7,21])))),gt=l((()=>t((()=>import("./TaskListScreen-BtTYiD21.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,9,17,21]))));function St({setTenantEmailDomain:o}){const j=Hs(),B=Bs(),{tenantEmailDomain:i}=Vs(),L=Ms().mode,{setLoading:U,clearAllLoading:C,clearLoading:k}=Zs(),v=D.getSignedInUserTenant(i)?.tenantId,I=D.getSignedInUser(),se=ls(I),$=Ss(),[V,Pe]=O.useState(!1),r=G((n=>us(n))),{useFeatureGate:N}=Gs(),M=zs(),te=$s(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:ke}=N(z.isChargeCardFeatureEnabled),{isFeatureEnabled:ne}=N(z.isDebitCardFeatureEnabled),A=G((n=>n.tenantState.fetchState)),T=G((n=>n.tenantState.activeTenantFetchState.fetchState)),h=T==="Completed"||A==="Completed"?ds(ne,r):void 0,J=T==="Completed"||A==="Completed"?cs(r):void 0,He=Ys(r,ke,ne),{isCardsHidden:Be}=Ws(r?.tenantId),Ve=!He||!!Be,{isFeatureEnabled:Se}=N(z.isSettingsFeatureEnabled),{isFeatureEnabled:K}=N(z.isAiCfoFileUploadEnabled),Y=G((n=>ms(n)));if(i!=null){const n=D.getSignedInUserTenant(i);I!=null&&n!=null&&be(I,r,L)}const Z={tenantId:v,userId:I?.userId,sessionId:I?.zeniSessionId},ae=_s(),E=qs(),Ne=r.company==null||E?.loggedInUserRoleMap!=null&&pe(E.loggedInUserRole),Me=hs(E?.loggedInUserRoleMap),oe=O.useRef(!0),re=je("/:tenantEmailDomain/onboarding/*")!==null,X=je("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Ze=G((n=>Z.tenantId!=null?Es(n,Z.tenantId):void 0));O.useEffect((()=>{U(F.TENANT_FETCHING),o(i)}),[i]),O.useEffect((()=>{if(X!=null&&v!=null){const n=X.params.selectedPeriod;if(n!=null){const b=n.split("-");if(b.length===2){const d=ps(Number(b[0])),s=Number(b[1]),c=Rs(`01-${d<10?`0${d}`:d}-${s}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),S=xs();c.isAfter(S,"month")===!1?j(gs(v,{month:d,year:s})):B("./month_end_close_checks/review")}}}}),[X,v]),O.useEffect((()=>{V||(Pe(!0),U(F.TENANT_FETCHING)),oe.current?oe.current=!1:!Is(ae,Z)&&D.isSignedIn()&&(U(F.TENANT_FETCHING),(function(n,b,d,s){if(xe(b?.userId,b?.zeniSessionId,n.tenantId),d(Ls(!0)),d(ge(n.tenantId)),n.tenantId!=null&&_.clearTenant(n.tenantId),n.tenantId!=null){const c=D.getSignedInUserTenantWithId(n.tenantId);s&&Ae.updateAppLocaleID(Ks(s)),c?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(c?.tenantEmailDomain)}n.userId!=null?Q.identify(n.userId,{tenant_id:n.tenantId}):Q.resetUserIdentity()})(Z,I,j,Ze))}),[Z,ae,I,j,D]),O.useEffect((()=>{D.isSignedIn()&&(U(F.TENANT_FETCHING),(function(n,b,d,s,c,S,H){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const W=s!=null&&c?.zeniSessionId!=null,os=d==null||d.tenantId!==s,rs=d!=null&&d.excludedResources==null,is=d!=null&&d.externalConnections==null;if(W&&os){H(ge(s));const q=D.getSignedInUserTenantWithId(s);q?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(q?.tenantEmailDomain),xe(c?.userId,c?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),H(Ie(c.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),H(Te(c.userId,s)))}else W&&rs&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),H(Ie(c.userId,s))),W&&is&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),H(Te(c.userId,s)));if(W){Q.identify(c.userId,{tenant_id:s});const q=s==null||s!=null&&(b==="Completed"||b==="Error");n==="Completed"||b!=="Not-Started"&&b!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),S(F.TENANT_FETCHING),H(ks(c.userId,s,c.zeniSessionId))),q&&(n==="Not-Started"||n==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),H(Re(c.userId,c.zeniSessionId)))}})(A,T,r,v,I,U,j))}),[v,T]),O.useEffect((()=>{D.isSignedIn()&&A==="Completed"&&Y.tenantsBaseInOrder.length>0&&(k(F.TENANT_FETCHING),D.saveSignedInUserTenants(Ts(Y.tenantsBaseInOrder)),I!=null&&be(I,r,L,void 0,Y.tenantsBaseInOrder))}),[Y,A,r,I]),O.useEffect((()=>{T==="In-Progress"&&U(F.TENANT_FETCHING),T!=="Completed"&&T!=="Error"||(T==="Completed"&&v!=null?(C(),_.markActiveTenantFetchCompleted(v)):T==="Error"&&v!=null&&(_.markActiveTenantFetchFailed(v),k(F.TENANT_FETCHING),k(F.TENANT_SWITCHING))),A!=="Completed"&&A!=="Error"||(A==="Completed"?_.markAllTenantsFetchCompleted():A==="Error"&&_.markAllTenantsFetchFailed())}),[T,A,v,V]);const ie=O.useRef(!1);O.useEffect((()=>{!ie.current&&T==="Completed"&&V&&(ie.current=!0,(function(n=Qs,b=3e3){setTimeout((()=>{const d=s=>{if(s>=n.length)return;const c=n[s],S=Xs[c];S!=null?S().then((()=>ee((()=>d(s+1))))).catch((()=>ee((()=>d(s+1))))):d(s+1)};ee((()=>d(0)))}),b)})())}),[T,V]);const w=r?.userRole!=null&&js(r?.userRole),{isFeatureEnabled:Ge}=N(z.isReferralFeatureEnabled),ze=r?.userRole!=null&&r.userRole.includes("charge_card_user"),$e=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),P=r?.userRole!=null&&pe(r.userRole),le=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!w,ue=!Ve&&!w,Ye=As(E?.loggedInUserRoleMap),We=r.externalConnections?.accounting[0]?.isValid,de=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!w,me=ce&&bs(E?.loggedInUserRoleMap),_e=Fe&&!w,qe=Le&&!w,Je=le&&Ds(E?.loggedInUserRoleMap),Ke=ue&&fs(E?.loggedInUserRoleMap),Xe=_e&&ys(E?.loggedInUserRoleMap),Qe=Cs(E?.loggedInUserRoleMap),es=vs(E?.loggedInUserRoleMap),ss=Us(E?.loggedInUserRoleMap),ts=ws(E?.loggedInUserRoleMap),ns=Os(E?.loggedInUserRoleMap),p=Ps(E?.loggedInUserRoleMap),R=Fs(E?.loggedInUserRoleMap),he=le&&p,Ee=ce&&R,x=_e&&ss,g=qe&&ts,m=ue&&ns,as=r.excludedResources?.resources?.find((n=>n.resource==="/invites"))!=null||Me===!0||Ye===!0||Qe===!0||es===!0;return D.isSignedIn()?v==null?A==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(I!=null&&A!=="In-Progress"&&j(Re(I.userId,I.zeniSessionId)),null):T!=="In-Progress"&&T!=="Not-Started"||A==="Completed"?(de===!0||se&&!re)&&We===!1&&h===!1&&J===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!V||de!==!1||re||se?V&&r?.userRole&&h!=null&&J!=null&&i!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Ns,{children:e.jsxs(a,{element:e.jsx(Js,{}),children:[e.jsx(a,{path:"/",element:e.jsx(It,{isDashboardAccess:P,showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,isTenantCardsOnly:J,showChargeCardRoute:m})}),e.jsx(a,{path:"dashboard/*",element:P?e.jsx(it,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reports/*",element:P?e.jsx(et,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"people/*",element:as||P?e.jsx(tt,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"forecast/*",element:P?e.jsx(nt,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"onboarding/*",element:e.jsx(at,{})}),e.jsx(a,{path:"transaction/*",element:P&&w===!1||ze||$e?e.jsx(rt,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"transactions/*",element:P&&w===!1?e.jsx(ct,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"customer/*",element:P&&w===!1?e.jsx(De,{entityType:"customer"}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,isTenantBankingOnly:h,showTreasuryRoute:g,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"vendor/*",element:P&&w===!1?e.jsx(De,{entityType:"vendor"}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"tasks",element:e.jsx(gt,{})}),e.jsx(a,{path:"tasks/*",element:e.jsx(Rt,{})}),e.jsx(a,{path:"address/*",element:Je||me||Xe||Ke?e.jsx(st,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"checking/*",element:x?e.jsx(ut,{}):e.jsx(y,{})}),e.jsx(a,{path:"treasury/*",element:g?e.jsx(dt,{}):e.jsx(y,{})}),e.jsx(a,{path:"performance",element:te===!0?e.jsx(ht,{}):e.jsx(Oe,{tenantEmailDomain:i})}),e.jsx(a,{path:"month_end_close_checks/review/*",element:te===!0&&w===!1?e.jsx(Et,{}):e.jsx(Oe,{tenantEmailDomain:i})}),e.jsx(a,{path:"notifications/*",element:e.jsx(_t,{})}),e.jsx(a,{path:"vendors/*",element:Ne?e.jsx(ot,{}):e.jsx(y,{})}),e.jsx(a,{path:"bill/*",element:he?e.jsx(fe,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"bills/*",element:he?e.jsx(fe,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reimbursement/*",element:Ee?e.jsx(ye,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reimbursements/*",element:Ee?e.jsx(ye,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"settings/*",element:Se?e.jsx(lt,{hasAdminLevelAccess:me}):e.jsx(y,{})}),e.jsx(a,{path:"cards/ask",element:m&&M?e.jsx(Ce,{isFileUploadEnabled:K}):e.jsx(y,{})}),e.jsx(a,{path:"cards/ask/:session_id",element:m&&M?e.jsx(Ce,{isFileUploadEnabled:K}):e.jsx(y,{})}),e.jsx(a,{path:"cards/*",element:m?e.jsx(mt,{}):e.jsx(y,{})}),e.jsx(a,{path:"rewards/*",element:Ge?e.jsx(pt,{}):e.jsx(y,{})}),e.jsx(a,{path:"/ai-cfo",element:M?e.jsx(u,{to:"explore"}):e.jsx(y,{})}),e.jsx(a,{path:"/ai-cfo/",element:M?e.jsx(u,{to:"explore"}):e.jsx(y,{})}),e.jsx(a,{path:"/ai-cfo/:session_id",element:M?e.jsx(xt,{isFileUploadEnabled:K}):e.jsx(y,{})}),e.jsx(a,{path:"*",element:e.jsx(y,{})})]})}):null:(o(void 0),e.jsx(u,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}const It=({isDashboardAccess:o,showZeniAccountRoute:j,isUserHasBillPayAccess:B,isUserHasReimbursementAccess:i,showTreasuryRoute:L,isTenantBankingOnly:U,isTenantCardsOnly:C,showChargeCardRoute:k})=>{if(U===!0){if(j)return e.jsx(u,{to:"checking"});if(L)return e.jsx(u,{to:"treasury"});if(k)return e.jsx(u,{to:"cards"})}return C===!0&&k?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):j?e.jsx(u,{to:"checking"}):L?e.jsx(u,{to:"treasury"}):k?e.jsx(u,{to:"cards"}):B?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},f=({showZeniAccountRoute:o,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:B,showTreasuryRoute:i,isTenantBankingOnly:L,showChargeCardRoute:U,tenantEmailDomain:C})=>{if(L===!0){if(o)return e.jsx(Ue,{tenantEmailDomain:C});if(i)return e.jsx(ve,{tenantEmailDomain:C});if(U)return e.jsx(we,{tenantEmailDomain:C})}return o?e.jsx(Ue,{tenantEmailDomain:C}):i?e.jsx(ve,{tenantEmailDomain:C}):U?e.jsx(we,{tenantEmailDomain:C}):j?e.jsx(jt,{tenantEmailDomain:C}):B?e.jsx(Tt,{tenantEmailDomain:C}):e.jsx(y,{})},Tt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),jt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),ve=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),Ue=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),we=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),Oe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`});export{f as FallBackRoute,St as default};
@@ -1 +0,0 @@
1
- import{j as f}from"./liveblocks-tpE-grBU.js";import{a as u,b as A,q as M}from"./sentry-D58SEIt0.js";import{u as T,h as z,j as l,g as D,N as j,n as O}from"./core-0WK0Zss8.js";import{u as P,z as s,y as F,d as E,a as B,e as _,f as N,g as $,h as V,j as q,k as v}from"./index-Dy73EgcO.js";import{eX as J,L$ as W,M0 as X,fA as Y,g0 as Z,M5 as H,go as G,cZ as K,M6 as b,M7 as Q,M8 as R,bY as y}from"./zeni-epic-state-Bx_bp9Xr.js";import"./mui-NHWzIwJg.js";import{u as ee}from"./useDeviceId-SayLljl1.js";import{f as te}from"./analyticsHelper-C8vUB4gm.js";import{t as ne}from"./getLocaleForTenant-CqQ308VG.js";import"./recharts-CUzwcISX.js";import"./analytics-1WMvk5Rb.js";import"./plaid-59NT4aqa.js";import"./dnd-Dwsdp5ty.js";import"./stripe-cKAAJElX.js";import"./lottie-dQMhiLBj.js";import"./lexical-B9WqgH9H.js";import"./pdf-C4fX1mA3.js";import"./utils-CHGPa257.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]="e98340fe-456b-49d7-aaf9-473f7f41a9fe",t._sentryDebugIdIdentifier="sentry-dbid-e98340fe-456b-49d7-aaf9-473f7f41a9fe")}catch{}})();const ie=O((function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}}),(function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{M({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const c=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(R({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(c),sourceUri:y(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(Q(n,a)))},clearSignInError:()=>{t(b())}}}))(q),ae=A.memo(ie);function ve({setTenantEmailDomain:t}){const i=T(),d=z(),{clearAllLoading:g}=P(),n=s.getSignedInUser();u.useLayoutEffect((()=>{g()}),[g]);const a=ee(),c=l((e=>e.tenantState.magicLinkCodeVerifier)),{sendEmailMagicLinkFetchState:h,accountLocked:C,accountUnlockTime:k}=l((e=>e.tenantState)),p=l((e=>e.tenantState.fetchState)),L=l((e=>e.tenantState.activeTenantFetchState.fetchState)),S=l((e=>e.tenantState.signInState)),o=l((e=>e.tenantState.loggedInUser)),r=l((e=>J(e))),I=l((e=>W(e))),m=D(),w=F().mode,U=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect((()=>{h.fetchState==="Completed"&&c!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))}),[h.fetchState,c]),u.useEffect((()=>{t(void 0)}),[]),u.useEffect((()=>{S!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(X(I.tenantsInOrder),o.zeniSessionId),Y(o.userId,o.zeniSessionId,r.tenantId),i(Z(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(H("Completed")),B.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),G().then((()=>{const e=V();e!=null&&_(e)})),setTimeout((()=>{E.trackLogin(N.Event.loginSuccess,o.authProvider??"google",K(r.productSettings))}),2e3))}),[S,p,L,o,r,I,w,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(j,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!U,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),C===!0&&k!=null?f.jsx($,{onClose:()=>i(b()),unlockDate:k}):null]})}export{ve as default};
@@ -1,9 +0,0 @@
1
- import{j as s}from"./liveblocks-tpE-grBU.js";import{a as i}from"./sentry-D58SEIt0.js";import{u as d,g as l,N as u}from"./core-0WK0Zss8.js";import{z as n,d as a,f as m,B as p}from"./index-Dy73EgcO.js";import{gt as g,Mn as b}from"./zeni-epic-state-Bx_bp9Xr.js";import{n as y}from"./mui-NHWzIwJg.js";import"./recharts-CUzwcISX.js";import"./analytics-1WMvk5Rb.js";import"./plaid-59NT4aqa.js";import"./dnd-Dwsdp5ty.js";import"./stripe-cKAAJElX.js";import"./lottie-dQMhiLBj.js";import"./lexical-B9WqgH9H.js";import"./pdf-C4fX1mA3.js";import"./utils-CHGPa257.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="005f6327-ccb3-4540-be19-a975dfa1b1f0",e._sentryDebugIdIdentifier="sentry-dbid-005f6327-ccb3-4540-be19-a975dfa1b1f0")}catch{}})();function M(){const e=d(),t=l(),r=i.useRef(!1),f=n.isSignedIn(),o=t.state?.message==="logout"||f;return i.useEffect((()=>{if(o&&!r.current){r.current=!0;try{e(g()),b(),a.trackLogout(m.Event.logoutSuccess),a.resetUserIdentity(),n.clearAll()}catch(c){console.error("Error during sign out:",c)}finally{window.location.replace("/signin/auth")}}}),[o,e]),o?s.jsx(h,{children:s.jsx(p,{fetchState:"In-Progress"})}):s.jsx(u,{to:"../",replace:!0})}const h=y.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
- `;export{M as default};
@@ -1,9 +0,0 @@
1
- import{j as u}from"./liveblocks-tpE-grBU.js";import{a as b}from"./sentry-D58SEIt0.js";import{h as _,u as v,g as z,j as G,i as K,n as J}from"./core-0WK0Zss8.js";import{z as R,C as O,G as p,a0 as V,D as W,d as Z,f as q,dc as M,r as g,q as Q}from"./index-Dy73EgcO.js";import{eX as X,TP as F,J8 as I,TQ as x,TL as H,Iw as E,TR as Y,IE as y,H_ as aa,J9 as S,TS as B,fz as ea,I$ as ta,J4 as sa,IT as oa,IR as w,J5 as na,IO as ia,TT as la,TU as ra,TV as ca,TW as ka,TX as T,ej as da,TY as ua,TZ as pa}from"./zeni-epic-state-Bx_bp9Xr.js";import{n as Ta}from"./mui-NHWzIwJg.js";import{u as ma}from"./useAskAiCfoHostNavButtonProps-Dx1w_2sk.js";import{M as ga}from"./MobileAppDrawer-By5kqJZy.js";import"./recharts-CUzwcISX.js";import"./analytics-1WMvk5Rb.js";import"./plaid-59NT4aqa.js";import"./dnd-Dwsdp5ty.js";import"./stripe-cKAAJElX.js";import"./lottie-dQMhiLBj.js";import"./lexical-B9WqgH9H.js";import"./pdf-C4fX1mA3.js";import"./utils-CHGPa257.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="442d05c5-94b5-42b1-998d-41bce4ec9fcd",e._sentryDebugIdIdentifier="sentry-dbid-442d05c5-94b5-42b1-998d-41bce4ec9fcd")}catch{}})();const fa=Ta.div`
2
- display: flex;
3
- min-height: 100%;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `,ha=J((function(e,t){const o=F(e,t.isTaskTemplatesEnabled),{taskGroupId:c}=t,n=c!=null&&c!==""?{...o,taskGroupsWithTasksList:o.taskGroupsWithTasksList.map((l=>({...l,tasks:l.tasks.filter((a=>a.taskGroupIds.includes(c)))}))).filter((l=>l.tasks.length>0))}:o,d=H(e),i=R.isZeniUser();return{taskListView:n,tagListView:d,localData:n.localData,isTaskTemplatesEnabled:t.isTaskTemplatesEnabled,isZeniUser:i}}),(function(e,t){const{navigate:o,currentTenant:c,location:n,isTaskTemplatesEnabled:d}=t,{tenantEmailDomain:i}=c,{groupByKey:l}=t.uiState;return{onTaskManagementRowClick:a=>{const s=L(i,a),k=g(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:k}})},onReloadTasks:()=>{e(I(!0,d))},onTabChange:a=>{e(ka(a))},onParentTaskClick:a=>{const s=L(i,a);window.open(s,"_blank","noopener")},bulkUpdateTasks:(a,s)=>{e(w(a,null,s))},onNewTaskClick:()=>{if(t.localData.defaultTaskGroupId!=null){const a=C(i,t.localData.defaultTaskGroupId),s=g(n.state?.pathnameStackToGoBack,n.pathname);o(a,{state:{pathnameStackToGoBack:s,message:"comingFromTaskListPage"}})}},onColumnSortConfigChanged:(a,s)=>{e(B({uiState:{sortKey:a,sortOrder:s}}))},onFiltersChange:a=>{e(ca({filters:a}))},onSearchTextChanged:a=>{e(ra({searchText:a}))},onReloadCards:()=>{e(I(!0,d))},onBackClick:()=>{if(n.state?.message==="triggerBackClick"){const a=Q(n.state?.pathnameStackToGoBack),s=a.poppedPathname??"../";o(s,{state:{pathnameStackToGoBack:a.newStack}})}else o("../")},updateLocalData:a=>{e(la({localData:a}))},resetLocalData:()=>{e(x({taskGroupById:t.taskGroupState.taskGroupById}))},handleCreateGroup:a=>{e(ia(t.localData.newTaskGroupName,a))},assignGroupToTasks:a=>{e(w(t.localData.selectedTaskIds,a,na(t.uiState.groupByKey,a)))},onDeleteTaskGroup:a=>{e(oa(a))},onAddNewTaskToTaskGroup:a=>{if(t.localData.defaultTaskGroupId!=null){const s=Da(l,a);e(E({taskDetailLocalData:s}));const k=C(i,t.uiState.groupByKey==="groupName"?a:t.localData.defaultTaskGroupId),f=g(n.state?.pathnameStackToGoBack,n.pathname);o(k,{state:{pathnameStackToGoBack:f,message:"comingFromTaskListPage"}})}},onDragNDrop:(a,s)=>{e(sa(t.localData.selectedTaskIds.length>0?t.localData.selectedTaskIds:[a],s))},onTaskGroupRename:(a,s)=>{e(ta(a,s))},onTimeSpentUpdate:(a,s)=>{e(S({task:a,updates:s}))},onShowToast:a=>{e(ea(a))},onGroupByFilterChange:a=>{e(B({uiState:{groupByKey:a}}))},updateTask:(a,s)=>{e(S({task:a,updates:s}))},onCreateTagClick:(a,s)=>{e(aa(a,s))},handleGroupTemplateClick:a=>{e(y(a,[]))},handleGroupTemplateTaskClick:(a,s)=>{e(y(a,[s]))},handleNewTaskInitialization:a=>{if(e(E({taskDetailLocalData:{...Y,name:a}})),t.localData.defaultTaskGroupId!=null){const s=C(i,t.localData.defaultTaskGroupId),k=g(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:k,message:"comingFromTaskListPage"}})}},onTaskGroupNameClick:a=>{o(`/${i}/tasks/group/${a}`)},onQuickResponsesClick:()=>{o(`/${i}/tasks/quick-responses`)}}}))(M);function Na(){const e=_(),t=v(),o=z(),c=R.getSignedInUser(),n=G((r=>X(r))),{taskGroupId:d}=K(),{useFeatureGate:i}=O(),{isFeatureEnabled:l}=i(p.isTaskTemplatesEnabled),{isFeatureEnabled:a}=i(p.isTaskCannedResponsesEnabled),{isFeatureEnabled:s}=i(p.isTaskCategorizationEnabled),{isFeatureEnabled:k}=i(p.isTaskBulkResolutionEnabled),{isFeatureEnabled:f}=i(p.isTaskGroupAssigneesEnabled),{isFeatureEnabled:A}=i(p.isTaskRecurringParentEnabled),[P,$]=b.useState(!1),h=G((r=>F(r,l))),D=G((r=>r.taskGroupState)),m=h.fetchState,{isAiCfoAccessEnabled:j,onAskAiCfoClick:N}=ma({mobileExploreReferrer:"Task Checklist"});if(V({isDataReady:m==="Completed"}),b.useEffect((()=>{t(I(!1,l))}),[n?.tenantId,t,l]),b.useEffect((()=>{m==="Completed"&&t(x({taskGroupById:D.taskGroupById}))}),[m,D.taskGroupById]),c==null)throw Error("Can't access task list page without signing in...");return u.jsxs(u.Fragment,{children:[m==="Completed"?u.jsx(W,{analytics:Z,onLoad:r=>(U=>U.trackPageLoaded(q.Event.taskListPage))(r)}):null,u.jsxs(fa,{children:[u.jsx(ga,{isAppContentDrawerOpen:P,handleDrawerToggle:r=>{$(r)}}),u.jsx(ha,{location:o,navigate:e,currentTenant:n,taskGroupId:d,taskGroupState:D,localData:h.localData,uiState:h.uiState,isTaskTemplatesEnabled:l,taskListFetchState:m,isTaskCategorizationEnabled:s,isTaskCannedResponsesEnabled:a,isTaskBulkResolutionEnabled:k,isTaskGroupAssigneesEnabled:f,isTaskRecurringParentEnabled:A,isAiCfoAccessEnabled:j,onAskAiCfoClick:N})]})]})}const L=(e,t)=>`/${e}/tasks/${encodeURIComponent(t)}`,C=(e,t)=>`/${e}/tasks/new/${t}`,Da=(e,t)=>{if(e==="assignee"){const o=t.split(",");return{...T.taskDetailLocalData,assignee:o}}if(e==="priority"){const o=da(t);return{...T.taskDetailLocalData,priority:o}}if(e==="status"){const o=ua(t);return{...T.taskDetailLocalData,status:o}}if(e==="tag"){const o=t.split(",");return{...T.taskDetailLocalData,tagIds:o}}if(e==="dueDate"){const o=pa(t);return{...T.taskDetailLocalData,dueDate:o}}return{...T.taskDetailLocalData}};export{Na as default};
@@ -1,9 +0,0 @@
1
- import{j as n}from"./liveblocks-tpE-grBU.js";import se from"./NotFoundScreen-BUpSeNgf.js";import{a as c}from"./sentry-D58SEIt0.js";import{h as M,u as O,j as g,g as ne,i as oe,N as ie,n as re,o as ce,p as f}from"./core-0WK0Zss8.js";import{Ib as Z,Ie as le,I8 as de,eX as H,TL as Q,Is as X,I5 as pe,IY as ue,IR as ke,TM as J,TN as z,I1 as me,H_ as fe,rF as ge,rt as he,l8 as Ie,Im as Se,TO as Te,ID as be,IA as Ee,Ih as Ce,Ix as Ge,Iw as De}from"./zeni-epic-state-Bx_bp9Xr.js";import{z as G,da as xe,Q as ye,C as je,G as b,q as K,r as v,D as we,d as A,f as ve,db as Re,k as V,au as Fe}from"./index-Dy73EgcO.js";import{n as Be}from"./mui-NHWzIwJg.js";import{u as Pe}from"./useInitialThreadRequest-B7WOjZ27.js";import{M as Ue}from"./MobileAppDrawer-By5kqJZy.js";import Le from"./TaskListScreen-BtTYiD21.js";import"./recharts-CUzwcISX.js";import"./analytics-1WMvk5Rb.js";import"./plaid-59NT4aqa.js";import"./dnd-Dwsdp5ty.js";import"./stripe-cKAAJElX.js";import"./lottie-dQMhiLBj.js";import"./lexical-B9WqgH9H.js";import"./pdf-C4fX1mA3.js";import"./utils-CHGPa257.js";import"./useAskAiCfoHostNavButtonProps-Dx1w_2sk.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7214ac42-209c-4813-b710-b88f80f0dc10",e._sentryDebugIdIdentifier="sentry-dbid-7214ac42-209c-4813-b710-b88f80f0dc10")}catch{}})();function Ne(){const e=M(),t=O(),s=G.getSignedInUser(),{cannedResponses:u,fetchState:r,saveFetchState:d}=g((o=>o.cannedResponsesState)),l=c.useCallback((()=>{t(Z())}),[t]),k=c.useCallback(((o,h,I)=>{t(le({name:o,content:h,cannedResponseId:I}))}),[t]),a=c.useCallback((o=>{t(de({cannedResponseId:o}))}),[t]);if(s==null)throw Error("Can't access quick responses page without signing in...");return n.jsx(xe,{cannedResponses:u,isLoading:r==="In-Progress"||r==="Not-Started",isSaving:d==="In-Progress",onBackClick:()=>e(-1),onDelete:a,onFetch:l,onSave:k})}let q,_=[];const $e=re((function(e,t){const{location:s,taskGroupId:u}=t,r=J(e,t.taskId),d=H(e),l=r.taskGroupId??u,k=l!=null?z(e.taskGroupState,l):void 0,a=G.getSignedInUser(),o=d.tenantId,h={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:o??""},I=Q(e),{tenantEmailDomain:D}=d,E=r.recurringSourceTaskId,x=E!=null?`${V.appUrl}/${D}/tasks/${encodeURIComponent(E)}`:void 0;var S;return{taskDetailSelectorView:r,authParams:h,isZeniUser:G.isZeniUser(),userGroupList:((S=e.userGroupsState.userGroupByUserGroupId)!==q&&(q=S,_=Object.values(S)),_),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Fe.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${V.appUrl}${t.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:x,tagListView:I,taskGroupName:l!=null&&k!=null&&k.isDefault===!1?k.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map((p=>z(e.taskGroupState,p))).filter((p=>p!=null&&!p.isDeleted)).map((p=>({id:p.id,name:p.name,isDefault:p.isDefault})))}}),(function(e,t){const{taskId:s,navigate:u,currentTenant:r,location:d,taskGroupId:l}=t,{tenantEmailDomain:k}=r;return{onSaveChangesToLocalStore:a=>{e(De({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(Ge(s,a??l))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ce(t.taskId))},onSnoozeTask:(a,o)=>{e(Ee(a,o))},onUnsnoozeTask:a=>{e(be(a))},onDismissClick:()=>{if(d.state?.message==="triggerBackClick"){const a=K(d.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";u(o,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=R(k),o=v(d.state?.pathnameStackToGoBack,d.pathname);u(a,{state:{pathnameStackToGoBack:o}})}e(Te({taskId:s}))},onDeleteTaskClick:()=>{e(Se(s))},updateFilesEntity:a=>{e(Ie({files:a}))},onDeleteFile:a=>{e(he(a))},onEditFileName:(a,o)=>{e(ge(a,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(X(!1,s))},onCreateTagClick:a=>{e(fe(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(Z())},onManageTemplatesClick:()=>{u(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}}))(Re);function w(){const e=M(),t=O(),s=ne(),u=ye(),{taskId:r,taskGroupId:d}=oe(),l=g((i=>H(i))),k=Pe(l?.companyId),{useFeatureGate:a}=je(),{isFeatureEnabled:o}=a(b.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(b.isTaskVisibilityEnabled),{isFeatureEnabled:I}=a(b.isTaskCannedResponsesEnabled),{isFeatureEnabled:D}=a(b.isTaskRecurringParentEnabled),{isFeatureEnabled:E}=a(b.isTaskGroupAssigneesEnabled),[x,S]=c.useState(!1),[p,W]=c.useState(!1),[F,Y]=c.useState(!1),[B,ee]=c.useState(!1),[P,y]=c.useState(!1),T=c.useRef(!1),C=g((i=>i.taskListState.updateTasksFetchState.fetchState)),U=g((i=>Q(i))),L=g((i=>i.taskGroupViewState.fetchState));c.useEffect((()=>{p||(W(!0),t(X(!1,r)))}),[p,t]),c.useEffect((()=>{F||U.fetchState==="Completed"||(Y(!0),t(pe()))}),[F,t,U.fetchState]),c.useEffect((()=>{B||L==="Completed"||(ee(!0),t(ue()))}),[B,t,L]);const ae=c.useCallback((()=>{r!=null&&(T.current=!1,t(ke([r],null,{isArchived:!1})),y(!0))}),[t,r]);c.useEffect((()=>{if(P)if(C!=="In-Progress"){if(T.current){if(C==="Error")return y(!1),void(T.current=!1);if(C==="Completed"){y(!1),T.current=!1;const{tenantEmailDomain:i}=l;if(s.state?.message==="triggerBackClick"){const m=K(s.state?.pathnameStackToGoBack);e(m.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:m.newStack}})}else{const m=R(i);e(m,{state:{pathnameStackToGoBack:v(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else T.current=!0}),[P,C,l,s,e]);const N=g((i=>J(i,r))),j=N.fetchState,$=G.getSignedInUser();if($==null)throw Error("Can't access task detail page without signing in...");if(j==="Error"&&N.error?.code===400){const{tenantEmailDomain:i}=l,m=R(i),te=v(s.state?.pathnameStackToGoBack,s.pathname);return n.jsx(ie,{to:m,state:{pathnameStackToGoBack:te}})}return n.jsxs(n.Fragment,{children:[j==="Completed"?n.jsx(we,{analytics:A,onLoad:i=>(m=>m.trackPageLoaded(ve.Event.taskDetailPage))(i)}):null,n.jsxs(ze,{children:[n.jsx(Ue,{isAppContentDrawerOpen:x,handleDrawerToggle:i=>{S(i)}}),n.jsx($e,{analytics:A,currentTenant:l,handleZeniLogoClick:()=>{u.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:$,navigate:e,taskGroupId:d,taskId:r,taskDetailFetchState:j,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:I,isTaskRecurringParentEnabled:D,isTaskGroupAssigneesEnabled:E})]})]})}const ze=Be.div`
2
- display: flex;
3
- min-height: 100%;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `,R=e=>`/${e}/tasks`;function ia(){return n.jsxs(ce,{children:[n.jsx(f,{path:"/new",element:n.jsx(w,{})}),n.jsx(f,{path:"/new/:taskGroupId",element:n.jsx(w,{})}),n.jsx(f,{path:"/group/:taskGroupId",element:n.jsx(Le,{})}),n.jsx(f,{path:"/quick-responses",element:n.jsx(Ne,{})}),n.jsx(f,{path:"/:taskId",element:n.jsx(w,{})}),n.jsx(f,{path:"*",element:n.jsx(se,{})})]})}export{ia as default};
@@ -1,5 +0,0 @@
1
- import{j as x}from"./liveblocks-tpE-grBU.js";import{a as i}from"./sentry-D58SEIt0.js";import{u as q,k as Ye,j as S,s as fe,g as ge,h as Te,i as Ee,N as Qe,n as Xe}from"./core-0WK0Zss8.js";import{nR as he,eX as Q,gp as Ze,Ol as et,n2 as tt,mM as at,bn as nt,cV as be,bs as ve,rd as W,Nk as J,Om as Ie,On as oe,NK as De,kL as Ce,Oo as ke,NP as se,NQ as ce,lA as Ae,Kf as ie,Ne as M,kF as Oe,kD as Ue,kP as ot,nE as st,Op as ct,Oq as it,vu as Y,kK as xe,JA as we,ci as rt,c_ as lt,Or as dt,Nd as ut,Os as mt,vq as pt,Ot as ft,Ou as ht,Ov as yt,Ow as St,Ox as gt,kO as Tt,Oy as Et,Oz as bt,Nf as vt,OA as It,OB as Dt,OC as Ct,Ju as kt,Jk as At,JJ as Ot,kQ as Ut,Kg as ye,nJ as xt}from"./zeni-epic-state-Bx_bp9Xr.js";import{C as H,G as w,z as Pe,aS as _e,y as wt,m as Pt,aT as _t,E as Ft,q as ae,T as Vt,aU as Bt,r as ne,a0 as Nt,aV as Rt,d as Fe,aW as zt,au as Lt,a4 as te}from"./index-Dy73EgcO.js";import{n as Gt,S as jt,D as $t}from"./mui-NHWzIwJg.js";import{u as Mt}from"./useAskAiCfoHostNavButtonProps-Dx1w_2sk.js";import{d as Ve}from"./decodeURIComponentSafe-DYdex7Fp.js";import{h as Be,c as Ne,g as qt,e as Wt}from"./routePaths-YBRbNv0i.js";import{u as Jt}from"./utils-CHGPa257.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]="d1bd632c-d43e-483d-a636-2b4a3ec8f127",t._sentryDebugIdIdentifier="sentry-dbid-d1bd632c-d43e-483d-a636-2b4a3ec8f127")}catch{}})();function Ht(t=!0){const e=q(),s=Ye(),{useFeatureGate:a}=H(),{isFeatureEnabled:n}=a(w.isCreateTransferEntryFromExpenseEnabled);i.useEffect((()=>{if(!t||n!==!0)return;const o=c=>{const r=s.getState().createTransferEntryState.transferAccountsByType[c].fetchState;return r!=="In-Progress"&&r!=="Completed"};o("transferEntryEligible")&&e(he({kind:"transferEntryEligible"})),o("creditCardOnlyEligible")&&e(he({kind:"creditCardOnlyEligible"}))}),[t,n,e,s])}function Kt(t,e){const s=(function(){const r=q(),[p,g]=i.useState(!1),[A,y]=i.useState(null),[m,O]=i.useState(null),{useDynamicConfig:T}=H(),{configValue:f,isDynamicConfigLoading:C}=T("transaction_categorization_config"),I=!C&&f?.capitalization_enabled===!0,k=S((h=>Q(h))),E=k.companyId,U=S((h=>Ze(h.companyState,k.companyId)?.company.companyLocaleInfo?.currencySymbol??"$")),{capitalizableAccounts:P,capitalizableAccountOverrides:B,dismissedAccounts:L}=S((h=>{const b=h.tenantState.currentTenantId,u=b!=null?h.tenantState.tenantsById[b]:void 0;return{capitalizableAccounts:u?.capitalizableAccounts??null,capitalizableAccountOverrides:u?.capitalizableAccountOverrides??null,dismissedAccounts:u?.capitalizationOnboardingDismissedAccounts??null}}),fe),G=i.useRef(P);G.current=P;const N=i.useRef(B);N.current=B;const _=i.useRef(L);_.current=L;const R=S((h=>et(h.accountState)),fe),v=i.useMemo((()=>{const h={};for(const b of R)b.accountId!=null&&b.accountName!=null&&(h[b.accountId]=b.accountName);return h}),[R]),l=m!=null?v[m]??null:null,j=i.useCallback((h=>{if(!I)return;const b=G.current;if(b==null)return;const u=b.accounts??[],$=new Set(h),X=N.current??{},K=_.current;for(const z of u)if($.has(z.accountId)&&X[z.accountId]==null&&K?.[z.accountId]==null)return y(z.classificationType),O(z.accountId),void g(!0)}),[I]),D=i.useCallback(((h,b)=>{r(tt(E,h,b,!0)),g(!1),y(null),O(null)}),[r,E]),F=i.useCallback((()=>{m!=null&&(r(at(E,m)),g(!1),y(null),O(null))}),[r,E,m]);return{showPopup:p&&I,popupType:A,popupAccountId:m,popupAccountName:l,currencySymbol:U,checkAndShowPopup:j,handleSubmit:D,handleDismiss:F}})(),a=i.useRef(void 0),n=i.useRef([]),o=i.useRef(s.checkAndShowPopup);o.current=s.checkAndShowPopup;const c=i.useRef(e);return c.current=e,i.useEffect((()=>{t==="In-Progress"&&(n.current=c.current()),t==="Completed"&&a.current==="In-Progress"&&n.current.length>0&&(o.current(n.current),n.current=[]),a.current=t}),[t]),s}const re=()=>{const t=Pe.getSignedInUser(),{useFeatureGate:e}=H(),{isFeatureEnabled:s}=e(w.isChainOfThoughtEnabled);return i.useMemo((()=>nt(t)&&s),[t,s])};function Re(t){if(t!=null){if("customer"in t&&t.customer!=null){const{customer:e}=t;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in t&&t.vendor!=null){const{vendor:e}=t;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function ha(t,e){const s=q(),{useFeatureGate:a,useDynamicConfig:n}=H(),o=S((u=>Q(u))),c=o.userRole.includes("charge_card_user")||o.userRole.includes("charge_card_admin"),r=o.userRole!=null&&be(o.userRole),p=o.userRole!=null&&ve(o.userRole),{isFeatureEnabled:g}=a(w.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:A}=a(w.isExpenseAutomationEnabled),{configValue:y}=n(_e.enableUncategorizedExpenseCategory),m=y?.uncategorized_expense_category_enabled===!0,O=re(),T=i.useMemo((()=>({id:t,type:W(e)})),[t,e]),f=S((u=>J(u,T))),C=f?.transactionDetailUpdateStatus?.fetchState,I=f?.transactionDetailLocalData?.lineItemById,k=S((u=>{const $=J(u,T)?.transactionDetailLocalData.vendorUpdates?.id;return $==null?"Not-Started":u.transactionVendorViewState.editVendorStateById[$]?.saveStatus.fetchState??"Not-Started"})),E=i.useMemo((()=>f?.fetchState==="Completed"?Re(f?.transaction):void 0),[f?.fetchState,f?.transaction]),U=S((u=>{if(E!=null)return Ie(u.customerIncomeState,u.vendorExpenseState,u.trendState,E,"month")})),P=S((u=>oe(u))),B=S((u=>{if(E!=null)return De(u.trendWithTransactionsState,E,"TransactionDetail")})),L=o.company?.companyInfo.firstMonthOfFY??1,G=S((u=>Ce(u.accountState,u.accountListState,"accountList"))),[N,_]=i.useState(!1),[R,v]=i.useState(!1),[l,j]=i.useState(!1);i.useEffect((()=>{_(!1),v(!1),j(!1)}),[t,e]);const D=i.useCallback((()=>{_(!1),v(!1)}),[]),[F,h]=i.useState(!1),b=B?.selectedPeriod?.timePeriod;return i.useEffect((()=>{l||f==null||f.transaction==null||(s(ke({id:f.transaction.id,type:f.transaction.type})),j(!0)),E!=null&&(!c||r&&p===!1)&&(N?R||U==null||(v(!0),s(ie(E,"TransactionDetail",{timeframe:"month",timePeriod:b??U}))):(s(se()),s(ce()),_(!0),s(Ae(E))))}),[s,l,f?.fetchState,f?.transaction,E,c,r,p,N,R,U,b]),i.useEffect((()=>{P.newVendorState?.vendorDetailLocalData?.vendorName!=null?h(!0):h(!1)}),[P.newVendorState?.vendorDetailLocalData?.vendorName]),i.useEffect((()=>()=>{s(M("common"))}),[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:c,isUserHasDashboardAccess:r,isUserHasInvestorOrBankerAccess:p,isVendorBulkUpdateOnTransactionEnabled:g,isExpenseAutomationEnabled:A,isUncategorizedExpenseCategoryEnabled:m,isChainOfThoughtEnabled:O,selectedTransaction:T,transactionDetail:f,rawDetailSaveStatus:C,rawDetailLineItemById:I,vendorSaveStatus:k,tranEntity:E,defaultTrendTransactionTimePeriod:U,vendorViewDetails:P,uiState:B,firstMonthOfFY:L,uncategorizedAccounts:G,resetTrendIsFetchedStates:D,isCreateVendorDrawerOpen:F,setIsCreateVendorDrawerOpen:h}}const Yt={overlayWidth:new Ft(100,100,58)},Qt=({isOpen:t,onSaveVendor:e,onSaveSuccess:s,onCancel:a,vendorViewDetails:n})=>{const o=wt(),c=Pt(),r=q(),p=S((y=>oe(y))),g=()=>{a()},A={vendorDetailView:n??p,onSaveSuccess:()=>{r(Ue()),r(ot("Not-Started")),s()},onSaveVendor:e,onCancelClick:g,saveVendorDetailLocalData:y=>{r(Oe({vendorId:void 0,localData:y}))}};return x.jsx($t,{anchor:"right",open:t,PaperProps:{style:{width:Yt.overlayWidth.valuePercentage(c),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:g,children:x.jsx(Xt,{onClick:y=>y.stopPropagation(),children:x.jsx(_t,{...A})})})},Xt=Gt(jt)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `;function Zt(t,e){t(st({transactionId:e.transactionId,creditAccountIntegrationId:e.creditAccountIntegrationId,debitAccountIntegrationId:e.debitAccountIntegrationId,memo:e.memo,transactionType:W(e.transactionType),sourceTransactionType:W(e.sourceTransactionType)}))}function ea({currentTransactionId:t,enabled:e=!0,buildPath:s,beforeNavigate:a,navigate:n,navigateState:o}){const c=S((p=>p.createTransferEntryState.lastTransferEntryReplacement)),r=i.useRef(null);i.useEffect((()=>{if(!e||c==null||t==null||r.current===c)return;const{previousTransactionId:p,newTransactionId:g}=c;t.id===p.id&&t.type===p.type&&(r.current=c,a?.(),n(s(g),{replace:!0,state:o}))}),[e,c,t,s,a,n,o])}const ta=({closeDrawerHandler:t,overrideTransactionId:e,overrideTransactionType:s})=>{const a=ge(),n=Te(),o=q(),c=re(),{transactionTypeEncoded:r,transactionId:p}=Ee(),g=e??p,A=s??Ve(r??"");let y;Be(g,A)&&(y={id:g,type:W(A)});const m=y!=null?S((T=>J(T,y))):void 0,O=()=>{const T=ae(a.state?.pathnameStackToGoBack),f=T.poppedPathname??((C=2)=>{let I="../";for(let k=0;k<C;k++)I=`${I}../`;return I})(1);n(f,{state:{pathnameStackToGoBack:T.newStack}})};return{transactionId:y,onSaveVendor:()=>{o(xe(y,void 0))},onSaveSuccess:()=>{if(m!=null&&m?.transaction&&m?.transactionDetailLocalData.vendorUpdates?.qboId!=null&&m?.transactionDetailLocalData.vendorUpdates?.id!=null){const T=m?.transactionDetailLocalData.vendorUpdates,f={id:m?.transactionDetailLocalData.vendorUpdates?.qboId,zeniId:m?.transactionDetailLocalData.vendorUpdates?.id,type:"vendor",name:T?.name,qboId:m?.transactionDetailLocalData.vendorUpdates?.qboId??""},C={transactionId:{id:m?.transaction?.id,type:m?.transaction?.type},transaction:m?.transaction,lineIds:m?.transaction?.lines?.map((I=>I.id))??[]};o(Y({entity:f,amount:m?.transaction?.amount.amount,transactionDetails:C,flowType:"detail",isFetchCOT:c}))}O()},onCancel:()=>{y!=null&&o(ct({transactionId:y})),o(Ue()),o(it()),t(!0),O()}}},aa=Xe((function(t,e){const s=J(t,e.selectedTransaction);let a;s==null&&console.warn("Check if the you've selected the transaction before getting the details");const n=Pe.getSignedInUser(),o=t.tenantState.currentTenantId,c={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:o??""};s!=null&&s.fetchState==="Completed"&&s.transaction!=null&&e.entity!=null&&(a=dt(t,e.entity,"TransactionDetail"));const r=t.entityAutoCompleteState.autoCompleteText.common,p=ut(t,"common"),g=Q(t);return{transactionDetail:s,transactionAttachmentEndpointToDownload:`${te}/transaction_attachment`,transactionAttachmentsEndpointToFetch:g.externalConnections?.accounting[0]?.connectionName==="netsuite"?`${te}/transaction_attachments_accounting_provider`:`${te}/transaction_attachments`,attachmentUploadEndpoint:`${Lt.accountMicroServiceBaseUrl}`,isCOTEnabled:e.isCOTEnabled,authParams:c,trendReport:a,analytics:Fe,uncategorizedAccounts:e.uncategorizedAccounts,autoCompleteData:{autoCompleteText:r,entityAutoCompleteView:p},isVendorBulkUpdateOnTransactionEnabled:e.isVendorBulkUpdateOnTransactionEnabled,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled,enableBackClickOnSave:e.location.state?.message?.startsWith("comingFromScheduleDetails")}}),(function(t,e){const{isCOTEnabled:s}=e;return{onBackClick:()=>{if(t(M("common")),e.onBackClick!=null)return void e.onBackClick();const a=ae(e.location.state?.pathnameStackToGoBack),n=a.poppedPathname??ze(2);e.navigate(n,{state:{pathnameStackToGoBack:a.newStack,message:"comingFromTransactionDetail"}})},discardTransactionDetailLocalData:(a,n)=>{e.transaction!=null&&t(xt({transactionId:{id:e.transaction.id,type:e.transaction.type},vendorId:a,customerId:n}))},onTransactionClick:a=>{e.resetTrendIsFetchedStates(),t(se()),t(ce());const n=ne(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(Ne(a,e.tenantEmailDomain),{state:{pathnameStackToGoBack:n}})},onTrendSelectedPeriodChange:a=>{if(a==null)e.defaultTrendTransactionTimePeriod!=null&&t(ye(e.entity,"TransactionDetail",{timeframe:"month",timePeriod:e.defaultTrendTransactionTimePeriod}));else{const n=a.currentTimePeriod==null?a.addTimePeriod:{startDate:a.addTimePeriod.startDate,endDate:a.currentTimePeriod.endDate};t(ie(e.entity,"TransactionDetail",{timeframe:a.timeframe,timePeriod:a.addTimePeriod})),t(ye(e.entity,"TransactionDetail",{timeframe:a.timeframe,timePeriod:n}))}},onSaveUpdates:(a,n,o,c)=>{t(c===!0&&o!=null?xe(a,o,!0,e.isExpenseAutomationEnabled,e.isUncategorizedExpenseCategoryEnabled):Ut({transactionId:a,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,cotTransactionTracking:n,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled})),t(M("common"))},onUploadAttachmentAttachment:a=>{t(Ot(a))},onDeleteAttachment:a=>{e.transaction!=null&&t(At(a,{id:e.transaction.id,type:e.transaction.type}))},onSaveTransactionDetailLocalData:(a,n)=>{t(kt({transactionId:a,transactionLocalData:n}))},onUpdateAllChecked:(a,n,o,c)=>{e.transaction!=null&&t(Ct(e.selectedTransaction,e.transaction,a,n,o,c))},onResetLineItemsCategoryClassInLocalData:(a,n,o,c,r,p)=>{t(Dt(a,n,o,c,r,p))},onChangeCategoryClassWhenUpdateAllIsChecked:(a,n)=>{e.transaction!=null&&t(It({id:e.transaction.id,type:e.transaction.type},e.transaction,a,n))},onSaveSuccess:()=>{const a=ae(e.location.state?.pathnameStackToGoBack);if(a.poppedPathname!=null){const n=Jt(a.poppedPathname,"/").split("/"),o=n[n.length-1];if(["uncategorized-income","uncategorized-expense","missing-receipts"].includes(o)&&e.navigate(a.poppedPathname,{state:{pathnameStackToGoBack:a.newStack}}),e.location.state?.message==="comingFromScheduleDetails"){const c=`${qt(e.tenantEmailDomain)}`;e.navigate(c)}else if(e.location.state?.message==="comingFromScheduleDetailsFixedAssets"){const c=`${Wt(e.tenantEmailDomain)}`;e.navigate(c)}}},onPageRefresh:()=>{t(we(e.selectedTransaction,!0))},autoCompleteActions:{onAutoCompleteInputChange:(a,n)=>{a.trim().length>=2?t(vt({searchString:a,entityType:n,searchOrigin:"common"})):a.trim().length===0&&t(M("common"))},onCancelAutoComplete:()=>{t(M("common"))}},onFetchRecommendationsForEntity:(a,n,o,c)=>{t(Y({entity:a,amount:n,transactionDetails:o,flowType:"detail",isFetchCOT:s}))},clearRecommendationForLineId:a=>{const{transactionId:n,transaction:o,lineId:c}=a;t(bt(n,o,c))},resetUpdateErrorState:()=>{const a={id:e.selectedTransaction.id,type:e.selectedTransaction.type};t(Et(a))},onSaveVendorInLocalData:(a,n,o,c,r)=>{if(t(Tt({transactionId:a,vendorUpdates:n,entity:o})),n.id!=null&&o!=null&&c!=null&&r!=null&&t(Y({entity:o,amount:c,transactionDetails:r,flowType:"detail",isFetchCOT:s})),t(Oe({vendorId:n.id?n.id:void 0,localData:{vendorName:n.name,vendorId:n.id?n.id:void 0}})),!n.id&&e.transaction!=null){const p=e.transaction,g=ne(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(`/${e.tenantEmailDomain}/transaction/${encodeURIComponent(p.type??"")}/${p.id}/vendor/create`,{state:{pathnameStackToGoBack:g}})}},onSaveCustomerInLocalData:(a,n,o,c,r)=>{t(gt({transactionId:a,customerUpdates:n,entity:o})),n.id!=null&&o!=null&&c!=null&&r!=null&&t(Y({entity:o,amount:c,transactionDetails:r,flowType:"detail",isFetchCOT:s}))},onUpdateAllTranactionsWithCurrentVendorChecked:a=>{t(St({transactionId:{id:e.selectedTransaction.id,type:e.selectedTransaction.type},isUpdateEnabled:a}))},onClickUpdateVendorToAllLineItems:(a,n,o)=>{t(yt(a,n,o))},onResetVendorToAllLineItems:(a,n,o)=>{t(ht(a,n,o))},saveLatestSelectedEntity:(a,n,o)=>{t(ft({transactionId:a,lineId:n,entity:o}))},updateVendorBulkRecommendationsFetchStatus:(a,n)=>{t(pt(a,n))},setIsVendorUpdateAllChecked:(a,n,o)=>{t(mt(a,n,o))},onCreateTransferEntry:e.isCreateTransferEntryFromExpenseEnabled===!0?a=>Zt(t,a):void 0}}))(zt);function ya(){const t=Te(),e=q(),s=ge(),{useFeatureGate:a,useDynamicConfig:n}=H(),o=Vt(),c=S((d=>Q(d))),r=c.userRole.includes("charge_card_user")||c.userRole.includes("charge_card_admin"),p=c.userRole!=null&&be(c.userRole),g=c.userRole!=null&&ve(c.userRole),{isFeatureEnabled:A}=a(w.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:y}=a(w.isExpenseAutomationEnabled),{configValue:m}=n(_e.enableUncategorizedExpenseCategory),O=m?.uncategorized_expense_category_enabled===!0,{tenantEmailDomain:T,transactionTypeEncoded:f,transactionId:C}=Ee(),[I,k]=i.useState(!1),E=Ve(f??""),U=Be(C,E),P=S((d=>d.transactionVendorViewState)),B=re(),{isFeatureEnabled:L}=a(w.isTransactionCommentingEnabled),{isFeatureEnabled:G}=a(w.isCreateTransferEntryFromExpenseEnabled),{isFeatureEnabled:N}=a(w.isProjectsTransactionsEnabled),_=o?.currentTenant?.companyId,R=o?.currentTenant?.companyName,v=i.useMemo((()=>{if(U)return{id:C,type:W(E)}}),[U,C,E]),l=v!=null?S((d=>J(d,v))):void 0,j=l?.transactionDetailLocalData.vendorUpdates?.id!=null?P.editVendorStateById[l?.transactionDetailLocalData.vendorUpdates.id]?.saveStatus.fetchState:"Not-Started",D=l?.fetchState==="Completed"?Re(l?.transaction):void 0,F=S((d=>D!=null?Ie(d.customerIncomeState,d.vendorExpenseState,d.trendState,D,"month"):void 0)),h=S((d=>oe(d))),b=S((d=>D!=null?De(d.trendWithTransactionsState,D,"TransactionDetail"):void 0)),u=c.company?.companyInfo.firstMonthOfFY??1,$=S((d=>Ce(d.accountState,d.accountListState,"accountList"))),[X,K]=i.useState(!1),[z,le]=i.useState(!1),[Le,de]=i.useState(!1),Ge=i.useCallback((d=>Ne(d,T??"")+s.search),[T,s.search]),je=i.useCallback((()=>{de(!1)}),[]);ea({currentTransactionId:v,enabled:T!=null&&T!=="",buildPath:Ge,beforeNavigate:je,navigate:t,navigateState:s.state});const ue=()=>{K(!1),le(!1)},me=Bt();Ht();const Z=i.useRef(l?.transaction);Z.current=l?.transaction;const $e=l?.transactionDetailUpdateStatus?.fetchState,V=Kt($e,(()=>{const d=[];if(Z.current!=null)for(const ee of Z.current.lines??[])"account"in ee&&ee.account?.accountId!=null&&d.push(ee.account.accountId);return d}));i.useEffect((()=>{v!=null&&l!=null&&l.fetchState==="Not-Started"&&(e(we(v,!1)),ue())}),[e,v,l?.fetchState]),i.useEffect((()=>{if(v!=null&&l?.fetchState==="Error"){const d=ne(s.state?.pathnameStackToGoBack,s.pathname);t("page-not-found",{replace:!0,state:me?{pathnameStackToGoBack:d,message:"expenseAutomation",origin:"transaction_categorization"}:{pathnameStackToGoBack:d,message:"pageNotFound",origin:"transaction_detail"}})}}),[v,l?.fetchState,t,s.state,s.pathname,me]),i.useEffect((()=>{Le||l==null||l.transaction==null||(e(ke({id:l.transaction.id,type:l.transaction.type})),de(!0)),D==null&&l?.fetchState==="Completed"&&Se(l?.transaction),D!=null&&(!r||p&&g===!1)&&(X?z||F==null||(le(!0),e(ie(D,"TransactionDetail",{timeframe:"month",timePeriod:b?.selectedPeriod?.timePeriod??F}))):(e(se()),e(ce()),Se(l?.transaction),K(!0),e(Ae(D))))}),[l?.fetchState,l?.transaction,F,r]),i.useEffect((()=>{h.newVendorState?.vendorDetailLocalData?.vendorName!=null?k(!0):k(!1)}),[h.newVendorState?.vendorDetailLocalData?.vendorName]),i.useEffect((()=>()=>{e(M("common"))}),[]);const Me=[f,C].filter((d=>d!=null)),{transactionId:pe,onSaveVendor:qe,onSaveSuccess:We,onCancel:Je}=ta({closeDrawerHandler:d=>{k(!1),t(d?"../":"../..")}}),{isAiCfoAccessEnabled:He,onAskAiCfoClick:Ke}=Mt({mobileExploreReferrer:"Transaction Details"});return Nt({isDataReady:l?.fetchState==="Completed"}),U?x.jsxs(x.Fragment,{children:[pe!=null&&I&&x.jsx(Qt,{isOpen:I,transactionId:pe,onSaveVendor:qe,onSaveSuccess:We,onCancel:Je}),x.jsx(aa,{hideDeleteAttachment:!0,firstMonthOfFY:u,isDisabled:l?.transaction?.type==="transfer"&&o?.connectionName==="netsuite"?"readonly":void 0,tenantEmailDomain:T,location:s,navigate:t,selectedTransaction:v,entity:D,isCOTEnabled:B,defaultTrendTransactionTimePeriod:F,resetTrendIsFetchedStates:ue,transaction:l?.transaction,uncategorizedAccounts:$,vendorSaveStatus:j,isVendorBulkUpdateOnTransactionEnabled:A,isCreateTransferEntryFromExpenseEnabled:G,isExpenseAutomationEnabled:y,isUncategorizedExpenseCategoryEnabled:O,isAiCfoAccessEnabled:He,onAskAiCfoClick:Ke,isTransactionCommentingEnabled:L,isProjectsTransactionsEnabled:N,companyId:_,companyName:R}),V.showPopup&&V.popupType!=null&&x.jsx(Rt,{popupType:V.popupType,currencySymbol:V.currencySymbol,accountId:V.popupAccountId??"",accountName:V.popupAccountName??"",onSubmit:V.handleSubmit,onDismiss:V.handleDismiss})]}):x.jsx(Qe,{to:ze(Me.length)})}const ze=(t=2)=>{let e="../";for(let s=0;s<t;s++)e=`${e}../`;return e},Se=t=>{if(t!=null){const{transactionCategory:e,transactionClass:s}=na(t),a=oa(t);Fe.trackTransactionDetails(t.account?.accountId,t.account?.accountName,t.id,a,e.length>0?e:void 0,s.length>0?s:void 0,t.type,t.amount,t.memo,t.lines?.length??0,t.attachments?.map((n=>n.fileName)))}},na=t=>{const e=[],s=[];return t.lines?.forEach((a=>{switch(a.type){case"transaction_with_account_and_class_line":case"transaction_with_product_or_service_line":case"journal_entry_transaction_line":case"linked_transaction_line":{const n=a;n!=null&&n.account!=null&&n.account.accountName?.length>0&&e.push(n.account.accountName),n.class!=null&&n.class.className?.length>0&&s.push(n.class.className);break}}})),{transactionCategory:e,transactionClass:s}},oa=t=>rt(t)===!0?t.customer?.name??"":lt(t)===!0?t.vendor?.name??"":t.memo!=null?t.memo:t.type;export{Qt as C,ya as T,Ht as a,Kt as b,ta as c,aa as d,ea as e,re as f,Zt as g,ha as u};