@zeniai/web-app-ui 5.1.85-qa → 5.1.86-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AddressRoutes-CYnGGpGr.js +1 -0
- package/dist/assets/AddressScreen-Cgf_DSfy.js +9 -0
- package/dist/assets/{AiCfoScreen-CJaD6cY-.js → AiCfoScreen-DK7jWO5l.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-BjaqKeym.js → BillPayApprovalRoutes-Bufqh5bf.js} +1 -1
- package/dist/assets/{BillPayRoutes-BuTBoRs_.js → BillPayRoutes-DQrVntHX.js} +12 -12
- package/dist/assets/{BusinessVerificationPageScreen-CEKnQSmV.js → BusinessVerificationPageScreen-BVO4LcOB.js} +2 -2
- package/dist/assets/{CardsAiCfoScreen-Qkx9_Ahy.js → CardsAiCfoScreen-BPq182YL.js} +1 -1
- package/dist/assets/ChargeCardRoutes--1Cz6d6F.js +71 -0
- package/dist/assets/CompanyPassportScreen-Cr6_STQF.js +1 -0
- package/dist/assets/{ConnectionAuthScreen-l-WLaa5J.js → ConnectionAuthScreen-DPDyawJA.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-CwgXB2Ot.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-DPwCCez-.js → CustomerOnboardingRoutes-DBUibBfl.js} +4 -4
- package/dist/assets/{DashboardRoutes-BH2-FiBj.js → DashboardRoutes-CWiRUKmL.js} +3 -3
- package/dist/assets/{DefaultTenantHome-D_FTrjlS.js → DefaultTenantHome-Q8Gr6wzz.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-Bg4bD2vf.js +18 -0
- package/dist/assets/DrawerScreen-ESB0V3An.js +1 -0
- package/dist/assets/EntityDetailRoutes-BgIcnD30.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-cm7KU-sQ.js → ExpenseAutomationRoutes-DRdJk7UH.js} +3 -3
- package/dist/assets/FeaturePreviewScreen-CPre8DhJ.js +1 -0
- package/dist/assets/{HubSpotOAuthCallbackScreen-CwwFPI1Z.js → HubSpotOAuthCallbackScreen-D1vja8MF.js} +1 -1
- package/dist/assets/MagicLinkRoutes-50BdhE1X.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-oln-_jh3.js +12 -0
- package/dist/assets/{MobileAppDrawer-S5tfidhL.js → MobileAppDrawer-CNkPd-0r.js} +1 -1
- package/dist/assets/NotFoundScreen-C4hj38o6.js +1 -0
- package/dist/assets/NotificationRoutes-CDTyM5yC.js +1 -0
- package/dist/assets/{OAuthConsentScreen-BcKZoGPw.js → OAuthConsentScreen-Bfra_k87.js} +1 -1
- package/dist/assets/PandLWithForecastRoutes-CgJVRO_P.js +1 -0
- package/dist/assets/PeopleRoutes-DsSKCjjc.js +22 -0
- package/dist/assets/PerformanceRoutes-5mjMtnxs.js +1 -0
- package/dist/assets/{Preview-D29JeEmY.js → Preview-ng4_PqRv.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-DPgG6QT_.js → QBOConnectionScreen-B3-UhwG_.js} +1 -1
- package/dist/assets/ReferralListScreen-Dt6a-ZaL.js +5 -0
- package/dist/assets/{ReimbursementApprovalRoutes-ByVoXqX7.js → ReimbursementApprovalRoutes-DJ6r8--7.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BwmZfWRv.js → ReimbursementApprovalRuleDetailScreen-CGou3dCd.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-Cd_8uVDl.js → ReimbursementRoutes-C1KqmlyM.js} +6 -6
- package/dist/assets/ReportsRoutes-BTVnfyaM.js +1 -0
- package/dist/assets/RewardsRoutes-DdOKhqcE.js +1 -0
- package/dist/assets/ScreenRoutes-CR7u1SOQ.js +2 -0
- package/dist/assets/SettingsRoutes-ZI-PRowa.js +57 -0
- package/dist/assets/{SetupPagesScreen-dycHQYQB.js → SetupPagesScreen-CnFtaoyZ.js} +5 -5
- package/dist/assets/{SignInScreen-pdXRCCEl.js → SignInScreen-BoQaZMzp.js} +1 -1
- package/dist/assets/SignOutScreen-BWN6fg9F.js +9 -0
- package/dist/assets/{TaskListScreen-CESJVRT4.js → TaskListScreen-wwlTbcpO.js} +2 -2
- package/dist/assets/TaskRoutes-BZfNRRg-.js +9 -0
- package/dist/assets/{TransactionDetailRoutes-B9kRSsMo.js → TransactionDetailRoutes-75MHva3P.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-DEx0Vfhg.js → TransactionDetailScreen-BdRaLDX3.js} +2 -2
- package/dist/assets/{TransactionListRoutes-CdXQskhP.js → TransactionListRoutes-BK2uV7qm.js} +1 -1
- package/dist/assets/{TreasuryRoutes-TpaS1cyW.js → TreasuryRoutes-JT_IY3Gx.js} +6 -6
- package/dist/assets/{VendorsRoutes-Bo_KlwES.js → VendorsRoutes-BS6JrHkM.js} +19 -19
- package/dist/assets/{WiseConfirmationScreen-DPGes5Zc.js → WiseConfirmationScreen-CrmCNnnU.js} +2 -2
- package/dist/assets/{ZeniAccountRoutes-BvMFI4KA.js → ZeniAccountRoutes-BPiHmqg-.js} +7 -7
- package/dist/assets/ZeniAccountStatementScreen-DxgFXxRD.js +9 -0
- package/dist/assets/{accountMappingHelper-B3v4RMhl.js → accountMappingHelper-COLWfB1U.js} +1 -1
- package/dist/assets/{analytics-7PXXxPIN.js → analytics-dJ9Vu0DH.js} +1 -1
- package/dist/assets/{analyticsHelper-BZ5OUhwW.js → analyticsHelper-B2nQzr20.js} +1 -1
- package/dist/assets/{core-BDPZcSG4.js → core-Ca6G0voE.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-BR3AOxh5.js → decodeURIComponentSafe-BMcEUj25.js} +1 -1
- package/dist/assets/{dnd-fU8QmJ8U.js → dnd-Be5WoH8E.js} +1 -1
- package/dist/assets/{empty-DridEUN5.js → empty-DHGdIlcJ.js} +1 -1
- package/dist/assets/{empty-CM59KsLF.js → empty-uy3M1msm.js} +1 -1
- package/dist/assets/{emptyVideoElement--ZfOaFPu.js → emptyVideoElement-IUbgWLFZ.js} +1 -1
- package/dist/assets/{epic-D7C6_Y7q.js → epic-DoVGgmyH.js} +1 -1
- package/dist/assets/getLocaleForTenant-DVEihZ-H.js +1 -0
- package/dist/assets/{index-BZG4Ai-c.js → index-BMVCuDFR.js} +1 -1
- package/dist/assets/{index-DA1h5kq3.js → index-Ck8HU4ZH.js} +1 -1
- package/dist/assets/{index-DNm9oOTV.js → index-D3FowIif.js} +1 -1
- package/dist/assets/{index-SF2RyzN1.js → index-DD9OmSLj.js} +14116 -14020
- package/dist/assets/{index-CAEfbAkM.js → index-Dcmv7y8l.js} +1 -1
- package/dist/assets/{index-TPK5ayqQ.js → index-Dpm9OcRr.js} +1 -1
- package/dist/assets/{index-BEZZznbS.js → index-Vw1oLCxE.js} +2 -2
- package/dist/assets/{index-BAkEFBVP.js → index-sd36C9hC.js} +1 -1
- package/dist/assets/{lexical-_D-pPLdL.js → lexical-DTpvAJin.js} +1 -1
- package/dist/assets/{liveblocks-B2nLBm11.js → liveblocks-4PIBJMyE.js} +1 -1
- package/dist/assets/{lottie--jYlW6ya.js → lottie-B7am_Gp2.js} +1 -1
- package/dist/assets/{mui-HaM5aBuG.js → mui-BI3ZId9r.js} +1 -1
- package/dist/assets/{pathToGoBack-Bp5QCbKd.js → pathToGoBack-CrG50xVP.js} +1 -1
- package/dist/assets/{pdf-CbrAe2yy.js → pdf-DUHWpwzW.js} +3 -3
- package/dist/assets/{pdf-lib-CHfVanCJ.js → pdf-lib-DyNMbFeB.js} +1 -1
- package/dist/assets/{plaid-DuKDxXr2.js → plaid-BFzM5Kog.js} +1 -1
- package/dist/assets/{pusher-p1571_5u.js → pusher-BmnXBdoc.js} +1 -1
- package/dist/assets/{react-DZP7sDw7.js → react-BOWfROr3.js} +1 -1
- package/dist/assets/{react-Di2JdnAu.js → react-CZFZzs7c.js} +1 -1
- package/dist/assets/{react-BvU2rtwe.js → react-CffrEBOp.js} +1 -1
- package/dist/assets/{react-BzGU_BeP.js → react-DM-Vx6Nk.js} +1 -1
- package/dist/assets/{react-CXLD6oJa.js → react-DMQWnTjk.js} +1 -1
- package/dist/assets/{react-D7-m9gXP.js → react-Wm4oo8rw.js} +1 -1
- package/dist/assets/{recharts-srrgu-jp.js → recharts-D6NnjcYi.js} +1 -1
- package/dist/assets/{routePaths-SnMLdv1K.js → routePaths-BumbtdKN.js} +1 -1
- package/dist/assets/{sentry-CLlo3TXi.js → sentry-CXcgkCeA.js} +1 -1
- package/dist/assets/{url-DqIeqdCZ.js → url-DVO5HPAn.js} +1 -1
- package/dist/assets/{url-ky0ROLAQ.js → url-DsqsNUWn.js} +1 -1
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-DQzT3CdB.js +1 -0
- package/dist/assets/useAskAiCfoHostNavButtonProps-CSLK93Wz.js +1 -0
- package/dist/assets/useCashManagementBanner-BNEI8i2V.js +1 -0
- package/dist/assets/useChargeCardPusherEvents-CtFgCR2P.js +1 -0
- package/dist/assets/{useDeviceId-CQ3pf2OT.js → useDeviceId-BbYF3u-l.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-DECXLS1_.js → useEmailConnectResultRefresh-CMs316dl.js} +1 -1
- package/dist/assets/useInitialThreadRequest-B6-oXb8Z.js +1 -0
- package/dist/assets/{utils-BPOASmy-.js → utils-DFP_hVXq.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-B0Y0F8qd.js → withTransactionSidePanel-iSi7Lgwj.js} +3 -3
- package/dist/assets/{zeni-epic-state-pQFlpfOQ.js → zeni-epic-state-BIxjj87B.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +2 -2
- package/dist/assets/AddressRoutes-ryhA6NkC.js +0 -1
- package/dist/assets/AddressScreen-DOaqqdOd.js +0 -9
- package/dist/assets/ChargeCardRoutes-DlcIGfyb.js +0 -71
- package/dist/assets/CompanyPassportScreen-BxnR6alq.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-DJSLKDHh.js +0 -1
- package/dist/assets/DomesticWireDetailScreen-BHSWlFZF.js +0 -18
- package/dist/assets/DrawerScreen-CamK1YTP.js +0 -1
- package/dist/assets/EntityDetailRoutes-PfC8fIHT.js +0 -1
- package/dist/assets/FeaturePreviewScreen-Dzx2t8Hy.js +0 -1
- package/dist/assets/MagicLinkRoutes-bDWllgx1.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-ohbu87JN.js +0 -12
- package/dist/assets/NotFoundScreen-CJUArCUU.js +0 -1
- package/dist/assets/NotificationRoutes-DALPJ5vt.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-Cfr4NDCh.js +0 -1
- package/dist/assets/PeopleRoutes-CnbJfAuy.js +0 -22
- package/dist/assets/PerformanceRoutes-DJafWptr.js +0 -1
- package/dist/assets/ReferralListScreen-BoKOnQ3K.js +0 -5
- package/dist/assets/ReportsRoutes-BsRSJ02D.js +0 -1
- package/dist/assets/RewardsRoutes-BCENel_u.js +0 -1
- package/dist/assets/ScreenRoutes-CEHFOeBg.js +0 -2
- package/dist/assets/SettingsRoutes-AG9_opZw.js +0 -57
- package/dist/assets/SignOutScreen-DNWwk74-.js +0 -9
- package/dist/assets/TaskRoutes-D4-MTXj7.js +0 -9
- package/dist/assets/ZeniAccountStatementScreen-CiRXWukF.js +0 -9
- package/dist/assets/getLocaleForTenant-z5owYbgm.js +0 -1
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-B9pMrg2d.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-85qHNrGS.js +0 -1
- package/dist/assets/useCashManagementBanner-nIaMHaL-.js +0 -1
- package/dist/assets/useChargeCardPusherEvents-CBgQ61R_.js +0 -1
- package/dist/assets/useInitialThreadRequest-CtWatCkC.js +0 -1
package/dist/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en"><head><meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate"><meta http-equiv="expires" content="0"><meta http-equiv="pragma" content="no-cache"><meta charset="UTF-8"><link rel="icon" type="image/svg+xml" href="/assets/favicon-D56XvgAH.ico"><meta name="ROBOTS" content="NOINDEX, NOFOLLOW"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1"><meta name="theme-color" content="#000000"><meta name="description" content="Zeni - Modern Finance Team For Startups"><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&family=Manrope:wght@200..800&display=swap"><link rel="apple-touch-icon" href="/assets/logo192-CqcTe-t4.png"><link rel="manifest" href="/assets/manifest-icT4lOF5.json"><title>Zeni - Modern Finance Team For Startups</title><script src="/theme-detect.js"></script><style>:root{--logo-color-from:#D4DCDD;--logo-color-to:#E9F0F0;--bar-color-from:#E9F0F0;--bar-color-to:#D4DCDD;--sidebar-bg:#F3F7F7;--main-bg:#FAFCFC;--divider-color:#D4DCDD}html{background-color:#f3f7f7}html[data-theme=dark]{background-color:#1b1c1c;--logo-color-from:#545B5C;--logo-color-to:#3E4343;--bar-color-from:#3E4343;--bar-color-to:#545B5C;--sidebar-bg:#1B1C1C;--main-bg:#202222;--divider-color:#545B5C}.app-shell-loader{position:fixed;inset:0;display:flex;background-color:var(--sidebar-bg);z-index:9999}.app-shell-sidebar{width:210px;flex-shrink:0;background-color:var(--sidebar-bg);padding:16px 16px 0;display:flex;flex-direction:column;gap:36px;border-right:1px solid var(--divider-color);box-sizing:border-box}.app-shell-sidebar-group{display:flex;flex-direction:column;gap:10px}.app-shell-bar{height:10px;border-radius:5px;background-color:var(--bar-color-from);animation:app-shell-bar-shimmer 1.6s linear infinite}.app-shell-navbar{height:56px;display:flex;flex-direction:row;border-bottom:1px solid var(--divider-color);padding:0 32px;align-items:center;justify-content:space-between;box-sizing:border-box}@keyframes app-shell-bar-shimmer{0%,100%{background-color:var(--bar-color-from)}50%{background-color:var(--bar-color-to)}}.app-shell-main{flex:1;background-color:var(--main-bg)}.app-shell-logo{display:inline-flex;width:100%;height:calc(100vh - 56px);justify-content:center;align-items:center}.app-shell-logo svg path{animation:app-shell-color-cycle 1.6s linear infinite}@keyframes app-shell-color-cycle{0%,100%{fill:var(--logo-color-from)}50%{fill:var(--logo-color-to)}}@media (max-width:899px){.app-shell-sidebar{display:none}.app-shell-main{background-color:var(--sidebar-bg)}}</style><noscript><style>.app-shell-loader{display:none}</style></noscript><script async type="module" crossorigin src="/assets/index-
|
|
1
|
+
<!DOCTYPE html><html lang="en"><head><meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate"><meta http-equiv="expires" content="0"><meta http-equiv="pragma" content="no-cache"><meta charset="UTF-8"><link rel="icon" type="image/svg+xml" href="/assets/favicon-D56XvgAH.ico"><meta name="ROBOTS" content="NOINDEX, NOFOLLOW"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1"><meta name="theme-color" content="#000000"><meta name="description" content="Zeni - Modern Finance Team For Startups"><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&family=Manrope:wght@200..800&display=swap"><link rel="apple-touch-icon" href="/assets/logo192-CqcTe-t4.png"><link rel="manifest" href="/assets/manifest-icT4lOF5.json"><title>Zeni - Modern Finance Team For Startups</title><script src="/theme-detect.js"></script><style>:root{--logo-color-from:#D4DCDD;--logo-color-to:#E9F0F0;--bar-color-from:#E9F0F0;--bar-color-to:#D4DCDD;--sidebar-bg:#F3F7F7;--main-bg:#FAFCFC;--divider-color:#D4DCDD}html{background-color:#f3f7f7}html[data-theme=dark]{background-color:#1b1c1c;--logo-color-from:#545B5C;--logo-color-to:#3E4343;--bar-color-from:#3E4343;--bar-color-to:#545B5C;--sidebar-bg:#1B1C1C;--main-bg:#202222;--divider-color:#545B5C}.app-shell-loader{position:fixed;inset:0;display:flex;background-color:var(--sidebar-bg);z-index:9999}.app-shell-sidebar{width:210px;flex-shrink:0;background-color:var(--sidebar-bg);padding:16px 16px 0;display:flex;flex-direction:column;gap:36px;border-right:1px solid var(--divider-color);box-sizing:border-box}.app-shell-sidebar-group{display:flex;flex-direction:column;gap:10px}.app-shell-bar{height:10px;border-radius:5px;background-color:var(--bar-color-from);animation:app-shell-bar-shimmer 1.6s linear infinite}.app-shell-navbar{height:56px;display:flex;flex-direction:row;border-bottom:1px solid var(--divider-color);padding:0 32px;align-items:center;justify-content:space-between;box-sizing:border-box}@keyframes app-shell-bar-shimmer{0%,100%{background-color:var(--bar-color-from)}50%{background-color:var(--bar-color-to)}}.app-shell-main{flex:1;background-color:var(--main-bg)}.app-shell-logo{display:inline-flex;width:100%;height:calc(100vh - 56px);justify-content:center;align-items:center}.app-shell-logo svg path{animation:app-shell-color-cycle 1.6s linear infinite}@keyframes app-shell-color-cycle{0%,100%{fill:var(--logo-color-from)}50%{fill:var(--logo-color-to)}}@media (max-width:899px){.app-shell-sidebar{display:none}.app-shell-main{background-color:var(--sidebar-bg)}}</style><noscript><style>.app-shell-loader{display:none}</style></noscript><script async type="module" crossorigin src="/assets/index-DD9OmSLj.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-CXcgkCeA.js"><link rel="modulepreload" crossorigin href="/assets/core-Ca6G0voE.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-BIxjj87B.js"><link rel="modulepreload" crossorigin href="/assets/mui-BI3ZId9r.js"><link rel="modulepreload" crossorigin href="/assets/analytics-dJ9Vu0DH.js"><link rel="modulepreload" crossorigin href="/assets/utils-DFP_hVXq.js"><link rel="stylesheet" crossorigin href="/assets/index-BUmr5maU.css"></head><body style="margin:0"><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><div class="app-shell-loader" id="app-shell-loader"><div class="app-shell-sidebar"><div class="app-shell-sidebar-group"><div class="app-shell-bar zeni-logo" style="width:96px;height:20px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:78px;height:16px"></div><div class="app-shell-bar" style="width:46px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:110px;height:16px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div><div class="app-shell-bar" style="width:64px;height:16px"></div></div></div><div class="app-shell-main"><div class="app-shell-navbar"><div class="app-shell-bar" style="width:106px;height:27px"></div><div class="app-shell-bar" style="width:111px;height:32px"></div></div><div class="app-shell-logo"><svg width="96" height="96" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.768 0.0270284C16.571 -0.055168 16.348 0.0572476 16.2913 0.267574C16.2713 0.342517 16.2489 0.417461 16.2253 0.491196C16.0094 1.15723 15.6459 1.76645 15.148 2.27776C14.3056 3.14203 13.1847 3.61949 11.9918 3.6207H11.9883C10.7978 3.6207 9.67689 3.14565 8.83445 2.2838C8.33653 1.7737 7.97077 1.16448 7.75367 0.499657C7.73007 0.425922 7.70765 0.350979 7.68641 0.276035C7.62978 0.065709 7.40678 -0.0454978 7.20974 0.0366985C6.05463 0.522624 4.98565 1.17899 4.0323 1.97436C3.91195 2.07468 3.87301 2.24512 3.93083 2.39259C3.9792 2.51589 4.03112 2.63797 4.08539 2.75764C4.51133 3.70894 5.10364 4.5853 5.84815 5.34682C7.48937 7.0246 9.66863 7.9493 11.9871 7.9493H11.9954C14.3162 7.94689 16.4978 7.01855 18.1379 5.33595C18.8812 4.57321 19.4711 3.69564 19.8959 2.74434C19.9502 2.62347 20.0009 2.50138 20.0493 2.37809C20.1071 2.23062 20.0682 2.06018 19.9478 1.95985C18.9933 1.16569 17.9231 0.511745 16.768 0.0270284Z"/><path d="M19.9102 21.2422C19.4843 20.2933 18.8931 19.4194 18.151 18.6603C16.5086 16.9801 14.3223 16.053 12.0038 16.0578C8.50304 16.0614 5.48371 18.1961 4.11031 21.2603C4.05722 21.38 4.0053 21.5009 3.95575 21.623C3.89675 21.7704 3.93569 21.9421 4.05722 22.0436C5.01175 22.8366 6.08073 23.4893 7.23466 23.9728C7.4317 24.055 7.65352 23.9438 7.71134 23.7335C7.73139 23.6573 7.75381 23.5836 7.77859 23.5086C8.37207 21.6979 10.0416 20.3888 12.0073 20.3864H12.012C13.2025 20.3864 14.3234 20.8614 15.1659 21.7233C15.6626 22.231 16.026 22.8378 16.2431 23.5002C16.2679 23.5739 16.2903 23.6489 16.3104 23.7238C16.3682 23.9341 16.59 24.0453 16.787 23.9619C17.9422 23.476 19.01 22.8209 19.9633 22.0255C20.0837 21.9252 20.1226 21.7535 20.0648 21.606C20.0164 21.4828 19.9645 21.3631 19.9102 21.2422Z"/><path d="M0.132148 10.1666C0.158105 9.98769 0.305591 9.85352 0.482575 9.85352L23.5093 9.81726C23.6863 9.81726 23.8338 9.95022 23.8609 10.1291C23.9518 10.7347 23.999 11.3548 23.999 11.9858C24.0001 12.6131 23.9541 13.2284 23.8668 13.8292C23.8408 14.0081 23.6934 14.1422 23.5164 14.1422L0.489654 14.1773C0.312671 14.1773 0.165185 14.0443 0.138047 13.8654C0.0471956 13.2598 0 12.6397 0 12.0088C0 11.3826 0.0448358 10.7673 0.132148 10.1666Z"/></svg></div></div></div></body></html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/web-app-ui",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.86-dev",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist/**/*"
|
|
6
6
|
],
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@stripe/stripe-js": "^4.4.0",
|
|
30
30
|
"@zeniai/client-analytics": "2.0.28",
|
|
31
31
|
"@zeniai/client-epic-state": "5.1.21",
|
|
32
|
-
"@zeniai/web-components": "4.2.
|
|
32
|
+
"@zeniai/web-components": "4.2.5",
|
|
33
33
|
"color": "3.1.3",
|
|
34
34
|
"cross-fetch": "^4.0.0",
|
|
35
35
|
"crypto-js": "4.2.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-B2nLBm11.js";import{A as d}from"./AddressScreen-DOaqqdOd.js";import i from"./NotFoundScreen-CJUArCUU.js";import"./sentry-CLlo3TXi.js";import{o as s,p as r}from"./core-BDPZcSG4.js";import"./zeni-epic-state-pQFlpfOQ.js";import"./recharts-srrgu-jp.js";import"./index-SF2RyzN1.js";import"./mui-HaM5aBuG.js";import"./analytics-7PXXxPIN.js";import"./plaid-DuKDxXr2.js";import"./dnd-fU8QmJ8U.js";import"./stripe-DMRn4zHo.js";import"./lottie--jYlW6ya.js";import"./lexical-_D-pPLdL.js";import"./pdf-CbrAe2yy.js";import"./utils-BPOASmy-.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="cd0ff2b4-1e27-4329-addf-f475e5a9db34",t._sentryDebugIdIdentifier="sentry-dbid-cd0ff2b4-1e27-4329-addf-f475e5a9db34")}catch{}})();function _(){return e.jsxs(s,{children:[e.jsx(r,{path:"/edit/:addressType/:addressId",element:e.jsx(d,{})}),e.jsx(r,{path:"/new/:addressType",element:e.jsx(d,{})}),e.jsx(r,{path:"*",element:e.jsx(i,{})})]})}export{_ as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-B2nLBm11.js";import{a as h}from"./sentry-CLlo3TXi.js";import{h as T,u as _,g as j,i as M,j as E,n as B}from"./core-BDPZcSG4.js";import{K,y as $,z as D,k as L,B as U,v as G,d as C,f as S,G as z,m as b,q as F}from"./index-SF2RyzN1.js";import{MI as I,hU as R,eX as q,MJ as N,c6 as O,MK as V,ld as H}from"./zeni-epic-state-pQFlpfOQ.js";import{n as J}from"./mui-HaM5aBuG.js";import X from"./NotFoundScreen-CJUArCUU.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="1dcee055-4274-4a22-a2e6-6984fa94486d",e._sentryDebugIdIdentifier="sentry-dbid-1dcee055-4274-4a22-a2e6-6984fa94486d")}catch{}})();const Q=J.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=B(function(e,t){const{addressId:o,isSubPage:i,addressType:c}=t,l=q(e),a=t.roleMap!=null&&N(t.roleMap),d=i||c==="user_address"||O(l?.userRole??[])||a?void 0:"readonly";if(o==null){const s=V(c,e);return{addressToEdit:s?.addressToCreate,loadingState:s?.status?.fetchState,googleAPIKey:b.googleMapsAPIKey,isDisabled:d,isSubPage:i,dontShowSaveConfirmationPopup:t.dontShowSaveConfirmation}}const n=I(e,o);return{addressToEdit:n.address,loadingState:n.fetchState,googleAPIKey:b.googleMapsAPIKey,isDisabled:d}},function(e,t){const{navigate:o,location:i,addressType:c}=t,l=a=>{if(a==="express-pay")o("../express-pay/add-wire");else{const d=i.state,n=F(d?.pathnameStackToGoBack);let s=n.poppedPathname??k();const u=d?.queryParams;if(u){const g=new URLSearchParams(u).toString();g&&(s=`${s}?${g}`)}o(s,{state:{pathnameStackToGoBack:n.newStack}})}};return{onSubmitHandler:a=>{const d=Y(a);e(H({addressType:c,addressToCreate:d})),C?.trackSaveAddressClicked(S.Event.saveAddressClicked,{street:a.street.addressString,city:a.city,state:a.state,country:a.country.selectedOption??"",postalCode:a.postalCode,suite:a.suite,secondaryInfo:a.secondaryInfo}),l(t.bankAccountContext)},onCancel:()=>{l(t.bankAccountContext)}}})(z);function re({isSubPage:e,hideAddressSubTitle:t=!1,hideAddressBackButton:o=!1,dontShowSaveConfirmation:i,accountContext:c,addressTypeParam:l}){const a=T(),d=_(),n=j(),{addressId:s,addressType:u}=M(),g=K(),w=$(),v=D.getSignedInUser(),[f,x]=h.useState(s==null),p=E(m=>s!=null?I(m,s).fetchState:"Not-Started"),A=L();if(v==null)throw Error("Can't access address page without signing in...");const P=m=>m.trackPageLoaded(s!=null?S.Event.editAddress:S.Event.addAddress),y=l??u;return h.useEffect(()=>{f||s==null||(x(!0),d(R(s,!1)))},[f,s,d]),y==null||y.match(/(user_address|company_address|company_registered_address|vendor_address|officer_([1-9]|10)_address)$/g)?!f&&p==="Not-Started"||f&&p==="In-Progress"?r.jsx(U,{fetchState:p,style:{backgroundColor:w.colors.grey5}}):s!=null&&p==="Error"?(a(`${k(1)}/new`,{replace:!0}),r.jsx(r.Fragment,{})):r.jsxs(r.Fragment,{children:[r.jsx(G,{analytics:C,onLoad:P}),r.jsx(Q,{windowSize:g,children:r.jsx(W,{location:n,navigate:a,isSubPage:e===!0,hideAddressBackButton:o,hideAddressSubTitle:t,addressId:s,addressType:y,dontShowSaveConfirmation:i,bankAccountContext:c,roleMap:A?.loggedInUserRoleMap})})]}):r.jsx(X,{})}const k=(e=2)=>{let t="../";for(let o=0;o<e;o++)t=`${t}../`;return t},Y=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,Y as t};
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import{j as c}from"./liveblocks-B2nLBm11.js";import{u as me,j as i,h as le,g as he,i as Ve,N as oa,s as _t,n as Pe,t as An,o as ts,p as ce}from"./core-BDPZcSG4.js";import{f8 as Pt,RT as ns,fk as wt,bt as Fe,RU as rs,RV as ss,eZ as pn,RW as Dn,f6 as _n,RX as Pn,RY as wn,RZ as vn,R_ as Tn,f7 as Fn,fj as xn,R$ as Bn,S0 as cs,fd as os,fc as is,S1 as ds,C2 as Rn,fm as ia,S2 as ls,S3 as us,e$ as ms,e_ as Cs,fz as Ke,ff as Ln,fe as On,S4 as ps,fg as hs,Bz as fs,By as gs,BC as Ss,BE as bs,fs as ys,eW as Un,S5 as Is,S6 as ks,fx as jn,S7 as Es,fy as yt,BK as As,BH as Ds,eX as ge,S8 as qa,fC as xe,fD as Be,fE as Re,gw as da,cv as la,S9 as ua,Sa as vt,uQ as $a,kF as za,Sb as Ka,Ci as ka,fn as Qe,Ck as Tt,kv as Mn,Sc as ma,C6 as _a,Sd as _s,Se as Ps,C9 as Qa,Sf as ws,Qf as Xa,fi as Nn,Cf as Sa,hV as vs,Sg as Vn,f9 as Ca,bo as Ts,Sh as Fs,gh as Ja,gg as et,CO as xs,gf as at,PX as Bs,Si as Hn,co as Gn,cQ as Rs,Qe as wa,Dn as $n,Sj as hn,CZ as Pa,Sk as zn,Do as Ls,QD as Os,Dp as Us,Eu as js,ub as Ms,Eo as Ns,Sl as Vs,Cj as sa,Sm as Hs,Sn as Gs,So as $s,Sp as zs,Sq as Ks,Sr as Ft,Ss as Zs,Cz as Kn,Cs as Ys,St as Ws,gy as qs,CI as Zn,CM as Yn,gx as Qs,Su as Xs,D9 as Wn,Sv as Js,Sw as ec,Sx as ac,CK as qn,Cv as Qn,Cc as Xn,CE as Jn,CC as er,CG as tc,Sy as ar,Sz as nc,fu as rc,fv as sc,fw as cc,SA as tt,fo as tr,cS as xt,SB as oc,SC as ic,SD as dc,SE as lc,CU as It,Dg as uc,Dc as mc,CQ as Cc,De as pc,D4 as hc,D6 as fc,SF as nr,Dm as Ga,Kd as gc,SG as Sc,SH as bc,SI as yc,SJ as rr,SK as Ic,DJ as kc,CY as sr,CT as Ne,CX as Ec,SL as Ac,SM as Dc,C3 as _c,SN as cr,fh as or,SO as Pc,C5 as wc,C4 as fn,SP as vc,SQ as Tc,SR as Fc,MK as xc,SS as Bt,ST as Bc,xR as ir,ld as Rc,hL as Lc,DO as Oc,SU as dr,f3 as Uc,f4 as jc,SV as Mc,dj as Nc,fl as Vc,DE as Hc,Dy as qe,bs as Gc,bJ as $c,cA as zc,bK as Kc,LX as Zc}from"./zeni-epic-state-pQFlpfOQ.js";import{k as Le,cq as lr,q as we,cr as ur,cs as mr,ct as Yc,a as Je,$ as Rt,cu as Wc,cv as qc,X as Cr,c as pr,Z as hr,r as ye,V as ue,Q as Z,aq as ya,cw as fr,cx as Qc,cy as Xc,z as te,B as va,cf as nt,cz as Jc,cA as eo,cB as ao,K as Ta,aR as Ze,bs as Lt,cC as to,x as Fa,m as rt,y as Ot,d as J,a8 as st,cD as no,bF as ba,cE as kt,cF as ro,v as Ut,cG as so,at as gr,a3 as Et,cH as co,Y as Sr,f as br,cI as oo,cJ as io,cK as lo,cL as uo,cM as mo,cN as Co,o as Za,cO as po,cP as ho,cQ as ht,T as fo,cR as go,cS as So,cT as bo,cU as yo,cV as Io,i as ko}from"./index-SF2RyzN1.js";import{n as He,D as yr,S as Eo}from"./mui-HaM5aBuG.js";import{a as r}from"./sentry-CLlo3TXi.js";import{u as xa}from"./useAskAiCfoHostNavButtonProps-85qHNrGS.js";import{M as Ie}from"./MobileAppDrawer-S5tfidhL.js";import{d as jt}from"./recharts-srrgu-jp.js";import{g as _e,a as Ba,b as Ir,c as Oe,d as Ue,e as Xe,f as ea,h as aa,A as Ao,i as Mt,P as Do,j as Nt,s as Ia,k as kr,l as ca,m as Er,n as _o,o as Ar,p as Po,S as gn}from"./SetupPagesScreen-dycHQYQB.js";import{u as Dr}from"./useInitialThreadRequest-CtWatCkC.js";import ct from"./NotFoundScreen-CJUArCUU.js";import{u as Vt}from"./useChargeCardPusherEvents-CBgQ61R_.js";import{n as Sn}from"./utils-BPOASmy-.js";import{t as wo}from"./AddressScreen-DOaqqdOd.js";import"./analytics-7PXXxPIN.js";import"./plaid-DuKDxXr2.js";import"./dnd-fU8QmJ8U.js";import"./stripe-DMRn4zHo.js";import"./lottie--jYlW6ya.js";import"./lexical-_D-pPLdL.js";import"./pdf-CbrAe2yy.js";import"./analyticsHelper-BZ5OUhwW.js";import"./routePaths-SnMLdv1K.js";import"./BusinessVerificationPageScreen-CEKnQSmV.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3f9c1a95-3062-4553-a640-d91aa0c65eb1",e._sentryDebugIdIdentifier="sentry-dbid-3f9c1a95-3062-4553-a640-d91aa0c65eb1")}catch{}})();const vo=e=>{const n=e.cardHolderUser,t=`${n.firstName??""} ${n.lastName??""}`.trim()||n.email||n.userId;return{userId:n.userId,displayName:t,roleLabel:e.cardHolderRoles?.titleAtCompany}},_r=e=>({id:e.id,isChecked:!1,cardName:e.cardName,last4:e.accountLast4,limitAmount:e.limit?.amount??0,limitCadence:e.creditLimitFrequency?.code,owner:vo(e),utilizationAmount:(e.limit?.amount??0)-(e.available?.amount??0)});function Pr(){const e=me(),n=i(a=>Pt(a.cardPolicyState)),t=i(a=>ns(a.cardPolicyState));r.useEffect(()=>{t!==""||n==="Completed"&&t===""||n==="In-Progress"||e(wt())},[e,n,t])}const{spendManagement:{chargeCard:{cardPolicyPage:bn}}}=Je.getLocalizedStrings(),To=e=>Ln(e,!1),Fo=e=>On(e.name,!1);function xo(){const e=le(),n=he(),{tenantEmailDomain:t}=Ve(),a=me(),s=Le(),b=Fe(s?.loggedInUserRoleMap),[g,S]=r.useState(!1),P=r.useCallback(A=>{S(A)},[]),u=r.useCallback(()=>{P(!0)},[P]),{isAiCfoAccessEnabled:C,onAskAiCfoClick:F}=xa({mobileExploreReferrer:"Card Policy"});r.useEffect(()=>()=>{a(rs()),a(ss()),a(pn())},[a]);const v=i(A=>Dn(A.cardPolicyState)),m=i(A=>_n(A.cardPolicyState)),M=i(A=>Pn(A.cardPolicyState)),B=i(A=>wn(A.cardPolicyState)),R=i(A=>vn(A.cardPolicyState)),p=i(A=>Tn(A.cardPolicyState)),h=i(A=>Fn(A.cardPolicyState)),T=i(A=>Pt(A.cardPolicyState)),l=i(A=>A.chargeCardConfigState.receiptRequiredAboveAmount.amount),w=i(A=>A.chargeCardConfigState.fetchState);r.useEffect(()=>{v!=="Completed"&&v!=="In-Progress"&&a(xn())},[a,v]),Pr();const E=i(A=>Bn(A.createCardPolicyState)),U=i(A=>cs(A.createCardPolicyState)),y=i(A=>os(A.cardPolicyState)),k=i(A=>is(A.cardPolicyState)),x=i(A=>ds(A.createCardPolicyState)),d=i(A=>Rn(A));r.useEffect(()=>{d.fetchState==="Not-Started"&&a(ia(!1,!1,!1))},[d.fetchState,a]);const f=r.useMemo(()=>m.map(To),[m]),j=r.useMemo(()=>h.map(Fo),[h]),H=r.useMemo(()=>d.cards.filter(A=>!lr(A.status.code)).map(_r),[d.cards]),O=v==="Completed"&&d.fetchState==="Completed"&&w==="Completed";r.useEffect(()=>{O&&x==null&&a(ls({cardsMasterList:H,defaultRequireReceiptAmount:l,suggestedAllowMerchants:M,suggestedBlockMerchants:B,suggestedAllowCategories:R,suggestedBlockCategories:p}))},[w,a,O,x,H,l,M,B,R,p]);const L=r.useMemo(()=>jt(A=>{a(wt(A))},250),[a]);r.useEffect(()=>()=>{L.cancel()},[L]);const z=r.useCallback(A=>{L(A)},[L]),$=E.fetchState,_=t!=null?`/${t}/cards/policy`:"..",D=r.useCallback(()=>{const A=we(n.state?.pathnameStackToGoBack),W=A.poppedPathname??_;e(W,{state:{pathnameStackToGoBack:A.newStack}})},[n.state,e,_]),G=r.useCallback(()=>{e(_)},[e,_]),Q=r.useCallback(A=>{a(us(A))},[a]),I=r.useCallback(A=>{const W=ur(A);a(ms({templates:[W]}))},[a]),N=r.useCallback(A=>{A.length!==0&&a(Cs(A))},[a]),Y=r.useCallback(()=>{a(pn())},[a]),X=r.useRef($);r.useEffect(()=>{const A=X.current;X.current=$,$==="Completed"&&A!=="Completed"&&U!=null&&(a(Ke({messageSection:"card_policy_created",messageText:"success",type:"success"})),e(_))},[a,$,U,e,_]);const o=$==="Error"?E.error?.message??bn.createPolicyGenericErrorMessage:void 0;return b&&t!=null?x==null?c.jsxs(c.Fragment,{children:[c.jsx(Ie,{isAppContentDrawerOpen:g,handleDrawerToggle:P}),c.jsx(mr,{showUploadDocumentSection:!0,navBarTitle:bn.createPageTitle,onBackClick:D,onClickMenuIcon:u,isAiCfoAccessEnabled:C,onAskAiCfoClick:F})]}):c.jsxs(c.Fragment,{children:[c.jsx(Ie,{isAppContentDrawerOpen:g,handleDrawerToggle:P}),c.jsx(Yc,{formDraft:x,vendorSearchOptions:j,categorySearchOptions:f,isVendorSearchLoading:T==="In-Progress",onVendorSearchTextChange:z,submitState:$,submitErrorMessage:o,documentUploadState:y,uploadedFileName:k,isAiCfoAccessEnabled:C,onAskAiCfoClick:F,onBackClick:D,onCancelClick:G,onClickMenuIcon:u,onFormChange:Q,onSubmit:I,onUploadDocument:N,onRemoveDocument:Y})]}):c.jsx(oa,{to:"..",replace:!0})}const{spendManagement:{chargeCard:{cardPolicyPage:Bo}}}=Je.getLocalizedStrings(),Ro=e=>Ln(e,!1),Lo=e=>On(e.name,!1);function Oo(){const e=le(),n=he(),{tenantEmailDomain:t,templateId:a}=Ve(),s=me(),b=Le(),g=Fe(b?.loggedInUserRoleMap),[S,P]=r.useState(!1),u=r.useCallback(o=>{P(o)},[]),C=r.useCallback(()=>{u(!0)},[u]),{isAiCfoAccessEnabled:F,onAskAiCfoClick:v}=xa({mobileExploreReferrer:"Card Policy"}),m=i(o=>ps(o)),M=i(o=>Dn(o.cardPolicyState)),B=i(o=>_n(o.cardPolicyState)),R=i(o=>Pn(o.cardPolicyState)),p=i(o=>wn(o.cardPolicyState)),h=i(o=>vn(o.cardPolicyState)),T=i(o=>Tn(o.cardPolicyState)),l=i(o=>Fn(o.cardPolicyState)),w=i(o=>Pt(o.cardPolicyState)),E=i(o=>Rn(o)),U=i(o=>a!=null?hs(o.cardPolicyState,a):void 0),y=r.useMemo(()=>m.templateId===a&&m.formDraft!=null?m.formDraft:U!=null?fs(U):void 0,[m.templateId,m.formDraft,U,a]);r.useEffect(()=>{if(a==null)return;const o=m.detailFetchState.fetchState;m.templateId===a&&(o==="Completed"||o==="In-Progress")||U!=null||s(gs(a))},[s,a,m.templateId,m.detailFetchState.fetchState,U]),r.useEffect(()=>{M!=="Completed"&&M!=="In-Progress"&&s(xn())},[s,M]),Pr();const k=i(o=>o.chargeCardConfigState.receiptRequiredAboveAmount.amount);r.useEffect(()=>{E.fetchState==="Not-Started"&&s(ia(!1,!1,!1))},[E.fetchState,s]);const x=r.useMemo(()=>B.map(Ro),[B]),d=r.useMemo(()=>l.map(Lo),[l]),f=r.useMemo(()=>E.cards.filter(o=>!lr(o.status.code)).map(_r),[E.cards]);Rt({isDataReady:y!=null});const j=r.useMemo(()=>{if(y!=null)return Wc({draft:y,cardRows:f,categorySearchOptions:x,vendorSearchOptions:d,defaultRequireReceiptAmount:k,suggestedAllowMerchants:R,suggestedBlockMerchants:p,suggestedAllowCategories:h,suggestedBlockCategories:T})},[y,f,x,d,k,R,p,h,T]),[H,O]=r.useState(void 0),L=r.useRef(!1);r.useEffect(()=>{L.current||H!=null||j==null||(L.current=!0,O(j))},[H,j]);const z=r.useCallback(o=>{O(o)},[]),$=r.useMemo(()=>jt(o=>{s(wt(o))},250),[s]);r.useEffect(()=>()=>{$.cancel()},[$]);const _=r.useCallback(o=>{$(o)},[$]),D=m.updateFetchState.fetchState,G=t!=null?`/${t}/cards/policy`:"..",Q=r.useCallback(()=>{const o=we(n.state?.pathnameStackToGoBack),A=o.poppedPathname??G;e(A,{state:{pathnameStackToGoBack:o.newStack}})},[n.state,e,G]),I=r.useCallback(()=>{e(G)},[e,G]),N=r.useCallback(o=>{if(a==null)return;const A=ur(o);s(Ss(A)),s(bs(a))},[s,a]),Y=r.useRef(D);r.useEffect(()=>{const o=Y.current;Y.current=D,D==="Completed"&&o!=="Completed"&&(s(Ke({messageSection:"card_policy_updated",messageText:"success",type:"success"})),e(G))},[s,D,e,G]);const X=D==="Error"?m.updateFetchState.error?.message??Bo.updatePolicyGenericErrorMessage:void 0;return!g||t==null||a==null?c.jsx(oa,{to:"..",replace:!0}):H!=null&&M==="Completed"&&E.fetchState==="Completed"?c.jsxs(c.Fragment,{children:[c.jsx(Ie,{isAppContentDrawerOpen:S,handleDrawerToggle:u}),c.jsx(qc,{templateName:m.template?.name??"",formDraft:H,vendorSearchOptions:d,categorySearchOptions:x,isVendorSearchLoading:w==="In-Progress",onVendorSearchTextChange:_,submitState:D,submitErrorMessage:X,isAiCfoAccessEnabled:F,onAskAiCfoClick:v,onBackClick:Q,onCancelClick:I,onClickMenuIcon:C,onFormChange:z,onSubmit:N})]}):c.jsxs(c.Fragment,{children:[c.jsx(Ie,{isAppContentDrawerOpen:S,handleDrawerToggle:u}),c.jsx(mr,{showUploadDocumentSection:!1,navBarTitle:m.template?.name,onBackClick:Q,onClickMenuIcon:C,isAiCfoAccessEnabled:F,onAskAiCfoClick:v})]})}function wr(e,n,t){return n?e.filter(a=>a!=null&&a.trim().length>0).slice(0,t):[]}function vr(e){return i(n=>e==null||e===""?{chips:ft,isResolved:!1}:function(t){const a=t?.fetchState,s=a==="Completed"||a==="Error";return{chips:a==="Completed"?t?.suggestedQuestions??ft:ft,isResolved:s}}(ys(n,e)),_t)}const ft=[],{spendManagement:{chargeCard:{cardPolicyAiCfoHero:{headline:Uo,subheadline:jo,pageTitle:Mo}}}}=Je.getLocalizedStrings(),No=e=>{const n=e.cardsCount>0?e.cardsCount:e.appliedCards.length,t=e.allowedEntity.merchantNames.length+e.blockedEntity.merchantNames.length,a=e.allowedEntity.categoryCodes.length+e.blockedEntity.categoryCodes.length;return{templateId:e.templateId,name:e.name,description:e.description,mode:e.mode==="flexible"?"flexible":"strict",createdAtFormatted:e.createdAt.format("ll"),cardsCount:n,vendorRestrictionsCount:t,categoryRestrictionsCount:a}};function Vo(){const e=le(),n=he(),{tenantEmailDomain:t}=Ve(),a=me(),s=Le(),b=Fe(s?.loggedInUserRoleMap),[g,S]=r.useState(!1),P=r.useCallback(_=>{S(_)},[]),u=r.useCallback(()=>{P(!0)},[P]),{useFeatureGate:C}=ue(),{isFeatureEnabled:F}=C(Z.isAiCfoFileUploadEnabled),{isFeatureEnabled:v}=C(Z.isCardPolicyEnabled),{isAiCfoAccessEnabled:m,onAskAiCfoClick:M}=xa({mobileExploreReferrer:"Card Policy"}),B=i(_=>Is(_)),R=i(_=>Bn(_.createCardPolicyState)),p=i(_=>ks(_.createCardPolicyState)),h=i(_=>p==null?[]:jn(_.aiCfoState,p).filter(D=>D.kind==="creating_policy"),_t),T=R.fetchState==="In-Progress"?Math.max(h.length,1):0,l=i(_=>Es(_.createCardPolicyState)),w=ya(R.fetchState);r.useEffect(()=>{if(w==="In-Progress"&&R.fetchState==="Completed"&&p!=null)h.forEach(_=>{a(yt({chatSessionId:p,id:_.id,entityIds:l,kind:"created_policy"}))});else if(w==="In-Progress"&&R.fetchState==="Error"&&p!=null){h.forEach(D=>{a(yt({chatSessionId:p,id:D.id,kind:"errored_policy"}))});const _=R.error?.message!=null&&R.error.message.length>0?R.error.message:Je.getLocalizedStrings().common.errorMessage.somethingWentWrongPleaseTryAgain;a(Ke({messageSection:"card_policy_created",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"_api-error_",variableValue:_}]}))}},[R.error?.message,R.fetchState,a,p,l,h,w]);const E=B.fetchState.fetchState;r.useEffect(()=>{E!=="Not-Started"&&E!=="Error"||a(As())},[a,E]);const U=B.archiveFetchState.fetchState,y=ya(U);r.useEffect(()=>{y==="In-Progress"&&U==="Completed"&&a(Ke({messageSection:"card_policy_deleted",messageText:"success",type:"success"}))},[U,a,y]);const k=r.useMemo(()=>B.templates.map(No),[B.templates]);Rt({isDataReady:B.fetchState.fetchState==="Completed"});const x=k.length>0||T>0,d=function(_){const{hasAnyPolicies:D,isChargeCardAdmin:G,isFileUploadEnabled:Q}=_,I=le(),N=he(),{tenantEmailDomain:Y}=Ve(),{isAiCfoOpen:X,setIsAiCfoOpen:o}=Cr(),A=pr(),W=hr(),ne=i(oe=>Un(oe)).createSessionAndSubmitState.fetchState==="In-Progress",{chips:q,isResolved:ke}=vr("card_policy"),ve=r.useMemo(()=>wr(q,ke,3),[q,ke]),[fe,se]=r.useState(""),Ee=W&&A&&Y!=null&&!X,re=r.useCallback(oe=>{if(Y==null)return;const fa=ye(N.state?.pathnameStackToGoBack,N.pathname);I(`/${Y}/cards/ask`,{state:{message:"",origin:"",pathnameStackToGoBack:fa,referrer:"card_policy_hero",aiCfoInitialQuestion:oe,aiCfoShouldSubmit:oe!=null&&oe.trim().length>0}})},[N.pathname,N.state,I,Y]),Ce=r.useCallback(oe=>{oe.trim().length!==0&&(se(""),re(oe))},[re]),Ae=r.useCallback(()=>{const oe=fe.trim();oe.length!==0&&(se(""),re(oe))},[fe,re]),ee=r.useCallback(()=>{},[]),Te=r.useCallback(oe=>{se(oe)},[]),De=r.useCallback(()=>{o(!0)},[o]),ae=r.useCallback(()=>{re(void 0)},[re]);return r.useMemo(()=>{if(Ee&&!D&&G)return{aiAgentName:Mo,headline:Uo,subheadline:jo,promptChips:ve,composer:{currentInput:fe,isSubmitting:ne,isFileUploadEnabled:Q,onInputChange:Te,onSubmit:Ae,onStopSubmit:ee},onPromptClick:Ce,onOpenSidePanel:De,onOpenFullView:ae,dataTestIdPrefix:"card-policy-ai-cfo-hero"}},[fe,D,Ee,G,Q,ne,Te,ae,De,Ce,ee,Ae,ve])}({hasAnyPolicies:x,isChargeCardAdmin:b,isFileUploadEnabled:F}),f=v&&d!=null?c.jsx(fr,{...d}):null,j=m&&f==null,H=r.useCallback(()=>{const _=we(n.state?.pathnameStackToGoBack),D=_.poppedPathname??"..";e(D,{state:{pathnameStackToGoBack:_.newStack}})},[n.state,e]),O=r.useCallback(()=>{t!=null&&e(`/${t}/cards/policy/new`)},[e,t]),L=r.useCallback(_=>{t!=null&&e(`/${t}/cards/policy/${_}/edit`)},[e,t]),z=r.useCallback(_=>{a(Ds(_))},[a]),$=B.fetchState.fetchState;return!x&&$!=="Completed"&&$!=="Error"?c.jsxs(c.Fragment,{children:[c.jsx(Ie,{isAppContentDrawerOpen:g,handleDrawerToggle:P}),c.jsx(Qc,{onBackClick:H,onNewPolicyClick:O,onClickMenuIcon:u,isAiCfoAccessEnabled:m,onAskAiCfoClick:M})]}):c.jsxs(c.Fragment,{children:[c.jsx(Ie,{isAppContentDrawerOpen:g,handleDrawerToggle:P}),c.jsx(Xc,{policies:k,archivingTemplateId:B.archiveTargetTemplateId,pendingCreationCount:T,onBackClick:H,onNewPolicyClick:O,onEditPolicyClick:L,onArchivePolicyClick:z,onClickMenuIcon:u,policyAiCfoHero:f,isAiCfoAccessEnabled:j,onAskAiCfoClick:M})]})}function Ho(){const e=le(),{cardId:n}=Ve(),t=me(),a=te.getSignedInUser(),s=i(q=>ge(q)),b=Le(),g=Fe(b?.loggedInUserRoleMap),{useFeatureGate:S}=ue();if(a==null)throw Error("Can't access Add To Wallet Page without signing in...");const[P,u]=r.useState(!1),C=i(q=>qa(q).firstViewAfterActivation);if(n==null)throw Error("Empty card id is not valid...");const F=s.userRole.includes("charge_card_user"),{isFeatureEnabled:v}=S(Z.isChargeCardFeatureEnabled),m=!!s.companyChargeCardInfo?.info?.isChargeCardEnabled,{isFeatureEnabled:M}=S(Z.isDebitCardFeatureEnabled),B=xe(s),R=Be(s),p=Re(M,s),h=s.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,T=Oe({isDebitCardFeatureEnabled:M,isBankingOnlyTenant:p}),l=Ue({isCardsOnlyTenant:B,isChargeCardFeatureEnabled:v,isBookKeepingTenant:R,isDebitCardProductVisible:T,chargeCardsCreditAccountLimit:h}),w=!!s.companyDebitCardInfo?.info?.isDebitCardEnabled,E=i(q=>da(q,s.companyId)),U=la(E.controllers),{creditAccount:y,creditAccountRepayment:k}=i(q=>ua(q)),x=i(q=>q.classListState.fetchState),d=!F&&l&&m,f=i(q=>vt(q,n,d,l)),[j,H]=r.useState(!1),O=f.chargeCard,L=O?.cardCreatedByUser?.userId,z=i(q=>L!=null?$a(q.userRoleState,L):void 0),$=z?.accountingClassIDs[0],_=i(q=>$!=null?za(q.classState,{classId:$,reportId:"class_list"}):void 0),D=O?.cardHolderUser?.userId,G=i(q=>D!=null?$a(q.userRoleState,D):void 0),Q=G?.accountingClassIDs[0],I=i(q=>Q!=null?za(q.classState,{classId:Q,reportId:"class_list"}):void 0),N=O?.type.code==="business_physical_credit_card"||O?.type.code==="business_physical_debit_card",Y=O?.type.code==="business_physical_debit_card";r.useEffect(()=>{C&&P===!1&&N&&(u(!0),setTimeout(()=>{t(Ka()),Y&&t(Ke({messageSection:"set_debit_card_pin",messageText:"success",type:"success",showStatusIcon:!0}))},5e3))},[C,P,N,Y]),r.useEffect(()=>{j||f.fetchState==="Completed"||f.fetchState==="In-Progress"||n==null||(H(!0),t(ka(n,d,!1)))},[j,f,n,t]),r.useEffect(()=>{if(f.fetchState==="Completed"&&(N===!1||N&&O?.status?.code!=="active"||O?.cardHolderUserId!==a.userId||C===!1&&P===!1||O?.type.code==="business_physical_debit_card"||O?.type.code==="business_virtual_debit_card")){const q=_e(s.tenantEmailDomain,n,a,O,C);e(q)}},[f.fetchState,C,N]),r.useEffect(()=>{y.fetchState!=="Completed"&&y.fetchState!=="In-Progress"&&l&&m&&g&&t(Qe()),k.fetchState!=="Completed"&&k.fetchState!=="In-Progress"&&l&&m&&g&&t(Tt()),x!=="Completed"&&x!=="In-Progress"&&t(Mn())},[y.fetchState,k.fetchState,t,l,m,g,x]);const X=()=>{if(a!=null&&n!=null){t(Ka());const q=_e(s.tenantEmailDomain,n,a);e(q)}},o=O?.type.code==="business_physical_debit_card"||O?.type.code==="business_virtual_debit_card",A=Xe(l,T,w,m),W=Ba(l,m,g,y,k),ne=Ir(o,f);return f.fetchState!=="Completed"?c.jsx(va,{fetchState:"In-Progress"}):c.jsxs(c.Fragment,{children:[c.jsx(nt,{showConfetti:C}),c.jsx(Jc,{onGotItClick:X,isDebitCard:O?.type.code==="business_physical_debit_card",controllerEmails:U,isChargeCardFeatureEnabled:l,isDebitCardFeatureEnabled:T,isDebitCardSetupEnabled:w,isChargeCardSetupEnabled:m,productInformation:A,creditAccountInformation:W,debitAccountInformation:ne,chargeCardDetailView:f,creditAccount:y,classListFetchState:x,creditAccountRepayment:k,cardIssuedByRoles:z?.userRoles,cardIssuedByDepartmentName:_?.className,cardHolderRoles:G?.userRoles,cardHolderDepartmentName:I?.className})]})}const Tr="charge-card-transaction-update",Fr="charge-card-transaction-created",xr="charge-card-transaction-declined",Br="charge-card-transaction-updated",Rr="charge-card-transaction-receipt-uploaded",pa="charge-card-status-update",Ht="charge-card-spending-updated",ot="credit-account-balance-updated",it="charge-card-created",Gt="charge-card-limit-updated",$t="charge-card-limit-reset",zt="charge-card-renamed",Go="charge-card-department-updated",Lr="charge-card-repayment-completed",Or="charge-card-payment-date-updated",Ra="charge-card-cashback-redeemed",La="charge-card-cashback-earned",ha=(e,n)=>e==null||e===""?[]:n.map(t=>`private-encrypted-${e}.${t}`),$o=[La,Ra],zo=Pe(function(e){const n=ma(e);return{insightsData:n.insight,cashbackByPeriod:n.cashbackByPeriod,uiState:n.uiState,cashbackSummary:n.cashbackSummary}},function(e){return{onColumnSortConfigChanged:(n,t)=>{e(_s({uiState:{sortKey:n,sortOrder:t}}))}}})(ao);function Ko(){const e=le(),n=me(),t=he(),a=te.getSignedInUser(),s=i(M=>ge(M)),{useFeatureGate:b}=ue(),{isFeatureEnabled:g}=b(Z.isCardsCommentingEnabled),[S,P]=r.useState(!1),u=i(M=>ma(M)),C=Dr(s.companyId,{clearParams:u.fetchState==="Completed"}),F=r.useCallback(()=>{const M=we(t.state?.pathnameStackToGoBack),B=M.poppedPathname??Zo(s.tenantEmailDomain);e(B,{state:{pathnameStackToGoBack:M.newStack}})},[e,t,s.tenantEmailDomain]),v=ea(s);if(Vt({events:ha(v,$o),onEvent:M=>{switch(M){case La:case Ra:return void n(_a(!0))}},onSubscribed:()=>{n(_a(!0))}}),r.useEffect(()=>{S||u.fetchState==="Completed"||u.fetchState==="In-Progress"||(P(!0),n(_a()))},[S,u,n]),a==null)throw Error("Can't access cashback detail page without signing in...");const m=u.cashbackSummary?.cashbackEarned?.amount!=null&&u.fetchState!=="Not-Started";return u.fetchState!=="In-Progress"||m?(u.cashbackSummary?.cashbackEarned?.amount??0)===0&&u.fetchState==="Completed"?c.jsx(ct,{}):c.jsx(zo,{onBackClick:F,isCardsCommentingEnabled:g,initialOpenThreadRequest:C}):c.jsx(eo,{onBackClick:F})}const Zo=e=>`/${e}/cards`,Yo={containerWidth:new Fa(100,58)},Wo=({appContent:e})=>{const n=Ta(),t=me(),a=le(),{cardId:s}=Ve(),b=he(),{useDynamicConfig:g}=ue(),[S,P]=r.useState(!1),[u,C]=r.useState(!1),[F,v]=r.useState(!1),[m,M]=r.useState(!1),B=te.getSignedInUser();if(B==null)throw Error("Can't access onboarding card page without signing in...");const R=i(I=>ge(I));if(s==null)throw Error("Empty card id is not valid...");const{configValue:p}=g(Ze.zeniCardsConfig),h=p.max_charge_card_activation_attempts_by_card_id,T=i(I=>Ps(I,s)),l=T.chargeCard,w=i(I=>I.chargeCardConfigState.fetchState),{useFeatureGate:E}=ue(),{isFeatureEnabled:U}=E(Z.isChargeCardFeatureEnabled),{isFeatureEnabled:y}=E(Z.isDebitCardFeatureEnabled),k=Re(y,R),x=Oe({isDebitCardFeatureEnabled:y,isBankingOnlyTenant:k}),d=!!R.companyChargeCardInfo?.info?.isChargeCardEnabled,f=R.userRole.includes("charge_card_user"),j=xe(R),H=Be(R),O=R.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,L=Ue({isCardsOnlyTenant:j,isChargeCardFeatureEnabled:U,isBookKeepingTenant:H,isDebitCardProductVisible:x,chargeCardsCreditAccountLimit:O}),z=!f&&L&&d;r.useEffect(()=>{S===!1&&w!=="In-Progress"&&w!=="Completed"&&(t(Qa()),P(!0)),u===!1&&T.fetchState==="Not-Started"&&(C(!0),t(ka(s,z,L)))},[u,T.fetchState,S,w]);const $=l?.type.code==="business_physical_credit_card"||l?.type.code==="business_physical_debit_card";r.useEffect(()=>{if(T.fetchState==="Completed"){if(F===!1&&($===!1||$&&l?.status?.code!=="inactive"||l?.cardHolderUserId!==B.userId)){const I=_e(R.tenantEmailDomain,s,B,l,!0),N=ye(b.state?.pathnameStackToGoBack,b.pathname);a(I,{state:{pathnameStackToGoBack:N}})}else if(F&&T.isRefreshingViewInBackground===!1&&l?.status?.code==="active"){t(ws({chargeCardId:s}));const I=_e(R.tenantEmailDomain,s,B,l,!0),N=ye(b.state?.pathnameStackToGoBack,b.pathname);t(Xa()),a(I,{state:{pathnameStackToGoBack:N}})}}},[T.fetchState,l?.type.code,F,T.isRefreshingViewInBackground]);const _=te.getZeniOtpTokenForCardHolder(s),D=i(I=>Nn(I.userState,B.userId)),G=()=>{l?.status?.code!=="active"&&t(Sa(s,!0))};r.useEffect(()=>{T.updatePhysicalChargeCardAttemptFetchState.fetchState==="Completed"&&l?.cardActivationAttemptHistory.some(I=>I.statusCode==="success")===!0&&F===!1&&(setTimeout(G,3e3),v(!0))},[T.updatePhysicalChargeCardAttemptFetchState.fetchState,l?.cardActivationAttemptHistory]);const Q=I=>{M(I)};if(w!=="Completed"||l==null)return c.jsx(va,{fetchState:"In-Progress"});if(l.shippingAddressId==null)throw Error("Can't access shippingAddressId.");if(D?.phone==null)throw Error("Can't access user phone number.");return c.jsxs(Xo,{children:[c.jsx(Ie,{isAppContentDrawerOpen:m,handleDrawerToggle:Q}),c.jsx(qo,{cardId:s,card:l,shippingAddressId:l.shippingAddressId,phone:D.phone,signedInUser:B,isSandboxEnv:Lt(),chargeCardDetailState:T,signedInUserToken:_,navigate:a,currentTenant:R,location:b,maxChargeCardActivationAttempts:h[s]!=null?h[s]:p.default_max_charge_card_activation_attempts!=null?p.default_max_charge_card_activation_attempts:3,chargeCardCashbackRatePerTransaction:p.charge_card_cashback_rate_per_transaction!=null?p.charge_card_cashback_rate_per_transaction:.0175,onClickMenuIcon:()=>{Q(!0)}}),e!=null?c.jsx(Qo,{windowSize:n,children:e}):null]})},qo=Pe(function(e,{chargeCardDetailState:n,shippingAddressId:t,location:a,cardId:s}){const b=vs(e.addressState,t);if(b==null)throw Error("Can't access shippingAddress.");const g=Vn(e,s),S=n.updateStatus,P=Ca(e,!1,!1,!1);let u=!1;P.fetchState==="Completed"&&P.cards.length<=1&&(u=!0);const C=a.state?.message==="comingFromV2UrlPath";return{showActivatePage:n.chargeCard?.providerCardCreateTime!=null&&n.chargeCard.providerCardCreateTime.add(24,"h").isBefore(Ts())||C,showMenuIcon:u,shippingAddress:b,vgsVaultId:rt.cardVaultId,twoFAView:g,activationWaitStatus:S,isRefreshingViewInBackground:n.isRefreshingViewInBackground}},function(e,n){const{navigate:t,cardId:a,location:s,currentTenant:b,chargeCardDetailState:g}=n,S=g.chargeCard?.cardProviderID,{tenantEmailDomain:P}=b;return{onGetOtp:u=>{S!=null&&e(at(u,"ChargeCardHolder",a))},onUpdatePhysicalChargeCardAttempt:u=>{e(xs(a,u))},onResendOtp:u=>{S!=null&&e(et(u,"ChargeCardHolder",a))},onVerifyOtp:(u,C)=>{S!=null&&e(Ja(u,C,"ChargeCardHolder",a))},onVerifyOtpSuccess:u=>{u!=null&&te.saveZeniOtpTokenForCardHolder(u,a)},onCVVActivateSuccess:()=>{e(Fs({chargeCardId:a}))},onBackClick:()=>{const u=we(s.state?.pathnameStackToGoBack),C=u.poppedPathname==null||u.poppedPathname.includes("onboard")===!0?aa(P):u.poppedPathname;t(C,{state:{pathnameStackToGoBack:u.newStack}})}}})(to),Qo=He.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
width: ${e=>`${Yo.containerWidth.value(e.windowSize)}%`};
|
|
5
|
-
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
6
|
-
`,Xo=He.div`
|
|
7
|
-
display: flex;
|
|
8
|
-
min-height: 100%;
|
|
9
|
-
width: 100%;
|
|
10
|
-
flex: 1 1 auto;
|
|
11
|
-
flex-direction: column;
|
|
12
|
-
align-items: center;
|
|
13
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
14
|
-
`,Ya=Je.getLocalizedStrings().dateFormat,Jo={overlayWidth:new Fa(100,100,58)},Ur=[Lr,ot],ei=new Set(Ur),ai=Pe(function(e,n){const t=n.currentTenant?.companyId;return{plaidConnectionDetails:Os(e,t,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:Us(e.depositAccountState,e.depositAccountListState)}},function(e,n){const{navigate:t,currentTenant:a,hasZeniAccountsAdminAccess:s,isZeniAccountsUser:b,isCashbackInfoFetchStateCompleted:g,isCreditCardInfoFetchStateCompleted:S,isDebitCardInfoFetchStateCompleted:P,controllerEmails:u,paymentDetails:C,productInformation:F,cashbackInformation:v,paymentSourceInformation:m,creditAccountInformation:M,debitAccountInformation:B,paymentInitiatedDate:R,sourcePage:p}=n,{tenantEmailDomain:h}=a,T=()=>{e($n(!0));const l=ea(a);l!=null&&l!==""&&e(Pa(l,!0,!0)),e(Qe(!0))};return{onBackNavigation:()=>{if(g&&S&&P&&v!=null&&J.trackCardsPayEarlyFormClick(u,F,v,"Back",C.chargeCardRepaymentDetailLocalData.isAutoRepayment,{paymentAmount:C.chargeCardRepaymentDetailLocalData.amount.amount,paymentAccountName:C.chargeCardRepaymentDetailLocalData.transferFrom?.label,paymentAccountType:C.chargeCardRepaymentDetailLocalData.transferFrom?.accType,paymentAccountLastFourDigits:C.chargeCardRepaymentDetailLocalData.transferFrom?.accountLast4,paymentCompleteEta:R?.add(3,"day").format(Ya.visual.MMMDCommaYYYYformat),paymentInitiatedDate:R?.format(Ya.visual.MMMDCommaYYYYformat)},m,M,B),p==="cardPaymentHistory")n.closeDrawerHandler(!0),e(zn());else{const l=aa(h);t(l)}},onUpdatePaymentAccountStatus:(l,w,E)=>{e(Ns(l,w,"bill_pay","bill_pay_detail",E))},onEstablishConnectionSuccess:()=>{e(Pa(a.companyId,!0))},onFetchLinkTokenClick:l=>{e(Ms("external_account",l))},onEstablishConnectionClick:l=>{e(js(l,a.companyId,"charge_card_payment","charge_cards"))},onSignUpAccountClick:()=>{s?window.open(`/${h}/checking/promo`,"_blank"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")},onMoveMoneyClick:()=>{b?window.open(`/${h}/checking/transfer`):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")},onEventReceived:l=>{ei.has(l)&&T()},onPusherSubscribed:T}})(st(no)),Kt=({isPaymentDrawerOpen:e,closeDrawerHandler:n,pageName:t,creditAccountSpentAmount:a,productInformation:s,sourcePage:b,creditAccountInformation:g,debitAccountInformation:S,cashbackInformation:P,isDebitCardInfoFetchStateCompleted:u,isCreditCardInfoFetchStateCompleted:C,isCashbackInfoFetchStateCompleted:F,paymentInitiatedDate:v,retryRepayment:m})=>{const M=le(),{useDynamicConfig:B}=ue(),{configValue:R}=B(Ze.zeniAccountsConfig),p=Bs(R),h=i(A=>Hn(A)),{creditAccount:T}=i(A=>ua(A)),l=i(A=>ge(A)),w=Ot(),E=Ta(),U=me(),y=te.getSignedInUser(),k=Le(),[x,d]=r.useState(!1),[f,j]=r.useState(!1),{configValue:H}=B(Ze.zeniCardsConfig),O=H.credit_card_auto_pay_threshold_by_company_id?.[l.companyId]??H.default_credit_card_auto_pay_threshold??Ao,L=Gn(k?.loggedInUserRoleMap),z=Rs(k?.loggedInUserRoleMap),$=!!l.companyZeniAccountInfo?.info?.isZeniAccountEnabled,_=i(A=>wa(A,l.companyId)),D=_.companyChargeCardInfo?.primaryFundingAccount,G=_.allFundingAccounts.find(A=>A.id===D?.accountId),Q=i(A=>da(A,l.companyId)),I=la(Q.controllers);r.useEffect(()=>{if(h.fetchState!=="Completed"&&h.fetchState!=="In-Progress"&&U($n()),h.fetchState==="Completed"&&!f){const A=l.companyChargeCardInfo?.info?.primaryFundingAccount?.accountId,W=h.transferFromAccounts.find(q=>q.id===A);let ne;if(b==="cardPaymentHistory"&&m){const q=m.paymentAccountId!=null?h.transferFromAccounts.find(ke=>ke.id===m.paymentAccountId):void 0;ne={amount:m.amount,isAutoRepayment:l.companyChargeCardInfo?.info?.isAutoPayEnabled??!1,idempotencyKey:Sn(),transferFrom:q??W}}else ne={amount:{amount:T.balance.amount+T.hold.amount,currencyCode:T.balance.currencyCode,currencySymbol:T.balance.currencySymbol},isAutoRepayment:l.companyChargeCardInfo?.info?.isAutoPayEnabled??!1,idempotencyKey:Sn(),transferFrom:W};U(hn(ne)),j(!0)}},[h.fetchState,f,b,m,h.transferFromAccounts,l.companyChargeCardInfo?.info?.primaryFundingAccount?.accountId,l.companyChargeCardInfo?.info?.isAutoPayEnabled,T.balance.amount,T.balance.currencyCode,T.balance.currencySymbol,T.hold.amount,U]);const N={isZeniCheckingEnabled:l.companyZeniAccountInfo?.info?.isZeniAccountEnabled??!1,isZeniCheckingPaymentSource:G?.accType==="depositAccount",creditCardPaymentSourceAccountName:G?.label,creditCardPaymentSourceAccountType:G?.accType,creditCardPaymentSourceLastFourDigits:G?.accountLast4,creditCardPaymentSourceBalance:G?.accountBalance?.available?.amount??0};if(r.useEffect(()=>{_.fetchState!=="Completed"&&_.fetchState!=="In-Progress"&&U(Pa(l.companyId,!0))},[_.fetchState]),r.useEffect(()=>{h.updateStatus==="Completed"&&P!=null&&F&&C&&u&&J.trackCardsPayEarlyPayNowClick(I,s,P,h.chargeCardRepaymentDetailLocalData.isAutoRepayment,{paymentAmount:h.chargeCardRepaymentDetailLocalData.amount.amount,paymentAccountName:h.chargeCardRepaymentDetailLocalData.transferFrom?.label,paymentAccountType:h.chargeCardRepaymentDetailLocalData.transferFrom?.accType,paymentAccountLastFourDigits:h.chargeCardRepaymentDetailLocalData.transferFrom?.accountLast4,paymentCompleteEta:v?.add(3,"day").format(Ya.visual.MMMDCommaYYYYformat),paymentInitiatedDate:v?.format(Ya.visual.MMMDCommaYYYYformat)},N,g,S)},[h.updateStatus,P,F,C,u,v]),r.useEffect(()=>{h.fetchState==="Completed"&&P!=null&&F&&C&&u&&!x&&e&&f&&P!=null&&(J.trackCardsPayEarlyFormView(I,s,P,t,l.companyChargeCardInfo?.info?.isAutoPayEnabled??!1,T.balance.amount,N,g,S),d(!0))},[h,F,C,u,x,e,f]),y==null)throw Error("Can't access invite people page without signing in...");const Y=()=>{n(!0),U(zn())},X=ea(l),o={events:e?ha(X,Ur):[],eventCallback:(A,W,ne)=>{ne.onEventReceived(A)},onSubscribed:A=>{A.onPusherSubscribed()}};return c.jsx(c.Fragment,{children:c.jsx(yr,{onClose:()=>{Y()},anchor:"right",transitionDuration:250,open:e,PaperProps:{style:{width:Jo.overlayWidth.valuePercentage(E),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:w.colors.black,opacity:.75,cursor:"pointer"}}},children:c.jsx(ti,{onClick:A=>A.stopPropagation(),children:c.jsx(ai,{...o,closeDrawerHandler:n,navigate:M,paymentDetails:h,creditAccountSpentAmount:a,onTransferClick:()=>{F&&C&&u&&P!=null&&J.trackCardsPayEarlyFormClick(I,s,P,"Pay Now",h.chargeCardRepaymentDetailLocalData.isAutoRepayment,{paymentAmount:h.chargeCardRepaymentDetailLocalData.amount.amount,paymentAccountName:h.chargeCardRepaymentDetailLocalData.transferFrom?.label,paymentAccountType:h.chargeCardRepaymentDetailLocalData.transferFrom?.accType,paymentAccountLastFourDigits:h.chargeCardRepaymentDetailLocalData.transferFrom?.accountLast4,paymentCompleteEta:void 0,paymentInitiatedDate:void 0},N,g,S),U(Ls({companyId:l.companyId}))},onDismissClick:Y,onSaveChangesToLocalStore:A=>{U(hn(A))},currentTenant:l,hasZeniAccountsAdminAccess:L,isZeniAccountsUser:z,isZeniAccountSetupEnabled:$,productInformation:s,sourcePage:b,controllerEmails:I,autoPayThreshold:O,paymentSourceInformation:N,creditAccountInformation:g,debitAccountInformation:S,cashbackInformation:P,isCashbackInfoFetchStateCompleted:F,isCreditCardInfoFetchStateCompleted:C,isDebitCardInfoFetchStateCompleted:u,paymentInitiatedDate:v,maxInsuredAmount:p.maxInsuredAmount})})})})},ti=He(Eo)`
|
|
15
|
-
display: flex;
|
|
16
|
-
min-height: 100%;
|
|
17
|
-
flex-direction: column;
|
|
18
|
-
`,Zt=e=>e!=null&&typeof e=="object"?e:null,de=e=>typeof e=="string"?e:void 0,Me=e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,Wa=e=>e!=null&&typeof e=="object"&&typeof e.code=="string"&&typeof e.name=="string",gt=e=>{if(e==null||typeof e!="object")return!1;const n=e;return typeof n.transaction_id=="string"&&typeof n.amount=="number"&&typeof n.currency_code=="string"&&typeof n.currency_symbol=="string"&&typeof n.direction=="string"&&!!Wa(n.transaction_status)&&!!Wa(n.transaction_type)},Yt=(e,n)=>{const t=e?.card_status;if(!Wa(t))return null;const a=e?.is_locked_by_admin;return{cardId:n,cardStatus:t,isLockedByAdmin:typeof a=="boolean"?a:void 0}},At=[Tr,Fr,xr,Br,Rr,pa,Ht,ot,Gt,$t,zt],jr=[La,Ra],ni=new Set([...At,...jr]),St=Je.getLocalizedStrings().dateFormat,ri=Pe(function(e,n){const{includeCreditAccountInfo:t,cardId:a,signedInUserToken:s,isChargeCardFeatureEnabled:b}=n,g=te.getSignedInUser(),S=e.tenantState.currentTenantId,P={userId:g?.userId??"",sessionId:g?.zeniSessionId??"",tenantId:S??""},u=vt(e,a,t,b),C=Ws(e,a),F=qs(e);return{chargeCardDetailView:u,chargeCardsRecurringExpensesState:C,vgsVaultId:rt.cardVaultId,transactionAttachmentsEndpointToFetch:`${Et}/card_transaction_attachments`,transactionAttachmentEndpointToDownload:`${Et}/card_transaction_attachment`,authParams:P,isSnackbarOpen:F.isSnackbarOpen,cardsEndPoint:`${gr.cardMicroServiceBaseUrl}`,signedInUserToken:u.twoFAView.token??s}},function(e,n){const{cardId:t,currentTenant:a,navigate:s,location:b,cardProviderId:g,includeCreditAccountInfo:S,setIsPaymentOpen:P,controllerEmails:u,productInformation:C,cashbackInformation:F,primaryFundingAccountDetails:v,creditAccountInformation:m,debitAccountInformation:M,isChargeCardFeatureEnabled:B}=n,{tenantEmailDomain:R}=a;return{onEventReceived:(p,h)=>{(({event:T,data:l,cardId:w,dispatch:E,subscribedEvents:U})=>{const y=Zt(l);switch(T){case La:case Ra:return void E(_a(!0));case Tr:{const k=de(y?.card_id);if(k==null||k!==w)return;const x=de(y?.transaction_id),d=y?.transaction_status;return x!=null&&Wa(d)?void E(Zs({transactionId:x,transactionStatus:d})):void E(sa(w,null,null,!0))}case pa:{const k=de(y?.card_id)??w;if(k!==w)return;const x=Yt(y,k);return x!=null?void E(Ft(x)):void E(Sa(w,!0))}case Ht:{const k=de(y?.card_id)??w;if(k!==w)return;const x=de(y?.currency_code),d=de(y?.currency_symbol),f=Me(y?.balance);return x!=null&&d!=null&&f!=null?(E(Ks({cardId:k,currencyCode:x,currencySymbol:d,balance:f,hold:Me(y?.hold),dailyPurchaseSpends:Me(y?.daily_purchase_spends),monthlyPurchaseSpends:Me(y?.monthly_purchase_spends),dailyWithdrawals:Me(y?.daily_withdrawals),monthlyWithdrawals:Me(y?.monthly_withdrawals)})),void E(Qe(!0))):(E(Sa(w,!0)),void E(Qe(!0)))}case ot:{const k=de(y?.currency_code),x=de(y?.currency_symbol),d=Me(y?.available_amount),f=Me(y?.balance_amount);return k!=null&&x!=null&&d!=null&&f!=null?void E(zs({currencyCode:k,currencySymbol:x,available:d,balance:f,hold:Me(y?.hold_amount),cashback:Me(y?.cashback_amount)})):void E(Qe(!0))}case Fr:{const k=de(y?.card_id)??w;if(k!==w)return;const x=y?.transaction;return gt(x)?void E($s({cardId:k,transaction:x})):void E(sa(w,null,null,!0))}case xr:{const k=de(y?.card_id)??w;if(k!==w)return;const x=y?.transaction;return gt(x)?void E(Gs({cardId:k,declineReason:de(y?.decline_reason),transaction:x})):void E(sa(w,null,null,!0))}case Br:{const k=de(y?.card_id)??w;if(k!==w)return;const x=y?.transaction;return gt(x)?void E(Hs({cardId:k,transaction:x})):void E(sa(w,null,null,!0))}case Rr:{const k=de(y?.card_id)??w;if(k!==w)return;const x=de(y?.transaction_id),d=y?.attachment_file_paths;return x!=null&&Array.isArray(d)&&d.every(f=>typeof f=="string")?void E(Vs({cardId:k,transactionId:x,attachmentFilePaths:d})):void E(sa(w,null,null,!0))}case Gt:case $t:case zt:{const k=de(y?.card_id);if(k==null||k!==w)return;E(Sa(w,!0))}}})({event:p,data:h,cardId:t,dispatch:e,subscribedEvents:ni})},onPusherSubscribed:()=>{e(Sa(t,!0)),e(sa(t,null,null,!0)),e(Qe(!0))},onReloadTransactions:()=>{e(ka(t,S,B))},onFetchChargeCardTransactionList:(p,h)=>{e(sa(t,p,h))},onUpdateScrollYOffset:p=>{},onGetOtp:p=>{g!=null&&e(at(p,"ChargeCardHolder",t))},onResendOtp:p=>{g!=null&&e(et(p,"ChargeCardHolder",t))},onVerifyOtp:(p,h)=>{g!=null&&e(Ja(p,h,"ChargeCardHolder",t))},onVerifyOtpSuccess:p=>{p!=null&&te.saveZeniOtpTokenForCardHolder(p,t)},onColorCodeChange:p=>{e(tc(t,p))},onLockChargeCard:(p,h)=>{e(er(p,t,h))},onUnlockChargeCard:p=>{e(Jn(p,t))},onCloseChargeCard:p=>{e(Xn(t,p))},onFetchChargeCardsRecurringExpenses:()=>{e(Qn([t]))},updateChargeCardName:(p,h)=>{e(qn(p,t,h))},updateChargeCardTransactionAttachments:(p,h)=>{h!=null&&e(ac({transactionId:p,data:h}))},updateChargeCardTransactionUploadReceiptsFetchStatus:(p,h,T,l)=>{e(ec({chargeCardId:h,transactionId:p,fetchState:T,error:l}))},updateChargeCardTransactionReceiptsShowTick:(p,h,T)=>{e(Js({chargeCardId:h,transactionId:p,shouldShowTick:T}))},onChargeCardRevokeInviteClick:()=>{e(Wn(t))},updateChargeCardTransactionIsViewReceiptClicked:(p,h,T)=>{e(Xs({chargeCardId:h,transactionId:p,isViewReceiptClicked:T}))},onChargeCardTransactionRowClick:(p,h)=>{const T=ye(b.state?.pathnameStackToGoBack,b.pathname);s(`../../transaction/${p}/${h}`,{state:{pathnameStackToGoBack:T}})},onBackClick:()=>{const p=we(b.state?.pathnameStackToGoBack),h=aa(R);s(h,{state:{pathnameStackToGoBack:p.newStack,message:"comingFromCardDetail"}})},removeSnackbar:()=>{e(Qs())},onUpdateDebitCardPinAttempt:p=>{e(Yn(t,p)),p==="success"&&e(Ke({messageSection:"update_debit_card_pin_attempt",messageText:"success",type:"success",showStatusIcon:!0}))},onUploadReceiptComplete:(p,h)=>{p?e(Ke({messageSection:"charge_card_receipt_upload",messageText:"success",type:"success",showStatusIcon:!0})):h!=null&&e(Ke({messageSection:"charge_card_receipt_upload",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"_api-error_",variableValue:h.message}]}))},updateSpendLimit(p,h,T,l){e(Zn(p,h,T.code,l))},shouldOpenCreditCardPaymentDrawer(p){p&&F!=null&&J.trackCardsPayEarlyClick(u,C,F,"Card Detail","Text Button","Pay Now",{isZeniCheckingEnabled:a.company?.companyZeniAccountInfo.isZeniAccountEnabled??!1,isZeniCheckingPaymentSource:v?.accType==="depositAccount",creditCardPaymentSourceAccountName:v?.label,creditCardPaymentSourceAccountType:v?.accType,creditCardPaymentSourceLastFourDigits:v?.accountLast4,creditCardPaymentSourceBalance:v?.accountBalance?.available?.amount??0},m,M),P(p)}}})(st(so));function si(){const e=le(),n=me(),t=he(),{cardId:a}=Ve(),[s,b]=r.useState(!1),[g,S]=r.useState(!1),{useDynamicConfig:P}=ue(),u=te.getSignedInUser(),C=i(K=>ge(K)),F=i(K=>qa(K).firstViewAfterActivation),v=i(K=>K.classListState.fetchState),{configValue:m}=P(Ze.documentAiReceiptMaxSizeLimitBytesConfig),{configValue:M}=P(Ze.zeniCardsConfig),B=M.enable_card_controls_for_company_ids,R=M.is_card_controls_enabled_for_all_tenants===!0||Array.isArray(B)&&B.includes(C.companyId),[p,h]=r.useState(!1),[T,l]=r.useState(!1),{useFeatureGate:w}=ue(),{isFeatureEnabled:E}=w(Z.isChargeCardFeatureEnabled),{isFeatureEnabled:U}=w(Z.isDebitCardFeatureEnabled),y=Re(U,C),k=Oe({isDebitCardFeatureEnabled:U,isBankingOnlyTenant:y}),{isFeatureEnabled:x}=w(Z.isEarlyPayFeatureEnabled),{isFeatureEnabled:d}=w(Z.isCardsCommentingEnabled),f=Be(C),j=xe(C),H=C.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,O=Ue({isCardsOnlyTenant:j,isChargeCardFeatureEnabled:E,isBookKeepingTenant:f,isDebitCardProductVisible:k,chargeCardsCreditAccountLimit:H}),L=!!C.companyDebitCardInfo?.info?.isDebitCardEnabled,z=!!C.companyChargeCardInfo?.info?.isChargeCardEnabled,$=!C.userRole.includes("charge_card_user")&&O&&z;if(a==null)throw Error("Empty card id is not valid...");const _=i(K=>wa(K,C.companyId)),{creditAccount:D,creditAccountRepayment:G}=i(K=>ua(K)),Q=te.getZeniOtpTokenForCardHolder(a),I=i(K=>vt(K,a,$,O)),{isAiCfoAccessEnabled:N,onAskAiCfoClick:Y}=xa({mobileExploreReferrer:"Card Detail"});Rt({isDataReady:I.fetchState==="Completed"});const X=i(K=>ma(K)),o=I.chargeCard,A=Le(),W=Fe(A?.loggedInUserRoleMap),ne=o?.type.code==="business_physical_debit_card"||o?.type.code==="business_virtual_debit_card",q=o?.type.code==="business_physical_debit_card"||o?.type.code==="business_physical_credit_card",ke=o?.type.code==="business_virtual_debit_card"||o?.type.code==="business_virtual_credit_card",ve=o?.type.code==="business_virtual_debit_card",fe=Ba(O,z,W,D,G),se=Ir(ne,I),Ee=Mt(W,X),re=Xe(O,k,L,z),Ce=I.depositAccountLimitFetchState.fetchState!=="Completed"&&I.depositAccountLimitFetchState.fetchState!=="In-Progress",Ae=i(K=>da(K,C.companyId)),ee=la(Ae.controllers),Te=i(K=>o?.cardCreatedByUser?.userId!=null?$a(K.userRoleState,o?.cardCreatedByUser?.userId):void 0),De=i(K=>Te?.accountingClassIDs[0]!=null?za(K.classState,{classId:Te?.accountingClassIDs[0],reportId:"class_list"}):void 0),ae=i(K=>o?.cardHolderUser?.userId!=null?$a(K.userRoleState,o?.cardHolderUser?.userId):void 0),oe=i(K=>ae?.accountingClassIDs[0]!=null?za(K.classState,{classId:ae?.accountingClassIDs[0],reportId:"class_list"}):void 0),fa=C?.userRole,ta=i(K=>Ca(K,!1,k,E).revokeCardInvite),Oa=ya(ta.saveStatus.fetchState);if(r.useEffect(()=>{if(Oa==="In-Progress"&&ta.saveStatus.fetchState==="Completed"){const K=aa(C.tenantEmailDomain);e(K)}},[Oa,ta.saveStatus.fetchState,e,C.tenantEmailDomain]),r.useEffect(()=>{F&&s===!1&&ke&&(b(!0),setTimeout(()=>{n(Ka()),ve&&n(Ke({messageSection:"set_debit_card_pin",messageText:"success",type:"success",showStatusIcon:!0}))},5e3))},[F,s,ke,ve]),r.useEffect(()=>{p||I.fetchState==="Completed"||I.fetchState==="In-Progress"||a==null||(h(!0),n(ka(a,$,O,!1)))},[p,I,a,n]),r.useEffect(()=>{!T&&I.fetchState==="Completed"&&I.chargeCard?.connectedAccountId!=null&&ne&&Ce&&W&&(l(!0),n(Kn({depositAccountId:I.chargeCard?.connectedAccountId})))},[T,I,n,Ce,W]),r.useEffect(()=>{X.fetchState!=="Completed"&&X.fetchState!=="In-Progress"&&W&&n(_a()),v!=="Completed"&&v!=="In-Progress"&&n(Mn()),I.transactionStatistics.fetchState!=="Completed"&&I.transactionStatistics.fetchState!=="In-Progress"&&n(Ys({chargeCardId:a})),_.fetchState!=="Completed"&&_.fetchState!=="In-Progress"&&n(Pa(C.companyId,!0))},[X.fetchState,n,W,v,I.transactionStatistics.fetchState,_.fetchState]),r.useEffect(()=>{if(!(I.fetchState!=="Completed"||O&&D.fetchState!=="Completed"||o==null||I.transactionStatistics.fetchState!=="Completed"||ne&&W&&I.depositAccountLimitFetchState.fetchState!=="Completed")){const K=o.type.code.includes("physical"),Se=K?o.cardActivationAttemptHistory[0]?.timestamp:o.createTime;J.trackCardsCardDetailView(ee,re,{cardId:a,cardName:o.cardName,cardType:o.type.code.includes("credit")?"credit":"debit",cardCategory:K?"physical":"virtual",cardLimit:ba(o.limit.amount),cardLastFourDigits:o.accountLast4,cardStatus:o.status.code,cardAssignedDate:o.createTime?.format(St.analytics.MMMDashDDDashYYYYFormat),cardIssuedDate:o.providerCardCreateTime?.format(St.analytics.MMMDashDDDashYYYYFormat),cardActivatedDate:Se?.format(St.analytics.MMMDashDDDashYYYYFormat),cardLimitFrequency:o.creditLimitFrequency.name,cardSpentAmount:ba(o.balance.amount),cardAvailableLimit:ba(o.available.amount),cardUtilizationPercent:o.limit.amount>0?Math.round((o.limit.amount-o.available.amount)/o.limit.amount*100):0,cardUtilizationAmount:ba(o.limit.amount-o.available.amount),totalNumberOfDeclinedTransactions:I.transactionStatistics.statistics.totalNumberOfDeclinedTransactions,numberOfDeclinedTransactionsCurrentMonth:I.transactionStatistics.statistics.numberOfDeclinedTransactionsCurrentMonth,totalNumberOfPaidTransactions:I.transactionStatistics.statistics.totalNumberOfPaidTransactions,numberOfPaidTransactionsCurrentMonth:I.transactionStatistics.statistics.numberOfPaidTransactionsCurrentMonth,totalNumberOfCanceledTransactions:I.transactionStatistics.statistics.totalNumberOfCanceledTransactions,numberOfCanceledTransactionsCurrentMonth:I.transactionStatistics.statistics.numberOfCanceledTransactionsCurrentMonth,totalNumberOfAuthorizedTransactions:I.transactionStatistics.statistics.totalNumberOfAuthorizedTransactions,numberOfAuthorizedTransactionsCurrentMonth:I.transactionStatistics.statistics.numberOfAuthorizedTransactionsCurrentMonth,totalNumberOfTransactionsWithReceipts:I.transactionStatistics.statistics.totalNumberOfTransactionsWithReceipts,numberOfTransactionsWithReceiptsCurrentMonth:I.transactionStatistics.statistics.numberOfTransactionsWithReceiptsCurrentMonth},{cardIssuedByName:kt(o.cardCreatedByUser,!1),cardIssuedByEmail:o.cardCreatedByUser?.email,cardIssuedByUserId:o.cardCreatedByUser?.userId,cardIssuedByRole:Te?.userRoles,cardIssuedByDepartment:De?.className},{cardholderName:kt(o.cardHolderUser,!1),cardholderEmail:o.cardHolderUser?.email,cardholderRole:ae?.userRoles,cardholderUserId:o.cardHolderUser?.userId,cardholderDepartment:oe?.className},fe,se)}},[I.fetchState,I.depositAccountLimitFetchState.fetchState,I.transactionStatistics.fetchState,D.fetchState,W]),u==null)throw Error("Can't access card detail page without signing in...");const dt=ea(C),Ea=W?[...At,...jr]:At,na={events:ha(dt,Ea),eventCallback:(K,Se,ie)=>{ie.onEventReceived(K,Se)},onSubscribed:K=>{K.onPusherSubscribed()}},Aa=()=>{if(a!=null&&o!=null){const{ownerName:K,cardName:Se,utilisation:ie,limit:Ge,frequency:Ye,cardColor:$e}=bt(o),ze=o.cardHolderUserId===u.userId;J.trackCardsDetailPageViewed(a,K,Se,ie,Ge,Ye,$e,ze)}};r.useEffect(()=>{if(I.fetchState==="Completed"){const K=I.chargeCard;if(K?.status.code==="inactive"||ne&&K?.isPinSet===!1||q&&F){const Se=_e(C.tenantEmailDomain,a,u,o,F);e(Se)}}},[I.fetchState]);const lt=(K,Se)=>{if(a!=null&&o!=null){const{ownerName:ie,cardName:Ge,utilisation:Ye,limit:$e,frequency:ze}=bt(o),ra=o.cardHolderUserId===u.userId;J.trackCardsDetailPageClicked(a,ie,Ge,Ye,$e,ze,K,ra,Se)}},ut=(K,Se)=>{if(a!=null&&o!=null){const{ownerName:ie,cardName:Ge,utilisation:Ye,limit:$e,frequency:ze}=bt(o),ra=o.cardHolderUserId===u.userId;J.trackCardsVerifyPopUpClick(a,ie,Ge,Ye,$e,ze,K,ra,Se)}},pe=D.balance.amount+D.hold.amount,Ua=C.companyChargeCardInfo?.info?.primaryFundingAccount,Da=_.allFundingAccounts.find(K=>K.id===Ua?.accountId),ja=I.chargeCard!=null,Ma=I.depositAccountLimit!=null;return I.fetchState!=="Error"||ja?!ja&&(I.fetchState==="In-Progress"||I.fetchState==="Not-Started")||ta.saveStatus.fetchState==="In-Progress"||!Ma&&ne&&W&&I.depositAccountLimitFetchState.fetchState!=="Completed"?c.jsx(ro,{}):c.jsxs(c.Fragment,{children:[c.jsx(nt,{showConfetti:F}),I.fetchState==="Completed"?c.jsx(Ut,{analytics:J,onLoad:Aa}):null,g===!0?c.jsx(Kt,{closeDrawerHandler:()=>S(!1),isPaymentDrawerOpen:g,pageName:"Card Detail",sourcePage:"cardDetailPage",productInformation:re,creditAccountInformation:fe,debitAccountInformation:se,cashbackInformation:Ee,creditAccountSpentAmount:pe,isDebitCardInfoFetchStateCompleted:!ne||!W||I.depositAccountLimitFetchState.fetchState==="Completed",isCreditCardInfoFetchStateCompleted:!O||D.fetchState==="Completed",isCashbackInfoFetchStateCompleted:!W||X.fetchState==="Completed",paymentInitiatedDate:G.initiatedRepaymentDate}):null,c.jsx(ri,{...na,hideSorting:!0,onColumnSortConfigChanged:()=>{},onFireVerifyPopOnClickAnalytics:ut,onFireOnClickAnalytics:lt,isSandboxEnv:Lt(),signedInUser:u,location:t,navigate:e,setIsPaymentOpen:S,cardIssuedByRoles:Te?.userRoles,cardIssuedByDepartmentName:De?.className,cardHolderRoles:ae?.userRoles,cardHolderDepartmentName:oe?.className,loggedInUserRole:fa,isChargeCardFeatureEnabled:O,isDebitCardFeatureEnabled:k,isDebitCardSetupEnabled:L,isChargeCardSetupEnabled:z,isCardControlsEnabled:R,isEarlyPayEnabled:x,controllerEmails:ee,chargeCardCashbackDetailState:X,productInformation:re,creditAccountInformation:fe,debitAccountInformation:se,cashbackInformation:Ee,classListFetchState:v,primaryFundingAccountDetails:Da,currentTenant:C,cardProviderId:I.chargeCard?.cardProviderID,cardId:a,creditAccount:D,creditAccountRepayment:G,includeCreditAccountInfo:$,signedInUserToken:Q,appleWalletLink:"shoebox://",googleWalletLink:"https://www.android.com/payapp/",documentAiReceiptMaxSizeLimit:m.documentAiReceiptMaxSizeLimitBytes!=null?m.documentAiReceiptMaxSizeLimitBytes:9437184,isAiCfoAccessEnabled:N,onAskAiCfoClick:Y,isCardsCommentingEnabled:d})]}):c.jsx(ct,{})}const bt=e=>{const n=`${e.cardHolderUser?.firstName.toLowerCase()} ${e.cardHolderUser?.lastName.toLowerCase()}`,t=e.cardName,a=(e.limit.amount??0)-(e.available.amount??0),s=e.limit.amount,b=e.creditLimitFrequency.name;return{ownerName:n,cardName:t,utilisation:a,cardColor:e.cardColorCode??"",frequency:b,limit:s}},{spendManagement:{chargeCard:{cardsAiCfoHero:{headline:ci,subheadline:oi,pageTitle:ii}}}}=Je.getLocalizedStrings(),Mr=[pa,ot,Or,Ra,La,it,zt,Go,Gt,$t,Ht],di=new Set(Mr),Dt=jt((e,n,t,a)=>{e(ia(n,t,a,!0))},400),li=He.div`
|
|
19
|
-
display: flex;
|
|
20
|
-
width: 100%;
|
|
21
|
-
flex: 1 1 auto;
|
|
22
|
-
flex-direction: column;
|
|
23
|
-
align-items: center;
|
|
24
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
25
|
-
`,ui=Pe(function(e,n){const t=Ca(e,n.includeCreditAccountDebitSummaryAndCashbackInfo,n.isDebitCardFeatureEnabled&&n.isDebitCardSetupEnabled,n.isChargeCardFeatureEnabled&&n.isChargeCardSetupEnabled);return{chargeCardListView:t,rowActionView:oc(e),bulkActionView:ic(e),companyLegalName:n.currentTenant.companyName,admins:n.admins,searchText:t.searchText,uiState:t.uiState,signedInUser:n.signedInUser}},function(e,n){const{navigateAndClearBulkSelection:t,currentTenant:a,location:s,signedInUser:b,chargeCardListState:g,includeCreditAccountDebitSummaryAndCashbackInfo:S,isChargeCardFeatureEnabled:P,isCreditCardProductVisibleForExpressInterest:u,isChargeCardSetupEnabled:C,isDebitCardFeatureEnabled:F,isDebitCardSetupEnabled:v,isDebitCardTOSAccepted:m,isChargeCardTOSAccepted:M,controllerEmails:B,depositAccountListWithDebitCardIssued:R,primaryFundingAccountDetails:p,chargeCardSetUpViewFetchState:h,productInformation:T,cashbackInformation:l,creditAccountInformation:w,debitAccountInformation:E,updatePayNowInfoTooltip:U,isUserHasCardsAdminLevelAccess:y}=n,{tenantEmailDomain:k}=a,{cards:x}=g;return{onChargeCardRowClick:(d,f)=>{const j=Er(x,d);let H;j!=null&&((L=>{const z=L.limit.amount-L.available.amount,$=`${L.cardHolderUser?.firstName.toLowerCase()} ${L.cardHolderUser?.lastName.toLowerCase()}`,_=L.cardName,D=L.department?.className??"",G=L.limit.amount,Q=L.creditLimitFrequency.name;J.trackCardsListRowClicked($,_,D,z,G,Q,b.userId===L.cardHolderUserId)})(j),ca(F,v,R)&&J.trackCardsCardListRowClick(B,T,"Card Row Item","row_clicked",f+1,{cardOwner:kt(j.cardHolderUser,!1),cardName:j.cardName,cardType:j.type.code.includes("credit")?"credit":"debit",cardStatus:j.status.code,cardUtilizationAmount:ba(j.limit.amount-j.available.amount),cardUtilizationPercent:j.limit.amount>0?Math.round((j.limit.amount-j.available.amount)/j.limit.amount*100):0,cardLimit:ba(j.limit.amount)},l,w,E)),H=j?.status.code==="request_on_hold"&&b.userId===j.cardHolderUserId?Ar(k):_e(k,d,b,j);const O=ye(s.state?.pathnameStackToGoBack,s.pathname);t(H,{state:{pathnameStackToGoBack:O}})},onFetchChargeCardsRecurringExpenses:d=>{e(Qn(d))},onFetchDepositAccountLimit:d=>{e(Kn({depositAccountId:d}))},onChargeCardResendInviteClick:d=>{e(fc(d))},onChargeCardRevokeInviteClick:d=>{e(Wn(d))},onLockChargeCardList:(d,f)=>{e(hc(d,f))},onUnlockChargeCardList:d=>{e(pc(d))},onCloseChargeCardList:(d,f)=>{e(Cc(d,f))},onRevokeChargeCardList:d=>{e(mc(d))},updateChargeCardListSpendLimit(d,f,j){e(uc(d,f,j.code))},onLockChargeCard:(d,f)=>{e(er(y,d,f))},onUnlockChargeCard:d=>{e(Jn(y,d))},onCloseChargeCard:(d,f)=>{e(Xn(d,f))},onUpdateSpendLimit(d,f,j,H){e(Zn(d,f,j.code,H))},updateChargeCardName:(d,f)=>{e(qn(y,d,f))},onClickSetupIcon:()=>{J.trackCardsListPageClicked("settings"),ca(F,v,R)&&l!=null&&J.trackCardsSettingsClick(B,T,l,w,E);const d=_o(k),f=ye(s.state?.pathnameStackToGoBack,s.pathname);t(d,{state:{pathnameStackToGoBack:f}})},onIssueCardClick:()=>{J.trackCardsListPageClicked("new card"),ca(F,v,R)&&l!=null&&J.trackCardsNewCardClick(B,T,l,"New Button","card_creation_initiated","Card List",w,E);const d=mi(k),f=ye(s.state?.pathnameStackToGoBack,s.pathname);t(d,{state:{pathnameStackToGoBack:f}})},onColumnSortConfigChanged:(d,f)=>{ca(F,v,R)&&l!=null&&J.trackCardsCardListSortClick(B,T,l,"Sort Icon","sort",d,f==="ascending"?"ASC":"DESC","Cards List",w,E),e(It({uiState:{sortKey:d,sortOrder:f}}))},onSearchTextChanged:d=>{e(lc(d))},onReloadCards:()=>{e(ia(S,F&&v,P&&C,!0))},onLetsGoClick:()=>{t("./onboard")},onBackClick:()=>{t("../../")},onTotalCashbackClick:()=>{ca(F,v,R)&&l!=null&&J.trackCardsCashbackOverviewClick(B,T,l,"Cashback Overview","cashback_details_viewed",w,E),t("./cashback")},onClickStatementsIcon:()=>{ca(F,v,R)&&l!=null&&J.trackCardsStatementsClick(B,T,l,w,E),t("./statements")},onCreateNowClick:d=>{ca(F,v,R)&&l!=null&&J.trackCardsNewCardClick(B,T,l,"Promo Banner","card_creation_initiated","Card List",w,E),t(`./new?cardType=${d}`)},onPromoCardClick:d=>{t(d==="debit"&&F&&!m||d==="credit"&&u&&!M?`../promo?cardPromoType=${d}`:"./setup")},navigateToCreditCardPaymentPage:(d,f)=>{h==="Completed"&&a.company!=null&&l!=null&&J.trackCardsPayEarlyClick(B,T,l,"Card List",d,f,{isZeniCheckingEnabled:a.company.companyZeniAccountInfo.isZeniAccountEnabled,isZeniCheckingPaymentSource:p?.accType==="depositAccount",creditCardPaymentSourceAccountName:p?.label,creditCardPaymentSourceAccountType:p?.accType,creditCardPaymentSourceLastFourDigits:p?.accountLast4,creditCardPaymentSourceBalance:p?.accountBalance?.available?.amount??0},w,E);const j=Ci(k);t(j)},navigateToCreditCardPaymentHistoryPage:()=>{const d=pi(k),f=ye(s.state?.pathnameStackToGoBack,s.pathname);t(d,{state:{pathnameStackToGoBack:f}})},shouldShowPayNowInfoTooltip:U,onSetRowActionCardId:d=>{e(dc(d))},onSetBulkActionCardIds:d=>{e(ar(d))},onEventReceived:d=>{di.has(d)&&Dt(e,S,F&&v,P&&C)},onPusherSubscribed:()=>{Dt(e,S,F&&v,P&&C)}}})(st(oo));function yn({isPaymentDrawerOpen:e}){const n=le(),t=me(),a=he(),s=r.useCallback((V,je)=>{t(ar([])),n(V,je)},[t,n]),[b,g]=r.useState(!1),[S,P]=r.useState(te.getPayNowInfoTooltip()??!1),u=V=>{te.savePayNowInfoTooltip(V),P(V)},[C,F]=r.useState(!1),v=te.getSignedInUser(),m=i(V=>ge(V)),[M,B]=r.useState(!1),[R,p]=r.useState(!1),{isAiCfoAccessEnabled:h,onAskAiCfoClick:T}=xa({mobileExploreReferrer:"Cards"}),l=m.userRole.includes("charge_card_user"),w=!l,E=!!m.companyDebitCardInfo?.info?.isDebitCardEnabled,{useFeatureGate:U,useDynamicConfig:y}=ue(),{isFeatureEnabled:k}=U(Z.isCashbackFeatureEnabled),{isFeatureEnabled:x}=U(Z.isChargeCardFeatureEnabled),{isFeatureEnabled:d}=U(Z.isDebitCardFeatureEnabled),{isFeatureEnabled:f}=U(Z.isEarlyPayFeatureEnabled),{isFeatureEnabled:j}=U(Z.isChargeCardPaymentHistoryFeatureEnabled),{isFeatureEnabled:H}=U(Z.isCardsCommentingEnabled),{isFeatureEnabled:O}=U(Z.isAiCfoFileUploadEnabled),{isFeatureEnabled:L}=U(Z.isCardPolicyEnabled),{isFeatureEnabled:z}=U(Z.isAiCardCreationEnabled),$=Re(d,m),_=Oe({isDebitCardFeatureEnabled:d,isBankingOnlyTenant:$}),D=xe(m),G=Be(m),Q=m.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,I=Ue({isCardsOnlyTenant:D,isChargeCardFeatureEnabled:x,isBookKeepingTenant:G,isDebitCardProductVisible:_,chargeCardsCreditAccountLimit:Q}),N=kr({isCardsOnlyTenant:D,isChargeCardFeatureEnabled:x,isBookKeepingTenant:G}),{configValue:Y}=y(Ze.zeniCardsConfig),X=Le(),o=Fe(X?.loggedInUserRoleMap),A=i(V=>da(V,m.companyId)),W=la(A.controllers),ne=Y.charge_card_cashback_rate_per_transaction!=null?Y.charge_card_cashback_rate_per_transaction:.0175,q=Y.credit_card_pay_now_threshold_by_company_id?.[m.companyId]??Y.default_credit_card_pay_now_threshold??Do,ke=Y.is_card_controls_enabled_for_all_tenants===!0||Array.isArray(Y.enable_card_controls_for_company_ids)&&Y.enable_card_controls_for_company_ids.includes(m.companyId),ve=!!m.companyChargeCardInfo?.info?.isChargeCardTOSAccepted,fe=!!m.companyDebitCardInfo?.info?.isDebitCardTOSAccepted,se=!!m.companyChargeCardInfo?.info?.isChargeCardEnabled,Ee=!!m.company?.companyChargeCardInfo?.isChargeCardEnabled,re=!!m.company?.companyDebitCardInfo?.isDebitCardEnabled,Ce=i(V=>Hn(V)),Ae=ya(Ce.updateStatus),ee=i(V=>Ca(V,w,_&&E,I&&se)),Te=i(V=>nc(V)),De=i(V=>rc(V)),ae=i(V=>sc(V)),oe=i(V=>cc(V)),fa=i(V=>ae==null?[]:jn(V.aiCfoState,ae).filter(je=>je.kind==="creating_cards"),_t),ta=ya(De.fetchState);r.useEffect(()=>{ta==="In-Progress"&&De.fetchState==="Completed"&&ae!=null&&fa.forEach(V=>{t(yt({chatSessionId:ae,id:V.id,entityIds:oe,kind:"created_cards"}))})},[t,De.fetchState,ae,oe,fa,ta]);const Oa=ee.cards.filter(V=>V.type.code.includes("debit")).map(V=>V.connectedAccountId),dt=[...new Set(Oa)],Ea=i(V=>ma(V)),na=i(V=>tt(V,dt)),Aa=i(V=>wa(V,m.companyId)),lt=Aa.companyChargeCardInfo?.primaryFundingAccount,ut=Aa.allFundingAccounts.find(V=>V.id===lt?.accountId),pe=ee.fetchState,Ua=ee.creditAccount,Da=r.useCallback(()=>o===!0&&L===!0&&pe==="Completed"&&te.getCardPolicyPopupSeen(m.tenantEmailDomain??"")!==!0,[o,L,pe,m.tenantEmailDomain]),[ja,Ma]=r.useState(Da);r.useEffect(()=>{Ma(Da())},[Da]);const K=()=>{te.saveCardPolicyPopupSeen(m.tenantEmailDomain??"",!0),Ma(!1)},Se=pe==="Completed"&&!ee.hasCreditCard&&!ee.hasDebitCard;co({isDataReady:pe==="Completed",pageContext:Se?"cards_creation":"cards"});const{creditAccountRepayment:ie}=i(V=>ua(V)),Ge=i(V=>qa(V).firstViewAfterActivation),{areTenantIdsInSync:Ye}=Sr(),$e=Mt(o,Ea),ze=Ba(I,se,o,Ua,ie),ra=Nt(_,E,o,na,ee.debitCardSummary),mt=Xe(I,_,E,se),Ct=ee.creditAccount.balance.amount+ee.creditAccount.hold.amount;if(r.useEffect(()=>{pe==="Completed"&&(te.getPayNowInfoTooltip()==null||Ct<q*ee.creditAccount.limit.amount/100)&&u(!0)},[pe,q,Ct,ee.creditAccount.limit.amount]),r.useEffect(()=>{if(e!=null&&e===!0&&ie.initiatedRepayments.amount===0&&ie.fetchState==="Completed"||Ae==="In-Progress"&&Ce.updateStatus==="Completed")u(!1),g(!0);else if(ie.initiatedRepayments.amount>0&&ie.fetchState==="Completed"){g(!1),document.body.style.overflow="auto";const V=aa(m.tenantEmailDomain);s(V)}},[e,ie.initiatedRepayments.amount,ie.fetchState,Ae,Ce.updateStatus,s,m.tenantEmailDomain]),r.useEffect(()=>{!M&&(se||E)&&(Ee||re)&&Ye&&(B(!0),t(ia(w,_&&E,I&&se,!1)))},[M,w,t,Ye,Ee,re]),r.useEffect(()=>{Ge&&C===!1&&(F(!0),setTimeout(()=>{t(Ka())},5e3))},[Ge,C]),r.useEffect(()=>()=>{Dt.flush()},[]),r.useEffect(()=>{pe==="Completed"&&l&&ee.cards.length===1&&(ee.cards[0].status.code==="inactive"&&ee.cards[0].type.code==="business_physical_credit_card"?s(`./${ee.cards[0].id}/activate`):ee.cards[0].status.code!=="request_on_hold"&&(a.state?.message==="comingFromCardDetail"?s("../../"):s(`./${ee.cards[0].id}`)))},[pe,l,a.state,s,ee.cards]),r.useEffect(()=>{if(pe==="Completed"&&l){const V=ee.cards.length,je=ee.cards.filter(We=>We.cardHolderUserId===v?.userId).filter(We=>We.status.code==="request_on_hold");je.length>0&&V===je.length&&s("./onboard")}},[pe,ee.cards,l,s,v?.userId]),r.useEffect(()=>{pe!=="Completed"||I&&ie.fetchState!=="Completed"||_&&E&&o&&na.fetchState!=="Completed"||J.trackCardsCardListView(W,mt,$e,ze,ra)},[pe,Ua,ie.fetchState,na.fetchState,o]),v==null)throw Error("Can't access charge card list page without signing in...");const Gr=i(V=>tr(V.userState,V.userRoleState,V.userListViewState,"cardAdmin")),Wt=xt(X?.loggedInUserRoleMap),qt=V=>{p(V)},$r=ee.creditAccount.limit,zr=()=>{g(!1),s("..")},Kr=m.companyChargeCardInfo?.info!=null&&Ia({cardInfo:m.companyChargeCardInfo.info,isProductVisible:I&&Ee,isTOSAccepted:ve,isSetupEnabled:se,isUserHasCardsAdminLevelAccess:o,isUserHasCardsAccess:Wt}),Zr=m.companyDebitCardInfo?.info!=null&&Ia({cardInfo:m.companyDebitCardInfo.info,isProductVisible:_&&re,isTOSAccepted:fe,isSetupEnabled:E,isUserHasCardsAdminLevelAccess:o,isUserHasCardsAccess:Wt}),Yr=Kr||Zr,Qt=function(V){const{isEmptyCardsState:je,isChargeCardAdmin:We,isFileUploadEnabled:Jt}=V,en=le(),Na=he(),{tenantEmailDomain:Va}=Ve(),{isAiCfoOpen:Xr,setIsAiCfoOpen:an}=Cr(),Jr=pr(),es=hr(),tn=i(be=>Un(be)).createSessionAndSubmitState.fetchState==="In-Progress",{chips:nn,isResolved:rn}=vr("cards_creation"),sn=r.useMemo(()=>wr(nn,rn,3),[nn,rn]),[Ha,pt]=r.useState(""),cn=es&&Jr&&Va!=null&&!Xr,ga=r.useCallback(be=>{if(Va==null)return;const as=ye(Na.state?.pathnameStackToGoBack,Na.pathname);en(`/${Va}/cards/ask`,{state:{message:"",origin:"",pathnameStackToGoBack:as,referrer:"cards_hero",aiCfoInitialQuestion:be,aiCfoShouldSubmit:be!=null&&be.trim().length>0}})},[Na.pathname,Na.state,en,Va]),on=r.useCallback(be=>{be.trim().length!==0&&(pt(""),ga(be))},[ga]),dn=r.useCallback(()=>{const be=Ha.trim();be.length!==0&&(pt(""),ga(be))},[Ha,ga]),ln=r.useCallback(()=>{},[]),un=r.useCallback(be=>{pt(be)},[]),mn=r.useCallback(()=>{an(!0)},[an]),Cn=r.useCallback(()=>{ga(void 0)},[ga]);return r.useMemo(()=>{if(cn&&je&&We)return{aiAgentName:ii,headline:ci,subheadline:oi,promptChips:sn,composer:{currentInput:Ha,isSubmitting:tn,isFileUploadEnabled:Jt,onInputChange:un,onSubmit:dn,onStopSubmit:ln},onPromptClick:on,onOpenSidePanel:mn,onOpenFullView:Cn,dataTestIdPrefix:"cards-ai-cfo-hero"}},[Ha,cn,We,je,Jt,tn,un,Cn,mn,on,ln,dn,sn])}({isEmptyCardsState:Se,isChargeCardAdmin:o,isFileUploadEnabled:O}),Xt=z&&Qt!=null?c.jsx(fr,{...Qt}):null,Wr=h&&Xt==null,qr=ea(m),Qr={events:ha(qr,Mr),eventCallback:(V,je,We)=>{We.onEventReceived(V)},onSubscribed:V=>{V.onPusherSubscribed()}};return se||E?c.jsxs(c.Fragment,{children:[pe==="Completed"?c.jsxs(c.Fragment,{children:[c.jsx(Ut,{analytics:J,onLoad:()=>{J.trackPageLoaded(br.Event.cardsListPage),(I&&!se||_&&!E)&&J.trackCardsPromoView(W,{isCreditCardOffered:I,isDebitCardOffered:_,isDebitCardEnabled:E,isCreditCardEnabled:se},"Banner",_&&!E?"Debit Card":I&&!se?"Credit Card":"","Card List")}}),c.jsx(nt,{showConfetti:Ge})]}):null,b===!0?c.jsx(Kt,{closeDrawerHandler:zr,isPaymentDrawerOpen:b,pageName:"Card List",sourcePage:"cardListPage",creditAccountSpentAmount:Ct,productInformation:mt,creditAccountInformation:ze,debitAccountInformation:ra,cashbackInformation:$e,isDebitCardInfoFetchStateCompleted:!(_&&E&&o)||na.fetchState==="Completed",isCreditCardInfoFetchStateCompleted:!I||ie.fetchState==="Completed",isCashbackInfoFetchStateCompleted:!o||Ea.fetchState==="Completed",paymentInitiatedDate:ie.initiatedRepaymentDate}):null,c.jsxs(li,{children:[c.jsx(Ie,{isAppContentDrawerOpen:R,handleDrawerToggle:qt}),c.jsx(ui,{...Qr,isCashbackFeatureEnabled:k,isChargeCardFeatureEnabled:I,isDebitCardFeatureEnabled:_,isCreditCardProductVisibleForExpressInterest:N,updatePayNowInfoTooltip:u,showPayNowInfoTooltip:S,creditCardPayNowThreshold:q,signedInUser:v,chargeCardListState:ee,location:a,admins:Gr.users,navigateAndClearBulkSelection:s,currentTenant:m,isCardControlsEnabled:ke,companyChargeCardInfoCreditAccountLimit:m.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,isCompanyInterestedInChargeCard:m.companyChargeCardInfo?.info?.isCompanyInterestedInChargeCard??!1,isUserHasCardsAdminLevelAccess:o,includeCreditAccountDebitSummaryAndCashbackInfo:w,onClickMenuIcon:()=>{qt(!0)},creditLimit:$r,isChargeCardSetupEnabled:se,isChargeCardEnabledOnCompany:Ee,isDebitCardSetupEnabled:E,isDebitCardEnabledOnCompany:re,isEarlyPayEnabled:f,isChargeCardPaymentHistoryFeatureEnabled:j,cashbackRate:ne,controllerEmails:W,chargeCardCashbackDetailState:Ea,depositAccountListWithDebitCardIssued:na,isChargeCardTOSAccepted:ve,isDebitCardTOSAccepted:fe,primaryFundingAccountDetails:ut,chargeCardSetUpViewFetchState:Aa.fetchState,productInformation:mt,creditAccountInformation:ze,debitAccountInformation:ra,cashbackInformation:$e,isAiCfoAccessEnabled:Wr,onAskAiCfoClick:T,isCardsCommentingEnabled:H,cardsAiCfoHero:Xt,onClickPolicyIcon:o&&L?()=>n(hi(m.tenantEmailDomain)):void 0,isPolicyIntroTooltipVisible:ja,onPolicyIntroTooltipClose:K,pendingCreationCount:Te})]})]}):(ve||fe)&&o===!0?c.jsx(oa,{to:"../setup"}):Yr?c.jsx(oa,{to:"../promo"}):c.jsx(va,{fetchState:pe})}const mi=e=>`/${e}/cards/new`,Ci=e=>`/${e}/cards/payment`,pi=e=>`/${e}/cards/payment-history`,hi=e=>`/${e}/cards/policy`,Nr=[Lr,Or],fi=new Set(Nr),gi=Pe(function(e){const n=te.getSignedInUser(),t=ge(e),a=e.tenantState.currentTenantId,s=nr(e),b={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:a??""},g=t?.companyName??"",S=e.chargeCardPaymentHistoryState.downloadUIState.downloadState;return{fetchState:s.fetchState,filters:s.filters,isZeniTenant:gc(t),repaymentList:s.repaymentHistory,searchText:s.searchText,repaymentHistoryUsers:s.repaymentHistoryUsers,sortConfig:{sortKey:s.uiState.sortKey,sortOrder:s.uiState.sortOrder},downloadParams:{authParams:b,companyName:g,spendManagementEndPoint:`${Et}/spendManagement`,isShowDeletedBillsEnabled:!1,isShowDeletedReimbursementEnabled:!1},downloadState:S}},function(e,n){const{location:t,navigate:a}=n;return{onBackClick:()=>{const s=we(t.state?.pathnameStackToGoBack),b=s.poppedPathname??"..";a(b,{state:{pathnameStackToGoBack:s.newStack}})},onColumnSortConfigChanged:(s,b)=>{e({type:"chargeCardPaymentHistory/updatePaymentHistoryUIState",payload:{uiState:{sortKey:s,sortOrder:b}}})},onFiltersChange:s=>{e(bc({filters:s}))},onReloadPayments:()=>{e(Ga(!0))},onEventReceived:s=>{fi.has(s)&&e(Ga(!0))},onPusherSubscribed:()=>{e(Ga(!0))},onSearchTextChanged:s=>{e({type:"chargeCardPaymentHistory/updatePaymentHistorySearchText",payload:s})},updateDownloadStateHandler:s=>{e(Sc({uiState:{downloadState:s}}))}}})(st(io));function Si(){const e=le(),n=he(),t=me(),{areTenantIdsInSync:a}=Sr(),{useFeatureGate:s}=ue();if(te.getSignedInUser()==null)throw Error("Can't access payment history page without signing in...");const b=i(o=>ge(o)),g=i(o=>nr(o)),[S,P]=r.useState(!1),[u,C]=r.useState(!1),[F,v]=r.useState(!1),[m,M]=r.useState(null),B=!b.userRole.includes("charge_card_user"),R=!!b.companyDebitCardInfo?.info?.isDebitCardEnabled,{isFeatureEnabled:p}=s(Z.isChargeCardFeatureEnabled),{isFeatureEnabled:h}=s(Z.isDebitCardFeatureEnabled),T=Re(h,b),l=Oe({isDebitCardFeatureEnabled:h,isBankingOnlyTenant:T}),w=xe(b),E=Be(b),U=b.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,y=Ue({isCardsOnlyTenant:w,isChargeCardFeatureEnabled:p,isBookKeepingTenant:E,isDebitCardProductVisible:l,chargeCardsCreditAccountLimit:U}),k=!!b.companyChargeCardInfo?.info?.isChargeCardEnabled,x=Le(),d=Fe(x?.loggedInUserRoleMap),f=i(o=>Ca(o,B,l&&R,y&&k)),j=r.useMemo(()=>{const o=f.cards.filter(A=>A.type.code.includes("debit"));return[...new Set(o.map(A=>A.connectedAccountId))]},[f.cards]),H=i(o=>ma(o)),O=i(o=>tt(o,j)),{creditAccountRepayment:L}=i(o=>ua(o)),z=r.useMemo(()=>Mt(d,H),[d,H]),$=r.useMemo(()=>Ba(y,k,d,f.creditAccount,L),[y,k,d,f.creditAccount,L]),_=r.useMemo(()=>Nt(l,R,d,O,f.debitCardSummary),[l,R,d,O,f.debitCardSummary]),D=r.useMemo(()=>Xe(y,l,R,k),[y,l,R,k]),G=f.creditAccount.balance.amount+f.creditAccount.hold.amount,Q=r.useMemo(()=>m!=null?g.repaymentHistory.find(o=>o.cardRepaymentId===m):void 0,[m,g.repaymentHistory]),I=r.useCallback(o=>{M(o),t(ia(B,l&&R,y&&k,!1)),v(!0)},[t,B,l,R,y,k]),N=r.useCallback(()=>{v(!1),M(null),document.body.style.overflow="auto"},[]);r.useEffect(()=>{S||g.fetchState==="Completed"||g.fetchState==="In-Progress"||(P(!0),t(Ga()))},[S,t,g.fetchState]),r.useEffect(()=>{!u&&(k||R)&&a&&(C(!0),t(ia(B,!1,y&&k,!1)))},[u,k,R,a,t,B,y]);const Y=ea(b),X={events:ha(Y,Nr),eventCallback:(o,A,W)=>{W.onEventReceived(o)},onSubscribed:o=>{o.onPusherSubscribed()}};return c.jsxs(c.Fragment,{children:[F?c.jsx(Kt,{closeDrawerHandler:N,isPaymentDrawerOpen:F,pageName:"Payment History",sourcePage:"cardPaymentHistory",creditAccountSpentAmount:G,productInformation:D,creditAccountInformation:$,debitAccountInformation:_,cashbackInformation:z,isDebitCardInfoFetchStateCompleted:!(l&&R&&d)||O.fetchState==="Completed",isCreditCardInfoFetchStateCompleted:!y||L.fetchState==="Completed",isCashbackInfoFetchStateCompleted:!d||H.fetchState==="Completed",paymentInitiatedDate:L.initiatedRepaymentDate,retryRepayment:Q}):null,c.jsx(gi,{...X,location:n,navigate:e,accountInfoByAccountId:g.accountInfoByAccountId,onRetryPaymentClick:I})]})}const In=He.div`
|
|
26
|
-
display: flex;
|
|
27
|
-
height: 100vh;
|
|
28
|
-
width: 100%;
|
|
29
|
-
flex: 1 1 auto;
|
|
30
|
-
flex-direction: column;
|
|
31
|
-
overflow: auto;
|
|
32
|
-
align-items: center;
|
|
33
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
34
|
-
`,kn=Je.getLocalizedStrings().months;function bi(){const e=le(),n=me(),t=he(),{creditAccount:a,creditAccountRepayment:s}=i(D=>ua(D)),b=`${gr.cardMicroServiceBaseUrl}/1.0/credit-accounts/${a.id}`,[g,S]=r.useState(!1),[P,u]=r.useState(!1),C=i(D=>yc(D)),{useFeatureGate:F}=ue(),v=i(D=>ge(D)),{isFeatureEnabled:m}=F(Z.isChargeCardFeatureEnabled),{isFeatureEnabled:M}=F(Z.isDebitCardFeatureEnabled),{isFeatureEnabled:B}=F(Z.isCardsCommentingEnabled),R=Dr(B?v.companyId:void 0,{clearParams:B&&C.fetchState==="Completed"}),p=Re(M,v),h=Oe({isDebitCardFeatureEnabled:M,isBankingOnlyTenant:p}),T=xe(v),l=Be(v),w=v.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,E=Ue({isCardsOnlyTenant:T,isChargeCardFeatureEnabled:m,isBookKeepingTenant:l,isDebitCardProductVisible:h,chargeCardsCreditAccountLimit:w}),U=!!v.companyDebitCardInfo?.info?.isDebitCardEnabled,y=!!v.companyChargeCardInfo?.info?.isChargeCardEnabled,k=i(D=>da(D,v.companyId)),x=la(k.controllers),d=i(D=>rr(D)),f=d.cards.filter(D=>D.type.code.includes("debit")).map(D=>D.connectedAccountId),j=[...new Set(f)],H=i(D=>tt(D,j)),O=i(D=>Ic(D));r.useEffect(()=>{P||a.fetchState==="Completed"||a.fetchState==="In-Progress"||(S(!0),n(Qe()))},[g,n,a.fetchState]),r.useEffect(()=>{P||a.fetchState!=="Completed"||a.id==null||C.fetchState==="Completed"||C.fetchState==="In-Progress"||(u(!0),n(kc(a.id)))},[P,n,a.fetchState,a.id,C.fetchState]),r.useEffect(()=>{H.fetchState!=="Completed"&&H.fetchState!=="In-Progress"&&h&&U&&n(sr()),d.fetchState!=="Completed"&&d.fetchState!=="In-Progress"&&n(Ne()),O.fetchState!=="Completed"&&O.fetchState!=="In-Progress"&&h&&U&&n(Ec()),s.fetchState!=="Completed"&&s.fetchState!=="In-Progress"&&E&&y&&n(Tt())},[H.fetchState,h,U,d.fetchState,O.fetchState,s.fetchState,E,y]),r.useEffect(()=>{if(C.fetchState==="Completed"&&a.fetchState==="Completed"&&s.fetchState==="Completed"&&d.fetchState==="Completed"&&(!h||!U||H.fetchState==="Completed"&&O.fetchState==="Completed")){let D="",G="";if(C.statements.length>0){const Y=C.statements[C.statements.length-1].period,[X,o]=Y.split("-"),A=C.statements[0].period,[W,ne]=A.split("-");D=`${kn[parseInt(o)-1]} ${X}`,G=`${kn[parseInt(ne)-1]} ${W}`}const Q=Xe(E,h,U,y),I=Ba(E,y,!0,a,s),N=Nt(h,U,!0,H,O);J.trackCardsCreditCardStatementsView(x,Q,{numberOfStatements:C.statements.length,oldestStatementMonthYear:D,latestStatementMonthYear:G},I,N)}},[C.fetchState,a.fetchState,s.fetchState,H.fetchState,d.fetchState,O.fetchState]);const L=()=>{const D=we(t.state?.pathnameStackToGoBack),G=D.poppedPathname??"..";e(G,{state:{pathnameStackToGoBack:D.newStack}})},z=i(D=>ma(D)),$=te.getSignedInUser(),_={userId:$?.userId??"",sessionId:$?.zeniSessionId??"",tenantId:v.tenantId??""};if($==null)throw Error("Can't access address page without signing in...");if(C.fetchState!=="Completed")return c.jsx(In,{children:c.jsx(lo,{onBackClick:L})});{const D=Xe(E,h,U,y);return c.jsx(In,{children:c.jsx(uo,{currentTenantCompanyName:v.companyName,statementListView:C,productInformation:D,onBackClick:L,authParams:_,controllerEmails:x,isChargeCardFeatureEnabled:E,isDebitCardFeatureEnabled:h,isDebitCardSetupEnabled:U,isChargeCardSetupEnabled:y,isCardsCommentingEnabled:B,initialOpenThreadRequest:R,chargeCardCashbackDetailState:z,creditAccount:a,creditAccountRepayment:s,depositAccountListWithDebitCardIssued:H,debitCardSummary:O,downloadEndPoint:b})})}}const Vr=[pa,it],yi=new Set(Vr),Ii={containerWidth:new Fa(100,58)},ki=({appContent:e})=>{const n=Ta(),t=me(),a=le(),s=he(),{useDynamicConfig:b}=ue(),[g,S]=r.useState(!1),[P,u]=r.useState(!1),[C,F]=r.useState(!1),[v,m]=r.useState(!1),M=r.useRef(!1),B=r.useRef(null);r.useEffect(()=>()=>{B.current!=null&&(clearTimeout(B.current),B.current=null)},[]);const[R,p]=r.useState(!1),[h,T]=r.useState(!1),l=te.getSignedInUser();if(l==null)throw Error("Can't access onboarding card page without signing in...");const w=i(N=>ge(N)),{configValue:E}=b(Ze.zeniCardsConfig),U=i(N=>Ac(N)),{tenantEmailDomain:y}=w,k=i(N=>N.settingsViewState.profile.fetchState),x=i(N=>N.chargeCardListState.fetchState),d=i(N=>N.settingsViewState.profile.userId),f=i(N=>N.chargeCardConfigState.fetchState);r.useEffect(()=>{g===!1&&k!=="In-Progress"&&k!=="Completed"&&(t(Dc()),S(!0)),P===!1&&f!=="In-Progress"&&f!=="Completed"&&(t(Qa()),u(!0)),C===!1&&x==="Not-Started"&&(F(!0),t(Ne()))},[g,C,x,P,f]),r.useEffect(()=>{k==="Completed"&&R===!1&&d!=null&&x==="Completed"&&U.cards.length>0&&(t(_c({userId:d})),t(cr({cardId:U.cards[U.cards.length-1].id})),p(!0))},[k,R,d,x]),r.useEffect(()=>{if(!v&&U.fetchState==="Completed"&&U.cards.length===0){const N=we(s.state?.pathnameStackToGoBack),Y=N.poppedPathname??aa(y);a(Y,{state:{pathnameStackToGoBack:N.newStack}})}},[U.fetchState,U.cards,v]);const j=i(N=>qa(N)),H=ya(j.updateStatus.fetchState),O=j.currentDisplayedCardId,{useFeatureGate:L}=ue(),{isFeatureEnabled:z}=L(Z.isChargeCardFeatureEnabled),$=!!w.companyChargeCardInfo?.info?.isChargeCardEnabled,_=!w.userRole.includes("charge_card_user")&&z&&$,D=i(N=>O!=null?or(N.chargeCardState,O):null),G=()=>{O!=null&&(M.current=!0,B.current!=null&&clearTimeout(B.current),B.current=setTimeout(()=>{M.current=!1,B.current=null},5e3),t(ka(O,_,!0)),t(Ne(!0)),m(!0))},Q=ea(w);Vt({events:ha(Q,Vr),onSubscribed:()=>{t(Ne(!0))},onEvent:(N,Y)=>{if(!yi.has(N))return;const X=Zt(Y),o=M.current;if(N===pa){const W=de(X?.card_id)??O;if(W!=null){const ne=Yt(X,W);if(ne!=null)return t(Ft(ne)),void(W!==O||o||G())}}if(N===it)return void t(Ne(!0));const A=de(X?.card_id)??O;(O==null||A===O)&&O!=null?o||G():t(Ne(!0))}}),r.useEffect(()=>{if(v&&O!=null&&D!=null&&D.status.code!=="request_on_hold"){const N=_e(w.tenantEmailDomain,O,l,D),Y=ye(s.state?.pathnameStackToGoBack,s.pathname);t(Pc()),D?.type.code==="business_virtual_credit_card"&&t(Xa()),a(N,{state:{pathnameStackToGoBack:Y},replace:!0}),M.current=!1,B.current!=null&&(clearTimeout(B.current),B.current=null)}},[v,D?.status.code]),r.useEffect(()=>{H==="In-Progress"&&j.updateStatus.fetchState==="Completed"&&setTimeout(G,3e3)},[H,j.updateStatus.fetchState]);const I=N=>{T(N)};if(k!=="Completed"||U.cards.length===0)return c.jsxs(En,{children:[c.jsx(Ie,{isAppContentDrawerOpen:h,handleDrawerToggle:I}),c.jsx(mo,{})]});if(d==null)throw Error("Can't access my userId.");return c.jsxs(En,{children:[c.jsx(Ie,{isAppContentDrawerOpen:h,handleDrawerToggle:I}),c.jsx(Ei,{chargeCardListView:U,cardUserOnboardingView:j,navigate:a,currentTenant:w,myUserId:d,location:s,chargeCardCashbackRatePerTransaction:E.charge_card_cashback_rate_per_transaction!=null?E.charge_card_cashback_rate_per_transaction:.0175,onClickMenuIcon:()=>{I(!0)}}),e!=null?c.jsx(Ai,{windowSize:n,children:e}):null]})},Ei=Pe(function(e,{currentTenant:n,cardUserOnboardingView:t,chargeCardListView:a,myUserId:s}){const b=Ca(e,!1,!1,!1);let g=!1;return b.fetchState==="Completed"&&b.cards.length<=1&&(g=!0),{cards:a.cards,showMenuIcon:g,companyLegalName:n.companyName,twoFAView:t.twoFAView,cardUserOnboardingLocalData:t.cardUserOnboardingLocalData??{userId:s},isDOBDisabled:t.isDOBPresent,onboardingProgressStatus:t.onboardingProgressStatus}},function(e,n){const{navigate:t,cardUserOnboardingView:a,location:s,currentTenant:b}=n,{tenantEmailDomain:g}=b;return{updateCardUserOnboardingLocalData:S=>{e(fn({localData:S}))},onGetOtp:S=>{if(a.cardUserOnboardingLocalData!=null){const P={...a.cardUserOnboardingLocalData,phone:S};e(fn({localData:P}))}e(at(S,"CardUserOnboarding"))},onResendOtp:S=>{e(et(S,"CardUserOnboarding"))},onVerifyOtp:(S,P)=>{e(Ja(S,P,"CardUserOnboarding"))},onVerifyOtpSuccess:S=>{e(wc()),S!=null&&te.saveZeniOtpToken(S)},setCurrentDisplayedCardId:S=>{e(cr({cardId:S}))},onBackClick:()=>{const S=we(s.state?.pathnameStackToGoBack),P=S.poppedPathname??aa(g);t(P,{state:{pathnameStackToGoBack:S.newStack}})}}})(Co),Ai=He.div`
|
|
35
|
-
display: flex;
|
|
36
|
-
flex-direction: column;
|
|
37
|
-
width: ${e=>`${Ii.containerWidth.value(e.windowSize)}%`};
|
|
38
|
-
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
39
|
-
`,En=He.div`
|
|
40
|
-
display: flex;
|
|
41
|
-
min-height: 100%;
|
|
42
|
-
width: 100%;
|
|
43
|
-
flex: 1 1 auto;
|
|
44
|
-
flex-direction: column;
|
|
45
|
-
align-items: center;
|
|
46
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
47
|
-
`,Di={containerWidth:new Fa(100,58)},_i=({appContent:e})=>{const n=Ta(),t=me(),a=le(),{cardId:s}=Ve(),b=he(),{useDynamicConfig:g,useFeatureGate:S}=ue(),[P,u]=r.useState(!1),[C,F]=r.useState(!1),[v,m]=r.useState(!1),[M,B]=r.useState(!1),R=te.getSignedInUser();if(R==null)throw Error("Can't access onboarding card page without signing in...");const p=i(_=>ge(_));if(s==null)throw Error("Empty card id is not valid...");const{configValue:h}=g(Ze.zeniCardsConfig),T=i(_=>vc(_,s)),{isFeatureEnabled:l}=S(Z.isChargeCardFeatureEnabled),{isFeatureEnabled:w}=S(Z.isDebitCardFeatureEnabled),E=Re(w,p),U=Oe({isDebitCardFeatureEnabled:w,isBankingOnlyTenant:E}),y=xe(p),k=Be(p),x=p.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,d=Ue({isCardsOnlyTenant:y,isChargeCardFeatureEnabled:l,isBookKeepingTenant:k,isDebitCardProductVisible:U,chargeCardsCreditAccountLimit:x}),f=T.chargeCard,j=i(_=>_.chargeCardConfigState.fetchState);r.useEffect(()=>{P===!1&&j!=="In-Progress"&&j!=="Completed"&&(t(Qa()),u(!0)),C===!1&&T.fetchState==="Not-Started"&&(F(!0),t(ka(s,!1,d)))},[C,T.fetchState,P,j]);const H=f?.type.code==="business_physical_debit_card"||f?.type.code==="business_virtual_debit_card";r.useEffect(()=>{if(T.fetchState==="Completed"){if(v===!1&&(H===!1||H&&f.status?.code!=="active"||H&&f.status.code==="active"&&f.isPinSet||f.cardHolderUserId!==R.userId)){const _=_e(p.tenantEmailDomain,s,R,f,!0),D=ye(b.state?.pathnameStackToGoBack,b.pathname);a(_,{state:{pathnameStackToGoBack:D}})}else if(v&&T.isRefreshingViewInBackground===!1&&f?.isPinSet===!0){t(Tc({chargeCardId:s}));const _=_e(p.tenantEmailDomain,s,R,f,!0),D=ye(b.state?.pathnameStackToGoBack,b.pathname);t(Xa()),a(_,{state:{pathnameStackToGoBack:D}})}}},[T.fetchState,f?.type.code,v,T.isRefreshingViewInBackground]);const O=te.getZeniOtpTokenForCardHolder(s),L=i(_=>Nn(_.userState,R.userId)),z=()=>{f?.isPinSet!==!0&&t(Sa(s,!0))};r.useEffect(()=>{T.updateDebitCardPinAttemptFetchState.fetchState==="Completed"&&(setTimeout(z,3e3),m(!0))},[T.updateDebitCardPinAttemptFetchState.fetchState]);const $=_=>{B(_)};if(j!=="Completed"||f==null)return c.jsx(va,{fetchState:"In-Progress"});if(L?.phone==null)throw Error("Can't access user phone number.");return c.jsxs(vi,{children:[c.jsx(Ie,{isAppContentDrawerOpen:M,handleDrawerToggle:$}),c.jsx(Pi,{cardId:s,card:f,phone:L.phone,signedInUser:R,isSandboxEnv:Lt(),debitCardDetailState:T,signedInUserToken:O,navigate:a,currentTenant:p,location:b,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,onClickMenuIcon:()=>{$(!0)}}),e!=null?c.jsx(wi,{windowSize:n,children:e}):null]})},Pi=Pe(function(e,{debitCardDetailState:n,cardId:t}){const a=Vn(e,t),s=n.updateStatus,b=Ca(e,!1,!1,!1);let g=!1;return b.fetchState==="Completed"&&b.cards.length<=1&&(g=!0),{showMenuIcon:g,vgsVaultId:rt.cardVaultId,twoFAView:a,setPinWaitStatus:s}},function(e,n){const{navigate:t,cardId:a,location:s,currentTenant:b,debitCardDetailState:g}=n,S=g.chargeCard?.cardProviderID,{tenantEmailDomain:P}=b;return{onGetOtp:u=>{S!=null&&e(at(u,"ChargeCardHolder",a))},onUpdateDebitCardPinAttempt:u=>{e(Yn(a,u))},onResendOtp:u=>{S!=null&&e(et(u,"ChargeCardHolder",a))},onVerifyOtp:(u,C)=>{S!=null&&e(Ja(u,C,"ChargeCardHolder",a))},onVerifyOtpSuccess:u=>{u!=null&&te.saveZeniOtpTokenForCardHolder(u,a)},onSetPinSuccess:()=>{e(Fc({chargeCardId:a}))},onBackClick:()=>{const u=we(s.state?.pathnameStackToGoBack),C=u.poppedPathname==null||u.poppedPathname.includes("activate")===!0?aa(P):u.poppedPathname;t(C,{state:{pathnameStackToGoBack:u.newStack}})}}})(po),wi=He.div`
|
|
48
|
-
display: flex;
|
|
49
|
-
flex-direction: column;
|
|
50
|
-
width: ${e=>`${Di.containerWidth.value(e.windowSize)}%`};
|
|
51
|
-
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
52
|
-
box-shadow: ${e=>`${Za.sp0} 2px ${Za.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
53
|
-
`,vi=He.div`
|
|
54
|
-
display: flex;
|
|
55
|
-
min-height: 100%;
|
|
56
|
-
width: 100%;
|
|
57
|
-
flex: 1 1 auto;
|
|
58
|
-
flex-direction: column;
|
|
59
|
-
align-items: center;
|
|
60
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
61
|
-
box-shadow: ${e=>`${Za.sp0} 2px ${Za.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
62
|
-
`,Ti={overlayWidth:new Fa(ht[12],ht[12],ht[9])},Fi=Pe(function(e,n){const t=Bt(e,!1,!1),a=n.lineId,s=t.customAddress[a],b=t.customAddressStatus[a]??{fetchState:"Not-Started",error:void 0};return{googleAPIKey:n.googleAPIKey,customAddress:s,customAddressStatus:b,lineId:a}},function(e,n){const{newCustomAddressId:t,lineId:a,chargeCardTypeOption:s}=n;return{onSubmitHandler:b=>{t!=null&&e(ir(`${s==="creditCard"?"credit":"debit"}_custom_shipping_${a}_address`));const g=wo(b);e(Rc({addressType:`${s==="creditCard"?"credit":"debit"}_custom_shipping_${a}_address`,addressToCreate:g})),e(Lc(`${s==="creditCard"?"credit":"debit"}_custom_shipping_${a}_address`))},onDismissClick:()=>{n.onDismissClick(),t!=null&&e(Bc({addressId:t,cardLineId:a,cardType:s==="creditCard"?"business_physical_credit_card":"business_physical_debit_card"}))}}})(ho),xi=({lineId:e,closeDrawerHandler:n,chargeCardTypeOption:t})=>{const a=Ot(),s=Ta(),b=()=>{n()},g=i(S=>xc(`${t==="creditCard"?"credit":"debit"}_custom_shipping_${e}_address`,S))?.newAddressId;return c.jsx(yr,{anchor:"right",open:e.length>0,PaperProps:{style:{minWidth:Ti.overlayWidth.valuePercentage(s),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:a.colors.black,cursor:"pointer"}}},onClose:(S,P)=>(P==="backdropClick"||P==="escapeKeyDown")&&b(),children:c.jsx(Fi,{googleAPIKey:rt.googleMapsAPIKey,onDismissClick:b,lineId:e,chargeCardTypeOption:t,newCustomAddressId:g})})},Bi=Pe(function(e,n){const{isChargeCardFeatureEnabled:t,isDebitCardFeatureEnabled:a,isIssuePhysicalCardEnabled:s,isIssuePhysicalDebitCardEnabled:b,isChargeCardSetupEnabled:g,isDebitCardSetupEnabled:S}=n,P=Bt(e,t&&g,a&&S);return{issueChargeCards:P,isIssuePhysicalCardEnabled:s,isIssuePhysicalDebitCardEnabled:b,isDebitCardFeatureEnabled:a,isChargeCardFeatureEnabled:t,isChargeCardSetupEnabled:g,isDebitCardSetupEnabled:S,cardHolderCandidates:P.userList.map(u=>u.user).filter(Boolean),allRoles:P.userList.map(u=>u.userRole),allAccountingClasses:P.allAccountingClasses,userList:P.userList}},function(e,n){return{onIssueCardClick:()=>{e(jc())},onSaveChangesToLocalStore:t=>{e(Uc(t))},onDismissClick:()=>{e(dr()),n.navigate("../")},resetCustomAddressByLineID:(t,a)=>{e(ir(`${a==="creditCard"?"credit":"debit"}_custom_shipping_${t}_address`))},openAddAddressDrawerHandler:n.openAddAddressDrawerHandler}})(So);function Ri(){const e=te.getSignedInUser(),n=le(),t=me(),a=fo(),[s]=An(),b=s.get("cardType"),{useFeatureGate:g}=ue(),{isFeatureEnabled:S}=g(Z.isIssuePhysicalCardEnabled),{isFeatureEnabled:P}=g(Z.isIssuePhysicalDebitCardEnabled),{isFeatureEnabled:u}=g(Z.isDebitCardFeatureEnabled),{isFeatureEnabled:C}=g(Z.isChargeCardFeatureEnabled),F=i(z=>ge(z)),v=Re(u,F),m=Oe({isDebitCardFeatureEnabled:u,isBankingOnlyTenant:v}),M=xe(F),B=Be(F),R=F.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,p=Ue({isCardsOnlyTenant:M,isChargeCardFeatureEnabled:C,isBookKeepingTenant:B,isDebitCardProductVisible:m,chargeCardsCreditAccountLimit:R}),[h,T]=r.useState(!1);if(e==null)throw Error("Can't access issue card page without signing in...");r.useEffect(()=>{h||(T(!0),t(Oc(m&&w,p&&l,!1)))},[h,T,t]);const l=!!F.companyChargeCardInfo?.info?.isChargeCardEnabled,w=!!F.companyDebitCardInfo?.info?.isDebitCardEnabled,E=i(z=>Bt(z,p&&l,m&&w)),U=E.fetchState,y=E.issueCardStatus.fetchState,k=E.lastSelfIssuedDebitCardId,x=i(z=>k!=null?or(z.chargeCardState,k):void 0),[d,f]=r.useState(null),[j,H]=r.useState(null),O=()=>{f(null)},L=(z,$)=>{f(z),H($)};return r.useEffect(()=>{if(y==="Completed"){if(k!=null&&x?.type.code==="business_virtual_debit_card"){let z;z=x?.status.code==="request_on_hold"&&e.userId===x.cardHolderUserId?Ar(F.tenantEmailDomain):_e(F.tenantEmailDomain,k,e,x),n(z)}else n("../");t(dr())}},[y,k]),U==="Completed"?c.jsxs(c.Fragment,{children:[d!==null&&j!==null?c.jsx(xi,{closeDrawerHandler:O,lineId:d,chargeCardTypeOption:j}):null,c.jsx(Bi,{themeState:a,isIssuePhysicalCardEnabled:S,isIssuePhysicalDebitCardEnabled:P,isDebitCardFeatureEnabled:m,isChargeCardFeatureEnabled:p,isChargeCardSetupEnabled:l,isDebitCardSetupEnabled:w,navigate:n,fetchState:E.fetchState,openAddAddressDrawerHandler:L,defaultCardType:b==="creditCard"||b==="debitCard"?b:void 0})]}):U==="Error"?c.jsx(ct,{}):c.jsx(go,{})}const Hr=[pa,it],Li=new Set(Hr),Oi=He.div`
|
|
63
|
-
display: flex;
|
|
64
|
-
height: 100vh;
|
|
65
|
-
width: 100%;
|
|
66
|
-
flex: 1 1 auto;
|
|
67
|
-
flex-direction: column;
|
|
68
|
-
overflow: auto;
|
|
69
|
-
align-items: center;
|
|
70
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
71
|
-
`,Ui=Pe(function(e,n){const{myPendingActivationChargeCardListState:t}=n;return{myPendingActivationChargeCardListView:t,uiState:t.uiState,signedInUser:n.signedInUser}},function(e,n){const{navigate:t,currentTenant:a,location:s,signedInUser:b,myPendingActivationChargeCardListState:g}=n,{tenantEmailDomain:S}=a,{cards:P}=g;return{onChargeCardRowClick:u=>{const C=Er(P,u),F=_e(S,u,b,C),v=ye(s.state?.pathnameStackToGoBack,s.pathname);t(F,{state:{pathnameStackToGoBack:v}})},onColumnSortConfigChanged:(u,C)=>{e(It({uiState:{sortKey:u,sortOrder:C}}))},onReloadCards:()=>{e(Ne())},onBackClick:()=>{const u=a.userRole.includes("charge_card_user");e(It({uiState:{sortKey:u?"cardName":"owner",sortOrder:"ascending"}})),t("../")}}})(bo);function ji(){const e=le(),n=me(),t=he(),a=Ot(),[s,b]=r.useState(!1),g=i(L=>Mc(L)),S=i(L=>ge(L)),P=i(L=>da(L,S.companyId)),u=la(P.controllers),{useFeatureGate:C}=ue(),{isFeatureEnabled:F}=C(Z.isChargeCardFeatureEnabled),{isFeatureEnabled:v}=C(Z.isDebitCardFeatureEnabled),m=Re(v,S),M=Oe({isDebitCardFeatureEnabled:v,isBankingOnlyTenant:m}),B=!!S.companyDebitCardInfo?.info?.isDebitCardEnabled,R=!!S.companyChargeCardInfo?.info?.isChargeCardEnabled,p=Le(),h=xe(S),T=Be(S),l=S.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,w=Ue({isCardsOnlyTenant:h,isChargeCardFeatureEnabled:F,isBookKeepingTenant:T,isDebitCardProductVisible:M,chargeCardsCreditAccountLimit:l}),E=Fe(p?.loggedInUserRoleMap),U=i(L=>ma(L)),{creditAccount:y,creditAccountRepayment:k}=i(L=>ua(L)),x=i(L=>rr(L)).cards.filter(L=>L.type.code.includes("debit")).map(L=>L.connectedAccountId),d=[...new Set(x)],f=i(L=>tt(L,d));r.useEffect(()=>{s||g.fetchState==="Completed"||g.fetchState==="In-Progress"||(b(!0),n(Ne()),n(Qa()))},[s,n,g.fetchState]),r.useEffect(()=>{if(g.fetchState==="Completed"&&g.cards.length===1&&j!=null){const L=_e(S.tenantEmailDomain,g.cards[0].id,j,g.cards[0]);e(L,{state:{message:t.state?.message}})}},[g.fetchState,g.cards]);const j=te.getSignedInUser();r.useEffect(()=>{y.fetchState!=="Completed"&&y.fetchState!=="In-Progress"&&w&&R&&E&&n(Qe()),k.fetchState!=="Completed"&&k.fetchState!=="In-Progress"&&E&&n(Tt()),f.fetchState!=="Completed"&&f.fetchState!=="In-Progress"&&M&&B&&E&&n(sr())},[y.fetchState,k.fetchState,n,f.fetchState,M,B,E,w,R]);const H=ea(S);if(Vt({events:ha(H,Hr),onEvent:(L,z)=>{if(!Li.has(L))return;const $=Zt(z);if(L===pa){const _=de($?.card_id);if(_!=null){const D=Yt($,_);if(D!=null)return void n(Ft(D))}}n(Ne(!0))},onSubscribed:()=>{n(Ne(!0))}}),j==null)throw Error("Can't access address page without signing in...");const O=g.cards!=null&&g.cards.length>0;if(g.fetchState==="Completed"||O){const L=Xe(w,M,B,R);return c.jsx(Oi,{children:c.jsx(Ui,{navigate:e,currentTenant:S,signedInUser:j,productInformation:L,myPendingActivationChargeCardListState:g,isChargeCardFeatureEnabled:w,isDebitCardFeatureEnabled:M,isDebitCardSetupEnabled:B,isChargeCardSetupEnabled:R,chargeCardCashbackDetailState:U,creditAccount:y,creditAccountRepayment:k,depositAccountListWithDebitCardIssued:f,controllerEmails:u,location:t})})}return c.jsx(va,{fetchState:"In-Progress",style:{backgroundColor:a.colors.grey5}})}const Mi=Pe(function(e,n){const{companyId:t,companyLegalName:a}=n;return{chargeCardSetupView:wa(e,t),admins:n.adminList,companyLegalName:a,meetingUrl:"https://meetings.hubspot.com/niharn/demo-zeni-charge-cards?embed=true"}},function(e,n){const{navigate:t,companyId:a,isCompanyBusinessVerificationAndPaymentSetUpDone:s,isDebitCardSetupEnabled:b,isChargeCardSetupEnabled:g,signedInUser:S,location:P,productInformation:u,isEarlyPayEnabled:C,controllerEmails:F,chargeCardsCreditAccountLimit:v}=n;return{onSetupButtonClick:m=>{if(S!=null&&J.trackCardsPromoPageClicked("enable cards"),s)switch(J.trackCardsEnableCardsClick(F,u,"Cards Promo"),m){case"credit":e(qe(a,!0,"charge_cards",C,!1));break;case"debit":e(qe(a,!0,"debit_cards",C,!1));break;case"debit_and_credit":e(v===0?qe(a,!0,"debit_cards",C,!0):qe(a,!0,"charge_cards__debit_cards",C,!1))}else switch(J.trackCardsSetupCardsClick(F,u,"Cards Promo"),m){case"credit":e(qe(a,!1,"charge_cards",C,!1));break;case"debit":e(qe(a,!1,"debit_cards",C,!1));break;case"debit_and_credit":e(v===0?qe(a,!1,"debit_cards",C,!0):qe(a,!1,"charge_cards__debit_cards",C,!1))}},onBackClick:()=>{const m=we(P.state?.pathnameStackToGoBack);let M=m.poppedPathname;M==null&&(M=b||g?"..":"../.."),t(M,{state:{pathnameStackToGoBack:m.newStack}})},onLetsGoClick:()=>{t("./onboard")},onSetupChargeCardSuccess:()=>{s?(e(Xa()),t("../",{relative:"path"})):t("../setup",{relative:"path"})},onExpressInterestClick:()=>{e(Hc(a))}}})(Io),Ni=()=>{const e=le(),{tenantEmailDomain:n}=Ve(),[t]=An(),a=t.get("cardPromoType"),s=me(),{useDynamicConfig:b,useFeatureGate:g}=ue(),[S,P]=r.useState(!1),{isFeatureEnabled:u}=g(Z.isDebitCardFeatureEnabled),{isFeatureEnabled:C}=g(Z.isEarlyPayFeatureEnabled),{isFeatureEnabled:F}=g(Z.isChargeCardFeatureEnabled),{configValue:v}=b(Ze.zeniCardsConfig),m=i(ae=>ge(ae)),M=i(ae=>da(ae,m.companyId)),B=la(M.controllers),R=v.charge_card_cashback_rate_per_transaction!=null?v.charge_card_cashback_rate_per_transaction:.0175,p=he(),h=te.getSignedInUserTenant(n)?.companyId??m.companyId,T=i(ae=>wa(ae,h)),l=T.primaryFundingAccount,w=m.companyBillPayInfo?.info,E=xe(m),U=Be(m),y=Re(u,m),k=m.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,x=Oe({isDebitCardFeatureEnabled:u,isBankingOnlyTenant:y}),d=Ue({isCardsOnlyTenant:E,isChargeCardFeatureEnabled:F,isBookKeepingTenant:U,isDebitCardProductVisible:x,chargeCardsCreditAccountLimit:k}),f=kr({isCardsOnlyTenant:E,isChargeCardFeatureEnabled:F,isBookKeepingTenant:U}),j=x&&d===!1,H=w?.businessVerificationStatus?.code==="verified"&&(j||l?.accType==="depositAccount"||Nc(l?.providerVerificationStatus?.code??"")),O=te.getSignedInUser(),L=!!m.companyZeniAccountInfo?.info?.isZeniAccountEnabled,z=!!m.companyChargeCardInfo?.info?.isChargeCardTOSAccepted,$=!!m.company?.companyChargeCardInfo?.isChargeCardEnabled,_=!!m.company?.companyDebitCardInfo?.isDebitCardEnabled,D=!!m.companyChargeCardInfo?.info?.isChargeCardEnabled,G=!!m.companyDebitCardInfo?.info?.isDebitCardEnabled,Q=!!m.companyDebitCardInfo?.info?.isDebitCardTOSAccepted,I=ae=>{P(ae)},N=i(ae=>ae.chargeCardSetupViewState.fetchState);if(O==null)throw Error("Can't access Charge Card promo page without signing in...");const Y=Le(),X=Fe(Y?.loggedInUserRoleMap),o=xt(Y?.loggedInUserRoleMap),[A,W]=r.useState(!1),[ne,q]=r.useState(!1),[ke,ve]=r.useState(!1);r.useEffect(()=>{A===!1&&p.state?.message==="activation"&&W(!0)},[p.state]),r.useEffect(()=>{ne||N!=="Not-Started"||h==null||(q(!0),s(Pa(h,!0)))},[ne,N,h,s]);const fe=m.companyChargeCardInfo?.info!=null&&Ia({cardInfo:m.companyChargeCardInfo.info,isProductVisible:f&&$,isTOSAccepted:z,isSetupEnabled:D,isUserHasCardsAdminLevelAccess:X,isUserHasCardsAccess:o}),se=m.companyDebitCardInfo?.info!=null&&Ia({cardInfo:m.companyDebitCardInfo.info,isProductVisible:x&&_,isTOSAccepted:Q,isSetupEnabled:G,isUserHasCardsAdminLevelAccess:X,isUserHasCardsAccess:o}),Ee=x&&se&&f&&k>=0&&fe?"debit_and_credit":x&&se?"debit":"credit",re=Po(a,Ee),Ce=T?.chargeCardTermsDetails?.fetchStatus?.fetchState,Ae=r.useRef(null);r.useEffect(()=>{Ce==="In-Progress"?Ae.current=re:Ce!=="Error"&&Ce!=="Not-Started"||(Ae.current=null)},[Ce,re]);const ee=Ce!=="In-Progress"&&Ce!=="Completed"||Ae.current==null?re:Ae.current;r.useEffect(()=>{re==="credit"&&(D||f===!1&&G)||re==="debit"&&G||re==="debit_and_credit"&&G&&D?e("../"):(re==="debit_and_credit"&&z===!0&&Q===!0||re==="credit"&&(z===!0||f===!1&&Q===!0)||re==="debit"&&Q===!0)&&X===!0&&e("../setup")},[H,D,G,re,z,Q]),r.useEffect(()=>{ke||(s(Vc("cardAdmin")),ve(!0))},[ke]);const Te=i(ae=>tr(ae.userState,ae.userRoleState,ae.userListViewState,"cardAdmin")),De=Xe(f,x,G,D);return(ae=>{switch(ae){case"credit":return $;case"debit":return _;case"debit_and_credit":return $&&_;default:return!1}})(ee)?(fe||se)&&N==="Completed"?c.jsxs(c.Fragment,{children:[c.jsx(Ut,{analytics:J,onLoad:()=>{if(J.trackPageLoaded(br.Event.cardsPromoPage),!!f&&!D||!!x&&!G||!!f&&!!x&&!G&&!D){const ae=Vi({isDebitCardSetupEnabled:G,isChargeCardSetupEnabled:D,isCreditCardProductVisibleForExpressInterest:f,isDebitCardProductVisible:x});J.trackCardsPromoView(B,De,"Page",ae,"Promo Page")}}}),c.jsx(nt,{showConfetti:A}),c.jsx(Ie,{isAppContentDrawerOpen:S,handleDrawerToggle:I}),c.jsx(Mi,{signedInUser:O,location:p,showEnableCardButton:H,isCompanyBusinessVerificationAndPaymentSetUpDone:H,isChargeCardSetupEnabled:D,isDebitCardSetupEnabled:G,companyLegalName:m.companyName,adminList:Te.users,isCheckingEnabled:L,navigate:e,companyId:h,cardPromoType:ee,controllerEmails:B,productInformation:De,isCreditCardProductVisible:d,isDebitCardFeatureEnabled:u,isEarlyPayEnabled:C,cashbackRate:R,chargeCardsCreditAccountLimit:k,onClickMenuIcon:()=>{I(!0)}})]}):c.jsxs(c.Fragment,{children:[c.jsx(Ie,{isAppContentDrawerOpen:S,handleDrawerToggle:I}),c.jsx(yo,{})]}):c.jsx(oa,{to:"../",replace:!0})},Vi=({isDebitCardSetupEnabled:e,isChargeCardSetupEnabled:n,isCreditCardProductVisibleForExpressInterest:t,isDebitCardProductVisible:a})=>t&&a&&!e&&!n?"Credit & Debit Card":t&&!n?"Credit Card":a&&!e?"Debit Card":"";function Cd(){const e=he(),n=i(Y=>ge(Y)),{useFeatureGate:t}=ue(),{isFeatureEnabled:a}=t(Z.isChargeCardFeatureEnabled),{isFeatureEnabled:s}=t(Z.isDebitCardFeatureEnabled),{isFeatureEnabled:b}=t(Z.isEarlyPayFeatureEnabled),{isFeatureEnabled:g}=t(Z.isChargeCardPaymentHistoryFeatureEnabled),{isFeatureEnabled:S}=t(Z.isCardPolicyEnabled),P=Re(s,n),u=Oe({isDebitCardFeatureEnabled:s,isBankingOnlyTenant:P}),C=ko(n,a,s),F=!!n.company?.companyChargeCardInfo.isChargeCardTOSAccepted,v=!!n.company?.companyDebitCardInfo.isDebitCardTOSAccepted,m=!!n.company?.companyChargeCardInfo?.isChargeCardEnabled,M=!!n.company?.companyDebitCardInfo?.isDebitCardEnabled,B=!!n.companyChargeCardInfo?.info?.isChargeCardEnabled,R=!!n.companyDebitCardInfo?.info?.isDebitCardEnabled,p=Le(),h=Fe(p?.loggedInUserRoleMap),T=xt(p?.loggedInUserRoleMap),{isFeatureEnabled:l}=t(Z.isCashbackFeatureEnabled),w=n.userRole.includes("charge_card_user"),E=!w,U=!w&&B,y=n?.userRole!=null&&Gc(n?.userRole),k=(n?.company==null||n.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!y)&&$c(p?.loggedInUserRoleMap),x=zc(p?.loggedInUserRoleMap),d=(n?.company==null||n.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!y)&&Kc(p?.loggedInUserRoleMap),{isFeatureEnabled:f}=t(Z.isDepositAccountsFeatureEnabled),j=f&&!y&&Gn(p?.loggedInUserRoleMap),H=B&&m&&!y,O=R&&M&&!y,L=C&&!y&&Fe(p?.loggedInUserRoleMap),z=Zc(p?.loggedInUserRoleMap),$=xe(n),_=Be(n),D=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,G=Ue({isCardsOnlyTenant:$,isChargeCardFeatureEnabled:a,isBookKeepingTenant:_,isDebitCardProductVisible:u,chargeCardsCreditAccountLimit:D}),Q=n.companyChargeCardInfo?.info!=null&&Ia({cardInfo:n.companyChargeCardInfo.info,isProductVisible:G&&m,isTOSAccepted:F,isSetupEnabled:B,isUserHasCardsAdminLevelAccess:h,isUserHasCardsAccess:T}),I=n.companyDebitCardInfo?.info!=null&&Ia({cardInfo:n.companyDebitCardInfo.info,isProductVisible:u&&M,isTOSAccepted:v,isSetupEnabled:R,isUserHasCardsAdminLevelAccess:h,isUserHasCardsAccess:T}),N=Q||I;return c.jsxs(ts,{children:[h?c.jsx(ce,{path:"setup",element:c.jsx(gn,{isBillPayAdminLevelAccess:k,isReimbursementAdminLevelAccess:d,isZeniAccountAdminLevelAccess:j,isChargeCardAdminLevelAccess:L,isUserHasOnlyCardAccess:z,isUserHasOnlyBillPayAccess:x,productType:"charge_cards",type:"setup"})}):null,h?c.jsx(ce,{path:"verification",element:c.jsx(gn,{isBillPayAdminLevelAccess:k,isUserHasOnlyBillPayAccess:x,isReimbursementAdminLevelAccess:d,isZeniAccountAdminLevelAccess:j,isChargeCardAdminLevelAccess:L,isUserHasOnlyCardAccess:z,productType:"charge_cards",type:"verification"})}):null,h&&S?c.jsxs(c.Fragment,{children:[c.jsx(ce,{path:"policy",element:c.jsx(Vo,{})}),c.jsx(ce,{path:"policy/new",element:c.jsx(xo,{})}),c.jsx(ce,{path:"policy/:templateId/edit",element:c.jsx(Oo,{})})]}):null,c.jsx(ce,{path:"promo",element:c.jsx(Ni,{})}),H||O?c.jsxs(c.Fragment,{children:[c.jsx(ce,{path:"/",element:c.jsx(yn,{isPaymentDrawerOpen:!1})}),L&&b?c.jsx(ce,{path:"payment",element:c.jsx(yn,{isPaymentDrawerOpen:!0})}):null,c.jsx(ce,{path:"activate",element:c.jsx(ji,{})}),c.jsx(ce,{path:"onboard",element:c.jsx(ki,{})}),h?c.jsx(ce,{path:"new",element:c.jsx(Ri,{})}):null,l&&E?c.jsx(ce,{path:"cashback",element:c.jsx(Ko,{})}):null,U?c.jsx(ce,{path:"statements",element:c.jsx(bi,{})}):null,L&&g&&B?c.jsx(ce,{path:"payment-history",element:c.jsx(Si,{})}):null,c.jsx(ce,{path:":cardId/activate",element:c.jsx(Wo,{})}),c.jsx(ce,{path:":cardId/setPin",element:c.jsx(_i,{})}),c.jsx(ce,{path:":cardId/addToWallet",element:c.jsx(Ho,{})}),c.jsx(ce,{path:":cardId/*",element:c.jsx(si,{})}),c.jsx(ce,{path:"*",element:c.jsx(ct,{})})]}):(F||v)&&h?c.jsx(ce,{path:"*",element:c.jsx(oa,{to:"../setup"})}):N?c.jsx(ce,{path:"*",element:c.jsx(oa,{to:"../promo",state:e.state})}):c.jsx(ce,{path:"*",element:null})]})}export{Cd as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-B2nLBm11.js";import{a as g}from"./sentry-CLlo3TXi.js";import{h as w,u as T,g as k,i as x,j as O,n as E}from"./core-BDPZcSG4.js";import{z as N,bd as P,v as F,d as V,f as j,af as C,be as A,at as L,au as U,r as B}from"./index-SF2RyzN1.js";import{eX as D,gj as M,tC as _,ge as G,c6 as R,Pk as z,bn as Y,rC as q,rq as H,l5 as Q,mG as S,Pl as X,bE as Z,cy as b,mQ as $,mT as J}from"./zeni-epic-state-pQFlpfOQ.js";import"./mui-HaM5aBuG.js";import{d as K}from"./routePaths-SnMLdv1K.js";import{M as W}from"./MobileAppDrawer-S5tfidhL.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="f4096088-e97b-4c2f-95a5-8c019376f510",t._sentryDebugIdIdentifier="sentry-dbid-f4096088-e97b-4c2f-95a5-8c019376f510")}catch{}})();const ee=E(function(t){const a=G(t),i=N.getSignedInUser(),l=D(t),c=l.tenantId,p={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=R(l?.userRole??[])&&a.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=z(t.companyConfigState),n=t.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:a.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:a,allIndustries:e.companyIndustries??[],allNationalityCountries:n,isDisabled:f,authParams:p,filesEndPoint:`${L.fileMicroServiceBaseUrl}`,isZeniUser:Y(i)}},function(t,a){const{companyId:i,currentTenant:l,navigate:c,location:p}=a,{tenantEmailDomain:f}=l;return{onScheduleClick:e=>{let n=e.href;n.includes("http")||(n="https://".concat(n)),window.open(n,"_blank")},onSaveAll:()=>{t(J())},onAddressClick:e=>{const n=K(f,e),o=B(p.state?.pathnameStackToGoBack,p.pathname);c(n,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{t($({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:n,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:u}=n,{meetingLink:y}=d,{incDate:s}=o,{taxesFiledYears:h}=r,v={companyInfo:{...n,website:u!=""&&u!=null?b(u):void 0,meetingLink:y!=""&&y!=null?b(y):void 0,industry:n.industry.selectedOption,companyIndustryType:n.companyIndustryType?.selectedOption??void 0,companySubIndustry:n.companySubIndustry?.selectedOption??void 0,businessModel:n.businessModel.selectedOption??"",companySourceOfFunds:n.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:n.companySourceOfFundsDescription??void 0,countriesOfOperations:n.countriesOfOperations?.selectedOptions?.map(I=>I.length===2?I:U(I))??[],transactionVolume:n.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:n.transactionVolumeDescription??void 0,regulatedStatus:n.regulatedStatus??void 0,regulatedStatusDescription:n.regulatedStatusDescription??void 0,usNexus:n.usNexus??void 0,usNexusTypes:n.usNexusTypes?.selectedOptions??[],purposeOfAccount:n.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:n.purposeOfAccountDescription??void 0},incInfo:{typeOfInc:o.typeOfInc.selectedOption??"",stateOfInc:o.stateOfInc.selectedOption??"",incDate:s!=null?Z(s?.toString()):s,fileId:o.fileIds[0]},taxDetails:{taxIdOrEIN:r.taxIdOrEIN,sicCode:r.sicCode,naicsCode:r.naicsCode,dunsNumber:r.dunsNumber,taxesFiledYears:h.selectedOptions.map(I=>parseInt(I)),fileId:r.fileIds[0]}};t(S({companyDetails:v}))},onPrimaryContactDetailsUpdated:e=>{t(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{t(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:void 0}]}))},onNewCompanyOfficerRemoved:e=>{t(X(e))},onCompanyOfficerUpdated:e=>{t(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:e.userId}]}))},updateFilesEntity:e=>{t(Q({files:e}))},onDeleteFile:e=>{t(H(e))},onEditFileName:(e,n)=>{t(q(e,n.split(".")[0]))}}})(A);function de(){const t=w(),a=T(),i=k(),{tenantEmailDomain:l}=x(),[c,p]=g.useState(!1),[f,e]=g.useState(!1),n=O(s=>s.companyViewState.passportView.fetchState),o=O(s=>s.companyConfigState.fetchState),r=O(s=>D(s)),d=r.companyId??N.getSignedInUserTenant(l)?.companyId;if(N.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect(()=>{c||n!=="Not-Started"||d==null||(p(!0),a(M(d)))},[c,n,d,a]),g.useEffect(()=>{o==="Not-Started"&&a(_())},[o,a]);const u=s=>{e(s)},y=n==="Not-Started"||n==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&n==="Error"?m.jsx(P,{onGoHome:()=>t("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(F,{analytics:V,onLoad:s=>s.trackPageLoaded(j.Event.companyPassport,C(i)?"Settings":"Company Passport")}),C(i)?m.jsx(W,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:t,location:i,isLoading:y,currentTenant:r,isSettings:C(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-B2nLBm11.js";import{z as n}from"./index-SF2RyzN1.js";import{g as d}from"./QBOConnectionScreen-DPgG6QT_.js";import"./sentry-CLlo3TXi.js";import{g as p,N as s}from"./core-BDPZcSG4.js";import"./zeni-epic-state-pQFlpfOQ.js";import"./recharts-srrgu-jp.js";import"./mui-HaM5aBuG.js";import"./analytics-7PXXxPIN.js";import"./plaid-DuKDxXr2.js";import"./dnd-fU8QmJ8U.js";import"./stripe-DMRn4zHo.js";import"./lottie--jYlW6ya.js";import"./lexical-_D-pPLdL.js";import"./pdf-CbrAe2yy.js";import"./utils-BPOASmy-.js";import"./empty-CM59KsLF.js";import"./pdf-lib-CHfVanCJ.js";import"./index-CAEfbAkM.js";import"./url-DqIeqdCZ.js";import"./index-DNm9oOTV.js";import"./decodeURIComponentSafe-BR3AOxh5.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="817363c8-7f1d-4590-b58b-cef70b99ca15",t._sentryDebugIdIdentifier="sentry-dbid-817363c8-7f1d-4590-b58b-cef70b99ca15")}catch{}})();const U=()=>{const t=p(),{code:o,realmId:r,state:e}=d(t.search),m=n.getSignedInUser()?.userId??"";if(f(o,r,e,m)===!0){const a=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return i.jsx(s,{to:a})}return i.jsx(s,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-B2nLBm11.js";import{h as w,g as C,j as f,n as A,i as B}from"./core-BDPZcSG4.js";import{Q1 as k,Q8 as _,gh as q,gg as K,gf as W,ju as X,N8 as J,rt as L,eX as V,Pz as D,js as T,Q2 as S,Qb as j,jq as F,jN as G}from"./zeni-epic-state-pQFlpfOQ.js";import{bA as M,K as N,V as R,z as U,y as Q,q as p,Q as v,B as z,bB as Y,o as O,bC as ee,r as te}from"./index-SF2RyzN1.js";import{n as Z}from"./mui-HaM5aBuG.js";import"./sentry-CLlo3TXi.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="67234566-c37a-482a-ab0c-3aab706a4d17",e._sentryDebugIdIdentifier="sentry-dbid-67234566-c37a-482a-ab0c-3aab706a4d17")}catch{}})();const ae=A(null,function(e,t){return{onSaveVendor:a=>{e(X(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(J("common")),a!=null&&e(L(a))},onGetOtp:a=>{e(W(a,"BillPayVendor"))},onResendOtp:a=>{e(K(a,"BillPayVendor"))},onVerifyOtp:(a,n)=>{e(q(a,n,"BillPayVendor"))},onVerifyOtpSuccess:(a,n,o)=>{e(_(a,n,o))}}})(M);function H({vendorId:e,billId:t,isExpressPayPage:a}){const n=w(),o=C(),s=f(c=>k(c,e));return l.jsx(ae,{location:o,navigate:n,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:a??!1})}const ne=Z.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,oe=A(function(e,t){const{vendorId:a,billId:n}=t,o=k(e,a),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,n);return{billId:n,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}},function(e,t){const{navigate:a,location:n,vendorId:o}=t;return{onFetchBankName:s=>{e(G(s))},onSaveHandler:s=>{e(F(t.bankAccountContext,s,"standard",o))},onCancel:()=>{(()=>{const s=p(n.state?.pathnameStackToGoBack),c=s.poppedPathname??E();a(c,{state:{pathnameStackToGoBack:s.newStack}})})(),e(S())},onACHDetailsUpdated:s=>{const{bankAccountSection:c}=s;e(j({data:c}))},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")a("../",{relative:"path"});else{const s=p(t.location.state?.pathnameStackToGoBack),c=s.poppedPathname??E(0);t.navigate(c,{state:{pathnameStackToGoBack:s.newStack}})}e(S())}}})(Y);function me({vendorIdParam:e,accountContext:t}){const a=w(),n=C(),o=N(),{vendorId:s,billId:c}=B(),d=e??s,{useFeatureGate:r}=R(),i=U.getSignedInUser(),b=f(u=>V(u)),g=Q(),x=p(n.state?.pathnameStackToGoBack),m=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),h=f(u=>k(u,d)),{isFeatureEnabled:I}=r(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=r(v.isDepositAccountsFeatureEnabled);if(i==null)throw Error("Can't access address page without signing in...");return m==="billDetail"&&h.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(z,{fetchState:h.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:g.colors.grey5}}):l.jsxs(ne,{windowSize:o,children:[l.jsx(H,{vendorId:d,billId:c}),l.jsx(oe,{location:n,navigate:a,billId:c,vendorId:d,currentTenant:b,bankAccountContext:m,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const E=(e=2)=>{let t="../";for(let a=0;a<e;a++)t=`${t}../`;return t},he=(e,t,a)=>{let n=`/${e}/bill/${encodeURIComponent(t)}`;return a=="draft"&&(n+="/edit"),n},fe=e=>`/${e}/bills`,ke=(e,t)=>{let a=`/${e}/bill`;return a=t!=null?a.concat(`/${t}/edit`):a.concat("/new"),a},P=(e,t,a,n)=>{let o=`/${e}/bill`;return o+=a!=null?`/${a}/edit/vendor`:"/new/vendor",o+=n!=null?`/${n}/edit/${t}`:`/create/${t}`,o};function Se(e,t,a){return P(e,"ach",t,a)}function ve(e,t,a){return P(e,"domestic",t,a)}function ge(e,t,a){return P(e,"international",t,a)}const se=(e,t,a)=>{let n=`/${e}/bill/`;return n=a!=null?n.concat(`${encodeURIComponent(a)}/${t}/`):n.concat(`new/${t}/`),n},re=Z.div`
|
|
10
|
-
display: flex;
|
|
11
|
-
height: 100vh;
|
|
12
|
-
width: 100%;
|
|
13
|
-
flex: 1 1 auto;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
align-items: center;
|
|
16
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
17
|
-
box-shadow: ${e=>`0px 2px ${O.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
18
|
-
`,ce=A(function(e,t){const{vendorId:a,billId:n}=t,o=k(e,a),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,n);return{billId:n,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}},function(e,t){const{billId:a,navigate:n,location:o,vendorId:s,currentTenant:c}=t,{tenantEmailDomain:d}=c;return{onFetchBankName:r=>{e(G(r))},onSaveHandler:r=>{e(F(t.bankAccountContext,r,"us-domestic",s))},onWireDetailsUpdated:r=>{const{bankAccountSection:i}=r;e(j({data:i}))},onCancel:()=>{(()=>{const r=p(o.state?.pathnameStackToGoBack),i=r.poppedPathname??$();n(i,{state:{pathnameStackToGoBack:r.newStack}})})(),e(S())},onAddressClick:r=>{if(t.bankAccountContext==="express-pay")n("./add-address");else{const i=se(d,r,a),b=te(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:b}})}},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")n("../",{relative:"path"});else{const r=p(t.location.state?.pathnameStackToGoBack),i=r.poppedPathname??$(0);t.navigate(i,{state:{pathnameStackToGoBack:r.newStack}})}e(S())}}})(ee);function xe({vendorIdParam:e,accountContext:t}){const a=w(),n=C(),o=N(),{vendorId:s,billId:c}=B(),d=e??s,r=U.getSignedInUser(),{useFeatureGate:i}=R(),b=Q(),g=f(u=>V(u)),x=p(n.state?.pathnameStackToGoBack),m=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),h=f(u=>k(u,d)),{isFeatureEnabled:I}=i(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=i(v.isDepositAccountsFeatureEnabled);if(r==null)throw Error("Can't access address page without signing in...");return m==="billDetail"&&h.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(z,{fetchState:h.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:b.colors.grey5,boxShadow:`0px 2px ${O.sp1} ${b.colors.dropShadowNormal}`}}):l.jsxs(re,{windowSize:o,children:[l.jsx(H,{vendorId:d,billId:c}),l.jsx(ce,{location:n,navigate:a,billId:c,vendorId:d,currentTenant:g,bankAccountContext:m,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const $=(e=2)=>{let t="../";for(let a=0;a<e;a++)t=`${t}../`;return t};export{me as A,xe as D,H as V,he as a,se as b,ke as c,ve as d,fe as g,ge as i,Se as v};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-B2nLBm11.js";import{K as f,x as l,y as c}from"./index-SF2RyzN1.js";import{D as p}from"./mui-HaM5aBuG.js";import"./sentry-CLlo3TXi.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="d69b8099-1d92-4ff3-9134-f1838d609de4",e._sentryDebugIdIdentifier="sentry-dbid-d69b8099-1d92-4ff3-9134-f1838d609de4")}catch{}})();const u={drawerLeftMargin:new l(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:d}=e,n=f(),s=o?.valuePx(n)??u.drawerLeftMargin.valuePx(n),a=c();return i.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.8,cursor:"pointer"}}},onClose:d,children:t})}export{h as D};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-B2nLBm11.js";import{a as d}from"./sentry-CLlo3TXi.js";import{h as A,u as B,g as q,i as G,j as l,N as O,n as F,o as K,p as W}from"./core-BDPZcSG4.js";import{Og as _,eX as M,NE as R,lx as Y,K9 as I,Ol as $,N7 as z,kx as J,Ka as S,NJ as V,NK as X,N9 as H,N8 as L}from"./zeni-epic-state-pQFlpfOQ.js";import{aW as Q,d as U,q as Z,r as tt}from"./index-SF2RyzN1.js";import"./mui-HaM5aBuG.js";import{d as k}from"./decodeURIComponentSafe-BR3AOxh5.js";import{w as et}from"./withTransactionSidePanel-B0Y0F8qd.js";import{f as at,c as nt}from"./routePaths-SnMLdv1K.js";import"./recharts-srrgu-jp.js";import"./analytics-7PXXxPIN.js";import"./plaid-DuKDxXr2.js";import"./dnd-fU8QmJ8U.js";import"./stripe-DMRn4zHo.js";import"./lottie--jYlW6ya.js";import"./lexical-_D-pPLdL.js";import"./pdf-CbrAe2yy.js";import"./utils-BPOASmy-.js";import"./useAskAiCfoHostNavButtonProps-85qHNrGS.js";import"./TransactionDetailScreen-DEx0Vfhg.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="3551fbad-e301-4d63-894b-0497581086ae",a._sentryDebugIdIdentifier="sentry-dbid-3551fbad-e301-4d63-894b-0497581086ae")}catch{}})();const ot=F(function(a,t){const e=t.entity,o=$(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:z(a,"common")},trendWithTransactionsReport:o,analytics:U,isAccountingClassesEnabled:J(a)}},function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,c=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:c}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(H({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(L("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(V()),a(X()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??b();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(I(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}})(Q),it=et(function({entityType:a,...t}){const e=A(),o=B(),c=q(),[m,T]=d.useState(!1),[h,g]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:x,entityNameEncoded:w}=G(),r=k(x??""),p=k(w??""),u=rt(r,p),N=[r,p].filter(n=>n!=null),i={name:p,id:r,type:a,zeniId:r,qboId:r},D=l(n=>_(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),j=l(n=>M(n).company?.companyInfo.firstMonthOfFY??1),f=l(n=>R(n.trendWithTransactionsState,i,"EntityDetail"));d.useEffect(()=>{m===!1&&u===!0&&(T(!0),o(Y(i)))},[m,u,i]);const E=l(n=>n.trendState.fetchState),P=f?.selectedPeriod?.timePeriod??D,v=function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y}(f?.selectedPeriod?.timePeriod,D);return d.useEffect(()=>{m===!0&&h===!1&&E==="Completed"&&(g(!0),P!=null&&o(I(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))},[m,h,E]),u?s.jsx(ot,{firstMonthOfFY:j,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:v,resetTrendIsFetchedStates:()=>{T(!1),g(!1)},...t}):s.jsx(O,{to:b(N.length)})}),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,b=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function xt({entityType:a}){return s.jsx(K,{children:s.jsx(W,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{xt as EntityDetailRoutes,xt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-B2nLBm11.js";import{a as r}from"./sentry-CLlo3TXi.js";import{a4 as c,a5 as l,a6 as p,q as d}from"./index-SF2RyzN1.js";import"./mui-HaM5aBuG.js";import m from"./NotFoundScreen-CJUArCUU.js";import{h as u,g as b}from"./core-BDPZcSG4.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]="8281e6e9-f891-4867-bff4-cc53ea2eb482",e._sentryDebugIdIdentifier="sentry-dbid-8281e6e9-f891-4867-bff4-cc53ea2eb482")}catch{}})();const _=()=>{const e=u(),a=b(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),f=r.useCallback(()=>{(()=>{const n=d(a.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=c(a.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:f}):s.jsx(m,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{_ as F};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-B2nLBm11.js";import{i as S,n as x,h as C,g as y,u as ee,t as ae,j as E,N as te,o as ne,p}from"./core-BDPZcSG4.js";import{M8 as k,M9 as v,Ma as M,Bc as B,A_ as T,Mb as A,Mc as oe,Md as se,B2 as ie,fA as $,B9 as le,B6 as de}from"./zeni-epic-state-pQFlpfOQ.js";import{K as g,o as d,p as re,d as j,m as G,G as ce,q as me,F as pe,r as _,V as ue,Q as he,N as xe,T as ge,y as fe,s as we,B as be,v as Se,_ as ye,S as ke,w as ve,x as je,A as $e}from"./index-SF2RyzN1.js";import{n as m}from"./mui-HaM5aBuG.js";import f from"./NotFoundScreen-CJUArCUU.js";import{a as I}from"./sentry-CLlo3TXi.js";import"./recharts-srrgu-jp.js";import"./analytics-7PXXxPIN.js";import"./plaid-DuKDxXr2.js";import"./dnd-fU8QmJ8U.js";import"./stripe-DMRn4zHo.js";import"./lottie--jYlW6ya.js";import"./lexical-_D-pPLdL.js";import"./pdf-CbrAe2yy.js";import"./utils-BPOASmy-.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a81535a7-0d58-4add-91c7-6e3a7578ef62",e._sentryDebugIdIdentifier="sentry-dbid-a81535a7-0d58-4add-91c7-6e3a7578ef62")}catch{}})();const Ie=m.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
10
|
-
`,Ce=x(function(e){const t=k(e),n=v(e),{companyName:o}=t;return{companyName:o,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:t}},function(e,t){const{vendorId:n,billId:o}=t;return{onFetchBankName:s=>{e(T(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(B(s,"standard",n,o))},onACHDetailsUpdated:s=>{const{bankAccountSection:l}=s;e(M({data:l}))}}})(re);function F(){const e=g(),{vendorId:t,billId:n}=S();return t==null||n==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(Ie,{windowSize:e,children:a.jsx(Ce,{vendorId:t,billId:n})})})}const Be=m.div`
|
|
11
|
-
display: flex;
|
|
12
|
-
height: 100vh;
|
|
13
|
-
width: 100%;
|
|
14
|
-
flex: 1 1 auto;
|
|
15
|
-
flex-direction: column;
|
|
16
|
-
align-items: center;
|
|
17
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
18
|
-
box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
19
|
-
`,Ae=x(function(e,t){const{isSubPage:n}=t;return{addressToEdit:A(e),googleAPIKey:G.googleMapsAPIKey,isSubPage:n}},function(e,t){const{navigate:n,location:o}=t,s=()=>{const l=me(o.state?.pathnameStackToGoBack),i=l.poppedPathname??Pe();n(i,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const i=ze(l);e(oe({addressToCreate:i})),s()},onCancel:()=>{s()}}})(ce);function De({isSubPage:e}){const t=C(),n=y(),o=g();return a.jsx(a.Fragment,{children:a.jsx(Be,{windowSize:o,children:a.jsx(Ae,{location:n,navigate:t,isSubPage:e===!0,googleAPIKey:G.googleMapsAPIKey})})})}const Pe=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},ze=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng}),Ne=m.div`
|
|
20
|
-
display: flex;
|
|
21
|
-
height: 100%;
|
|
22
|
-
width: 100%;
|
|
23
|
-
flex: 1 1 auto;
|
|
24
|
-
flex-direction: column;
|
|
25
|
-
align-items: center;
|
|
26
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
27
|
-
box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
28
|
-
`,Le=x(function(e){const t=k(e),n=v(e),o=A(e),{companyName:s}=t;return{companyName:s,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}},function(e,t){const{navigate:n,location:o,vendorId:s,billId:l}=t;return{onFetchBankName:i=>{e(T(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(B(i,"us-domestic",s,l))},onWireDetailsUpdated:i=>{const{bankAccountSection:r}=i;e(M({data:r}))},onAddressClick:()=>{const i=o.pathname.replace("us-domestic","address"),r=_(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:r}})}}})(pe);function Ee(){const e=C(),t=y(),n=g(),{vendorId:o,billId:s}=S();return o==null||s==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(Ne,{windowSize:n,children:a.jsx(Le,{location:t,navigate:e,vendorId:o,billId:s})})})}const Fe=m.div`
|
|
29
|
-
display: flex;
|
|
30
|
-
height: 100%;
|
|
31
|
-
width: 100%;
|
|
32
|
-
flex: 1 1 auto;
|
|
33
|
-
flex-direction: column;
|
|
34
|
-
align-items: center;
|
|
35
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
36
|
-
box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
37
|
-
`,Me=x(function(e){const t=k(e),n=v(e),o=A(e),{companyName:s}=t;return{companyName:s,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}},function(e,t){const{navigate:n,location:o,vendorId:s,billId:l}=t;return{onFetchBankNameBySwift:i=>{e(ie(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(B(i,"international",s,l,t.isLocalCurrencyEnabled))},onBankDetailsUpdated:i=>{const{internationalWireSwiftAccountSection:r}=i;e(se({data:r}))},onAddressClick:()=>{const i=o.pathname.replace("international","address"),r=_(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:r}})}}})(xe);function Te(){const e=C(),t=y(),n=g(),{vendorId:o,billId:s}=S(),{useFeatureGate:l}=ue(),{isFeatureEnabled:i}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||s==null?a.jsx(f,{}):a.jsx(Fe,{windowSize:n,children:a.jsx(Me,{location:t,navigate:e,vendorId:o,billId:s,isLocalCurrencyEnabled:i})})}const Ge={containerWidth:new je(100,58)},_e=m(ke)`
|
|
38
|
-
width: ${d.sp4};
|
|
39
|
-
height: ${d.sp4};
|
|
40
|
-
margin-bottom: ${d.sp3};
|
|
41
|
-
margin-top: ${d.sp3};
|
|
42
|
-
margin-left: ${d.sp8};
|
|
43
|
-
cursor: pointer;
|
|
44
|
-
position: absolute;
|
|
45
|
-
color: ${e=>e.theme.colors.brandColorJade};
|
|
46
|
-
`,He=m.div`
|
|
47
|
-
display: flex;
|
|
48
|
-
height: 100vh;
|
|
49
|
-
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
50
|
-
width: 100vw;
|
|
51
|
-
overflow-y: scroll;
|
|
52
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
53
|
-
`,Ke=m.div`
|
|
54
|
-
display: flex;
|
|
55
|
-
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
56
|
-
flex-direction: column;
|
|
57
|
-
width: ${e=>`${Ge.containerWidth.value(e.windowSize)}%`};
|
|
58
|
-
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
59
|
-
box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
60
|
-
padding-top: ${e=>e.windowSize!=="small"?d.sp2:"0px"};
|
|
61
|
-
`,Ve=m.div`
|
|
62
|
-
display: flex;
|
|
63
|
-
flex-direction: column;
|
|
64
|
-
align-items: center;
|
|
65
|
-
justify-content: center;
|
|
66
|
-
padding: ${e=>e.windowSize==="small"?d.sp3:`62px ${d.sp6} ${d.sp9} ${d.sp8}`};
|
|
67
|
-
height: ${e=>e.windowSize==="small"?"490px":"auto"};
|
|
68
|
-
overflow: ${e=>e.windowSize==="small"?"unset":"hidden"};
|
|
69
|
-
width: ${e=>e.windowSize=="small"?"auto":"42%"};
|
|
70
|
-
background-color: ${e=>e.windowSize==="small"?e.theme.colors.grey4:e.theme.colors.background};
|
|
71
|
-
margin-top: ${e=>e.windowSize==="small"?e.isAddressPage?"0px":"186px":"unset"};
|
|
72
|
-
`,We=x(function(e,t){return{file:t.file,type:t.type}})(ve);function h({appContent:e}){const t=ee(),n=y(),{tenantEmailDomain:o,vendorId:s,billId:l}=S(),[i]=ae(),r=i.get("token"),H=n.pathname.includes("address"),w=g(),K=ge(),D=fe(),b=we(),V=()=>{K.toggle()},W=E(u=>k(u)),U=E(u=>v(u)),{authParams:O,fetchState:c,billAttachment:Q,billFetchState:P,companyName:q,currencySymbol:J,amount:R}=W,{tenantId:z,userId:N,sessionId:L}=O,{fetchState:X,internationalBankAccountCreateStatus:Y}=U;return I.useEffect(()=>{$()},[]),I.useEffect(()=>{b&&c==="Not-Started"&&s!=null&&o!=null&&r!=null&&t(le(s,o,r))},[b,c,s,o,r,t]),I.useEffect(()=>{b&&c==="Completed"&&($(N,L,z),l!=null&&t(de(l)))},[c,b,N,L,z,l,t]),c==="Error"?a.jsx(f,{}):X==="Completed"||Y.fetchState==="Completed"?($(),a.jsx(te,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?a.jsx(be,{fetchState:c,style:{height:"100vh",backgroundColor:D.colors.grey5,boxShadow:`0px 2px ${d.sp1} ${D.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[c==="Completed"&&P==="Completed"&&a.jsx(Se,{analytics:j,onLoad:u=>(Z=>Z.trackBillPayMagicLinkPageLoad(o??"",s??"",q,l??"",Ue(n.pathname),J,R))(u)}),a.jsxs(He,{windowSize:w,children:[w!=="small"?a.jsx(_e,{onClick:V}):null,a.jsx(Ve,{windowSize:w,isAddressPage:H,children:P==="In-Progress"?a.jsx(ye,{size:"ExtraLarge",start:!0}):a.jsx(We,{file:Q,type:"bill"})}),a.jsx(Ke,{windowSize:w,children:e})]})]})}const Ue=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function Oe(){return a.jsx($e,{})}function ra(){return a.jsxs(ne,{children:[a.jsx(p,{path:"bank/account/save/success",element:a.jsx(Oe,{})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:a.jsx(h,{appContent:a.jsx(F,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:a.jsx(h,{appContent:a.jsx(F,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:a.jsx(h,{appContent:a.jsx(De,{isSubPage:!0})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:a.jsx(h,{appContent:a.jsx(Ee,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:a.jsx(h,{appContent:a.jsx(Te,{})})}),a.jsx(p,{path:"*",element:a.jsx(f,{})})]})}export{ra as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-B2nLBm11.js";import{a as f}from"./sentry-CLlo3TXi.js";import{u as M,g as _,h as O,t as w,j as l,N as C}from"./core-BDPZcSG4.js";import{z as r,y as V,a as A,e as P,d as N,f as W,C as $,_ as R,h as X}from"./index-SF2RyzN1.js";import{eX as Y,LV as q,M3 as B,LW as G,fA as H,g0 as J,L$ as K,go as Q,cY as Z,M4 as ee,M5 as te}from"./zeni-epic-state-pQFlpfOQ.js";import{n as ne}from"./mui-HaM5aBuG.js";import{u as se}from"./useDeviceId-CQ3pf2OT.js";import{f as ie}from"./analyticsHelper-BZ5OUhwW.js";import{t as ae}from"./getLocaleForTenant-z5owYbgm.js";import"./recharts-srrgu-jp.js";import"./analytics-7PXXxPIN.js";import"./plaid-DuKDxXr2.js";import"./dnd-fU8QmJ8U.js";import"./stripe-DMRn4zHo.js";import"./lottie--jYlW6ya.js";import"./lexical-_D-pPLdL.js";import"./pdf-CbrAe2yy.js";import"./utils-BPOASmy-.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="b56c5e79-3d2f-4238-b650-1f636d031cdf",t._sentryDebugIdIdentifier="sentry-dbid-b56c5e79-3d2f-4238-b650-1f636d031cdf")}catch{}})();const T=(t,i)=>t!=null&&t.length>0&&i==="magic_links";function Te(){const t=M(),i=_(),m=O(),[y]=w(),n=y.get("token"),p=y.get("stytch_token_type"),g=r.getMagicLinkCodeVerifier(),a=se(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:z,resendVerifyDeviceOTPFetchState:D}=l(e=>e.tenantState),S=l(e=>e.tenantState.fetchState),k=l(e=>e.tenantState.activeTenantFetchState.fetchState),h=l(e=>e.tenantState.signInState),I=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>Y(e)),b=l(e=>q(e)),E=r.getSignedInUser(),v=V().mode;f.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&T(n,p)&&a!=null&&g!=null&&(r.saveMagicLinkTriggered(n),t(B(n,a,g)))},[n,p,t,a,g,s?.zeniSessionId]),f.useEffect(()=>{h!=="In-Progress"||S!=="Completed"&&k!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(G(b.tenantsInOrder),s.zeniSessionId),H(s.userId,s.zeniSessionId,o.tenantId),t(J(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(K("Completed")),A.updateAppLocaleID(ae(o)),ie(s,o,v,void 0,b.tenantsInOrder),Q().then(()=>{const e=X();e!=null&&P(e)}),setTimeout(()=>{N.trackLogin(W.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[h,S,k,s,o,b,v,i.state,t]);const U=f.useCallback(()=>{m("/signin/auth")},[m]),j=f.useCallback(()=>{a!=null&&d!=null&&c!=null&&t(ee(a,c,d))},[a,d,t,c]),F=f.useCallback(e=>{a!=null&&n!=null&&c!=null&&d!=null&&t(te(e,a,c,d))},[a,n,t,c,d]);if(I==="Completed"&&d!=null)return u.jsx($,{phoneNumber:x,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:D,onResendOtp:j,onVerifyOtp:F,onCancelVerifyDevice:U});if(h==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=i.state?.origin??"/";return u.jsx(C,{to:e,state:{...i.state,origin:""}})}if(!T(n,p)||g==null||I==="Error"){const e=i.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(C,{to:e,state:{...i.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||I==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(R,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
|
|
2
|
-
position: fixed;
|
|
3
|
-
top: 0;
|
|
4
|
-
left: 0;
|
|
5
|
-
right: 0;
|
|
6
|
-
bottom: 0;
|
|
7
|
-
display: flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
justify-content: center;
|
|
10
|
-
z-index: 9999;
|
|
11
|
-
background-color: ${t=>t.theme.colors.background};
|
|
12
|
-
`;export{Te as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-B2nLBm11.js";import{h as r,n}from"./core-BDPZcSG4.js";import{M as i}from"./index-SF2RyzN1.js";import"./mui-HaM5aBuG.js";import"./sentry-CLlo3TXi.js";import"./zeni-epic-state-pQFlpfOQ.js";import"./recharts-srrgu-jp.js";import"./analytics-7PXXxPIN.js";import"./plaid-DuKDxXr2.js";import"./dnd-fU8QmJ8U.js";import"./stripe-DMRn4zHo.js";import"./lottie--jYlW6ya.js";import"./lexical-_D-pPLdL.js";import"./pdf-CbrAe2yy.js";import"./utils-BPOASmy-.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="59e35ec1-38d4-48f4-8af2-c43da8d96945",o._sentryDebugIdIdentifier="sentry-dbid-59e35ec1-38d4-48f4-8af2-c43da8d96945")}catch{}})();const a=n(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(i);function _(){const o=r();return e.jsx(a,{navigate:o})}export{_ as default};
|