@zeniai/web-app-ui 5.3.60-prod → 5.3.61-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-B0Up80xG.js → AccountMappingScreen-Dt4x9DJz.js} +1 -1
- package/dist/assets/{ActualMatchingMatchDetailScreen-CzYXXSw6.js → ActualMatchingMatchDetailScreen-BfyrJWDJ.js} +1 -1
- package/dist/assets/AddressRoutes-DfkTMfYF.js +1 -0
- package/dist/assets/{AddressScreen-CPFzXmPm.js → AddressScreen-DvJ6yyMx.js} +1 -1
- package/dist/assets/{AiCfoScreen-Cv7c9o4z.js → AiCfoScreen-SBmgGufP.js} +1 -1
- package/dist/assets/{AppDrawer-LLG7NS4i.js → AppDrawer-D7FI4GcX.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-CAxeo7o_.js → BillPayApprovalRoutes-BxCZdf21.js} +1 -1
- package/dist/assets/{BillPayRoutes-BULBPpY1.js → BillPayRoutes-07S7DRSx.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-By8favwl.js → BusinessVerificationPageScreen-B20TVwus.js} +1 -1
- package/dist/assets/{CardsAiCfoScreen-BrkEHuKq.js → CardsAiCfoScreen-DkokQGnk.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-1jpypzK8.js → ChargeCardRoutes-BO6dVldC.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-CQnk6tjR.js → CompanyPassportScreen-BEG9__1k.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-CQuOukce.js → ConnectionAuthScreen-C_s5VCbI.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-DFMNQmWy.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-JfYCGYxK.js → CustomerOnboardingRoutes-BFFEQyjG.js} +1 -1
- package/dist/assets/{DashboardRoutes-B3BRkxur.js → DashboardRoutes-B4NxbMLL.js} +1 -1
- package/dist/assets/{DefaultTenantHome-YRLGu4dU.js → DefaultTenantHome-CMvE7WXj.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-ClWh6m7n.js → DomesticWireDetailScreen-B2YgkOu5.js} +1 -1
- package/dist/assets/{DrawerScreen-CTiS9I26.js → DrawerScreen-I5-Ak-b_.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-B6ULNpPb.js → EntityDetailRoutes-BPqa4e5a.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-DopkS3Tt.js → ExpenseAutomationRoutes-BW9gVxz9.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-DWE_gGH1.js → FeaturePreviewScreen-v5dVXn4p.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-CcyYFpte.js → HubSpotOAuthCallbackScreen-CsqGaYGM.js} +1 -1
- package/dist/assets/{InboxNotificationsProvider-DGY6o5Vb.js → InboxNotificationsProvider-B4UF_uUg.js} +1 -1
- package/dist/assets/InvoicingRoutes-CxKyyTQc.js +2 -0
- package/dist/assets/{MagicLinkRoutes-CeFzdzdQ.js → MagicLinkRoutes-DDza_62u.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-Duur8xD5.js → MagicLinkSignInScreen-DGzxNaiE.js} +1 -1
- package/dist/assets/{MobileAppDrawer-DKGu0lT3.js → MobileAppDrawer-0TaE2Qid.js} +1 -1
- package/dist/assets/NotFoundScreen-BatgS8le.js +1 -0
- package/dist/assets/{NotificationRoutes-2gq4kBeF.js → NotificationRoutes-i3qnEWcR.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-DcWSKE9a.js → OAuthConsentScreen-CRExXXMv.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-C39KvHnh.js → PandLWithForecastRoutes-DiipWbFp.js} +1 -1
- package/dist/assets/{PaymentLinkScreen-BU4WB3iV.js → PaymentLinkScreen-D0Hr5oRB.js} +1 -1
- package/dist/assets/{PeopleRoutes-BBh1-5QD.js → PeopleRoutes-CypmG1ct.js} +1 -1
- package/dist/assets/{PerformanceRoutes-iQchHbAg.js → PerformanceRoutes-eA0QwQYt.js} +1 -1
- package/dist/assets/{Preview-BhqYfLP1.js → Preview-Co3i0Xrb.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-Bwrvt4Wr.js → QBOConnectionScreen-BiN0lu_W.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-DMYbzKql.js → ReimbursementApprovalRoutes-ryr0mHPH.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-D73F6Uir.js → ReimbursementApprovalRuleDetailScreen-CRU8C8RZ.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-DGEn1YkJ.js → ReimbursementRoutes-B8NK1spY.js} +1 -1
- package/dist/assets/{ReportsRoutes-bN4Yml9k.js → ReportsRoutes-DRBiAxJk.js} +1 -1
- package/dist/assets/{RewardsRoutes-DKCIvRS5.js → RewardsRoutes-DqoIHOPS.js} +1 -1
- package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-X0qdbxgL.js → ScheduleDetailsPrepaidExpensesScreen-UKD1lb2-.js} +1 -1
- package/dist/assets/{ScreenRoutes-QEJ2cM0D.js → ScreenRoutes-6zCS0eXm.js} +2 -2
- package/dist/assets/{SettingsRoutes-BCzvWJdP.js → SettingsRoutes-Bh4g9wCj.js} +1 -1
- package/dist/assets/{SetupPagesScreen-DQajoHqZ.js → SetupPagesScreen-CdpIgBzw.js} +1 -1
- package/dist/assets/{SignInScreen-B0S_eTlz.js → SignInScreen-C5RNgyDG.js} +1 -1
- package/dist/assets/{SignOutScreen-7tzMUG9r.js → SignOutScreen-BZdppeCA.js} +1 -1
- package/dist/assets/{TaskListScreen-BDVdSCyo.js → TaskListScreen-h6ryhshy.js} +1 -1
- package/dist/assets/{TaskRoutes-ypsBC7BH.js → TaskRoutes-BiQOVouS.js} +1 -1
- package/dist/assets/TransactionDetailRoutes-L8u6TmTF.js +1 -0
- package/dist/assets/{TransactionDetailScreen-B7aagNFt.js → TransactionDetailScreen-KBMzz0Xq.js} +1 -1
- package/dist/assets/{TransactionListRoutes-Bd-_O83J.js → TransactionListRoutes-CKeYxgtl.js} +1 -1
- package/dist/assets/{TreasuryRoutes-DZ64pgse.js → TreasuryRoutes-DsNk_W1Q.js} +1 -1
- package/dist/assets/{VendorsRoutes-BxURmsXb.js → VendorsRoutes-C9tsCt7G.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-CXOTG5K8.js → WiseConfirmationScreen-XbaBW0oW.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-BeAfPFmk.js → ZeniAccountRoutes-Bgi1019U.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-Bkc530dM.js → ZeniAccountStatementScreen-L3XK5pKW.js} +1 -1
- package/dist/assets/{accountMappingHelper-Mpz5AA-4.js → accountMappingHelper-Ci74NLEW.js} +1 -1
- package/dist/assets/{analytics-aFpUj4gs.js → analytics-8lQ_GaR7.js} +1 -1
- package/dist/assets/{analyticsHelper-I16kGxOb.js → analyticsHelper-C6SU-53H.js} +1 -1
- package/dist/assets/{core-DWK-yy-f.js → core-B-8b0iz9.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-vftzpe4R.js → decodeURIComponentSafe-hAviH84T.js} +1 -1
- package/dist/assets/{dnd-BQcaJ1VA.js → dnd-CtOxA7uX.js} +1 -1
- package/dist/assets/{empty-eSeT5naV.js → empty-CyiOIGJw.js} +1 -1
- package/dist/assets/{empty-L_7q6YD9.js → empty-ZUR8mjP1.js} +1 -1
- package/dist/assets/{emptyVideoElement-B_2Bil8G.js → emptyVideoElement-Dch9mr3K.js} +1 -1
- package/dist/assets/{epic-BUfkaLvQ.js → epic-C_YIXfJm.js} +1 -1
- package/dist/assets/{expenseAutomationHelper-DzkVKD6z.js → expenseAutomationHelper-BzOPc0En.js} +1 -1
- package/dist/assets/{getLocaleForTenant-gphiv_jN.js → getLocaleForTenant-D57C4sYC.js} +1 -1
- package/dist/assets/{index-BbsabDnc.js → index-BUsi93tT.js} +2 -2
- package/dist/assets/{index-DZ8wWaVs.js → index-Ce-G0Vp2.js} +1 -1
- package/dist/assets/{index-DS_EsQOR.js → index-CgYr_9vs.js} +1 -1
- package/dist/assets/{index-CvWJGZtQ.js → index-CzpjeHcU.js} +1 -1
- package/dist/assets/{index-Bh2HxktJ.js → index-DeS-5gfC.js} +1 -1
- package/dist/assets/{index-B6CDEkoa.js → index-DuxR1XDX.js} +10 -10
- package/dist/assets/{index-BAGTnDG5.js → index-b65XjN06.js} +1 -1
- package/dist/assets/{index-C2042L2L.js → index-haVo7C6B.js} +1 -1
- package/dist/assets/{lexical-D0wtImar.js → lexical-BVt4M34U.js} +1 -1
- package/dist/assets/{liveblocks-Oqbhz69O.js → liveblocks-BjcYyeQ6.js} +1 -1
- package/dist/assets/{lottie-BLloBrVp.js → lottie-BdAYiWcR.js} +1 -1
- package/dist/assets/{mui-CXd5PBjh.js → mui-C33Oegsm.js} +1 -1
- package/dist/assets/{pathToGoBack-CMbLg1sX.js → pathToGoBack-Bgu6njoM.js} +1 -1
- package/dist/assets/{pdf-B7YVgnpS.js → pdf-BkfulyEw.js} +3 -3
- package/dist/assets/{pdf-lib-DzE-mOjV.js → pdf-lib-D8o-uP9K.js} +1 -1
- package/dist/assets/{plaid--nk7zPNe.js → plaid-Bt28AVCt.js} +1 -1
- package/dist/assets/{pusher--PypbzYW.js → pusher-BWEmmbE9.js} +1 -1
- package/dist/assets/{react-6UxkQDrW.js → react-B7GqIpoL.js} +1 -1
- package/dist/assets/{react-DFLY8vee.js → react-BAH__mX9.js} +1 -1
- package/dist/assets/{react-Sh3vsnSc.js → react-CIEK2Ei-.js} +1 -1
- package/dist/assets/{react-BT1dOlTR.js → react-DT9gMpbF.js} +1 -1
- package/dist/assets/{react-BuOjVnjn.js → react-Dqb011PB.js} +1 -1
- package/dist/assets/{react-BChMyOid.js → react-Ls8UDl46.js} +1 -1
- package/dist/assets/{recharts-BTQwLLFS.js → recharts-DkYxIsLi.js} +1 -1
- package/dist/assets/{routePaths-C8QqLxFB.js → routePaths-B1syYHWh.js} +1 -1
- package/dist/assets/{sentry-DaOZuZWH.js → sentry-DZ9rNYfw.js} +1 -1
- package/dist/assets/{stripSplatSuffix-AHDw7hZv.js → stripSplatSuffix-Te2Zqy4u.js} +1 -1
- package/dist/assets/{url-DlysUiEV.js → url-BjdrSaU1.js} +1 -1
- package/dist/assets/{url-C25LBXwb.js → url-DY2r7CPa.js} +1 -1
- package/dist/assets/{useActualMatchingMatchDetail-zhZcmvn_.js → useActualMatchingMatchDetail-DZnxtuQj.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-Bqb_1s-5.js → useAiCfoDashboardSuggestedQuestionsChips-SBKf0Pu3.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-BSGTY8mB.js → useAskAiCfoHostNavButtonProps-CvEN7QS-.js} +1 -1
- package/dist/assets/{useChargeCardPusherEvents-DoaTdQfx.js → useChargeCardPusherEvents-DmcXit2D.js} +1 -1
- package/dist/assets/{useDeviceId-DqbeMLtN.js → useDeviceId-gFU5q5zf.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-CxfuikLi.js → useEmailConnectResultRefresh-BwFVhfcX.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-zQQSgVed.js → useInitialThreadRequest-Chu-ipGI.js} +1 -1
- package/dist/assets/{useTaskManagerAccess-BrYDFvXq.js → useTaskManagerAccess-ECD0Ec-b.js} +1 -1
- package/dist/assets/{useTaskManagerPusherEvents-BYlEPB1C.js → useTaskManagerPusherEvents-BnGLCsCG.js} +1 -1
- package/dist/assets/{utils-wj3imWq2.js → utils-D3rZq_G4.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-CwmhFH4y.js → withTransactionSidePanel-qep2Sc8k.js} +1 -1
- package/dist/assets/{zeni-epic-state-BHC2ac1c.js → zeni-epic-state-95zxmizy.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/AddressRoutes-wiOHxKnp.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-CO2rse9H.js +0 -1
- package/dist/assets/InvoicingRoutes-DQDlW9Lb.js +0 -2
- package/dist/assets/NotFoundScreen-CjtnHhJo.js +0 -1
- package/dist/assets/TransactionDetailRoutes-DvnHpdlK.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-
|
|
2
|
-
import{_ as s,bn as hs,fF as ps,d_ as xs,dZ as gs,B1 as Rs,di as js,c8 as Is,gJ as Ts,g9 as As,df as pe,cG as bs,gn as Ds,cy as fs,bE as ys,br as Cs,Ue as vs,v as Us,Uh as Os,bq as Ps,Ui as ws,bK as Fs,bJ as Ls,bt as ks,cu as Vs,Uj as Hs,Uk as Ss,da as Bs,dd as Ns,dc as Ms,cF as Zs,cM as Gs,pS as xe,gi as ge,gY as $s,gk as Re,gL as je,gM as Ie,gl as zs}from"./zeni-epic-state-BHC2ac1c.js";import{j as e}from"./liveblocks-Oqbhz69O.js";import{a as P}from"./sentry-DaOZuZWH.js";import{N as u,u as Ys,h as qs,i as Js,g as Ws,j as G,q as Te,n as Ks,o as n}from"./core-DWK-yy-f.js";import{J as l,E as Qs,u as Xs,z as y,o as et,d as st,Q as tt,S as B,f as nt,X as at,K as ot,L as F,G as Ae,t as _,M as it,P as rt,T as lt,k as ne}from"./index-B6CDEkoa.js";import"./mui-CXd5PBjh.js";import{f as be}from"./analyticsHelper-I16kGxOb.js";import{t as ut}from"./getLocaleForTenant-gphiv_jN.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},D=new o.Error().stack;D&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[D]="10c000b7-1505-4c3b-88c0-8c2c23f1a1ed",o._sentryDebugIdIdentifier="sentry-dbid-10c000b7-1505-4c3b-88c0-8c2c23f1a1ed")}catch{}})();const dt=l((()=>s((()=>import("./NotFoundScreen-CjtnHhJo.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),ct=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),mt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),De=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),fe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),ye=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),C=({showZeniAccountRoute:o,isUserHasBillPayAccess:D,isUserHasReimbursementAccess:N,showTreasuryRoute:r,isTenantBankingOnly:k,showChargeCardRoute:U,tenantEmailDomain:v})=>{if(k===!0){if(o)return e.jsx(fe,{tenantEmailDomain:v});if(r)return e.jsx(De,{tenantEmailDomain:v});if(U)return e.jsx(ye,{tenantEmailDomain:v})}return o?e.jsx(fe,{tenantEmailDomain:v}):r?e.jsx(De,{tenantEmailDomain:v}):U?e.jsx(ye,{tenantEmailDomain:v}):D?e.jsx(mt,{tenantEmailDomain:v}):N?e.jsx(ct,{tenantEmailDomain:v}):e.jsx(dt,{})},_t={dashboard:()=>s((()=>import("./DashboardRoutes-B3BRkxur.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,0,18,19,20,21,22,23,24,8])),bills:()=>s((()=>import("./BillPayRoutes-BULBPpY1.js")),__vite__mapDeps([25,1,2,3,4,5,6,7,26,0,27,11,14,28,15,20,21,22,29,24,30,18,31,32,33,8])),reimbursement:()=>s((()=>import("./ReimbursementRoutes-DGEn1YkJ.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,11,14,29,35,32,33,8])),transactions:()=>s((()=>import("./TransactionListRoutes-Bd-_O83J.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,37,8])),settings:()=>s((()=>import("./SettingsRoutes-BCzvWJdP.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,22,39,20,21,40,41,42,43,44,13,45,26,0,18,28,15,19,46,31,32,35,8])),reports:()=>s((()=>import("./ReportsRoutes-bN4Yml9k.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-1jpypzK8.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,11,20,21,22,30,28,15,0,18,14,49,26,8])),people:()=>s((()=>import("./PeopleRoutes-BBh1-5QD.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-DopkS3Tt.js")),__vite__mapDeps([51,1,2,3,0,4,5,6,7,11,12,13,14,15,16,52,17,10,53,54,45,29,8])),treasury:()=>s((()=>import("./TreasuryRoutes-DZ64pgse.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,11,14,24,8])),vendors:()=>s((()=>import("./VendorsRoutes-BxURmsXb.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,26,0,24,53,54,15,11,20,21,22,29,45,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-BeAfPFmk.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,27,26,11,37,8]))},Et=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ae=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},ht=l((()=>s((()=>import("./ReportsRoutes-bN4Yml9k.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])))),pt=l((()=>s((()=>import("./AddressRoutes-wiOHxKnp.js")),__vite__mapDeps([58,1,2,3,26,4,5,6,7,0,8])))),xt=l((()=>s((()=>import("./PeopleRoutes-BBh1-5QD.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])))),gt=l((()=>s((()=>import("./PandLWithForecastRoutes-C39KvHnh.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,0,24,11,14,15,20,21,22,8])))),Rt=l((()=>s((()=>import("./CustomerOnboardingRoutes-JfYCGYxK.js")),__vite__mapDeps([60,1,2,3,26,4,5,6,7,0,40,41,42,43,44,13,46,49,8])))),jt=l((()=>s((()=>import("./VendorsRoutes-BxURmsXb.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,26,0,24,53,54,15,11,20,21,22,29,45,8])))),It=l((()=>s((()=>import("./TransactionDetailRoutes-DvnHpdlK.js")),__vite__mapDeps([61,1,2,3,0,4,5,6,7,12,11,13,14,15,16,8])))),Ce=l((()=>s((()=>import("./EntityDetailRoutes-B6ULNpPb.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,13,10,11,12,14,15,16,17,8])))),Tt=l((()=>s((()=>import("./DashboardRoutes-B3BRkxur.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,0,18,19,20,21,22,23,24,8])))),ve=l((()=>s((()=>import("./BillPayRoutes-BULBPpY1.js")),__vite__mapDeps([25,1,2,3,4,5,6,7,26,0,27,11,14,28,15,20,21,22,29,24,30,18,31,32,33,8])))),At=l((()=>s((()=>import("./SettingsRoutes-BCzvWJdP.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,22,39,20,21,40,41,42,43,44,13,45,26,0,18,28,15,19,46,31,32,35,8])))),bt=l((()=>s((()=>import("./InvoicingRoutes-DQDlW9Lb.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,26,0,20,21,22,40,41,42,43,44,13,8])))),Ue=l((()=>s((()=>import("./ReimbursementRoutes-DGEn1YkJ.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,11,14,29,35,32,33,8])))),Dt=l((()=>s((()=>import("./ZeniAccountRoutes-BeAfPFmk.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,27,26,11,37,8])))),ft=l((()=>s((()=>import("./TreasuryRoutes-DZ64pgse.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,11,14,24,8])))),yt=l((()=>s((()=>import("./TransactionListRoutes-Bd-_O83J.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,37,8])))),Ct=l((()=>s((()=>import("./ChargeCardRoutes-1jpypzK8.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,11,20,21,22,30,28,15,0,18,14,49,26,8])))),vt=l((()=>s((()=>import("./NotificationRoutes-2gq4kBeF.js")),__vite__mapDeps([64,1,2,3,0,4,5,6,7,11,22,8])))),Ut=l((()=>s((()=>import("./PerformanceRoutes-iQchHbAg.js")),__vite__mapDeps([65,1,2,3,0,4,5,6,7,11,20,21,22,8])))),Ot=l((()=>s((()=>import("./ExpenseAutomationRoutes-DopkS3Tt.js")),__vite__mapDeps([51,1,2,3,0,4,5,6,7,11,12,13,14,15,16,52,17,10,53,54,45,29,8])))),Pt=l((()=>s((()=>import("./ActualMatchingMatchDetailScreen-CzYXXSw6.js")),__vite__mapDeps([66,1,2,3,4,5,6,7,52,17,13,15,0,8])))),wt=l((()=>s((()=>import("./RewardsRoutes-DKCIvRS5.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,0,8])))),Ft=l((()=>s((()=>import("./TaskRoutes-ypsBC7BH.js")),__vite__mapDeps([68,1,2,3,0,4,5,6,7,14,20,21,22,69,11,70,8])))),Lt=l((()=>s((()=>import("./AiCfoScreen-Cv7c9o4z.js")),__vite__mapDeps([71,1,2,3,4,5,6,7,23,54,15,70,8])))),Oe=l((()=>s((()=>import("./CardsAiCfoScreen-BrkEHuKq.js")),__vite__mapDeps([72,1,2,3,4,5,6,7,8])))),b=l((()=>s((()=>import("./NotFoundScreen-CjtnHhJo.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),kt=l((()=>s((()=>import("./TaskListScreen-BDVdSCyo.js").then((o=>o.f))),__vite__mapDeps([69,1,2,3,4,5,6,7,11,20,21,22,70,8])))),Vt=({isDashboardAccess:o,showZeniAccountRoute:D,isUserHasBillPayAccess:N,isUserHasReimbursementAccess:r,showTreasuryRoute:k,isTenantBankingOnly:U,isTenantCardsOnly:v,showChargeCardRoute:V})=>{if(U===!0){if(D)return e.jsx(u,{to:"checking"});if(k)return e.jsx(u,{to:"treasury"});if(V)return e.jsx(u,{to:"cards"})}return v===!0&&V?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):D?e.jsx(u,{to:"checking"}):k?e.jsx(u,{to:"treasury"}):V?e.jsx(u,{to:"cards"}):N?e.jsx(u,{to:"bills"}):r?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},Pe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`}),zt=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:o}){const D=Ys(),N=qs(),{tenantEmailDomain:r}=Js(),k=Qs().mode,{setLoading:U,clearAllLoading:v,clearLoading:V}=Xs(),f=y.getSignedInUserTenant(r)?.tenantId,I=y.getSignedInUser(),W=hs(I),$=Ws(),[L,we]=P.useState(!1),i=G((a=>ps(a))),{useFeatureGate:H}=et(),M=st(),K=tt(),Fe=!!i.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=i.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:ke}=H(B.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=H(B.isDebitCardFeatureEnabled),T=G((a=>a.tenantState.fetchState)),p=G((a=>a.tenantState.activeTenantFetchState.fetchState)),E=p==="Completed"||T==="Completed"?xs(oe,i):void 0,Q=p==="Completed"||T==="Completed"?gs(i):void 0,ie=p==="Completed"||T==="Completed"?Rs(i)&&!js(i):void 0,Ve=nt(i,ke,oe),{isCardsHidden:He}=at(i?.tenantId),Se=!Ve||!!He,{isFeatureEnabled:Be}=H(B.isSettingsFeatureEnabled),{isFeatureEnabled:X}=H(B.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=H(B.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||lt==="DEV",Ze=i?.userRole!=null&&Is(i.userRole),z=G((a=>Ts(a)));if(r!=null){const a=y.getSignedInUserTenant(r);I!=null&&a!=null&&be(I,i,k)}const Z={tenantId:f,userId:I?.userId,sessionId:I?.zeniSessionId},re=As(),h=ot(),Ge=i.company==null||h?.loggedInUserRoleMap!=null&&pe(h.loggedInUserRole),$e=bs(h?.loggedInUserRoleMap),ee=Te("/:tenantEmailDomain/onboarding/*")!==null,ze=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),se=ze?.params.selectedPeriod,Ye=G((a=>Z.tenantId!=null?Ds(a,Z.tenantId):void 0));P.useEffect((()=>{U(F.TENANT_FETCHING),o(r)}),[r]),P.useEffect((()=>{if(se!=null&&f!=null){const a=se.split("-");if(a.length===2){const A=fs(Number(a[0])),c=Number(a[1]),t=ys(`01-${A<10?`0${A}`:A}-${c}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),d=Cs();t.isAfter(d,"month")===!1?D(vs(f,{month:A,year:c})):N(`/${r}/month_end_close_checks/review`)}}}),[se,r,f]),P.useEffect((()=>{L||(we(!0),U(F.TENANT_FETCHING))}),[L,Z,re,I,D,y]),P.useLayoutEffect((()=>{!Us(re,Z)&&y.isSignedIn()&&(U(F.TENANT_FETCHING),(function(a,A,c,t){if(ge(A?.userId,A?.zeniSessionId,a.tenantId),c($s(!0)),c(Re(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const d=y.getSignedInUserTenantWithId(a.tenantId);t&&Ae.updateAppLocaleID(ut(t)),d?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(d?.tenantEmailDomain)}a.userId!=null?ne.identify(a.userId,{tenant_id:a.tenantId}):ne.resetUserIdentity()})(Z,I,D,Ye))}),[f]),P.useEffect((()=>{y.isSignedIn()&&(U(F.TENANT_FETCHING),(function(a,A,c,t,d,Y,S){if(c==null&&t==null)return void console.warn("There is no current tenant selected!!");const q=t!=null&&d?.zeniSessionId!=null,ms=c==null||c.tenantId!==t,_s=c!=null&&c.excludedResources==null,Es=c!=null&&c.externalConnections==null;if(q&&ms){S(Re(t));const J=y.getSignedInUserTenantWithId(t);J?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(J?.tenantEmailDomain),ge(d?.userId,d?.zeniSessionId,t),_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),S(je(d.userId,t))),_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),S(Ie(d.userId,t)))}else q&&_s&&_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),S(je(d.userId,t))),q&&Es&&_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),S(Ie(d.userId,t)));if(q){ne.identify(d.userId,{tenant_id:t});const J=t==null||t!=null&&(A==="Completed"||A==="Error");a==="Completed"||A!=="Not-Started"&&A!=="Error"||t==null||!_.shouldFetchActiveTenant(t)||(_.markActiveTenantFetchStarted(t),Y(F.TENANT_FETCHING),S(zs(d.userId,t,d.zeniSessionId))),J&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),S(xe(d.userId,d.zeniSessionId)))}})(T,p,i,f,I,U,D))}),[f,p]),P.useEffect((()=>{y.isSignedIn()&&T==="Completed"&&z.tenantsBaseInOrder.length>0&&(V(F.TENANT_FETCHING),y.saveSignedInUserTenants(Os(z.tenantsBaseInOrder)),I!=null&&be(I,i,k,void 0,z.tenantsBaseInOrder))}),[z,T,i,I]),P.useEffect((()=>{p==="In-Progress"&&U(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&f!=null?(v(),_.markActiveTenantFetchCompleted(f)):p==="Error"&&f!=null&&(_.markActiveTenantFetchFailed(f),V(F.TENANT_FETCHING),V(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,f,L]);const le=P.useRef(!1);P.useEffect((()=>{!le.current&&p==="Completed"&&L&&(le.current=!0,(function(a=Et,A=3e3){setTimeout((()=>{const c=t=>{if(t>=a.length)return;const d=a[t],Y=_t[d];Y!=null?Y().then((()=>ae((()=>c(t+1))))).catch((()=>ae((()=>c(t+1))))):c(t+1)};ae((()=>c(0)))}),A)})())}),[p,L]);const O=i?.userRole!=null&&Ps(i?.userRole),{isFeatureEnabled:qe}=H(B.isReferralFeatureEnabled),{isFeatureEnabled:Je}=H(B.isAccrualEnabled),We=it(),Ke=i?.userRole!=null&&i.userRole.includes("charge_card_user"),Qe=i?.userRole!=null&&i.userRole.includes("charge_card_admin"),w=i?.userRole!=null&&pe(i.userRole),ue=i?.company==null||i.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!O,de=!Se&&!O,Xe=ws(h?.loggedInUserRoleMap),es=i.externalConnections?.accounting[0]?.isValid,ss=i.externalConnections?.fetchState==="Completed",te=i.company?.companyOnboardingInfo.isOnboardingCompleted,ce=i?.company==null||i.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!O,me=ce&&Fs(h?.loggedInUserRoleMap),_e=Fe&&!O,ts=Le&&!O,ns=ue&&Ls(h?.loggedInUserRoleMap),as=de&&ks(h?.loggedInUserRoleMap),os=_e&&Vs(h?.loggedInUserRoleMap),is=Hs(h?.loggedInUserRoleMap),rs=Ss(h?.loggedInUserRoleMap),ls=Bs(h?.loggedInUserRoleMap),us=Ns(h?.loggedInUserRoleMap),ds=Ms(h?.loggedInUserRoleMap),x=Zs(h?.loggedInUserRoleMap),g=Gs(h?.loggedInUserRoleMap),Ee=ue&&x,he=ce&&g,R=_e&&ls,j=ts&&us,m=de&&ds,cs=i.excludedResources?.resources?.find((a=>a.resource==="/invites"))!=null||$e===!0||Xe===!0||is===!0||rs===!0;return y.isSignedIn()?f==null?T==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(I!=null&&T!=="In-Progress"&&D(xe(I.userId,I.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||T==="Completed"?(te===!0||W&&!ee)&&ss&&es!==!0&&E===!1&&Q===!1&&ie===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||ie!==!0||te!==!0||ee||W?!L||te!==!1||ee||W?L&&i?.userRole&&E!=null&&Q!=null&&r!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(Ks,{children:e.jsxs(n,{element:e.jsx(rt,{}),children:[e.jsx(n,{path:"/",element:e.jsx(Vt,{isDashboardAccess:w,showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,isTenantCardsOnly:Q,showChargeCardRoute:m})}),e.jsx(n,{path:"dashboard/*",element:w?e.jsx(Tt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"reports/*",element:w?e.jsx(ht,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"people/*",element:cs||w?e.jsx(xt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"forecast/*",element:w?e.jsx(gt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"onboarding/*",element:e.jsx(Rt,{})}),e.jsx(n,{path:"transaction/*",element:w&&O===!1||Ke||Qe?e.jsx(It,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"transactions/*",element:w&&O===!1?e.jsx(yt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"customer/*",element:w&&O===!1?e.jsx(Ce,{entityType:"customer"}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,isTenantBankingOnly:E,showTreasuryRoute:j,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"vendor/*",element:w&&O===!1?e.jsx(Ce,{entityType:"vendor"}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"tasks",element:e.jsx(kt,{})}),e.jsx(n,{path:"tasks/*",element:e.jsx(Ft,{})}),e.jsx(n,{path:"address/*",element:ns||me||os||as?e.jsx(pt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"checking/*",element:R?e.jsx(Dt,{}):e.jsx(b,{})}),e.jsx(n,{path:"treasury/*",element:j?e.jsx(ft,{}):e.jsx(b,{})}),e.jsx(n,{path:"performance",element:K===!0?e.jsx(Ut,{}):e.jsx(Pe,{tenantEmailDomain:r})}),e.jsx(n,{path:"month_end_close_checks/review/*",element:K===!0&&O===!1?e.jsx(Ot,{}):e.jsx(Pe,{tenantEmailDomain:r})}),e.jsx(n,{path:"expense-automation/actual-matching/:matchId",element:K===!0&&O===!1&&Je===!0&&We===!0?e.jsx(Pt,{}):e.jsx(b,{})}),e.jsx(n,{path:"notifications/*",element:e.jsx(vt,{})}),e.jsx(n,{path:"vendors/*",element:Ge?e.jsx(jt,{}):e.jsx(b,{})}),e.jsx(n,{path:"bill/*",element:Ee?e.jsx(ve,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"bills/*",element:Ee?e.jsx(ve,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"reimbursement/*",element:he?e.jsx(Ue,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"reimbursements/*",element:he?e.jsx(Ue,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"settings/*",element:Be?e.jsx(At,{hasAdminLevelAccess:me}):e.jsx(b,{})}),e.jsx(n,{path:"invoicing/*",element:Me&&Ze?e.jsx(bt,{}):e.jsx(b,{})}),e.jsx(n,{path:"cards/ask",element:m&&M?e.jsx(Oe,{isFileUploadEnabled:X}):e.jsx(b,{})}),e.jsx(n,{path:"cards/ask/:session_id",element:m&&M?e.jsx(Oe,{isFileUploadEnabled:X}):e.jsx(b,{})}),e.jsx(n,{path:"cards/*",element:m?e.jsx(Ct,{}):e.jsx(b,{})}),e.jsx(n,{path:"rewards/*",element:qe?e.jsx(wt,{}):e.jsx(b,{})}),e.jsx(n,{path:"/ai-cfo",element:M?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(n,{path:"/ai-cfo/",element:M?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(n,{path:"/ai-cfo/:session_id",element:M?e.jsx(Lt,{isFileUploadEnabled:X}):e.jsx(b,{})}),e.jsx(n,{path:"*",element:e.jsx(b,{})})]})}):null:(o(void 0),e.jsx(u,{to:`/${r}/onboarding`,replace:!0})):(o(void 0),e.jsx(u,{to:`/${r}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{C as F,zt as S};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-BatgS8le.js","assets/sentry-DZ9rNYfw.js","assets/core-B-8b0iz9.js","assets/zeni-epic-state-95zxmizy.js","assets/index-DuxR1XDX.js","assets/mui-C33Oegsm.js","assets/analytics-8lQ_GaR7.js","assets/utils-D3rZq_G4.js","assets/index-BhC2LNQw.css","assets/DashboardRoutes-B4NxbMLL.js","assets/withTransactionSidePanel-qep2Sc8k.js","assets/useAskAiCfoHostNavButtonProps-CvEN7QS-.js","assets/TransactionDetailScreen-KBMzz0Xq.js","assets/decodeURIComponentSafe-hAviH84T.js","assets/useInitialThreadRequest-Chu-ipGI.js","assets/routePaths-B1syYHWh.js","assets/expenseAutomationHelper-BzOPc0En.js","assets/stripSplatSuffix-Te2Zqy4u.js","assets/analyticsHelper-C6SU-53H.js","assets/CompanyPassportScreen-BEG9__1k.js","assets/MobileAppDrawer-0TaE2Qid.js","assets/InboxNotificationsProvider-B4UF_uUg.js","assets/useTaskManagerAccess-ECD0Ec-b.js","assets/useAiCfoDashboardSuggestedQuestionsChips-SBKf0Pu3.js","assets/FeaturePreviewScreen-v5dVXn4p.js","assets/BillPayRoutes-07S7DRSx.js","assets/AddressScreen-DvJ6yyMx.js","assets/DomesticWireDetailScreen-B2YgkOu5.js","assets/BusinessVerificationPageScreen-B20TVwus.js","assets/DrawerScreen-I5-Ak-b_.js","assets/SetupPagesScreen-CdpIgBzw.js","assets/BillPayApprovalRoutes-BxCZdf21.js","assets/ReimbursementApprovalRuleDetailScreen-CRU8C8RZ.js","assets/getLocaleForTenant-D57C4sYC.js","assets/ReimbursementRoutes-B8NK1spY.js","assets/ReimbursementApprovalRoutes-ryr0mHPH.js","assets/TransactionListRoutes-CKeYxgtl.js","assets/ZeniAccountStatementScreen-L3XK5pKW.js","assets/SettingsRoutes-Bh4g9wCj.js","assets/AccountMappingScreen-Dt4x9DJz.js","assets/QBOConnectionScreen-BiN0lu_W.js","assets/empty-CyiOIGJw.js","assets/index-CgYr_9vs.js","assets/url-BjdrSaU1.js","assets/index-CzpjeHcU.js","assets/accountMappingHelper-Ci74NLEW.js","assets/useEmailConnectResultRefresh-BwFVhfcX.js","assets/ReportsRoutes-DRBiAxJk.js","assets/ChargeCardRoutes-BO6dVldC.js","assets/useChargeCardPusherEvents-DmcXit2D.js","assets/PeopleRoutes-CypmG1ct.js","assets/ExpenseAutomationRoutes-BW9gVxz9.js","assets/useActualMatchingMatchDetail-DZnxtuQj.js","assets/ScheduleDetailsPrepaidExpensesScreen-UKD1lb2-.js","assets/pathToGoBack-Bgu6njoM.js","assets/TreasuryRoutes-DsNk_W1Q.js","assets/VendorsRoutes-C9tsCt7G.js","assets/ZeniAccountRoutes-Bgi1019U.js","assets/AddressRoutes-DfkTMfYF.js","assets/PandLWithForecastRoutes-DiipWbFp.js","assets/CustomerOnboardingRoutes-BFFEQyjG.js","assets/TransactionDetailRoutes-L8u6TmTF.js","assets/EntityDetailRoutes-BPqa4e5a.js","assets/InvoicingRoutes-CxKyyTQc.js","assets/NotificationRoutes-i3qnEWcR.js","assets/PerformanceRoutes-eA0QwQYt.js","assets/ActualMatchingMatchDetailScreen-BfyrJWDJ.js","assets/RewardsRoutes-DqoIHOPS.js","assets/TaskRoutes-BiQOVouS.js","assets/TaskListScreen-h6ryhshy.js","assets/useTaskManagerPusherEvents-BnGLCsCG.js","assets/AiCfoScreen-SBmgGufP.js","assets/CardsAiCfoScreen-DkokQGnk.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as s,bn as hs,fF as ps,d_ as xs,dZ as gs,B1 as Rs,di as js,c8 as Is,gJ as Ts,g9 as As,df as pe,cG as bs,gn as Ds,cy as fs,bE as ys,br as Cs,Ue as vs,v as Us,Uh as Os,bq as Ps,Ui as ws,bK as Fs,bJ as Ls,bt as ks,cu as Vs,Uj as Hs,Uk as Ss,da as Bs,dd as Ns,dc as Ms,cF as Zs,cM as Gs,pS as xe,gi as ge,gY as $s,gk as Re,gL as je,gM as Ie,gl as zs}from"./zeni-epic-state-95zxmizy.js";import{j as e}from"./liveblocks-BjcYyeQ6.js";import{a as P}from"./sentry-DZ9rNYfw.js";import{N as u,u as Ys,h as qs,i as Js,g as Ws,j as G,q as Te,n as Ks,o as n}from"./core-B-8b0iz9.js";import{J as l,E as Qs,u as Xs,z as y,o as et,d as st,Q as tt,S as B,f as nt,X as at,K as ot,L as F,G as Ae,t as _,M as it,P as rt,T as lt,k as ne}from"./index-DuxR1XDX.js";import"./mui-C33Oegsm.js";import{f as be}from"./analyticsHelper-C6SU-53H.js";import{t as ut}from"./getLocaleForTenant-D57C4sYC.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},D=new o.Error().stack;D&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[D]="10c000b7-1505-4c3b-88c0-8c2c23f1a1ed",o._sentryDebugIdIdentifier="sentry-dbid-10c000b7-1505-4c3b-88c0-8c2c23f1a1ed")}catch{}})();const dt=l((()=>s((()=>import("./NotFoundScreen-BatgS8le.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),ct=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),mt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),De=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),fe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),ye=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),C=({showZeniAccountRoute:o,isUserHasBillPayAccess:D,isUserHasReimbursementAccess:N,showTreasuryRoute:r,isTenantBankingOnly:k,showChargeCardRoute:U,tenantEmailDomain:v})=>{if(k===!0){if(o)return e.jsx(fe,{tenantEmailDomain:v});if(r)return e.jsx(De,{tenantEmailDomain:v});if(U)return e.jsx(ye,{tenantEmailDomain:v})}return o?e.jsx(fe,{tenantEmailDomain:v}):r?e.jsx(De,{tenantEmailDomain:v}):U?e.jsx(ye,{tenantEmailDomain:v}):D?e.jsx(mt,{tenantEmailDomain:v}):N?e.jsx(ct,{tenantEmailDomain:v}):e.jsx(dt,{})},_t={dashboard:()=>s((()=>import("./DashboardRoutes-B4NxbMLL.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,0,18,19,20,21,22,23,24,8])),bills:()=>s((()=>import("./BillPayRoutes-07S7DRSx.js")),__vite__mapDeps([25,1,2,3,4,5,6,7,26,0,27,11,14,28,15,20,21,22,29,24,30,18,31,32,33,8])),reimbursement:()=>s((()=>import("./ReimbursementRoutes-B8NK1spY.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,11,14,29,35,32,33,8])),transactions:()=>s((()=>import("./TransactionListRoutes-CKeYxgtl.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,37,8])),settings:()=>s((()=>import("./SettingsRoutes-Bh4g9wCj.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,22,39,20,21,40,41,42,43,44,13,45,26,0,18,28,15,19,46,31,32,35,8])),reports:()=>s((()=>import("./ReportsRoutes-DRBiAxJk.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-BO6dVldC.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,11,20,21,22,30,28,15,0,18,14,49,26,8])),people:()=>s((()=>import("./PeopleRoutes-CypmG1ct.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-BW9gVxz9.js")),__vite__mapDeps([51,1,2,3,0,4,5,6,7,11,12,13,14,15,16,52,17,10,53,54,45,29,8])),treasury:()=>s((()=>import("./TreasuryRoutes-DsNk_W1Q.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,11,14,24,8])),vendors:()=>s((()=>import("./VendorsRoutes-C9tsCt7G.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,26,0,24,53,54,15,11,20,21,22,29,45,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-Bgi1019U.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,27,26,11,37,8]))},Et=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ae=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},ht=l((()=>s((()=>import("./ReportsRoutes-DRBiAxJk.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])))),pt=l((()=>s((()=>import("./AddressRoutes-DfkTMfYF.js")),__vite__mapDeps([58,1,2,3,26,4,5,6,7,0,8])))),xt=l((()=>s((()=>import("./PeopleRoutes-CypmG1ct.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])))),gt=l((()=>s((()=>import("./PandLWithForecastRoutes-DiipWbFp.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,0,24,11,14,15,20,21,22,8])))),Rt=l((()=>s((()=>import("./CustomerOnboardingRoutes-BFFEQyjG.js")),__vite__mapDeps([60,1,2,3,26,4,5,6,7,0,40,41,42,43,44,13,46,49,8])))),jt=l((()=>s((()=>import("./VendorsRoutes-C9tsCt7G.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,26,0,24,53,54,15,11,20,21,22,29,45,8])))),It=l((()=>s((()=>import("./TransactionDetailRoutes-L8u6TmTF.js")),__vite__mapDeps([61,1,2,3,0,4,5,6,7,12,11,13,14,15,16,8])))),Ce=l((()=>s((()=>import("./EntityDetailRoutes-BPqa4e5a.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,13,10,11,12,14,15,16,17,8])))),Tt=l((()=>s((()=>import("./DashboardRoutes-B4NxbMLL.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,0,18,19,20,21,22,23,24,8])))),ve=l((()=>s((()=>import("./BillPayRoutes-07S7DRSx.js")),__vite__mapDeps([25,1,2,3,4,5,6,7,26,0,27,11,14,28,15,20,21,22,29,24,30,18,31,32,33,8])))),At=l((()=>s((()=>import("./SettingsRoutes-Bh4g9wCj.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,22,39,20,21,40,41,42,43,44,13,45,26,0,18,28,15,19,46,31,32,35,8])))),bt=l((()=>s((()=>import("./InvoicingRoutes-CxKyyTQc.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,26,0,20,21,22,40,41,42,43,44,13,8])))),Ue=l((()=>s((()=>import("./ReimbursementRoutes-B8NK1spY.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,11,14,29,35,32,33,8])))),Dt=l((()=>s((()=>import("./ZeniAccountRoutes-Bgi1019U.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,27,26,11,37,8])))),ft=l((()=>s((()=>import("./TreasuryRoutes-DsNk_W1Q.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,11,14,24,8])))),yt=l((()=>s((()=>import("./TransactionListRoutes-CKeYxgtl.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,37,8])))),Ct=l((()=>s((()=>import("./ChargeCardRoutes-BO6dVldC.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,11,20,21,22,30,28,15,0,18,14,49,26,8])))),vt=l((()=>s((()=>import("./NotificationRoutes-i3qnEWcR.js")),__vite__mapDeps([64,1,2,3,0,4,5,6,7,11,22,8])))),Ut=l((()=>s((()=>import("./PerformanceRoutes-eA0QwQYt.js")),__vite__mapDeps([65,1,2,3,0,4,5,6,7,11,20,21,22,8])))),Ot=l((()=>s((()=>import("./ExpenseAutomationRoutes-BW9gVxz9.js")),__vite__mapDeps([51,1,2,3,0,4,5,6,7,11,12,13,14,15,16,52,17,10,53,54,45,29,8])))),Pt=l((()=>s((()=>import("./ActualMatchingMatchDetailScreen-BfyrJWDJ.js")),__vite__mapDeps([66,1,2,3,4,5,6,7,52,17,13,15,0,8])))),wt=l((()=>s((()=>import("./RewardsRoutes-DqoIHOPS.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,0,8])))),Ft=l((()=>s((()=>import("./TaskRoutes-BiQOVouS.js")),__vite__mapDeps([68,1,2,3,0,4,5,6,7,14,20,21,22,69,11,70,8])))),Lt=l((()=>s((()=>import("./AiCfoScreen-SBmgGufP.js")),__vite__mapDeps([71,1,2,3,4,5,6,7,23,54,15,70,8])))),Oe=l((()=>s((()=>import("./CardsAiCfoScreen-DkokQGnk.js")),__vite__mapDeps([72,1,2,3,4,5,6,7,8])))),b=l((()=>s((()=>import("./NotFoundScreen-BatgS8le.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),kt=l((()=>s((()=>import("./TaskListScreen-h6ryhshy.js").then((o=>o.f))),__vite__mapDeps([69,1,2,3,4,5,6,7,11,20,21,22,70,8])))),Vt=({isDashboardAccess:o,showZeniAccountRoute:D,isUserHasBillPayAccess:N,isUserHasReimbursementAccess:r,showTreasuryRoute:k,isTenantBankingOnly:U,isTenantCardsOnly:v,showChargeCardRoute:V})=>{if(U===!0){if(D)return e.jsx(u,{to:"checking"});if(k)return e.jsx(u,{to:"treasury"});if(V)return e.jsx(u,{to:"cards"})}return v===!0&&V?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):D?e.jsx(u,{to:"checking"}):k?e.jsx(u,{to:"treasury"}):V?e.jsx(u,{to:"cards"}):N?e.jsx(u,{to:"bills"}):r?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},Pe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`}),zt=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:o}){const D=Ys(),N=qs(),{tenantEmailDomain:r}=Js(),k=Qs().mode,{setLoading:U,clearAllLoading:v,clearLoading:V}=Xs(),f=y.getSignedInUserTenant(r)?.tenantId,I=y.getSignedInUser(),W=hs(I),$=Ws(),[L,we]=P.useState(!1),i=G((a=>ps(a))),{useFeatureGate:H}=et(),M=st(),K=tt(),Fe=!!i.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=i.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:ke}=H(B.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=H(B.isDebitCardFeatureEnabled),T=G((a=>a.tenantState.fetchState)),p=G((a=>a.tenantState.activeTenantFetchState.fetchState)),E=p==="Completed"||T==="Completed"?xs(oe,i):void 0,Q=p==="Completed"||T==="Completed"?gs(i):void 0,ie=p==="Completed"||T==="Completed"?Rs(i)&&!js(i):void 0,Ve=nt(i,ke,oe),{isCardsHidden:He}=at(i?.tenantId),Se=!Ve||!!He,{isFeatureEnabled:Be}=H(B.isSettingsFeatureEnabled),{isFeatureEnabled:X}=H(B.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=H(B.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||lt==="DEV",Ze=i?.userRole!=null&&Is(i.userRole),z=G((a=>Ts(a)));if(r!=null){const a=y.getSignedInUserTenant(r);I!=null&&a!=null&&be(I,i,k)}const Z={tenantId:f,userId:I?.userId,sessionId:I?.zeniSessionId},re=As(),h=ot(),Ge=i.company==null||h?.loggedInUserRoleMap!=null&&pe(h.loggedInUserRole),$e=bs(h?.loggedInUserRoleMap),ee=Te("/:tenantEmailDomain/onboarding/*")!==null,ze=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),se=ze?.params.selectedPeriod,Ye=G((a=>Z.tenantId!=null?Ds(a,Z.tenantId):void 0));P.useEffect((()=>{U(F.TENANT_FETCHING),o(r)}),[r]),P.useEffect((()=>{if(se!=null&&f!=null){const a=se.split("-");if(a.length===2){const A=fs(Number(a[0])),c=Number(a[1]),t=ys(`01-${A<10?`0${A}`:A}-${c}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),d=Cs();t.isAfter(d,"month")===!1?D(vs(f,{month:A,year:c})):N(`/${r}/month_end_close_checks/review`)}}}),[se,r,f]),P.useEffect((()=>{L||(we(!0),U(F.TENANT_FETCHING))}),[L,Z,re,I,D,y]),P.useLayoutEffect((()=>{!Us(re,Z)&&y.isSignedIn()&&(U(F.TENANT_FETCHING),(function(a,A,c,t){if(ge(A?.userId,A?.zeniSessionId,a.tenantId),c($s(!0)),c(Re(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const d=y.getSignedInUserTenantWithId(a.tenantId);t&&Ae.updateAppLocaleID(ut(t)),d?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(d?.tenantEmailDomain)}a.userId!=null?ne.identify(a.userId,{tenant_id:a.tenantId}):ne.resetUserIdentity()})(Z,I,D,Ye))}),[f]),P.useEffect((()=>{y.isSignedIn()&&(U(F.TENANT_FETCHING),(function(a,A,c,t,d,Y,S){if(c==null&&t==null)return void console.warn("There is no current tenant selected!!");const q=t!=null&&d?.zeniSessionId!=null,ms=c==null||c.tenantId!==t,_s=c!=null&&c.excludedResources==null,Es=c!=null&&c.externalConnections==null;if(q&&ms){S(Re(t));const J=y.getSignedInUserTenantWithId(t);J?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(J?.tenantEmailDomain),ge(d?.userId,d?.zeniSessionId,t),_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),S(je(d.userId,t))),_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),S(Ie(d.userId,t)))}else q&&_s&&_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),S(je(d.userId,t))),q&&Es&&_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),S(Ie(d.userId,t)));if(q){ne.identify(d.userId,{tenant_id:t});const J=t==null||t!=null&&(A==="Completed"||A==="Error");a==="Completed"||A!=="Not-Started"&&A!=="Error"||t==null||!_.shouldFetchActiveTenant(t)||(_.markActiveTenantFetchStarted(t),Y(F.TENANT_FETCHING),S(zs(d.userId,t,d.zeniSessionId))),J&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),S(xe(d.userId,d.zeniSessionId)))}})(T,p,i,f,I,U,D))}),[f,p]),P.useEffect((()=>{y.isSignedIn()&&T==="Completed"&&z.tenantsBaseInOrder.length>0&&(V(F.TENANT_FETCHING),y.saveSignedInUserTenants(Os(z.tenantsBaseInOrder)),I!=null&&be(I,i,k,void 0,z.tenantsBaseInOrder))}),[z,T,i,I]),P.useEffect((()=>{p==="In-Progress"&&U(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&f!=null?(v(),_.markActiveTenantFetchCompleted(f)):p==="Error"&&f!=null&&(_.markActiveTenantFetchFailed(f),V(F.TENANT_FETCHING),V(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,f,L]);const le=P.useRef(!1);P.useEffect((()=>{!le.current&&p==="Completed"&&L&&(le.current=!0,(function(a=Et,A=3e3){setTimeout((()=>{const c=t=>{if(t>=a.length)return;const d=a[t],Y=_t[d];Y!=null?Y().then((()=>ae((()=>c(t+1))))).catch((()=>ae((()=>c(t+1))))):c(t+1)};ae((()=>c(0)))}),A)})())}),[p,L]);const O=i?.userRole!=null&&Ps(i?.userRole),{isFeatureEnabled:qe}=H(B.isReferralFeatureEnabled),{isFeatureEnabled:Je}=H(B.isAccrualEnabled),We=it(),Ke=i?.userRole!=null&&i.userRole.includes("charge_card_user"),Qe=i?.userRole!=null&&i.userRole.includes("charge_card_admin"),w=i?.userRole!=null&&pe(i.userRole),ue=i?.company==null||i.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!O,de=!Se&&!O,Xe=ws(h?.loggedInUserRoleMap),es=i.externalConnections?.accounting[0]?.isValid,ss=i.externalConnections?.fetchState==="Completed",te=i.company?.companyOnboardingInfo.isOnboardingCompleted,ce=i?.company==null||i.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!O,me=ce&&Fs(h?.loggedInUserRoleMap),_e=Fe&&!O,ts=Le&&!O,ns=ue&&Ls(h?.loggedInUserRoleMap),as=de&&ks(h?.loggedInUserRoleMap),os=_e&&Vs(h?.loggedInUserRoleMap),is=Hs(h?.loggedInUserRoleMap),rs=Ss(h?.loggedInUserRoleMap),ls=Bs(h?.loggedInUserRoleMap),us=Ns(h?.loggedInUserRoleMap),ds=Ms(h?.loggedInUserRoleMap),x=Zs(h?.loggedInUserRoleMap),g=Gs(h?.loggedInUserRoleMap),Ee=ue&&x,he=ce&&g,R=_e&&ls,j=ts&&us,m=de&&ds,cs=i.excludedResources?.resources?.find((a=>a.resource==="/invites"))!=null||$e===!0||Xe===!0||is===!0||rs===!0;return y.isSignedIn()?f==null?T==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(I!=null&&T!=="In-Progress"&&D(xe(I.userId,I.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||T==="Completed"?(te===!0||W&&!ee)&&ss&&es!==!0&&E===!1&&Q===!1&&ie===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||ie!==!0||te!==!0||ee||W?!L||te!==!1||ee||W?L&&i?.userRole&&E!=null&&Q!=null&&r!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(Ks,{children:e.jsxs(n,{element:e.jsx(rt,{}),children:[e.jsx(n,{path:"/",element:e.jsx(Vt,{isDashboardAccess:w,showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,isTenantCardsOnly:Q,showChargeCardRoute:m})}),e.jsx(n,{path:"dashboard/*",element:w?e.jsx(Tt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"reports/*",element:w?e.jsx(ht,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"people/*",element:cs||w?e.jsx(xt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"forecast/*",element:w?e.jsx(gt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"onboarding/*",element:e.jsx(Rt,{})}),e.jsx(n,{path:"transaction/*",element:w&&O===!1||Ke||Qe?e.jsx(It,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"transactions/*",element:w&&O===!1?e.jsx(yt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"customer/*",element:w&&O===!1?e.jsx(Ce,{entityType:"customer"}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,isTenantBankingOnly:E,showTreasuryRoute:j,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"vendor/*",element:w&&O===!1?e.jsx(Ce,{entityType:"vendor"}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"tasks",element:e.jsx(kt,{})}),e.jsx(n,{path:"tasks/*",element:e.jsx(Ft,{})}),e.jsx(n,{path:"address/*",element:ns||me||os||as?e.jsx(pt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"checking/*",element:R?e.jsx(Dt,{}):e.jsx(b,{})}),e.jsx(n,{path:"treasury/*",element:j?e.jsx(ft,{}):e.jsx(b,{})}),e.jsx(n,{path:"performance",element:K===!0?e.jsx(Ut,{}):e.jsx(Pe,{tenantEmailDomain:r})}),e.jsx(n,{path:"month_end_close_checks/review/*",element:K===!0&&O===!1?e.jsx(Ot,{}):e.jsx(Pe,{tenantEmailDomain:r})}),e.jsx(n,{path:"expense-automation/actual-matching/:matchId",element:K===!0&&O===!1&&Je===!0&&We===!0?e.jsx(Pt,{}):e.jsx(b,{})}),e.jsx(n,{path:"notifications/*",element:e.jsx(vt,{})}),e.jsx(n,{path:"vendors/*",element:Ge?e.jsx(jt,{}):e.jsx(b,{})}),e.jsx(n,{path:"bill/*",element:Ee?e.jsx(ve,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"bills/*",element:Ee?e.jsx(ve,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"reimbursement/*",element:he?e.jsx(Ue,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"reimbursements/*",element:he?e.jsx(Ue,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"settings/*",element:Be?e.jsx(At,{hasAdminLevelAccess:me}):e.jsx(b,{})}),e.jsx(n,{path:"invoicing/*",element:Me&&Ze?e.jsx(bt,{}):e.jsx(b,{})}),e.jsx(n,{path:"cards/ask",element:m&&M?e.jsx(Oe,{isFileUploadEnabled:X}):e.jsx(b,{})}),e.jsx(n,{path:"cards/ask/:session_id",element:m&&M?e.jsx(Oe,{isFileUploadEnabled:X}):e.jsx(b,{})}),e.jsx(n,{path:"cards/*",element:m?e.jsx(Ct,{}):e.jsx(b,{})}),e.jsx(n,{path:"rewards/*",element:qe?e.jsx(wt,{}):e.jsx(b,{})}),e.jsx(n,{path:"/ai-cfo",element:M?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(n,{path:"/ai-cfo/",element:M?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(n,{path:"/ai-cfo/:session_id",element:M?e.jsx(Lt,{isFileUploadEnabled:X}):e.jsx(b,{})}),e.jsx(n,{path:"*",element:e.jsx(b,{})})]})}):null:(o(void 0),e.jsx(u,{to:`/${r}/onboarding`,replace:!0})):(o(void 0),e.jsx(u,{to:`/${r}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{C as F,zt as S};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-BjcYyeQ6.js";import{a as d}from"./sentry-DZ9rNYfw.js";import{h as N,g as H,u as _,i as O,j as C,l as K,n as Q,o as k}from"./core-B-8b0iz9.js";import{fF as w,Zs as Pe,NG as ve,Z0 as we,Z9 as Ae,c8 as W,cT as De,cU as Ue,bq as _e,de as Me,F$ as Re,Zt as Te,P7 as Be,Mx as Ze,Mo as de,Ml as Fe,G3 as ue,Mr as pe,Mu as ge,MA as Y,Cd as ee,G2 as Ve,lu as $,lx as me,Zu as Ne,mH as Oe,Gk as Le,VH as Ge,VI as $e,ls as He,Zv as Ke,lv as qe,uE as ze,VC as Je,VD as Qe,uI as Xe,hV as We,UB as J,hN as ae,hK as Ye,hS as en,UC as nn,Gh as tn,Zw as an,Zx as on,MO as sn,l$ as rn,dZ as fe,d_ as he,Zy as ln,gC as cn,UR as dn,Gg as oe,gH as se,gG as un,Gf as pn,gF as gn,gE as mn,Zz as fn,U1 as Ce,ZA as hn,ZB as Cn,ZC as yn,ZD as Sn,ZE as bn,ZF as In,Gn as xn,ZG as En,Ge as ie,G8 as G,ZH as kn,ZI as jn,ZJ as re,ZK as Pn,dS as vn,ZL as wn,ZM as An,ZN as Dn,Ud as Un,c0 as _n,c7 as Mn,c6 as Rn,c1 as Tn,ZO as Bn,c4 as Zn,c3 as Fn,c5 as Vn,c2 as Nn}from"./zeni-epic-state-95zxmizy.js";import{bU as On,z as v,K as L,a8 as ne,c4 as Ln,k as q,o as te,S as F,f as ye,X as Se,c5 as Gn,j as $n,_ as be,c6 as Hn,aj as Kn,c7 as qn,c8 as zn,ar as Jn,c9 as Qn,p as Xn,c as Ie,ca as Wn}from"./index-DuxR1XDX.js";import{n as B}from"./mui-C33Oegsm.js";import{u as xe}from"./useTaskManagerAccess-ECD0Ec-b.js";import{U as Yn}from"./AccountMappingScreen-Dt4x9DJz.js";import{t as et,A as nt}from"./AddressScreen-DvJ6yyMx.js";import V from"./NotFoundScreen-BatgS8le.js";import{g as tt}from"./analyticsHelper-C6SU-53H.js";import{u as at,B as ot}from"./BusinessVerificationPageScreen-B20TVwus.js";import{C as st}from"./CompanyPassportScreen-BEG9__1k.js";import{M as R}from"./MobileAppDrawer-0TaE2Qid.js";import{u as it,a as rt}from"./useEmailConnectResultRefresh-BwFVhfcX.js";import{q as le}from"./QBOConnectionScreen-BiN0lu_W.js";import{B as lt}from"./BillPayApprovalRoutes-BxCZdf21.js";import{R as ct}from"./ReimbursementApprovalRoutes-ryr0mHPH.js";import"./recharts-DkYxIsLi.js";import"./analytics-8lQ_GaR7.js";import"./plaid-Bt28AVCt.js";import"./dnd-CtOxA7uX.js";import"./stripe-cKAAJElX.js";import"./lottie-BdAYiWcR.js";import"./lexical-BVt4M34U.js";import"./pdf-BkfulyEw.js";import"./utils-D3rZq_G4.js";import"./accountMappingHelper-Ci74NLEW.js";import"./routePaths-B1syYHWh.js";import"./InboxNotificationsProvider-B4UF_uUg.js";import"./empty-CyiOIGJw.js";import"./pdf-lib-D8o-uP9K.js";import"./index-CgYr_9vs.js";import"./url-BjdrSaU1.js";import"./index-CzpjeHcU.js";import"./decodeURIComponentSafe-hAviH84T.js";import"./ReimbursementApprovalRuleDetailScreen-CRU8C8RZ.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]="22657330-33ae-4c6f-8a85-73cd0ad6283d",e._sentryDebugIdIdentifier="sentry-dbid-22657330-33ae-4c6f-8a85-73cd0ad6283d")}catch{}})();const dt=B.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-
|
|
1
|
+
import{j as u}from"./liveblocks-BjcYyeQ6.js";import{h as Y,g as Q,u as ee,i as W,j as v,N as j,l as H,t as Qe}from"./core-B-8b0iz9.js";import{bJ as en,fF as F,cG as nn,HT as $,Z0 as tn,Z3 as an,uX as ne,uL as te,mz as ae,BL as R,Z5 as Ce,gG as Ge,gF as We,gE as He,Z6 as sn,I0 as on,Mx as he,Mo as Ie,Ml as Ae,M3 as X,Mr as _e,Mu as ke,MA as ve,Cd as Pe,g_ as cn,cB as rn,d_ as un,dZ as dn,di as ln,bt as pn,cu as Fe,Z7 as mn,L3 as de,LH as yn,Z8 as fn,bK as gn,NS as le,NG as Sn,Z9 as bn,Za as Cn,NW as hn,N_ as In,Zb as je,BE as An,Sm as _n,Ow as be,Pl as pe,Zc as kn,Zd as vn,Ze as Pn,Zf as qe,Zg as Tn,Vq as En,Yh as Dn,VF as Un,Zh as Ke,M7 as On,VG as wn,Mb as Fn,Zi as we,OG as Je,mH as Vn,uO as Xe,BN as xn,bE as Ne,BZ as Re,cE as Bn,Zj as Ye,Od as jn,Oe as Nn,Oi as Rn,Zk as Ln,Oz as Le,Zl as Mn,Zm as zn,Zn,Zo as $n,gV as Gn,Jc as Wn,Zp as Hn,Jh as qn,Jg as Kn}from"./zeni-epic-state-95zxmizy.js";import{aj as Te,K as ie,o as me,S as J,E as Ee,z as E,a9 as se,k as D,a8 as De,V as G,bR as Jn,af as oe,bS as V,bj as Ve,bT as Xn,bU as Yn,bV as Qn,q as Be,bW as et,p as Me,aH as ze,a2 as nt,ac as tt,bX as at,bY as it,bZ as st,w as ot}from"./index-DuxR1XDX.js";import{a as h}from"./sentry-DZ9rNYfw.js";import{n as xe,D as ct,S as rt}from"./mui-C33Oegsm.js";import{u as ut,B as Oe}from"./BusinessVerificationPageScreen-B20TVwus.js";import{M as ye}from"./MobileAppDrawer-0TaE2Qid.js";import N from"./NotFoundScreen-BatgS8le.js";import{a as Ze}from"./analyticsHelper-C6SU-53H.js";import{d as $e}from"./routePaths-B1syYHWh.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]="301905f3-859c-4523-b89e-39f219f53150",e._sentryDebugIdIdentifier="sentry-dbid-301905f3-859c-4523-b89e-39f219f53150")}catch{}})();const dt=xe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-
|
|
1
|
+
import{j as u}from"./liveblocks-BjcYyeQ6.js";import{a as f,R as T,q as A}from"./sentry-DZ9rNYfw.js";import{u as z,h as D,j as c,g as j,N as F,l as M}from"./core-B-8b0iz9.js";import{u as P,z as s,E as O,k as w,G as _,U as N,V as B,W as V,Y as $,Z as W,_ as v}from"./index-DuxR1XDX.js";import{fF as Z,TZ as q,Uh as J,gi as R,gk as G,Um as H,gU as Y,dj as K,Un as y,Uo as Q,Up as X,b$ as U}from"./zeni-epic-state-95zxmizy.js";import"./mui-C33Oegsm.js";import{u as ee}from"./useDeviceId-gFU5q5zf.js";import{f as te}from"./analyticsHelper-C6SU-53H.js";import{t as ne}from"./getLocaleForTenant-D57C4sYC.js";import"./recharts-DkYxIsLi.js";import"./analytics-8lQ_GaR7.js";import"./plaid-Bt28AVCt.js";import"./dnd-CtOxA7uX.js";import"./stripe-cKAAJElX.js";import"./lottie-BdAYiWcR.js";import"./lexical-BVt4M34U.js";import"./pdf-BkfulyEw.js";import"./utils-D3rZq_G4.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]="36c1ebcf-7cc5-4e94-a464-6332da20a70b",t._sentryDebugIdIdentifier="sentry-dbid-36c1ebcf-7cc5-4e94-a464-6332da20a70b")}catch{}})();const ie=M((function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}}),(function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const l=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(X({authCode:n,oauthProvider:a,appType:"web",redirectUri:U(l),sourceUri:U(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(Q(n,a)))},clearSignInError:()=>{t(y())}}}))(W),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=z(),d=D(),{clearAllLoading:g}=P(),n=s.getSignedInUser();f.useLayoutEffect((()=>{g()}),[g]);const a=ee(),l=c((e=>e.tenantState.magicLinkCodeVerifier)),{sendEmailMagicLinkFetchState:h,accountLocked:b,accountUnlockTime:k}=c((e=>e.tenantState)),p=c((e=>e.tenantState.fetchState)),L=c((e=>e.tenantState.activeTenantFetchState.fetchState)),S=c((e=>e.tenantState.signInState)),o=c((e=>e.tenantState.loggedInUser)),r=c((e=>Z(e))),I=c((e=>q(e))),m=j(),E=O().mode,C=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(f.useEffect((()=>{h.fetchState==="Completed"&&l!=null&&(w.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(l))}),[h.fetchState,l]),f.useEffect((()=>{t(void 0)}),[]),f.useEffect((()=>{S!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(J(I.tenantsInOrder),o.zeniSessionId),R(o.userId,o.zeniSessionId,r.tenantId),i(G(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(H("Completed")),_.updateAppLocaleID(ne(r)),te(o,r,E,void 0,I.tenantsInOrder),Y().then((()=>{const e=$();e!=null&&N(e)})),setTimeout((()=>{w.trackLogin(B.Event.loginSuccess,o.authProvider??"google",K(r.productSettings))}),2e3))}),[S,p,L,o,r,I,E,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return u.jsx(F,{to:e,state:{...m.state,origin:""}})}return u.jsxs(u.Fragment,{children:[u.jsx(ae,{magicLinkExpired:!!C,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),b===!0&&k!=null?u.jsx(V,{onClose:()=>i(y()),unlockDate:k}):null]})}export{ve as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-BjcYyeQ6.js";import{a as i}from"./sentry-DZ9rNYfw.js";import{u as l,g as c,N as u}from"./core-B-8b0iz9.js";import{z as n,k as a,V as m,a8 as p}from"./index-DuxR1XDX.js";import{gX as g,UD as b}from"./zeni-epic-state-95zxmizy.js";import{n as y}from"./mui-C33Oegsm.js";import"./recharts-DkYxIsLi.js";import"./analytics-8lQ_GaR7.js";import"./plaid-Bt28AVCt.js";import"./dnd-CtOxA7uX.js";import"./stripe-cKAAJElX.js";import"./lottie-BdAYiWcR.js";import"./lexical-BVt4M34U.js";import"./pdf-BkfulyEw.js";import"./utils-D3rZq_G4.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]="f4b76bd2-89db-4a73-8e75-e35ebd015b8f",e._sentryDebugIdIdentifier="sentry-dbid-f4b76bd2-89db-4a73-8e75-e35ebd015b8f")}catch{}})();function N(){const e=l(),t=c(),r=i.useRef(!1),d=n.isSignedIn(),o=t.state?.message==="logout"||d;return i.useEffect((()=>{if(o&&!r.current){r.current=!0;try{e(g()),b(),a.trackLogout(m.Event.logoutSuccess),a.resetUserIdentity(),n.clearAll()}catch(f){console.error("Error during sign out:",f)}finally{window.location.replace("/signin/auth")}}}),[o,e]),o?s.jsx(h,{children:s.jsx(p,{fetchState:"In-Progress"})}):s.jsx(u,{to:"../",replace:!0})}const h=y.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-
|
|
1
|
+
import{j as f}from"./liveblocks-BjcYyeQ6.js";import{a as A}from"./sentry-DZ9rNYfw.js";import{h as pa,u as Ta,g as ga,k as fa,j as v,i as _a,l as ma}from"./core-B-8b0iz9.js";import{z as w,o as Da,S as _,at as Sa,a9 as ya,k as Ea,V as ba,e6 as ha,p as C,a5 as Aa}from"./index-DuxR1XDX.js";import{fF as Ca,a27 as V,R8 as D,a28 as W,a23 as Ga,Qw as O,a29 as Ia,QE as N,Qe as Ba,PS as Ka,R9 as Q,a2a as z,gh as La,Q$ as va,R4 as Ra,QT as wa,QR as Z,R5 as Ua,QO as Pa,a2b as Fa,a2c as ja,a2d as xa,a2e as $a,a2f as m,dx as Oa,dw as Na,a2g as Qa,Qb as za}from"./zeni-epic-state-95zxmizy.js";import{n as Za}from"./mui-C33Oegsm.js";import{u as Ma}from"./useAskAiCfoHostNavButtonProps-CvEN7QS-.js";import{M as Va}from"./MobileAppDrawer-0TaE2Qid.js";import{u as Wa}from"./useTaskManagerPusherEvents-BnGLCsCG.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]="d449633c-4b68-4e68-a4e8-8a6b85c7d380",e._sentryDebugIdIdentifier="sentry-dbid-d449633c-4b68-4e68-a4e8-8a6b85c7d380")}catch{}})();const c={TASK_CREATED:"task-created",TASK_UPDATED:"task-updated",TASK_SNOOZE_RESURFACED:"task-snooze-resurfaced",TASKS_BULK_UPDATED:"tasks-bulk-updated",TASKS_BULK_DELETED:"tasks-bulk-deleted"},qa=(e,a)=>e==null||e===""?[]:a.map((n=>`private-encrypted-${e}.${n}`)),Ha=(e,a)=>e==null||e===""?[]:a.map((n=>`private-encrypted-${e}.${n}`)),G=e=>Array.isArray(e)&&e.every((a=>typeof a=="string")),Ja=e=>{if(e==null||typeof e!="object")return null;const a=e,n=typeof a.task_id=="string"?a.task_id:typeof a.id=="string"?a.id:null;if(n==null||typeof a.tenant_id!="string"||typeof a.event_type!="string")return null;const i={task_id:n,tenant_id:a.tenant_id,event_type:a.event_type};return typeof a.is_private=="boolean"&&(i.is_private=a.is_private),G(a.assignees)&&(i.assignees=a.assignees),G(a.direct_assignees)&&(i.direct_assignees=a.direct_assignees),typeof a.created_by=="string"&&(i.created_by=a.created_by),G(a.task_group_ids)&&(i.task_group_ids=a.task_group_ids),typeof a.name=="string"&&(i.name=a.name),typeof a.parent_task_id=="string"&&(i.parent_task_id=a.parent_task_id),i},Xa=e=>{if(e==null||typeof e!="object")return null;const a=e;return G(a.task_ids)?{task_ids:a.task_ids}:null},ke=e=>{if(e==null||typeof e!="object")return null;const a=e;return typeof a.task_id!="string"?null:{task_id:a.task_id}},Ya=Za.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-
|
|
1
|
+
import{j as r}from"./liveblocks-BjcYyeQ6.js";import ue from"./NotFoundScreen-BatgS8le.js";import{a as k}from"./sentry-DZ9rNYfw.js";import{h as H,u as ee,j as b,g as de,i as ke,N as pe,l as me,n as Se,o as E}from"./core-B-8b0iz9.js";import{Q3 as ae,Q6 as fe,Q0 as Te,a22 as ge,fF as te,a23 as se,Qs as g,Qk as T,PZ as he,QY as Ee,QR as be,a24 as ne,gh as oe,a25 as Z,PV as Ie,PS as De,uX as Ce,uL as Ge,mz as _e,Qi as Re,a26 as ye,R9 as Ue,Qe as xe,QD as we,QA as Be,Q9 as Ae,Qx as ve,Qw as je}from"./zeni-epic-state-95zxmizy.js";import{z as R,e4 as Pe,O as Fe,o as Le,S as G,a5 as ie,p as _,a9 as Ke,k as q,V as Qe,e5 as $e,_ as M,af as Ne}from"./index-DuxR1XDX.js";import{n as Oe}from"./mui-C33Oegsm.js";import{u as Ve}from"./useInitialThreadRequest-Chu-ipGI.js";import{M as ze}from"./MobileAppDrawer-0TaE2Qid.js";import{b as Ze,a as qe,T as f,t as Me,c as X,d as Y,e as Xe}from"./TaskListScreen-h6ryhshy.js";import{u as Ye}from"./useTaskManagerPusherEvents-BnGLCsCG.js";import"./recharts-DkYxIsLi.js";import"./analytics-8lQ_GaR7.js";import"./plaid-Bt28AVCt.js";import"./dnd-CtOxA7uX.js";import"./stripe-cKAAJElX.js";import"./lottie-BdAYiWcR.js";import"./lexical-BVt4M34U.js";import"./pdf-BkfulyEw.js";import"./utils-D3rZq_G4.js";import"./InboxNotificationsProvider-B4UF_uUg.js";import"./useTaskManagerAccess-ECD0Ec-b.js";import"./useAskAiCfoHostNavButtonProps-CvEN7QS-.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]="211a075a-5166-4163-9b44-c153de699186",e._sentryDebugIdIdentifier="sentry-dbid-211a075a-5166-4163-9b44-c153de699186")}catch{}})();function Je(){const e=H(),a=ee(),n=R.getSignedInUser(),{cannedResponses:c,fetchState:s,saveFetchState:u}=b((o=>o.cannedResponsesState)),d=k.useCallback((()=>{a(ae())}),[a]),m=k.useCallback(((o,I,D)=>{a(fe({name:o,content:I,cannedResponseId:D}))}),[a]),t=k.useCallback((o=>{a(Te({cannedResponseId:o}))}),[a]);if(n==null)throw Error("Can't access quick responses page without signing in...");return r.jsx(Pe,{cannedResponses:c,isLoading:s==="In-Progress"||s==="Not-Started",isSaving:u==="In-Progress",onBackClick:()=>e(-1),onDelete:t,onFetch:d,onSave:m})}const L=e=>e?.taskState?.taskByID,P=(e,a)=>{const n=L(e);if(a!=null&&n!=null)return n[a]?.parentTaskId??void 0},We=ge([P,(e,a)=>{const n=P(e,a),c=L(e);if(n!=null&&c!=null)return c[n]?.name},(e,a)=>{const n=P(e,a),c=L(e);return n!=null&&c!=null&&c[n]!=null}],((e,a,n)=>{if(e!=null&&n===!0)return{id:e,name:a??""}}));let J,W=[];const He=me((function(e,a){const{location:n,taskGroupId:c}=a,s=ne(e,a.taskId),u=te(e),d=We(e,a.taskId),m=s.taskGroupId??c,t=m!=null?Z(e.taskGroupState,m):void 0,o=R.getSignedInUser(),I=u.tenantId,D={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:I??""},w=se(e),{tenantEmailDomain:B}=u,y=s.recurringSourceTaskId,A=y!=null?`${M.appUrl}/${B}/tasks/${encodeURIComponent(y)}`:void 0;var h;return{taskDetailSelectorView:s,authParams:D,isZeniUser:R.isZeniUser(),userGroupList:((h=e.userGroupsState.userGroupByUserGroupId)!==J&&(J=h,W=Object.values(h)),W),isNewClicked:n.state?.message==="comingFromTaskListPage",filesEndPoint:Ne.fileMicroServiceBaseUrl,companyName:a.currentTenant.companyName,companyId:a.currentTenant.companyId,currentUrl:`${M.appUrl}${a.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:A,tagListView:w,taskGroupName:m!=null&&t!=null&&t.isDefault===!1?t.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map((S=>Z(e.taskGroupState,S))).filter((S=>S!=null&&!S.isDeleted)).map((S=>({id:S.id,name:S.name,isDefault:S.isDefault}))),subtasks:s.subtasks,parentTaskRef:d,subTaskCreateStatus:e.taskDetailState?.subTaskCreateStatus?.fetchState}}),(function(e,a){const{taskId:n,navigate:c,currentTenant:s,location:u,taskGroupId:d}=a,{tenantEmailDomain:m}=s;return{onSaveChangesToLocalStore:t=>{e(je({taskDetailLocalData:t,taskId:n}))},onSaveDetailClick:t=>{e(ve(n,t??d))},onArchiveTaskClick:()=>{a.taskId!=null&&e(Ae(a.taskId))},onSnoozeTask:(t,o)=>{e(Be(t,o))},onUnsnoozeTask:t=>{e(we(t))},onCreateSubtask:(t,o)=>{e(xe({...o,parentTaskId:t}))},onSubtaskUpdate:(t,o)=>{e(Ue({task:t,updates:o}))},onShowToast:t=>{e(oe(t))},onSubtaskRowClick:t=>{c(`/${m}/tasks/${t}`,{state:{pathnameStackToGoBack:_(u.state?.pathnameStackToGoBack,u.pathname)}})},onParentBreadcrumbClick:t=>{c(`/${m}/tasks/${t}`,{state:{pathnameStackToGoBack:_(u.state?.pathnameStackToGoBack,u.pathname)}})},onDismissClick:()=>{if(u.state?.message==="triggerBackClick"){const t=ie(u.state?.pathnameStackToGoBack),o=t.poppedPathname??"../../dashboard";c(o,{state:{pathnameStackToGoBack:t.newStack}})}else{const t=x(m),o=_(u.state?.pathnameStackToGoBack,u.pathname);c(t,{state:{pathnameStackToGoBack:o}})}e(ye({taskId:n}))},onDeleteTaskClick:()=>{e(Re(n))},updateFilesEntity:t=>{e(_e({files:t}))},onDeleteFile:t=>{e(Ge(t))},onEditFileName:(t,o)=>{e(Ce(t,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(g(!1,n))},onCreateTagClick:t=>{e(De(t,n))},onDeleteTagClick:t=>{e(Ie(t,n))},onFetchCannedResponses:()=>{e(ae())},onManageTemplatesClick:()=>{c(`/${s.tenantEmailDomain}/tasks/quick-responses`)}}}))($e);function F(){const e=H(),a=ee(),n=de(),c=Fe(),{taskId:s,taskGroupId:u}=ke(),d=b((i=>te(i))),m=Ve(d?.companyId),{useFeatureGate:t}=Le(),{isFeatureEnabled:o}=t(G.isTaskSnoozeEnabled),{isFeatureEnabled:I}=t(G.isTaskVisibilityEnabled),{isFeatureEnabled:D}=t(G.isTaskCannedResponsesEnabled),{isFeatureEnabled:w}=t(G.isTaskRecurringParentEnabled),{isFeatureEnabled:B}=t(G.isTaskGroupAssigneesEnabled),[y,A]=k.useState(!1),[h,S]=k.useState(!1),[K,re]=k.useState(!1),[Q,v]=k.useState(!1),C=k.useRef(!1),U=b((i=>i.taskListState.updateTasksFetchState.fetchState)),$=b((i=>se(i))),N=b((i=>i.taskGroupViewState.fetchState));k.useEffect((()=>{a(g(!1,s)),s!=null&&a(T(s))}),[a,s]);const O=R.getSignedInUser()?.userId,ce=k.useMemo((()=>{const i=[f.TASK_CREATED,f.TASK_UPDATED,f.TASKS_BULK_UPDATED,f.TASKS_BULK_DELETED],l=[...i,f.TASK_SNOOZE_RESURFACED];return[...Ze(d?.companyId,i),...qe(O,l)]}),[d?.companyId,O]);Ye({events:ce,onSubscribed:()=>{s!=null&&(a(g(!0,s)),a(T(s)))},onEvent:(i,l)=>{if(s!=null)switch(i){case f.TASK_CREATED:{Y(l)?.parent_task_id===s&&(a(g(!0,s)),a(T(s)));break}case f.TASK_UPDATED:{const p=Y(l);if(p==null)break;p.task_id===s?(a(g(!0,s)),a(T(s))):p.parent_task_id===s&&a(T(s));break}case f.TASKS_BULK_UPDATED:{const p=X(l);if(p==null)break;p.task_ids.includes(s)&&a(g(!0,s)),a(T(s));break}case f.TASKS_BULK_DELETED:{const p=X(l);if(p==null)break;if(p.task_ids.includes(s)){a(oe({messageSection:"delete_task",messageText:"success",type:"success"})),d?.tenantEmailDomain!=null&&e(x(d.tenantEmailDomain));break}a(T(s));break}case f.TASK_SNOOZE_RESURFACED:{Me(l)?.task_id===s&&a(g(!0,s));break}}}}),k.useEffect((()=>{h||$.fetchState==="Completed"||(S(!0),a(he()))}),[h,a,$.fetchState]),k.useEffect((()=>{K||N==="Completed"||(re(!0),a(Ee()))}),[K,a,N]);const le=k.useCallback((()=>{s!=null&&(C.current=!1,a(be([s],null,{isArchived:!1})),v(!0))}),[a,s]);k.useEffect((()=>{if(Q)if(U!=="In-Progress"){if(C.current){if(U==="Error")return v(!1),void(C.current=!1);if(U==="Completed"){v(!1),C.current=!1;const{tenantEmailDomain:i}=d;if(n.state?.message==="triggerBackClick"){const l=ie(n.state?.pathnameStackToGoBack);e(l.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:l.newStack}})}else{const l=x(i);e(l,{state:{pathnameStackToGoBack:_(n.state?.pathnameStackToGoBack,n.pathname)}})}}}}else C.current=!0}),[Q,U,d,n,e]);const V=b((i=>ne(i,s))),j=V.fetchState,z=R.getSignedInUser();if(z==null)throw Error("Can't access task detail page without signing in...");if(j==="Error"&&V.error?.code===400){const{tenantEmailDomain:i}=d,l=x(i),p=_(n.state?.pathnameStackToGoBack,n.pathname);return r.jsx(pe,{to:l,state:{pathnameStackToGoBack:p}})}return r.jsxs(r.Fragment,{children:[j==="Completed"?r.jsx(Ke,{analytics:q,onLoad:i=>(l=>l.trackPageLoaded(Qe.Event.taskDetailPage))(i)}):null,r.jsxs(ea,{children:[r.jsx(ze,{isAppContentDrawerOpen:y,handleDrawerToggle:i=>{A(i)}}),r.jsx(He,{analytics:q,currentTenant:d,handleZeniLogoClick:()=>{c.toggle()},initialOpenThreadRequest:m,location:n,loggedInUser:z,navigate:e,taskGroupId:u,taskId:s,taskDetailFetchState:j,onUnarchiveTaskClick:le,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:I,isTaskCannedResponsesEnabled:D,isTaskRecurringParentEnabled:w,isTaskGroupAssigneesEnabled:B})]})]})}const ea=Oe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t}from"./liveblocks-BjcYyeQ6.js";import i from"./NotFoundScreen-BatgS8le.js";import{T as r}from"./TransactionDetailScreen-KBMzz0Xq.js";import"./sentry-DZ9rNYfw.js";import{n as a,o as e}from"./core-B-8b0iz9.js";import"./zeni-epic-state-95zxmizy.js";import"./recharts-DkYxIsLi.js";import"./index-DuxR1XDX.js";import"./mui-C33Oegsm.js";import"./analytics-8lQ_GaR7.js";import"./plaid-Bt28AVCt.js";import"./dnd-CtOxA7uX.js";import"./stripe-cKAAJElX.js";import"./lottie-BdAYiWcR.js";import"./lexical-BVt4M34U.js";import"./pdf-BkfulyEw.js";import"./utils-D3rZq_G4.js";import"./useAskAiCfoHostNavButtonProps-CvEN7QS-.js";import"./decodeURIComponentSafe-hAviH84T.js";import"./useInitialThreadRequest-Chu-ipGI.js";import"./routePaths-B1syYHWh.js";import"./expenseAutomationHelper-BzOPc0En.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new o.Error().stack;n&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[n]="bfd19369-9f5a-4875-9ff9-f0a50fe2624d",o._sentryDebugIdIdentifier="sentry-dbid-bfd19369-9f5a-4875-9ff9-f0a50fe2624d")}catch{}})();function z(){return t.jsxs(a,{children:[t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(e,{path:"/*",element:t.jsx(r,{})})]})}export{z as default};
|
package/dist/assets/{TransactionDetailScreen-B7aagNFt.js → TransactionDetailScreen-KBMzz0Xq.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as R}from"./liveblocks-Oqbhz69O.js";import{a as i}from"./sentry-DaOZuZWH.js";import{u as j,k as st,j as g,s as ge,g as De,h as Ce,i as Ae,N as ct,l as it}from"./core-DWK-yy-f.js";import{pv as Ie,fF as ee,gV as rt,UK as lt,oB as dt,ob as ut,DF as se,WY as mt,gh as pt,bn as ft,df as Re,bq as _e,sS as H,VQ as Y,WZ as we,W_ as le,We as Pe,ma as Fe,W$ as Ue,Wj as de,Wk as ue,m$ as xe,Sf as me,WU as $,m4 as Ve,m2 as Le,me as ht,pi as St,X0 as yt,X1 as Tt,Dw as Q,m9 as Be,RA as Oe,cm as bt,dl as gt,X2 as It,WT as vt,X3 as Et,X4 as kt,X5 as Dt,X6 as Ct,Ds as At,X7 as Rt,X8 as _t,X9 as wt,Xa as Pt,Xb as Ft,md as Ut,Xc as xt,Xd as Vt,WV as Lt,Xe as Bt,Xf as Ot,Xg as Nt,Ru as zt,Rk as jt,RJ as Mt,mf as Wt,Sg as ve,pn as Xt}from"./zeni-epic-state-BHC2ac1c.js";import{o as K,S as _,k as G,b3 as $t,z as Ne,E as Gt,a2 as qt,b4 as Ht,ac as Yt,a5 as ce,K as Kt,b5 as Jt,p as ie,at as Qt,b6 as Zt,b7 as en,b8 as tn,af as nn,aw as oe}from"./index-B6CDEkoa.js";import{n as an,S as on,D as sn}from"./mui-CXd5PBjh.js";import{u as cn}from"./useAskAiCfoHostNavButtonProps-BSGTY8mB.js";import{d as ze}from"./decodeURIComponentSafe-vftzpe4R.js";import{u as rn}from"./useInitialThreadRequest-zQQSgVed.js";import{h as je,c as Me,g as ln,e as dn}from"./routePaths-C8QqLxFB.js";import{u as un}from"./expenseAutomationHelper-DzkVKD6z.js";import{A as mn}from"./utils-wj3imWq2.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="56a01da2-3440-4838-983f-9b53b0426146",t._sentryDebugIdIdentifier="sentry-dbid-56a01da2-3440-4838-983f-9b53b0426146")}catch{}})();function pn(t=!0){const e=j(),o=st(),{useFeatureGate:n}=K(),{isFeatureEnabled:a}=n(_.isCreateTransferEntryFromExpenseEnabled);i.useEffect((()=>{if(!t||a!==!0)return;const s=c=>{const d=o.getState().createTransferEntryState.transferAccountsByType[c].fetchState;return d!=="In-Progress"&&d!=="Completed"};s("transferEntryEligible")&&e(Ie({kind:"transferEntryEligible"})),s("creditCardOnlyEligible")&&e(Ie({kind:"creditCardOnlyEligible"}))}),[t,a,e,o])}function fn(t,e){const o=(function(){const d=j(),[T,S]=i.useState(!1),[D,p]=i.useState(null),[l,u]=i.useState(null),{useDynamicConfig:y}=K(),{configValue:I,isDynamicConfigLoading:h}=y("transaction_categorization_config"),b=!h&&I?.capitalization_enabled===!0,k=g((r=>ee(r))),C=k.companyId,w=g((r=>rt(r.companyState,k.companyId)?.company.companyLocaleInfo?.currencySymbol??"$")),{capitalizableAccounts:A,capitalizableAccountOverrides:P,dismissedAccounts:F}=g((r=>{const v=r.tenantState.currentTenantId,E=v!=null?r.tenantState.tenantsById[v]:void 0;return{capitalizableAccounts:E?.capitalizableAccounts??null,capitalizableAccountOverrides:E?.capitalizableAccountOverrides??null,dismissedAccounts:E?.capitalizationOnboardingDismissedAccounts??null}}),ge),V=i.useRef(A);V.current=A;const U=i.useRef(P);U.current=P;const L=i.useRef(F);L.current=F;const B=g((r=>lt(r.accountState)),ge),q=i.useMemo((()=>{const r={};for(const v of B)v.accountId!=null&&v.accountName!=null&&(r[v.accountId]=v.accountName);return r}),[B]),M=l!=null?q[l]??null:null,O=i.useCallback((r=>{if(!b)return;const v=V.current;if(v==null)return;const E=v.accounts??[],X=new Set(r),J=U.current??{},te=L.current;for(const N of E)if(X.has(N.accountId)&&J[N.accountId]==null&&te?.[N.accountId]==null)return p(N.classificationType),u(N.accountId),void S(!0)}),[b]),W=i.useCallback(((r,v)=>{d(dt(C,r,v,!0)),S(!1),p(null),u(null)}),[d,C]),f=i.useCallback((()=>{l!=null&&(d(ut(C,l)),S(!1),p(null),u(null))}),[d,C,l]);return{showPopup:T&&b,popupType:D,popupAccountId:l,popupAccountName:M,currencySymbol:w,checkAndShowPopup:O,handleSubmit:W,handleDismiss:f}})(),n=i.useRef(void 0),a=i.useRef([]),s=i.useRef(o.checkAndShowPopup);s.current=o.checkAndShowPopup;const c=i.useRef(e);return c.current=e,i.useEffect((()=>{t==="In-Progress"&&(a.current=c.current()),t==="Completed"&&n.current==="In-Progress"&&a.current.length>0&&(s.current(a.current),a.current=[]),n.current=t}),[t]),o}const z=new Map,Ee=(t,e,o)=>`${t}|${e??""}|${o}`,Z=(t,e)=>{const[o,n]=t.shownRecommendations;return{recommendationFor:t.dimension,recommendation:o?.name??"",recommendationSource:o?.engine??null,recommendationConfidencePercentage:o?.confidencePercentage??null,alternativeRecommendation:n?.name??null,alternativeRecommendationSource:n?.engine??null,alternativeRecommendationConfidencePercentage:n?.confidencePercentage??null,selectedValue:t.selected.name,numberOfRecommendations:t.shownRecommendations.length,transactionId:e,lineId:t.lineId??null}},re=(t,e,o)=>({transactionId:e,lineId:t.lineId,dimension:t.dimension,outcome:t.outcome,selected:{name:t.selected.name,id:t.selected.id},matchedSource:t.matchedSource,matchedRank:t.matchedRank,topPickSource:t.topPickSource,shownRecommendations:t.shownRecommendations.map((n=>({source:n.source,rank:n.rank,value:{name:n.name,id:n.id},confidence:n.confidencePercentage!=null?n.confidencePercentage/100:void 0}))),...o}),We=(t,e,o)=>{G.trackRecommendationFeedbackRetracted(Z(e,o)),t(se(re(e,o,{outcome:"retracted"})))},Bn=(t,e)=>{const o=new Set(e.map(String));z.forEach(((n,a)=>{o.has(n.transactionId)&&(z.delete(a),We(t,n.feedback,n.transactionId))}))},On=t=>{const e=new Set(t.map(String));z.forEach(((o,n)=>{e.has(o.transactionId)&&z.delete(n)}))};function hn(t){const e=j(),[o,n]=i.useState(null),[a,s]=i.useState(!1),{fetchState:c}=g(mt),{isEnabled:d,fallbackTransactionId:T}=t,S=i.useCallback((u=>u.transactionId??T??""),[T]),D=i.useCallback((u=>{if(!d)return;const y=S(u);if(y==="")return;if(u.outcome!=="accepted")return void n(u);((h,b,k,C)=>{const w=Ee(b,k,C),A=z.get(w);return A!=null&&(z.delete(w),We(h,A.feedback,A.transactionId),!0)})(e,y,u.lineId,u.dimension)||(((h,b)=>{G.trackRecommendationAccepted(Z(h,b))})(u,y),e(se(re(u,y,{}))))}),[d,S,e]),p=i.useCallback((u=>{if(o==null)return;const y=S(o);((I,h,b)=>{G.trackRecommendationFeedbackSubmitted({...Z(I,h),feedbackReason:b})})(o,y,u),e(se(re(o,y,{reasonText:u,skipped:!1}))),((I,h)=>{z.set(Ee(h,I.lineId,I.dimension),{feedback:I,transactionId:h})})(o,y),s(!0)}),[o,S,e]),l=i.useCallback((()=>{var u,y;o!=null&&(u=o,y=S(o),G.trackRecommendationFeedbackSkipped(Z(u,y)),s(!1),n(null))}),[o,S]);return i.useEffect((()=>{if(!a||c!=="Completed"&&c!=="Error")return;s(!1),n(null);const u=c==="Completed";e(pt({messageSection:"recommendation_feedback",messageText:u?"success":"failed",type:u?"success":"error",showStatusIcon:!0}))}),[a,c,e]),{onRecommendationSelection:D,popup:o!=null?R.jsx($t,{feedback:o,submitState:a?c:"Not-Started",onSubmit:p,onSkip:l}):null}}const pe=()=>{const t=Ne.getSignedInUser(),{useFeatureGate:e}=K(),{isFeatureEnabled:o}=e(_.isChainOfThoughtEnabled);return i.useMemo((()=>ft(t)&&o),[t,o])};function Xe(t){if(t!=null){if("customer"in t&&t.customer!=null){const{customer:e}=t;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in t&&t.vendor!=null){const{vendor:e}=t;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function Nn(t,e){const o=j(),{useFeatureGate:n}=K(),a=g((f=>ee(f))),s=a.userRole.includes("charge_card_user")||a.userRole.includes("charge_card_admin"),c=a.userRole!=null&&Re(a.userRole),d=a.userRole!=null&&_e(a.userRole),{isFeatureEnabled:T}=n(_.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:S}=n(_.isExpenseAutomationEnabled),D=pe(),p=i.useMemo((()=>({id:t,type:H(e)})),[t,e]),l=g((f=>Y(f,p))),u=l?.transactionDetailUpdateStatus?.fetchState,y=l?.transactionDetailLocalData?.lineItemById,I=g((f=>{const r=Y(f,p)?.transactionDetailLocalData.vendorUpdates?.id;return r==null?"Not-Started":f.transactionVendorViewState.editVendorStateById[r]?.saveStatus.fetchState??"Not-Started"})),h=i.useMemo((()=>l?.fetchState==="Completed"?Xe(l?.transaction):void 0),[l?.fetchState,l?.transaction]),b=g((f=>{if(h!=null)return we(f.customerIncomeState,f.vendorExpenseState,f.trendState,h,"month")})),k=g((f=>le(f))),C=g((f=>{if(h!=null)return Pe(f.trendWithTransactionsState,h,"TransactionDetail")})),w=a.company?.companyInfo.firstMonthOfFY??1,A=g((f=>Fe(f.accountState,f.accountListState,"accountList"))),[P,F]=i.useState(!1),[V,U]=i.useState(!1),[L,B]=i.useState(!1);i.useEffect((()=>{F(!1),U(!1),B(!1)}),[t,e]);const q=i.useCallback((()=>{F(!1),U(!1)}),[]),[M,O]=i.useState(!1),W=C?.selectedPeriod?.timePeriod;return i.useEffect((()=>{L||l==null||l.transaction==null||(o(Ue({id:l.transaction.id,type:l.transaction.type})),B(!0)),h!=null&&(!s||c&&d===!1)&&(P?V||b==null||(U(!0),o(me(h,"TransactionDetail",{timeframe:"month",timePeriod:W??b}))):(o(de()),o(ue()),F(!0),o(xe(h))))}),[o,L,l?.fetchState,l?.transaction,h,s,c,d,P,V,b,W]),i.useEffect((()=>{k.newVendorState?.vendorDetailLocalData?.vendorName!=null?O(!0):O(!1)}),[k.newVendorState?.vendorDetailLocalData?.vendorName]),i.useEffect((()=>()=>{o($("common"))}),[o]),{currentTenant:a,loggedInUserHasCardUserOrAdminRole:s,isUserHasDashboardAccess:c,isUserHasInvestorOrBankerAccess:d,isVendorBulkUpdateOnTransactionEnabled:T,isExpenseAutomationEnabled:S,isChainOfThoughtEnabled:D,selectedTransaction:p,transactionDetail:l,rawDetailSaveStatus:u,rawDetailLineItemById:y,vendorSaveStatus:I,tranEntity:h,defaultTrendTransactionTimePeriod:b,vendorViewDetails:k,uiState:C,firstMonthOfFY:w,uncategorizedAccounts:A,resetTrendIsFetchedStates:q,isCreateVendorDrawerOpen:M,setIsCreateVendorDrawerOpen:O}}const Sn={overlayWidth:new Yt(100,100,58)},yn=({isOpen:t,onSaveVendor:e,onSaveSuccess:o,onCancel:n,vendorViewDetails:a})=>{const s=Gt(),c=qt(),d=j(),T=g((p=>le(p))),S=()=>{n()},D={vendorDetailView:a??T,onSaveSuccess:()=>{d(Le()),d(ht("Not-Started")),o()},onSaveVendor:e,onCancelClick:S,saveVendorDetailLocalData:p=>{d(Ve({vendorId:void 0,localData:p}))}};return R.jsx(sn,{anchor:"right",open:t,PaperProps:{style:{width:Sn.overlayWidth.valuePercentage(c),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.4,cursor:"pointer"}}},onClose:S,children:R.jsx(Tn,{onClick:p=>p.stopPropagation(),children:R.jsx(Ht,{...D})})})},Tn=an(on)`
|
|
1
|
+
import{j as R}from"./liveblocks-BjcYyeQ6.js";import{a as i}from"./sentry-DZ9rNYfw.js";import{u as j,k as st,j as g,s as ge,g as De,h as Ce,i as Ae,N as ct,l as it}from"./core-B-8b0iz9.js";import{pv as Ie,fF as ee,gV as rt,UK as lt,oB as dt,ob as ut,DF as se,WY as mt,gh as pt,bn as ft,df as Re,bq as _e,sS as H,VQ as Y,WZ as we,W_ as le,We as Pe,ma as Fe,W$ as Ue,Wj as de,Wk as ue,m$ as xe,Sf as me,WU as $,m4 as Ve,m2 as Le,me as ht,pi as St,X0 as yt,X1 as Tt,Dw as Q,m9 as Be,RA as Oe,cm as bt,dl as gt,X2 as It,WT as vt,X3 as Et,X4 as kt,X5 as Dt,X6 as Ct,Ds as At,X7 as Rt,X8 as _t,X9 as wt,Xa as Pt,Xb as Ft,md as Ut,Xc as xt,Xd as Vt,WV as Lt,Xe as Bt,Xf as Ot,Xg as Nt,Ru as zt,Rk as jt,RJ as Mt,mf as Wt,Sg as ve,pn as Xt}from"./zeni-epic-state-95zxmizy.js";import{o as K,S as _,k as G,b3 as $t,z as Ne,E as Gt,a2 as qt,b4 as Ht,ac as Yt,a5 as ce,K as Kt,b5 as Jt,p as ie,at as Qt,b6 as Zt,b7 as en,b8 as tn,af as nn,aw as oe}from"./index-DuxR1XDX.js";import{n as an,S as on,D as sn}from"./mui-C33Oegsm.js";import{u as cn}from"./useAskAiCfoHostNavButtonProps-CvEN7QS-.js";import{d as ze}from"./decodeURIComponentSafe-hAviH84T.js";import{u as rn}from"./useInitialThreadRequest-Chu-ipGI.js";import{h as je,c as Me,g as ln,e as dn}from"./routePaths-B1syYHWh.js";import{u as un}from"./expenseAutomationHelper-BzOPc0En.js";import{A as mn}from"./utils-D3rZq_G4.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="56a01da2-3440-4838-983f-9b53b0426146",t._sentryDebugIdIdentifier="sentry-dbid-56a01da2-3440-4838-983f-9b53b0426146")}catch{}})();function pn(t=!0){const e=j(),o=st(),{useFeatureGate:n}=K(),{isFeatureEnabled:a}=n(_.isCreateTransferEntryFromExpenseEnabled);i.useEffect((()=>{if(!t||a!==!0)return;const s=c=>{const d=o.getState().createTransferEntryState.transferAccountsByType[c].fetchState;return d!=="In-Progress"&&d!=="Completed"};s("transferEntryEligible")&&e(Ie({kind:"transferEntryEligible"})),s("creditCardOnlyEligible")&&e(Ie({kind:"creditCardOnlyEligible"}))}),[t,a,e,o])}function fn(t,e){const o=(function(){const d=j(),[T,S]=i.useState(!1),[D,p]=i.useState(null),[l,u]=i.useState(null),{useDynamicConfig:y}=K(),{configValue:I,isDynamicConfigLoading:h}=y("transaction_categorization_config"),b=!h&&I?.capitalization_enabled===!0,k=g((r=>ee(r))),C=k.companyId,w=g((r=>rt(r.companyState,k.companyId)?.company.companyLocaleInfo?.currencySymbol??"$")),{capitalizableAccounts:A,capitalizableAccountOverrides:P,dismissedAccounts:F}=g((r=>{const v=r.tenantState.currentTenantId,E=v!=null?r.tenantState.tenantsById[v]:void 0;return{capitalizableAccounts:E?.capitalizableAccounts??null,capitalizableAccountOverrides:E?.capitalizableAccountOverrides??null,dismissedAccounts:E?.capitalizationOnboardingDismissedAccounts??null}}),ge),V=i.useRef(A);V.current=A;const U=i.useRef(P);U.current=P;const L=i.useRef(F);L.current=F;const B=g((r=>lt(r.accountState)),ge),q=i.useMemo((()=>{const r={};for(const v of B)v.accountId!=null&&v.accountName!=null&&(r[v.accountId]=v.accountName);return r}),[B]),M=l!=null?q[l]??null:null,O=i.useCallback((r=>{if(!b)return;const v=V.current;if(v==null)return;const E=v.accounts??[],X=new Set(r),J=U.current??{},te=L.current;for(const N of E)if(X.has(N.accountId)&&J[N.accountId]==null&&te?.[N.accountId]==null)return p(N.classificationType),u(N.accountId),void S(!0)}),[b]),W=i.useCallback(((r,v)=>{d(dt(C,r,v,!0)),S(!1),p(null),u(null)}),[d,C]),f=i.useCallback((()=>{l!=null&&(d(ut(C,l)),S(!1),p(null),u(null))}),[d,C,l]);return{showPopup:T&&b,popupType:D,popupAccountId:l,popupAccountName:M,currencySymbol:w,checkAndShowPopup:O,handleSubmit:W,handleDismiss:f}})(),n=i.useRef(void 0),a=i.useRef([]),s=i.useRef(o.checkAndShowPopup);s.current=o.checkAndShowPopup;const c=i.useRef(e);return c.current=e,i.useEffect((()=>{t==="In-Progress"&&(a.current=c.current()),t==="Completed"&&n.current==="In-Progress"&&a.current.length>0&&(s.current(a.current),a.current=[]),n.current=t}),[t]),o}const z=new Map,Ee=(t,e,o)=>`${t}|${e??""}|${o}`,Z=(t,e)=>{const[o,n]=t.shownRecommendations;return{recommendationFor:t.dimension,recommendation:o?.name??"",recommendationSource:o?.engine??null,recommendationConfidencePercentage:o?.confidencePercentage??null,alternativeRecommendation:n?.name??null,alternativeRecommendationSource:n?.engine??null,alternativeRecommendationConfidencePercentage:n?.confidencePercentage??null,selectedValue:t.selected.name,numberOfRecommendations:t.shownRecommendations.length,transactionId:e,lineId:t.lineId??null}},re=(t,e,o)=>({transactionId:e,lineId:t.lineId,dimension:t.dimension,outcome:t.outcome,selected:{name:t.selected.name,id:t.selected.id},matchedSource:t.matchedSource,matchedRank:t.matchedRank,topPickSource:t.topPickSource,shownRecommendations:t.shownRecommendations.map((n=>({source:n.source,rank:n.rank,value:{name:n.name,id:n.id},confidence:n.confidencePercentage!=null?n.confidencePercentage/100:void 0}))),...o}),We=(t,e,o)=>{G.trackRecommendationFeedbackRetracted(Z(e,o)),t(se(re(e,o,{outcome:"retracted"})))},Bn=(t,e)=>{const o=new Set(e.map(String));z.forEach(((n,a)=>{o.has(n.transactionId)&&(z.delete(a),We(t,n.feedback,n.transactionId))}))},On=t=>{const e=new Set(t.map(String));z.forEach(((o,n)=>{e.has(o.transactionId)&&z.delete(n)}))};function hn(t){const e=j(),[o,n]=i.useState(null),[a,s]=i.useState(!1),{fetchState:c}=g(mt),{isEnabled:d,fallbackTransactionId:T}=t,S=i.useCallback((u=>u.transactionId??T??""),[T]),D=i.useCallback((u=>{if(!d)return;const y=S(u);if(y==="")return;if(u.outcome!=="accepted")return void n(u);((h,b,k,C)=>{const w=Ee(b,k,C),A=z.get(w);return A!=null&&(z.delete(w),We(h,A.feedback,A.transactionId),!0)})(e,y,u.lineId,u.dimension)||(((h,b)=>{G.trackRecommendationAccepted(Z(h,b))})(u,y),e(se(re(u,y,{}))))}),[d,S,e]),p=i.useCallback((u=>{if(o==null)return;const y=S(o);((I,h,b)=>{G.trackRecommendationFeedbackSubmitted({...Z(I,h),feedbackReason:b})})(o,y,u),e(se(re(o,y,{reasonText:u,skipped:!1}))),((I,h)=>{z.set(Ee(h,I.lineId,I.dimension),{feedback:I,transactionId:h})})(o,y),s(!0)}),[o,S,e]),l=i.useCallback((()=>{var u,y;o!=null&&(u=o,y=S(o),G.trackRecommendationFeedbackSkipped(Z(u,y)),s(!1),n(null))}),[o,S]);return i.useEffect((()=>{if(!a||c!=="Completed"&&c!=="Error")return;s(!1),n(null);const u=c==="Completed";e(pt({messageSection:"recommendation_feedback",messageText:u?"success":"failed",type:u?"success":"error",showStatusIcon:!0}))}),[a,c,e]),{onRecommendationSelection:D,popup:o!=null?R.jsx($t,{feedback:o,submitState:a?c:"Not-Started",onSubmit:p,onSkip:l}):null}}const pe=()=>{const t=Ne.getSignedInUser(),{useFeatureGate:e}=K(),{isFeatureEnabled:o}=e(_.isChainOfThoughtEnabled);return i.useMemo((()=>ft(t)&&o),[t,o])};function Xe(t){if(t!=null){if("customer"in t&&t.customer!=null){const{customer:e}=t;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in t&&t.vendor!=null){const{vendor:e}=t;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function Nn(t,e){const o=j(),{useFeatureGate:n}=K(),a=g((f=>ee(f))),s=a.userRole.includes("charge_card_user")||a.userRole.includes("charge_card_admin"),c=a.userRole!=null&&Re(a.userRole),d=a.userRole!=null&&_e(a.userRole),{isFeatureEnabled:T}=n(_.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:S}=n(_.isExpenseAutomationEnabled),D=pe(),p=i.useMemo((()=>({id:t,type:H(e)})),[t,e]),l=g((f=>Y(f,p))),u=l?.transactionDetailUpdateStatus?.fetchState,y=l?.transactionDetailLocalData?.lineItemById,I=g((f=>{const r=Y(f,p)?.transactionDetailLocalData.vendorUpdates?.id;return r==null?"Not-Started":f.transactionVendorViewState.editVendorStateById[r]?.saveStatus.fetchState??"Not-Started"})),h=i.useMemo((()=>l?.fetchState==="Completed"?Xe(l?.transaction):void 0),[l?.fetchState,l?.transaction]),b=g((f=>{if(h!=null)return we(f.customerIncomeState,f.vendorExpenseState,f.trendState,h,"month")})),k=g((f=>le(f))),C=g((f=>{if(h!=null)return Pe(f.trendWithTransactionsState,h,"TransactionDetail")})),w=a.company?.companyInfo.firstMonthOfFY??1,A=g((f=>Fe(f.accountState,f.accountListState,"accountList"))),[P,F]=i.useState(!1),[V,U]=i.useState(!1),[L,B]=i.useState(!1);i.useEffect((()=>{F(!1),U(!1),B(!1)}),[t,e]);const q=i.useCallback((()=>{F(!1),U(!1)}),[]),[M,O]=i.useState(!1),W=C?.selectedPeriod?.timePeriod;return i.useEffect((()=>{L||l==null||l.transaction==null||(o(Ue({id:l.transaction.id,type:l.transaction.type})),B(!0)),h!=null&&(!s||c&&d===!1)&&(P?V||b==null||(U(!0),o(me(h,"TransactionDetail",{timeframe:"month",timePeriod:W??b}))):(o(de()),o(ue()),F(!0),o(xe(h))))}),[o,L,l?.fetchState,l?.transaction,h,s,c,d,P,V,b,W]),i.useEffect((()=>{k.newVendorState?.vendorDetailLocalData?.vendorName!=null?O(!0):O(!1)}),[k.newVendorState?.vendorDetailLocalData?.vendorName]),i.useEffect((()=>()=>{o($("common"))}),[o]),{currentTenant:a,loggedInUserHasCardUserOrAdminRole:s,isUserHasDashboardAccess:c,isUserHasInvestorOrBankerAccess:d,isVendorBulkUpdateOnTransactionEnabled:T,isExpenseAutomationEnabled:S,isChainOfThoughtEnabled:D,selectedTransaction:p,transactionDetail:l,rawDetailSaveStatus:u,rawDetailLineItemById:y,vendorSaveStatus:I,tranEntity:h,defaultTrendTransactionTimePeriod:b,vendorViewDetails:k,uiState:C,firstMonthOfFY:w,uncategorizedAccounts:A,resetTrendIsFetchedStates:q,isCreateVendorDrawerOpen:M,setIsCreateVendorDrawerOpen:O}}const Sn={overlayWidth:new Yt(100,100,58)},yn=({isOpen:t,onSaveVendor:e,onSaveSuccess:o,onCancel:n,vendorViewDetails:a})=>{const s=Gt(),c=qt(),d=j(),T=g((p=>le(p))),S=()=>{n()},D={vendorDetailView:a??T,onSaveSuccess:()=>{d(Le()),d(ht("Not-Started")),o()},onSaveVendor:e,onCancelClick:S,saveVendorDetailLocalData:p=>{d(Ve({vendorId:void 0,localData:p}))}};return R.jsx(sn,{anchor:"right",open:t,PaperProps:{style:{width:Sn.overlayWidth.valuePercentage(c),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.4,cursor:"pointer"}}},onClose:S,children:R.jsx(Tn,{onClick:p=>p.stopPropagation(),children:R.jsx(Ht,{...D})})})},Tn=an(on)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-Oqbhz69O.js";import{h as K,g as U,u as Z,i as X,j as g,N as q,l as H,n as Me,o as C}from"./core-DWK-yy-f.js";import{fF as Q,ua as ee,lf as p,eE as te,S6 as Se,br as pe,$K as Be,l$ as ae,Wg as ne,$L as fe,$M as Le,bE as k,S2 as he,$N as Fe,$O as Te,$P as Oe,S5 as ge,$Q as $e,$R as De,$S as Ge,$T as Ie,$U as ze,$V as we,$W as ye,Ti as Re}from"./zeni-epic-state-BHC2ac1c.js";import{o as ce,S as J,k as F,G as ke,de as oe,p as w,a5 as se,ar as _e,Q as Ve}from"./index-B6CDEkoa.js";import"./mui-CXd5PBjh.js";import{a as y}from"./sentry-DaOZuZWH.js";import{w as ie}from"./withTransactionSidePanel-CwmhFH4y.js";import{p as re,c as de}from"./routePaths-C8QqLxFB.js";import{B as Ne}from"./utils-wj3imWq2.js";import{d as j}from"./decodeURIComponentSafe-vftzpe4R.js";import{Z as Je}from"./ZeniAccountStatementScreen-Bkc530dM.js";import"./recharts-BTQwLLFS.js";import"./analytics-aFpUj4gs.js";import"./plaid--nk7zPNe.js";import"./dnd-BQcaJ1VA.js";import"./stripe-cKAAJElX.js";import"./lottie-BLloBrVp.js";import"./lexical-D0wtImar.js";import"./pdf-B7YVgnpS.js";import"./useAskAiCfoHostNavButtonProps-BSGTY8mB.js";import"./TransactionDetailScreen-B7aagNFt.js";import"./useInitialThreadRequest-zQQSgVed.js";import"./expenseAutomationHelper-DzkVKD6z.js";import"./stripSplatSuffix-AHDw7hZv.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]="aabf1800-f1ed-4031-a64a-787a2a7bd7dc",a._sentryDebugIdIdentifier="sentry-dbid-aabf1800-f1ed-4031-a64a-787a2a7bd7dc")}catch{}})();const Ue=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],N=a=>Ne(a),Ye=()=>{const{common:a,uncategorizedTransactionList:e}=ke.getLocalizedStrings();return{amount:e.missingReceipt.missingReceiptMinAmount.amount,currencyCode:a.currency.currencyCode,currencySymbol:a.currency.currencySymbol}},qe=H((function(a,e){const t=Be(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,N(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=N(e.selectedAccount.tranListType),d=Ke(t,n,c,o,e.bookCloseDate);F.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(fe({uiState:{dateRange:d},type:N(e.selectedAccount.tranListType)})),a(Se(o,p(d),!1,o==="missingReceipts"?Ye():void 0)),e.onSelectedTimePeriodChange(p(d))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({uiState:{scrollYOffset:t},type:N(e.selectedAccount.tranListType)}))}}}))(oe),V=ie((function({...a}){const e=K(),t=U(),n=Z(),c=t.pathname.split("/").find((l=>Ue.includes(l))),o=c??"uncategorized-expense",{tenantEmailDomain:d}=X(),{accountType:Y,title:b,subTitle:A}=Qe(o),f="month",T=g((l=>Q(l))),v=T.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:S}=ce(),{isFeatureEnabled:h}=S(J.isProjectsTransactionsEnabled),I=g((l=>ee(l)))&&h,{dataAvailable:x,initialTimeframeTick:O}=We(o,v,T.bookCloseDate),[P,$]=y.useState(!1),[E,G]=y.useState(void 0),u=y.useMemo((()=>{const l=p(O);return{tranListType:o,accountType:te(Y),title:b,subTitle:A,timeframe:f,period:l}}),[o,f,Y,x]);y.useEffect((()=>{if(!P&&u!=null){$(!0),F.trackTransactionList(void 0,void 0,void 0,u.title);const l=N(u.tranListType);n(Se(l,u.period,!0,l==="missingReceipts"?Ye():void 0))}}),[P,u,n]);let M=u;return u!=null&&E!=null&&(M={...u,period:E}),c==null||M==null?s.jsx(q,{to:"../"}):s.jsx(qe,{firstMonthOfFY:v,tenantEmailDomain:d,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:x,navigate:e,showProjectField:I,selectedAccount:M,referrerType:o,bookCloseDate:T.bookCloseDate,onSelectedTimePeriodChange:l=>G(l),...a})})),Qe=a=>{let e="",t="";const n=ke.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.common.texts.uncategorizedExpenses;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.common.texts.receipts}return{accountType:e,title:t,subTitle:""}},We=(a,e,t)=>{const n=pe();let c=pe().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:re(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Ke=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},Ze=H((function(a,e){const t=Fe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??be();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),F.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(he(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}}))(oe),Xe=ie((function({referrerType:a,...e}){const t=K(),n=U(),c=Z(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,classIdEncoded:b,timeframe:A,startDate:f,endDate:T,titleEncoded:v}=X(),S=j(d??""),h=j(Y??""),I=j(b??""),x=j(v??""),O=g((r=>Le(r.transactionListState,h,S,I))),[P,$]=y.useState(!1),[E,G]=y.useState(void 0),u=g((r=>Q(r))),M=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ce(),{isFeatureEnabled:m}=l(J.isProjectsTransactionsEnabled),z=g((r=>ee(r)))&&m;let i;const L=He(S,h,I,A,f,T,x);if(L){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},_=et(O?.dateRange,r);i={accountId:h,accountType:te(S),classId:I,title:x,timeframe:A,period:_}}y.useEffect((()=>{P||i==null||($(!0),F.trackTransactionList(i.accountId,void 0,a,i.title),c(he(i.accountId,i.accountType,i.classId,i.period)))}),[P,i,c]);let B=i;i!=null&&E!=null&&(B={...i,period:E});const R=[d,Y,b,A,f,T,v].filter((r=>r!=null));return L&&B!=null?s.jsx(Ze,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,showProjectField:z,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>G(r),...e}):s.jsx(q,{to:be(R.length)})})),be=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},He=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,et=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),tt=H((function(a,e){const t=$e(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??ve();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),F.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(De({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(De({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}}))(oe),at=ie((function({referrerType:a,...e}){const t=K(),n=U(),c=Z(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,projectIdEncoded:b,timeframe:A,startDate:f,endDate:T,titleEncoded:v}=X(),S=j(d??""),h=j(Y??""),I=j(b??""),x=j(v??""),O=g((r=>Oe(r.transactionListState,h,S,I))),[P,$]=y.useState(!1),[E,G]=y.useState(void 0),u=g((r=>Q(r))),M=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ce(),{isFeatureEnabled:m}=l(J.isProjectsTransactionsEnabled),z=g((r=>ee(r)))&&m;let i;const L=nt(S,h,I,A,f,T,x);if(L){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},_=ct(O?.dateRange,r);i={accountId:h,accountType:te(S),projectId:I,title:x,timeframe:A,period:_}}y.useEffect((()=>{P||i==null||($(!0),F.trackTransactionList(i.accountId,void 0,a,i.title),c(ge(i.accountId,i.accountType,i.projectId,i.period)))}),[P,i,c]);let B=i;i!=null&&E!=null&&(B={...i,period:E});const R=[d,Y,b,A,f,T,v].filter((r=>r!=null));return L&&B!=null?s.jsx(tt,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,showProjectField:z,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>G(r),...e}):s.jsx(q,{to:ve(R.length)})})),ve=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},nt=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,ct=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),ot=H((function(a,e){const t=ze(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&we(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Pe();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),F.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(ye({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(Ie(e.selectedAccount.accountId,e.selectedAccount.accountType,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ye({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=rt(e.tenantEmailDomain),n=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}}))(oe),Ae=ie((function({referrerType:a,...e}){const t=K(),n=U(),c=Z(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,timeframe:b,startDate:A,endDate:f,titleEncoded:T,excludeSubAccounts:v}=X(),S=j(d??""),h=j(Y??""),I=j(T??""),x=!(v!=null&&v==="exclude_subaccounts"),O=g((D=>Ge(D.transactionListState,h,S))),[P,$]=y.useState(!1),[E,G]=y.useState(void 0),u=g((D=>Q(D))),M=u.company?.featuresActivationInfo.connectedAccountProvider==="unit",l=u.company?.companyInfo.firstMonthOfFY??1;let m;const z=st(S,h,b,A,f,I);if(z){const D={startDate:k(A,"YYYY-MM-DD"),endDate:k(f,"YYYY-MM-DD")},le=it(O?.dateRange,D);m={accountId:h,accountType:te(S),title:I,timeframe:b,period:le}}let i=m;m!=null&&E!=null&&(i={...m,period:E});const{useFeatureGate:L}=ce(),{isFeatureEnabled:B}=L(J.isTransactionCommentingEnabled),R=y.useCallback(((D,le)=>{if(o==null)return;const me=D.url.split(`/${o}/`)[1];if(me==null)return;const[je,xe]=me.split("?"),W=new URLSearchParams(xe??"");W.set("view","full"),W.set("thread_id",le),W.set("entity_type",D.entityType);const Ce=w(n.state?.pathnameStackToGoBack,n.pathname);t(`/${o}/${je}?${W.toString()}`,{state:{pathnameStackToGoBack:Ce}})}),[t,o,n.state,n.pathname]),{isFeatureEnabled:r}=L(J.isProjectsTransactionsEnabled),_=g((D=>ee(D)))&&r,{areTenantIdsInSync:ue}=_e();y.useEffect((()=>{!P&&m!=null&&ue&&($(!0),F.trackTransactionList(m.accountId,void 0,a,m.title),c(Ie(m.accountId,m.accountType,m.period,void 0,!1,x)))}),[P,m,c,ue]);const Ee=[d,Y,b,A,f,T].filter((D=>D!=null));return z&&i!=null?s.jsx(ot,{firstMonthOfFY:l,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:M,isTransactionCommentingEnabled:B,onCommentThreadClick:R,showProjectField:_,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:D=>G(D),...e}):s.jsx(q,{to:Pe(Ee.length)})})),Pe=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},st=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&k(n,"YYYY-MM-DD").isValid()&&k(c,"YYYY-MM-DD").isValid()&&o!=null,it=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),rt=a=>`/${a}/transactions/${Re}/statements`;function Bt(){const a=U().state?.referrer,e=g((n=>n.expenseAutomationViewState.selectedPeriodByTenantId))[g((n=>Q(n))).tenantId],t=Ve();return s.jsxs(Me,{children:[s.jsx(C,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(Ae,{referrerType:a})}),s.jsx(C,{path:"/zeni-clearing-account/statements",element:s.jsx(Je,{})}),s.jsx(C,{path:"/*",element:s.jsx(Ae,{referrerType:a})}),s.jsx(C,{path:"/uncategorized-income/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/uncategorized-expense/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/miscategorized-income/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/miscategorized-expense/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/missing-receipts/*",element:t?s.jsx(q,{to:`../../month_end_close_checks/review/missing_receipts/${e.month}-${e.year}`}):s.jsx(V,{})}),s.jsx(C,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Xe,{referrerType:a})}),s.jsx(C,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(at,{referrerType:a})})]})}export{Bt as default};
|
|
1
|
+
import{j as s}from"./liveblocks-BjcYyeQ6.js";import{h as K,g as U,u as Z,i as X,j as g,N as q,l as H,n as Me,o as C}from"./core-B-8b0iz9.js";import{fF as Q,ua as ee,lf as p,eE as te,S6 as Se,br as pe,$K as Be,l$ as ae,Wg as ne,$L as fe,$M as Le,bE as k,S2 as he,$N as Fe,$O as Te,$P as Oe,S5 as ge,$Q as $e,$R as De,$S as Ge,$T as Ie,$U as ze,$V as we,$W as ye,Ti as Re}from"./zeni-epic-state-95zxmizy.js";import{o as ce,S as J,k as F,G as ke,de as oe,p as w,a5 as se,ar as _e,Q as Ve}from"./index-DuxR1XDX.js";import"./mui-C33Oegsm.js";import{a as y}from"./sentry-DZ9rNYfw.js";import{w as ie}from"./withTransactionSidePanel-qep2Sc8k.js";import{p as re,c as de}from"./routePaths-B1syYHWh.js";import{B as Ne}from"./utils-D3rZq_G4.js";import{d as j}from"./decodeURIComponentSafe-hAviH84T.js";import{Z as Je}from"./ZeniAccountStatementScreen-L3XK5pKW.js";import"./recharts-DkYxIsLi.js";import"./analytics-8lQ_GaR7.js";import"./plaid-Bt28AVCt.js";import"./dnd-CtOxA7uX.js";import"./stripe-cKAAJElX.js";import"./lottie-BdAYiWcR.js";import"./lexical-BVt4M34U.js";import"./pdf-BkfulyEw.js";import"./useAskAiCfoHostNavButtonProps-CvEN7QS-.js";import"./TransactionDetailScreen-KBMzz0Xq.js";import"./useInitialThreadRequest-Chu-ipGI.js";import"./expenseAutomationHelper-BzOPc0En.js";import"./stripSplatSuffix-Te2Zqy4u.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]="aabf1800-f1ed-4031-a64a-787a2a7bd7dc",a._sentryDebugIdIdentifier="sentry-dbid-aabf1800-f1ed-4031-a64a-787a2a7bd7dc")}catch{}})();const Ue=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],N=a=>Ne(a),Ye=()=>{const{common:a,uncategorizedTransactionList:e}=ke.getLocalizedStrings();return{amount:e.missingReceipt.missingReceiptMinAmount.amount,currencyCode:a.currency.currencyCode,currencySymbol:a.currency.currencySymbol}},qe=H((function(a,e){const t=Be(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,N(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=N(e.selectedAccount.tranListType),d=Ke(t,n,c,o,e.bookCloseDate);F.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(fe({uiState:{dateRange:d},type:N(e.selectedAccount.tranListType)})),a(Se(o,p(d),!1,o==="missingReceipts"?Ye():void 0)),e.onSelectedTimePeriodChange(p(d))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({uiState:{scrollYOffset:t},type:N(e.selectedAccount.tranListType)}))}}}))(oe),V=ie((function({...a}){const e=K(),t=U(),n=Z(),c=t.pathname.split("/").find((l=>Ue.includes(l))),o=c??"uncategorized-expense",{tenantEmailDomain:d}=X(),{accountType:Y,title:b,subTitle:A}=Qe(o),f="month",T=g((l=>Q(l))),v=T.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:S}=ce(),{isFeatureEnabled:h}=S(J.isProjectsTransactionsEnabled),I=g((l=>ee(l)))&&h,{dataAvailable:x,initialTimeframeTick:O}=We(o,v,T.bookCloseDate),[P,$]=y.useState(!1),[E,G]=y.useState(void 0),u=y.useMemo((()=>{const l=p(O);return{tranListType:o,accountType:te(Y),title:b,subTitle:A,timeframe:f,period:l}}),[o,f,Y,x]);y.useEffect((()=>{if(!P&&u!=null){$(!0),F.trackTransactionList(void 0,void 0,void 0,u.title);const l=N(u.tranListType);n(Se(l,u.period,!0,l==="missingReceipts"?Ye():void 0))}}),[P,u,n]);let M=u;return u!=null&&E!=null&&(M={...u,period:E}),c==null||M==null?s.jsx(q,{to:"../"}):s.jsx(qe,{firstMonthOfFY:v,tenantEmailDomain:d,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:x,navigate:e,showProjectField:I,selectedAccount:M,referrerType:o,bookCloseDate:T.bookCloseDate,onSelectedTimePeriodChange:l=>G(l),...a})})),Qe=a=>{let e="",t="";const n=ke.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.common.texts.uncategorizedExpenses;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.common.texts.receipts}return{accountType:e,title:t,subTitle:""}},We=(a,e,t)=>{const n=pe();let c=pe().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:re(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Ke=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},Ze=H((function(a,e){const t=Fe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??be();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),F.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(he(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}}))(oe),Xe=ie((function({referrerType:a,...e}){const t=K(),n=U(),c=Z(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,classIdEncoded:b,timeframe:A,startDate:f,endDate:T,titleEncoded:v}=X(),S=j(d??""),h=j(Y??""),I=j(b??""),x=j(v??""),O=g((r=>Le(r.transactionListState,h,S,I))),[P,$]=y.useState(!1),[E,G]=y.useState(void 0),u=g((r=>Q(r))),M=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ce(),{isFeatureEnabled:m}=l(J.isProjectsTransactionsEnabled),z=g((r=>ee(r)))&&m;let i;const L=He(S,h,I,A,f,T,x);if(L){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},_=et(O?.dateRange,r);i={accountId:h,accountType:te(S),classId:I,title:x,timeframe:A,period:_}}y.useEffect((()=>{P||i==null||($(!0),F.trackTransactionList(i.accountId,void 0,a,i.title),c(he(i.accountId,i.accountType,i.classId,i.period)))}),[P,i,c]);let B=i;i!=null&&E!=null&&(B={...i,period:E});const R=[d,Y,b,A,f,T,v].filter((r=>r!=null));return L&&B!=null?s.jsx(Ze,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,showProjectField:z,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>G(r),...e}):s.jsx(q,{to:be(R.length)})})),be=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},He=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,et=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),tt=H((function(a,e){const t=$e(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??ve();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),F.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(De({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(De({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}}))(oe),at=ie((function({referrerType:a,...e}){const t=K(),n=U(),c=Z(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,projectIdEncoded:b,timeframe:A,startDate:f,endDate:T,titleEncoded:v}=X(),S=j(d??""),h=j(Y??""),I=j(b??""),x=j(v??""),O=g((r=>Oe(r.transactionListState,h,S,I))),[P,$]=y.useState(!1),[E,G]=y.useState(void 0),u=g((r=>Q(r))),M=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ce(),{isFeatureEnabled:m}=l(J.isProjectsTransactionsEnabled),z=g((r=>ee(r)))&&m;let i;const L=nt(S,h,I,A,f,T,x);if(L){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},_=ct(O?.dateRange,r);i={accountId:h,accountType:te(S),projectId:I,title:x,timeframe:A,period:_}}y.useEffect((()=>{P||i==null||($(!0),F.trackTransactionList(i.accountId,void 0,a,i.title),c(ge(i.accountId,i.accountType,i.projectId,i.period)))}),[P,i,c]);let B=i;i!=null&&E!=null&&(B={...i,period:E});const R=[d,Y,b,A,f,T,v].filter((r=>r!=null));return L&&B!=null?s.jsx(tt,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,showProjectField:z,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>G(r),...e}):s.jsx(q,{to:ve(R.length)})})),ve=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},nt=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,ct=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),ot=H((function(a,e){const t=ze(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&we(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Pe();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),F.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(ye({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(Ie(e.selectedAccount.accountId,e.selectedAccount.accountType,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ye({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=rt(e.tenantEmailDomain),n=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}}))(oe),Ae=ie((function({referrerType:a,...e}){const t=K(),n=U(),c=Z(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,timeframe:b,startDate:A,endDate:f,titleEncoded:T,excludeSubAccounts:v}=X(),S=j(d??""),h=j(Y??""),I=j(T??""),x=!(v!=null&&v==="exclude_subaccounts"),O=g((D=>Ge(D.transactionListState,h,S))),[P,$]=y.useState(!1),[E,G]=y.useState(void 0),u=g((D=>Q(D))),M=u.company?.featuresActivationInfo.connectedAccountProvider==="unit",l=u.company?.companyInfo.firstMonthOfFY??1;let m;const z=st(S,h,b,A,f,I);if(z){const D={startDate:k(A,"YYYY-MM-DD"),endDate:k(f,"YYYY-MM-DD")},le=it(O?.dateRange,D);m={accountId:h,accountType:te(S),title:I,timeframe:b,period:le}}let i=m;m!=null&&E!=null&&(i={...m,period:E});const{useFeatureGate:L}=ce(),{isFeatureEnabled:B}=L(J.isTransactionCommentingEnabled),R=y.useCallback(((D,le)=>{if(o==null)return;const me=D.url.split(`/${o}/`)[1];if(me==null)return;const[je,xe]=me.split("?"),W=new URLSearchParams(xe??"");W.set("view","full"),W.set("thread_id",le),W.set("entity_type",D.entityType);const Ce=w(n.state?.pathnameStackToGoBack,n.pathname);t(`/${o}/${je}?${W.toString()}`,{state:{pathnameStackToGoBack:Ce}})}),[t,o,n.state,n.pathname]),{isFeatureEnabled:r}=L(J.isProjectsTransactionsEnabled),_=g((D=>ee(D)))&&r,{areTenantIdsInSync:ue}=_e();y.useEffect((()=>{!P&&m!=null&&ue&&($(!0),F.trackTransactionList(m.accountId,void 0,a,m.title),c(Ie(m.accountId,m.accountType,m.period,void 0,!1,x)))}),[P,m,c,ue]);const Ee=[d,Y,b,A,f,T].filter((D=>D!=null));return z&&i!=null?s.jsx(ot,{firstMonthOfFY:l,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:M,isTransactionCommentingEnabled:B,onCommentThreadClick:R,showProjectField:_,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:D=>G(D),...e}):s.jsx(q,{to:Pe(Ee.length)})})),Pe=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},st=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&k(n,"YYYY-MM-DD").isValid()&&k(c,"YYYY-MM-DD").isValid()&&o!=null,it=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),rt=a=>`/${a}/transactions/${Re}/statements`;function Bt(){const a=U().state?.referrer,e=g((n=>n.expenseAutomationViewState.selectedPeriodByTenantId))[g((n=>Q(n))).tenantId],t=Ve();return s.jsxs(Me,{children:[s.jsx(C,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(Ae,{referrerType:a})}),s.jsx(C,{path:"/zeni-clearing-account/statements",element:s.jsx(Je,{})}),s.jsx(C,{path:"/*",element:s.jsx(Ae,{referrerType:a})}),s.jsx(C,{path:"/uncategorized-income/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/uncategorized-expense/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/miscategorized-income/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/miscategorized-expense/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/missing-receipts/*",element:t?s.jsx(q,{to:`../../month_end_close_checks/review/missing_receipts/${e.month}-${e.year}`}):s.jsx(V,{})}),s.jsx(C,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Xe,{referrerType:a})}),s.jsx(C,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(at,{referrerType:a})})]})}export{Bt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-
|
|
1
|
+
import{j as e}from"./liveblocks-BjcYyeQ6.js";import{h as L,g as F,u as U,i as M,j as y,N as D,l as V,n as Te,o as k}from"./core-B-8b0iz9.js";import{cv as N,fF as v,Zj as P,Ow as ae,Od as H,Oe as ne,Zl as Ie,Oz as we,Zh as Ce,Zi as se,Zx as ke,MA as je,Cd as Ae,Zn as be,OG as Ee,Zk as re,dd as q,GK as oe,dZ as ve,d_ as De,$H as Le,$I as Fe,Of as Ue,$J as Pe,Og as Be,Op as Oe,bq as Re,bJ as Me,cG as Ve,bK as Ne,cu as _e,bt as Ze,Ui as ze,ct as Ge}from"./zeni-epic-state-95zxmizy.js";import{K as _,j as $e,z as E,a9 as Z,k as A,d7 as He,d8 as qe,d9 as $,a2 as K,E as Ke,ar as Je,at as We,o as ie,S as O,ac as Qe,a8 as Xe,da as Ye,af as J,p as et,db as tt,a5 as W,dc as at,aj as nt,a0 as X,dd as st,f as rt}from"./index-DuxR1XDX.js";import{D as ot,n as R,S as it}from"./mui-C33Oegsm.js";import ct from"./NotFoundScreen-BatgS8le.js";import{S as Y}from"./SetupPagesScreen-CdpIgBzw.js";import{a as p}from"./sentry-DZ9rNYfw.js";import{u as lt}from"./useAskAiCfoHostNavButtonProps-CvEN7QS-.js";import{u as ut}from"./useInitialThreadRequest-Chu-ipGI.js";import{M as ce}from"./MobileAppDrawer-0TaE2Qid.js";import{F as dt}from"./FeaturePreviewScreen-v5dVXn4p.js";import{a as ee}from"./analyticsHelper-C6SU-53H.js";import"./recharts-DkYxIsLi.js";import"./analytics-8lQ_GaR7.js";import"./plaid-Bt28AVCt.js";import"./dnd-CtOxA7uX.js";import"./stripe-cKAAJElX.js";import"./lottie-BdAYiWcR.js";import"./lexical-BVt4M34U.js";import"./pdf-BkfulyEw.js";import"./utils-D3rZq_G4.js";import"./BusinessVerificationPageScreen-B20TVwus.js";import"./routePaths-B1syYHWh.js";import"./InboxNotificationsProvider-B4UF_uUg.js";import"./useTaskManagerAccess-ECD0Ec-b.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="0907433a-ce25-49b6-a9cd-12e49cdaa456",t._sentryDebugIdIdentifier="sentry-dbid-0907433a-ce25-49b6-a9cd-12e49cdaa456")}catch{}})();const pt=V((function(t,a){const{companyId:n}=a;return{treasurySetupView:P(t,n),analytics:A}}),(function(t,a){const{navigate:n,analytics:o,treasurySetupView:i}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=i.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(we(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(Ie(r))}}}))(He);function mt(){const t=L(),a=F(),n=U(),{tenantEmailDomain:o}=M(),i=_(),r=y((w=>w.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState)),m=$e(r),s=N(i?.loggedInUserRoleMap),[d,c]=p.useState(!1),[S,T]=p.useState(!1),[l,u]=p.useState(!1),x=y((w=>v(w))),f=E.getSignedInUserTenant(o)?.companyId??x.companyId,C=E.getSignedInUser(),h=y((w=>P(w,f))),g=y((w=>w.treasurySetupViewState.fetchState)),j=y((w=>w.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),I=y((w=>w.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState));if(C==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(p.useEffect((()=>{d||g!=="Not-Started"||f==null||(c(!0),n(ae(f,!0,!1)))}),[d,g,f,n]),p.useEffect((()=>{l||I!=="Not-Started"||f==null||(u(!0),n(H()))}),[l,I,f,n]),p.useEffect((()=>{S||j!=="Not-Started"||f==null||(T(!0),n(ne()))}),[S,j,f,n]),p.useEffect((()=>{m==="In-Progress"&&r==="Completed"&&t("../")}),[m,r,t]),x.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(D,{to:"../promo"});const B=x.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||g!=="Completed";return e.jsxs(e.Fragment,{children:[!B&&e.jsx(Z,{analytics:A,onLoad:()=>{}}),e.jsx(pt,{navigate:t,location:a,companyId:f,isEditMode:!0,isLoading:B,isReadOnly:!s,treasurySetupView:h,analytics:A})]})}const ft=V((function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:ke(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:P(t,n)}}),(function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:i}=a,r=o.treasuryTransferMoneyLocalData,m=i.fundAllocationLocalData;return{onCancelClick:()=>{$(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{$(a.analytics,"confirm",r,m,"Transfer"),t(Ee())},onSaveChangesToLocalStore:s=>{t(be(s))},onFetchLinkTokenClick:s=>{t(Ae("treasury_setup",s))},onEstablishConnectionClick:s=>{t(je(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}}))(qe),yt=({isFirstTransfer:t,isTransactionsLoaded:a})=>{const n=L(),{tenantEmailDomain:o}=M(),i=U(),[r,m]=p.useState(!1),[s,d]=p.useState(!1),[c,S]=p.useState(!1),[T,l]=p.useState(!1),u=y((I=>I.treasurySetupViewState.fetchState)),x=y((I=>I.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState)),f=y((I=>I.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),C=y((I=>v(I))),h=E.getSignedInUserTenant(o)?.companyId??C.companyId,g=y((I=>Ce(I))),j=y((I=>P(I,h)));if(E.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return p.useEffect((()=>{s||u!=="Not-Started"||h==null||(d(!0),i(ae(h,!0,!1)))}),[s,u,h,i]),p.useEffect((()=>{c||x!=="Not-Started"||h==null||(S(!0),i(H()))}),[c,x,h,i]),p.useEffect((()=>{T||f!=="Not-Started"||h==null||(l(!0),i(ne()))}),[T,f,h,i]),e.jsxs(e.Fragment,{children:[e.jsx(Z,{analytics:A,onLoad:()=>{}}),e.jsx(ft,{analytics:A,navigate:n,transferDetails:g,onAnotherTransferClick:()=>{m(!1),i(se())},currentTenant:C,treasurySetupView:j,showReviewContent:r,maxInsuredAmount:5e5,onReviewClick:()=>{$(A,"review",g.treasuryTransferMoneyLocalData,j.fundAllocationLocalData,"Transfer"),m(!0)},isFirstTransfer:t,isTransactionsLoaded:a,setShowReviewContent:m,onBackClick:()=>{}})]})},gt=R.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-
|
|
1
|
+
import{j as o}from"./liveblocks-BjcYyeQ6.js";import{a as u}from"./sentry-DZ9rNYfw.js";import{h as M,u as G,i as z,j as f,l as N,g as q,n as We,o as P,N as L}from"./core-B-8b0iz9.js";import{VN as gt,VO as Ze,RA as et,VP as vt,fF as U,g_ as ge,VQ as Tt,cE as xt,VR as bt,FH as yt,VS as wt,VT as oe,VU as te,VV as ve,T9 as ue,Ta as ke,FX as pe,T8 as he,FK as tt,Fh as Pe,VW as It,Tb as Y,l$ as me,VX as je,Fb as Ct,VY as Dt,VZ as Et,V_ as Ve,V$ as _e,W0 as Ae,W1 as Re,FR as Te,W2 as nt,Fy as at,W3 as Ft,W4 as kt,W5 as Pt,W6 as jt,W7 as Vt,W8 as _t,W9 as At,Wa as Rt,Cp as Ut,Cx as Lt,Cq as Bt,Sg as we,Wb as Ot,Wc as Wt,lf as Ie,br as Mt,Wd as Nt,We as Gt,mZ as $t,n6 as zt,Sf as Ce,bE as Me,Wf as ot,RS as st,Wg as Yt,Wh as Jt,Wi as Kt,n8 as qt,Wj as Ne,Wk as Ge,Wl as $e,Wm as ze,Wn as Ht,n4 as Qt,Wo as Xt,n7 as Zt,Wp as en,Wq as it,SB as rt,mn as tn,Wr as nn,Ws as De,Wt as dt,Sz as lt,Ip as an,Wu as on,Wv as sn,mH as ct,Ww as rn,Wx as dn,SN as ln,vg as cn,Wy as ut,Wz as Ye,SK as Ee,WA as Je,WB as un,SP as pn,WC as hn,WD as mn,WE as fn,WF as Sn,WG as gn,vj as vn,WH as Tn,Tc as xn,UM as bn,Ss as Fe,ia as yn,UO as wn,UN as In,i8 as Cn,WI as Dn,WJ as En,Iu as Fn,WK as kn,WL as Pn,WM as jn,WN as Vn,mr as _n,bn as An,d_ as Rn,dZ as Un}from"./zeni-epic-state-95zxmizy.js";import{E as Ln,a2 as ne,ac as Ue,o as H,S as W,z as R,a8 as Bn,aN as On,k as j,_ as Le,O as xe,aw as ee,at as se,aO as Wn,aP as pt,ar as Mn,a9 as Se,aQ as Nn,p as K,K as Gn,G as ht,aR as $n,af as mt,a5 as zn,j as Ke,aS as Yn,H as J,aa as Jn,ag as ft,ah as Kn,aT as qn,aU as Hn,V as Be,aV as Qn,aW as Xn,a4 as Zn,aX as ea,aY as ta}from"./index-DuxR1XDX.js";import{D as na,n as B,S as St}from"./mui-C33Oegsm.js";import{t as aa,A as oa}from"./AddressScreen-DvJ6yyMx.js";import fe from"./NotFoundScreen-BatgS8le.js";import{F as sa}from"./FeaturePreviewScreen-v5dVXn4p.js";import{S as ia,a as ra,J as da,b as la,c as ca}from"./ScheduleDetailsPrepaidExpensesScreen-UKD1lb2-.js";import{u as ie}from"./useAskAiCfoHostNavButtonProps-CvEN7QS-.js";import{M as re}from"./MobileAppDrawer-0TaE2Qid.js";import{v as Oe,c as ua,d as pa}from"./routePaths-B1syYHWh.js";import{D as ha}from"./DrawerScreen-I5-Ak-b_.js";import{a as ma,m as fa}from"./accountMappingHelper-Ci74NLEW.js";import"./recharts-DkYxIsLi.js";import"./analytics-8lQ_GaR7.js";import"./plaid-Bt28AVCt.js";import"./dnd-CtOxA7uX.js";import"./stripe-cKAAJElX.js";import"./lottie-BdAYiWcR.js";import"./lexical-BVt4M34U.js";import"./pdf-BkfulyEw.js";import"./utils-D3rZq_G4.js";import"./pathToGoBack-Bgu6njoM.js";import"./InboxNotificationsProvider-B4UF_uUg.js";import"./useTaskManagerAccess-ECD0Ec-b.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]="be60093b-0fde-42b6-8882-41a946c55fb8",e._sentryDebugIdIdentifier="sentry-dbid-be60093b-0fde-42b6-8882-41a946c55fb8")}catch{}})();const Sa={drawerLeftMargin:new Ue(0,0,100,200)},ga=N((function(e,a){const{jeScheduledTransaction:s,selectedJERow:t,scheduleType:n,isVendorBulkUpdateOnTransactionEnabled:i}=a,{scheduleDetailsLocalData:l,updateStatus:p}=Ze(e,a.scheduleType),h=U(e),v=l[n].jeScheduleDetails[t].jeLink,m=v.type==="recommended"?v.recommendedTransactionID:v.transactionDetailID,r=m!=null?Tt(e,m):void 0,d=R.getSignedInUser(),c=e.tenantState.currentTenantId,T={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:h.tenantId??c},x=h?.company?.companyInfo?.firstMonthOfFY??1;return{jeScheduledTransaction:s,transactionDetail:r,localData:l[n].jeScheduleDetails[t],saveStatus:p.fetchState,authParams:T,isVendorBulkUpdateOnTransactionEnabled:i,firstMonthOfFY:x,isDisabled:p.fetchState==="In-Progress"?"readonly":void 0,analytics:j,qboAppUrl:xt(Le.qboRedirectionUrl)}}),(function(e,a){const{selectedJERow:s,jeScheduleDetailId:t,navigate:n}=a;return{onUpdateLocalData:i=>{const l=i.linkJETransaction.qboURL;l!=null&&e(wt({scheduleType:a.scheduleType,jeScheduleDetailId:t,rowId:s,jeLink:l}))},onFetchTransactionClick:i=>{e(et(i))},onSaveClick:()=>{e(yt(a.scheduleType,t))},onBackClick:()=>{n("..",{relative:"path"})},onCancelClick:()=>{const i=a.jeScheduledTransaction.scheduledJournalEntry[s];e(bt({scheduleType:a.scheduleType,jeScheduleDetailId:t,rowId:s,originalScheduledJE:i})),n("..",{relative:"path"})}}}))(On),va=()=>{const e=Ln(),a=M(),s=G(),{scheduleDetailId:t}=z(),n=ne(),i=Sa.drawerLeftMargin.valuePx(n),{scheduleType:l}=z(),{useFeatureGate:p}=H(),{isFeatureEnabled:h}=p(W.isVendorBulkUpdateOnTransactionEnabled),v=gt(l)??"prepaid_expenses",[m,r]=u.useState(!1);if(R.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const d=f((b=>Ze(b,v)));u.useEffect((()=>{d.fetchState==="Not-Started"&&a("..",{relative:"path"})}),[]);const c=d.selectedJELinkRowIndex,T=c!=null?d.scheduleDetailsLocalData[v].jeScheduleDetails[c]?.jeLink:null,x=T?.type==="recommended"?T.recommendedTransactionID:T?.transactionDetailID;u.useEffect((()=>{x!=null&&s(et(x))}),[]),u.useEffect((()=>{T?.type==="recommended"&&m===!1&&c!=null&&(r(!0),s(vt({scheduleType:v,jeScheduleDetailId:t,rowId:c})))}));const g=f((b=>U(b))),y=f((b=>ge(b,g.companyId)));return o.jsx(na,{anchor:"right",open:!0,PaperProps:{style:{width:`calc(100% - ${i})`,boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:e.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>a("..",{relative:"path"}),children:o.jsx(Ta,{onClick:b=>b.stopPropagation(),children:d.fetchState!=="Completed"||d.selectedJEScheduleTransaction==null||c==null?o.jsx(Bn,{fetchState:d.fetchState}):o.jsx(ga,{scheduleType:v,jeScheduleDetailId:t,selectedJERow:c,jeScheduledTransaction:d.selectedJEScheduleTransaction,isCOTEnabled:!1,navigate:a,scheduleTab:v,controllerUserDetails:y,isVendorBulkUpdateOnTransactionEnabled:h})})})},Ta=B(St)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
package/dist/assets/{WiseConfirmationScreen-CXOTG5K8.js → WiseConfirmationScreen-XbaBW0oW.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-
|
|
1
|
+
import{j as o}from"./liveblocks-BjcYyeQ6.js";import{a as l}from"./sentry-DZ9rNYfw.js";import{t as u,u as h,j as y,N as I}from"./core-B-8b0iz9.js";import{UA as b,gi as w,JD as j}from"./zeni-epic-state-95zxmizy.js";import{z as f,a8 as x,ag as S,ah as D}from"./index-DuxR1XDX.js";import{n as g}from"./mui-C33Oegsm.js";import"./recharts-DkYxIsLi.js";import"./analytics-8lQ_GaR7.js";import"./plaid-Bt28AVCt.js";import"./dnd-CtOxA7uX.js";import"./stripe-cKAAJElX.js";import"./lottie-BdAYiWcR.js";import"./lexical-BVt4M34U.js";import"./pdf-BkfulyEw.js";import"./utils-D3rZq_G4.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]="d20c9811-4153-46da-8628-ea8c5647eb5e",e._sentryDebugIdIdentifier="sentry-dbid-d20c9811-4153-46da-8628-ea8c5647eb5e")}catch{}})();const B=()=>{const[e]=u(),t=e.get("code")??"",i=e.get("state")??"",c=e.get("profileId")??"",[n,p]=l.useState(!1),a=h(),s=y((m=>b(m))),r=f.getSignedInUser(),d=f.getSignedInUserTenantWithId(i);if(r==null||d==null)return o.jsx(I,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),l.useEffect((()=>{n||(p(!0),a(j(t,c,i)))}),[n,a]),s.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:s.error?.message??""})}):(s.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},E=g.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
width: 100%;
|
|
4
4
|
height: 100vh;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-
|
|
1
|
+
import{j as e}from"./liveblocks-BjcYyeQ6.js";import{u as _,h as ae,g as W,i as N,j as D,l as te,N as ee,n as Fe,o as C}from"./core-B-8b0iz9.js";import{$m as $e,Lv as Ue,$n as ze,fF as R,GI as _e,$o as An,cu as ne,cv as Me,GC as kn,$p as Dn,$q as In,GF as Sn,GM as ge,Gz as Pn,Gw as bn,YX as le,$r as vn,P0 as jn,WT as En,P2 as Tn,mI as be,$s as Bn,uX as Ve,uL as Ze,mz as Ge,mC as ve,WU as je,WV as On,$t as Ln,mB as Rn,mY as Fn,mq as $n,kQ as Un,kP as zn,$u as _n,$v as he,OJ as Mn,$w as Vn,$x as Zn,Zb as ye,$y as Ee,$z as Gn,Pd as Hn,Zx as Wn,MA as He,Cd as We,$A as Nn,Pa as Yn,$B as Ne,da as xe,Ph as Ye,dZ as qe,d_ as Ce,Pf as qn,Mu as Kn,P7 as Jn,$C as Ke,$D as Je,OL as Xe,OV as Te,$E as Xn,Zo as Qn,Pi as ea,bq as na,bJ as aa,cG as ta,bK as oa,bt as sa,Ui as ia}from"./zeni-epic-state-95zxmizy.js";import{K as oe,o as Z,S as z,z as P,aw as we,E as F,a8 as de,cY as ra,a2 as V,ac as Y,a5 as Qe,j as ca,q as Be,k as B,cZ as la,af as Ae,c_ as da,a9 as ue,c$ as ua,V as ke,bj as H,d0 as pa,ar as ma,at as en,d1 as Oe,d2 as ga,p as ce,d3 as ha,aj as fa,d4 as ya,d5 as xa,f as Ca,H as wa}from"./index-DuxR1XDX.js";import{n as $,D as q,S as K}from"./mui-C33Oegsm.js";import Q from"./NotFoundScreen-BatgS8le.js";import{S as Le}from"./SetupPagesScreen-CdpIgBzw.js";import{F as nn}from"./FeaturePreviewScreen-v5dVXn4p.js";import{a as m}from"./sentry-DZ9rNYfw.js";import{M as pe}from"./MobileAppDrawer-0TaE2Qid.js";import{A as Aa,D as ka,V as Da}from"./DomesticWireDetailScreen-B2YgkOu5.js";import{A as Ia}from"./AddressScreen-DvJ6yyMx.js";import{u as an}from"./useAskAiCfoHostNavButtonProps-CvEN7QS-.js";import{Z as Sa}from"./ZeniAccountStatementScreen-L3XK5pKW.js";import"./recharts-DkYxIsLi.js";import"./analytics-8lQ_GaR7.js";import"./plaid-Bt28AVCt.js";import"./dnd-CtOxA7uX.js";import"./stripe-cKAAJElX.js";import"./lottie-BdAYiWcR.js";import"./lexical-BVt4M34U.js";import"./pdf-BkfulyEw.js";import"./utils-D3rZq_G4.js";import"./BusinessVerificationPageScreen-B20TVwus.js";import"./routePaths-B1syYHWh.js";import"./analyticsHelper-C6SU-53H.js";import"./InboxNotificationsProvider-B4UF_uUg.js";import"./useTaskManagerAccess-ECD0Ec-b.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="a36b5e9a-93d6-4c44-a12f-c7628a0cdef5",n._sentryDebugIdIdentifier="sentry-dbid-a36b5e9a-93d6-4c44-a12f-c7628a0cdef5")}catch{}})();const Pa=$.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as c}from"./liveblocks-
|
|
1
|
+
import{j as c}from"./liveblocks-BjcYyeQ6.js";import{a as f}from"./sentry-DZ9rNYfw.js";import{h as $,u as x,g as T,i as j,j as p}from"./core-B-8b0iz9.js";import{Ti as s,Th as v,$F as B,fF as C,$G as E}from"./zeni-epic-state-95zxmizy.js";import{a2 as z,af as g,E as D,z as L,a8 as P,d6 as G,a5 as N}from"./index-DuxR1XDX.js";import{n as _}from"./mui-C33Oegsm.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]="8d52779a-e613-4e05-b383-0464d0998de2",e._sentryDebugIdIdentifier="sentry-dbid-8d52779a-e613-4e05-b383-0464d0998de2")}catch{}})();const U=_.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./sentry-
|
|
1
|
+
import"./sentry-DZ9rNYfw.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]="459d6150-40e4-4fe0-88f2-7336312ca00a",e._sentryDebugIdIdentifier="sentry-dbid-459d6150-40e4-4fe0-88f2-7336312ca00a")}catch{}})();function d(e,t){if(t!=null)return e.find((n=>n.qboId===t))}function i(e,t){return e.filter((n=>n.qboId!=null&&t.includes(n.qboId)))}function s(e,t){return t.map((n=>({accountId:d(e,n.accountId.selectedOption)?.accountId??"",expenseType:n.expenseType.selectedOption??"",type1099:n.type1099.selectedOption??"",boxType:n.boxType.selectedOption??""})))}export{i as a,d as g,s as m};
|