@zeniai/web-app-ui 5.0.94-dev → 5.0.95-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AddressRoutes-0Eyzeqmo.js +1 -0
- package/dist/assets/{AddressScreen-D79PPd-o.js → AddressScreen-C1kNIoFW.js} +2 -2
- package/dist/assets/AiCfoScreen-DiEWR7_7.js +22 -0
- package/dist/assets/{BillPayApprovalRoutes-CHeXH92D.js → BillPayApprovalRoutes-BFuKAoJn.js} +1 -1
- package/dist/assets/{BillPayRoutes-BTV6oUW7.js → BillPayRoutes-yYgD8ElZ.js} +34 -34
- package/dist/assets/{BusinessVerificationPageScreen-COhCODO3.js → BusinessVerificationPageScreen-LVeN_2_9.js} +2 -2
- package/dist/assets/{ChargeCardRoutes-jlodpUTF.js → ChargeCardRoutes-Dqh0dx38.js} +8 -8
- package/dist/assets/{CompanyPassportScreen-oolpa5Ca.js → CompanyPassportScreen-CoCoQTkp.js} +1 -1
- package/dist/assets/ConnectionAuthScreen-B7BFXXXS.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-D5Bh3dbO.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-Dc6Ovlz3.js → CustomerOnboardingRoutes-BeOSK0bV.js} +4 -4
- package/dist/assets/DashboardRoutes-DeXVvCqq.js +20 -0
- package/dist/assets/{DefaultTenantHome-Ch-_hudk.js → DefaultTenantHome-DZiebdrx.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-C4hZPJdB.js → DomesticWireDetailScreen-BU_VenPR.js} +3 -3
- package/dist/assets/DrawerScreen-BbhUunYL.js +1 -0
- package/dist/assets/EntityDetailRoutes-DdiBSVG3.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-Dt21PcAV.js → ExpenseAutomationRoutes-hIKcsGeT.js} +4 -4
- package/dist/assets/FeaturePreviewScreen-C1-h6LMu.js +1 -0
- package/dist/assets/{HubSpotOAuthCallbackScreen-DI3niet7.js → HubSpotOAuthCallbackScreen-C_sETmGk.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-CcECDB6W.js → MagicLinkRoutes-DZdU0REk.js} +4 -4
- package/dist/assets/MagicLinkSignInScreen-BDghb4vk.js +12 -0
- package/dist/assets/MobileAppDrawer-CgbJlL9u.js +1 -0
- package/dist/assets/NotFoundScreen-DjvK1NbN.js +1 -0
- package/dist/assets/{NotificationRoutes-B-vlIUTm.js → NotificationRoutes-HNy89jXR.js} +1 -1
- package/dist/assets/OAuthConsentScreen-BRyPWMqe.js +1 -0
- package/dist/assets/{PandLWithForecastRoutes-Z2m1-YQn.js → PandLWithForecastRoutes-CBP1v8tZ.js} +1 -1
- package/dist/assets/PeopleRoutes-B7-ewz69.js +22 -0
- package/dist/assets/PerformanceRoutes-COR3BTZa.js +1 -0
- package/dist/assets/{Preview-CX79dadf.js → Preview-DVbW5PS-.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-DiKCakpQ.js → QBOConnectionScreen-BRbkYHuP.js} +1 -1
- package/dist/assets/ReferralListScreen-C5_wj8jW.js +5 -0
- package/dist/assets/ReimbursementApprovalRoutes-DNyMDR4t.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DpJeZp5O.js → ReimbursementApprovalRuleDetailScreen-CO_HtFbP.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-DTIV_kcP.js → ReimbursementRoutes-pmb5ZMBe.js} +4 -4
- package/dist/assets/ReportsRoutes-C9h_dCJo.js +1 -0
- package/dist/assets/RewardsRoutes-COWJicvP.js +1 -0
- package/dist/assets/ScreenRoutes-DB3q5PNA.js +2 -0
- package/dist/assets/{SettingsRoutes-BihUnYT-.js → SettingsRoutes-DEx1uOuX.js} +7 -7
- package/dist/assets/{SetupPagesScreen-rBBoQAuI.js → SetupPagesScreen-DM0dhGt1.js} +5 -5
- package/dist/assets/{SignInScreen-DyfaUAWP.js → SignInScreen-BIF8y6r_.js} +1 -1
- package/dist/assets/SignOutScreen-D0ouX99i.js +9 -0
- package/dist/assets/{TaskListScreen-B7mkcqsp.js → TaskListScreen-CQTVeDwe.js} +2 -2
- package/dist/assets/TaskRoutes-DzCuQY-E.js +9 -0
- package/dist/assets/{TransactionDetailRoutes-BCR0Vehv.js → TransactionDetailRoutes-BjnNsU6t.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-Hfy201z1.js → TransactionDetailScreen-BSarw1vq.js} +2 -2
- package/dist/assets/{TransactionListRoutes-Cbfw3Mig.js → TransactionListRoutes-CXfUmvjI.js} +1 -1
- package/dist/assets/{TreasuryRoutes-Nis2HK0P.js → TreasuryRoutes-CDE_tE4t.js} +6 -6
- package/dist/assets/{VendorsRoutes-D8Pby__-.js → VendorsRoutes-Cz9uX3LH.js} +13 -13
- package/dist/assets/WiseConfirmationScreen-B9n09x9Y.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-DXX67VtM.js → ZeniAccountRoutes-DIt49_h_.js} +11 -11
- package/dist/assets/ZeniAccountStatementScreen-Dafm8AUT.js +9 -0
- package/dist/assets/{accountMappingHelper-ClJz5V9X.js → accountMappingHelper-DdryjbCH.js} +1 -1
- package/dist/assets/{analytics-NZ6ROu06.js → analytics-B35UERag.js} +1 -1
- package/dist/assets/{analyticsHelper-DrdSzHTB.js → analyticsHelper-D8sAsSDg.js} +1 -1
- package/dist/assets/{core-D-NK-UK9.js → core-B20PugrR.js} +2 -2
- package/dist/assets/{decodeURIComponentSafe-C48GZJfu.js → decodeURIComponentSafe-HZX6LUOb.js} +1 -1
- package/dist/assets/{dnd-C49i2BE4.js → dnd-CTNaOehy.js} +1 -1
- package/dist/assets/{empty-DH2H1-Nx.js → empty-DbjE3Pml.js} +1 -1
- package/dist/assets/{empty-CtUkBjnR.js → empty-DqPV1QMu.js} +1 -1
- package/dist/assets/{emptyVideoElement-BCGqnPYV.js → emptyVideoElement-D5A8Alvf.js} +1 -1
- package/dist/assets/{epic-D64Ymfe0.js → epic-C05Fn23e.js} +1 -1
- package/dist/assets/getLocaleForTenant-ht-6GSU5.js +1 -0
- package/dist/assets/{index-CppZNJwq.js → index-BJUGjRvu.js} +1 -1
- package/dist/assets/{index-DrTnWXwv.js → index-D8hCAHx9.js} +11630 -11593
- package/dist/assets/{index-DUe_bU79.js → index-DDN5QRfh.js} +2 -2
- package/dist/assets/{index-Cii2mjSS.js → index-DODLcfP6.js} +1 -1
- package/dist/assets/{index-CTaHBGA6.js → index-Dh7l3Ca4.js} +1 -1
- package/dist/assets/{index-Bx6iIwrK.js → index-DwJt1swd.js} +1 -1
- package/dist/assets/{index-AU1I47Je.js → index-Dx-tgz0s.js} +1 -1
- package/dist/assets/{index-DCy8xCNa.js → index-qbNk-Sh2.js} +1 -1
- package/dist/assets/{lexical-Bp-0qESw.js → lexical-BDpP_OMn.js} +1 -1
- package/dist/assets/{liveblocks-D6iO1SmY.js → liveblocks-BSDLCmF2.js} +1 -1
- package/dist/assets/{lottie-BWZi4J-8.js → lottie-DG71PfmK.js} +1 -1
- package/dist/assets/{mui-DqRlPgPp.js → mui-BBkBdMVO.js} +1 -1
- package/dist/assets/{pathToGoBack-DvdlIQjg.js → pathToGoBack-BJj5tqvK.js} +1 -1
- package/dist/assets/{pdf-BpZ3cLIj.js → pdf-Cp8DoYAG.js} +3 -3
- package/dist/assets/{pdf-lib-CNmHIzRc.js → pdf-lib-BqwRJQ00.js} +1 -1
- package/dist/assets/{plaid-BzyOi-ir.js → plaid-DHvUog4a.js} +1 -1
- package/dist/assets/{pusher-BMtiLftw.js → pusher-DsZLo3j0.js} +1 -1
- package/dist/assets/{react-CmUCRpgB.js → react-BPL_4xi4.js} +1 -1
- package/dist/assets/{react-TFItAO3U.js → react-BUTkVbbW.js} +1 -1
- package/dist/assets/{react-D3MVFA0D.js → react-D4RyndA4.js} +1 -1
- package/dist/assets/{react-BJh7Ho8n.js → react-DpONCvOo.js} +1 -1
- package/dist/assets/{react-Djxq7qii.js → react-Uu6ZW5p-.js} +1 -1
- package/dist/assets/{react-DxEGkukB.js → react-zGcoIiO8.js} +1 -1
- package/dist/assets/{recharts-Dt8dM4EI.js → recharts-BzjcN9SN.js} +1 -1
- package/dist/assets/{routePaths-B-3pox1f.js → routePaths-XreQojZr.js} +1 -1
- package/dist/assets/{sentry-DJeJwz74.js → sentry-67DqaLi1.js} +1 -1
- package/dist/assets/{url-CawXuWkK.js → url-D5ovKX_j.js} +1 -1
- package/dist/assets/{url-Cab0ioG_.js → url-DgheZiFv.js} +1 -1
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-CvDMoudE.js +1 -0
- package/dist/assets/useAskAiCfoHostNavButtonProps-CDnIxewv.js +1 -0
- package/dist/assets/{useDeviceId-CYAkkrZp.js → useDeviceId-CZrGGxHD.js} +1 -1
- package/dist/assets/useInitialThreadRequest-BHiBt2ra.js +1 -0
- package/dist/assets/{utils-CGva6Exy.js → utils-C7uJ9upL.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-CMaq9uFn.js → withTransactionSidePanel-C7OFQuvJ.js} +1 -1
- package/dist/assets/{zeni-epic-state-22WFBgK9.js → zeni-epic-state-B3AwsZqW.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +2 -2
- package/dist/assets/AddressRoutes-HF97OiuD.js +0 -1
- package/dist/assets/AiCfoScreen-CrvwqXvB.js +0 -22
- package/dist/assets/ConnectionAuthScreen-CmfFicXn.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-dJPDlAs9.js +0 -1
- package/dist/assets/DashboardRoutes-BU1BeRRW.js +0 -20
- package/dist/assets/DrawerScreen-Dhr1itui.js +0 -1
- package/dist/assets/EntityDetailRoutes-DtAVASvN.js +0 -1
- package/dist/assets/FeaturePreviewScreen-1ynGY-A8.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-C-0tiAXs.js +0 -12
- package/dist/assets/MobileAppDrawer-D38LtL34.js +0 -1
- package/dist/assets/NotFoundScreen-Dz0534r9.js +0 -1
- package/dist/assets/OAuthConsentScreen-CbMZbxsS.js +0 -1
- package/dist/assets/PeopleRoutes-B-Kt1ScJ.js +0 -22
- package/dist/assets/PerformanceRoutes-BzPr2Nnu.js +0 -1
- package/dist/assets/ReferralListScreen-kpr6aOuh.js +0 -5
- package/dist/assets/ReimbursementApprovalRoutes-Det6cqdB.js +0 -1
- package/dist/assets/ReportsRoutes-3VuypKeW.js +0 -1
- package/dist/assets/RewardsRoutes-B2QW-eU5.js +0 -1
- package/dist/assets/ScreenRoutes-0jsh5TOL.js +0 -2
- package/dist/assets/SignOutScreen-B4hTTXUy.js +0 -9
- package/dist/assets/TaskRoutes-BIYOSzTN.js +0 -9
- package/dist/assets/WiseConfirmationScreen-CQq7U1h7.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-B4C2kMj5.js +0 -9
- package/dist/assets/getLocaleForTenant-DL4YoPxV.js +0 -1
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-C7uJDZF1.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-BxaFyJbc.js +0 -1
- package/dist/assets/useInitialThreadRequest-D-JPWLWk.js +0 -1
package/dist/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en"><head><meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate"><meta http-equiv="expires" content="0"><meta http-equiv="pragma" content="no-cache"><meta charset="UTF-8"><link rel="icon" type="image/svg+xml" href="/assets/favicon-D56XvgAH.ico"><meta name="ROBOTS" content="NOINDEX, NOFOLLOW"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1"><meta name="theme-color" content="#000000"><meta name="description" content="Zeni - Modern Finance Team For Startups"><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&family=Manrope:wght@200..800&display=swap"><link rel="apple-touch-icon" href="/assets/logo192-CqcTe-t4.png"><link rel="manifest" href="/assets/manifest-icT4lOF5.json"><title>Zeni - Modern Finance Team For Startups</title><script src="/theme-detect.js"></script><style>:root{--logo-color-from:#D4DCDD;--logo-color-to:#E9F0F0;--bar-color-from:#E9F0F0;--bar-color-to:#D4DCDD;--sidebar-bg:#F3F7F7;--main-bg:#FAFCFC;--divider-color:#D4DCDD}html{background-color:#f3f7f7}html[data-theme=dark]{background-color:#1b1c1c;--logo-color-from:#545B5C;--logo-color-to:#3E4343;--bar-color-from:#3E4343;--bar-color-to:#545B5C;--sidebar-bg:#1B1C1C;--main-bg:#202222;--divider-color:#545B5C}.app-shell-loader{position:fixed;inset:0;display:flex;background-color:var(--sidebar-bg);z-index:9999}.app-shell-sidebar{width:210px;flex-shrink:0;background-color:var(--sidebar-bg);padding:16px 16px 0;display:flex;flex-direction:column;gap:36px;border-right:1px solid var(--divider-color);box-sizing:border-box}.app-shell-sidebar-group{display:flex;flex-direction:column;gap:10px}.app-shell-bar{height:10px;border-radius:5px;background-color:var(--bar-color-from);animation:app-shell-bar-shimmer 1.6s linear infinite}.app-shell-navbar{height:56px;display:flex;flex-direction:row;border-bottom:1px solid var(--divider-color);padding:0 32px;align-items:center;justify-content:space-between;box-sizing:border-box}@keyframes app-shell-bar-shimmer{0%,100%{background-color:var(--bar-color-from)}50%{background-color:var(--bar-color-to)}}.app-shell-main{flex:1;background-color:var(--main-bg)}.app-shell-logo{display:inline-flex;width:100%;height:calc(100vh - 56px);justify-content:center;align-items:center}.app-shell-logo svg path{animation:app-shell-color-cycle 1.6s linear infinite}@keyframes app-shell-color-cycle{0%,100%{fill:var(--logo-color-from)}50%{fill:var(--logo-color-to)}}@media (max-width:899px){.app-shell-sidebar{display:none}.app-shell-main{background-color:var(--sidebar-bg)}}</style><noscript><style>.app-shell-loader{display:none}</style></noscript><script async type="module" crossorigin src="/assets/index-
|
|
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-D8hCAHx9.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-67DqaLi1.js"><link rel="modulepreload" crossorigin href="/assets/core-B20PugrR.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-B3AwsZqW.js"><link rel="modulepreload" crossorigin href="/assets/mui-BBkBdMVO.js"><link rel="modulepreload" crossorigin href="/assets/analytics-B35UERag.js"><link rel="modulepreload" crossorigin href="/assets/utils-C7uJ9upL.js"><link rel="stylesheet" crossorigin href="/assets/index-Bc34frN_.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.0.
|
|
3
|
+
"version": "5.0.95-dev",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist/**/*"
|
|
6
6
|
],
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@stripe/stripe-js": "^4.4.0",
|
|
30
30
|
"@zeniai/client-analytics": "2.0.14",
|
|
31
31
|
"@zeniai/client-epic-state": "5.0.51",
|
|
32
|
-
"@zeniai/web-components": "4.1.
|
|
32
|
+
"@zeniai/web-components": "4.1.2",
|
|
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-D6iO1SmY.js";import{A as d}from"./AddressScreen-D79PPd-o.js";import i from"./NotFoundScreen-Dz0534r9.js";import"./sentry-DJeJwz74.js";import{o as s,p as r}from"./core-D-NK-UK9.js";import"./zeni-epic-state-22WFBgK9.js";import"./recharts-Dt8dM4EI.js";import"./index-DrTnWXwv.js";import"./mui-DqRlPgPp.js";import"./analytics-NZ6ROu06.js";import"./plaid-BzyOi-ir.js";import"./dnd-C49i2BE4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BWZi4J-8.js";import"./lexical-Bp-0qESw.js";import"./pdf-BpZ3cLIj.js";import"./utils-CGva6Exy.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]="4677917c-1bd8-4b00-9bd0-d308073173a3",t._sentryDebugIdIdentifier="sentry-dbid-4677917c-1bd8-4b00-9bd0-d308073173a3")}catch{}})();function _(){return e.jsxs(s,{children:[e.jsx(r,{path:"/edit/:addressType/:addressId",element:e.jsx(d,{})}),e.jsx(r,{path:"/new/:addressType",element:e.jsx(d,{})}),e.jsx(r,{path:"*",element:e.jsx(i,{})})]})}export{_ as default};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-D6iO1SmY.js";import{a as i}from"./sentry-DJeJwz74.js";import{h as ge,l as Ce,u as Ie,g as q,i as ke,n as be}from"./core-D-NK-UK9.js";import{X as we,cO as Pe,z as xe,n as Ee,cP as Te,cQ as Qe,cR as z,cS as ve,cT as Y,q as D,H,c as E,cU as W,cV as ye,a0 as _e,e as Oe,a6 as Ue,cW as Ae,a1 as Le,r as De,b0 as Fe,cX as Be}from"./index-DrTnWXwv.js";import{fI as je,f7 as Z,eQ as Re,hE as Me,QL as Ge,eP as Ve,hO as $e,hK as Ne,fy as X,fs as qe,fl as ze,fp as K,ft as He,fu as We,fv as Xe,fw as Ke,fx as Je}from"./zeni-epic-state-22WFBgK9.js";import{D as Ye,n as k,S as Ze,P as et}from"./mui-DqRlPgPp.js";import{u as tt}from"./useAiCfoDashboardSuggestedQuestionsChips-C7uJDZF1.js";import{p as st}from"./pathToGoBack-DvdlIQjg.js";import"./recharts-Dt8dM4EI.js";import"./analytics-NZ6ROu06.js";import"./plaid-BzyOi-ir.js";import"./dnd-C49i2BE4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BWZi4J-8.js";import"./lexical-Bp-0qESw.js";import"./pdf-BpZ3cLIj.js";import"./utils-CGva6Exy.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new o.Error().stack;n&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[n]="33ad90fb-69ad-4d07-9606-22cc3fdf8391",o._sentryDebugIdIdentifier="sentry-dbid-33ad90fb-69ad-4d07-9606-22cc3fdf8391")}catch{}})();const ee="chat-response-generated",ot=be(function(o,n){const t=Z(o),m=n.isSubmitting;return{showSampleQuestions:n.sessionFromUrl==="explore"&&t.uiState.currentChatSessionId==null,aiCfoView:t,isSubmitting:m,isNewChatSession:n.sessionFromUrl==="new_chat"||n.sessionFromUrl==="explore",isFullView:!0,tableDownloadEndPoint:`${Le}/tableDownload`,emailLinkQuestion:n.emailLinkQuestion,autoSubmitEmailLinkQuestion:n.autoSubmitEmailLinkQuestion,onEmailLinkQuestionProcessed:n.onEmailLinkQuestionProcessed,routedInitialQuestionSource:n.routedInitialQuestionSource,routedInitialQuestionSuggestionIndex:n.routedInitialQuestionSuggestionIndex,exploreSuggestedPromptQuestions:n.exploreSuggestedPromptQuestions,exploreSuggestedPromptQuestionsLoading:n.exploreSuggestedPromptQuestionsLoading,isFileUploadEnabled:n.isFileUploadEnabled,isUploadPromoVisible:n.isUploadPromoVisible,onUploadPromoClose:n.onUploadPromoClose}},function(o,n){const{location:t,currentTenant:m,userId:r,navigate:g,currentChatSessionId:S,allSessionsWithOrderedQuestionAnswers:C,setIsAiCfoOpen:c}=n;return{onEventReceived:(e,l)=>{if(e===ee&&typeof l.text=="string"&&typeof l.metadata=="object"){const u=l,p=We(u.type),d=u.metadata.chat_session_id??null,{currentChatSession:s,currentQuestionAnswer:b,currentQuestionAnswerSummary:T}=Y(C,d);p!=="answer"?E.trackAICFOChatResponseGenerated(p,b?.question.questionText??"",u.text,d,Be(T,s),u.metadata.message_id??null):E.trackAICFOChatAnswerGenerated(u.text,b?.question.questionText??"",(u.follow_up_questions?.length??0)>0,!!u.assumptions,!!u.insights,u.visualization!=null,Xe(u.visualization?.type??"")??null,d,u.summarized_title,u.metadata.message_id??null),o(Ke({chatSessionId:u.metadata.chat_session_id,responseType:p,fetchState:{fetchState:"Completed",error:void 0}})),o(Je({chatSessionId:u.metadata.chat_session_id,answerPayload:u,userId:r}))}},onSubmit:(e,l,u,p)=>{e&&Fe(o,e,l,S,C,r,p,u)},updateCurrentInput:e=>{o(K(e))},onStopSubmit:()=>{},onUpdateScrollYOffset:e=>{o(He(e))},onSelectSampleQuestion:()=>{},onBackClick:()=>{g(-1)},onCloseClick:()=>{const e=D(t.state?.pathnameStackToGoBack),l=e.poppedPathname??st(1);g(l,{state:{...t.state,pathnameStackToGoBack:e.newStack}}),o(K(""))},togglePageView:()=>{const e=D(t.state?.pathnameStackToGoBack),l=e.poppedPathname??`/${m.tenantEmailDomain}/dashboard`;g(l,{state:{...t.state,pathnameStackToGoBack:e.newStack,message:"open_ai_cfo_drawer"}}),c(!0)},onCopy:()=>{},onThumbsUp:()=>{},onThumbsDown:()=>{},onTogglePageView:()=>{g(-1)},onNewChatClick:()=>{S!=null&&o(ze());const e=De(t.state?.pathnameStackToGoBack,t.pathname);g(`/${m.tenantEmailDomain}/ai-cfo/new_chat`,{state:{pathnameStackToGoBack:e.slice(0,-1),referrer:"Sidebar"}})},onToggleCotCollapsed:(e,l)=>{o(qe({questionAnswerId:e,isCollapsed:l}))},onMenuClick:n.onMenuClick}})(Ue(Ae)),Et=({isFileUploadEnabled:o})=>{const{setIsAiCfoOpen:n}=we(),t=ge(),m=Ce(),r=Ie(),[g,S]=i.useState(!1);i.useEffect(()=>{t(je())},[t]);const{customPageTitle:C}=Pe(),c=q(a=>Z(a)),e=xe.getSignedInUser(),{session_id:l}=ke(),u=Ee(),p=_e(u),d=q(a=>Re(a)),s=c.uiState.currentChatSessionId,b=d.tenantEmailDomain,{handleUploadPromoClose:T,isUploadPromoVisible:te}=Te({isFileUploadEnabled:o,tenantEmailDomain:b}),Q=Qe({currentTenant:d,currentChatSessionId:s,aiCfoView:c}),{isSuggestedQuestionsLoading:se,suggestedPromptQuestions:oe}=tt(),w=r.state,P=w?.aiCfoInitialQuestion,F=!!w?.aiCfoShouldSubmit;i.useEffect(()=>{const a=r.state;if(a?.[z]!==!0)return;S(!0);const h={...a};delete h[z],m(r,{replace:!0,state:h})},[r.pathname,r.search,r.state,m]);const[ae,v]=i.useState(null),[ne,y]=i.useState(!1),[ie,_]=i.useState(void 0),[re,O]=i.useState(void 0),B=i.useRef(!1);i.useEffect(()=>{if(!B.current&&P!=null&&P!==""){const a=r.state;v(P),y(F),_(a?.aiCfoInitialSubmissionSource!=null?a.aiCfoInitialSubmissionSource:void 0);const h=a?.aiCfoSuggestionIndex;O(typeof h=="number"?h:void 0),B.current=!0}},[P,F,r.state]);const le=i.useCallback(()=>{v(null),y(!1),_(void 0),O(void 0)},[]),j=i.useMemo(()=>new URLSearchParams(r.search),[r.search]),R=j.get("ref")??w?.aiCfoRef,U=j.get("emailRefId")??w?.aiCfoEmailRefId,M=i.useRef(!1);i.useEffect(()=>{M.current||R!=="month-end-email"||U==null||s!=null||e==null||(t(Me("controller",e.userId,U,"MONTH_END_EMAIL")),M.current=!0)},[R,U,s,t,e]);const x=c.uiState.lastContextMessage;i.useEffect(()=>{x!=null&&x!==""&&s!=null&&(v(x),y(!0),_(void 0),O(void 0),t(Ge()))},[x,s,t]);const ue=d.masterTOSInfo,I=ue?.isMasterTOSAccepted??!1,{visitedSessions:G}=ve(s),A=c.fetchState,L=c.uiState.chatSessionsNextPageToken.hasMore||!c.uiState.chatSessionsFirstPageFetched,V=s!=null?c.fetchChatSessionHistoryByChatSessionId?.[s]?.fetchState??"Not-Started":"Not-Started",$=s==null||(c.uiState.chatHistoryNextPageToken[s]?.hasMore??!0),N=c.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:ce}=Y(N,s),de=ce.length===0;i.useEffect(()=>{I||p||m("../dashboard",{state:{...r.state,message:"open_ai_cfo_drawer"}})},[I,p,m,r.state]);const me=i.useCallback(()=>{const a=D(r.state?.pathnameStackToGoBack),h=d.tenantEmailDomain;m(a.poppedPathname??(h!=null?`/${h}/dashboard`:".."),{state:{...r.state,pathnameStackToGoBack:a.newStack}})},[d.tenantEmailDomain,r.state,m]);i.useEffect(()=>{s!=null&&l!==s&&m(`../ai-cfo/${s}`,{state:{...r.state}})},[s,l]),i.useEffect(()=>{l!=null&&s==null&&l!=="new_chat"&&l!=="explore"&&t(Ve({sessionId:l,agentId:"controller"}))},[]);const pe=i.useMemo(()=>({events:G.map(a=>`private-encrypted-chat-${a}.${ee}`),eventCallback:(a,h,Se)=>Se.onEventReceived(a,h)}),[G]);i.useEffect(()=>{A!=="In-Progress"&&L&&t($e())},[A,L,t]),i.useEffect(()=>{s!=null&&V!=="In-Progress"&&$&&e!=null&&A==="Completed"&&!L&&t(Ne(s,e.userId))},[V,$,s,e,t]);const fe=a=>a.trackAICFOOnboardingScreenStateChanged("open","first_visit");if(e==null||l==null)throw Error("Can't access AI Controller page without signing in...");const he=s!=null&&c.responseStateByChatSessionId?.[s]?.answer?.fetchState==="In-Progress";return!I&&p?f.jsxs(nt,{children:[f.jsx(H,{analytics:E,onLoad:fe}),Q.drawerElement,f.jsx(it,{children:f.jsx(J,{children:f.jsx(W,{isTOSAccepted:!1,acceptMasterTOSState:c.masterTOSAcceptanceState,customPageTitle:C,onCloseClick:me,onCompleteClick:()=>{d.userRoleId!=null&&t(X(d.userRoleId))}})})})]}):f.jsxs(at,{children:[f.jsx(H,{analytics:E,onLoad:a=>a.trackPageLoaded(Oe.Event.aiCFOPage)}),p&&Q.drawerElement,f.jsx(ot,{...pe,currentChatSessionId:s,allSessionsWithOrderedQuestionAnswers:N,openOnboardingPage:()=>S(!0),userId:e.userId,setIsAiCfoOpen:n,navigate:m,sessionFromUrl:l,location:r,isSubmitting:he,isEmptyChatWithSession:de,customPageTitle:C,currentTenant:d,emailLinkQuestion:ae??void 0,autoSubmitEmailLinkQuestion:ne,onEmailLinkQuestionProcessed:le,routedInitialQuestionSource:ie,routedInitialQuestionSuggestionIndex:re,onMenuClick:p?Q.open:void 0,isFileUploadEnabled:o,isUploadPromoVisible:te,onUploadPromoClose:T,exploreSuggestedPromptQuestions:oe,exploreSuggestedPromptQuestionsLoading:se}),f.jsx(Ye,{anchor:"right",open:g,transitionDuration:250,PaperProps:{component:rt,style:{width:p?"100%":`${ye}vw`}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>S(!1),children:f.jsx(J,{onClick:a=>a.stopPropagation(),children:f.jsx(W,{isTOSAccepted:I,acceptMasterTOSState:c.masterTOSAcceptanceState,customPageTitle:C,onCloseClick:()=>S(!1),onCompleteClick:()=>{I||d.userRoleId==null||t(X(d.userRoleId)),S(!1)}})})})]})},J=k(Ze)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,at=k.div`
|
|
6
|
-
height: 100vh;
|
|
7
|
-
width: 100%;
|
|
8
|
-
`,nt=k.div`
|
|
9
|
-
height: 100vh;
|
|
10
|
-
width: 100%;
|
|
11
|
-
display: flex;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
min-height: 0;
|
|
14
|
-
`,it=k.div`
|
|
15
|
-
flex: 1;
|
|
16
|
-
min-height: 0;
|
|
17
|
-
display: flex;
|
|
18
|
-
flex-direction: column;
|
|
19
|
-
`,rt=k(et)`
|
|
20
|
-
box-shadow: ${({theme:o})=>o.colors.elevation2};
|
|
21
|
-
color: ${({theme:o})=>o.colors.grey4};
|
|
22
|
-
`;export{Et as default};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-D6iO1SmY.js";import{a}from"./sentry-DJeJwz74.js";import{h as D,u as v,g as f,N as w}from"./core-D-NK-UK9.js";import{Jj as O,eQ as A,fn as U,mT as j,fP as h,fm as _,eU as L,Jq as F}from"./zeni-epic-state-22WFBgK9.js";import{u as $,z as u,L as g,O as k,o as H}from"./index-DrTnWXwv.js";import{n as P}from"./mui-DqRlPgPp.js";import{t as z}from"./getLocaleForTenant-DL4YoPxV.js";import{g as Q,Q as J}from"./QBOConnectionScreen-DiKCakpQ.js";import"./recharts-Dt8dM4EI.js";import"./analytics-NZ6ROu06.js";import"./plaid-BzyOi-ir.js";import"./dnd-C49i2BE4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BWZi4J-8.js";import"./lexical-Bp-0qESw.js";import"./pdf-BpZ3cLIj.js";import"./utils-CGva6Exy.js";import"./empty-DH2H1-Nx.js";import"./pdf-lib-CNmHIzRc.js";import"./index-DCy8xCNa.js";import"./url-CawXuWkK.js";import"./index-AU1I47Je.js";import"./decodeURIComponentSafe-C48GZJfu.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]="d937ea5f-77fa-489f-85c1-7204d316c462",t._sentryDebugIdIdentifier="sentry-dbid-d937ea5f-77fa-489f-85c1-7204d316c462")}catch{}})();const R=P.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
flex: 1 1 auto;
|
|
4
|
-
flex-direction: row;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
align-items: center;
|
|
7
|
-
width: 100%;
|
|
8
|
-
height: 100vh;
|
|
9
|
-
background-color: ${t=>t.theme.colors.background};
|
|
10
|
-
box-shadow: ${t=>`0px 2px ${H.sp1} ${t.theme.colors.dropShadowNormal}`};
|
|
11
|
-
`;function ce(){const t=D(),i=v(),{setLoading:d,clearAllLoading:x}=$(),c=a.useRef(!1),p=a.useRef(!1),{code:T,realmId:y,state:N}=Q(i.search),S=T!==""&&y!==""&&N!=="",I=f(l=>O(l)),e=f(l=>A(l)),n=f(l=>l.tenantState.fetchState),r=f(l=>l.tenantState.activeTenantFetchState.fetchState),o=u.getSignedInUser(),m=u.getActiveTenantForUser()?.tenantId,s=e?.externalConnections?.fetchState,E=e?.externalConnections?.saveConnectionState,b=e.externalConnections?.accounting[0]?.isValid;return a.useLayoutEffect(()=>{d(g.CONNECTION_AUTH)},[d]),a.useEffect(()=>{c.current||o==null||m==null||(c.current=!0,n==="Completed"||r!=="Not-Started"&&r!=="Error"||(d(g.TENANT_FETCHING),t(U(o.userId,m))))},[c,n,d]),a.useEffect(()=>{e.tenantId==null&&!p.current&&o!=null&&(p.current=!0,!(m==null||m!=null&&(r==="Completed"||r==="Error"))||n!=="Not-Started"&&n!=="Error"||t(j(o.userId)))},[p,n,r]),a.useEffect(()=>{o==null||e?.tenantId==null||e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||s==="In-Progress"||E!=="Error"||(d(g.CONNECTION_AUTH),t(h(o.userId,e.tenantId)))},[E]),a.useEffect(()=>{n!=="Completed"&&r!=="Completed"||o==null||e?.tenantId==null||(t(_(e.tenantId)),u.saveActiveTenantDomainForUser(e.tenantEmailDomain),L(o?.userId,o?.zeniSessionId,e.tenantId),k.updateAppLocaleID(z(F(e))),e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||s==="In-Progress"||o==null||e==null||t(h(o.userId,e.tenantId)))},[n,r,s]),a.useEffect(()=>{I.tenantsCoreDetailsInOrder.length>0&&n==="Completed"&&u.saveSignedInUserTenants(I.tenantsCoreDetailsInOrder)},[I.tenantsCoreDetailsInOrder.length,n]),a.useEffect(()=>{n!=="Completed"&&n!=="Error"||r!=="Completed"&&r!=="Error"||s!=="Completed"&&s!=="Error"||x()},[n,r,s]),e==null||n!=="Completed"&&r!=="Completed"||s!=="Completed"?null:S||b===!1?C.jsx(R,{children:C.jsx(J,{})}):C.jsx(w,{to:"/",replace:!0})}export{ce as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-D6iO1SmY.js";import{z as a}from"./index-DrTnWXwv.js";import{g as n}from"./QBOConnectionScreen-DiKCakpQ.js";import"./sentry-DJeJwz74.js";import{u as p,N as s}from"./core-D-NK-UK9.js";import"./zeni-epic-state-22WFBgK9.js";import"./recharts-Dt8dM4EI.js";import"./mui-DqRlPgPp.js";import"./analytics-NZ6ROu06.js";import"./plaid-BzyOi-ir.js";import"./dnd-C49i2BE4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BWZi4J-8.js";import"./lexical-Bp-0qESw.js";import"./pdf-BpZ3cLIj.js";import"./utils-CGva6Exy.js";import"./empty-DH2H1-Nx.js";import"./pdf-lib-CNmHIzRc.js";import"./index-DCy8xCNa.js";import"./url-CawXuWkK.js";import"./index-AU1I47Je.js";import"./decodeURIComponentSafe-C48GZJfu.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]="8d904e89-6b8e-4c86-980c-585a84d9d789",t._sentryDebugIdIdentifier="sentry-dbid-8d904e89-6b8e-4c86-980c-585a84d9d789")}catch{}})();const U=()=>{const t=p(),{code:o,realmId:r,state:e}=n(t.search),d=a.getSignedInUser()?.userId??"";if(f(o,r,e,d)===!0){const m=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return i.jsx(s,{to:m})}return i.jsx(s,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import{j as d}from"./liveblocks-D6iO1SmY.js";import{i as K,g as k,u as Q,h as z,l as H,n as J,j as ta,o as ut,p as F}from"./core-D-NK-UK9.js";import{eQ as U,KE as Ze,bE as aa,bq as ve,LR as Sn,i3 as yn,LS as Yt,LT as An,i6 as mt,LU as ze,LV as vn,ib as En,LW as Gt,LX as In,ig as pt,LY as Ke,LZ as Tn,cl as gt,L_ as xn,L$ as Dn,KY as wn,j9 as Fn,M0 as On,bn as Re,M1 as na,Ks as re,bc as oa,jn as sa,m$ as ra,j6 as ia,Ku as ie,Kt as X,f7 as ca,eS as Pn,fp as ht,M2 as Mn,M3 as Rn,M4 as la,M5 as we,uh as Be,ui as je,uF as Ee,uz as ce,um as Le,M6 as Bn,M7 as jn,M8 as Ln,M9 as da,Ma as Fe,Mb as Un,dE as Qe,qM as ua,Mc as Yn,Md as Gn,Me as Vn,Mf as bt,JR as Ct,jD as Ie,uN as _t,qU as Nn,Mg as $n,uj as Vt,qP as ye,qL as ma,Mh as pe,Mi as zn,Mj as kt,JQ as St,sT as pa,Mk as Kn,Ml as qn,Mm as Zn,Mn as yt,t4 as Qn,Mo as Hn,ul as Nt,sS as ha,Mp as he,Mq as Wn,bv as fa,uR as ga,Mr as Xn,Ms as Jn,Mt as eo,Mu as At,uM as to,Mv as ao,uk as $t,uQ as ba,Mw as fe,Mx as no,My as oo,Mz as Ca,js as _a,mY as ka,jx as Sa,mW as ya,mV as Aa,mU as va,sf as so,ff as ro,cN as io,cO as co,mR as lo,fb as uo,n6 as mo,DV as zt,MA as po,MB as ho,MC as fo,MD as go,b5 as He,f2 as bo,gO as Co,fG as _o,n0 as ko,i$ as So,mZ as yo,mX as Ao,eY as vo,eW as Eo}from"./zeni-epic-state-22WFBgK9.js";import{z as j,a1 as ee,r as D,c as T,O as q,aU as Io,_ as Ue,H as Ye,aV as Ea,e as N,aW as To,k as be,aX as Ia,w as Ce,I as M,m as xo,aY as Do,aZ as wo,X as Ta,n as xa,a as Da,Z as Fo,a_ as Oo,U as Po,aN as wa,a$ as Fa,b0 as Oa,a0 as Pa,b1 as Mo,b2 as Ro,aq as Bo,q as jo,Y as Lo,b3 as Uo,b4 as ge}from"./index-DrTnWXwv.js";import{n as vt}from"./mui-DqRlPgPp.js";import{a as b}from"./sentry-DJeJwz74.js";import{w as Ma}from"./withTransactionSidePanel-CMaq9uFn.js";import{c as Ra,t as Te,f as le,a as Et,v as Yo}from"./routePaths-B-3pox1f.js";import{u as te}from"./useAskAiCfoHostNavButtonProps-BxaFyJbc.js";import Me from"./NotFoundScreen-Dz0534r9.js";import{u as It}from"./useInitialThreadRequest-D-JPWLWk.js";import{t as Ba}from"./analyticsHelper-DrdSzHTB.js";import{C as Go}from"./CompanyPassportScreen-oolpa5Ca.js";import{u as Vo}from"./useAiCfoDashboardSuggestedQuestionsChips-C7uJDZF1.js";import{F as No}from"./FeaturePreviewScreen-1ynGY-A8.js";import{R as $o}from"./ReferralListScreen-kpr6aOuh.js";import"./recharts-Dt8dM4EI.js";import"./analytics-NZ6ROu06.js";import"./plaid-BzyOi-ir.js";import"./dnd-C49i2BE4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BWZi4J-8.js";import"./lexical-Bp-0qESw.js";import"./pdf-BpZ3cLIj.js";import"./utils-CGva6Exy.js";import"./TransactionDetailScreen-Hfy201z1.js";import"./decodeURIComponentSafe-C48GZJfu.js";import"./MobileAppDrawer-D38LtL34.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]="5d5f98d6-0f25-4649-8515-b0373040f606",e._sentryDebugIdIdentifier="sentry-dbid-5d5f98d6-0f25-4649-8515-b0373040f606")}catch{}})();const zo=Ma(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=K(),s=j.getSignedInUser(),i=k(A=>A.tenantState.currentTenantId),c=k(A=>U(A)),{tenantEmailDomain:m}=K(),g=Q(),C=c?.companyName??"",u={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},l=b.useMemo(()=>({authParams:u,companyName:C,downloadEndPoint:`${ee}/agingDetailedReport`,timezone:Ze()}),[]),h=b.useMemo(()=>r!=null?aa(r):ve(),[r]),p=z(),f=H(),y=k(A=>Sn(A,h,o)),I=b.useCallback(()=>{o!=null&&y.fetchState!=="In-Progress"&&y.fetchState!=="Completed"&&p(yn(o,h))},[h]),_=b.useCallback(()=>{f("../../",{relative:"path"})},[]),E=b.useCallback((A,L)=>{p(Yt({sortKey:A,sortOrder:L}))},[]),x=b.useCallback(A=>{p(Yt({downloadState:A}))},[]),R=b.useCallback(A=>{if(e)e(A.transactionId,A.transactionType);else if(m!=null){const L=Ra({id:A.transactionId,type:A.transactionType},m);f(L);const de=D(g.state?.pathnameStackToGoBack,g.pathname);f(L,{state:{pathnameStackToGoBack:de}})}},[m,e]),S=b.useCallback(()=>{y.vendor!=null&&T.trackApAgingDetail("AP Aging",h.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),y.vendor.id,y.vendor.name)},[y.vendor,h]);return b.useEffect(()=>{I()},[]),b.useEffect(()=>{y.fetchState==="Completed"&&S()},[S,y.fetchState]),d.jsx(Io,{apAgingDetail:y,downloadParams:l,reportDate:h,analytics:T,onTransactionClick:R,onReload:I,onBackClick:_,onColumnSortConfigChanged:E,updateDownloadStateHandler:x,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),Ko=()=>{const e=z(),a=H(),t=k(E=>An(E)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=te({mobileExploreReferrer:"AP Aging"});Ue({isDataReady:t.fetchState==="Completed"});const r=j.getSignedInUser(),s=k(E=>E.tenantState.currentTenantId),i=k(E=>U(E)),c=i?.companyName??"",m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},g=b.useMemo(()=>({authParams:m,companyName:c,downloadEndPoint:`${ee}/agingReport`,timezone:Ze()}),[]),C=t.apAgingUIState.selectedDate??ve(),u=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(mt(C))},[]);b.useEffect(()=>{u()},[]);const l=b.useCallback(()=>{a("../",{relative:"path"})},[]),h=b.useCallback(E=>{e(ze({searchString:E}))},[]),p=b.useCallback((E,x)=>{e(ze({sortKey:x,sortOrder:E}))},[]),f=b.useCallback(E=>{a(`./${E}/${C.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[C]),y=b.useCallback(E=>{e(ze({downloadState:E}))},[]),I=b.useCallback((E,x)=>{},[]),_=b.useCallback((E,x)=>{e(ze({selectedDate:E,agingDateSelectionType:x})),e(mt(E))},[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ye,{analytics:T,onLoad:E=>E.trackPageLoaded(N.Event.agingReport,"AP Aging")}):null,d.jsx(Ea,{uiState:t.apAgingUIState,report:t,downloadParams:g,analytics:T,onReloadReport:u,onBackClick:l,onSearchTextChange:h,onSortOrderChange:p,onEntityNameClick:f,updateDownloadStateHandler:y,onSelectedDateChanged:_,onNodeCollapseToggled:I,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},qo=Ma(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=K(),s=j.getSignedInUser(),i=k(S=>U(S)),{tenantEmailDomain:c}=K(),m=Q(),g=i.companyName,C={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},u=b.useMemo(()=>({authParams:C,companyName:g,downloadEndPoint:`${ee}/agingDetailedReport`,timezone:Ze()}),[]),l=b.useMemo(()=>r!=null?aa(r):ve(),[r]),h=z(),p=H(),f=k(S=>vn(S,l,o)),y=b.useCallback(()=>{o!=null&&f.fetchState!=="In-Progress"&&f.fetchState!=="Completed"&&h(En(o,l))},[l]),I=b.useCallback(()=>{p("../../",{relative:"path"})},[]),_=b.useCallback((S,A)=>{h(Gt({sortKey:S,sortOrder:A}))},[]),E=b.useCallback(S=>{h(Gt({downloadState:S}))},[]),x=b.useCallback(S=>{if(e)e(S.transactionId,S.transactionType);else if(c!=null){const A=Ra({id:S.transactionId,type:S.transactionType},c);p(A);const L=D(m.state?.pathnameStackToGoBack,m.pathname);p(A,{state:{pathnameStackToGoBack:L}})}},[c,e]),R=b.useCallback(()=>{f.customer!=null&&T.trackArAgingDetail("AR Aging",l.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),f.customer.id,f.customer.name)},[f.customer,l]);return b.useEffect(()=>{y()},[]),b.useEffect(()=>{f.fetchState==="Completed"&&R()},[f.fetchState,R]),d.jsx(To,{arAgingDetail:f,downloadParams:u,reportDate:l,analytics:T,onTransactionClick:x,onReload:y,onBackClick:I,onColumnSortConfigChanged:_,updateDownloadStateHandler:E,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),Zo=()=>{const e=z(),a=H(),t=k(_=>In(_)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=te({mobileExploreReferrer:"AR Aging"});Ue({isDataReady:t.fetchState==="Completed"});const r=j.getSignedInUser(),s=k(_=>U(_)),i=s.companyName,c={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},m=b.useMemo(()=>({authParams:c,companyName:i,downloadEndPoint:`${ee}/agingReport`,timezone:Ze()}),[]),g=t.arAgingUIState.selectedDate??ve(),C=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(pt(g))},[]);b.useEffect(()=>{C()},[]);const u=b.useCallback(()=>{a("../",{relative:"path"})},[]),l=b.useCallback(_=>{e(Ke({searchString:_}))},[]),h=b.useCallback((_,E)=>{e(Ke({sortKey:E,sortOrder:_}))},[]),p=b.useCallback(_=>{a(`./${_}/${g.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[g]),f=b.useCallback(_=>{e(Ke({downloadState:_}))},[]),y=b.useCallback((_,E)=>{e(Ke({selectedDate:_,agingDateSelectionType:E})),e(pt(_))},[]),I=b.useCallback((_,E)=>{e(Tn({nodeId:_,isCollapsed:E}))},[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ye,{analytics:T,onLoad:_=>_.trackPageLoaded(N.Event.agingReport,"AR Aging")}):null,d.jsx(Ea,{uiState:t.arAgingUIState,report:t,downloadParams:m,analytics:T,onReloadReport:C,onBackClick:u,onSearchTextChange:l,onSortOrderChange:h,onEntityNameClick:p,updateDownloadStateHandler:f,onSelectedDateChanged:y,onNodeCollapseToggled:I,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},ja=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function La(e,a){const t=wn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=Te(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(Fn(n,o))},onPromoCardBtnClick:n=>{if(a.isZeniAccountsAdmin){let o=`../../checking/${n}`;n?T.trackZeniAccountsCashBalancePromoClicked("Move Money"):(T.trackZeniAccountsCashBalancePromoClicked("Sign Up for Free"),o="../../checking/promo");const r=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(o,{state:{pathnameStackToGoBack:r}})}else T.trackZeniAccountsCashBalancePromoClicked("Learn More"),window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}}const Qo=J(function(e){const a=xn(e).accountsInOrder.map((n,o)=>ja(n,o)),t=Dn(e);return{sectionTitle:q.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,zeniAccountsPromoCardReport:t,fetchState:e.cashBalanceState.fetchState,analytics:T}},La)(Ia),Ho=J(function(e){const a=On(e).accountsInOrder.map((o,r)=>ja(o,r)),t=j.getSignedInUser(),n=Re(t);return{sectionTitle:q.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:T}},La)(Ia);function Wo(){const e=H(),a=Q(),{tenantEmailDomain:t}=K(),n=be(),o=k(s=>U(s).company?.companyInfo.firstMonthOfFY??1),r=gt(n?.loggedInUserRoleMap);return k(s=>s.cashBalanceState.fetchState)==="Error"?d.jsx(Me,{}):d.jsx(Qo,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,isZeniAccountsAdmin:r,firstMonthOfFY:o})}function Xo(){const e=H(),a=Q(),{tenantEmailDomain:t}=K(),n=be(),o=gt(n?.loggedInUserRoleMap),r=k(s=>U(s).company?.companyInfo.firstMonthOfFY??1);return k(s=>s.cardBalanceState.fetchState)==="Error"?d.jsx(Me,{}):d.jsx(Ho,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,isZeniAccountsAdmin:o,firstMonthOfFY:r})}const Jo=vt.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
flex: 1 1 auto;
|
|
4
|
-
min-height: 100%;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
7
|
-
`,es=vt.div`
|
|
8
|
-
display: flex;
|
|
9
|
-
flex: 1 1 auto;
|
|
10
|
-
flex-direction: column;
|
|
11
|
-
align-items: center;
|
|
12
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
13
|
-
`;function ts({title:e,reportId:a,entityAutoCompleteView:t,autoCompleteText:n,isAiCfoAccessEnabled:o,onAskAiCfoClick:r}){const s=H(),i=z(),c=Q(),{tenantEmailDomain:m}=K(),g=xo();return d.jsxs(Jo,{children:[d.jsx(Do,{source:a==="cash_balance"?"CashBalanceDetailScreen":"CardBalanceDetailScreen",title:e,onBackClick:()=>{s("../")},hideSearchBtn:!0,backgroundColor:g.colors.grey4,searchAutoComplete:{autoCompleteData:{entityAutoCompleteView:t,autoCompleteText:n},autoCompleteActions:{onAutoCompleteInputChange:C=>{C.trim().length>=2?i(ie({searchString:C,searchOrigin:"navbar"})):C.trim().length===0&&i(X("navbar"))},onAutoCompleteEntity:C=>{n!=null&&T?.trackSearch(N.Event.search,as(a),C.type,C.name,n);const u=le(C,m),l=D(c.state?.pathnameStackToGoBack,c.pathname);s(u,{state:{pathnameStackToGoBack:l}})}}},rightSideComponent:d.jsx(wo,{isAiCfoAccessEnabled:o,onAskAiCfoClick:r})}),d.jsx(es,{children:a==="cash_balance"?d.jsx(Wo,{}):d.jsx(Xo,{})})]})}function Kt(){const e=Q(),a=z(),{useFeatureGate:t}=Ce(),{isFeatureEnabled:n}=t(M.isDepositAccountsFeatureEnabled),o=k(p=>p.cashBalanceState.fetchState),r=k(p=>p.cardBalanceState.fetchState),s=j.getSignedInUser();if(s==null)throw Error("Can't access dashboard detail without signing in...");const i=na((p=>{const f=oa(p,"/").split("/");return f[f.length-1]})(e.pathname));let c="Not-Started",m="";const g=q.getLocalizedStrings();switch(i){case"cash_balance":c=o,m=g.reportTitleById.cash_balance;break;case"card_balance":c=r,m=g.reportTitleById.card_balance;break;default:console.error(`${i} is not supported!`)}const{isAiCfoAccessEnabled:C,onAskAiCfoClick:u}=te({mobileExploreReferrer:i==="card_balance"?"Card Balance":"Cash Balance"});Ue({isDataReady:c==="Completed"});const l=k(p=>p.entityAutoCompleteState.autoCompleteText.navbar),h=k(p=>re(p,"navbar"));return b.useEffect(()=>{c==="Not-Started"&&function(p,f,y){switch(f){case"card_balance":p(ia());break;case"cash_balance":p(sa()),y===!0&&p(ra());break;default:throw new Error(`balance report type ${f} is not yet supported`)}}(a,i,n)},[s,a,c]),d.jsxs(d.Fragment,{children:[c==="Completed"?d.jsx(Ye,{analytics:T,onLoad:p=>((f,y)=>{switch(y){case"card_balance":f.trackPageLoaded(N.Event.cardBalance);break;case"cash_balance":f.trackPageLoaded(N.Event.cashBalance);break;default:console.error(`Analytics: Not tracking Page Loaded for ${y}!`)}})(p,i)}):null,d.jsx(ts,{title:m,reportId:i,autoCompleteText:l,entityAutoCompleteView:h,isAiCfoAccessEnabled:C,onAskAiCfoClick:u})]})}const as=e=>{switch(e){case"cash_balance":return"Cash Balance";case"card_balance":return"Card Balance";default:return"Dashboard"}},ns=[];function Ge(e){const{mobileExploreReferrer:a}=e,t=z(),n=H(),o=Q(),{tenantEmailDomain:r}=K(),{setIsAiCfoOpen:s,setAiCfoSidePanelQuestionToSubmit:i}=Ta(),c=xa(),m=Pa(c),g=ta(),C=k(P=>ca(P)),u=C.uiState?.currentChatSessionId,l=C.allSessionsWithOrderedQuestionAnswers??ns,h=j.getSignedInUser()?.userId,p=Da(),f=Fo()&&p&&r!=null,y=Oo(),I=Po(!0),_=k(P=>y!=null?Pn(P,y):void 0),{useDynamicConfig:E}=Ce(),{configValue:x}=E(wa.aiCfoMessageDynamicConfig),R=b.useMemo(()=>Array.isArray(x.default_message_list)?x.default_message_list:[],[x.default_message_list]),S=b.useMemo(()=>R.slice(0,2),[R]),A=y!=null&&_!=null&&_.fetchState!=="Completed"&&_.fetchState!=="Error"&&(I||_.fetchState==="In-Progress"),L=b.useMemo(()=>{if(y==null||_?.fetchState==="Error")return S;if(A)return[];const P=(_?.suggestedQuestions??[]).map(ue=>ue.trim()).filter(ue=>ue.length>0).slice(0,2);return P.length===0?S:P},[S,A,y,_?.fetchState,_?.suggestedQuestions]),de=b.useCallback((P,ue)=>{if(h==null||P.trim()==="")return;const Ne=Fa(g.getState());if(m){const $e=D(o.state?.pathnameStackToGoBack,o.pathname);n(`/${r}/ai-cfo/explore`,{state:{message:"",origin:"",pathnameStackToGoBack:$e,referrer:a,aiCfoInitialQuestion:P,aiCfoShouldSubmit:!Ne}})}else{if(Ne)return t(ht(P)),void s(!0);i(P),s(!0),Oa(t,P,"insights_section",u,l,h,ue,void 0)}},[l,u,t,m,o.pathname,o.state,a,n,s,i,g,r,h]),xe=b.useCallback(()=>{if(m){const P=D(o.state?.pathnameStackToGoBack,o.pathname);n(`/${r}/ai-cfo/explore`,{state:{message:"",origin:"",pathnameStackToGoBack:P,referrer:a}})}else s(!0)},[m,o.pathname,o.state,a,n,s,r]);return b.useMemo(()=>{if(f)return{isSuggestedQuestionsLoading:A,onAskSomethingElseClick:xe,onSuggestedQuestionClick:de,suggestedQuestions:L}},[f,A,xe,de,L])}const Ve=Mo,os=J(function(e){const a=Mn(e),t=Rn(e),n=la(e),{scrollPosition:o,...r}=n,s=q.getLocalizedStrings().reportTitleById.cash_in_cash_out,i=j.getSignedInUser(),c=e.tenantState.currentTenantId,m=U(e),g=m?.companyName??"",C={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},u=e.entityAutoCompleteState.autoCompleteText.navbar,l=re(e,"navbar");return{selectedRangeReport:a,reportLabels:{reportTitle:s},highlightedRangeReport:t,uiState:r,scrollPosition:o,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:g,statementEndPoint:`${ee}/statement`,authParams:C},analytics:T,autoCompleteData:{autoCompleteText:u,entityAutoCompleteView:l}}},function(e,a){return{updateDownloadStateHandler:t=>{e(Bn(t))},onTimeframeSelectionChanged:()=>{},onCOABalancesRangeChanged:(t,n)=>{e(Le(t,n)),e(we({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(Ee("month")),e(ce(a.firstMonthOfFY,t)),e(we({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(Be(a.firstMonthOfFY,t,o,n)),n.length>0&&e(je(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.isCompareModeOn!==t&&setTimeout(()=>e(we({resetLeftScroll:!0})),50)},onElementCollapseStateChanged:(t,n)=>{e(we({nodeCollapseState:{nodeId:t,isCollapsed:n}}))},onTableScroll:t=>{e(we({scrollPosition:t}))},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(ie({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(X("navbar"))},onAutoCompleteEntity:t=>{const n=le(t,a.tenantEmailDomain),o=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{a.navigate("../")}}})(Ve),ss=e=>{const{tenantEmailDomain:a,location:t,navigate:n}=e,{isAiCfoAccessEnabled:o,onAskAiCfoClick:r}=te({mobileExploreReferrer:"DashboardCashInCashOut"}),s=Ge({mobileExploreReferrer:"DashboardCashInCashOut"}),i=k(c=>la(c)).mode==="compare_mode";return d.jsx(os,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:a,location:t,isCompareModeOn:i,navigate:n,insightsSectionAiCfoInfo:s,isAiCfoAccessEnabled:o,onAskAiCfoClick:r})},rs=e=>{let a,t;switch(e.balanceTimeFrame){case"month":case"quarter":a=e.balanceTimeFrame,t=Qe(e);break;case"year":a="quarter",t={startDate:e.endDate.startOf("quarter"),endDate:e.endDate};break;case"free_range":console.error("free_range timeframe is not supported!")}return{timeframe:a,timePeriod:t}},is=J(function(e){const a=jn(e),t=Ln(e),n=da(e),{scrollPosition:o,...r}=n,s=q.getLocalizedStrings().reportTitleById.cash_position,i=j.getSignedInUser(),c=e.tenantState.currentTenantId,m=U(e),g=m?.companyName??"",C={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},u=e.entityAutoCompleteState.autoCompleteText.navbar,l=re(e,"navbar");return{selectedRangeReport:a,reportLabels:{reportTitle:s},highlightedRangeReport:t,uiState:r,scrollPosition:o,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:g,statementEndPoint:`${ee}/statement`,authParams:C},analytics:T,autoCompleteData:{autoCompleteText:u,entityAutoCompleteView:l}}},function(e,a){return{updateDownloadStateHandler:t=>{e(Un(t))},onTimeframeSelectionChanged:t=>{e(Ee(t)),setTimeout(()=>e(Fe({resetLeftScroll:!0})),50)},onCOABalancesRangeChanged:(t,n)=>{e(Le(t,n)),e(Fe({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(ce(a.firstMonthOfFY,t)),e(Fe({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(Be(a.firstMonthOfFY,t,o,n)),n.length>0&&e(je(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.isCompareModeOn!==t&&setTimeout(()=>e(Fe({resetLeftScroll:!0})),50)},onAccountBalanceClick:(t,n)=>{const{timePeriod:o,timeframe:r}=rs(n),s=t.accountName===""?t.accountDescription:t.accountName;if(o!=null&&r!=null){const i=Te(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),c=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:c,referrer:"Cash Position"}})}},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(ie({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(X("navbar"))},onAutoCompleteEntity:t=>{const n=le(t,a.tenantEmailDomain),o=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onTableScroll:t=>{e(Fe({scrollPosition:t}))},onBackClick:()=>{a.navigate("../")}}})(Ve),cs=e=>{const{tenantEmailDomain:a,location:t,navigate:n}=e,{isAiCfoAccessEnabled:o,onAskAiCfoClick:r}=te({mobileExploreReferrer:"DashboardCashPosition"}),s=Ge({mobileExploreReferrer:"DashboardCashPosition"}),i=k(c=>da(c)).mode==="compare_mode";return d.jsx(is,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:a,location:t,isCompareModeOn:i,navigate:n,insightsSectionAiCfoInfo:s,isAiCfoAccessEnabled:o,onAskAiCfoClick:r})},$=(e,a,t,n)=>{e===!1?a!=null&&n("../../",{relative:"path"}):a!=t&&(a!=null&&a.length>0?n(`../${t}`,{replace:!0}):n(`./forecast/${t}`,{replace:!0}))};function st(){return d.jsxs(ut,{children:[d.jsx(F,{path:"/",element:d.jsx(oe,{})}),d.jsx(F,{path:"/:forecastId",element:d.jsx(oe,{})}),d.jsx(F,{path:"/:forecastId/*",element:d.jsx(Me,{})})]})}const ls=e=>{let a,t;switch(e.balanceTimeFrame){case"month":case"quarter":a=e.balanceTimeFrame,t=Qe(e);break;case"year":a="quarter",t={startDate:e.endDate.startOf("quarter"),endDate:e.endDate};break;case"free_range":console.error("free_range timeframe is not supported!")}return{timeframe:a,timePeriod:t}},ds=J(function(e){const a=ua(e),t=Yn(e),n=Gn(e),o=Vn(e),r=bt(e),{scrollPosition:s,...i}=r,c=t.reportTitle,m=j.getSignedInUser(),g=e.tenantState.currentTenantId,C=U(e),u=C?.companyName??"",l={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:g??""},h=e.entityAutoCompleteState.autoCompleteText.navbar,p=re(e,"navbar"),f=Ct(C);return{selectedRangeReport:a,selectedClassesViewRangeReport:n,reportLabels:{reportTitle:c},highlightedRangeReport:t,highlightedClassesViewRangeReport:o,uiState:i,scrollPosition:s,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:u,statementEndPoint:`${ee}/statement`,authParams:l},analytics:T,isZeniUser:Re(m),autoCompleteData:{autoCompleteText:h,entityAutoCompleteView:p},isZeniCOAUsed:f,isAccountingClassesEnabled:Ie(e)}},function(e,a){return{updateDownloadStateHandler:t=>{e(zn(t))},onTimeframeSelectionChanged:t=>{e(Ee(t)),setTimeout(()=>e(pe({resetLeftScroll:!0})),50)},onCOABalancesRangeChanged:(t,n)=>{e(Le(t,n)),e(pe({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(ce(a.firstMonthOfFY,t)),e(pe({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(Be(a.firstMonthOfFY,t,o,n)),n.length>0&&(e(je(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.forecastIdFromUrlPath!=null&&t==1&&$(!1,a.forecastIdFromUrlPath,"",a.navigate)),a.isCompareModeOn!==t&&setTimeout(()=>e(pe({resetLeftScroll:!0})),50)},onAccountBalanceClick:(t,n)=>{const{timePeriod:o,timeframe:r}=ls(n);if(o!=null&&r!=null){const s=t.accountName===""?t.accountDescription:t.accountName,i=t.classesViewParentId!=null&&t.classesViewParentId.parentClassId!=null?Et(a.tenantEmailDomain,t.accountId,t.accountType,t.classesViewParentId.parentClassId?.[0],s,r,o):Te(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),c=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:c,referrer:"Burn Rate"}})}},onElementCollapseStateChanged:(t,n)=>{e(pe({nodeCollapseState:{nodeId:t,isCollapsed:n}}))},onTableScroll:t=>{e(pe({scrollPosition:t}))},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(ie({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(X("navbar"))},onAutoCompleteEntity:t=>{const n=le(t,a.tenantEmailDomain),o=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{a.selectedForecastId!=null?a.navigate("../../../"):a.navigate("../")},onForecastToggle:(t,n)=>{e(ye(a.firstMonthOfFY,t==="forecast_mode",t==="forecast_mode"?Ae:Tt,n)),t==="forecast_mode"?(e(Vt({viewMode:"account_group"})),e(ma(!1,n?.id)),n!=null&&$(!0,a.forecastIdFromUrlPath,n?.id??"",a.navigate)):$(!1,a.forecastIdFromUrlPath,n?.id??"",a.navigate),e(pe({resetLeftScroll:!0}))},onUpdateAccountViewMode:t=>{a.analytics?.trackGroupBySwitch(t==="classes"?"Classes":"Accounts","Burn Rate"),e(Vt({viewMode:t}))},onUpdateClassesToFilterOut:t=>{e($n({classesToFilterOut:t}))},onOpenAccountViewMode:()=>{a.isAccountingClassesEnabled&&e(Nn())},onResyncReports:()=>{e(_t("net_burn_or_income_by_classes"))}}})(Ve),us=e=>{const a=z(),{tenantEmailDomain:t,location:n,navigate:o,forecastIdFromUrlPath:r}=e,{isAiCfoAccessEnabled:s,onAskAiCfoClick:i}=te({mobileExploreReferrer:"DashboardNetBurnOrIncome"}),c=Ge({mobileExploreReferrer:"DashboardNetBurnOrIncome"}),m=k(S=>bt(S)),g=m.isForecastModeOn,C=m.timeframe,u=m.selectedForecast?.id,l=k(S=>kt(S.forecastState,u??"")),h=k(S=>ua(S)),p=k(S=>St(S)),f=k(S=>Ie(S)),y=m.mode==="compare_mode",I=h.dataAvailable;b.useEffect(()=>{if(u!=null&&g===!0&&($(g,r,u,o),l!=null)){const S=l?.forecastPeriod,A=I!=null&&S.endDate.isAfter(I?.endDate)===!0?I:S;a(ce(e.firstMonthOfFY,{startDate:A.endDate.startOf(C),endDate:A?.endDate}))}},[u]);const _=be(),{useFeatureGate:E}=Ce(),{isFeatureEnabled:x}=E(M.isReportsCommentingEnabled),R=It(x?_?.currentTenant?.companyId:void 0,{clearParams:h.fetchState==="Completed"});return d.jsx(ds,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:t,selectedForecastId:r,forecastIdFromUrlPath:r,location:n,isAccountingClassesEnabled:f,isCompareModeOn:y,navigate:o,analytics:T,reportsResyncFetchState:p.reportsResyncFetchState,insightsSectionAiCfoInfo:c,isAiCfoAccessEnabled:s,onAskAiCfoClick:i,initialOpenThreadRequest:R,isReportsCommentingEnabled:x})},ms=e=>{let a,t;switch(e.balanceTimeFrame){case"month":case"quarter":a=e.balanceTimeFrame,t=Qe(e);break;case"year":a="quarter",t={startDate:e.endDate.startOf("quarter"),endDate:e.endDate};break;case"free_range":console.error("free_range timeframe is not supported!")}return{timeframe:a,timePeriod:t}},ps=J(function(e){const a=pa(e),t=Kn(e),n=qn(e),o=Zn(e),r=yt(e),{scrollPosition:s,...i}=r,c=q.getLocalizedStrings().reportTitleById.operating_expenses,m=j.getSignedInUser(),g=e.tenantState.currentTenantId,C=U(e),u=C?.companyName??"",l={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:g??""},h=e.entityAutoCompleteState.autoCompleteText.navbar,p=re(e,"navbar"),f=Ct(C);return{selectedRangeReport:a,selectedClassesViewRangeReport:n,reportLabels:{reportTitle:c},highlightedRangeReport:t,highlightedClassesViewRangeReport:o,uiState:i,scrollPosition:s,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:u,statementEndPoint:`${ee}/statement`,authParams:l},analytics:T,isZeniUser:Re(m),autoCompleteData:{autoCompleteText:h,entityAutoCompleteView:p},isZeniCOAUsed:f,isAccountingClassesEnabled:Ie(e)}},function(e,a){return{updateDownloadStateHandler:t=>{e(Wn(t))},onTimeframeSelectionChanged:t=>{e(Ee(t)),setTimeout(()=>e(he({resetLeftScroll:!0})),50)},onCOABalancesRangeChanged:(t,n)=>{e(Le(t,n)),e(he({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(ce(a.firstMonthOfFY,t)),e(he({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(Be(a.firstMonthOfFY,t,o,n)),n.length>0&&(e(je(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.forecastIdFromUrlPath!=null&&t==1&&$(!1,a.forecastIdFromUrlPath,"",a.navigate)),a.isCompareModeOn!==t&&setTimeout(()=>e(he({resetLeftScroll:!0})),50)},onAccountBalanceClick:a.hasTransactionAccess!==!0?void 0:(t,n)=>{const{timePeriod:o,timeframe:r}=ms(n);if(o!=null&&r!=null){const s=t.accountName===""?t.accountDescription:t.accountName,i=t.classesViewParentId!=null&&t.classesViewParentId.parentClassId!=null?Et(a.tenantEmailDomain,t.accountId,t.accountType,t.classesViewParentId.parentClassId?.[0],s,r,o):Te(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),c=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:c,referrer:"Operating Expenses"}})}},onElementCollapseStateChanged:(t,n)=>{e(he({nodeCollapseState:{nodeId:t,isCollapsed:n}}))},onTableScroll:t=>{e(he({scrollPosition:t}))},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(ie({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(X("navbar"))},onAutoCompleteEntity:t=>{const n=le(t,a.tenantEmailDomain),o=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{a.selectedForecastId!=null?a.navigate("../../../"):a.navigate("../")},onForecastToggle:(t,n)=>{e(ye(a.firstMonthOfFY,t==="forecast_mode",t==="forecast_mode"?Ae:Tt,n)),t=="forecast_mode"?(e(Nt({viewMode:"account_group"})),e(ha(!1,n?.id)),n!=null&&$(!0,a.forecastIdFromUrlPath,n?.id??"",a.navigate)):$(!1,a.forecastIdFromUrlPath,n?.id??"",a.navigate),e(he({resetLeftScroll:!0}))},onUpdateAccountViewMode:t=>{a.analytics?.trackGroupBySwitch(t==="classes"?"Classes":"Accounts","Operating Expenses"),e(Nt({viewMode:t}))},onUpdateClassesToFilterOut:t=>{e(Hn({classesToFilterOut:t}))},onOpenAccountViewMode:()=>{a.isAccountingClassesEnabled&&e(Qn())},onResyncReports:()=>{e(_t("operating_expenses_by_classes"))}}})(Ve),hs=e=>{const a=z(),{tenantEmailDomain:t,location:n,navigate:o,forecastIdFromUrlPath:r}=e,{isAiCfoAccessEnabled:s,onAskAiCfoClick:i}=te({mobileExploreReferrer:"DashboardOpEx"}),c=Ge({mobileExploreReferrer:"DashboardOpEx"}),m=k(A=>yt(A)),g=m.isForecastModeOn,C=m.timeframe,u=m.selectedForecast?.id,l=k(A=>kt(A.forecastState,u??"")),h=k(A=>pa(A)),p=k(A=>St(A)),f=k(A=>Ie(A)),y=m.mode==="compare_mode",I=h.dataAvailable;b.useEffect(()=>{if(u!=null&&g===!0&&($(g,r,u,o),l!=null)){const A=l?.forecastPeriod,L=I!=null&&A.endDate.isAfter(I?.endDate)===!0?I:A;a(ce(e.firstMonthOfFY,{startDate:L.endDate.startOf(C),endDate:L?.endDate}))}},[u]);const _=be(),E=_?.loggedInUserRole!=null&&fa(_?.loggedInUserRole)!==!0,{useFeatureGate:x}=Ce(),{isFeatureEnabled:R}=x(M.isReportsCommentingEnabled),S=It(R?_?.currentTenant?.companyId:void 0,{clearParams:h.fetchState==="Completed"});return d.jsx(ps,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:t,selectedForecastId:r,location:n,isAccountingClassesEnabled:f,isCompareModeOn:y,navigate:o,forecastIdFromUrlPath:r,analytics:T,hasTransactionAccess:E,reportsResyncFetchState:p.reportsResyncFetchState,insightsSectionAiCfoInfo:c,isAiCfoAccessEnabled:s,onAskAiCfoClick:i,initialOpenThreadRequest:S,isReportsCommentingEnabled:R})},fs=e=>{let a,t;switch(e.balanceTimeFrame){case"month":case"quarter":a=e.balanceTimeFrame,t=Qe(e);break;case"year":a="quarter",t={startDate:e.endDate.startOf("quarter"),endDate:e.endDate};break;case"free_range":console.error("free_range timeframe is not supported!")}return{timeframe:a,timePeriod:t}},gs=J(function(e){const a=ga(e),t=Xn(e),n=Jn(e),o=eo(e),r=At(e),{scrollPosition:s,...i}=r,c=q.getLocalizedStrings().reportTitleById.revenue,m=j.getSignedInUser(),g=e.tenantState.currentTenantId,C=U(e),u=C?.companyName??"",l={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:g??""},h=e.entityAutoCompleteState.autoCompleteText.navbar,p=re(e,"navbar"),f=Ct(C);return{selectedRangeReport:a,selectedClassesViewRangeReport:n,reportLabels:{reportTitle:c},highlightedRangeReport:t,highlightedClassesViewRangeReport:o,uiState:i,scrollPosition:s,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:u,statementEndPoint:`${ee}/statement`,authParams:l},analytics:T,isZeniUser:Re(m),autoCompleteData:{autoCompleteText:h,entityAutoCompleteView:p},isZeniCOAUsed:f,isAccountingClassesEnabled:Ie(e)}},function(e,a){return{updateDownloadStateHandler:t=>{e(no(t))},onTimeframeSelectionChanged:t=>{e(Ee(t)),setTimeout(()=>e(fe({resetLeftScroll:!0})),50)},onCOABalancesRangeChanged:(t,n)=>{e(Le(t,n)),e(fe({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(ce(a.firstMonthOfFY,t)),e(fe({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(Be(a.firstMonthOfFY,t,o,n)),n.length>0&&(e(je(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.forecastIdFromUrlPath!=null&&t==1&&$(!1,a.forecastIdFromUrlPath,"",a.navigate)),a.isCompareModeOn!==t&&setTimeout(()=>e(fe({resetLeftScroll:!0})),50)},onAccountBalanceClick:(t,n)=>{const{timePeriod:o,timeframe:r}=fs(n);if(o!=null&&r!=null){const s=t.accountName===""?t.accountDescription:t.accountName,i=t.classesViewParentId!=null&&t.classesViewParentId.parentClassId!=null?Et(a.tenantEmailDomain,t.accountId,t.accountType,t.classesViewParentId.parentClassId?.[0],s,r,o):Te(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),c=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:c,referrer:"Revenues"}})}},onElementCollapseStateChanged:(t,n)=>{e(fe({nodeCollapseState:{nodeId:t,isCollapsed:n}}))},onTableScroll:t=>{e(fe({scrollPosition:t}))},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(ie({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(X("navbar"))},onAutoCompleteEntity:t=>{const n=le(t,a.tenantEmailDomain),o=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{a.selectedForecastId!=null?a.navigate("../../../"):a.navigate("../")},onForecastToggle:(t,n)=>{e(ye(a.firstMonthOfFY,t==="forecast_mode",t==="forecast_mode"?Ae:Tt,n)),t==="forecast_mode"?(e($t({viewMode:"account_group"})),e(ba(!1,n?.id)),n!=null&&$(!0,a.forecastIdFromUrlPath,n?.id??"",a.navigate)):$(!1,a.forecastIdFromUrlPath,n?.id??"",a.navigate),e(fe({resetLeftScroll:!0}))},onUpdateAccountViewMode:t=>{a.analytics?.trackGroupBySwitch(t==="classes"?"Classes":"Accounts","Revenues"),e($t({viewMode:t}))},onUpdateClassesToFilterOut:t=>{e(ao({classesToFilterOut:t}))},onOpenAccountViewMode:()=>{a.isAccountingClassesEnabled&&e(to())},onResyncReports:()=>{e(_t("revenue_by_classes"))}}})(Ve),bs=e=>{const a=z(),{tenantEmailDomain:t,location:n,navigate:o,forecastIdFromUrlPath:r}=e,{isAiCfoAccessEnabled:s,onAskAiCfoClick:i}=te({mobileExploreReferrer:"DashboardRevenue"}),c=Ge({mobileExploreReferrer:"DashboardRevenue"}),m=k(S=>At(S)),g=m.isForecastModeOn,C=m.timeframe,u=m.selectedForecast?.id,l=k(S=>kt(S.forecastState,u??"")),h=k(S=>ga(S)),p=h.dataAvailable,f=m.mode==="compare_mode",y=k(S=>Ie(S)),I=k(S=>St(S));b.useEffect(()=>{if(u!=null&&g===!0&&($(g,r,u,o),l!=null)){const S=l?.forecastPeriod,A=p!=null&&S.endDate.isAfter(p?.endDate)===!0?p:S;a(ce(e.firstMonthOfFY,{startDate:A.endDate.startOf(C),endDate:A?.endDate}))}},[u]);const _=be(),{useFeatureGate:E}=Ce(),{isFeatureEnabled:x}=E(M.isReportsCommentingEnabled),R=It(x?_?.currentTenant?.companyId:void 0,{clearParams:h.fetchState==="Completed"});return d.jsx(gs,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:t,selectedForecastId:r,isAccountingClassesEnabled:y,isCompareModeOn:f,location:n,navigate:o,forecastIdFromUrlPath:r,analytics:T,reportsResyncFetchState:I.reportsResyncFetchState,insightsSectionAiCfoInfo:c,isAiCfoAccessEnabled:s,onAskAiCfoClick:i,initialOpenThreadRequest:R,isReportsCommentingEnabled:x})},Cs=e=>{let a,t;if(e.endDate!=null)switch(e.timePeriod){case"this_month_to_date":case"last_month":case"this_week_to_date":case"last_week":a="month",t={startDate:e.endDate.startOf("month"),endDate:e.endDate};break;case"last_3_months":case"last_6_months":case"last_12_months":case"this_year_to_date":case"last_year":a="quarter",t={startDate:e.endDate.startOf("quarter"),endDate:e.endDate};break;default:console.error(`this timeperiod ${e.timePeriod} is not supported!`)}return{timeframe:a,timePeriod:t}},_s=J(function(e){const a=oo(e),t=e.entityAutoCompleteState.autoCompleteText.navbar,n=re(e,"navbar");return{report:a,analytics:T,autoCompleteData:{autoCompleteText:t,entityAutoCompleteView:n}}},function(e,a){return{onTimeframeSelectionChanged:t=>{T.trackTimeframeSwitch(Ba(t),"Top Expenses"),e(Ca(t))},onAccountBalanceClick:(t,n)=>{const{timePeriod:o,timeframe:r}=Cs(n),s=t.accountName===""?t.accountDescription:t.accountName;if(o!=null&&r!=null){const i=Te(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),c=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:c,referrer:"Top Expenses"}})}},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(ie({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(X("navbar"))},onAutoCompleteEntity:t=>{const n=le(t,a.tenantEmailDomain),o=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{a.navigate("../")}}})(Ro),ks=e=>{const{tenantEmailDomain:a,location:t,navigate:n}=e;return d.jsx(_s,{tenantEmailDomain:a,location:t,navigate:n})},Ss=vt.div`
|
|
14
|
-
display: flex;
|
|
15
|
-
flex: 1 1 auto;
|
|
16
|
-
min-height: 100%;
|
|
17
|
-
flex-direction: column;
|
|
18
|
-
background-color: ${e=>e.theme.colors.grey5};
|
|
19
|
-
align-items: center;
|
|
20
|
-
`,Ae=3,Tt=1;function ys({fetchState:e,firstMonthOfFY:a,reportId:t,forecastId:n}){const o=H(),r=Q(),{tenantEmailDomain:s}=K();let i;Ue({isDataReady:!0});const c={firstMonthOfFY:a,tenantEmailDomain:s,location:r,navigate:o,forecastIdFromUrlPath:n,fetchState:e};switch(t){case"operating_expenses":i=d.jsx(hs,{...c});break;case"revenue":i=d.jsx(bs,{...c});break;case"net_burn_or_income":i=d.jsx(us,{...c});break;case"cash_position":i=d.jsx(cs,{...c});break;case"top_expenses":i=d.jsx(ks,{...c});break;case"cash_in_cash_out":i=d.jsx(ss,{...c});break;default:console.error(`${t} is not supported!`),i=null}return i!=null?d.jsx(Ss,{children:i}):null}function oe(){const e=Q(),a=z(),{forecastId:t}=K();let n="Not-Started";const o=k(l=>yt(l).fetchState),r=k(l=>At(l).fetchState),s=k(l=>bt(l).fetchState),i=k(l=>l.cashPositionState.fetchState),c=k(l=>l.topExState.fetchState),m=k(l=>l.cashInCashOutState.fetchState);if(j.getSignedInUser()==null)throw Error("Can't access dashboard detail without signing in...");const g=k(l=>U(l)),C=g?.company?.companyInfo?.firstMonthOfFY??1,u=na((l=>{const h=oa(l,"/").split("/");return t!=null?h[h.length-3]:h[h.length-1]})(e.pathname));switch(u){case"operating_expenses":n=o;break;case"revenue":n=r;break;case"net_burn_or_income":n=s;break;case"cash_position":n=i;break;case"top_expenses":n=c;break;case"cash_in_cash_out":n=m;break;default:console.error(`${u} is not supported!`)}return b.useEffect(()=>{n==="Not-Started"&&function(l,h,p,f){switch(h){case"operating_expenses":l(va(!0)),f!=null&&(l(ye(p,!0,Ae,{id:f,index:0})),l(ha(!1,f)));break;case"revenue":l(Aa(!0)),f!=null&&(l(ye(p,!0,Ae,{id:f,index:0})),l(ba(!1,f)));break;case"net_burn_or_income":l(ya(!0)),f!=null&&(l(ye(p,!0,Ae,{id:f,index:0})),l(ma(!1,f)));break;case"cash_position":l(Sa(!0));break;case"top_expenses":l(ka());break;case"cash_in_cash_out":l(_a());break;default:throw new Error(`report type ${h} is not yet supported`)}}(a,u,C,t)},[t]),d.jsxs(d.Fragment,{children:[n==="Completed"?d.jsx(Ye,{analytics:T,onLoad:l=>((h,p)=>{const f=e.state?.referrer;switch(p){case"operating_expenses":h.trackPageLoaded(N.Event.operatingExpenses,f);break;case"revenue":h.trackPageLoaded(N.Event.revenues,f);break;case"net_burn_or_income":h.trackPageLoaded(N.Event.burnRate,f);break;case"cash_position":h.trackPageLoaded(N.Event.cashPosition,f);break;case"top_expenses":h.trackPageLoaded(N.Event.topExpenses,f);break;case"cash_in_cash_out":h.trackPageLoaded(N.Event.cashInCashOut,f);break;default:console.error(`Analytics: Not tracking Page Loaded for ${p}!`)}})(l,u)}):null,d.jsx(ys,{firstMonthOfFY:C,fetchState:n,reportId:u,forecastId:t})]})}var rt=typeof navigator<"u"&&navigator.userAgent.toLowerCase().indexOf("firefox")>0;function it(e,a,t,n){e.addEventListener?e.addEventListener(a,t,n):e.attachEvent&&e.attachEvent("on".concat(a),function(){t(window.event)})}function Ua(e,a){for(var t=a.slice(0,a.length-1),n=0;n<t.length;n++)t[n]=e[t[n].toLowerCase()];return t}function Ya(e){typeof e!="string"&&(e="");for(var a=(e=e.replace(/\s/g,"")).split(","),t=a.lastIndexOf("");t>=0;)a[t-1]+=",",a.splice(t,1),t=a.lastIndexOf("");return a}for(var xt={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":rt?173:189,"=":rt?61:187,";":rt?59:186,"'":222,"[":219,"]":221,"\\":220},se={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},ft={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},B={16:!1,18:!1,17:!1,91:!1},O={},qe=1;qe<20;qe++)xt["f".concat(qe)]=111+qe;var w=[],qt=!1,Ga="all",Zt=[],We=function(e){return xt[e.toLowerCase()]||se[e.toLowerCase()]||e.toUpperCase().charCodeAt(0)};function Qt(e){Ga=e||"all"}function Pe(){return Ga||"all"}var ct=function(e){var a=e.key,t=e.scope,n=e.method,o=e.splitKey,r=o===void 0?"+":o;Ya(a).forEach(function(s){var i=s.split(r),c=i.length,m=i[c-1],g=m==="*"?"*":We(m);if(O[g]){t||(t=Pe());var C=c>1?Ua(se,i):[];O[g]=O[g].filter(function(u){return!((!n||u.method===n)&&u.scope===t&&function(l,h){for(var p=l.length>=h.length?l:h,f=l.length>=h.length?h:l,y=!0,I=0;I<p.length;I++)f.indexOf(p[I])===-1&&(y=!1);return y}(u.mods,C))})}})};function Ht(e,a,t,n){var o;if(a.element===n&&(a.scope===t||a.scope==="all")){for(var r in o=a.mods.length>0,B)Object.prototype.hasOwnProperty.call(B,r)&&(!B[r]&&a.mods.indexOf(+r)>-1||B[r]&&a.mods.indexOf(+r)===-1)&&(o=!1);(a.mods.length!==0||B[16]||B[18]||B[17]||B[91])&&!o&&a.shortcut!=="*"||a.method(e,a)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}function Wt(e,a){var t=O["*"],n=e.keyCode||e.which||e.charCode;if(Y.filter.call(this,e)){if(n!==93&&n!==224||(n=91),w.indexOf(n)===-1&&n!==229&&w.push(n),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(h){var p=ft[h];e[h]&&w.indexOf(p)===-1?w.push(p):!e[h]&&w.indexOf(p)>-1?w.splice(w.indexOf(p),1):h==="metaKey"&&e[h]&&w.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(w=w.slice(w.indexOf(p))))}),n in B){for(var o in B[n]=!0,se)se[o]===n&&(Y[o]=!0);if(!t)return}for(var r in B)Object.prototype.hasOwnProperty.call(B,r)&&(B[r]=e[ft[r]]);e.getModifierState&&(!e.altKey||e.ctrlKey)&&e.getModifierState("AltGraph")&&(w.indexOf(17)===-1&&w.push(17),w.indexOf(18)===-1&&w.push(18),B[17]=!0,B[18]=!0);var s=Pe();if(t)for(var i=0;i<t.length;i++)t[i].scope===s&&(e.type==="keydown"&&t[i].keydown||e.type==="keyup"&&t[i].keyup)&&Ht(e,t[i],s,a);if(n in O){for(var c=0;c<O[n].length;c++)if((e.type==="keydown"&&O[n][c].keydown||e.type==="keyup"&&O[n][c].keyup)&&O[n][c].key){for(var m=O[n][c],g=m.splitKey,C=m.key.split(g),u=[],l=0;l<C.length;l++)u.push(We(C[l]));u.sort().join("")===w.sort().join("")&&Ht(e,m,s,a)}}}}function Y(e,a,t){w=[];var n=Ya(e),o=[],r="all",s=document,i=0,c=!1,m=!0,g="+",C=!1;for(t===void 0&&typeof a=="function"&&(t=a),Object.prototype.toString.call(a)==="[object Object]"&&(a.scope&&(r=a.scope),a.element&&(s=a.element),a.keyup&&(c=a.keyup),a.keydown!==void 0&&(m=a.keydown),a.capture!==void 0&&(C=a.capture),typeof a.splitKey=="string"&&(g=a.splitKey)),typeof a=="string"&&(r=a);i<n.length;i++)o=[],(e=n[i].split(g)).length>1&&(o=Ua(se,e)),(e=(e=e[e.length-1])==="*"?"*":We(e))in O||(O[e]=[]),O[e].push({keyup:c,keydown:m,scope:r,mods:o,shortcut:n[i],method:t,key:n[i],splitKey:g,element:s});s!==void 0&&!function(u){return Zt.indexOf(u)>-1}(s)&&window&&(Zt.push(s),it(s,"keydown",function(u){Wt(u,s)},C),qt||(qt=!0,it(window,"focus",function(){w=[]},C)),it(s,"keyup",function(u){Wt(u,s),function(l){var h=l.keyCode||l.which||l.charCode,p=w.indexOf(h);if(p>=0&&w.splice(p,1),l.key&&l.key.toLowerCase()==="meta"&&w.splice(0,w.length),h!==93&&h!==224||(h=91),h in B)for(var f in B[h]=!1,se)se[f]===h&&(Y[f]=!1)}(u)},C))}var lt={setScope:Qt,getScope:Pe,deleteScope:function(e,a){var t,n;for(var o in e||(e=Pe()),O)if(Object.prototype.hasOwnProperty.call(O,o))for(t=O[o],n=0;n<t.length;)t[n].scope===e?t.splice(n,1):n++;Pe()===e&&Qt(a||"all")},getPressedKeyCodes:function(){return w.slice(0)},isPressed:function(e){return typeof e=="string"&&(e=We(e)),w.indexOf(e)!==-1},filter:function(e){var a=e.target||e.srcElement,t=a.tagName,n=!0;return!a.isContentEditable&&(t!=="INPUT"&&t!=="TEXTAREA"&&t!=="SELECT"||a.readOnly)||(n=!1),n},trigger:function(e){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(O).forEach(function(t){var n=O[t].find(function(o){return o.scope===a&&o.shortcut===e});n&&n.method&&n.method()})},unbind:function(e){if(e===void 0)Object.keys(O).forEach(function(s){return delete O[s]});else if(Array.isArray(e))e.forEach(function(s){s.key&&ct(s)});else if(typeof e=="object")e.key&&ct(e);else if(typeof e=="string"){for(var a=arguments.length,t=new Array(a>1?a-1:0),n=1;n<a;n++)t[n-1]=arguments[n];var o=t[0],r=t[1];typeof o=="function"&&(r=o,o=""),ct({key:e,scope:o,method:r,splitKey:"+"})}},keyMap:xt,modifier:se,modifierMap:ft};for(var dt in lt)Object.prototype.hasOwnProperty.call(lt,dt)&&(Y[dt]=lt[dt]);if(typeof window<"u"){var As=window.hotkeys;Y.noConflict=function(e){return e&&window.hotkeys===Y&&(window.hotkeys=As),Y},window.hotkeys=Y}Y.filter=function(){return!0};var Xt=function(e,a){var t=e.target,n=t&&t.tagName;return!!(n&&a&&a.includes(n))};function vs(e,a,t,n){t instanceof Array&&(n=t,t=void 0);var o=t||{},r=o.enableOnTags,s=o.filter,i=o.keyup,c=o.keydown,m=o.filterPreventDefault,g=m===void 0||m,C=o.enabled,u=C===void 0||C,l=o.enableOnContentEditable,h=l!==void 0&&l,p=b.useRef(null),f=b.useCallback(function(y,I){var _,E;return s&&!s(y)?!g:!!(Xt(y,["INPUT","TEXTAREA","SELECT"])&&!Xt(y,r)||(_=y.target)!=null&&_.isContentEditable&&!h)||!!(p.current===null||document.activeElement===p.current||(E=p.current)!=null&&E.contains(document.activeElement))&&(a(y,I),!0)},n?[p,r,s].concat(n):[p,r,s]);return b.useEffect(function(){if(u)return i&&c!==!0&&(t.keydown=!1),Y(e,t||{},f),function(){return Y.unbind(e,f)};Y.unbind(e,f)},[f,e,u]),p}Y.isPressed;const Es=[],Jt="dashboard_card",W="ai_cfo_dashboard_card";function ea(e,a){return a?e.some(t=>String(t)===W)?e.slice():[W,...e]:e.filter(t=>String(t)!==W)}const Is=["net_burn_or_income_story_card","cash_balance","task_card","card_balance","zeni_promo_card","insights_dashboard","information_card","company_details","bill_pay_promo_card","bill_pay_card","reimbursement_card","reimbursement_promo_card","zeni_accounts_promo_card","rewards_card","treasury_promo_card"],Ts=(e,a,t,n,o)=>({card:{dimension:He(t),cardType:n,cardIndex:o,fetchState:a,disableAnimations:!1,spansFullDashboardWidth:!1},data:e.status!=null?{balanceAmount:e.balance?.available,lastUpdatedTime:e.status.lastRefreshSuccessTime,changePercent:e.balance?.change?.percent,changeComparedToDate:e.balance?.change?.since}:void 0}),Oe=(e,a,t,n,o)=>({card:{dimension:He(t),cardType:n,cardIndex:o,fetchState:a,disableAnimations:!1,spansFullDashboardWidth:!1},data:e}),xs=(e,a,t,n)=>Oe(void 0,e,ge,a,t),Ds=(e,a,t,n,o)=>({card:{dimension:He(ge),cardType:a,cardIndex:t,fetchState:e,disableAnimations:!1,spansFullDashboardWidth:!1},data:{funds:n,hasUserSeenVideo:o,videoUrl:"https://www.youtube.com/watch?v=sqvJWKCMZgk"}}),ws=e=>{const a=He(ge);return a.height=ge.height+10,{card:{dimension:a,cardType:W,cardIndex:e,fetchState:"Completed",disableAnimations:!1,spansFullDashboardWidth:!0}}},Fs=J(function(e,a){const t=Ms(a.dashboardReport),n=a.passedCardsOrdered,o=a.dashboardReport.reportsInOrder,{isInterestedInChargeCard:r,cardsCreditLimit:s,cashbackRate:i,treasuryFundDetails:c,hasUserSeenTreasuryVideo:m,treasuryFetchState:g}=a;let C=n.map((u,l)=>{if(u==="reimbursement_promo_card"||u==="bill_pay_promo_card")return xs(t,u,l);if(u==="zeni_promo_card")return Oe({isExpressedInterest:r,creditLimit:s,cashbackRate:i,fetchState:"Completed"},a.cardBalanceFetchState,ge,u,l);if(u==="treasury_promo_card")return Ds(g,u,l,c,m);if(u==="information_card")return Oe(void 0,"Completed",ge,u,l);if(u===W)return ws(l);{const h=o.find(p=>p?.reportId===u);return h?function(p,f,y,I){const _=p.reportId;switch(_){case"card_balance":case"cash_balance":return[Ts(p,f,y,_,I)];case"expense_automation_card":case"operating_expenses":case"revenue":case"top_expenses":case"cash_position":case"cash_in_cash_out":case"insights_dashboard":case"company_details":case"task_card":case"bill_pay_card":case"reimbursement_card":case"net_burn_or_income":case"accounts_payable_aging":case"accounts_receivable_aging":case"zeni_accounts_promo_card":case"rewards_card":return[Oe(p,f,y,_,I)];case"net_burn_or_income_story_card":return[Oe(p,f,y,"net_burn_or_income_story_card",I)];default:return console.error(`card type ${_} not yet supported!`),[]}}(h,h.fetchState,ge,l):[]}}).flat();return a.isSummaryCardsFiltered===!0&&(C=C.filter(u=>Is.includes(u.card.cardType)==0).filter(u=>{const l=u.data?.availableNumberOfPeriods;return l!=null?l>0:u.card.cardType!="top_expenses"||u.data==null||function(h){if(h==null||h.length===0)return!0;let p=!0;for(const f of h)if(f.balance.available.amount!==0){p=!1;break}return p}(u.data.topExpenses.accountsOrdered)===!1})),{cardDataArray:C,autoCompleteData:{autoCompleteText:e.entityAutoCompleteState.autoCompleteText.navbar,entityAutoCompleteView:re(e,"navbar")},analytics:T,isReimbursementEnabled:a.isReimbursementEnabled,isBillPayEnabled:a.isBillPayEnabled}},function(e,a){const t=a.tenantId,n=j.getSignedInUser();return{cardActions:{onCardClick:(o,r,s,i)=>{if(console.warn(`onCardClick at ${o} for the type ${r}`),r==="zeni_promo_card"&&i!=null)T.trackDashboardCardClicked("cards promo",2),T.trackZeniCardsPromoCardClicked(a.isChargeCardFeatureEnabled,i,2,`${n?.firstName??""} ${n?.lastName??""}`,a.isChargeCardFeatureEnabled?a.cardsCreditLimit:void 0),i==="Learn More"?window.open("https://www.zeni.ai/product/business-credit-card","_blank"):a.navigate("../cards/promo",{relative:"path"});else if(a.isForecastOn)switch(r){case"net_burn_or_income":case"operating_expenses":case"revenue":a.navigate(`${r}/forecast/${a.selectedForecastOnDashboard}`,{state:{referrer:s}});break;default:a.navigate(`${r}`,{state:{referrer:s}})}else r==="rewards_card"?(n!=null&&T.trackDashboardCardClicked("rewards promo",o+1),a.navigate("../../rewards/refer",{state:{referrer:s}})):r==="expense_automation_card"?(T.trackMonthEndCloseClicked(a.selectedPeriod.month,a.selectedPeriod.year,"Dashboard"),a.navigate("../../month_end_close_checks/review",{state:{referrer:"Dashboard"}})):a.navigate(`${r}`,{state:{referrer:s}})},onReloadData:(o,r)=>{const s=[];a.isApAgingFeatureEnabled===!1&&s.push("accounts_payable_aging"),a.isArAgingFeatureEnabled===!1&&s.push("accounts_receivable_aging"),a.isZeniAccountEnabled===!1&&s.push("zeni_accounts_promo_card"),a.isRewardsFeatureEnabled===!1&&s.push("rewards_card"),function(i,c,m,g){if(c!==W)switch(c){case"card_balance":i(ia());break;case"cash_balance":i(sa());break;case"operating_expenses":i(va(!0));break;case"revenue":i(Aa(!0));break;case"net_burn_or_income":i(ya(!0));break;case"net_burn_or_income_story_card":i(Ao(!0));break;case"cash_position":i(Sa(!0));break;case"top_expenses":i(ka());break;case"cash_in_cash_out":i(_a());break;case"insights_dashboard":i(yo());break;case"bill_pay_card":i(So());break;case"reimbursement_card":i(ko());break;case"company_details":i(_o(m));break;case"task_card":i(Co());break;case"accounts_payable_aging":g.includes("accounts_payable_aging")===!1&&i(mt(ve()));break;case"accounts_receivable_aging":i(pt(ve()));break;case"zeni_accounts_promo_card":g.includes("zeni_accounts_promo_card")===!1&&i(ra());break;case"rewards_card":g.includes("rewards_card")===!1&&i(bo(!0));break;default:throw new Error(`report type ${c} is not yet supported`)}}(e,r,a.companyId,s)},onTimeframeChange:(o,r)=>{T.trackTimeframeSwitch(Ba(r),Ps(o),"Dashboard"),function(s,i,c){switch(i){case"operating_expenses":case"revenue":case"net_burn_or_income":case"cash_position":s(Ee(c));break;case"top_expenses":s(Ca(c));break;default:throw new Error(`report type ${i} doesn't support changeTimeframe`)}}(e,o,r)},onUpdateSelectedInsightIndex:o=>{e(go(o))},onCategoryClick:(o,r,s)=>{o==="bill-pay"?a.navigate("../bills",{state:{tab:r,subTab:s},relative:"path"}):o==="reimbursement"?a.navigate("../reimbursements",{state:{tab:r,subTab:s},relative:"path"}):o==="uncategorized-account-mapping"?a.navigate("../settings/accounting",{relative:"path"}):o==="show-all-tasks"?a.navigate("../tasks",{relative:"path"}):a.navigate(`../../transactions/${o}`)},onCardBtnClick:(o,r)=>{if(o==="bill_pay_promo_card"){const s="../bills",i=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i},relative:"path"})}else if(o==="reimbursement_promo_card"){const s="../reimbursements",i=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i},relative:"path"})}else if(o==="zeni_accounts_promo_card")if(a.hasZeniAccountsAdminAccess){let s="../checking/promo";r!=null&&(s=`../checking/${r}`);const i=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i},relative:"path"})}else window.open("https://www.zeni.ai/product/business-checking-accounts","_blank");else if(o==="treasury_promo_card")if(a.isUserHasTreasuryAccess){j.saveTreasuryPopupSeen(a.tenantEmailDomain,!0);const s="../treasury",i=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i},relative:"path"})}else window.open("https://www.zeni.ai/product/treasury","_blank")},onSaveClick:(o,r,s)=>{o==="net_burn_or_income_story_card"&&(T.trackUpdateBurnRateCalculatorSettings(r,s,ho(s)),e(fo(t,r,s)))},onVideoPlay:()=>{e(zt())},onVideoClose:()=>{e(zt()),e(po())}},autoCompleteActions:{onAutoCompleteInputChange:o=>{o.trim().length>=2?e(ie({searchString:o,searchOrigin:"navbar"})):o.trim().length===0&&e(X("navbar"))},onCancelAutoComplete:()=>{e(X("navbar"))},onAutoCompleteEntity:o=>{let r="";r=o.type!=="vendor"||o.detailType!=="bank_merchant"&&o.detailType!=="card_merchant"?le(o,a.tenantEmailDomain):Yo(o.zeniId,o.qboId,a.tenantEmailDomain);const s=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(r,{state:{pathnameStackToGoBack:s,referrer:"Search"}})}}}})(Uo);function Os(){const e=ta(),a=xa(),t=Pa(a),{isAiCfoOpen:n,setIsAiCfoOpen:o,setAiCfoSidePanelQuestionToSubmit:r}=Ta(),s=H(),i=z(),c=Q(),m=j.getSignedInUser(),{useFeatureGate:g,useDynamicConfig:C}=Ce(),u=Re(m),[l,h]=b.useState(!1),[p,f]=b.useState(!1),y=Da(),{tenantEmailDomain:I}=K(),{isAiCfoAccessEnabled:_,onAskAiCfoClick:E}=te({mobileExploreReferrer:"Dashboard"}),x=k(v=>v.tenantState.fetchState==="Completed"||v.tenantState.activeTenantFetchState.fetchState==="Completed"?U(v):void 0),R=x??j.getSignedInUserTenant(I),S=R.tenantId,A=R.companyId;b.useEffect(()=>{l===!1&&c.state?.message==="activation"&&(i(so(A)),h(!0))},[c.state,l,A,i]),b.useEffect(()=>{y&&!p&&c.state?.message==="open_ai_cfo_drawer"&&(o(!0),f(!0),s(c.pathname,{replace:!0,state:{...c.state,message:void 0}}))},[c.state,p,y,o,s,c.pathname]);const{isFeatureEnabled:L}=g(M.isApAgingFeatureEnabled),{isFeatureEnabled:de}=g(M.isExpenseAutomationEnabled),{isFeatureEnabled:xe}=g(M.isExpenseAutomationEnabledV2),P=xe||de&&u,{isFeatureEnabled:ue}=g(M.isTreasuryEnabled),Ne=Bo(P),{isFeatureEnabled:$e}=g(M.isArAgingFeatureEnabled),{isFeatureEnabled:Dt}=g(M.isDepositAccountsFeatureEnabled),{isFeatureEnabled:wt}=g(M.isReferralFeatureEnabled),{isFeatureEnabled:Va}=g(M.isChargeCardFeatureEnabled),{isFeatureEnabled:Na}=g(M.isAiCfoFileUploadEnabled),{isFeatureEnabled:$a}=g(M.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:za}=g(M.isDashboardSidebarNewYearAnimationEnabled),{configValue:Ft}=C(wa.zeniCardsConfig),Ka=Ft.charge_card_cashback_rate_per_transaction==null?.0175:Ft.charge_card_cashback_rate_per_transaction;if(c.state?.message==="activation"){const v=jo(c.state?.pathnameStackToGoBack);s(c.pathname,{state:{...c.state,message:void 0,pathnameStackToGoBack:v.newStack}})}const[Ot,qa]=b.useState(!1),[Xe,Za]=b.useState(!1);vs("command+p, Control+p",v=>{Za(!Xe),v.preventDefault()},{enableOnContentEditable:!0,enableOnTags:["INPUT","SELECT","TEXTAREA"]},[Xe]);const Pt=x?.externalConnections?.accounting[0]?.isValid;if(m==null)throw Error("Can't access dashboard without signing in...");const me=k(v=>U(v)?.excludedResources),Qa=k(v=>v.expenseAutomationViewState.selectedPeriodByTenantId),Ha=!!x?.companyReimbursementInfo?.info?.isReimbursementEnabled,Wa=!!x?.companyBillPayInfo?.info?.isBillPayEnabled,Xa=k(v=>v.treasurySetupViewState.treasuryFundsDetails).fetchStatus.fetchState,Ja=x?.company!=null&&ro(x.company),Je=ue&&Ja,et=be(),en=gt(et?.loggedInUserRoleMap),G=[],Mt=me?.resources?.find(v=>v.resource==="/reports/top_expenses")==null,tn=me?.resources?.find(v=>v.resource==="/reports/task_card")==null,tt=x?.userRole!=null&&fa(x?.userRole),an=me?.resources?.find(v=>v.resource==="/bills")==null&&!tt,nn=me?.resources?.find(v=>v.resource==="/reimbursements")==null,on=io(et?.loggedInUserRoleMap),sn=co(et?.loggedInUserRoleMap),rn=x?.company?.companyChargeCardInfo?.chargeCardsCreditAccountLimit??0,cn=x?.companyChargeCardInfo?.info?.isCompanyInterestedInChargeCard??!1,ln=k(v=>v.treasurySetupViewState.treasuryFundsDetails).fundsDetails;Mt===!1&&G.push("top_expenses"),tn===!1&&G.push("task_card"),an===!1&&G.push("bill_pay_card","bill_pay_promo_card"),L===!1&&G.push("accounts_payable_aging"),$e===!1&&G.push("accounts_receivable_aging"),(P===!1||tt)&&G.push("expense_automation_card"),nn===!1&&G.push("reimbursement_card","reimbursement_promo_card"),Dt===!1&&G.push("zeni_accounts_promo_card"),wt===!1&&G.push("rewards_card"),Je===!1&&G.push("treasury_promo_card");const{areTenantIdsInSync:Rt}=Lo();b.useLayoutEffect(()=>{Ot&&Ne===P||Pt!==!0||!Rt||me?.fetchState!=="Completed"&&me?.fetchState!=="Error"||(qa(!0),i(lo(m.userId,A,S,!0,!1,G)))},[Ot,m,S,i,Mt,Pt,me?.fetchState,Rt]);const dn=k(v=>v.reportUIOptionsState.forecastOnDashboard.isForecastModeOn),un=k(v=>v.revenueState.uiState.selectedForecast?.id),mn=k(v=>v.cardBalanceState.fetchState),ae=k(v=>uo(v,G,m,xe,de,Je)),pn=ae.fetchState,hn=b.useMemo(()=>ea(ae.cardsOrdered,_),[ae.cardsOrdered,_]),fn=b.useMemo(()=>ea(ae.cardsForDashboardUI,_),[ae.cardsForDashboardUI,_]);Ue({isDataReady:!0});const{isSuggestedQuestionsLoading:gn,suggestedPromptQuestions:bn}=Vo(),Bt=x?.isTreasuryVideoViewed===!0||ae.isTreasuryVideoClosed===!0,jt=k(v=>ca(v)),Lt=jt.uiState?.currentChatSessionId,Ut=jt.allSessionsWithOrderedQuestionAnswers??Es,Cn=b.useCallback((v,ne,De)=>{const _e=m?.userId;if(_e==null)return;const V=v.trim();if(V.length===0&&ne.length===0)return;const Z=Fa(e.getState()),ke=()=>{const Se=D(c.state?.pathnameStackToGoBack,c.pathname);s(`/${I}/ai-cfo/explore`,{state:{message:"",origin:"",pathnameStackToGoBack:Se,referrer:"Dashboard",aiCfoInitialQuestion:V,aiCfoShouldSubmit:!Z&&V.length>0,aiCfoInitialSubmissionSource:Jt,...typeof De=="number"?{aiCfoSuggestionIndex:De}:{}}})};return t?ne.length>0?void o(!0):void ke():ne.length>0?Z?(i(ht(V)),void o(!0)):(r(V.length>0?V:null),o(!0),void(V.length>0&&Oa(i,V,Jt,Lt,Ut,_e,De,ne.length>0?ne:void 0))):(Z&&i(ht(V)),void ke())},[Ut,Lt,i,t,c.pathname,c.state,s,r,o,m?.userId,e,I]),_n=b.useCallback(()=>{o(!0)},[o]),kn=b.useCallback(()=>{if(I==null)return;const v=D(c.state?.pathnameStackToGoBack,c.pathname);s(`/${I}/ai-cfo/explore`,{state:{pathnameStackToGoBack:v,referrer:"Dashboard"}})},[c.pathname,c.state,s,I]);return d.jsxs(d.Fragment,{children:[pn==="Completed"?d.jsx(Ye,{analytics:T,onLoad:v=>{v.trackPageLoaded(N.Event.dashboard),Je&&!Bt&&v.trackTreasuryPromoView("Dashboard Promo Video")}}):null,d.jsx(Fs,{maxColumns:n?2:void 0,isAiCfoAccessEnabled:_,onAskAiCfoClick:E,onAiCfoDashboardOpenPanel:_n,isAiCfoFileUploadEnabled:Na===!0&&t===!1,onAiCfoDashboardPromptSubmit:Cn,onAiCfoDashboardExpandToFullPage:kn,aiCfoDashboardSuggestedPromptQuestions:bn,aiCfoDashboardSuggestedPromptQuestionsLoading:gn,onDragAndDropCard:(v,ne)=>{if(v===W||ne===W)return;const De=function(Z,ke,Se){const at=Se.indexOf(Z),nt=Se.indexOf(ke);if(at===-1||nt===-1||at===nt)return Se;const ot=[...Se];return ot.splice(at,1),ot.splice(nt,0,Z),ot}(v,ne,hn),_e=De.filter(Z=>Z!==W),V=ae.cardsOrdered;(_e.length!==V.length||_e.some((Z,ke)=>Z!==V[ke]))&&i(mo(_e))},dashboardReport:ae,passedCardsOrdered:fn,tenantId:S,companyId:A,tenantEmailDomain:I,location:c,navigate:s,isApAgingFeatureEnabled:L,isArAgingFeatureEnabled:$e,isBillPayEnabled:Wa,isReimbursementEnabled:Ha,isSummaryCardsFiltered:Xe,isForecastOn:dn,selectedForecastOnDashboard:un,isVisitingFirstTime:l,isZeniAccountEnabled:Dt,isRewardsFeatureEnabled:wt,hasZeniAccountsAdminAccess:en,isExpenseAutomationEnabledForUser:P&&tt===!1,selectedPeriod:Qa[S],isChargeCardFeatureEnabled:Va,isUserHasCardsAccess:on,isUserHasTreasuryAccess:sn,cardsCreditLimit:rn,cashbackRate:Ka,isInterestedInChargeCard:cn,cardBalanceFetchState:mn,christmasAnimationEnabled:$a,newYearAnimationEnabled:za,treasuryFundDetails:ln,hasUserSeenTreasuryVideo:Bt,treasuryFetchState:Xa})]})}const Ps=e=>{switch(e){case"operating_expenses":return"Operating Expenses";case"revenue":return"Revenues";case"top_expenses":return"Top Expenses";case"net_burn_or_income":return"Burn Rate";case"cash_in_cash_out":return"Cash In, Cash Out";case"cash_position":return"Cash Position"}return"Dashboard"},Ms=e=>e.fetchState!=="Error"?e.fetchState:e.reportsInOrder.map(a=>a.fetchState).reduce((a,t)=>a==="In-Progress"||a==="Not-Started"?a:t);function lr(){const e=be(),a=e?.excludedResources?.find(m=>m.resource==="/reports/top_expenses")==null,{useFeatureGate:t}=Ce(),{isFeatureEnabled:n}=t(M.isApAgingFeatureEnabled),{isFeatureEnabled:o}=t(M.isArAgingFeatureEnabled),r=k(m=>U(m)),{isFeatureEnabled:s}=t(M.isDebitCardFeatureEnabled),i=vo(s,r),c=Eo(r);return i===!0||c===!0?d.jsx(ut,{children:d.jsx(F,{path:"/*",element:d.jsx(No,{})})}):d.jsxs(ut,{children:[d.jsx(F,{path:"/",element:d.jsx(Os,{})}),d.jsx(F,{path:"cash_balance/*",element:d.jsx(Kt,{})}),d.jsx(F,{path:"card_balance/*",element:d.jsx(Kt,{})}),d.jsx(F,{path:"operating_expenses/*",element:d.jsx(oe,{})}),d.jsx(F,{path:"operating_expenses/forecast/*",element:d.jsx(st,{})}),d.jsx(F,{path:"revenue/forecast/*",element:d.jsx(st,{})}),d.jsx(F,{path:"revenue/*",element:d.jsx(oe,{})}),d.jsx(F,{path:"net_burn_or_income/forecast/*",element:d.jsx(st,{})}),d.jsx(F,{path:"net_burn_or_income/*",element:d.jsx(oe,{})}),n===!0&&d.jsxs(d.Fragment,{children:[d.jsx(F,{path:"accounts_payable_aging/*",element:d.jsx(Ko,{})}),d.jsx(F,{path:"accounts_payable_aging/:vendorId/:reportDate/*",element:d.jsx(zo,{})})]}),o&&d.jsxs(d.Fragment,{children:[d.jsx(F,{path:"accounts_receivable_aging/:customerId/:reportDate/*",element:d.jsx(qo,{})}),d.jsx(F,{path:"accounts_receivable_aging/*",element:d.jsx(Zo,{})})]}),d.jsx(F,{path:"cash_position/*",element:d.jsx(oe,{})}),d.jsx(F,{path:"top_expenses/*",element:a===!0?d.jsx(oe,{}):d.jsx(Me,{})}),d.jsx(F,{path:"cash_in_cash_out/*",element:d.jsx(oe,{})}),d.jsx(F,{path:"company_details",element:d.jsx(Go,{})}),d.jsx(F,{path:"referrals/*",element:d.jsx($o,{})}),d.jsx(F,{path:"*",element:d.jsx(Me,{})})]})}export{lr as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-D6iO1SmY.js";import{n as l,A as c,m as f}from"./index-DrTnWXwv.js";import{D as p}from"./mui-DqRlPgPp.js";import"./sentry-DJeJwz74.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]="60d3e5ec-6ed5-4ce4-adb7-e44ad661f099",e._sentryDebugIdIdentifier="sentry-dbid-60d3e5ec-6ed5-4ce4-adb7-e44ad661f099")}catch{}})();const u={drawerLeftMargin:new c(0,0,240)};function m(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:d}=e,n=l(),a=o?.valuePx(n)??u.drawerLeftMargin.valuePx(n),s=f();return i.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${a})`}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.8,cursor:"pointer"}}},onClose:d,children:t})}export{m as D};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-D6iO1SmY.js";import{a as d}from"./sentry-DJeJwz74.js";import{l as B,h as G,u as F,i as q,g as l,N as K,n as L,o as N,p as _}from"./core-D-NK-UK9.js";import{LA as z,eQ as O,KZ as R,kD as H,Hz as I,LF as M,Ks as W,jD as Y,HA as S,L2 as $,L3 as Q,Ku as V,Kt as Z}from"./zeni-epic-state-22WFBgK9.js";import{aR as J,c as U,q as X,r as tt}from"./index-DrTnWXwv.js";import"./mui-DqRlPgPp.js";import{d as k}from"./decodeURIComponentSafe-C48GZJfu.js";import{w as et}from"./withTransactionSidePanel-CMaq9uFn.js";import{f as at,c as nt}from"./routePaths-B-3pox1f.js";import"./recharts-Dt8dM4EI.js";import"./analytics-NZ6ROu06.js";import"./plaid-BzyOi-ir.js";import"./dnd-C49i2BE4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BWZi4J-8.js";import"./lexical-Bp-0qESw.js";import"./pdf-BpZ3cLIj.js";import"./utils-CGva6Exy.js";import"./useAskAiCfoHostNavButtonProps-BxaFyJbc.js";import"./TransactionDetailScreen-Hfy201z1.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]="ca8e7963-7a73-46d4-9fb1-386a737b8319",a._sentryDebugIdIdentifier="sentry-dbid-ca8e7963-7a73-46d4-9fb1-386a737b8319")}catch{}})();const ot=L(function(a,t){const e=t.entity,o=M(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:W(a,"common")},trendWithTransactionsReport:o,analytics:U,isAccountingClassesEnabled:Y(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(V({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(Z("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a($()),a(Q()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=X(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??b();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(I(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}})(J),it=et(function({entityType:a,...t}){const e=B(),o=G(),c=F(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:x,entityNameEncoded:j}=q(),r=k(x??""),p=k(j??""),u=rt(r,p),v=[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")),w=l(n=>O(n).company?.companyInfo.firstMonthOfFY??1),f=l(n=>R(n.trendWithTransactionsState,i,"EntityDetail"));d.useEffect(()=>{m===!1&&u===!0&&(T(!0),o(H(i)))},[m,u,i]);const E=l(n=>n.trendState.fetchState),P=f?.selectedPeriod?.timePeriod??g,A=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:w,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:A,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(K,{to:b(v.length)})}),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,b=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function xt({entityType:a}){return s.jsx(N,{children:s.jsx(_,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{xt as EntityDetailRoutes,xt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-D6iO1SmY.js";import{a as r}from"./sentry-DJeJwz74.js";import{a2 as l,a3 as c,a4 as p,q as d}from"./index-DrTnWXwv.js";import"./mui-DqRlPgPp.js";import m from"./NotFoundScreen-Dz0534r9.js";import{l as u,u as b}from"./core-D-NK-UK9.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]="0e86e759-78f4-4bc0-bf96-ce87199f9155",e._sentryDebugIdIdentifier="sentry-dbid-0e86e759-78f4-4bc0-bf96-ce87199f9155")}catch{}})();const _=()=>{const e=u(),t=b(),a=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),f=r.useCallback(()=>{(()=>{const n=d(t.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=l(t.pathname);return o!=null?s.jsx(c,{menuItem:p(o),onDemoClick:a,onGoBack:f}):s.jsx(m,{})},k=(e=2)=>{let t="../";for(let a=0;a<e;a++)t=`${t}../`;return t};export{_ as F};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-D6iO1SmY.js";import{a as g}from"./sentry-DJeJwz74.js";import{h as j,u as w,l as _,s as J,g as l,N as T}from"./core-D-NK-UK9.js";import{z as r,m as M,O as P,d as V,c as A,e as N,i as Q,T as R,g as W}from"./index-DrTnWXwv.js";import{eQ as $,Jl as q,Jv as B,Jm as G,eU as H,fm as K,Jr as X,fL as Y,cT as Z,Jw as ee,Jx as te}from"./zeni-epic-state-22WFBgK9.js";import{n as ne}from"./mui-DqRlPgPp.js";import{u as se}from"./useDeviceId-CYAkkrZp.js";import{f as ae}from"./analyticsHelper-DrdSzHTB.js";import{t as ie}from"./getLocaleForTenant-DL4YoPxV.js";import"./recharts-Dt8dM4EI.js";import"./analytics-NZ6ROu06.js";import"./plaid-BzyOi-ir.js";import"./dnd-C49i2BE4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BWZi4J-8.js";import"./lexical-Bp-0qESw.js";import"./pdf-BpZ3cLIj.js";import"./utils-CGva6Exy.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]="608bea5e-2875-4116-8c77-d8e6b2fbdd2a",t._sentryDebugIdIdentifier="sentry-dbid-608bea5e-2875-4116-8c77-d8e6b2fbdd2a")}catch{}})();const x=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function xe(){const t=j(),a=w(),f=_(),[k]=J(),n=k.get("token"),p=k.get("stytch_token_type"),m=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:z,magicLinkEmail:c,verifyDeviceFetchState:C,resendVerifyDeviceOTPFetchState:D}=l(e=>e.tenantState),S=l(e=>e.tenantState.fetchState),y=l(e=>e.tenantState.activeTenantFetchState.fetchState),I=l(e=>e.tenantState.signInState),h=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>$(e)),b=l(e=>q(e)),E=r.getSignedInUser(),v=M().mode;g.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&x(n,p)&&i!=null&&m!=null&&(r.saveMagicLinkTriggered(n),t(B(n,i,m)))},[n,p,t,i,m,s?.zeniSessionId]),g.useEffect(()=>{I!=="In-Progress"||S!=="Completed"&&y!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(G(b.tenantsInOrder),s.zeniSessionId),H(s.userId,s.zeniSessionId,o.tenantId),t(K(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(X("Completed")),P.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,b.tenantsInOrder),Y().then(()=>{const e=W();e!=null&&V(e)}),setTimeout(()=>{A.trackLogin(N.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[I,S,y,s,o,b,v,a.state,t]);const O=g.useCallback(()=>{f("/signin/auth")},[f]),U=g.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),F=g.useCallback(e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))},[i,n,t,c,d]);if(h==="Completed"&&d!=null)return u.jsx(Q,{phoneNumber:z,verifyOtpFetchState:C.fetchState,resendVerifyDeviceOTPFetchState:D,onResendOtp:U,onVerifyOtp:F,onCancelVerifyDevice:O});if(I==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return u.jsx(T,{to:e,state:{...a.state,origin:""}})}if(!x(n,p)||m==null||h==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(R,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
|
|
2
|
-
position: fixed;
|
|
3
|
-
top: 0;
|
|
4
|
-
left: 0;
|
|
5
|
-
right: 0;
|
|
6
|
-
bottom: 0;
|
|
7
|
-
display: flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
justify-content: center;
|
|
10
|
-
z-index: 9999;
|
|
11
|
-
background-color: ${t=>t.theme.colors.background};
|
|
12
|
-
`;export{xe as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as U}from"./liveblocks-D6iO1SmY.js";import{a as c}from"./sentry-DJeJwz74.js";import{h as pe,g as s,i as qe,u as Ke,l as ea,k as R}from"./core-D-NK-UK9.js";import{eQ as he,eZ as aa,e_ as Se,eR as ta,bn as na,f7 as sa,e$ as oa,f0 as ia,f2 as ra,f5 as da,ff as la,f6 as g,f9 as ca,fa as ue,fd as ua,fb as fa,fc as ma,fe as ba,cJ as pa,fh as ha,cO as Sa,bv as ga,eP as Ea,fm as ka,fn as Ca,fl as ya}from"./zeni-epic-state-22WFBgK9.js";import{a6 as Ia,a7 as Ta,s as wa,w as _a,z as k,n as Aa,a8 as Fa,X as Da,v as va,u as $a,I as r,a9 as Ba,aa as Ga,k as Pa,a as Ra,ab as Ma,a2 as Na,ac as Ua,ad as Va,ae as fe,af as me,L as xa,ag as Oa,ah as be,c as M,r as _,a0 as La,ai as N,aj as ja}from"./index-DrTnWXwv.js";import{D as za}from"./mui-DqRlPgPp.js";(function(){try{var m=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new m.Error().stack;d&&(m._sentryDebugIds=m._sentryDebugIds||{},m._sentryDebugIds[d]="e4bbe494-9b36-4f09-8a93-6d0a59918b9e",m._sentryDebugIdIdentifier="sentry-dbid-e4bbe494-9b36-4f09-8a93-6d0a59918b9e")}catch{}})();const Ya=Ia(({isAppContentDrawerOpen:m,handleDrawerToggle:d})=>{const{tenantEmailDomain:a}=qe(),t=Ke(),C=wa(),o=ea(),V=ta(),b=pe(),{useFeatureGate:i}=_a(),x=k.getSignedInUser(),A=na(x),ge=Aa(),n=s(e=>he(e)),Ee=Fa(),ke=n.masterTOSInfo?.isMasterTOSAccepted??!1,{setIsAiCfoOpen:Ce}=Da(),O=s(e=>sa(e)),L=O.uiState.currentChatSessionId,y=va(),{setLoading:ye}=$a(),[F,j]=c.useState(void 0),D=R("/:tenantEmailDomain/dashboard")!==null,z=R("/:tenantEmailDomain/reports")!==null,I=R("/:tenantEmailDomain/onboarding/*")!==null,{isFeatureEnabled:Y}=i(r.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Ie}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:Z}=i(r.isDebitCardFeatureEnabled),Te=Ba(n,Ie,Z),{isFeatureEnabled:we}=i(r.isSettingsFeatureEnabled),H=s(e=>oa(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),v=s(e=>ia(e));c.useEffect(()=>{y&&T&&!I&&v.fetchState==="Not-Started"&&b(ra(!0))},[y,T,v.fetchState,I]);const h=k.getSignedInUser(),$=s(e=>e.tenantState),_e=s(e=>$.fetchState==="Completed"?da(e):[]),E=s(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:Ae}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Fe}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:J}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:Q}=i(r.isExpenseAutomationEnabledV2),W=Q||J&&A,{isFeatureEnabled:De}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:ve}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:$e}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:Be}=i(r.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:Ge}=i(r.isTreasuryEnabled),{isFeatureEnabled:Pe}=i(r.isTaskManagerCustomerUserAccessEnabled),Re=A||!A&&Pe,Me=n.company!=null&&la(n.company),w=Ge&&Me,Ne=s(e=>g(e).totalUnreadCount),Ue=s(e=>g(e).reducedFetchCountState),X=s(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),q=s(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Ve=s(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),B=s(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:K,isLoading:ee,isFetchingMore:ae,hasFetchedAll:te,fetchMore:xe}=Ga();c.useEffect(()=>{const e=setTimeout(()=>xe?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(ee===!1&&ae===!1&&te===!0)if(n?.companyId!=null&&K!=null){const e=`dashboard_${n.companyId}`;j(K.filter(u=>u.roomId===e&&u.readAt==null).length)}else j(0)},[ee,ae,te]),c.useEffect(()=>{y&&!I&&Ve.fetchState==="Not-Started"&&V.tenantId!=null&&b(ca("task_manager","dashboard"))},[y,V.tenantId]),c.useEffect(()=>{I||B.fetchState!=="Not-Started"||b(ue({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{F!=null&&B.fetchState==="In-Progress"&&(b(ue({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),b(Se({unreadCount:F},"comments")))},[F,B.fetchState]);const Oe={fetchStatus:Ue,count:Ne},ne=a!=null?k.getSignedInUserTenant(a):null,se=s(e=>ne?.tenantId!=null?ua(e,ne.tenantId):void 0),S=[];Ae===!1&&S.push("accounts_payable_aging"),Fe===!1&&S.push("accounts_receivable_aging"),Y===!1&&S.push("zeni_accounts_promo_card"),T===!1&&S.push("rewards_card"),W===!1&&S.push("expense_automation_card");const Le=Pa(),oe=s(e=>fa(e,S,h,Q,J,w).fetchState),ie=s(e=>ma(e).fetchState),je=D&&(oe==="Completed"||oe==="Error")||z&&(ie==="Completed"||ie==="Error")||!D&&!z?void 0:"disabled",ze=c.useMemo(()=>ba(n.userRole),[n.userRole]),Ye=pa(ze),Ze=n?.rewardsLastViewedTime==null,He=h?.userEmail!=null&&H.fetchState==="Completed"&&ha(H.notificationSettings,h.userEmail,Z,n),re=Ra(),Je=re&&Ma(t),de=Sa(Le?.loggedInUserRoleMap),le=n.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,G=c.useCallback(()=>w&&de&&!k.getTreasuryPopupSeen(a??"")&&le===!1&&Na(t.pathname)!=="treasury",[w,de,le,t.pathname,a]),[Qe,ce]=c.useState(G);c.useEffect(()=>{ce(G())},[G]);const We=s(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,Xe=Ua(We);return U.jsx(za,{container:window.document.body,variant:"temporary",open:m,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:U.jsx(Va,{signedInUser:x,currentTenantId:$.currentTenantId??"",tenants:$.fetchState==="Completed"?_e:se!=null?[se]:[],currentTenant:n,isTenantDropdownDisabled:je,isSettings:me(t),isSettingsFeatureEnabled:we,isVendorsTabVisible:Ye,isZeniAccountEnabled:Y,isChargeCardEnabled:Te,isTreasuryEnabled:w,treasuryYieldPercentage:Xe,isTreasuryPopupVisible:Qe,isNotificationsTabVisible:He,notificationCountDetails:Oe,isExpenseAutomationEnabledForUser:W&&ga(n.userRole)===!1,selectedMenu:fe(t),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Ze,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:re,onNotificationIconClick:()=>{d(!1);let e=X===0&&q>0?"notifications/comments":"notifications/tasks";me(t)&&(e=X===0&&q>0?"../../notifications/comments":"../../notifications/tasks");const u=_(t.state?.pathnameStackToGoBack,t.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=_(t.state?.pathnameStackToGoBack,t.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),a==null)return;if(e.type==="ai_cfo"){const f=_(t.state?.pathnameStackToGoBack,t.pathname);return M.trackAICFOChatScreenStateChanged("viewed","left_menu",L??null,null),ke?void o(`/${a}/ai-cfo/explore`,{state:{pathnameStackToGoBack:f,referrer:"Sidebar"}}):void(La(ge)?o(`/${a}/ai-cfo/explore`,{state:{pathnameStackToGoBack:f,referrer:"Sidebar"}}):Ee?Ce(!0):o(`/${a}/dashboard`,{state:{pathnameStackToGoBack:f,referrer:"Sidebar",message:"open_ai_cfo_drawer"}}))}const u=_(t.state?.pathnameStackToGoBack,t.pathname),l=e.type,p=N(l)&&l!=="command_center";if(N(e.type)&&E[n.tenantId]!=null&&M.trackMonthEndCloseClicked(E[n.tenantId].month,E[n.tenantId].year,"Sidebar"),p&&E[n.tenantId]!=null){const f=E[n.tenantId];return void o(`/${a}/month_end_close_checks/review/${e.type}/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const P=ja(e.type);be(e.type)?(L!=null&&b(ya()),o(`/${a}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${a}/${P}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${a}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${a}/rewards`)},handleBackClick:()=>{o(`/${a}/dashboard`)},handleTenantSelect:e=>{ye(xa.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=fe(t);let p=`/${encodeURIComponent(u)}/`;const P=N(l);l==="home"?p+="dashboard":l==="users_and_roles"?p+="people":Oa(l)?p+="settings/my_profile":be(l)?p+=`ai-cfo/${l}`:p+=l==="task_checklist"?"tasks":P?"month_end_close_checks/review":encodeURIComponent(l),o(p,{replace:!0}),h!=null&&(b(ka(e.tenantId)),b(Ca(h.userId,e.tenantId,h.zeniSessionId)));const f=e;M.trackCompanySwitch(f.companyId,f.companyName,f.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(a??"",!0),ce(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:Je,aiCfoView:O,isOnDashboard:D,updateCurrentChatSessionId:e=>{b(Ea({sessionId:e,agentId:"controller"})),o(`/${a}/ai-cfo/${e}`,{state:{...t.state}})},halloweenAnimationEnabled:De,isTaskManagerAccessEnabled:Re,thanksGivingAnimationEnabled:ve,christmasAnimationEnabled:$e,newYearAnimationEnabled:Be})})}),qa=m=>{const d=pe(),a=s(C=>he(C)),t={events:a.userRoleId!=null?[`private-encrypted-${a.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{Ta(o)&&aa(o.mode)==="dashboard"&&d(Se({unreadCount:o.data.unread},"tasks"))}};return U.jsx(Ya,{...m,...t})};export{qa as M};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-D6iO1SmY.js";import{l as r,n}from"./core-D-NK-UK9.js";import{Q as i}from"./index-DrTnWXwv.js";import"./mui-DqRlPgPp.js";import"./sentry-DJeJwz74.js";import"./zeni-epic-state-22WFBgK9.js";import"./recharts-Dt8dM4EI.js";import"./analytics-NZ6ROu06.js";import"./plaid-BzyOi-ir.js";import"./dnd-C49i2BE4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BWZi4J-8.js";import"./lexical-Bp-0qESw.js";import"./pdf-BpZ3cLIj.js";import"./utils-CGva6Exy.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]="a2ae25d7-9a32-4991-980a-ee1458238305",o._sentryDebugIdIdentifier="sentry-dbid-a2ae25d7-9a32-4991-980a-ee1458238305")}catch{}})();const a=n(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(i);function h(){const o=r();return e.jsx(a,{navigate:o})}export{h as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-D6iO1SmY.js";import{a as r}from"./sentry-DJeJwz74.js";import{h as A,u as J,g as o,N as C}from"./core-D-NK-UK9.js";import{JK as M,eQ as P,f5 as j,JL as x,JM as z,JN as D,JO as L,mT as N,IG as R}from"./zeni-epic-state-22WFBgK9.js";import{z as h,J as I}from"./index-DrTnWXwv.js";import"./mui-DqRlPgPp.js";import"./recharts-Dt8dM4EI.js";import"./analytics-NZ6ROu06.js";import"./plaid-BzyOi-ir.js";import"./dnd-C49i2BE4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BWZi4J-8.js";import"./lexical-Bp-0qESw.js";import"./pdf-BpZ3cLIj.js";import"./utils-CGva6Exy.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new n.Error().stack;s&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[s]="b524ebe1-52fb-4452-bb39-8cbbef0577c0",n._sentryDebugIdIdentifier="sentry-dbid-b524ebe1-52fb-4452-bb39-8cbbef0577c0")}catch{}})();function ee(){const n=A(),s=J(),{params:t,error:i}=r.useMemo(()=>M(s.search),[s.search]),b=r.useMemo(()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application",[s.search,t]),f=h.isSignedIn(),a=h.getSignedInUser(),p=o(e=>P(e)),l=o(e=>j(e)),d=o(e=>e.tenantState.fetchState),w=o(x),y=o(z),c=o(D),[v,S]=r.useState(null),[E,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(L())},[n,s.search]),r.useEffect(()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)},[i]);const g=r.useRef(!1);r.useEffect(()=>{f&&a!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(N(a.userId,a.zeniSessionId??void 0))))},[f,a,d,n]),r.useEffect(()=>{c!=null&&c!==""&&(window.location.href=c)},[c]);const U=r.useMemo(()=>{if(p?.tenantId!=null)return p.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some(T=>T.tenantId===e)?e:l.length===1?l[0].tenantId:null},[p?.tenantId,l]),u=v??U;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):f?m.jsx(I,{variant:"signed_in",clientName:b,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:S,approveError:E??y,isApproving:w==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&a!=null&&u!=null&&n(R(a.userId,a.zeniSessionId??void 0,u,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(C,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-D6iO1SmY.js";import{Kb as te,eQ as q,jD as H,eY as J,eW as ne,HD as Q,JR as oe,to as Ee,Kc as N,tc as ke,tx as Ie,tr as ie,tg as re,tv as Pe,ts as je,Kd as le,v4 as ve,Ke as Le,fB as Te,Kf as K,tl as de,tj as ce,tA as Fe,c2 as Ae}from"./zeni-epic-state-22WFBgK9.js";import{n as pe,w as X,I as E,z,a9 as ue,D as me,ak as ge,al as Re,A as he,o as R,G as fe,O as Ce,am as Oe,Y as Ve,_ as Ue,H as Be,c as be,e as Ze,r as $e,an as Ke,k as _e}from"./index-DrTnWXwv.js";import{D as ye,n as W,S as we}from"./mui-DqRlPgPp.js";import ae from"./NotFoundScreen-Dz0534r9.js";import{a as r}from"./sentry-DJeJwz74.js";import{h as ee,i as Ge,g as m,l as He,u as ze,n as We,o as se,p as $}from"./core-D-NK-UK9.js";import{u as Ye}from"./useAskAiCfoHostNavButtonProps-BxaFyJbc.js";import{M as Me}from"./MobileAppDrawer-D38LtL34.js";import"./recharts-Dt8dM4EI.js";import"./analytics-NZ6ROu06.js";import"./plaid-BzyOi-ir.js";import"./dnd-C49i2BE4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BWZi4J-8.js";import"./lexical-Bp-0qESw.js";import"./pdf-BpZ3cLIj.js";import"./utils-CGva6Exy.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]="72c85aaf-6ac1-4024-9a83-dd37b8ae68db",a._sentryDebugIdIdentifier="sentry-dbid-72c85aaf-6ac1-4024-9a83-dd37b8ae68db")}catch{}})();const Ne={overlayWidth:new he(100,100,48)},_=Ce.getLocalizedStrings().peoplePage.invitePage,qe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),{userId:S}=Ge(),d=m(e=>te(e)),u=m(e=>q(e)),D=m(e=>H(e)),{useFeatureGate:f}=X(),{isFeatureEnabled:k}=f(E.isDebitCardFeatureEnabled),P=J(k,u),L=ne(u),T=Q(u),U=oe(u),B=!!u.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(z.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{p(N()),y()},F=()=>{O===!0?w(!0):C()},Z=l.companyView?.controllers?.map(e=>e.user),{isFeatureEnabled:c}=f(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=f(E.isChargeCardFeatureEnabled),v=ue(u,j,k),{isFeatureEnabled:A}=f(E.isTreasuryEnabled),b={peopleDetails:d,classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:T,isAccountingClassesEnabled:D,isReimbursementDisabled:B===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:v===!1,isTreasuryDisabled:A===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:L,onResetClick:C,onDeleteUser:e=>{p(re(e.userId,e.userRole.userRoleId))},onPeopleLocalDataUpdated:e=>{p(ie({peopleLocalData:e})),V(!0)},onSaveClick:()=>{p(g==="zeni_only"?ke(a):Ie(T))},onCloseClick:F,isLoading:x||d.person==null},i={onOkClick:()=>{w(!1),C()},onCancelClick:()=>{w(!1)}};return r.useEffect(()=>{x===!1&&S!=null&&p(Ee(S))},[x,S]),r.useEffect(()=>{d.updatePersonState.fetchState==="Completed"&&C()},[d.updatePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Ne.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:F,children:s.jsxs(Je,{onClick:e=>e.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(Se,{children:_.discardTitle}),descriptionComponent:s.jsx(De,{children:_.discardDescription}),primaryButtonText:_.discard,secondaryButtonText:_.no,action:i,isEditPopup:!0}):null,s.jsx(Re,{...b})]})})},Je=W(we)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,Se=W(fe.H6Regular)`
|
|
6
|
-
margin-top: ${R.sp7};
|
|
7
|
-
padding-left: ${R.sp8};
|
|
8
|
-
padding-right: ${R.sp8};
|
|
9
|
-
color: ${a=>a.theme.colors.primary};
|
|
10
|
-
word-break: break-word;
|
|
11
|
-
`,De=W(fe.LargeRegularSp)`
|
|
12
|
-
color: ${a=>a.theme.colors.hero};
|
|
13
|
-
padding-left: ${R.sp8};
|
|
14
|
-
padding-right: ${R.sp8};
|
|
15
|
-
margin-bottom: 30px;
|
|
16
|
-
margin-top: ${R.sp4};
|
|
17
|
-
white-space: pre-line;
|
|
18
|
-
`,Qe={overlayWidth:new he(100,100,48)},G=Ce.getLocalizedStrings().peoplePage.invitePage,Xe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isInvitePeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),S=m(i=>te(i)),d=m(i=>q(i)),u=m(i=>H(i)),{useFeatureGate:D}=X(),{isFeatureEnabled:f}=D(E.isDebitCardFeatureEnabled),k=J(f,d),P=ne(d),L=Q(d),T=oe(d),U=!!d.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,B=!k&&u&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(z.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),p(N())},C=()=>{O===!0?w(!0):x()},F={onOkClick:()=>{w(!1),x()},onCancelClick:()=>{w(!1)}},Z=l.companyView?.controllers.map(i=>i.user),{isFeatureEnabled:c}=D(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=D(E.isChargeCardFeatureEnabled),v=ue(d,j,f),{isFeatureEnabled:A}=D(E.isTreasuryEnabled),b={classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:L,onPeopleLocalDataUpdated:i=>{p(ie({peopleLocalData:i})),V(!0)},onResetClick:x,onSaveClick:()=>{p(g==="zeni_only"?Pe(a):je())},onCloseClick:C,peopleDetails:S,isAccountingClassesEnabled:u,isReimbursementDisabled:U===!1,isLiteRoleDisabled:T===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:v===!1,isTreasuryDisabled:A===!1,isBankingOnlyTenant:k,isCardsOnlyTenant:P,isLoading:B};return r.useEffect(()=>{S.invitePersonState.fetchState==="Completed"&&(y(),p(N()))},[S.invitePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Qe.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:C,children:s.jsxs(ea,{onClick:i=>i.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(Se,{children:G.discardTitle}),descriptionComponent:s.jsx(De,{children:G.discardDescription}),primaryButtonText:G.discard,secondaryButtonText:G.no,action:F}):null,s.jsx(Oe,{...b})]})})},ea=W(we)`
|
|
19
|
-
display: flex;
|
|
20
|
-
min-height: 100%;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
`,aa=We(function(a,t){const l=le(a),n=z.getSignedInUser();return{data:l,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:H(a),analytics:be}},function(a,t){const{navigate:l,companyId:n,shouldFetchClasses:g}=t;return{personAction:{onPersonDelete:(o,y)=>{a(re(o,y))},onResendInvite:o=>{a(Fe(o))},onReloadPeople:()=>{a(de()),a(ce(n,g))},onBackClick:()=>{l("../../")},onModeChange:o=>{a(K({mode:o,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:o=>{a(K({searchText:o}))}}}})(Ke);function M({isInvitePeopleDrawerOpen:a,isEditPeopleDrawerOpen:t}){const l=He(),n=ee(),g=ze(),{areTenantIdsInSync:o}=Ve(),y=z.getSignedInUser(),h=m(e=>q(e)),{useFeatureGate:p}=X(),{isFeatureEnabled:O}=p(E.isDebitCardFeatureEnabled),V=m(e=>H(e)),I=!J(O,h)&&V,w=Q(h),S=h?.tenantId,{tenantEmailDomain:d}=h,[u,D]=r.useState(!1),[f,k]=r.useState(!1),[P,L]=r.useState(!1),[T,U]=r.useState("off"),[B,x]=r.useState(!1),C=e=>{x(e)},{isAiCfoAccessEnabled:F,onAskAiCfoClick:Z}=Ye({mobileExploreReferrer:"People"}),c=m(e=>le(e));Ue({isDataReady:c.fetchState==="Completed"});const j=m(e=>ve(e.classState,e.classListState)),v=m(e=>Le(e.userState,e.userRoleState,e.userListViewState,"manager")),A=m(e=>Te(e)),b=h?.companyId;r.useEffect(()=>{u&&T===c.uiState.mode||!o||(n(K({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(c.uiState.mode),D(!0),n(de()))},[u,y,S,n,c.uiState.mode,o]),r.useEffect(()=>{b!=null&&o&&n(ce(b,I))},[b,I,o]),r.useEffect(()=>{k(a!=null&&a===!0),L(t!=null&&t===!0&&t)},[a,t]),r.useEffect(()=>{n(K({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const i=()=>{k(!1),L(!1),l("../")};return s.jsxs(s.Fragment,{children:[c.fetchState==="Completed"?s.jsx(Be,{analytics:be,onLoad:e=>e.trackPageLoaded(Ze.Event.members)}):null,f===!0?s.jsx(Xe,{closeDrawerHandler:i,isInvitePeopleDrawerOpen:f,managersListView:v,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,P===!0?s.jsx(qe,{closeDrawerHandler:i,isEditPeopleDrawerOpen:P,managersListView:v,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,s.jsx(Me,{isAppContentDrawerOpen:B,handleDrawerToggle:C}),s.jsx(aa,{navigate:l,signedInUser:y,isZeni:h.isZeni,isZeniTenant:w,peopleUIState:c.uiState,companyId:b,shouldFetchClasses:I,classList:j,managersView:v,peopleView:c,onInvitePeopleClick:()=>{l("./new")},onColumnSortConfigChanged:(e,Y)=>{n(K({sortKey:e,sortOrder:Y}))},onRowClick:e=>{const Y=`/${d}/people/${encodeURIComponent(e)}/edit`,xe=$e(g.state?.pathnameStackToGoBack,g.pathname);l(Y,{state:{pathnameStackToGoBack:xe}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:F,onAskAiCfoClick:Z})]})}function wa(){const a=_e();return Ae(a?.loggedInUserRole??[])?s.jsxs(se,{children:[s.jsx($,{path:"/",element:s.jsx(M,{})}),s.jsx($,{path:"new",element:s.jsx(M,{isInvitePeopleDrawerOpen:!0})}),s.jsx($,{path:":userId/edit",element:s.jsx(M,{isEditPeopleDrawerOpen:!0})}),s.jsx($,{path:"*",element:s.jsx(ae,{})})]}):s.jsx(se,{children:s.jsx($,{path:"*",element:s.jsx(ae,{})})})}export{wa as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-D6iO1SmY.js";import E from"./NotFoundScreen-Dz0534r9.js";import{a as r}from"./sentry-DJeJwz74.js";import{l as _,u as v,g as p,i as M,h as P,N as U,n as z,o as O,p as h}from"./core-D-NK-UK9.js";import{eQ as B,PW as b,bo as F,bn as N,hk as Q,gQ as V}from"./zeni-epic-state-22WFBgK9.js";import{s as W,z as I,_ as $,cA as q}from"./index-DrTnWXwv.js";import"./mui-DqRlPgPp.js";import{u as G}from"./useAskAiCfoHostNavButtonProps-BxaFyJbc.js";import{M as H}from"./MobileAppDrawer-D38LtL34.js";import"./recharts-Dt8dM4EI.js";import"./analytics-NZ6ROu06.js";import"./plaid-BzyOi-ir.js";import"./dnd-C49i2BE4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BWZi4J-8.js";import"./lexical-Bp-0qESw.js";import"./pdf-BpZ3cLIj.js";import"./utils-CGva6Exy.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]="9c5c4b4c-965e-434a-9c94-123f3ecd3c0d",e._sentryDebugIdIdentifier="sentry-dbid-9c5c4b4c-965e-434a-9c94-123f3ecd3c0d")}catch{}})();const J=z(function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(q),K=()=>{const e=_(),t=v(),c=W(),o=p(a=>B(a)),{aggregatedReportViewState:n}=p(a=>b(a)),{tenantEmailDomain:u}=M(),f=P(),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??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),y=C||k||x,d=r.useCallback((a,i,T)=>{f(Q({fromMonth:a,toMonth:i,cacheOverride:T}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&m.current&&(f(V({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)},[n?.fetchState]);const D=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),m.current=!0},[n?.fetchState,d]),R=r.useCallback((a,i)=>{d(a,i,!1)},[d]),g=a=>{S(a)},{isAiCfoAccessEnabled:j,onAskAiCfoClick:A}=G({mobileExploreReferrer:"Performance"});return $({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(H,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(J,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:u,onReload:D,onTimeRangeSelect:R,handleDrawerToggle:g,isAiCfoAccessEnabled:j,onAskAiCfoClick:A})]}):s.jsx(U,{to:`/${u}/dashboard`,replace:!0})};function ge(){return s.jsxs(O,{children:[s.jsx(h,{path:"*",element:s.jsx(K,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{ge as default};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-D6iO1SmY.js";import{a as o}from"./sentry-DJeJwz74.js";import{g as f,l as B,h as L,u as M,n as V}from"./core-D-NK-UK9.js";import{m as F,n as N,z as R,b7 as W,A as U,Y as $,_ as z,H as G,c as l,e as Q,a6 as Y,b8 as q}from"./index-DrTnWXwv.js";import{f0 as J,eQ as K,MG as I,MH as X,u8 as Z,t_ as g,f2 as ee,bO as re,u3 as ae,MI as ne}from"./zeni-epic-state-22WFBgK9.js";import{D as te,e as se,n as oe,S as ie}from"./mui-DqRlPgPp.js";import{u as le}from"./useAskAiCfoHostNavButtonProps-BxaFyJbc.js";import{M as de}from"./MobileAppDrawer-D38LtL34.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]="379d7849-cf5d-4e9d-bf7e-c558be62c336",e._sentryDebugIdIdentifier="sentry-dbid-379d7849-cf5d-4e9d-bf7e-c558be62c336")}catch{}})();const ce={overlayWidth:new U(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:r})=>{const a=F(),n=N();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{r(!0)},u=f(d=>J(d));return s.jsx(te,{anchor:"right",open:e,PaperProps:{style:{width:ce.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:a.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(se,{in:e,direction:"left",children:s.jsx(ue,{onClick:d=>d.stopPropagation(),children:s.jsx(W,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ue=oe(ie)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,P="refer-and-earn-status-update",we=V(function(e){const r=I(e),a=e.referralViewState.rewardsPlanFetchState,n=re([r,a]);return{inviteList:r.invitations,uiState:r.uiState,pendingBonus:r.pendingBonus,earnedBonus:r.earnedBonus,pendingReferrals:r.pendingReferrals,fetchState:n.fetchState,rewardsPlan:r.rewardsPlan}},function(e,r){const{navigate:a}=r;return{onColumnSortConfigChanged:(n,i)=>{e(ne({sortOrder:i,sortkey:n}))},onInviteClick:()=>{l.trackRewardsPageClicked("invite via email"),a("../refer")},onHowItWorksClick:()=>{l.trackRewardsPageClicked("know more"),a("../how-it-works")},onResendInviteClick:n=>{l.trackRewardsPageClicked("resend invite"),e(ae(n))},onBackClick:()=>{a("../",{relative:"path"})},onReloadInvitees:()=>{e(g(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===P&&e(g(!0,!0))}}})(Y(q));function ve({isReferralDrawerOpen:e}){const r=B(),a=L(),n=M(),[i,u]=o.useState(!1),[d,D]=o.useState(!1),[x,E]=o.useState(!1),[k,h]=o.useState(!1),w=R.getSignedInUser(),C=f(t=>K(t)),m=f(t=>I(t)),b=m.fetchState,p=f(t=>t.referralViewState.rewardsPlanFetchState),y=X([m,p]),{areTenantIdsInSync:c}=$();o.useEffect(()=>{C?.rewardsLastViewedTime==null&&x===!1&&(a(Z()),E(!0))},[]),o.useEffect(()=>{!i&&b==="Not-Started"&&c&&(u(!0),a(g(!0)))},[b,a,c]),o.useEffect(()=>{!d&&p.fetchState==="Not-Started"&&c&&(D(!0),a(ee(!0)))},[p,a,c]),o.useEffect(()=>{h(e!=null&&e===!0)},[e]);const[A,j]=o.useState(!1),v=t=>{j(t)},{isAiCfoAccessEnabled:H,onAskAiCfoClick:O}=le({mobileExploreReferrer:"Rewards"});z({isDataReady:y===!0});const T={events:w?.userId!=null?[`private-encrypted-${w.userId}.${P}`]:[],eventCallback:(t,S,_)=>{_.onEventReceived(t)}};return s.jsxs(s.Fragment,{children:[y===!0?s.jsx(G,{analytics:l,onLoad:t=>(S=>{w!=null&&S.trackPageLoaded(Q.Event.rewardsPageViewed)})(t)}):null,s.jsx(de,{isAppContentDrawerOpen:A,handleDrawerToggle:v}),k===!0?s.jsx(fe,{closeDrawerHandler:()=>{h(!1),r("..")},isReferralDrawerOpen:k}):null,s.jsx(we,{location:n,navigate:r,currentTenant:C,onClickMenuIcon:()=>{v(!0)},isAiCfoAccessEnabled:H,onAskAiCfoClick:O,...T})]})}export{ve as R};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-D6iO1SmY.js";import j from"./NotFoundScreen-Dz0534r9.js";import{a as p}from"./sentry-DJeJwz74.js";import{l as C,u as I,h as A,g as c,N as D,n as E,o as k,p as u}from"./core-D-NK-UK9.js";import{eQ as T,NA as b,NQ as S,D5 as V,Ce as N,D4 as m,CX as O,O4 as U}from"./zeni-epic-state-22WFBgK9.js";import{m as _,z as $,x as Q,a6 as W,bO as z,af as B}from"./index-DrTnWXwv.js";import"./mui-DqRlPgPp.js";import{R as g}from"./ReimbursementApprovalRuleDetailScreen-DpJeZp5O.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]="cc124702-c039-44e3-94a3-514e2c423203",e._sentryDebugIdIdentifier="sentry-dbid-cc124702-c039-44e3-94a3-514e2c423203")}catch{}})();const d="reimbursement-approval-rule-update",P=E(function(e){return{approvalView:b(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:s=>{s.endsWith(d)&&e(U(!1))},onBackClick:()=>{B(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:s=>{e(O(s))},onEditRuleClick:s=>{s!=null?(e(m(s)),a(`./${s}/edit`)):(e(m()),a("./new"))}}})(W(z)),X=()=>{const e=C(),r=I(),a=A(),[l,s]=p.useState(!1),[f,y]=p.useState(!1),h=c(n=>n.remiSetupApproverViewState.fetchState),o=c(n=>T(n)),w=_(),i=c(n=>b(n)),v=c(n=>S(n).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{v?.updateStatus.fetchState==="Completed"&&a(V())},[v]),p.useEffect(()=>{l||h!=="Not-Started"||(s(!0),a(N(!0)))},[l,h,a]),$.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{i.allApprovalRules.length===0&&i.fetchState==="Completed"&&(f||(y(!0),a(m())),e("./new"))},[f,i,a]);const x={events:o.companyId!=null?[`private-encrypted-${o.companyId}.${d}`]:[],eventCallback:(n,q,R)=>{n.endsWith(d)&&R.onApprovalRulesEventReceived(n)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(D,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx(Q,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(P,{currentTenant:o,location:r,navigate:e,...x})};function Z(){return t.jsxs(k,{children:[t.jsx(u,{path:"/",element:t.jsx(X,{})}),t.jsx(u,{path:"/new",element:t.jsx(g,{})}),t.jsx(u,{path:"/:approvalRuleId/edit",element:t.jsx(g,{})}),t.jsx(u,{path:"*",element:t.jsx(j,{})})]})}export{Z as R};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-D6iO1SmY.js";import{u as J,l as ye,h as ge,i as Ce,g as d,n as Ie,o as we,p as Y}from"./core-D-NK-UK9.js";import{eQ as L,fc as I,JQ as Se,jD as Q,py as W,qg as O,jr as Te,iv as Re,tM as X,ql as Fe,bv as Oe,JR as Ae,bn as ke,uN as De,JS as Ee,JT as je,tE as Pe,JU as G,JV as Le,JW as Me,JX as Be,JY as ve,JZ as w,J_ as A,J$ as k,K0 as H,K1 as D,K2 as E,dE as Ve,ut as Ue,uh as K,ui as N,uz as xe,um as $,uF as ze,K3 as Je,K4 as Ye,K5 as Ge,K6 as He,K7 as Ke,eY as Ne,eW as $e}from"./zeni-epic-state-22WFBgK9.js";import{R as qe,U as Ze,V as Qe,X as We,n as Xe,w as ee,I as j,z as ae,Y as ea,k as aa,a as sa,Z as ta,_ as oa,H as na,c as P,e as ra,r as se,$ as ia,a0 as la,a1 as ca}from"./index-DrTnWXwv.js";import"./mui-DqRlPgPp.js";import da from"./NotFoundScreen-Dz0534r9.js";import{F as pa}from"./FeaturePreviewScreen-1ynGY-A8.js";import{a as _}from"./sentry-DJeJwz74.js";import{u as fa}from"./useInitialThreadRequest-D-JPWLWk.js";import{t as q,a as Z,b as ma}from"./routePaths-B-3pox1f.js";import{M as ua}from"./MobileAppDrawer-D38LtL34.js";import"./recharts-Dt8dM4EI.js";import"./analytics-NZ6ROu06.js";import"./plaid-BzyOi-ir.js";import"./dnd-C49i2BE4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BWZi4J-8.js";import"./lexical-Bp-0qESw.js";import"./pdf-BpZ3cLIj.js";import"./utils-CGva6Exy.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]="f37e0c5c-ffbe-4b83-90ca-1396d4819c43",e._sentryDebugIdIdentifier="sentry-dbid-f37e0c5c-ffbe-4b83-90ca-1396d4819c43")}catch{}})();const _a=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(E({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(A({resetLeftScroll:!0}))},ha=e=>{e(Ye()),e(Ge()),e(He()),e(Ke())},ba=Ie(function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=L(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=I(e),r=Ae(u);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:P,isZeniUser:ke(o),showAccountGroups:r===!0,isAccountingClassesEnabled:Q(e),isAccountingProjectsEnabled:W(e),currentTenantCompanyName:a,statementEndPoint:`${ca}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(O(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(Je(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(ze(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:m,balancesRange:c}=l;let i=[...m];a==="year"&&(i=i.filter(g=>g!=="this_period_vs_same_period_last_year"&&g!=="this_period_vs_same_period_last_year_percent"&&g!=="same_period_last_year")),e(K(o.firstMonthOfFY,r,c.numberOfPeriods<1?1:c.numberOfPeriods,i)),m.length>0&&e(N(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",c.numberOfPeriods<1?1:c.numberOfPeriods,i))}t!==!0&&setTimeout(()=>y(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(w(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e($({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(G({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e($(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(xe(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(K(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(N(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout(()=>y(e),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(Ue({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=Ve(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,c=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return Z(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?ma(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,m,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?Z(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,l):a.accountType!=null?q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l):void 0})();if(c!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(c,{state:{pathnameStackToGoBack:i,referrer:S(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(E({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(D({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(H({scrollPosition:s}));break;case"balance_sheet":e(k({scrollPosition:s}));break;case"cash_flow":e(A({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(E({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(A({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(Be({viewMode:a})),e(ve({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",S(o.selectedReportID)),e(w("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",S(o.selectedReportID)),e(w("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",S(o.selectedReportID)),e(w("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(Me({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Le({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(G({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Pe()),o.isAccountingProjectsEnabled&&e(X())},onUpdateDisplayOrder:a=>{e(je(a))},onUpdateReportFormat:a=>{ha(e),e(Ee(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(De("profit_and_loss_by_classes"))}}})(ia);function ya(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=We(),f=Xe(),u=la(f),a=ye(),s=ge(),t=J(),{tenantEmailDomain:r}=Ce(),{useFeatureGate:l}=ee(),{isFeatureEnabled:m}=l(j.isReportsHorizontalClassLayoutSwitchEnabled),c=ae.getSignedInUser(),[i,g]=_.useState(!1),[M,te]=_.useState(!1),{isFeatureEnabled:B}=l(j.isReportsCommentingEnabled);if(c==null)throw Error("Can't access reports page without signing in...");const v=d(n=>L(n)),oe=v.company?.companyInfo.firstMonthOfFY??1,ne=fa(B?v?.companyId:void 0),C=d(n=>I(n).fetchState),re=d(n=>Se(n)),{areTenantIdsInSync:h}=ea(),T=d(n=>n.financeStatementState.selectedReportId),V=d(n=>Q(n)),R=d(n=>W(n)),ie=d(n=>I(n).isCompareModeOn),b=d(n=>I(n).filter),F=d(n=>I(n).selectedReportAndTimeframeFetchState),le=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(g(!0),s(O(c.userId,!0,!0,!1)))},[i,c,s,h]),_.useEffect(()=>{i&&!M&&C==="Completed"&&h&&(s(O(c.userId,!1,!0,!1)),te(!0))},[i,M,C,h]),_.useEffect(()=>{if(i&&F.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(T){case"profit_and_loss":case"profit_and_loss_by_classes":s(Fe(b.timeframe));break;case"profit_and_loss_by_projects":R&&s(X());break;case"balance_sheet":s(Re(b.timeframe));break;case"cash_flow":s(Te(b.timeframe))}},[i,T,F,h,V,R]);const U=aa(),ce=U?.loggedInUserRole!=null&&Oe(U?.loggedInUserRole)!==!0,[de,pe]=_.useState(!1),x=n=>{pe(n)},fe=sa(),me=ta();return function(n){const{isDataReady:ue}=n,{pathname:_e}=J(),z=qe(_e??"")==="reports",he=Ze(ue),be=_.useMemo(()=>z?_a:void 0,[z]);Qe({canFetchSuggestedQuestions:he,pageContexts:be})}({isDataReady:C==="Completed"}),oa({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(na,{analytics:P,onLoad:n=>n.trackPageLoaded(ra.Event.reports)}):null,p.jsx(ua,{isAppContentDrawerOpen:de,handleDrawerToggle:x}),p.jsx(ba,{firstMonthOfFY:oe,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:le,selectedReportID:T,analytics:P,filter:b,isAccountingClassesEnabled:V,isAccountingProjectsEnabled:R,isCompareModeOn:ie,hasTransactionAccess:ce,signedInUser:c,selectedReportAndTimeframeFetchState:F,handleDrawerToggle:x,reportsResyncFetchState:re.reportsResyncFetchState,isAiCfoAccessEnabled:me&&fe&&!e,onAskAiCfoClick:()=>{if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0)},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:B,initialOpenThreadRequest:ne})]})}const S=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function Ua(){const e=d(s=>L(s)),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(j.isDebitCardFeatureEnabled),u=Ne(f,e),a=$e(e);return u===!0||a===!0?p.jsx(pa,{}):p.jsxs(we,{children:[p.jsx(Y,{path:"/",element:p.jsx(ya,{})}),p.jsx(Y,{path:"*",element:p.jsx(da,{})})]})}export{Ua as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-D6iO1SmY.js";import{w as x,z as j,aN as y,H as E,c as p,e as F,cK as L,I as P}from"./index-DrTnWXwv.js";import"./mui-DqRlPgPp.js";import m from"./NotFoundScreen-Dz0534r9.js";import{a as u}from"./sentry-DJeJwz74.js";import{h as T,g as b,l as V,u as A,n as Q,o as R,p as f}from"./core-D-NK-UK9.js";import{eQ as U,Qt as C,Nf as z,Qu as _,u8 as Y,f2 as G,Qv as H,u6 as K}from"./zeni-epic-state-22WFBgK9.js";import{R as w}from"./ReferralListScreen-kpr6aOuh.js";import"./recharts-Dt8dM4EI.js";import"./analytics-NZ6ROu06.js";import"./plaid-BzyOi-ir.js";import"./dnd-C49i2BE4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BWZi4J-8.js";import"./lexical-Bp-0qESw.js";import"./pdf-BpZ3cLIj.js";import"./utils-CGva6Exy.js";import"./useAskAiCfoHostNavButtonProps-BxaFyJbc.js";import"./MobileAppDrawer-D38LtL34.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]="430848cb-a5a4-43ac-a38c-2e4b2536925c",a._sentryDebugIdIdentifier="sentry-dbid-430848cb-a5a4-43ac-a38c-2e4b2536925c")}catch{}})();const O=Q(function(a,t){const n=C(a);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(a,t){const{navigate:n}=t,i=j.getSignedInUser();return{onDismissClick:()=>{a(_()),n("..")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}a(K())},onUpdateInviteFormLocalData:s=>{a(H({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{i!=null&&p.trackInviteEmailClicked("cancel")}}})(L),q=()=>{const a=T(),[t,n]=u.useState(!1),[i,s]=u.useState(!1),r=b(o=>U(o)),c=V(),v=A(),{useDynamicConfig:g}=x(),d=j.getSignedInUser();if(d==null)throw Error("Can't access invite referral screen without signing in...");const l=b(o=>C(o)),N=d?.firstName!=null?d.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:k}=g(y.zeniAccountsConfig),D=z(k);u.useEffect(()=>{a(_()),r?.rewardsLastViewedTime==null&&i===!1&&(a(Y()),s(!0))},[]),u.useEffect(()=>{t||l.fetchState!=="Not-Started"||(n(!0),a(G(!0)))},[l.fetchState,a]);const I=r.company?.companyInfo.companyLegalName??r.companyName;return e.jsxs(e.Fragment,{children:[l.fetchState==="Completed"?e.jsx(E,{analytics:p,onLoad:o=>(S=>S.trackPageLoaded(F.Event.inviteEmailViewed))(o)}):null,e.jsx(O,{navigate:c,location:v,currentTenant:r,companyName:I,userName:N,inviteFormCompayData:l.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:D.maxAnnualPercentageYield})]})};function fa(){const{useFeatureGate:a}=x(),{isFeatureEnabled:t}=a(P.isReferralFeatureEnabled);return e.jsxs(R,{children:[e.jsx(f,{path:"/",element:t?e.jsx(w,{}):e.jsx(m,{})}),e.jsx(f,{path:"how-it-works",element:t?e.jsx(w,{isReferralDrawerOpen:!0}):e.jsx(m,{})}),e.jsx(f,{path:"refer/*",element:t?e.jsx(q,{}):e.jsx(m,{})}),e.jsx(f,{path:"*",element:e.jsx(m,{})})]})}export{fa as default};
|