@zeniai/web-app-ui 5.3.42-qa → 5.3.43-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-D4RlIlHq.js → AccountMappingScreen-MfXsPj8M.js} +1 -1
- package/dist/assets/{ActualMatchingMatchDetailScreen-bQpbiVso.js → ActualMatchingMatchDetailScreen-DPtLhEgD.js} +1 -1
- package/dist/assets/AddressRoutes-CQjpNxne.js +1 -0
- package/dist/assets/{AddressScreen-BfaScJFK.js → AddressScreen-tI262EI8.js} +1 -1
- package/dist/assets/{AiCfoScreen-Box0GL8P.js → AiCfoScreen-DMyEpPj8.js} +1 -1
- package/dist/assets/{AppDrawer-DD3NOfx7.js → AppDrawer-CK8Oi_Um.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-CHOK-BIF.js → BillPayApprovalRoutes-BG4wkb9h.js} +1 -1
- package/dist/assets/{BillPayRoutes-DFbBUbt3.js → BillPayRoutes-B82H1r4T.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-BL-rDXb4.js → BusinessVerificationPageScreen-BLwno7qB.js} +1 -1
- package/dist/assets/{CardsAiCfoScreen-c7VxfhZx.js → CardsAiCfoScreen-BJxdbSYR.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-DgHOOT2d.js → ChargeCardRoutes-CMUVGkhr.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-DW9fXsgC.js → CompanyPassportScreen-C_r9krre.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-Dl4_e9UF.js → ConnectionAuthScreen-DckWKyp-.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen--oM8fIUf.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-J_r_S5S6.js → CustomerOnboardingRoutes-CbzfyCjZ.js} +1 -1
- package/dist/assets/{DashboardRoutes-qEMySFwY.js → DashboardRoutes-BeQuxWvV.js} +1 -1
- package/dist/assets/{DefaultTenantHome-D0hA77jZ.js → DefaultTenantHome-RKPiTReZ.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-tEEN6PNc.js → DomesticWireDetailScreen-42PVSRte.js} +1 -1
- package/dist/assets/{DrawerScreen-O-gM6ONw.js → DrawerScreen-DQY8vrlv.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-CGS2jnu9.js → EntityDetailRoutes-Br-C_K-o.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-RAM77xQ5.js → ExpenseAutomationRoutes-CurjmTHm.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-CfLYCS4M.js → FeaturePreviewScreen-C8dKuiF7.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-BCoIXBGx.js → HubSpotOAuthCallbackScreen-Ct9QwCVK.js} +1 -1
- package/dist/assets/{InboxNotificationsProvider-Cf5DQSg3.js → InboxNotificationsProvider-ozJWRqdQ.js} +1 -1
- package/dist/assets/{InvoicingRoutes-BSJKEbd0.js → InvoicingRoutes-B_3tGcpp.js} +2 -2
- package/dist/assets/{MagicLinkRoutes-DvFINUyu.js → MagicLinkRoutes-VkRBz-4x.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-DWA7XGFG.js → MagicLinkSignInScreen-D6KHJfXd.js} +1 -1
- package/dist/assets/{MobileAppDrawer-HCRn1e7J.js → MobileAppDrawer-plEMRzd-.js} +1 -1
- package/dist/assets/NotFoundScreen-DVcHaqdZ.js +1 -0
- package/dist/assets/{NotificationRoutes-BMD667yj.js → NotificationRoutes-DporIbci.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-BGUS6sNp.js → OAuthConsentScreen-Bwiy1dZe.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-BFUL28rL.js → PandLWithForecastRoutes-4dzVDYi7.js} +1 -1
- package/dist/assets/{PaymentLinkScreen-DdOQZBq6.js → PaymentLinkScreen-xK_McxjH.js} +1 -1
- package/dist/assets/{PeopleRoutes-Qan4Ca75.js → PeopleRoutes-CzBniqLj.js} +1 -1
- package/dist/assets/{PerformanceRoutes-BUzsJ8JT.js → PerformanceRoutes-DQVFxHI8.js} +1 -1
- package/dist/assets/{Preview-BCwFnEAM.js → Preview-DKbH4DZo.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-B-JIz_OC.js → QBOConnectionScreen-CqIFgusE.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-Cz663ZFE.js → ReimbursementApprovalRoutes-B2dZhJk9.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-D1uTDziv.js → ReimbursementApprovalRuleDetailScreen-NYDKW5M_.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-C0wQD-bc.js → ReimbursementRoutes-B4vB3DWh.js} +1 -1
- package/dist/assets/{ReportsRoutes-CXJSK6N5.js → ReportsRoutes-QNTHdw6g.js} +1 -1
- package/dist/assets/{RewardsRoutes-UOKjC0-b.js → RewardsRoutes-B7P2nmYk.js} +1 -1
- package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-Cf3Sj0Dq.js → ScheduleDetailsPrepaidExpensesScreen-YdcDOaAu.js} +1 -1
- package/dist/assets/{ScreenRoutes-ChUwukZv.js → ScreenRoutes-Cy1wpKTY.js} +2 -2
- package/dist/assets/{SettingsRoutes-BeIHfkyW.js → SettingsRoutes-DIXSeHUD.js} +1 -1
- package/dist/assets/{SetupPagesScreen-DSJF8gvU.js → SetupPagesScreen-DV-Hyv78.js} +1 -1
- package/dist/assets/{SignInScreen-Q2IdOxGt.js → SignInScreen-DvhFy3xy.js} +1 -1
- package/dist/assets/{SignOutScreen-x1shfrTA.js → SignOutScreen-C5uG0eM1.js} +1 -1
- package/dist/assets/{TaskListScreen-cpZyLi8u.js → TaskListScreen-CbiI2IGU.js} +1 -1
- package/dist/assets/{TaskRoutes-CR7LYG5S.js → TaskRoutes-DNWDTIHG.js} +1 -1
- package/dist/assets/TransactionDetailRoutes-CGamazG6.js +1 -0
- package/dist/assets/{TransactionDetailScreen-C_Kji4P1.js → TransactionDetailScreen-DA_15rvE.js} +1 -1
- package/dist/assets/{TransactionListRoutes-BIMf99Cg.js → TransactionListRoutes-DUel89dv.js} +1 -1
- package/dist/assets/{TreasuryRoutes-BL8oTr8q.js → TreasuryRoutes-DNsqL_xe.js} +1 -1
- package/dist/assets/{VendorsRoutes-CO0cgAQM.js → VendorsRoutes-DENWe8ir.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-BMU_QR7R.js → WiseConfirmationScreen-CO8k4M88.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-f8fQbApR.js → ZeniAccountRoutes-BzmSgvJI.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-Bq5EWwlR.js → ZeniAccountStatementScreen-CuxmtWXH.js} +1 -1
- package/dist/assets/{accountMappingHelper-2xXLJj4S.js → accountMappingHelper-CQrmB6jj.js} +1 -1
- package/dist/assets/{analytics-CvsRIk3B.js → analytics-BTvt2K3S.js} +1 -1
- package/dist/assets/{analyticsHelper-C534_Opk.js → analyticsHelper-BwLj34Ys.js} +1 -1
- package/dist/assets/{core-DGLzDXWl.js → core-BwK6FGJd.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-k3ZAUeWI.js → decodeURIComponentSafe-iAavL6tS.js} +1 -1
- package/dist/assets/{dnd-SnD389s6.js → dnd-Cbdx7tVf.js} +1 -1
- package/dist/assets/{empty-BjVnPUF5.js → empty-CTWnX7jn.js} +1 -1
- package/dist/assets/{empty-BfBfVq50.js → empty-DbO4voXD.js} +1 -1
- package/dist/assets/{emptyVideoElement-Bb1KlJXy.js → emptyVideoElement-BdvQlKL1.js} +1 -1
- package/dist/assets/epic-BUtbsU0k.js +2 -0
- package/dist/assets/{expenseAutomationHelper-DWDIPthN.js → expenseAutomationHelper-MxNxlZNN.js} +1 -1
- package/dist/assets/{getLocaleForTenant-COb4gZwj.js → getLocaleForTenant-DzgzmDle.js} +1 -1
- package/dist/assets/{index-C54xa34r.js → index-B_VJsceg.js} +1 -1
- package/dist/assets/{index-DPcuwgM-.js → index-Bexws62p.js} +1 -1
- package/dist/assets/{index-BMI1TT7Z.js → index-BhX9D2PW.js} +1 -1
- package/dist/assets/{index-CQFc7TiS.js → index-D2_EUTG6.js} +1 -1
- package/dist/assets/{index-Buyjnqrt.js → index-DCOMaDuK.js} +1 -1
- package/dist/assets/{index-CVAekD3p.js → index-DTZt8DRK.js} +18813 -18813
- package/dist/assets/{index-CzPkUTbT.js → index-DstkpwOZ.js} +2 -2
- package/dist/assets/{index-B2CKeHlo.js → index-SQoDfHg2.js} +1 -1
- package/dist/assets/{lexical-CMBMntF_.js → lexical-DRfKJLK3.js} +1 -1
- package/dist/assets/{liveblocks-DRsJ0YIJ.js → liveblocks-y3zMPGKB.js} +1 -1
- package/dist/assets/{lottie-DEqUWUd5.js → lottie-BQlGSG2c.js} +1 -1
- package/dist/assets/{mui-BuJ3P0FU.js → mui-CxIkaR9n.js} +1 -1
- package/dist/assets/{pathToGoBack-BzjHaNqp.js → pathToGoBack-QMp9zrtx.js} +1 -1
- package/dist/assets/{pdf-B_v4zyN7.js → pdf-DGzvSuDl.js} +3 -3
- package/dist/assets/{pdf-lib-DxbyphS9.js → pdf-lib-Bm6tpkCo.js} +1 -1
- package/dist/assets/{plaid-i7y7YD6O.js → plaid-CQqwPn97.js} +1 -1
- package/dist/assets/{pusher-BYBfYYCn.js → pusher-DpL50lnb.js} +1 -1
- package/dist/assets/{react-CAYYQ7Si.js → react-12W2NDka.js} +1 -1
- package/dist/assets/{react-CAr2Hff_.js → react-8Gpe_kpB.js} +1 -1
- package/dist/assets/{react-leqbcToB.js → react-CCyW6CxJ.js} +1 -1
- package/dist/assets/{react-C2HSs5Iu.js → react-CwBUDYOl.js} +1 -1
- package/dist/assets/{react-Dm85ZpZj.js → react-Tycrsh8q.js} +1 -1
- package/dist/assets/{react-B90rw7na.js → react-ZBsIhK1t.js} +1 -1
- package/dist/assets/{recharts-CJlXFxhv.js → recharts-CoAMGh71.js} +1 -1
- package/dist/assets/{routePaths-nMSO0ytp.js → routePaths-CPqwWbPN.js} +1 -1
- package/dist/assets/{sentry-G4ZANa8Z.js → sentry-Jm7O5sR0.js} +1 -1
- package/dist/assets/{stripSplatSuffix-BTaD_7hZ.js → stripSplatSuffix-nQAZVh5Z.js} +1 -1
- package/dist/assets/{url--ciz_Nq8.js → url-B9xXiyVk.js} +1 -1
- package/dist/assets/{url-CtF92dYM.js → url-D9zjpdeS.js} +1 -1
- package/dist/assets/{useActualMatchingMatchDetail-BK8kbpN5.js → useActualMatchingMatchDetail-Asb0lSO5.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-BGckv6CX.js → useAiCfoDashboardSuggestedQuestionsChips-C3x9GIES.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-BHyPLCCo.js → useAskAiCfoHostNavButtonProps-DzjGv8Xy.js} +1 -1
- package/dist/assets/{useChargeCardPusherEvents-DTBTr-3d.js → useChargeCardPusherEvents-aPfygpSV.js} +1 -1
- package/dist/assets/{useDeviceId-C9MUyzJJ.js → useDeviceId-DdPl1EVl.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-C8kd-UP4.js → useEmailConnectResultRefresh-CCE7kCjs.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-DtdvMhZQ.js → useInitialThreadRequest-BWyM3F-W.js} +1 -1
- package/dist/assets/{useTaskManagerAccess-DnvaNO8w.js → useTaskManagerAccess-DRF4urEw.js} +1 -1
- package/dist/assets/{utils-Bz8wuSWM.js → utils-BVIT21dc.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-DGZchFy0.js → withTransactionSidePanel-Cd_M2p_z.js} +1 -1
- package/dist/assets/{zeni-epic-state-Dm2vDWXH.js → zeni-epic-state-BugXGzus.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +6 -6
- package/dist/assets/AddressRoutes-DhHo5D0q.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-BDYIxUcT.js +0 -1
- package/dist/assets/NotFoundScreen-Due1Mflv.js +0 -1
- package/dist/assets/TransactionDetailRoutes-c82zOTpF.js +0 -1
- package/dist/assets/epic-CPuRNynX.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-
|
|
1
|
+
import{j as m}from"./liveblocks-y3zMPGKB.js";import{a as r}from"./sentry-Jm7O5sR0.js";import{u as A,g as j,j as o,N as C}from"./core-BwK6FGJd.js";import{Un as P,fE as R,gl as x,Uo as z,Up as D,Uq as M,Ur as q,pR as k,T2 as L}from"./zeni-epic-state-BugXGzus.js";import{z as h,ah as I}from"./index-DTZt8DRK.js";import"./mui-CxIkaR9n.js";import"./recharts-CoAMGh71.js";import"./analytics-BTvt2K3S.js";import"./plaid-CQqwPn97.js";import"./dnd-Cbdx7tVf.js";import"./stripe-cKAAJElX.js";import"./lottie-BQlGSG2c.js";import"./lexical-DRfKJLK3.js";import"./pdf-DGzvSuDl.js";import"./utils-BVIT21dc.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]="6e94700d-94e0-49aa-b6b3-e0652f6c208a",n._sentryDebugIdIdentifier="sentry-dbid-6e94700d-94e0-49aa-b6b3-e0652f6c208a")}catch{}})();function ee(){const n=A(),a=j(),{params:t,error:i}=r.useMemo((()=>P(a.search)),[a.search]),w=r.useMemo((()=>new URLSearchParams(a.search).get("client_name")??t?.clientId??"Unknown Application"),[a.search,t]),p=h.isSignedIn(),s=h.getSignedInUser(),f=o((e=>R(e))),l=o((e=>x(e))),d=o((e=>e.tenantState.fetchState)),y=o(z),b=o(D),u=o(M),[U,v]=r.useState(null),[S,E]=r.useState(null);r.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]),r.useEffect((()=>()=>{n(q())}),[n,a.search]),r.useEffect((()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)}),[i]);const g=r.useRef(!1);r.useEffect((()=>{p&&s!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(k(s.userId,s.zeniSessionId??void 0))))}),[p,s,d,n]),r.useEffect((()=>{u!=null&&u!==""&&(window.location.href=u)}),[u]);const _=r.useMemo((()=>{if(f?.tenantId!=null)return f.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some((T=>T.tenantId===e))?e:l.length===1?l[0].tenantId:null}),[f?.tenantId,l]),c=U??_;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):p?m.jsx(I,{variant:"signed_in",clientName:w,userEmail:s?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:c,onSelectTenant:v,approveError:S??b,isApproving:y==="In-Progress",showAllowButton:c!=null,onApprove:()=>{t!=null&&s!=null&&c!=null&&n(L(s.userId,s.zeniSessionId??void 0,c,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{E("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(C,{to:"/signin/auth",state:{origin:a.pathname+a.search},replace:!0})}export{ee as default};
|
package/dist/assets/{PandLWithForecastRoutes-BFUL28rL.js → PandLWithForecastRoutes-4dzVDYi7.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-
|
|
1
|
+
import{j as n}from"./liveblocks-y3zMPGKB.js";import{h as X,u as H,g as J,i as K,j as d,l as Q,n as ee,o as C}from"./core-BwK6FGJd.js";import{fE as M,A1 as R,v0 as ae,Vf as w,uX as T,bq as te,b$ as se,uY as oe,Vg as re,UZ as S,eh as ne,DP as ce,Vh as ie,Eb as le,dZ as de,dY as me}from"./zeni-epic-state-BugXGzus.js";import{ai as fe,z as pe,aq as ue,as as he,U as ge,O as q,c as $,a8 as Fe,k as V,aD as be,p as Ie}from"./index-DTZt8DRK.js";import"./mui-CxIkaR9n.js";import Ce from"./NotFoundScreen-DVcHaqdZ.js";import{F as Se}from"./FeaturePreviewScreen-C8dKuiF7.js";import{a as g}from"./sentry-Jm7O5sR0.js";import{u as Te}from"./useAskAiCfoHostNavButtonProps-DzjGv8Xy.js";import{u as ye}from"./useInitialThreadRequest-BWyM3F-W.js";import{t as Ae}from"./routePaths-CPqwWbPN.js";import{M as De}from"./MobileAppDrawer-plEMRzd-.js";import"./recharts-CoAMGh71.js";import"./analytics-BTvt2K3S.js";import"./plaid-CQqwPn97.js";import"./dnd-Cbdx7tVf.js";import"./stripe-cKAAJElX.js";import"./lottie-BQlGSG2c.js";import"./lexical-DRfKJLK3.js";import"./pdf-DGzvSuDl.js";import"./utils-BVIT21dc.js";import"./InboxNotificationsProvider-ozJWRqdQ.js";import"./useTaskManagerAccess-DRF4urEw.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="00eadbd1-680f-4c2c-9ccb-92acb65e4893",s._sentryDebugIdIdentifier="sentry-dbid-00eadbd1-680f-4c2c-9ccb-92acb65e4893")}catch{}})();const y=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},xe=Q((function(s){const e=re(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach((r=>{a[r]=o[r]===!1})),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:V}}),(function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(w(a,o)),e.isPandLReportFetched(a)||s(T(a)),y(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(le(a))},onForecastVsActualsCompareToggle:a=>{s(ie(a)),s(S({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ce(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,c;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,c=ne(o)):o.balanceTimeFrame==="year"?(r="quarter",c={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),c!=null&&r!=null){const u=Ae(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),m=Ie(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(u,{state:{pathnameStackToGoBack:m,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(S({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(S({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}}))(be);function v(){const s=fe(),e=X(),a=H(),o=J(),{forecastId:r,tenantEmailDomain:c}=K(),[p,u]=g.useState(!1),[m,A]=g.useState(!1),F=pe.getSignedInUser(),D=d((t=>M(t))),_=D.company?.companyInfo.firstMonthOfFY??1,i=d((t=>R(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),x=d((t=>t.profitAndLossState)),E=d((t=>t.reportUIOptionsState.selectedForecast)),k=t=>x.pandLByForecastID[t]!=null&&oe(t,x).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:b}=ue();he({isDataReady:l});const{isAiCfoAccessEnabled:B,onAskAiCfoClick:N}=Te({mobileExploreReferrer:"Forecast"});g.useEffect((()=>{if(!p&&b)u(!0),l||a(ae());else if(l&&!m){A(!0);const t=((f,U,O)=>U!=null?f.forecasts.findIndex((I=>I.id===U)):O!=null?f.forecasts.findIndex((I=>I.id===O)):f.forecasts.length>0?0:-1)(i,r,E?.id);t===-1&&r!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=E?.index?(a(w(i.forecasts[t].id,t)),y(r,i.forecasts[t].id,e,o.search)):r==null&&t!==-1&&y(void 0,i.forecasts[t].id,e,o.search),t!==-1&&!k(i.forecasts[t].id)&&b&&a(T(i.forecasts[t].id))}}),[p,u,a,l,i,m,A,R,T,b]);const P=ge(),Y=P?.loggedInUserRole!=null&&te(P.loggedInUserRole),{useFeatureGate:G}=q(),{isFeatureEnabled:j}=G($.isReportsCommentingEnabled),W=ye(j?D?.companyId:void 0,{clearParams:l&&m}),[z,Z]=g.useState(!1),h=new URL(s("forecast_pandl"));h.searchParams.set("firstname",F?.firstName??""),h.searchParams.set("lastname",F?.lastName??""),h.searchParams.set("email",F?.userEmail??"");const L=t=>{Z(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(Fe,{analytics:V,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(De,{isAppContentDrawerOpen:z,handleDrawerToggle:L}),n.jsx(xe,{firstMonthOfFY:_,tenantEmailDomain:c,forecastIdFromUrlPath:r,navigate:e,location:o,isPandLReportFetched:k,meetingUrl:se(h.toString()),hasTransactionAccess:Y,isAiCfoAccessEnabled:B,onAskAiCfoClick:N,isReportsCommentingEnabled:j,initialOpenThreadRequest:W,onClickMenuIcon:()=>{L(!0)}})]})}function He(){const s=d((c=>M(c))),{useFeatureGate:e}=q(),{isFeatureEnabled:a}=e($.isDebitCardFeatureEnabled),o=de(a,s),r=me(s);return o===!0||r===!0?n.jsx(Se,{}):n.jsxs(ee,{children:[n.jsx(C,{path:"/",element:n.jsx(v,{})}),n.jsx(C,{path:"/:forecastId",element:n.jsx(v,{})}),n.jsx(C,{path:"/:forecastId/*",element:n.jsx(Ce,{})})]})}export{He as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-
|
|
1
|
+
import{j as r}from"./liveblocks-y3zMPGKB.js";import{a as p}from"./sentry-Jm7O5sR0.js";import{I as c,J as a,a9 as m,ad as f,ae as h}from"./index-DTZt8DRK.js";import"./mui-CxIkaR9n.js";import{i as y}from"./core-BwK6FGJd.js";import"./zeni-epic-state-BugXGzus.js";import"./recharts-CoAMGh71.js";import"./analytics-BTvt2K3S.js";import"./plaid-CQqwPn97.js";import"./dnd-Cbdx7tVf.js";import"./stripe-cKAAJElX.js";import"./lottie-BQlGSG2c.js";import"./lexical-DRfKJLK3.js";import"./pdf-DGzvSuDl.js";import"./utils-BVIT21dc.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]="4553bbf5-4e68-43e4-bfc4-1af1eba789d6",e._sentryDebugIdIdentifier="sentry-dbid-4553bbf5-4e68-43e4-bfc4-1af1eba789d6")}catch{}})();const b=c("div")`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-y3zMPGKB.js";import{Vb as re,fE as N,l_ as G,dZ as X,dY as le,S2 as Q,UA as de,CM as Pe,Vc as q,CB as je,CW as Le,CQ as ce,CF as pe,CU as Te,CR as ve,Vd as ue,sk as Ae,g5 as Ve,gC as Fe,Ve as _,CJ as me,CI as ge,CZ as Re,c8 as Oe}from"./zeni-epic-state-BugXGzus.js";import{a1 as fe,O as Y,c as H,z as W,g as Ce,N as he,af as ye,az as be,aA as Ze,ab as Se,J as R,ag as we,G as K,aB as Ue,aq as Be,as as $e,a8 as ze,k as xe,T as _e,p as He,aC as Ge,U as We}from"./index-DTZt8DRK.js";import{D as De,n as M,S as Ie}from"./mui-CxIkaR9n.js";import ae from"./NotFoundScreen-DVcHaqdZ.js";import{a as d}from"./sentry-Jm7O5sR0.js";import{u as ee,i as Ke,j as g,h as Me,g as Je,l as qe,n as se,o as z}from"./core-BwK6FGJd.js";import{u as Ne}from"./useAskAiCfoHostNavButtonProps-DzjGv8Xy.js";import{M as Xe}from"./MobileAppDrawer-plEMRzd-.js";import"./recharts-CoAMGh71.js";import"./analytics-BTvt2K3S.js";import"./plaid-CQqwPn97.js";import"./dnd-Cbdx7tVf.js";import"./stripe-cKAAJElX.js";import"./lottie-BQlGSG2c.js";import"./lexical-DRfKJLK3.js";import"./pdf-DGzvSuDl.js";import"./utils-BVIT21dc.js";import"./InboxNotificationsProvider-ozJWRqdQ.js";import"./useTaskManagerAccess-DRF4urEw.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]="2ad5137a-7dd2-46be-8f79-307ff01cf6f2",e._sentryDebugIdIdentifier="sentry-dbid-2ad5137a-7dd2-46be-8f79-307ff01cf6f2")}catch{}})();const Qe={overlayWidth:new Se(100,100,48)},te=K.getLocalizedStrings().peoplePage.invitePage,ne=K.getLocalizedStrings().common,Ye=({companyId:e,managersListView:t,companyPassportView:c,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:b})=>{const C=fe(),m=ee(),[O,Z]=d.useState(!1),[k,S]=d.useState(!1),{userId:w}=Ke(),r=g((l=>re(l))),p=g((l=>N(l))),E=g((l=>G(l))),{useFeatureGate:D}=Y(),{isFeatureEnabled:I}=D(H.isDebitCardFeatureEnabled),P=X(I,p),T=le(p),v=Q(p),U=de(p),B=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&E&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||c.fetchState!=="Completed"||e==null;if(W.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const h=()=>{m(q()),b()},A=()=>{O===!0?S(!0):h()},$=c.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=D(H.isChargeCardFeatureEnabled),L=Ce(p,j,I),{isCardsHidden:V}=he(p?.tenantId),y=!L||V,F=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:v,isAccountingClassesEnabled:E,isReimbursementDisabled:B===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:F===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:T,onResetClick:h,onDeleteUser:l=>{m(pe(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(ce({peopleLocalData:l})),Z(!0)},onSaveClick:()=>{m(f==="zeni_only"?je(e):Le(v))},onCloseClick:A,isLoading:x||r.person==null},o={onOkClick:()=>{S(!1),h()},onCancelClick:()=>{S(!1)}};return d.useEffect((()=>{x===!1&&w!=null&&m(Pe(w))}),[x,w]),d.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&h()}),[r.updatePersonState.fetchState]),a.jsx(De,{anchor:"right",open:i,PaperProps:{style:{width:Qe.overlayWidth.valuePercentage(C),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:ye.overlayDark,cursor:"pointer"}}},onClose:A,children:a.jsxs(ea,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(be,{titleComponent:a.jsx(ke,{children:te.discardTitle}),descriptionComponent:a.jsx(Ee,{children:te.discardDescription}),primaryButtonText:ne.yes,secondaryButtonText:ne.no,action:o,isEditPopup:!0}):null,a.jsx(Ze,{...s})]})})},ea=M(Ie)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-y3zMPGKB.js";import T from"./NotFoundScreen-DVcHaqdZ.js";import{a as r}from"./sentry-Jm7O5sR0.js";import{h as _,g as P,j as p,i as v,u as M,N as U,l as z,n as O,o as h}from"./core-BwK6FGJd.js";import{fE as B,a0P as b,bo as F,bn as N,iK as V,gg as $}from"./zeni-epic-state-BugXGzus.js";import{$ as K,z as I,as as q,dP as G}from"./index-DTZt8DRK.js";import"./mui-CxIkaR9n.js";import{u as H}from"./useAskAiCfoHostNavButtonProps-DzjGv8Xy.js";import{M as J}from"./MobileAppDrawer-plEMRzd-.js";import"./recharts-CoAMGh71.js";import"./analytics-BTvt2K3S.js";import"./plaid-CQqwPn97.js";import"./dnd-Cbdx7tVf.js";import"./stripe-cKAAJElX.js";import"./lottie-BQlGSG2c.js";import"./lexical-DRfKJLK3.js";import"./pdf-DGzvSuDl.js";import"./utils-BVIT21dc.js";import"./InboxNotificationsProvider-ozJWRqdQ.js";import"./useTaskManagerAccess-DRF4urEw.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]="ebaa3c05-dabd-417f-aade-c51355f66e2c",e._sentryDebugIdIdentifier="sentry-dbid-ebaa3c05-dabd-417f-aade-c51355f66e2c")}catch{}})();const L=z((function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}}),(function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}}))(G),Q=()=>{const e=_(),t=P(),c=K(),o=p((a=>B(a))),{aggregatedReportViewState:n}=p((a=>b(a))),{tenantEmailDomain:f}=v(),g=M(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[w,S]=r.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),y=C||k||x,d=r.useCallback(((a,i,E)=>{g(V({fromMonth:a,toMonth:i,cacheOverride:E}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&m.current&&(g($({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)}),[n?.fetchState]);const D=r.useCallback(((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),m.current=!0}),[n?.fetchState,d]),j=r.useCallback(((a,i)=>{d(a,i,!1)}),[d]),u=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=H({mobileExploreReferrer:"Performance"});return q({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(J,{isAppContentDrawerOpen:w,handleDrawerToggle:u}),s.jsx(L,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:f,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:u,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(U,{to:`/${f}/dashboard`,replace:!0})};function he(){return s.jsxs(O,{children:[s.jsx(h,{path:"*",element:s.jsx(Q,{})}),s.jsx(h,{path:"*",element:s.jsx(T,{})})]})}export{he as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,R as a}from"./sentry-
|
|
1
|
+
import{a as h,R as a}from"./sentry-Jm7O5sR0.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new r.Error().stack;t&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[t]="1e16de4c-304f-4e91-a86b-dc86bcc8d8a2",r._sentryDebugIdIdentifier="sentry-dbid-1e16de4c-304f-4e91-a86b-dc86bcc8d8a2")}catch{}})();const c="64px",u={};var k=({src:r,light:t,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:b})=>{const[p,i]=h.useState(null);h.useEffect((()=>{r&&t&&n&&v({src:r,light:t,oEmbedUrl:n})}),[r,t,n]);const v=async({src:e,light:s,oEmbedUrl:I})=>{if(a.isValidElement(s))return;if(typeof s=="string")return void i(s);if(u[e])return void i(u[e]);i(null);const E=await fetch(I.replace("{url}",e)),f=await E.json();if(f.thumbnail_url){const g=f.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(g),u[e]=g}},d=a.isValidElement(t),y={display:"flex",alignItems:"center",justifyContent:"center"},o={preview:{width:"100%",height:"100%",backgroundImage:p&&!d?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:d?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=a.createElement("div",{style:o.shadow,className:"react-player__shadow"},a.createElement("div",{style:o.playIcon,className:"react-player__play-icon"}));return a.createElement("div",{style:o.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...b?{"aria-label":b}:{}},d?t:null,w||_)};export{k as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as Ol}from"./liveblocks-
|
|
1
|
+
import{j as Ol}from"./liveblocks-y3zMPGKB.js";import{p as Q,d as kc,c as an,g as jl,a as xl}from"./sentry-Jm7O5sR0.js";import{L as dt,b$ as Tc,fE as Ac,TI as Rc,Uy as kl,c8 as Tl}from"./zeni-epic-state-BugXGzus.js";import{a as lt,b as Al,c as Rl,d as Il,e as un,f as Pl,g as Nl,h as Ll,i as Vt,j as Ic,k as oe,l as je,m as $l,o as Yt,p as ue,q as Ml}from"./utils-BVIT21dc.js";import{r as cn}from"./empty-CTWnX7jn.js";import{r as Cl,a as Dl,b as Fl,c as Bl}from"./pdf-lib-Bm6tpkCo.js";import{r as Ul}from"./index-SQoDfHg2.js";import{r as ql}from"./index-D2_EUTG6.js";import{h as Gl,g as zl,u as Zl,j as _n,l as Hl}from"./core-BwK6FGJd.js";import{u as Vl,z as Pc,L as Yl,ak as Kl,al as Wl,X as Jl,F as Xl}from"./index-DTZt8DRK.js";import"./mui-CxIkaR9n.js";import{d as Pe}from"./decodeURIComponentSafe-iAavL6tS.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},u=new t.Error().stack;u&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[u]="f233caa6-75fc-4c31-9a01-1b6872ded44e",t._sentryDebugIdIdentifier="sentry-dbid-f233caa6-75fc-4c31-9a01-1b6872ded44e")}catch{}})();var Sn,On={exports:{}},jn,xn,kn,Tn,An,Rn,In,Pn,Nn,Ne,Ln,$n,Mn,Cn,Dn,Fn,Bn,Un,qn,Gn,zn,Le,Zn,Hn,Vn,Yn,Kn,Wn,Jn,$e,Xn,Qn,to,eo,ro,no,oo,Me={exports:{}},Ce={exports:{}},De={};function Nc(){if(jn)return De;function t(r){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}function u(r,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,p){return a.__proto__=p,a},u(r,e)}function d(r){var e=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var a,p=o(r);if(e){var h=o(this).constructor;a=Reflect.construct(p,arguments,h)}else a=p.apply(this,arguments);return(function(m,b){if(b&&(t(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g})(m)})(this,a)}}function o(r){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(r)}jn=1;var c,i,n={};function s(r,e,a){a||(a=Error);var p=(function(h){(function(l,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(y&&y.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),y&&u(l,y)})(g,h);var m,b=d(g);function g(l,y,v){var S;return(function(w,_){if(!(w instanceof _))throw new TypeError("Cannot call a class as a function")})(this,g),S=b.call(this,(function(w,_,M){return typeof e=="string"?e:e(w,_,M)})(l,y,v)),S.code=r,S}return m=g,Object.defineProperty(m,"prototype",{writable:!1}),m})(a);n[r]=p}function f(r,e){if(Array.isArray(r)){var a=r.length;return r=r.map((function(p){return String(p)})),a>2?"one of ".concat(e," ").concat(r.slice(0,a-1).join(", "),", or ")+r[a-1]:a===2?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}return"of ".concat(e," ").concat(String(r))}return s("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),s("ERR_INVALID_ARG_TYPE",(function(r,e,a){var p,h,m;if(c===void 0&&(c=ie()),c(typeof r=="string","'name' must be a string"),typeof e=="string"&&(h="not ",e.substr(0,h.length)===h)?(p="must not be",e=e.replace(/^not /,"")):p="must be",(function(g,l,y){return(y===void 0||y>g.length)&&(y=g.length),g.substring(y-l.length,y)===l})(r," argument"))m="The ".concat(r," ").concat(p," ").concat(f(e,"type"));else{var b=(function(g,l,y){return typeof y!="number"&&(y=0),!(y+l.length>g.length)&&g.indexOf(l,y)!==-1})(r,".")?"property":"argument";m='The "'.concat(r,'" ').concat(b," ").concat(p," ").concat(f(e,"type"))}return m+=". Received type ".concat(t(a))}),TypeError),s("ERR_INVALID_ARG_VALUE",(function(r,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";i===void 0&&(i=lt());var p=i.inspect(e);return p.length>128&&(p="".concat(p.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(a,". Received ").concat(p)}),TypeError),s("ERR_INVALID_RETURN_VALUE",(function(r,e,a){var p;return p=a&&a.constructor&&a.constructor.name?"instance of ".concat(a.constructor.name):"type ".concat(t(a)),"Expected ".concat(r,' to be returned from the "').concat(e,'"')+" function but got ".concat(p,".")}),TypeError),s("ERR_MISSING_ARGS",(function(){for(var r=arguments.length,e=new Array(r),a=0;a<r;a++)e[a]=arguments[a];c===void 0&&(c=ie()),c(e.length>0,"At least one arg needs to be specified");var p="The ",h=e.length;switch(e=e.map((function(m){return'"'.concat(m,'"')})),h){case 1:p+="".concat(e[0]," argument");break;case 2:p+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:p+=e.slice(0,h-1).join(", "),p+=", and ".concat(e[h-1]," arguments")}return"".concat(p," must be specified")}),TypeError),De.codes=n,De}function Ql(){if(kn)return xn;function t(k,E){var j=Object.keys(k);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(k);E&&(x=x.filter((function(O){return Object.getOwnPropertyDescriptor(k,O).enumerable}))),j.push.apply(j,x)}return j}function u(k){for(var E=1;E<arguments.length;E++){var j=arguments[E]!=null?arguments[E]:{};E%2?t(Object(j),!0).forEach((function(x){d(k,x,j[x])})):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(j)):t(Object(j)).forEach((function(x){Object.defineProperty(k,x,Object.getOwnPropertyDescriptor(j,x))}))}return k}function d(k,E,j){return(E=c(E))in k?Object.defineProperty(k,E,{value:j,enumerable:!0,configurable:!0,writable:!0}):k[E]=j,k}function o(k,E,j){return E&&(function(x,O){for(var $=0;$<O.length;$++){var N=O[$];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,c(N.key),N)}})(k.prototype,E),Object.defineProperty(k,"prototype",{writable:!1}),k}function c(k){var E=(function(j,x){if(p(j)!=="object"||j===null)return j;var O=j[Symbol.toPrimitive];if(O!==void 0){var $=O.call(j,x);if(p($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(j)})(k,"string");return p(E)==="symbol"?E:String(E)}function i(k,E){if(E&&(p(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n(k)}function n(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function s(k){var E=typeof Map=="function"?new Map:void 0;return s=function(j){if(j===null||(x=j,Function.toString.call(x).indexOf("[native code]")===-1))return j;var x;if(typeof j!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(j))return E.get(j);E.set(j,O)}function O(){return f(j,arguments,a(this).constructor)}return O.prototype=Object.create(j.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),e(O,j)},s(k)}function f(k,E,j){return f=r()?Reflect.construct.bind():function(x,O,$){var N=[null];N.push.apply(N,O);var P=new(Function.bind.apply(x,N));return $&&e(P,$.prototype),P},f.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}function e(k,E){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,x){return j.__proto__=x,j},e(k,E)}function a(k){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},a(k)}function p(k){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},p(k)}kn=1;var h=lt().inspect,m=Nc().codes.ERR_INVALID_ARG_TYPE;function b(k,E,j){return(j===void 0||j>k.length)&&(j=k.length),k.substring(j-E.length,j)===E}var g="",l="",y="",v="",S={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(k){var E=Object.keys(k),j=Object.create(Object.getPrototypeOf(k));return E.forEach((function(x){j[x]=k[x]})),Object.defineProperty(j,"message",{value:k.message}),j}function _(k){return h(k,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function M(k,E,j){var x="",O="",$=0,N="",P=!1,G=_(k),A=G.split(`
|
|
2
2
|
`),I=_(E).split(`
|
|
3
3
|
`),R=0,B="";if(j==="strictEqual"&&p(k)==="object"&&p(E)==="object"&&k!==null&&E!==null&&(j="strictEqualObject"),A.length===1&&I.length===1&&A[0]!==I[0]){var V=A[0].length+I[0].length;if(V<=10){if(!(p(k)==="object"&&k!==null||p(E)==="object"&&E!==null||k===0&&E===0))return"".concat(S[j],`
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-
|
|
1
|
+
import{j as o}from"./liveblocks-y3zMPGKB.js";import Z from"./NotFoundScreen-DVcHaqdZ.js";import{a as p}from"./sentry-Jm7O5sR0.js";import{h as C,g as N,u as D,j as u,N as V,l as k,n as z,o as g}from"./core-BwK6FGJd.js";import{fE as E,YT as h,Z8 as w,Nt as U,Np as L,Ns as f,Ni as B,Zx as T,Nm as K,Nv as Y}from"./zeni-epic-state-BugXGzus.js";import{z as $,w as O,c9 as q,o as W,bS as F,ca as G}from"./index-DTZt8DRK.js";import"./mui-CxIkaR9n.js";import{u as H,R as x}from"./ReimbursementApprovalRuleDetailScreen-NYDKW5M_.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="82034840-7786-47ce-bbc3-23aee7004283",e._sentryDebugIdIdentifier="sentry-dbid-82034840-7786-47ce-bbc3-23aee7004283")}catch{}})();const j="reimbursement-approval-rule-update",J=k((function(e){return{approvalView:h(e),remiSetupApproverViewUpdateData:w(e).remiSetupApproverViewUpdateData}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(j)&&e(T(!1))},onBackClick:()=>{W(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(B(t,!1))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))}}}))(O(q)),M=({isLoading:e})=>{const s=C(),n=N(),a=D(),[t,l]=p.useState(!1),[v,R]=p.useState(!1),S=u((r=>r.remiSetupApproverViewState.fetchState)),c=u((r=>E(r))),d=u((r=>h(r))),b=u((r=>w(r).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{b?.updateStatus.fetchState==="Completed"&&a(U())}),[b]),p.useEffect((()=>{t||S!=="Not-Started"||e||(l(!0),a(L(!0,!1,!1,!1)))}),[t,S,e,a]),$.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{d.allApprovalRules.length===0&&d.fetchState==="Completed"&&(v||(R(!0),a(f())),s("./new"))}),[v,d,a]);const m={events:c.companyId!=null?[`private-encrypted-${c.companyId}.${j}`]:[],eventCallback:(r,y,I)=>{r.endsWith(j)&&I.onApprovalRulesEventReceived(r)}};return c?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?o.jsx(V,{to:"../../promo"}):o.jsx(J,{currentTenant:c,location:n,navigate:s,...m})},A="reimbursement-approval-rule-update",P=k((function(e){const s=h(e),n=w(e).remiSetupApproverViewUpdateData,a={};for(const l of Object.values(e.vendorState.vendorByID))l?.id!=null&&(a[l.id]=l.name);const t={};for(const l of Object.values(e.classState.classesByKey))l?.classId!=null&&(t[l.classId]=l.className);return{approvalView:s,remiSetupApproverViewUpdateData:n,vendorNamesById:a,departmentNamesById:t}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(A)&&e(T(!1))},onBackClick:()=>{W(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(B(t,!0))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))},onReorderRules:t=>{e(Y(t,!0))}}}))(O(G)),Q=()=>{const e=u((a=>E(a))),{isApprovalRulesV3Enabled:s,isLoading:n}=F(e?.tenantId);return s?o.jsx(X,{isLoading:n}):o.jsx(M,{isLoading:n})},X=({isLoading:e})=>{const s=C(),n=N(),a=D(),[t,l]=p.useState(!1),[v,R]=p.useState(!1),[S,c]=p.useState(!1),d=u((i=>i.remiSetupApproverViewState.fetchState)),b=u((i=>i.remiSetupApproverViewState.approverListState.fetchStatus.fetchState)),m=u((i=>E(i))),r=u((i=>h(i)));H();const y=u((i=>w(i).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{y?.updateStatus.fetchState==="Completed"&&a(U())}),[y]),p.useEffect((()=>{t||d!=="Not-Started"||e||(l(!0),a(L(!0,!1,!1,!0)))}),[t,d,e,a]),p.useEffect((()=>{v||b!=="Not-Started"||e||(R(!0),a(K(!1,!0)))}),[v,b,e,a]),$.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{r.allApprovalRules.length===0&&r.fetchState==="Completed"&&(S||(c(!0),a(f())),s("./new"))}),[S,r,a]);const I={events:m.companyId!=null?[`private-encrypted-${m.companyId}.${A}`]:[],eventCallback:(i,ee,_)=>{i.endsWith(A)&&_.onApprovalRulesEventReceived(i)}};return m?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?o.jsx(V,{to:"../../promo"}):o.jsx(P,{currentTenant:m,location:n,navigate:s,isLoading:e,...I})};function le(){return o.jsxs(z,{children:[o.jsx(g,{path:"/",element:o.jsx(Q,{})}),o.jsx(g,{path:"/new",element:o.jsx(x,{})}),o.jsx(g,{path:"/:approvalRuleId/edit",element:o.jsx(x,{})}),o.jsx(g,{path:"*",element:o.jsx(Z,{})})]})}export{le as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-
|
|
1
|
+
import{j as h}from"./liveblocks-y3zMPGKB.js";import{a as f}from"./sentry-Jm7O5sR0.js";import{u as U,j as g,h as _,g as O,i as V,l as N}from"./core-BwK6FGJd.js";import{mq as Z,Z8 as T,YT as x,Nl as k,Ny as B,Nt as A,Nu as E,Z9 as j,fE as z,Ns as K}from"./zeni-epic-state-BugXGzus.js";import{z as F,E as P,a7 as q,c0 as W,o as $,bS as Y,c1 as G}from"./index-DTZt8DRK.js";import"./mui-CxIkaR9n.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="4f874f0d-6067-47fe-b3c5-138517996bf1",e._sentryDebugIdIdentifier="sentry-dbid-4f874f0d-6067-47fe-b3c5-138517996bf1")}catch{}})();function H(){const e=U(),s=f.useRef(!1),t=g((o=>o.vendorListState.fetchStateBillsTab.fetchState??"Not-Started")),p=g((o=>o.vendorListState.allVendorIdsBillsTab.length>0));f.useEffect((()=>{s.current||p||t==="Completed"||t==="In-Progress"||(s.current=!0,e(Z({})))}),[p,t,e])}const J=N((function(e,s){const t=T(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=p==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return s.approvalRuleId&&(l=t.allApprovalRules.findIndex((r=>r.approvalRuleId===s.approvalRuleId))===0),{localData:t,hideUpperBoundField:o,isLowerBoundDisabled:l,approvalUpdateActionType:p}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=$(s.location);return{onApprovalRuleDataUpdated:a=>{const d=v=>{const S=[];return v.forEach((u=>{const R=u.actors.selectedUsers.map((m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1}))),b=u.actors.selectedNonUsers.map((m=>{const y=(I=m.value,j(I)==null);var I;return{type:y?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!y}})),c=R.concat(b);S.push({action:u.stepType.selectedOption,actors:c,operator:c.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})})),S},n={amount:{type:"amount",comparator:"range",min:{amount:a.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:a.upperBound,currencyCode:"USD",currencySymbol:"$"}}};if(r==="approval_create"){const v={criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}else{const v={approvalRuleId:l,criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!1))},onSaveRuleSuccess:()=>{t("../")}}}))(W);function M(){const e=_(),s=U(),t=O(),{approvalRuleId:p}=V(),o=F.getSignedInUser(),l=P(),r=g((n=>T(n))),i=g((n=>x(n))),[a,d]=f.useState(!1);if(f.useEffect((()=>{a||(d(!0),s(k(!0)))})),f.useEffect((()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx(q,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):h.jsx(J,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t})}function pe(e){return j(e)==null}const Q=N((function(e,s){const t=T(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=[],l={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(o.push(r.id),l[r.id]=r.name);return{localData:t,approvalUpdateActionType:p,allVendorIds:o,vendorNamesById:l,editingRuleId:p==="approval_update"?s.approvalRuleId:void 0,allApprovalRulesWithUser:x(e).allApprovalRules}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=$(s.location);return{onApprovalRuleDataUpdated:a=>{const d=c=>{const m=[];return c.forEach((y=>{const I=y.actorKind?.selectedOption,L=y.selectedRole?.selectedNonUsers??[];let D=[];I==="role"?D=L.map((w=>({type:"attribute",subType:w.value,userId:void 0,idType:void 0,isImplicitActor:!1}))):I==="specific_person"&&(D=(y.persons?.selectedUsers??[]).map((w=>({type:"user",subType:void 0,userId:w.userId,idType:"user",isImplicitActor:!1}))));const C=y.action??"require_approval";m.push({action:C,actors:D,operator:D.length>1?C==="require_approval"?"or":"and":"is"})})),m},n=a.amountCriteria,v=a.vendorCriteria,S=a.departmentCriteria,u={};if(n!=null&&n.comparator.selectedOption!=null){const c=n.comparator.selectedOption;u.amount={type:"amount",comparator:c,min:c==="less_than"?void 0:n.min,max:c==="greater_than"?void 0:n.max}}const R=v?.selection.selectedOptions??[];R.length>0&&(u.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:R});const b=S?.selection.selectedOptions??[];if(b.length>0&&(u.department={type:"department",operator:S?.operator.selectedOption??"is",departmentIds:b}),r==="approval_create"){const c={name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}else{const c={approvalRuleId:l,name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(K(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}}))(G);function ne(){const e=g((t=>z(t))),{isApprovalRulesV3Enabled:s}=Y(e?.tenantId);return s?h.jsx(X,{}):h.jsx(M,{})}function X(){const e=_(),s=U(),t=O(),{approvalRuleId:p}=V(),o=F.getSignedInUser(),l=P(),r=g((n=>T(n))),i=g((n=>x(n))),[a,d]=f.useState(!1);if(H(),f.useEffect((()=>{a||(d(!0),s(k(!1)))})),f.useEffect((()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx(q,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):h.jsx(Q,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t},p??"new")}export{ne as R,pe as i,H as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-DRsJ0YIJ.js";import{u as ae,j as v,h as Q,g as K,i as ie,N as M,l as ee,q as ct,n as dt,o as w}from"./core-DGLzDXWl.js";import{fE as V,Np as ut,_E as ge,c8 as he,Mv as Le,m9 as pt,MK as ce,MJ as de,_F as bt,bn as fe,gU as _e,_G as gt,WC as ht,l_ as $e,WD as Ce,WE as ft,kM as St,YF as It,k$ as yt,Mj as Rt,C2 as vt,kT as At,N4 as Me,_H as Pe,_I as Ee,_J as kt,_K as Ct,_L as Et,MQ as we,l5 as wt,YO as xt,MI as Bt,Mt as Tt,_M as Dt,Ms as jt,_N as Ut,MA as xe,MU as Ft,MT as Lt,MP as _t,_O as Ne,S2 as $t,bo as Mt,MD as Pt,Nm as Nt,_P as Ot,_Q as zt,N0 as Gt,MZ as Be,Y9 as Zt,Mq as Vt,_R as Oe,NP as Te,NX as Wt,_S as Ht,_T as q,_U as Yt,_V as ze,_W as qt,_X as Ge,_Y as Ze,Nc as ue,bu as Jt,bK as Se,cM as Ie,dZ as Ve,dY as We,_Z as Kt,gg as Xt,Ym as Qt,__ as en,_$ as He,Yq as tn,Z8 as nn,$0 as an,Zx as sn,NU as De,NT as on,$1 as rn,$2 as ln,$3 as mn,$4 as cn,$5 as dn,YU as un,NK as pn,NO as bn,bq as gn,bJ as hn,cG as fn,cu as Sn,bt as In,U1 as yn,d9 as Rn,dc as vn,db as An,cF as kn}from"./zeni-epic-state-Dm2vDWXH.js";import{bS as Cn,$ as Ye,a1 as qe,O as oe,c as x,z as _,cT as Je,a8 as re,k as C,aS as je,J as U,ae as se,af as En,G as Ke,cU as wn,p as J,as as Xe,cV as xn,U as le,cW as Bn,aq as Tn,ab as Dn,a7 as ye,T as Qe,w as jn,bA as Un,av as Fn,ai as Ln,E as et,cX as _n,g as $n}from"./index-CVAekD3p.js";import{n as P,S as Mn}from"./mui-BuJ3P0FU.js";import pe from"./NotFoundScreen-Due1Mflv.js";import{S as Ue}from"./SetupPagesScreen-DSJF8gvU.js";import{F as tt}from"./FeaturePreviewScreen-CfLYCS4M.js";import{a as h}from"./sentry-G4ZANa8Z.js";import{u as Re}from"./useAskAiCfoHostNavButtonProps-BHyPLCCo.js";import{u as nt}from"./useInitialThreadRequest-DtdvMhZQ.js";import{D as Pn}from"./DrawerScreen-O-gM6ONw.js";import{M as at}from"./MobileAppDrawer-HCRn1e7J.js";import{F as Nn}from"./ScreenRoutes-ChUwukZv.js";import{R as On}from"./ReimbursementApprovalRoutes-Cz663ZFE.js";import"./recharts-CJlXFxhv.js";import"./analytics-CvsRIk3B.js";import"./plaid-i7y7YD6O.js";import"./dnd-SnD389s6.js";import"./stripe-cKAAJElX.js";import"./lottie-DEqUWUd5.js";import"./lexical-CMBMntF_.js";import"./pdf-B_v4zyN7.js";import"./utils-Bz8wuSWM.js";import"./BusinessVerificationPageScreen-BL-rDXb4.js";import"./routePaths-nMSO0ytp.js";import"./analyticsHelper-C534_Opk.js";import"./InboxNotificationsProvider-Cf5DQSg3.js";import"./useTaskManagerAccess-DnvaNO8w.js";import"./getLocaleForTenant-COb4gZwj.js";import"./ReimbursementApprovalRuleDetailScreen-D1uTDziv.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]="346382e1-6921-430d-9450-98218ca2d48a",e._sentryDebugIdIdentifier="sentry-dbid-346382e1-6921-430d-9450-98218ca2d48a")}catch{}})();const st=e=>`/${e}/reimbursements`,zn=e=>h.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},h.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{common:Y,spendManagement:{reimbursement:{reimbursementDetail:ne}}}=Ke.getLocalizedStrings(),Gn=ee((function(e,t){const n=t.currentTenant?.companyId,r=bt(e.plaidAccountViewState,"user_reimbursement_account"),c=_.getSignedInUser(),d=fe(c),m=r.plaidConnectionDetails,o=_e(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=ge(e,t.reimbursementId),b=gt(e,c?.userId??"");let y=`${c?.firstName} ${c?.lastName}`,f=!0;t.reimbursementId!=null&&(y=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,f=c?.userId===l.createdBy?.userId);const B=e.entityAutoCompleteState?.autoCompleteText?.common,u=ht(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:B,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:y,isUserAdmin:he(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:C,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:f,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:$e(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=_.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(de(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(xe(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(_t(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Lt())},clearRemiSaveStatus:()=>{e(Ft("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(xe(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Ut({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(jt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(Dt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Tt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Bt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(we(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(we("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Ee({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ce({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Et({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(Ct({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(kt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Pe()),e(Ee({}));const i=st(o),l=J(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(C.trackReimbursementDeleteReimbursement(n),e(Me(n)))},onSaveBankAccount:()=>{a?.userId&&e(At(a?.userId,n))},onFetchLinkTokenClick:i=>{e(vt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(Rt(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(yt(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(St({fetchState:"Not-Started"})),e(It())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(ft({searchString:i,entityType:l,searchOrigin:"common"})):e(Ce("common"))},onCancelAutoComplete:()=>{e(Ce("common"))}}}}))(wn);function Fe(){const e=Q(),t=ae(),n=K(),{reimbursementId:r}=ie(),c=Ye(),d=qe(),[m,o]=h.useState(r==null),[a,i]=h.useState(1),{useFeatureGate:l}=oe(),{isFeatureEnabled:b}=l(x.isLimitedCategoryForReimbursement),{isFeatureEnabled:y}=l(x.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:f}=l(x.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:B,onAskAiCfoClick:u}=Re({mobileExploreReferrer:"Reimbursement Details"}),T=K().pathname,D=T.includes("edit"),j=T.includes("reimbursement/new"),[A,k]=h.useState(!1),E=_.getSignedInUser(),I=v((p=>V(p))),g=v((p=>ge(p,r))),F=nt(I?.companyId,{clearParams:g.fetchState==="Completed"}),L=he(I?.userRole??[]);(function(){const p=ae(),N=v((X=>V(X))),O=N?.tenantId,{isApprovalRulesV3Enabled:z,isLoading:W}=Cn(O),H=v((X=>X.remiSetupApproverViewState.fetchState));h.useEffect((()=>{O==null||W||H==="Not-Started"&&p(ut(!0,!1,!1,z))}),[O,W,z,H,p])})(),h.useEffect((()=>{(j&&!A||D&&!A&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(k(!0),t(Le(!1,b,y,r)))}));const $=v((p=>pt(p.accountState,p.accountListState,"reimbursementAccountList")));if(E==null)throw Error("Can't access address page without signing in...");const R={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||L&&g.billStatus==="rejected"||L===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(M,{to:R}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(Je,{isNewReimbursement:r==null}):s.jsxs(Zn,{windowSize:d,children:[s.jsx(re,{analytics:C,onLoad:p=>(N=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&N.trackReimbursementEditReimbursement(r)})(p)}),m&&d!=="small"?s.jsx(Vn,{}):null,m&&d!=="small"?s.jsx(Wn,{children:s.jsx(je,{showAutofill:m,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:E?.userId??"",sessionId:E?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(de(p,a,!0,r,E?.userId))},updateInvoiceUploadFetchState:p=>{t(ce({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:U.sp3,paddingBottom:"15px",paddingLeft:U.sp5},dropFilePlaceholder:{upload:Y.upload,single:ne.dropReceipt.single,or:Y.texts.or,multiple:ne.dropReceipt.multiple,receipts:Y.texts.receipts2}})}):null,m&&d==="small"?s.jsxs(Hn,{children:[s.jsx(Yn,{onClick:()=>o(!1),children:s.jsx(zn,{})}),s.jsx(je,{showAutofill:m,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:E?.userId??"",sessionId:E?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(de(p,a,!0,r,E?.userId))},updateInvoiceUploadFetchState:p=>{t(ce({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:U.sp5,paddingRight:U.sp3,paddingBottom:U.sp5,paddingLeft:U.sp3},dropFilePlaceholder:{upload:Y.upload,single:ne.dropReceipt.single,or:Y.texts.or,multiple:ne.dropReceipt.multiple,receipts:Y.texts.receipts2}})]}):null,s.jsx(qn,{windowSize:d,children:s.jsx(Gn,{initialOpenThreadRequest:F??void 0,isReimbursementCommentingEnabled:f,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:c,uncategorizedAccounts:$,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:B,onAskAiCfoClick:u})})]})}const Zn=P.div`
|
|
1
|
+
import{j as s}from"./liveblocks-y3zMPGKB.js";import{u as ae,j as v,h as Q,g as K,i as ie,N as M,l as ee,q as ct,n as dt,o as w}from"./core-BwK6FGJd.js";import{fE as V,Np as ut,_E as ge,c8 as he,Mv as Le,m9 as pt,MK as ce,MJ as de,_F as bt,bn as fe,gU as _e,_G as gt,WC as ht,l_ as $e,WD as Ce,WE as ft,kM as St,YF as It,k$ as yt,Mj as Rt,C2 as vt,kT as At,N4 as Me,_H as Pe,_I as Ee,_J as kt,_K as Ct,_L as Et,MQ as we,l5 as wt,YO as xt,MI as Bt,Mt as Tt,_M as Dt,Ms as jt,_N as Ut,MA as xe,MU as Ft,MT as Lt,MP as _t,_O as Ne,S2 as $t,bo as Mt,MD as Pt,Nm as Nt,_P as Ot,_Q as zt,N0 as Gt,MZ as Be,Y9 as Zt,Mq as Vt,_R as Oe,NP as Te,NX as Wt,_S as Ht,_T as q,_U as Yt,_V as ze,_W as qt,_X as Ge,_Y as Ze,Nc as ue,bu as Jt,bK as Se,cM as Ie,dZ as Ve,dY as We,_Z as Kt,gg as Xt,Ym as Qt,__ as en,_$ as He,Yq as tn,Z8 as nn,$0 as an,Zx as sn,NU as De,NT as on,$1 as rn,$2 as ln,$3 as mn,$4 as cn,$5 as dn,YU as un,NK as pn,NO as bn,bq as gn,bJ as hn,cG as fn,cu as Sn,bt as In,U1 as yn,d9 as Rn,dc as vn,db as An,cF as kn}from"./zeni-epic-state-BugXGzus.js";import{bS as Cn,$ as Ye,a1 as qe,O as oe,c as x,z as _,cT as Je,a8 as re,k as C,aS as je,J as U,ae as se,af as En,G as Ke,cU as wn,p as J,as as Xe,cV as xn,U as le,cW as Bn,aq as Tn,ab as Dn,a7 as ye,T as Qe,w as jn,bA as Un,av as Fn,ai as Ln,E as et,cX as _n,g as $n}from"./index-DTZt8DRK.js";import{n as P,S as Mn}from"./mui-CxIkaR9n.js";import pe from"./NotFoundScreen-DVcHaqdZ.js";import{S as Ue}from"./SetupPagesScreen-DV-Hyv78.js";import{F as tt}from"./FeaturePreviewScreen-C8dKuiF7.js";import{a as h}from"./sentry-Jm7O5sR0.js";import{u as Re}from"./useAskAiCfoHostNavButtonProps-DzjGv8Xy.js";import{u as nt}from"./useInitialThreadRequest-BWyM3F-W.js";import{D as Pn}from"./DrawerScreen-DQY8vrlv.js";import{M as at}from"./MobileAppDrawer-plEMRzd-.js";import{F as Nn}from"./ScreenRoutes-Cy1wpKTY.js";import{R as On}from"./ReimbursementApprovalRoutes-B2dZhJk9.js";import"./recharts-CoAMGh71.js";import"./analytics-BTvt2K3S.js";import"./plaid-CQqwPn97.js";import"./dnd-Cbdx7tVf.js";import"./stripe-cKAAJElX.js";import"./lottie-BQlGSG2c.js";import"./lexical-DRfKJLK3.js";import"./pdf-DGzvSuDl.js";import"./utils-BVIT21dc.js";import"./BusinessVerificationPageScreen-BLwno7qB.js";import"./routePaths-CPqwWbPN.js";import"./analyticsHelper-BwLj34Ys.js";import"./InboxNotificationsProvider-ozJWRqdQ.js";import"./useTaskManagerAccess-DRF4urEw.js";import"./getLocaleForTenant-DzgzmDle.js";import"./ReimbursementApprovalRuleDetailScreen-NYDKW5M_.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]="346382e1-6921-430d-9450-98218ca2d48a",e._sentryDebugIdIdentifier="sentry-dbid-346382e1-6921-430d-9450-98218ca2d48a")}catch{}})();const st=e=>`/${e}/reimbursements`,zn=e=>h.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},h.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{common:Y,spendManagement:{reimbursement:{reimbursementDetail:ne}}}=Ke.getLocalizedStrings(),Gn=ee((function(e,t){const n=t.currentTenant?.companyId,r=bt(e.plaidAccountViewState,"user_reimbursement_account"),c=_.getSignedInUser(),d=fe(c),m=r.plaidConnectionDetails,o=_e(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=ge(e,t.reimbursementId),b=gt(e,c?.userId??"");let y=`${c?.firstName} ${c?.lastName}`,f=!0;t.reimbursementId!=null&&(y=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,f=c?.userId===l.createdBy?.userId);const B=e.entityAutoCompleteState?.autoCompleteText?.common,u=ht(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:B,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:y,isUserAdmin:he(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:C,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:f,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:$e(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=_.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(de(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(xe(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(_t(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Lt())},clearRemiSaveStatus:()=>{e(Ft("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(xe(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Ut({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(jt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(Dt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Tt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Bt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(we(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(we("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Ee({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ce({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Et({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(Ct({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(kt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Pe()),e(Ee({}));const i=st(o),l=J(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(C.trackReimbursementDeleteReimbursement(n),e(Me(n)))},onSaveBankAccount:()=>{a?.userId&&e(At(a?.userId,n))},onFetchLinkTokenClick:i=>{e(vt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(Rt(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(yt(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(St({fetchState:"Not-Started"})),e(It())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(ft({searchString:i,entityType:l,searchOrigin:"common"})):e(Ce("common"))},onCancelAutoComplete:()=>{e(Ce("common"))}}}}))(wn);function Fe(){const e=Q(),t=ae(),n=K(),{reimbursementId:r}=ie(),c=Ye(),d=qe(),[m,o]=h.useState(r==null),[a,i]=h.useState(1),{useFeatureGate:l}=oe(),{isFeatureEnabled:b}=l(x.isLimitedCategoryForReimbursement),{isFeatureEnabled:y}=l(x.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:f}=l(x.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:B,onAskAiCfoClick:u}=Re({mobileExploreReferrer:"Reimbursement Details"}),T=K().pathname,D=T.includes("edit"),j=T.includes("reimbursement/new"),[A,k]=h.useState(!1),E=_.getSignedInUser(),I=v((p=>V(p))),g=v((p=>ge(p,r))),F=nt(I?.companyId,{clearParams:g.fetchState==="Completed"}),L=he(I?.userRole??[]);(function(){const p=ae(),N=v((X=>V(X))),O=N?.tenantId,{isApprovalRulesV3Enabled:z,isLoading:W}=Cn(O),H=v((X=>X.remiSetupApproverViewState.fetchState));h.useEffect((()=>{O==null||W||H==="Not-Started"&&p(ut(!0,!1,!1,z))}),[O,W,z,H,p])})(),h.useEffect((()=>{(j&&!A||D&&!A&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(k(!0),t(Le(!1,b,y,r)))}));const $=v((p=>pt(p.accountState,p.accountListState,"reimbursementAccountList")));if(E==null)throw Error("Can't access address page without signing in...");const R={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||L&&g.billStatus==="rejected"||L===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(M,{to:R}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(Je,{isNewReimbursement:r==null}):s.jsxs(Zn,{windowSize:d,children:[s.jsx(re,{analytics:C,onLoad:p=>(N=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&N.trackReimbursementEditReimbursement(r)})(p)}),m&&d!=="small"?s.jsx(Vn,{}):null,m&&d!=="small"?s.jsx(Wn,{children:s.jsx(je,{showAutofill:m,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:E?.userId??"",sessionId:E?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(de(p,a,!0,r,E?.userId))},updateInvoiceUploadFetchState:p=>{t(ce({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:U.sp3,paddingBottom:"15px",paddingLeft:U.sp5},dropFilePlaceholder:{upload:Y.upload,single:ne.dropReceipt.single,or:Y.texts.or,multiple:ne.dropReceipt.multiple,receipts:Y.texts.receipts2}})}):null,m&&d==="small"?s.jsxs(Hn,{children:[s.jsx(Yn,{onClick:()=>o(!1),children:s.jsx(zn,{})}),s.jsx(je,{showAutofill:m,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:E?.userId??"",sessionId:E?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(de(p,a,!0,r,E?.userId))},updateInvoiceUploadFetchState:p=>{t(ce({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:U.sp5,paddingRight:U.sp3,paddingBottom:U.sp5,paddingLeft:U.sp3},dropFilePlaceholder:{upload:Y.upload,single:ne.dropReceipt.single,or:Y.texts.or,multiple:ne.dropReceipt.multiple,receipts:Y.texts.receipts2}})]}):null,s.jsx(qn,{windowSize:d,children:s.jsx(Gn,{initialOpenThreadRequest:F??void 0,isReimbursementCommentingEnabled:f,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:c,uncategorizedAccounts:$,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:B,onAskAiCfoClick:u})})]})}const Zn=P.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
position: relative;
|
|
4
4
|
height: 100vh;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-DRsJ0YIJ.js";import{g as X,h as Fe,u as Ue,i as De,j as d,l as Ae,n as Pe,o as ee}from"./core-DGLzDXWl.js";import{fE as q,D_ as R,Uz as Ee,l_ as le,u5 as ce,uW as D,lF as Le,lO as A,lG as P,kJ as E,kA as L,kz as Ve,D8 as ie,u$ as Me,bq as Be,UA as ve,bn as xe,El as ze,UB as Ge,UC as Ye,ci as g,D1 as He,UD as ae,UE as Ne,UF as $e,UG as qe,UH as Ze,UI as Je,UJ as Qe,UK as We,UL as Ke,UM as Xe,UN as ea,UO as aa,UP as sa,UQ as k,UR as V,US as M,UT as B,UU as v,UV as x,UW as z,UX as G,UY as Y,UZ as H,eh as ta,D$ as oa,DO as se,DP as te,E5 as na,DT as oe,Eb as ra,U_ as la,U$ as ca,V0 as ia,V1 as da,V2 as pa,V3 as _a,V4 as fa,V5 as ma,V6 as ba,V7 as ua,dZ as ha,dY as ya}from"./zeni-epic-state-Dm2vDWXH.js";import{an as Ca,ao as wa,ap as Sa,a as ga,a1 as Ia,O as de,c as N,z as pe,aq as Ra,U as Ta,e as ka,ar as ja,as as Oa,a8 as Fa,k as $,T as Ua,x as Da,p as _e,at as Aa,au as Pa,av as Ea}from"./index-CVAekD3p.js";import"./mui-BuJ3P0FU.js";import La from"./NotFoundScreen-Due1Mflv.js";import{F as Va}from"./FeaturePreviewScreen-CfLYCS4M.js";import{a as b}from"./sentry-G4ZANa8Z.js";import{u as Ma}from"./useInitialThreadRequest-DtdvMhZQ.js";import{t as ne,a as re,b as Ba}from"./routePaths-nMSO0ytp.js";import{M as va}from"./MobileAppDrawer-HCRn1e7J.js";import"./recharts-CJlXFxhv.js";import"./analytics-CvsRIk3B.js";import"./plaid-i7y7YD6O.js";import"./dnd-SnD389s6.js";import"./stripe-cKAAJElX.js";import"./lottie-DEqUWUd5.js";import"./lexical-CMBMntF_.js";import"./pdf-B_v4zyN7.js";import"./utils-Bz8wuSWM.js";import"./InboxNotificationsProvider-Cf5DQSg3.js";import"./useTaskManagerAccess-DnvaNO8w.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]="9b2093eb-c8bf-47f9-827c-9da1836cf36c",e._sentryDebugIdIdentifier="sentry-dbid-9b2093eb-c8bf-47f9-827c-9da1836cf36c")}catch{}})();const xa=["profit_loss","balance_sheet","cash_flow"],I=e=>e==="balance_sheet"||e==="balance_sheet_by_classes"||e==="balance_sheet_by_projects",y=e=>{e(H({resetLeftScroll:!0})),e(Y({resetLeftScroll:!0})),e(G({resetLeftScroll:!0})),e(z({resetLeftScroll:!0})),e(x({resetLeftScroll:!0})),e(v({resetLeftScroll:!0})),e(V({resetLeftScroll:!0})),e(B({resetLeftScroll:!0})),e(M({resetLeftScroll:!0}))},za=e=>{e(ca()),e(ia()),e(da()),e(pa()),e(_a()),e(fa()),e(ma()),e(ba()),e(ua())},Ga=Ae((function(e){const o=pe.getSignedInUser(),_=e.tenantState.currentTenantId,m=q(e),a=m?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:_??""},t=R(e),r=ve(m);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,balanceSheetClassesViewReport:t.balanceSheetByClassReport,cashFlowClassesViewReport:t.cashFlowByClassReport,cashFlowProjectViewReport:t.cashFlowByProjectReport,balanceSheetProjectViewReport:t.balanceSheetByProjectReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:$,isZeniUser:xe(o),showAccountGroups:r===!0,isAccountingClassesEnabled:le(e),isAccountingProjectsEnabled:ce(e),currentTenantCompanyName:a,statementEndPoint:`${Ea}/statement`,authParams:s,isZeniCOAUsed:r}}),(function(e,o){const{navigate:_,handleDrawerToggle:m}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(D(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(la(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(ra(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:f,balancesRange:i}=l;let c=[...f];a==="year"&&(c=c.filter((C=>C!=="this_period_vs_same_period_last_year"&&C!=="this_period_vs_same_period_last_year_percent"&&C!=="same_period_last_year"))),e(se(o.firstMonthOfFY,r,i.numberOfPeriods<1?1:i.numberOfPeriods,c)),f.length>0&&e(te(o.firstMonthOfFY,c.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",i.numberOfPeriods<1?1:i.numberOfPeriods,c))}t!==!0&&setTimeout((()=>y(e)),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(k(a)),(I(a)||g(a))&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(oe({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(ae({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(oe(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(na(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(se(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(te(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout((()=>y(e)),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(oa({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=ta(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const f=a.accountName===""?a.accountDescription:a.accountName,i=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return ne(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return re(o.tenantEmailDomain,a.accountId,a.accountType,s.id,f,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?Ba(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,f,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?re(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],f,r,l):a.accountType!=null?ne(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l):void 0})();if(i!=null){const c=_e(o.location.state?.pathnameStackToGoBack,o.location.pathname);_(i,{state:{pathnameStackToGoBack:c,referrer:j(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(H({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(Y({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(G({scrollPosition:s}));break;case"balance_sheet":e(z({scrollPosition:s}));break;case"balance_sheet_by_classes":e(x({scrollPosition:s}));break;case"balance_sheet_by_projects":e(v({scrollPosition:s}));break;case"cash_flow_by_classes":e(B({scrollPosition:s}));break;case"cash_flow_by_projects":e(M({scrollPosition:s}));break;case"cash_flow":e(V({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(Y({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(G({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_classes":e(x({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_projects":e(v({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_classes":e(B({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_projects":e(M({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(V({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{_("../../")},onUpdateAccountViewMode:(a,s)=>{const t=s??o.selectedReportID,r=I(t),l=g(t);l?(e(We({viewMode:a})),e(Ke({viewMode:a}))):r?(e(Xe({viewMode:a})),e(ea({viewMode:a}))):(e(aa({viewMode:a})),e(sa({viewMode:a}))),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",j(t)),e(k(l?"cash_flow_by_classes":r?"balance_sheet_by_classes":"profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",j(t)),e(k(l?"cash_flow_by_projects":r?"balance_sheet_by_projects":"profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",j(t)),e(k(l?"cash_flow":r?"balance_sheet":"profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{g(o.selectedReportID)?e(Ze({classesToFilterOut:a})):I(o.selectedReportID)?e(Je({classesToFilterOut:a})):e(Qe({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{g(o.selectedReportID)?e(Ne({projectsToFilterOut:a})):I(o.selectedReportID)?e($e({projectsToFilterOut:a})):e(qe({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(ae({classViewLayout:a}))},onOpenAccountViewMode:()=>{const a=I(o.selectedReportID),s=g(o.selectedReportID);o.isAccountingClassesEnabled&&e(s?P():a?L():He()),o.isAccountingProjectsEnabled&&e(s?A():a?E():ie())},onUpdateDisplayOrder:a=>{e(Ye(a))},onUpdateReportFormat:a=>{za(e),e(Ge(a))},onClickMenuIcon:()=>{m(!0)},onResyncReports:()=>{const a=o.selectedReportID;e(a!=="balance_sheet_by_classes"?a!=="balance_sheet_by_projects"?a!=="cash_flow_by_classes"?a!=="cash_flow_by_projects"?ze(a==="profit_and_loss_by_projects"?"profit_and_loss_by_projects":"profit_and_loss_by_classes"):A(!0):P(!0):E(!0):L(!0))}}}))(Aa);function Ya(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=ga(),_=Ia(),m=Pa(_),a=Fe(),s=Ue(),t=X(),{tenantEmailDomain:r}=De(),{useFeatureGate:l}=de(),{isFeatureEnabled:f}=l(N.isReportsHorizontalClassLayoutSwitchEnabled),i=pe.getSignedInUser(),[c,C]=b.useState(!1),[Z,fe]=b.useState(!1),{isFeatureEnabled:J}=l(N.isReportsCommentingEnabled);if(i==null)throw Error("Can't access reports page without signing in...");const O=d((n=>q(n))),me=O.masterTOSInfo?.isMasterTOSAccepted??!1,be=O.company?.companyInfo.firstMonthOfFY??1,ue=Ma(J?O?.companyId:void 0),w=d((n=>R(n).fetchState)),he=d((n=>Ee(n))),{areTenantIdsInSync:u}=Ra(),F=d((n=>n.financeStatementState.selectedReportId)),T=d((n=>le(n))),S=d((n=>ce(n))),ye=d((n=>R(n).isCompareModeOn)),h=d((n=>R(n).filter)),U=d((n=>R(n).selectedReportAndTimeframeFetchState)),Ce=d((n=>n.profitAndLossClassesViewState.uiState.classViewLayout));b.useEffect((()=>{!c&&u&&(C(!0),s(D(i.userId,!0,!0,!1)))}),[c,i,s,u]),b.useEffect((()=>{c&&!Z&&w==="Completed"&&u&&(s(D(i.userId,!1,!0,!1)),fe(!0))}),[c,Z,w,u]),b.useEffect((()=>{if(c&&U.fetchState==="Not-Started"&&h.timeframe!=="free_range"&&h.timeframe!=="week"&&u)switch(F){case"profit_and_loss":case"profit_and_loss_by_classes":s(Me(h.timeframe));break;case"profit_and_loss_by_projects":S&&s(ie());break;case"balance_sheet":s(Ve(h.timeframe));break;case"balance_sheet_by_classes":T&&s(L());break;case"balance_sheet_by_projects":S&&s(E());break;case"cash_flow_by_classes":T&&s(P());break;case"cash_flow_by_projects":S&&s(A());break;case"cash_flow":s(Le(h.timeframe))}}),[c,F,U,u,T,S]);const Q=Ta(),we=Q?.loggedInUserRole!=null&&Be(Q?.loggedInUserRole)!==!0,[Se,ge]=b.useState(!1),W=n=>{ge(n)},Ie=ka(),Re=ja();return(function(n){const{isDataReady:Te}=n,{pathname:ke}=X(),K=Ca(ke??"")==="reports",je=wa(Te),Oe=b.useMemo((()=>K?xa:void 0),[K]);Sa({canFetchSuggestedQuestions:je,pageContexts:Oe})})({isDataReady:w==="Completed"}),Oa({isDataReady:w==="Completed"}),p.jsxs(p.Fragment,{children:[w==="Completed"?p.jsx(Fa,{analytics:$,onLoad:n=>n.trackPageLoaded(Ua.Event.reports)}):null,p.jsx(va,{isAppContentDrawerOpen:Se,handleDrawerToggle:W}),p.jsx(Ga,{firstMonthOfFY:be,tenantEmailDomain:r,location:t,navigate:a,windowSize:_,classViewLayout:Ce,selectedReportID:F,analytics:$,filter:h,isAccountingClassesEnabled:T,isAccountingProjectsEnabled:S,isCompareModeOn:ye,hasTransactionAccess:we,signedInUser:i,selectedReportAndTimeframeFetchState:U,handleDrawerToggle:W,reportsResyncFetchState:he.reportsResyncFetchState,isAiCfoAccessEnabled:Re&&Ie&&!e,onAskAiCfoClick:()=>{if(me)if(m){const n=_e(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else Da({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:f,isReportsCommentingEnabled:J,initialOpenThreadRequest:ue})]})}const j=e=>{switch(e){case"profit_and_loss":case"profit_and_loss_by_classes":case"profit_and_loss_by_projects":return"Profit & Loss";case"balance_sheet":case"balance_sheet_by_classes":case"balance_sheet_by_projects":return"Balance Sheet";case"cash_flow":case"cash_flow_by_classes":case"cash_flow_by_projects":return"Cash Flow";default:return"Reports"}};function _s(){const e=d((s=>q(s))),{useFeatureGate:o}=de(),{isFeatureEnabled:_}=o(N.isDebitCardFeatureEnabled),m=ha(_,e),a=ya(e);return m===!0||a===!0?p.jsx(Va,{}):p.jsxs(Pe,{children:[p.jsx(ee,{path:"/",element:p.jsx(Ya,{})}),p.jsx(ee,{path:"*",element:p.jsx(La,{})})]})}export{_s as default};
|
|
1
|
+
import{j as p}from"./liveblocks-y3zMPGKB.js";import{g as X,h as Fe,u as Ue,i as De,j as d,l as Ae,n as Pe,o as ee}from"./core-BwK6FGJd.js";import{fE as q,D_ as R,Uz as Ee,l_ as le,u5 as ce,uW as D,lF as Le,lO as A,lG as P,kJ as E,kA as L,kz as Ve,D8 as ie,u$ as Me,bq as Be,UA as ve,bn as xe,El as ze,UB as Ge,UC as Ye,ci as g,D1 as He,UD as ae,UE as Ne,UF as $e,UG as qe,UH as Ze,UI as Je,UJ as Qe,UK as We,UL as Ke,UM as Xe,UN as ea,UO as aa,UP as sa,UQ as k,UR as V,US as M,UT as B,UU as v,UV as x,UW as z,UX as G,UY as Y,UZ as H,eh as ta,D$ as oa,DO as se,DP as te,E5 as na,DT as oe,Eb as ra,U_ as la,U$ as ca,V0 as ia,V1 as da,V2 as pa,V3 as _a,V4 as fa,V5 as ma,V6 as ba,V7 as ua,dZ as ha,dY as ya}from"./zeni-epic-state-BugXGzus.js";import{an as Ca,ao as wa,ap as Sa,a as ga,a1 as Ia,O as de,c as N,z as pe,aq as Ra,U as Ta,e as ka,ar as ja,as as Oa,a8 as Fa,k as $,T as Ua,x as Da,p as _e,at as Aa,au as Pa,av as Ea}from"./index-DTZt8DRK.js";import"./mui-CxIkaR9n.js";import La from"./NotFoundScreen-DVcHaqdZ.js";import{F as Va}from"./FeaturePreviewScreen-C8dKuiF7.js";import{a as b}from"./sentry-Jm7O5sR0.js";import{u as Ma}from"./useInitialThreadRequest-BWyM3F-W.js";import{t as ne,a as re,b as Ba}from"./routePaths-CPqwWbPN.js";import{M as va}from"./MobileAppDrawer-plEMRzd-.js";import"./recharts-CoAMGh71.js";import"./analytics-BTvt2K3S.js";import"./plaid-CQqwPn97.js";import"./dnd-Cbdx7tVf.js";import"./stripe-cKAAJElX.js";import"./lottie-BQlGSG2c.js";import"./lexical-DRfKJLK3.js";import"./pdf-DGzvSuDl.js";import"./utils-BVIT21dc.js";import"./InboxNotificationsProvider-ozJWRqdQ.js";import"./useTaskManagerAccess-DRF4urEw.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]="9b2093eb-c8bf-47f9-827c-9da1836cf36c",e._sentryDebugIdIdentifier="sentry-dbid-9b2093eb-c8bf-47f9-827c-9da1836cf36c")}catch{}})();const xa=["profit_loss","balance_sheet","cash_flow"],I=e=>e==="balance_sheet"||e==="balance_sheet_by_classes"||e==="balance_sheet_by_projects",y=e=>{e(H({resetLeftScroll:!0})),e(Y({resetLeftScroll:!0})),e(G({resetLeftScroll:!0})),e(z({resetLeftScroll:!0})),e(x({resetLeftScroll:!0})),e(v({resetLeftScroll:!0})),e(V({resetLeftScroll:!0})),e(B({resetLeftScroll:!0})),e(M({resetLeftScroll:!0}))},za=e=>{e(ca()),e(ia()),e(da()),e(pa()),e(_a()),e(fa()),e(ma()),e(ba()),e(ua())},Ga=Ae((function(e){const o=pe.getSignedInUser(),_=e.tenantState.currentTenantId,m=q(e),a=m?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:_??""},t=R(e),r=ve(m);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,balanceSheetClassesViewReport:t.balanceSheetByClassReport,cashFlowClassesViewReport:t.cashFlowByClassReport,cashFlowProjectViewReport:t.cashFlowByProjectReport,balanceSheetProjectViewReport:t.balanceSheetByProjectReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:$,isZeniUser:xe(o),showAccountGroups:r===!0,isAccountingClassesEnabled:le(e),isAccountingProjectsEnabled:ce(e),currentTenantCompanyName:a,statementEndPoint:`${Ea}/statement`,authParams:s,isZeniCOAUsed:r}}),(function(e,o){const{navigate:_,handleDrawerToggle:m}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(D(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(la(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(ra(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:f,balancesRange:i}=l;let c=[...f];a==="year"&&(c=c.filter((C=>C!=="this_period_vs_same_period_last_year"&&C!=="this_period_vs_same_period_last_year_percent"&&C!=="same_period_last_year"))),e(se(o.firstMonthOfFY,r,i.numberOfPeriods<1?1:i.numberOfPeriods,c)),f.length>0&&e(te(o.firstMonthOfFY,c.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",i.numberOfPeriods<1?1:i.numberOfPeriods,c))}t!==!0&&setTimeout((()=>y(e)),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(k(a)),(I(a)||g(a))&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(oe({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(ae({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(oe(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(na(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(se(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(te(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout((()=>y(e)),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(oa({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=ta(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const f=a.accountName===""?a.accountDescription:a.accountName,i=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return ne(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return re(o.tenantEmailDomain,a.accountId,a.accountType,s.id,f,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?Ba(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,f,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?re(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],f,r,l):a.accountType!=null?ne(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l):void 0})();if(i!=null){const c=_e(o.location.state?.pathnameStackToGoBack,o.location.pathname);_(i,{state:{pathnameStackToGoBack:c,referrer:j(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(H({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(Y({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(G({scrollPosition:s}));break;case"balance_sheet":e(z({scrollPosition:s}));break;case"balance_sheet_by_classes":e(x({scrollPosition:s}));break;case"balance_sheet_by_projects":e(v({scrollPosition:s}));break;case"cash_flow_by_classes":e(B({scrollPosition:s}));break;case"cash_flow_by_projects":e(M({scrollPosition:s}));break;case"cash_flow":e(V({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(Y({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(G({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_classes":e(x({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_projects":e(v({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_classes":e(B({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_projects":e(M({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(V({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{_("../../")},onUpdateAccountViewMode:(a,s)=>{const t=s??o.selectedReportID,r=I(t),l=g(t);l?(e(We({viewMode:a})),e(Ke({viewMode:a}))):r?(e(Xe({viewMode:a})),e(ea({viewMode:a}))):(e(aa({viewMode:a})),e(sa({viewMode:a}))),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",j(t)),e(k(l?"cash_flow_by_classes":r?"balance_sheet_by_classes":"profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",j(t)),e(k(l?"cash_flow_by_projects":r?"balance_sheet_by_projects":"profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",j(t)),e(k(l?"cash_flow":r?"balance_sheet":"profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{g(o.selectedReportID)?e(Ze({classesToFilterOut:a})):I(o.selectedReportID)?e(Je({classesToFilterOut:a})):e(Qe({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{g(o.selectedReportID)?e(Ne({projectsToFilterOut:a})):I(o.selectedReportID)?e($e({projectsToFilterOut:a})):e(qe({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(ae({classViewLayout:a}))},onOpenAccountViewMode:()=>{const a=I(o.selectedReportID),s=g(o.selectedReportID);o.isAccountingClassesEnabled&&e(s?P():a?L():He()),o.isAccountingProjectsEnabled&&e(s?A():a?E():ie())},onUpdateDisplayOrder:a=>{e(Ye(a))},onUpdateReportFormat:a=>{za(e),e(Ge(a))},onClickMenuIcon:()=>{m(!0)},onResyncReports:()=>{const a=o.selectedReportID;e(a!=="balance_sheet_by_classes"?a!=="balance_sheet_by_projects"?a!=="cash_flow_by_classes"?a!=="cash_flow_by_projects"?ze(a==="profit_and_loss_by_projects"?"profit_and_loss_by_projects":"profit_and_loss_by_classes"):A(!0):P(!0):E(!0):L(!0))}}}))(Aa);function Ya(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=ga(),_=Ia(),m=Pa(_),a=Fe(),s=Ue(),t=X(),{tenantEmailDomain:r}=De(),{useFeatureGate:l}=de(),{isFeatureEnabled:f}=l(N.isReportsHorizontalClassLayoutSwitchEnabled),i=pe.getSignedInUser(),[c,C]=b.useState(!1),[Z,fe]=b.useState(!1),{isFeatureEnabled:J}=l(N.isReportsCommentingEnabled);if(i==null)throw Error("Can't access reports page without signing in...");const O=d((n=>q(n))),me=O.masterTOSInfo?.isMasterTOSAccepted??!1,be=O.company?.companyInfo.firstMonthOfFY??1,ue=Ma(J?O?.companyId:void 0),w=d((n=>R(n).fetchState)),he=d((n=>Ee(n))),{areTenantIdsInSync:u}=Ra(),F=d((n=>n.financeStatementState.selectedReportId)),T=d((n=>le(n))),S=d((n=>ce(n))),ye=d((n=>R(n).isCompareModeOn)),h=d((n=>R(n).filter)),U=d((n=>R(n).selectedReportAndTimeframeFetchState)),Ce=d((n=>n.profitAndLossClassesViewState.uiState.classViewLayout));b.useEffect((()=>{!c&&u&&(C(!0),s(D(i.userId,!0,!0,!1)))}),[c,i,s,u]),b.useEffect((()=>{c&&!Z&&w==="Completed"&&u&&(s(D(i.userId,!1,!0,!1)),fe(!0))}),[c,Z,w,u]),b.useEffect((()=>{if(c&&U.fetchState==="Not-Started"&&h.timeframe!=="free_range"&&h.timeframe!=="week"&&u)switch(F){case"profit_and_loss":case"profit_and_loss_by_classes":s(Me(h.timeframe));break;case"profit_and_loss_by_projects":S&&s(ie());break;case"balance_sheet":s(Ve(h.timeframe));break;case"balance_sheet_by_classes":T&&s(L());break;case"balance_sheet_by_projects":S&&s(E());break;case"cash_flow_by_classes":T&&s(P());break;case"cash_flow_by_projects":S&&s(A());break;case"cash_flow":s(Le(h.timeframe))}}),[c,F,U,u,T,S]);const Q=Ta(),we=Q?.loggedInUserRole!=null&&Be(Q?.loggedInUserRole)!==!0,[Se,ge]=b.useState(!1),W=n=>{ge(n)},Ie=ka(),Re=ja();return(function(n){const{isDataReady:Te}=n,{pathname:ke}=X(),K=Ca(ke??"")==="reports",je=wa(Te),Oe=b.useMemo((()=>K?xa:void 0),[K]);Sa({canFetchSuggestedQuestions:je,pageContexts:Oe})})({isDataReady:w==="Completed"}),Oa({isDataReady:w==="Completed"}),p.jsxs(p.Fragment,{children:[w==="Completed"?p.jsx(Fa,{analytics:$,onLoad:n=>n.trackPageLoaded(Ua.Event.reports)}):null,p.jsx(va,{isAppContentDrawerOpen:Se,handleDrawerToggle:W}),p.jsx(Ga,{firstMonthOfFY:be,tenantEmailDomain:r,location:t,navigate:a,windowSize:_,classViewLayout:Ce,selectedReportID:F,analytics:$,filter:h,isAccountingClassesEnabled:T,isAccountingProjectsEnabled:S,isCompareModeOn:ye,hasTransactionAccess:we,signedInUser:i,selectedReportAndTimeframeFetchState:U,handleDrawerToggle:W,reportsResyncFetchState:he.reportsResyncFetchState,isAiCfoAccessEnabled:Re&&Ie&&!e,onAskAiCfoClick:()=>{if(me)if(m){const n=_e(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else Da({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:f,isReportsCommentingEnabled:J,initialOpenThreadRequest:ue})]})}const j=e=>{switch(e){case"profit_and_loss":case"profit_and_loss_by_classes":case"profit_and_loss_by_projects":return"Profit & Loss";case"balance_sheet":case"balance_sheet_by_classes":case"balance_sheet_by_projects":return"Balance Sheet";case"cash_flow":case"cash_flow_by_classes":case"cash_flow_by_projects":return"Cash Flow";default:return"Reports"}};function _s(){const e=d((s=>q(s))),{useFeatureGate:o}=de(),{isFeatureEnabled:_}=o(N.isDebitCardFeatureEnabled),m=ha(_,e),a=ya(e);return m===!0||a===!0?p.jsx(Va,{}):p.jsxs(Pe,{children:[p.jsx(ee,{path:"/",element:p.jsx(Ya,{})}),p.jsx(ee,{path:"*",element:p.jsx(La,{})})]})}export{_s as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-y3zMPGKB.js";import{z as b,a8 as E,k as u,T as N,e4 as S,O as k,c as C}from"./index-DTZt8DRK.js";import"./mui-CxIkaR9n.js";import g from"./NotFoundScreen-DVcHaqdZ.js";import{a as c}from"./sentry-Jm7O5sR0.js";import{u as I,j as h,h as F,g as L,l as T,n as _,o as d,N as y}from"./core-BwK6FGJd.js";import{fE as U,a1K as j,a1L as p,DF as P,p_ as V,a1M as z,DD as G}from"./zeni-epic-state-BugXGzus.js";import"./recharts-CoAMGh71.js";import"./analytics-BTvt2K3S.js";import"./plaid-CQqwPn97.js";import"./dnd-Cbdx7tVf.js";import"./stripe-cKAAJElX.js";import"./lottie-BQlGSG2c.js";import"./lexical-DRfKJLK3.js";import"./pdf-DGzvSuDl.js";import"./utils-BVIT21dc.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]="b41dea2b-6d3d-45a1-9aaf-6c4932dd8328",e._sentryDebugIdIdentifier="sentry-dbid-b41dea2b-6d3d-45a1-9aaf-6c4932dd8328")}catch{}})();const K=T((function(e,t){const n=j(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}}),(function(e,t){const{navigate:n}=t,i=b.getSignedInUser();return{onDismissClick:()=>{e(p()),n("/")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach((l=>{s.push(l.companyName),r.push(l.emailIds[0])})),u.trackInviteEmailClicked("send",s,r,s.length)}e(G())},onUpdateInviteFormLocalData:s=>{e(z({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&u.trackInviteEmailClicked("cancel")}}}))(S),M=()=>{const e=I(),[t,n]=c.useState(!1),[i,s]=c.useState(!1),r=h((o=>U(o))),l=F(),w=L(),f=b.getSignedInUser();if(f==null)throw Error("Can't access invite referral screen without signing in...");const m=h((o=>j(o))),x=f?.firstName!=null?f.firstName:"User";c.useEffect((()=>{e(p()),r?.rewardsLastViewedTime==null&&i===!1&&(e(P()),s(!0))}),[]),c.useEffect((()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(V(!0)))}),[m.fetchState,e]);const D=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(E,{analytics:u,onLoad:o=>(v=>v.trackPageLoaded(N.Event.inviteEmailViewed))(o)}):null,a.jsx(K,{navigate:l,location:w,currentTenant:r,companyName:D,userName:x,inviteFormCompayData:m.localData})]})};function ne(){const{useFeatureGate:e}=k(),{isFeatureEnabled:t}=e(C.isReferralFeatureEnabled);return a.jsxs(_,{children:[a.jsx(d,{path:"/",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(d,{path:"how-it-works",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(d,{path:"refer/*",element:t?a.jsx(M,{}):a.jsx(g,{})}),a.jsx(d,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as y}from"./liveblocks-
|
|
1
|
+
import{j as y}from"./liveblocks-y3zMPGKB.js";import{a as A}from"./sentry-Jm7O5sR0.js";import{i as G,u as X,h as H,g as ee,j as h,l as te}from"./core-BwK6FGJd.js";import{Wx as Ve,Wy as Fe,l_ as ae,sq as Me,sC as Ge,sS as $e,sQ as Re,sT as Ke,sV as Ue,Wz as Ye,fE as K,Vw as pe,WA as Se,gZ as ne,cB as se,cC as le,F3 as ve,WB as Ce,F7 as We,gN as ce,st as ze,t1 as qe,dC as Ze,dB as Qe,SU as fe,F1 as Xe,EX as He,WC as De,EP as et,EO as tt,EJ as at,EU as nt,F8 as st,WD as Y,WE as ge,EQ as lt,Vx as oe,Fo as Ae,Fh as Ie,WF as xe,sw as Te,Fb as Be,F9 as Le,WG as be,Fv as we,Fs as Je,Fc as je,Fu as _e}from"./zeni-epic-state-BugXGzus.js";import{a4 as de,aY as ie,aZ as ct,z as ot,j as dt,a7 as it,a8 as ue,k as N,av as ut,a_ as rt,p as F,G as Ee,$ as ye,a$ as ht,b0 as mt,b1 as pt}from"./index-DTZt8DRK.js";import{n as re}from"./mui-CxIkaR9n.js";import{p as St}from"./pathToGoBack-QMp9zrtx.js";import Q from"./NotFoundScreen-DVcHaqdZ.js";import{c as M}from"./routePaths-CPqwWbPN.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]="375b8c9d-4793-4426-9b66-81ca8db9157a",e._sentryDebugIdIdentifier="sentry-dbid-375b8c9d-4793-4426-9b66-81ca8db9157a")}catch{}})();function Rt({isRenderedInPanel:e=!1,accrualIdOverride:t,onPanelNavigateBack:c}={}){const{accrualId:s}=G(),l=t??s,n=X(),i=H(),a=ee(),{accrual:d,actionFetchState:o,detailFetchState:m,localData:I}=h((u=>Ve(u,l??""))),p=h((u=>Fe(u))),C=h((u=>ae(u))),g=A.useCallback((()=>{const u=de(a.state?.pathnameStackToGoBack);i(u.poppedPathname??St(4),{state:{pathnameStackToGoBack:u.newStack}})}),[a.state,i]),f=A.useRef(!1);return A.useEffect((()=>{o.fetchState!=="In-Progress"&&f.current&&o.fetchState==="Completed"&&(f.current=!1,g())}),[o.fetchState,g]),A.useEffect((()=>{l!=null&&d==null&&m.fetchState==="Not-Started"&&n(Me(l))}),[l,d,m.fetchState]),A.useEffect((()=>{n(Ge({scheduleType:"prepaid_expenses",shouldResetEnteredData:!1}))}),[n]),l==null?y.jsx(Q,{}):d==null?m.fetchState==="Not-Started"||m.fetchState==="In-Progress"?y.jsx(ie,{}):y.jsx(Q,{}):y.jsx(ft,{children:y.jsx(ct,{isRenderedInPanel:e,accrual:d,actionFetchState:o.fetchState,isAccountingClassesEnabled:C,localData:I,newAccrualAccountsView:p,onAccrualFormChange:(u,r)=>{n(Ye({accrualId:u,localData:r}))},onAccrualFormClear:u=>{n(Ue({accrualId:u}))},onApproveAndPost:u=>{n(Ke(l,u))},onNavigateBack:c??g,onRevert:(u,r)=>{f.current=!0,n(Re(l,u,r))},onSkip:(u,r)=>{n($e(l,u,r))}})})}const ft=re.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -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 Es,fE as hs,dZ as ps,dY as xs,AS as gs,dh as Rs,c8 as js,gI as Is,g8 as Ts,de as pe,cG as As,gm as bs,cy as fs,bE as Ds,br as ys,TZ as Cs,v as vs,U0 as Os,bq as Us,U1 as Ps,bK as ws,bJ as Fs,bt as Ls,cu as ks,U2 as Vs,U3 as Hs,d9 as Ss,dc as Bs,db as Ns,cF as Ms,cM as Zs,pR as xe,gh as ge,gX as Gs,gj as Re,gK as je,gL as Ie,gk as $s}from"./zeni-epic-state-Dm2vDWXH.js";import{j as e}from"./liveblocks-DRsJ0YIJ.js";import{a as P}from"./sentry-G4ZANa8Z.js";import{N as u,u as zs,h as Ys,i as qs,g as Ws,j as G,q as Te,n as Ks,o as n}from"./core-DGLzDXWl.js";import{M as l,E as Xs,u as Js,z as y,O as Qs,e as et,B as st,c as B,g as tt,N as nt,U as at,L as F,G as Ae,t as _,P as ot,Q as rt,k as ne}from"./index-CVAekD3p.js";import"./mui-BuJ3P0FU.js";import{f as be}from"./analyticsHelper-C534_Opk.js";import{t as it}from"./getLocaleForTenant-COb4gZwj.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},f=new o.Error().stack;f&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[f]="8948c14f-9173-4fb2-9a5e-b8fba68128b6",o._sentryDebugIdIdentifier="sentry-dbid-8948c14f-9173-4fb2-9a5e-b8fba68128b6")}catch{}})();const lt=l((()=>s((()=>import("./NotFoundScreen-Due1Mflv.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),ut=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),dt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),fe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),De=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),ye=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),C=({showZeniAccountRoute:o,isUserHasBillPayAccess:f,isUserHasReimbursementAccess:N,showTreasuryRoute:i,isTenantBankingOnly:k,showChargeCardRoute:O,tenantEmailDomain:v})=>{if(k===!0){if(o)return e.jsx(De,{tenantEmailDomain:v});if(i)return e.jsx(fe,{tenantEmailDomain:v});if(O)return e.jsx(ye,{tenantEmailDomain:v})}return o?e.jsx(De,{tenantEmailDomain:v}):i?e.jsx(fe,{tenantEmailDomain:v}):O?e.jsx(ye,{tenantEmailDomain:v}):f?e.jsx(dt,{tenantEmailDomain:v}):N?e.jsx(ut,{tenantEmailDomain:v}):e.jsx(lt,{})},ct={dashboard:()=>s((()=>import("./DashboardRoutes-qEMySFwY.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-DFbBUbt3.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-C0wQD-bc.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-BIMf99Cg.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-BeIHfkyW.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-CXJSK6N5.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-DgHOOT2d.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-Qan4Ca75.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-RAM77xQ5.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-BL8oTr8q.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-CO0cgAQM.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-f8fQbApR.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]))},mt=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ae=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},_t=l((()=>s((()=>import("./ReportsRoutes-CXJSK6N5.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])))),Et=l((()=>s((()=>import("./AddressRoutes-DhHo5D0q.js")),__vite__mapDeps([58,1,2,3,26,4,5,6,7,0,8])))),ht=l((()=>s((()=>import("./PeopleRoutes-Qan4Ca75.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])))),pt=l((()=>s((()=>import("./PandLWithForecastRoutes-BFUL28rL.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,0,24,11,14,15,20,21,22,8])))),xt=l((()=>s((()=>import("./CustomerOnboardingRoutes-J_r_S5S6.js")),__vite__mapDeps([60,1,2,3,26,4,5,6,7,0,40,41,42,43,44,13,46,49,8])))),gt=l((()=>s((()=>import("./VendorsRoutes-CO0cgAQM.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,26,0,24,53,54,15,11,20,21,22,29,45,8])))),Rt=l((()=>s((()=>import("./TransactionDetailRoutes-c82zOTpF.js")),__vite__mapDeps([61,1,2,3,0,4,5,6,7,12,11,13,14,15,16,8])))),Ce=l((()=>s((()=>import("./EntityDetailRoutes-CGS2jnu9.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,13,10,11,12,14,15,16,17,8])))),jt=l((()=>s((()=>import("./DashboardRoutes-qEMySFwY.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-DFbBUbt3.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])))),It=l((()=>s((()=>import("./SettingsRoutes-BeIHfkyW.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])))),Tt=l((()=>s((()=>import("./InvoicingRoutes-BSJKEbd0.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,26,0,20,21,22,40,41,42,43,44,13,8])))),Oe=l((()=>s((()=>import("./ReimbursementRoutes-C0wQD-bc.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])))),At=l((()=>s((()=>import("./ZeniAccountRoutes-f8fQbApR.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])))),bt=l((()=>s((()=>import("./TreasuryRoutes-BL8oTr8q.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,11,14,24,8])))),ft=l((()=>s((()=>import("./TransactionListRoutes-BIMf99Cg.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,37,8])))),Dt=l((()=>s((()=>import("./ChargeCardRoutes-DgHOOT2d.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,11,20,21,22,30,28,15,0,18,14,49,26,8])))),yt=l((()=>s((()=>import("./NotificationRoutes-BMD667yj.js")),__vite__mapDeps([64,1,2,3,0,4,5,6,7,11,22,8])))),Ct=l((()=>s((()=>import("./PerformanceRoutes-BUzsJ8JT.js")),__vite__mapDeps([65,1,2,3,0,4,5,6,7,11,20,21,22,8])))),vt=l((()=>s((()=>import("./ExpenseAutomationRoutes-RAM77xQ5.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])))),Ot=l((()=>s((()=>import("./ActualMatchingMatchDetailScreen-bQpbiVso.js")),__vite__mapDeps([66,1,2,3,4,5,6,7,52,17,13,15,0,8])))),Ut=l((()=>s((()=>import("./RewardsRoutes-UOKjC0-b.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,0,8])))),Pt=l((()=>s((()=>import("./TaskRoutes-CR7LYG5S.js")),__vite__mapDeps([68,1,2,3,0,4,5,6,7,14,20,21,22,69,11,8])))),wt=l((()=>s((()=>import("./AiCfoScreen-Box0GL8P.js")),__vite__mapDeps([70,1,2,3,4,5,6,7,23,54,15,8])))),Ue=l((()=>s((()=>import("./CardsAiCfoScreen-c7VxfhZx.js")),__vite__mapDeps([71,1,2,3,4,5,6,7,8])))),b=l((()=>s((()=>import("./NotFoundScreen-Due1Mflv.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),Ft=l((()=>s((()=>import("./TaskListScreen-cpZyLi8u.js").then((o=>o.f))),__vite__mapDeps([69,1,2,3,4,5,6,7,11,20,21,22,8])))),Lt=({isDashboardAccess:o,showZeniAccountRoute:f,isUserHasBillPayAccess:N,isUserHasReimbursementAccess:i,showTreasuryRoute:k,isTenantBankingOnly:O,isTenantCardsOnly:v,showChargeCardRoute:V})=>{if(O===!0){if(f)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"}):f?e.jsx(u,{to:"checking"}):k?e.jsx(u,{to:"treasury"}):V?e.jsx(u,{to:"cards"}):N?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},Pe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`}),Gt=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:o}){const f=zs(),N=Ys(),{tenantEmailDomain:i}=qs(),k=Xs().mode,{setLoading:O,clearAllLoading:v,clearLoading:V}=Js(),D=y.getSignedInUserTenant(i)?.tenantId,I=y.getSignedInUser(),K=Es(I),$=Ws(),[L,we]=P.useState(!1),r=G((a=>hs(a))),{useFeatureGate:H}=Qs(),M=et(),X=st(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.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"?ps(oe,r):void 0,J=p==="Completed"||T==="Completed"?xs(r):void 0,re=p==="Completed"||T==="Completed"?gs(r)&&!Rs(r):void 0,Ve=tt(r,ke,oe),{isCardsHidden:He}=nt(r?.tenantId),Se=!Ve||!!He,{isFeatureEnabled:Be}=H(B.isSettingsFeatureEnabled),{isFeatureEnabled:Q}=H(B.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=H(B.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||rt==="DEV",Ze=r?.userRole!=null&&js(r.userRole),z=G((a=>Is(a)));if(i!=null){const a=y.getSignedInUserTenant(i);I!=null&&a!=null&&be(I,r,k)}const Z={tenantId:D,userId:I?.userId,sessionId:I?.zeniSessionId},ie=Ts(),h=at(),Ge=r.company==null||h?.loggedInUserRoleMap!=null&&pe(h.loggedInUserRole),$e=As(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?bs(a,Z.tenantId):void 0));P.useEffect((()=>{O(F.TENANT_FETCHING),o(i)}),[i]),P.useEffect((()=>{if(se!=null&&D!=null){const a=se.split("-");if(a.length===2){const A=fs(Number(a[0])),c=Number(a[1]),t=Ds(`01-${A<10?`0${A}`:A}-${c}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),d=ys();t.isAfter(d,"month")===!1?f(Cs(D,{month:A,year:c})):N(`/${i}/month_end_close_checks/review`)}}}),[se,i,D]),P.useEffect((()=>{L||(we(!0),O(F.TENANT_FETCHING))}),[L,Z,ie,I,f,y]),P.useLayoutEffect((()=>{!vs(ie,Z)&&y.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,A,c,t){if(ge(A?.userId,A?.zeniSessionId,a.tenantId),c(Gs(!0)),c(Re(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const d=y.getSignedInUserTenantWithId(a.tenantId);t&&Ae.updateAppLocaleID(it(t)),d?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(d?.tenantEmailDomain)}a.userId!=null?ne.identify(a.userId,{tenant_id:a.tenantId}):ne.resetUserIdentity()})(Z,I,f,Ye))}),[D]),P.useEffect((()=>{y.isSignedIn()&&(O(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,cs=c==null||c.tenantId!==t,ms=c!=null&&c.excludedResources==null,_s=c!=null&&c.externalConnections==null;if(q&&cs){S(Re(t));const W=y.getSignedInUserTenantWithId(t);W?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(W?.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&&ms&&_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),S(je(d.userId,t))),q&&_s&&_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),S(Ie(d.userId,t)));if(q){ne.identify(d.userId,{tenant_id:t});const W=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($s(d.userId,t,d.zeniSessionId))),W&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),S(xe(d.userId,d.zeniSessionId)))}})(T,p,r,D,I,O,f))}),[D,p]),P.useEffect((()=>{y.isSignedIn()&&T==="Completed"&&z.tenantsBaseInOrder.length>0&&(V(F.TENANT_FETCHING),y.saveSignedInUserTenants(Os(z.tenantsBaseInOrder)),I!=null&&be(I,r,k,void 0,z.tenantsBaseInOrder))}),[z,T,r,I]),P.useEffect((()=>{p==="In-Progress"&&O(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&D!=null?(v(),_.markActiveTenantFetchCompleted(D)):p==="Error"&&D!=null&&(_.markActiveTenantFetchFailed(D),V(F.TENANT_FETCHING),V(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,D,L]);const le=P.useRef(!1);P.useEffect((()=>{!le.current&&p==="Completed"&&L&&(le.current=!0,(function(a=mt,A=3e3){setTimeout((()=>{const c=t=>{if(t>=a.length)return;const d=a[t],Y=ct[d];Y!=null?Y().then((()=>ae((()=>c(t+1))))).catch((()=>ae((()=>c(t+1))))):c(t+1)};ae((()=>c(0)))}),A)})())}),[p,L]);const U=r?.userRole!=null&&Us(r?.userRole),{isFeatureEnabled:qe}=H(B.isReferralFeatureEnabled),{isFeatureEnabled:We}=H(B.isAccrualEnabled),Ke=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Xe=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),w=r?.userRole!=null&&pe(r.userRole),ue=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!U,de=!Se&&!U,Je=Ps(h?.loggedInUserRoleMap),Qe=r.externalConnections?.accounting[0]?.isValid,es=r.externalConnections?.fetchState==="Completed",te=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!U,me=ce&&ws(h?.loggedInUserRoleMap),_e=Fe&&!U,ss=Le&&!U,ts=ue&&Fs(h?.loggedInUserRoleMap),ns=de&&Ls(h?.loggedInUserRoleMap),as=_e&&ks(h?.loggedInUserRoleMap),os=Vs(h?.loggedInUserRoleMap),rs=Hs(h?.loggedInUserRoleMap),is=Ss(h?.loggedInUserRoleMap),ls=Bs(h?.loggedInUserRoleMap),us=Ns(h?.loggedInUserRoleMap),x=Ms(h?.loggedInUserRoleMap),g=Zs(h?.loggedInUserRoleMap),Ee=ue&&x,he=ce&&g,R=_e&&is,j=ss&&ls,m=de&&us,ds=r.excludedResources?.resources?.find((a=>a.resource==="/invites"))!=null||$e===!0||Je===!0||os===!0||rs===!0;return y.isSignedIn()?D==null?T==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(I!=null&&T!=="In-Progress"&&f(xe(I.userId,I.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||T==="Completed"?(te===!0||K&&!ee)&&es&&Qe!==!0&&E===!1&&J===!1&&re===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||re!==!0||te!==!0||ee||K?!L||te!==!1||ee||K?L&&r?.userRole&&E!=null&&J!=null&&i!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(Ks,{children:e.jsxs(n,{element:e.jsx(ot,{}),children:[e.jsx(n,{path:"/",element:e.jsx(Lt,{isDashboardAccess:w,showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,isTenantCardsOnly:J,showChargeCardRoute:m})}),e.jsx(n,{path:"dashboard/*",element:w?e.jsx(jt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reports/*",element:w?e.jsx(_t,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"people/*",element:ds||w?e.jsx(ht,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"forecast/*",element:w?e.jsx(pt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"onboarding/*",element:e.jsx(xt,{})}),e.jsx(n,{path:"transaction/*",element:w&&U===!1||Ke||Xe?e.jsx(Rt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"transactions/*",element:w&&U===!1?e.jsx(ft,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"customer/*",element:w&&U===!1?e.jsx(Ce,{entityType:"customer"}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,isTenantBankingOnly:E,showTreasuryRoute:j,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"vendor/*",element:w&&U===!1?e.jsx(Ce,{entityType:"vendor"}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"tasks",element:e.jsx(Ft,{})}),e.jsx(n,{path:"tasks/*",element:e.jsx(Pt,{})}),e.jsx(n,{path:"address/*",element:ts||me||as||ns?e.jsx(Et,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"checking/*",element:R?e.jsx(At,{}):e.jsx(b,{})}),e.jsx(n,{path:"treasury/*",element:j?e.jsx(bt,{}):e.jsx(b,{})}),e.jsx(n,{path:"performance",element:X===!0?e.jsx(Ct,{}):e.jsx(Pe,{tenantEmailDomain:i})}),e.jsx(n,{path:"month_end_close_checks/review/*",element:X===!0&&U===!1?e.jsx(vt,{}):e.jsx(Pe,{tenantEmailDomain:i})}),e.jsx(n,{path:"expense-automation/actual-matching/:matchId",element:X===!0&&U===!1&&We===!0?e.jsx(Ot,{}):e.jsx(b,{})}),e.jsx(n,{path:"notifications/*",element:e.jsx(yt,{})}),e.jsx(n,{path:"vendors/*",element:Ge?e.jsx(gt,{}):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:i})}),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:i})}),e.jsx(n,{path:"reimbursement/*",element:he?e.jsx(Oe,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursements/*",element:he?e.jsx(Oe,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"settings/*",element:Be?e.jsx(It,{hasAdminLevelAccess:me}):e.jsx(b,{})}),e.jsx(n,{path:"invoicing/*",element:Me&&Ze?e.jsx(Tt,{}):e.jsx(b,{})}),e.jsx(n,{path:"cards/ask",element:m&&M?e.jsx(Ue,{isFileUploadEnabled:Q}):e.jsx(b,{})}),e.jsx(n,{path:"cards/ask/:session_id",element:m&&M?e.jsx(Ue,{isFileUploadEnabled:Q}):e.jsx(b,{})}),e.jsx(n,{path:"cards/*",element:m?e.jsx(Dt,{}):e.jsx(b,{})}),e.jsx(n,{path:"rewards/*",element:qe?e.jsx(Ut,{}):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(wt,{isFileUploadEnabled:Q}):e.jsx(b,{})}),e.jsx(n,{path:"*",element:e.jsx(b,{})})]})}):null:(o(void 0),e.jsx(u,{to:`/${i}/onboarding`,replace:!0})):(o(void 0),e.jsx(u,{to:`/${i}/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,Gt as S};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-DVcHaqdZ.js","assets/sentry-Jm7O5sR0.js","assets/core-BwK6FGJd.js","assets/zeni-epic-state-BugXGzus.js","assets/index-DTZt8DRK.js","assets/mui-CxIkaR9n.js","assets/analytics-BTvt2K3S.js","assets/utils-BVIT21dc.js","assets/index-BhC2LNQw.css","assets/DashboardRoutes-BeQuxWvV.js","assets/withTransactionSidePanel-Cd_M2p_z.js","assets/useAskAiCfoHostNavButtonProps-DzjGv8Xy.js","assets/TransactionDetailScreen-DA_15rvE.js","assets/decodeURIComponentSafe-iAavL6tS.js","assets/useInitialThreadRequest-BWyM3F-W.js","assets/routePaths-CPqwWbPN.js","assets/expenseAutomationHelper-MxNxlZNN.js","assets/stripSplatSuffix-nQAZVh5Z.js","assets/analyticsHelper-BwLj34Ys.js","assets/CompanyPassportScreen-C_r9krre.js","assets/MobileAppDrawer-plEMRzd-.js","assets/InboxNotificationsProvider-ozJWRqdQ.js","assets/useTaskManagerAccess-DRF4urEw.js","assets/useAiCfoDashboardSuggestedQuestionsChips-C3x9GIES.js","assets/FeaturePreviewScreen-C8dKuiF7.js","assets/BillPayRoutes-B82H1r4T.js","assets/AddressScreen-tI262EI8.js","assets/DomesticWireDetailScreen-42PVSRte.js","assets/BusinessVerificationPageScreen-BLwno7qB.js","assets/DrawerScreen-DQY8vrlv.js","assets/SetupPagesScreen-DV-Hyv78.js","assets/BillPayApprovalRoutes-BG4wkb9h.js","assets/ReimbursementApprovalRuleDetailScreen-NYDKW5M_.js","assets/getLocaleForTenant-DzgzmDle.js","assets/ReimbursementRoutes-B4vB3DWh.js","assets/ReimbursementApprovalRoutes-B2dZhJk9.js","assets/TransactionListRoutes-DUel89dv.js","assets/ZeniAccountStatementScreen-CuxmtWXH.js","assets/SettingsRoutes-DIXSeHUD.js","assets/AccountMappingScreen-MfXsPj8M.js","assets/QBOConnectionScreen-CqIFgusE.js","assets/empty-CTWnX7jn.js","assets/index-SQoDfHg2.js","assets/url-D9zjpdeS.js","assets/index-D2_EUTG6.js","assets/accountMappingHelper-CQrmB6jj.js","assets/useEmailConnectResultRefresh-CCE7kCjs.js","assets/ReportsRoutes-QNTHdw6g.js","assets/ChargeCardRoutes-CMUVGkhr.js","assets/useChargeCardPusherEvents-aPfygpSV.js","assets/PeopleRoutes-CzBniqLj.js","assets/ExpenseAutomationRoutes-CurjmTHm.js","assets/useActualMatchingMatchDetail-Asb0lSO5.js","assets/ScheduleDetailsPrepaidExpensesScreen-YdcDOaAu.js","assets/pathToGoBack-QMp9zrtx.js","assets/TreasuryRoutes-DNsqL_xe.js","assets/VendorsRoutes-DENWe8ir.js","assets/ZeniAccountRoutes-BzmSgvJI.js","assets/AddressRoutes-CQjpNxne.js","assets/PandLWithForecastRoutes-4dzVDYi7.js","assets/CustomerOnboardingRoutes-CbzfyCjZ.js","assets/TransactionDetailRoutes-CGamazG6.js","assets/EntityDetailRoutes-Br-C_K-o.js","assets/InvoicingRoutes-B_3tGcpp.js","assets/NotificationRoutes-DporIbci.js","assets/PerformanceRoutes-DQVFxHI8.js","assets/ActualMatchingMatchDetailScreen-DPtLhEgD.js","assets/RewardsRoutes-B7P2nmYk.js","assets/TaskRoutes-DNWDTIHG.js","assets/TaskListScreen-CbiI2IGU.js","assets/AiCfoScreen-DMyEpPj8.js","assets/CardsAiCfoScreen-BJxdbSYR.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as s,bn as Es,fE as hs,dZ as ps,dY as xs,AS as gs,dh as Rs,c8 as js,gI as Is,g8 as Ts,de as pe,cG as As,gm as bs,cy as fs,bE as Ds,br as ys,TZ as Cs,v as vs,U0 as Os,bq as Us,U1 as Ps,bK as ws,bJ as Fs,bt as Ls,cu as ks,U2 as Vs,U3 as Hs,d9 as Ss,dc as Bs,db as Ns,cF as Ms,cM as Zs,pR as xe,gh as ge,gX as Gs,gj as Re,gK as je,gL as Ie,gk as $s}from"./zeni-epic-state-BugXGzus.js";import{j as e}from"./liveblocks-y3zMPGKB.js";import{a as P}from"./sentry-Jm7O5sR0.js";import{N as u,u as zs,h as Ys,i as qs,g as Ws,j as G,q as Te,n as Ks,o as n}from"./core-BwK6FGJd.js";import{M as l,E as Xs,u as Js,z as y,O as Qs,e as et,B as st,c as B,g as tt,N as nt,U as at,L as F,G as Ae,t as _,P as ot,Q as rt,k as ne}from"./index-DTZt8DRK.js";import"./mui-CxIkaR9n.js";import{f as be}from"./analyticsHelper-BwLj34Ys.js";import{t as it}from"./getLocaleForTenant-DzgzmDle.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},f=new o.Error().stack;f&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[f]="8948c14f-9173-4fb2-9a5e-b8fba68128b6",o._sentryDebugIdIdentifier="sentry-dbid-8948c14f-9173-4fb2-9a5e-b8fba68128b6")}catch{}})();const lt=l((()=>s((()=>import("./NotFoundScreen-DVcHaqdZ.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),ut=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),dt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),fe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),De=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),ye=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),C=({showZeniAccountRoute:o,isUserHasBillPayAccess:f,isUserHasReimbursementAccess:N,showTreasuryRoute:i,isTenantBankingOnly:k,showChargeCardRoute:O,tenantEmailDomain:v})=>{if(k===!0){if(o)return e.jsx(De,{tenantEmailDomain:v});if(i)return e.jsx(fe,{tenantEmailDomain:v});if(O)return e.jsx(ye,{tenantEmailDomain:v})}return o?e.jsx(De,{tenantEmailDomain:v}):i?e.jsx(fe,{tenantEmailDomain:v}):O?e.jsx(ye,{tenantEmailDomain:v}):f?e.jsx(dt,{tenantEmailDomain:v}):N?e.jsx(ut,{tenantEmailDomain:v}):e.jsx(lt,{})},ct={dashboard:()=>s((()=>import("./DashboardRoutes-BeQuxWvV.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-B82H1r4T.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-B4vB3DWh.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-DUel89dv.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-DIXSeHUD.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-QNTHdw6g.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-CMUVGkhr.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-CzBniqLj.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-CurjmTHm.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-DNsqL_xe.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-DENWe8ir.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-BzmSgvJI.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]))},mt=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ae=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},_t=l((()=>s((()=>import("./ReportsRoutes-QNTHdw6g.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])))),Et=l((()=>s((()=>import("./AddressRoutes-CQjpNxne.js")),__vite__mapDeps([58,1,2,3,26,4,5,6,7,0,8])))),ht=l((()=>s((()=>import("./PeopleRoutes-CzBniqLj.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])))),pt=l((()=>s((()=>import("./PandLWithForecastRoutes-4dzVDYi7.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,0,24,11,14,15,20,21,22,8])))),xt=l((()=>s((()=>import("./CustomerOnboardingRoutes-CbzfyCjZ.js")),__vite__mapDeps([60,1,2,3,26,4,5,6,7,0,40,41,42,43,44,13,46,49,8])))),gt=l((()=>s((()=>import("./VendorsRoutes-DENWe8ir.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,26,0,24,53,54,15,11,20,21,22,29,45,8])))),Rt=l((()=>s((()=>import("./TransactionDetailRoutes-CGamazG6.js")),__vite__mapDeps([61,1,2,3,0,4,5,6,7,12,11,13,14,15,16,8])))),Ce=l((()=>s((()=>import("./EntityDetailRoutes-Br-C_K-o.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,13,10,11,12,14,15,16,17,8])))),jt=l((()=>s((()=>import("./DashboardRoutes-BeQuxWvV.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-B82H1r4T.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])))),It=l((()=>s((()=>import("./SettingsRoutes-DIXSeHUD.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])))),Tt=l((()=>s((()=>import("./InvoicingRoutes-B_3tGcpp.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,26,0,20,21,22,40,41,42,43,44,13,8])))),Oe=l((()=>s((()=>import("./ReimbursementRoutes-B4vB3DWh.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])))),At=l((()=>s((()=>import("./ZeniAccountRoutes-BzmSgvJI.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])))),bt=l((()=>s((()=>import("./TreasuryRoutes-DNsqL_xe.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,11,14,24,8])))),ft=l((()=>s((()=>import("./TransactionListRoutes-DUel89dv.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,37,8])))),Dt=l((()=>s((()=>import("./ChargeCardRoutes-CMUVGkhr.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,11,20,21,22,30,28,15,0,18,14,49,26,8])))),yt=l((()=>s((()=>import("./NotificationRoutes-DporIbci.js")),__vite__mapDeps([64,1,2,3,0,4,5,6,7,11,22,8])))),Ct=l((()=>s((()=>import("./PerformanceRoutes-DQVFxHI8.js")),__vite__mapDeps([65,1,2,3,0,4,5,6,7,11,20,21,22,8])))),vt=l((()=>s((()=>import("./ExpenseAutomationRoutes-CurjmTHm.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])))),Ot=l((()=>s((()=>import("./ActualMatchingMatchDetailScreen-DPtLhEgD.js")),__vite__mapDeps([66,1,2,3,4,5,6,7,52,17,13,15,0,8])))),Ut=l((()=>s((()=>import("./RewardsRoutes-B7P2nmYk.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,0,8])))),Pt=l((()=>s((()=>import("./TaskRoutes-DNWDTIHG.js")),__vite__mapDeps([68,1,2,3,0,4,5,6,7,14,20,21,22,69,11,8])))),wt=l((()=>s((()=>import("./AiCfoScreen-DMyEpPj8.js")),__vite__mapDeps([70,1,2,3,4,5,6,7,23,54,15,8])))),Ue=l((()=>s((()=>import("./CardsAiCfoScreen-BJxdbSYR.js")),__vite__mapDeps([71,1,2,3,4,5,6,7,8])))),b=l((()=>s((()=>import("./NotFoundScreen-DVcHaqdZ.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),Ft=l((()=>s((()=>import("./TaskListScreen-CbiI2IGU.js").then((o=>o.f))),__vite__mapDeps([69,1,2,3,4,5,6,7,11,20,21,22,8])))),Lt=({isDashboardAccess:o,showZeniAccountRoute:f,isUserHasBillPayAccess:N,isUserHasReimbursementAccess:i,showTreasuryRoute:k,isTenantBankingOnly:O,isTenantCardsOnly:v,showChargeCardRoute:V})=>{if(O===!0){if(f)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"}):f?e.jsx(u,{to:"checking"}):k?e.jsx(u,{to:"treasury"}):V?e.jsx(u,{to:"cards"}):N?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},Pe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`}),Gt=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:o}){const f=zs(),N=Ys(),{tenantEmailDomain:i}=qs(),k=Xs().mode,{setLoading:O,clearAllLoading:v,clearLoading:V}=Js(),D=y.getSignedInUserTenant(i)?.tenantId,I=y.getSignedInUser(),K=Es(I),$=Ws(),[L,we]=P.useState(!1),r=G((a=>hs(a))),{useFeatureGate:H}=Qs(),M=et(),X=st(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.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"?ps(oe,r):void 0,J=p==="Completed"||T==="Completed"?xs(r):void 0,re=p==="Completed"||T==="Completed"?gs(r)&&!Rs(r):void 0,Ve=tt(r,ke,oe),{isCardsHidden:He}=nt(r?.tenantId),Se=!Ve||!!He,{isFeatureEnabled:Be}=H(B.isSettingsFeatureEnabled),{isFeatureEnabled:Q}=H(B.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=H(B.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||rt==="DEV",Ze=r?.userRole!=null&&js(r.userRole),z=G((a=>Is(a)));if(i!=null){const a=y.getSignedInUserTenant(i);I!=null&&a!=null&&be(I,r,k)}const Z={tenantId:D,userId:I?.userId,sessionId:I?.zeniSessionId},ie=Ts(),h=at(),Ge=r.company==null||h?.loggedInUserRoleMap!=null&&pe(h.loggedInUserRole),$e=As(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?bs(a,Z.tenantId):void 0));P.useEffect((()=>{O(F.TENANT_FETCHING),o(i)}),[i]),P.useEffect((()=>{if(se!=null&&D!=null){const a=se.split("-");if(a.length===2){const A=fs(Number(a[0])),c=Number(a[1]),t=Ds(`01-${A<10?`0${A}`:A}-${c}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),d=ys();t.isAfter(d,"month")===!1?f(Cs(D,{month:A,year:c})):N(`/${i}/month_end_close_checks/review`)}}}),[se,i,D]),P.useEffect((()=>{L||(we(!0),O(F.TENANT_FETCHING))}),[L,Z,ie,I,f,y]),P.useLayoutEffect((()=>{!vs(ie,Z)&&y.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,A,c,t){if(ge(A?.userId,A?.zeniSessionId,a.tenantId),c(Gs(!0)),c(Re(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const d=y.getSignedInUserTenantWithId(a.tenantId);t&&Ae.updateAppLocaleID(it(t)),d?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(d?.tenantEmailDomain)}a.userId!=null?ne.identify(a.userId,{tenant_id:a.tenantId}):ne.resetUserIdentity()})(Z,I,f,Ye))}),[D]),P.useEffect((()=>{y.isSignedIn()&&(O(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,cs=c==null||c.tenantId!==t,ms=c!=null&&c.excludedResources==null,_s=c!=null&&c.externalConnections==null;if(q&&cs){S(Re(t));const W=y.getSignedInUserTenantWithId(t);W?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(W?.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&&ms&&_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),S(je(d.userId,t))),q&&_s&&_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),S(Ie(d.userId,t)));if(q){ne.identify(d.userId,{tenant_id:t});const W=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($s(d.userId,t,d.zeniSessionId))),W&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),S(xe(d.userId,d.zeniSessionId)))}})(T,p,r,D,I,O,f))}),[D,p]),P.useEffect((()=>{y.isSignedIn()&&T==="Completed"&&z.tenantsBaseInOrder.length>0&&(V(F.TENANT_FETCHING),y.saveSignedInUserTenants(Os(z.tenantsBaseInOrder)),I!=null&&be(I,r,k,void 0,z.tenantsBaseInOrder))}),[z,T,r,I]),P.useEffect((()=>{p==="In-Progress"&&O(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&D!=null?(v(),_.markActiveTenantFetchCompleted(D)):p==="Error"&&D!=null&&(_.markActiveTenantFetchFailed(D),V(F.TENANT_FETCHING),V(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,D,L]);const le=P.useRef(!1);P.useEffect((()=>{!le.current&&p==="Completed"&&L&&(le.current=!0,(function(a=mt,A=3e3){setTimeout((()=>{const c=t=>{if(t>=a.length)return;const d=a[t],Y=ct[d];Y!=null?Y().then((()=>ae((()=>c(t+1))))).catch((()=>ae((()=>c(t+1))))):c(t+1)};ae((()=>c(0)))}),A)})())}),[p,L]);const U=r?.userRole!=null&&Us(r?.userRole),{isFeatureEnabled:qe}=H(B.isReferralFeatureEnabled),{isFeatureEnabled:We}=H(B.isAccrualEnabled),Ke=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Xe=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),w=r?.userRole!=null&&pe(r.userRole),ue=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!U,de=!Se&&!U,Je=Ps(h?.loggedInUserRoleMap),Qe=r.externalConnections?.accounting[0]?.isValid,es=r.externalConnections?.fetchState==="Completed",te=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!U,me=ce&&ws(h?.loggedInUserRoleMap),_e=Fe&&!U,ss=Le&&!U,ts=ue&&Fs(h?.loggedInUserRoleMap),ns=de&&Ls(h?.loggedInUserRoleMap),as=_e&&ks(h?.loggedInUserRoleMap),os=Vs(h?.loggedInUserRoleMap),rs=Hs(h?.loggedInUserRoleMap),is=Ss(h?.loggedInUserRoleMap),ls=Bs(h?.loggedInUserRoleMap),us=Ns(h?.loggedInUserRoleMap),x=Ms(h?.loggedInUserRoleMap),g=Zs(h?.loggedInUserRoleMap),Ee=ue&&x,he=ce&&g,R=_e&&is,j=ss&&ls,m=de&&us,ds=r.excludedResources?.resources?.find((a=>a.resource==="/invites"))!=null||$e===!0||Je===!0||os===!0||rs===!0;return y.isSignedIn()?D==null?T==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(I!=null&&T!=="In-Progress"&&f(xe(I.userId,I.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||T==="Completed"?(te===!0||K&&!ee)&&es&&Qe!==!0&&E===!1&&J===!1&&re===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||re!==!0||te!==!0||ee||K?!L||te!==!1||ee||K?L&&r?.userRole&&E!=null&&J!=null&&i!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(Ks,{children:e.jsxs(n,{element:e.jsx(ot,{}),children:[e.jsx(n,{path:"/",element:e.jsx(Lt,{isDashboardAccess:w,showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,isTenantCardsOnly:J,showChargeCardRoute:m})}),e.jsx(n,{path:"dashboard/*",element:w?e.jsx(jt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reports/*",element:w?e.jsx(_t,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"people/*",element:ds||w?e.jsx(ht,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"forecast/*",element:w?e.jsx(pt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"onboarding/*",element:e.jsx(xt,{})}),e.jsx(n,{path:"transaction/*",element:w&&U===!1||Ke||Xe?e.jsx(Rt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"transactions/*",element:w&&U===!1?e.jsx(ft,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"customer/*",element:w&&U===!1?e.jsx(Ce,{entityType:"customer"}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,isTenantBankingOnly:E,showTreasuryRoute:j,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"vendor/*",element:w&&U===!1?e.jsx(Ce,{entityType:"vendor"}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"tasks",element:e.jsx(Ft,{})}),e.jsx(n,{path:"tasks/*",element:e.jsx(Pt,{})}),e.jsx(n,{path:"address/*",element:ts||me||as||ns?e.jsx(Et,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"checking/*",element:R?e.jsx(At,{}):e.jsx(b,{})}),e.jsx(n,{path:"treasury/*",element:j?e.jsx(bt,{}):e.jsx(b,{})}),e.jsx(n,{path:"performance",element:X===!0?e.jsx(Ct,{}):e.jsx(Pe,{tenantEmailDomain:i})}),e.jsx(n,{path:"month_end_close_checks/review/*",element:X===!0&&U===!1?e.jsx(vt,{}):e.jsx(Pe,{tenantEmailDomain:i})}),e.jsx(n,{path:"expense-automation/actual-matching/:matchId",element:X===!0&&U===!1&&We===!0?e.jsx(Ot,{}):e.jsx(b,{})}),e.jsx(n,{path:"notifications/*",element:e.jsx(yt,{})}),e.jsx(n,{path:"vendors/*",element:Ge?e.jsx(gt,{}):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:i})}),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:i})}),e.jsx(n,{path:"reimbursement/*",element:he?e.jsx(Oe,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursements/*",element:he?e.jsx(Oe,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"settings/*",element:Be?e.jsx(It,{hasAdminLevelAccess:me}):e.jsx(b,{})}),e.jsx(n,{path:"invoicing/*",element:Me&&Ze?e.jsx(Tt,{}):e.jsx(b,{})}),e.jsx(n,{path:"cards/ask",element:m&&M?e.jsx(Ue,{isFileUploadEnabled:Q}):e.jsx(b,{})}),e.jsx(n,{path:"cards/ask/:session_id",element:m&&M?e.jsx(Ue,{isFileUploadEnabled:Q}):e.jsx(b,{})}),e.jsx(n,{path:"cards/*",element:m?e.jsx(Dt,{}):e.jsx(b,{})}),e.jsx(n,{path:"rewards/*",element:qe?e.jsx(Ut,{}):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(wt,{isFileUploadEnabled:Q}):e.jsx(b,{})}),e.jsx(n,{path:"*",element:e.jsx(b,{})})]})}):null:(o(void 0),e.jsx(u,{to:`/${i}/onboarding`,replace:!0})):(o(void 0),e.jsx(u,{to:`/${i}/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,Gt as S};
|