@zeniai/web-app-ui 5.2.15-qa → 5.2.16-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 (131) hide show
  1. package/dist/assets/AddressRoutes-CvVopZml.js +1 -0
  2. package/dist/assets/{AddressScreen-Cghsd8AF.js → AddressScreen-DWZ3m1W6.js} +2 -2
  3. package/dist/assets/{AiCfoScreen-CzUpn_XQ.js → AiCfoScreen-DiSXwSAy.js} +3 -3
  4. package/dist/assets/{BillPayApprovalRoutes-1xHFB4_G.js → BillPayApprovalRoutes-Bzj_wN2N.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-CQEZhXWJ.js → BillPayRoutes-Bf6AaWgJ.js} +1 -1
  6. package/dist/assets/{BusinessVerificationPageScreen-CB_FGxY4.js → BusinessVerificationPageScreen-DFVMEcvH.js} +2 -2
  7. package/dist/assets/{CardsAiCfoScreen-3KsnF1t1.js → CardsAiCfoScreen-CvKPSEX_.js} +3 -3
  8. package/dist/assets/{ChargeCardRoutes-O25seQLJ.js → ChargeCardRoutes-B_kWsesI.js} +8 -8
  9. package/dist/assets/CompanyPassportScreen-D3CNonob.js +1 -0
  10. package/dist/assets/{ConnectionAuthScreen-DgMKH21m.js → ConnectionAuthScreen-BN3ff9tH.js} +1 -1
  11. package/dist/assets/CustomerOnboardingAuthScreen-DlKfeAMx.js +1 -0
  12. package/dist/assets/{CustomerOnboardingRoutes-D3QZqtw-.js → CustomerOnboardingRoutes-fNU7A_X6.js} +6 -6
  13. package/dist/assets/{DashboardRoutes-BqyD3tS0.js → DashboardRoutes-vwFGyOnq.js} +1 -1
  14. package/dist/assets/{DefaultTenantHome-Vrs9w3px.js → DefaultTenantHome-COmsVe67.js} +1 -1
  15. package/dist/assets/DomesticWireDetailScreen-Bmq0Ta-G.js +18 -0
  16. package/dist/assets/DrawerScreen-CFNs8DOc.js +1 -0
  17. package/dist/assets/EntityDetailRoutes-BhHCRnyf.js +1 -0
  18. package/dist/assets/ExpenseAutomationRoutes-Bcbqp-xi.js +25 -0
  19. package/dist/assets/FeaturePreviewScreen-CQa-Dzig.js +1 -0
  20. package/dist/assets/{HubSpotOAuthCallbackScreen-BXnSQnHv.js → HubSpotOAuthCallbackScreen-yv2-7Ea8.js} +1 -1
  21. package/dist/assets/MagicLinkRoutes-DSjPLdSb.js +72 -0
  22. package/dist/assets/MagicLinkSignInScreen-D_r-xHBU.js +12 -0
  23. package/dist/assets/MobileAppDrawer-CcKlE5IP.js +1 -0
  24. package/dist/assets/NotFoundScreen-DlOrYovK.js +1 -0
  25. package/dist/assets/{NotificationRoutes-BRKTm1Ne.js → NotificationRoutes-gyrenPAq.js} +1 -1
  26. package/dist/assets/OAuthConsentScreen-1d0A0tZs.js +1 -0
  27. package/dist/assets/{PandLWithForecastRoutes-B2EmklfO.js → PandLWithForecastRoutes-DjhLwT7A.js} +1 -1
  28. package/dist/assets/PeopleRoutes-B4_xTiyk.js +22 -0
  29. package/dist/assets/PerformanceRoutes-DylBZUt_.js +1 -0
  30. package/dist/assets/{Preview-Q7E6grqg.js → Preview-CcprGnkI.js} +1 -1
  31. package/dist/assets/{QBOConnectionScreen-ibUYeVer.js → QBOConnectionScreen-TnPId4Sm.js} +1 -1
  32. package/dist/assets/ReimbursementApprovalRoutes-POVUD6sL.js +1 -0
  33. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-ZZ1ge8yw.js → ReimbursementApprovalRuleDetailScreen-DdpFdkik.js} +1 -1
  34. package/dist/assets/{ReimbursementRoutes-DngluHTS.js → ReimbursementRoutes-CEVKaVBL.js} +7 -7
  35. package/dist/assets/{ReportsRoutes-CM8Ic-LD.js → ReportsRoutes-B1TQ9Bhd.js} +1 -1
  36. package/dist/assets/RewardsRoutes-DfP429d0.js +1 -0
  37. package/dist/assets/{ScreenRoutes-Cqn5rEvL.js → ScreenRoutes-B4XnnElP.js} +2 -2
  38. package/dist/assets/{SettingsRoutes-DP0WHPGX.js → SettingsRoutes-Cwng1-zQ.js} +7 -7
  39. package/dist/assets/{SetupPagesScreen-CeI_lyzl.js → SetupPagesScreen-DFoSoY9W.js} +5 -5
  40. package/dist/assets/SignInScreen-e-dzxuhM.js +1 -0
  41. package/dist/assets/SignOutScreen-zX0f3nhU.js +9 -0
  42. package/dist/assets/{TaskListScreen-BnNQR3xi.js → TaskListScreen-DDBul9iH.js} +2 -2
  43. package/dist/assets/TaskRoutes-8qo7Ls7z.js +9 -0
  44. package/dist/assets/{TransactionDetailRoutes-JE1zhf5_.js → TransactionDetailRoutes-djuKroPk.js} +1 -1
  45. package/dist/assets/TransactionDetailScreen-D5r3-Mgi.js +5 -0
  46. package/dist/assets/{TransactionListRoutes-CLT0ugHA.js → TransactionListRoutes-DZo7bIuR.js} +1 -1
  47. package/dist/assets/{TreasuryRoutes-DGF0Ml1C.js → TreasuryRoutes-Dicm3fpM.js} +5 -5
  48. package/dist/assets/{VendorsRoutes-1x6Cup5r.js → VendorsRoutes-CSBYzvJD.js} +13 -13
  49. package/dist/assets/WiseConfirmationScreen-Cq4Two3C.js +12 -0
  50. package/dist/assets/{ZeniAccountRoutes-CQvULhdG.js → ZeniAccountRoutes-BZkpbBgO.js} +7 -7
  51. package/dist/assets/ZeniAccountStatementScreen-CrIZG1fJ.js +9 -0
  52. package/dist/assets/{accountMappingHelper-C5WHpsgJ.js → accountMappingHelper-DvHt_faU.js} +1 -1
  53. package/dist/assets/{analytics-D_NuuF2U.js → analytics-fzE8ssbj.js} +1 -1
  54. package/dist/assets/analyticsHelper-H9dml3jr.js +1 -0
  55. package/dist/assets/{core-Da6TLrNx.js → core-Bnb5S7eF.js} +1 -1
  56. package/dist/assets/{decodeURIComponentSafe-B-r3T5bV.js → decodeURIComponentSafe-IB5WoVjO.js} +1 -1
  57. package/dist/assets/{dnd-DC_qF3Wr.js → dnd-BclBZkmc.js} +1 -1
  58. package/dist/assets/{empty-s0Z9SHTS.js → empty-BXrJtoVu.js} +1 -1
  59. package/dist/assets/{empty-C73kmkO9.js → empty-CGGO74v5.js} +1 -1
  60. package/dist/assets/{emptyVideoElement-CUd0nWeJ.js → emptyVideoElement-DBjMlLZt.js} +1 -1
  61. package/dist/assets/epic-Bq9rvz3h.js +2 -0
  62. package/dist/assets/getLocaleForTenant-CqG7z-4D.js +1 -0
  63. package/dist/assets/{index-DykhB8j2.js → index-B9FzYJpE.js} +1 -1
  64. package/dist/assets/{index-DAI9X2Zp.js → index-BSl9hMca.js} +2 -2
  65. package/dist/assets/{index-XC9zB3-f.js → index-BfeFOTnu.js} +1 -1
  66. package/dist/assets/{index-CsQZjvif.js → index-D7gFR706.js} +1 -1
  67. package/dist/assets/{index-Di1s4e5m.js → index-DQqz4S7_.js} +14415 -14185
  68. package/dist/assets/{index-b_fXiiPC.js → index-DRI9BXaF.js} +1 -1
  69. package/dist/assets/{index-CWFrIv4j.js → index-gZ-YqOdE.js} +1 -1
  70. package/dist/assets/{index-COd9LNlP.js → index-oAxAWZsp.js} +1 -1
  71. package/dist/assets/{lexical-CQoPutFC.js → lexical-DbVLnI8g.js} +1 -1
  72. package/dist/assets/{liveblocks-C8AAaKDR.js → liveblocks-bqFl_SVp.js} +1 -1
  73. package/dist/assets/{lottie-B7_cpoe1.js → lottie-CosVBOrn.js} +1 -1
  74. package/dist/assets/{mui-CosLSKUu.js → mui-BAFflVdx.js} +1 -1
  75. package/dist/assets/{pathToGoBack-C_jELk-6.js → pathToGoBack-BX0vhbVE.js} +1 -1
  76. package/dist/assets/{pdf-CQB-J2hc.js → pdf-Ba7sOjY6.js} +3 -3
  77. package/dist/assets/{pdf-lib-CscVz5ta.js → pdf-lib-Sz3Y8uGi.js} +1 -1
  78. package/dist/assets/{plaid-2mv_ck83.js → plaid-Il6Pn-tK.js} +1 -1
  79. package/dist/assets/{pusher-DrRS7JyV.js → pusher-DSTN6BAp.js} +1 -1
  80. package/dist/assets/{react-B7r6-bpj.js → react-Ahj_9ocn.js} +1 -1
  81. package/dist/assets/{react-DTDSsBUn.js → react-BQr1_2Lm.js} +1 -1
  82. package/dist/assets/{react-C6MFx27g.js → react-DF-XRbvU.js} +1 -1
  83. package/dist/assets/{react-B42V2lQZ.js → react-DV1w5wyt.js} +1 -1
  84. package/dist/assets/{react-DJflHsBg.js → react-DjsKx-MP.js} +1 -1
  85. package/dist/assets/{react-BmvpxDDj.js → react-wreqxVEC.js} +1 -1
  86. package/dist/assets/{recharts-9jMEgSjc.js → recharts-B3FaT6ex.js} +1 -1
  87. package/dist/assets/{routePaths-C00xjTzW.js → routePaths-BU7xzRci.js} +1 -1
  88. package/dist/assets/{sentry-DfheywaX.js → sentry-Bj_fC7Ll.js} +1 -1
  89. package/dist/assets/{url-C-T2kMoW.js → url-CRSVA0N_.js} +1 -1
  90. package/dist/assets/{url-HWxh2lX9.js → url-Cv9qurGb.js} +1 -1
  91. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-DGxNs-T2.js → useAiCfoDashboardSuggestedQuestionsChips-C3L5nQ7N.js} +1 -1
  92. package/dist/assets/useAskAiCfoHostNavButtonProps-C8xAByz8.js +1 -0
  93. package/dist/assets/useCashManagementBanner-7vax8nj5.js +1 -0
  94. package/dist/assets/{useChargeCardPusherEvents-BYuDd-Gt.js → useChargeCardPusherEvents-t2lV6Mj_.js} +1 -1
  95. package/dist/assets/{useDeviceId-COe_GzcU.js → useDeviceId-CnUmsNEA.js} +1 -1
  96. package/dist/assets/{useEmailConnectResultRefresh-BjWNFubI.js → useEmailConnectResultRefresh-GsUIcf-d.js} +1 -1
  97. package/dist/assets/{useInitialThreadRequest-DoJoRClL.js → useInitialThreadRequest-DA5ML13t.js} +1 -1
  98. package/dist/assets/{utils-BykfwIo5.js → utils-BKBg63lI.js} +1 -1
  99. package/dist/assets/withTransactionSidePanel-ZD8SIzTb.js +21 -0
  100. package/dist/assets/{zeni-epic-state-BqRlfhza.js → zeni-epic-state-GXytJkko.js} +5 -5
  101. package/dist/index.html +1 -1
  102. package/package.json +4 -4
  103. package/dist/assets/AddressRoutes-DJzFs1TJ.js +0 -1
  104. package/dist/assets/CompanyPassportScreen-QR3t2jCV.js +0 -1
  105. package/dist/assets/CustomerOnboardingAuthScreen-BzSz6YYh.js +0 -1
  106. package/dist/assets/DomesticWireDetailScreen-bKr1naWX.js +0 -18
  107. package/dist/assets/DrawerScreen-B1WCu8EA.js +0 -1
  108. package/dist/assets/EntityDetailRoutes-DWJcyQDq.js +0 -1
  109. package/dist/assets/ExpenseAutomationRoutes-PPxq880X.js +0 -25
  110. package/dist/assets/FeaturePreviewScreen-BPveJn8E.js +0 -1
  111. package/dist/assets/MagicLinkRoutes-BFVdaTa3.js +0 -72
  112. package/dist/assets/MagicLinkSignInScreen-DqmsP04r.js +0 -12
  113. package/dist/assets/MobileAppDrawer-DqFii0U-.js +0 -1
  114. package/dist/assets/NotFoundScreen-BEl52fo_.js +0 -1
  115. package/dist/assets/OAuthConsentScreen-Q0fwJrGA.js +0 -1
  116. package/dist/assets/PeopleRoutes-BYR9_J0o.js +0 -22
  117. package/dist/assets/PerformanceRoutes-Dfm_2dgF.js +0 -1
  118. package/dist/assets/ReimbursementApprovalRoutes-v56rgDew.js +0 -1
  119. package/dist/assets/RewardsRoutes-C3ldEdqJ.js +0 -1
  120. package/dist/assets/SignInScreen-Ce4sEOOU.js +0 -1
  121. package/dist/assets/SignOutScreen-Ca4mPIX6.js +0 -9
  122. package/dist/assets/TaskRoutes-B4QMbkFu.js +0 -9
  123. package/dist/assets/TransactionDetailScreen-SL2to1sC.js +0 -5
  124. package/dist/assets/WiseConfirmationScreen-BwZDrWO1.js +0 -12
  125. package/dist/assets/ZeniAccountStatementScreen-B7_iH7R_.js +0 -9
  126. package/dist/assets/analyticsHelper-CY5dpKAo.js +0 -1
  127. package/dist/assets/epic-DAjg0wXj.js +0 -2
  128. package/dist/assets/getLocaleForTenant-B28GqiVQ.js +0 -1
  129. package/dist/assets/useAskAiCfoHostNavButtonProps-BLThPlIr.js +0 -1
  130. package/dist/assets/useCashManagementBanner-B9wkg7e1.js +0 -1
  131. package/dist/assets/withTransactionSidePanel-BZEqEmm2.js +0 -21
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-Di1s4e5m.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-DfheywaX.js"><link rel="modulepreload" crossorigin href="/assets/core-Da6TLrNx.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-BqRlfhza.js"><link rel="modulepreload" crossorigin href="/assets/mui-CosLSKUu.js"><link rel="modulepreload" crossorigin href="/assets/analytics-D_NuuF2U.js"><link rel="modulepreload" crossorigin href="/assets/utils-BykfwIo5.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-DQqz4S7_.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-Bj_fC7Ll.js"><link rel="modulepreload" crossorigin href="/assets/core-Bnb5S7eF.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-GXytJkko.js"><link rel="modulepreload" crossorigin href="/assets/mui-BAFflVdx.js"><link rel="modulepreload" crossorigin href="/assets/analytics-fzE8ssbj.js"><link rel="modulepreload" crossorigin href="/assets/utils-BKBg63lI.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.2.15-qa",
3
+ "version": "5.2.16-qa",
4
4
  "files": [
5
5
  "dist/**/*"
6
6
  ],
@@ -27,9 +27,9 @@
27
27
  "@sentry/core": "^9.42.1",
28
28
  "@sentry/react": "^9.42.1",
29
29
  "@stripe/stripe-js": "^4.4.0",
