@zeniai/web-app-ui 5.0.25-dev → 5.0.26-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-CV8Sw8CP.js +1 -0
- package/dist/assets/AddressScreen-CG-B80_4.js +9 -0
- package/dist/assets/{AiCfoScreen-DpK-7Gca.js → AiCfoScreen-CyTokZKd.js} +1 -1
- package/dist/assets/BillPayApprovalRoutes-BwSUlLgD.js +1 -0
- package/dist/assets/{BillPayRoutes-DzOYlN9R.js → BillPayRoutes-CSpnmpVl.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-CBdouPmn.js → BusinessVerificationPageScreen-XAQKreuQ.js} +2 -2
- package/dist/assets/{ChargeCardRoutes-6zbwme8g.js → ChargeCardRoutes-C39jkt7F.js} +8 -8
- package/dist/assets/CompanyPassportScreen-BbokQ4hH.js +1 -0
- package/dist/assets/ConnectionAuthScreen-eyPxOj3X.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-DwO0_vwT.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-BPdwf0-J.js → CustomerOnboardingRoutes-C6xc2c4j.js} +6 -6
- package/dist/assets/DashboardRoutes-BeeURxU7.js +20 -0
- package/dist/assets/{DefaultTenantHome-CnRWm-uF.js → DefaultTenantHome-xvMFl-dC.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-XuERCF9p.js → DomesticWireDetailScreen-rVUtw5dn.js} +3 -3
- package/dist/assets/DrawerScreen-D2sVaWmT.js +1 -0
- package/dist/assets/{EntityDetailRoutes-C8la2tWW.js → EntityDetailRoutes-CvQH6iMQ.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-CV-pS6NJ.js → ExpenseAutomationRoutes-Dnhz3G0Y.js} +3 -3
- package/dist/assets/FeaturePreviewScreen-DsVyovAJ.js +1 -0
- package/dist/assets/{MagicLinkRoutes-BgEa8vO6.js → MagicLinkRoutes-DSYzYj69.js} +2 -2
- package/dist/assets/MagicLinkSignInScreen-CYT_mA9u.js +12 -0
- package/dist/assets/MobileAppDrawer-CPQuEteC.js +1 -0
- package/dist/assets/NotFoundScreen-D5gX25SL.js +1 -0
- package/dist/assets/{NotificationRoutes-leJ65WHA.js → NotificationRoutes-By1RzVqo.js} +1 -1
- package/dist/assets/PandLWithForecastRoutes-zIKfcrxm.js +1 -0
- package/dist/assets/{PeopleRoutes-Cd6RkL82.js → PeopleRoutes-H0bbY-ET.js} +5 -5
- package/dist/assets/PerformanceRoutes-LsTpAH12.js +1 -0
- package/dist/assets/{Preview-DMyRJ2f0.js → Preview-BAKw3AAf.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-ceycu_9h.js → QBOConnectionScreen-8whb3Hsr.js} +1 -1
- package/dist/assets/{ReferralListScreen-ukudNh7G.js → ReferralListScreen-CyEKJZYn.js} +2 -2
- package/dist/assets/{ReimbursementApprovalRoutes-D7eDdVbZ.js → ReimbursementApprovalRoutes-Cu9gxM3S.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-B0gtWr3q.js → ReimbursementApprovalRuleDetailScreen-CMXdWUhi.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-sXj3F60G.js → ReimbursementRoutes-XZANwX-H.js} +4 -4
- package/dist/assets/{ReportsRoutes-BzpJF2OP.js → ReportsRoutes-B2iWUWYi.js} +1 -1
- package/dist/assets/RewardsRoutes-CcpZZ0yW.js +1 -0
- package/dist/assets/ScreenRoutes-DMJirfOH.js +2 -0
- package/dist/assets/{SettingsRoutes-Cv65hoYT.js → SettingsRoutes-Bjw3TffC.js} +4 -4
- package/dist/assets/{SetupPagesScreen-BJ_o2xYL.js → SetupPagesScreen-DxIIsva3.js} +1 -1
- package/dist/assets/SignInScreen-x6v4P1q0.js +1 -0
- package/dist/assets/SignOutScreen-DYYqM-_R.js +9 -0
- package/dist/assets/TaskListScreen-BW-oMerA.js +9 -0
- package/dist/assets/TaskRoutes-NyhjOGv3.js +9 -0
- package/dist/assets/TransactionDetailRoutes-CPn7atS_.js +1 -0
- package/dist/assets/{TransactionDetailScreen-DE6NRgEf.js → TransactionDetailScreen-lxeDv5DJ.js} +2 -2
- package/dist/assets/{TransactionListRoutes-B_gTc7lL.js → TransactionListRoutes-C-9Rmaut.js} +1 -1
- package/dist/assets/{TreasuryRoutes-BEtjV0uI.js → TreasuryRoutes-GImokxmZ.js} +6 -6
- package/dist/assets/{VendorsRoutes-eFBKyBpA.js → VendorsRoutes-DWeQQswE.js} +1 -1
- package/dist/assets/WiseConfirmationScreen-Crwiq_l2.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-Dv8aY5PN.js → ZeniAccountRoutes-CEoa3jip.js} +10 -10
- package/dist/assets/ZeniAccountStatementScreen-DI0ZEKQp.js +9 -0
- package/dist/assets/{accountMappingHelper-CEjaDvi1.js → accountMappingHelper-DdMTXagH.js} +1 -1
- package/dist/assets/{analytics-B3Q4UmLh.js → analytics-BsMspvaD.js} +1 -1
- package/dist/assets/{analyticsHelper-kqcVp_6n.js → analyticsHelper-DqgMIH9d.js} +1 -1
- package/dist/assets/{core-CBFn_Yo_.js → core-PVb_PTOa.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-CqMC__af.js → decodeURIComponentSafe-mU8LeJGH.js} +1 -1
- package/dist/assets/{dnd-1A4kYEBz.js → dnd-DhtyOCgF.js} +1 -1
- package/dist/assets/{empty-C0ZlcUMX.js → empty-HlfDqjBl.js} +1 -1
- package/dist/assets/{empty-CuHDeEGA.js → empty-wep5Q-1y.js} +1 -1
- package/dist/assets/{emptyVideoElement-L6eqPJfK.js → emptyVideoElement-DpJB9lfW.js} +1 -1
- package/dist/assets/{epic-BNVHfQUa.js → epic-CMMVrD8V.js} +1 -1
- package/dist/assets/getLocaleForTenant-yD-xTTtK.js +1 -0
- package/dist/assets/{index-CpBFmiLM.js → index-BCcxTJng.js} +1 -1
- package/dist/assets/{index-CAO2_lCc.js → index-BWo_N8M7.js} +1 -1
- package/dist/assets/{index-DFEZoheE.js → index-CsPK-ZcF.js} +2 -2
- package/dist/assets/{index-BKmj_VFp.js → index-Dn-dGYDp.js} +1 -1
- package/dist/assets/{index-CDftMuwg.js → index-DnBq3nCg.js} +1 -1
- package/dist/assets/{index-CFuLUFh-.js → index-P5rhD5Na.js} +14700 -14610
- package/dist/assets/{index-D5HjsaAE.js → index-yb_kldBQ.js} +1 -1
- package/dist/assets/{lexical-Blenvqjv.js → lexical-CVfRQHxx.js} +1 -1
- package/dist/assets/{liveblocks-ypyKWtbM.js → liveblocks-DiLJJ0-W.js} +1 -1
- package/dist/assets/{lottie-xwOlCP2t.js → lottie-DGoffhx5.js} +1 -1
- package/dist/assets/{mui-D35VurIR.js → mui-Bs_Wx3U8.js} +1 -1
- package/dist/assets/{pathToGoBack-DEbgHxxX.js → pathToGoBack-BrzgfZOY.js} +1 -1
- package/dist/assets/{pdf-B5d6xxqf.js → pdf-Cq31LyOe.js} +4 -4
- package/dist/assets/{pdf-lib-CUHgD73m.js → pdf-lib-CKEHYQuo.js} +1 -1
- package/dist/assets/{plaid-O0aD-5ib.js → plaid-CT0unNLB.js} +1 -1
- package/dist/assets/{pusher-C48G4Qny.js → pusher-BDivubpF.js} +1 -1
- package/dist/assets/{react-DBFLdS1u.js → react-AIza423u.js} +1 -1
- package/dist/assets/{react-BHZphYxv.js → react-B22DUlFC.js} +1 -1
- package/dist/assets/{react-DDnuJ4gm.js → react-CQHBdAiW.js} +1 -1
- package/dist/assets/{react-BaFEg--9.js → react-D12Thgxw.js} +1 -1
- package/dist/assets/{react-DlX6KwOM.js → react-D3IfLVtg.js} +1 -1
- package/dist/assets/{react-DOxDWALt.js → react-x856Ci_R.js} +1 -1
- package/dist/assets/{recharts-CSEhqlTE.js → recharts-CreyyBLx.js} +1 -1
- package/dist/assets/{routePaths-gXs1nhS8.js → routePaths-C6cVlXoV.js} +1 -1
- package/dist/assets/{sentry-ylIvhyeZ.js → sentry-CRXtNjzG.js} +1 -1
- package/dist/assets/{url-D6aOj1HL.js → url-DraJKqO-.js} +1 -1
- package/dist/assets/{url-BUH-dUKP.js → url-arGh5ZAs.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-BqWqtj0f.js +1 -0
- package/dist/assets/{useDeviceId-BJs7B5gi.js → useDeviceId-B5nwTsrh.js} +1 -1
- package/dist/assets/useFetchSuggestedQuestionsWhenReady-BJfLdWEG.js +1 -0
- package/dist/assets/{useInitialThreadRequest-B3znvGYl.js → useInitialThreadRequest-DNzJLWO_.js} +1 -1
- package/dist/assets/{utils-0qzBiEB0.js → utils-CfmtJLRd.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-C2FQw1AX.js → withTransactionSidePanel-9be4np7g.js} +2 -2
- package/dist/assets/{zeni-epic-state-DQMIbKEE.js → zeni-epic-state-4sJL0-hG.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +2 -2
- package/dist/assets/AddressRoutes-8L7DJrXy.js +0 -1
- package/dist/assets/AddressScreen-BFrEBCHK.js +0 -9
- package/dist/assets/BillPayApprovalRoutes-Dxy5I7t-.js +0 -1
- package/dist/assets/CompanyPassportScreen-BgmSm9WA.js +0 -1
- package/dist/assets/ConnectionAuthScreen-B4NgROXt.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-DHT0B4-Q.js +0 -1
- package/dist/assets/DashboardRoutes-CE3M4sVC.js +0 -20
- package/dist/assets/DrawerScreen-Cyxis5C5.js +0 -1
- package/dist/assets/FeaturePreviewScreen-Bq3A0Rct.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-nhNe4OAd.js +0 -12
- package/dist/assets/MobileAppDrawer-BXp_ujQw.js +0 -1
- package/dist/assets/NotFoundScreen-Jfnu8ThU.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-BcyTq1fG.js +0 -1
- package/dist/assets/PerformanceRoutes-Bx4Y_JlS.js +0 -1
- package/dist/assets/RewardsRoutes-BkzOweve.js +0 -1
- package/dist/assets/ScreenRoutes-ZQUR9-Lf.js +0 -2
- package/dist/assets/SignInScreen-BsSqFjXp.js +0 -1
- package/dist/assets/SignOutScreen-Cd3qXMLB.js +0 -9
- package/dist/assets/TaskListScreen-CmAT5D-e.js +0 -9
- package/dist/assets/TaskRoutes-BYmhAdb0.js +0 -9
- package/dist/assets/TransactionDetailRoutes-C0YCEtwY.js +0 -1
- package/dist/assets/WiseConfirmationScreen-5B9mdObt.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-CCUGE60d.js +0 -9
- package/dist/assets/getLocaleForTenant-Blze7OAY.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-DxZBiCyD.js +0 -1
- package/dist/assets/useFetchSuggestedQuestionsWhenReady-BwCliZLq.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-P5rhD5Na.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-CRXtNjzG.js"><link rel="modulepreload" crossorigin href="/assets/core-PVb_PTOa.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-4sJL0-hG.js"><link rel="modulepreload" crossorigin href="/assets/mui-Bs_Wx3U8.js"><link rel="modulepreload" crossorigin href="/assets/analytics-BsMspvaD.js"><link rel="modulepreload" crossorigin href="/assets/utils-CfmtJLRd.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.26-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.3",
|
|
31
31
|
"@zeniai/client-epic-state": "5.0.13",
|
|
32
|
-
"@zeniai/web-components": "4.0.
|
|
32
|
+
"@zeniai/web-components": "4.0.30",
|
|
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-ypyKWtbM.js";import{A as d}from"./AddressScreen-BFrEBCHK.js";import i from"./NotFoundScreen-Jfnu8ThU.js";import"./sentry-ylIvhyeZ.js";import{n as s,o as r}from"./core-CBFn_Yo_.js";import"./zeni-epic-state-DQMIbKEE.js";import"./recharts-CSEhqlTE.js";import"./index-CFuLUFh-.js";import"./mui-D35VurIR.js";import"./analytics-B3Q4UmLh.js";import"./plaid-O0aD-5ib.js";import"./dnd-1A4kYEBz.js";import"./stripe-DMRn4zHo.js";import"./lottie-xwOlCP2t.js";import"./lexical-Blenvqjv.js";import"./pdf-B5d6xxqf.js";import"./utils-0qzBiEB0.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]="4bd15e18-5b5f-4be1-8d33-8bd696c76da2",t._sentryDebugIdIdentifier="sentry-dbid-4bd15e18-5b5f-4be1-8d33-8bd696c76da2")}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,9 +0,0 @@
|
|
|
1
|
-
import{j as d}from"./liveblocks-ypyKWtbM.js";import{a as h}from"./sentry-ylIvhyeZ.js";import{j as P,h as _,u as j,l as E,g as M,k as $}from"./core-CBFn_Yo_.js";import{K as B,h as D,z as K,A as L,v as R,w as z,c as I,f as m,n as F,i as b,p as N}from"./index-CFuLUFh-.js";import{IY as C,gI as U,eM as G,IZ as O,b$ as V,I_ as q,k2 as H}from"./zeni-epic-state-DQMIbKEE.js";import{n as Y}from"./mui-D35VurIR.js";import Z from"./NotFoundScreen-Jfnu8ThU.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]="6f73f131-42f2-43a7-a75a-c871be00d69f",e._sentryDebugIdIdentifier="sentry-dbid-6f73f131-42f2-43a7-a75a-c871be00d69f")}catch{}})();const J=Y.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,Q=$(function(e,t){const{addressId:o,isSubPage:i,addressType:c}=t,l=G(e),a=t.roleMap!=null&&O(t.roleMap),r=i||c==="user_address"||V(l?.userRole??[])||a?void 0:"readonly";if(o==null){const s=q(c,e);return{addressToEdit:s?.addressToCreate,loadingState:s?.status?.fetchState,googleAPIKey:b.googleMapsAPIKey,isDisabled:r,isSubPage:i,dontShowSaveConfirmationPopup:t.dontShowSaveConfirmation}}const n=C(e,o);return{addressToEdit:n.address,loadingState:n.fetchState,googleAPIKey:b.googleMapsAPIKey,isDisabled:r}},function(e,t){const{navigate:o,location:i,addressType:c}=t,l=a=>{if(a==="express-pay")o("../express-pay/add-wire");else{const r=i.state,n=N(r?.pathnameStackToGoBack);let s=n.poppedPathname??k();const u=r?.queryParams;if(u){const f=new URLSearchParams(u).toString();f&&(s=`${s}?${f}`)}o(s,{state:{pathnameStackToGoBack:n.newStack}})}};return{onSubmitHandler:a=>{const r=W(a);e(H({addressType:c,addressToCreate:r})),I?.trackSaveAddressClicked(m.Event.saveAddressClicked,{street:a.street.addressString,city:a.city,state:a.state,country:a.country.selectedOption??"",postalCode:a.postalCode,suite:a.suite,secondaryInfo:a.secondaryInfo}),l(t.bankAccountContext)},onCancel:()=>{l(t.bankAccountContext)}}})(F);function de({isSubPage:e,hideAddressSubTitle:t=!1,hideAddressBackButton:o=!1,dontShowSaveConfirmation:i,accountContext:c,addressTypeParam:l}){const a=P(),r=_(),n=j(),{addressId:s,addressType:u}=E(),f=B(),w=D(),A=K.getSignedInUser(),[g,v]=h.useState(s==null),p=M(S=>s!=null?C(S,s).fetchState:"Not-Started"),x=L();if(A==null)throw Error("Can't access address page without signing in...");const T=S=>S.trackPageLoaded(s!=null?m.Event.editAddress:m.Event.addAddress),y=l??u;return h.useEffect(()=>{g||s==null||(v(!0),r(U(s,!1)))},[g,s,r]),y==null||y.match(/(user_address|company_address|company_registered_address|vendor_address|officer_([1-9]|10)_address)$/g)?!g&&p==="Not-Started"||g&&p==="In-Progress"?d.jsx(R,{fetchState:p,style:{backgroundColor:w.colors.grey5}}):s!=null&&p==="Error"?(a(`${k(1)}/new`,{replace:!0}),d.jsx(d.Fragment,{})):d.jsxs(d.Fragment,{children:[d.jsx(z,{analytics:I,onLoad:T}),d.jsx(J,{windowSize:f,children:d.jsx(Q,{location:n,navigate:a,isSubPage:e===!0,hideAddressBackButton:o,hideAddressSubTitle:t,addressId:s,addressType:y,dontShowSaveConfirmation:i,bankAccountContext:c,roleMap:x?.loggedInUserRoleMap})})]}):d.jsx(Z,{})}const k=(e=2)=>{let t="../";for(let o=0;o<e;o++)t=`${t}../`;return t},W=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng});export{de as A,W as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-ypyKWtbM.js";import{a as f}from"./sentry-ylIvhyeZ.js";import{j as U,u as B,h as T,g as v,N as $,k as j,l as L,n as O,o as h}from"./core-CBFn_Yo_.js";import{eM as N,Mf as R,LX as b,x4 as w,w_ as F,x2 as x,wT as W,LZ as M,wW as q,x6 as z,x5 as C}from"./zeni-epic-state-DQMIbKEE.js";import{h as P,z as k,v as V,a1 as X,bx as Z,aa as _,by as G}from"./index-CFuLUFh-.js";import"./mui-D35VurIR.js";import{i as H}from"./ReimbursementApprovalRuleDetailScreen-B0gtWr3q.js";import J from"./NotFoundScreen-Jfnu8ThU.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]="6882f70d-5fbf-4df5-a3c7-e7d233fa15bc",e._sentryDebugIdIdentifier="sentry-dbid-6882f70d-5fbf-4df5-a3c7-e7d233fa15bc")}catch{}})();const I="bill-approval-rule-update",K=j(function(e){return{approvalView:R(e),billPaySetupApproverViewUpdateData:b(e).billPaySetupApproverViewUpdateData}},function(e,o){const{navigate:t,location:p}=o;return{onApprovalRulesEventReceived:a=>{a.endsWith(I)&&e(M(!1))},onBackClick:()=>{_(p)?t("../../"):t("../../../bills/setup")},onDeleteRuleClick:a=>{e(W(a))},onEditRuleClick:a=>{a!=null?(e(x(a)),t(`./${a}/edit`)):(e(x()),t("./new"))}}})(X(Z)),Q=()=>{const e=U(),o=B(),t=T(),[p,a]=f.useState(!1),[u,s]=f.useState(!1),d=P(),n=v(i=>i.billPaySetupApproverViewState.fetchState),c=v(i=>N(i)),r=v(i=>R(i)),g=v(i=>b(i).billPaySetupApproverViewUpdateData);if(f.useEffect(()=>{g?.updateStatus.fetchState==="Completed"&&t(w())},[g]),f.useEffect(()=>{p||n!=="Not-Started"||(a(!0),t(F(!0)))},[p,n,t]),k.getSignedInUser()==null)throw Error("Can't access billpay approval without signing in...");f.useEffect(()=>{r.allApprovalRules.length===0&&r.fetchState==="Completed"&&(u||(s(!0),t(x())),e("./new"))},[u,r,t]);const y={events:c.companyId!=null?[`private-${c.companyId}.${I}`]:[],eventCallback:(i,A,m)=>{i.endsWith(I)&&m.onApprovalRulesEventReceived(i)}};return c.companyBillPayInfo?.info?.isBillPayTOSAccepted===!1?l.jsx($,{to:"../../promo"}):c.companyBillPayInfo?.info?.isBillPayTOSAccepted!==!0||r.fetchState!=="Completed"&&r.fetchState!=="Error"?l.jsx(V,{fetchState:"In-Progress",style:{backgroundColor:d.colors.grey5}}):l.jsx(K,{currentTenant:c,location:o,navigate:e,...y})},Y=j(function(e,o){const t=b(e),p=t.billPaySetupApproverViewUpdateData?.type??"approval_create",a=p==="approval_create"&&t.allApprovalRules.length!==0;let u=t.allApprovalRules.length===0;return o.approvalRuleId&&(u=t.allApprovalRules.findIndex(s=>s.approvalRuleId===o.approvalRuleId)===0),{localData:t,hideUpperBoundField:a,isLowerBoundDisabled:u,approvalUpdateActionType:p}},function(e,o){const{navigate:t,approvalUpdateDataView:p,approverViewData:a,approvalRuleId:u}=o,s=p.billPaySetupApproverViewUpdateData?.type,d=_(o.location);return{onApprovalRuleDataUpdated:n=>{const c=r=>{const g=[];return r.forEach(y=>{const i=y.actors.selectedUsers.map(S=>({type:"user",userId:S.userId,isImplicitActor:!1})),A=y.actors.selectedNonUsers.map(S=>{const E=!!H(S.value);return{type:E?"attribute":"role",subType:S.value,userId:void 0,idType:void 0,isImplicitActor:!E}}),m=i.concat(A);g.push({action:y.stepType.selectedOption,actors:m,operator:m.length>1?y.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),g};if(s==="approval_create"){const r={criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:n.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:n.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(n.steps),isApplicableOnPendingApprovalEntity:n.applyToExistingBills.includes("applyToExistingBills")};e(C(r))}else{const r={approvalRuleId:u,criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:n.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:n.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(n.steps),isApplicableOnPendingApprovalEntity:n.applyToExistingBills.includes("applyToExistingBills")};e(C(r))}},onResetClick:()=>{e(w()),s==="approval_update"||d?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(w()),s==="approval_update"||d?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(z())},onSaveRuleSuccess:()=>{t("../")}}})(G);function D(){const e=U(),o=T(),t=B(),{approvalRuleId:p}=L(),a=k.getSignedInUser(),u=P(),s=v(r=>b(r)),d=v(r=>R(r)),[n,c]=f.useState(!1);if(f.useEffect(()=>{n||(c(!0),o(q(!0)))}),f.useEffect(()=>{d.fetchState==="Not-Started"&&e(p!=null?"../../":"../")},[d,p]),a==null)throw Error("Can't access address page without signing in...");return s.approverListFetchStatus.fetchState=="Not-Started"||s.approverListFetchStatus.fetchState==="In-Progress"?l.jsx(V,{fetchState:s.approverListFetchStatus.fetchState,style:{backgroundColor:u.colors.grey5}}):l.jsx(Y,{navigate:e,approvalUpdateDataView:s,approvalRuleId:p,approverViewData:d,location:t})}function se(){return l.jsxs(O,{children:[l.jsx(h,{path:"/",element:l.jsx(Q,{})}),l.jsx(h,{path:"/new",element:l.jsx(D,{})}),l.jsx(h,{path:"/:approvalRuleId/edit",element:l.jsx(D,{})}),l.jsx(h,{path:"*",element:l.jsx(J,{})})]})}export{se as B};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-ypyKWtbM.js";import{a as g}from"./sentry-ylIvhyeZ.js";import{j as v,h as k,u as x,l as T,g as O,k as E}from"./core-CBFn_Yo_.js";import{z as C,b0 as F,w as P,c as L,f as V,aa as b,b1 as j,ao as A,ap as B,m as U}from"./index-CFuLUFh-.js";import{eM as D,fB as M,rs as _,fw as R,b$ as z,Ls as G,bm as Y,pA as $,po as q,jW as H,lq as S,Lt as W,bB as Z,cr as N,ly as J,lB as K}from"./zeni-epic-state-DQMIbKEE.js";import"./mui-D35VurIR.js";import{c as Q}from"./routePaths-gXs1nhS8.js";import{M as X}from"./MobileAppDrawer-BXp_ujQw.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new a.Error().stack;n&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[n]="96794877-5fd1-42fb-8ffe-333a56e31aff",a._sentryDebugIdIdentifier="sentry-dbid-96794877-5fd1-42fb-8ffe-333a56e31aff")}catch{}})();const ee=E(function(a){const n=R(a),i=C.getSignedInUser(),l=D(a),c=l.tenantId,p={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=z(l?.userRole??[])&&n.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=G(a.companyConfigState),t=a.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:n.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:n,allIndustries:e.companyIndustries??[],allNationalityCountries:t,isDisabled:f,authParams:p,filesEndPoint:`${A.fileMicroServiceBaseUrl}`,isZeniUser:Y(i)}},function(a,n){const{companyId:i,currentTenant:l,navigate:c,location:p}=n,{tenantEmailDomain:f}=l;return{onScheduleClick:e=>{let t=e.href;t.includes("http")||(t="https://".concat(t)),window.open(t,"_blank")},onSaveAll:()=>{a(K())},onAddressClick:e=>{const t=Q(f,e),o=U(p.state?.pathnameStackToGoBack,p.pathname);c(t,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{a(J({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:t,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:u}=t,{meetingLink:y}=d,{incDate:s}=o,{taxesFiledYears:h}=r,w={companyInfo:{...t,website:u!=""&&u!=null?N(u):void 0,meetingLink:y!=""&&y!=null?N(y):void 0,industry:t.industry.selectedOption,companyIndustryType:t.companyIndustryType?.selectedOption??void 0,companySubIndustry:t.companySubIndustry?.selectedOption??void 0,businessModel:t.businessModel.selectedOption??"",companySourceOfFunds:t.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:t.companySourceOfFundsDescription??void 0,countriesOfOperations:t.countriesOfOperations?.selectedOptions?.map(I=>I.length===2?I:B(I))??[],transactionVolume:t.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:t.transactionVolumeDescription??void 0,regulatedStatus:t.regulatedStatus??void 0,regulatedStatusDescription:t.regulatedStatusDescription??void 0,usNexus:t.usNexus??void 0,usNexusTypes:t.usNexusTypes?.selectedOptions??[],purposeOfAccount:t.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:t.purposeOfAccountDescription??void 0},incInfo:{typeOfInc:o.typeOfInc.selectedOption??"",stateOfInc:o.stateOfInc.selectedOption??"",incDate:s!=null?Z(s?.toString()):s,fileId:o.fileIds[0]},taxDetails:{taxIdOrEIN:r.taxIdOrEIN,sicCode:r.sicCode,naicsCode:r.naicsCode,dunsNumber:r.dunsNumber,taxesFiledYears:h.selectedOptions.map(I=>parseInt(I)),fileId:r.fileIds[0]}};a(S({companyDetails:w}))},onPrimaryContactDetailsUpdated:e=>{a(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{a(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:void 0}]}))},onNewCompanyOfficerRemoved:e=>{a(W(e))},onCompanyOfficerUpdated:e=>{a(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:e.userId}]}))},updateFilesEntity:e=>{a(H({files:e}))},onDeleteFile:e=>{a(q(e))},onEditFileName:(e,t)=>{a($(e,t.split(".")[0]))}}})(j);function de(){const a=v(),n=k(),i=x(),{tenantEmailDomain:l}=T(),[c,p]=g.useState(!1),[f,e]=g.useState(!1),t=O(s=>s.companyViewState.passportView.fetchState),o=O(s=>s.companyConfigState.fetchState),r=O(s=>D(s)),d=r.companyId??C.getSignedInUserTenant(l)?.companyId;if(C.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect(()=>{c||t!=="Not-Started"||d==null||(p(!0),n(M(d)))},[c,t,d,n]),g.useEffect(()=>{o==="Not-Started"&&n(_())},[o,n]);const u=s=>{e(s)},y=t==="Not-Started"||t==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&t==="Error"?m.jsx(F,{onGoHome:()=>a("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(P,{analytics:L,onLoad:s=>s.trackPageLoaded(V.Event.companyPassport,b(i)?"Settings":"Company Passport")}),b(i)?m.jsx(X,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:a,location:i,isLoading:y,currentTenant:r,isSettings:b(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-ypyKWtbM.js";import{a}from"./sentry-ylIvhyeZ.js";import{h as D,u as v,g as m,N as w}from"./core-CBFn_Yo_.js";import{Ib as O,eM as A,fi as _,mh as j,fJ as E,fh as U,eN as L,Ij as F}from"./zeni-epic-state-DQMIbKEE.js";import{u as $,z as u,L as g,O as k,o as H}from"./index-CFuLUFh-.js";import{n as z}from"./mui-D35VurIR.js";import{t as R}from"./getLocaleForTenant-Blze7OAY.js";import{g as P,Q as G}from"./QBOConnectionScreen-ceycu_9h.js";import"./recharts-CSEhqlTE.js";import"./analytics-B3Q4UmLh.js";import"./plaid-O0aD-5ib.js";import"./dnd-1A4kYEBz.js";import"./stripe-DMRn4zHo.js";import"./lottie-xwOlCP2t.js";import"./lexical-Blenvqjv.js";import"./pdf-B5d6xxqf.js";import"./utils-0qzBiEB0.js";import"./empty-CuHDeEGA.js";import"./pdf-lib-CUHgD73m.js";import"./index-CDftMuwg.js";import"./url-BUH-dUKP.js";import"./index-CpBFmiLM.js";import"./decodeURIComponentSafe-CqMC__af.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]="ebdc1798-a0a6-417e-926d-90f370c4f50f",t._sentryDebugIdIdentifier="sentry-dbid-ebdc1798-a0a6-417e-926d-90f370c4f50f")}catch{}})();const J=z.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
flex: 1 1 auto;
|
|
4
|
-
flex-direction: row;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
align-items: center;
|
|
7
|
-
width: 100%;
|
|
8
|
-
height: 100vh;
|
|
9
|
-
background-color: ${t=>t.theme.colors.background};
|
|
10
|
-
box-shadow: ${t=>`0px 2px ${H.sp1} ${t.theme.colors.dropShadowNormal}`};
|
|
11
|
-
`;function ce(){const t=D(),i=v(),{setLoading:d,clearAllLoading:x}=$(),c=a.useRef(!1),p=a.useRef(!1),{code:b,realmId:N,state:T}=P(i.search),y=b!==""&&N!==""&&T!=="",I=m(l=>O(l)),e=m(l=>A(l)),n=m(l=>l.tenantState.fetchState),r=m(l=>l.tenantState.activeTenantFetchState.fetchState),o=u.getSignedInUser(),f=u.getActiveTenantForUser()?.tenantId,s=e?.externalConnections?.fetchState,h=e?.externalConnections?.saveConnectionState,S=e.externalConnections?.accounting[0]?.isValid;return a.useLayoutEffect(()=>{d(g.CONNECTION_AUTH)},[d]),a.useEffect(()=>{c.current||o==null||f==null||(c.current=!0,n==="Completed"||r!=="Not-Started"&&r!=="Error"||(d(g.TENANT_FETCHING),t(_(o.userId,f))))},[c,n,d]),a.useEffect(()=>{e.tenantId==null&&!p.current&&o!=null&&(p.current=!0,!(f==null||f!=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"||h!=="Error"||(d(g.CONNECTION_AUTH),t(E(o.userId,e.tenantId)))},[h]),a.useEffect(()=>{n!=="Completed"&&r!=="Completed"||o==null||e?.tenantId==null||(t(U(e.tenantId)),u.saveActiveTenantDomainForUser(e.tenantEmailDomain),L(o?.userId,o?.zeniSessionId,e.tenantId),k.updateAppLocaleID(R(F(e))),e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||s==="In-Progress"||o==null||e==null||t(E(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:y||S===!1?C.jsx(J,{children:C.jsx(G,{})}):C.jsx(w,{to:"/",replace:!0})}export{ce as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as d}from"./liveblocks-ypyKWtbM.js";import{z as n}from"./index-CFuLUFh-.js";import{g as p}from"./QBOConnectionScreen-ceycu_9h.js";import"./sentry-ylIvhyeZ.js";import{u as a,N as i}from"./core-CBFn_Yo_.js";import"./zeni-epic-state-DQMIbKEE.js";import"./recharts-CSEhqlTE.js";import"./mui-D35VurIR.js";import"./analytics-B3Q4UmLh.js";import"./plaid-O0aD-5ib.js";import"./dnd-1A4kYEBz.js";import"./stripe-DMRn4zHo.js";import"./lottie-xwOlCP2t.js";import"./lexical-Blenvqjv.js";import"./pdf-B5d6xxqf.js";import"./utils-0qzBiEB0.js";import"./empty-CuHDeEGA.js";import"./pdf-lib-CUHgD73m.js";import"./index-CDftMuwg.js";import"./url-BUH-dUKP.js";import"./index-CpBFmiLM.js";import"./decodeURIComponentSafe-CqMC__af.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]="b68d0d57-e81d-4cfb-97e6-d4dd5e5b7ebd",t._sentryDebugIdIdentifier="sentry-dbid-b68d0d57-e81d-4cfb-97e6-d4dd5e5b7ebd")}catch{}})();const U=()=>{const t=a(),{code:o,realmId:r,state:e}=p(t.search),s=n.getSignedInUser()?.userId??"";if(f(o,r,e,s)===!0){const m=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return d.jsx(i,{to:m})}return d.jsx(i,{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 l}from"./liveblocks-ypyKWtbM.js";import{l as N,g as k,u as z,h as V,j as q,k as H,s as $a,n as at,o as D}from"./core-CBFn_Yo_.js";import{eM as L,Js as Le,bB as Yt,bp as de,KF as za,hO as qa,KG as Tt,KH as Za,hR as nt,KI as Be,KJ as Ha,hW as Ja,KK as xt,KL as Qa,h_ as ot,KM as Re,KN as Wa,cN as rt,KO as Xa,KP as en,JM as tn,iU as an,KQ as nn,bm as Se,KR as Gt,Jg as X,bc as Kt,j6 as Vt,mp as Nt,iR as $t,Ji as ee,Jh as Z,f2 as on,fk as sn,KS as rn,KT as cn,KU as zt,KV as fe,tw as ye,tx as ve,tU as ue,tO as te,tB as Ie,KW as ln,KX as dn,KY as un,KZ as qt,K_ as ge,K$ as mn,dA as Me,q8 as Zt,L0 as pn,L1 as hn,L2 as fn,L3 as it,ID as ct,jm as lt,u0 as dt,qg as gn,L4 as bn,ty as Dt,qb as ce,q7 as Ht,L5 as oe,L6 as Cn,L7 as ut,IC as mt,s8 as Jt,L8 as _n,L9 as kn,La as Sn,Lb as pt,sl as yn,Lc as vn,tA as Ot,s7 as Qt,Ld as se,Le as In,bu as Wt,u4 as Xt,Lf as An,Lg as En,Lh as wn,Li as ht,t$ as Tn,Lj as xn,tz as Ft,u3 as ea,Lk as re,Ll as Dn,Lm as On,Ln as ta,jb as aa,mm as na,jg as oa,mk as sa,mj as ra,mi as ia,rw as Fn,fa as Pn,cK as Bn,cL as Rn,mf as jn,f6 as Ln,mv as Mn,Lo as Un,D8 as Yn,Lp as Gn,Lq as Kn,Lr as Vn,b5 as ft,eY as Nn,gw as $n,fB as zn,mq as qn,iK as Zn,mn as Hn,ml as Jn,eS as Qn,eQ as Wn}from"./zeni-epic-state-DQMIbKEE.js";import{z as j,J,m as O,c as I,O as $,aP as Xn,F as Ae,w as Ee,aQ as ca,f as G,aR as eo,A as we,aS as la,r as Ue,d as M,h as to,aT as ao,aU as no,K as oo,a as da,Z as so,aV as ro,aI as ua,aW as io,aX as co,H as lo,aY as Te,aZ as uo,al as mo,p as po,G as ho,a_ as fo,a$ as Ce}from"./index-CFuLUFh-.js";import{n as gt}from"./mui-D35VurIR.js";import{a as _}from"./sentry-ylIvhyeZ.js";import{w as ma}from"./withTransactionSidePanel-C2FQw1AX.js";import{b as pa,t as me,e as ae,a as bt,v as go}from"./routePaths-gXs1nhS8.js";import{u as Ye}from"./useAskAiCfoHostNavButtonProps-DxZBiCyD.js";import{c as xe,b as bo}from"./useFetchSuggestedQuestionsWhenReady-BwCliZLq.js";import ke from"./NotFoundScreen-Jfnu8ThU.js";import{t as ha}from"./analyticsHelper-kqcVp_6n.js";import{C as Co}from"./CompanyPassportScreen-BgmSm9WA.js";import{F as _o}from"./FeaturePreviewScreen-Bq3A0Rct.js";import{R as ko}from"./ReferralListScreen-ukudNh7G.js";import"./recharts-CSEhqlTE.js";import"./analytics-B3Q4UmLh.js";import"./plaid-O0aD-5ib.js";import"./dnd-1A4kYEBz.js";import"./stripe-DMRn4zHo.js";import"./lottie-xwOlCP2t.js";import"./lexical-Blenvqjv.js";import"./pdf-B5d6xxqf.js";import"./utils-0qzBiEB0.js";import"./TransactionDetailScreen-DE6NRgEf.js";import"./decodeURIComponentSafe-CqMC__af.js";import"./MobileAppDrawer-BXp_ujQw.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]="126648c1-2c7e-49f6-bd4d-4567997b3299",e._sentryDebugIdIdentifier="sentry-dbid-126648c1-2c7e-49f6-bd4d-4567997b3299")}catch{}})();const So=ma(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=N(),s=j.getSignedInUser(),i=k(w=>w.tenantState.currentTenantId),d=k(w=>L(w)),{tenantEmailDomain:f}=N(),g=z(),b=d?.companyName??"",p={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},c=_.useMemo(()=>({authParams:p,companyName:b,downloadEndPoint:`${J}/agingDetailedReport`,timezone:Le()}),[]),u=_.useMemo(()=>r!=null?Yt(r):de(),[r]),h=V(),m=q(),C=k(w=>za(w,u,o)),S=_.useCallback(()=>{o!=null&&C.fetchState!=="In-Progress"&&C.fetchState!=="Completed"&&h(qa(o,u))},[u]),A=_.useCallback(()=>{m("../../",{relative:"path"})},[]),P=_.useCallback((w,B)=>{h(Tt({sortKey:w,sortOrder:B}))},[]),E=_.useCallback(w=>{h(Tt({downloadState:w}))},[]),y=_.useCallback(w=>{if(e)e(w.transactionId,w.transactionType);else if(f!=null){const B=pa({id:w.transactionId,type:w.transactionType},f);m(B);const pe=O(g.state?.pathnameStackToGoBack,g.pathname);m(B,{state:{pathnameStackToGoBack:pe}})}},[f,e]),T=_.useCallback(()=>{C.vendor!=null&&I.trackApAgingDetail("AP Aging",u.format($.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),C.vendor.id,C.vendor.name)},[C.vendor,u]);return _.useEffect(()=>{S()},[]),_.useEffect(()=>{C.fetchState==="Completed"&&T()},[T,C.fetchState]),l.jsx(Xn,{apAgingDetail:C,downloadParams:c,reportDate:u,analytics:I,onTransactionClick:y,onReload:S,onBackClick:A,onColumnSortConfigChanged:P,updateDownloadStateHandler:E,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),yo=()=>{const{isAiCfoOpen:e,setIsAiCfoOpen:a}=Ae(),t=V(),n=q(),o=k(y=>Za(y)),{isAiCfoAccessEnabled:r,onAskAiCfoClick:s}=Ye({isAiCfoOpen:e,setIsAiCfoOpen:a,mobileExploreReferrer:"AP Aging"});xe({isDataReady:o.fetchState==="Completed"});const i=j.getSignedInUser(),d=k(y=>y.tenantState.currentTenantId),f=k(y=>L(y)),g=f?.companyName??"",b={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:d??""},p=_.useMemo(()=>({authParams:b,companyName:g,downloadEndPoint:`${J}/agingReport`,timezone:Le()}),[]),c=o.apAgingUIState.selectedDate??de(),u=_.useCallback(()=>{o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&t(nt(c))},[]);_.useEffect(()=>{u()},[]);const h=_.useCallback(()=>{n("../",{relative:"path"})},[]),m=_.useCallback(y=>{t(Be({searchString:y}))},[]),C=_.useCallback((y,T)=>{t(Be({sortKey:T,sortOrder:y}))},[]),S=_.useCallback(y=>{n(`./${y}/${c.format($.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[c]),A=_.useCallback(y=>{t(Be({downloadState:y}))},[]),P=_.useCallback((y,T)=>{},[]),E=_.useCallback((y,T)=>{t(Be({selectedDate:y,agingDateSelectionType:T})),t(nt(y))},[]);return l.jsxs(l.Fragment,{children:[o.fetchState==="Completed"?l.jsx(Ee,{analytics:I,onLoad:y=>y.trackPageLoaded(G.Event.agingReport,"AP Aging")}):null,l.jsx(ca,{uiState:o.apAgingUIState,report:o,downloadParams:p,analytics:I,onReloadReport:u,onBackClick:h,onSearchTextChange:m,onSortOrderChange:C,onEntityNameClick:S,updateDownloadStateHandler:A,onSelectedDateChanged:E,onNodeCollapseToggled:P,isAiCfoAccessEnabled:r,onAskAiCfoClick:s})]})},vo=ma(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=N(),s=j.getSignedInUser(),i=k(T=>L(T)),{tenantEmailDomain:d}=N(),f=z(),g=i.companyName,b={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},p=_.useMemo(()=>({authParams:b,companyName:g,downloadEndPoint:`${J}/agingDetailedReport`,timezone:Le()}),[]),c=_.useMemo(()=>r!=null?Yt(r):de(),[r]),u=V(),h=q(),m=k(T=>Ha(T,c,o)),C=_.useCallback(()=>{o!=null&&m.fetchState!=="In-Progress"&&m.fetchState!=="Completed"&&u(Ja(o,c))},[c]),S=_.useCallback(()=>{h("../../",{relative:"path"})},[]),A=_.useCallback((T,w)=>{u(xt({sortKey:T,sortOrder:w}))},[]),P=_.useCallback(T=>{u(xt({downloadState:T}))},[]),E=_.useCallback(T=>{if(e)e(T.transactionId,T.transactionType);else if(d!=null){const w=pa({id:T.transactionId,type:T.transactionType},d);h(w);const B=O(f.state?.pathnameStackToGoBack,f.pathname);h(w,{state:{pathnameStackToGoBack:B}})}},[d,e]),y=_.useCallback(()=>{m.customer!=null&&I.trackArAgingDetail("AR Aging",c.format($.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),m.customer.id,m.customer.name)},[m.customer,c]);return _.useEffect(()=>{C()},[]),_.useEffect(()=>{m.fetchState==="Completed"&&y()},[m.fetchState,y]),l.jsx(eo,{arAgingDetail:m,downloadParams:p,reportDate:c,analytics:I,onTransactionClick:E,onReload:C,onBackClick:S,onColumnSortConfigChanged:A,updateDownloadStateHandler:P,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),Io=()=>{const{isAiCfoOpen:e,setIsAiCfoOpen:a}=Ae(),t=V(),n=q(),o=k(E=>Qa(E)),{isAiCfoAccessEnabled:r,onAskAiCfoClick:s}=Ye({isAiCfoOpen:e,setIsAiCfoOpen:a,mobileExploreReferrer:"AR Aging"});xe({isDataReady:o.fetchState==="Completed"});const i=j.getSignedInUser(),d=k(E=>L(E)),f=d.companyName,g={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:d.tenantId},b=_.useMemo(()=>({authParams:g,companyName:f,downloadEndPoint:`${J}/agingReport`,timezone:Le()}),[]),p=o.arAgingUIState.selectedDate??de(),c=_.useCallback(()=>{o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&t(ot(p))},[]);_.useEffect(()=>{c()},[]);const u=_.useCallback(()=>{n("../",{relative:"path"})},[]),h=_.useCallback(E=>{t(Re({searchString:E}))},[]),m=_.useCallback((E,y)=>{t(Re({sortKey:y,sortOrder:E}))},[]),C=_.useCallback(E=>{n(`./${E}/${p.format($.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[p]),S=_.useCallback(E=>{t(Re({downloadState:E}))},[]),A=_.useCallback((E,y)=>{t(Re({selectedDate:E,agingDateSelectionType:y})),t(ot(E))},[]),P=_.useCallback((E,y)=>{t(Wa({nodeId:E,isCollapsed:y}))},[]);return l.jsxs(l.Fragment,{children:[o.fetchState==="Completed"?l.jsx(Ee,{analytics:I,onLoad:E=>E.trackPageLoaded(G.Event.agingReport,"AR Aging")}):null,l.jsx(ca,{uiState:o.arAgingUIState,report:o,downloadParams:b,analytics:I,onReloadReport:c,onBackClick:u,onSearchTextChange:h,onSortOrderChange:m,onEntityNameClick:C,updateDownloadStateHandler:S,onSelectedDateChanged:A,onNodeCollapseToggled:P,isAiCfoAccessEnabled:r,onAskAiCfoClick:s})]})},fa=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function ga(e,a){const t=tn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=me(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(an(n,o))},onPromoCardBtnClick:n=>{if(a.isZeniAccountsAdmin){let o=`../../checking/${n}`;n?I.trackZeniAccountsCashBalancePromoClicked("Move Money"):(I.trackZeniAccountsCashBalancePromoClicked("Sign Up for Free"),o="../../checking/promo");const r=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(o,{state:{pathnameStackToGoBack:r}})}else I.trackZeniAccountsCashBalancePromoClicked("Learn More"),window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}}const Ao=H(function(e){const a=Xa(e).accountsInOrder.map((n,o)=>fa(n,o)),t=en(e);return{sectionTitle:$.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,zeniAccountsPromoCardReport:t,fetchState:e.cashBalanceState.fetchState,analytics:I}},ga)(la),Eo=H(function(e){const a=nn(e).accountsInOrder.map((o,r)=>fa(o,r)),t=j.getSignedInUser(),n=Se(t);return{sectionTitle:$.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:I}},ga)(la);function wo(){const e=q(),a=z(),{tenantEmailDomain:t}=N(),n=we(),o=k(s=>L(s).company?.companyInfo.firstMonthOfFY??1),r=rt(n?.loggedInUserRoleMap);return k(s=>s.cashBalanceState.fetchState)==="Error"?l.jsx(ke,{}):l.jsx(Ao,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,isZeniAccountsAdmin:r,firstMonthOfFY:o})}function To(){const e=q(),a=z(),{tenantEmailDomain:t}=N(),n=we(),o=rt(n?.loggedInUserRoleMap),r=k(s=>L(s).company?.companyInfo.firstMonthOfFY??1);return k(s=>s.cardBalanceState.fetchState)==="Error"?l.jsx(ke,{}):l.jsx(Eo,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,isZeniAccountsAdmin:o,firstMonthOfFY:r})}const xo=gt.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
|
-
`,Do=gt.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 Oo({title:e,reportId:a,entityAutoCompleteView:t,autoCompleteText:n,isAiCfoAccessEnabled:o,onAskAiCfoClick:r}){const s=q(),i=V(),d=z(),{tenantEmailDomain:f}=N(),g=to();return l.jsxs(xo,{children:[l.jsx(ao,{source:a==="cash_balance"?"CashBalanceDetailScreen":"CardBalanceDetailScreen",title:e,onBackClick:()=>{s("../")},backgroundColor:g.colors.grey4,searchAutoComplete:{autoCompleteData:{entityAutoCompleteView:t,autoCompleteText:n},autoCompleteActions:{onAutoCompleteInputChange:b=>{b.trim().length>=2?i(ee({searchString:b,searchOrigin:"navbar"})):b.trim().length===0&&i(Z("navbar"))},onAutoCompleteEntity:b=>{n!=null&&I?.trackSearch(G.Event.search,Fo(a),b.type,b.name,n);const p=ae(b,f),c=O(d.state?.pathnameStackToGoBack,d.pathname);s(p,{state:{pathnameStackToGoBack:c}})}}},rightSideComponent:o===!0&&r!=null?l.jsx(no,{onClick:r}):null}),l.jsx(Do,{children:a==="cash_balance"?l.jsx(wo,{}):l.jsx(To,{})})]})}function Pt(){const{isAiCfoOpen:e,setIsAiCfoOpen:a}=Ae(),t=z(),n=V(),{useFeatureGate:o}=Ue(),{isFeatureEnabled:r}=o(M.isDepositAccountsFeatureEnabled),s=k(C=>C.cashBalanceState.fetchState),i=k(C=>C.cardBalanceState.fetchState),d=j.getSignedInUser();if(d==null)throw Error("Can't access dashboard detail without signing in...");const f=Gt((C=>{const S=Kt(C,"/").split("/");return S[S.length-1]})(t.pathname));let g="Not-Started",b="";const p=$.getLocalizedStrings();switch(f){case"cash_balance":g=s,b=p.reportTitleById.cash_balance;break;case"card_balance":g=i,b=p.reportTitleById.card_balance;break;default:console.error(`${f} is not supported!`)}const{isAiCfoAccessEnabled:c,onAskAiCfoClick:u}=Ye({isAiCfoOpen:e,setIsAiCfoOpen:a,mobileExploreReferrer:f==="card_balance"?"Card Balance":"Cash Balance"});xe({isDataReady:g==="Completed"});const h=k(C=>C.entityAutoCompleteState.autoCompleteText.navbar),m=k(C=>X(C,"navbar"));return _.useEffect(()=>{g==="Not-Started"&&function(C,S,A){switch(S){case"card_balance":C($t());break;case"cash_balance":C(Vt()),A===!0&&C(Nt());break;default:throw new Error(`balance report type ${S} is not yet supported`)}}(n,f,r)},[d,n,g]),l.jsxs(l.Fragment,{children:[g==="Completed"?l.jsx(Ee,{analytics:I,onLoad:C=>((S,A)=>{switch(A){case"card_balance":S.trackPageLoaded(G.Event.cardBalance);break;case"cash_balance":S.trackPageLoaded(G.Event.cashBalance);break;default:console.error(`Analytics: Not tracking Page Loaded for ${A}!`)}})(C,f)}):null,l.jsx(Oo,{title:b,reportId:f,autoCompleteText:h,entityAutoCompleteView:m,isAiCfoAccessEnabled:c,onAskAiCfoClick:u})]})}const Fo=e=>{switch(e){case"cash_balance":return"Cash Balance";case"card_balance":return"Card Balance";default:return"Dashboard"}},Po=[];function De(e){const{mobileExploreReferrer:a}=e,t=V(),n=q(),o=z(),{tenantEmailDomain:r}=N(),{setIsAiCfoOpen:s,setAiCfoSidePanelQuestionToSubmit:i}=Ae(),d=oo(),f=lo(d),g=$a(),b=k(B=>on(B)),p=b.uiState?.currentChatSessionId,c=b.allSessionsWithOrderedQuestionAnswers??Po,u=j.getSignedInUser()?.userId,h=da(),m=bo()&&h&&r!=null,C=so(),S=ro(C),{useDynamicConfig:A}=Ue(),{configValue:P}=A(ua.aiCfoMessageDynamicConfig),E=_.useMemo(()=>Array.isArray(P.default_message_list)?P.default_message_list:[],[P.default_message_list]),y=_.useMemo(()=>(S!=null&&S.length>0?S:E).slice(0,2),[E,S]),T=_.useCallback((B,pe)=>{if(u==null||B.trim()==="")return;const he=io(g.getState());if(f){const Oe=O(o.state?.pathnameStackToGoBack,o.pathname);n(`/${r}/ai-cfo/explore`,{state:{message:"",origin:"",pathnameStackToGoBack:Oe,referrer:a,aiCfoInitialQuestion:B,aiCfoShouldSubmit:!he}})}else{if(he)return t(sn(B)),void s(!0);i(B),s(!0),co(t,B,"insights_section",p,c,u,pe,void 0)}},[c,p,t,f,o.pathname,o.state,a,n,s,i,g,r,u]),w=_.useCallback(()=>{if(f){const B=O(o.state?.pathnameStackToGoBack,o.pathname);n(`/${r}/ai-cfo/explore`,{state:{message:"",origin:"",pathnameStackToGoBack:B,referrer:a}})}else s(!0)},[f,o.pathname,o.state,a,n,s,r]);return _.useMemo(()=>{if(m)return{onAskSomethingElseClick:w,onSuggestedQuestionClick:T,suggestedQuestions:y}},[m,w,T,y])}const Bo=H(function(e){const a=rn(e),t=cn(e),n=zt(e),{scrollPosition:o,...r}=n,s=$.getLocalizedStrings().reportTitleById.cash_in_cash_out,i=j.getSignedInUser(),d=e.tenantState.currentTenantId,f=L(e),g=f?.companyName??"",b={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:d??""},p=e.entityAutoCompleteState.autoCompleteText.navbar,c=X(e,"navbar");return{selectedRangeReport:a,reportLabels:{reportTitle:s},highlightedRangeReport:t,uiState:r,scrollPosition:o,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:g,statementEndPoint:`${J}/statement`,authParams:b},analytics:I,autoCompleteData:{autoCompleteText:p,entityAutoCompleteView:c}}},function(e,a){return{updateDownloadStateHandler:t=>{e(ln(t))},onTimeframeSelectionChanged:()=>{},onCOABalancesRangeChanged:(t,n)=>{e(Ie(t,n)),e(fe({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(ue("month")),e(te(a.firstMonthOfFY,t)),e(fe({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(ye(a.firstMonthOfFY,t,o,n)),n.length>0&&e(ve(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)},onElementCollapseStateChanged:(t,n)=>{e(fe({nodeCollapseState:{nodeId:t,isCollapsed:n}}))},onTableScroll:t=>{e(fe({scrollPosition:t}))},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(ee({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(Z("navbar"))},onAutoCompleteEntity:t=>{const n=ae(t,a.tenantEmailDomain),o=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{a.navigate("../")}}})(Te),Ro=e=>{const{tenantEmailDomain:a,location:t,navigate:n}=e,o=De({mobileExploreReferrer:"DashboardCashInCashOut"}),r=k(s=>zt(s)).mode==="compare_mode";return l.jsx(Bo,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:a,location:t,isCompareModeOn:r,navigate:n,insightsSectionAiCfoInfo:o})},jo=e=>{let a,t;switch(e.balanceTimeFrame){case"month":case"quarter":a=e.balanceTimeFrame,t=Me(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}},Lo=H(function(e){const a=dn(e),t=un(e),n=qt(e),{scrollPosition:o,...r}=n,s=$.getLocalizedStrings().reportTitleById.cash_position,i=j.getSignedInUser(),d=e.tenantState.currentTenantId,f=L(e),g=f?.companyName??"",b={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:d??""},p=e.entityAutoCompleteState.autoCompleteText.navbar,c=X(e,"navbar");return{selectedRangeReport:a,reportLabels:{reportTitle:s},highlightedRangeReport:t,uiState:r,scrollPosition:o,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:g,statementEndPoint:`${J}/statement`,authParams:b},analytics:I,autoCompleteData:{autoCompleteText:p,entityAutoCompleteView:c}}},function(e,a){return{updateDownloadStateHandler:t=>{e(mn(t))},onTimeframeSelectionChanged:t=>{e(ue(t)),setTimeout(()=>e(ge({resetLeftScroll:!0})),50)},onCOABalancesRangeChanged:(t,n)=>{e(Ie(t,n)),e(ge({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(te(a.firstMonthOfFY,t)),e(ge({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(ye(a.firstMonthOfFY,t,o,n)),n.length>0&&e(ve(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.isCompareModeOn!==t&&setTimeout(()=>e(ge({resetLeftScroll:!0})),50)},onAccountBalanceClick:(t,n)=>{const{timePeriod:o,timeframe:r}=jo(n),s=t.accountName===""?t.accountDescription:t.accountName;if(o!=null&&r!=null){const i=me(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),d=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:d,referrer:"Cash Position"}})}},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(ee({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(Z("navbar"))},onAutoCompleteEntity:t=>{const n=ae(t,a.tenantEmailDomain),o=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onTableScroll:t=>{e(ge({scrollPosition:t}))},onBackClick:()=>{a.navigate("../")}}})(Te),Mo=e=>{const{tenantEmailDomain:a,location:t,navigate:n}=e,o=De({mobileExploreReferrer:"DashboardCashPosition"}),r=k(s=>qt(s)).mode==="compare_mode";return l.jsx(Lo,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:a,location:t,isCompareModeOn:r,navigate:n,insightsSectionAiCfoInfo:o})},K=(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 Je(){return l.jsxs(at,{children:[l.jsx(D,{path:"/",element:l.jsx(Q,{})}),l.jsx(D,{path:"/:forecastId",element:l.jsx(Q,{})}),l.jsx(D,{path:"/:forecastId/*",element:l.jsx(ke,{})})]})}const Uo=e=>{let a,t;switch(e.balanceTimeFrame){case"month":case"quarter":a=e.balanceTimeFrame,t=Me(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}},Yo=H(function(e){const a=Zt(e),t=pn(e),n=hn(e),o=fn(e),r=it(e),{scrollPosition:s,...i}=r,d=t.reportTitle,f=j.getSignedInUser(),g=e.tenantState.currentTenantId,b=L(e),p=b?.companyName??"",c={userId:f?.userId??"",sessionId:f?.zeniSessionId??"",tenantId:g??""},u=e.entityAutoCompleteState.autoCompleteText.navbar,h=X(e,"navbar"),m=ct(b);return{selectedRangeReport:a,selectedClassesViewRangeReport:n,reportLabels:{reportTitle:d},highlightedRangeReport:t,highlightedClassesViewRangeReport:o,uiState:i,scrollPosition:s,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:p,statementEndPoint:`${J}/statement`,authParams:c},analytics:I,isZeniUser:Se(f),autoCompleteData:{autoCompleteText:u,entityAutoCompleteView:h},isZeniCOAUsed:m,isAccountingClassesEnabled:lt(e)}},function(e,a){return{updateDownloadStateHandler:t=>{e(Cn(t))},onTimeframeSelectionChanged:t=>{e(ue(t)),setTimeout(()=>e(oe({resetLeftScroll:!0})),50)},onCOABalancesRangeChanged:(t,n)=>{e(Ie(t,n)),e(oe({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(te(a.firstMonthOfFY,t)),e(oe({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(ye(a.firstMonthOfFY,t,o,n)),n.length>0&&(e(ve(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.forecastIdFromUrlPath!=null&&t==1&&K(!1,a.forecastIdFromUrlPath,"",a.navigate)),a.isCompareModeOn!==t&&setTimeout(()=>e(oe({resetLeftScroll:!0})),50)},onAccountBalanceClick:(t,n)=>{const{timePeriod:o,timeframe:r}=Uo(n);if(o!=null&&r!=null){const s=t.accountName===""?t.accountDescription:t.accountName,i=t.classesViewParentId!=null&&t.classesViewParentId.parentClassId!=null?bt(a.tenantEmailDomain,t.accountId,t.accountType,t.classesViewParentId.parentClassId?.[0],s,r,o):me(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),d=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:d,referrer:"Burn Rate"}})}},onElementCollapseStateChanged:(t,n)=>{e(oe({nodeCollapseState:{nodeId:t,isCollapsed:n}}))},onTableScroll:t=>{e(oe({scrollPosition:t}))},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(ee({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(Z("navbar"))},onAutoCompleteEntity:t=>{const n=ae(t,a.tenantEmailDomain),o=O(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(ce(a.firstMonthOfFY,t==="forecast_mode",t==="forecast_mode"?le:Ct,n)),t==="forecast_mode"?(e(Dt({viewMode:"account_group"})),e(Ht(!1,n?.id)),n!=null&&K(!0,a.forecastIdFromUrlPath,n?.id??"",a.navigate)):K(!1,a.forecastIdFromUrlPath,n?.id??"",a.navigate),e(oe({resetLeftScroll:!0}))},onUpdateAccountViewMode:t=>{a.analytics?.trackGroupBySwitch(t==="classes"?"Classes":"Accounts","Burn Rate"),e(Dt({viewMode:t}))},onUpdateClassesToFilterOut:t=>{e(bn({classesToFilterOut:t}))},onOpenAccountViewMode:()=>{e(gn())},onResyncReports:()=>{e(dt("net_burn_or_income_by_classes"))}}})(Te),Go=e=>{const a=V(),{tenantEmailDomain:t,location:n,navigate:o,forecastIdFromUrlPath:r}=e,s=De({mobileExploreReferrer:"DashboardNetBurnOrIncome"}),i=k(m=>it(m)),d=i.isForecastModeOn,f=i.timeframe,g=i.selectedForecast?.id,b=k(m=>ut(m.forecastState,g??"")),p=k(m=>Zt(m)),c=k(m=>mt(m)),u=i.mode==="compare_mode",h=p.dataAvailable;return _.useEffect(()=>{if(g!=null&&d===!0&&(K(d,r,g,o),b!=null)){const m=b?.forecastPeriod,C=h!=null&&m.endDate.isAfter(h?.endDate)===!0?h:m;a(te(e.firstMonthOfFY,{startDate:C.endDate.startOf(f),endDate:C?.endDate}))}},[g]),l.jsx(Yo,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:t,selectedForecastId:r,forecastIdFromUrlPath:r,location:n,isCompareModeOn:u,navigate:o,analytics:I,reportsResyncFetchState:c.reportsResyncFetchState,insightsSectionAiCfoInfo:s})},Ko=e=>{let a,t;switch(e.balanceTimeFrame){case"month":case"quarter":a=e.balanceTimeFrame,t=Me(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}},Vo=H(function(e){const a=Jt(e),t=_n(e),n=kn(e),o=Sn(e),r=pt(e),{scrollPosition:s,...i}=r,d=$.getLocalizedStrings().reportTitleById.operating_expenses,f=j.getSignedInUser(),g=e.tenantState.currentTenantId,b=L(e),p=b?.companyName??"",c={userId:f?.userId??"",sessionId:f?.zeniSessionId??"",tenantId:g??""},u=e.entityAutoCompleteState.autoCompleteText.navbar,h=X(e,"navbar"),m=ct(b);return{selectedRangeReport:a,selectedClassesViewRangeReport:n,reportLabels:{reportTitle:d},highlightedRangeReport:t,highlightedClassesViewRangeReport:o,uiState:i,scrollPosition:s,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:p,statementEndPoint:`${J}/statement`,authParams:c},analytics:I,isZeniUser:Se(f),autoCompleteData:{autoCompleteText:u,entityAutoCompleteView:h},isZeniCOAUsed:m,isAccountingClassesEnabled:lt(e)}},function(e,a){return{updateDownloadStateHandler:t=>{e(In(t))},onTimeframeSelectionChanged:t=>{e(ue(t)),setTimeout(()=>e(se({resetLeftScroll:!0})),50)},onCOABalancesRangeChanged:(t,n)=>{e(Ie(t,n)),e(se({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(te(a.firstMonthOfFY,t)),e(se({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(ye(a.firstMonthOfFY,t,o,n)),n.length>0&&(e(ve(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.forecastIdFromUrlPath!=null&&t==1&&K(!1,a.forecastIdFromUrlPath,"",a.navigate)),a.isCompareModeOn!==t&&setTimeout(()=>e(se({resetLeftScroll:!0})),50)},onAccountBalanceClick:a.hasTransactionAccess!==!0?void 0:(t,n)=>{const{timePeriod:o,timeframe:r}=Ko(n);if(o!=null&&r!=null){const s=t.accountName===""?t.accountDescription:t.accountName,i=t.classesViewParentId!=null&&t.classesViewParentId.parentClassId!=null?bt(a.tenantEmailDomain,t.accountId,t.accountType,t.classesViewParentId.parentClassId?.[0],s,r,o):me(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),d=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:d,referrer:"Operating Expenses"}})}},onElementCollapseStateChanged:(t,n)=>{e(se({nodeCollapseState:{nodeId:t,isCollapsed:n}}))},onTableScroll:t=>{e(se({scrollPosition:t}))},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(ee({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(Z("navbar"))},onAutoCompleteEntity:t=>{const n=ae(t,a.tenantEmailDomain),o=O(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(ce(a.firstMonthOfFY,t==="forecast_mode",t==="forecast_mode"?le:Ct,n)),t=="forecast_mode"?(e(Ot({viewMode:"account_group"})),e(Qt(!1,n?.id)),n!=null&&K(!0,a.forecastIdFromUrlPath,n?.id??"",a.navigate)):K(!1,a.forecastIdFromUrlPath,n?.id??"",a.navigate),e(se({resetLeftScroll:!0}))},onUpdateAccountViewMode:t=>{a.analytics?.trackGroupBySwitch(t==="classes"?"Classes":"Accounts","Operating Expenses"),e(Ot({viewMode:t}))},onUpdateClassesToFilterOut:t=>{e(vn({classesToFilterOut:t}))},onOpenAccountViewMode:()=>{e(yn())},onResyncReports:()=>{e(dt("operating_expenses_by_classes"))}}})(Te),No=e=>{const a=V(),{tenantEmailDomain:t,location:n,navigate:o,forecastIdFromUrlPath:r}=e,s=De({mobileExploreReferrer:"DashboardOpEx"}),i=k(S=>pt(S)),d=i.isForecastModeOn,f=i.timeframe,g=i.selectedForecast?.id,b=k(S=>ut(S.forecastState,g??"")),p=k(S=>Jt(S)),c=k(S=>mt(S)),u=i.mode==="compare_mode",h=p.dataAvailable;_.useEffect(()=>{if(g!=null&&d===!0&&(K(d,r,g,o),b!=null)){const S=b?.forecastPeriod,A=h!=null&&S.endDate.isAfter(h?.endDate)===!0?h:S;a(te(e.firstMonthOfFY,{startDate:A.endDate.startOf(f),endDate:A?.endDate}))}},[g]);const m=we(),C=m?.loggedInUserRole!=null&&Wt(m?.loggedInUserRole)!==!0;return l.jsx(Vo,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:t,selectedForecastId:r,location:n,isCompareModeOn:u,navigate:o,forecastIdFromUrlPath:r,analytics:I,hasTransactionAccess:C,reportsResyncFetchState:c.reportsResyncFetchState,insightsSectionAiCfoInfo:s})},$o=e=>{let a,t;switch(e.balanceTimeFrame){case"month":case"quarter":a=e.balanceTimeFrame,t=Me(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}},zo=H(function(e){const a=Xt(e),t=An(e),n=En(e),o=wn(e),r=ht(e),{scrollPosition:s,...i}=r,d=$.getLocalizedStrings().reportTitleById.revenue,f=j.getSignedInUser(),g=e.tenantState.currentTenantId,b=L(e),p=b?.companyName??"",c={userId:f?.userId??"",sessionId:f?.zeniSessionId??"",tenantId:g??""},u=e.entityAutoCompleteState.autoCompleteText.navbar,h=X(e,"navbar"),m=ct(b);return{selectedRangeReport:a,selectedClassesViewRangeReport:n,reportLabels:{reportTitle:d},highlightedRangeReport:t,highlightedClassesViewRangeReport:o,uiState:i,scrollPosition:s,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:p,statementEndPoint:`${J}/statement`,authParams:c},analytics:I,isZeniUser:Se(f),autoCompleteData:{autoCompleteText:u,entityAutoCompleteView:h},isZeniCOAUsed:m,isAccountingClassesEnabled:lt(e)}},function(e,a){return{updateDownloadStateHandler:t=>{e(Dn(t))},onTimeframeSelectionChanged:t=>{e(ue(t)),setTimeout(()=>e(re({resetLeftScroll:!0})),50)},onCOABalancesRangeChanged:(t,n)=>{e(Ie(t,n)),e(re({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(te(a.firstMonthOfFY,t)),e(re({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(ye(a.firstMonthOfFY,t,o,n)),n.length>0&&(e(ve(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.forecastIdFromUrlPath!=null&&t==1&&K(!1,a.forecastIdFromUrlPath,"",a.navigate)),a.isCompareModeOn!==t&&setTimeout(()=>e(re({resetLeftScroll:!0})),50)},onAccountBalanceClick:(t,n)=>{const{timePeriod:o,timeframe:r}=$o(n);if(o!=null&&r!=null){const s=t.accountName===""?t.accountDescription:t.accountName,i=t.classesViewParentId!=null&&t.classesViewParentId.parentClassId!=null?bt(a.tenantEmailDomain,t.accountId,t.accountType,t.classesViewParentId.parentClassId?.[0],s,r,o):me(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),d=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:d,referrer:"Revenues"}})}},onElementCollapseStateChanged:(t,n)=>{e(re({nodeCollapseState:{nodeId:t,isCollapsed:n}}))},onTableScroll:t=>{e(re({scrollPosition:t}))},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(ee({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(Z("navbar"))},onAutoCompleteEntity:t=>{const n=ae(t,a.tenantEmailDomain),o=O(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(ce(a.firstMonthOfFY,t==="forecast_mode",t==="forecast_mode"?le:Ct,n)),t==="forecast_mode"?(e(Ft({viewMode:"account_group"})),e(ea(!1,n?.id)),n!=null&&K(!0,a.forecastIdFromUrlPath,n?.id??"",a.navigate)):K(!1,a.forecastIdFromUrlPath,n?.id??"",a.navigate),e(re({resetLeftScroll:!0}))},onUpdateAccountViewMode:t=>{a.analytics?.trackGroupBySwitch(t==="classes"?"Classes":"Accounts","Revenues"),e(Ft({viewMode:t}))},onUpdateClassesToFilterOut:t=>{e(xn({classesToFilterOut:t}))},onOpenAccountViewMode:()=>{e(Tn())},onResyncReports:()=>{e(dt("revenue_by_classes"))}}})(Te),qo=e=>{const a=V(),{tenantEmailDomain:t,location:n,navigate:o,forecastIdFromUrlPath:r}=e,s=De({mobileExploreReferrer:"DashboardRevenue"}),i=k(h=>ht(h)),d=i.isForecastModeOn,f=i.timeframe,g=i.selectedForecast?.id,b=k(h=>ut(h.forecastState,g??"")),p=k(h=>Xt(h)).dataAvailable,c=i.mode==="compare_mode",u=k(h=>mt(h));return _.useEffect(()=>{if(g!=null&&d===!0&&(K(d,r,g,o),b!=null)){const h=b?.forecastPeriod,m=p!=null&&h.endDate.isAfter(p?.endDate)===!0?p:h;a(te(e.firstMonthOfFY,{startDate:m.endDate.startOf(f),endDate:m?.endDate}))}},[g]),l.jsx(zo,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:t,selectedForecastId:r,isCompareModeOn:c,location:n,navigate:o,forecastIdFromUrlPath:r,analytics:I,reportsResyncFetchState:u.reportsResyncFetchState,insightsSectionAiCfoInfo:s})},Zo=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}},Ho=H(function(e){const a=On(e),t=e.entityAutoCompleteState.autoCompleteText.navbar,n=X(e,"navbar");return{report:a,analytics:I,autoCompleteData:{autoCompleteText:t,entityAutoCompleteView:n}}},function(e,a){return{onTimeframeSelectionChanged:t=>{I.trackTimeframeSwitch(ha(t),"Top Expenses"),e(ta(t))},onAccountBalanceClick:(t,n)=>{const{timePeriod:o,timeframe:r}=Zo(n),s=t.accountName===""?t.accountDescription:t.accountName;if(o!=null&&r!=null){const i=me(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),d=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:d,referrer:"Top Expenses"}})}},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(ee({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(Z("navbar"))},onAutoCompleteEntity:t=>{const n=ae(t,a.tenantEmailDomain),o=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{a.navigate("../")}}})(uo),Jo=e=>{const{tenantEmailDomain:a,location:t,navigate:n}=e;return l.jsx(Ho,{tenantEmailDomain:a,location:t,navigate:n})},Qo=gt.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
|
-
`,le=3,Ct=1;function Wo({fetchState:e,firstMonthOfFY:a,reportId:t,forecastId:n}){const o=q(),r=z(),{tenantEmailDomain:s}=N();let i;xe({isDataReady:!0});const d={firstMonthOfFY:a,tenantEmailDomain:s,location:r,navigate:o,forecastIdFromUrlPath:n,fetchState:e};switch(t){case"operating_expenses":i=l.jsx(No,{...d});break;case"revenue":i=l.jsx(qo,{...d});break;case"net_burn_or_income":i=l.jsx(Go,{...d});break;case"cash_position":i=l.jsx(Mo,{...d});break;case"top_expenses":i=l.jsx(Jo,{...d});break;case"cash_in_cash_out":i=l.jsx(Ro,{...d});break;default:console.error(`${t} is not supported!`),i=null}return i!=null?l.jsx(Qo,{children:i}):null}function Q(){const e=z(),a=V(),{forecastId:t}=N();let n="Not-Started";const o=k(c=>pt(c).fetchState),r=k(c=>ht(c).fetchState),s=k(c=>it(c).fetchState),i=k(c=>c.cashPositionState.fetchState),d=k(c=>c.topExState.fetchState),f=k(c=>c.cashInCashOutState.fetchState);if(j.getSignedInUser()==null)throw Error("Can't access dashboard detail without signing in...");const g=k(c=>L(c)),b=g?.company?.companyInfo?.firstMonthOfFY??1,p=Gt((c=>{const u=Kt(c,"/").split("/");return t!=null?u[u.length-3]:u[u.length-1]})(e.pathname));switch(p){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=d;break;case"cash_in_cash_out":n=f;break;default:console.error(`${p} is not supported!`)}return _.useEffect(()=>{n==="Not-Started"&&function(c,u,h,m){switch(u){case"operating_expenses":c(ia(!0)),m!=null&&(c(ce(h,!0,le,{id:m,index:0})),c(Qt(!1,m)));break;case"revenue":c(ra(!0)),m!=null&&(c(ce(h,!0,le,{id:m,index:0})),c(ea(!1,m)));break;case"net_burn_or_income":c(sa(!0)),m!=null&&(c(ce(h,!0,le,{id:m,index:0})),c(Ht(!1,m)));break;case"cash_position":c(oa(!0));break;case"top_expenses":c(na());break;case"cash_in_cash_out":c(aa());break;default:throw new Error(`report type ${u} is not yet supported`)}}(a,p,b,t)},[t]),l.jsxs(l.Fragment,{children:[n==="Completed"?l.jsx(Ee,{analytics:I,onLoad:c=>((u,h)=>{const m=e.state?.referrer;switch(h){case"operating_expenses":u.trackPageLoaded(G.Event.operatingExpenses,m);break;case"revenue":u.trackPageLoaded(G.Event.revenues,m);break;case"net_burn_or_income":u.trackPageLoaded(G.Event.burnRate,m);break;case"cash_position":u.trackPageLoaded(G.Event.cashPosition,m);break;case"top_expenses":u.trackPageLoaded(G.Event.topExpenses,m);break;case"cash_in_cash_out":u.trackPageLoaded(G.Event.cashInCashOut,m);break;default:console.error(`Analytics: Not tracking Page Loaded for ${h}!`)}})(c,p)}):null,l.jsx(Wo,{firstMonthOfFY:b,fetchState:n,reportId:p,forecastId:t})]})}var Qe=typeof navigator<"u"&&navigator.userAgent.toLowerCase().indexOf("firefox")>0;function We(e,a,t,n){e.addEventListener?e.addEventListener(a,t,n):e.attachEvent&&e.attachEvent("on".concat(a),function(){t(window.event)})}function ba(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 Ca(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 _t={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,"-":Qe?173:189,"=":Qe?61:187,";":Qe?59:186,"'":222,"[":219,"]":221,"\\":220},W={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},st={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},R={16:!1,18:!1,17:!1,91:!1},F={},je=1;je<20;je++)_t["f".concat(je)]=111+je;var x=[],Bt=!1,_a="all",Rt=[],Ge=function(e){return _t[e.toLowerCase()]||W[e.toLowerCase()]||e.toUpperCase().charCodeAt(0)};function jt(e){_a=e||"all"}function _e(){return _a||"all"}var Xe=function(e){var a=e.key,t=e.scope,n=e.method,o=e.splitKey,r=o===void 0?"+":o;Ca(a).forEach(function(s){var i=s.split(r),d=i.length,f=i[d-1],g=f==="*"?"*":Ge(f);if(F[g]){t||(t=_e());var b=d>1?ba(W,i):[];F[g]=F[g].filter(function(p){return!((!n||p.method===n)&&p.scope===t&&function(c,u){for(var h=c.length>=u.length?c:u,m=c.length>=u.length?u:c,C=!0,S=0;S<h.length;S++)m.indexOf(h[S])===-1&&(C=!1);return C}(p.mods,b))})}})};function Lt(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,R)Object.prototype.hasOwnProperty.call(R,r)&&(!R[r]&&a.mods.indexOf(+r)>-1||R[r]&&a.mods.indexOf(+r)===-1)&&(o=!1);(a.mods.length!==0||R[16]||R[18]||R[17]||R[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 Mt(e,a){var t=F["*"],n=e.keyCode||e.which||e.charCode;if(U.filter.call(this,e)){if(n!==93&&n!==224||(n=91),x.indexOf(n)===-1&&n!==229&&x.push(n),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(u){var h=st[u];e[u]&&x.indexOf(h)===-1?x.push(h):!e[u]&&x.indexOf(h)>-1?x.splice(x.indexOf(h),1):u==="metaKey"&&e[u]&&x.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(x=x.slice(x.indexOf(h))))}),n in R){for(var o in R[n]=!0,W)W[o]===n&&(U[o]=!0);if(!t)return}for(var r in R)Object.prototype.hasOwnProperty.call(R,r)&&(R[r]=e[st[r]]);e.getModifierState&&(!e.altKey||e.ctrlKey)&&e.getModifierState("AltGraph")&&(x.indexOf(17)===-1&&x.push(17),x.indexOf(18)===-1&&x.push(18),R[17]=!0,R[18]=!0);var s=_e();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)&&Lt(e,t[i],s,a);if(n in F){for(var d=0;d<F[n].length;d++)if((e.type==="keydown"&&F[n][d].keydown||e.type==="keyup"&&F[n][d].keyup)&&F[n][d].key){for(var f=F[n][d],g=f.splitKey,b=f.key.split(g),p=[],c=0;c<b.length;c++)p.push(Ge(b[c]));p.sort().join("")===x.sort().join("")&&Lt(e,f,s,a)}}}}function U(e,a,t){x=[];var n=Ca(e),o=[],r="all",s=document,i=0,d=!1,f=!0,g="+",b=!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&&(d=a.keyup),a.keydown!==void 0&&(f=a.keydown),a.capture!==void 0&&(b=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=ba(W,e)),(e=(e=e[e.length-1])==="*"?"*":Ge(e))in F||(F[e]=[]),F[e].push({keyup:d,keydown:f,scope:r,mods:o,shortcut:n[i],method:t,key:n[i],splitKey:g,element:s});s!==void 0&&!function(p){return Rt.indexOf(p)>-1}(s)&&window&&(Rt.push(s),We(s,"keydown",function(p){Mt(p,s)},b),Bt||(Bt=!0,We(window,"focus",function(){x=[]},b)),We(s,"keyup",function(p){Mt(p,s),function(c){var u=c.keyCode||c.which||c.charCode,h=x.indexOf(u);if(h>=0&&x.splice(h,1),c.key&&c.key.toLowerCase()==="meta"&&x.splice(0,x.length),u!==93&&u!==224||(u=91),u in R)for(var m in R[u]=!1,W)W[m]===u&&(U[m]=!1)}(p)},b))}var et={setScope:jt,getScope:_e,deleteScope:function(e,a){var t,n;for(var o in e||(e=_e()),F)if(Object.prototype.hasOwnProperty.call(F,o))for(t=F[o],n=0;n<t.length;)t[n].scope===e?t.splice(n,1):n++;_e()===e&&jt(a||"all")},getPressedKeyCodes:function(){return x.slice(0)},isPressed:function(e){return typeof e=="string"&&(e=Ge(e)),x.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(F).forEach(function(t){var n=F[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(F).forEach(function(s){return delete F[s]});else if(Array.isArray(e))e.forEach(function(s){s.key&&Xe(s)});else if(typeof e=="object")e.key&&Xe(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=""),Xe({key:e,scope:o,method:r,splitKey:"+"})}},keyMap:_t,modifier:W,modifierMap:st};for(var tt in et)Object.prototype.hasOwnProperty.call(et,tt)&&(U[tt]=et[tt]);if(typeof window<"u"){var Xo=window.hotkeys;U.noConflict=function(e){return e&&window.hotkeys===U&&(window.hotkeys=Xo),U},window.hotkeys=U}U.filter=function(){return!0};var Ut=function(e,a){var t=e.target,n=t&&t.tagName;return!!(n&&a&&a.includes(n))};function es(e,a,t,n){t instanceof Array&&(n=t,t=void 0);var o=t||{},r=o.enableOnTags,s=o.filter,i=o.keyup,d=o.keydown,f=o.filterPreventDefault,g=f===void 0||f,b=o.enabled,p=b===void 0||b,c=o.enableOnContentEditable,u=c!==void 0&&c,h=_.useRef(null),m=_.useCallback(function(C,S){var A,P;return s&&!s(C)?!g:!!(Ut(C,["INPUT","TEXTAREA","SELECT"])&&!Ut(C,r)||(A=C.target)!=null&&A.isContentEditable&&!u)||!!(h.current===null||document.activeElement===h.current||(P=h.current)!=null&&P.contains(document.activeElement))&&(a(C,S),!0)},n?[h,r,s].concat(n):[h,r,s]);return _.useEffect(function(){if(p)return i&&d!==!0&&(t.keydown=!1),U(e,t||{},m),function(){return U.unbind(e,m)};U.unbind(e,m)},[m,e,p]),h}U.isPressed;const ts=["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"],as=(e,a,t,n,o)=>({card:{dimension:ft(t),cardType:n,cardIndex:o,fetchState:a,disableAnimations:!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}),be=(e,a,t,n,o)=>({card:{dimension:ft(t),cardType:n,cardIndex:o,fetchState:a,disableAnimations:!1},data:e}),ns=(e,a,t,n)=>be(void 0,e,Ce,a,t),os=(e,a,t,n,o)=>({card:{dimension:ft(Ce),cardType:a,cardIndex:t,fetchState:e,disableAnimations:!1},data:{funds:n,hasUserSeenVideo:o,videoUrl:"https://www.youtube.com/watch?v=sqvJWKCMZgk"}}),ss=H(function(e,a){const t=cs(a.dashboardReport),n=a.passedCardsOrdered,o=a.dashboardReport.reportsInOrder,{isInterestedInChargeCard:r,cardsCreditLimit:s,cashbackRate:i,treasuryFundDetails:d,hasUserSeenTreasuryVideo:f,treasuryFetchState:g}=a;let b=n.map((p,c)=>{if(p==="reimbursement_promo_card"||p==="bill_pay_promo_card")return ns(t,p,c);if(p==="zeni_promo_card")return be({isExpressedInterest:r,creditLimit:s,cashbackRate:i,fetchState:"Completed"},a.cardBalanceFetchState,Ce,p,c);if(p==="treasury_promo_card")return os(g,p,c,d,f);if(p==="information_card")return be(void 0,"Completed",Ce,p,c);{const u=o.find(h=>h?.reportId===p);return u?function(h,m,C,S){const A=h.reportId;switch(A){case"card_balance":case"cash_balance":return[as(h,m,C,A,S)];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[be(h,m,C,A,S)];case"net_burn_or_income_story_card":return[be(h,m,C,"net_burn_or_income_story_card",S)];default:return console.error(`card type ${A} not yet supported!`),[]}}(u,u.fetchState,Ce,c):[]}}).flat();return a.isSummaryCardsFiltered===!0&&(b=b.filter(p=>ts.includes(p.card.cardType)==0).filter(p=>{const c=p.data?.availableNumberOfPeriods;return c!=null?c>0:p.card.cardType!="top_expenses"||p.data==null||function(u){if(u==null||u.length===0)return!0;let h=!0;for(const m of u)if(m.balance.available.amount!==0){h=!1;break}return h}(p.data.topExpenses.accountsOrdered)===!1})),{cardDataArray:b,autoCompleteData:{autoCompleteText:e.entityAutoCompleteState.autoCompleteText.navbar,entityAutoCompleteView:X(e,"navbar")},analytics:I,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)I.trackDashboardCardClicked("cards promo",2),I.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&&I.trackDashboardCardClicked("rewards promo",o+1),a.navigate("../../rewards/refer",{state:{referrer:s}})):r==="expense_automation_card"?(I.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,d,f,g){switch(d){case"card_balance":i($t());break;case"cash_balance":i(Vt());break;case"operating_expenses":i(ia(!0));break;case"revenue":i(ra(!0));break;case"net_burn_or_income":i(sa(!0));break;case"net_burn_or_income_story_card":i(Jn(!0));break;case"cash_position":i(oa(!0));break;case"top_expenses":i(na());break;case"cash_in_cash_out":i(aa());break;case"insights_dashboard":i(Hn());break;case"bill_pay_card":i(Zn());break;case"reimbursement_card":i(qn());break;case"company_details":i(zn(f));break;case"task_card":i($n());break;case"accounts_payable_aging":g.includes("accounts_payable_aging")===!1&&i(nt(de()));break;case"accounts_receivable_aging":i(ot(de()));break;case"zeni_accounts_promo_card":g.includes("zeni_accounts_promo_card")===!1&&i(Nt());break;case"rewards_card":g.includes("rewards_card")===!1&&i(Nn(!0));break;default:throw new Error(`report type ${d} is not yet supported`)}}(e,r,a.companyId,s)},onTimeframeChange:(o,r)=>{I.trackTimeframeSwitch(ha(r),is(o),"Dashboard"),function(s,i,d){switch(i){case"operating_expenses":case"revenue":case"net_burn_or_income":case"cash_position":s(ue(d));break;case"top_expenses":s(ta(d));break;default:throw new Error(`report type ${i} doesn't support changeTimeframe`)}}(e,o,r)},onUpdateSelectedInsightIndex:o=>{e(Vn(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=O(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=O(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=O(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=O(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"&&(I.trackUpdateBurnRateCalculatorSettings(r,s,Gn(s)),e(Kn(t,r,s)))},onVideoPlay:()=>{e(Yn())},onVideoClose:()=>{e(Un())}},autoCompleteActions:{onAutoCompleteInputChange:o=>{o.trim().length>=2?e(ee({searchString:o,searchOrigin:"navbar"})):o.trim().length===0&&e(Z("navbar"))},onCancelAutoComplete:()=>{e(Z("navbar"))},onAutoCompleteEntity:o=>{let r="";r=o.type!=="vendor"||o.detailType!=="bank_merchant"&&o.detailType!=="card_merchant"?ae(o,a.tenantEmailDomain):go(o.zeniId,o.qboId,a.tenantEmailDomain);const s=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(r,{state:{pathnameStackToGoBack:s,referrer:"Search"}})}}}})(fo);function rs(){const{isAiCfoOpen:e,setIsAiCfoOpen:a}=Ae(),t=q(),n=V(),o=z(),r=j.getSignedInUser(),{useFeatureGate:s,useDynamicConfig:i}=Ue(),d=Se(r),[f,g]=_.useState(!1),[b,p]=_.useState(!1),c=da(),{tenantEmailDomain:u}=N(),{isAiCfoAccessEnabled:h,onAskAiCfoClick:m}=Ye({isAiCfoOpen:e,setIsAiCfoOpen:a,mobileExploreReferrer:"Dashboard"}),C=k(v=>v.tenantState.fetchState==="Completed"||v.tenantState.activeTenantFetchState.fetchState==="Completed"?L(v):void 0),S=C??j.getSignedInUserTenant(u),A=S.tenantId,P=S.companyId;_.useEffect(()=>{f===!1&&o.state?.message==="activation"&&(n(Fn(P)),g(!0))},[o.state,f,P,n]),_.useEffect(()=>{c&&!b&&o.state?.message==="open_ai_cfo_drawer"&&(a(!0),p(!0),t(o.pathname,{replace:!0,state:{...o.state,message:void 0}}))},[o.state,b,c,a,t,o.pathname]);const{isFeatureEnabled:E}=s(M.isApAgingFeatureEnabled),{isFeatureEnabled:y}=s(M.isExpenseAutomationEnabled),{isFeatureEnabled:T}=s(M.isExpenseAutomationEnabledV2),w=T||y&&d,{isFeatureEnabled:B}=s(M.isTreasuryEnabled),pe=mo(w),{isFeatureEnabled:he}=s(M.isArAgingFeatureEnabled),{isFeatureEnabled:Oe}=s(M.isDepositAccountsFeatureEnabled),{isFeatureEnabled:kt}=s(M.isReferralFeatureEnabled),{isFeatureEnabled:ka}=s(M.isChargeCardFeatureEnabled),{isFeatureEnabled:Sa}=s(M.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:ya}=s(M.isDashboardSidebarNewYearAnimationEnabled),{configValue:St}=i(ua.zeniCardsConfig),va=St.charge_card_cashback_rate_per_transaction==null?.0175:St.charge_card_cashback_rate_per_transaction;if(o.state?.message==="activation"){const v=po(o.state?.pathnameStackToGoBack);t(o.pathname,{state:{...o.state,message:void 0,pathnameStackToGoBack:v.newStack}})}const[yt,Ia]=_.useState(!1),[Ke,Aa]=_.useState(!1);es("command+p, Control+p",v=>{Aa(!Ke),v.preventDefault()},{enableOnContentEditable:!0,enableOnTags:["INPUT","SELECT","TEXTAREA"]},[Ke]);const vt=C?.externalConnections?.accounting[0]?.isValid;if(r==null)throw Error("Can't access dashboard without signing in...");const ne=k(v=>L(v)?.excludedResources),Ea=k(v=>v.expenseAutomationViewState.selectedPeriodByTenantId),wa=!!C?.companyReimbursementInfo?.info?.isReimbursementEnabled,Ta=!!C?.companyBillPayInfo?.info?.isBillPayEnabled,xa=k(v=>v.treasurySetupViewState.treasuryFundsDetails).fetchStatus.fetchState,Da=C?.company!=null&&Pn(C.company),Ve=B&&Da,Ne=we(),Oa=rt(Ne?.loggedInUserRoleMap),Y=[],It=ne?.resources?.find(v=>v.resource==="/reports/top_expenses")==null,Fa=ne?.resources?.find(v=>v.resource==="/reports/task_card")==null,$e=C?.userRole!=null&&Wt(C?.userRole),Pa=ne?.resources?.find(v=>v.resource==="/bills")==null&&!$e,Ba=ne?.resources?.find(v=>v.resource==="/reimbursements")==null,Ra=Bn(Ne?.loggedInUserRoleMap),ja=Rn(Ne?.loggedInUserRoleMap),La=C?.company?.companyChargeCardInfo?.chargeCardsCreditAccountLimit??0,Ma=C?.companyChargeCardInfo?.info?.isCompanyInterestedInChargeCard??!1,Ua=k(v=>v.treasurySetupViewState.treasuryFundsDetails).fundsDetails;It===!1&&Y.push("top_expenses"),Fa===!1&&Y.push("task_card"),Pa===!1&&Y.push("bill_pay_card","bill_pay_promo_card"),E===!1&&Y.push("accounts_payable_aging"),he===!1&&Y.push("accounts_receivable_aging"),(w===!1||$e)&&Y.push("expense_automation_card"),Ba===!1&&Y.push("reimbursement_card","reimbursement_promo_card"),Oe===!1&&Y.push("zeni_accounts_promo_card"),kt===!1&&Y.push("rewards_card"),Ve===!1&&Y.push("treasury_promo_card");const{areTenantIdsInSync:At}=ho();_.useLayoutEffect(()=>{yt&&pe===w||vt!==!0||!At||ne?.fetchState!=="Completed"&&ne?.fetchState!=="Error"||(Ia(!0),n(jn(r.userId,P,A,!0,!1,Y)))},[yt,r,A,n,It,vt,ne?.fetchState,At]);const Ya=k(v=>v.reportUIOptionsState.forecastOnDashboard.isForecastModeOn),Ga=k(v=>v.revenueState.uiState.selectedForecast?.id),Ka=k(v=>v.cardBalanceState.fetchState),ie=k(v=>Ln(v,Y,r,T,y,Ve)),Va=ie.fetchState;xe({isDataReady:!0});const Et=C?.isTreasuryVideoViewed===!0||ie.isTreasuryVideoClosed===!0;return l.jsxs(l.Fragment,{children:[Va==="Completed"?l.jsx(Ee,{analytics:I,onLoad:v=>{v.trackPageLoaded(G.Event.dashboard),Ve&&!Et&&v.trackTreasuryPromoView("Dashboard Promo Video")}}):null,l.jsx(ss,{maxColumns:e?2:void 0,isAiCfoAccessEnabled:h,onAskAiCfoClick:m,onDragAndDropCard:(v,Na)=>{const wt=function(Fe,ze,Pe){const qe=Pe.indexOf(Fe),Ze=Pe.indexOf(ze);if(qe===-1||Ze===-1||qe===Ze)return Pe;const He=[...Pe];return He.splice(qe,1),He.splice(Ze,0,Fe),He}(v,Na,ie.cardsOrdered);wt.some((Fe,ze)=>Fe!==ie.cardsOrdered[ze])&&n(Mn(wt))},dashboardReport:ie,passedCardsOrdered:ie.cardsForDashboardUI,tenantId:A,companyId:P,tenantEmailDomain:u,location:o,navigate:t,isApAgingFeatureEnabled:E,isArAgingFeatureEnabled:he,isBillPayEnabled:Ta,isReimbursementEnabled:wa,isSummaryCardsFiltered:Ke,isForecastOn:Ya,selectedForecastOnDashboard:Ga,isVisitingFirstTime:f,isZeniAccountEnabled:Oe,isRewardsFeatureEnabled:kt,hasZeniAccountsAdminAccess:Oa,isExpenseAutomationEnabledForUser:w&&$e===!1,selectedPeriod:Ea[A],isChargeCardFeatureEnabled:ka,isUserHasCardsAccess:Ra,isUserHasTreasuryAccess:ja,cardsCreditLimit:La,cashbackRate:va,isInterestedInChargeCard:Ma,cardBalanceFetchState:Ka,christmasAnimationEnabled:Sa,newYearAnimationEnabled:ya,treasuryFundDetails:Ua,hasUserSeenTreasuryVideo:Et,treasuryFetchState:xa})]})}const is=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"},cs=e=>e.fetchState!=="Error"?e.fetchState:e.reportsInOrder.map(a=>a.fetchState).reduce((a,t)=>a==="In-Progress"||a==="Not-Started"?a:t);function js(){const e=we(),a=e?.excludedResources?.find(f=>f.resource==="/reports/top_expenses")==null,{useFeatureGate:t}=Ue(),{isFeatureEnabled:n}=t(M.isApAgingFeatureEnabled),{isFeatureEnabled:o}=t(M.isArAgingFeatureEnabled),r=k(f=>L(f)),{isFeatureEnabled:s}=t(M.isDebitCardFeatureEnabled),i=Qn(s,r),d=Wn(r);return i===!0||d===!0?l.jsx(at,{children:l.jsx(D,{path:"/*",element:l.jsx(_o,{})})}):l.jsxs(at,{children:[l.jsx(D,{path:"/",element:l.jsx(rs,{})}),l.jsx(D,{path:"cash_balance/*",element:l.jsx(Pt,{})}),l.jsx(D,{path:"card_balance/*",element:l.jsx(Pt,{})}),l.jsx(D,{path:"operating_expenses/*",element:l.jsx(Q,{})}),l.jsx(D,{path:"operating_expenses/forecast/*",element:l.jsx(Je,{})}),l.jsx(D,{path:"revenue/forecast/*",element:l.jsx(Je,{})}),l.jsx(D,{path:"revenue/*",element:l.jsx(Q,{})}),l.jsx(D,{path:"net_burn_or_income/forecast/*",element:l.jsx(Je,{})}),l.jsx(D,{path:"net_burn_or_income/*",element:l.jsx(Q,{})}),n===!0&&l.jsxs(l.Fragment,{children:[l.jsx(D,{path:"accounts_payable_aging/*",element:l.jsx(yo,{})}),l.jsx(D,{path:"accounts_payable_aging/:vendorId/:reportDate/*",element:l.jsx(So,{})})]}),o&&l.jsxs(l.Fragment,{children:[l.jsx(D,{path:"accounts_receivable_aging/:customerId/:reportDate/*",element:l.jsx(vo,{})}),l.jsx(D,{path:"accounts_receivable_aging/*",element:l.jsx(Io,{})})]}),l.jsx(D,{path:"cash_position/*",element:l.jsx(Q,{})}),l.jsx(D,{path:"top_expenses/*",element:a===!0?l.jsx(Q,{}):l.jsx(ke,{})}),l.jsx(D,{path:"cash_in_cash_out/*",element:l.jsx(Q,{})}),l.jsx(D,{path:"company_details",element:l.jsx(Co,{})}),l.jsx(D,{path:"referrals/*",element:l.jsx(ko,{})}),l.jsx(D,{path:"*",element:l.jsx(ke,{})})]})}export{js as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as c}from"./liveblocks-ypyKWtbM.js";import{K as i,x as l,h as f}from"./index-CFuLUFh-.js";import{D as p}from"./mui-D35VurIR.js";import"./sentry-ylIvhyeZ.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]="ac3cd80c-c0a4-4551-a1dd-e5e1514da4c3",e._sentryDebugIdIdentifier="sentry-dbid-ac3cd80c-c0a4-4551-a1dd-e5e1514da4c3")}catch{}})();const u={drawerLeftMargin:new l(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:n,onClose:t}=e,a=i(),d=o?.valuePx(a)??u.drawerLeftMargin.valuePx(a),s=f();return c.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${d})`}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.8,cursor:"pointer"}}},onClose:t,children:n})}export{h as D};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-ypyKWtbM.js";import{a as c}from"./sentry-ylIvhyeZ.js";import{T as d,V as l,X as p,p as f}from"./index-CFuLUFh-.js";import"./mui-D35VurIR.js";import m from"./NotFoundScreen-Jfnu8ThU.js";import{j as u,u as b}from"./core-CBFn_Yo_.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]="5cee3308-8eb6-466c-bc46-f1c1ec94dc28",e._sentryDebugIdIdentifier="sentry-dbid-5cee3308-8eb6-466c-bc46-f1c1ec94dc28")}catch{}})();const D=()=>{const e=u(),t=b(),o=c.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),r=c.useCallback(()=>{(()=>{const n=f(t.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),a=d(t.pathname);return a!=null?s.jsx(l,{menuItem:p(a),onDemoClick:o,onGoBack:r}):s.jsx(m,{})},k=(e=2)=>{let t="../";for(let o=0;o<e;o++)t=`${t}../`;return t};export{D as F};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-ypyKWtbM.js";import{a as u}from"./sentry-ylIvhyeZ.js";import{h as U,u as _,j as w,q as M,g as l,N as T}from"./core-CBFn_Yo_.js";import{z as r,h as P,O as V,e as A,c as N,f as q,q as R,$,g as W}from"./index-CFuLUFh-.js";import{eM as B,Id as G,Io as H,Ie as J,eN as K,fh as Q,Ik as X,fF as Y,cR as Z,Ip as ee,Iq as te}from"./zeni-epic-state-DQMIbKEE.js";import{n as ne}from"./mui-D35VurIR.js";import{u as se}from"./useDeviceId-BJs7B5gi.js";import{f as ae}from"./analyticsHelper-kqcVp_6n.js";import{t as ie}from"./getLocaleForTenant-Blze7OAY.js";import"./recharts-CSEhqlTE.js";import"./analytics-B3Q4UmLh.js";import"./plaid-O0aD-5ib.js";import"./dnd-1A4kYEBz.js";import"./stripe-DMRn4zHo.js";import"./lottie-xwOlCP2t.js";import"./lexical-Blenvqjv.js";import"./pdf-B5d6xxqf.js";import"./utils-0qzBiEB0.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]="1dc745f2-df13-490a-91ff-d35b77ca517a",t._sentryDebugIdIdentifier="sentry-dbid-1dc745f2-df13-490a-91ff-d35b77ca517a")}catch{}})();const x=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function xe(){const t=U(),a=_(),m=w(),[y]=M(),n=y.get("token"),p=y.get("stytch_token_type"),g=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:z,magicLinkEmail:c,verifyDeviceFetchState:C,resendVerifyDeviceOTPFetchState:D}=l(e=>e.tenantState),I=l(e=>e.tenantState.fetchState),b=l(e=>e.tenantState.activeTenantFetchState.fetchState),S=l(e=>e.tenantState.signInState),h=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>B(e)),k=l(e=>G(e)),E=r.getSignedInUser(),v=P().mode;u.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&x(n,p)&&i!=null&&g!=null&&(r.saveMagicLinkTriggered(n),t(H(n,i,g)))},[n,p,t,i,g,s?.zeniSessionId]),u.useEffect(()=>{S!=="In-Progress"||I!=="Completed"&&b!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(J(k.tenantsInOrder),s.zeniSessionId),K(s.userId,s.zeniSessionId,o.tenantId),t(Q(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(X("Completed")),V.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,k.tenantsInOrder),Y().then(()=>{const e=W();e!=null&&A(e)}),setTimeout(()=>{N.trackLogin(q.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[S,I,b,s,o,k,v,a.state,t]);const F=u.useCallback(()=>{m("/signin/auth")},[m]),O=u.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),j=u.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 f.jsx(R,{phoneNumber:z,verifyOtpFetchState:C.fetchState,resendVerifyDeviceOTPFetchState:D,onResendOtp:O,onVerifyOtp:j,onCancelVerifyDevice:F});if(S==="In-Progress"&&I==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return f.jsx(T,{to:e,state:{...a.state,origin:""}})}if(!x(n,p)||g==null||h==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return f.jsx(T,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&s?.zeniSessionId==null)}})}return f.jsx(oe,{"data-testid":"smooth-loader",children:f.jsx($,{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-ypyKWtbM.js";import{a as c}from"./sentry-ylIvhyeZ.js";import{h as be,g as t,l as Ze,u as qe,j as Je,i as R}from"./core-CBFn_Yo_.js";import{eM as he,eT as Ke,eU as Se,eO as Qe,bm as Xe,f2 as ea,eV as aa,eW as ta,eY as na,f0 as sa,fa as oa,f1 as g,f4 as ia,f5 as ue,f8 as ra,f6 as da,f7 as la,f9 as ca,cF as ua,fc as ma,cL as fa,bu as pa,eL as ba,fh as ha,fi as Sa,fg as ga}from"./zeni-epic-state-DQMIbKEE.js";import{a1 as Ea,a2 as ka,I as Ca,r as ya,z as k,a3 as Ia,u as Ta,d as r,a4 as wa,a5 as Aa,A as Fa,a as _a,a6 as Da,T as va,a7 as $a,a8 as Ba,a9 as me,aa as fe,L as Ma,ab as Pa,ac as pe,c as x,m as A,ad as N,ae as Ra}from"./index-CFuLUFh-.js";import{D as xa}from"./mui-D35VurIR.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]="1d1e2a24-f4d9-4aea-9a38-0566d5182694",m._sentryDebugIdIdentifier="sentry-dbid-1d1e2a24-f4d9-4aea-9a38-0566d5182694")}catch{}})();const Na=Ea(({isAppContentDrawerOpen:m,handleDrawerToggle:d})=>{const{tenantEmailDomain:n}=Ze(),a=qe(),C=Ca(),o=Je(),V=Qe(),f=be(),{useFeatureGate:i}=ya(),G=k.getSignedInUser(),F=Xe(G),s=t(e=>he(e)),L=t(e=>ea(e)),O=L.uiState.currentChatSessionId,y=Ia(),{setLoading:ge}=Ta(),[_,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:Ee}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:H}=i(r.isDebitCardFeatureEnabled),ke=wa(s,Ee,H),{isFeatureEnabled:Ce}=i(r.isSettingsFeatureEnabled),W=t(e=>aa(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),v=t(e=>ta(e));c.useEffect(()=>{y&&T&&!I&&v.fetchState==="Not-Started"&&f(na(!0))},[y,T,v.fetchState,I]);const h=k.getSignedInUser(),$=t(e=>e.tenantState),ye=t(e=>$.fetchState==="Completed"?sa(e):[]),E=t(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:Ie}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Te}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:Z}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:q}=i(r.isExpenseAutomationEnabledV2),J=q||Z&&F,{isFeatureEnabled:we}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:Ae}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:_e}=i(r.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:De}=i(r.isTreasuryEnabled),{isFeatureEnabled:ve}=i(r.isTaskManagerCustomerUserAccessEnabled),$e=F||!F&&ve,Be=s.company!=null&&oa(s.company),w=De&&Be,Me=t(e=>g(e).totalUnreadCount),Pe=t(e=>g(e).reducedFetchCountState),K=t(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),Q=t(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Re=t(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),B=t(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:X,isLoading:ee,isFetchingMore:ae,hasFetchedAll:te,fetchMore:xe}=Aa();c.useEffect(()=>{const e=setTimeout(()=>xe?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(ee===!1&&ae===!1&&te===!0)if(s?.companyId!=null&&X!=null){const e=`dashboard_${s.companyId}`;j(X.filter(u=>u.roomId===e&&u.readAt==null).length)}else j(0)},[ee,ae,te]),c.useEffect(()=>{y&&!I&&Re.fetchState==="Not-Started"&&V.tenantId!=null&&f(ia("task_manager","dashboard"))},[y,V.tenantId]),c.useEffect(()=>{I||B.fetchState!=="Not-Started"||f(ue({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{_!=null&&B.fetchState==="In-Progress"&&(f(ue({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),f(Se({unreadCount:_},"comments")))},[_,B.fetchState]);const Ne={fetchStatus:Pe,count:Me},ne=n!=null?k.getSignedInUserTenant(n):null,se=t(e=>ne?.tenantId!=null?ra(e,ne.tenantId):void 0),S=[];Ie===!1&&S.push("accounts_payable_aging"),Te===!1&&S.push("accounts_receivable_aging"),Y===!1&&S.push("zeni_accounts_promo_card"),T===!1&&S.push("rewards_card"),J===!1&&S.push("expense_automation_card");const Ue=Fa(),oe=t(e=>da(e,S,h,q,Z,w).fetchState),ie=t(e=>la(e).fetchState),Ve=D&&(oe==="Completed"||oe==="Error")||z&&(ie==="Completed"||ie==="Error")||!D&&!z?void 0:"disabled",Ge=c.useMemo(()=>ca(s.userRole),[s.userRole]),Le=ua(Ge),Oe=s?.rewardsLastViewedTime==null,je=h?.userEmail!=null&&W.fetchState==="Completed"&&ma(W.notificationSettings,h.userEmail,H,s),re=_a(),ze=re&&Da(a),de=fa(Ue?.loggedInUserRoleMap),le=s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,M=c.useCallback(()=>w&&de&&!k.getTreasuryPopupSeen(n??"")&&le===!1&&va(a.pathname)!=="treasury",[w,de,le,a.pathname,n]),[Ye,ce]=c.useState(M);c.useEffect(()=>{ce(M())},[M]);const He=t(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,We=$a(He);return U.jsx(xa,{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(Ba,{signedInUser:G,currentTenantId:$.currentTenantId??"",tenants:$.fetchState==="Completed"?ye:se!=null?[se]:[],currentTenant:s,isTenantDropdownDisabled:Ve,isSettings:fe(a),isSettingsFeatureEnabled:Ce,isVendorsTabVisible:Le,isZeniAccountEnabled:Y,isChargeCardEnabled:ke,isTreasuryEnabled:w,treasuryYieldPercentage:We,isTreasuryPopupVisible:Ye,isNotificationsTabVisible:je,notificationCountDetails:Ne,isExpenseAutomationEnabledForUser:J&&pa(s.userRole)===!1,selectedMenu:me(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Oe,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:re,onNotificationIconClick:()=>{d(!1);let e=K===0&&Q>0?"notifications/comments":"notifications/tasks";fe(a)&&(e=K===0&&Q>0?"../../notifications/comments":"../../notifications/tasks");const u=A(a.state?.pathnameStackToGoBack,a.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=A(a.state?.pathnameStackToGoBack,a.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),e.type==="ai_cfo"){const b=A(a.state?.pathnameStackToGoBack,a.pathname);return x.trackAICFOChatScreenStateChanged("viewed","left_menu",O??null,null),void o(`/${n}/ai-cfo/explore`,{state:{pathnameStackToGoBack:b,referrer:"Sidebar"}})}const u=A(a.state?.pathnameStackToGoBack,a.pathname),l=e.type,p=N(l)&&l!=="command_center";if(N(e.type)&&E[s.tenantId]!=null&&x.trackMonthEndCloseClicked(E[s.tenantId].month,E[s.tenantId].year,"Sidebar"),p&&E[s.tenantId]!=null){const b=E[s.tenantId];return void o(`/${n}/month_end_close_checks/review/${e.type}/${b.month}-${b.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const P=Ra(e.type);pe(e.type)?(O!=null&&f(ga()),o(`/${n}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${n}/${P}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${n}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${n}/rewards`)},handleBackClick:()=>{o(`/${n}/dashboard`)},handleTenantSelect:e=>{ge(Ma.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=me(a);let p=`/${encodeURIComponent(u)}/`;const P=N(l);l==="home"?p+="dashboard":l==="users_and_roles"?p+="people":Pa(l)?p+="settings/my_profile":pe(l)?p+=`ai-cfo/${l}`:p+=l==="task_checklist"?"tasks":P?"month_end_close_checks/review":encodeURIComponent(l),o(p,{replace:!0}),h!=null&&(f(ha(e.tenantId)),f(Sa(h.userId,e.tenantId,h.zeniSessionId)));const b=e;x.trackCompanySwitch(b.companyId,b.companyName,b.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(n??"",!0),ce(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:ze,aiCfoView:L,isOnDashboard:D,updateCurrentChatSessionId:e=>{f(ba({sessionId:e,agentId:"controller"})),o(`/${n}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:we,isTaskManagerAccessEnabled:$e,thanksGivingAnimationEnabled:Ae,christmasAnimationEnabled:Fe,newYearAnimationEnabled:_e})})}),za=m=>{const d=be(),n=t(C=>he(C)),a={events:n.userRoleId!=null?[`private-${n.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{ka(o)&&Ke(o.mode)==="dashboard"&&d(Se({unreadCount:o.data.unread},"tasks"))}};return U.jsx(Na,{...m,...a})};export{za as M};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-ypyKWtbM.js";import{j as e,k as i}from"./core-CBFn_Yo_.js";import{R as n}from"./index-CFuLUFh-.js";import"./mui-D35VurIR.js";import"./sentry-ylIvhyeZ.js";import"./zeni-epic-state-DQMIbKEE.js";import"./recharts-CSEhqlTE.js";import"./analytics-B3Q4UmLh.js";import"./plaid-O0aD-5ib.js";import"./dnd-1A4kYEBz.js";import"./stripe-DMRn4zHo.js";import"./lottie-xwOlCP2t.js";import"./lexical-Blenvqjv.js";import"./pdf-B5d6xxqf.js";import"./utils-0qzBiEB0.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]="b01df3c4-110c-4040-bc67-78b2276eb150",o._sentryDebugIdIdentifier="sentry-dbid-b01df3c4-110c-4040-bc67-78b2276eb150")}catch{}})();const s=i(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(n);function h(){const o=e();return r.jsx(s,{navigate:o})}export{h as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-ypyKWtbM.js";import{j as z,h as K,u as Z,l as H,g as d,k as X,n as ee,o as C}from"./core-CBFn_Yo_.js";import{eM as M,qa as U,pK as ae,J4 as w,pF as S,bu as te,bm as se,bQ as oe,pG as re,J5 as ne,IR as A,dA as ie,tx as ce,J6 as le,tU as de,eS as me,eQ as fe}from"./zeni-epic-state-DQMIbKEE.js";import{F as pe,z as ue,G as he,A as Fe,r as $,d as G,w as ge,c as q,aj as Ie,m as be}from"./index-CFuLUFh-.js";import"./mui-D35VurIR.js";import Ce from"./NotFoundScreen-Jfnu8ThU.js";import{F as Ae}from"./FeaturePreviewScreen-Bq3A0Rct.js";import{a as h}from"./sentry-ylIvhyeZ.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-DxZBiCyD.js";import{c as Te}from"./useFetchSuggestedQuestionsWhenReady-BwCliZLq.js";import{u as ye}from"./useInitialThreadRequest-B3znvGYl.js";import{t as xe}from"./routePaths-gXs1nhS8.js";import{M as ke}from"./MobileAppDrawer-BXp_ujQw.js";import"./recharts-CSEhqlTE.js";import"./analytics-B3Q4UmLh.js";import"./plaid-O0aD-5ib.js";import"./dnd-1A4kYEBz.js";import"./stripe-DMRn4zHo.js";import"./lottie-xwOlCP2t.js";import"./lexical-Blenvqjv.js";import"./pdf-B5d6xxqf.js";import"./utils-0qzBiEB0.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new s.Error().stack;a&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[a]="e465d88e-9fde-4233-9671-178ef0e9ea46",s._sentryDebugIdIdentifier="sentry-dbid-e465d88e-9fde-4233-9671-178ef0e9ea46")}catch{}})();const T=(s,a,e,o)=>{if(s!=a){const r=o??"";s!=null&&s.length>0?e(`../${a}${r}`,{replace:!0}):e(`${a}${r}`,{replace:!0})}},De=X(function(s){const a=ne(s),e={},o=a.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(r=>{e[r]=o[r]===!1}),{selectedTimeframe:a.selectedTimeframe,isForecastVsActualOn:a.isForecastVsActualOn,compareMode:a.compareMode,forecastList:a.forecastList,selectedForecast:a.selectedForecast,pandLreport:a.pandLReportWithForecast,scrollPosition:a.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:e,type:"name+balances_forecast",analytics:q}},function(s,a){return{onForecastSelectionChanged:(e,o)=>{s(w(e,o)),a.isPandLReportFetched(e)||s(S(e)),T(a.forecastIdFromUrlPath,e,a.navigate)},onTimeframeChanged:e=>{s(de(e))},onForecastVsActualsCompareToggle:e=>{s(le(e)),s(A({forecastId:a.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:e=>{s(ce(a.firstMonthOfFY,e,0,[]))},onAccountBalanceClick:a.hasTransactionAccess!==!0?void 0:(e,o)=>{let r,i;const F=e.accountName===""?e.accountDescription:e.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,i=ie(o)):o.balanceTimeFrame==="year"?(r="quarter",i={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),i!=null&&r!=null){const f=xe(a.tenantEmailDomain,e.accountId,e.accountType,F,r,i),p=be(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(f,{state:{pathnameStackToGoBack:p,referrer:"Forecast"}})}},onNodeCollapseToggled:(e,o)=>{s(A({forecastId:a.forecastIdFromUrlPath,nodeCollapseState:{nodeId:e,isCollapsed:o===!1}}))},onTableScroll:e=>{s(A({forecastId:a.forecastIdFromUrlPath,scrollPosition:e}))},onBackClick:()=>{a.navigate("../../")}}})(Ie);function v(){const{isAiCfoOpen:s,setIsAiCfoOpen:a}=pe(),e=z(),o=K(),r=Z(),{forecastId:i,tenantEmailDomain:F}=H(),[f,p]=h.useState(!1),[g,y]=h.useState(!1),u=ue.getSignedInUser(),x=d(t=>M(t)),B=x.company?.companyInfo.firstMonthOfFY??1,c=d(t=>U(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),k=d(t=>t.profitAndLossState),D=d(t=>t.reportUIOptionsState.selectedForecast),j=t=>k.pandLByForecastID[t]!=null&&re(t,k).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:I}=he();Te({isDataReady:l});const{isAiCfoAccessEnabled:N,onAskAiCfoClick:_}=Se({isAiCfoOpen:s,setIsAiCfoOpen:a,mobileExploreReferrer:"Forecast"});h.useEffect(()=>{if(!f&&I)p(!0),l||o(ae());else if(l&&!g){y(!0);const t=((m,R,P)=>R!=null?m.forecasts.findIndex(b=>b.id===R):P!=null?m.forecasts.findIndex(b=>b.id===P):m.forecasts.length>0?0:-1)(c,i,D?.id);t===-1&&i!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=D?.index?(o(w(c.forecasts[t].id,t)),T(i,c.forecasts[t].id,e,r.search)):i==null&&t!==-1&&T(void 0,c.forecasts[t].id,e,r.search),t!==-1&&!j(c.forecasts[t].id)&&I&&o(S(c.forecasts[t].id))}},[f,p,o,l,c,g,y,U,S,I]);const E=Fe(),V=E?.loggedInUserRole!=null&&te(E.loggedInUserRole),{useFeatureGate:W}=$(),{isFeatureEnabled:L}=W(G.isReportsCommentingEnabled),Y=ye(L?x?.companyId:void 0,{clearParams:l&&g}),[J,Q]=h.useState(!1),O=t=>{Q(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(ge,{analytics:q,onLoad:t=>(m=>m.trackForecast())(t)}):null,n.jsx(ke,{isAppContentDrawerOpen:J,handleDrawerToggle:O}),n.jsx(De,{firstMonthOfFY:B,tenantEmailDomain:F,forecastIdFromUrlPath:i,navigate:e,location:r,isPandLReportFetched:j,meetingUrl:oe(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${u?.firstName}&lastname=${u?.lastName}&email=${u?.userEmail}`),hasTransactionAccess:V,isAiCfoAccessEnabled:N,onAskAiCfoClick:_,isReportsCommentingEnabled:L,isZeniUser:se(u),initialOpenThreadRequest:Y,onClickMenuIcon:()=>{O(!0)}})]})}function Ke(){const s=d(i=>M(i)),{useFeatureGate:a}=$(),{isFeatureEnabled:e}=a(G.isDebitCardFeatureEnabled),o=me(e,s),r=fe(s);return o===!0||r===!0?n.jsx(Ae,{}):n.jsxs(ee,{children:[n.jsx(C,{path:"/",element:n.jsx(v,{})}),n.jsx(C,{path:"/:forecastId",element:n.jsx(v,{})}),n.jsx(C,{path:"/:forecastId/*",element:n.jsx(Ce,{})})]})}export{Ke as PandLWithForecastRoutes,Ke as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-ypyKWtbM.js";import _ from"./NotFoundScreen-Jfnu8ThU.js";import{a as r}from"./sentry-ylIvhyeZ.js";import{j as M,u as v,g,l as U,h as P,N as z,k as F,n as V,o as h}from"./core-CBFn_Yo_.js";import{eM as B,OG as b,bn as G,bm as N,h2 as H,gy as $}from"./zeni-epic-state-DQMIbKEE.js";import{I as q,z as I,F as J,cs as K}from"./index-CFuLUFh-.js";import"./mui-D35VurIR.js";import{u as L}from"./useAskAiCfoHostNavButtonProps-DxZBiCyD.js";import{c as Q}from"./useFetchSuggestedQuestionsWhenReady-BwCliZLq.js";import{M as W}from"./MobileAppDrawer-BXp_ujQw.js";import"./recharts-CSEhqlTE.js";import"./analytics-B3Q4UmLh.js";import"./plaid-O0aD-5ib.js";import"./dnd-1A4kYEBz.js";import"./stripe-DMRn4zHo.js";import"./lottie-xwOlCP2t.js";import"./lexical-Blenvqjv.js";import"./pdf-B5d6xxqf.js";import"./utils-0qzBiEB0.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]="61362947-45bf-472b-a27e-c637c57c248f",e._sentryDebugIdIdentifier="sentry-dbid-61362947-45bf-472b-a27e-c637c57c248f")}catch{}})();const X=F(function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(K),Y=()=>{const e=M(),t=v(),c=q(),o=g(s=>B(s)),{aggregatedReportViewState:n}=g(s=>b(s)),{tenantEmailDomain:m}=U(),p=P(),d=I.getSignedInUser();if(d==null)throw new Error("Can't access this page without signing in...");const f=r.useRef(!1),[C,S]=r.useState(!1),w=G(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,y=N(d),A=w||k||y,l=r.useCallback((s,i,O)=>{p(H({fromMonth:s,toMonth:i,cacheOverride:O}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&f.current&&(p($({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),f.current=!1)},[n?.fetchState]);const D=r.useCallback((s,i)=>{n!=null&&n?.fetchState==="In-Progress"||l(s,i,!0),f.current=!0},[n?.fetchState,l]),x=r.useCallback((s,i)=>{l(s,i,!1)},[l]),u=s=>{S(s)},{isAiCfoOpen:j,setIsAiCfoOpen:R}=J(),{isAiCfoAccessEnabled:T,onAskAiCfoClick:E}=L({isAiCfoOpen:j,setIsAiCfoOpen:R,mobileExploreReferrer:"Performance"});return Q({isDataReady:n?.fetchState==="Completed"}),A?a.jsxs(a.Fragment,{children:[a.jsx(W,{isAppContentDrawerOpen:C,handleDrawerToggle:u}),a.jsx(X,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:d,tenantEmailDomain:m,onReload:D,onTimeRangeSelect:x,handleDrawerToggle:u,isAiCfoAccessEnabled:T,onAskAiCfoClick:E})]}):a.jsx(z,{to:`/${m}/dashboard`,replace:!0})};function Ie(){return a.jsxs(V,{children:[a.jsx(h,{path:"*",element:a.jsx(Y,{})}),a.jsx(h,{path:"*",element:a.jsx(_,{})})]})}export{Ie as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-ypyKWtbM.js";import{r as w,z as x,aI as y,w as E,c as p,f as F,cC as P,d as L}from"./index-CFuLUFh-.js";import"./mui-D35VurIR.js";import l from"./NotFoundScreen-Jfnu8ThU.js";import{a as d}from"./sentry-ylIvhyeZ.js";import{h as T,g as b,j as V,u as A,k as R,n as U,o as f}from"./core-CBFn_Yo_.js";import{eM as z,Pd as C,M3 as Y,Pe as k,tn as M,eY as G,Pf as O,tl as q}from"./zeni-epic-state-DQMIbKEE.js";import{R as j}from"./ReferralListScreen-ukudNh7G.js";import"./recharts-CSEhqlTE.js";import"./analytics-B3Q4UmLh.js";import"./plaid-O0aD-5ib.js";import"./dnd-1A4kYEBz.js";import"./stripe-DMRn4zHo.js";import"./lottie-xwOlCP2t.js";import"./lexical-Blenvqjv.js";import"./pdf-B5d6xxqf.js";import"./utils-0qzBiEB0.js";import"./useAskAiCfoHostNavButtonProps-DxZBiCyD.js";import"./useFetchSuggestedQuestionsWhenReady-BwCliZLq.js";import"./MobileAppDrawer-BXp_ujQw.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]="733208f6-7545-49dc-90c9-98efd6b4b68c",e._sentryDebugIdIdentifier="sentry-dbid-733208f6-7545-49dc-90c9-98efd6b4b68c")}catch{}})();const B=R(function(e,t){const n=C(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(e,t){const{navigate:n}=t,i=x.getSignedInUser();return{onDismissClick:()=>{e(k()),n("..")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}e(q())},onUpdateInviteFormLocalData:s=>{e(O({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{i!=null&&p.trackInviteEmailClicked("cancel")}}})(P),H=()=>{const e=T(),[t,n]=d.useState(!1),[i,s]=d.useState(!1),r=b(o=>z(o)),c=V(),_=A(),{useDynamicConfig:g}=w(),u=x.getSignedInUser();if(u==null)throw Error("Can't access invite referral screen without signing in...");const m=b(o=>C(o)),v=u?.firstName!=null?u.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:D}=g(y.zeniAccountsConfig),I=Y(D);d.useEffect(()=>{e(k()),r?.rewardsLastViewedTime==null&&i===!1&&(e(M()),s(!0))},[]),d.useEffect(()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(G(!0)))},[m.fetchState,e]);const N=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(E,{analytics:p,onLoad:o=>(S=>S.trackPageLoaded(F.Event.inviteEmailViewed))(o)}):null,a.jsx(B,{navigate:c,location:_,currentTenant:r,companyName:N,userName:v,inviteFormCompayData:m.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:I.maxAnnualPercentageYield})]})};function ue(){const{useFeatureGate:e}=w(),{isFeatureEnabled:t}=e(L.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(f,{path:"/",element:t?a.jsx(j,{}):a.jsx(l,{})}),a.jsx(f,{path:"how-it-works",element:t?a.jsx(j,{isReferralDrawerOpen:!0}):a.jsx(l,{})}),a.jsx(f,{path:"refer/*",element:t?a.jsx(H,{}):a.jsx(l,{})}),a.jsx(f,{path:"*",element:a.jsx(l,{})})]})}export{ue as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-CE3M4sVC.js","assets/sentry-ylIvhyeZ.js","assets/core-CBFn_Yo_.js","assets/zeni-epic-state-DQMIbKEE.js","assets/index-CFuLUFh-.js","assets/mui-D35VurIR.js","assets/analytics-B3Q4UmLh.js","assets/utils-0qzBiEB0.js","assets/withTransactionSidePanel-C2FQw1AX.js","assets/useAskAiCfoHostNavButtonProps-DxZBiCyD.js","assets/useFetchSuggestedQuestionsWhenReady-BwCliZLq.js","assets/TransactionDetailScreen-DE6NRgEf.js","assets/decodeURIComponentSafe-CqMC__af.js","assets/routePaths-gXs1nhS8.js","assets/NotFoundScreen-Jfnu8ThU.js","assets/analyticsHelper-kqcVp_6n.js","assets/CompanyPassportScreen-BgmSm9WA.js","assets/MobileAppDrawer-BXp_ujQw.js","assets/FeaturePreviewScreen-Bq3A0Rct.js","assets/ReferralListScreen-ukudNh7G.js","assets/index-Bc34frN_.css","assets/BillPayRoutes-DzOYlN9R.js","assets/AddressScreen-BFrEBCHK.js","assets/DomesticWireDetailScreen-XuERCF9p.js","assets/useInitialThreadRequest-B3znvGYl.js","assets/DrawerScreen-Cyxis5C5.js","assets/SetupPagesScreen-BJ_o2xYL.js","assets/BusinessVerificationPageScreen-CBdouPmn.js","assets/BillPayApprovalRoutes-Dxy5I7t-.js","assets/ReimbursementApprovalRuleDetailScreen-B0gtWr3q.js","assets/getLocaleForTenant-Blze7OAY.js","assets/ReimbursementRoutes-sXj3F60G.js","assets/ReimbursementApprovalRoutes-D7eDdVbZ.js","assets/TransactionListRoutes-B_gTc7lL.js","assets/ZeniAccountStatementScreen-CCUGE60d.js","assets/SettingsRoutes-Cv65hoYT.js","assets/accountMappingHelper-CEjaDvi1.js","assets/QBOConnectionScreen-ceycu_9h.js","assets/empty-CuHDeEGA.js","assets/index-CDftMuwg.js","assets/url-BUH-dUKP.js","assets/index-CpBFmiLM.js","assets/ReportsRoutes-BzpJF2OP.js","assets/ChargeCardRoutes-6zbwme8g.js","assets/PeopleRoutes-Cd6RkL82.js","assets/ExpenseAutomationRoutes-CV-pS6NJ.js","assets/TreasuryRoutes-BEtjV0uI.js","assets/VendorsRoutes-eFBKyBpA.js","assets/pathToGoBack-DEbgHxxX.js","assets/ZeniAccountRoutes-Dv8aY5PN.js","assets/AddressRoutes-8L7DJrXy.js","assets/PandLWithForecastRoutes-BcyTq1fG.js","assets/CustomerOnboardingRoutes-BPdwf0-J.js","assets/TransactionDetailRoutes-C0YCEtwY.js","assets/EntityDetailRoutes-C8la2tWW.js","assets/NotificationRoutes-leJ65WHA.js","assets/PerformanceRoutes-Bx4Y_JlS.js","assets/RewardsRoutes-BkzOweve.js","assets/TaskRoutes-BYmhAdb0.js","assets/TaskListScreen-CmAT5D-e.js","assets/AiCfoScreen-DpK-7Gca.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as a,bm as os,eM as ls,eS as cs,eQ as ds,eR as ms,fC as us,eO as _s,cM as Ae,ct as As,f8 as Es,cl as ps,bB as Is,bp as gs,fd as xs,v as Ts,Ie as hs,bu as js,If as Us,bD as bs,fa as Hs,bC as Rs,br as Ds,cN as ys,Ig as fs,Ih as Cs,cJ as vs,cL as Os,cK as Ps,cs as Fs,cy as Ls,mh as Ee,eN as pe,Ii as Bs,fh as Ie,fI as ge,fJ as xe,fi as ks}from"./zeni-epic-state-DQMIbKEE.js";import{j as e}from"./liveblocks-ypyKWtbM.js";import{a as v}from"./sentry-ylIvhyeZ.js";import{h as Vs,j as Ss,l as Ns,u as Ms,g as z,i as Te,N as c,n as Zs,o as t}from"./core-CBFn_Yo_.js";import{h as ws,u as zs,z as H,r as Gs,a as $s,_ as Ys,d as L,A as Ws,L as B,O as he,t as _,P as qs,c as X,l}from"./index-CFuLUFh-.js";import"./mui-D35VurIR.js";import{f as je}from"./analyticsHelper-kqcVp_6n.js";import{t as Js}from"./getLocaleForTenant-Blze7OAY.js";import"./recharts-CSEhqlTE.js";import"./analytics-B3Q4UmLh.js";import"./plaid-O0aD-5ib.js";import"./dnd-1A4kYEBz.js";import"./stripe-DMRn4zHo.js";import"./lottie-xwOlCP2t.js";import"./lexical-Blenvqjv.js";import"./pdf-B5d6xxqf.js";import"./utils-0qzBiEB0.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},U=new i.Error().stack;U&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[U]="d75341ad-0059-4821-bcfd-83ca7d8adbd3",i._sentryDebugIdIdentifier="sentry-dbid-d75341ad-0059-4821-bcfd-83ca7d8adbd3")}catch{}})();const Ks={dashboard:()=>a(()=>import("./DashboardRoutes-CE3M4sVC.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),bills:()=>a(()=>import("./BillPayRoutes-DzOYlN9R.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20])),reimbursement:()=>a(()=>import("./ReimbursementRoutes-sXj3F60G.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,24,9,10,25,32,29,30,20])),transactions:()=>a(()=>import("./TransactionListRoutes-B_gTc7lL.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20])),settings:()=>a(()=>import("./SettingsRoutes-Cv65hoYT.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20])),reports:()=>a(()=>import("./ReportsRoutes-BzpJF2OP.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20])),chargeCards:()=>a(()=>import("./ChargeCardRoutes-6zbwme8g.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20])),people:()=>a(()=>import("./PeopleRoutes-Cd6RkL82.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20])),expenseAutomation:()=>a(()=>import("./ExpenseAutomationRoutes-CV-pS6NJ.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20])),treasury:()=>a(()=>import("./TreasuryRoutes-BEtjV0uI.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20])),vendors:()=>a(()=>import("./VendorsRoutes-eFBKyBpA.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20])),zeniAccounts:()=>a(()=>import("./ZeniAccountRoutes-Dv8aY5PN.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))},Qs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Xs=l(()=>a(()=>import("./ReportsRoutes-BzpJF2OP.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20]))),ea=l(()=>a(()=>import("./AddressRoutes-8L7DJrXy.js"),__vite__mapDeps([50,1,2,3,22,4,5,6,7,14,20]))),sa=l(()=>a(()=>import("./PeopleRoutes-Cd6RkL82.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20]))),aa=l(()=>a(()=>import("./PandLWithForecastRoutes-BcyTq1fG.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,14,18,9,10,24,13,17,20]))),na=l(()=>a(()=>import("./CustomerOnboardingRoutes-BPdwf0-J.js"),__vite__mapDeps([52,1,2,3,22,4,5,6,7,14,37,38,39,40,41,12,20]))),ta=l(()=>a(()=>import("./VendorsRoutes-eFBKyBpA.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20]))),ia=l(()=>a(()=>import("./TransactionDetailRoutes-C0YCEtwY.js"),__vite__mapDeps([53,1,2,3,14,4,5,6,7,11,9,10,12,13,20]))),Ue=l(()=>a(()=>import("./EntityDetailRoutes-C8la2tWW.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,12,8,9,10,11,13,20]))),ra=l(()=>a(()=>import("./DashboardRoutes-CE3M4sVC.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))),be=l(()=>a(()=>import("./BillPayRoutes-DzOYlN9R.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20]))),oa=l(()=>a(()=>import("./SettingsRoutes-Cv65hoYT.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20]))),He=l(()=>a(()=>import("./ReimbursementRoutes-sXj3F60G.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,24,9,10,25,32,29,30,20]))),la=l(()=>a(()=>import("./ZeniAccountRoutes-Dv8aY5PN.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))),ca=l(()=>a(()=>import("./TreasuryRoutes-BEtjV0uI.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20]))),da=l(()=>a(()=>import("./TransactionListRoutes-B_gTc7lL.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20]))),ma=l(()=>a(()=>import("./ChargeCardRoutes-6zbwme8g.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20]))),ua=l(()=>a(()=>import("./NotificationRoutes-leJ65WHA.js"),__vite__mapDeps([55,1,2,3,14,4,5,6,7,9,10,20]))),_a=l(()=>a(()=>import("./PerformanceRoutes-Bx4Y_JlS.js"),__vite__mapDeps([56,1,2,3,14,4,5,6,7,9,10,17,20]))),Aa=l(()=>a(()=>import("./ExpenseAutomationRoutes-CV-pS6NJ.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20]))),Ea=l(()=>a(()=>import("./RewardsRoutes-BkzOweve.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,14,19,9,10,17,20]))),pa=l(()=>a(()=>import("./TaskRoutes-BYmhAdb0.js"),__vite__mapDeps([58,1,2,3,14,4,5,6,7,24,17,59,9,10,20]))),Ia=l(()=>a(()=>import("./AiCfoScreen-DpK-7Gca.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,48,20]))),y=l(()=>a(()=>import("./NotFoundScreen-Jfnu8ThU.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,20]))),ga=l(()=>a(()=>import("./TaskListScreen-CmAT5D-e.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,10,17,20])));function Za({setTenantEmailDomain:i}){const U=Vs(),V=Ss(),{tenantEmailDomain:o}=Ns(),S=ws().mode,{setLoading:f,clearAllLoading:O,clearLoading:Z}=zs(),D=H.getSignedInUserTenant(o)?.tenantId,h=H.getSignedInUser(),J=os(h),G=Ms(),[N,De]=v.useState(!1),r=z(n=>ls(n)),{useFeatureGate:P}=Gs(),K=$s(),ye=Ys(),{isFeatureEnabled:fe}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Ce}=P(L.isExpenseAutomationEnabledV2),ve=Ce||fe&&J,{isFeatureEnabled:Oe}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Pe}=P(L.isTreasuryEnabled),{isFeatureEnabled:Fe}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:se}=P(L.isDebitCardFeatureEnabled),j=z(n=>n.tenantState.fetchState),E=z(n=>n.tenantState.activeTenantFetchState.fetchState),u=E==="Completed"||j==="Completed"?cs(se,r):void 0,$=E==="Completed"||j==="Completed"?ds(r):void 0,Le=E==="Completed"||j==="Completed"?ms(r):void 0,Be=Fe||se||!!Le||!!$||!!u,{isFeatureEnabled:ke}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:Ve}=P(L.isAiCfoFileUploadEnabled),Y=z(n=>us(n));if(o!=null){const n=H.getSignedInUserTenant(o);h!=null&&n!=null&&je(h,r,S)}const w={tenantId:D,userId:h?.userId,sessionId:h?.zeniSessionId},ae=_s(),A=Ws(),Se=r.company==null||A?.loggedInUserRoleMap!=null&&Ae(A.loggedInUserRole),Ne=As(A?.loggedInUserRoleMap),ne=v.useRef(!0),te=Te("/:tenantEmailDomain/onboarding/*")!==null,Q=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=z(n=>w.tenantId!=null?Es(n,w.tenantId):void 0);v.useEffect(()=>{f(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(Q!=null&&D!=null){const n=Q.params.selectedPeriod;if(n!=null){const b=n.split("-");if(b.length===2){const d=ps(Number(b[0])),s=Number(b[1]),m=Is(`01-${d<10?`0${d}`:d}-${s}`,he.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=gs();m.isAfter(M,"month")===!1?U(xs(D,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[Q,D]),v.useEffect(()=>{N||(De(!0),f(B.TENANT_FETCHING)),ne.current?ne.current=!1:!Ts(ae,w)&&H.isSignedIn()&&(f(B.TENANT_FETCHING),function(n,b,d,s){if(pe(b?.userId,b?.zeniSessionId,n.tenantId),d(Bs(!0)),d(Ie(n.tenantId)),n.tenantId!=null&&_.clearTenant(n.tenantId),n.tenantId!=null){const m=H.getSignedInUserTenantWithId(n.tenantId);s&&he.updateAppLocaleID(Js(s)),m?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}n.userId!=null?X.identify(n.userId,{tenant_id:n.tenantId}):X.resetUserIdentity()}(w,h,U,Me))},[w,ae,h,U,H]),v.useEffect(()=>{H.isSignedIn()&&(f(B.TENANT_FETCHING),function(n,b,d,s,m,M,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const W=s!=null&&m?.zeniSessionId!=null,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(W&&ts){k(Ie(s));const q=H.getSignedInUserTenantWithId(s);q?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(q?.tenantEmailDomain),pe(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)))}else W&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),W&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)));if(W){X.identify(m.userId,{tenant_id:s});const q=s==null||s!=null&&(b==="Completed"||b==="Error");n==="Completed"||b!=="Not-Started"&&b!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(ks(m.userId,s,m.zeniSessionId))),q&&(n==="Not-Started"||n==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Ee(m.userId,m.zeniSessionId)))}}(j,E,r,D,h,f,U))},[D,E]),v.useEffect(()=>{H.isSignedIn()&&j==="Completed"&&Y.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),H.saveSignedInUserTenants(hs(Y.tenantsBaseInOrder)),h!=null&&je(h,r,S,void 0,Y.tenantsBaseInOrder))},[Y,j,r,h]),v.useEffect(()=>{E==="In-Progress"&&f(B.TENANT_FETCHING),E!=="Completed"&&E!=="Error"||(E==="Completed"&&D!=null?(O(),_.markActiveTenantFetchCompleted(D)):E==="Error"&&D!=null&&(_.markActiveTenantFetchFailed(D),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[E,j,D,N]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&E==="Completed"&&N&&(ie.current=!0,function(n=Qs,b=3e3){setTimeout(()=>{const d=s=>{if(s>=n.length)return;const m=n[s],M=Ks[m];M!=null?M().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},b)}())},[E,N]);const C=r?.userRole!=null&&js(r?.userRole),{isFeatureEnabled:Ze}=P(L.isReferralFeatureEnabled),we=r?.userRole!=null&&r.userRole.includes("charge_card_user"),ze=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ae(r.userRole),re=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,oe=Be&&!C,Ge=Us(A?.loggedInUserRoleMap),$e=r.externalConnections?.accounting[0]?.isValid,le=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,de=ce&&bs(A?.loggedInUserRoleMap),me=Oe&&!C,Ye=r.company!=null&&Hs(r.company),We=Pe&&Ye===!0&&!C,qe=re&&Rs(A?.loggedInUserRoleMap),Je=oe&&Ds(A?.loggedInUserRoleMap),Ke=me&&ys(A?.loggedInUserRoleMap),Qe=fs(A?.loggedInUserRoleMap),Xe=Cs(A?.loggedInUserRoleMap),p=vs(A?.loggedInUserRoleMap),I=Os(A?.loggedInUserRoleMap),g=Ps(A?.loggedInUserRoleMap),x=Fs(A?.loggedInUserRoleMap),T=Ls(A?.loggedInUserRoleMap),ue=re&&x,_e=ce&&T,es=me&&p,ss=We&&I,as=oe&&g,ns=r.excludedResources?.resources?.find(n=>n.resource==="/invites")!=null||Ne===!0||Ge===!0||Qe===!0||Xe===!0;return H.isSignedIn()?D==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ee(h.userId,h.zeniSessionId)),null):E!=="In-Progress"&&E!=="Not-Started"||j==="Completed"?(le===!0||J&&!te)&&$e===!1&&u===!1&&$===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||le!==!1||te||J?N&&r?.userRole&&u!=null&&$!=null&&o!=null&&Object.keys(A.loggedInUserRoleMap).length>0?e.jsx(Zs,{children:e.jsxs(t,{element:e.jsx(qs,{}),children:[e.jsx(t,{path:"/",element:e.jsx(xa,{isDashboardAccess:F,isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,isTenantCardsOnly:$})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(ra,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(Xs,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:ns||F?e.jsx(sa,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(aa,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(na,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||we||ze?e.jsx(ia,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(da,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(Ue,{entityType:"customer"}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:I,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(ga,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(pa,{})}),e.jsx(t,{path:"address/*",element:qe||de||Ke||Je?e.jsx(ea,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:es?e.jsx(la,{}):e.jsx(y,{})}),e.jsx(t,{path:"treasury/*",element:ss?e.jsx(ca,{}):e.jsx(y,{})}),e.jsx(t,{path:"performance",element:ye?e.jsx(_a,{}):e.jsx(Re,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ve&&C===!1?e.jsx(Aa,{}):e.jsx(Re,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(ua,{})}),e.jsx(t,{path:"vendors/*",element:Se?e.jsx(ta,{}):e.jsx(y,{})}),e.jsx(t,{path:"bill/*",element:ue?e.jsx(be,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:ue?e.jsx(be,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:_e?e.jsx(He,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:_e?e.jsx(He,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:ke?e.jsx(oa,{hasAdminLevelAccess:de}):e.jsx(y,{})}),e.jsx(t,{path:"cards/*",element:as?e.jsx(ma,{}):e.jsx(y,{})}),e.jsx(t,{path:"rewards/*",element:Ze?e.jsx(Ea,{}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo",element:K?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/",element:K?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:K?e.jsx(Ia,{isFileUploadEnabled:Ve}):e.jsx(y,{})}),e.jsx(t,{path:"*",element:e.jsx(y,{})})]})}):null:(i(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),i(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}))}const xa=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:V,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:f,isTenantBankingOnly:O,isTenantCardsOnly:Z})=>O===!0&&U?e.jsx(c,{to:"checking"}):Z===!0?e.jsx(c,{to:"cards"}):i?e.jsx(c,{to:"dashboard"}):U?e.jsx(c,{to:"checking"}):f?e.jsx(c,{to:"treasury"}):V?e.jsx(c,{to:"cards"}):o?e.jsx(c,{to:"bills"}):S?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),R=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:f,tenantEmailDomain:O})=>f===!0||i?e.jsx(Ua,{tenantEmailDomain:O}):S?e.jsx(ja,{tenantEmailDomain:O}):U?e.jsx(ba,{tenantEmailDomain:O}):V?e.jsx(ha,{tenantEmailDomain:O}):o?e.jsx(Ta,{tenantEmailDomain:O}):e.jsx(y,{}),Ta=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),ha=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),ja=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),Ua=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),ba=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),Re=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{R as FallBackRoute,Za as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-ypyKWtbM.js";import{a as u,b as T,q as A}from"./sentry-ylIvhyeZ.js";import{h as z,j as D,g as l,u as M,N as O,k as j}from"./core-CBFn_Yo_.js";import{u as F,z as s,h as P,c as E,O as B,e as N,f as _,Y as V,g as $,B as q,i as v}from"./index-CFuLUFh-.js";import{eM as J,Id as Q,Ie as R,eN as W,fh as Y,Ik as H,fF as G,cR as K,Il as b,Im as X,In as Z,bQ as y}from"./zeni-epic-state-DQMIbKEE.js";import"./mui-D35VurIR.js";import{u as ee}from"./useDeviceId-BJs7B5gi.js";import{f as te}from"./analyticsHelper-kqcVp_6n.js";import{t as ne}from"./getLocaleForTenant-Blze7OAY.js";import"./recharts-CSEhqlTE.js";import"./analytics-B3Q4UmLh.js";import"./plaid-O0aD-5ib.js";import"./dnd-1A4kYEBz.js";import"./stripe-DMRn4zHo.js";import"./lottie-xwOlCP2t.js";import"./lexical-Blenvqjv.js";import"./pdf-B5d6xxqf.js";import"./utils-0qzBiEB0.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]="21ebb6e7-61c1-465a-a549-38f921d95a66",t._sentryDebugIdIdentifier="sentry-dbid-21ebb6e7-61c1-465a-a549-38f921d95a66")}catch{}})();const ie=j(function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}},function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const c=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Z({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(c),sourceUri:y(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(X(n,a)))},clearSignInError:()=>{t(b())}}})(q),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=z(),d=D(),{clearAllLoading:g}=F(),n=s.getSignedInUser();u.useLayoutEffect(()=>{g()},[g]);const a=ee(),c=l(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:h,accountLocked:C,accountUnlockTime:k}=l(e=>e.tenantState),p=l(e=>e.tenantState.fetchState),L=l(e=>e.tenantState.activeTenantFetchState.fetchState),I=l(e=>e.tenantState.signInState),o=l(e=>e.tenantState.loggedInUser),r=l(e=>J(e)),S=l(e=>Q(e)),m=M(),w=P().mode,U=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{h.fetchState==="Completed"&&c!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))},[h.fetchState,c]),u.useEffect(()=>{t(void 0)},[]),u.useEffect(()=>{I!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(R(S.tenantsInOrder),o.zeniSessionId),W(o.userId,o.zeniSessionId,r.tenantId),i(Y(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(H("Completed")),B.updateAppLocaleID(ne(r)),te(o,r,w,void 0,S.tenantsInOrder),G().then(()=>{const e=$();e!=null&&N(e)}),setTimeout(()=>{E.trackLogin(_.Event.loginSuccess,o.authProvider??"google",K(r.productSettings))},2e3))},[I,p,L,o,r,S,w,m.state,i]),I==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(O,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!U,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),C===!0&&k!=null?f.jsx(V,{onClose:()=>i(b()),unlockDate:k}):null]})}export{ve as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-ypyKWtbM.js";import{a as n}from"./sentry-ylIvhyeZ.js";import{h as u,u as m,j as p,N as g}from"./core-CBFn_Yo_.js";import{z as c,v as y,t as b,c as d,f as h}from"./index-CFuLUFh-.js";import{IA as I,Ii as x,IB as j}from"./zeni-epic-state-DQMIbKEE.js";import{n as v}from"./mui-D35VurIR.js";import"./recharts-CSEhqlTE.js";import"./analytics-B3Q4UmLh.js";import"./plaid-O0aD-5ib.js";import"./dnd-1A4kYEBz.js";import"./stripe-DMRn4zHo.js";import"./lottie-xwOlCP2t.js";import"./lexical-Blenvqjv.js";import"./pdf-B5d6xxqf.js";import"./utils-0qzBiEB0.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]="b7e82211-d647-49a8-920c-c8ba3cc57565",e._sentryDebugIdIdentifier="sentry-dbid-b7e82211-d647-49a8-920c-c8ba3cc57565")}catch{}})();function q(){const e=u(),t=m(),i=p(),a=n.useRef(!1),f=c.isSignedIn(),r=t.state?.message==="logout",o=r||f;return n.useEffect(()=>{o&&!a.current&&(a.current=!0,setTimeout(()=>{try{c.clearAll(),e(I()),e(x(!1)),j(),b.reset(),d.trackLogout(h.Event.logoutSuccess),d.resetUserIdentity()}catch(l){console.error("Error during sign out:",l)}finally{r||i("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(w,{children:s.jsx(y,{fetchState:"In-Progress"})}):s.jsx(g,{to:"../",replace:!0})}const w=v.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`;export{q as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as k}from"./liveblocks-ypyKWtbM.js";import{a as m}from"./sentry-ylIvhyeZ.js";import{j,h as N,u as R,g as G,l as $,k as O}from"./core-CBFn_Yo_.js";import{F as v,z as K,r as M,d as U,w as _,c as z,f as V,cE as W,m as f,p as q}from"./index-CFuLUFh-.js";import{eM as H,Pk as w,Fo as y,Pl as L,Pg as J,EP as S,Pm as Q,ET as I,Es as X,Fp as b,Pn as B,gy as Y,Fe as Z,Fj as aa,F6 as ta,F4 as ea,Fk as sa,F1 as oa,Po as na,Pp as ia,Pq as la,Pr as u,e8 as ra,Ps as ca,Pt as pa}from"./zeni-epic-state-DQMIbKEE.js";import{n as ka}from"./mui-D35VurIR.js";import{u as ua}from"./useAskAiCfoHostNavButtonProps-DxZBiCyD.js";import{c as da}from"./useFetchSuggestedQuestionsWhenReady-BwCliZLq.js";import{M as ma}from"./MobileAppDrawer-BXp_ujQw.js";import"./recharts-CSEhqlTE.js";import"./analytics-B3Q4UmLh.js";import"./plaid-O0aD-5ib.js";import"./dnd-1A4kYEBz.js";import"./stripe-DMRn4zHo.js";import"./lottie-xwOlCP2t.js";import"./lexical-Blenvqjv.js";import"./pdf-B5d6xxqf.js";import"./utils-0qzBiEB0.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="bf83ded8-92c7-49f0-9c81-3c342efd79b6",t._sentryDebugIdIdentifier="sentry-dbid-bf83ded8-92c7-49f0-9c81-3c342efd79b6")}catch{}})();const fa=ka.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
9
|
-
`,Ta=O(function(t,e){const o=w(t,e.isTaskTemplatesEnabled),{taskGroupId:i}=e,n=i!=null&&i!==""?{...o,taskGroupsWithTasksList:o.taskGroupsWithTasksList.map(l=>({...l,tasks:l.tasks.filter(r=>r.taskGroupIds.includes(i))})).filter(l=>l.tasks.length>0)}:o;return{taskListView:n,tagListView:J(t),localData:n.localData,isTaskTemplatesEnabled:e.isTaskTemplatesEnabled}},function(t,e){const{navigate:o,currentTenant:i,location:n,isTaskTemplatesEnabled:l}=e,{tenantEmailDomain:r}=i,{groupByKey:T}=e.uiState;return{onTaskManagementRowClick:a=>{const s=ga(r,a),p=f(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:p}})},onReloadTasks:()=>{t(y(!0,l))},onNewTaskClick:()=>{if(e.localData.defaultTaskGroupId!=null){const a=C(r,e.localData.defaultTaskGroupId),s=f(n.state?.pathnameStackToGoBack,n.pathname);o(a,{state:{pathnameStackToGoBack:s,message:"comingFromTaskListPage"}})}},onColumnSortConfigChanged:(a,s)=>{t(B({uiState:{sortKey:a,sortOrder:s}}))},onFiltersChange:a=>{t(la({filters:a}))},onSearchTextChanged:a=>{t(ia({searchText:a}))},onReloadCards:()=>{t(y(!0,l))},onBackClick:()=>{if(n.state?.message==="triggerBackClick"){const a=q(n.state?.pathnameStackToGoBack),s=a.poppedPathname??"../";o(s,{state:{pathnameStackToGoBack:a.newStack}})}else o("../")},updateLocalData:a=>{t(na({localData:a}))},resetLocalData:()=>{t(L({taskGroupById:e.taskGroupState.taskGroupById}))},handleCreateGroup:a=>{t(oa(e.localData.newTaskGroupName,a))},assignGroupToTasks:a=>{t(ea(e.localData.selectedTaskIds,a,sa(e.uiState.groupByKey,a)))},onDeleteTaskGroup:a=>{t(ta(a))},onAddNewTaskToTaskGroup:a=>{if(e.localData.defaultTaskGroupId!=null){const s=ha(T,a);t(S({taskDetailLocalData:s}));const p=C(r,e.uiState.groupByKey==="groupName"?a:e.localData.defaultTaskGroupId),g=f(n.state?.pathnameStackToGoBack,n.pathname);o(p,{state:{pathnameStackToGoBack:g,message:"comingFromTaskListPage"}})}},onDragNDrop:(a,s)=>{t(aa(e.localData.selectedTaskIds.length>0?e.localData.selectedTaskIds:[a],s))},onTaskGroupRename:(a,s)=>{t(Z(a,s))},onTimeSpentUpdate:(a,s)=>{t(b({task:a,updates:s}))},onShowToast:a=>{t(Y(a))},onGroupByFilterChange:a=>{t(B({uiState:{groupByKey:a}}))},updateTask:(a,s)=>{t(b({task:a,updates:s}))},onCreateTagClick:(a,s)=>{t(X(a,s))},handleGroupTemplateClick:a=>{t(I(a,[]))},handleGroupTemplateTaskClick:(a,s)=>{t(I(a,[s]))},handleNewTaskInitialization:a=>{if(t(S({taskDetailLocalData:{...Q,name:a}})),e.localData.defaultTaskGroupId!=null){const s=C(r,e.localData.defaultTaskGroupId),p=f(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:p,message:"comingFromTaskListPage"}})}},onTaskGroupNameClick:a=>{o(`/${r}/tasks/group/${a}`)}}})(W);function $a(){const{isAiCfoOpen:t,setIsAiCfoOpen:e}=v(),o=j(),i=N(),n=R(),l=K.getSignedInUser(),r=G(c=>H(c)),{taskGroupId:T}=$(),{useFeatureGate:a}=M(),{isFeatureEnabled:s}=a(U.isTaskTemplatesEnabled),[p,g]=m.useState(!1),[E,F]=m.useState(!1),h=G(c=>w(c,s)),D=G(c=>c.taskGroupState),d=h.fetchState,{isAiCfoAccessEnabled:P,onAskAiCfoClick:A}=ua({isAiCfoOpen:t,setIsAiCfoOpen:e,mobileExploreReferrer:"Task Checklist"});if(da({isDataReady:d==="Completed"}),m.useEffect(()=>{p||(g(!0),i(y(!1,s)))},[p,i]),m.useEffect(()=>{d==="Completed"&&i(L({taskGroupById:D.taskGroupById}))},[d,D.taskGroupById]),l==null)throw Error("Can't access task list page without signing in...");return k.jsxs(k.Fragment,{children:[d==="Completed"?k.jsx(_,{analytics:z,onLoad:c=>(x=>x.trackPageLoaded(V.Event.taskListPage))(c)}):null,k.jsxs(fa,{children:[k.jsx(ma,{isAppContentDrawerOpen:E,handleDrawerToggle:c=>{F(c)}}),k.jsx(Ta,{location:n,navigate:o,currentTenant:r,taskGroupId:T,taskGroupState:D,localData:h.localData,uiState:h.uiState,isTaskTemplatesEnabled:s,taskListFetchState:d,isAiCfoAccessEnabled:P,onAskAiCfoClick:A})]})]})}const ga=(t,e)=>`/${t}/tasks/${encodeURIComponent(e)}`,C=(t,e)=>`/${t}/tasks/new/${e}`,ha=(t,e)=>{if(t==="assignee"){const o=e.split(",");return{...u.taskDetailLocalData,assignee:o}}if(t==="priority"){const o=ra(e);return{...u.taskDetailLocalData,priority:o}}if(t==="status"){const o=ca(e);return{...u.taskDetailLocalData,status:o}}if(t==="tag"){const o=e.split(",");return{...u.taskDetailLocalData,tagIds:o}}if(t==="dueDate"){const o=pa(e);return{...u.taskDetailLocalData,dueDate:o}}return{...u.taskDetailLocalData}};export{$a as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-ypyKWtbM.js";import z from"./NotFoundScreen-Jfnu8ThU.js";import{a as m}from"./sentry-ylIvhyeZ.js";import{j as A,h as M,u as V,l as $,g as f,N as _,k as O,n as R,o as u}from"./core-CBFn_Yo_.js";import{I as q,z as w,m as b,w as Q,c as E,f as W,cD as H,i as Z,ao as J,p as K}from"./index-CFuLUFh-.js";import{eM as C,Pg as G,EL as v,Ez as X,Fb as Y,Ph as P,Pi as aa,Ev as ea,Es as ta,pA as sa,po as na,jW as oa,EF as ia,Pj as ra,EC as la,EQ as ca,EP as da}from"./zeni-epic-state-DQMIbKEE.js";import{n as ma}from"./mui-D35VurIR.js";import{u as pa}from"./useInitialThreadRequest-B3znvGYl.js";import{M as ua}from"./MobileAppDrawer-BXp_ujQw.js";import ka from"./TaskListScreen-CmAT5D-e.js";import"./recharts-CSEhqlTE.js";import"./analytics-B3Q4UmLh.js";import"./plaid-O0aD-5ib.js";import"./dnd-1A4kYEBz.js";import"./stripe-DMRn4zHo.js";import"./lottie-xwOlCP2t.js";import"./lexical-Blenvqjv.js";import"./pdf-B5d6xxqf.js";import"./utils-0qzBiEB0.js";import"./useAskAiCfoHostNavButtonProps-DxZBiCyD.js";import"./useFetchSuggestedQuestionsWhenReady-BwCliZLq.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]="07a1b479-8d9c-44b9-9d52-670e409aa840",a._sentryDebugIdIdentifier="sentry-dbid-07a1b479-8d9c-44b9-9d52-670e409aa840")}catch{}})();const fa=O(function(a,t){const{location:n,taskGroupId:l}=t,d=P(a,t.taskId),c=C(a),i=l!=null?aa(a.taskGroupState,l):void 0,p=w.getSignedInUser(),e=c.tenantId,r={userId:p?.userId??"",sessionId:p?.zeniSessionId??"",tenantId:e??""},k=G(a);return{taskDetailSelectorView:d,authParams:r,isNewClicked:n.state?.message==="comingFromTaskListPage",filesEndPoint:J.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${Z.appUrl}${t.location.pathname}`,tagListView:k,taskGroupName:l!=null&&i!=null&&i.isDefault===!1?i.name:void 0}},function(a,t){const{taskId:n,navigate:l,currentTenant:d,location:c,taskGroupId:i}=t,{tenantEmailDomain:p}=d;return{onSaveChangesToLocalStore:e=>{a(da({taskDetailLocalData:e,taskId:n}))},onSaveDetailClick:()=>{a(ca(n,i))},onArchiveTaskClick:()=>{t.taskId!=null&&a(la(t.taskId))},onDismissClick:()=>{if(c.state?.message==="triggerBackClick"){const e=K(c.state?.pathnameStackToGoBack),r=e.poppedPathname??"../../dashboard";l(r,{state:{pathnameStackToGoBack:e.newStack}})}else{const e=B(p),r=b(c.state?.pathnameStackToGoBack,c.pathname);l(e,{state:{pathnameStackToGoBack:r}})}a(ra({taskId:n}))},onDeleteTaskClick:()=>{a(ia(n))},updateFilesEntity:e=>{a(oa({files:e}))},onDeleteFile:e=>{a(na(e))},onEditFileName:(e,r)=>{a(sa(e,r.split(".")[0]))},onReloadTaskDetailPage:()=>{a(v(!1,n))},onCreateTagClick:e=>{a(ta(e,n))},onDeleteTagClick:e=>{a(ea(e,n))}}})(H);function I(){const a=A(),t=M(),n=V(),l=q(),{taskId:d,taskGroupId:c}=$(),i=f(o=>C(o)),p=pa(i?.companyId),[e,r]=m.useState(!1),[k,F]=m.useState(!1),[S,L]=m.useState(!1),[x,N]=m.useState(!1),j=f(o=>G(o)),y=f(o=>o.taskGroupViewState.fetchState);m.useEffect(()=>{k||(F(!0),t(v(!1,d)))},[k,t]),m.useEffect(()=>{S||j.fetchState==="Completed"||(L(!0),t(X()))},[S,t,j.fetchState]),m.useEffect(()=>{x||y==="Completed"||(N(!0),t(Y()))},[x,t,y]);const D=f(o=>P(o,d)),g=D.fetchState,T=w.getSignedInUser();if(T==null)throw Error("Can't access task detail page without signing in...");if(g==="Error"&&D.error?.code===400){const{tenantEmailDomain:o}=i,h=B(o),U=b(n.state?.pathnameStackToGoBack,n.pathname);return s.jsx(_,{to:h,state:{pathnameStackToGoBack:U}})}return s.jsxs(s.Fragment,{children:[g==="Completed"?s.jsx(Q,{analytics:E,onLoad:o=>(h=>h.trackPageLoaded(W.Event.taskDetailPage))(o)}):null,s.jsxs(ga,{children:[s.jsx(ua,{isAppContentDrawerOpen:e,handleDrawerToggle:o=>{r(o)}}),s.jsx(fa,{analytics:E,currentTenant:i,handleZeniLogoClick:()=>{l.toggle()},initialOpenThreadRequest:p,location:n,loggedInUser:T,navigate:a,taskGroupId:c,taskId:d,taskDetailFetchState:g})]})]})}const ga=ma.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${a=>a.theme.colors.grey4};
|
|
9
|
-
`,B=a=>`/${a}/tasks`;function Aa(){return s.jsxs(R,{children:[s.jsx(u,{path:"/new",element:s.jsx(I,{})}),s.jsx(u,{path:"/new/:taskGroupId",element:s.jsx(I,{})}),s.jsx(u,{path:"/group/:taskGroupId",element:s.jsx(ka,{})}),s.jsx(u,{path:"/:taskId",element:s.jsx(I,{})}),s.jsx(u,{path:"*",element:s.jsx(z,{})})]})}export{Aa as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-ypyKWtbM.js";import i from"./NotFoundScreen-Jfnu8ThU.js";import{T as r}from"./TransactionDetailScreen-DE6NRgEf.js";import"./sentry-ylIvhyeZ.js";import{n as d,o as e}from"./core-CBFn_Yo_.js";import"./zeni-epic-state-DQMIbKEE.js";import"./recharts-CSEhqlTE.js";import"./index-CFuLUFh-.js";import"./mui-D35VurIR.js";import"./analytics-B3Q4UmLh.js";import"./plaid-O0aD-5ib.js";import"./dnd-1A4kYEBz.js";import"./stripe-DMRn4zHo.js";import"./lottie-xwOlCP2t.js";import"./lexical-Blenvqjv.js";import"./pdf-B5d6xxqf.js";import"./utils-0qzBiEB0.js";import"./useAskAiCfoHostNavButtonProps-DxZBiCyD.js";import"./useFetchSuggestedQuestionsWhenReady-BwCliZLq.js";import"./decodeURIComponentSafe-CqMC__af.js";import"./routePaths-gXs1nhS8.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]="256f287b-7a3d-4d6d-890e-a8cb9db8b86d",o._sentryDebugIdIdentifier="sentry-dbid-256f287b-7a3d-4d6d-890e-a8cb9db8b86d")}catch{}})();function q(){return t.jsxs(d,{children:[t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(e,{path:"/*",element:t.jsx(r,{})})]})}export{q as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-ypyKWtbM.js";import{a as f}from"./sentry-ylIvhyeZ.js";import{q as u,h,g as b,N as y}from"./core-CBFn_Yo_.js";import{Iz as I,eN as w,yU as x}from"./zeni-epic-state-DQMIbKEE.js";import{z as l,v as j,C as S,Q as v}from"./index-CFuLUFh-.js";import{n as g}from"./mui-D35VurIR.js";import"./recharts-CSEhqlTE.js";import"./analytics-B3Q4UmLh.js";import"./plaid-O0aD-5ib.js";import"./dnd-1A4kYEBz.js";import"./stripe-DMRn4zHo.js";import"./lottie-xwOlCP2t.js";import"./lexical-Blenvqjv.js";import"./pdf-B5d6xxqf.js";import"./utils-0qzBiEB0.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]="b18de584-5e95-4e2b-a528-941eedcdf9bb",e._sentryDebugIdIdentifier="sentry-dbid-b18de584-5e95-4e2b-a528-941eedcdf9bb")}catch{}})();const B=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",p=e.get("profileId")??"",[n,c]=f.useState(!1),a=h(),i=b(m=>I(m)),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(y,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect(()=>{n||(c(!0),a(x(t,p,s)))},[n,a]),i.fetchState==="Error"?o.jsx(D,{children:o.jsx(E,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(j,{fetchState:"In-Progress"}))},D=g.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
width: 100%;
|
|
4
|
-
height: 100vh;
|
|
5
|
-
flex-direction: row;
|
|
6
|
-
justify-content: center;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey5};
|
|
9
|
-
`,E=g(v.LargeRegular)`
|
|
10
|
-
display: flex;
|
|
11
|
-
color: ${S.important};
|
|
12
|
-
`;export{B as default};
|