@zeniai/web-app-ui 5.3.47-dev → 5.3.48-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/AccountMappingScreen-DeHsC__B.js +9 -0
- package/dist/assets/AddressRoutes-Bh2vRJBa.js +1 -0
- package/dist/assets/AddressScreen-C9Fk_Z55.js +9 -0
- package/dist/assets/AiCfoScreen-DB41E0VN.js +22 -0
- package/dist/assets/{AppDrawer-D4O6tn5i.js → AppDrawer-XdZKck2N.js} +3 -3
- package/dist/assets/{BillPayApprovalRoutes-BY4P9AKu.js → BillPayApprovalRoutes-Dyxgp6fW.js} +1 -1
- package/dist/assets/BillPayRoutes-Bp82WT-5.js +119 -0
- package/dist/assets/BusinessVerificationPageScreen-BT5PhS2R.js +9 -0
- package/dist/assets/CardsAiCfoScreen-CgeqAvem.js +14 -0
- package/dist/assets/ChargeCardRoutes-Ds9toMfJ.js +71 -0
- package/dist/assets/CompanyPassportScreen-B2k7aWUB.js +1 -0
- package/dist/assets/ConnectionAuthScreen-DrhuD992.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-CpbSTPlS.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-DV3rYEiJ.js → CustomerOnboardingRoutes-RIeFd0Jj.js} +3 -3
- package/dist/assets/{DashboardRoutes-D5hdkebN.js → DashboardRoutes-DqcCIUfr.js} +4 -4
- package/dist/assets/{DefaultTenantHome-DCPi_wXC.js → DefaultTenantHome-DhG1xEfc.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-BKq5jjLx.js +18 -0
- package/dist/assets/{DrawerScreen-BihZ_PpN.js → DrawerScreen-DsFB_53j.js} +1 -1
- package/dist/assets/EntityDetailRoutes-mt1xcJ7j.js +1 -0
- package/dist/assets/ExpenseAutomationRoutes-lC_JLdAl.js +38 -0
- package/dist/assets/FeaturePreviewScreen-BFU7MG_7.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-sKmwa_VW.js +1 -0
- package/dist/assets/InboxNotificationsProvider-CLtB_fgp.js +1 -0
- package/dist/assets/InvoicingRoutes-9v2-NT7u.js +2 -0
- package/dist/assets/MagicLinkRoutes-CXFrKDZN.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-dmwIRx3p.js +12 -0
- package/dist/assets/MobileAppDrawer-cBt39NZW.js +1 -0
- package/dist/assets/NotFoundScreen-DFQDCCRn.js +1 -0
- package/dist/assets/NotificationRoutes-DBx2Hpze.js +1 -0
- package/dist/assets/OAuthConsentScreen-Y007Isid.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-C51wwulq.js +1 -0
- package/dist/assets/{PaymentLinkScreen-B8bPleIr.js → PaymentLinkScreen-DJghRBso.js} +7 -7
- package/dist/assets/PeopleRoutes-Bm7sOBGu.js +22 -0
- package/dist/assets/PerformanceRoutes-BqAferL2.js +1 -0
- package/dist/assets/{Preview-DMLQokX_.js → Preview-BTwrFAaN.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-CWU6DFJl.js → QBOConnectionScreen-UblfZAiA.js} +1 -1
- package/dist/assets/ReimbursementApprovalRoutes-DEDn1IHB.js +1 -0
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-QDei_Fzl.js +1 -0
- package/dist/assets/{ReimbursementRoutes-BdJ3oqBf.js → ReimbursementRoutes-BHG-L5Ik.js} +9 -9
- package/dist/assets/ReportsRoutes-1SHXwblc.js +1 -0
- package/dist/assets/RewardsRoutes-bKzfn6ay.js +1 -0
- package/dist/assets/ScheduleDetailsPrepaidExpensesScreen-CdJ2LE-G.js +25 -0
- package/dist/assets/ScreenRoutes-Bz0Iu7E_.js +2 -0
- package/dist/assets/{SettingsRoutes-BGCz0_nd.js → SettingsRoutes-pgiyjQKt.js} +6 -6
- package/dist/assets/{SetupPagesScreen-DzNRL7Y-.js → SetupPagesScreen-Dzk7fHhk.js} +5 -5
- package/dist/assets/SignInScreen-Rmz1EJ3i.js +1 -0
- package/dist/assets/SignOutScreen-BgL1D0p9.js +9 -0
- package/dist/assets/{TaskListScreen-Br-mxkKM.js → TaskListScreen-BjJ59grh.js} +2 -2
- package/dist/assets/TaskRoutes-cixN3J6B.js +9 -0
- package/dist/assets/TransactionDetailRoutes-B_IKz98q.js +1 -0
- package/dist/assets/{TransactionDetailScreen-Bp7IFDK0.js → TransactionDetailScreen-BzVEfQec.js} +2 -2
- package/dist/assets/TransactionListRoutes-DiO8Bs9p.js +1 -0
- package/dist/assets/{TreasuryRoutes-BvvMozYl.js → TreasuryRoutes-DMo68xKo.js} +6 -6
- package/dist/assets/{VendorsRoutes-DsJ_lcDO.js → VendorsRoutes-DcubMsnX.js} +17 -17
- package/dist/assets/WiseConfirmationScreen-C40X1D6g.js +12 -0
- package/dist/assets/ZeniAccountRoutes-B2XcNL7K.js +57 -0
- package/dist/assets/ZeniAccountStatementScreen-B4EqmylS.js +9 -0
- package/dist/assets/{accountMappingHelper-DqBiQF6x.js → accountMappingHelper-C7mDOec7.js} +1 -1
- package/dist/assets/{analytics-D6GpUSOP.js → analytics-D1aMnBue.js} +1 -1
- package/dist/assets/{analyticsHelper-CwB3kQvw.js → analyticsHelper-BefphWIe.js} +1 -1
- package/dist/assets/{core-B5mDy9pu.js → core-DA_GbUVO.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-DANuhXnG.js → decodeURIComponentSafe-BeWrvHuJ.js} +1 -1
- package/dist/assets/{dnd-CGWe1ZMP.js → dnd-BVDuXkBA.js} +1 -1
- package/dist/assets/{empty-D0y6rZ_X.js → empty-DkYQEFBR.js} +1 -1
- package/dist/assets/{empty-Dj4ZMRNZ.js → empty-kmkuoqGV.js} +1 -1
- package/dist/assets/{emptyVideoElement-BbYSqu6F.js → emptyVideoElement-Dr5ohcS7.js} +1 -1
- package/dist/assets/epic-DZfUNOLM.js +2 -0
- package/dist/assets/expenseAutomationHelper-4Qy8IF7o.js +1 -0
- package/dist/assets/{getLocaleForTenant-DH5Avx3x.js → getLocaleForTenant-BYa6QBcb.js} +1 -1
- package/dist/assets/{index-BQBXaLiB.js → index-B02Uvg0e.js} +1 -1
- package/dist/assets/{index-8s12XWuB.js → index-BVMI-pAw.js} +1 -1
- package/dist/assets/{index-k1-Pd2Ki.js → index-BqUvSiTi.js} +1 -1
- package/dist/assets/{index-fq0DUtem.js → index-BsYcIz8M.js} +1 -1
- package/dist/assets/{index-CI8tXM3D.js → index-C4n_QrNU.js} +1 -1
- package/dist/assets/{index-G6Wb7pfX.js → index-C5j9ulaE.js} +2 -2
- package/dist/assets/index-CY-CsK5V.js +1 -0
- package/dist/assets/{index-6nH5LMe4.js → index-CsnAk3jU.js} +30661 -31464
- package/dist/assets/{lexical-DW4lC8Zx.js → lexical-Czsku2z1.js} +1 -1
- package/dist/assets/{liveblocks-UOzcPsHa.js → liveblocks-DTaiayIC.js} +2 -2
- package/dist/assets/{lottie-C5eNvt0I.js → lottie-CkYI8upo.js} +1 -1
- package/dist/assets/{mui-Do6nLzGb.js → mui-yMDYeeMr.js} +1 -1
- package/dist/assets/{pathToGoBack-DP_bGWF-.js → pathToGoBack-nmNIndUw.js} +1 -1
- package/dist/assets/{pdf-DjwvAC2g.js → pdf-BIYA0Nfl.js} +3 -3
- package/dist/assets/{pdf-lib-CZXOqgb4.js → pdf-lib-DZGnWz6X.js} +1 -1
- package/dist/assets/{plaid-0g_vwjSd.js → plaid-BtwBxM-6.js} +1 -1
- package/dist/assets/{pusher-BwlPp2s7.js → pusher-8BUSKGPT.js} +1 -1
- package/dist/assets/{react-BsXfT48C.js → react-Bs3cqIIe.js} +1 -1
- package/dist/assets/{react-CU01hiuh.js → react-C6ZyRyfn.js} +1 -1
- package/dist/assets/{react-Bja4MeVO.js → react-CxBgzLVF.js} +1 -1
- package/dist/assets/{react-Dex3foBA.js → react-a48nQACt.js} +1 -1
- package/dist/assets/{react-RZilWHYG.js → react-bpjj59R_.js} +1 -1
- package/dist/assets/{react-DkYBVdJJ.js → react-uoYsSJ7d.js} +1 -1
- package/dist/assets/{recharts-uFX1dZS-.js → recharts-D3wE7yHJ.js} +1 -1
- package/dist/assets/{routePaths-uBvxqlLY.js → routePaths-DeWRBZpS.js} +1 -1
- package/dist/assets/{sentry-DHDsO12F.js → sentry-BRmieicQ.js} +1 -1
- package/dist/assets/{url-CLCy7GPP.js → url-BAbGMJa_.js} +1 -1
- package/dist/assets/{url-BxiN6LKq.js → url-DXDQoAPC.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-D8KJqvT7.js → useAiCfoDashboardSuggestedQuestionsChips-SoHaFZ4W.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-BOgWSkqa.js +1 -0
- package/dist/assets/{useChargeCardPusherEvents-BnH8_thb.js → useChargeCardPusherEvents-C1Fc6NgG.js} +1 -1
- package/dist/assets/{useDeviceId-Bi38IJl0.js → useDeviceId-CZzjV8tQ.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-Ba8t-BuL.js → useEmailConnectResultRefresh-DtruKk0s.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-7Q8HJAH2.js → useInitialThreadRequest-BJ6-q-Ev.js} +1 -1
- package/dist/assets/useTaskManagerAccess-Bm40mz18.js +1 -0
- package/dist/assets/{utils-BsODCDYR.js → utils-UMm0RYR6.js} +1 -1
- package/dist/assets/withTransactionSidePanel-aokrUwcT.js +25 -0
- package/dist/assets/{zeni-epic-state-7eY0g-Bc.js → zeni-epic-state-cafsD4rZ.js} +6 -6
- package/dist/index.html +1 -1
- package/package.json +6 -6
- package/dist/assets/AccountMappingScreen-Euit4Ttk.js +0 -9
- package/dist/assets/ActualMatchingMatchDetailScreen-BBYzjOqh.js +0 -1
- package/dist/assets/AddressRoutes-PvYGzHCA.js +0 -1
- package/dist/assets/AddressScreen-DsGvV3N8.js +0 -9
- package/dist/assets/AiCfoScreen-DAEPn0_B.js +0 -22
- package/dist/assets/BillPayRoutes-CWc4tAqm.js +0 -119
- package/dist/assets/BusinessVerificationPageScreen-CSruI1nV.js +0 -9
- package/dist/assets/CardsAiCfoScreen-COoYscKz.js +0 -14
- package/dist/assets/ChargeCardRoutes-BU6-pfJv.js +0 -71
- package/dist/assets/CompanyPassportScreen-BxoatMVb.js +0 -1
- package/dist/assets/ConnectionAuthScreen-zbcvhPbz.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-8IwDeKdF.js +0 -1
- package/dist/assets/DomesticWireDetailScreen-DgE28aJN.js +0 -18
- package/dist/assets/EntityDetailRoutes-BqX-J3vM.js +0 -1
- package/dist/assets/ExpenseAutomationRoutes-DK-U-YTd.js +0 -38
- package/dist/assets/FeaturePreviewScreen-5SleVFKv.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-2RxbRDTZ.js +0 -1
- package/dist/assets/InboxNotificationsProvider-BmF5-_KA.js +0 -1
- package/dist/assets/InvoicingRoutes-D0S6fDxY.js +0 -2
- package/dist/assets/MagicLinkRoutes-C22EnpRm.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-BVf-rLEH.js +0 -12
- package/dist/assets/MobileAppDrawer-0YtWXA3B.js +0 -1
- package/dist/assets/NotFoundScreen-BkYIKPgh.js +0 -1
- package/dist/assets/NotificationRoutes-CZQRvVbE.js +0 -1
- package/dist/assets/OAuthConsentScreen-Q7ZDvc1F.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-BzO_OgSq.js +0 -1
- package/dist/assets/PeopleRoutes-D_nqmuPM.js +0 -22
- package/dist/assets/PerformanceRoutes-BW6dixVF.js +0 -1
- package/dist/assets/ReimbursementApprovalRoutes-DAusugdf.js +0 -1
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-phJuB98f.js +0 -1
- package/dist/assets/ReportsRoutes-CDSCG28G.js +0 -1
- package/dist/assets/RewardsRoutes-CHkOPz1g.js +0 -1
- package/dist/assets/ScheduleDetailsPrepaidExpensesScreen-DnVEpQsK.js +0 -33
- package/dist/assets/ScreenRoutes-BYAPWka6.js +0 -2
- package/dist/assets/SignInScreen-BREpWd6T.js +0 -1
- package/dist/assets/SignOutScreen-BNCpbut8.js +0 -9
- package/dist/assets/TaskRoutes-CDuiJExM.js +0 -9
- package/dist/assets/TransactionDetailRoutes-CYb-4jKQ.js +0 -1
- package/dist/assets/TransactionListRoutes-B6NIJUWk.js +0 -1
- package/dist/assets/WiseConfirmationScreen-Bg5_g49N.js +0 -12
- package/dist/assets/ZeniAccountRoutes-C3fDjuMG.js +0 -57
- package/dist/assets/ZeniAccountStatementScreen-CbdRQI0p.js +0 -9
- package/dist/assets/epic-mSW644GG.js +0 -2
- package/dist/assets/expenseAutomationHelper-DBDpSggk.js +0 -1
- package/dist/assets/index-6yt3BfRL.js +0 -1
- package/dist/assets/stripSplatSuffix-CQQXAy0N.js +0 -1
- package/dist/assets/useActualMatchingMatchDetail-OCZsPxr6.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-BsP5fVhq.js +0 -1
- package/dist/assets/useTaskManagerAccess-BG0Fkj9k.js +0 -1
- package/dist/assets/withTransactionSidePanel-DK-Ex27L.js +0 -25
package/dist/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en"><head><meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate"><meta http-equiv="expires" content="0"><meta http-equiv="pragma" content="no-cache"><meta charset="UTF-8"><link rel="icon" type="image/svg+xml" href="/assets/favicon-D56XvgAH.ico"><meta name="ROBOTS" content="NOINDEX, NOFOLLOW"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1"><meta name="theme-color" content="#000000"><meta name="description" content="Zeni - Modern Finance Team For Startups"><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&family=Manrope:wght@200..800&display=swap"><link rel="apple-touch-icon" href="/assets/logo192-CqcTe-t4.png"><link rel="manifest" href="/assets/manifest-icT4lOF5.json"><title>Zeni - Modern Finance Team For Startups</title><script src="/theme-detect.js"></script><style>:root{--logo-color-from:#D4DCDD;--logo-color-to:#E9F0F0;--bar-color-from:#E9F0F0;--bar-color-to:#D4DCDD;--sidebar-bg:#F3F7F7;--main-bg:#FAFCFC;--divider-color:#D4DCDD}html{background-color:#f3f7f7}html[data-theme=dark]{background-color:#1b1c1c;--logo-color-from:#545B5C;--logo-color-to:#3E4343;--bar-color-from:#3E4343;--bar-color-to:#545B5C;--sidebar-bg:#1B1C1C;--main-bg:#202222;--divider-color:#545B5C}.app-shell-loader{position:fixed;inset:0;display:flex;background-color:var(--sidebar-bg);z-index:9999}.app-shell-sidebar{width:210px;flex-shrink:0;background-color:var(--sidebar-bg);padding:16px 16px 0;display:flex;flex-direction:column;gap:36px;border-right:1px solid var(--divider-color);box-sizing:border-box}.app-shell-sidebar-group{display:flex;flex-direction:column;gap:10px}.app-shell-bar{height:10px;border-radius:5px;background-color:var(--bar-color-from);animation:app-shell-bar-shimmer 1.6s linear infinite}.app-shell-navbar{height:56px;display:flex;flex-direction:row;border-bottom:1px solid var(--divider-color);padding:0 32px;align-items:center;justify-content:space-between;box-sizing:border-box}@keyframes app-shell-bar-shimmer{0%,100%{background-color:var(--bar-color-from)}50%{background-color:var(--bar-color-to)}}.app-shell-main{flex:1;background-color:var(--main-bg)}.app-shell-logo{display:inline-flex;width:100%;height:calc(100vh - 56px);justify-content:center;align-items:center}.app-shell-logo svg path{animation:app-shell-color-cycle 1.6s linear infinite}@keyframes app-shell-color-cycle{0%,100%{fill:var(--logo-color-from)}50%{fill:var(--logo-color-to)}}@media (max-width:899px){.app-shell-sidebar{display:none}.app-shell-main{background-color:var(--sidebar-bg)}}</style><noscript><style>.app-shell-loader{display:none}</style></noscript><script async type="module" crossorigin src="/assets/index-
|
|
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-CsnAk3jU.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-BRmieicQ.js"><link rel="modulepreload" crossorigin href="/assets/core-DA_GbUVO.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-cafsD4rZ.js"><link rel="modulepreload" crossorigin href="/assets/mui-yMDYeeMr.js"><link rel="modulepreload" crossorigin href="/assets/analytics-D1aMnBue.js"><link rel="modulepreload" crossorigin href="/assets/utils-UMm0RYR6.js"><link rel="stylesheet" crossorigin href="/assets/index-BhC2LNQw.css"></head><body style="margin:0"><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><div class="app-shell-loader" id="app-shell-loader"><div class="app-shell-sidebar"><div class="app-shell-sidebar-group"><div class="app-shell-bar zeni-logo" style="width:96px;height:20px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:78px;height:16px"></div><div class="app-shell-bar" style="width:46px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:110px;height:16px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div><div class="app-shell-bar" style="width:64px;height:16px"></div></div></div><div class="app-shell-main"><div class="app-shell-navbar"><div class="app-shell-bar" style="width:106px;height:27px"></div><div class="app-shell-bar" style="width:111px;height:32px"></div></div><div class="app-shell-logo"><svg width="96" height="96" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.768 0.0270284C16.571 -0.055168 16.348 0.0572476 16.2913 0.267574C16.2713 0.342517 16.2489 0.417461 16.2253 0.491196C16.0094 1.15723 15.6459 1.76645 15.148 2.27776C14.3056 3.14203 13.1847 3.61949 11.9918 3.6207H11.9883C10.7978 3.6207 9.67689 3.14565 8.83445 2.2838C8.33653 1.7737 7.97077 1.16448 7.75367 0.499657C7.73007 0.425922 7.70765 0.350979 7.68641 0.276035C7.62978 0.065709 7.40678 -0.0454978 7.20974 0.0366985C6.05463 0.522624 4.98565 1.17899 4.0323 1.97436C3.91195 2.07468 3.87301 2.24512 3.93083 2.39259C3.9792 2.51589 4.03112 2.63797 4.08539 2.75764C4.51133 3.70894 5.10364 4.5853 5.84815 5.34682C7.48937 7.0246 9.66863 7.9493 11.9871 7.9493H11.9954C14.3162 7.94689 16.4978 7.01855 18.1379 5.33595C18.8812 4.57321 19.4711 3.69564 19.8959 2.74434C19.9502 2.62347 20.0009 2.50138 20.0493 2.37809C20.1071 2.23062 20.0682 2.06018 19.9478 1.95985C18.9933 1.16569 17.9231 0.511745 16.768 0.0270284Z"/><path d="M19.9102 21.2422C19.4843 20.2933 18.8931 19.4194 18.151 18.6603C16.5086 16.9801 14.3223 16.053 12.0038 16.0578C8.50304 16.0614 5.48371 18.1961 4.11031 21.2603C4.05722 21.38 4.0053 21.5009 3.95575 21.623C3.89675 21.7704 3.93569 21.9421 4.05722 22.0436C5.01175 22.8366 6.08073 23.4893 7.23466 23.9728C7.4317 24.055 7.65352 23.9438 7.71134 23.7335C7.73139 23.6573 7.75381 23.5836 7.77859 23.5086C8.37207 21.6979 10.0416 20.3888 12.0073 20.3864H12.012C13.2025 20.3864 14.3234 20.8614 15.1659 21.7233C15.6626 22.231 16.026 22.8378 16.2431 23.5002C16.2679 23.5739 16.2903 23.6489 16.3104 23.7238C16.3682 23.9341 16.59 24.0453 16.787 23.9619C17.9422 23.476 19.01 22.8209 19.9633 22.0255C20.0837 21.9252 20.1226 21.7535 20.0648 21.606C20.0164 21.4828 19.9645 21.3631 19.9102 21.2422Z"/><path d="M0.132148 10.1666C0.158105 9.98769 0.305591 9.85352 0.482575 9.85352L23.5093 9.81726C23.6863 9.81726 23.8338 9.95022 23.8609 10.1291C23.9518 10.7347 23.999 11.3548 23.999 11.9858C24.0001 12.6131 23.9541 13.2284 23.8668 13.8292C23.8408 14.0081 23.6934 14.1422 23.5164 14.1422L0.489654 14.1773C0.312671 14.1773 0.165185 14.0443 0.138047 13.8654C0.0471956 13.2598 0 12.6397 0 12.0088C0 11.3826 0.0448358 10.7673 0.132148 10.1666Z"/></svg></div></div></div></body></html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/web-app-ui",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.48-dev",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist/**/*"
|
|
6
6
|
],
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"@sentry/core": "^9.42.1",
|
|
29
29
|
"@sentry/react": "^9.42.1",
|
|
30
30
|
"@stripe/stripe-js": "^4.4.0",
|
|
31
|
-
"@zeniai/client-analytics": "2.0.
|
|
32
|
-
"@zeniai/client-epic-state": "5.2.
|
|
33
|
-
"@zeniai/web-components": "4.3.
|
|
31
|
+
"@zeniai/client-analytics": "2.0.90",
|
|
32
|
+
"@zeniai/client-epic-state": "5.2.40",
|
|
33
|
+
"@zeniai/web-components": "4.3.84",
|
|
34
34
|
"color": "3.1.3",
|
|
35
35
|
"crypto-js": "4.2.0",
|
|
36
36
|
"dnd-core": "^16.0.1",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"knip": "^6.21.0",
|
|
95
95
|
"madge": "^8.0.0",
|
|
96
96
|
"prettier": "^3.5.3",
|
|
97
|
-
"qs": "
|
|
97
|
+
"qs": ">=6.15.2",
|
|
98
98
|
"rollup-plugin-visualizer": "^5.12.0",
|
|
99
99
|
"semver": "^7.5.2",
|
|
100
100
|
"typescript": "^5.7.3",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"vite-plugin-node-polyfills": "^0.24.0",
|
|
103
103
|
"vite-plugin-svgr": "^4.5.0",
|
|
104
104
|
"vite-tsconfig-paths": "^5.1.4",
|
|
105
|
-
"vitest": "^4.1.
|
|
105
|
+
"vitest": "^4.1.0"
|
|
106
106
|
},
|
|
107
107
|
"keywords": [
|
|
108
108
|
"zeni web app ui"
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as D}from"./liveblocks-UOzcPsHa.js";import{a as o}from"./sentry-DHDsO12F.js";import{h as K,g as W,u as X,j as m,s as q,l as Y}from"./core-B5mDy9pu.js";import{ai as Z,N as ee,c as $,z as te,n as G,aj as ne,j as ae,S as ce}from"./index-6nH5LMe4.js";import{bn as se,fF as oe,gV as ie,oB as Q,Uw as re,i8 as J,gh as le,os as ue,Ux as de,Uy as pe,u6 as ge,l$ as me,oq as Ae,om as be,ox as fe,ia as ye,Uz as Ie,UA as Se}from"./zeni-epic-state-7eY0g-Bc.js";import{n as he}from"./mui-Do6nLzGb.js";import{M as Ee}from"./MobileAppDrawer-0YtWXA3B.js";import{q as R}from"./QBOConnectionScreen-CWU6DFJl.js";import{g as h,a as E,m as ze}from"./accountMappingHelper-DqBiQF6x.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="497f8d0d-28ff-4292-8fb2-949ae0feec1a",a._sentryDebugIdIdentifier="sentry-dbid-497f8d0d-28ff-4292-8fb2-949ae0feec1a")}catch{}})();const l="zeni_pending_projects_enable",u={pending:"pending",ready:"ready"},we=he.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${a=>a.theme.colors.grey4};
|
|
9
|
-
`,xe=Y((function(a,e){return{accountMappingView:e.accountMappingView,isFiling1099FeatureEnabled:e.isFiling1099FeatureEnabled,isAccruedExpensesFeatureEnabled:e.isAccruedExpensesFeatureEnabled,isAccountingClassesEnabled:me(a),isAccountingClassesUpdateInProgress:a.companyViewState.passportView?.accountingClassesUpdateStatus?.fetchState==="In-Progress",isAccountingProjectsEnabled:ge(a),isAccountingProjectsUpdateInProgress:(()=>{const i=sessionStorage.getItem(l),c=i===u.pending||i===u.ready;return a.companyViewState.passportView?.accountingProjectsUpdateStatus?.fetchState==="In-Progress"||c})(),isCapitalizationFeatureEnabled:e.isCapitalizationFeatureEnabled,capitalizableAccounts:e.capitalizableAccounts,accountNamesById:e.accountNamesById,capitalizableAccountOverrides:e.capitalizableAccountOverrides,isCapitalizationThresholdSaving:e.isCapitalizationThresholdSaving,onSaveCapitalizationAccountThreshold:e.onSaveCapitalizationAccountThreshold}}),(function(a,e){const{navigate:i,location:c,isFiling1099FeatureEnabled:A}=e;return{onAccountMappingChange:r=>{const{uncategorizedAccountSection:d,billsAccountSection:z,reimbursementsAccountSection:w,vendorsAccountSection:x,filing1099Section:v}=r,{incomeAccount:C,expenseAccount:F}=d,{billPayAccount:s}=z,{reimbursementsAccount:V}=w,{prepaidExpensesAccount:p,fixedAssetsAccount:T,accruedExpensesAccount:O}=x,{bankAccount:j,expenseCategory1099:M}=v,b=h(e.accountMappingView.incomeAccountList,C.selectedOption),P=h(e.accountMappingView.expenseAccountList,F.selectedOption),f=h(e.accountMappingView.billPayAccountList,s.selectedOption),_=h(e.accountMappingView.reimbursementsAccountList,V.selectedOption),k=E(e.accountMappingView.prepaidExpensesAccountList,p.selectedOptions),U=E(e.accountMappingView.fixedAssetsAccountList,T.selectedOptions),y=E(e.accountMappingView.accruedExpensesAccountList,O.selectedOptions),L=E(e.accountMappingView.bankAccounts1099FilingAccountList,j.selectedOptions),I=ze(e.accountMappingView.expenseAccounts1099FilingAccountList,M),t={selectedIncomeAccountId:b?.accountId,selectedExpenseAccountId:P?.accountId,selectedBillPayAccountId:f?.accountId,selectedReimbursementsAccountId:_?.accountId,selectedPrepaidExpensesAccountIds:k.map((n=>n.accountId)),selectedFixedAssetsAccountIds:U.map((n=>n.accountId)),selectedAccruedExpensesAccountIds:y.map((n=>n.accountId)),selectedBankAccounts1099FilingAccountIds:L.map((n=>n.accountId)),selectedExpenseAccounts1099FilingAccountIds:I};a(Se({data:t}))},onBackClick:()=>{G(c)===!1?(i("../../dashboard"),a(Ie())):a(J())},onSaveClick:()=>{a(ye()),A&&ae.track(ce.Event.vendor1099AccountingSettingsSave)},onAccountingClassesToggle:r=>{a(fe(e.currentTenant.companyId,r))},onAccountingProjectsToggle:r=>{const d=sessionStorage.getItem(l);d===u.pending||d===u.ready||a(r?Ae(e.currentTenant.companyId):be(e.currentTenant.companyId))}}}))(ne),_e=()=>{const a=Z(),e=K(),i=W(),c=X(),{useFeatureGate:A,useDynamicConfig:r}=ee(),{isFeatureEnabled:d}=A($.isFiling1099FeatureEnabled),{isFeatureEnabled:z}=A($.isScheduledJEAccruedExpensesFeatureEnabled),{configValue:w,isDynamicConfigLoading:x}=r("transaction_categorization_config"),v=!x&&w?.capitalization_enabled===!0,C=te.getSignedInUser(),F=se(C),s=m((t=>oe(t))),{capitalizableAccounts:V,capitalizableAccountOverrides:p,isCapitalizationThresholdSaving:T,currencySymbol:O}=m((t=>{const n=t.tenantState.currentTenantId,g=n!=null?t.tenantState.tenantsById[n]:void 0,S=ie(t.companyState,s.companyId);return{capitalizableAccounts:g?.capitalizableAccounts??null,capitalizableAccountOverrides:g?.capitalizableAccountOverrides??null,isCapitalizationThresholdSaving:t.companyViewState.passportView?.capitalizationThresholdUpdateStatus?.fetchState==="In-Progress",currencySymbol:S?.company.companyLocaleInfo?.currencySymbol??"$"}}),q),j=o.useCallback(((t,n)=>{c(Q(s.companyId,t,n))}),[c,s.companyId]),M=o.useCallback((t=>{const n={...p??{}},g=Object.entries(t);for(const[B,N]of g)N===null?delete n[B]:n[B]=N;const[S,H]=g[0]??[];S!=null&&c(Q(s.companyId,S,H,void 0,Object.keys(n).length>0?n:null))}),[c,s.companyId,p]),b=m((t=>re(t.accountState)),q),P=o.useMemo((()=>{const t={};for(const n of b)n.accountId!=null&&n.accountName!=null&&(t[n.accountId]=n.accountName);return t}),[b]),[f,_]=o.useState(!1),[k,U]=o.useState(!1);o.useEffect((()=>{f===!1&&(c(J()),_(!0))}),[f]);const y=m((t=>t.companyViewState.passportView?.needsQboProjectsReconnect===!0));o.useEffect((()=>{sessionStorage.getItem(l)===u.pending&&(sessionStorage.removeItem(l),c(le({messageSection:"accounting_projects_qbo_reconnect_failed",messageText:"failed",type:"error"})))}),[c]),o.useEffect((()=>{sessionStorage.getItem(l)===u.ready&&s?.companyId!=null&&(sessionStorage.removeItem(l),c(ue(s.companyId)))}),[s?.companyId,c]),o.useEffect((()=>{y&&s?.tenantEmailDomain!=null&&(sessionStorage.setItem(l,u.pending),c(de()),R.init("/connection/auth",s.tenantEmailDomain),R.handleClick())}),[y,s?.tenantEmailDomain,c]);const L=m((t=>pe(t))),I=t=>{U(t)};return D.jsxs(we,{children:[D.jsx(Ee,{isAppContentDrawerOpen:k,handleDrawerToggle:I}),D.jsx(xe,{currentTenant:s,navigate:e,meetingUrl:a("account_mapping"),accountMappingView:L,isFiling1099FeatureEnabled:d&&F,isAccruedExpensesFeatureEnabled:z,isCapitalizationFeatureEnabled:v,capitalizableAccounts:V,accountNamesById:P,capitalizableAccountOverrides:p,currencySymbol:O,isCapitalizationThresholdSaving:T,onSaveCapitalizationAccountThreshold:j,onSaveCapitalizationAccountThresholds:M,location:i,isSettings:G(i),onClickMenuIcon:()=>I(!0)})]})};export{l as P,_e as U,u as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-UOzcPsHa.js";import{a as k}from"./sentry-DHDsO12F.js";import{a4 as I,dR as g}from"./index-6nH5LMe4.js";import"./mui-Do6nLzGb.js";import{u as y}from"./useActualMatchingMatchDetail-OCZsPxr6.js";import R from"./NotFoundScreen-BkYIKPgh.js";import{i as v,h as U,g as w}from"./core-B5mDy9pu.js";import"./zeni-epic-state-7eY0g-Bc.js";import"./recharts-uFX1dZS-.js";import"./analytics-D6GpUSOP.js";import"./plaid-0g_vwjSd.js";import"./dnd-CGWe1ZMP.js";import"./stripe-cKAAJElX.js";import"./lottie-C5eNvt0I.js";import"./lexical-DW4lC8Zx.js";import"./pdf-DjwvAC2g.js";import"./utils-BsODCDYR.js";import"./stripSplatSuffix-CQQXAy0N.js";import"./decodeURIComponentSafe-DANuhXnG.js";import"./routePaths-uBvxqlLY.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]="ce9c10db-7449-433c-997f-f15acb078a66",t._sentryDebugIdIdentifier="sentry-dbid-ce9c10db-7449-433c-997f-f15acb078a66")}catch{}})();function K(){const{matchId:t,tenantEmailDomain:e}=v(),n=U(),r=w(),b=y(t??""),a=k.useCallback((()=>{const S=I(r.state?.pathnameStackToGoBack);n(S.poppedPathname??`/${e??""}/month_end_close_checks/review`,{state:{pathnameStackToGoBack:S.newStack}})}),[r.state,n,e]);if(t==null)return s.jsx(R,{});const{match:i,detailFetchState:o,handleOpenBill:l,handleRefresh:c,handleUndoReversal:d,handleContinueMatch:h,lastMatchResults:f,lastUndoResults:m,refreshStatus:p,undoReversalStatus:u}=b;return i==null?o.fetchState==="Not-Started"||o.fetchState==="In-Progress"?s.jsx(g,{detailFetchState:o.fetchState,isUndoInFlight:u.fetchState==="In-Progress",refreshStatus:p.fetchState,onNavigateBack:a,onOpenBill:l,onContinueMatch:()=>{h(),a()},onRefresh:c,onUndoReversal:d,lastMatchResults:f,lastUndoResults:m}):s.jsx(R,{}):s.jsx(g,{match:i,detailFetchState:o.fetchState,isUndoInFlight:u.fetchState==="In-Progress",refreshStatus:p.fetchState,onNavigateBack:a,onOpenBill:l,onContinueMatch:()=>{h(),a()},onRefresh:c,onUndoReversal:d,lastMatchResults:f,lastUndoResults:m})}export{K as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-UOzcPsHa.js";import{A as i}from"./AddressScreen-DsGvV3N8.js";import s from"./NotFoundScreen-BkYIKPgh.js";import"./sentry-DHDsO12F.js";import{n as d,o as r}from"./core-B5mDy9pu.js";import"./zeni-epic-state-7eY0g-Bc.js";import"./recharts-uFX1dZS-.js";import"./index-6nH5LMe4.js";import"./mui-Do6nLzGb.js";import"./analytics-D6GpUSOP.js";import"./plaid-0g_vwjSd.js";import"./dnd-CGWe1ZMP.js";import"./stripe-cKAAJElX.js";import"./lottie-C5eNvt0I.js";import"./lexical-DW4lC8Zx.js";import"./pdf-DjwvAC2g.js";import"./utils-BsODCDYR.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="81cbb5c1-1b56-4d87-a240-ae6c03b91825",t._sentryDebugIdIdentifier="sentry-dbid-81cbb5c1-1b56-4d87-a240-ae6c03b91825")}catch{}})();function _(){return e.jsxs(d,{children:[e.jsx(r,{path:"/edit/:addressType/:addressId",element:e.jsx(i,{})}),e.jsx(r,{path:"/new/:addressType",element:e.jsx(i,{})}),e.jsx(r,{path:"*",element:e.jsx(s,{})})]})}export{_ as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-UOzcPsHa.js";import{a as h}from"./sentry-DHDsO12F.js";import{h as T,u as P,g as j,i as E,j as B,l as M}from"./core-B5mDy9pu.js";import{a1 as $,E as D,z as L,U as V,a7 as K,a8 as U,j as C,S,a3 as F,Z as b,a4 as z}from"./index-6nH5LMe4.js";import{Vb as _,ip as R,fF as G,Vc as H,c8 as N,Vd as O,mH as q}from"./zeni-epic-state-7eY0g-Bc.js";import{n as Z}from"./mui-Do6nLzGb.js";import J from"./NotFoundScreen-BkYIKPgh.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="72ea884e-6068-4f4a-8739-2234995a382a",e._sentryDebugIdIdentifier="sentry-dbid-72ea884e-6068-4f4a-8739-2234995a382a")}catch{}})();const Q=Z.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,W=M((function(e,s){const{addressId:o,isSubPage:i,addressType:c}=s,l=G(e),t=s.roleMap!=null&&H(s.roleMap),n=i||c==="user_address"||N(l?.userRole??[])||t?void 0:"readonly";if(o==null){const a=O(c,e);return{addressToEdit:a?.addressToCreate,loadingState:a?.status?.fetchState,googleAPIKey:b.googleMapsAPIKey,isDisabled:n,isSubPage:i,dontShowSaveConfirmationPopup:s.dontShowSaveConfirmation}}const d=_(e,o);return{addressToEdit:d.address,loadingState:d.fetchState,googleAPIKey:b.googleMapsAPIKey,isDisabled:n}}),(function(e,s){const{navigate:o,location:i,addressType:c}=s,l=t=>{if(t==="express-pay")o("../express-pay/add-wire");else{const n=i.state,d=z(n?.pathnameStackToGoBack);let a=d.poppedPathname??v();const u=n?.queryParams;if(u){const g=new URLSearchParams(u).toString();g&&(a=`${a}?${g}`)}o(a,{state:{pathnameStackToGoBack:d.newStack}})}};return{onSubmitHandler:t=>{const n=X(t);e(q({addressType:c,addressToCreate:n})),C?.trackSaveAddressClicked(S.Event.saveAddressClicked,{street:t.street.addressString,city:t.city,state:t.state,country:t.country.selectedOption??"",postalCode:t.postalCode,suite:t.suite,secondaryInfo:t.secondaryInfo}),l(s.bankAccountContext)},onCancel:()=>{l(s.bankAccountContext)}}}))(F);function re({isSubPage:e,hideAddressSubTitle:s=!1,hideAddressBackButton:o=!1,dontShowSaveConfirmation:i,accountContext:c,addressTypeParam:l}){const t=T(),n=P(),d=j(),{addressId:a,addressType:u}=E(),g=$(),I=D(),k=L.getSignedInUser(),[p,w]=h.useState(a==null),f=B((m=>a!=null?_(m,a).fetchState:"Not-Started")),x=V();if(k==null)throw Error("Can't access address page without signing in...");const A=m=>m.trackPageLoaded(a!=null?S.Event.editAddress:S.Event.addAddress),y=l??u;return h.useEffect((()=>{p||a==null||(w(!0),n(R(a,!1)))}),[p,a,n]),y==null||y.match(/(user_address|company_address|company_registered_address|vendor_address|officer_([1-9]|10)_address|invoicing_customer_billing_address|invoicing_subscription_shipping_address|invoicing_business_address)$/g)?!p&&f==="Not-Started"||p&&f==="In-Progress"?r.jsx(K,{fetchState:f,style:{backgroundColor:I.colors.grey5}}):a!=null&&f==="Error"?(t(`${v(1)}/new`,{replace:!0}),r.jsx(r.Fragment,{})):r.jsxs(r.Fragment,{children:[r.jsx(U,{analytics:C,onLoad:A}),r.jsx(Q,{windowSize:g,children:r.jsx(W,{location:d,navigate:t,isSubPage:e===!0,hideAddressBackButton:o,hideAddressSubTitle:s,addressId:a,addressType:y,dontShowSaveConfirmation:i,bankAccountContext:c,roleMap:x?.loggedInUserRoleMap})})]}):r.jsx(J,{})}const v=(e=2)=>{let s="../";for(let o=0;o<e;o++)s=`${s}../`;return s},X=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{re as A,X as t};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{j as S}from"./liveblocks-UOzcPsHa.js";import{a}from"./sentry-DHDsO12F.js";import{u as Rt,h as Tt,i as Ot,g as jt,j as b,l as At}from"./core-B5mDy9pu.js";import{a as Qt,O as Dt,e8 as Lt,z as Ut,a1 as _t,e9 as Bt,ea as Ft,eb as Mt,bo as Ae,ec as Ne,ed as Vt,bn as Ge,a4 as me,a8 as re,j as B,ee as le,ef as $t,eg as Nt,au as Gt,S as qt,w as Ht,eh as zt,ei as Wt,av as Jt,ej as Kt,ek as Yt,el as Xt,em as Zt,p as es,bk as Qe,en as ts}from"./index-6nH5LMe4.js";import{fE as _,gt as y,TV as ss,a21 as as,a22 as ns,jM as os,a23 as is,jJ as rs,a24 as de,jD as ue,jT as z,jl as Se,jB as De,jz as ls,jQ as ds,ju as qe,U2 as Le,gv as F,gK as us,U1 as cs,TO as Ue,fF as ms,j3 as Ss,a25 as hs,g8 as ps,jh as fs,jd as gs,fG as ce,gf as Cs,a26 as Is,a27 as ks,a28 as bs,gu as vs,go as _e,k4 as Be,gq as Fe,gw as Es,a29 as Me,jV as Ps,ja as ws,jo as ys,jR as Ve,jr as xs,gx as Rs,gy as Ts,gz as Os,gA as js}from"./zeni-epic-state-7eY0g-Bc.js";import{D as As,n as M,S as Qs,P as Ds}from"./mui-Do6nLzGb.js";import{u as Ls}from"./useAiCfoDashboardSuggestedQuestionsChips-D8KJqvT7.js";import{p as Us}from"./pathToGoBack-DP_bGWF-.js";import{j as _s}from"./routePaths-uBvxqlLY.js";import"./recharts-uFX1dZS-.js";import"./analytics-D6GpUSOP.js";import"./plaid-0g_vwjSd.js";import"./dnd-CGWe1ZMP.js";import"./stripe-cKAAJElX.js";import"./lottie-C5eNvt0I.js";import"./lexical-DW4lC8Zx.js";import"./pdf-DjwvAC2g.js";import"./utils-BsODCDYR.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new s.Error().stack;r&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[r]="c98c4424-fabe-42d0-b58b-8c612d04237e",s._sentryDebugIdIdentifier="sentry-dbid-c98c4424-fabe-42d0-b58b-8c612d04237e")}catch{}})();const He="chat-response-generated";function Bs(s,r){if(r.kind!=="save")return;if(r.fetchState==="In-Progress")return{status:"saving"};if(r.fetchState==="Error")return{status:"failed"};if(r.fetchState!=="Completed")return;const t=y(s).skills.find((l=>l.macroId===r.savedMacroId));return t==null?void 0:{status:"saved",command:t.name}}const Fs=At((function(s,r){const t=_(s),l=r.isSubmitting,u=t.uiState?.currentChatSessionId,i=u!=null?Cs(s.aiCfoState,u):[],f=Wt(s,{allUsers:r.allUsers,onCardPolicyVendorSearchTextChange:r.onCardPolicyVendorSearchTextChange}),p=Is(s),m=ks(s),T=bs(s);return{showSampleQuestions:r.sessionFromUrl==="explore"&&t.uiState.currentChatSessionId==null,aiCfoView:t,isSubmitting:l,isNewChatSession:r.sessionFromUrl==="new_chat"||r.sessionFromUrl==="explore",isFullView:!0,tableDownloadEndPoint:`${Jt}/tableDownload`,exportDownloadEndPoint:Xt(),emailLinkQuestion:r.emailLinkQuestion,autoSubmitEmailLinkQuestion:r.autoSubmitEmailLinkQuestion,onEmailLinkQuestionProcessed:r.onEmailLinkQuestionProcessed,routedInitialQuestionSource:r.routedInitialQuestionSource,routedInitialQuestionSuggestionIndex:r.routedInitialQuestionSuggestionIndex,exploreSuggestedPromptQuestions:r.exploreSuggestedPromptQuestions,exploreSuggestedPromptQuestionsLoading:r.exploreSuggestedPromptQuestionsLoading,isFileUploadEnabled:r.isFileUploadEnabled,isUploadPromoVisible:r.isUploadPromoVisible,onUploadPromoClose:r.onUploadPromoClose,skills:y(s).skills,skillSaveState:Bs(s,T),skillsEnabled:y(s).skillsEnabled,skillsList:y(s).skills,skillsListError:y(s).fetchState==="Error",skillsListLoading:y(s).fetchState==="In-Progress",skillsCanPublish:y(s).canPublish,skillSaving:T.fetchState==="In-Progress",skillSaveError:T.fetchState==="Error",skillVersionHistory:p.macroId!=null?{macroId:p.macroId,versions:p.versions,error:p.fetchState==="Error",loading:p.fetchState==="In-Progress"}:void 0,skillRestoreBody:m.macroId!=null&&m.version!=null?{macroId:m.macroId,version:m.version,instructions:m.instructions,error:m.fetchState==="Error",loading:m.fetchState==="In-Progress"}:void 0,skillDetail:z(s).detail,skillDetailError:z(s).fetchState==="Error",skillDetailLoading:z(s).fetchState==="In-Progress",syntheticAnswers:i,resolveSyntheticAnswerCardTile:Yt(s),resolveSyntheticAnswerPolicyTile:Kt(s),...f}}),(function(s,r){const{location:t,currentTenant:l,userId:u,navigate:i,currentChatSessionId:f,allSessionsWithOrderedQuestionAnswers:p,isAiCardCreationEnabled:m,isCardPolicyEnabled:T,setIsAiCfoOpen:A}=r,Q=l.tenantEmailDomain;return{onEventReceived:(n,o)=>{if(n===He&&typeof o.text=="string"&&typeof o.metadata=="object"){const c=o,E=Rs(c.type),v=c.metadata.chat_session_id??null,{currentChatSession:W,currentQuestionAnswer:x,currentQuestionAnswerSummary:J}=Ge(p,v);E!=="answer"?B.trackAICFOChatResponseGenerated(E,x?.question.questionText??"",c.text,v,ts(J,W),c.metadata.message_id??null):B.trackAICFOChatAnswerGenerated(c.text,x?.question.questionText??"",(c.follow_up_questions?.length??0)>0,!!c.assumptions,!!c.insights,c.visualization!=null,Ts(c.visualization?.type??"")??null,v,c.summarized_title,c.metadata.message_id??null),s(Os({chatSessionId:c.metadata.chat_session_id,responseType:E,fetchState:{fetchState:"Completed",error:void 0}})),s(js({chatSessionId:c.metadata.chat_session_id,answerPayload:c,userId:u}))}},onSubmit:(n,o,c,E,v)=>{n&&Qe(s,n,o,f,p,u,E,c,void 0,v)},onFetchSkills:()=>{s(qe())},onOpenSkill:n=>{s(Se({macroId:n})),s(xs({macroId:n}))},onSaveSkill:(n,o)=>{s(Ve({draft:n,macroId:o}))},onSaveSkillDraft:n=>{const o=n.displayName?.trim()??"",c=n.name?.trim()??"";s(Ve({draft:{name:o.length>0?o:c,description:n.description?.trim()??null,instructions:n.instructions,visibility:"private"}}))},onFetchSkillVersionBody:(n,o)=>{s(ys({macroId:n,version:o}))},onDeleteSkill:n=>{s(ws({macroId:n}))},onSetSkillVisibility:(n,o)=>{s(Ps({macroId:n,visibility:o}))},onCloseSkillDetail:()=>{s(Me())},onRunSkill:(n,o)=>{s(F()),s(_e()),Qe(s,o,"user_input",void 0,p,u,void 0,void 0,void 0,n),s(Me())},updateCurrentInput:n=>{s(Fe(n))},onStopSubmit:()=>{},onUpdateScrollYOffset:n=>{s(Es(n))},onSelectSampleQuestion:()=>{},onBackClick:()=>{i(-1)},onCloseClick:()=>{const n=me(t.state?.pathnameStackToGoBack),o=n.poppedPathname??Us(1);i(o,{state:{...t.state,pathnameStackToGoBack:n.newStack}}),s(Fe(""))},togglePageView:()=>{const n=me(t.state?.pathnameStackToGoBack),o=n.poppedPathname??`/${l.tenantEmailDomain}/dashboard`;i(o,{state:{...Ne(t.state),pathnameStackToGoBack:n.newStack,message:"open_ai_cfo_drawer"}}),A(!0)},onCopy:()=>{},onThumbsUp:(n,o)=>{f!=null&&o?.messageId!=null&&s(Be(f,o.messageId,"positive",o.questionText,o.answerText))},onThumbsDown:(n,o)=>{f!=null&&o?.messageId!=null&&s(Be(f,o.messageId,"negative",o.questionText,o.answerText))},onTogglePageView:()=>{i(-1)},onNewChatClick:()=>{s(F()),f!=null&&s(_e());const n=es(t.state?.pathnameStackToGoBack,t.pathname);i(`/${l.tenantEmailDomain}/ai-cfo/new_chat`,{state:{pathnameStackToGoBack:n.slice(0,-1),referrer:"Sidebar"}})},onToggleCotCollapsed:(n,o)=>{s(vs({questionAnswerId:n,isCollapsed:o}))},onMenuClick:r.onMenuClick,...Zt(s,{isAiCardCreationEnabled:m,isCardPolicyEnabled:T,currentChatSessionId:f,onAfterCardsCreationSubmit:()=>{A(!0),i(`/${Q}/cards`,{state:{...t.state}})},onAfterCardPolicySubmit:()=>{A(!0),i(`/${Q}/cards/policy`,{state:{...t.state}})}})}}))(Ht(zt)),la=({isFileUploadEnabled:s})=>{const{setIsAiCfoOpen:r}=Qt(),t=Rt(),l=Tt(),{session_id:u}=Ot(),i=jt(),f=new URLSearchParams(i.search).get("routine")??void 0,[p,m]=a.useState(!1),T=b((e=>_(e).uiState.isSkillsBrowserOpen===!0)),A=b((e=>y(e).skillsEnabled)),Q=b((e=>_(e).uiState.isRoutinesBrowserOpen===!0)),n=b((e=>ss(e))),o=b((e=>as(e))),c=b((e=>ns(e))),[E,v]=a.useState(void 0),[W,x]=a.useState(!1),[J,he]=a.useState(void 0),ze=a.useCallback((()=>{he(void 0),v(void 0),x(!0)}),[]),We=a.useCallback((e=>{v(e),x(!0)}),[]),Je=a.useCallback((()=>{v(void 0),x(!1)}),[]),Ke=a.useCallback((e=>{t(os({draft:e,...E!=null&&{scheduleId:E.scheduleId}})),v(void 0),x(!1)}),[t,E]),O=f,pe=n.routines.find((e=>e.scheduleId===O)),C=b((e=>is(e))),Ye=a.useCallback((e=>{t(rs({scheduleId:e.scheduleId}))}),[t]);a.useEffect((()=>{t(O!=null?ue({scheduleId:O}):de())}),[t,O]);const L=pe?.macroId,Xe=b((e=>z(e))),fe=L!=null&&L!==""&&Xe.fetchState==="Not-Started";a.useEffect((()=>{fe&&L!=null&&t(Se({macroId:L}))}),[t,fe,L]);const Ze=b((e=>_(e).uiState.currentChatSessionId))??u,I=n.routines.find((e=>e.scheduleId===f))??n.routines.find((e=>e.scheduleId===Dt(Ze))),U=I?.scheduleId??null,[ge,et]=a.useState(!0);a.useEffect((()=>{U!=null&&t(ue({scheduleId:U}))}),[t,U]);const Ce=C.runs.some((e=>e.status==="claimed"||e.status==="running"))===!0;a.useEffect((()=>{if(O==null||Ce!==!0)return;const e=window.setInterval((()=>{t(ue({scheduleId:O})),t(De())}),5e3);return()=>window.clearInterval(e)}),[t,Ce,O]);const tt=a.useCallback((e=>{he(e),v(void 0),x(!0)}),[]),st=a.useCallback((e=>{t(ls({scheduleId:e.scheduleId}))}),[t]),at=a.useCallback(((e,h)=>{t(ds({enabled:h,scheduleId:e.scheduleId}))}),[t]);a.useEffect((()=>{Q&&t(De())}),[t,Q]);const Ie=b((e=>y(e).skills)),K=a.useMemo((()=>Ie.map((e=>({macroId:e.macroId,name:e.displayName??e.name})))),[Ie]),nt=a.useCallback((e=>{t(Se({macroId:e}))}),[t]),Y=a.useCallback((()=>{t(qe()),t(Le())}),[t]),ot=a.useCallback((()=>{t(F())}),[t]),{allUsers:it,isAiCardCreationEnabled:rt,isCardPolicyEnabled:lt,onCardPolicyVendorSearchTextChange:dt}=Lt();a.useEffect((()=>{t(us())}),[t]);const g=b((e=>_(e))),R=Ut.getSignedInUser();a.useEffect((()=>u==="routines"?(t(F()),void t(cs())):u==="skills"?(t(de()),t(Ue()),void t(Le())):(U==null&&t(de()),t(Ue()),void t(F()))),[t,U,f,u]);const ut=_t(),j=Gt(ut),k=b((e=>ms(e))),d=g.uiState.currentChatSessionId,P=k.tenantEmailDomain,D=P!=null&&P!=="",X=a.useCallback((e=>{D&&l(`/${P}/ai-cfo/routines?routine=${encodeURIComponent(e.scheduleId)}`)}),[D,l,P]),Z=a.useCallback((()=>{D&&l(`/${P}/ai-cfo/routines`)}),[D,l,P]),ee=a.useCallback(((e,h)=>{const H=e.sessionId??C.sessionId;H!=null&&D&&l(`/${P}/ai-cfo/${H}?routine=${encodeURIComponent(h)}`)}),[D,l,C.sessionId,P]),ct=a.useMemo((()=>I==null?void 0:{error:C.fetchState==="Error",kind:"routineRuns",loading:C.fetchState==="In-Progress"||C.fetchState==="Not-Started",routineName:I.name,schedule:Bt(I),skillName:I.isAdHoc===!0?void 0:K.find((e=>e.macroId===I.macroId))?.name,onOpenSkill:I.isAdHoc===!0?void 0:Y,runs:C.runs,tzName:I.tzName,unreadCount:I.unreadRuns,open:ge,onToggle:()=>et((e=>!e)),onOpenRun:e=>ee(e,I.scheduleId),onOpenRoutine:()=>X(I),onOpenRoutines:Z}),[Y,Z,X,ee,ge,I,C.fetchState,C.runs,K]),{handleUploadPromoClose:mt,isUploadPromoVisible:St}=Ft({isFileUploadEnabled:s,tenantEmailDomain:P}),te=Mt({currentTenant:k,currentChatSessionId:d,aiCfoView:g,skillsEnabled:A,onCloseSkills:ot,onOpenSkills:Y}),{isSuggestedQuestionsLoading:ht,suggestedPromptQuestions:pt}=Ls(),V=i.state,$=V?.aiCfoInitialQuestion,ke=!!V?.aiCfoShouldSubmit;a.useEffect((()=>{const e=i.state;if(e?.[Ae]!==!0)return;m(!0);const h={...e};delete h[Ae],l(i,{replace:!0,state:h})}),[i.pathname,i.search,i.state,l]);const[ft,se]=a.useState(null),[gt,ae]=a.useState(!1),[Ct,ne]=a.useState(void 0),[It,oe]=a.useState(void 0),be=a.useRef(!1);a.useEffect((()=>{if(!be.current&&$!=null&&$!==""){const e=i.state;se($),ae(ke),ne(e?.aiCfoInitialSubmissionSource!=null?e.aiCfoInitialSubmissionSource:void 0);const h=e?.aiCfoSuggestionIndex;oe(typeof h=="number"?h:void 0),be.current=!0}}),[$,ke,i.state]);const kt=a.useCallback((()=>{se(null),ae(!1),ne(void 0),oe(void 0),l(i.pathname,{replace:!0,state:Ne(i.state)})}),[i.pathname,i.state,l]),ve=a.useMemo((()=>new URLSearchParams(i.search)),[i.search]),Ee=ve.get("ref")??V?.aiCfoRef,ie=ve.get("emailRefId")??V?.aiCfoEmailRefId,Pe=a.useRef(!1);a.useEffect((()=>{Pe.current||Ee!=="month-end-email"||ie==null||d!=null||R==null||(t(Ss("controller",R.userId,ie,"MONTH_END_EMAIL")),Pe.current=!0)}),[Ee,ie,d,t,R]);const N=g.uiState.lastContextMessage;a.useEffect((()=>{N!=null&&N!==""&&d!=null&&(se(N),ae(!0),ne(void 0),oe(void 0),t(hs()))}),[N,d,t]);const bt=k.masterTOSInfo,w=bt?.isMasterTOSAccepted??!1,{visitedSessions:we}=Vt(d),G=g.fetchState,q=g.uiState.chatSessionsNextPageToken.hasMore||!g.uiState.chatSessionsFirstPageFetched,ye=d!=null?g.fetchChatSessionHistoryByChatSessionId?.[d]?.fetchState??"Not-Started":"Not-Started",xe=d==null||(g.uiState.chatHistoryNextPageToken[d]?.hasMore??!0),Re=g.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:vt}=Ge(Re,d),Et=vt.length===0;a.useEffect((()=>{w||j||l("../dashboard",{state:{...i.state,message:"open_ai_cfo_drawer"}})}),[w,j,l,i.state]);const Pt=a.useCallback((()=>{const e=me(i.state?.pathnameStackToGoBack),h=k.tenantEmailDomain;l(e.poppedPathname??(h!=null?`/${h}/dashboard`:".."),{state:{...i.state,pathnameStackToGoBack:e.newStack}})}),[k.tenantEmailDomain,i.state,l]),Te=a.useRef(void 0),Oe=a.useRef(void 0);a.useEffect((()=>{const e=u!==Te.current,h=d!==Oe.current;Te.current=u,Oe.current=d,u!==d&&(!e||u==null||_s(u)?h&&d!=null&&l(`../ai-cfo/${d}`,{state:{...i.state}}):t(ps({sessionId:u,agentId:"controller"})))}),[d,u]);const wt=a.useMemo((()=>({events:we.map((e=>`private-encrypted-chat-${e}.${He}`)),eventCallback:(e,h,H)=>H.onEventReceived(e,h)})),[we]);a.useEffect((()=>{G!=="In-Progress"&&q&&t(fs())}),[G,q,t]),a.useEffect((()=>{d!=null&&ye!=="In-Progress"&&xe&&R!=null&&(u===d||G==="Completed"&&!q)&&t(gs(d,R.userId))}),[ye,G,xe,q,d,R,u,t]);const je=e=>e.trackAICFOOnboardingScreenStateChanged("open","first_visit");if(R==null||u==null)throw Error("Can't access AI Controller page without signing in...");const yt=d!=null&&g.responseStateByChatSessionId?.[d]?.answer?.fetchState==="In-Progress";if(!w&&j)return S.jsxs(Vs,{children:[S.jsx(re,{analytics:B,onLoad:je}),te.drawerElement,S.jsx($s,{children:S.jsx($e,{children:S.jsx(le,{isTOSAccepted:!1,acceptMasterTOSState:g.masterTOSAcceptanceState,onCloseClick:Pt,onCompleteClick:()=>{k.userRoleId!=null&&t(ce(k.userRoleId))}})})})]});const xt=S.jsxs(S.Fragment,{children:[p&&!w?S.jsx(re,{analytics:B,onLoad:je}):null,S.jsx(le,{isTOSAccepted:w,acceptMasterTOSState:g.masterTOSAcceptanceState,showHeader:!1,togglePageView:w?()=>m(!1):void 0,onCloseClick:()=>m(!1),onCompleteClick:()=>{w||k.userRoleId==null||t(ce(k.userRoleId)),m(!1)}})]});return S.jsxs(S.Fragment,{children:[S.jsxs(Ms,{children:[S.jsx(re,{analytics:B,onLoad:e=>e.trackPageLoaded(qt.Event.aiCFOPage)}),j&&te.drawerElement,S.jsx(Fs,{...wt,currentChatSessionId:d,allSessionsWithOrderedQuestionAnswers:Re,allUsers:it,isAiCardCreationEnabled:rt,isCardPolicyEnabled:lt,openOnboardingPage:()=>m(!0),userId:R.userId,setIsAiCfoOpen:r,navigate:l,sessionFromUrl:u,location:i,isSubmitting:yt,isEmptyChatWithSession:Et,currentTenant:k,emailLinkQuestion:ft??void 0,autoSubmitEmailLinkQuestion:gt,onEmailLinkQuestionProcessed:kt,routedInitialQuestionSource:Ct,routedInitialQuestionSuggestionIndex:It,onCardPolicyVendorSearchTextChange:dt,onMenuClick:j?te.open:void 0,isFileUploadEnabled:s,isUploadPromoVisible:St,onUploadPromoClose:mt,exploreSuggestedPromptQuestions:pt,exploreSuggestedPromptQuestionsLoading:ht,isSkillsOpen:T,isRoutinesOpen:Q,routineCanCreate:c,routineEditing:E,routineEditorOpen:W,routineListError:n.fetchState==="Error",routineListLoading:n.fetchState==="In-Progress",routineMaxRoutines:n.maxRoutines,routineSaveError:o.fetchState==="Error",routineSaving:o.fetchState==="In-Progress",routineSchedulableSkills:K,routines:n.routines,onRoutineCreate:ze,onRoutineDelete:st,routineHistoryError:C.fetchState==="Error",routineHistoryLoading:C.fetchState==="In-Progress",chatSidePanel:ct,routineDetail:pe,routineRunningScheduleId:o.runningScheduleId,routineRuns:C.runs,onRoutineEdit:We,onRoutineOpenRun:(e,h)=>ee(h,e.scheduleId),onRoutineRun:Ye,onRoutineCloseDetail:Z,onRoutineDraft:tt,routineDraftPrompt:J,onRoutineOpenDetail:X,onRoutineEditorCancel:Je,onRoutineLoadSkillInstructions:nt,onRoutineSave:Ke,onRoutineSetEnabled:at,isCreateSkillEnabled:A,promoDismissalScope:P}),p&&j?S.jsx(As,{anchor:"right",open:p,transitionDuration:250,PaperProps:{component:Ns,style:{width:"100%"}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>m(!1),children:S.jsx($e,{onClick:e=>e.stopPropagation(),children:S.jsx(le,{isTOSAccepted:w,acceptMasterTOSState:g.masterTOSAcceptanceState,onCloseClick:()=>m(!1),onCompleteClick:()=>{w||k.userRoleId==null||t(ce(k.userRoleId)),m(!1)}})})}):null]}),p&&!j?S.jsx($t,{open:p,onClose:()=>m(!1),children:S.jsx(Nt,{children:xt})}):null]})},$e=M(Qs)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,Ms=M.div`
|
|
6
|
-
height: 100vh;
|
|
7
|
-
width: 100%;
|
|
8
|
-
`,Vs=M.div`
|
|
9
|
-
height: 100vh;
|
|
10
|
-
width: 100%;
|
|
11
|
-
display: flex;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
min-height: 0;
|
|
14
|
-
`,$s=M.div`
|
|
15
|
-
flex: 1;
|
|
16
|
-
min-height: 0;
|
|
17
|
-
display: flex;
|
|
18
|
-
flex-direction: column;
|
|
19
|
-
`,Ns=M(Ds)`
|
|
20
|
-
box-shadow: ${({theme:s})=>s.colors.elevation2};
|
|
21
|
-
color: ${({theme:s})=>s.colors.grey4};
|
|
22
|
-
`;export{la as default};
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-UOzcPsHa.js";import{h as J,u as le,g as Q,i as ae,j as k,N as ee,l as X,q as nt,n as it,o as y}from"./core-B5mDy9pu.js";import{fF as Z,Y4 as Ue,bq as ka,S5 as ot,bo as wa,bJ as de,Y5 as Ba,GS as Ca,I3 as Ve,Hp as lt,bn as Ae,Y6 as st,Y7 as rt,c8 as ct,Y8 as dt,l$ as xa,Y9 as Aa,Ya as Ea,IE as _e,H5 as Ce,Yb as ut,GG as ta,Yc as pt,Mt as mt,GK as bt,GQ as Da,Yd as Se,Ye as Me,I4 as Ne,Yf as ht,Yg as gt,I7 as Oe,Yh as St,Ik as yt,Yi as Ta,HQ as na,HV as ft,Yj as It,Yk as ce,Yl as ja,Ym as Pa,Yn as Fa,gV as vt,Ha as $e,cG as Ra,Yo as kt,gh as wt,Yp as Bt,Yq as Ct,d_ as Va,dZ as $a,Yr as Ye,Ys as xt,Yt as At,WF as ze,Yu as Et,WG as ie,WH as He,Yv as Dt,Yw as Tt,Yx as jt,HX as ia,HU as Pt,Yy as Ft,Yz as Rt,YA as Vt,HG as $t,YB as Lt,YC as Gt,cu as La,da as Ga,ma as Ut,bO as _t,br as Ua,bP as _a,FV as Mt,YD as Nt,Mg as Ot,Mm as Yt,C5 as zt,I5 as Ht,IL as Zt,mn as ge,YE as Wt,YF as Ma,mR as qt,mh as Na,mC as Oa,mB as oa,bE as pe,bN as Kt,YG as Jt,YH as ye,kN as Qt,YI as la,YJ as Xt,kR as en,la as an,IZ as tn,YK as nn,mK as on,IP as ln,YL as sa,IT as sn,IY as rn,IW as cn,IN as dn,YM as Ya,G$ as un,YN as pn,YO as mn,gG as bn,gF as hn,gE as gn,mq as Sn,mI as ra,mT as yn,uT as fn,mz as In,IR as vn,kX as kn,mY as wn,YP as Bn,kP as Cn,uK as xn,YQ as An,HM as En,bK as Dn,bt as Tn,U4 as jn,dd as Pn,dc as Fn,cF as Rn,cM as Vn}from"./zeni-epic-state-7eY0g-Bc.js";import{E as ue,z as L,U as fe,as as Ze,N as oe,c as g,bi as We,a7 as se,H as A,a8 as Ee,j,bu as $n,a4 as H,av as qe,p as T,a1 as Ie,bv as ca,bw as da,bx as Ln,az as Gn,af as Un,aS as _n,ab as za,G as De,ag as Ke,by as Mn,ae as Ha,bz as Nn,aq as On,S as Za,w as Yn,bA as zn,bB as Hn,bC as Zn,bD as Wn,bE as qn,bF as Kn,bG as Jn,bH as Qn,bI as Xn,M as ei,bJ as ai,br as ti,bK as ni,ai as ii,bL as oi,g as li}from"./index-6nH5LMe4.js";import{n as U,S as si}from"./mui-Do6nLzGb.js";import{A as ua}from"./AddressScreen-DsGvV3N8.js";import{g as ne,a as Te,i as Wa,V as Je,b as Qe,c as ri,v as ci,d as di,A as me,D as be}from"./DomesticWireDetailScreen-DgE28aJN.js";import{a as f}from"./sentry-DHDsO12F.js";import{u as Xe}from"./useAskAiCfoHostNavButtonProps-BsP5fVhq.js";import{u as qa}from"./useInitialThreadRequest-7Q8HJAH2.js";import{u as ui}from"./BusinessVerificationPageScreen-CSruI1nV.js";import xe from"./NotFoundScreen-BkYIKPgh.js";import{D as pi}from"./DrawerScreen-BihZ_PpN.js";import{M as Ka}from"./MobileAppDrawer-0YtWXA3B.js";import{F as Ja}from"./FeaturePreviewScreen-5SleVFKv.js";import{S as je}from"./SetupPagesScreen-DzNRL7Y-.js";import{B as mi}from"./BillPayApprovalRoutes-BY4P9AKu.js";import{F as bi}from"./ScreenRoutes-BYAPWka6.js";import"./recharts-uFX1dZS-.js";import"./analytics-D6GpUSOP.js";import"./plaid-0g_vwjSd.js";import"./dnd-CGWe1ZMP.js";import"./stripe-cKAAJElX.js";import"./lottie-C5eNvt0I.js";import"./lexical-DW4lC8Zx.js";import"./pdf-DjwvAC2g.js";import"./utils-BsODCDYR.js";import"./routePaths-uBvxqlLY.js";import"./InboxNotificationsProvider-BmF5-_KA.js";import"./useTaskManagerAccess-BG0Fkj9k.js";import"./analyticsHelper-CwB3kQvw.js";import"./ReimbursementApprovalRuleDetailScreen-phJuB98f.js";import"./getLocaleForTenant-DH5Avx3x.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]="41c49a04-1ac3-4ded-9ac0-77a0a4accaf5",e._sentryDebugIdIdentifier="sentry-dbid-41c49a04-1ac3-4ded-9ac0-77a0a4accaf5")}catch{}})();const hi=X((function(e,a){const l=Ue(e,a.billId),n=L.getSignedInUser(),c=e.tenantState.currentTenantId,r={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:c??""},u=H(a.location.state?.pathnameStackToGoBack);let o=!0;u.poppedPathname?.includes("bills")===!0&&(o=!1);let s=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`;Ae(n)||!l.createdBy?.email?.includes("zeni.ai")||(s="Zeni");let i=!1,d=!1;if(l?.billActivities.length>0){const{isApprovalorRejectBtnVisible:S,isMarkAsPaidBtnVisible:h}=st(l.billActivities,rt(a.currentTenant),n);i=S,d=h}const p=ct(a.currentTenant?.userRole??[]),m=l.transactionDetails!=null&&dt(l.transactionDetails,p,n);return{billDetails:l,isAccountingClassesEnabled:xa(e),createdBy:s,authParams:r,transactionAttachmentEndpoint:`${qe}/transaction_attachment`,signedInUser:n,showBackButton:o,isAdmin:p,isRealTimeApprovalEnabled:a.isRealTimeApprovalEnabled,showApproveRejectBtns:i,showMarkAsPaidButtonToApprover:d,hasZeniAssistAccess:a.hasZeniAssistAccess,analytics:j,showMarkAsPaidButtonToCreator:m}}),(function(e,a){const{billId:l,currentTenant:n,location:c,navigate:r}=a,{tenantEmailDomain:u}=n;return{redirectToBillsScreen:()=>{const o=ne(u),s=T(c.state?.pathnameStackToGoBack,c.pathname);r(o,{state:{pathnameStackToGoBack:s}})},redirectToEditableBillScreen:()=>{const o=T(c.state?.pathnameStackToGoBack,c.pathname);r("./edit",{state:{pathnameStackToGoBack:o}})},discardBillDetailsFromLocalStore:()=>{e(Se({}))},deleteBill:o=>{j.trackBillPayDeleteBill(l,o),e(Da(l))},cancelAndDeleteBill:(o,s)=>{s===!0?j.trackBillPayCancelAndDeleteBill(l,o):j.trackBillPayCancelBill(l),e(bt(l,s))},onSaveRealTimeApprovals:o=>{e(mt(l,"bill_pay",o))},updateEditRealTimeApproverClicked:o=>{e(pt({isEdit:o,entityId:l,entityType:"bill_pay"}))},approveOrRejectBill:o=>{o.type==="approved"?e(ta(l,o.type,"")):e(ta(l,o.type,o.description??""))},retryOrRefundBill:o=>{o.type==="retry"?e(Ce(l,"retry")):e(Ce(l,"refund"))},onAddNewRule:()=>{r("../../bills/approval-rules")},onAttachmentClick:(o,s)=>{const i=Te(u,o,s),d=T(c.state?.pathnameStackToGoBack,c.pathname);r(i,{state:{pathnameStackToGoBack:d}})},onBackClick:()=>{const o=H(a.location.state?.pathnameStackToGoBack),s=o.poppedPathname??ne(u);r(s,{state:{pathnameStackToGoBack:o.newStack}})},onRetryPaymentClick:()=>{const o=T(c.state?.pathnameStackToGoBack,c.pathname);r("./edit",{state:{pathnameStackToGoBack:o}}),e(ut({billId:a.billId}))},onRefundPaymentClick:()=>{e(Ce(a.billId,"refund"))},saveBillDetails:(o,s,i)=>{o&&e(Ea({data:i,billId:l})),e(_e(o?"paid":"pending_approval",o,s,l))},discardOutsideZeniPaymentData:()=>{e(Aa({billId:l}))}}}))($n);function gi(){const e=J(),a=le(),l=Q(),{billId:n}=ae(),c=ue(),r=L.getSignedInUser(),u=fe(),o=k((z=>Z(z))),s=k((z=>Ue(z,n??""))),i=s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1,d=qa(o?.companyId,{clearParams:s.fetchState==="Completed"&&!i}),{isAiCfoAccessEnabled:p,onAskAiCfoClick:m}=Xe({mobileExploreReferrer:"Bill Details"});Ze({isDataReady:s.fetchState==="Completed"});const S=o?.userRole!=null&&ka(o?.userRole),h=o?.company==null||o.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!S,[b,I]=f.useState(!1),[E,C]=f.useState(!1),[x,_]=f.useState(!1),{useFeatureGate:D,useDynamicConfig:B}=oe(),{isFeatureEnabled:N}=D(g.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:V}=D(g.isBillPayCommentingEnabled),{isFeatureEnabled:W}=D(g.isBillPayDetectInsufficientFundsEnabled),{configValue:O}=B(We.zeniAssistConfig),v=ot(o),Y=wa(o.userRole),M=h&&de(u?.loggedInUserRoleMap),$=O.user_ids!=null&&r?.userId!=null&&O.user_ids.includes(r?.userId),{isFeatureEnabled:q}=D(g.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:K}=D(g.billPaySetupShowInternationalPaymentByWise);if(f.useEffect((()=>{N&&s.transactionDetails?.isDeleted===!0||o.isZeni===!0&&r?.userEmailDomain==="zeni.ai"&&v===!1?_(!1):_(s.billActivities[0]?.isRealTimeApprovalEnabled&&(Y||M||s.allApprovers.find((z=>z.user.userId===r?.userId))!=null||s.transactionDetails?.lastUpdatedByUserId===r?.userId))}),[s.billActivities[0]?.isRealTimeApprovalEnabled,s.allApprovers,s.transactionDetails?.lastUpdatedByUserId,Y,M,o.isZeni,v,r]),f.useEffect((()=>{n!=null&&a(Ba(n))}),[n]),f.useEffect((()=>{b||s.fetchState=="Completed"||s.fetchState=="In-Progress"||(I(!0),a(Ca(n??"",N,$,!1)))}),[b,s,n,a]),f.useEffect((()=>{E||s.fetchState!="Completed"||s.transactionDetails?.billPayInfo.stage.code=="paid"||(C(!0),a(Ve(!1,N,$,K,n)),s.billActivities[0]?.isRealTimeApprovalEnabled===!0&&a(lt()))}),[E,s,n,a,N,$,K]),r==null)throw Error("Can't access address page without signing in...");return s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1?t.jsx(ee,{to:`./edit${l.search}`}):s.deleteStatus.fetchState==="In-Progress"||s.cancelAndDeleteStatus.fetchState==="In-Progress"||s.cancelStatus.fetchState==="In-Progress"?t.jsx(se,{fetchState:s.deleteStatus.fetchState,style:{boxShadow:`0px 2px ${A.sp1} ${c.colors.dropShadowNormal}`}}):t.jsxs(t.Fragment,{children:[t.jsx(Ee,{analytics:j,onLoad:z=>(G=>{n!=null&&G.trackBillPayBillDetails(n,s.isRecurring)})(z)}),t.jsx(hi,{initialOpenThreadRequest:d??void 0,isShowDeletedBillsEnabled:N,location:l,navigate:e,isBillPayCommentingEnabled:V,isRealTimeApprovalEnabled:x,currentTenant:o,billId:n??"",isInternationalPaymentShaVsOurEnabled:q,hasZeniAssistAccess:$,isDetectInsufficientFundsEnabled:W,isAiCfoAccessEnabled:p,onAskAiCfoClick:m})]})}const Le=De.getLocalizedStrings().spendManagement.billPay.billDetails,pa=De.getLocalizedStrings().common,Si={containerWidth:new za(100,58)},ma=X((function(e,a){const l=L.getSignedInUser(),n=e.tenantState.currentTenantId,c={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:n??""},r=a.showActionButtons,u=r&&a.file==null;return{uploadInvoiceEndPoint:`${Ha.communicationAgentMicroServiceBaseUrl}`,authParams:c,billId:a.billId,file:a.file,showAutofill:a.showAutofill,analytics:j,entityId:a.billId,showTitlebarIcon:r,showTitlebar:r&&a?.file!=null,uploadStatus:a.uploadStatus,shouldNotShowAttachment:u,style:{paddingTop:A.sp10,paddingRight:A.sp3,paddingBottom:"15px",paddingLeft:A.sp5,...a.showAutofill?{}:{backgroundColor:a.backgroundColor,paddingBottom:"128px"}}}}),(function(e,a){const l=L.getSignedInUser();return{onInvoiceUpload:n=>{n!=null&&(a.file!=null||a.billId!=null||a.isInitialEdit?(a.setPayload(n),a.setShowConfirmationPopup(!0)):e(Oe(n,a.isVendorRecommendationEnabled,a.billId)))},updateInvoiceUploadFetchState:n=>{e(yt({fetchState:{fetchState:n,error:void 0},billId:a.billId}))},onSkipAutofill:n=>{j?.trackBillPaySkipAutofill(),e(Ne(n))},onDeleteClick:()=>{e(St({billId:a.billId})),j?.trackInvoiceActionClick(a.billStage??"","delete",l?.userEmail??"",null)}}}))(_n);function w({appContent:e}){const a=le(),l=J(),{billId:n}=ae(),c=Q(),r=c.pathname,u=r.includes("bill/new")||r.includes("/edit"),o=Ie(),s=ue(),i=L.getSignedInUser(),{useFeatureGate:d,useDynamicConfig:p}=oe(),{isFeatureEnabled:m}=d(g.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:S}=d(g.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:h}=d(g.isDepositAccountsFeatureEnabled),{isFeatureEnabled:b}=d(g.billPaySetupShowInternationalPaymentByWise),{configValue:I}=p(We.zeniAssistConfig),E=I.user_ids!=null&&i?.userId!=null&&I.user_ids.includes(i?.userId),C=k((F=>Z(F)));ui();const[x,_]=f.useState(!1),[D,B]=f.useState(!1),[N,V]=f.useState(!1),[W,O]=f.useState(),v=k((F=>Me(F,m,h,n)));let Y=v.fetchState,M=v.file,$=v.showAutofill;const q=k((F=>Ue(F,n??"")));u===!1&&(Y=q.fetchState,M=q.transactionDetails?.attachments?.[0],$=!1);const K=v.billPayInfo!=null&&v.billPayInfo.stage.code==="pending_approval"?v.billPayInfo.billStatus.code:v.billStage;f.useEffect((()=>{n==null&&a(Ne(!0))}),[n,a]),f.useEffect((()=>{Y==="Not-Started"&&(u&&D?B(!1):!u&&x&&_(!1))}),[n]),f.useEffect((()=>{x||n==null||u||(_(!0),a(Ca(n,S,E,!1)),D||(B(!0),a(Ve(!1,S,E,b,n)))),u&&!D&&(B(!0),a(Ve(!1,S,E,b,n)))}),[x,D,u,n,a,S,E,b]);const z={onOkClick:()=>{if(V(!1),!W)return;const F=M!=null?"replace":"upload";j?.trackInvoiceActionClick(K??"",F,i?.userEmail??"","yes"),a(gt({replaceBillData:!0,billId:n})),a(Oe(W,m,n))},onCancelClick:()=>{if(V(!1),!W)return;const F=M!=null?"replace":"upload";j?.trackInvoiceActionClick(K??"",F,i?.userEmail??"","no"),a(ht({file:W,billId:n}))}},G=f.useCallback((()=>{const F=H(c.state?.pathnameStackToGoBack),ve=F.poppedPathname??ne(C.tenantEmailDomain);a(Se({billId:n})),l(ve,{state:{pathnameStackToGoBack:F.newStack}})}),[c.state,C.tenantEmailDomain,n,a,l]);if(i==null)throw Error("Can't access address page without signing in...");if(Y==="Error"||q.fetchState==="Error")return t.jsx(xe,{});if(Y!="Completed")return n==null&&o!=="small"?t.jsx(ca,{fallback:G,children:t.jsxs(Pe,{windowSize:o,children:[t.jsx(ha,{}),t.jsx(Fe,{}),t.jsx(ma,{backgroundColor:s.colors.grey4,billId:n,file:M,showAutofill:!0,uploadStatus:v.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:void 0,setShowConfirmationPopup:V,setPayload:O,showActionButtons:!1,isInitialEdit:!!v.isInitialEdit,billStage:K}),t.jsx(Re,{windowSize:o,children:t.jsx(da,{isNewBill:!0})})]})}):t.jsxs(Pe,{windowSize:o,children:[o==="small"||$?null:t.jsx(ba,{children:t.jsx(Qa,{onClick:G,"data-testid":"nav-bar-back-click"})}),o!=="small"?t.jsx(Fe,{}):null,t.jsx(Ln,{}),t.jsx(Re,{windowSize:o,children:t.jsx(da,{isNewBill:n==null})})]});{const F=v.billPayInfo!=null&&v.billPayInfo.stage.code==="pending_approval"?v.billPayInfo.billStatus.code:v.billStage;return t.jsx(ca,{fallback:G,children:t.jsxs(Pe,{windowSize:o,children:[$&&o!=="small"?t.jsx(ha,{}):null,N?t.jsx(Gn,{titleComponent:t.jsx(Bi,{children:Le.overwriteTitle}),descriptionComponent:t.jsx(Ci,{children:Le.overwriteDescription}),primaryButtonText:pa.yes,secondaryButtonText:pa.no,action:z,isEditPopup:!0}):null,o==="small"||$?null:t.jsx(ba,{children:t.jsx(yi,{})}),o!=="small"?t.jsx(Fe,{}):null,t.jsx(ma,{backgroundColor:s.colors.grey4,billId:n,file:M,showAutofill:$,uploadStatus:v.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:fi(u,q,v),setShowConfirmationPopup:V,setPayload:O,showActionButtons:Ii(u,v),isInitialEdit:!!v.isInitialEdit,billStage:F}),t.jsx(Re,{windowSize:o,children:e})]})})}}function yi(){const{triggerBack:e}=Mn();return t.jsx(Qa,{onClick:e,"data-testid":"nav-bar-back-click"})}function fi(e,a,l){let n,c;return e?(n=l.recurringConfig?.currentInstance,c=l.recurringConfig?.totalPaymentCycles):(n=a.transactionDetails?.recurringBillInstance,c=a.recurringBillConfigDetail?.totalPaymentCycles),a?.isRecurring===!0?t.jsxs(vi,{children:[t.jsx(ki,{children:`${Le.recurringBill.recurringCycle}
|
|
2
|
-
${n}/${c}`}),t.jsx(wi,{})]}):void 0}function Ii(e,a){const l=a.billActivities?.[0],n=a.billStage==="pending_approval"&&l?.areApprovalsSerialized===!0&&l?.currentPendingStepIndex===0;return e&&(a.billStage==="draft"||n)}const ba=U.div`
|
|
3
|
-
margin-bottom: 20px;
|
|
4
|
-
margin-top: 20px;
|
|
5
|
-
margin-left: ${A.sp5};
|
|
6
|
-
position: absolute;
|
|
7
|
-
display: flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
`,vi=U.div`
|
|
10
|
-
display: flex;
|
|
11
|
-
justify-content: center;
|
|
12
|
-
align-items: center;
|
|
13
|
-
padding-top: 9px;
|
|
14
|
-
gap: ${A.sp2};
|
|
15
|
-
margin-bottom: -${A.sp2};
|
|
16
|
-
`,ki=U(Ke.StandardMedium)``,wi=U((e=>f.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},f.createElement("path",{d:"M3.35001 15L3.35001 10.125C3.35001 6.81129 6.0363 4.125 9.35001 4.125H16.475M16.475 4.125L13.85 1.5M16.475 4.125L13.85 6.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{d:"M20.6 9V13.875C20.6 17.1887 17.9137 19.875 14.6 19.875H7.47501M7.47501 19.875L10.1 22.5M7.47501 19.875L10.1 17.25",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))))`
|
|
17
|
-
color: ${e=>e.theme.colors.hero};
|
|
18
|
-
height: ${A.sp3};
|
|
19
|
-
width: ${A.sp3};
|
|
20
|
-
`,Qa=U((e=>f.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},f.createElement("path",{d:"M10 13L5 8L10 3",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))))`
|
|
21
|
-
width: ${A.sp3};
|
|
22
|
-
height: ${A.sp3};
|
|
23
|
-
cursor: pointer;
|
|
24
|
-
color: ${e=>e.theme.colors.champion};
|
|
25
|
-
&:hover {
|
|
26
|
-
color: ${e=>e.theme.colors.primary};
|
|
27
|
-
}
|
|
28
|
-
`,Pe=U.div`
|
|
29
|
-
display: flex;
|
|
30
|
-
height: 100vh;
|
|
31
|
-
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
32
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
33
|
-
position: relative;
|
|
34
|
-
&::after {
|
|
35
|
-
content: "";
|
|
36
|
-
position: absolute;
|
|
37
|
-
top: 57px;
|
|
38
|
-
left: 42%;
|
|
39
|
-
width: 1px;
|
|
40
|
-
height: calc(100% - 57px);
|
|
41
|
-
background-color: ${e=>e.theme.colors.grey2};
|
|
42
|
-
pointer-events: none;
|
|
43
|
-
z-index: 3;
|
|
44
|
-
display: ${e=>e.windowSize==="small"?"none":"block"};
|
|
45
|
-
}
|
|
46
|
-
`,Fe=U.div`
|
|
47
|
-
position: absolute;
|
|
48
|
-
top: 56px;
|
|
49
|
-
left: 0;
|
|
50
|
-
width: 42%;
|
|
51
|
-
height: 1px;
|
|
52
|
-
background-color: ${e=>e.theme.colors.grey2};
|
|
53
|
-
z-index: 3;
|
|
54
|
-
`,ha=U.div`
|
|
55
|
-
position: fixed;
|
|
56
|
-
top: 0;
|
|
57
|
-
left: 0;
|
|
58
|
-
right: 0;
|
|
59
|
-
bottom: 0;
|
|
60
|
-
background-color: ${Un.overlayBackgroundBlack};
|
|
61
|
-
z-index: 5;
|
|
62
|
-
`,Re=U.div`
|
|
63
|
-
display: flex;
|
|
64
|
-
flex-direction: column;
|
|
65
|
-
width: ${e=>`${Si.containerWidth.value(e.windowSize)}%`};
|
|
66
|
-
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
67
|
-
`,Bi=U(Ke.H6Regular)`
|
|
68
|
-
margin-top: ${A.sp7};
|
|
69
|
-
padding-left: ${A.sp8};
|
|
70
|
-
padding-right: ${A.sp8};
|
|
71
|
-
color: ${e=>e.theme.colors.primary};
|
|
72
|
-
word-break: break-word;
|
|
73
|
-
`,Ci=U(Ke.LargeRegularSp)`
|
|
74
|
-
color: ${e=>e.theme.colors.hero};
|
|
75
|
-
padding-left: ${A.sp8};
|
|
76
|
-
padding-right: ${A.sp8};
|
|
77
|
-
margin-bottom: 30px;
|
|
78
|
-
margin-top: ${A.sp4};
|
|
79
|
-
white-space: pre-line;
|
|
80
|
-
`,xi=X((function(e,a){return{billsReviewView:Ta(e),analytics:a.analytics}}),(function(e,a){return{onCloseOverlay:()=>{a.navigate(`/${a.tenantEmailDomain}/bills`),e(ce())},onCloseReviewItem:l=>{e(It(l))},onProceedForBulkActionClick:(l,n)=>{switch(l){case"send_for_approval":e(ft());break;case"approve":case"review":e(na("approved",n??""));break;case"reject":e(na("rejected",n??""))}}}}))(Nn);function Ai({tenantEmailDomain:e}){const a=J(),l=k((c=>c.billsBulkActionViewState.bulkSubmissionFetchState.fetchState)),{billsForReview:n}=k((c=>Ta(c)));return f.useEffect((()=>{l!=="Completed"&&n.length!==0||a(`/${e}/bills`)}),[l,n.length,e]),t.jsx(xi,{navigate:a,analytics:j,tenantEmailDomain:e})}const te=At(),Xa="bulk-operation-update",Ge="bill-approval-rule-update",{common:we}=De.getLocalizedStrings(),Ei=U.div`
|
|
81
|
-
display: flex;
|
|
82
|
-
min-height: 100%;
|
|
83
|
-
width: 100%;
|
|
84
|
-
flex: 1 1 auto;
|
|
85
|
-
flex-direction: column;
|
|
86
|
-
align-items: center;
|
|
87
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
88
|
-
`,Di=X((function(e,a){const l=L.getSignedInUser(),n=Ae(l),c=Fa(e,te,a.isBulkActionEnabled,l?.userId);let r=c.allSubTabs;a.isUserHasOnlyBillpayAccess&&a.roleMap&&c.currentTab==="pending_approval"&&(a.roleMap.bill_pay_analyst?r=r.filter((b=>b==="all"||b==="overdue"||b==="rejected"||b==="deleted")):a.roleMap.bill_pay_approver&&(r=r.filter((b=>b==="all"||b==="awaiting_my_approval"||b==="overdue"||b==="rejected"||b==="deleted")))),a.isShowDeletedBillsEnabled===!1&&(r=r.filter((b=>b!=="deleted")));const u=e.entityAutoCompleteState.autoCompleteText.common,o=ze(e,"common"),s=e.tenantState.currentTenantId,i=Z(e),d=i?.companyName??"",p={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:s??""},m=e.billListState.downloadUIState.downloadState,S=c.fetchState,h=Et(e);return{transactionList:a.isShowDeletedBillsEnabled?c.transactions:c.transactions.filter((b=>b.isDeleted===!1)),currentTab:c.currentTab,currentSubTab:c.currentSubTab,approvalCount:c.approvalCount,allSubTabs:r,fetchState:S,analytics:j,botEmail:c.billPayBotEmail,searchText:c.searchText,filters:c.filters,vendorSearchAutoCompleteData:{autoCompleteText:u,entityAutoCompleteView:o},downloadParams:{authParams:p,companyName:d,timePeriod:te,spendManagementEndPoint:`${qe}/spendManagement`,isShowDeletedBillsEnabled:a.isShowDeletedBillsEnabled,isShowDeletedReimbursementEnabled:a.isShowDeletedReimbursementEnabled},downloadState:m,isBulkActionAllowed:c.billListBulkActionInfo?.isBulkActionAllowed,transactionsSelectedForBulkAction:c.billListBulkActionInfo?.billsSelectedForBulkAction,allowedBulkActions:c.billListBulkActionInfo?.allowedBulkActions,isZeniUser:n,billPayApprovalRulesAffectedEntityIds:h.affectedEntityIds}}),(function(e,a){const{navigate:l,currentTenant:n,location:c,period:r}=a,{tenantEmailDomain:u}=n;return{updateTabToState:o=>{e(ce()),e(ja(o))},onSubtabChange:o=>{e(ce()),e(Pa(o))},onTransactionClick:(o,s)=>{const i=Te(u,o,s),d=T(c.state?.pathnameStackToGoBack,c.pathname);l(i,{state:{pathnameStackToGoBack:d}})},onClickSetupIcon:()=>{const o=ji(u),s=T(c.state?.pathnameStackToGoBack,c.pathname);l(o,{state:{pathnameStackToGoBack:s}})},onAddTransactionClick:()=>{const{tenantEmailDomain:o}=a.currentTenant;j?.trackBillPayNewBill();const s=`/${o}/bill/new`,i=T(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i}})},onSearchTextChanged:o=>{e(Lt(o))},onReloadTransactions:()=>{e($e(r,!0,a.isShowDeletedBillsEnabled,a.isInternationalWireEnabled)),e($t(n.companyId,!0))},onNavigateToSettings:()=>{l("../bills/setup")},onBackClick:()=>{l("../",{relative:"path"})},onFiltersChange:o=>{e(Vt({filters:o})),o.categories.every((s=>s.field!=null&&s.values?.length!==0))&&j.trackSpendManagmentFilterChange("bill_pay",o.categories.map((s=>`${s.field}-${JSON.stringify(s.values)}`)))},updateDownloadStateHandler:o=>{o==="In-Progress"&&j.trackSpendManagementDownloadClick("bill_pay"),e(Rt({uiState:{downloadState:o}}))},updateBulkActionList:o=>{e(Ft(o))},removeAllTransactionsFromBulkActionList:()=>{e(ce())},onProceedForBulkActionClick:(o,s)=>{switch(o){case"delete":case"cancel":e(Pt(o,s??""));break;case"send_for_approval":e(ia("send_for_approval")),a.navigate("./bulk-review");break;case"approve":e(ia("approve")),a.navigate("./bulk-review");break;case"review":e(jt()),a.navigate("./bulk-review")}},onBillPayApprovalRulesEventReceived:o=>{o.endsWith(Ge)&&e(Tt(!1))},onEventReceived:o=>{o===Xa&&e(Dt())},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:o=>{o.trim().length>=2?e(He({searchString:o,entityType:"vendor",searchOrigin:"common"})):o.trim().length===0&&e(ie("common"))},onCancelAutoComplete:()=>{e(ie("common"))}}}}))(Yn(zn));function Ti(){const e=J(),a=le(),l=Q(),n=Ie(),c=l.state,r=fe(),[u,o]=f.useState(!1),[s,i]=f.useState(null),d=nt("/:tenantEmailDomain/bills/bulk-review")!=null;f.useEffect((()=>(c?.tab!=null&&c?.subTab!=null&&(a(ja(c?.tab)),a(Pa(c?.subTab))),()=>{a(ce())})),[]);const p=L.getSignedInUser(),m=k((P=>Z(P))),{areTenantIdsInSync:S}=On(),[h,b]=f.useState(!1),{useFeatureGate:I}=oe(),{isFeatureEnabled:E}=I(g.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:C}=I(g.isBillPayCommentingEnabled),{isFeatureEnabled:x}=I(g.isReimbursementCommentingEnabled),{isFeatureEnabled:_}=I(g.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:D}=I(g.isBillPayBulkActionEnabled),{isFeatureEnabled:B}=I(g.billPaySetupShowInternationalPaymentByWise),{isFeatureEnabled:N}=I(g.isBillPayDetectInsufficientFundsEnabled),V=k((P=>Fa(P,te,D,p?.userId))),{isFeatureEnabled:W}=I(g.isDebitCardFeatureEnabled),O=V.fetchState,{isAiCfoAccessEnabled:v,onAskAiCfoClick:Y}=Xe({mobileExploreReferrer:"Bills List"});Ze({isDataReady:O==="Completed"});const M=!!m.companyBillPayInfo?.info?.isBillPayTOSAccepted,$=!!m.companyBillPayInfo?.info?.isBillPayEnabled,q=k((P=>vt(P.companyState,m.companyId))),K=q?.company.featuresActivationInfo.connectedAccountProvider;if(f.useEffect((()=>{!h&&$&&S&&(b(!0),a($e(te,!0,E,B)))}),[h,te,S,a]),p==null)throw Error("Can't access address page without signing in...");const z=(P,re)=>{a(xt({uiState:{sortKey:P,sortOrder:re},period:te}))},G=Ra(r?.loggedInUserRoleMap),F=de(r?.loggedInUserRoleMap),ve=P=>{o(P)},{billsProcessed:ke,billsProcessing:ea}=k((P=>kt(P)));f.useEffect((()=>{ke===ea&&s!=null&&(a(wt({messageSection:"bill_pay_bulk_processed",messageText:"success",type:"success",showStatusIcon:!0,variables:[{variableName:"_bill_",variableValue:ke>1?we.headers.bills:we.texts.bill2},{variableName:"_has_",variableValue:ke>1?we.texts.have:we.texts.has},{variableName:"_action_",variableValue:Bt(s)}]})),a(Ct()),setTimeout((()=>{a($e(te,!0,E,!0,B))}),3e3),i(null))}),[ke,ea]);const et={events:m.companyId!=null?[`private-encrypted-${m.companyId}.${Xa}`,`private-encrypted-${m.companyId}.${Ge}`]:[],eventCallback:(P,re,aa)=>{P.endsWith(Ge)?aa.onBillPayApprovalRulesEventReceived?.(P):re?.entity_type==="bill"&&(i(re.operation_type),aa.onEventReceived(P))}},at=Va(W,m),tt=$a(m);return l.pathname.endsWith("/bills/")||l.pathname.endsWith("/bills")||l.pathname.endsWith("/bills/bulk-review")?at===!0||tt===!0?t.jsx(Ja,{}):$?t.jsxs(t.Fragment,{children:[O==="Completed"?t.jsx(Ee,{analytics:j,onLoad:P=>(re=>re.trackPageLoaded(Za.Event.billPayHome))(P)}):null,t.jsxs(Ei,{windowSize:n,children:[t.jsx(Ka,{isAppContentDrawerOpen:u,handleDrawerToggle:ve}),t.jsx(pi,{isOpen:d,drawerLeftMargin:new za(0,0,300,600),onClose:()=>{e(`/${m.tenantEmailDomain}/bills`),a(ce())},children:t.jsx(Pi,{onClick:P=>P.stopPropagation(),children:t.jsx(Ai,{tenantEmailDomain:m.tenantEmailDomain})})}),t.jsx(Di,{location:l,navigate:e,currentTenant:m,entity:"bill_pay",isBillPayCommentingEnabled:C,isReimbursementCommentingEnabled:x,period:te,isAdmin:!1,uiState:V.uiState,onColumnSortConfigChanged:z,isUserHasOnlyBillpayAccess:G,isShowDeletedBillsEnabled:E,isShowDeletedReimbursementEnabled:_,isBulkActionEnabled:D,roleMap:r?.loggedInUserRoleMap,onClickMenuIcon:()=>{ve(!0)},isDownloadEnabled:V.isDownloadEnabled,connectedAccountProvider:K,bulkSubmissionLimit:V.billBulkSubmissionLimit,bulkSubmissionFetchState:V.billListBulkActionInfo.bulkSubmissionFetchState,isRecurringBillInBulkActionList:V.billListBulkActionInfo.isRecurringBillInBulkActionList,isInternationalWireEnabled:B,isDetectInsufficientFundsEnabled:N,isAiCfoAccessEnabled:v,onAskAiCfoClick:Y,...et})]})]}):M===!0&&F===!0?t.jsx(ee,{to:"../setup"}):r!=null&&Ye(m,r.loggedInUserRoleMap)?t.jsx(ee,{to:"../promo"}):t.jsx(se,{fetchState:O}):t.jsx(xe,{})}const ji=e=>`/${e}/bills/setup`,Pi=U(si)`
|
|
89
|
-
display: flex;
|
|
90
|
-
min-height: 100%;
|
|
91
|
-
flex-direction: column;
|
|
92
|
-
`,{common:{currency:he},spendManagement:{billPay:{billDetails:Fi}},appName:Ri}=De.getLocalizedStrings(),Vi=X((function(e,a){const l=L.getSignedInUser(),n=e.tenantState.currentTenantId,c={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:n??""},r=H(a.location.state?.pathnameStackToGoBack);let u=!0;r.poppedPathname?.includes("bills")===!0&&(u=!1);const o=e.entityAutoCompleteState.autoCompleteText.common,s=ze(e,"common");let i=`${l?.firstName} ${l?.lastName}`;const d=Ae(l);a.billId!=null&&a.billDetailsView!=null&&(i=`${a.billDetailsView.createdBy?.firstName??Ri} ${a.billDetailsView.createdBy?.lastName??""}`),d||!a.billDetailsView.createdBy?.email?.includes("zeni.ai")||(i="Zeni");const p=a.billDetailsView.editBillInitialDetails?.totalAmount?.amount,m=_t(a.billDetailsView.paymentDetailsSection?.paymentType?.method),S=a.currentTenant.createTime,h=Ua(),b=a.sameDayAchDisablementConfig.newTenantTenureLimitMonths,I=S.add(b,"month").isAfter(h),E=!!(a.billDetailsView.billStage==="draft"&&m&&p!=null&&p>0)&&!_a(p,a.billDetailsView.approvalRules.allApprovalRules,l,a.billDetailsView.vendor?.id,a.billDetailsView.classId),C=Z(e);return{billDetails:a.billDetailsView,isAccountingClassesEnabled:xa(e),billId:a.billId,createdBy:i,createTime:a.billDetailsView?.createTime,authParams:c,transactionAttachmentEndpoint:`${qe}/transaction_attachment`,analytics:j,showBackButton:u,isAdmin:a.isBillPayAdmin,isSuperAdmin:a.isSuperAdmin,connectedAccountProvider:C.company?.featuresActivationInfo.connectedAccountProvider??"",customerSearchAutoCompleteData:{autoCompleteText:o,entityAutoCompleteView:s},showMarkAsPaidInfo:E,isZeniUser:d,isNewUser:I,sameDayAchDisablementConfig:a.sameDayAchDisablementConfig}}),(function(e,a){const{billId:l,companyId:n,currentTenant:c,location:r,navigate:u,billDetailsView:o}=a,{tenantEmailDomain:s}=c;return{editVendor:i=>{e(oa(i));const d=Sa(s,i,l),p=T(r.state?.pathnameStackToGoBack,r.pathname);u(d,{state:{pathnameStackToGoBack:p}})},chooseNewVendor:i=>{const d=i??a.billDetailsView.addBillAutoFields.tentativeVendorName;d!=null&&e(Na(d,!1)),e(Oa({localData:{vendorName:i??a.billDetailsView.addBillAutoFields.tentativeVendorName}})),e(oa());const p=Sa(s,void 0,l),m=T(r.state?.pathnameStackToGoBack,r.pathname);u(p,{state:{pathnameStackToGoBack:m}})},onInvoiceUpload:i=>{i!=null&&e(Oe(i,a.isVendorRecommendationEnabled))},updateShowAutofill:i=>{e(Ne(i))},onSaveChangesToLocalStore:(i,d,p,m,S)=>{const h=Ui(a.billDetailsView,{...i,paymentDetails:{...i?.paymentDetails,paymentDate:S}},p,d,a.isInternationalPaymentShaVsOurEnabled,m,a.vendor);e(qt({billDetailLocalData:h,billId:l}))},saveBillDetails:()=>{e(_e("draft",!1,!1,l)),e(ie("common"))},updateBillDetailSaveBillCode:()=>{e(Ma("draft"))},reviewBillDetails:()=>{const i=$i(s,l),d=T(r.state?.pathnameStackToGoBack,r.pathname);u(i,{state:{pathnameStackToGoBack:d,message:"coming_from_edit_page"}})},discardBillDetailsFromLocalStore:({billId:i})=>{e(Se({billId:i}))},clearBillPayReviewLocalState:()=>e(Wt()),onClickDismiss:()=>{const i=ne(s),d=T(r.state?.pathnameStackToGoBack,r.pathname);u(i,{state:{pathnameStackToGoBack:d}})},onClickDiscard:()=>{const i=ne(s),d=T(r.state?.pathnameStackToGoBack,r.pathname);u(i,{state:{pathnameStackToGoBack:d}})},setBillDetailPageMode:i=>{if(i==="edit_bill"){let d=window.location.pathname;d=d.concat("/edit");const p=T(r.state?.pathnameStackToGoBack,r.pathname);u(d,{state:{pathnameStackToGoBack:p}})}},redirectToACHScreen:i=>{e(ge(!1,i));const d=Li(s,i,l),p=T(r.state?.pathnameStackToGoBack,r.pathname);u(d,{state:{pathnameStackToGoBack:p}})},redirectToWireScreen:i=>{e(ge(!1,i));const d=Gi(s,i,l),p=T(r.state?.pathnameStackToGoBack,r.pathname);u(d,{state:{pathnameStackToGoBack:p}})},redirectToInternationalScreen:i=>{e(ge(!1,i));const d=Wa(s,l,i),p=T(r.state?.pathnameStackToGoBack,r.pathname);u(d,{state:{pathnameStackToGoBack:p}})},redirectToBillsScreen:()=>{const i=ne(s),d=T(r.state?.pathnameStackToGoBack,r.pathname);e(Se({})),u(i,{state:{pathnameStackToGoBack:d}})},redirectToBillDetailPage:()=>{a.navigate("../")},deleteBill:()=>{l!=null&&e(Da(l))},onAttachmentClick:(i,d)=>{const p=Te(s,i,d);window.open(`${p}`,"_blank")},onBackClick:()=>{const i=H(a.location.state?.pathnameStackToGoBack),d=i.poppedPathname??ne(s);u(d,{state:{pathnameStackToGoBack:i.newStack}})},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,d)=>{i.trim().length>=2?e(He({searchString:i,entityType:d,searchOrigin:"common"})):i.trim().length===0&&e(ie("common"))},onCancelAutoComplete:()=>{e(ie("common"))}},addVendorContactEmail(i,d){e(Zt(i,d,l))},onWiseVerifyClick:()=>{let i="";i=qn()?"https://sandbox.transferwise.tech":"https://wise.com";const d=`${i}/login`;window.open(d,"_blank")},onVendorSelected:i=>{e(Ht(!0,i,l))},onInternationalWireVerifyClick:()=>{window.open(`/${s}/bills/international-wire`)},onFetchLinkTokenClick:(i,d)=>{e(zt("bill_pay_detail",i,d))},onEstablishConnectionClick:i=>{e(Yt(i,n,"bill_pay_detail","bill_pay"))},onUpdatePaymentAccountStatus:(i,d,p)=>{e(Ot(i,d,"bill_pay","bill_pay_detail",p))},onEstablishConnectionSuccess:()=>{e(Mt("bill_pay","bill_pay_detail")),e(Nt({billId:l,withdrawFromAccountId:o.newAddedBillPaymentAccountId,withdrawFromList:o.withdrawFromList}))}}}))(Hn);function ga(){const e=J(),a=Q(),l=le(),{billId:n,tenantEmailDomain:c}=ae(),{useFeatureGate:r,useDynamicConfig:u}=oe(),{isFeatureEnabled:o,isFeatureGateLoading:s}=r(g.isVendorMagicLinkFeatureEnabled),{isFeatureEnabled:i}=r(g.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:d}=r(g.isBillPayCommentingEnabled),{isFeatureEnabled:p}=r(g.isBillPayLocalCurrencyFeatureEnabled),{isFeatureEnabled:m}=r(g.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:S}=r(g.isRecurringBillsFeatureEnabled),{isFeatureEnabled:h}=r(g.isDepositAccountsFeatureEnabled),{isFeatureEnabled:b}=r(g.isShaDisabled),{isFeatureEnabled:I}=r(g.isOurDisabled),{isFeatureEnabled:E}=r(g.isBillPayDetectInsufficientFundsEnabled),{configValue:C}=u(We.sameDayAchDisablementConfig),x=Gt(C),_=L.getSignedInUser(),D=k((G=>Z(G))),B=k((G=>Me(G,m,h,n))),N=qa(D?.companyId,{clearParams:B.fetchState==="Completed"}),{isAiCfoAccessEnabled:V,onAskAiCfoClick:W}=Xe({mobileExploreReferrer:"Bill Details"});Ze({isDataReady:B.fetchState==="Completed"});const O=D.companyId??L.getSignedInUserTenant(c)?.companyId,v=fe(),Y=La(v?.loggedInUserRoleMap),M=Ga(v?.loggedInUserRoleMap),$=de(v?.loggedInUserRoleMap),q=wa(D.userRole);if(f.useEffect((()=>{n!=null&&l(Ba(n))}),[n]),_==null)throw Error("Can't access address page without signing in...");const K=k((G=>Ut(G.accountState,G.accountListState,"billPayAccountList"))),z={pathname:"../",search:a.search};return B.isDeleted===!0||B.billStage=="paid"||B.fetchState=="Not-Started"?t.jsx(ee,{to:z}):B.deleteStatus.fetchState==="In-Progress"||s?t.jsx(se,{fetchState:B.deleteStatus.fetchState}):t.jsxs(t.Fragment,{children:[t.jsx(Ee,{analytics:j,onLoad:G=>(F=>{n!=null&&B.deleteStatus.fetchState!=="Completed"&&F.trackBillPayEditBill(n,B.isRecurring)})(G)}),t.jsx(Vi,{initialOpenThreadRequest:N??void 0,location:a,navigate:e,currentTenant:D,billId:n,companyId:O,billDetailsView:B,isMagicLinkEnabled:o,isVendorRecommendationEnabled:m,isLocalCurrencyEnabled:p,uncategorizedAccounts:K,isInternationalPaymentShaVsOurEnabled:i,vendor:B.vendor,isBillPayCommentingEnabled:d,isShaDisabled:b,isOurDisabled:I,isRecurringBillsFeatureEnabled:S,hasZeniAccountsAdminAccess:Y,isZeniAccountsUser:M,isBillPayAdmin:$,isSuperAdmin:q,isDetectInsufficientFundsEnabled:E,sameDayAchDisablementConfig:x,isAiCfoAccessEnabled:V,onAskAiCfoClick:W})]})}const Sa=(e,a,l)=>{let n=`/${e}/bill/`;return l==null?n=a!=null?n.concat(`new/vendor/${encodeURIComponent(a)}/edit`):n.concat("new/vendor/create"):(n=n.concat(`${encodeURIComponent(l)}/edit/vendor/`),n=a!=null?n.concat(`${encodeURIComponent(a)}/edit`):n.concat("create")),n},$i=(e,a)=>{let l=`/${e}/bill/`;return l=a===void 0?l.concat("new/review"):l.concat(`${a}/edit/review`),l},Li=(e,a,l)=>{let n=`/${e}/bill/`;return n=l!=null?n.concat(`${encodeURIComponent(l)}/edit/`):n.concat("new/"),n=n.concat(`vendor/${encodeURIComponent(a)}/edit/ach`),n},Gi=(e,a,l)=>{let n=`/${e}/bill/`;return n=l!=null?n.concat(`${encodeURIComponent(l)}/edit/`):n.concat("new/"),n=n.concat(`vendor/${encodeURIComponent(a)}/edit/domestic`),n},R="paymentDetails",Ui=(e,a,l,n,c,r,u)=>{const o={invoiceNumber:a.whatFor.invoiceNumber,memo:a.whatFor.memo,invoiceDate:a.whatFor.invoiceDate?pe(a.whatFor.invoiceDate.toString()):Ua(),billDueDate:a.whatFor.billDueDate?pe(a.whatFor.billDueDate.toString()):void 0,currencyCode:a.whatFor.currency,recipientCurrencyCode:a.whatFor.recipientCurrency,isInvoiceDateAutoUpdated:a.whatFor.isInvoiceDateAutoUpdated},s={paymentDate:a[R]?.paymentDate?pe(a[R].paymentDate.toString()):void 0,paymentType:a[R]?.paymentType!=null?a[R]?.paymentType:void 0,paymentTo:r?.id,withdrawFrom:e.withdrawFromList.find((b=>b.id===a[R]?.withdrawFrom?.selectedOption)),internationalTransferFeeBearerPaymentMethod:a[R]?.paymentType?.method!=null&&a[R].paymentType.method.includes(Kt)&&u?.vendorCurrencyCode===he.currencyCode&&c?a[R]?.internationalTransferFeeBearerPaymentMethod:void 0,conversionRate:e.paymentDetailsSection?.conversionRate},i=r?.type==="Contact"?r?.email:void 0,d=!!i,p=a[R]?.recurringPaymentType?.selectedOption===Fi.recurringBill.paymentTypeOptions[1],m={isActive:e.recurringConfig?.isActive??!1,currentInstance:e.recurringConfig?.currentInstance,isApprovalRequired:a[R]?.recurringPaymentDetails?.requireApproval?.selectedOption==="all",frequency:Jt(a[R]?.recurringPaymentDetails?.frequency?.selectedOption),endDate:a[R]?.recurringPaymentDetails?.endDateSelector?.date!=null?pe(a[R]?.recurringPaymentDetails?.endDateSelector.date.toString()):void 0,startDate:a[R]?.recurringPaymentDetails?.startDate?pe(a[R]?.recurringPaymentDetails?.startDate.toString()):void 0,endDateSelectorOptionType:a[R]?.recurringPaymentDetails?.endDateSelector?.type,totalPaymentCycles:a[R]?.recurringPaymentDetails?.endDateSelector?.recurringCount??0,updateRecurringBills:a[R]?.recurringPaymentDetails?.updateRecurringBills},S=_i(e.accountList.accounts,e.classList.classes,e.lineDetailSection,a.lineItems,n,l),h=Object.keys(S).length>0?Zn(S):e.editBillInitialDetails?.recipientTotalAmount;return{showVendorGptRecommendationText:e.showVendorGptRecommendationText,vendor:u,whatForSection:o,paymentDetailsSection:s,isCancelled:e.isCancelled,totalAmount:h,recipientTotalAmount:h,file:e.file,updatesByLineId:S,toAccountVendorEmail:i,isCollectToAccountInfoFromVendorContact:d,isRecurring:p,recurringConfig:m}},_i=(e,a,l,n,c,r)=>{const u={};return n.forEach((o=>{let s,i;o.account.selectedOption!=null&&(s=e.find((p=>p.qboId===o.account.selectedOption||p.accountId===o.account.selectedOption))),o.class?.selectedOption!=null&&(i=a.find((p=>p.classId===o.class.selectedOption)));const d=Wn(l[o.lineId],o,c,r);u[o.lineId]={...l[o.lineId],...o,platformLineDetailType:l[o.lineId]?.platformLineDetailType??"account_based_expense_line_detail",amount:{amount:o.amount??0,currencyCode:o.currency?.currencyCode??he.currencyCode,currencySymbol:o.currency?.currencySymbol??he.currencySymbol},recipientAmount:{amount:o.recipientAmount??0,currencyCode:o.recipientCurrency?.currencyCode??he.currencyCode,currencySymbol:o.recipientCurrency?.currencySymbol??he.currencySymbol},id:o.lineId,lineDescription:o.lineDescription??"",account:s,class:i,billable:o.billable?.selectedOption??"not_billable",customer:{id:d?.id??"",name:d?.name??"",qboId:d?.qboId,logo:d?.logo},type:"journal_entry_transaction_line",isCategoryMiscategorized:!1,isClassMiscategorized:!1}})),u},Mi=U.div`
|
|
93
|
-
display: flex;
|
|
94
|
-
height: 100vh;
|
|
95
|
-
width: 100%;
|
|
96
|
-
flex: 1 1 auto;
|
|
97
|
-
flex-direction: column;
|
|
98
|
-
align-items: center;
|
|
99
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
100
|
-
box-shadow: ${e=>`0px 2px ${A.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
101
|
-
`,Ni=X((function(e,a){const{vendorId:l,billId:n}=a,c=ye(e,l),r=Me(e,a.isVendorRecommendationEnabled,a.isZeniAccountsFeatureEnabled,n);return{billId:n,isDisabled:c.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:c,file:r.file,bankAccountContext:a.bankAccountContext}}),(function(e,a){const{billId:l,navigate:n,location:c,vendorId:r,currentTenant:u}=a,{tenantEmailDomain:o}=u;return{onFetchBankNameBySwift:s=>{e(an(s))},onSaveHandler:()=>{e(en(a.bankAccountContext,r))},onBankDetailsUpdated:s=>{const{internationalWireSwiftAccountSection:i}=s;e(Xt({data:i}))},onCancel:()=>{(()=>{const s=H(c.state?.pathnameStackToGoBack),i=s.poppedPathname??ya();n(i,{state:{pathnameStackToGoBack:s.newStack}})})(),e(la())},onAddressClick:s=>{const i=Qe(o,s,l),d=T(c.state?.pathnameStackToGoBack,c.pathname);n(i,{state:{pathnameStackToGoBack:d}})},onBackClick:()=>{e(Qt({fetchState:"Not-Started"}));const s=H(a.location.state?.pathnameStackToGoBack),i=s.poppedPathname??ya(0);a.navigate(i,{state:{pathnameStackToGoBack:s.newStack}}),e(la())}}}))(Kn);function Oi(){const e=J(),a=Q(),l=Ie(),{vendorId:n,billId:c}=ae(),{useFeatureGate:r}=oe(),u=ue(),o=L.getSignedInUser(),s=k((h=>Z(h))),i=H(a.state?.pathnameStackToGoBack),d=i.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail",p=k((h=>ye(h,n))),{isFeatureEnabled:m}=r(g.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:S}=r(g.isDepositAccountsFeatureEnabled);if(o==null)throw Error("Can't access address page without signing in...");return d==="billDetail"&&p.editVendorState?.saveStatus.fetchState==="In-Progress"?t.jsx(se,{fetchState:p.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:u.colors.grey5,boxShadow:`0px 2px ${A.sp1} ${u.colors.dropShadowNormal}`}}):t.jsxs(Mi,{windowSize:l,children:[t.jsx(Je,{vendorId:n,billId:c}),t.jsx(Ni,{location:a,navigate:e,billId:c,vendorId:n,currentTenant:s,bankAccountContext:d,isVendorRecommendationEnabled:m,isZeniAccountsFeatureEnabled:S})]})}const ya=(e=2)=>{let a="../";for(let l=0;l<e;l++)a=`${a}../`;return a},Yi=U.div`
|
|
102
|
-
display: flex;
|
|
103
|
-
height: 100vh;
|
|
104
|
-
width: 100%;
|
|
105
|
-
flex: 1 1 auto;
|
|
106
|
-
flex-direction: column;
|
|
107
|
-
align-items: center;
|
|
108
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
109
|
-
box-shadow: ${e=>`0px 2px ${A.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
110
|
-
`,zi=X((function(e,a){const{vendorId:l}=a,n=ye(e,l),c=l!=null?n.editVendorState?.vendorDetailLocalData?.vendorType:n.newVendorState?.vendorDetailLocalData?.vendorType,r=nn(e,c||"international_business",a.billId),u=n.editVendorState??n.newVendorState,o=a.billId!=null?e.editBillDetailViewState.editBillStateById[on(a.billId)].billDetailLocalData.recipientTotalAmount?.amount:e.editBillDetailViewState.newBillState.billDetailLocalData.recipientTotalAmount?.amount;return{internationalWireView:r,vendorViewDetails:n,bankAccountContext:a.bankAccountContext,vendorType:c||"international_business",addressType:"vendor_address",addressToEdit:u?.vendorNewAddressStatus?.addressToCreate,mailingAddress:u?.vendorAddress,billAmount:o??0}}),(function(e,a){const{billId:l,navigate:n,location:c,vendorId:r,currentTenant:u}=a,{tenantEmailDomain:o}=u;return{onSaveHandler:()=>{e(dn(a.bankAccountContext,r))},onAccountDetailsUpdated:(s,i,d,p)=>{e(rn(s)),p&&e(cn(i,d))},onCurrencyUpdated:(s,i,d)=>{e(sn(s,i,d,!1))},onCancel:()=>{(()=>{const s=H(c.state?.pathnameStackToGoBack),i=s.poppedPathname??fa();n(i,{state:{pathnameStackToGoBack:s.newStack}})})(),e(sa())},onAddressClick:s=>{const i=Qe(o,s,l),d=T(c.state?.pathnameStackToGoBack,c.pathname);n(i,{state:{pathnameStackToGoBack:d}})},onBackClick:()=>{e(ln({fetchState:"Not-Started"}));const s=H(a.location.state?.pathnameStackToGoBack),i=s.poppedPathname??fa(0);a.navigate(i,{state:{pathnameStackToGoBack:s.newStack}}),e(sa())}}}))(Jn);function Hi(){const e=J(),a=Q(),l=Ie(),{vendorId:n,billId:c}=ae(),r=le(),u=ue(),o=L.getSignedInUser(),s=k((x=>Z(x))),i=H(a.state?.pathnameStackToGoBack),[d,p]=f.useState(!1),m=k((x=>x.vendorViewState.newVendorState.fetchStatus.fetchState)),S=k((x=>n!=null?x.vendorViewState.editVendorStateById[n]?.fetchStatus.fetchState??"Not-Started":"Not-Started")),h=n!==void 0?S:m;f.useEffect((()=>{d===!1&&h==="Not-Started"&&n!=null&&(r(ge(!1,n)),p(!0))}),[d,h,n]);const[b,I]=f.useState(!1);f.useEffect((()=>{b||h==="In-Progress"||(I(!0),r(tn(c,n)))}),[b,h,r]);const E=i.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail",C=k((x=>ye(x,n)));if(o==null)throw Error("Can't access international wire page without signing in...");return E==="billDetail"&&C.editVendorState?.saveStatus.fetchState==="In-Progress"?t.jsx(se,{fetchState:C.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:u.colors.grey5,boxShadow:`0px 2px ${A.sp1} ${u.colors.dropShadowNormal}`}}):t.jsxs(Yi,{windowSize:l,children:[t.jsx(Je,{vendorId:n,billId:c}),t.jsx(zi,{location:a,navigate:e,billId:c,vendorId:n,currentTenant:s,bankAccountContext:E})]})}const fa=(e=2)=>{let a="../";for(let l=0;l<e;l++)a=`${a}../`;return a},Ia=U.div`
|
|
111
|
-
display: flex;
|
|
112
|
-
height: 100vh;
|
|
113
|
-
width: 100%;
|
|
114
|
-
flex: 1 1 auto;
|
|
115
|
-
flex-direction: column;
|
|
116
|
-
align-items: center;
|
|
117
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
118
|
-
box-shadow: ${e=>`0px 2px ${A.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
119
|
-
`,Zi=X((function(e,a){const l=L.getSignedInUser(),n=Ya(e,a.billId),c=pn(e),r=Ae(l),u=n.totalAmount.amount,o=n.billPayInfo?.stage.code!=="scheduled"&&c.allApprovalRules.length>0&&!_a(u,c.allApprovalRules,l,n.vendor?.id,n.classId);return{billDetails:n,billId:a.billId,billpayApprovalView:c,analytics:j,isApprovalRequiredForMarkAsPaid:o,isZeniUser:r}}),(function(e,a){const{location:l,billId:n,currentTenant:c,navigate:r}=a,{tenantEmailDomain:u}=c;return{redirectToBillsScreen:()=>{const o=ne(c.tenantEmailDomain),s=T(l.state?.pathnameStackToGoBack,l.pathname);r(o,{state:{pathnameStackToGoBack:s}})},discardBillDetailsFromLocalStore:()=>{e(Se({}))},saveBillDetails:(o,s)=>{o&&e(Ea({billId:n,data:s})),e(_e(o?"paid":"pending_approval",o,!1,n))},discardOutsideZeniPaymentData:()=>{e(Aa({billId:n}))},updateBillDetailSaveBillCode:()=>{e(Ma("pending_approval"))},onClickEdit:()=>{a.navigate("../",{relative:"path"})},onAttachmentClick:(o,s)=>{const i=Te(u,o,s);window.open(`${i}`,"_blank")},retryPayment:()=>{a.billId!=null&&e(Ce(a.billId,"retry"))}}}))(Xn);function va(){const e=J(),a=le(),l=Q(),{billId:n}=ae(),{useFeatureGate:c}=oe(),{isFeatureEnabled:r}=c(g.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:u}=c(g.isBillPayDetectInsufficientFundsEnabled),o=Ie(),s=L.getSignedInUser(),{isFeatureEnabled:i}=c(g.isBillPayLocalCurrencyFeatureEnabled),{isFeatureEnabled:d}=c(g.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:p}=c(g.isBillPayCommentingEnabled),m=H(l.state?.pathnameStackToGoBack),{poppedPathname:S}=m,{isFeatureEnabled:h}=c(g.isRecurringBillsFeatureEnabled),b=k((C=>Z(C))),I=k((C=>Ya(C,n))),E=I.fetchState??"Not-Started";if(f.useEffect((()=>(window.onbeforeunload=function(){return e(l,{state:{message:""}}),!0},()=>{window.onbeforeunload=null})),[e]),f.useEffect((()=>{l.state?.message!=="coming_from_edit_page"&&e(`../${n}`)}),[]),f.useEffect((()=>{const C=I.vendor?.name,x=I.vendor?.id,_=I.totalAmount.amount,D=I.recipientTotalAmount.amount,B=I.invoiceNumber;C&&x&&a(un(C,x,_,D,B,n))}),[]),S==null)return t.jsx(ee,{to:`../${n}`});if(s==null)throw Error("Can't access address page without signing in...");return E==="In-Progress"?t.jsx(Ia,{windowSize:o,children:t.jsx(Qn,{})}):t.jsx(Ia,{windowSize:o,children:t.jsx(Zi,{location:l,navigate:e,currentTenant:b,billId:n,isBillPayCommentingEnabled:p,isLocalCurrencyEnabled:i,isVendorRecommendationEnabled:d,isInternationalPaymentShaVsOurEnabled:r,isRecurringBillsFeatureEnabled:h,isDetectInsufficientFundsEnabled:u})})}const Wi=X((function(e,a){const{vendorId:l}=a,n=e.entityAutoCompleteState.autoCompleteText.common,c=ze(e,"common"),r=l!=null?"edit":"create",u=Z(e),o=L.getSignedInUser(),s=u.tenantId,i={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:s??""};return{vendorViewDetails:a.vendorViewDetails,screenType:r,filesEndPoint:`${Ha.fileMicroServiceBaseUrl}`,authParams:i,analytics:j,vendorSearchAutoCompleteData:{autoCompleteText:n,entityAutoCompleteView:c}}}),(function(e,a){const{billId:l,currentTenant:n,navigate:c,location:r,vendorId:u,themeState:o}=a,{tenantEmailDomain:s}=n;return{onSaveVendor:i=>{e(Cn(u??void 0,a.billId)),i!=null&&e(xn(i))},saveVendorDetailLocalData:i=>{e(Oa({vendorId:u,localData:i}))},saveContactsInVendorDetailLocalData:i=>{e(Bn({vendorId:u,contacts:i}))},resetVendorDetailLocalData:()=>{e(ra(u))},updateSelectedVendorForCreate:i=>{e(wn(i))},navigateToBankDetailPage:(i,d)=>{let p;i==="wire"?p=d==="international"?Wa(s,a.billId,u):di(s,a.billId,u):p=ci(s,a.billId,u);const m=T(r.state?.pathnameStackToGoBack,r.pathname);c(p,{state:{pathnameStackToGoBack:m}})},onRemoveBankAccount:(i,d)=>{e(d===!0?vn(i,"vendor",u):kn(i,"vendor",u))},navigateToMailingAddressPage:i=>{const d=Qe(s,i,l),p=T(r.state?.pathnameStackToGoBack,r.pathname);c(d,{state:{pathnameStackToGoBack:p}})},updateFilesEntity:i=>{e(In({files:i}))},onEditFileName:(i,d)=>{e(fn(i,d.split(".")[0]))},handleZeniLogoClick:()=>{o.toggle()},updateSaveFetchState:()=>{u==null&&e(ra(a.vendorViewDetails.newVendorState?.vendorBasic?.id)),e(yn("Not-Started",u))},onVendorSelected:i=>{i!=null&&e(Sn(i,!0))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,d)=>{i.trim().length>=2?e(He({searchString:i,entityType:d,searchOrigin:"common"})):i.trim().length===0&&e(ie("common"))},onCancelAutoComplete:()=>{e(ie("common"))}},onBackClick:()=>{e(ie("common"));const i=H(a.location.state?.pathnameStackToGoBack),d=i.poppedPathname??ri(n.tenantEmailDomain,a.billId);c(d,{state:{pathnameStackToGoBack:i.newStack}})},onGetOtp:i=>{e(gn(i,"BillPayVendor"))},onResendOtp:i=>{e(hn(i,"BillPayVendor"))},onVerifyOtp:(i,d)=>{e(bn(i,d,"BillPayVendor"))},onVerifyOtpSuccess:(i,d,p)=>{e(mn(i,d,p))},onFetchAndUpdateVendorRecommendations:i=>{e(Na(i,!1))}}}))(ni),Be=()=>{const e=J(),a=le(),l=ei(),n=Q(),{billId:c,vendorId:r}=ae(),u=k((b=>Z(b))),{useFeatureGate:o}=oe(),{isFeatureEnabled:s}=o(g.isBillPayLocalCurrencyFeatureEnabled),[i,d]=f.useState(!1),p=k((b=>b.vendorViewState.newVendorState.fetchStatus.fetchState)),m=k((b=>ye(b,r))),S=k((b=>r!==void 0?b.vendorViewState.editVendorStateById[r]?.fetchStatus??"Not-Started":"Not-Started")),h=r!==void 0?S:p;return f.useEffect((()=>{i===!1&&h==="Not-Started"&&r!=null&&(a(ge(!1,r)),d(!0))}),[i,h,r]),m.fetchState==="Not-Started"||m.fetchState==="In-Progress"?t.jsx(ai,{}):h==="Error"?t.jsx(ti,{onGoHome:()=>e("../",{replace:!0}),onReload:()=>window.location.reload()}):t.jsxs(t.Fragment,{children:[t.jsx(Je,{vendorId:r,billId:c}),t.jsx(Wi,{navigate:e,location:n,themeState:l,currentTenant:u,vendorId:r,billId:c,vendorViewDetails:m,isLocalCurrencyEnabled:s})]})},qi=X((function(e,a){const{companyId:l}=a;return{billPaySetupView:An(e,l),analytics:j,videoUrl:"https://player.vimeo.com/video/787873426?h=9d9389b1dc&badge=0&autopause=0&player_id=0&app_id=58479"}}),(function(e,a){const{companyId:l,navigate:n}=a;return{onButtonClick:()=>{e(En(l))},onBackClick:()=>{n("../..",{relative:"path"})},onSetupBillPaySuccess:()=>{n("../bills/setup",{relative:"path"})}}}))(oi),Ki=()=>{const e=ii(),a=J(),l=Q(),{tenantEmailDomain:n}=ae(),[c,r]=f.useState(!1),u=ue(),o=k((h=>Z(h))),s=o.companyId??L.getSignedInUserTenant(n)?.companyId,i=L.getSignedInUser(),d=fe(),p=!!o.companyBillPayInfo?.info?.isBillPayTOSAccepted,m=de(d?.loggedInUserRoleMap),S=h=>{r(h)};if(i==null)throw Error("Can't access bill pay promo page without signing in...");return o.companyBillPayInfo?.info?.isBillPayEnabled===!0?t.jsx(ee,{to:"../../../bills"}):p===!0&&m===!0?t.jsx(ee,{to:"../../bills/setup"}):p===!1||d!=null&&Ye(o,d.loggedInUserRoleMap)?t.jsxs(t.Fragment,{children:[t.jsx(Ee,{analytics:j,onLoad:h=>(b=>b.trackPageLoaded(Za.Event.billPayPromoPage))(h)}),t.jsx(Ka,{isAppContentDrawerOpen:c,handleDrawerToggle:S}),t.jsx(qi,{companyId:s,navigate:a,location:l,meetingUrl:e("bill_pay_promo"),onClickMenuIcon:()=>{S(!0)}})]}):t.jsx(se,{fetchState:"In-Progress",style:{backgroundColor:u.colors.grey5}})};function jo(){const e=k(($=>Z($))),a=fe(),l=de(a?.loggedInUserRoleMap),n=ue(),{useFeatureGate:c}=oe(),{isFeatureEnabled:r}=c(g.isBillPayLocalCurrencyFeatureEnabled),u=r===!0?Hi:Oi,{isFeatureEnabled:o}=c(g.isDebitCardFeatureEnabled),s=Va(o,e),i=$a(e),d=Q(),p=e?.userRole!=null&&ka(e?.userRole),m=(e?.company==null||e.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!p)&&de(a?.loggedInUserRoleMap),S=Ra(a?.loggedInUserRoleMap),h=(e?.company==null||e.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!p)&&Dn(a?.loggedInUserRoleMap),b=!!e.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!p,I=b&&La(a?.loggedInUserRoleMap),{isFeatureEnabled:E}=c(g.isChargeCardFeatureEnabled),C=li(e,E,o)&&!p,x=C&&Tn(a?.loggedInUserRoleMap),_=jn(a?.loggedInUserRoleMap),D=Ga(a?.loggedInUserRoleMap),B=Pn(a?.loggedInUserRoleMap),N=b&&D,V=e.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified"&&!p&&B,W=Fn(a?.loggedInUserRoleMap),O=Rn(a?.loggedInUserRoleMap),v=Vn(a?.loggedInUserRoleMap),Y=C&&W,{tenantEmailDomain:M}=ae();return t.jsxs(it,{children:[d.pathname.includes("/bills")?t.jsxs(t.Fragment,{children:[t.jsx(y,{path:"setup",element:t.jsx(je,{isBillPayAdminLevelAccess:m,isUserHasOnlyBillPayAccess:S,isReimbursementAdminLevelAccess:h,isZeniAccountAdminLevelAccess:I,isChargeCardAdminLevelAccess:x,isUserHasOnlyCardAccess:_,productType:"bill_pay",type:"setup"})}),t.jsx(y,{path:"verification",element:t.jsx(je,{isBillPayAdminLevelAccess:m,isUserHasOnlyBillPayAccess:S,isReimbursementAdminLevelAccess:h,isZeniAccountAdminLevelAccess:I,isChargeCardAdminLevelAccess:x,isUserHasOnlyCardAccess:_,productType:"bill_pay",type:"verification"})}),t.jsx(y,{path:"promo",element:t.jsx(Ki,{})}),t.jsx(y,{path:"approval-rules/*",element:m?t.jsx(mi,{}):t.jsx(bi,{showZeniAccountRoute:N,isUserHasBillPayAccess:O,isUserHasReimbursementAccess:v,showTreasuryRoute:V,isTenantBankingOnly:s,showChargeCardRoute:Y,tenantEmailDomain:M??""})}),t.jsx(y,{path:"international-wire",element:t.jsx(je,{isBillPayAdminLevelAccess:m,isUserHasOnlyBillPayAccess:S,isReimbursementAdminLevelAccess:h,isZeniAccountAdminLevelAccess:I,isChargeCardAdminLevelAccess:x,isUserHasOnlyCardAccess:_,productType:"bill_pay",type:"international-wire"})}),e.companyBillPayInfo?.info?.isBillPayEnabled===!0&&t.jsx(y,{path:"*",element:t.jsx(Ti,{})}),(s===!0||i===!0)&&t.jsx(y,{path:"/*",element:t.jsx(Ja,{})}),e.companyBillPayInfo?.info?.isBillPayTOSAccepted===!0&&l&&t.jsx(y,{path:"*",element:t.jsx(ee,{to:"../setup"})}),a!=null&&Ye(e,a.loggedInUserRoleMap)&&t.jsx(y,{path:"*",element:t.jsx(ee,{to:"../promo"})})]}):d.pathname.includes("/bill")?t.jsxs(t.Fragment,{children:[t.jsx(y,{path:"new",element:t.jsx(w,{appContent:t.jsx(ga,{})})}),t.jsx(y,{path:":billId",element:t.jsx(w,{appContent:t.jsx(gi,{})})}),t.jsx(y,{path:":billId/edit",element:t.jsx(w,{appContent:t.jsx(ga,{})})}),t.jsx(y,{path:"new/review",element:t.jsx(w,{appContent:t.jsx(va,{})})}),t.jsx(y,{path:":billId/edit/review",element:t.jsx(w,{appContent:t.jsx(va,{})})}),t.jsx(y,{path:"/:billId/:addressType",element:t.jsx(w,{appContent:t.jsx(ua,{isSubPage:!0})})}),t.jsx(y,{path:"/new/:addressType",element:t.jsx(w,{appContent:t.jsx(ua,{isSubPage:!0})})}),t.jsx(y,{path:"new/vendor/create",element:t.jsx(w,{appContent:t.jsx(Be,{})})}),t.jsx(y,{path:"new/vendor/:vendorId/edit",element:t.jsx(w,{appContent:t.jsx(Be,{})})}),t.jsx(y,{path:"new/vendor/:vendorId/edit/ach",element:t.jsx(w,{appContent:t.jsx(me,{})})}),t.jsx(y,{path:"new/vendor/:vendorId/edit/domestic",element:t.jsx(w,{appContent:t.jsx(be,{})})}),t.jsx(y,{path:"new/vendor/:vendorId/edit/international",element:t.jsx(w,{appContent:t.jsx(u,{})})}),t.jsx(y,{path:"new/vendor/create/ach",element:t.jsx(w,{appContent:t.jsx(me,{})})}),t.jsx(y,{path:"new/vendor/create/domestic",element:t.jsx(w,{appContent:t.jsx(be,{})})}),t.jsx(y,{path:"new/vendor/create/international",element:t.jsx(w,{appContent:t.jsx(u,{})})}),t.jsx(y,{path:":billId/edit/vendor/create/ach",element:t.jsx(w,{appContent:t.jsx(me,{})})}),t.jsx(y,{path:":billId/edit/vendor/create/domestic",element:t.jsx(w,{appContent:t.jsx(be,{})})}),t.jsx(y,{path:":billId/edit/vendor/create/international",element:t.jsx(w,{appContent:t.jsx(u,{})})}),t.jsx(y,{path:":billId/edit/vendor/create",element:t.jsx(w,{appContent:t.jsx(Be,{})})}),t.jsx(y,{path:":billId/edit/vendor/:vendorId/edit",element:t.jsx(w,{appContent:t.jsx(Be,{})})}),t.jsx(y,{path:":billId/edit/vendor/:vendorId/edit/ach",element:t.jsx(w,{appContent:t.jsx(me,{})})}),t.jsx(y,{path:":billId/edit/vendor/:vendorId/edit/domestic",element:t.jsx(w,{appContent:t.jsx(be,{})})}),t.jsx(y,{path:":billId/edit/vendor/:vendorId/edit/international",element:t.jsx(w,{appContent:t.jsx(u,{})})}),t.jsx(y,{path:":billId/edit/vendor/create/ach",element:t.jsx(w,{appContent:t.jsx(me,{})})}),t.jsx(y,{path:":billId/edit/vendor/create/domestic",element:t.jsx(w,{appContent:t.jsx(be,{})})}),t.jsx(y,{path:":billId/edit/vendor/create/international",element:t.jsx(w,{appContent:t.jsx(u,{})})}),t.jsx(y,{path:"*",element:t.jsx(xe,{})})]}):t.jsx(y,{path:"*",element:t.jsx(se,{fetchState:"In-Progress",style:{backgroundColor:n.colors.grey5,boxShadow:`0px 2px ${A.sp1} ${n.colors.dropShadowNormal}`}})}),t.jsx(y,{path:"*",element:t.jsx(xe,{})})]})}export{jo as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{a as k}from"./sentry-DHDsO12F.js";import{u as Y,j as h,h as ne,g as se,i as oe,N as ie,l as re}from"./core-B5mDy9pu.js";import{fF as z,Hs as ce,YY as ue,Bw as de,S8 as pe,HG as le,KR as me,NE as fe,Oi as ye,P7 as Se,YZ as ge,Y_ as Ie,Y$ as be,Z0 as he,Z1 as Te,Vc as De,Y2 as Oe,Vr as Ce,LV as Ve,Vs as ke,LZ as we,mH as Ae,gG as Ne,gF as Fe,gE as _e,uT as ve,uK as Ee,uH as xe,mz as Be,BF as ze,BD as R,bE as P,BR as U,cE as Re}from"./zeni-epic-state-7eY0g-Bc.js";import{bS as Pe,U as Ue,N as Le,bi as je,z as B,a8 as Me,j as L,n as E,S as x,bU as Ge,ae as Ye,p as j,aG as M}from"./index-6nH5LMe4.js";import{n as Ze}from"./mui-Do6nLzGb.js";import{j as V}from"./liveblocks-UOzcPsHa.js";import{d as G}from"./routePaths-uBvxqlLY.js";import{M as He}from"./MobileAppDrawer-0YtWXA3B.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},u=new t.Error().stack;u&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[u]="cc3fb49f-bc67-4a02-b83d-4c2cc061af0f",t._sentryDebugIdIdentifier="sentry-dbid-cc3fb49f-bc67-4a02-b83d-4c2cc061af0f")}catch{}})();function nt(){const t=Y(),u=h((r=>z(r))),n=u?.tenantId,{isApprovalRulesV3Enabled:i,isLoading:d}=Pe(n),p=h((r=>r.billPaySetupApproverViewState.fetchState));k.useEffect((()=>{n==null||d||p==="Not-Started"&&t(ce(!0,!0,i))}),[n,d,i,p,t])}const $e=Ze.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
|
-
`,qe=re((function(t,u){const{businessVerificationDetails:n}=u,i=z(t),d=B.getSignedInUser(),p=i.tenantId,r={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:p??""},T=De(u.roleMap)&&n.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=Oe(t.companyConfigState),s=Ce(t.userRoleConfigState);return{businessVerificationDetails:n,verficationDetailsFetchState:n.fetchState,isRefreshingViewInBackground:n.isRefreshingViewInBackground,allNationalityCountries:n.allNationalityCountries,filesEndPoint:`${Ye.fileMicroServiceBaseUrl}`,authParams:r,isDisabled:T,allIndustries:e.companyIndustries??[],companyTitles:s.companyTitles}}),(function(t,u){const{companyId:n,productType:i,currentTenant:d,navigate:p,location:r}=u,{tenantEmailDomain:T}=d;return{onCompanyDetailsChanged:e=>{const{companyDescription:s,companyIndustry:m,companyIndustryType:O,companyLegalName:C,companyTaxId:g,companyWebsite:y,companyPhone:I,primaryContactEmail:c,primaryContactName:o,primaryContactUserId:l,primaryContactSyncToken:D,syncToken:S,fileIds:a,incDate:f,typeOfIncorporation:w,stateOfIncorporation:A,sourceOfFunds:N,companySubIndustry:F,countriesOfOperations:b,companySourceOfFunds:Z,companySourceOfFundsDescription:H,transactionVolume:$,transactionVolumeDescription:q,purposeOfAccount:K,purposeOfAccountDescription:W,regulatedStatus:J,regulatedStatusDescription:Q,usNexus:X,usNexusTypes:ee}=e,_=O?.selectedOption,te={companyId:n,companyDescription:s,companyIndustry:m.selectedOption,companyIndustryType:_==null||_===""?void 0:_,companyLegalName:C,taxIdOrEIN:g,website:y!=""&&y!=null?Re(y):void 0,phone:I,syncToken:S,fileIds:a,incDate:f!=null?P(f?.toString()):f,typeOfIncorporation:w?.selectedOption??"",stateOfIncorporation:A?.selectedOption??"",sourceOfFunds:N?.selectedOption??"",companySubIndustry:F?.selectedOption??"",countriesOfOperations:b?.selectedOptions.map((v=>v.length===2?v:M(v)))??[],companySourceOfFunds:Z?.selectedOption??"",companySourceOfFundsDescription:H,transactionVolume:$?.selectedOption??"",transactionVolumeDescription:q,purposeOfAccount:K?.selectedOption??"",purposeOfAccountDescription:W,regulatedStatus:J??"",regulatedStatusDescription:Q,usNexus:X,usNexusTypes:ee?.selectedOptions??[]},ae={userId:l,firstName:o.firstName,lastName:o.lastName,email:c,syncToken:D};t(U({companyDetails:te,primaryContactDetails:ae}))},onCompanyOfficerUpdated:e=>{const s=e.map((m=>{const{officerType:O,userId:C,name:g,email:y,nationalityCountryCode:I,ssn:c,dob:o,phone:l,syncToken:D,selectDocument:S,role:a,ownership:f,isSelectedForVerification:w,userVerificationStatus:A,treasuryUserVerificationStatus:N,fileIds:F}=m;let b;return S.selectDocumentType==="driverLicense"?b="driving_license":S.selectDocumentType==="passport"?b="passport":S.selectDocumentType==="stateId"?b="id_document":S.selectDocumentType==="ssnCard"&&(b="social_security_card"),{officerType:O,userId:C,firstName:g.firstName,lastName:g.lastName,email:y,ssn:c,nationalityCountryCode:I?.selectedOption!=null?M(I.selectedOption):void 0,phone:l,birthday:o!=null?P(o?.toString()):o,syncToken:D,titleAtCompany:a.selectedOption,ownershipInCompany:f,documentTypeSelectedForVerification:b,isSelectedForVerification:w,userVerificationStatus:A,treasuryUserVerificationStatus:N,fileIds:F,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1}}));t(U({officers:s}))},onSaveDetailsClick:e=>{t(R(n,e,i))},onSendForVerificationClick:e=>{t(R(n,e,i,!0))},onAddressClick:e=>{const s=G(T,e),m=j(r.state?.pathnameStackToGoBack,r.pathname);p(s,{state:{pathnameStackToGoBack:m}})},onRegisteredAddressClick:e=>{const s=G(T,e),m=j(r.state?.pathnameStackToGoBack,r.pathname);p(s,{state:{pathnameStackToGoBack:m}})},onBackClick:()=>{t(ze({companyId:n})),p("../setup")},updateFilesEntity:e=>{t(Be({files:e}))},onDeleteFile:e=>{t(xe(e))},onDeleteFileList:e=>{t(Ee(e))},onEditFileName:(e,s)=>{t(ve(e,s.split(".")[0]))},onGetOtp:e=>{t(_e(e,"SpendManagementSetup"))},onResendOtp:e=>{t(Fe(e,"SpendManagementSetup"))},onVerifyOtp:(e,s)=>{t(Ne(e,s,"SpendManagementSetup"))},saveNewAddressInLocalStore:(e,s)=>{t(Ae({addressType:e,addressToCreate:s}))},onIdentityDocumentUploadedForAutofill:e=>{if(n==null)return;const s=ke(e.documentType);s!=null&&t(we({target:"setup",companyId:n,officerType:e.officerType,fileId:e.fileId,documentType:s}))},onCompanyDocumentUploadedForAutofill:e=>{n!=null&&t(Ve({target:"setup",companyId:n,fileId:e.fileId,documentType:e.documentType}))}}}))(Ge),st=({productType:t})=>{const u=ne(),n=se(),i=Y(),[d,p]=k.useState(!1),[r,T]=k.useState(!1),{tenantEmailDomain:e}=oe(),s=Ue(),{useDynamicConfig:m}=Le(),{configValue:O}=m(je.zeniAccountsConfig),C=ue(O),g=h((a=>{switch(t){case"zeni_accounts":return a.zeniAccountSetupViewState.fetchState;case"reimbursement":return a.remiSetupViewState.fetchState;case"charge_cards":return a.chargeCardSetupViewState.fetchState;case"zeni_treasury":return a.treasurySetupViewState.fetchState;default:return a.billPaySetupViewState.fetchState}})),y=h((a=>a.companyConfigState.fetchState)),I=h((a=>a.userRoleConfigState.fetchState)),c=h((a=>z(a))),o=c.companyId??B.getSignedInUserTenant(e)?.companyId;if(k.useEffect((()=>{y==="Not-Started"&&i(de()),I==="Not-Started"&&i(pe(!0))}),[y,I,i]),k.useEffect((()=>{if(!d&&g==="Not-Started"&&o!=null)switch(p(!0),t){case"zeni_accounts":i(Se(o,!0));break;case"zeni_treasury":i(ye(o,!0));break;case"reimbursement":i(fe(o,!0));break;case"charge_cards":i(me(o,!0));break;default:i(le(o,!0))}}),[d,g,o,i]),B.getSignedInUser()==null)throw Error("Can't access business verification without signing in...");let l;switch(t){case"zeni_accounts":l=c.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted;break;case"reimbursement":l=c.companyReimbursementInfo?.info?.isReimbursementTOSAccepted;break;case"charge_cards":l=c.companyChargeCardInfo?.info?.isChargeCardTOSAccepted===!0||c.companyDebitCardInfo?.info?.isDebitCardTOSAccepted;break;case"zeni_treasury":l=c.companyTreasuryInfo?.info?.isTreasuryTOSAccepted;break;default:l=c.companyBillPayInfo?.info?.isBillPayTOSAccepted}const D=a=>{T(a)},S=h((a=>{switch(t){case"zeni_accounts":return Te(a,o);case"zeni_treasury":return he(a,o);case"charge_cards":return be(a,o);case"reimbursement":return Ie(a,o);default:return ge(a,o)}}));return l===!1?V.jsx(ie,{to:"../promo"}):V.jsxs($e,{children:[V.jsx(Me,{analytics:L,onLoad:a=>(f=>{switch(t){case"zeni_accounts":return f.trackPageLoaded(x.Event.zeniAccountsBusinessVerification);case"reimbursement":case"charge_cards":return f.trackPageLoaded(x.Event.reimbursementBusinessVerification);default:return f.trackPageLoaded(x.Event.billPayBusinessVerification,E(n)?"Settings":void 0)}})(a)}),E(n)?V.jsx(He,{isAppContentDrawerOpen:r,handleDrawerToggle:D}):null,V.jsx(qe,{businessVerificationDetails:S,navigate:u,location:n,companyId:o,analytics:L,currentTenant:c,productType:t,isSettings:E(n),roleMap:s?.loggedInUserRoleMap??{},onClickMenuIcon:()=>{D(!0)},maxInsuredAmount:C.maxInsuredAmount})]})};export{st as B,nt as u};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import{j as g}from"./liveblocks-UOzcPsHa.js";import{a as l}from"./sentry-DHDsO12F.js";import{u as pe,h as he,g as Ce,j as M,i as fe,l as Se}from"./core-B5mDy9pu.js";import{a as ge,e8 as be,z as ye,ea as Pe,ec as N,ed as Ie,bn as W,a8 as we,j,ee as H,eo as Ee,G as ke,S as Ae,w as xe,eh as Te,ei as Ue,av as _e,el as Oe,em as ve,bk as Qe,en as Fe}from"./index-6nH5LMe4.js";import{gK as je,fE as G,fF as $e,g8 as De,jh as Le,jd as Ve,fG as z,gu as qe,go as Re,gq as B,gw as Me,gx as He,gy as ze,gz as Be,gA as Ne}from"./zeni-epic-state-7eY0g-Bc.js";import{D as We,n as D,P as Ge,S as Ke}from"./mui-Do6nLzGb.js";import"./recharts-uFX1dZS-.js";import"./analytics-D6GpUSOP.js";import"./plaid-0g_vwjSd.js";import"./dnd-CGWe1ZMP.js";import"./stripe-cKAAJElX.js";import"./lottie-C5eNvt0I.js";import"./lexical-DW4lC8Zx.js";import"./pdf-DjwvAC2g.js";import"./utils-BsODCDYR.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]="22a97be8-13f0-44f6-9e8e-9a5d8782d8f3",e._sentryDebugIdIdentifier="sentry-dbid-22a97be8-13f0-44f6-9e8e-9a5d8782d8f3")}catch{}})();const K="chat-response-generated",Y="cards/ask",J="card_policy_hero";function $(e){return`/${e}/cards`}function X(e){return`/${e}/cards/policy`}const Ye=Se((function(e,a){const o=G(e),c=a.isSubmitting,d=Ue(e,{allUsers:a.allUsers,onCardPolicyVendorSearchTextChange:a.onCardPolicyVendorSearchTextChange});return{showSampleQuestions:a.sessionFromUrl==="new_chat"&&o.uiState.currentChatSessionId==null,aiCfoView:o,isSubmitting:c,isNewChatSession:a.sessionFromUrl==="new_chat",isFullView:!0,tableDownloadEndPoint:`${_e}/tableDownload`,exportDownloadEndPoint:Oe(),emailLinkQuestion:a.emailLinkQuestion,autoSubmitEmailLinkQuestion:a.autoSubmitEmailLinkQuestion,onEmailLinkQuestionProcessed:a.onEmailLinkQuestionProcessed,isFileUploadEnabled:a.isFileUploadEnabled,isUploadPromoVisible:a.isUploadPromoVisible,onUploadPromoClose:a.onUploadPromoClose,...d}}),(function(e,a){const{location:o,currentTenant:c,userId:d,navigate:m,currentChatSessionId:h,allSessionsWithOrderedQuestionAnswers:E,isAiCardCreationEnabled:x,isCardPolicyEnabled:T,cardPolicyPageContext:U}=a,i=c.tenantEmailDomain,C=o.state?.referrer,p=C===J?X(i):$(i);return{onEventReceived:(n,t)=>{if(n===K&&typeof t.text=="string"&&typeof t.metadata=="object"){const s=t,f=He(s.type),b=s.metadata.chat_session_id??null,{currentChatSession:y,currentQuestionAnswer:u,currentQuestionAnswerSummary:P}=W(E,b);f!=="answer"?j.trackAICFOChatResponseGenerated(f,u?.question.questionText??"",s.text,b,Fe(P,y),s.metadata.message_id??null):j.trackAICFOChatAnswerGenerated(s.text,u?.question.questionText??"",(s.follow_up_questions?.length??0)>0,!!s.assumptions,!!s.insights,s.visualization!=null,ze(s.visualization?.type??"")??null,b,s.summarized_title,s.metadata.message_id??null),e(Be({chatSessionId:s.metadata.chat_session_id,responseType:f,fetchState:{fetchState:"Completed",error:void 0}})),e(Ne({chatSessionId:s.metadata.chat_session_id,answerPayload:s,userId:d}))}},onSubmit:(n,t,s,f)=>{n&&Qe(e,n,t,h,E,d,f,s,U)},updateCurrentInput:n=>{e(B(n))},onStopSubmit:()=>{},onUpdateScrollYOffset:n=>{e(Me(n))},onSelectSampleQuestion:()=>{},onBackClick:()=>{m(-1)},onCloseClick:()=>{m(p,{state:{...o.state}}),e(B(""))},togglePageView:()=>{m(p,{state:N(o.state)}),a.setIsAiCfoOpen(!0)},onCopy:()=>{},onThumbsUp:()=>{},onThumbsDown:()=>{},onTogglePageView:()=>{m(-1)},onNewChatClick:()=>{h!=null&&e(Re()),m((function(n){return`/${n}/${Y}`})(i),{state:{...o.state}})},onToggleCotCollapsed:(n,t)=>{e(qe({questionAnswerId:n,isCollapsed:t}))},...ve(e,{isAiCardCreationEnabled:x,isCardPolicyEnabled:T,currentChatSessionId:h,onAfterCardsCreationSubmit:()=>{a.setIsAiCfoOpen(!0),m($(i),{state:{...o.state}})},onAfterCardPolicySubmit:()=>{a.setIsAiCfoOpen(!0),m(`/${i}/cards/policy`,{state:{...o.state}})}})}}))(xe(Te)),{spendManagement:{chargeCard:{cardsAiCfoHero:Z,cardPolicyAiCfoHero:ee}}}=ke.getLocalizedStrings(),A=Z.pageTitle,Je=ee.pageTitle,Xe=Z.chatHeaderSubtitle,Ze=ee.chatHeaderSubtitle,gt=({isFileUploadEnabled:e})=>{const{setIsAiCfoOpen:a}=ge(),o=pe(),c=he(),d=Ce(),[m,h]=l.useState(!1),{allUsers:E,isAiCardCreationEnabled:x,isCardPolicyEnabled:T,onCardPolicyVendorSearchTextChange:U}=be();l.useEffect((()=>{o(je())}),[o]);const i=M((r=>G(r))),C=ye.getSignedInUser(),{session_id:p}=fe(),n=M((r=>$e(r))),t=i.uiState.currentChatSessionId,s=n.tenantEmailDomain,{handleUploadPromoClose:f,isUploadPromoVisible:b}=Pe({isFileUploadEnabled:e,tenantEmailDomain:s}),y=d.state,u=y?.aiCfoInitialQuestion??null,P=!!y?.aiCfoShouldSubmit,I=y?.referrer===J,te=I?"card_policy":void 0,se=l.useMemo((()=>({title:I?Je:A,subtitle:I?Ze:Xe})),[I]),[ae,_]=l.useState(null),[oe,O]=l.useState(!1),v=l.useRef(!1);l.useEffect((()=>{v.current||u==null||u===""||(_(u),O(P),v.current=!0)}),[u,P]);const ne=l.useCallback((()=>{_(null),O(!1),c(d.pathname,{replace:!0,state:N(d.state)})}),[d.pathname,d.state,c]),ie=n.masterTOSInfo,S=ie?.isMasterTOSAccepted??!1,k=l.useRef(null);l.useEffect((()=>{if(S&&k.current!=null){const{question:r,shouldSubmit:w}=k.current;k.current=null,_(r),O(w),v.current=!1}}),[S]);const{visitedSessions:L}=Ie(t),Q=i.fetchState,F=i.uiState.chatSessionsNextPageToken.hasMore||!i.uiState.chatSessionsFirstPageFetched,V=t!=null?i.fetchChatSessionHistoryByChatSessionId?.[t]?.fetchState??"Not-Started":"Not-Started",q=t==null||(i.uiState.chatHistoryNextPageToken[t]?.hasMore??!0),R=i.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:re}=W(R,t),le=re.length===0;l.useEffect((()=>{t!=null&&p!==t&&c((function(r,w){return`/${r}/${Y}/${w}`})(s,t),{state:{...d.state},replace:!0})}),[t,p,s,c,d.state]),l.useEffect((()=>{p!=null&&t==null&&p!=="new_chat"&&o(De({sessionId:p,agentId:"controller"}))}),[]);const de=l.useMemo((()=>({events:L.map((r=>`private-encrypted-chat-${r}.${K}`)),eventCallback:(r,w,me)=>me.onEventReceived(r,w)})),[L]);if(l.useEffect((()=>{Q!=="In-Progress"&&F&&o(Le())}),[Q,F,o]),l.useEffect((()=>{t!=null&&V!=="In-Progress"&&q&&C!=null&&Q==="Completed"&&!F&&o(Ve(t,C.userId))}),[V,q,t,C,o]),C==null)throw Error("Can't access Cards AI CFO page without signing in...");const ce=p??"new_chat",ue=t!=null&&i.responseStateByChatSessionId?.[t]?.answer?.fetchState==="In-Progress";return g.jsxs(tt,{children:[g.jsx(we,{analytics:j,onLoad:r=>r.trackPageLoaded(Ae.Event.aiCFOPage)}),S?g.jsx(Ye,{...de,currentChatSessionId:t,allSessionsWithOrderedQuestionAnswers:R,allUsers:E,isAiCardCreationEnabled:x,isCardPolicyEnabled:T,openOnboardingPage:()=>h(!0),userId:C.userId,setIsAiCfoOpen:a,navigate:c,sessionFromUrl:ce,location:d,isSubmitting:ue,isEmptyChatWithSession:le,customPageTitle:A,chatHeader:se,currentTenant:n,emailLinkQuestion:ae??void 0,autoSubmitEmailLinkQuestion:oe,onEmailLinkQuestionProcessed:ne,isFileUploadEnabled:e,isUploadPromoVisible:b,onUploadPromoClose:f,onCardPolicyVendorSearchTextChange:U,cardPolicyPageContext:te}):g.jsx(H,{isTOSAccepted:S,acceptMasterTOSState:i.masterTOSAcceptanceState,customPageTitle:A,onCloseClick:()=>{c(I?X(s):$(s),{state:{...d.state}})},onCompleteClick:()=>{S||n.userRoleId==null||(u!=null&&u!==""&&(k.current={question:u,shouldSubmit:P}),o(z(n.userRoleId)))}}),g.jsx(We,{anchor:"right",open:m,transitionDuration:250,PaperProps:{component:st,style:{width:`${Ee}vw`}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>h(!1),children:g.jsx(et,{onClick:r=>r.stopPropagation(),children:g.jsx(H,{isTOSAccepted:S,acceptMasterTOSState:i.masterTOSAcceptanceState,customPageTitle:A,onCloseClick:()=>h(!1),onCompleteClick:()=>{S||n.userRoleId==null||o(z(n.userRoleId)),h(!1)}})})})]})},et=D(Ke)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,tt=D.div`
|
|
6
|
-
flex: 1 1 auto;
|
|
7
|
-
display: flex;
|
|
8
|
-
flex-direction: column;
|
|
9
|
-
min-height: 0;
|
|
10
|
-
width: 100%;
|
|
11
|
-
`,st=D(Ge)`
|
|
12
|
-
box-shadow: ${({theme:e})=>e.colors.elevation2};
|
|
13
|
-
color: ${({theme:e})=>e.colors.grey4};
|
|
14
|
-
`;export{gt as default};
|