30
- "@zeniai/client-analytics": "2.0.42",
31
- "@zeniai/client-epic-state": "5.1.41",
32
- "@zeniai/web-components": "4.2.39",
30
+ "@zeniai/client-analytics": "2.0.43",
31
+ "@zeniai/client-epic-state": "5.1.42",
32
+ "@zeniai/web-components": "4.2.40",
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-C8AAaKDR.js";import{A as d}from"./AddressScreen-Cghsd8AF.js";import i from"./NotFoundScreen-BEl52fo_.js";import"./sentry-DfheywaX.js";import{o as s,p as r}from"./core-Da6TLrNx.js";import"./zeni-epic-state-BqRlfhza.js";import"./recharts-9jMEgSjc.js";import"./index-Di1s4e5m.js";import"./mui-CosLSKUu.js";import"./analytics-D_NuuF2U.js";import"./plaid-2mv_ck83.js";import"./dnd-DC_qF3Wr.js";import"./stripe-cKAAJElX.js";import"./lottie-B7_cpoe1.js";import"./lexical-CQoPutFC.js";import"./pdf-CQB-J2hc.js";import"./utils-BykfwIo5.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 +0,0 @@
1
- import{j as m}from"./liveblocks-C8AAaKDR.js";import{a as g}from"./sentry-DfheywaX.js";import{h as w,u as x,g as T,i as k,j as O,n as E}from"./core-Da6TLrNx.js";import{z as C,be as P,E as F,e as V,g as A,ag as b,bf as j,au as L,av as M,v as U}from"./index-Di1s4e5m.js";import{eZ as D,gn as B,tX as _,gi as R,c7 as z,PI as G,bn as Y,rY as Z,rM as H,le as J,mP as S,PJ as X,bE as $,cA as N,mZ as q,n0 as K}from"./zeni-epic-state-BqRlfhza.js";import"./mui-CosLSKUu.js";import{d as Q}from"./routePaths-C00xjTzW.js";import{M as W}from"./MobileAppDrawer-DqFii0U-.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]="149c35bd-4fb6-4adb-a734-780174a53f94",a._sentryDebugIdIdentifier="sentry-dbid-149c35bd-4fb6-4adb-a734-780174a53f94")}catch{}})();const ee=E((function(a){const t=R(a),i=C.getSignedInUser(),l=D(a),c=l.tenantId,p={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=z(l?.userRole??[])&&t.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=G(a.companyConfigState),n=a.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:t.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:t,allIndustries:e.companyIndustries??[],allNationalityCountries:n,isDisabled:f,authParams:p,filesEndPoint:`${L.fileMicroServiceBaseUrl}`,isZeniUser:Y(i)}}),(function(a,t){const{companyId:i,currentTenant:l,navigate:c,location:p}=t,{tenantEmailDomain:f}=l;return{onScheduleClick:e=>{let n=e.href;n.includes("http")||(n="https://".concat(n)),window.open(n,"_blank")},onSaveAll:()=>{a(K())},onAddressClick:e=>{const n=Q(f,e),o=U(p.state?.pathnameStackToGoBack,p.pathname);c(n,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{a(q({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:n,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:u}=n,{meetingLink:y}=d,{incDate:s}=o,{taxesFiledYears:h}=r,v={companyInfo:{...n,website:u!=""&&u!=null?N(u):void 0,meetingLink:y!=""&&y!=null?N(y):void 0,industry:n.industry.selectedOption,companyIndustryType:n.companyIndustryType?.selectedOption??void 0,companySubIndustry:n.companySubIndustry?.selectedOption??void 0,businessModel:n.businessModel.selectedOption??"",companySourceOfFunds:n.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:n.companySourceOfFundsDescription??void 0,countriesOfOperations:n.countriesOfOperations?.selectedOptions?.map((I=>I.length===2?I:M(I)))??[],transactionVolume:n.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:n.transactionVolumeDescription??void 0,regulatedStatus:n.regulatedStatus??void 0,regulatedStatusDescription:n.regulatedStatusDescription??void 0,usNexus:n.usNexus??void 0,usNexusTypes:n.usNexusTypes?.selectedOptions??[],purposeOfAccount:n.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:n.purposeOfAccountDescription??void 0},incInfo:{typeOfInc:o.typeOfInc.selectedOption??"",stateOfInc:o.stateOfInc.selectedOption??"",incDate:s!=null?$(s?.toString()):s,fileId:o.fileIds[0]},taxDetails:{taxIdOrEIN:r.taxIdOrEIN,sicCode:r.sicCode,naicsCode:r.naicsCode,dunsNumber:r.dunsNumber,taxesFiledYears:h.selectedOptions.map((I=>parseInt(I))),fileId:r.fileIds[0]}};a(S({companyDetails:v}))},onPrimaryContactDetailsUpdated:e=>{a(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{a(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:void 0}]}))},onNewCompanyOfficerRemoved:e=>{a(X(e))},onCompanyOfficerUpdated:e=>{a(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:e.userId}]}))},updateFilesEntity:e=>{a(J({files:e}))},onDeleteFile:e=>{a(H(e))},onEditFileName:(e,n)=>{a(Z(e,n.split(".")[0]))}}}))(j);function de(){const a=w(),t=x(),i=T(),{tenantEmailDomain:l}=k(),[c,p]=g.useState(!1),[f,e]=g.useState(!1),n=O((s=>s.companyViewState.passportView.fetchState)),o=O((s=>s.companyConfigState.fetchState)),r=O((s=>D(s))),d=r.companyId??C.getSignedInUserTenant(l)?.companyId;if(C.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect((()=>{c||n!=="Not-Started"||d==null||(p(!0),t(B(d)))}),[c,n,d,t]),g.useEffect((()=>{o==="Not-Started"&&t(_())}),[o,t]);const u=s=>{e(s)},y=n==="Not-Started"||n==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&n==="Error"?m.jsx(P,{onGoHome:()=>a("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(F,{analytics:V,onLoad:s=>s.trackPageLoaded(A.Event.companyPassport,b(i)?"Settings":"Company Passport")}),b(i)?m.jsx(W,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:a,location:i,isLoading:y,currentTenant:r,isSettings:b(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
@@ -1 +0,0 @@
1
- import{j as i}from"./liveblocks-C8AAaKDR.js";import{z as n}from"./index-Di1s4e5m.js";import{g as d}from"./QBOConnectionScreen-ibUYeVer.js";import"./sentry-DfheywaX.js";import{g as p,N as s}from"./core-Da6TLrNx.js";import"./zeni-epic-state-BqRlfhza.js";import"./recharts-9jMEgSjc.js";import"./mui-CosLSKUu.js";import"./analytics-D_NuuF2U.js";import"./plaid-2mv_ck83.js";import"./dnd-DC_qF3Wr.js";import"./stripe-cKAAJElX.js";import"./lottie-B7_cpoe1.js";import"./lexical-CQoPutFC.js";import"./pdf-CQB-J2hc.js";import"./utils-BykfwIo5.js";import"./empty-s0Z9SHTS.js";import"./pdf-lib-CscVz5ta.js";import"./index-DykhB8j2.js";import"./url-C-T2kMoW.js";import"./index-CWFrIv4j.js";import"./decodeURIComponentSafe-B-r3T5bV.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-C8AAaKDR.js";import{h as w,g as C,j as h,n as A,i as B}from"./core-Da6TLrNx.js";import{Qm as k,Qt as _,gl as W,gk as J,gj as q,jD as K,Nw as L,rP as M,eZ as D,PU as V,jB as j,Qn as v,Qw as T,jz as F,jW as G}from"./zeni-epic-state-BqRlfhza.js";import{bz as X,J as N,A as R,z as U,y as z,r as p,c as S,D as Z,bA as Y,o as O,bB as ee,v as te}from"./index-Di1s4e5m.js";import{n as Q}from"./mui-CosLSKUu.js";import"./sentry-DfheywaX.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]="4f11b4ac-0e14-45fb-9ba1-fb7c0b9ec9f9",e._sentryDebugIdIdentifier="sentry-dbid-4f11b4ac-0e14-45fb-9ba1-fb7c0b9ec9f9")}catch{}})();const ne=A(null,(function(e,t){return{onSaveVendor:n=>{e(K(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(L("common")),n!=null&&e(M(n))},onGetOtp:n=>{e(q(n,"BillPayVendor"))},onResendOtp:n=>{e(J(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(W(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(_(n,a,o))}}}))(X);function H({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h((r=>k(r,e)));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=Q.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(F(t.bankAccountContext,s,"standard",o))},onCancel:()=>{(()=>{const s=p(a.state?.pathnameStackToGoBack),r=s.poppedPathname??P();n(r,{state:{pathnameStackToGoBack:s.newStack}})})(),e(v())},onACHDetailsUpdated:s=>{const{bankAccountSection:r}=s;e(T({data:r}))},onBackClick:()=>{if(e(j({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")n("../",{relative:"path"});else{const s=p(t.location.state?.pathnameStackToGoBack),r=s.poppedPathname??P(0);t.navigate(r,{state:{pathnameStackToGoBack:s.newStack}})}e(v())}}}))(Y);function fe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=N(),{vendorId:s,billId:r}=B(),d=e??s,{useFeatureGate:c}=R(),i=U.getSignedInUser(),b=h((u=>D(u))),g=z(),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(i==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(Z,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:g.colors.grey5}}):l.jsxs(ae,{windowSize:o,children:[l.jsx(H,{vendorId:d,billId:r}),l.jsx(oe,{location:a,navigate:n,billId:r,vendorId:d,currentTenant:b,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const P=(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},E=(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 E(e,"ach",t,n)}function Se(e,t,n){return E(e,"domestic",t,n)}function ge(e,t,n){return E(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},ce=Q.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 ${O.sp1} ${e.theme.colors.dropShadowNormal}`};
18
- `,re=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:r}=t,{tenantEmailDomain:d}=r;return{onFetchBankName:c=>{e(G(c))},onSaveHandler:c=>{e(F(t.bankAccountContext,c,"us-domestic",s))},onWireDetailsUpdated:c=>{const{bankAccountSection:i}=c;e(T({data:i}))},onCancel:()=>{(()=>{const c=p(o.state?.pathnameStackToGoBack),i=c.poppedPathname??$();a(i,{state:{pathnameStackToGoBack:c.newStack}})})(),e(v())},onAddressClick:c=>{if(t.bankAccountContext==="express-pay")a("./add-address");else{const i=se(d,c,n),b=te(o.state?.pathnameStackToGoBack,o.pathname);a(i,{state:{pathnameStackToGoBack:b}})}},onBackClick:()=>{if(e(j({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")a("../",{relative:"path"});else{const c=p(t.location.state?.pathnameStackToGoBack),i=c.poppedPathname??$(0);t.navigate(i,{state:{pathnameStackToGoBack:c.newStack}})}e(v())}}}))(ee);function xe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=N(),{vendorId:s,billId:r}=B(),d=e??s,c=U.getSignedInUser(),{useFeatureGate:i}=R(),b=z(),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}=i(S.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=i(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(Z,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:b.colors.grey5,boxShadow:`0px 2px ${O.sp1} ${b.colors.dropShadowNormal}`}}):l.jsxs(ce,{windowSize:o,children:[l.jsx(H,{vendorId:d,billId:r}),l.jsx(re,{location:a,navigate:n,billId:r,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-C8AAaKDR.js";import{J as c,H as f,y as l}from"./index-Di1s4e5m.js";import{D as b}from"./mui-CosLSKUu.js";import"./sentry-DfheywaX.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]="319c5930-e5fb-4b9b-9fc6-117cfd4193ad",e._sentryDebugIdIdentifier="sentry-dbid-319c5930-e5fb-4b9b-9fc6-117cfd4193ad")}catch{}})();const p={drawerLeftMargin:new f(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:s}=e,n=c(),a=o?.valuePx(n)??p.drawerLeftMargin.valuePx(n),d=l();return i.jsx(b,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${a})`}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.8,cursor:"pointer"}}},onClose:s,children:t})}export{h as D};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-C8AAaKDR.js";import{a as d}from"./sentry-DfheywaX.js";import{h as j,u as A,g as N,i as B,j as l,N as q,n as F,o as _,p as K}from"./core-Da6TLrNx.js";import{OE as z,eZ as M,O0 as R,lG as W,Kx as I,OJ as Y,Nv as $,kG as J,Ky as S,O5 as V,O6 as X,Nx as Z,Nw as H}from"./zeni-epic-state-BqRlfhza.js";import{aX as L,e as Q,r as U,v as tt}from"./index-Di1s4e5m.js";import"./mui-CosLSKUu.js";import{d as k}from"./decodeURIComponentSafe-B-r3T5bV.js";import{w as et}from"./withTransactionSidePanel-BZEqEmm2.js";import{f as at,c as nt}from"./routePaths-C00xjTzW.js";import"./recharts-9jMEgSjc.js";import"./analytics-D_NuuF2U.js";import"./plaid-2mv_ck83.js";import"./dnd-DC_qF3Wr.js";import"./stripe-cKAAJElX.js";import"./lottie-B7_cpoe1.js";import"./lexical-CQoPutFC.js";import"./pdf-CQB-J2hc.js";import"./utils-BykfwIo5.js";import"./useAskAiCfoHostNavButtonProps-BLThPlIr.js";import"./TransactionDetailScreen-SL2to1sC.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]="6115199c-4e85-4559-b606-48d64a7926e5",a._sentryDebugIdIdentifier="sentry-dbid-6115199c-4e85-4559-b606-48d64a7926e5")}catch{}})();const ot=F((function(a,t){const e=t.entity,o=Y(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:$(a,"common")},trendWithTransactionsReport:o,analytics:Q,isAccountingClassesEnabled:J(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(Z({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(H("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(V()),a(X()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=U(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??C();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(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=j(),o=A(),c=N(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:b,entityIdEncoded:x,entityNameEncoded:v}=B(),r=k(x??""),p=k(v??""),u=rt(r,p),w=[r,p].filter((n=>n!=null)),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=l((n=>z(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),G=l((n=>M(n).company?.companyInfo.firstMonthOfFY??1)),f=l((n=>R(n.trendWithTransactionsState,i,"EntityDetail")));d.useEffect((()=>{m===!1&&u===!0&&(T(!0),o(W(i)))}),[m,u,i]);const E=l((n=>n.trendState.fetchState)),P=f?.selectedPeriod?.timePeriod??g,O=(function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y})(f?.selectedPeriod?.timePeriod,g);return d.useEffect((()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(I(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))}),[m,h,E]),u?s.jsx(ot,{firstMonthOfFY:G,tenantEmailDomain:b,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:O,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(q,{to:C(w.length)})})),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,C=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function xt({entityType:a}){return s.jsx(_,{children:s.jsx(K,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{xt as EntityDetailRoutes,xt as default};
@@ -1,25 +0,0 @@
1
- import{j as S}from"./liveblocks-C8AAaKDR.js";import da from"./NotFoundScreen-BEl52fo_.js";import{a,b as tn}from"./sentry-DfheywaX.js";import{n as Ge,S as ua}from"./mui-CosLSKUu.js";import{u as ke,h as nn,g as st,j as x,n as ma,i as Bt,o as pa,p as et}from"./core-Da6TLrNx.js";import{eZ as Me,Tk as ha,os as we,f_ as ga,sq as Ca,Tl as tt,fB as Le,Tm as Vt,ei as Sa,fk as fa,Tn as Ot,To as Oe,pa as Ia,Tp as ka,pr as Ea,oK as an,oI as re,Tq as on,Tr as Ta,p3 as sn,pl as ba,Ts as cn,oD as ya,rY as va,fL as Ae,Tt as je,uw as ln,ES as rn,Tu as dn,Tv as Pa,rw as ct,OF as zt,OH as Aa,kJ as wa,OI as Ra,kQ as xa,c_ as Da,vM as it,oQ as un,pv as $e,p6 as Fa,Tw as _a,Nx as Mt,Nw as Ve,Tx as Lt,l5 as Ua,Ty as Ba,Tz as Va,TA as Oa,TB as za,oX as Ma,py as ze,TC as La,TD as ja,TE as $a,pF as qa,kU as Ga,kL as Na,TF as Ja,kT as jt,OP as Ya,TG as Ka,TH as Qa,rs as Za,r4 as Ha,pw as Ie,r3 as nt,TI as Wa,TJ as Xa,TK as eo,mo as to,bo as no,mj as $t,m5 as ao,TL as oo,gB as so,mg as co,xF as io,TM as lo,q4 as ro,p$ as uo,q3 as mo,pQ as po,TN as ho,fO as mn,pe as go,oT as Co,f$ as qt,pA as So,TO as fo,TP as Io,px as pn,TQ as ko,TR as Eo,TS as To,TT as bo,TU as Gt,rE as yo,qX as vo,Nv as Po,TV as Ao,TW as wo,kS as Ro,TX as xo,Jy as Do,kR as Fo,kG as _o,fN as Uo,qt as hn,qP as Bo,pu as Nt,pz as Vo,bE as Oo,md as zo,ma as Mo,TY as Lo,pP as Jt,qL as Yt,qJ as jo,TZ as $o,qy as qo,qe as Go,qM as No,T_ as Jo,T$ as Yo,qi as Ko,U0 as Qo,q9 as Zo,qh as Ho,qf as Wo,qS as Xo}from"./zeni-epic-state-BqRlfhza.js";import{A as qe,c as Y,e as G,v as le,Z as gn,a0 as Cn,cZ as es,z as Ne,c_ as Kt,c$ as ts,d0 as ns,d1 as as,au as Re,d2 as os,aZ as Qt,D as Sn,d3 as ss,ar as at,O as cs,a9 as is,d4 as ls,a4 as rs,d5 as ds,Y as us,d6 as ms,d7 as ps,$ as hs,d as gs,aS as Cs,d8 as Ss,d9 as fs,be as Is,H as ks,aV as Es}from"./index-Di1s4e5m.js";import{u as fn}from"./useAskAiCfoHostNavButtonProps-BLThPlIr.js";import{f as Zt,a as Ts,b as bs,g as ys,C as vs}from"./TransactionDetailScreen-SL2to1sC.js";import{w as Ps}from"./withTransactionSidePanel-BZEqEmm2.js";import{h as As,v as ws}from"./routePaths-C00xjTzW.js";import{g as ot}from"./accountMappingHelper-C5WHpsgJ.js";import{D as Rs}from"./DrawerScreen-B1WCu8EA.js";import"./recharts-9jMEgSjc.js";import"./analytics-D_NuuF2U.js";import"./plaid-2mv_ck83.js";import"./dnd-DC_qF3Wr.js";import"./stripe-cKAAJElX.js";import"./lottie-B7_cpoe1.js";import"./lexical-CQoPutFC.js";import"./pdf-CQB-J2hc.js";import"./utils-BykfwIo5.js";import"./decodeURIComponentSafe-B-r3T5bV.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="541571fa-ce52-414d-bee7-a91bb1015fa4",t._sentryDebugIdIdentifier="sentry-dbid-541571fa-ce52-414d-bee7-a91bb1015fa4")}catch{}})();const xs=()=>{const t=ke(),s=nn(),w=st(),b=x((m=>Me(m))),{useFeatureGate:A}=qe(),{isFeatureEnabled:i}=A(Y.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:p}=A(Y.aiAuditScorePercentage),I=x((m=>m.expenseAutomationViewState.selectedPeriodByTenantId)),l=x((m=>ha(m,b.tenantId))),{isAiCfoAccessEnabled:C,onAskAiCfoClick:g}=fn({mobileExploreReferrer:"Month-End Close Overview"}),R=a.useCallback(((m,V,te=!1)=>{t(we({tenantId:V,period:{month:m.month,year:m.year},refreshViewInBackground:te}))}),[]),y=a.useCallback((m=>{const V=w.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&G.trackMonthCloseAuditPage(m.month,m.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,V??null),t(ga(b.tenantId,m))}),[b.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),r=I[b.tenantId],h=a.useCallback((()=>{const m=w.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&G.trackMonthCloseAuditPage(r.month,r.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,m??null),R(r,b.tenantId,!0)}),[R,r,b.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),F=le(w.state?.pathnameStackToGoBack,w.pathname),J=a.useCallback((()=>{if(l.monthEndCloseChecks!=null&&r!=null){const m=l.monthEndCloseChecks.monthEndCloseCheckList.find((V=>V.progress<100));if(m!=null)return void s(`./${m.id}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:F,message:"comingFromOverview"}});s(`./month_end_insights/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:F,message:"comingFromOverview"}})}}),[l.monthEndCloseChecks,r]),{areTenantIdsInSync:u}=gn();return Cn({isDataReady:l.fetchState==="Completed"}),a.useEffect((()=>{r!=null&&l.fetchState!=="In-Progress"&&l.fetchState!=="Completed"&&u&&R(r,b.tenantId)}),[R,r,l.fetchState,b.tenantId,u]),a.useEffect((()=>{r!=null&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&u&&t(Ca(r))}),[r,l.monthClosePerformanceTrendFetchStatus.fetchState,u]),a.useEffect((()=>{const m=setInterval((()=>{l.fetchState!=="In-Progress"&&l.fetchState==="Completed"&&h()}),3e5);return()=>clearInterval(m)}),[l.fetchState]),a.useEffect((()=>{if(l.fetchState==="Completed"&&l.monthEndCloseChecks?.auditSummary!=null){const m=w.state?.referrer;G.trackMonthCloseAuditPage(l.selectedPeriod.month,l.selectedPeriod.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,m??null)}}),[l.fetchState,l.selectedPeriod,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),S.jsx(Ds,{children:S.jsx(es,{monthEndCloseChecksView:l,isRealtimeInsightsFeatureEnabled:i,onMonthEndCheckClick:m=>{s(`./${m}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:F,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:y,handleReviewButtonClick:J,onBackClick:()=>{s("../../dashboard")},onReload:h,isAiCfoAccessEnabled:C,onAskAiCfoClick:g,aiAuditScorePercentageEnabled:p})})},Ds=Ge.div`
2
- display: flex;
3
- height: 100vh;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- background-color: ${t=>t.theme.colors.grey4};
8
- `,Fs=tn.memo((({reconciliation:t,selectedDrawerAccountId:s,onClose:w,onFetchLinkTokenClick:b,onEstablishConnectionClick:A})=>{const i=ke(),{useFeatureGate:p}=qe(),{isFeatureEnabled:I}=p(Y.isReconV3Enabled),l=Ne.getSignedInUser(),C=x((f=>Me(f))),g=t.excludedAccountIDs,R=a.useMemo((()=>({userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:C?.tenantId??""})),[l?.userId,l?.zeniSessionId,C?.tenantId]),{accountReconciliationsByAccountID:y,monthYearPeriod:r,statementUploadChosen:h}=t,F=y[s],J=a.useRef(!1),u=a.useRef({}),m=a.useCallback((f=>{J.current=f}),[]),V=a.useCallback((f=>{i(tt({accountId:s,selectedPeriod:r,dismissedToBackground:!0,backgroundCompletedSteps:f.completedSteps,startedAtMs:f.startedAtMs,totalDurationSeconds:f.totalDurationSeconds})),F!=null&&requestAnimationFrame((()=>{J.current||i(Le({messageSection:"statement_parsing_in_progress",messageText:"success",type:"info",showStatusIcon:!0,variables:[{variableName:"_account_name_",variableValue:Kt(F)}]}))}))}),[i,r,F,s]),te=a.useCallback((()=>{i(tt({accountId:s,selectedPeriod:r,dismissedToBackground:!1}))}),[i,s,r]),de=a.useCallback((f=>{i(Vt({accountId:s,selectedPeriod:r,backgroundCompletedSteps:f}))}),[i,r,s]),z=a.useCallback((()=>{i(Vt({accountId:s,selectedPeriod:r,backgroundCompletedSteps:0})),i(tt({accountId:s,selectedPeriod:r,dismissedToBackground:!1}))}),[i,r,s]);a.useEffect((()=>{Object.entries(y).forEach((([f,X])=>{const ue=X.statementParseStatus.fetchState,xe=u.current[f]??"Not-Started",Je=f===s&&J.current;X.statementProcessingDismissedToBackground!==!0||Je||xe!=="In-Progress"||ue!=="Completed"||i(Le({messageSection:"statement_parsing_complete",messageText:"success",type:"info",showStatusIcon:!0,variables:[{variableName:"_account_name_",variableValue:Kt(X)},{variableName:"_transaction_count_",variableValue:String(ts(X))}]})),u.current[f]=ue}))}),[y,i,s]);const B=F?.parsedStatementData?.statementUpload?.statementMeta?.statementUploadId??F?.accountReconEntity.statementMetaData?.statementUploadId,e=F?.statementDateConflict?.previousReconciliationInfo?.reconciledByUserId,n=x((f=>e!=null&&e!==""?Sa(fa(f.userState,e)):"")),c=a.useCallback((()=>{i(Ot({accountId:s,selectedPeriod:r}))}),[i,s,r]),d=a.useCallback((()=>{i(Ot({accountId:s,selectedPeriod:r})),i(Oe({statementUploadChosen:!0}))}),[i,s,r]),E=(f,X)=>{i(va(f,X.split(".")[0]))},k=f=>{B!=null&&i(ya({accountId:s,selectedPeriod:r,fileId:f,statementUploadId:B}))},v=()=>{i(Oe({statementUploadChosen:!1}))},T=f=>{i(ba({accountId:s,selectedPeriod:r,payload:f}))},M=a.useCallback(((f,X,ue)=>{i(Ia({accountId:f,selectedPeriod:X,statementUploadId:ue}))}),[i]),P=a.useCallback((f=>{i(ka({accountId:s,selectedPeriod:r,statementUpdateLocalData:f}))}),[i,s,r]),H=a.useCallback((()=>{B!=null&&i(Ea({accountId:s,selectedPeriod:r,statementUploadId:B}))}),[i,s,r,B]),W=a.useCallback((()=>{i(Oe({statementUploadChosen:!0}))}),[i]),oe=f=>{i(cn({accountId:s,selectedPeriod:r,localData:{accountSource:f}}))},he=a.useCallback((()=>{i(an({accountId:s}))}),[i,s]),ge=a.useCallback((f=>{i(re(r,f)),w()}),[i,r,w]),q=a.useCallback((()=>{i(on({accountId:s,selectedPeriod:r,statementProcessingFailed:!1})),i(Ta({accountId:s,selectedPeriod:r}))}),[i,s,r]),Ce=a.useCallback((()=>{i(sn({accountId:s}))}),[i,s]),Ee=g.includes(s)?t.excludedAccountReconciliationByAccountID[s]:void 0;if(Ee!=null)return S.jsx(Ht,{children:S.jsx(Wt,{$isV3:I===!0,children:S.jsx(ns,{excludedAccountReconciliation:Ee,includeAccountFetch:t.includeAccountFetchState,isReconV3Enabled:I,onDismissClick:w,onIncludeIntoReconciliation:Ce})})});if(F!=null){const f=I===!0?S.jsx(as,{excludeAccountFetch:t.excludeAccountFetchState,accountReconciliation:F,monthYearPeriod:r,onDismissClick:w,plaidConnectionDetails:t.plaidConnectionDetails,onFetchLinkTokenClick:b,onEstablishConnectionClick:A,onEditFileName:E,onDeleteFile:k,onSelectSourceType:oe,filesEndPoint:Re.fileMicroServiceBaseUrl,authParams:R,openFilePicker:h,onStatementUploadSuccess:T,onUploadWindowOpenedOnce:v,onExcludeFromReconciliation:he,onRetryParsing:M,onReviewClicked:ge,statementProcessingFailed:F.statementProcessingFailed,statementProcessingDismissedToBackground:F.statementProcessingDismissedToBackground,onDismissStatementProcessingFailed:q,onContinueInBackground:V,onClearStatementProcessingDismissedToBackground:te,onResetStatementProcessingProgress:z,onStatementProcessingProgressChange:de,onStatementFlowVisibilityChange:m,onReuploadStatement:W,onStatementFormDataChange:P,onStatementConfirmSave:H,reconciledByName:n,onDismissDateConflict:c,onReuploadAfterDateConflict:d,isReconV3Enabled:I}):S.jsx(os,{excludeAccountFetch:t.excludeAccountFetchState,accountReconciliation:F,monthYearPeriod:r,onDismissClick:w,plaidConnectionDetails:t.plaidConnectionDetails,onFetchLinkTokenClick:b,onEstablishConnectionClick:A,onEditFileName:E,onDeleteFile:k,onSelectSourceType:oe,filesEndPoint:Re.fileMicroServiceBaseUrl,authParams:R,openFilePicker:h,onStatementUploadSuccess:T,onUploadWindowOpenedOnce:v,onExcludeFromReconciliation:he});return S.jsx(Ht,{children:S.jsx(Wt,{$isV3:I===!0,children:f})})}return null})),Ht=Ge.div`
9
- display: flex;
10
- flex-direction: column;
11
- height: 100%;
12
- `,Wt=Ge.div`
13
- flex: 1;
14
- min-height: 0;
15
- display: flex;
16
- flex-direction: column;
17
- box-sizing: border-box;
18
- min-width: 0;
19
- overflow-x: hidden;
20
- overflow-y: ${t=>t.$isV3===!0?"hidden":"auto"};
21
- `;function _s({companyId:t,closeCustomerRequestDrawer:s,addCustomerRequest:w,resetCustomerRequest:b}){const A=Ne.getSignedInUser();if(A==null)throw Error("Can't access Customer Request page without signing in...");const i=x((p=>Pa(p,t,A)));return a.useEffect((()=>{b()}),[]),S.jsx(S.Fragment,{children:i.fetchState==="In-Progress"||i.companyMonthEndReportTemplatesData.fetchState==="In-Progress"?S.jsx(Sn,{fetchState:"In-Progress"}):S.jsx(ss,{onCloseClick:s,addCustomerRequest:w,snippets:i.companyMonthEndReportTemplatesData,bulletPoints:i.zeniRequestsData??[]})})}const Us=t=>t.sections.generalExpense.vendors.length+t.sections.reimbursement.vendors.length,In="reconciliation-status-updated",kn="statement-status-updated",{common:{strings:{hyphen:Bs,comma:Xt,space:Vs}},dateFormat:En}=cs.getLocalizedStrings(),en=Xo,Os=ma((function(t,s){const{uncategorizedAccounts:w,vendorSearchAutoCompleteData:b,monthEndInsightsCustomerRequestData:A,monthEndInsightsPreviewMode:i,companyId:p,isMissingReceiptsBulkUploadEnabled:I,isTransactionActivityEnabled:l}=s,C=Ne.getSignedInUser(),g=t.tenantState.currentTenantId,R={userId:C?.userId??"",sessionId:C?.zeniSessionId??"",tenantId:g??""},y=Ae(t),{selectedTransactionCategorizationTab:r}=y;return{expenseAutomationViewSelector:y,bulkUploadSelector:I===!0?y.missingReceipts.bulkUpload:void 0,vendorSearchAutoCompleteData:b,authParams:R,receiptUploadEndpoint:`${Re.accountMicroServiceBaseUrl}`,transactionAttachmentsEndpoint:`${rs}/transaction_attachments`,bulkUploadEndpoint:I===!0?`${Re.communicationAgentMicroServiceBaseUrl}/1.0/receipts/bulk-upload`:void 0,isDisabled:!1,currentTab:r,monthEndInsightsCustomerRequestData:A,monthEndInsightsPreviewMode:i,allThreadsSectionOpen:!1,enableMonthEndInsightsZeniGPTFeature:!1,loggedInUser:C,uncategorizedAccounts:w,companyId:p,isTransactionActivityEnabled:l}}),(function(t,s){const{themeState:w,isAccountingClassesEnabled:b,isCOTEnabled:A,isUncategorizedExpenseCategoryEnabled:i,isMissingReceiptsBulkUploadEnabled:p,location:I,vendorSearchAutoCompleteData:l,expenseAutomationViewSelector:C,currentTenant:g,uncategorizedAccounts:R,navigate:y,onClickCustomerRequest:r,handleEditClick:h,setActivityLogTransactionId:F,isReconV3Enabled:J}=s,{selectedPeriod:u,currentSelectedView:m,reconciliation:{selectedAccountId:V}}=C,{accountSettingsView:te}=C.jeSchedules,de=un(u),z=$e(de.start),B=$e(de.end);return{onZeniLogoClick:()=>{w.toggle()},onUploadReceiptAttachment:e=>{G.trackMissingReceiptAttached(u.month,u.year),t(vo(e))},onUploadTransactionReceipt:(e,n,c,d,E,k)=>{t(Gt(e,n,{fetchState:"In-Progress"}));const v=()=>t(Gt(e,n,{fetchState:"Error"}));ds(`${Re.accountMicroServiceBaseUrl}/1.0/transactions/${n}/attachments`,k,n,c,d,E).then((T=>{T!=null?t(yo(e,T)):v()})).catch(v)},onMissingReceiptsRowClick:(e,n)=>{if(s.openTransactionPanel)return void s.openTransactionPanel(e,n);const c=le(I.state?.pathnameStackToGoBack,I.pathname);y(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",origin:"missing_receipts"}})},onUploadReceiptComplete:(e,n)=>{t(bo(e,n)),g!=null&&t(we({tenantId:g.tenantId,period:n,refreshViewInBackground:!0}))},onUploadReceiptFetchStatus:(e,n,c,d)=>{t(To(e,{fetchState:n,error:c})),c!=null&&t(Le({messageSection:"missing_receipts_attachment",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"__message__",variableValue:d!=null?Vs+Bs+d+Xt:Xt}]}))},onUpdateJESchedulesUIState:e=>{t(Eo(e))},onUpdateMissingReceiptsUIState:e=>{t(ko(e))},onFetchMissingReceiptsList:()=>{B!=null&&z!=null&&t(pn({start:z,end:B},{amount:75,currencyCode:"USD",currencySymbol:"$"},!0,!1))},...p===!0?{onBulkUploadFiles:e=>{t(Wo(e))},onBulkUploadProgress:e=>{t(Ho(e))},onBulkUploadSuccess:e=>{t(Zo({batchId:e}))},onBulkUploadUploadedFileCount:e=>{t(Qo(e))},onConfirmBulkUploadMatch:(e,n,c,d,E)=>{t(Ko(e,n,c,d,E))},onBulkUploadConfirmMatchAcknowledged:()=>{t(Yo())},onSetBulkUploadResultsTab:e=>{t(Jo(e))},onSetBulkUploadCompletedSubTab:e=>{t(No(e))},onSetBulkUploadSortConfig:(e,n)=>{t(Yt({sortKey:e,sortOrder:n}))},onClearBulkUpload:()=>{t(Go())},onSearchTransactionsForManualMatch:(e,n)=>{t(en(e,n??void 0))},onLoadMoreManualSearch:()=>{const{manualSearch:e}=C.missingReceipts.bulkUpload;e.nextPageToken!=null&&e.searchQuery!==""&&t(en(e.searchQuery,e.nextPageToken))},onFetchCompletedTransactions:(e,n)=>{t(qo(e,n))},onClearBulkUploadBatchDetailsForScopeChange:()=>{t($o())},onFetchBulkUploadBatches:e=>{t(hn(e))},onFetchMoreBatchDetails:()=>{t(jo())},onResetBulkUploadSort:()=>{t(Yt({sortKey:void 0,sortOrder:void 0}))}}:{},onClearMissingReceiptsTabNavigation:()=>{t(Io())},onSearchTextChanged:e=>{const n=C.currentSelectedView,c=C.selectedTransactionCategorizationTab;n==="transaction_categorization"&&(t(nt({selectedTab:c,uiState:{searchString:e}})),B!=null&&z!=null&&t(Ie(c,{start:z,end:B},!0,!1,e,void 0,!1,!0)))},onFiltersChange:e=>{const n=C.selectedTransactionCategorizationTab;t(fo({filters:e,selectedTab:n}))},onRefresh:()=>{s.trackExpenseAutomationTabAnalytics(!0),t(So(i))},onClose:()=>{m==="reconciliation"&&V!=null&&t(qt({selectedAccountId:void 0})),y("../")},onBack:()=>{m==="reconciliation"&&V!=null&&t(qt({selectedAccountId:void 0}))},onSaveReconciliation:e=>{t(Co(e))},onSaveReconciliationReview:e=>{t(go(e))},onUpdateStep:e=>{const{selectedPeriod:n}=C,c=le(I.state?.pathnameStackToGoBack,I.pathname);y(`../${e}/${n.month}-${n.year}`,{state:{pathnameStackToGoBack:c,referrer:C.currentSelectedView}}),t(mn(e))},handleLogOutClick:()=>{const e=le(I.state?.pathnameStackToGoBack,I.pathname);y("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},onJeAccountSettingsChange:e=>{const{vendorsAccountSection:n}=e,{prepaidExpensesAccount:c,fixedAssetsAccount:d,accruedExpensesAccount:E}=n,k=ot(te.prepaidExpensesAccountList,c.selectedOptions),v=ot(te.fixedAssetsAccountList,d.selectedOptions),T=ot(te.accruedExpensesAccountList,E.selectedOptions),M={selectedPrepaidExpensesAccountIds:k.map((P=>P.accountId)),selectedFixedAssetsAccountIds:v.map((P=>P.accountId)),selectedAccruedExpensesAccountIds:T.map((P=>P.accountId))};t(ho({data:M}))},onSaveJeAccountSettingsClick:()=>{t(po())},onJESchedulesFormDataChange(e,n){const{jeScheduleID:c,accumulatedDepreciationCategory:d,scheduleClass:E,scheduleExpenseCategory:k,vendor:v}=n,{allAccountList:T,allClassList:M,allDepreciationAccountList:P}=C.jeSchedules,H=l.entityAutoCompleteView.vendor.length>0?l.entityAutoCompleteView.vendor.find((q=>q.id===v?.selectedOption)):void 0,W={id:H?.zeniId??v?.selectedOption??"",name:H?.name??v?.defaultOptions.find((q=>q.value===v?.selectedOption))?.label??"",logo:H?.logo},oe=k?.selectedOption!=null?T.find((q=>q.qboId===k.selectedOption)):void 0,he=E?.selectedOption!=null?M.find((q=>q.classId===E.selectedOption)):void 0,ge=d?.selectedOption!=null?P.find((q=>q.qboId===d.selectedOption)):void 0;t(mo({scheduledJournalEntryID:e,localData:{jeScheduleID:c,scheduledJournalEntryID:e,updatedCategoryId:oe?.accountId,updatedClassId:he?.classId,updatedAccumulatedDepreciationCategoryID:ge?.accountId,updatedVendor:{id:W.id,name:W.name}}}))},ignoreRecommendedJeSchedule(e,n){t(uo(e,n))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(e,n)=>{e.trim().length>=2?t(Mt({searchString:e,entityType:n,searchOrigin:"common"})):e.trim().length===0&&t(Ve("common"))},onCancelAutoComplete:()=>{t(Ve("common"))}},onPostJESchedule(e,n){t(ro({scheduledJournalEntryID:e,jeScheduleTransactionKey:n}))},clearJeScheduleLocalData(){t(lo())},handleJeScheduleClick:(e,n,c)=>{t(io({selectedJEScheduleKey:n}));const d=le(I.state?.pathnameStackToGoBack,I.pathname);y(`../../vendors/schedules/${c}/details/${e}`,{state:{pathnameStackToGoBack:d,message:"expenseAutomation",origin:"je_schedules"}})},improveMonthEndInsightsUsingZeniGPTClick:e=>{g!=null&&t(co(e,g.companyId,g.tenantId))},onClickCustomerRequest:r,setActivityLogTransactionId:F,onCloseAllThreadsSection:()=>{},onCloseFileAttachmentSnackBar:()=>{t(so())},onOpenFileAttachmentSnackBar:()=>{t(Le({messageSection:"cockpit_month_end_email_attachment_upload",messageText:"failed",type:"error",showStatusIcon:!0}))},onRemoveFileAttachment:e=>{t(oo(e))},onUpdateFileAttachment:e=>{t(ao({files:e}))},previewMonthEndReport:(e,n,c,d)=>{g!=null&&t($t(e,g.companyId,n,!0,c,d,g.tenantId))},saveMonthEndReport:(e,n,c,d)=>{g!=null&&t($t(e,g.companyId,n,!1,c,d,g.tenantId))},onEditMonthEndInsightsClick:h,sendMonthEndReport:e=>{const n=I.state?.referrer,{selectedPeriod:c,auditSummary:d}=C;g!=null&&d?.auditScorePercentage!=null&&(t(to(g.companyId,e,g.tenantId)),G.trackInsightsEmailPage(c.month,c.year,!1,"draft",d.auditScorePercentage,no().format(En.analytics.MMMDDCommaYYYYformat),n??null))},onTransactionCategorizationRowClick:(e,n)=>{if(s.openTransactionPanel)return void s.openTransactionPanel(e,n);const c=le(I.state?.pathnameStackToGoBack,I.pathname);y(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",origin:"transaction_categorization"}})},setLocalDataForCategoryAndClass:(e,n,c,d,E,k,v,T,M,P,H,W,oe)=>{t(eo(e,n,c,d,R,E,k,v,T,M,P,H,W,oe))},onCancelAutoComplete:()=>{t(Ve("common"))},updateExpenseAutomationReconListScrollPosition:e=>{t(Lt({scrollPosition:e}))},onUpdateTab:e=>{s.closeSidePanel?.(),B!=null&&z!=null&&(t(Ie(e,{start:z,end:B},!1,!1)),t(Xa(e)))},onUpdateTransactionCategorizationCompletedSubTab:e=>{s.closeSidePanel?.(),B!=null&&z!=null&&(t(Wa(e)),t(Ie("autoCategorized",{start:z,end:B},!1,!1)))},onUpdateTransactionCategorizationUIState:(e,n)=>{t(nt({selectedTab:e,uiState:n})),B!=null&&z!=null&&t(Ie(e,{start:z,end:B},!1,!1,n.searchString,null,!0))},onUpdateScrollYOffSetTransactionCategorizationUIState:(e,n)=>{t(nt({selectedTab:e,uiState:n}))},onFetchTransactionCategorizationList:(e,n,c,d,E,k,v)=>{B!=null&&z!=null&&t(Ie(e,{start:z,end:B},!0,c,n,d,E,k,v))},resetTransactionCategorizationLocalData:(e,n,c,d,E,k,v,T)=>{t(Ha(e,n,c,d,T??null,E,k,!1,v))},updateSelectedVendorForTransaction:(e,n,c,d,E)=>{t(jt({selectedTab:e,transactionId:n,lineId:c,selectedTransaction:d,uncategorizedAccounts:R,updatedVendor:E,isAccountingClassesEnabled:b}))},onSaveUpdateTransactionCategorization:(e,n,c)=>{const d=I.state?.referrer;e==="autoCategorized"?G.trackTransactionsAutoCategorisedPage(u.month,u.year,C.transactionView.totalCountByTab.autoCategorized,n.length,!1,d??null):G.trackTransactionsReviewPage(u.month,u.year,C.transactionView.totalCountByTab.review,n.length,!1,d??null),t(Za(e,n,c,i))},onUpdateSelectedCheckboxTransactionIds:(e,n)=>{t(Qa({selectedTab:e,transactionIds:n}))},onFetchRecommendationsForEntityCategorizationWithCustomer:(e,n,c,d,E,k,v)=>{const{transactionId:T,transaction:M,lineIds:P}=n;k!=null&&t(Ya({transactionId:T,customerUpdates:k})),t(Ka({selectedTab:d,transactionId:T.id,lineId:P[0],selectedTransaction:M,uncategorizedAccounts:R,updatedCustomer:k,selectedEntity:E,isAccountingClassesEnabled:b,isUncategorizedExpenseCategoryEnabled:v})),E!=null&&t(it({entity:E,amount:e,transactionDetails:n,flowType:"categorization",selectedTab:d,isFetchCOT:A,isUncategorizedExpenseCategoryEnabled:v}))},onFetchRecommendationsForEntityCategorization:(e,n,c,d,E,k,v)=>{const{transactionId:T,transaction:M,lineIds:P}=n;k!=null&&(t(Ga({transactionId:T,vendorUpdates:{name:k.name,id:k.id?k.id:void 0}})),t(Na({vendorId:k.id?k.id:void 0,localData:{vendorName:k.name,vendorId:k.id?k.id:void 0}}))),k?.id?(t(jt({selectedTab:d,transactionId:T.id,lineId:P[0],selectedTransaction:M,uncategorizedAccounts:R,updatedVendor:k,selectedEntity:E,isAccountingClassesEnabled:b,isUncategorizedExpenseCategoryEnabled:v})),E!=null&&t(it({entity:E,amount:e,transactionDetails:n,flowType:"categorization",selectedTab:d,isFetchCOT:A,isUncategorizedExpenseCategoryEnabled:v}))):t(Ja({selectedTab:d,transactionId:T.id,lineId:P[0]}))},fetchFluxViewOnScroll:(e,n)=>{t(ze(e,!0,!1,n,!1,!0))},onFetchFluxViewList:()=>{t(ze(u,!0,!1,null,!1,!1))},markAsReview:(e,n,c,d)=>{G.trackFluxAnalysisReviewed(c.month,c.year,d??!1,e),t(qa(n,e,c,d??!1))},onUpdateFluxAnalysisUIState:e=>{t($a(e))},updateOperatingExpensesIdsForReview:e=>{t(ja({operatingExpenseIds:e,selectedPeriod:u}))},redirectToVendorDetailPage:e=>{if(s.tenantEmailDomain!=null){const n=ws(e.id,e.qboId,s.tenantEmailDomain),c=le(s.location.state?.pathnameStackToGoBack,s.location.pathname);s.navigate(n,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",referrer:"Vendor List",origin:"flux_analysis"}})}},updateSectionIdsForReview:e=>{t(La({sectionId:e,selectedPeriod:u}))},onFetchReimbursementView:(e,n,c)=>{t(ze(e,!0,!1,n,!0,c))},onReviewClicked:e=>{t(re(u,e))},setOpenDrawerClicked:e=>{t(je({selectedDrawerAccountId:e}))},onFetchLinkTokenClick:(e,n)=>{t(ln("expense_automation_reconcile",e,n))},onEstablishConnectionClick:(e,n)=>{const c=g?.companyId;c!=null&&(t(rn(e,c,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",n)),t(dn({accountId:n,connectionInProgress:!0})))},onAddStatementClick:e=>{t(je({selectedDrawerAccountId:e})),t(cn({accountId:e,selectedPeriod:u,localData:{accountSource:"bank_statement"}})),t(Oe({statementUploadChosen:!0}))},onReloadReconciliationListPage:()=>{t(re(u,void 0,!0,!1))},onUpdateReconcileTabLocalData:e=>{t(Ma({selectedTransactionIds:e}))},onReconTabColumnSortConfigChanged:(e,n)=>{t(za({sortKey:e,sortOrder:n}))},onReconReviewTabColumnSortConfigChanged:(e,n)=>{t(Oa({sortKey:e,sortOrder:n}))},onReconTabUpdate:e=>{s.closeSidePanel?.(),t(Va({selectedTab:e}))},updateReconReviewTabLocalData:(e,n,c)=>{const d=e.vendor?.id;c&&d!=null&&t(Ua(d)),t(Ba({data:e,transactionId:n}))},onReconMatchedTransactionClick:e=>{if(s.openTransactionPanel)return void s.openTransactionPanel(e,ct("bill"));const n=le(I.state?.pathnameStackToGoBack,I.pathname);y(`../../transaction/bill/${e}`,{state:{pathnameStackToGoBack:n,message:"expenseAutomation",origin:"reconciliation"}})},onReloadPage:()=>{window.location.reload()},onBackClick:()=>{y(-1)},onReconListPageScroll:e=>{t(Lt({scrollPosition:e}))},onVendorAutoCompleteInputChange:e=>{e.trim().length>=2?t(Mt({searchString:e,searchOrigin:"common"})):e.trim().length===0&&t(Ve("common"))},onReconNodeCollapseToggled:(e,n)=>{t(_a({nodeId:e,collapsed:n}))},updateSectionCollapseStatus:()=>{},onExcludeAccountFromReconciliation:e=>{t(an({accountId:e}))},onIncludeAccountIntoReconciliation:e=>{t(sn({accountId:e}))},onReconciliationPusherEventReceived:(e,n)=>{const c=n??{};if((e===In||e===kn)&&m==="reconciliation"&&(t(re(u,V,!0,!0)),J===!0)){const d=c.account_id;d!=null&&c.new_statement_data_status?.code==="processed"&&c.statement_upload_id!=null&&t(Fa({accountId:d,selectedPeriod:u,statementUploadId:c.statement_upload_id})),d==null||c.new_statement_data_status?.code!=="validation_failed"&&c.new_statement_data_status?.code!=="parsing_failed"&&c.new_statement_data_status?.code!=="processing_failed"||t(on({accountId:d,selectedPeriod:u,statementProcessingFailed:!0}))}}}}),((t,s,w)=>{const{isMissingReceiptsBulkUploadEnabled:b,...A}=w;return(function(i,p,I){return{...i,...p,...I,onUploadTransactionReceipt:(l,C,g,R,y)=>{p.onUploadTransactionReceipt(l,C,g,R,y,i.authParams)}}})(t,s,A)}))(is(ls)),zs=Ps((function(t){const s=t.displayName??t.name??"Component",w=tn.memo(t),b=A=>{const i=ke(),p=(function(){const u=ke(),m=x((V=>Ae(V).reconciliation.selectedDrawerAccountId));return{isOpen:m!=null,selectedAccountId:m,openPanel:a.useCallback((V=>{u(je({selectedDrawerAccountId:V}))}),[u]),closePanel:a.useCallback((()=>{u(je({selectedDrawerAccountId:void 0}))}),[u])}})(),I=x((u=>Ae(u).reconciliation)),l=x((u=>Me(u))),C=a.useCallback(((u,m)=>{i(ln("expense_automation_reconcile",u,m))}),[i]),g=a.useCallback(((u,m)=>{const V=l?.companyId;V!=null&&(i(rn(u,V,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",m)),i(dn({accountId:m,connectionInProgress:!0})))}),[i,l?.companyId]),R=a.useMemo((()=>{if(p.isOpen&&p.selectedAccountId!=null)return S.jsx(Fs,{reconciliation:I,selectedDrawerAccountId:p.selectedAccountId,onClose:p.closePanel,onFetchLinkTokenClick:C,onEstablishConnectionClick:g})}),[p.isOpen,p.selectedAccountId,p.closePanel,I,C,g]),y=a.useMemo((()=>({reconPanelContent:R,reconSidePanelIsOpen:p.isOpen,closeReconSidePanel:p.closePanel})),[R,p.isOpen,p.closePanel]),{useFeatureGate:r}=qe(),{isFeatureEnabled:h}=r(Y.isReconV3Enabled),F=a.useContext(Qt),J=a.useMemo((()=>p.isOpen?h===!0?{selectedItemId:p.selectedAccountId}:{closePanel:p.closePanel,selectedItemId:p.selectedAccountId}:F),[p.isOpen,p.closePanel,p.selectedAccountId,F,h]);return S.jsx(Qt.Provider,{value:J,children:S.jsx(w,{...A,...y})})};return b.displayName=`withReconSidePanel(${s})`,b})((({closeSidePanel:t,openTransactionPanel:s,panelContent:w,sidePanelIsFullView:b,sidePanelIsOpen:A,reconPanelContent:i,reconSidePanelIsOpen:p,closeReconSidePanel:I})=>{const{isAiCfoOpen:l,setIsAiCfoOpen:C}=us(),g=ms(),{isOpen:R}=ps(),y=nn(),r=st(),h=ke(),{isAiCfoAccessEnabled:F,onAskAiCfoClick:J}=fn({mobileExploreReferrer:"Transaction categorization"}),u=a.useCallback((()=>{A===!0&&b!==!0&&t?.()}),[t,A,b]),{areTenantIdsInSync:m}=gn(),V=(()=>{const o=x((N=>Ae(N))),U=st(),{currentSelectedViewFetchState:j,currentSelectedView:$,selectedPeriod:D}=o,ne=at($),Q=at(j.fetchState),ee=a.useCallback((N=>{const ae=U.state?.referrer;$==="transaction_categorization"&&(o.selectedTransactionCategorizationTab==="review"?G.trackTransactionsReviewPage(D.month,D.year,o.transactionView.totalCountByTab.review,0,N,ae??null):G.trackTransactionsAutoCategorisedPage(D.month,D.year,o.transactionView.totalCountByTab.autoCategorized,0,N,ae??null)),$==="missing_receipts"&&G.trackMissingReceiptsPage(D.month,D.year,N,o.missingReceipts.transactions.length,ae??null),$==="je_schedules"&&G.trackMonthCloseScheduleListPage(D.month,D.year,N,o.jeSchedules.draftSchedules.length,o.jeSchedules.resolveSchedules.length,ae??null),$==="flux_analysis"&&G.trackFluxAnalysisPage(D.month,D.year,N,Us(o.fluxAnalysis),ae??null),$==="month_end_insights"&&o.auditSummary?.auditScorePercentage!=null&&G.trackInsightsEmailPage(D.month,D.year,N,"draft",o.auditSummary.auditScorePercentage,null,ae??null)}),[D,o]);return a.useEffect((()=>{Q===j.fetchState&&$===ne||j.fetchState!=="Completed"||ee(!1)}),[$,j.fetchState,ne]),ee})(),te=hs(),[de,z]=a.useState(!1),B=x((o=>zt(o))),e=x((o=>Me(o))),[n,c]=a.useState(!1),[d,E]=a.useState(!1),[k,v]=a.useState([]),[T,M]=a.useState(null),P=a.useCallback((()=>{M(null)}),[]),H=T?.contentType==="activity"?T.detail.transactionId:void 0,W=a.useCallback((o=>{o!=null?(l&&C(!1),g(),u(),M({contentType:"activity",detail:{transactionId:o}})):M((U=>U?.contentType==="activity"?null:U))}),[u,l,g,C]),oe=a.useCallback((o=>{l&&C(!1),g(),u(),M({contentType:"transfer",detail:o})}),[u,l,g,C]),he=a.useCallback((()=>{g(),P(),u(),J()}),[u,P,J,g]),ge=a.useRef(l);a.useEffect((()=>{l===!0&&ge.current===!1&&(g(),P(),u()),ge.current=l}),[u,P,l,g]);const q=a.useRef(R);a.useEffect((()=>{R===!0&&q.current===!1&&(l&&C(!1),P(),A===!0&&b!==!0&&t?.()),q.current=R}),[P,t,R,l,C,b,A]);const Ce=A===!0&&b!==!0,Ee=a.useRef(Ce);a.useEffect((()=>{Ce&&!Ee.current&&(l&&C(!1),g(),P()),Ee.current=Ce}),[P,l,Ce,g,C]);const[f,X]=a.useState(!1),ue=a.useRef(!1),{selectedTab:xe}=Bt(),{tenantEmailDomain:Je}=Bt(),[Ye,lt]=a.useState(r.state?.message==="comingFromTransactionDetail"),rt=r.state?.message==="comingFromOverview",Tn=gs(),Ke=Ne.getSignedInUser(),{useDynamicConfig:bn,useFeatureGate:se}=qe(),{configValue:yn}=bn(Cs.enableUncategorizedExpenseCategory),ce=yn?.uncategorized_expense_category_enabled===!0,{isFeatureEnabled:dt}=se(Y.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:Te}=se(Y.isMissingReceiptsBulkUploadEnabled),{isFeatureEnabled:Qe}=se(Y.isTransactionActivityEnabled),{isFeatureEnabled:ut}=se(Y.isCreateTransferEntryFromExpenseEnabled),{isFeatureEnabled:vn}=se(Y.isExpenseAutomationCommentingEnabled),{isFeatureEnabled:Pn}=se(Y.isProjectsTransactionsEnabled),{isFeatureEnabled:An}=se(Y.isReconV3Enabled),{isFeatureEnabled:wn}=se(Y.isJEScheduleCOTEnabled),Rn=a.useCallback((o=>{const U=ct(o.view==="reconciliation"?"bill":"expense");s?.(o.entityId,U)}),[s]),xn=x((o=>Po(o,"common"))),L=x((o=>Ae(o))),{categoryOptions:Dn,paymentAccountNames:Fn}=x((o=>Ao(o.accountState))),_n=x((o=>wo(o.classState))),{monthEndCloseChecksView:K,currentSelectedView:_,selectedPeriod:O,selectedTransactionCategorizationTab:Ze,currentSelectedViewBackgroundRefreshFetchState:Un,currentSelectedViewFetchState:Se,jeSchedules:He,reconciliation:mt}=L;Ts(_==="transaction_categorization");const Bn=L.transactionView.saveStatus.fetchState,pt=L.transactionView.transactions,ht=a.useRef(pt);ht.current=pt;const gt=x((o=>o.expenseAutomationTransactionsViewState?.transactionCategorizationView)),Ct=x((o=>o.expenseAutomationTransactionsViewState?.selectedTransactionCategorizationTab)),St=a.useRef(gt);St.current=gt;const ft=a.useRef(Ct);ft.current=Ct;const ie=bs(Bn,(()=>{const o=[],U=ft.current,j=St.current,$=j!=null&&U!=null?j[U]:void 0;if($?.transactionReviewLocalDataById!=null)for(const ne of Object.values($.transactionReviewLocalDataById)){const Q=ne?.transactionReviewLocalData?.lineItemById;if(Q!=null)for(const ee of Object.values(Q)){const N=ee?.account;N?.accountId!=null&&o.push(N.accountId)}}const D=ht.current;for(const ne of D)for(const Q of ne.lines??[])"account"in Q&&Q.account?.accountId!=null&&o.push(Q.account.accountId);return o}));a.useEffect((()=>{_==="transaction_categorization"&&A!==!0||W(void 0)}),[_,W,A]),a.useEffect((()=>{p===!0&&I?.()}),[_,mt.selectedAccountId]);const Vn=L.transactionView.selectedTransactionCategorizationCompletedSubTab,De=`${Ze}|${Vn}`,Fe=a.useRef(null);a.useEffect((()=>{Fe.current!==null?Fe.current!==De&&(Fe.current=De,_==="transaction_categorization"&&P()):Fe.current=De}),[P,_,De]);const On=x((o=>H==null?void 0:Ro(o.transactionState,H))),me=On?.qboId,It=x((o=>me==null?void 0:xo(o,me)));a.useEffect((()=>{me!=null&&h(Do(me))}),[h,me]);const{createTransferEntryStatus:kt,creditCardTransferAccountsList:Et,transferAccounts:Tt}=L.transactionView,bt=a.useCallback((o=>ys(h,o)),[h]),yt=a.useMemo((()=>_!=="transaction_categorization"||T==null?null:T.contentType==="activity"?Qe===!0?S.jsx(Ss,{activityLogView:It,qboId:me,onClose:()=>M(null),selectedTransactionId:T.detail.transactionId,isQuickViewCardStyle:!0},String(T.detail.transactionId)):null:T.contentType==="transfer"?S.jsx(fs,{createTransferEntryStatus:kt,transaction:T.detail,transferAccounts:T.detail.transactionType==="credit_card_payment"?Et:Tt,onClose:()=>M(null),onCreateTransfer:bt,isQuickViewCardStyle:!0},String(T.detail.transactionId)):null),[_,T,Qe,It,me,kt,Et,Tt,bt]),zn=yt!=null,{selectedAccountId:be}=mt,vt=at(He.accountSettingsView.saveState.fetchState),Mn=x((o=>Fo(o.accountState,o.accountListState,"accountList"))),Ln=x((o=>_o(o))),ye=xe!=null?Uo(xe):_,jn=x((o=>o.entityAutoCompleteState.autoCompleteText.common));if(Cn({isDataReady:Se.fetchState==="Completed"}),Ke==null)throw Error("Can't access expense automation screen without signing in...");const Pt=un(O),ve=$e(Pt.start),Pe=$e(Pt.end);if(ve==null||Pe==null)throw Error(`Invalid start - ${ve} and end - ${Pe} period from given ${O}`);const $n=a.useCallback((()=>{c(!1)}),[]),qn=a.useCallback((()=>{E(!0)}),[]),Gn=a.useCallback((o=>{v(o),E(!1)}),[]),Nn=a.useCallback((()=>{v([])}),[]),_e=L.missingReceipts.bulkUpload.phase,At=L.missingReceipts.bulkUpload.currentBatchId;a.useEffect((()=>{Te===!0&&_==="missing_receipts"&&_e==="matching"&&At!=null&&h(hn({cacheOverride:!0}))}),[Te,_,_e,At,h]);const wt=Ke?.userId,Jn=O.month,Yn=O.year,Rt=e?.tenantId;a.useEffect((()=>{_==="missing_receipts"&&Te!==!1&&_e==="idle"&&wt!=null&&Rt!=null&&h(Bo())}),[_,Te,_e,wt,Rt,Jn,Yn,h]),a.useEffect((()=>{B.newVendorState?.vendorDetailLocalData?.vendorName!=null?z(!0):z(!1)}),[B.newVendorState?.vendorDetailLocalData?.vendorName]),a.useEffect((()=>{ye!=null&&_!==ye&&h(mn(ye))}),[ye]),a.useEffect((()=>{f===!1&&Se.fetchState==="Completed"&&m&&(X(!0),h(Nt(!1,!1,ce)))}),[f,Se,m,ce]),a.useEffect((()=>{!rt&&m&&(h(Nt(!1,!1,ce)),h(re(O,be,!1,!1)))}),[O.month,O.year,m,ce]);const xt=a.useCallback(((o=!1,U=!1)=>{const j={start:ve,end:Pe};switch(_){case"transaction_categorization":h(Ie(Ze,j,o,!Ye,void 0,void 0,U,void 0,ce)),lt(!1);break;case"flux_analysis":h(ze(O,o,U,null));break;case"month_end_insights":if(U===!1){const $=new Date(O.year,O.month,0),D=Oo($.toDateString()).format(En.analytics.YYYYDashMMDashDDFormat);h(zo(!0,e.companyId,e.tenantId,D)),h(Mo(e.companyId,e.tenantId))}break;case"je_schedules":h(Vo(j,U));break;case"missing_receipts":h(pn(j,{amount:75,currencyCode:"USD",currencySymbol:"$"},o,U));break;default:h(re(O,be,o,U))}}),[_,ve,Pe,e.companyId,e.tenantId,Ze,O,be,Ye,lt,ce]);a.useEffect((()=>{_===ye&&Se.fetchState==="Not-Started"&&m&&xt(!0)}),[Se,ve,Pe,e.companyId,e.tenantId,m]),a.useEffect((()=>{rt||Ye||ue.current||Un.fetchState==="In-Progress"||Se.fetchState!=="Completed"||(ue.current=!0,xt(!0,!0))}),[]),a.useEffect((()=>{K.fetchState!=="In-Progress"&&K.fetchState!=="Completed"&&K.fetchState!=="Error"&&e?.tenantId!=null&&h(we({tenantId:e.tenantId,period:O,refreshViewInBackground:!1}))}),[K.fetchState,e?.tenantId]),a.useEffect((()=>{L.monthEndInsights?.previewMonthEndReportStatus?.fetchState==="Completed"?c(!0):c(!1)}),[L.monthEndInsights?.previewMonthEndReportStatus?.fetchState]),a.useEffect((()=>{L.monthEndInsights?.sendMonthEndReportStatus?.fetchState==="Completed"&&m&&(h(we({tenantId:e.tenantId,period:O,refreshViewInBackground:!0})),h(Lo({companyId:e.companyId})),y("../"))}),[L.monthEndInsights?.sendMonthEndReportStatus?.fetchState,e.tenantId,O,e.companyId,m]),a.useEffect((()=>{const o=setInterval((()=>{K.fetchState!=="In-Progress"&&K.fetchState==="Completed"&&h(we({tenantId:e.tenantId,period:O,refreshViewInBackground:!0}))}),3e5);return()=>clearInterval(o)}),[K.fetchState,e.tenantId,O,h]),a.useEffect((()=>{const o=setInterval((()=>{_==="reconciliation"&&be==null&&L.reconciliation.fetchStatus.fetchState==="Completed"&&L.reconciliation.refreshStatus.fetchState!=="In-Progress"&&h(re(O,void 0,!0,!0))}),3e5);return()=>clearInterval(o)}),[_,h,L.reconciliation.fetchStatus.fetchState,L.reconciliation.refreshStatus.fetchState,re,be,O]);const Kn=Zt();a.useEffect((()=>{const o=(K.monthEndCloseChecks?.monthEndCloseCheckList.find((U=>U.id==="month_end_insights"))?.isDisabled??!1)&&!dt;_!=="month_end_insights"||!o&&K.monthEndCloseChecks?.reportEmailSentDate==null||y("../")}),[_,K.monthEndCloseChecks]);const Qn=p===!0?i:w,Zn=p===!0||A===!0,Hn=p===!0?I:t;a.useEffect((()=>{vt==="In-Progress"&&He.accountSettingsView.saveState.fetchState==="Completed"&&h(Jt())}),[vt,He.accountSettingsView.saveState.fetchState,Jt]);const{transactionId:Dt,onSaveVendor:Wn,onSaveSuccess:Xn,onCancel:ea,vendorViewDetails:ta}=(({expenseAutomationViewSelector:o,closeDrawerHandler:U,currentSelectedView:j,isUncategorizedExpenseCategoryEnabled:$})=>{const D=ke();let ne,Q,ee;const N=Zt(),ae=o.transactionView;let Ft=()=>{};const{transactions:aa,selectedTransactionId:fe,selectedTransactionLineId:Ue,transactionLocalData:oa}=ae;if(j==="transaction_categorization"){const We=oa.find((pe=>pe.transactionId===fe)),Z=aa.find((pe=>pe.id===fe)),_t=Ue!=null?We?.transactionReviewLocalData?.lineItemById[Ue]:void 0,Ut=_t?.account;Q=_t?.class?.classId,ne=["Uncategorized Income","Uncategorized Expense"].includes(Ut?.accountName??"")?void 0:Ut?.accountId;const ca=As(fe,Z?.typeOfTransaction);Z!=null&&ca&&(ee={id:fe,type:ct(Z.typeOfTransaction)}),Ft=()=>{if(fe!=null&&Ue!=null&&Z!=null){const pe=ae.transactionLocalData.find((Be=>Be.transactionId===fe))?.transactionReviewLocalData;if(pe!=null&&Z.lines!=null&&Z.lines.length>0){const Be=pe.lineItemById[Ue];let Xe=pe.selectedEntity;if(Da(Z)||(Xe=Be.selectedEntityLine),Xe!=null){const ia=Xe,la={transactionId:{id:Z.id,type:Z.type},transaction:Z,lineIds:Z.lines.map((ra=>ra.id))??[]};D(it({entity:ia,amount:Be.amount.amount,transactionDetails:la,flowType:"categorization",selectedTab:o.selectedTransactionCategorizationTab,isFetchCOT:N,isUncategorizedExpenseCategoryEnabled:$}))}}}}}const sa=x((We=>zt(We,void 0,ne,Q)));return{transactionId:ee,onSaveVendor:()=>{D(xa(ee,void 0,!1,!0))},onSaveSuccess:Ft,onCancel:()=>{ee!=null&&D(Aa({transactionId:ee})),D(wa()),D(Ra()),U()},vendorViewDetails:sa}})({expenseAutomationViewSelector:L,closeDrawerHandler:()=>{z(!1)},currentSelectedView:_,isUncategorizedExpenseCategoryEnabled:ce}),na={events:e.companyId!=null?[`private-encrypted-${e.companyId}.${In}`,`private-encrypted-${e.companyId}.${kn}`]:[],eventCallback:(o,U,j)=>{j.onReconciliationPusherEventReceived(o,U)}};return Tn?.loggedInUserRoleMap==null?K.fetchState==="Error"?S.jsx(Is,{onGoHome:()=>y("../",{replace:!0}),onReload:()=>window.location.reload()}):S.jsx(Sn,{fetchState:"In-Progress"}):S.jsxs(S.Fragment,{children:[S.jsx(Rs,{isOpen:d,drawerLeftMargin:new ks(0,0,300,650),onClose:()=>{E(!1)},children:S.jsx(Ms,{onClick:o=>o.stopPropagation(),children:S.jsx(_s,{companyId:e.companyId,closeCustomerRequestDrawer:()=>E(!1),addCustomerRequest:Gn,resetCustomerRequest:Nn})})}),Dt!=null&&de&&S.jsx(vs,{isOpen:de,transactionId:Dt,onSaveVendor:Wn,onSaveSuccess:Xn,onCancel:ea,vendorViewDetails:ta}),S.jsx(Os,{...na,navigate:y,location:r,themeState:te,categoryOptions:Dn,classesForFilters:_n,accountsForFilters:Fn,vendorSearchAutoCompleteData:{autoCompleteText:jn,entityAutoCompleteView:xn},expenseAutomationViewSelector:L,isMissingReceiptsBulkUploadEnabled:Te,monthEndInsightsPreviewMode:n,monthEndInsightsCustomerRequestData:k,isRealtimeInsightsFeatureEnabled:dt,isCreateTransferEntryFromExpenseEnabled:ut,isUncategorizedExpenseCategoryEnabled:ce,isAccountingClassesEnabled:Ln,isProjectsTransactionsEnabled:Pn,isCOTEnabled:Kn,isJEScheduleCOTEnabled:wn,currentTenant:e,companyId:e.companyId,signedInUser:Ke,isTransactionActivityEnabled:Qe,isRightPanelOpen:zn,rightSidePanel:yt,onOpenTransferRightPanel:ut===!0?oe:void 0,uncategorizedAccounts:Mn,onClickCustomerRequest:qn,handleEditClick:$n,tenantEmailDomain:Je,trackExpenseAutomationTabAnalytics:V,setActivityLogTransactionId:W,closeSidePanel:Hn,openTransactionPanel:s,sidePanelIsOpen:Zn,sidePanelIsFullView:p!==!0&&b,panelContent:Qn,isAiCfoAccessEnabled:F,onAskAiCfoClick:he,isExpenseAutomationCommentingEnabled:vn,isReconV3Enabled:An,onExpenseAutomationCommentingThreadClick:Rn,sidePanelListPercent:p===!0?66:void 0}),ie.showPopup&&ie.popupType!=null&&S.jsx(Es,{popupType:ie.popupType,currencySymbol:ie.currencySymbol,accountId:ie.popupAccountId??"",accountName:ie.popupAccountName??"",onSubmit:ie.handleSubmit,onDismiss:ie.handleDismiss})]})}))),Ms=Ge(ua)`
22
- display: flex;
23
- min-height: 100%;
24
- flex-direction: column;
25
- `;function rc(){return S.jsxs(pa,{children:[S.jsx(et,{path:"*",element:S.jsx(xs,{})}),S.jsx(et,{path:"/:selectedTab/:selectedPeriod/*",element:S.jsx(zs,{})}),S.jsx(et,{path:"*",element:S.jsx(da,{})})]})}export{rc as default};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-C8AAaKDR.js";import{a as r}from"./sentry-DfheywaX.js";import{a5 as l,a6 as p,a7 as m,r as c}from"./index-Di1s4e5m.js";import"./mui-CosLSKUu.js";import f from"./NotFoundScreen-BEl52fo_.js";import{h as u,g as b}from"./core-Da6TLrNx.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]="5a21547d-8d37-447e-91de-3190153d226c",e._sentryDebugIdIdentifier="sentry-dbid-5a21547d-8d37-447e-91de-3190153d226c")}catch{}})();const _=()=>{const e=u(),a=b(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),d=r.useCallback((()=>{(()=>{const n=c(a.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=l(a.pathname);return o!=null?s.jsx(p,{menuItem:m(o),onDemoClick:t,onGoBack:d}):s.jsx(f,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{_ as F};
@@ -1,72 +0,0 @@
1
- import{j as a}from"./liveblocks-C8AAaKDR.js";import{i as S,n as x,h as C,g as y,u as ee,t as ae,j as E,N as te,o as ne,p}from"./core-Da6TLrNx.js";import{Mw as k,Mx as v,My as M,BA as B,Bm as T,Mz as A,MA as oe,MB as se,Bq as ie,fC as $,Bx as le,Bu as de}from"./zeni-epic-state-BqRlfhza.js";import{J as g,o as d,p as re,e as j,k as G,q as ce,r as me,s as pe,v as V,A as ue,c as he,B as xe,$ as ge,y as fe,C as be,D as we,E as Se,V as ye,F as ke,G as ve,H as je,I as $e}from"./index-Di1s4e5m.js";import{n as m}from"./mui-CosLSKUu.js";import f from"./NotFoundScreen-BEl52fo_.js";import{a as I}from"./sentry-DfheywaX.js";import"./recharts-9jMEgSjc.js";import"./analytics-D_NuuF2U.js";import"./plaid-2mv_ck83.js";import"./dnd-DC_qF3Wr.js";import"./stripe-cKAAJElX.js";import"./lottie-B7_cpoe1.js";import"./lexical-CQoPutFC.js";import"./pdf-CQB-J2hc.js";import"./utils-BykfwIo5.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]="b3da7bbb-cd3f-4422-a5b9-a9df6ffd513d",e._sentryDebugIdIdentifier="sentry-dbid-b3da7bbb-cd3f-4422-a5b9-a9df6ffd513d")}catch{}})();const Ie=m.div`
2
- display: flex;
3
- height: 100%;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
10
- `,Ce=x((function(e){const t=k(e),n=v(e),{companyName:o}=t;return{companyName:o,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:t}}),(function(e,t){const{vendorId:n,billId:o}=t;return{onFetchBankName:s=>{e(T(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(B(s,"standard",n,o))},onACHDetailsUpdated:s=>{const{bankAccountSection:l}=s;e(M({data:l}))}}}))(re);function F(){const e=g(),{vendorId:t,billId:n}=S();return t==null||n==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(Ie,{windowSize:e,children:a.jsx(Ce,{vendorId:t,billId:n})})})}const Be=m.div`
11
- display: flex;
12
- height: 100vh;
13
- width: 100%;
14
- flex: 1 1 auto;
15
- flex-direction: column;
16
- align-items: center;
17
- background-color: ${e=>e.theme.colors.grey4};
18
- box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
19
- `,Ae=x((function(e,t){const{isSubPage:n}=t;return{addressToEdit:A(e),googleAPIKey:G.googleMapsAPIKey,isSubPage:n}}),(function(e,t){const{navigate:n,location:o}=t,s=()=>{const l=me(o.state?.pathnameStackToGoBack),i=l.poppedPathname??Pe();n(i,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const i=ze(l);e(oe({addressToCreate:i})),s()},onCancel:()=>{s()}}}))(ce);function De({isSubPage:e}){const t=C(),n=y(),o=g();return a.jsx(a.Fragment,{children:a.jsx(Be,{windowSize:o,children:a.jsx(Ae,{location:n,navigate:t,isSubPage:e===!0,googleAPIKey:G.googleMapsAPIKey})})})}const Pe=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},ze=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng}),Le=m.div`
20
- display: flex;
21
- height: 100%;
22
- width: 100%;
23
- flex: 1 1 auto;
24
- flex-direction: column;
25
- align-items: center;
26
- background-color: ${e=>e.theme.colors.grey4};
27
- box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
28
- `,Ne=x((function(e){const t=k(e),n=v(e),o=A(e),{companyName:s}=t;return{companyName:s,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}}),(function(e,t){const{navigate:n,location:o,vendorId:s,billId:l}=t;return{onFetchBankName:i=>{e(T(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(B(i,"us-domestic",s,l))},onWireDetailsUpdated:i=>{const{bankAccountSection:r}=i;e(M({data:r}))},onAddressClick:()=>{const i=o.pathname.replace("us-domestic","address"),r=V(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:r}})}}}))(pe);function Ee(){const e=C(),t=y(),n=g(),{vendorId:o,billId:s}=S();return o==null||s==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(Le,{windowSize:n,children:a.jsx(Ne,{location:t,navigate:e,vendorId:o,billId:s})})})}const Fe=m.div`
29
- display: flex;
30
- height: 100%;
31
- width: 100%;
32
- flex: 1 1 auto;
33
- flex-direction: column;
34
- align-items: center;
35
- background-color: ${e=>e.theme.colors.grey4};
36
- box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
37
- `,Me=x((function(e){const t=k(e),n=v(e),o=A(e),{companyName:s}=t;return{companyName:s,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}}),(function(e,t){const{navigate:n,location:o,vendorId:s,billId:l}=t;return{onFetchBankNameBySwift:i=>{e(ie(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(B(i,"international",s,l,t.isLocalCurrencyEnabled))},onBankDetailsUpdated:i=>{const{internationalWireSwiftAccountSection:r}=i;e(se({data:r}))},onAddressClick:()=>{const i=o.pathname.replace("international","address"),r=V(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:r}})}}}))(xe);function Te(){const e=C(),t=y(),n=g(),{vendorId:o,billId:s}=S(),{useFeatureGate:l}=ue(),{isFeatureEnabled:i}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||s==null?a.jsx(f,{}):a.jsx(Fe,{windowSize:n,children:a.jsx(Me,{location:t,navigate:e,vendorId:o,billId:s,isLocalCurrencyEnabled:i})})}const Ge={containerWidth:new je(100,58)},Ve=m(ke)`
38
- width: ${d.sp4};
39
- height: ${d.sp4};
40
- margin-bottom: ${d.sp3};
41
- margin-top: ${d.sp3};
42
- margin-left: ${d.sp8};
43
- cursor: pointer;
44
- position: absolute;
45
- color: ${e=>e.theme.colors.brandColorJade};
46
- `,He=m.div`
47
- display: flex;
48
- height: 100vh;
49
- flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
50
- width: 100vw;
51
- overflow-y: scroll;
52
- background-color: ${e=>e.theme.colors.grey4};
53
- `,_e=m.div`
54
- display: flex;
55
- flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
56
- flex-direction: column;
57
- width: ${e=>`${Ge.containerWidth.value(e.windowSize)}%`};
58
- ${e=>e.windowSize!=="small"?"overflow: auto;":""}
59
- box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
60
- padding-top: ${e=>e.windowSize!=="small"?d.sp2:"0px"};
61
- `,Ke=m.div`
62
- display: flex;
63
- flex-direction: column;
64
- align-items: center;
65
- justify-content: center;
66
- padding: ${e=>e.windowSize==="small"?d.sp3:`62px ${d.sp6} ${d.sp9} ${d.sp8}`};
67
- height: ${e=>e.windowSize==="small"?"490px":"auto"};
68
- overflow: ${e=>e.windowSize==="small"?"unset":"hidden"};
69
- width: ${e=>e.windowSize=="small"?"auto":"42%"};
70
- background-color: ${e=>e.windowSize==="small"?e.theme.colors.grey4:e.theme.colors.background};
71
- margin-top: ${e=>e.windowSize==="small"?e.isAddressPage?"0px":"186px":"unset"};
72
- `,We=x((function(e,t){return{file:t.file,type:t.type}}))(ve);function h({appContent:e}){const t=ee(),n=y(),{tenantEmailDomain:o,vendorId:s,billId:l}=S(),[i]=ae(),r=i.get("token"),H=n.pathname.includes("address"),b=g(),_=ge(),D=fe(),w=be(),K=()=>{_.toggle()},W=E((u=>k(u))),U=E((u=>v(u))),{authParams:q,fetchState:c,billAttachment:J,billFetchState:P,companyName:O,currencySymbol:Q,amount:R}=W,{tenantId:z,userId:L,sessionId:N}=q,{fetchState:X,internationalBankAccountCreateStatus:Y}=U;return I.useEffect((()=>{$()}),[]),I.useEffect((()=>{w&&c==="Not-Started"&&s!=null&&o!=null&&r!=null&&t(le(s,o,r))}),[w,c,s,o,r,t]),I.useEffect((()=>{w&&c==="Completed"&&($(L,N,z),l!=null&&t(de(l)))}),[c,w,L,N,z,l,t]),c==="Error"?a.jsx(f,{}):X==="Completed"||Y.fetchState==="Completed"?($(),a.jsx(te,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?a.jsx(we,{fetchState:c,style:{height:"100vh",backgroundColor:D.colors.grey5,boxShadow:`0px 2px ${d.sp1} ${D.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[c==="Completed"&&P==="Completed"&&a.jsx(Se,{analytics:j,onLoad:u=>(Z=>Z.trackBillPayMagicLinkPageLoad(o??"",s??"",O,l??"",Ue(n.pathname),Q,R))(u)}),a.jsxs(He,{windowSize:b,children:[b!=="small"?a.jsx(Ve,{onClick:K}):null,a.jsx(Ke,{windowSize:b,isAddressPage:H,children:P==="In-Progress"?a.jsx(ye,{size:"ExtraLarge",start:!0}):a.jsx(We,{file:J,type:"bill"})}),a.jsx(_e,{windowSize:b,children:e})]})]})}const Ue=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function qe(){return a.jsx($e,{})}function ra(){return a.jsxs(ne,{children:[a.jsx(p,{path:"bank/account/save/success",element:a.jsx(qe,{})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:a.jsx(h,{appContent:a.jsx(F,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:a.jsx(h,{appContent:a.jsx(F,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:a.jsx(h,{appContent:a.jsx(De,{isSubPage:!0})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:a.jsx(h,{appContent:a.jsx(Ee,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:a.jsx(h,{appContent:a.jsx(Te,{})})}),a.jsx(p,{path:"*",element:a.jsx(f,{})})]})}export{ra as default};
@@ -1,12 +0,0 @@
1
- import{j as u}from"./liveblocks-C8AAaKDR.js";import{a as g}from"./sentry-DfheywaX.js";import{u as F,g as O,h as _,t as w,j as l,N as T}from"./core-Da6TLrNx.js";import{z as r,y as V,O as P,f as A,e as N,g as Z,m as R,V as W,j as $}from"./index-Di1s4e5m.js";import{eZ as q,Mh as B,Mr as G,Mi as H,fC as J,g2 as K,Mn as Q,gs as X,cZ as Y,Ms as ee,Mt as te}from"./zeni-epic-state-BqRlfhza.js";import{n as ne}from"./mui-CosLSKUu.js";import{u as se}from"./useDeviceId-COe_GzcU.js";import{f as ae}from"./analyticsHelper-CY5dpKAo.js";import{t as ie}from"./getLocaleForTenant-B28GqiVQ.js";import"./recharts-9jMEgSjc.js";import"./analytics-D_NuuF2U.js";import"./plaid-2mv_ck83.js";import"./dnd-DC_qF3Wr.js";import"./stripe-cKAAJElX.js";import"./lottie-B7_cpoe1.js";import"./lexical-CQoPutFC.js";import"./pdf-CQB-J2hc.js";import"./utils-BykfwIo5.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]="65e6df55-d5d3-4fad-879b-dcb450570a21",t._sentryDebugIdIdentifier="sentry-dbid-65e6df55-d5d3-4fad-879b-dcb450570a21")}catch{}})();const C=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function Ce(){const t=F(),a=O(),m=_(),[b]=w(),n=b.get("token"),p=b.get("stytch_token_type"),f=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:z,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=>q(e))),y=l((e=>B(e))),M=r.getSignedInUser(),v=V().mode;g.useEffect((()=>{s?.zeniSessionId==null&&n!=null&&C(n,p)&&i!=null&&f!=null&&(r.saveMagicLinkTriggered(n),t(G(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(H(y.tenantsInOrder),s.zeniSessionId),J(s.userId,s.zeniSessionId,o.tenantId),t(K(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(Q("Completed")),P.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,y.tenantsInOrder),X().then((()=>{const e=$();e!=null&&A(e)})),setTimeout((()=>{N.trackLogin(Z.Event.loginSuccess,"email",Y(o.productSettings))}),2e3))}),[h,S,k,s,o,y,v,a.state,t]);const E=g.useCallback((()=>{m("/signin/auth")}),[m]),j=g.useCallback((()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))}),[i,d,t,c]),U=g.useCallback((e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))}),[i,n,t,c,d]);if(I==="Completed"&&d!=null)return u.jsx(R,{phoneNumber:x,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:D,onResendOtp:j,onVerifyOtp:U,onCancelVerifyDevice:E});if(h==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||M!=null){const e=a.state?.origin??"/";return u.jsx(T,{to:e,state:{...a.state,origin:""}})}if(!C(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(W,{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{Ce as default};
@@ -1 +0,0 @@
1
- import{j as V}from"./liveblocks-C8AAaKDR.js";import{a as l}from"./sentry-DfheywaX.js";import{u as fe,j as n,i as He,g as We,h as Je,l as G}from"./core-Da6TLrNx.js";import{eZ as me,fH as Ke,fI as be,ft as Qe,bn as Xe,eY as qe,fJ as ea,fK as aa,fM as ta,fP as na,fQ as g,fS as sa,fT as de,fW as oa,fU as ia,fV as ra,fX as da,cP as ca,fZ as la,cV as ua,fs as fa,g2 as ma,g3 as ba,g1 as pa}from"./zeni-epic-state-BqRlfhza.js";import{a9 as ha,aa as Sa,$ as ga,A as Ea,z as k,C as ka,u as Ca,c as r,i as ya,n as Ia,ab as Ta,d as Aa,a as _a,ac as wa,a5 as Da,ad as Fa,ae as va,af as ce,ag as le,L as $a,ah as Pa,ai as ue,e as x,a1 as Ma,v as A,aj as R,ak as Ga}from"./index-Di1s4e5m.js";import{D as xa}from"./mui-CosLSKUu.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]="b1b64fb2-34c8-44ed-85fd-8391310c69cc",f._sentryDebugIdIdentifier="sentry-dbid-b1b64fb2-34c8-44ed-85fd-8391310c69cc")}catch{}})();const Ra=ha((({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=He(),a=We(),C=ga(),o=Je(),B=Qe(),m=fe(),{useFeatureGate:i}=Ea(),N=k.getSignedInUser(),U=Xe(N),s=n((e=>me(e))),pe=s.masterTOSInfo?.isMasterTOSAccepted??!1,O=n((e=>qe(e))),j=O.uiState.currentChatSessionId,y=ka(),{setLoading:he}=Ca(),[_,L]=l.useState(void 0),w=G("/:tenantEmailDomain/dashboard")!==null,Z=G("/:tenantEmailDomain/reports")!==null,I=G("/: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),Y=n((e=>ea(e))),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),D=n((e=>aa(e)));l.useEffect((()=>{y&&T&&!I&&D.fetchState==="Not-Started"&&m(ta(!0))}),[y,T,D.fetchState,I]);const h=k.getSignedInUser(),F=n((e=>e.tenantState)),Ce=n((e=>F.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:Ae}=i(r.isExpenseAutomationEnabledV2),H=Ia(),{isFeatureEnabled:_e}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:we}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:De}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarNewYearAnimationEnabled),v=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:ve}=i(r.isTaskManagerCustomerUserAccessEnabled),$e=U||!U&&ve,Pe=n((e=>g(e).totalUnreadCount)),Me=n((e=>g(e).reducedFetchCountState)),W=n((e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount)),J=n((e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount)),Ge=n((e=>g(e).notificationDetailsByTab.tasks.fetchCountState)),$=n((e=>g(e).notificationDetailsByTab.comments.fetchCountState)),{inboxNotifications:K,isLoading:Q,isFetchingMore:X,hasFetchedAll:q,fetchMore:xe}=Ta();l.useEffect((()=>{const e=setTimeout((()=>xe?.()),0);return()=>clearTimeout(e)})),l.useEffect((()=>{if(Q===!1&&X===!1&&q===!0)if(s?.companyId!=null&&K!=null){const e=`dashboard_${s.companyId}`;L(K.filter((u=>u.roomId===e&&u.readAt==null)).length)}else L(0)}),[Q,X,q]),l.useEffect((()=>{y&&!I&&Ge.fetchState==="Not-Started"&&B.tenantId!=null&&m(sa("task_manager","dashboard"))}),[y,B.tenantId]),l.useEffect((()=>{I||$.fetchState!=="Not-Started"||m(de({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[]),l.useEffect((()=>{_!=null&&$.fetchState==="In-Progress"&&(m(de({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(be({unreadCount:_},"comments")))}),[_,$.fetchState]);const Re={fetchStatus:Me,count:Pe},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"),H===!1&&S.push("expense_automation_card");const Ve=Aa(),te=n((e=>ia(e,S,h,Ae,Te).fetchState)),ne=n((e=>ra(e).fetchState)),Be=w&&(te==="Completed"||te==="Error")||Z&&(ne==="Completed"||ne==="Error")||!w&&!Z?void 0:"disabled",Ne=l.useMemo((()=>da(s.userRole)),[s.userRole]),Ue=ca(Ne),Oe=s?.rewardsLastViewedTime==null,je=h?.userEmail!=null&&Y.fetchState==="Completed"&&la(Y.notificationSettings,h.userEmail,z,s),se=_a(),Le=se&&wa(a),oe=ua(Ve?.loggedInUserRoleMap),ie=s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,P=l.useCallback((()=>v&&oe&&!k.getTreasuryPopupSeen(t??"")&&ie===!1&&Da(a.pathname)!=="treasury"),[v,oe,ie,a.pathname,t]),[Ze,re]=l.useState(P);l.useEffect((()=>{re(P())}),[P]);const ze=n((e=>e.treasurySetupViewState.treasuryFundsDetails)).fundsDetails,Ye=Fa(ze);return V.jsx(xa,{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:V.jsx(va,{signedInUser:N,currentTenantId:F.currentTenantId??"",tenants:F.fetchState==="Completed"?Ce:ae!=null?[ae]:[],currentTenant:s,isTenantDropdownDisabled:Be,isSettings:le(a),isSettingsFeatureEnabled:ke,isVendorsTabVisible:Ue,isZeniAccountEnabled:Se,isChargeCardEnabled:Ee,isTreasuryEnabled:v,treasuryYieldPercentage:Ye,isTreasuryPopupVisible:Ze,isNotificationsTabVisible:je,notificationCountDetails:Re,isExpenseAutomationEnabledForUser:H,selectedMenu:ce(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Oe,rewardsPlan:D.rewardsPlan},isAiCfoAccessEnabled:se,onNotificationIconClick:()=>{d(!1);let e=W===0&&J>0?"notifications/comments":"notifications/tasks";le(a)&&(e=W===0&&J>0?"../../notifications/comments":"../../notifications/tasks");const u=A(a.state?.pathnameStackToGoBack,a.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=A(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(x.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),!pe)return void Ma({location:a,navigate:o,mergeState:{referrer:"Sidebar"}});const p=A(a.state?.pathnameStackToGoBack,a.pathname);return void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:p,referrer:"Sidebar"}})}const u=A(a.state?.pathnameStackToGoBack,a.pathname),c=e.type,b=R(c)&&c!=="command_center";if(R(e.type)&&E[s.tenantId]!=null&&x.trackMonthEndCloseClicked(E[s.tenantId].month,E[s.tenantId].year,"Sidebar"),b&&E[s.tenantId]!=null){const p=E[s.tenantId];return void o(`/${t}/month_end_close_checks/review/${e.type}/${p.month}-${p.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const M=Ga(e.type);ue(e.type)?(j!=null&&m(pa()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${M}`,{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 b=`/${encodeURIComponent(u)}/`;const M=R(c);c==="home"?b+="dashboard":c==="users_and_roles"?b+="people":Pa(c)?b+="settings/my_profile":ue(c)?b+=`ai-cfo/${c}`:b+=c==="task_checklist"?"tasks":M?"month_end_close_checks/review":encodeURIComponent(c),o(b,{replace:!0}),h!=null&&(m(ma(e.tenantId)),m(ba(h.userId,e.tenantId,h.zeniSessionId)));const p=e;x.trackCompanySwitch(p.companyId,p.companyName,p.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(t??"",!0),re(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:Le,aiCfoView:O,isOnDashboard:w,updateCurrentChatSessionId:e=>{m(fa({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:_e,isTaskManagerAccessEnabled:$e,thanksGivingAnimationEnabled:we,christmasAnimationEnabled:De,newYearAnimationEnabled:Fe})})})),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)&&Ke(o.mode)==="dashboard"&&d(be({unreadCount:o.data.unread},"tasks"))}};return V.jsx(Ra,{...f,...a})};export{La as M};
@@ -1 +0,0 @@
1
- import{j as e}from"./liveblocks-C8AAaKDR.js";import{h as r,n}from"./core-Da6TLrNx.js";import{T as i}from"./index-Di1s4e5m.js";import"./mui-CosLSKUu.js";import"./sentry-DfheywaX.js";import"./zeni-epic-state-BqRlfhza.js";import"./recharts-9jMEgSjc.js";import"./analytics-D_NuuF2U.js";import"./plaid-2mv_ck83.js";import"./dnd-DC_qF3Wr.js";import"./stripe-cKAAJElX.js";import"./lottie-B7_cpoe1.js";import"./lexical-CQoPutFC.js";import"./pdf-CQB-J2hc.js";import"./utils-BykfwIo5.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]="df9e7e33-2ed0-48bd-9985-e24b323e3cf3",o._sentryDebugIdIdentifier="sentry-dbid-df9e7e33-2ed0-48bd-9985-e24b323e3cf3")}catch{}})();const d=n(null,(function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}}))(i);function _(){const o=r();return e.jsx(d,{navigate:o})}export{_ as default};
@@ -1 +0,0 @@
1
- import{j as m}from"./liveblocks-C8AAaKDR.js";import{a as r}from"./sentry-DfheywaX.js";import{u as T,g as A,j as o,N as P}from"./core-Da6TLrNx.js";import{MG as j,eZ as C,fP as D,MH as x,MI as z,MJ as L,MK as N,oi as R,LD as k}from"./zeni-epic-state-BqRlfhza.js";import{z as h,N as I}from"./index-Di1s4e5m.js";import"./mui-CosLSKUu.js";import"./recharts-9jMEgSjc.js";import"./analytics-D_NuuF2U.js";import"./plaid-2mv_ck83.js";import"./dnd-DC_qF3Wr.js";import"./stripe-cKAAJElX.js";import"./lottie-B7_cpoe1.js";import"./lexical-CQoPutFC.js";import"./pdf-CQB-J2hc.js";import"./utils-BykfwIo5.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="4ecfaa19-78a4-4895-b509-0dd3caa97cb2",n._sentryDebugIdIdentifier="sentry-dbid-4ecfaa19-78a4-4895-b509-0dd3caa97cb2")}catch{}})();function ee(){const n=T(),a=A(),{params:t,error:i}=r.useMemo((()=>j(a.search)),[a.search]),w=r.useMemo((()=>new URLSearchParams(a.search).get("client_name")??t?.clientId??"Unknown Application"),[a.search,t]),p=h.isSignedIn(),s=h.getSignedInUser(),f=o((e=>C(e))),l=o((e=>D(e))),d=o((e=>e.tenantState.fetchState)),y=o(x),b=o(z),c=o(L),[v,S]=r.useState(null),[E,_]=r.useState(null);r.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]),r.useEffect((()=>()=>{n(N())}),[n,a.search]),r.useEffect((()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)}),[i]);const g=r.useRef(!1);r.useEffect((()=>{p&&s!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(R(s.userId,s.zeniSessionId??void 0))))}),[p,s,d,n]),r.useEffect((()=>{c!=null&&c!==""&&(window.location.href=c)}),[c]);const M=r.useMemo((()=>{if(f?.tenantId!=null)return f.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some((U=>U.tenantId===e))?e:l.length===1?l[0].tenantId:null}),[f?.tenantId,l]),u=v??M;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):p?m.jsx(I,{variant:"signed_in",clientName:w,userEmail:s?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:S,approveError:E??b,isApproving:y==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&s!=null&&u!=null&&n(k(s.userId,s.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{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(P,{to:"/signin/auth",state:{origin:a.pathname+a.search},replace:!0})}export{ee as default};
@@ -1,22 +0,0 @@
1
- import{j as a}from"./liveblocks-C8AAaKDR.js";import{N7 as oe,eZ as Q,kG as K,fG as X,fE as ie,KB as ee,MN as re,va as ke,N8 as Y,u$ as ve,vk as Ee,ve as le,v3 as de,vi as Pe,vf as je,N9 as ce,w$ as Le,fq as Te,gi as Ae,Na as H,v7 as pe,v6 as ue,vn as Oe,c7 as Re}from"./zeni-epic-state-BqRlfhza.js";import{J as me,A as ae,c as G,z as _,i as ge,w as fe,K as he,al as Ce,am as Fe,H as ye,o as F,M as be,O as M,an as Ve,Z as Ze,a0 as Be,E as Ue,e as we,g as $e,v as ze,ao as He,d as Ge}from"./index-Di1s4e5m.js";import{D as Se,n as N,S as xe}from"./mui-CosLSKUu.js";import te from"./NotFoundScreen-BEl52fo_.js";import{a as d}from"./sentry-DfheywaX.js";import{u as se,i as Ke,j as g,h as _e,g as Me,n as Ne,o as ne,p as z}from"./core-Da6TLrNx.js";import{u as We}from"./useAskAiCfoHostNavButtonProps-BLThPlIr.js";import{M as qe}from"./MobileAppDrawer-DqFii0U-.js";import"./recharts-9jMEgSjc.js";import"./analytics-D_NuuF2U.js";import"./plaid-2mv_ck83.js";import"./dnd-DC_qF3Wr.js";import"./stripe-cKAAJElX.js";import"./lottie-B7_cpoe1.js";import"./lexical-CQoPutFC.js";import"./pdf-CQB-J2hc.js";import"./utils-BykfwIo5.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]="bdc47a7a-6e96-4e23-8fad-113ea4422a80",e._sentryDebugIdIdentifier="sentry-dbid-bdc47a7a-6e96-4e23-8fad-113ea4422a80")}catch{}})();const Je={overlayWidth:new ye(100,100,48)},W=M.getLocalizedStrings().peoplePage.invitePage,Ye=M.getLocalizedStrings().common,Qe=({companyId:e,managersListView:t,companyPassportView:c,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:b})=>{const h=me(),m=se(),[V,Z]=d.useState(!1),[k,w]=d.useState(!1),{userId:S}=Ke(),r=g((l=>oe(l))),p=g((l=>Q(l))),v=g((l=>K(l))),{useFeatureGate:D}=ae(),{isFeatureEnabled:I}=D(G.isDebitCardFeatureEnabled),E=X(I,p),L=ie(p),T=ee(p),B=re(p),U=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!E&&v&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||c.fetchState!=="Completed"||e==null;if(_.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{m(Y()),b()},A=()=>{V===!0?w(!0):C()},$=c.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:P}=D(G.isChargeCardFeatureEnabled),j=ge(p,P,I),{isCardsHidden:O}=fe(p?.tenantId),y=!j||O,R=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:T,isAccountingClassesEnabled:v,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:R===!1,isLiteRoleDisabled:B===!1,isBankingOnlyTenant:E,isCardsOnlyTenant:L,onResetClick:C,onDeleteUser:l=>{m(de(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(le({peopleLocalData:l})),Z(!0)},onSaveClick:()=>{m(f==="zeni_only"?ve(e):Ee(T))},onCloseClick:A,isLoading:x||r.person==null},o={onOkClick:()=>{w(!1),C()},onCancelClick:()=>{w(!1)}};return d.useEffect((()=>{x===!1&&S!=null&&m(ke(S))}),[x,S]),d.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&C()}),[r.updatePersonState.fetchState]),a.jsx(Se,{anchor:"right",open:i,PaperProps:{style:{width:Je.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:he.overlayDark,cursor:"pointer"}}},onClose:A,children:a.jsxs(Xe,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(Ce,{titleComponent:a.jsx(De,{children:W.discardTitle}),descriptionComponent:a.jsx(Ie,{children:W.discardDescription}),primaryButtonText:W.discard,secondaryButtonText:Ye.no,action:o,isEditPopup:!0}):null,a.jsx(Fe,{...s})]})})},Xe=N(xe)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,De=N(be.H6Regular)`
6
- margin-top: ${F.sp7};
7
- padding-left: ${F.sp8};
8
- padding-right: ${F.sp8};
9
- color: ${e=>e.theme.colors.primary};
10
- word-break: break-word;
11
- `,Ie=N(be.LargeRegularSp)`
12
- color: ${e=>e.theme.colors.hero};
13
- padding-left: ${F.sp8};
14
- padding-right: ${F.sp8};
15
- margin-bottom: 30px;
16
- margin-top: ${F.sp4};
17
- white-space: pre-line;
18
- `,ea={overlayWidth:new ye(100,100,48)},q=M.getLocalizedStrings().peoplePage.invitePage,aa=M.getLocalizedStrings().common,sa=({companyId:e,managersListView:t,companyPassportView:c,classListView:n,mode:f,isInvitePeopleDrawerOpen:i,closeDrawerHandler:b})=>{const h=me(),m=se(),[V,Z]=d.useState(!1),[k,w]=d.useState(!1),S=g((o=>oe(o))),r=g((o=>Q(o))),p=g((o=>K(o))),{useFeatureGate:v}=ae(),{isFeatureEnabled:D}=v(G.isDebitCardFeatureEnabled),I=X(D,r),E=ie(r),L=ee(r),T=re(r),B=!!r.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,U=!I&&p&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||c.fetchState!=="Completed"||e==null;if(_.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{b(),m(Y())},C=()=>{V===!0?w(!0):x()},A={onOkClick:()=>{w(!1),x()},onCancelClick:()=>{w(!1)}},$=c.companyView?.controllers.map((o=>o.user)),u=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:P}=v(G.isChargeCardFeatureEnabled),j=ge(r,P,D),{isCardsHidden:O}=fe(r?.tenantId),y=!j||O,R=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:L,onPeopleLocalDataUpdated:o=>{m(le({peopleLocalData:o})),Z(!0)},onResetClick:x,onSaveClick:()=>{m(f==="zeni_only"?Pe(e):je())},onCloseClick:C,peopleDetails:S,isAccountingClassesEnabled:p,isReimbursementDisabled:B===!1,isLiteRoleDisabled:T===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:R===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:E,isLoading:U};return d.useEffect((()=>{S.invitePersonState.fetchState==="Completed"&&(b(),m(Y()))}),[S.invitePersonState.fetchState]),a.jsx(Se,{anchor:"right",open:i,PaperProps:{style:{width:ea.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:he.overlayDark,cursor:"pointer"}}},onClose:C,children:a.jsxs(ta,{onClick:o=>o.stopPropagation(),children:[k===!0?a.jsx(Ce,{titleComponent:a.jsx(De,{children:q.discardTitle}),descriptionComponent:a.jsx(Ie,{children:q.discardDescription}),primaryButtonText:q.discard,secondaryButtonText:aa.no,action:A}):null,a.jsx(Ve,{...s})]})})},ta=N(xe)`
19
- display: flex;
20
- min-height: 100%;
21
- flex-direction: column;
22
- `,na=Ne((function(e,t){const c=ce(e),n=_.getSignedInUser();return{data:c,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:K(e),analytics:we}}),(function(e,t){const{navigate:c,companyId:n,shouldFetchClasses:f}=t;return{personAction:{onPersonDelete:(i,b)=>{e(de(i,b))},onResendInvite:i=>{e(Oe(i))},onReloadPeople:()=>{e(pe()),e(ue(n,f))},onBackClick:()=>{c("../../")},onModeChange:i=>{e(H({mode:i,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:i=>{e(H({searchText:i}))}}}}))(He);function J({isInvitePeopleDrawerOpen:e,isEditPeopleDrawerOpen:t}){const c=_e(),n=se(),f=Me(),{areTenantIdsInSync:i}=Ze(),b=_.getSignedInUser(),h=g((s=>Q(s))),{useFeatureGate:m}=ae(),{isFeatureEnabled:V}=m(G.isDebitCardFeatureEnabled),Z=g((s=>K(s))),k=!X(V,h)&&Z,w=ee(h),S=h?.tenantId,{tenantEmailDomain:r}=h,[p,v]=d.useState(!1),[D,I]=d.useState(!1),[E,L]=d.useState(!1),[T,B]=d.useState("off"),[U,x]=d.useState(!1),C=s=>{x(s)},{isAiCfoAccessEnabled:A,onAskAiCfoClick:$}=We({mobileExploreReferrer:"People"}),u=g((s=>ce(s)));Be({isDataReady:u.fetchState==="Completed"});const P=g((s=>Le(s.classState,s.classListState))),j=g((s=>Te(s.userState,s.userRoleState,s.userListViewState,"manager"))),O=g((s=>Ae(s))),y=h?.companyId;d.useEffect((()=>{p&&T===u.uiState.mode||!i||(n(H({searchText:"",sortKey:"name",sortOrder:"ascending"})),B(u.uiState.mode),v(!0),n(pe()))}),[p,b,S,n,u.uiState.mode,i]),d.useEffect((()=>{y!=null&&i&&n(ue(y,k))}),[y,k,i]),d.useEffect((()=>{I(e!=null&&e===!0),L(t!=null&&t===!0&&t)}),[e,t]),d.useEffect((()=>{n(H({searchText:"",sortKey:"name",sortOrder:"ascending"}))}),[]);const R=()=>{I(!1),L(!1),c("../")};return a.jsxs(a.Fragment,{children:[u.fetchState==="Completed"?a.jsx(Ue,{analytics:we,onLoad:s=>s.trackPageLoaded($e.Event.members)}):null,D===!0?a.jsx(sa,{closeDrawerHandler:R,isInvitePeopleDrawerOpen:D,managersListView:j,companyPassportView:O,classListView:P,companyId:y,mode:u.uiState.mode}):null,E===!0?a.jsx(Qe,{closeDrawerHandler:R,isEditPeopleDrawerOpen:E,managersListView:j,companyPassportView:O,classListView:P,companyId:y,mode:u.uiState.mode}):null,a.jsx(qe,{isAppContentDrawerOpen:U,handleDrawerToggle:C}),a.jsx(na,{navigate:c,signedInUser:b,isZeni:h.isZeni,isZeniTenant:w,peopleUIState:u.uiState,companyId:y,shouldFetchClasses:k,classList:P,managersView:j,peopleView:u,onInvitePeopleClick:()=>{c("./new")},onColumnSortConfigChanged:(s,o)=>{n(H({sortKey:s,sortOrder:o}))},onRowClick:s=>{const o=`/${r}/people/${encodeURIComponent(s)}/edit`,l=ze(f.state?.pathnameStackToGoBack,f.pathname);c(o,{state:{pathnameStackToGoBack:l}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:A,onAskAiCfoClick:$})]})}function Da(){const e=Ge();return Re(e?.loggedInUserRole??[])?a.jsxs(ne,{children:[a.jsx(z,{path:"/",element:a.jsx(J,{})}),a.jsx(z,{path:"new",element:a.jsx(J,{isInvitePeopleDrawerOpen:!0})}),a.jsx(z,{path:":userId/edit",element:a.jsx(J,{isEditPeopleDrawerOpen:!0})}),a.jsx(z,{path:"*",element:a.jsx(te,{})})]}):a.jsx(ne,{children:a.jsx(z,{path:"*",element:a.jsx(te,{})})})}export{Da as default};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-C8AAaKDR.js";import E from"./NotFoundScreen-BEl52fo_.js";import{a as r}from"./sentry-DfheywaX.js";import{h as _,g as v,j as p,i as M,u as U,N as P,n as z,o as B,p as h}from"./core-Da6TLrNx.js";import{eZ as O,Tj as b,bq as F,bn as N,ij as V,fB as $}from"./zeni-epic-state-BqRlfhza.js";import{$ as q,z as I,a0 as Y,cY as Z}from"./index-Di1s4e5m.js";import"./mui-CosLSKUu.js";import{u as G}from"./useAskAiCfoHostNavButtonProps-BLThPlIr.js";import{M as H}from"./MobileAppDrawer-DqFii0U-.js";import"./recharts-9jMEgSjc.js";import"./analytics-D_NuuF2U.js";import"./plaid-2mv_ck83.js";import"./dnd-DC_qF3Wr.js";import"./stripe-cKAAJElX.js";import"./lottie-B7_cpoe1.js";import"./lexical-CQoPutFC.js";import"./pdf-CQB-J2hc.js";import"./utils-BykfwIo5.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]="1e351ad0-4734-4d29-ad22-820a03219894",e._sentryDebugIdIdentifier="sentry-dbid-1e351ad0-4734-4d29-ad22-820a03219894")}catch{}})();const J=z((function(e){const t=I.getSignedInUser(),d=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:d??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}}),(function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}}))(Z),K=()=>{const e=_(),t=v(),d=q(),o=p((a=>O(a))),{aggregatedReportViewState:n}=p((a=>b(a))),{tenantEmailDomain:u}=M(),f=U(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[w,S]=r.useState(!1),C=F(o?.userRole??[]),j=o?.userRole?.includes("bookkeeping_admin")??!1,k=N(l),x=C||j||k,c=r.useCallback(((a,i,A)=>{f(V({fromMonth:a,toMonth:i,cacheOverride:A}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&m.current&&(f($({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)}),[n?.fetchState]);const y=r.useCallback(((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||c(a,i,!0),m.current=!0}),[n?.fetchState,c]),D=r.useCallback(((a,i)=>{c(a,i,!1)}),[c]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:T}=G({mobileExploreReferrer:"Performance"});return Y({isDataReady:n?.fetchState==="Completed"}),x?s.jsxs(s.Fragment,{children:[s.jsx(H,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(J,{navigate:e,location:t,themeState:d,currentTenant:o,signedInUser:l,tenantEmailDomain:u,onReload:y,onTimeRangeSelect:D,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:T})]}):s.jsx(P,{to:`/${u}/dashboard`,replace:!0})};function ge(){return s.jsxs(B,{children:[s.jsx(h,{path:"*",element:s.jsx(K,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{ge as default};
@@ -1 +0,0 @@
1
- import{j as r}from"./liveblocks-C8AAaKDR.js";import F from"./NotFoundScreen-BEl52fo_.js";import{a as p}from"./sentry-DfheywaX.js";import{h as x,g as C,u as E,j as u,N as D,n as k,o as O,p as b}from"./core-Da6TLrNx.js";import{eZ as I,QB as g,QR as S,F_ as V,F7 as U,FZ as c,FQ as B,R2 as L,G0 as W}from"./zeni-epic-state-BqRlfhza.js";import{z as N,a9 as T,bZ as Q,ag as _,bC as Z,b_ as z}from"./index-Di1s4e5m.js";import"./mui-CosLSKUu.js";import{u as G,R as A}from"./ReimbursementApprovalRuleDetailScreen-ZZ1ge8yw.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]="ba488a7b-1f2a-49d3-b755-d1b8d0021a05",e._sentryDebugIdIdentifier="sentry-dbid-ba488a7b-1f2a-49d3-b755-d1b8d0021a05")}catch{}})();const y="reimbursement-approval-rule-update",K=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(L(!1))},onBackClick:()=>{_(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(B(t,!1))},onEditRuleClick:t=>{t!=null?(e(c(t)),s(`./${t}/edit`)):(e(c()),s("./new"))}}}))(T(Q)),q=({isLoading:e})=>{const o=x(),s=C(),n=E(),[t,i]=p.useState(!1),[m,R]=p.useState(!1),f=u((a=>a.remiSetupApproverViewState.fetchState)),l=u((a=>I(a))),d=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((()=>{d.allApprovalRules.length===0&&d.fetchState==="Completed"&&(m||(R(!0),n(c())),o("./new"))}),[m,d,n]);const w={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${y}`]:[],eventCallback:(a,$,h)=>{a.endsWith(y)&&h.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(K,{currentTenant:l,location:s,navigate:o,...w})},j="reimbursement-approval-rule-update",H=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(j)&&e(L(!1))},onBackClick:()=>{_(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(B(t,!0))},onEditRuleClick:t=>{t!=null?(e(c(t)),s(`./${t}/edit`)):(e(c()),s("./new"))},onReorderRules:t=>{e(W(t,!0))}}}))(T(z)),J=()=>{const e=u((n=>I(n))),{isApprovalRulesV3Enabled:o,isLoading:s}=Z(e?.tenantId);return o?r.jsx(M,{isLoading:s}):r.jsx(q,{isLoading:s})},M=({isLoading:e})=>{const o=x(),s=C(),n=E(),[t,i]=p.useState(!1),[m,R]=p.useState(!1),f=u((a=>a.remiSetupApproverViewState.fetchState)),l=u((a=>I(a))),d=u((a=>g(a)));G();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((()=>{d.allApprovalRules.length===0&&d.fetchState==="Completed"&&(m||(R(!0),n(c())),o("./new"))}),[m,d,n]);const w={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${j}`]:[],eventCallback:(a,$,h)=>{a.endsWith(j)&&h.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(H,{currentTenant:l,location:s,navigate:o,isLoading:e,...w})};function oe(){return r.jsxs(O,{children:[r.jsx(b,{path:"/",element:r.jsx(J,{})}),r.jsx(b,{path:"/new",element:r.jsx(A,{})}),r.jsx(b,{path:"/:approvalRuleId/edit",element:r.jsx(A,{})}),r.jsx(b,{path:"*",element:r.jsx(F,{})})]})}export{oe as R};
@@ -1 +0,0 @@
1
- import{j as a}from"./liveblocks-C8AAaKDR.js";import{z as b,E as S,e as u,g as E,da as k,A as C,c as I}from"./index-Di1s4e5m.js";import"./mui-CosLSKUu.js";import g from"./NotFoundScreen-BEl52fo_.js";import{a as l}from"./sentry-DfheywaX.js";import{u as D,j as h,h as F,g as U,n as L,o as T,p as f,N as y}from"./core-Da6TLrNx.js";import{eZ as _,U1 as w,U2 as p,w3 as P,fM as V,U3 as z,w1 as A}from"./zeni-epic-state-BqRlfhza.js";import"./recharts-9jMEgSjc.js";import"./analytics-D_NuuF2U.js";import"./plaid-2mv_ck83.js";import"./dnd-DC_qF3Wr.js";import"./stripe-cKAAJElX.js";import"./lottie-B7_cpoe1.js";import"./lexical-CQoPutFC.js";import"./pdf-CQB-J2hc.js";import"./utils-BykfwIo5.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]="f09ad27b-fcb6-4563-8b0f-ff83dc6ba180",e._sentryDebugIdIdentifier="sentry-dbid-f09ad27b-fcb6-4563-8b0f-ff83dc6ba180")}catch{}})();const G=L((function(e,t){const n=w(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}}),(function(e,t){const{navigate:n}=t,i=b.getSignedInUser();return{onDismissClick:()=>{e(p()),n("/")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach((m=>{s.push(m.companyName),r.push(m.emailIds[0])})),u.trackInviteEmailClicked("send",s,r,s.length)}e(A())},onUpdateInviteFormLocalData:s=>{e(z({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&u.trackInviteEmailClicked("cancel")}}}))(k),M=()=>{const e=D(),[t,n]=l.useState(!1),[i,s]=l.useState(!1),r=h((o=>_(o))),m=F(),j=U(),d=b.getSignedInUser();if(d==null)throw Error("Can't access invite referral screen without signing in...");const c=h((o=>w(o))),x=d?.firstName!=null?d.firstName:"User";l.useEffect((()=>{e(p()),r?.rewardsLastViewedTime==null&&i===!1&&(e(P()),s(!0))}),[]),l.useEffect((()=>{t||c.fetchState!=="Not-Started"||(n(!0),e(V(!0)))}),[c.fetchState,e]);const v=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[c.fetchState==="Completed"?a.jsx(S,{analytics:u,onLoad:o=>(N=>N.trackPageLoaded(E.Event.inviteEmailViewed))(o)}):null,a.jsx(G,{navigate:m,location:j,currentTenant:r,companyName:v,userName:x,inviteFormCompayData:c.localData})]})};function ne(){const{useFeatureGate:e}=C(),{isFeatureEnabled:t}=e(I.isReferralFeatureEnabled);return a.jsxs(T,{children:[a.jsx(f,{path:"/",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(f,{path:"how-it-works",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(f,{path:"refer/*",element:t?a.jsx(M,{}):a.jsx(g,{})}),a.jsx(f,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};
@@ -1 +0,0 @@
1
- import{j as f}from"./liveblocks-C8AAaKDR.js";import{a as u,b as M,q as T}from"./sentry-DfheywaX.js";import{u as A,h as z,j as c,g as D,N as O,n as j}from"./core-Da6TLrNx.js";import{u as P,z as s,y as F,e as E,O as _,f as B,g as N,h as Z,j as q,x as V,k as v}from"./index-Di1s4e5m.js";import{eZ as $,Mh as J,Mi as W,fC as G,g2 as H,Mn as K,gs as Q,cZ as R,Mo as b,Mp as X,Mq as Y,bZ as y}from"./zeni-epic-state-BqRlfhza.js";import"./mui-CosLSKUu.js";import{u as ee}from"./useDeviceId-COe_GzcU.js";import{f as te}from"./analyticsHelper-CY5dpKAo.js";import{t as ne}from"./getLocaleForTenant-B28GqiVQ.js";import"./recharts-9jMEgSjc.js";import"./analytics-D_NuuF2U.js";import"./plaid-2mv_ck83.js";import"./dnd-DC_qF3Wr.js";import"./stripe-cKAAJElX.js";import"./lottie-B7_cpoe1.js";import"./lexical-CQoPutFC.js";import"./pdf-CQB-J2hc.js";import"./utils-BykfwIo5.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]="b16200b0-ca68-4a18-a61f-9c083644596f",t._sentryDebugIdIdentifier="sentry-dbid-b16200b0-ca68-4a18-a61f-9c083644596f")}catch{}})();const ie=j((function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}}),(function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{T({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 l=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Y({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(l),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(X(n,a)))},clearSignInError:()=>{t(b())}}}))(V),ae=M.memo(ie);function ve({setTenantEmailDomain:t}){const i=A(),d=z(),{clearAllLoading:g}=P(),n=s.getSignedInUser();u.useLayoutEffect((()=>{g()}),[g]);const a=ee(),l=c((e=>e.tenantState.magicLinkCodeVerifier)),{sendEmailMagicLinkFetchState:h,accountLocked:C,accountUnlockTime:k}=c((e=>e.tenantState)),p=c((e=>e.tenantState.fetchState)),L=c((e=>e.tenantState.activeTenantFetchState.fetchState)),S=c((e=>e.tenantState.signInState)),o=c((e=>e.tenantState.loggedInUser)),r=c((e=>$(e))),I=c((e=>J(e))),m=D(),w=F().mode,x=m.state?.magicLinkExpired,U=m.state?.magicLinkAlreadyUsed;if(u.useEffect((()=>{h.fetchState==="Completed"&&l!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(l))}),[h.fetchState,l]),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(W(I.tenantsInOrder),o.zeniSessionId),G(o.userId,o.zeniSessionId,r.tenantId),i(H(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(K("Completed")),_.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),Q().then((()=>{const e=q();e!=null&&B(e)})),setTimeout((()=>{E.trackLogin(N.Event.loginSuccess,o.authProvider??"google",R(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(O,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!x,magicLinkAlreadyUsed:!!U,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),C===!0&&k!=null?f.jsx(Z,{onClose:()=>i(b()),unlockDate:k}):null]})}export{ve as default};
@@ -1,9 +0,0 @@
1
- import{j as s}from"./liveblocks-C8AAaKDR.js";import{a as i}from"./sentry-DfheywaX.js";import{u as c,g as d,N as u}from"./core-Da6TLrNx.js";import{z as a,e as n,g as m,D as g}from"./index-Di1s4e5m.js";import{gx as p,MF as b}from"./zeni-epic-state-BqRlfhza.js";import{n as y}from"./mui-CosLSKUu.js";import"./recharts-9jMEgSjc.js";import"./analytics-D_NuuF2U.js";import"./plaid-2mv_ck83.js";import"./dnd-DC_qF3Wr.js";import"./stripe-cKAAJElX.js";import"./lottie-B7_cpoe1.js";import"./lexical-CQoPutFC.js";import"./pdf-CQB-J2hc.js";import"./utils-BykfwIo5.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]="eea4a052-6f79-4e1a-a6b9-cb3bbe813439",e._sentryDebugIdIdentifier="sentry-dbid-eea4a052-6f79-4e1a-a6b9-cb3bbe813439")}catch{}})();function M(){const e=c(),t=d(),r=i.useRef(!1),f=a.isSignedIn(),o=t.state?.message==="logout"||f;return i.useEffect((()=>{if(o&&!r.current){r.current=!0;try{e(p()),b(),n.trackLogout(m.Event.logoutSuccess),n.resetUserIdentity(),a.clearAll()}catch(l){console.error("Error during sign out:",l)}finally{window.location.replace("/signin/auth")}}}),[o,e]),o?s.jsx(h,{children:s.jsx(g,{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 n}from"./liveblocks-C8AAaKDR.js";import se from"./NotFoundScreen-BEl52fo_.js";import{a as c}from"./sentry-DfheywaX.js";import{h as _,u as M,j as f,g as ne,i as oe,N as ie,n as re,o as ce,p as g}from"./core-Da6TLrNx.js";import{It as O,Iw as le,Iq as de,eZ as J,U4 as K,IK as H,In as pe,Je as ue,J7 as ke,U5 as W,U6 as N,Ij as me,Ig as ge,rY as fe,rM as he,le as Ie,IE as Se,U7 as Te,IV as be,IS as Ee,Iz as Ce,IP as Ge,IO as De}from"./zeni-epic-state-BqRlfhza.js";import{z as G,db as xe,$ as je,A as we,c as b,r as X,v,E as ye,e as V,g as ve,dc as Re,k as A,au as Ue}from"./index-Di1s4e5m.js";import{n as Fe}from"./mui-CosLSKUu.js";import{u as Be}from"./useInitialThreadRequest-DoJoRClL.js";import{M as Pe}from"./MobileAppDrawer-DqFii0U-.js";import Le from"./TaskListScreen-BnNQR3xi.js";import"./recharts-9jMEgSjc.js";import"./analytics-D_NuuF2U.js";import"./plaid-2mv_ck83.js";import"./dnd-DC_qF3Wr.js";import"./stripe-cKAAJElX.js";import"./lottie-B7_cpoe1.js";import"./lexical-CQoPutFC.js";import"./pdf-CQB-J2hc.js";import"./utils-BykfwIo5.js";import"./useAskAiCfoHostNavButtonProps-BLThPlIr.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]="63534585-2484-45e1-a221-0243411a50d1",e._sentryDebugIdIdentifier="sentry-dbid-63534585-2484-45e1-a221-0243411a50d1")}catch{}})();function $e(){const e=_(),t=M(),s=G.getSignedInUser(),{cannedResponses:u,fetchState:r,saveFetchState:d}=f((o=>o.cannedResponsesState)),l=c.useCallback((()=>{t(O())}),[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,Z=[];const ze=re((function(e,t){const{location:s,taskGroupId:u}=t,r=W(e,t.taskId),d=J(e),l=r.taskGroupId??u,k=l!=null?N(e.taskGroupState,l):void 0,a=G.getSignedInUser(),o=d.tenantId,h={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:o??""},I=K(e),{tenantEmailDomain:D}=d,E=r.recurringSourceTaskId,x=E!=null?`${A.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,Z=Object.values(S)),Z),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Ue.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${A.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=>N(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=X(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(fe(a,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(H(!1,s))},onCreateTagClick:a=>{e(ge(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(O())},onManageTemplatesClick:()=>{u(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}}))(Re);function y(){const e=_(),t=M(),s=ne(),u=je(),{taskId:r,taskGroupId:d}=oe(),l=f((i=>J(i))),k=Be(l?.companyId),{useFeatureGate:a}=we(),{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,Y]=c.useState(!1),[U,Q]=c.useState(!1),[F,ee]=c.useState(!1),[B,j]=c.useState(!1),T=c.useRef(!1),C=f((i=>i.taskListState.updateTasksFetchState.fetchState)),P=f((i=>K(i))),L=f((i=>i.taskGroupViewState.fetchState));c.useEffect((()=>{p||(Y(!0),t(H(!1,r)))}),[p,t]),c.useEffect((()=>{U||P.fetchState==="Completed"||(Q(!0),t(pe()))}),[U,t,P.fetchState]),c.useEffect((()=>{F||L==="Completed"||(ee(!0),t(ue()))}),[F,t,L]);const ae=c.useCallback((()=>{r!=null&&(T.current=!1,t(ke([r],null,{isArchived:!1})),j(!0))}),[t,r]);c.useEffect((()=>{if(B)if(C!=="In-Progress"){if(T.current){if(C==="Error")return j(!1),void(T.current=!1);if(C==="Completed"){j(!1),T.current=!1;const{tenantEmailDomain:i}=l;if(s.state?.message==="triggerBackClick"){const m=X(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}),[B,C,l,s,e]);const $=f((i=>W(i,r))),w=$.fetchState,z=G.getSignedInUser();if(z==null)throw Error("Can't access task detail page without signing in...");if(w==="Error"&&$.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:[w==="Completed"?n.jsx(ye,{analytics:V,onLoad:i=>(m=>m.trackPageLoaded(ve.Event.taskDetailPage))(i)}):null,n.jsxs(Ne,{children:[n.jsx(Pe,{isAppContentDrawerOpen:x,handleDrawerToggle:i=>{S(i)}}),n.jsx(ze,{analytics:V,currentTenant:l,handleZeniLogoClick:()=>{u.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:z,navigate:e,taskGroupId:d,taskId:r,taskDetailFetchState:w,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:I,isTaskRecurringParentEnabled:D,isTaskGroupAssigneesEnabled:E})]})]})}const Ne=Fe.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(g,{path:"/new",element:n.jsx(y,{})}),n.jsx(g,{path:"/new/:taskGroupId",element:n.jsx(y,{})}),n.jsx(g,{path:"/group/:taskGroupId",element:n.jsx(Le,{})}),n.jsx(g,{path:"/quick-responses",element:n.jsx($e,{})}),n.jsx(g,{path:"/:taskId",element:n.jsx(y,{})}),n.jsx(g,{path:"*",element:n.jsx(se,{})})]})}export{ia as default};