@zeniai/web-app-ui 5.3.53-qa → 5.3.54-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AccountMappingScreen-B05quPfB.js → AccountMappingScreen-BJ_GCmL6.js} +2 -2
- package/dist/assets/{ActualMatchingMatchDetailScreen-D94Dqvel.js → ActualMatchingMatchDetailScreen-D8tZOiP1.js} +1 -1
- package/dist/assets/AddressRoutes-CPqal9vX.js +1 -0
- package/dist/assets/AddressScreen-BIubmwIP.js +9 -0
- package/dist/assets/{AiCfoScreen-Dj6jKppq.js → AiCfoScreen-D0uGIPWe.js} +1 -1
- package/dist/assets/{AppDrawer-DB1lzCTO.js → AppDrawer-Dyu7Kj7A.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-vJIdZGym.js → BillPayApprovalRoutes-Cu6HjrcE.js} +1 -1
- package/dist/assets/BillPayRoutes-DZcxw7F9.js +119 -0
- package/dist/assets/{BusinessVerificationPageScreen-Bh9Wow-A.js → BusinessVerificationPageScreen-KgJ3Z7Lz.js} +2 -2
- package/dist/assets/{CardsAiCfoScreen-Hsh2FpvU.js → CardsAiCfoScreen-D4XYcc0x.js} +2 -2
- package/dist/assets/{ChargeCardRoutes-0m2CNq4x.js → ChargeCardRoutes-DgTbdUe2.js} +8 -8
- package/dist/assets/{CompanyPassportScreen-Cvbu6LUT.js → CompanyPassportScreen-Dgt-2F5D.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-CRvnQSlr.js → ConnectionAuthScreen-lP9BaYPL.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-86giaeRs.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-kZOJ1QhA.js → CustomerOnboardingRoutes-SntDIwld.js} +1 -1
- package/dist/assets/DashboardRoutes-ChSsFVnC.js +20 -0
- package/dist/assets/{DefaultTenantHome-CTOQPic5.js → DefaultTenantHome-B_-3-BWP.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-DgaHcUL_.js → DomesticWireDetailScreen-uEOhWiZJ.js} +3 -3
- package/dist/assets/{DrawerScreen-BeSv1Aix.js → DrawerScreen-D2fUiyyG.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-D5eIJPR7.js → EntityDetailRoutes-CDL9F5R0.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-DHppK74x.js → ExpenseAutomationRoutes-p6anUTiX.js} +1 -1
- package/dist/assets/FeaturePreviewScreen-ClEO1jVO.js +1 -0
- package/dist/assets/{HubSpotOAuthCallbackScreen-CThBYwg5.js → HubSpotOAuthCallbackScreen-Be8h7JlS.js} +1 -1
- package/dist/assets/{InboxNotificationsProvider-D6QvVVj8.js → InboxNotificationsProvider-B8qyHdbE.js} +1 -1
- package/dist/assets/{InvoicingRoutes-DvFmEcE9.js → InvoicingRoutes-CUoOqcWW.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-B1yYt0y7.js → MagicLinkRoutes-AdtcTQV8.js} +8 -8
- package/dist/assets/MagicLinkSignInScreen-BineRgOo.js +12 -0
- package/dist/assets/{MobileAppDrawer-D3MVdjfj.js → MobileAppDrawer-CrvGsfgI.js} +1 -1
- package/dist/assets/NotFoundScreen-DJ-T97HU.js +1 -0
- package/dist/assets/{NotificationRoutes-3MhigWw8.js → NotificationRoutes-3wgt8Kbi.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-Br6J-Kjw.js → OAuthConsentScreen-DgdT7x6v.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-BT242PEu.js → PandLWithForecastRoutes-ws3OHddo.js} +1 -1
- package/dist/assets/{PaymentLinkScreen-D304LK9q.js → PaymentLinkScreen-tKLL3f9h.js} +1 -1
- package/dist/assets/{PeopleRoutes-Cs1oFIJn.js → PeopleRoutes-Dfq2m-jU.js} +3 -3
- package/dist/assets/PerformanceRoutes-D1dXkym3.js +1 -0
- package/dist/assets/{Preview-CDuSXomS.js → Preview-BBxDhQ0O.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-CXR9MUeu.js → QBOConnectionScreen-C7ZuCwNV.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-CADwX7m0.js → ReimbursementApprovalRoutes-BEPpa8LQ.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-C__AcyMO.js → ReimbursementApprovalRuleDetailScreen-C78enppv.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-DE9--ARn.js → ReimbursementRoutes-Ch8YptRc.js} +4 -4
- package/dist/assets/{ReportsRoutes-B_EvlWob.js → ReportsRoutes-CqMWss5n.js} +1 -1
- package/dist/assets/RewardsRoutes-Dv8b4Fg6.js +1 -0
- package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-270QQSkr.js → ScheduleDetailsPrepaidExpensesScreen-YOxc6f2g.js} +4 -4
- package/dist/assets/ScreenRoutes-DfCL2gIc.js +2 -0
- package/dist/assets/{SettingsRoutes-DjTGDDEp.js → SettingsRoutes-DnuHZUVl.js} +6 -6
- package/dist/assets/{SetupPagesScreen-mQ33CI-8.js → SetupPagesScreen-BXd3fJXi.js} +1 -1
- package/dist/assets/SignInScreen-Cktnr6wX.js +1 -0
- package/dist/assets/SignOutScreen-BwPpNX5k.js +9 -0
- package/dist/assets/{TaskListScreen-_mHmu42Q.js → TaskListScreen-Co7yPEl4.js} +2 -2
- package/dist/assets/{TaskRoutes-DRFV_DYt.js → TaskRoutes-b_9EH8N1.js} +2 -2
- package/dist/assets/TransactionDetailRoutes-B9A0XpAo.js +1 -0
- package/dist/assets/{TransactionDetailScreen-Dmc1SB66.js → TransactionDetailScreen-DsKolbVR.js} +1 -1
- package/dist/assets/{TransactionListRoutes-2uPIfsci.js → TransactionListRoutes-CW6X1kEN.js} +1 -1
- package/dist/assets/{TreasuryRoutes-C62UHGaV.js → TreasuryRoutes-DKqLrSIy.js} +1 -1
- package/dist/assets/{VendorsRoutes-Dp-COjet.js → VendorsRoutes-_VHqmNHq.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-DEQwqZwF.js → WiseConfirmationScreen-D4dLeJ3W.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-DjudE9ka.js → ZeniAccountRoutes-luRZFrPJ.js} +1 -1
- package/dist/assets/ZeniAccountStatementScreen-CX_-BJtA.js +9 -0
- package/dist/assets/{accountMappingHelper-DNRaFM1C.js → accountMappingHelper-y0E9h6aC.js} +1 -1
- package/dist/assets/{analytics-Y9Rn1Gu7.js → analytics-BDCkEq_I.js} +1 -1
- package/dist/assets/{analyticsHelper-Czpx502m.js → analyticsHelper-DjqyEcxU.js} +1 -1
- package/dist/assets/{core-Dh_SHcAD.js → core-B2JcUSRu.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-B9wRnGXi.js → decodeURIComponentSafe-CIM8Yd6k.js} +1 -1
- package/dist/assets/{dnd-CwwWYFuT.js → dnd-BAPMa4RJ.js} +1 -1
- package/dist/assets/{empty-BT_7GI6y.js → empty-D7vR8z68.js} +1 -1
- package/dist/assets/{empty-XI8MiQF0.js → empty-M8CZcWYb.js} +1 -1
- package/dist/assets/{emptyVideoElement-JNmKZqZz.js → emptyVideoElement-nUJqd2nB.js} +1 -1
- package/dist/assets/{epic-COW9EFJg.js → epic-IH41xxG2.js} +1 -1
- package/dist/assets/{expenseAutomationHelper-jy143DnO.js → expenseAutomationHelper-Dd7fQN5z.js} +1 -1
- package/dist/assets/{getLocaleForTenant-BTnTjmTv.js → getLocaleForTenant-BXUF9msR.js} +1 -1
- package/dist/assets/{index-8Q8Cb_pA.js → index-BTTj-4b5.js} +1 -1
- package/dist/assets/{index-D_bKIveY.js → index-DKVU_IvY.js} +2 -2
- package/dist/assets/{index-C4rZANm7.js → index-DKZ4YAZy.js} +1 -1
- package/dist/assets/{index-CHaKE3QQ.js → index-DanGKFMl.js} +14545 -14423
- package/dist/assets/{index-DTprL6g9.js → index-P1XHqiT-.js} +1 -1
- package/dist/assets/{index-D3h8toFn.js → index-PCu_2P3b.js} +1 -1
- package/dist/assets/{index-DOYaY83A.js → index-dmkrZYpO.js} +1 -1
- package/dist/assets/{index-B23hmQHl.js → index-gjFAkOOB.js} +1 -1
- package/dist/assets/{lexical-CaftfZ9D.js → lexical-DGZ06Yv6.js} +1 -1
- package/dist/assets/{liveblocks-DR8KfETq.js → liveblocks-DXYs6rwe.js} +1 -1
- package/dist/assets/{lottie-ODKvpFjz.js → lottie-C9Rxpkwh.js} +1 -1
- package/dist/assets/{mui-BYn_Ugho.js → mui-BLmtkCLd.js} +1 -1
- package/dist/assets/{pathToGoBack-BiqpVJeS.js → pathToGoBack-DqGGHSwL.js} +1 -1
- package/dist/assets/{pdf-DnQo5-Qw.js → pdf-DMCYUxGc.js} +3 -3
- package/dist/assets/{pdf-lib-DdZd3IiB.js → pdf-lib-D7-8SdHl.js} +1 -1
- package/dist/assets/{plaid-Dw8l1kdg.js → plaid-DHQC2tsw.js} +1 -1
- package/dist/assets/{pusher-CewboUYG.js → pusher-C76wt9sK.js} +1 -1
- package/dist/assets/{react-gSPYEWZo.js → react-B2hEGyNu.js} +1 -1
- package/dist/assets/{react-CWd2ZkNi.js → react-BX0k_7jA.js} +1 -1
- package/dist/assets/{react-8By583h-.js → react-D7gGxl9M.js} +1 -1
- package/dist/assets/{react-B8IvMjeE.js → react-Dvat3Ckm.js} +1 -1
- package/dist/assets/{react-BgmP_PBP.js → react-DzK6xFD8.js} +1 -1
- package/dist/assets/{react-ygIo2ccY.js → react-Y6cTJufT.js} +1 -1
- package/dist/assets/{recharts-BTL88W4R.js → recharts-UN7cJOXN.js} +1 -1
- package/dist/assets/{routePaths-DXpM4tZj.js → routePaths-CV4JB8t3.js} +1 -1
- package/dist/assets/{sentry-FwaDhTzy.js → sentry-BmkYxd02.js} +1 -1
- package/dist/assets/{stripSplatSuffix-CvpfThkG.js → stripSplatSuffix-DXBpTroJ.js} +1 -1
- package/dist/assets/{url-DHu7Ejzz.js → url-Cjk2PJJX.js} +1 -1
- package/dist/assets/{url-DybJ-sxa.js → url-DgDGkycQ.js} +1 -1
- package/dist/assets/{useActualMatchingMatchDetail-uLKulkDS.js → useActualMatchingMatchDetail-Ba3Lb9B6.js} +1 -1
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-B20EbGXf.js +1 -0
- package/dist/assets/{useAskAiCfoHostNavButtonProps-PLm72Ozi.js → useAskAiCfoHostNavButtonProps-BDyrdULc.js} +1 -1
- package/dist/assets/{useChargeCardPusherEvents-LUqnb4UF.js → useChargeCardPusherEvents--bgooXaj.js} +1 -1
- package/dist/assets/{useDeviceId-CUJxM_KE.js → useDeviceId-IlYBwHEv.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-CKnBwo84.js → useEmailConnectResultRefresh-B5AEi8xu.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-DLA6PIFe.js → useInitialThreadRequest-D-aSm_7m.js} +1 -1
- package/dist/assets/useTaskManagerAccess-DEEmjDWA.js +1 -0
- package/dist/assets/{useTaskManagerPusherEvents-DchZU-tO.js → useTaskManagerPusherEvents-D18AziPj.js} +1 -1
- package/dist/assets/{utils-DEAaFgLU.js → utils-BGWE7tXK.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-DLRTZIl6.js → withTransactionSidePanel-BzroedBl.js} +2 -2
- package/dist/assets/{zeni-epic-state-DJh0-ZeR.js → zeni-epic-state-DpjvBN7b.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +2 -2
- package/dist/assets/AddressRoutes-BBXKWkgP.js +0 -1
- package/dist/assets/AddressScreen-DkOVp1Il.js +0 -9
- package/dist/assets/BillPayRoutes-Ie8KE_Pm.js +0 -119
- package/dist/assets/CustomerOnboardingAuthScreen-SW-uc7QE.js +0 -1
- package/dist/assets/DashboardRoutes-DTB-wwS1.js +0 -20
- package/dist/assets/FeaturePreviewScreen-vWprV4-Z.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-CZM8ZeV4.js +0 -12
- package/dist/assets/NotFoundScreen-BG5HsGgf.js +0 -1
- package/dist/assets/PerformanceRoutes-DevypuzE.js +0 -1
- package/dist/assets/RewardsRoutes-fsFKnuDQ.js +0 -1
- package/dist/assets/ScreenRoutes-B0DNEVGO.js +0 -2
- package/dist/assets/SignInScreen-BVOxylXT.js +0 -1
- package/dist/assets/SignOutScreen-BXBPUD_K.js +0 -9
- package/dist/assets/TransactionDetailRoutes-BqJM9clh.js +0 -1
- package/dist/assets/ZeniAccountStatementScreen-fuK8OSl5.js +0 -9
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-CJfIwtxx.js +0 -1
- package/dist/assets/useTaskManagerAccess-D4PJ1zkK.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as I}from"./liveblocks-
|
|
1
|
+
import{j as I}from"./liveblocks-DXYs6rwe.js";import{a as o}from"./sentry-BmkYxd02.js";import{u as k,h as P,g as H,j as C,N as w}from"./core-B2JcUSRu.js";import{TR as q,fF as z,gl as G,pS as M,gM as A,gk as Q,gi as V,Uf as B,gh as O}from"./zeni-epic-state-DpjvBN7b.js";import{u as J,z as E,L as D,G as K,F as W}from"./index-DanGKFMl.js";import{n as X}from"./mui-BLmtkCLd.js";import{P as h,a as _}from"./AccountMappingScreen-BJ_GCmL6.js";import{t as Y}from"./getLocaleForTenant-BXUF9msR.js";import{g as Z,Q as ee}from"./QBOConnectionScreen-C7ZuCwNV.js";import"./recharts-UN7cJOXN.js";import"./analytics-BDCkEq_I.js";import"./plaid-DHQC2tsw.js";import"./dnd-BAPMa4RJ.js";import"./stripe-cKAAJElX.js";import"./lottie-C9Rxpkwh.js";import"./lexical-DGZ06Yv6.js";import"./pdf-DMCYUxGc.js";import"./utils-BGWE7tXK.js";import"./MobileAppDrawer-CrvGsfgI.js";import"./InboxNotificationsProvider-B8qyHdbE.js";import"./useTaskManagerAccess-DEEmjDWA.js";import"./accountMappingHelper-y0E9h6aC.js";import"./empty-M8CZcWYb.js";import"./pdf-lib-D7-8SdHl.js";import"./index-gjFAkOOB.js";import"./url-Cjk2PJJX.js";import"./index-PCu_2P3b.js";import"./decodeURIComponentSafe-CIM8Yd6k.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]="5418916c-0ecc-48fb-a232-61ba383c7826",t._sentryDebugIdIdentifier="sentry-dbid-5418916c-0ecc-48fb-a232-61ba383c7826")}catch{}})();const te=X.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex: 1 1 auto;
|
|
4
4
|
flex-direction: row;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as i}from"./liveblocks-DXYs6rwe.js";import{z as m}from"./index-DanGKFMl.js";import{g as n}from"./QBOConnectionScreen-C7ZuCwNV.js";import"./sentry-BmkYxd02.js";import{g as p,N as a}from"./core-B2JcUSRu.js";import"./zeni-epic-state-DpjvBN7b.js";import"./recharts-UN7cJOXN.js";import"./mui-BLmtkCLd.js";import"./analytics-BDCkEq_I.js";import"./plaid-DHQC2tsw.js";import"./dnd-BAPMa4RJ.js";import"./stripe-cKAAJElX.js";import"./lottie-C9Rxpkwh.js";import"./lexical-DGZ06Yv6.js";import"./pdf-DMCYUxGc.js";import"./utils-BGWE7tXK.js";import"./empty-M8CZcWYb.js";import"./pdf-lib-D7-8SdHl.js";import"./index-gjFAkOOB.js";import"./url-Cjk2PJJX.js";import"./index-PCu_2P3b.js";import"./decodeURIComponentSafe-CIM8Yd6k.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]="a1205b81-d106-415b-bd92-85aeae53ace3",t._sentryDebugIdIdentifier="sentry-dbid-a1205b81-d106-415b-bd92-85aeae53ace3")}catch{}})();const U=()=>{const t=p(),{code:o,realmId:r,state:e}=n(t.search),s=m.getSignedInUser()?.userId??"";if(f(o,r,e,s)===!0){const d=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return i.jsx(a,{to:d})}return i.jsx(a,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
|
package/dist/assets/{CustomerOnboardingRoutes-kZOJ1QhA.js → CustomerOnboardingRoutes-SntDIwld.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-DXYs6rwe.js";import{t as Tt,A as $e}from"./AddressScreen-BIubmwIP.js";import wt from"./NotFoundScreen-DJ-T97HU.js";import{a as d,t as Me}from"./sentry-BmkYxd02.js";import{h as _e,g as xe,u as se,i as Ee,j as T,N as Q,q as At,l as it,n as Pt,o as H}from"./core-B2JcUSRu.js";import{fF as Y,d_ as Te,dZ as we,bq as Dt,U6 as Bt,bR as jt,pQ as Ft,Bk as Vt,Bn as Ut,Vt as Rt,Vu as Lt,lu as Oe,lx as ct,UJ as Nt,b$ as Gt,c8 as fe,BO as Ae,Bz as $t,Vv as me,BP as dt,Sg as Mt,mH as ut,di as lt,Vw as Qt,Vx as zt,uA as Kt,Uw as Ce,hV as qt,Uv as be,hS as Ht,Gb as Jt,uE as Zt,hK as Wt,hN as Qe,Vy as pt,Vz as Xt,M1 as Yt,VA as en,M5 as tn,Bq as nn,VB as an,VC as on,ls as sn,lv as rn,B$ as cn,BB as mt,BN as dn,bE as ze,cE as un,B_ as Ke,uT as ln,uH as pn,mz as mn,gG as gn,gF as fn,gE as yn,VD as hn,Bt as Cn,C0 as bn,C3 as Sn,C6 as In,Cc as kn,dj as On}from"./zeni-epic-state-DpjvBN7b.js";import{z as K,c as Pe,v as W,H as vn,p as q,a9 as re,j as g,aF as _n,aj as gt,a2 as xn,V as ft,Q as yt,h as X,_ as ge,W as ve,aG as En,F as qe,r as He,af as Tn,aH as Je,aI as wn,aJ as An}from"./index-DanGKFMl.js";import{n as De}from"./mui-BLmtkCLd.js";import{g as Pn,h as Dn,q as ie}from"./QBOConnectionScreen-C7ZuCwNV.js";import{u as Bn,a as jn}from"./useEmailConnectResultRefresh-B5AEi8xu.js";import{u as Fn}from"./useChargeCardPusherEvents--bgooXaj.js";import"./recharts-UN7cJOXN.js";import"./analytics-BDCkEq_I.js";import"./plaid-DHQC2tsw.js";import"./dnd-BAPMa4RJ.js";import"./stripe-cKAAJElX.js";import"./lottie-C9Rxpkwh.js";import"./lexical-DGZ06Yv6.js";import"./pdf-DMCYUxGc.js";import"./utils-BGWE7tXK.js";import"./empty-M8CZcWYb.js";import"./pdf-lib-D7-8SdHl.js";import"./index-gjFAkOOB.js";import"./url-Cjk2PJJX.js";import"./index-PCu_2P3b.js";import"./decodeURIComponentSafe-CIM8Yd6k.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new e.Error().stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="802a76b5-98f5-47ac-8a9e-ca28cfde31be",e._sentryDebugIdIdentifier="sentry-dbid-802a76b5-98f5-47ac-8a9e-ca28cfde31be")}catch{}})();const Ze=e=>{switch(e){case"Complete":return"yes";case"Pending Review":case"Incomplete":return"partially";default:return"no"}},Vn=()=>{const e=_e(),l=xe(),i=se(),[a,p]=d.useState(!1),[u,c]=d.useState(!1),{tenantEmailDomain:v}=Ee(),t=K.getSignedInUser(),{useFeatureGate:n}=Pe(),{isFeatureEnabled:C}=n(W.isApAgingFeatureEnabled),{isFeatureEnabled:o}=n(W.isArAgingFeatureEnabled),{isFeatureEnabled:A}=n(W.isReferralFeatureEnabled),{isFeatureEnabled:w}=n(W.isDebitCardFeatureEnabled),k=vn(),O=T((S=>Y(S))),P=T((S=>S.onboardingCustomerViewState.fetchState)),_=O.excludedResources,F=O.companyId??K.getSignedInUserTenant(v)?.companyId;if(t==null)throw Error("Can't access onboarding flow without signing in...");const m=Te(w,O),b=we(O),D=[],U=_?.resources?.find((S=>S.resource==="/reports/top_expenses"))==null,h=_?.resources?.find((S=>S.resource==="/reports/task_card"))==null,r=O?.userRole!=null&&Dt(O?.userRole),x=_?.resources?.find((S=>S.resource==="/bills"))==null&&!r,E=_?.resources?.find((S=>S.resource==="/reimbursements"))==null;U===!1&&D.push("top_expenses"),h===!1&&D.push("task_card"),x===!1&&D.push("bill_pay_card","bill_pay_promo_card"),E===!1&&D.push("reimbursement_card","reimbursement_promo_card"),D.push("zeni_accounts_promo_card","treasury_promo_card"),A===!1&&D.push("rewards_card");const f=T((S=>{const V=[];C===!1&&V.push("accounts_payable_aging"),o===!1&&V.push("accounts_receivable_aging"),V.push("zeni_accounts_promo_card","treasury_promo_card"),A===!1&&V.push("rewards_card"),k===!1&&V.push("expense_automation_card");const J=Bt(S,V);return jt(J.reportsInOrder.map(($=>({fetchState:$.fetchState,error:$.error})))).fetchState}));d.useEffect((()=>{P!=="Completed"||a||m||b||(p(!0),i(Ft(t.userId,F,O.tenantId,!0,!1,D)))}),[a,P,m,b,t,O.tenantId,i]);const B=d.useRef(!1),N=d.useCallback((()=>{const S={pathnameStackToGoBack:q(l.state?.pathnameStackToGoBack,l.pathname),message:"activation"};e(m?"../../checking":b?"../../cards":"../../dashboard",{state:S})}),[e,l,m,b]),G=d.useCallback((()=>{B.current||(B.current=!0,N())}),[N]);if(d.useEffect((()=>{const S=setTimeout((()=>c(!0)),3e3);return()=>clearTimeout(S)}),[]),d.useEffect((()=>{const S=setTimeout(G,6e3);return()=>clearTimeout(S)}),[G]),d.useEffect((()=>{m||b||!u||f!=="Completed"&&f!=="Error"||G()}),[u,f,m,b,G]),P!=="Completed")return s.jsx(Q,{to:"../"});const L=O.company?.companyOnboardingInfo?.onboardingInfo,ee={timeSinceQuoteSign:L?.onboardingTimeSinceQuoteSigned??"",timeSinceQuoteSignInMinutes:L?.onboardingToQuoteSignMinutes??0,isKybDone:Ze(L?.businessVerified?.status),isKycDone:Ze(L?.identityVerified?.status),paymentType:"",paymentSource:"",qboConnectionSource:L?.accountingConnectionCreationMode??""};return s.jsxs(s.Fragment,{children:[s.jsx(re,{analytics:g,onLoad:S=>S.trackOnboardingDashboardActivation(ee)}),s.jsx(_n,{show:!0,onComplete:G})]})},Se=["reading_books","finance_graph","reconciliation","cfo_foundation"],Ie=["llm_fine_tuning","rag_knowledge_graph","personalized_context"],We=(e,l)=>{const i=new Map(e.map((a=>[a.key,a])));return l.map((a=>{return p=i.get(a)?.status,p==="starting"||p==="building"?p:"idle";var p}))},Xe=(e,l)=>{if(e.length===0)return!1;const i=new Map(e.map((a=>[a.key,a])));return l.every((a=>i.get(a)?.status==="ready"))},Ye=De.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
background-color: ${e=>e.theme.colors.grey4};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import{j as d}from"./liveblocks-DXYs6rwe.js";import{i as q,j as _,g as H,u as z,h as J,l as oe,k as oa,n as ft,o as O,N as In}from"./core-B2JcUSRu.js";import{fF as L,VP as Je,bE as sa,br as Te,Xa as En,ka as Tn,Xb as Yt,Xc as wn,kd as gt,Xd as We,Xe as xn,ki as Dn,Xf as Xt,Xg as Pn,km as bt,Xh as Ze,Xi as Fn,Xj as On,W7 as jn,lo as Rn,Xk as Mn,bn as et,Xl as ra,WN as ue,bc as ia,lC as ca,ll as la,WP as me,WO as ne,fE as da,ga as Bn,gq as Ct,Xm as Un,Xn as Ln,Xo as ua,Xp as Oe,DV as Ue,DW as Le,Ei as we,Ec as pe,D_ as Ve,Xq as Vn,b$ as Ye,Xr as Yn,Xs as Xn,Xt as ma,Xu as je,Xv as Gn,ei as tt,A6 as pa,Xw as Nn,Xx as ha,Xy as $n,Xz as zn,XA as Kn,XB as St,UL as kt,u6 as xe,l$ as De,Es as yt,Ad as qn,Ak as Qn,XC as Wn,XD as Zn,DX as Gt,XE as Hn,A9 as Ie,A4 as fa,XF as be,XG as Nt,XH as Jn,XI as vt,UK as At,Ch as ga,XJ as eo,XK as ba,XL as to,XM as ao,XN as no,XO as It,Cw as oo,CD as so,XP as ro,XQ as io,DZ as $t,XR as co,Cf as Ca,XS as Ce,XT as zt,XU as lo,bq as _a,Ex as Sa,XV as uo,XW as ka,XX as mo,XY as po,XZ as ho,X_ as Et,Ep as fo,Er as go,X$ as bo,Y0 as Co,DY as Kt,Y1 as _o,Ev as ya,Y2 as _e,Y3 as qt,Y4 as So,Y5 as ko,Y6 as va,lQ as Aa,pX as Ia,lV as Ea,pV as Ta,pU as wa,pT as xa,BE as yo,dc as vo,pQ as Ao,U6 as Io,q5 as Eo,Y7 as To,Y8 as wo,Y9 as xo,b5 as Tt,p$ as Do,ic as Po,gI as Fo,p_ as Oo,le as jo,pY as Ro,pW as Mo,d_ as Bo,dZ as Uo}from"./zeni-epic-state-DpjvBN7b.js";import{z as V,aw as se,p as j,j as w,G as Q,bc as Lo,at as Xe,a9 as Ge,bd as Da,W as N,be as Vo,bf as Pa,E as Yo,bg as Xo,bh as Go,a as Fa,a2 as Oa,e as ja,as as No,bi as $o,ap as zo,c as Pe,bj as Ra,s as ce,bk as Ma,bl as Ba,av as Ua,bm as Ko,aj as Ne,Q as $e,v as Y,bn as qo,N as Qo,bo as Wo,H as Zo,h as Ho,a5 as Jo,ar as es,bp as ts,bq as as,br as ns,bs as Ee}from"./index-DanGKFMl.js";import{n as wt}from"./mui-BLmtkCLd.js";import{a as b}from"./sentry-BmkYxd02.js";import{w as La}from"./withTransactionSidePanel-BzroedBl.js";import{c as Va,t as Fe,f as he,b as xt,a as Dt,v as os}from"./routePaths-CV4JB8t3.js";import{u as re}from"./useAskAiCfoHostNavButtonProps-BDyrdULc.js";import Be from"./NotFoundScreen-DJ-T97HU.js";import{u as Pt}from"./useInitialThreadRequest-D-aSm_7m.js";import{t as Ya}from"./analyticsHelper-DjqyEcxU.js";import{C as ss}from"./CompanyPassportScreen-Dgt-2F5D.js";import{u as rs}from"./useAiCfoDashboardSuggestedQuestionsChips-B20EbGXf.js";import{F as is}from"./FeaturePreviewScreen-ClEO1jVO.js";import"./recharts-UN7cJOXN.js";import"./analytics-BDCkEq_I.js";import"./plaid-DHQC2tsw.js";import"./dnd-BAPMa4RJ.js";import"./stripe-cKAAJElX.js";import"./lottie-C9Rxpkwh.js";import"./lexical-DGZ06Yv6.js";import"./pdf-DMCYUxGc.js";import"./utils-BGWE7tXK.js";import"./TransactionDetailScreen-DsKolbVR.js";import"./decodeURIComponentSafe-CIM8Yd6k.js";import"./expenseAutomationHelper-Dd7fQN5z.js";import"./stripSplatSuffix-DXBpTroJ.js";import"./MobileAppDrawer-CrvGsfgI.js";import"./InboxNotificationsProvider-B8qyHdbE.js";import"./useTaskManagerAccess-DEEmjDWA.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]="47f1d310-59bb-46ce-be0d-07abb1134caa",e._sentryDebugIdIdentifier="sentry-dbid-47f1d310-59bb-46ce-be0d-07abb1134caa")}catch{}})();const cs=La((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=q(),s=V.getSignedInUser(),i=_((E=>E.tenantState.currentTenantId)),l=_((E=>L(E))),{tenantEmailDomain:m}=q(),p=H(),h=l?.companyName??"",f={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},c=b.useMemo((()=>({authParams:f,companyName:h,downloadEndPoint:`${se}/agingDetailedReport`,timezone:Je()})),[]),u=b.useMemo((()=>r!=null?sa(r):Te()),[r]),C=z(),g=J(),k=_((E=>En(E,u,o))),I=b.useCallback((()=>{o!=null&&k.fetchState!=="In-Progress"&&k.fetchState!=="Completed"&&C(Tn(o,u))}),[u]),v=b.useCallback((()=>{g("../../",{relative:"path"})}),[]),S=b.useCallback(((E,P)=>{C(Yt({sortKey:E,sortOrder:P}))}),[]),T=b.useCallback((E=>{C(Yt({downloadState:E}))}),[]),B=b.useCallback((E=>{if(e)e(E.transactionId,E.transactionType);else if(m!=null){const P=Va({id:E.transactionId,type:E.transactionType},m);g(P);const y=j(p.state?.pathnameStackToGoBack,p.pathname);g(P,{state:{pathnameStackToGoBack:y}})}}),[m,e]),D=b.useCallback((()=>{k.vendor!=null&&w.trackApAgingDetail("AP Aging",u.format(Q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),k.vendor.id,k.vendor.name)}),[k.vendor,u]);return b.useEffect((()=>{I()}),[]),b.useEffect((()=>{k.fetchState==="Completed"&&D()}),[D,k.fetchState]),d.jsx(Lo,{apAgingDetail:k,downloadParams:c,reportDate:u,analytics:w,onTransactionClick:B,onReload:I,onBackClick:v,onColumnSortConfigChanged:S,updateDownloadStateHandler:T,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),ls=()=>{const e=z(),a=J(),t=_((S=>wn(S))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=re({mobileExploreReferrer:"AP Aging"});Xe({isDataReady:t.fetchState==="Completed"});const r=V.getSignedInUser(),s=_((S=>S.tenantState.currentTenantId)),i=_((S=>L(S))),l=i?.companyName??"",m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},p=b.useMemo((()=>({authParams:m,companyName:l,downloadEndPoint:`${se}/agingReport`,timezone:Je()})),[]),h=t.apAgingUIState.selectedDate??Te(),f=b.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(gt(h))}),[]);b.useEffect((()=>{f()}),[]);const c=b.useCallback((()=>{a("../",{relative:"path"})}),[]),u=b.useCallback((S=>{e(We({searchString:S}))}),[]),C=b.useCallback(((S,T)=>{e(We({sortKey:T,sortOrder:S}))}),[]),g=b.useCallback((S=>{a(`./${S}/${h.format(Q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[h]),k=b.useCallback((S=>{e(We({downloadState:S}))}),[]),I=b.useCallback(((S,T)=>{}),[]),v=b.useCallback(((S,T)=>{e(We({selectedDate:S,agingDateSelectionType:T})),e(gt(S))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ge,{analytics:w,onLoad:S=>S.trackPageLoaded(N.Event.agingReport,"AP Aging")}):null,d.jsx(Da,{uiState:t.apAgingUIState,report:t,downloadParams:p,analytics:w,onReloadReport:f,onBackClick:c,onSearchTextChange:u,onSortOrderChange:C,onEntityNameClick:g,updateDownloadStateHandler:k,onSelectedDateChanged:v,onNodeCollapseToggled:I,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},ds=La((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=q(),s=V.getSignedInUser(),i=_((D=>L(D))),{tenantEmailDomain:l}=q(),m=H(),p=i.companyName,h={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},f=b.useMemo((()=>({authParams:h,companyName:p,downloadEndPoint:`${se}/agingDetailedReport`,timezone:Je()})),[]),c=b.useMemo((()=>r!=null?sa(r):Te()),[r]),u=z(),C=J(),g=_((D=>xn(D,c,o))),k=b.useCallback((()=>{o!=null&&g.fetchState!=="In-Progress"&&g.fetchState!=="Completed"&&u(Dn(o,c))}),[c]),I=b.useCallback((()=>{C("../../",{relative:"path"})}),[]),v=b.useCallback(((D,E)=>{u(Xt({sortKey:D,sortOrder:E}))}),[]),S=b.useCallback((D=>{u(Xt({downloadState:D}))}),[]),T=b.useCallback((D=>{if(e)e(D.transactionId,D.transactionType);else if(l!=null){const E=Va({id:D.transactionId,type:D.transactionType},l);C(E);const P=j(m.state?.pathnameStackToGoBack,m.pathname);C(E,{state:{pathnameStackToGoBack:P}})}}),[l,e]),B=b.useCallback((()=>{g.customer!=null&&w.trackArAgingDetail("AR Aging",c.format(Q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),g.customer.id,g.customer.name)}),[g.customer,c]);return b.useEffect((()=>{k()}),[]),b.useEffect((()=>{g.fetchState==="Completed"&&B()}),[g.fetchState,B]),d.jsx(Vo,{arAgingDetail:g,downloadParams:f,reportDate:c,analytics:w,onTransactionClick:T,onReload:k,onBackClick:I,onColumnSortConfigChanged:v,updateDownloadStateHandler:S,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),us=()=>{const e=z(),a=J(),t=_((v=>Pn(v))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=re({mobileExploreReferrer:"AR Aging"});Xe({isDataReady:t.fetchState==="Completed"});const r=V.getSignedInUser(),s=_((v=>L(v))),i=s.companyName,l={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},m=b.useMemo((()=>({authParams:l,companyName:i,downloadEndPoint:`${se}/agingReport`,timezone:Je()})),[]),p=t.arAgingUIState.selectedDate??Te(),h=b.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(bt(p))}),[]);b.useEffect((()=>{h()}),[]);const f=b.useCallback((()=>{a("../",{relative:"path"})}),[]),c=b.useCallback((v=>{e(Ze({searchString:v}))}),[]),u=b.useCallback(((v,S)=>{e(Ze({sortKey:S,sortOrder:v}))}),[]),C=b.useCallback((v=>{a(`./${v}/${p.format(Q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[p]),g=b.useCallback((v=>{e(Ze({downloadState:v}))}),[]),k=b.useCallback(((v,S)=>{e(Ze({selectedDate:v,agingDateSelectionType:S})),e(bt(v))}),[]),I=b.useCallback(((v,S)=>{e(Fn({nodeId:v,isCollapsed:S}))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ge,{analytics:w,onLoad:v=>v.trackPageLoaded(N.Event.agingReport,"AR Aging")}):null,d.jsx(Da,{uiState:t.arAgingUIState,report:t,downloadParams:m,analytics:w,onReloadReport:h,onBackClick:f,onSearchTextChange:c,onSortOrderChange:u,onEntityNameClick:C,updateDownloadStateHandler:g,onSelectedDateChanged:k,onNodeCollapseToggled:I,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Xa=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function Ga(e,a){const t=jn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=Fe(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=j(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(Rn(n,o))}}}const ms=oe((function(e){const a=On(e).accountsInOrder.map(((t,n)=>Xa(t,n)));return{sectionTitle:Q.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,fetchState:e.cashBalanceState.fetchState,analytics:w}}),Ga)(Pa),ps=oe((function(e){const a=Mn(e).accountsInOrder.map(((o,r)=>Xa(o,r))),t=V.getSignedInUser(),n=et(t);return{sectionTitle:Q.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:w}}),Ga)(Pa);function hs(){const e=J(),a=H(),{tenantEmailDomain:t}=q(),n=_((o=>L(o).company?.companyInfo.firstMonthOfFY??1));return _((o=>o.cashBalanceState.fetchState))==="Error"?d.jsx(Be,{}):d.jsx(ms,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,firstMonthOfFY:n})}function fs(){const e=J(),a=H(),{tenantEmailDomain:t}=q(),n=_((o=>L(o).company?.companyInfo.firstMonthOfFY??1));return _((o=>o.cardBalanceState.fetchState))==="Error"?d.jsx(Be,{}):d.jsx(ps,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,firstMonthOfFY:n})}const gs=wt.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
flex: 1 1 auto;
|
|
4
|
+
min-height: 100%;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
7
|
+
`,bs=wt.div`
|
|
8
|
+
display: flex;
|
|
9
|
+
flex: 1 1 auto;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
align-items: center;
|
|
12
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
13
|
+
`;function Cs({title:e,reportId:a,entityAutoCompleteView:t,autoCompleteText:n,isAiCfoAccessEnabled:o,onAskAiCfoClick:r}){const s=J(),i=z(),l=H(),{tenantEmailDomain:m}=q(),p=Yo();return d.jsxs(gs,{children:[d.jsx(Xo,{source:a==="cash_balance"?"CashBalanceDetailScreen":"CardBalanceDetailScreen",title:e,onBackClick:()=>{s("../")},hideSearchBtn:!0,backgroundColor:p.colors.grey4,searchAutoComplete:{autoCompleteData:{entityAutoCompleteView:t,autoCompleteText:n},autoCompleteActions:{onAutoCompleteInputChange:h=>{h.trim().length>=2?i(me({searchString:h,searchOrigin:"navbar"})):h.trim().length===0&&i(ne("navbar"))},onAutoCompleteEntity:h=>{n!=null&&w?.trackSearch(N.Event.search,_s(a),h.type,h.name,n);const f=he(h,m),c=j(l.state?.pathnameStackToGoBack,l.pathname);s(f,{state:{pathnameStackToGoBack:c}})}}},rightSideComponent:d.jsx(Go,{isAiCfoAccessEnabled:o,onAskAiCfoClick:r})}),d.jsx(bs,{children:a==="cash_balance"?d.jsx(hs,{}):d.jsx(fs,{})})]})}function Qt(){const e=H(),a=z(),t=_((c=>c.cashBalanceState.fetchState)),n=_((c=>c.cardBalanceState.fetchState)),o=V.getSignedInUser();if(o==null)throw Error("Can't access dashboard detail without signing in...");const r=ra((c=>{const u=ia(c,"/").split("/");return u[u.length-1]})(e.pathname));let s="Not-Started",i="";const l=Q.getLocalizedStrings();switch(r){case"cash_balance":s=t,i=l.common.texts.cashBalance;break;case"card_balance":s=n,i=l.reportTitleById.card_balance;break;default:console.error(`${r} is not supported!`)}const{isAiCfoAccessEnabled:m,onAskAiCfoClick:p}=re({mobileExploreReferrer:r==="card_balance"?"Card Balance":"Cash Balance"});Xe({isDataReady:s==="Completed"});const h=_((c=>c.entityAutoCompleteState.autoCompleteText.navbar)),f=_((c=>ue(c,"navbar")));return b.useEffect((()=>{s==="Not-Started"&&(function(c,u){switch(u){case"card_balance":c(la());break;case"cash_balance":c(ca());break;default:throw new Error(`balance report type ${u} is not yet supported`)}})(a,r)}),[o,a,s]),d.jsxs(d.Fragment,{children:[s==="Completed"?d.jsx(Ge,{analytics:w,onLoad:c=>((u,C)=>{switch(C){case"card_balance":u.trackPageLoaded(N.Event.cardBalance);break;case"cash_balance":u.trackPageLoaded(N.Event.cashBalance);break;default:console.error(`Analytics: Not tracking Page Loaded for ${C}!`)}})(c,r)}):null,d.jsx(Cs,{title:i,reportId:r,autoCompleteText:h,entityAutoCompleteView:f,isAiCfoAccessEnabled:m,onAskAiCfoClick:p})]})}const _s=e=>{switch(e){case"cash_balance":return"Cash Balance";case"card_balance":return"Card Balance";default:return"Dashboard"}},Ss=[],Wt="insights_section";function ze(e){const{mobileExploreReferrer:a}=e,t=z(),n=J(),o=H(),{tenantEmailDomain:r}=q(),{setIsAiCfoOpen:s,setAiCfoSidePanelQuestionToSubmit:i}=Fa(),l=Oa(),m=Ua(l),p=oa(),h=_((R=>R.tenantState.fetchState==="Completed"||R.tenantState.activeTenantFetchState.fetchState==="Completed"?L(R):void 0)),f=h?.masterTOSInfo?.isMasterTOSAccepted??!1,c=_((R=>da(R))),u=c.uiState?.currentChatSessionId,C=c.allSessionsWithOrderedQuestionAnswers??Ss,g=V.getSignedInUser()?.userId,k=ja(),I=No()&&k&&r!=null,v=$o(),S=zo(!0),T=_((R=>v!=null?Bn(R,v):void 0)),{useDynamicConfig:B}=Pe(),{configValue:D}=B(Ra.aiCfoMessageDynamicConfig),E=b.useMemo((()=>Array.isArray(D.default_message_list)?D.default_message_list:[]),[D.default_message_list]),P=b.useMemo((()=>E.slice(0,2)),[E]),y=v!=null&&T!=null&&T.fetchState!=="Completed"&&T.fetchState!=="Error"&&(S||T.fetchState==="In-Progress"),x=b.useMemo((()=>{if(v==null||T?.fetchState==="Error")return P;if(y)return[];const R=(T?.suggestedQuestions??[]).map((ee=>ee.trim())).filter((ee=>ee.length>0)).slice(0,2);return R.length===0?P:R}),[P,y,v,T?.fetchState,T?.suggestedQuestions]),ie=b.useCallback(((R,ee)=>{if(g==null||R.trim()==="")return;if(!f)return void ce({location:o,navigate:n,mergeState:{referrer:a,aiCfoInitialQuestion:R,aiCfoInitialSubmissionSource:Wt,aiCfoSuggestionIndex:ee}});const qe=Ma(p.getState());if(m){const Qe=j(o.state?.pathnameStackToGoBack,o.pathname);n(`/${r}/ai-cfo/explore`,{state:{message:"",origin:"",pathnameStackToGoBack:Qe,referrer:a,aiCfoInitialQuestion:R,aiCfoShouldSubmit:!qe}})}else{if(qe)return t(Ct(R)),void s(!0);i(R),s(!0),Ba(t,R,Wt,u,C,g,ee,void 0)}}),[C,u,t,f,m,o,a,n,s,i,p,r,g]),Se=b.useCallback((()=>{if(f)if(m){const R=j(o.state?.pathnameStackToGoBack,o.pathname);n(`/${r}/ai-cfo/explore`,{state:{message:"",origin:"",pathnameStackToGoBack:R,referrer:a}})}else s(!0);else ce({location:o,navigate:n,mergeState:{referrer:a}})}),[f,m,o,a,n,s,r]);return b.useMemo((()=>{if(I)return{isSuggestedQuestionsLoading:y,onAskSomethingElseClick:Se,onSuggestedQuestionClick:ie,suggestedQuestions:x}}),[I,y,Se,ie,x])}const Ke=Ko,ks=oe((function(e){const a=Un(e),t=Ln(e),n=ua(e),{scrollPosition:o,...r}=n,s=Q.getLocalizedStrings().reportTitleById.cash_in_cash_out,i=V.getSignedInUser(),l=e.tenantState.currentTenantId,m=L(e),p=m?.companyName??"",h={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:l??""},f=e.entityAutoCompleteState.autoCompleteText.navbar,c=ue(e,"navbar");return{selectedRangeReport:a,reportLabels:{reportTitle:s},highlightedRangeReport:t,uiState:r,scrollPosition:o,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:p,statementEndPoint:`${se}/statement`,authParams:h},analytics:w,autoCompleteData:{autoCompleteText:f,entityAutoCompleteView:c}}}),(function(e,a){return{updateDownloadStateHandler:t=>{e(Vn(t))},onTimeframeSelectionChanged:()=>{},onCOABalancesRangeChanged:(t,n)=>{e(Ve(t,n)),e(Oe({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(we("month")),e(pe(a.firstMonthOfFY,t)),e(Oe({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(Ue(a.firstMonthOfFY,t,o,n)),n.length>0&&e(Le(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.isCompareModeOn!==t&&setTimeout((()=>e(Oe({resetLeftScroll:!0}))),50)},onElementCollapseStateChanged:(t,n)=>{e(Oe({nodeCollapseState:{nodeId:t,isCollapsed:n}}))},onTableScroll:t=>{e(Oe({scrollPosition:t}))},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(me({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(ne("navbar"))},onAutoCompleteEntity:t=>{const n=he(t,a.tenantEmailDomain),o=j(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{a.navigate("../")}}}))(Ke),ys=e=>{const{tenantEmailDomain:a,location:t,navigate:n}=e,o=Ne(),{isAiCfoAccessEnabled:r,onAskAiCfoClick:s}=re({mobileExploreReferrer:"DashboardCashInCashOut"}),i=ze({mobileExploreReferrer:"DashboardCashInCashOut"}),l=_((m=>ua(m))).mode==="compare_mode";return d.jsx(ks,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:a,location:t,isCompareModeOn:l,navigate:n,insightsSectionAiCfoInfo:i,isAiCfoAccessEnabled:r,onAskAiCfoClick:s,meetingUrl:Ye(o("dashboard_report_filters"))})},vs=e=>{let a,t;switch(e.balanceTimeFrame){case"month":case"quarter":a=e.balanceTimeFrame,t=tt(e);break;case"year":a="quarter",t={startDate:e.endDate.startOf("quarter"),endDate:e.endDate};break;case"free_range":console.error("free_range timeframe is not supported!")}return{timeframe:a,timePeriod:t}},As=oe((function(e){const a=Yn(e),t=Xn(e),n=ma(e),{scrollPosition:o,...r}=n,s=Q.getLocalizedStrings().reportTitleById.cash_position,i=V.getSignedInUser(),l=e.tenantState.currentTenantId,m=L(e),p=m?.companyName??"",h={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:l??""},f=e.entityAutoCompleteState.autoCompleteText.navbar,c=ue(e,"navbar");return{selectedRangeReport:a,reportLabels:{reportTitle:s},highlightedRangeReport:t,uiState:r,scrollPosition:o,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:p,statementEndPoint:`${se}/statement`,authParams:h},analytics:w,autoCompleteData:{autoCompleteText:f,entityAutoCompleteView:c}}}),(function(e,a){return{updateDownloadStateHandler:t=>{e(Gn(t))},onTimeframeSelectionChanged:t=>{e(we(t)),setTimeout((()=>e(je({resetLeftScroll:!0}))),50)},onCOABalancesRangeChanged:(t,n)=>{e(Ve(t,n)),e(je({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(pe(a.firstMonthOfFY,t)),e(je({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(Ue(a.firstMonthOfFY,t,o,n)),n.length>0&&e(Le(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.isCompareModeOn!==t&&setTimeout((()=>e(je({resetLeftScroll:!0}))),50)},onAccountBalanceClick:(t,n)=>{const{timePeriod:o,timeframe:r}=vs(n),s=t.accountName===""?t.accountDescription:t.accountName;if(o!=null&&r!=null){const i=Fe(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),l=j(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l,referrer:"Cash Position"}})}},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(me({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(ne("navbar"))},onAutoCompleteEntity:t=>{const n=he(t,a.tenantEmailDomain),o=j(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onTableScroll:t=>{e(je({scrollPosition:t}))},onBackClick:()=>{a.navigate("../")}}}))(Ke),Is=e=>{const{tenantEmailDomain:a,location:t,navigate:n}=e,o=Ne(),{isAiCfoAccessEnabled:r,onAskAiCfoClick:s}=re({mobileExploreReferrer:"DashboardCashPosition"}),i=ze({mobileExploreReferrer:"DashboardCashPosition"}),l=_((m=>ma(m))).mode==="compare_mode";return d.jsx(As,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:a,location:t,isCompareModeOn:l,navigate:n,insightsSectionAiCfoInfo:i,isAiCfoAccessEnabled:r,onAskAiCfoClick:s,meetingUrl:Ye(o("dashboard_report_filters"))})},$=(e,a,t,n)=>{e===!1?a!=null&&n("../../",{relative:"path"}):a!==t&&(a!=null&&a.length>0?n(`../${t}`,{replace:!0}):n(`./forecast/${t}`,{replace:!0}))},Es=e=>{let a,t;switch(e.balanceTimeFrame){case"month":case"quarter":a=e.balanceTimeFrame,t=tt(e);break;case"year":a="quarter",t={startDate:e.endDate.startOf("quarter"),endDate:e.endDate};break;case"free_range":console.error("free_range timeframe is not supported!")}return{timeframe:a,timePeriod:t}},Ts=oe((function(e){const a=pa(e),t=Nn(e),n=ha(e),o=$n(e),r=zn(e),s=Kn(e),i=St(e),{scrollPosition:l,...m}=i,p=t.reportTitle,h=V.getSignedInUser(),f=e.tenantState.currentTenantId,c=L(e),u=c?.companyName??"",C={userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:f??""},g=e.entityAutoCompleteState.autoCompleteText.navbar,k=ue(e,"navbar"),I=kt(c);return{selectedRangeReport:a,selectedClassesViewRangeReport:n,selectedProjectViewRangeReport:r,reportLabels:{reportTitle:p},highlightedRangeReport:t,highlightedClassesViewRangeReport:o,highlightedProjectViewRangeReport:s,uiState:m,scrollPosition:l,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:u,statementEndPoint:`${se}/statement`,authParams:C},analytics:w,isZeniUser:et(h),autoCompleteData:{autoCompleteText:g,entityAutoCompleteView:k},isZeniCOAUsed:I,isAccountingClassesEnabled:De(e),isAccountingProjectsEnabled:xe(e)}}),(function(e,a){return{updateDownloadStateHandler:t=>{e(Jn(t))},onTimeframeSelectionChanged:t=>{e(we(t)),setTimeout((()=>e(be({resetLeftScroll:!0}))),50)},onCOABalancesRangeChanged:(t,n)=>{e(Ve(t,n)),e(be({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(pe(a.firstMonthOfFY,t)),e(be({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(Ue(a.firstMonthOfFY,t,o,n)),n.length>0&&(e(Le(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.forecastIdFromUrlPath!=null&&t==1&&$(!1,a.forecastIdFromUrlPath,"",a.navigate)),a.isCompareModeOn!==t&&setTimeout((()=>e(be({resetLeftScroll:!0}))),50)},onAccountBalanceClick:(t,n)=>{const{timePeriod:o,timeframe:r}=Es(n);if(o!=null&&r!=null){const s=t.accountName===""?t.accountDescription:t.accountName,i=t.projectsViewParentId?.projectId!=null?xt(a.tenantEmailDomain,t.accountId,t.accountType,t.projectsViewParentId.projectId,s,r,o):t.classesViewParentId!=null&&t.classesViewParentId.parentClassId!=null?Dt(a.tenantEmailDomain,t.accountId,t.accountType,t.classesViewParentId.parentClassId?.[0],s,r,o):Fe(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),l=j(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l,referrer:"Burn Rate"}})}},onElementCollapseStateChanged:(t,n)=>{a.accountViewMode!=="project"?e(be({nodeCollapseState:{nodeId:t,isCollapsed:n}})):e(Nt({nodeCollapseState:{nodeId:t,isCollapsed:n}}))},onTableScroll:t=>{a.accountViewMode!=="project"?e(be({scrollPosition:t})):e(Nt({scrollPosition:t}))},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(me({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(ne("navbar"))},onAutoCompleteEntity:t=>{const n=he(t,a.tenantEmailDomain),o=j(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{a.selectedForecastId!=null?a.navigate("../../../"):a.navigate("../")},onForecastToggle:(t,n)=>{e(Ie(a.firstMonthOfFY,t==="forecast_mode",t==="forecast_mode"?3:1,n)),t==="forecast_mode"?(e(Gt({viewMode:"account_group"})),e(fa(!1,n?.id)),n!=null&&$(!0,a.forecastIdFromUrlPath,n?.id??"",a.navigate)):$(!1,a.forecastIdFromUrlPath,n?.id??"",a.navigate),e(be({resetLeftScroll:!0}))},onUpdateAccountViewMode:t=>{a.analytics?.trackGroupBySwitch(t==="classes"?"Classes":t==="project"?"Projects":"Accounts","Burn Rate"),e(Gt({viewMode:t})),e(Hn({viewMode:t}))},onUpdateClassesToFilterOut:t=>{e(Zn({classesToFilterOut:t}))},onUpdateProjectsToFilterOut:t=>{e(Wn({projectsToFilterOut:t}))},onOpenAccountViewMode:()=>{a.isAccountingClassesEnabled&&e(qn()),a.isAccountingProjectsEnabled&&e(Qn())},onResyncReports:()=>{e(yt(a.accountViewMode==="project"?"net_burn_or_income_by_projects":"net_burn_or_income_by_classes"))}}}))(Ke),ws=e=>{const a=z(),{tenantEmailDomain:t,location:n,navigate:o,forecastIdFromUrlPath:r}=e,s=Ne(),{isAiCfoAccessEnabled:i,onAskAiCfoClick:l}=re({mobileExploreReferrer:"DashboardNetBurnOrIncome"}),m=ze({mobileExploreReferrer:"DashboardNetBurnOrIncome"}),p=_((y=>St(y))),h=p.isForecastModeOn,f=p.timeframe,c=p.selectedForecast?.id,u=_((y=>vt(y.forecastState,c??""))),C=_((y=>pa(y))),g=_((y=>At(y))),k=_((y=>De(y))),I=_((y=>xe(y))),v=_((y=>ha(y).uiState.accountViewMode)),S=p.mode==="compare_mode",T=C.dataAvailable;b.useEffect((()=>{if(c!=null&&h===!0&&($(h,r,c,o),u!=null)){const y=u?.forecastPeriod,x=T!=null&&y.endDate.isAfter(T?.endDate)===!0?T:y;a(pe(e.firstMonthOfFY,{startDate:x.endDate.startOf(f),endDate:x?.endDate}))}}),[c]);const B=$e(),{useFeatureGate:D}=Pe(),{isFeatureEnabled:E}=D(Y.isReportsCommentingEnabled),P=Pt(E?B?.currentTenant?.companyId:void 0,{clearParams:C.fetchState==="Completed"});return d.jsx(Ts,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:t,selectedForecastId:r,forecastIdFromUrlPath:r,location:n,isAccountingClassesEnabled:k,isAccountingProjectsEnabled:I,accountViewMode:v,isCompareModeOn:S,navigate:o,analytics:w,reportsResyncFetchState:g.reportsResyncFetchState,insightsSectionAiCfoInfo:m,isAiCfoAccessEnabled:i,onAskAiCfoClick:l,initialOpenThreadRequest:P,isReportsCommentingEnabled:E,meetingUrl:Ye(s("dashboard_report_filters"))})},xs=e=>{let a,t;switch(e.balanceTimeFrame){case"month":case"quarter":a=e.balanceTimeFrame,t=tt(e);break;case"year":a="quarter",t={startDate:e.endDate.startOf("quarter"),endDate:e.endDate};break;case"free_range":console.error("free_range timeframe is not supported!")}return{timeframe:a,timePeriod:t}},Ds=oe((function(e){const a=ga(e),t=eo(e),n=ba(e),o=to(e),r=ao(e),s=no(e),i=It(e),{scrollPosition:l,...m}=i,p=Q.getLocalizedStrings().common.texts.operatingExpenses,h=V.getSignedInUser(),f=e.tenantState.currentTenantId,c=L(e),u=c?.companyName??"",C={userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:f??""},g=e.entityAutoCompleteState.autoCompleteText.navbar,k=ue(e,"navbar"),I=kt(c);return{selectedRangeReport:a,selectedClassesViewRangeReport:n,selectedProjectViewRangeReport:r,reportLabels:{reportTitle:p},highlightedRangeReport:t,highlightedClassesViewRangeReport:o,highlightedProjectViewRangeReport:s,uiState:m,scrollPosition:l,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:u,statementEndPoint:`${se}/statement`,authParams:C},analytics:w,isZeniUser:et(h),autoCompleteData:{autoCompleteText:g,entityAutoCompleteView:k},isZeniCOAUsed:I,isAccountingClassesEnabled:De(e),isAccountingProjectsEnabled:xe(e)}}),(function(e,a){return{updateDownloadStateHandler:t=>{e(lo(t))},onTimeframeSelectionChanged:t=>{e(we(t)),setTimeout((()=>e(Ce({resetLeftScroll:!0}))),50)},onCOABalancesRangeChanged:(t,n)=>{e(Ve(t,n)),e(Ce({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(pe(a.firstMonthOfFY,t)),e(Ce({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(Ue(a.firstMonthOfFY,t,o,n)),n.length>0&&(e(Le(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.forecastIdFromUrlPath!=null&&t==1&&$(!1,a.forecastIdFromUrlPath,"",a.navigate)),a.isCompareModeOn!==t&&setTimeout((()=>e(Ce({resetLeftScroll:!0}))),50)},onAccountBalanceClick:a.hasTransactionAccess!==!0?void 0:(t,n)=>{const{timePeriod:o,timeframe:r}=xs(n);if(o!=null&&r!=null){const s=t.accountName===""?t.accountDescription:t.accountName,i=t.projectsViewParentId?.projectId!=null?xt(a.tenantEmailDomain,t.accountId,t.accountType,t.projectsViewParentId.projectId,s,r,o):t.classesViewParentId!=null&&t.classesViewParentId.parentClassId!=null?Dt(a.tenantEmailDomain,t.accountId,t.accountType,t.classesViewParentId.parentClassId?.[0],s,r,o):Fe(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),l=j(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l,referrer:"Operating Expenses"}})}},onElementCollapseStateChanged:(t,n)=>{a.accountViewMode!=="project"?e(Ce({nodeCollapseState:{nodeId:t,isCollapsed:n}})):e(zt({nodeCollapseState:{nodeId:t,isCollapsed:n}}))},onTableScroll:t=>{a.accountViewMode!=="project"?e(Ce({scrollPosition:t})):e(zt({scrollPosition:t}))},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(me({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(ne("navbar"))},onAutoCompleteEntity:t=>{const n=he(t,a.tenantEmailDomain),o=j(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{a.selectedForecastId!=null?a.navigate("../../../"):a.navigate("../")},onForecastToggle:(t,n)=>{e(Ie(a.firstMonthOfFY,t==="forecast_mode",t==="forecast_mode"?3:1,n)),t=="forecast_mode"?(e($t({viewMode:"account_group"})),e(Ca(!1,n?.id)),n!=null&&$(!0,a.forecastIdFromUrlPath,n?.id??"",a.navigate)):$(!1,a.forecastIdFromUrlPath,n?.id??"",a.navigate),e(Ce({resetLeftScroll:!0}))},onUpdateAccountViewMode:t=>{a.analytics?.trackGroupBySwitch(t==="classes"?"Classes":t==="project"?"Projects":"Accounts","Operating Expenses"),e($t({viewMode:t})),e(co({viewMode:t}))},onUpdateClassesToFilterOut:t=>{e(io({classesToFilterOut:t}))},onUpdateProjectsToFilterOut:t=>{e(ro({projectsToFilterOut:t}))},onOpenAccountViewMode:()=>{a.isAccountingClassesEnabled&&e(oo()),a.isAccountingProjectsEnabled&&e(so())},onResyncReports:()=>{e(yt(a.accountViewMode==="project"?"operating_expenses_by_projects":"operating_expenses_by_classes"))}}}))(Ke),Ps=e=>{const a=z(),{tenantEmailDomain:t,location:n,navigate:o,forecastIdFromUrlPath:r}=e,s=Ne(),{isAiCfoAccessEnabled:i,onAskAiCfoClick:l}=re({mobileExploreReferrer:"DashboardOpEx"}),m=ze({mobileExploreReferrer:"DashboardOpEx"}),p=_((x=>It(x))),h=p.isForecastModeOn,f=p.timeframe,c=p.selectedForecast?.id,u=_((x=>vt(x.forecastState,c??""))),C=_((x=>ga(x))),g=_((x=>At(x))),k=_((x=>De(x))),I=_((x=>xe(x))),v=_((x=>ba(x).uiState.accountViewMode)),S=p.mode==="compare_mode",T=C.dataAvailable;b.useEffect((()=>{if(c!=null&&h===!0&&($(h,r,c,o),u!=null)){const x=u?.forecastPeriod,ie=T!=null&&x.endDate.isAfter(T?.endDate)===!0?T:x;a(pe(e.firstMonthOfFY,{startDate:ie.endDate.startOf(f),endDate:ie?.endDate}))}}),[c]);const B=$e(),D=B?.loggedInUserRole!=null&&_a(B?.loggedInUserRole)!==!0,{useFeatureGate:E}=Pe(),{isFeatureEnabled:P}=E(Y.isReportsCommentingEnabled),y=Pt(P?B?.currentTenant?.companyId:void 0,{clearParams:C.fetchState==="Completed"});return d.jsx(Ds,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:t,selectedForecastId:r,location:n,isAccountingClassesEnabled:k,isAccountingProjectsEnabled:I,accountViewMode:v,isCompareModeOn:S,navigate:o,forecastIdFromUrlPath:r,analytics:w,hasTransactionAccess:D,reportsResyncFetchState:g.reportsResyncFetchState,insightsSectionAiCfoInfo:m,isAiCfoAccessEnabled:i,onAskAiCfoClick:l,initialOpenThreadRequest:y,isReportsCommentingEnabled:P,meetingUrl:Ye(s("dashboard_report_filters"))})},Fs=e=>{let a,t;switch(e.balanceTimeFrame){case"month":case"quarter":a=e.balanceTimeFrame,t=tt(e);break;case"year":a="quarter",t={startDate:e.endDate.startOf("quarter"),endDate:e.endDate};break;case"free_range":console.error("free_range timeframe is not supported!")}return{timeframe:a,timePeriod:t}},Os=oe((function(e){const a=Sa(e),t=uo(e),n=ka(e),o=mo(e),r=po(e),s=ho(e),i=Et(e),{scrollPosition:l,...m}=i,p=Q.getLocalizedStrings().common.texts.revenue,h=V.getSignedInUser(),f=e.tenantState.currentTenantId,c=L(e),u=c?.companyName??"",C={userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:f??""},g=e.entityAutoCompleteState.autoCompleteText.navbar,k=ue(e,"navbar"),I=kt(c);return{selectedRangeReport:a,selectedClassesViewRangeReport:n,selectedProjectViewRangeReport:r,reportLabels:{reportTitle:p},highlightedRangeReport:t,highlightedClassesViewRangeReport:o,highlightedProjectViewRangeReport:s,uiState:m,scrollPosition:l,downloadParams:{downloadState:a.downloadState,currentTenantCompanyName:u,statementEndPoint:`${se}/statement`,authParams:C},analytics:w,isZeniUser:et(h),autoCompleteData:{autoCompleteText:g,entityAutoCompleteView:k},isZeniCOAUsed:I,isAccountingClassesEnabled:De(e),isAccountingProjectsEnabled:xe(e)}}),(function(e,a){return{updateDownloadStateHandler:t=>{e(So(t))},onTimeframeSelectionChanged:t=>{e(we(t)),setTimeout((()=>e(_e({resetLeftScroll:!0}))),50)},onCOABalancesRangeChanged:(t,n)=>{e(Ve(t,n)),e(_e({resetLeftScroll:!0}))},onThisPeriodChanged:t=>{e(pe(a.firstMonthOfFY,t)),e(_e({resetLeftScroll:!0}))},onAdditionalBalanceSelectionChanged:(t,n,o)=>{e(Ue(a.firstMonthOfFY,t,o,n)),n.length>0&&(e(Le(a.firstMonthOfFY,n.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",o,n)),a.forecastIdFromUrlPath!=null&&t==1&&$(!1,a.forecastIdFromUrlPath,"",a.navigate)),a.isCompareModeOn!==t&&setTimeout((()=>e(_e({resetLeftScroll:!0}))),50)},onAccountBalanceClick:(t,n)=>{const{timePeriod:o,timeframe:r}=Fs(n);if(o!=null&&r!=null){const s=t.accountName===""?t.accountDescription:t.accountName,i=t.projectsViewParentId?.projectId!=null?xt(a.tenantEmailDomain,t.accountId,t.accountType,t.projectsViewParentId.projectId,s,r,o):t.classesViewParentId!=null&&t.classesViewParentId.parentClassId!=null?Dt(a.tenantEmailDomain,t.accountId,t.accountType,t.classesViewParentId.parentClassId?.[0],s,r,o):Fe(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),l=j(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l,referrer:"Revenues"}})}},onElementCollapseStateChanged:(t,n)=>{a.accountViewMode!=="project"?e(_e({nodeCollapseState:{nodeId:t,isCollapsed:n}})):e(qt({nodeCollapseState:{nodeId:t,isCollapsed:n}}))},onTableScroll:t=>{a.accountViewMode!=="project"?e(_e({scrollPosition:t})):e(qt({scrollPosition:t}))},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(me({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(ne("navbar"))},onAutoCompleteEntity:t=>{const n=he(t,a.tenantEmailDomain),o=j(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{a.selectedForecastId!=null?a.navigate("../../../"):a.navigate("../")},onForecastToggle:(t,n)=>{e(Ie(a.firstMonthOfFY,t==="forecast_mode",t==="forecast_mode"?3:1,n)),t==="forecast_mode"?(e(Kt({viewMode:"account_group"})),e(ya(!1,n?.id)),n!=null&&$(!0,a.forecastIdFromUrlPath,n?.id??"",a.navigate)):$(!1,a.forecastIdFromUrlPath,n?.id??"",a.navigate),e(_e({resetLeftScroll:!0}))},onUpdateAccountViewMode:t=>{a.analytics?.trackGroupBySwitch(t==="classes"?"Classes":t==="project"?"Projects":"Accounts","Revenues"),e(Kt({viewMode:t})),e(_o({viewMode:t}))},onUpdateClassesToFilterOut:t=>{e(Co({classesToFilterOut:t}))},onUpdateProjectsToFilterOut:t=>{e(bo({projectsToFilterOut:t}))},onOpenAccountViewMode:()=>{a.isAccountingClassesEnabled&&e(fo()),a.isAccountingProjectsEnabled&&e(go())},onResyncReports:()=>{e(yt(a.accountViewMode==="project"?"revenue_by_projects":"revenue_by_classes"))}}}))(Ke),js=e=>{const a=z(),{tenantEmailDomain:t,location:n,navigate:o,forecastIdFromUrlPath:r}=e,s=Ne(),{isAiCfoAccessEnabled:i,onAskAiCfoClick:l}=re({mobileExploreReferrer:"DashboardRevenue"}),m=ze({mobileExploreReferrer:"DashboardRevenue"}),p=_((y=>Et(y))),h=p.isForecastModeOn,f=p.timeframe,c=p.selectedForecast?.id,u=_((y=>vt(y.forecastState,c??""))),C=_((y=>Sa(y))),g=C.dataAvailable,k=p.mode==="compare_mode",I=_((y=>De(y))),v=_((y=>xe(y))),S=_((y=>ka(y).uiState.accountViewMode)),T=_((y=>At(y)));b.useEffect((()=>{if(c!=null&&h===!0&&($(h,r,c,o),u!=null)){const y=u?.forecastPeriod,x=g!=null&&y.endDate.isAfter(g?.endDate)===!0?g:y;a(pe(e.firstMonthOfFY,{startDate:x.endDate.startOf(f),endDate:x?.endDate}))}}),[c]);const B=$e(),{useFeatureGate:D}=Pe(),{isFeatureEnabled:E}=D(Y.isReportsCommentingEnabled),P=Pt(E?B?.currentTenant?.companyId:void 0,{clearParams:C.fetchState==="Completed"});return d.jsx(Os,{firstMonthOfFY:e.firstMonthOfFY,tenantEmailDomain:t,selectedForecastId:r,isAccountingClassesEnabled:I,isAccountingProjectsEnabled:v,accountViewMode:S,isCompareModeOn:k,location:n,navigate:o,forecastIdFromUrlPath:r,analytics:w,reportsResyncFetchState:T.reportsResyncFetchState,insightsSectionAiCfoInfo:m,isAiCfoAccessEnabled:i,onAskAiCfoClick:l,initialOpenThreadRequest:P,isReportsCommentingEnabled:E,meetingUrl:Ye(s("dashboard_report_filters"))})},Rs=e=>{let a,t;if(e.endDate!=null)switch(e.timePeriod){case"this_month_to_date":case"last_month":case"this_week_to_date":case"last_week":a="month",t={startDate:e.endDate.startOf("month"),endDate:e.endDate};break;case"last_3_months":case"last_6_months":case"last_12_months":case"this_year_to_date":case"last_year":a="quarter",t={startDate:e.endDate.startOf("quarter"),endDate:e.endDate};break;default:console.error(`this timeperiod ${e.timePeriod} is not supported!`)}return{timeframe:a,timePeriod:t}},Ms=oe((function(e){const a=ko(e),t=e.entityAutoCompleteState.autoCompleteText.navbar,n=ue(e,"navbar");return{report:a,analytics:w,autoCompleteData:{autoCompleteText:t,entityAutoCompleteView:n}}}),(function(e,a){return{onTimeframeSelectionChanged:t=>{w.trackTimeframeSwitch(Ya(t),"Top Expenses"),e(va(t))},onAccountBalanceClick:(t,n)=>{const{timePeriod:o,timeframe:r}=Rs(n),s=t.accountName===""?t.accountDescription:t.accountName;if(o!=null&&r!=null){const i=Fe(a.tenantEmailDomain,t.accountId,t.accountType,s,r,o),l=j(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l,referrer:"Top Expenses"}})}},autoCompleteActions:{onAutoCompleteInputChange:t=>{t.trim().length>=2?e(me({searchString:t,searchOrigin:"navbar"})):t.trim().length===0&&e(ne("navbar"))},onAutoCompleteEntity:t=>{const n=he(t,a.tenantEmailDomain),o=j(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:o}})}},onBackClick:()=>{a.navigate("../")}}}))(qo),Bs=e=>{const{tenantEmailDomain:a,location:t,navigate:n}=e;return d.jsx(Ms,{tenantEmailDomain:a,location:t,navigate:n})},Us=wt.div`
|
|
14
|
+
display: flex;
|
|
15
|
+
flex: 1 1 auto;
|
|
16
|
+
min-height: 100%;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
background-color: ${e=>e.theme.colors.grey5};
|
|
19
|
+
align-items: center;
|
|
20
|
+
`;function Ls({fetchState:e,firstMonthOfFY:a,reportId:t,forecastId:n}){const o=J(),r=H(),{tenantEmailDomain:s}=q();let i;Xe({isDataReady:!0});const l={firstMonthOfFY:a,tenantEmailDomain:s,location:r,navigate:o,forecastIdFromUrlPath:n,fetchState:e};switch(t){case"operating_expenses":i=d.jsx(Ps,{...l});break;case"revenue":i=d.jsx(js,{...l});break;case"net_burn_or_income":i=d.jsx(ws,{...l});break;case"cash_position":i=d.jsx(Is,{...l});break;case"top_expenses":i=d.jsx(Bs,{...l});break;case"cash_in_cash_out":i=d.jsx(ys,{...l});break;default:console.error(`${t} is not supported!`),i=null}return i!=null?d.jsx(Us,{children:i}):null}function le(){const e=H(),a=z(),{forecastId:t}=q();let n="Not-Started";const o=_((c=>It(c).fetchState)),r=_((c=>Et(c).fetchState)),s=_((c=>St(c).fetchState)),i=_((c=>c.cashPositionState.fetchState)),l=_((c=>c.topExState.fetchState)),m=_((c=>c.cashInCashOutState.fetchState));if(V.getSignedInUser()==null)throw Error("Can't access dashboard detail without signing in...");const p=_((c=>L(c))),h=p?.company?.companyInfo?.firstMonthOfFY??1,f=ra((c=>{const u=ia(c,"/").split("/");return t!=null?u[u.length-3]:u[u.length-1]})(e.pathname));switch(f){case"operating_expenses":n=o;break;case"revenue":n=r;break;case"net_burn_or_income":n=s;break;case"cash_position":n=i;break;case"top_expenses":n=l;break;case"cash_in_cash_out":n=m;break;default:console.error(`${f} is not supported!`)}return b.useEffect((()=>{n==="Not-Started"&&(function(c,u,C,g){switch(u){case"operating_expenses":c(xa(!0)),g!=null&&(c(Ie(C,!0,3,{id:g,index:0})),c(Ca(!1,g)));break;case"revenue":c(wa(!0)),g!=null&&(c(Ie(C,!0,3,{id:g,index:0})),c(ya(!1,g)));break;case"net_burn_or_income":c(Ta(!0)),g!=null&&(c(Ie(C,!0,3,{id:g,index:0})),c(fa(!1,g)));break;case"cash_position":c(Ea(!0));break;case"top_expenses":c(Ia());break;case"cash_in_cash_out":c(Aa());break;default:throw new Error(`report type ${u} is not yet supported`)}})(a,f,h,t)}),[t]),d.jsxs(d.Fragment,{children:[n==="Completed"?d.jsx(Ge,{analytics:w,onLoad:c=>((u,C)=>{const g=e.state?.referrer;switch(C){case"operating_expenses":u.trackPageLoaded(N.Event.operatingExpenses,g);break;case"revenue":u.trackPageLoaded(N.Event.revenues,g);break;case"net_burn_or_income":u.trackPageLoaded(N.Event.burnRate,g);break;case"cash_position":u.trackPageLoaded(N.Event.cashPosition,g);break;case"top_expenses":u.trackPageLoaded(N.Event.topExpenses,g);break;case"cash_in_cash_out":u.trackPageLoaded(N.Event.cashInCashOut,g);break;default:console.error(`Analytics: Not tracking Page Loaded for ${C}!`)}})(c,f)}):null,d.jsx(Ls,{firstMonthOfFY:h,fetchState:n,reportId:f,forecastId:t})]})}var ct=typeof navigator<"u"&&navigator.userAgent.toLowerCase().indexOf("firefox")>0;function lt(e,a,t,n){e.addEventListener?e.addEventListener(a,t,n):e.attachEvent&&e.attachEvent("on".concat(a),(function(){t(window.event)}))}function Na(e,a){for(var t=a.slice(0,a.length-1),n=0;n<t.length;n++)t[n]=e[t[n].toLowerCase()];return t}function $a(e){typeof e!="string"&&(e="");for(var a=(e=e.replace(/\s/g,"")).split(","),t=a.lastIndexOf("");t>=0;)a[t-1]+=",",a.splice(t,1),t=a.lastIndexOf("");return a}for(var Ft={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":ct?173:189,"=":ct?61:187,";":ct?59:186,"'":222,"[":219,"]":221,"\\":220},de={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},_t={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},U={16:!1,18:!1,17:!1,91:!1},M={},He=1;He<20;He++)Ft["f".concat(He)]=111+He;var F=[],Zt=!1,za="all",Ht=[],at=function(e){return Ft[e.toLowerCase()]||de[e.toLowerCase()]||e.toUpperCase().charCodeAt(0)};function Jt(e){za=e||"all"}function Me(){return za||"all"}var dt=function(e){var a=e.key,t=e.scope,n=e.method,o=e.splitKey,r=o===void 0?"+":o;$a(a).forEach((function(s){var i=s.split(r),l=i.length,m=i[l-1],p=m==="*"?"*":at(m);if(M[p]){t||(t=Me());var h=l>1?Na(de,i):[];M[p]=M[p].filter((function(f){return!((!n||f.method===n)&&f.scope===t&&(function(c,u){for(var C=c.length>=u.length?c:u,g=c.length>=u.length?u:c,k=!0,I=0;I<C.length;I++)g.indexOf(C[I])===-1&&(k=!1);return k})(f.mods,h))}))}}))};function ea(e,a,t,n){var o;if(a.element===n&&(a.scope===t||a.scope==="all")){for(var r in o=a.mods.length>0,U)Object.prototype.hasOwnProperty.call(U,r)&&(!U[r]&&a.mods.indexOf(+r)>-1||U[r]&&a.mods.indexOf(+r)===-1)&&(o=!1);(a.mods.length!==0||U[16]||U[18]||U[17]||U[91])&&!o&&a.shortcut!=="*"||a.method(e,a)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}function ta(e,a){var t=M["*"],n=e.keyCode||e.which||e.charCode;if(G.filter.call(this,e)){if(n!==93&&n!==224||(n=91),F.indexOf(n)===-1&&n!==229&&F.push(n),["ctrlKey","altKey","shiftKey","metaKey"].forEach((function(u){var C=_t[u];e[u]&&F.indexOf(C)===-1?F.push(C):!e[u]&&F.indexOf(C)>-1?F.splice(F.indexOf(C),1):u==="metaKey"&&e[u]&&F.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(F=F.slice(F.indexOf(C))))})),n in U){for(var o in U[n]=!0,de)de[o]===n&&(G[o]=!0);if(!t)return}for(var r in U)Object.prototype.hasOwnProperty.call(U,r)&&(U[r]=e[_t[r]]);e.getModifierState&&(!e.altKey||e.ctrlKey)&&e.getModifierState("AltGraph")&&(F.indexOf(17)===-1&&F.push(17),F.indexOf(18)===-1&&F.push(18),U[17]=!0,U[18]=!0);var s=Me();if(t)for(var i=0;i<t.length;i++)t[i].scope===s&&(e.type==="keydown"&&t[i].keydown||e.type==="keyup"&&t[i].keyup)&&ea(e,t[i],s,a);if(n in M){for(var l=0;l<M[n].length;l++)if((e.type==="keydown"&&M[n][l].keydown||e.type==="keyup"&&M[n][l].keyup)&&M[n][l].key){for(var m=M[n][l],p=m.splitKey,h=m.key.split(p),f=[],c=0;c<h.length;c++)f.push(at(h[c]));f.sort().join("")===F.sort().join("")&&ea(e,m,s,a)}}}}function G(e,a,t){F=[];var n=$a(e),o=[],r="all",s=document,i=0,l=!1,m=!0,p="+",h=!1;for(t===void 0&&typeof a=="function"&&(t=a),Object.prototype.toString.call(a)==="[object Object]"&&(a.scope&&(r=a.scope),a.element&&(s=a.element),a.keyup&&(l=a.keyup),a.keydown!==void 0&&(m=a.keydown),a.capture!==void 0&&(h=a.capture),typeof a.splitKey=="string"&&(p=a.splitKey)),typeof a=="string"&&(r=a);i<n.length;i++)o=[],(e=n[i].split(p)).length>1&&(o=Na(de,e)),(e=(e=e[e.length-1])==="*"?"*":at(e))in M||(M[e]=[]),M[e].push({keyup:l,keydown:m,scope:r,mods:o,shortcut:n[i],method:t,key:n[i],splitKey:p,element:s});s!==void 0&&!(function(f){return Ht.indexOf(f)>-1})(s)&&window&&(Ht.push(s),lt(s,"keydown",(function(f){ta(f,s)}),h),Zt||(Zt=!0,lt(window,"focus",(function(){F=[]}),h)),lt(s,"keyup",(function(f){ta(f,s),(function(c){var u=c.keyCode||c.which||c.charCode,C=F.indexOf(u);if(C>=0&&F.splice(C,1),c.key&&c.key.toLowerCase()==="meta"&&F.splice(0,F.length),u!==93&&u!==224||(u=91),u in U)for(var g in U[u]=!1,de)de[g]===u&&(G[g]=!1)})(f)}),h))}var ut={setScope:Jt,getScope:Me,deleteScope:function(e,a){var t,n;for(var o in e||(e=Me()),M)if(Object.prototype.hasOwnProperty.call(M,o))for(t=M[o],n=0;n<t.length;)t[n].scope===e?t.splice(n,1):n++;Me()===e&&Jt(a||"all")},getPressedKeyCodes:function(){return F.slice(0)},isPressed:function(e){return typeof e=="string"&&(e=at(e)),F.indexOf(e)!==-1},filter:function(e){var a=e.target||e.srcElement,t=a.tagName,n=!0;return!a.isContentEditable&&(t!=="INPUT"&&t!=="TEXTAREA"&&t!=="SELECT"||a.readOnly)||(n=!1),n},trigger:function(e){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(M).forEach((function(t){var n=M[t].find((function(o){return o.scope===a&&o.shortcut===e}));n&&n.method&&n.method()}))},unbind:function(e){if(e===void 0)Object.keys(M).forEach((function(s){return delete M[s]}));else if(Array.isArray(e))e.forEach((function(s){s.key&&dt(s)}));else if(typeof e=="object")e.key&&dt(e);else if(typeof e=="string"){for(var a=arguments.length,t=new Array(a>1?a-1:0),n=1;n<a;n++)t[n-1]=arguments[n];var o=t[0],r=t[1];typeof o=="function"&&(r=o,o=""),dt({key:e,scope:o,method:r,splitKey:"+"})}},keyMap:Ft,modifier:de,modifierMap:_t};for(var mt in ut)Object.prototype.hasOwnProperty.call(ut,mt)&&(G[mt]=ut[mt]);if(typeof window<"u"){var Vs=window.hotkeys;G.noConflict=function(e){return e&&window.hotkeys===G&&(window.hotkeys=Vs),G},window.hotkeys=G}G.filter=function(){return!0};var aa=function(e,a){var t=e.target,n=t&&t.tagName;return!!(n&&a&&a.includes(n))};function Ys(e,a,t,n){t instanceof Array&&(n=t,t=void 0);var o=t||{},r=o.enableOnTags,s=o.filter,i=o.keyup,l=o.keydown,m=o.filterPreventDefault,p=m===void 0||m,h=o.enabled,f=h===void 0||h,c=o.enableOnContentEditable,u=c!==void 0&&c,C=b.useRef(null),g=b.useCallback((function(k,I){var v,S;return s&&!s(k)?!p:!!(aa(k,["INPUT","TEXTAREA","SELECT"])&&!aa(k,r)||(v=k.target)!=null&&v.isContentEditable&&!u)||!!(C.current===null||document.activeElement===C.current||(S=C.current)!=null&&S.contains(document.activeElement))&&(a(k,I),!0)}),n?[C,r,s].concat(n):[C,r,s]);return b.useEffect((function(){if(f)return i&&l!==!0&&(t.keydown=!1),G(e,t||{},g),function(){return G.unbind(e,g)};G.unbind(e,g)}),[g,e,f]),C}G.isPressed;const Xs=[],pt="dashboard_card",ae="ai_cfo_dashboard_card";function na(e,a){return a?e.some((t=>String(t)===ae))?e.slice():[ae,...e]:e.filter((t=>String(t)!==ae))}const Gs=["net_burn_or_income_story_card","cash_balance","task_card","card_balance","zeni_promo_card","insights_dashboard","information_card","company_details","bill_pay_promo_card","bill_pay_card","reimbursement_card","reimbursement_promo_card","rewards_card"],Ns=(e,a,t,n,o)=>({card:{dimension:Tt(t),cardType:n,cardIndex:o,fetchState:a,disableAnimations:!1,spansFullDashboardWidth:!1},data:e.status!=null?{balanceAmount:e.balance?.available,lastUpdatedTime:e.status.lastRefreshSuccessTime,changePercent:e.balance?.change?.percent,changeComparedToDate:e.balance?.change?.since}:void 0}),Re=(e,a,t,n,o)=>({card:{dimension:Tt(t),cardType:n,cardIndex:o,fetchState:a,disableAnimations:!1,spansFullDashboardWidth:!1},data:e}),$s=(e,a,t,n)=>Re(void 0,e,Ee,a,t),zs=e=>{const a=Tt(Ee);return a.height=Ee.height+10,{card:{dimension:a,cardType:ae,cardIndex:e,fetchState:"Completed",disableAnimations:!1,spansFullDashboardWidth:!0}}},Ks=oe((function(e,a){const t=Ws(a.dashboardReport),n=a.passedCardsOrdered,o=a.dashboardReport.reportsInOrder,{isInterestedInChargeCard:r,cardsCreditLimit:s,cashbackRate:i}=a;let l=n.map(((m,p)=>{if(m==="reimbursement_promo_card"||m==="bill_pay_promo_card")return $s(t,m,p);if(m==="zeni_promo_card")return Re({isExpressedInterest:r,creditLimit:s,cashbackRate:i,fetchState:"Completed"},a.cardBalanceFetchState,Ee,m,p);if(m==="information_card")return Re(void 0,"Completed",Ee,m,p);if(m===ae)return zs(p);{const h=o.find((f=>f?.reportId===m));return h?(function(f,c,u,C){const g=f.reportId;switch(g){case"card_balance":case"cash_balance":return[Ns(f,c,u,g,C)];case"expense_automation_card":case"operating_expenses":case"revenue":case"top_expenses":case"cash_position":case"cash_in_cash_out":case"insights_dashboard":case"company_details":case"task_card":case"bill_pay_card":case"reimbursement_card":case"net_burn_or_income":case"accounts_payable_aging":case"accounts_receivable_aging":case"rewards_card":return[Re(f,c,u,g,C)];case"net_burn_or_income_story_card":return[Re(f,c,u,"net_burn_or_income_story_card",C)];default:return console.error(`card type ${g} not yet supported!`),[]}})(h,h.fetchState,Ee,p):[]}})).flat();return a.isSummaryCardsFiltered===!0&&(l=l.filter((m=>Gs.includes(m.card.cardType)==0)).filter((m=>{const p=m.data?.availableNumberOfPeriods;return p!=null?p>0:m.card.cardType!="top_expenses"||m.data==null||(function(h){if(h==null||h.length===0)return!0;let f=!0;for(const c of h)if(c.balance.available.amount!==0){f=!1;break}return f})(m.data.topExpenses.accountsOrdered)===!1}))),{cardDataArray:l,autoCompleteData:{autoCompleteText:e.entityAutoCompleteState.autoCompleteText.navbar,entityAutoCompleteView:ue(e,"navbar")},analytics:w,isReimbursementEnabled:a.isReimbursementEnabled,isBillPayEnabled:a.isBillPayEnabled}}),(function(e,a){const t=a.tenantId,n=V.getSignedInUser();return{cardActions:{onCardClick:(o,r,s,i)=>{if(console.warn(`onCardClick at ${o} for the type ${r}`),r==="zeni_promo_card"&&i!=null)w.trackDashboardCardClicked("cards promo",2),w.trackZeniCardsPromoCardClicked(a.isChargeCardFeatureEnabled,i,2,`${n?.firstName??""} ${n?.lastName??""}`,a.isChargeCardFeatureEnabled?a.cardsCreditLimit:void 0),i==="Learn More"?window.open("https://www.zeni.ai/product/business-credit-card","_blank"):a.navigate("../cards/promo",{relative:"path"});else if(a.isForecastOn)switch(r){case"net_burn_or_income":case"operating_expenses":case"revenue":a.navigate(`${r}/forecast/${a.selectedForecastOnDashboard}`,{state:{referrer:s}});break;default:a.navigate(`${r}`,{state:{referrer:s}})}else r==="rewards_card"?(n!=null&&w.trackDashboardCardClicked("rewards promo",o+1),a.navigate("../../rewards/refer",{state:{referrer:s}})):r==="expense_automation_card"?(w.trackMonthEndCloseClicked(a.selectedPeriod.month,a.selectedPeriod.year,"Dashboard"),a.navigate("../../month_end_close_checks/review",{state:{referrer:"Dashboard"}})):a.navigate(`${r}`,{state:{referrer:s}})},onReloadData:(o,r)=>{const s=[];a.isApAgingFeatureEnabled===!1&&s.push("accounts_payable_aging"),a.isArAgingFeatureEnabled===!1&&s.push("accounts_receivable_aging"),a.isRewardsFeatureEnabled===!1&&s.push("rewards_card"),(function(i,l,m,p){if(l!==ae)switch(l){case"card_balance":i(la());break;case"cash_balance":i(ca());break;case"operating_expenses":i(xa(!0));break;case"revenue":i(wa(!0));break;case"net_burn_or_income":i(Ta(!0));break;case"net_burn_or_income_story_card":i(Mo(!0));break;case"cash_position":i(Ea(!0));break;case"top_expenses":i(Ia());break;case"cash_in_cash_out":i(Aa());break;case"insights_dashboard":i(Ro());break;case"bill_pay_card":i(jo());break;case"reimbursement_card":i(Oo());break;case"company_details":i(Fo(m));break;case"task_card":i(Po());break;case"accounts_payable_aging":p.includes("accounts_payable_aging")===!1&&i(gt(Te()));break;case"accounts_receivable_aging":i(bt(Te()));break;case"rewards_card":p.includes("rewards_card")===!1&&i(Do(!0));break;default:throw new Error(`report type ${l} is not yet supported`)}})(e,r,a.companyId,s)},onTimeframeChange:(o,r)=>{w.trackTimeframeSwitch(Ya(r),Qs(o),"Dashboard"),(function(s,i,l){switch(i){case"operating_expenses":case"revenue":case"net_burn_or_income":case"cash_position":s(we(l));break;case"top_expenses":s(va(l));break;default:throw new Error(`report type ${i} doesn't support changeTimeframe`)}})(e,o,r)},onUpdateSelectedInsightIndex:o=>{e(xo(o))},onCategoryClick:(o,r,s)=>{o==="bill-pay"?a.navigate("../bills",{state:{tab:r,subTab:s},relative:"path"}):o==="reimbursement"?a.navigate("../reimbursements",{state:{tab:r,subTab:s},relative:"path"}):o==="uncategorized-account-mapping"?a.navigate("../settings/accounting",{relative:"path"}):o==="show-all-tasks"?a.navigate("../tasks",{relative:"path"}):a.navigate(`../../transactions/${o}`)},onCardBtnClick:o=>{if(o==="bill_pay_promo_card"){const r="../bills",s=j(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(r,{state:{pathnameStackToGoBack:s},relative:"path"})}else if(o==="reimbursement_promo_card"){const r="../reimbursements",s=j(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(r,{state:{pathnameStackToGoBack:s},relative:"path"})}},onSaveClick:(o,r,s)=>{o==="net_burn_or_income_story_card"&&(w.trackUpdateBurnRateCalculatorSettings(r,s,To(s)),e(wo(t,r,s)))}},autoCompleteActions:{onAutoCompleteInputChange:o=>{o.trim().length>=2?e(me({searchString:o,searchOrigin:"navbar"})):o.trim().length===0&&e(ne("navbar"))},onCancelAutoComplete:()=>{e(ne("navbar"))},onAutoCompleteEntity:o=>{let r="";r=o.type!=="vendor"||o.detailType!=="bank_merchant"&&o.detailType!=="card_merchant"?he(o,a.tenantEmailDomain):os(o.zeniId,o.qboId,a.tenantEmailDomain);const s=j(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(r,{state:{pathnameStackToGoBack:s,referrer:"Search"}})}}}}))(ns);function qs(){const e=oa(),a=Oa(),t=Ua(a),{isAiCfoOpen:n,setIsAiCfoOpen:o,setAiCfoSidePanelQuestionToSubmit:r}=Fa(),s=J(),i=z(),l=H(),m=V.getSignedInUser(),{useFeatureGate:p,useDynamicConfig:h}=Pe(),[f,c]=b.useState(!1),[u,C]=b.useState(!1),g=ja(),{tenantEmailDomain:k}=q(),{isAiCfoAccessEnabled:I,onAskAiCfoClick:v}=re({mobileExploreReferrer:"Dashboard"}),S=_((A=>A.tenantState.fetchState==="Completed"||A.tenantState.activeTenantFetchState.fetchState==="Completed"?L(A):void 0)),T=S??V.getSignedInUserTenant(k),{isCardsShuttingDown:B,shutdownContent:D}=Qo(T?.tenantId,S?.company?.managementInfo?.receiverEmails),E=b.useMemo((()=>B===!0&&D!=null?d.jsx(Wo,{shutdownContent:D}):null),[B,D]),P=S?.masterTOSInfo?.isMasterTOSAccepted??!1,y=T.tenantId,x=T.companyId;b.useEffect((()=>{f===!1&&l.state?.message==="activation"&&(i(yo(x)),c(!0))}),[l.state,f,x,i]),b.useEffect((()=>{g&&!u&&l.state?.message==="open_ai_cfo_drawer"&&(C(!0),P?(o(!0),s({pathname:l.pathname,search:l.search,hash:l.hash},{replace:!0,state:{...l.state,message:void 0}})):ce({location:l,navigate:s,mergeState:{referrer:"Dashboard",message:void 0}}))}),[l,u,g,P,o,s]);const{isFeatureEnabled:ie}=p(Y.isApAgingFeatureEnabled),Se=Zo(),R=Ho(Se),{isFeatureEnabled:ee}=p(Y.isArAgingFeatureEnabled),{isFeatureEnabled:qe}=p(Y.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Qe}=p(Y.isReferralFeatureEnabled),{isFeatureEnabled:Ka}=p(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:qa}=p(Y.isAiCfoFileUploadEnabled),{isFeatureEnabled:Qa}=p(Y.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:Wa}=p(Y.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:Za}=p(Y.aiAuditScorePercentage),{configValue:Ot}=h(Ra.zeniCardsConfig),Ha=Ot.charge_card_cashback_rate_per_transaction==null?.0175:Ot.charge_card_cashback_rate_per_transaction;if(l.state?.message==="activation"){const A=Jo(l.state?.pathnameStackToGoBack);s(l.pathname,{state:{...l.state,message:void 0,pathnameStackToGoBack:A.newStack}})}const[jt,Ja]=b.useState(!1),[nt,en]=b.useState(!1);Ys("command+p, Control+p",(A=>{en(!nt),A.preventDefault()}),{enableOnContentEditable:!0,enableOnTags:["INPUT","SELECT","TEXTAREA"]},[nt]);const Rt=S?.externalConnections?.accounting[0]?.isValid;if(m==null)throw Error("Can't access dashboard without signing in...");const fe=_((A=>L(A)?.excludedResources)),tn=_((A=>A.expenseAutomationViewState.selectedPeriodByTenantId)),an=!!S?.companyReimbursementInfo?.info?.isReimbursementEnabled,nn=!!S?.companyBillPayInfo?.info?.isBillPayEnabled,on=$e(),K=[],Mt=fe?.resources?.find((A=>A.resource==="/reports/top_expenses"))==null,sn=fe?.resources?.find((A=>A.resource==="/reports/task_card"))==null,Bt=S?.userRole!=null&&_a(S?.userRole),rn=fe?.resources?.find((A=>A.resource==="/bills"))==null&&!Bt,cn=fe?.resources?.find((A=>A.resource==="/reimbursements"))==null,ln=vo(on?.loggedInUserRoleMap),dn=S?.company?.companyChargeCardInfo?.chargeCardsCreditAccountLimit??0,un=S?.companyChargeCardInfo?.info?.isCompanyInterestedInChargeCard??!1;Mt===!1&&K.push("top_expenses"),sn===!1&&K.push("task_card"),rn===!1&&K.push("bill_pay_card","bill_pay_promo_card"),ie===!1&&K.push("accounts_payable_aging"),ee===!1&&K.push("accounts_receivable_aging"),(Se===!1||Bt)&&K.push("expense_automation_card"),cn===!1&&K.push("reimbursement_card","reimbursement_promo_card"),K.push("zeni_accounts_promo_card","treasury_promo_card"),Qe===!1&&K.push("rewards_card");const{areTenantIdsInSync:Ut}=es();b.useLayoutEffect((()=>{jt&&R===Se||Rt!==!0||!Ut||fe?.fetchState!=="Completed"&&fe?.fetchState!=="Error"||(Ja(!0),i(Ao(m.userId,x,y,!0,!1,K)))}),[jt,m,y,i,Mt,Rt,fe?.fetchState,Ut]);const mn=_((A=>A.reportUIOptionsState.forecastOnDashboard.isForecastModeOn)),pn=_((A=>A.revenueState.uiState.selectedForecast?.id)),hn=_((A=>A.cardBalanceState.fetchState)),ge=_((A=>Io(A,K))),fn=ge.fetchState,gn=b.useMemo((()=>na(ge.cardsOrdered,I)),[ge.cardsOrdered,I]),bn=b.useMemo((()=>na(ge.cardsForDashboardUI,I)),[ge.cardsForDashboardUI,I]);Xe({isDataReady:!0});const{isSuggestedQuestionsLoading:Cn,suggestedPromptQuestions:_n}=rs(),Lt=_((A=>da(A))),ke=Lt.uiState?.currentChatSessionId,ot=Lt.allSessionsWithOrderedQuestionAnswers??Xs,{currentSessionQuestionAnswers:Sn}=ts(ot,ke),Vt=Sn.length===0,kn=b.useCallback(((A,W,te)=>{const ye=m?.userId;if(ye==null)return;const X=A.trim();if(X.length===0&&W.length===0)return;if(!P)return void ce({location:l,navigate:s,mergeState:{referrer:"Dashboard",...X.length>0?{aiCfoInitialQuestion:X,aiCfoInitialSubmissionSource:pt,...typeof te=="number"?{aiCfoSuggestionIndex:te}:{}}:{}}});const Z=Ma(e.getState()),ve=()=>{const Ae=j(l.state?.pathnameStackToGoBack,l.pathname);s(`/${k}/ai-cfo/explore`,{state:{message:"",origin:"",pathnameStackToGoBack:Ae,referrer:"Dashboard",aiCfoInitialQuestion:X,aiCfoShouldSubmit:!Z&&X.length>0,aiCfoInitialSubmissionSource:pt,...typeof te=="number"?{aiCfoSuggestionIndex:te}:{}}})};return t?W.length>0?void o(!0):void ve():W.length>0?Z?(i(Ct(X)),void o(!0)):(r(X.length>0?X:null),o(!0),void(X.length>0&&Ba(i,X,pt,ke,ot,ye,te,W.length>0?W:void 0))):(Z&&i(Ct(X)),void ve())}),[ot,ke,i,P,t,l,s,r,o,m?.userId,e,k]),yn=b.useCallback((()=>{P?o(!0):ce({location:l,navigate:s,mergeState:{referrer:"Dashboard"}})}),[P,l,s,o]),vn=b.useCallback((()=>{if(!P)return void ce({location:l,navigate:s,mergeState:{referrer:"Dashboard"}});if(k==null)return;const A=j(l.state?.pathnameStackToGoBack,l.pathname);s(`/${k}/ai-cfo/explore`,{state:{pathnameStackToGoBack:A,referrer:"Dashboard"}})}),[P,l,s,k]),An=b.useCallback((()=>{if(P)if(t){if(k==null||S==null)return;const A=ke==null||Vt?`/${k}/ai-cfo/explore`:`/${k}/ai-cfo/${ke}`,W=l.state?.pathnameStackToGoBack??[],te=j(W,l.pathname);s(A,{state:{...l.state,pathnameStackToGoBack:te,[as]:!0}})}else ce({location:l,navigate:s,mergeState:{referrer:"Dashboard"}});else ce({location:l,navigate:s,mergeState:{referrer:"Dashboard"}})}),[P,t,l,s,k,S,ke,Vt]);return d.jsxs(d.Fragment,{children:[fn==="Completed"?d.jsx(Ge,{analytics:w,onLoad:A=>{A.trackPageLoaded(N.Event.dashboard)}}):null,d.jsx(Ks,{cardsShutdownBanner:E,maxColumns:n?2:void 0,isAiCfoAccessEnabled:I,onAskAiCfoClick:v,onAiCfoDashboardOpenPanel:yn,onAiCfoDashboardOpenScopePage:An,isAiCfoFileUploadEnabled:qa===!0&&t===!1,onAiCfoDashboardPromptSubmit:kn,onAiCfoDashboardExpandToFullPage:vn,aiCfoDashboardShouldClearPromptOnSubmit:P,aiCfoDashboardSuggestedPromptQuestions:_n,aiCfoDashboardSuggestedPromptQuestionsLoading:Cn,onDragAndDropCard:(A,W)=>{if(A===ae||W===ae)return;const te=(function(Z,ve,Ae){const st=Ae.indexOf(Z),rt=Ae.indexOf(ve);if(st===-1||rt===-1||st===rt)return Ae;const it=[...Ae];return it.splice(st,1),it.splice(rt,0,Z),it})(A,W,gn),ye=te.filter((Z=>Z!==ae)),X=ge.cardsOrdered;(ye.length!==X.length||ye.some(((Z,ve)=>Z!==X[ve])))&&i(Eo(ye))},dashboardReport:ge,passedCardsOrdered:bn,tenantId:y,companyId:x,tenantEmailDomain:k,location:l,navigate:s,isApAgingFeatureEnabled:ie,isArAgingFeatureEnabled:ee,isBillPayEnabled:nn,isReimbursementEnabled:an,isSummaryCardsFiltered:nt,isForecastOn:mn,selectedForecastOnDashboard:pn,isVisitingFirstTime:f,isZeniAccountEnabled:qe,isRewardsFeatureEnabled:Qe,selectedPeriod:tn[y],isChargeCardFeatureEnabled:Ka,isUserHasCardsAccess:ln,cardsCreditLimit:dn,cashbackRate:Ha,isInterestedInChargeCard:un,cardBalanceFetchState:hn,christmasAnimationEnabled:Qa,newYearAnimationEnabled:Wa,aiAuditScorePercentageEnabled:Za})]})}const Qs=e=>{switch(e){case"operating_expenses":return"Operating Expenses";case"revenue":return"Revenues";case"top_expenses":return"Top Expenses";case"net_burn_or_income":return"Burn Rate";case"cash_in_cash_out":return"Cash In, Cash Out";case"cash_position":return"Cash Position"}return"Dashboard"},Ws=e=>e.fetchState!=="Error"?e.fetchState:e.reportsInOrder.map((a=>a.fetchState)).reduce(((a,t)=>a==="In-Progress"||a==="Not-Started"?a:t));function ht(){return d.jsxs(ft,{children:[d.jsx(O,{path:"/",element:d.jsx(le,{})}),d.jsx(O,{path:"/:forecastId",element:d.jsx(le,{})}),d.jsx(O,{path:"/:forecastId/*",element:d.jsx(Be,{})})]})}function wr(){const e=$e(),a=e?.excludedResources?.find((m=>m.resource==="/reports/top_expenses"))==null,{useFeatureGate:t}=Pe(),{isFeatureEnabled:n}=t(Y.isApAgingFeatureEnabled),{isFeatureEnabled:o}=t(Y.isArAgingFeatureEnabled),r=_((m=>L(m))),{isFeatureEnabled:s}=t(Y.isDebitCardFeatureEnabled),i=Bo(s,r),l=Uo(r);return i===!0||l===!0?d.jsx(ft,{children:d.jsx(O,{path:"/*",element:d.jsx(is,{})})}):d.jsxs(ft,{children:[d.jsx(O,{path:"/",element:d.jsx(qs,{})}),d.jsx(O,{path:"cash_balance/*",element:d.jsx(Qt,{})}),d.jsx(O,{path:"card_balance/*",element:d.jsx(Qt,{})}),d.jsx(O,{path:"operating_expenses/*",element:d.jsx(le,{})}),d.jsx(O,{path:"operating_expenses/forecast/*",element:d.jsx(ht,{})}),d.jsx(O,{path:"revenue/forecast/*",element:d.jsx(ht,{})}),d.jsx(O,{path:"revenue/*",element:d.jsx(le,{})}),d.jsx(O,{path:"net_burn_or_income/forecast/*",element:d.jsx(ht,{})}),d.jsx(O,{path:"net_burn_or_income/*",element:d.jsx(le,{})}),n===!0&&d.jsxs(d.Fragment,{children:[d.jsx(O,{path:"accounts_payable_aging/*",element:d.jsx(ls,{})}),d.jsx(O,{path:"accounts_payable_aging/:vendorId/:reportDate/*",element:d.jsx(cs,{})})]}),o&&d.jsxs(d.Fragment,{children:[d.jsx(O,{path:"accounts_receivable_aging/:customerId/:reportDate/*",element:d.jsx(ds,{})}),d.jsx(O,{path:"accounts_receivable_aging/*",element:d.jsx(us,{})})]}),d.jsx(O,{path:"cash_position/*",element:d.jsx(le,{})}),d.jsx(O,{path:"top_expenses/*",element:a===!0?d.jsx(le,{}):d.jsx(Be,{})}),d.jsx(O,{path:"cash_in_cash_out/*",element:d.jsx(le,{})}),d.jsx(O,{path:"company_details",element:d.jsx(ss,{})}),d.jsx(O,{path:"referrals/*",element:d.jsx(In,{to:"../../rewards/refer",replace:!0})}),d.jsx(O,{path:"*",element:d.jsx(Be,{})})]})}export{wr as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as v}from"./liveblocks-
|
|
1
|
+
import{j as v}from"./liveblocks-DXYs6rwe.js";import{a as u}from"./sentry-BmkYxd02.js";import{u as y,j as b,l as w,g as A,N}from"./core-B2JcUSRu.js";import{TR as R,fF as _,gl as U,TS as k,pS as L,TT as z}from"./zeni-epic-state-DpjvBN7b.js";import{u as j,z as f,L as C,t as I,G as O,b as $}from"./index-DanGKFMl.js";import"./mui-BLmtkCLd.js";import{t as P}from"./getLocaleForTenant-BXUF9msR.js";import"./recharts-UN7cJOXN.js";import"./analytics-BDCkEq_I.js";import"./plaid-DHQC2tsw.js";import"./dnd-BAPMa4RJ.js";import"./stripe-cKAAJElX.js";import"./lottie-C9Rxpkwh.js";import"./lexical-DGZ06Yv6.js";import"./pdf-DMCYUxGc.js";import"./utils-BGWE7tXK.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="55485928-c75d-4b55-8405-5ef93bbeb75f",t._sentryDebugIdIdentifier="sentry-dbid-55485928-c75d-4b55-8405-5ef93bbeb75f")}catch{}})();const G=w((function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}}))((function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=A(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map((l=>l.tenantEmailDomain)),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,S=null;const T=E(r.pathname);if(T!=null)c=`../${o.tenantEmailDomain}/${T}`,m="comingFromV2UrlPath",T==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce(((l,x)=>l||i.split("/").find((D=>D===x))!=null),!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,S=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const F=$(c,p);return v.jsx(N,{to:F,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:S}})}}));function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=j(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b((e=>R(e))),n=b((e=>e.tenantState.fetchState)),i=b((e=>e.tenantState.error)),a=b((e=>e.tenantState.activeTenantFetchState.fetchState)),c=b((e=>_(e))),d=f.getSignedInUser();return u.useLayoutEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,h.current=!1,r.current=!1,s(C.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)}),[a,n]),u.useEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&I.shouldFetchActiveTenant(e)&&(h.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(C.TENANT_FETCHING),t(U(d.userId,e))))}),[n,a,d,t]),u.useEffect((()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,S=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&S&&I.shouldFetchAllTenants()&&(r.current=!0,I.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!k(i))&&t(L(e.userId)))}),[n,a,i,d,t]),u.useEffect((()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())}),[m.tenantsCoreDetailsInOrder,n]),u.useEffect((()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(O.updateAppLocaleID(P(c)),o())}),[n,a,c]),v.jsx(G,{})}const Q=["dashboard/cash-balance","dashboard/card-balance","dashboard/operating-expenses","dashboard/revenue","dashboard/burn-rate","dashboard/cash-position","dashboard/top-expenses","dashboard/cash-in-cash-out","dashboard","reports","forecast","uncategorized-expense","uncategorized-income","missing-receipts","bills","cards/activate","cards","reimbursements","wise","checking","aicfo"],q={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of Q)if(t.toLocaleLowerCase().includes(s))return q[s]}export{oe as default};
|
package/dist/assets/{DomesticWireDetailScreen-DgaHcUL_.js → DomesticWireDetailScreen-uEOhWiZJ.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-
|
|
1
|
+
import{j as l}from"./liveblocks-DXYs6rwe.js";import{h as w,g as C,j as h,l as E,i as V}from"./core-B2JcUSRu.js";import{YP as k,YW as W,gG as _,gF as Q,gE as K,kP as L,WO as q,uK as J,fF as B,Ym as D,kN as F,YQ as v,YZ as T,kL as G,l6 as j}from"./zeni-epic-state-DpjvBN7b.js";import{bO as M,a2 as N,c as R,z as O,E as U,a5 as p,v as S,a8 as Y,bP as X,F as Z,bQ as ee,p as te}from"./index-DanGKFMl.js";import{n as z}from"./mui-BLmtkCLd.js";import"./sentry-BmkYxd02.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]="29820d5b-0fed-4a0a-8e01-564bdd25d5ab",e._sentryDebugIdIdentifier="sentry-dbid-29820d5b-0fed-4a0a-8e01-564bdd25d5ab")}catch{}})();const ae=E(null,(function(e,t){return{onSaveVendor:a=>{e(L(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(q("common")),a!=null&&e(J(a))},onGetOtp:a=>{e(K(a,"BillPayVendor"))},onResendOtp:a=>{e(Q(a,"BillPayVendor"))},onVerifyOtp:(a,n)=>{e(_(a,n,"BillPayVendor"))},onVerifyOtpSuccess:(a,n,o)=>{e(W(a,n,o))}}}))(M);function H({vendorId:e,billId:t,isExpressPayPage:a}){const n=w(),o=C(),s=h((r=>k(r,e)));return l.jsx(ae,{location:o,navigate:n,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:a??!1})}const ne=z.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -6,7 +6,7 @@ import{j as l}from"./liveblocks-DR8KfETq.js";import{h as w,g as C,j as h,l as A,
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
align-items: center;
|
|
8
8
|
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,oe=
|
|
9
|
+
`,oe=E((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(j(s))},onSaveHandler:s=>{e(G(t.bankAccountContext,s,"standard",o))},onCancel:()=>{(()=>{const s=p(n.state?.pathnameStackToGoBack),r=s.poppedPathname??P();a(r,{state:{pathnameStackToGoBack:s.newStack}})})(),e(v())},onACHDetailsUpdated:s=>{const{bankAccountSection:r}=s;e(T({data:r}))},onBackClick:()=>{if(e(F({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")a("../",{relative:"path"});else{const s=p(t.location.state?.pathnameStackToGoBack),r=s.poppedPathname??P(0);t.navigate(r,{state:{pathnameStackToGoBack:s.newStack}})}e(v())}}}))(X);function me({vendorIdParam:e,accountContext:t}){const a=w(),n=C(),o=N(),{vendorId:s,billId:r}=V(),c=e??s,{useFeatureGate:d}=R(),i=O.getSignedInUser(),b=h((u=>B(u))),g=U(),x=p(n.state?.pathnameStackToGoBack),m=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),f=h((u=>k(u,c))),{isFeatureEnabled:I}=d(S.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=d(S.isDepositAccountsFeatureEnabled);if(i==null)throw Error("Can't access address page without signing in...");return m==="billDetail"&&f.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(Y,{fetchState:f.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:g.colors.grey5}}):l.jsxs(ne,{windowSize:o,children:[l.jsx(H,{vendorId:c,billId:r}),l.jsx(oe,{location:n,navigate:a,billId:r,vendorId:c,currentTenant:b,bankAccountContext:m,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const P=(e=2)=>{let t="../";for(let a=0;a<e;a++)t=`${t}../`;return t},fe=(e,t,a)=>{let n=`/${e}/bill/${encodeURIComponent(t)}`;return a=="draft"&&(n+="/edit"),n},he=e=>`/${e}/bills`,ke=(e,t)=>{let a=`/${e}/bill`;return a=t!=null?a.concat(`/${t}/edit`):a.concat("/new"),a},A=(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 ve(e,t,a){return A(e,"ach",t,a)}function Se(e,t,a){return A(e,"domestic",t,a)}function ge(e,t,a){return A(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},de=z.div`
|
|
10
10
|
display: flex;
|
|
11
11
|
height: 100vh;
|
|
12
12
|
width: 100%;
|
|
@@ -15,4 +15,4 @@ import{j as l}from"./liveblocks-DR8KfETq.js";import{h as w,g as C,j as h,l as A,
|
|
|
15
15
|
align-items: center;
|
|
16
16
|
background-color: ${e=>e.theme.colors.grey4};
|
|
17
17
|
box-shadow: ${e=>`0px 2px ${Z.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
18
|
-
`,re=
|
|
18
|
+
`,re=E((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:r}=t,{tenantEmailDomain:c}=r;return{onFetchBankName:d=>{e(j(d))},onSaveHandler:d=>{e(G(t.bankAccountContext,d,"us-domestic",s))},onWireDetailsUpdated:d=>{const{bankAccountSection:i}=d;e(T({data:i}))},onCancel:()=>{(()=>{const d=p(o.state?.pathnameStackToGoBack),i=d.poppedPathname??$();n(i,{state:{pathnameStackToGoBack:d.newStack}})})(),e(v())},onAddressClick:d=>{if(t.bankAccountContext==="express-pay")n("./add-address");else{const i=se(c,d,a),b=te(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:b}})}},onBackClick:()=>{if(e(F({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")n("../",{relative:"path"});else{const d=p(t.location.state?.pathnameStackToGoBack),i=d.poppedPathname??$(0);t.navigate(i,{state:{pathnameStackToGoBack:d.newStack}})}e(v())}}}))(ee);function xe({vendorIdParam:e,accountContext:t}){const a=w(),n=C(),o=N(),{vendorId:s,billId:r}=V(),c=e??s,d=O.getSignedInUser(),{useFeatureGate:i}=R(),b=U(),g=h((u=>B(u))),x=p(n.state?.pathnameStackToGoBack),m=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),f=h((u=>k(u,c))),{isFeatureEnabled:I}=i(S.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=i(S.isDepositAccountsFeatureEnabled);if(d==null)throw Error("Can't access address page without signing in...");return m==="billDetail"&&f.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(Y,{fetchState:f.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:b.colors.grey5,boxShadow:`0px 2px ${Z.sp1} ${b.colors.dropShadowNormal}`}}):l.jsxs(de,{windowSize:o,children:[l.jsx(H,{vendorId:c,billId:r}),l.jsx(re,{location:n,navigate:a,billId:r,vendorId:c,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,fe as a,se as b,ke as c,Se as d,he as g,ge as i,ve as v};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as c}from"./liveblocks-
|
|
1
|
+
import{j as c}from"./liveblocks-DXYs6rwe.js";import{a2 as d,ac as f,E as l}from"./index-DanGKFMl.js";import{D as b}from"./mui-BLmtkCLd.js";import"./sentry-BmkYxd02.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]="c4a1a051-122a-4bbe-9cb2-6f5c19e6b4ff",e._sentryDebugIdIdentifier="sentry-dbid-c4a1a051-122a-4bbe-9cb2-6f5c19e6b4ff")}catch{}})();const p={drawerLeftMargin:new f(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:n,onClose:t}=e,a=d(),s=o?.valuePx(a)??p.drawerLeftMargin.valuePx(a),i=l();return c.jsx(b,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:i.colors.black,opacity:.8,cursor:"pointer"}}},onClose:t,children:n})}export{h as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-DXYs6rwe.js";import{a as d}from"./sentry-BmkYxd02.js";import{h as B,u as A,g as G,i as F,j as l,N,l as q,n as O,o as $}from"./core-B2JcUSRu.js";import{WS as _,fF as M,W8 as R,m$ as Y,S9 as I,WX as z,WN as V,l$ as X,Sa as E,Wd as H,We as J,WP as K,WO as L}from"./zeni-epic-state-DpjvBN7b.js";import{b9 as Q,j as U,a5 as Z,p as tt}from"./index-DanGKFMl.js";import"./mui-BLmtkCLd.js";import{d as k}from"./decodeURIComponentSafe-CIM8Yd6k.js";import{w as et}from"./withTransactionSidePanel-BzroedBl.js";import{f as at,c as nt}from"./routePaths-CV4JB8t3.js";import"./recharts-UN7cJOXN.js";import"./analytics-BDCkEq_I.js";import"./plaid-DHQC2tsw.js";import"./dnd-BAPMa4RJ.js";import"./stripe-cKAAJElX.js";import"./lottie-C9Rxpkwh.js";import"./lexical-DGZ06Yv6.js";import"./pdf-DMCYUxGc.js";import"./utils-BGWE7tXK.js";import"./useAskAiCfoHostNavButtonProps-BDyrdULc.js";import"./TransactionDetailScreen-DsKolbVR.js";import"./useInitialThreadRequest-D-aSm_7m.js";import"./expenseAutomationHelper-Dd7fQN5z.js";import"./stripSplatSuffix-DXBpTroJ.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]="09fa5dde-0272-4607-86c6-f90ebfcd0ffa",a._sentryDebugIdIdentifier="sentry-dbid-09fa5dde-0272-4607-86c6-f90ebfcd0ffa")}catch{}})();const ot=q((function(a,t){const e=t.entity,o=z(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:V(a,"common")},trendWithTransactionsReport:o,analytics:U,isAccountingClassesEnabled:X(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(K({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(L("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(H()),a(J()),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(E(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(E(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(Q),it=et((function({entityType:a,...t}){const e=B(),o=A(),c=G(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:W,entityNameEncoded:x}=F(),r=k(W??""),f=k(x??""),p=rt(r,f),j=[r,f].filter((n=>n!=null)),i={name:f,id:r,type:a,zeniId:r,qboId:r},g=l((n=>_(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),v=l((n=>M(n).company?.companyInfo.firstMonthOfFY??1)),u=l((n=>R(n.trendWithTransactionsState,i,"EntityDetail")));d.useEffect((()=>{m===!1&&p===!0&&(T(!0),o(Y(i)))}),[m,p,i]);const P=l((n=>n.trendState.fetchState)),S=u?.selectedPeriod?.timePeriod??g,w=(function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y})(u?.selectedPeriod?.timePeriod,g);return d.useEffect((()=>{m===!0&&h===!1&&P==="Completed"&&(D(!0),S!=null&&o(I(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:S})))}),[m,h,P]),p?s.jsx(ot,{firstMonthOfFY:v,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:w,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(N,{to:b(j.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 vt({entityType:a}){return s.jsx(O,{children:s.jsx($,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{vt as EntityDetailRoutes,vt as default};
|
package/dist/assets/{ExpenseAutomationRoutes-DHppK74x.js → ExpenseAutomationRoutes-p6anUTiX.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as T}from"./liveblocks-
|
|
1
|
+
import{j as T}from"./liveblocks-DXYs6rwe.js";import{u as he,h as nt,g as Te,j as _,i as Ue,t as Hn,l as Yn,n as Kn,o as Ye,N as Qn}from"./core-B2JcUSRu.js";import{fF as ke,a0Z as Zn,q0 as _e,U8 as Xn,z$ as es,a0_ as ts,a0$ as as,a10 as ns,a11 as gt,a12 as Qe,gh as Tt,a13 as ca,eW as ss,g0 as os,a14 as ia,a15 as Ze,qT as cs,uN as is,gS as ls,gQ as rs,a16 as ds,r4 as us,rd as ms,qb as ps,qp as wa,gP as re,gR as hs,a17 as Ss,qL as Ra,re as gs,qm as Cs,qh as fs,uT as Is,gO as Me,a18 as tt,C9 as Da,Mu as Fa,a19 as _a,Fs as Ma,a1a as ks,eZ as Ts,e$ as bs,sP as bt,WT as la,WV as Ps,m2 as ys,WW as vs,m9 as Es,dl as As,Ds as Pt,a1b as xs,a1c as ws,fm as yt,sD as ra,WN as Rs,a1d as Ds,a1e as Fs,mb as _s,a1f as Ms,Ra as Os,ma as Us,l$ as Bs,qE as Oa,rj as at,tp as Ua,tL as Vs,T_ as Ba,ri as da,rl as Va,rn as js,bE as zs,ny as Ls,nv as $s,rm as Xe,rk as pe,a1g as Gs,rE as ua,a1h as Ns,a1i as qs,sH as Js,sI as Ws,WJ as Hs,VP as Ys,a0r as Ks,a1j as Qs,WP as ma,WO as Ke,a1k as pa,mq as Zs,a1l as Xs,a1m as eo,a1n as to,a1o as ao,qz as no,a1p as so,a1q as oo,a1r as co,ru as io,md as lo,m4 as ro,a1s as uo,mc as ha,X4 as mo,a1t as po,a1u as ho,uo as So,t$ as go,t_ as Ct,a1v as Co,a1w as fo,a1x as Io,a1y as ko,nJ as To,br as bo,nE as Sa,nq as Po,a1z as yo,g$ as vo,nB as Eo,sR as Ao,sT as xo,sA as wo,VS as Ro,VT as Do,EW as Fo,EV as _o,Fa as Mo,a1A as ga,sG as Oo,a1B as Uo,rU as Bo,r_ as Vo,s9 as jo,rX as zo,a1C as Lo,s8 as $o,sM as Go,a1D as No,sZ as qo,su as Jo,t2 as Wo,sz as Ho,rF as Yo,a1E as Ko,qX as Qo,qv as Zo,qC as Ca,rp as Xo,a1F as ec,a1G as tc,a1H as ac,a1I as nc,a1J as sc,a1K as oc,t6 as cc,a1L as ic,a1M as lc,a1N as fa,uz as rc,tS as dc,tH as Ia,tF as uc,a1O as mc,tu as pc,t9 as hc,tI as Sc,a1P as gc,a1Q as Cc,tf as fc,a1R as Ic,ta as kc,te as Tc,tc as bc,tO as Pc}from"./zeni-epic-state-DpjvBN7b.js";import ja from"./NotFoundScreen-DJ-T97HU.js";import{a as s,R as za}from"./sentry-BmkYxd02.js";import{n as be,S as yc}from"./mui-BLmtkCLd.js";import{c as Be,v as Y,j as Z,p as te,ar as La,at as $a,dP as vc,dQ as Ec,O as Ga,z as st,dR as Ac,dS as xc,dT as wc,af as Oe,dU as Rc,dV as ka,bb as Ta,dW as Dc,a8 as Na,dX as Fc,h as et,a as _c,dY as Mc,dZ as Oc,V as Uc,Q as Bc,d_ as Vc,d$ as jc,e0 as zc,b5 as Lc,bt as $c,ac as Gc,b6 as Nc,b7 as qc,G as Jc,w as Wc,e1 as Hc,aw as ba,e2 as Yc}from"./index-DanGKFMl.js";import{u as qa}from"./useAskAiCfoHostNavButtonProps-BDyrdULc.js";import{g as Pa,b as Kc,c as Qc,h as Zc,a as Xc,i as ei,r as ti,C as ai}from"./TransactionDetailScreen-DsKolbVR.js";import{u as ni}from"./useActualMatchingMatchDetail-Ba3Lb9B6.js";import{d as si}from"./decodeURIComponentSafe-CIM8Yd6k.js";import{m as Ja,a as Wa}from"./expenseAutomationHelper-Dd7fQN5z.js";import{u as Ha,a as Ya,w as oi}from"./withTransactionSidePanel-BzroedBl.js";import{b as ci,S as ii,a as li,J as ri}from"./ScheduleDetailsPrepaidExpensesScreen-YOxc6f2g.js";import{s as ya,i as Ka,h as di,v as ui,c as mi}from"./routePaths-CV4JB8t3.js";import{a as ft}from"./accountMappingHelper-y0E9h6aC.js";import{D as pi}from"./DrawerScreen-D2fUiyyG.js";import"./recharts-UN7cJOXN.js";import"./analytics-BDCkEq_I.js";import"./plaid-DHQC2tsw.js";import"./dnd-BAPMa4RJ.js";import"./stripe-cKAAJElX.js";import"./lottie-C9Rxpkwh.js";import"./lexical-DGZ06Yv6.js";import"./pdf-DMCYUxGc.js";import"./utils-BGWE7tXK.js";import"./useInitialThreadRequest-D-aSm_7m.js";import"./stripSplatSuffix-DXBpTroJ.js";import"./pathToGoBack-DqGGHSwL.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="21c92e34-0f85-4702-9058-a078f4990fc6",t._sentryDebugIdIdentifier="sentry-dbid-21c92e34-0f85-4702-9058-a078f4990fc6")}catch{}})();const hi=()=>{const t=he(),n=nt(),f=Te(),I=_((C=>ke(C))),{useFeatureGate:k}=Be(),{isFeatureEnabled:o}=k(Y.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=k(Y.aiAuditScorePercentage),E=_((C=>C.expenseAutomationViewState.selectedPeriodByTenantId)),l=_((C=>Zn(C,I.tenantId))),{isAiCfoAccessEnabled:S,onAskAiCfoClick:R}=qa({mobileExploreReferrer:"Month-End Close Overview"}),x=s.useCallback(((C,h,z=!1)=>{t(_e({tenantId:h,period:{month:C.month,year:C.year},refreshViewInBackground:z}))}),[]),m=s.useCallback((C=>{const h=f.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&Z.trackMonthCloseAuditPage(C.month,C.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,h??null),t(Xn(I.tenantId,C))}),[I.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),g=E[I.tenantId],u=s.useCallback((()=>{const C=f.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&Z.trackMonthCloseAuditPage(g.month,g.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,C??null),x(g,I.tenantId,!0)}),[x,g,I.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),F=te(f.state?.pathnameStackToGoBack,f.pathname),A=s.useCallback((()=>{if(l.monthEndCloseChecks!=null&&g!=null){const C=l.monthEndCloseChecks.monthEndCloseCheckList.find((h=>h.progress<100));if(C!=null)return void n(`./${C.id}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:F,message:"comingFromOverview"}});n(`./month_end_insights/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:F,message:"comingFromOverview"}})}}),[l.monthEndCloseChecks,g]),{areTenantIdsInSync:p}=La();return $a({isDataReady:l.fetchState==="Completed"}),s.useEffect((()=>{g!=null&&l.fetchState!=="In-Progress"&&l.fetchState!=="Completed"&&p&&x(g,I.tenantId)}),[x,g,l.fetchState,I.tenantId,p]),s.useEffect((()=>{g!=null&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&p&&t(es(g))}),[g,l.monthClosePerformanceTrendFetchStatus.fetchState,p]),s.useEffect((()=>{const C=setInterval((()=>{l.fetchState!=="In-Progress"&&l.fetchState==="Completed"&&u()}),3e5);return()=>clearInterval(C)}),[l.fetchState]),s.useEffect((()=>{if(l.fetchState==="Completed"&&l.monthEndCloseChecks?.auditSummary!=null){const C=f.state?.referrer;Z.trackMonthCloseAuditPage(l.selectedPeriod.month,l.selectedPeriod.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,C??null)}}),[l.fetchState,l.selectedPeriod,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),T.jsx(Si,{children:T.jsx(vc,{monthEndCloseChecksView:l,isRealtimeInsightsFeatureEnabled:o,onMonthEndCheckClick:C=>{n(`./${C}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:F,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:m,handleReviewButtonClick:A,onBackClick:()=>{n("../../dashboard")},onReload:u,isAiCfoAccessEnabled:S,onAskAiCfoClick:R,aiAuditScorePercentageEnabled:r})})},Si=be.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-DXYs6rwe.js";import{a as r}from"./sentry-BmkYxd02.js";import{ax as l,ay as p,o as d,a5 as f}from"./index-DanGKFMl.js";import"./mui-BLmtkCLd.js";import m from"./NotFoundScreen-DJ-T97HU.js";import{h as u,g as b}from"./core-B2JcUSRu.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="60a0e4fc-cea0-4b94-9a7a-0ae511272ea9",a._sentryDebugIdIdentifier="sentry-dbid-60a0e4fc-cea0-4b94-9a7a-0ae511272ea9")}catch{}})();const _=()=>{const a=u(),e=b(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),i=r.useCallback((()=>{(()=>{const n=f(e.state?.pathnameStackToGoBack),c=n.poppedPathname??k();a(c,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=l(e.pathname);return o!=null?s.jsx(p,{menuItem:d(o),onDemoClick:t,onGoBack:i}):s.jsx(m,{})},k=(a=2)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e};export{_ as F};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./sentry-
|
|
1
|
+
import{a as r}from"./sentry-BmkYxd02.js";import{u as l,h as m,g as p}from"./core-B2JcUSRu.js";import{hY as f,Uv as g,Uw as _}from"./zeni-epic-state-DpjvBN7b.js";import{u as h,L as b,z as y}from"./index-DanGKFMl.js";import"./liveblocks-DXYs6rwe.js";import"./recharts-UN7cJOXN.js";import"./mui-BLmtkCLd.js";import"./analytics-BDCkEq_I.js";import"./plaid-DHQC2tsw.js";import"./dnd-BAPMa4RJ.js";import"./stripe-cKAAJElX.js";import"./lottie-C9Rxpkwh.js";import"./lexical-DGZ06Yv6.js";import"./pdf-DMCYUxGc.js";import"./utils-BGWE7tXK.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]="12671680-e636-4380-9aa0-0e93405c9332",e._sentryDebugIdIdentifier="sentry-dbid-12671680-e636-4380-9aa0-0e93405c9332")}catch{}})();function j(){const e=l(),n=m(),o=p(),{setLoading:i,clearAllLoading:d}=h(),s=r.useRef(!1);return r.useLayoutEffect((()=>{i(b.CONNECTION_AUTH)}),[i]),r.useEffect((()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(o.search).get("code"),u=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&u!=null){const t=JSON.parse(u);e(f(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}d();const c=y.getActiveTenantForUser();n(c?.tenantEmailDomain!=null?`/${c.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{j as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as s}from"./liveblocks-
|
|
1
|
+
import{n as s}from"./liveblocks-DXYs6rwe.js";import{j as d}from"./core-B2JcUSRu.js";import{fF as a}from"./zeni-epic-state-DpjvBN7b.js";import"./sentry-BmkYxd02.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="7ecf9165-dd2c-4040-9e65-c840c8a3aad6",e._sentryDebugIdIdentifier="sentry-dbid-7ecf9165-dd2c-4040-9e65-c840c8a3aad6")}catch{}})();const h=()=>d((e=>a(e))).tenantId==null?{inboxNotifications:[],isLoading:!1,isFetchingMore:!1,hasFetchedAll:!0,fetchMore:()=>null}:(()=>{const{inboxNotifications:e,isLoading:o,isFetchingMore:i,hasFetchedAll:t,fetchMore:n}=s();return{inboxNotifications:e,isLoading:o,isFetchingMore:i,hasFetchedAll:t,fetchMore:n}})();export{h as u};
|