@zeniai/web-app-ui 5.4.22-dev → 5.4.22-qa

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.
Files changed (74) hide show
  1. package/dist/assets/{AccountMappingScreen-C5mOiJ2U.js → AccountMappingScreen-CqBmv3P0.js} +1 -1
  2. package/dist/assets/{ActualMatchingMatchDetailScreen-wHD8fSWU.js → ActualMatchingMatchDetailScreen-C18ULFui.js} +1 -1
  3. package/dist/assets/{AddressRoutes-CVWN9CJv.js → AddressRoutes-DcrBeuZZ.js} +1 -1
  4. package/dist/assets/{AddressScreen-DgUwrml_.js → AddressScreen-BVizi07H.js} +1 -1
  5. package/dist/assets/{AiCfoScreen-yDQ2sphg.js → AiCfoScreen-DocFe0IU.js} +1 -1
  6. package/dist/assets/{AppDrawer-DzYZBC2G.js → AppDrawer-MZfZEsF3.js} +1 -1
  7. package/dist/assets/{BillPayApprovalRoutes-BcCgse3-.js → BillPayApprovalRoutes-C0prBF5m.js} +1 -1
  8. package/dist/assets/{BillPayRoutes-HAS0-pNc.js → BillPayRoutes-B0bTM1N1.js} +1 -1
  9. package/dist/assets/{BusinessVerificationPageScreen-DM_jBIuD.js → BusinessVerificationPageScreen-CdT5YCya.js} +1 -1
  10. package/dist/assets/{CardsAiCfoScreen-yrI2CL7M.js → CardsAiCfoScreen-mC2dN25g.js} +1 -1
  11. package/dist/assets/{ChargeCardRoutes-DgtmFgR6.js → ChargeCardRoutes-snm4_qnH.js} +1 -1
  12. package/dist/assets/{CompanyPassportScreen-BLtXgkEd.js → CompanyPassportScreen-CC7A9ebT.js} +1 -1
  13. package/dist/assets/{ConnectionAuthScreen-CuZmfRIp.js → ConnectionAuthScreen-DyBecMUz.js} +1 -1
  14. package/dist/assets/{CustomerOnboardingAuthScreen-BjmJLllh.js → CustomerOnboardingAuthScreen-CzPQ6hPn.js} +1 -1
  15. package/dist/assets/{CustomerOnboardingRoutes-C0b805o-.js → CustomerOnboardingRoutes-Fqi_xQ8j.js} +1 -1
  16. package/dist/assets/{CustomersRoutes-DD5Gx1mW.js → CustomersRoutes-DHtFoA_j.js} +1 -1
  17. package/dist/assets/{DashboardRoutes-C8RZkkYj.js → DashboardRoutes-DIfQCdfV.js} +1 -1
  18. package/dist/assets/{DefaultTenantHome-C6Ygdgwt.js → DefaultTenantHome-BXHCzE_E.js} +1 -1
  19. package/dist/assets/{DomesticWireDetailScreen-BxClNf2J.js → DomesticWireDetailScreen-pNAj50PJ.js} +1 -1
  20. package/dist/assets/{DrawerScreen-BHaectiO.js → DrawerScreen-Ba5DQb-t.js} +1 -1
  21. package/dist/assets/{EntityDetailRoutes-BJzuW7dq.js → EntityDetailRoutes-CRmd3CZq.js} +1 -1
  22. package/dist/assets/{ExpenseAutomationRoutes-BKrWZyYV.js → ExpenseAutomationRoutes-CqjUPpuq.js} +1 -1
  23. package/dist/assets/{FallBackRoute-DuMHkNqk.js → FallBackRoute-Ba8DnNt0.js} +2 -2
  24. package/dist/assets/{FeaturePreviewScreen-DHt0WFS8.js → FeaturePreviewScreen-C15dgqam.js} +1 -1
  25. package/dist/assets/{HubSpotOAuthCallbackScreen-Di0pbhHE.js → HubSpotOAuthCallbackScreen-Bj536BjH.js} +1 -1
  26. package/dist/assets/{InvoicingRoutes-Bsq4ym98.js → InvoicingRoutes-BjTaT2Ks.js} +1 -1
  27. package/dist/assets/{MagicLinkRoutes-DJX5Nm1n.js → MagicLinkRoutes-DzWLI6xy.js} +1 -1
  28. package/dist/assets/{MagicLinkSignInScreen-CD7Pya_j.js → MagicLinkSignInScreen-IWCCJ9ka.js} +1 -1
  29. package/dist/assets/{MobileAppDrawer-BWNb5zLN.js → MobileAppDrawer-CCAbxLE2.js} +1 -1
  30. package/dist/assets/{NotFoundScreen-DXy-BCit.js → NotFoundScreen-uAMK84U0.js} +1 -1
  31. package/dist/assets/{NotificationRoutes-B2xHVaqf.js → NotificationRoutes-k2xOmZgN.js} +1 -1
  32. package/dist/assets/{OAuthConsentScreen-BA2eBLib.js → OAuthConsentScreen-C_U40gXc.js} +1 -1
  33. package/dist/assets/{PandLWithForecastRoutes-Dm5Vnr71.js → PandLWithForecastRoutes-CWaWZqMn.js} +1 -1
  34. package/dist/assets/{PaymentLinkScreen-CndVAq3p.js → PaymentLinkScreen-BSjOZXP5.js} +1 -1
  35. package/dist/assets/{PeopleRoutes-kralZgbz.js → PeopleRoutes-CGvU4cdC.js} +1 -1
  36. package/dist/assets/{PerformanceRoutes-DJhuo9qY.js → PerformanceRoutes-DBkwWedw.js} +1 -1
  37. package/dist/assets/{QBOConnectionScreen-DroXrkno.js → QBOConnectionScreen-BcfAhM15.js} +1 -1
  38. package/dist/assets/{ReimbursementApprovalRoutes-B2ftFL0O.js → ReimbursementApprovalRoutes-CujO88Gv.js} +1 -1
  39. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-CHTcY28V.js → ReimbursementApprovalRuleDetailScreen-CHtkyq9-.js} +1 -1
  40. package/dist/assets/{ReimbursementRoutes-CI3m7PHD.js → ReimbursementRoutes-Df3Aw7DR.js} +1 -1
  41. package/dist/assets/{ReportsRoutes-C7A0Ycu_.js → ReportsRoutes-Ul2BNSj_.js} +1 -1
  42. package/dist/assets/{RewardsRoutes-Dkg4zGB8.js → RewardsRoutes-BdM-p5F5.js} +1 -1
  43. package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-ZwdXW6K5.js → ScheduleDetailsPrepaidExpensesScreen-7Oe1wEIe.js} +1 -1
  44. package/dist/assets/{ScreenRoutes-B_WT7FAm.js → ScreenRoutes-2L_gx3e5.js} +2 -2
  45. package/dist/assets/{SettingsRoutes-_XBnyBgG.js → SettingsRoutes-CfzdYXCx.js} +1 -1
  46. package/dist/assets/{SetupPagesScreen-D6ssIWb0.js → SetupPagesScreen-DRxKoFqN.js} +1 -1
  47. package/dist/assets/{SignInScreen-H_SOl_FQ.js → SignInScreen-FEFXu8DO.js} +1 -1
  48. package/dist/assets/{SignOutScreen-OFswrnt8.js → SignOutScreen-Cj5aMtR8.js} +1 -1
  49. package/dist/assets/{TaskListScreen-Bmj5V_dR.js → TaskListScreen-CE88Gj9z.js} +1 -1
  50. package/dist/assets/{TaskRoutes-D6cEqDZN.js → TaskRoutes-C4KiUyaQ.js} +1 -1
  51. package/dist/assets/{TransactionDetailRoutes-D-b6zdg4.js → TransactionDetailRoutes-DU02DHgR.js} +1 -1
  52. package/dist/assets/{TransactionDetailScreen-JBKbtouq.js → TransactionDetailScreen-DjsUNuX8.js} +1 -1
  53. package/dist/assets/{TransactionListRoutes-THtfycHC.js → TransactionListRoutes-DouUxWQV.js} +1 -1
  54. package/dist/assets/{TreasuryRoutes-CgHwdyKd.js → TreasuryRoutes-B34-6WTm.js} +1 -1
  55. package/dist/assets/{VendorsRoutes-jETcYESc.js → VendorsRoutes-l3RUFxeF.js} +1 -1
  56. package/dist/assets/{WiseConfirmationScreen-BpRHCykr.js → WiseConfirmationScreen-CaYZ0YWP.js} +1 -1
  57. package/dist/assets/{ZeniAccountRoutes-C8cr5UMy.js → ZeniAccountRoutes-D866CG7l.js} +1 -1
  58. package/dist/assets/{ZeniAccountStatementScreen-DAs1_LIC.js → ZeniAccountStatementScreen-DcZ-Zp7O.js} +1 -1
  59. package/dist/assets/{analyticsHelper-CWMk7_rd.js → analyticsHelper-CVZpPd-a.js} +1 -1
  60. package/dist/assets/{getLocaleForTenant-B8EqveGi.js → getLocaleForTenant-dn31VMO2.js} +1 -1
  61. package/dist/assets/{index-CnIO6_IQ.js → index-DtThPd2q.js} +6 -6
  62. package/dist/assets/{routePaths-CV12X_S-.js → routePaths-DXYV831_.js} +1 -1
  63. package/dist/assets/{useActualMatchingMatchDetail-D-Ym3wTm.js → useActualMatchingMatchDetail-D9tjidmB.js} +1 -1
  64. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-Dqg5VVaq.js → useAiCfoDashboardSuggestedQuestionsChips-piDOTVXb.js} +1 -1
  65. package/dist/assets/{useAskAiCfoHostNavButtonProps-DXFswt7R.js → useAskAiCfoHostNavButtonProps-DSKusWDa.js} +1 -1
  66. package/dist/assets/{useChargeCardPusherEvents-Cq6Y4mMW.js → useChargeCardPusherEvents-fpHDIIMx.js} +1 -1
  67. package/dist/assets/{useEmailConnectResultRefresh-qgk6N8cm.js → useEmailConnectResultRefresh-DAA2Py_6.js} +1 -1
  68. package/dist/assets/{useInitialThreadRequest-DAUsQlCl.js → useInitialThreadRequest-DrEeSZz_.js} +1 -1
  69. package/dist/assets/{useIsCustomersTabEnabled-C6mkabn2.js → useIsCustomersTabEnabled-C9FFBZXp.js} +1 -1
  70. package/dist/assets/{useTaskManagerAccess-Cm5trA3i.js → useTaskManagerAccess-CT25hqtF.js} +1 -1
  71. package/dist/assets/{useTaskManagerPusherEvents-C1gzc-aA.js → useTaskManagerPusherEvents-DKQsgy5z.js} +1 -1
  72. package/dist/assets/{withTransactionSidePanel-D-hDwbdr.js → withTransactionSidePanel-Dbd91mHL.js} +1 -1
  73. package/dist/index.html +1 -1
  74. package/package.json +1 -1
@@ -1 +1 @@
1
- import{j as n}from"./liveblocks-BLpmr1Pv.js";import{h as W,u as Y,g as z,i as J,j as d,l as Q,n as Z,o as C}from"./core-CbdTrw7T.js";import{fJ as v,AY as R,vB as H,a2b as w,vw as T,bp as K,e0 as X,vx as ee,a2c as ae,Zk as S,ej as te,EQ as se,a2d as oe,Fd as re,er as ne,eq as ce}from"./zeni-epic-state-C5DO1jkr.js";import{az as ie,z as le,aC as de,al as me,V as fe,a9 as pe,c as M,dl as ue,s as he,p as Fe,_ as ge}from"./index-CnIO6_IQ.js";import"./mui-DNGY4bFU.js";import Ie from"./NotFoundScreen-DXy-BCit.js";import{F as be}from"./FeaturePreviewScreen-DHt0WFS8.js";import{a as F}from"./sentry-DWNq3t8E.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-DXFswt7R.js";import{u as Se}from"./useInitialThreadRequest-DAUsQlCl.js";import{a as Te}from"./routePaths-CV12X_S-.js";import{M as ye}from"./MobileAppDrawer-BWNb5zLN.js";import"./recharts-CTh_JhT_.js";import"./analytics-Vgn85Ur_.js";import"./plaid-DhfTjhua.js";import"./dnd-DuiAlI7w.js";import"./stripe-cKAAJElX.js";import"./lottie-Lb1ftKY1.js";import"./lexical-B-vxEaRQ.js";import"./pdf-B1uD4Ovv.js";import"./utils-CrhrpmD8.js";import"./InboxNotificationsProvider-CiKEEv6Q.js";import"./useTaskManagerAccess-Cm5trA3i.js";import"./useIsCustomersTabEnabled-C6mkabn2.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]="31a23546-6552-45d2-9302-9354a56aeb45",s._sentryDebugIdIdentifier="sentry-dbid-31a23546-6552-45d2-9302-9354a56aeb45")}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})}},Ae=Q((function(s){const e=ae(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:M}}),(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(re(a))},onForecastVsActualsCompareToggle:a=>{s(oe(a)),s(S({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(se(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=te(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=Te(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),m=he(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("../../")}}}))(ue);function U(){const s=ie(),e=W(),a=Y(),o=z(),{forecastId:r,tenantEmailDomain:c}=J(),[p,u]=F.useState(!1),[m,A]=F.useState(!1),g=le.getSignedInUser(),x=d((t=>v(t))),_=x.company?.companyInfo.firstMonthOfFY??1,i=d((t=>R(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),D=d((t=>t.profitAndLossState)),j=d((t=>t.reportUIOptionsState.selectedForecast)),k=t=>D.pandLByForecastID[t]!=null&&ee(t,D).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:I}=de();me({isDataReady:l});const{isAiCfoAccessEnabled:B,onAskAiCfoClick:N}=Ce({mobileExploreReferrer:"Forecast"});F.useEffect((()=>{if(!p&&I)u(!0),l||a(H());else if(l&&!m){A(!0);const t=((f,E,O)=>E!=null?f.forecasts.findIndex((b=>b.id===E)):O!=null?f.forecasts.findIndex((b=>b.id===O)):f.forecasts.length>0?0:-1)(i,r,j?.id);t===-1&&r!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=j?.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)&&I&&a(T(i.forecasts[t].id))}}),[p,u,a,l,i,m,A,R,T,I]);const L=fe(),$=L?.loggedInUserRole!=null&&K(L.loggedInUserRole),q=Se(x?.companyId,{clearParams:l&&m}),[G,V]=F.useState(!1),h=new URL(s("forecast_pandl"));h.searchParams.set("firstname",g?.firstName??""),h.searchParams.set("lastname",g?.lastName??""),h.searchParams.set("email",g?.userEmail??"");const P=t=>{V(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(pe,{analytics:M,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:G,handleDrawerToggle:P}),n.jsx(Ae,{firstMonthOfFY:_,tenantEmailDomain:c,forecastIdFromUrlPath:r,navigate:e,location:o,isPandLReportFetched:k,meetingUrl:X(h.toString()),hasTransactionAccess:$,isAiCfoAccessEnabled:B,onAskAiCfoClick:N,initialOpenThreadRequest:q,onClickMenuIcon:()=>{P(!0)}})]})}function Qe(){const s=d((c=>v(c))),{useFeatureGate:e}=Fe(),{isFeatureEnabled:a}=e(ge.isDebitCardFeatureEnabled),o=ne(a,s),r=ce(s);return o===!0||r===!0?n.jsx(be,{}):n.jsxs(Z,{children:[n.jsx(C,{path:"/",element:n.jsx(U,{})}),n.jsx(C,{path:"/:forecastId",element:n.jsx(U,{})}),n.jsx(C,{path:"/:forecastId/*",element:n.jsx(Ie,{})})]})}export{Qe as default};
1
+ import{j as n}from"./liveblocks-BLpmr1Pv.js";import{h as W,u as Y,g as z,i as J,j as d,l as Q,n as Z,o as C}from"./core-CbdTrw7T.js";import{fJ as v,AY as R,vB as H,a2b as w,vw as T,bp as K,e0 as X,vx as ee,a2c as ae,Zk as S,ej as te,EQ as se,a2d as oe,Fd as re,er as ne,eq as ce}from"./zeni-epic-state-C5DO1jkr.js";import{az as ie,z as le,aC as de,al as me,V as fe,a9 as pe,c as M,dl as ue,s as he,p as Fe,_ as ge}from"./index-DtThPd2q.js";import"./mui-DNGY4bFU.js";import Ie from"./NotFoundScreen-uAMK84U0.js";import{F as be}from"./FeaturePreviewScreen-C15dgqam.js";import{a as F}from"./sentry-DWNq3t8E.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-DSKusWDa.js";import{u as Se}from"./useInitialThreadRequest-DrEeSZz_.js";import{a as Te}from"./routePaths-DXYV831_.js";import{M as ye}from"./MobileAppDrawer-CCAbxLE2.js";import"./recharts-CTh_JhT_.js";import"./analytics-Vgn85Ur_.js";import"./plaid-DhfTjhua.js";import"./dnd-DuiAlI7w.js";import"./stripe-cKAAJElX.js";import"./lottie-Lb1ftKY1.js";import"./lexical-B-vxEaRQ.js";import"./pdf-B1uD4Ovv.js";import"./utils-CrhrpmD8.js";import"./InboxNotificationsProvider-CiKEEv6Q.js";import"./useTaskManagerAccess-CT25hqtF.js";import"./useIsCustomersTabEnabled-C9FFBZXp.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]="31a23546-6552-45d2-9302-9354a56aeb45",s._sentryDebugIdIdentifier="sentry-dbid-31a23546-6552-45d2-9302-9354a56aeb45")}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})}},Ae=Q((function(s){const e=ae(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:M}}),(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(re(a))},onForecastVsActualsCompareToggle:a=>{s(oe(a)),s(S({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(se(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=te(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=Te(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),m=he(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("../../")}}}))(ue);function U(){const s=ie(),e=W(),a=Y(),o=z(),{forecastId:r,tenantEmailDomain:c}=J(),[p,u]=F.useState(!1),[m,A]=F.useState(!1),g=le.getSignedInUser(),x=d((t=>v(t))),_=x.company?.companyInfo.firstMonthOfFY??1,i=d((t=>R(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),D=d((t=>t.profitAndLossState)),j=d((t=>t.reportUIOptionsState.selectedForecast)),k=t=>D.pandLByForecastID[t]!=null&&ee(t,D).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:I}=de();me({isDataReady:l});const{isAiCfoAccessEnabled:B,onAskAiCfoClick:N}=Ce({mobileExploreReferrer:"Forecast"});F.useEffect((()=>{if(!p&&I)u(!0),l||a(H());else if(l&&!m){A(!0);const t=((f,E,O)=>E!=null?f.forecasts.findIndex((b=>b.id===E)):O!=null?f.forecasts.findIndex((b=>b.id===O)):f.forecasts.length>0?0:-1)(i,r,j?.id);t===-1&&r!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=j?.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)&&I&&a(T(i.forecasts[t].id))}}),[p,u,a,l,i,m,A,R,T,I]);const L=fe(),$=L?.loggedInUserRole!=null&&K(L.loggedInUserRole),q=Se(x?.companyId,{clearParams:l&&m}),[G,V]=F.useState(!1),h=new URL(s("forecast_pandl"));h.searchParams.set("firstname",g?.firstName??""),h.searchParams.set("lastname",g?.lastName??""),h.searchParams.set("email",g?.userEmail??"");const P=t=>{V(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(pe,{analytics:M,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:G,handleDrawerToggle:P}),n.jsx(Ae,{firstMonthOfFY:_,tenantEmailDomain:c,forecastIdFromUrlPath:r,navigate:e,location:o,isPandLReportFetched:k,meetingUrl:X(h.toString()),hasTransactionAccess:$,isAiCfoAccessEnabled:B,onAskAiCfoClick:N,initialOpenThreadRequest:q,onClickMenuIcon:()=>{P(!0)}})]})}function Qe(){const s=d((c=>v(c))),{useFeatureGate:e}=Fe(),{isFeatureEnabled:a}=e(ge.isDebitCardFeatureEnabled),o=ne(a,s),r=ce(s);return o===!0||r===!0?n.jsx(be,{}):n.jsxs(Z,{children:[n.jsx(C,{path:"/",element:n.jsx(U,{})}),n.jsx(C,{path:"/:forecastId",element:n.jsx(U,{})}),n.jsx(C,{path:"/:forecastId/*",element:n.jsx(Ie,{})})]})}export{Qe as default};
@@ -1,4 +1,4 @@
1
- import{j as a}from"./liveblocks-BLpmr1Pv.js";import{a as p}from"./sentry-DWNq3t8E.js";import{N as r,aa as u,ae as f,af as h}from"./index-CnIO6_IQ.js";import{s as c}from"./mui-DNGY4bFU.js";import{i as y}from"./core-CbdTrw7T.js";import"./zeni-epic-state-C5DO1jkr.js";import"./recharts-CTh_JhT_.js";import"./analytics-Vgn85Ur_.js";import"./plaid-DhfTjhua.js";import"./dnd-DuiAlI7w.js";import"./stripe-cKAAJElX.js";import"./lottie-Lb1ftKY1.js";import"./lexical-B-vxEaRQ.js";import"./pdf-B1uD4Ovv.js";import"./utils-CrhrpmD8.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]="871995c7-dd1a-4737-9534-e0746a0a457e",e._sentryDebugIdIdentifier="sentry-dbid-871995c7-dd1a-4737-9534-e0746a0a457e")}catch{}})();const g=c("div")`
1
+ import{j as a}from"./liveblocks-BLpmr1Pv.js";import{a as p}from"./sentry-DWNq3t8E.js";import{N as r,aa as u,ae as f,af as h}from"./index-DtThPd2q.js";import{s as c}from"./mui-DNGY4bFU.js";import{i as y}from"./core-CbdTrw7T.js";import"./zeni-epic-state-C5DO1jkr.js";import"./recharts-CTh_JhT_.js";import"./analytics-Vgn85Ur_.js";import"./plaid-DhfTjhua.js";import"./dnd-DuiAlI7w.js";import"./stripe-cKAAJElX.js";import"./lottie-Lb1ftKY1.js";import"./lexical-B-vxEaRQ.js";import"./pdf-B1uD4Ovv.js";import"./utils-CrhrpmD8.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]="871995c7-dd1a-4737-9534-e0746a0a457e",e._sentryDebugIdIdentifier="sentry-dbid-871995c7-dd1a-4737-9534-e0746a0a457e")}catch{}})();const g=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-BLpmr1Pv.js";import{_C as re,fJ as N,mb as G,er as Y,eq as le,Tp as Q,Wg as ce,DG as Pe,_D as J,Dv as je,DQ as Le,DK as de,Dz as pe,DO as Te,DL as ve,_E as ue,sX as Re,ga as Ae,gH as Fe,_F as z,DD as me,DC as ge,DT as Oe,c8 as Ve}from"./zeni-epic-state-C5DO1jkr.js";import{a2 as he,p as X,_ as H,z as K,i as fe,K as Ce,ag as be,aL as ye,bZ as Ze,ac as De,N as O,ah as Se,G as M,b_ as Be,aC as Ue,al as _e,a9 as $e,c as we,R as ze,s as He,b$ as Ge,V as Ke}from"./index-CnIO6_IQ.js";import{D as xe,n as W,S as Ie}from"./mui-DNGY4bFU.js";import ae from"./NotFoundScreen-DXy-BCit.js";import{a as c}from"./sentry-DWNq3t8E.js";import{u as ee,i as Me,j as g,h as We,g as qe,l as Je,n as se,o as $}from"./core-CbdTrw7T.js";import{u as Ne}from"./useAskAiCfoHostNavButtonProps-DXFswt7R.js";import{M as Ye}from"./MobileAppDrawer-BWNb5zLN.js";import"./recharts-CTh_JhT_.js";import"./analytics-Vgn85Ur_.js";import"./plaid-DhfTjhua.js";import"./dnd-DuiAlI7w.js";import"./stripe-cKAAJElX.js";import"./lottie-Lb1ftKY1.js";import"./lexical-B-vxEaRQ.js";import"./pdf-B1uD4Ovv.js";import"./utils-CrhrpmD8.js";import"./InboxNotificationsProvider-CiKEEv6Q.js";import"./useTaskManagerAccess-Cm5trA3i.js";import"./useIsCustomersTabEnabled-C6mkabn2.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]="809bc306-0d3c-4139-a5b7-87b6a6ae24a6",e._sentryDebugIdIdentifier="sentry-dbid-809bc306-0d3c-4139-a5b7-87b6a6ae24a6")}catch{}})();const Qe={overlayWidth:new De(100,100,48)},te=M.getLocalizedStrings().peoplePage.invitePage,ne=M.getLocalizedStrings().common,Xe=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:h,isEditPeopleDrawerOpen:i,closeDrawerHandler:y})=>{const f=he(),m=ee(),[V,Z]=c.useState(!1),[k,D]=c.useState(!1),{userId:S}=Me(),r=g((l=>re(l))),p=g((l=>N(l))),E=g((l=>G(l))),{useFeatureGate:x}=X(),{isFeatureEnabled:I}=x(H.isDebitCardFeatureEnabled),P=Y(I,p),T=le(p),v=Q(p),B=ce(p),U=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,w=!P&&E&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{m(J()),y()},R=()=>{V===!0?D(!0):C()},_=d.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=x(H.isChargeCardFeatureEnabled),L=fe(p,j,I),{isCardsHidden:A}=Ce(p?.tenantId),b=!L||A,F=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:_,mode:h,isZeniTenant:v,isAccountingClassesEnabled:E,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:b,isTreasuryDisabled:F===!1,isLiteRoleDisabled:B===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:T,onResetClick:C,onDeleteUser:l=>{m(pe(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(de({peopleLocalData:l})),Z(!0)},onSaveClick:()=>{m(h==="zeni_only"?je(e):Le(v))},onCloseClick:R,isLoading:w||r.person==null},o={onOkClick:()=>{D(!1),C()},onCancelClick:()=>{D(!1)}};return c.useEffect((()=>{w===!1&&S!=null&&m(Pe(S))}),[w,S]),c.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&C()}),[r.updatePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:Qe.overlayWidth.valuePercentage(f),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:be.overlayDark,cursor:"pointer"}}},onClose:R,children:a.jsxs(ea,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(ye,{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=W(Ie)`
1
+ import{j as a}from"./liveblocks-BLpmr1Pv.js";import{_C as re,fJ as N,mb as G,er as Y,eq as le,Tp as Q,Wg as ce,DG as Pe,_D as J,Dv as je,DQ as Le,DK as de,Dz as pe,DO as Te,DL as ve,_E as ue,sX as Re,ga as Ae,gH as Fe,_F as z,DD as me,DC as ge,DT as Oe,c8 as Ve}from"./zeni-epic-state-C5DO1jkr.js";import{a2 as he,p as X,_ as H,z as K,i as fe,K as Ce,ag as be,aL as ye,bZ as Ze,ac as De,N as O,ah as Se,G as M,b_ as Be,aC as Ue,al as _e,a9 as $e,c as we,R as ze,s as He,b$ as Ge,V as Ke}from"./index-DtThPd2q.js";import{D as xe,n as W,S as Ie}from"./mui-DNGY4bFU.js";import ae from"./NotFoundScreen-uAMK84U0.js";import{a as c}from"./sentry-DWNq3t8E.js";import{u as ee,i as Me,j as g,h as We,g as qe,l as Je,n as se,o as $}from"./core-CbdTrw7T.js";import{u as Ne}from"./useAskAiCfoHostNavButtonProps-DSKusWDa.js";import{M as Ye}from"./MobileAppDrawer-CCAbxLE2.js";import"./recharts-CTh_JhT_.js";import"./analytics-Vgn85Ur_.js";import"./plaid-DhfTjhua.js";import"./dnd-DuiAlI7w.js";import"./stripe-cKAAJElX.js";import"./lottie-Lb1ftKY1.js";import"./lexical-B-vxEaRQ.js";import"./pdf-B1uD4Ovv.js";import"./utils-CrhrpmD8.js";import"./InboxNotificationsProvider-CiKEEv6Q.js";import"./useTaskManagerAccess-CT25hqtF.js";import"./useIsCustomersTabEnabled-C9FFBZXp.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]="809bc306-0d3c-4139-a5b7-87b6a6ae24a6",e._sentryDebugIdIdentifier="sentry-dbid-809bc306-0d3c-4139-a5b7-87b6a6ae24a6")}catch{}})();const Qe={overlayWidth:new De(100,100,48)},te=M.getLocalizedStrings().peoplePage.invitePage,ne=M.getLocalizedStrings().common,Xe=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:h,isEditPeopleDrawerOpen:i,closeDrawerHandler:y})=>{const f=he(),m=ee(),[V,Z]=c.useState(!1),[k,D]=c.useState(!1),{userId:S}=Me(),r=g((l=>re(l))),p=g((l=>N(l))),E=g((l=>G(l))),{useFeatureGate:x}=X(),{isFeatureEnabled:I}=x(H.isDebitCardFeatureEnabled),P=Y(I,p),T=le(p),v=Q(p),B=ce(p),U=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,w=!P&&E&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{m(J()),y()},R=()=>{V===!0?D(!0):C()},_=d.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=x(H.isChargeCardFeatureEnabled),L=fe(p,j,I),{isCardsHidden:A}=Ce(p?.tenantId),b=!L||A,F=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:_,mode:h,isZeniTenant:v,isAccountingClassesEnabled:E,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:b,isTreasuryDisabled:F===!1,isLiteRoleDisabled:B===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:T,onResetClick:C,onDeleteUser:l=>{m(pe(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(de({peopleLocalData:l})),Z(!0)},onSaveClick:()=>{m(h==="zeni_only"?je(e):Le(v))},onCloseClick:R,isLoading:w||r.person==null},o={onOkClick:()=>{D(!1),C()},onCancelClick:()=>{D(!1)}};return c.useEffect((()=>{w===!1&&S!=null&&m(Pe(S))}),[w,S]),c.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&C()}),[r.updatePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:Qe.overlayWidth.valuePercentage(f),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:be.overlayDark,cursor:"pointer"}}},onClose:R,children:a.jsxs(ea,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(ye,{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=W(Ie)`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  flex-direction: column;
@@ -1 +1 @@
1
- import{j as s}from"./liveblocks-BLpmr1Pv.js";import E from"./NotFoundScreen-DXy-BCit.js";import{a as r}from"./sentry-DWNq3t8E.js";import{h as _,g as M,j as p,i as v,u as U,N as P,l as z,n as O,o as h}from"./core-CbdTrw7T.js";import{fJ as B,a3M as b,bn as F,bm as N,iX as V,gl as J}from"./zeni-epic-state-C5DO1jkr.js";import{j as X,z as I,al as $,ec as q}from"./index-CnIO6_IQ.js";import"./mui-DNGY4bFU.js";import{u as G}from"./useAskAiCfoHostNavButtonProps-DXFswt7R.js";import{M as H}from"./MobileAppDrawer-BWNb5zLN.js";import"./recharts-CTh_JhT_.js";import"./analytics-Vgn85Ur_.js";import"./plaid-DhfTjhua.js";import"./dnd-DuiAlI7w.js";import"./stripe-cKAAJElX.js";import"./lottie-Lb1ftKY1.js";import"./lexical-B-vxEaRQ.js";import"./pdf-B1uD4Ovv.js";import"./utils-CrhrpmD8.js";import"./InboxNotificationsProvider-CiKEEv6Q.js";import"./useTaskManagerAccess-Cm5trA3i.js";import"./useIsCustomersTabEnabled-C6mkabn2.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]="70a02be0-782a-44b6-af42-0ce7492c4c72",e._sentryDebugIdIdentifier="sentry-dbid-70a02be0-782a-44b6-af42-0ce7492c4c72")}catch{}})();const K=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)}}}))(q),L=()=>{const e=_(),t=M(),c=X(),o=p((a=>B(a))),{aggregatedReportViewState:n}=p((a=>b(a))),{tenantEmailDomain:f}=v(),u=U(),d=I.getSignedInUser();if(d==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,j=N(d),x=C||k||j,l=r.useCallback(((a,i,T)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&m.current&&(u(J({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)}),[n?.fetchState]);const y=r.useCallback(((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||l(a,i,!0),m.current=!0}),[n?.fetchState,l]),D=r.useCallback(((a,i)=>{l(a,i,!1)}),[l]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=G({mobileExploreReferrer:"Performance"});return $({isDataReady:n?.fetchState==="Completed"}),x?s.jsxs(s.Fragment,{children:[s.jsx(H,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(K,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:d,tenantEmailDomain:f,onReload:y,onTimeRangeSelect:D,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(P,{to:`/${f}/dashboard`,replace:!0})};function be(){return s.jsxs(O,{children:[s.jsx(h,{path:"*",element:s.jsx(L,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{be as default};
1
+ import{j as s}from"./liveblocks-BLpmr1Pv.js";import E from"./NotFoundScreen-uAMK84U0.js";import{a as r}from"./sentry-DWNq3t8E.js";import{h as _,g as M,j as p,i as v,u as U,N as P,l as z,n as O,o as h}from"./core-CbdTrw7T.js";import{fJ as B,a3M as b,bn as F,bm as N,iX as V,gl as J}from"./zeni-epic-state-C5DO1jkr.js";import{j as X,z as I,al as $,ec as q}from"./index-DtThPd2q.js";import"./mui-DNGY4bFU.js";import{u as G}from"./useAskAiCfoHostNavButtonProps-DSKusWDa.js";import{M as H}from"./MobileAppDrawer-CCAbxLE2.js";import"./recharts-CTh_JhT_.js";import"./analytics-Vgn85Ur_.js";import"./plaid-DhfTjhua.js";import"./dnd-DuiAlI7w.js";import"./stripe-cKAAJElX.js";import"./lottie-Lb1ftKY1.js";import"./lexical-B-vxEaRQ.js";import"./pdf-B1uD4Ovv.js";import"./utils-CrhrpmD8.js";import"./InboxNotificationsProvider-CiKEEv6Q.js";import"./useTaskManagerAccess-CT25hqtF.js";import"./useIsCustomersTabEnabled-C9FFBZXp.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]="70a02be0-782a-44b6-af42-0ce7492c4c72",e._sentryDebugIdIdentifier="sentry-dbid-70a02be0-782a-44b6-af42-0ce7492c4c72")}catch{}})();const K=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)}}}))(q),L=()=>{const e=_(),t=M(),c=X(),o=p((a=>B(a))),{aggregatedReportViewState:n}=p((a=>b(a))),{tenantEmailDomain:f}=v(),u=U(),d=I.getSignedInUser();if(d==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,j=N(d),x=C||k||j,l=r.useCallback(((a,i,T)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&m.current&&(u(J({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)}),[n?.fetchState]);const y=r.useCallback(((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||l(a,i,!0),m.current=!0}),[n?.fetchState,l]),D=r.useCallback(((a,i)=>{l(a,i,!1)}),[l]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=G({mobileExploreReferrer:"Performance"});return $({isDataReady:n?.fetchState==="Completed"}),x?s.jsxs(s.Fragment,{children:[s.jsx(H,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(K,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:d,tenantEmailDomain:f,onReload:y,onTimeRangeSelect:D,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(P,{to:`/${f}/dashboard`,replace:!0})};function be(){return s.jsxs(O,{children:[s.jsx(h,{path:"*",element:s.jsx(L,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{be as default};
@@ -1,4 +1,4 @@
1
- import{j as _l}from"./liveblocks-BLpmr1Pv.js";import{p as te,d as jc,c as an,g as Sl,a as Ol}from"./sentry-DWNq3t8E.js";import{L as ge,e0 as xc,fJ as kc,V4 as Tc,a1z as jl,c8 as xl}from"./zeni-epic-state-C5DO1jkr.js";import{a as pe,b as kl,d as Tl,e as Al,f as un,g as Rl,h as Pl,i as Il,j as Ve,k as Ac,l as ot,m as xt,o as Ll,p as ct,q as Nl}from"./utils-CrhrpmD8.js";import{r as cn}from"./empty-CjoB5KP4.js";import{r as $l,a as Ml,b as Cl,c as Dl}from"./pdf-lib-BKN88Kre.js";import{r as Ye,a as Fl}from"./index-LGKtWUy9.js";import{r as Ul}from"./index-BNFAuGus.js";import{h as Bl,g as ql,u as Gl,j as _n,l as zl}from"./core-CbdTrw7T.js";import{d4 as Zl,W as Hl,u as Vl,z as Rc,L as Yl,d5 as Wl,J as Kl}from"./index-CnIO6_IQ.js";import"./mui-DNGY4bFU.js";import{d as It}from"./decodeURIComponentSafe-D7APy95S.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]="45da5bc5-2c1f-4b55-85e6-7b8595e37527",e._sentryDebugIdIdentifier="sentry-dbid-45da5bc5-2c1f-4b55-85e6-7b8595e37527")}catch{}})();var Sn,On={exports:{}},jn,xn,kn,Tn,An,Rn,Pn,In,Ln,Lt,Nn,$n,Mn,Cn,Dn,Fn,Un,Bn,qn,Gn,zn,Nt,Zn,Hn,Vn,Yn,Wn,Kn,Jn,$t,Xn,Qn,eo,to,ro,no,oo,Mt={exports:{}},Ct={exports:{}},Dt={};function Pc(){if(jn)return Dt;function e(r){return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(r)}function o(r,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,l){return i.__proto__=l,i},o(r,t)}function h(r){var t=(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 i,l=n(r);if(t){var u=n(this).constructor;i=Reflect.construct(l,arguments,u)}else i=l.apply(this,arguments);return(function(f,b){if(b&&(e(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m})(f)})(this,i)}}function n(r){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},n(r)}jn=1;var c,p,y={};function g(r,t,i){i||(i=Error);var l=(function(u){(function(a,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(d&&d.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),d&&o(a,d)})(m,u);var f,b=h(m);function m(a,d,v){var _;return(function(w,S){if(!(w instanceof S))throw new TypeError("Cannot call a class as a function")})(this,m),_=b.call(this,(function(w,S,N){return typeof t=="string"?t:t(w,S,N)})(a,d,v)),_.code=r,_}return f=m,Object.defineProperty(f,"prototype",{writable:!1}),f})(i);y[r]=l}function s(r,t){if(Array.isArray(r)){var i=r.length;return r=r.map((function(l){return String(l)})),i>2?"one of ".concat(t," ").concat(r.slice(0,i-1).join(", "),", or ")+r[i-1]:i===2?"one of ".concat(t," ").concat(r[0]," or ").concat(r[1]):"of ".concat(t," ").concat(r[0])}return"of ".concat(t," ").concat(String(r))}return g("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),g("ERR_INVALID_ARG_TYPE",(function(r,t,i){var l,u,f;if(c===void 0&&(c=it()),c(typeof r=="string","'name' must be a string"),typeof t=="string"&&(u="not ",t.substr(0,u.length)===u)?(l="must not be",t=t.replace(/^not /,"")):l="must be",(function(m,a,d){return(d===void 0||d>m.length)&&(d=m.length),m.substring(d-a.length,d)===a})(r," argument"))f="The ".concat(r," ").concat(l," ").concat(s(t,"type"));else{var b=(function(m,a,d){return typeof d!="number"&&(d=0),!(d+a.length>m.length)&&m.indexOf(a,d)!==-1})(r,".")?"property":"argument";f='The "'.concat(r,'" ').concat(b," ").concat(l," ").concat(s(t,"type"))}return f+=". Received type ".concat(e(i))}),TypeError),g("ERR_INVALID_ARG_VALUE",(function(r,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";p===void 0&&(p=pe());var l=p.inspect(t);return l.length>128&&(l="".concat(l.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(i,". Received ").concat(l)}),TypeError),g("ERR_INVALID_RETURN_VALUE",(function(r,t,i){var l;return l=i&&i.constructor&&i.constructor.name?"instance of ".concat(i.constructor.name):"type ".concat(e(i)),"Expected ".concat(r,' to be returned from the "').concat(t,'"')+" function but got ".concat(l,".")}),TypeError),g("ERR_MISSING_ARGS",(function(){for(var r=arguments.length,t=new Array(r),i=0;i<r;i++)t[i]=arguments[i];c===void 0&&(c=it()),c(t.length>0,"At least one arg needs to be specified");var l="The ",u=t.length;switch(t=t.map((function(f){return'"'.concat(f,'"')})),u){case 1:l+="".concat(t[0]," argument");break;case 2:l+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:l+=t.slice(0,u-1).join(", "),l+=", and ".concat(t[u-1]," arguments")}return"".concat(l," must be specified")}),TypeError),Dt.codes=y,Dt}function Jl(){if(kn)return xn;function e(j,E){var O=Object.keys(j);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(j);E&&(P=P.filter((function(x){return Object.getOwnPropertyDescriptor(j,x).enumerable}))),O.push.apply(O,P)}return O}function o(j){for(var E=1;E<arguments.length;E++){var O=arguments[E]!=null?arguments[E]:{};E%2?e(Object(O),!0).forEach((function(P){h(j,P,O[P])})):Object.getOwnPropertyDescriptors?Object.defineProperties(j,Object.getOwnPropertyDescriptors(O)):e(Object(O)).forEach((function(P){Object.defineProperty(j,P,Object.getOwnPropertyDescriptor(O,P))}))}return j}function h(j,E,O){return(E=c(E))in j?Object.defineProperty(j,E,{value:O,enumerable:!0,configurable:!0,writable:!0}):j[E]=O,j}function n(j,E,O){return E&&(function(P,x){for(var U=0;U<x.length;U++){var L=x[U];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(P,c(L.key),L)}})(j.prototype,E),Object.defineProperty(j,"prototype",{writable:!1}),j}function c(j){var E=(function(O,P){if(l(O)!=="object"||O===null)return O;var x=O[Symbol.toPrimitive];if(x!==void 0){var U=x.call(O,P);if(l(U)!=="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(O)})(j,"string");return l(E)==="symbol"?E:String(E)}function p(j,E){if(E&&(l(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y(j)}function y(j){if(j===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j}function g(j){var E=typeof Map=="function"?new Map:void 0;return g=function(O){if(O===null||(P=O,Function.toString.call(P).indexOf("[native code]")===-1))return O;var P;if(typeof O!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(O))return E.get(O);E.set(O,x)}function x(){return s(O,arguments,i(this).constructor)}return x.prototype=Object.create(O.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),t(x,O)},g(j)}function s(j,E,O){return s=r()?Reflect.construct.bind():function(P,x,U){var L=[null];L.push.apply(L,x);var A=new(Function.bind.apply(P,L));return U&&t(A,U.prototype),A},s.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 t(j,E){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(O,P){return O.__proto__=P,O},t(j,E)}function i(j){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},i(j)}function l(j){return l=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},l(j)}kn=1;var u=pe().inspect,f=Pc().codes.ERR_INVALID_ARG_TYPE;function b(j,E,O){return(O===void 0||O>j.length)&&(O=j.length),j.substring(O-E.length,O)===E}var m="",a="",d="",v="",_={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(j){var E=Object.keys(j),O=Object.create(Object.getPrototypeOf(j));return E.forEach((function(P){O[P]=j[P]})),Object.defineProperty(O,"message",{value:j.message}),O}function S(j){return u(j,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function N(j,E,O){var P="",x="",U=0,L="",A=!1,z=S(j),R=z.split(`
1
+ import{j as _l}from"./liveblocks-BLpmr1Pv.js";import{p as te,d as jc,c as an,g as Sl,a as Ol}from"./sentry-DWNq3t8E.js";import{L as ge,e0 as xc,fJ as kc,V4 as Tc,a1z as jl,c8 as xl}from"./zeni-epic-state-C5DO1jkr.js";import{a as pe,b as kl,d as Tl,e as Al,f as un,g as Rl,h as Pl,i as Il,j as Ve,k as Ac,l as ot,m as xt,o as Ll,p as ct,q as Nl}from"./utils-CrhrpmD8.js";import{r as cn}from"./empty-CjoB5KP4.js";import{r as $l,a as Ml,b as Cl,c as Dl}from"./pdf-lib-BKN88Kre.js";import{r as Ye,a as Fl}from"./index-LGKtWUy9.js";import{r as Ul}from"./index-BNFAuGus.js";import{h as Bl,g as ql,u as Gl,j as _n,l as zl}from"./core-CbdTrw7T.js";import{d4 as Zl,W as Hl,u as Vl,z as Rc,L as Yl,d5 as Wl,J as Kl}from"./index-DtThPd2q.js";import"./mui-DNGY4bFU.js";import{d as It}from"./decodeURIComponentSafe-D7APy95S.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]="45da5bc5-2c1f-4b55-85e6-7b8595e37527",e._sentryDebugIdIdentifier="sentry-dbid-45da5bc5-2c1f-4b55-85e6-7b8595e37527")}catch{}})();var Sn,On={exports:{}},jn,xn,kn,Tn,An,Rn,Pn,In,Ln,Lt,Nn,$n,Mn,Cn,Dn,Fn,Un,Bn,qn,Gn,zn,Nt,Zn,Hn,Vn,Yn,Wn,Kn,Jn,$t,Xn,Qn,eo,to,ro,no,oo,Mt={exports:{}},Ct={exports:{}},Dt={};function Pc(){if(jn)return Dt;function e(r){return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(r)}function o(r,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,l){return i.__proto__=l,i},o(r,t)}function h(r){var t=(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 i,l=n(r);if(t){var u=n(this).constructor;i=Reflect.construct(l,arguments,u)}else i=l.apply(this,arguments);return(function(f,b){if(b&&(e(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m})(f)})(this,i)}}function n(r){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},n(r)}jn=1;var c,p,y={};function g(r,t,i){i||(i=Error);var l=(function(u){(function(a,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(d&&d.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),d&&o(a,d)})(m,u);var f,b=h(m);function m(a,d,v){var _;return(function(w,S){if(!(w instanceof S))throw new TypeError("Cannot call a class as a function")})(this,m),_=b.call(this,(function(w,S,N){return typeof t=="string"?t:t(w,S,N)})(a,d,v)),_.code=r,_}return f=m,Object.defineProperty(f,"prototype",{writable:!1}),f})(i);y[r]=l}function s(r,t){if(Array.isArray(r)){var i=r.length;return r=r.map((function(l){return String(l)})),i>2?"one of ".concat(t," ").concat(r.slice(0,i-1).join(", "),", or ")+r[i-1]:i===2?"one of ".concat(t," ").concat(r[0]," or ").concat(r[1]):"of ".concat(t," ").concat(r[0])}return"of ".concat(t," ").concat(String(r))}return g("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),g("ERR_INVALID_ARG_TYPE",(function(r,t,i){var l,u,f;if(c===void 0&&(c=it()),c(typeof r=="string","'name' must be a string"),typeof t=="string"&&(u="not ",t.substr(0,u.length)===u)?(l="must not be",t=t.replace(/^not /,"")):l="must be",(function(m,a,d){return(d===void 0||d>m.length)&&(d=m.length),m.substring(d-a.length,d)===a})(r," argument"))f="The ".concat(r," ").concat(l," ").concat(s(t,"type"));else{var b=(function(m,a,d){return typeof d!="number"&&(d=0),!(d+a.length>m.length)&&m.indexOf(a,d)!==-1})(r,".")?"property":"argument";f='The "'.concat(r,'" ').concat(b," ").concat(l," ").concat(s(t,"type"))}return f+=". Received type ".concat(e(i))}),TypeError),g("ERR_INVALID_ARG_VALUE",(function(r,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";p===void 0&&(p=pe());var l=p.inspect(t);return l.length>128&&(l="".concat(l.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(i,". Received ").concat(l)}),TypeError),g("ERR_INVALID_RETURN_VALUE",(function(r,t,i){var l;return l=i&&i.constructor&&i.constructor.name?"instance of ".concat(i.constructor.name):"type ".concat(e(i)),"Expected ".concat(r,' to be returned from the "').concat(t,'"')+" function but got ".concat(l,".")}),TypeError),g("ERR_MISSING_ARGS",(function(){for(var r=arguments.length,t=new Array(r),i=0;i<r;i++)t[i]=arguments[i];c===void 0&&(c=it()),c(t.length>0,"At least one arg needs to be specified");var l="The ",u=t.length;switch(t=t.map((function(f){return'"'.concat(f,'"')})),u){case 1:l+="".concat(t[0]," argument");break;case 2:l+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:l+=t.slice(0,u-1).join(", "),l+=", and ".concat(t[u-1]," arguments")}return"".concat(l," must be specified")}),TypeError),Dt.codes=y,Dt}function Jl(){if(kn)return xn;function e(j,E){var O=Object.keys(j);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(j);E&&(P=P.filter((function(x){return Object.getOwnPropertyDescriptor(j,x).enumerable}))),O.push.apply(O,P)}return O}function o(j){for(var E=1;E<arguments.length;E++){var O=arguments[E]!=null?arguments[E]:{};E%2?e(Object(O),!0).forEach((function(P){h(j,P,O[P])})):Object.getOwnPropertyDescriptors?Object.defineProperties(j,Object.getOwnPropertyDescriptors(O)):e(Object(O)).forEach((function(P){Object.defineProperty(j,P,Object.getOwnPropertyDescriptor(O,P))}))}return j}function h(j,E,O){return(E=c(E))in j?Object.defineProperty(j,E,{value:O,enumerable:!0,configurable:!0,writable:!0}):j[E]=O,j}function n(j,E,O){return E&&(function(P,x){for(var U=0;U<x.length;U++){var L=x[U];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(P,c(L.key),L)}})(j.prototype,E),Object.defineProperty(j,"prototype",{writable:!1}),j}function c(j){var E=(function(O,P){if(l(O)!=="object"||O===null)return O;var x=O[Symbol.toPrimitive];if(x!==void 0){var U=x.call(O,P);if(l(U)!=="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(O)})(j,"string");return l(E)==="symbol"?E:String(E)}function p(j,E){if(E&&(l(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y(j)}function y(j){if(j===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j}function g(j){var E=typeof Map=="function"?new Map:void 0;return g=function(O){if(O===null||(P=O,Function.toString.call(P).indexOf("[native code]")===-1))return O;var P;if(typeof O!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(O))return E.get(O);E.set(O,x)}function x(){return s(O,arguments,i(this).constructor)}return x.prototype=Object.create(O.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),t(x,O)},g(j)}function s(j,E,O){return s=r()?Reflect.construct.bind():function(P,x,U){var L=[null];L.push.apply(L,x);var A=new(Function.bind.apply(P,L));return U&&t(A,U.prototype),A},s.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 t(j,E){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(O,P){return O.__proto__=P,O},t(j,E)}function i(j){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},i(j)}function l(j){return l=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},l(j)}kn=1;var u=pe().inspect,f=Pc().codes.ERR_INVALID_ARG_TYPE;function b(j,E,O){return(O===void 0||O>j.length)&&(O=j.length),j.substring(O-E.length,O)===E}var m="",a="",d="",v="",_={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(j){var E=Object.keys(j),O=Object.create(Object.getPrototypeOf(j));return E.forEach((function(P){O[P]=j[P]})),Object.defineProperty(O,"message",{value:j.message}),O}function S(j){return u(j,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function N(j,E,O){var P="",x="",U=0,L="",A=!1,z=S(j),R=z.split(`
2
2
  `),I=S(E).split(`
3
3
  `),k=0,C="";if(O==="strictEqual"&&l(j)==="object"&&l(E)==="object"&&j!==null&&E!==null&&(O="strictEqualObject"),R.length===1&&I.length===1&&R[0]!==I[0]){var H=R[0].length+I[0].length;if(H<=10){if(!(l(j)==="object"&&j!==null||l(E)==="object"&&E!==null||j===0&&E===0))return"".concat(_[O],`
4
4
 
@@ -1 +1 @@
1
- import{j as r}from"./liveblocks-BLpmr1Pv.js";import Y from"./NotFoundScreen-DXy-BCit.js";import{a as p}from"./sentry-DWNq3t8E.js";import{h as C,g as D,u as V,j as u,N as k,l as O,n as z,o as g}from"./core-CbdTrw7T.js";import{fJ as E,Yo as h,Y0 as w,OC as B,Oy as U,OB as f,Or as L,Y2 as N,Ov as J,OE as K}from"./zeni-epic-state-C5DO1jkr.js";import{z as T,w as $,bl as q,B as W,b0 as F,bm as G}from"./index-CnIO6_IQ.js";import"./mui-DNGY4bFU.js";import{u as H}from"./useEnsureVendorListLoaded-CIShbpK4.js";import{R as x}from"./ReimbursementApprovalRuleDetailScreen-CHTcY28V.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]="f8a6ac01-eb0d-43a7-977b-2b6efe3537e4",e._sentryDebugIdIdentifier="sentry-dbid-f8a6ac01-eb0d-43a7-977b-2b6efe3537e4")}catch{}})();const I="reimbursement-approval-rule-update",M=O((function(e){return{approvalView:h(e),remiSetupApproverViewUpdateData:w(e).remiSetupApproverViewUpdateData}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(I)&&e(N(!1))},onBackClick:()=>{W(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(L(t,!1))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))}}}))($(q)),P=({isLoading:e})=>{const s=C(),n=D(),a=V(),[t,l]=p.useState(!1),[v,y]=p.useState(!1),S=u((o=>o.remiSetupApproverViewState.fetchState)),c=u((o=>E(o))),d=u((o=>h(o))),b=u((o=>w(o).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{b?.updateStatus.fetchState==="Completed"&&a(B())}),[b]),p.useEffect((()=>{t||S!=="Not-Started"||e||(l(!0),a(U(!0,!1,!1,!1)))}),[t,S,e,a]),T.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{d.allApprovalRules.length===0&&d.fetchState==="Completed"&&(v||(y(!0),a(f())),s("./new"))}),[v,d,a]);const m={events:c.companyId!=null?[`private-encrypted-${c.companyId}.${I}`]:[],eventCallback:(o,R,j)=>{o.endsWith(I)&&j.onApprovalRulesEventReceived(o)}};return c?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(k,{to:"../../promo"}):r.jsx(M,{currentTenant:c,location:n,navigate:s,...m})},A="reimbursement-approval-rule-update",Q=O((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(N(!1))},onBackClick:()=>{W(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(L(t,!0))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))},onReorderRules:t=>{e(K(t,!0))}}}))($(G)),X=()=>{const e=u((a=>E(a))),{isApprovalRulesV3Enabled:s,isLoading:n}=F(e?.tenantId);return s?r.jsx(Z,{isLoading:n}):r.jsx(P,{isLoading:n})},Z=({isLoading:e})=>{const s=C(),n=D(),a=V(),[t,l]=p.useState(!1),[v,y]=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))),o=u((i=>h(i)));H();const R=u((i=>w(i).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{R?.updateStatus.fetchState==="Completed"&&a(B())}),[R]),p.useEffect((()=>{t||d!=="Not-Started"||e||(l(!0),a(U(!0,!1,!1,!0)))}),[t,d,e,a]),p.useEffect((()=>{v||b!=="Not-Started"||e||(y(!0),a(J(!1,!0)))}),[v,b,e,a]),T.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{o.allApprovalRules.length===0&&o.fetchState==="Completed"&&(S||(c(!0),a(f())),s("./new"))}),[S,o,a]);const j={events:m.companyId!=null?[`private-encrypted-${m.companyId}.${A}`]:[],eventCallback:(i,ee,_)=>{i.endsWith(A)&&_.onApprovalRulesEventReceived(i)}};return m?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(k,{to:"../../promo"}):r.jsx(Q,{currentTenant:m,location:n,navigate:s,isLoading:e,...j})};function ue(){return r.jsxs(z,{children:[r.jsx(g,{path:"/",element:r.jsx(X,{})}),r.jsx(g,{path:"/new",element:r.jsx(x,{})}),r.jsx(g,{path:"/:approvalRuleId/edit",element:r.jsx(x,{})}),r.jsx(g,{path:"*",element:r.jsx(Y,{})})]})}export{ue as R};
1
+ import{j as r}from"./liveblocks-BLpmr1Pv.js";import Y from"./NotFoundScreen-uAMK84U0.js";import{a as p}from"./sentry-DWNq3t8E.js";import{h as C,g as D,u as V,j as u,N as k,l as O,n as z,o as g}from"./core-CbdTrw7T.js";import{fJ as E,Yo as h,Y0 as w,OC as B,Oy as U,OB as f,Or as L,Y2 as N,Ov as J,OE as K}from"./zeni-epic-state-C5DO1jkr.js";import{z as T,w as $,bl as q,B as W,b0 as F,bm as G}from"./index-DtThPd2q.js";import"./mui-DNGY4bFU.js";import{u as H}from"./useEnsureVendorListLoaded-CIShbpK4.js";import{R as x}from"./ReimbursementApprovalRuleDetailScreen-CHtkyq9-.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]="f8a6ac01-eb0d-43a7-977b-2b6efe3537e4",e._sentryDebugIdIdentifier="sentry-dbid-f8a6ac01-eb0d-43a7-977b-2b6efe3537e4")}catch{}})();const I="reimbursement-approval-rule-update",M=O((function(e){return{approvalView:h(e),remiSetupApproverViewUpdateData:w(e).remiSetupApproverViewUpdateData}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(I)&&e(N(!1))},onBackClick:()=>{W(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(L(t,!1))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))}}}))($(q)),P=({isLoading:e})=>{const s=C(),n=D(),a=V(),[t,l]=p.useState(!1),[v,y]=p.useState(!1),S=u((o=>o.remiSetupApproverViewState.fetchState)),c=u((o=>E(o))),d=u((o=>h(o))),b=u((o=>w(o).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{b?.updateStatus.fetchState==="Completed"&&a(B())}),[b]),p.useEffect((()=>{t||S!=="Not-Started"||e||(l(!0),a(U(!0,!1,!1,!1)))}),[t,S,e,a]),T.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{d.allApprovalRules.length===0&&d.fetchState==="Completed"&&(v||(y(!0),a(f())),s("./new"))}),[v,d,a]);const m={events:c.companyId!=null?[`private-encrypted-${c.companyId}.${I}`]:[],eventCallback:(o,R,j)=>{o.endsWith(I)&&j.onApprovalRulesEventReceived(o)}};return c?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(k,{to:"../../promo"}):r.jsx(M,{currentTenant:c,location:n,navigate:s,...m})},A="reimbursement-approval-rule-update",Q=O((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(N(!1))},onBackClick:()=>{W(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(L(t,!0))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))},onReorderRules:t=>{e(K(t,!0))}}}))($(G)),X=()=>{const e=u((a=>E(a))),{isApprovalRulesV3Enabled:s,isLoading:n}=F(e?.tenantId);return s?r.jsx(Z,{isLoading:n}):r.jsx(P,{isLoading:n})},Z=({isLoading:e})=>{const s=C(),n=D(),a=V(),[t,l]=p.useState(!1),[v,y]=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))),o=u((i=>h(i)));H();const R=u((i=>w(i).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{R?.updateStatus.fetchState==="Completed"&&a(B())}),[R]),p.useEffect((()=>{t||d!=="Not-Started"||e||(l(!0),a(U(!0,!1,!1,!0)))}),[t,d,e,a]),p.useEffect((()=>{v||b!=="Not-Started"||e||(y(!0),a(J(!1,!0)))}),[v,b,e,a]),T.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{o.allApprovalRules.length===0&&o.fetchState==="Completed"&&(S||(c(!0),a(f())),s("./new"))}),[S,o,a]);const j={events:m.companyId!=null?[`private-encrypted-${m.companyId}.${A}`]:[],eventCallback:(i,ee,_)=>{i.endsWith(A)&&_.onApprovalRulesEventReceived(i)}};return m?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(k,{to:"../../promo"}):r.jsx(Q,{currentTenant:m,location:n,navigate:s,isLoading:e,...j})};function ue(){return r.jsxs(z,{children:[r.jsx(g,{path:"/",element:r.jsx(X,{})}),r.jsx(g,{path:"/new",element:r.jsx(x,{})}),r.jsx(g,{path:"/:approvalRuleId/edit",element:r.jsx(x,{})}),r.jsx(g,{path:"*",element:r.jsx(Y,{})})]})}export{ue as R};
@@ -1 +1 @@
1
- import{j as g}from"./liveblocks-BLpmr1Pv.js";import{a as y}from"./sentry-DWNq3t8E.js";import{h as x,u as C,g as _,i as V,j as R,l as k}from"./core-CbdTrw7T.js";import{Y0 as w,Yo as T,Ou as B,OH as j,OC as A,OD as E,YX as F,fJ as z,OB as H}from"./zeni-epic-state-C5DO1jkr.js";import{z as N,a8 as P,bn as J,B as $,b0 as K,bo as L}from"./index-CnIO6_IQ.js";import{u as q}from"./mui-DNGY4bFU.js";import{u as W}from"./useEnsureVendorListLoaded-CIShbpK4.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]="23c5139f-1b6c-4b15-937d-b4f95e0c03e8",e._sentryDebugIdIdentifier="sentry-dbid-23c5139f-1b6c-4b15-937d-b4f95e0c03e8")}catch{}})();const X=k((function(e,o){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",s=p==="approval_create"&&t.allApprovalRules.length!==0;let i=t.allApprovalRules.length===0;return o.approvalRuleId&&(i=t.allApprovalRules.findIndex((r=>r.approvalRuleId===o.approvalRuleId))===0),{localData:t,hideUpperBoundField:s,isLowerBoundDisabled:i,approvalUpdateActionType:p}}),(function(e,o){const{navigate:t,approvalUpdateDataView:p,approverViewData:s,approvalRuleId:i}=o,r=p.remiSetupApproverViewUpdateData?.type,l=$(o.location);return{onApprovalRuleDataUpdated:a=>{const d=v=>{const h=[];return v.forEach((u=>{const b=u.actors.selectedUsers.map((m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1}))),I=u.actors.selectedNonUsers.map((m=>{const f=(S=m.value,F(S)==null);var S;return{type:f?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!f}})),c=b.concat(I);h.push({action:u.stepType.selectedOption,actors:c,operator:c.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})})),h},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:i,criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}},onResetClick:()=>{e(A()),r==="approval_update"||l?t("../"):s.allApprovalRules.length===0&&s.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||l?t("../"):s.allApprovalRules.length===0&&s.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(j(!1))},onSaveRuleSuccess:()=>{t("../")}}}))(J);function G(){const e=x(),o=C(),t=_(),{approvalRuleId:p}=V(),s=N.getSignedInUser(),i=q(),r=R((n=>w(n))),l=R((n=>T(n))),[a,d]=y.useState(!1);if(y.useEffect((()=>{a||(d(!0),o(B(!0)))})),y.useEffect((()=>{l.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[l,p]),s==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx(P,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):g.jsx(X,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:l,location:t})}function se(e){return F(e)==null}const M=k((function(e,o){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",s=[],i={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(s.push(r.id),i[r.id]=r.name);return{localData:t,approvalUpdateActionType:p,allVendorIds:s,vendorNamesById:i,editingRuleId:p==="approval_update"?o.approvalRuleId:void 0,allApprovalRulesWithUser:T(e).allApprovalRules}}),(function(e,o){const{navigate:t,approvalUpdateDataView:p,approverViewData:s,approvalRuleId:i}=o,r=p.remiSetupApproverViewUpdateData?.type,l=$(o.location);return{onApprovalRuleDataUpdated:a=>{const d=c=>{const m=[];return c.forEach((f=>{const S=f.actorKind?.selectedOption,Y=f.selectedRole?.selectedNonUsers??[];let D=[];S==="role"?D=Y.map((O=>({type:"attribute",subType:O.value,userId:void 0,idType:void 0,isImplicitActor:!1}))):S==="specific_person"&&(D=(f.persons?.selectedUsers??[]).map((O=>({type:"user",subType:void 0,userId:O.userId,idType:"user",isImplicitActor:!1}))));const U=f.action??"require_approval";m.push({action:U,actors:D,operator:D.length>1?U==="require_approval"?"or":"and":"is"})})),m},n=a.amountCriteria,v=a.vendorCriteria,h=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 b=v?.selection.selectedOptions??[];b.length>0&&(u.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:b});const I=h?.selection.selectedOptions??[];if(I.length>0&&(u.department={type:"department",operator:h?.operator.selectedOption??"is",departmentIds:I}),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:i,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"||l?t("../"):s.allApprovalRules.length===0&&s.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||l?t("../"):s.allApprovalRules.length===0&&s.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(j(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(H(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}}))(L);function ne(){const e=R((t=>z(t))),{isApprovalRulesV3Enabled:o}=K(e?.tenantId);return o?g.jsx(Q,{}):g.jsx(G,{})}function Q(){const e=x(),o=C(),t=_(),{approvalRuleId:p}=V(),s=N.getSignedInUser(),i=q(),r=R((n=>w(n))),l=R((n=>T(n))),[a,d]=y.useState(!1);if(W(),y.useEffect((()=>{a||(d(!0),o(B(!1)))})),y.useEffect((()=>{l.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[l,p]),s==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx(P,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):g.jsx(M,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:l,location:t},p??"new")}export{ne as R,se as i};
1
+ import{j as g}from"./liveblocks-BLpmr1Pv.js";import{a as y}from"./sentry-DWNq3t8E.js";import{h as x,u as C,g as _,i as V,j as R,l as k}from"./core-CbdTrw7T.js";import{Y0 as w,Yo as T,Ou as B,OH as j,OC as A,OD as E,YX as F,fJ as z,OB as H}from"./zeni-epic-state-C5DO1jkr.js";import{z as N,a8 as P,bn as J,B as $,b0 as K,bo as L}from"./index-DtThPd2q.js";import{u as q}from"./mui-DNGY4bFU.js";import{u as W}from"./useEnsureVendorListLoaded-CIShbpK4.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]="23c5139f-1b6c-4b15-937d-b4f95e0c03e8",e._sentryDebugIdIdentifier="sentry-dbid-23c5139f-1b6c-4b15-937d-b4f95e0c03e8")}catch{}})();const X=k((function(e,o){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",s=p==="approval_create"&&t.allApprovalRules.length!==0;let i=t.allApprovalRules.length===0;return o.approvalRuleId&&(i=t.allApprovalRules.findIndex((r=>r.approvalRuleId===o.approvalRuleId))===0),{localData:t,hideUpperBoundField:s,isLowerBoundDisabled:i,approvalUpdateActionType:p}}),(function(e,o){const{navigate:t,approvalUpdateDataView:p,approverViewData:s,approvalRuleId:i}=o,r=p.remiSetupApproverViewUpdateData?.type,l=$(o.location);return{onApprovalRuleDataUpdated:a=>{const d=v=>{const h=[];return v.forEach((u=>{const b=u.actors.selectedUsers.map((m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1}))),I=u.actors.selectedNonUsers.map((m=>{const f=(S=m.value,F(S)==null);var S;return{type:f?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!f}})),c=b.concat(I);h.push({action:u.stepType.selectedOption,actors:c,operator:c.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})})),h},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:i,criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}},onResetClick:()=>{e(A()),r==="approval_update"||l?t("../"):s.allApprovalRules.length===0&&s.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||l?t("../"):s.allApprovalRules.length===0&&s.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(j(!1))},onSaveRuleSuccess:()=>{t("../")}}}))(J);function G(){const e=x(),o=C(),t=_(),{approvalRuleId:p}=V(),s=N.getSignedInUser(),i=q(),r=R((n=>w(n))),l=R((n=>T(n))),[a,d]=y.useState(!1);if(y.useEffect((()=>{a||(d(!0),o(B(!0)))})),y.useEffect((()=>{l.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[l,p]),s==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx(P,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):g.jsx(X,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:l,location:t})}function se(e){return F(e)==null}const M=k((function(e,o){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",s=[],i={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(s.push(r.id),i[r.id]=r.name);return{localData:t,approvalUpdateActionType:p,allVendorIds:s,vendorNamesById:i,editingRuleId:p==="approval_update"?o.approvalRuleId:void 0,allApprovalRulesWithUser:T(e).allApprovalRules}}),(function(e,o){const{navigate:t,approvalUpdateDataView:p,approverViewData:s,approvalRuleId:i}=o,r=p.remiSetupApproverViewUpdateData?.type,l=$(o.location);return{onApprovalRuleDataUpdated:a=>{const d=c=>{const m=[];return c.forEach((f=>{const S=f.actorKind?.selectedOption,Y=f.selectedRole?.selectedNonUsers??[];let D=[];S==="role"?D=Y.map((O=>({type:"attribute",subType:O.value,userId:void 0,idType:void 0,isImplicitActor:!1}))):S==="specific_person"&&(D=(f.persons?.selectedUsers??[]).map((O=>({type:"user",subType:void 0,userId:O.userId,idType:"user",isImplicitActor:!1}))));const U=f.action??"require_approval";m.push({action:U,actors:D,operator:D.length>1?U==="require_approval"?"or":"and":"is"})})),m},n=a.amountCriteria,v=a.vendorCriteria,h=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 b=v?.selection.selectedOptions??[];b.length>0&&(u.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:b});const I=h?.selection.selectedOptions??[];if(I.length>0&&(u.department={type:"department",operator:h?.operator.selectedOption??"is",departmentIds:I}),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:i,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"||l?t("../"):s.allApprovalRules.length===0&&s.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||l?t("../"):s.allApprovalRules.length===0&&s.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(j(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(H(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}}))(L);function ne(){const e=R((t=>z(t))),{isApprovalRulesV3Enabled:o}=K(e?.tenantId);return o?g.jsx(Q,{}):g.jsx(G,{})}function Q(){const e=x(),o=C(),t=_(),{approvalRuleId:p}=V(),s=N.getSignedInUser(),i=q(),r=R((n=>w(n))),l=R((n=>T(n))),[a,d]=y.useState(!1);if(W(),y.useEffect((()=>{a||(d(!0),o(B(!1)))})),y.useEffect((()=>{l.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[l,p]),s==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx(P,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):g.jsx(M,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:l,location:t},p??"new")}export{ne as R,se as i};
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-BLpmr1Pv.js";import{u as ae,j as A,h as Q,g as J,i as ie,N as $,l as ee,q as lt,n as mt,o as x}from"./core-CbdTrw7T.js";import{fJ as V,Oy as ct,XD as ge,c8 as he,NE as Ue,mm as dt,NT as ce,NS as de,XE as ut,bm as fe,g_ as Le,XF as pt,VY as bt,mb as Pe,V_ as ke,VZ as gt,kZ as ht,Xu as ft,lc as St,Ns as It,CY as yt,l4 as Rt,Od as $e,XG as Ne,XH as Ce,XI as vt,XJ as At,XK as kt,NZ as we,li as Ct,XL as wt,NR as Et,NC as xt,XM as Bt,NB as Tt,XN as Dt,NJ as Ee,O1 as jt,O0 as Ft,NY as Ut,XO as _e,Tp as Lt,bn as Pt,NM as $t,Ov as Nt,XP as _t,XQ as Mt,O9 as Ot,O6 as xe,W_ as Xt,Nz as zt,XR as Me,OY as Be,P4 as Gt,XS as Zt,XT as W,XU as Vt,XV as Oe,XW as Yt,XX as Xe,XY as ze,Ol as ue,d1 as Ht,bL as Se,cF as Ie,er as Ge,eq as Ze,XZ as Wt,gl as qt,Xb as Jt,X_ as Kt,X$ as Ve,Xf as Qt,Y0 as en,Y1 as tn,Y2 as nn,P1 as Te,P0 as an,Y3 as sn,Y4 as on,Y5 as rn,Y6 as ln,Y7 as mn,Y8 as cn,OT as dn,OX as un,bp as pn,bK as bn,cz as gn,cm as hn,bs as fn,hb as Sn,ec as In,ef as yn,ee as Rn,cy as vn}from"./zeni-epic-state-C5DO1jkr.js";import{b0 as An,j as Ye,a2 as He,p as oe,_ as U,z as L,b1 as We,a9 as re,c as E,aM as De,N as j,af as se,ag as kn,G as qe,b2 as Cn,s as q,al as Je,b3 as wn,V as le,b4 as En,aC as xn,ac as Bn,a8 as ye,R as Ke,w as Tn,aP as Dn,aj as jn,az as Fn,b5 as Un,i as Ln}from"./index-CnIO6_IQ.js";import{n as N,S as Pn,u as Qe}from"./mui-DNGY4bFU.js";import pe from"./NotFoundScreen-DXy-BCit.js";import{S as je}from"./SetupPagesScreen-D6ssIWb0.js";import{F as et}from"./FeaturePreviewScreen-DHt0WFS8.js";import{a as g}from"./sentry-DWNq3t8E.js";import{u as Re}from"./useAskAiCfoHostNavButtonProps-DXFswt7R.js";import{u as tt}from"./useInitialThreadRequest-DAUsQlCl.js";import{D as $n}from"./DrawerScreen-BHaectiO.js";import{M as nt}from"./MobileAppDrawer-BWNb5zLN.js";import{F as Nn}from"./FallBackRoute-DuMHkNqk.js";import{R as _n}from"./ReimbursementApprovalRoutes-B2ftFL0O.js";import"./recharts-CTh_JhT_.js";import"./analytics-Vgn85Ur_.js";import"./plaid-DhfTjhua.js";import"./dnd-DuiAlI7w.js";import"./stripe-cKAAJElX.js";import"./lottie-Lb1ftKY1.js";import"./lexical-B-vxEaRQ.js";import"./pdf-B1uD4Ovv.js";import"./utils-CrhrpmD8.js";import"./BusinessVerificationPageScreen-DM_jBIuD.js";import"./routePaths-CV12X_S-.js";import"./analyticsHelper-CWMk7_rd.js";import"./InboxNotificationsProvider-CiKEEv6Q.js";import"./useTaskManagerAccess-Cm5trA3i.js";import"./useIsCustomersTabEnabled-C6mkabn2.js";import"./useEnsureVendorListLoaded-CIShbpK4.js";import"./ReimbursementApprovalRuleDetailScreen-CHTcY28V.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]="0a469b2d-d40b-421a-85f4-86fa2bd1c254",e._sentryDebugIdIdentifier="sentry-dbid-0a469b2d-d40b-421a-85f4-86fa2bd1c254")}catch{}})();const at=e=>`/${e}/reimbursements`,Mn=e=>g.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},g.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{common:H,spendManagement:{reimbursement:{reimbursementDetail:ne}}}=qe.getLocalizedStrings(),On=ee((function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),m=L.getSignedInUser(),c=fe(m),d=r.plaidConnectionDetails,i=Le(e.companyState,n),a=e.tenantState.currentTenantId,o={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:a??""},l=ge(e,t.reimbursementId),p=pt(e,m?.userId??"");let I=`${m?.firstName} ${m?.lastName}`,u=!0;t.reimbursementId!=null&&(I=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,u=m?.userId===l.createdBy?.userId);const T=e.entityAutoCompleteState?.autoCompleteText?.common,y=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:y},authParams:o,defaultCurrency:{currencySymbol:i?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:i?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:i?.company.configInfo.mileageRateConfig,createdBy:I,isUserAdmin:he(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:d,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:p.bankAccountCreationState,bankAccounts:p.bankAccounts,analytics:E,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:u,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Pe(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:m,navigate:c,themeState:d}=t,{tenantEmailDomain:i}=r,a=L.getSignedInUser();return{onReceiptsUpload:(o,l,p)=>{o!=null&&e(de(o,l,p,n,a?.userId))},onExistingMerchantChange:(o,l)=>{e(Ee(!1,l,n,o,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Ut(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Ft())},clearRemiSaveStatus:()=>{e(jt("Not-Started",n))},onDuplicateLineClick:(o,l)=>window.open(`/${i}/reimbursement/${o}#L${l}`),onNewMerchantChange:(o,l)=>{e(Ee(!1,l,n,void 0,o))},removeFileFromLine:o=>{e(Dt({lineId:o,reimbursementId:n}))},onAmountChanged:(o,l)=>{e(Tt(l,o,n))},updateReimbursementType:(o,l,p)=>{e(Bt({reimbursementId:p,lineId:l,reimbursementType:o}))},onHomeCurrencyConversionUpdate:(o,l,p)=>{e(xt({reimbursementId:p,lineId:l,amountPayload:{amount:o.amount,currency_code:o.currencyCode,currency_symbol:o.currencySymbol}}))},onReimbursementDetailsChanged:o=>{e(Et({remiDetailLocalData:o,reimbursementId:n}))},saveRemiDetails:o=>{e(we(o,!1,n))},onUserBankDetailsUpdated:o=>{const{bankAccountSection:l}=o;e(wt({data:l}))},onFetchBankName:o=>{e(Ct(o))},submitRemiDetails:()=>{e(we("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:o=>{e(Ce({reimbursementId:o}))},updateInvoiceUploadFetchState:o=>{e(ce({reimbursementId:n,fetchState:o}))},clearTentativeNameForLine:o=>{e(kt({reimbursementId:n,lineId:o}))},removeDuplicateReimbursementForLine:o=>{e(At({lineId:o}))},onZeniLogoClick:()=>{d.toggle()},clearAddRemiAutoFields:o=>{e(vt({reimbursementId:n,lineId:o}))},redirectToReimbursementListScreen:()=>{e(Ne()),e(Ce({}));const o=at(i),l=q(m.state?.pathnameStackToGoBack,m.pathname);c(o,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(E.trackReimbursementDeleteReimbursement(n),e($e(n)))},onSaveBankAccount:()=>{a?.userId&&e(Rt(a?.userId,n))},onFetchLinkTokenClick:o=>{e(yt("user_reimbursement_account",o))},onEstablishConnectionClick:o=>{e(It(o,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:o=>{e(St(o,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,l)=>{o.trim().length>=2?e(gt({searchString:o,entityType:l,searchOrigin:"common"})):e(ke("common"))},onCancelAutoComplete:()=>{e(ke("common"))}}}}))(Cn);function Fe(){const e=Q(),t=ae(),n=J(),{reimbursementId:r}=ie(),m=Ye(),c=He(),d=g.useRef(!1),[i,a]=g.useState(r==null),[o,l]=g.useState(1),{useFeatureGate:p}=oe(),{isFeatureEnabled:I}=p(U.isLimitedCategoryForReimbursement),{isFeatureEnabled:u}=p(U.isShowDeletedReimbursementsFeatureEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:y}=Re({mobileExploreReferrer:"Reimbursement Details"}),B=J().pathname,D=B.includes("edit"),k=B.includes("reimbursement/new"),[C,R]=g.useState(!1),S=L.getSignedInUser(),w=A((b=>V(b))),h=A((b=>ge(b,r))),P=tt(w?.companyId,{clearParams:h.fetchState==="Completed"}),F=he(w?.userRole??[]);(function(){const b=ae(),M=A((K=>V(K))),O=M?.tenantId,{isApprovalRulesV3Enabled:X,isLoading:Y}=An(O),z=A((K=>K.remiSetupApproverViewState.fetchState));g.useEffect((()=>{O==null||Y||z==="Not-Started"&&b(ct(!0,!1,!1,X))}),[O,Y,X,z,b])})(),g.useEffect((()=>{(k&&!C||D&&!C&&h.fetchState!="Completed"&&h.fetchState!="In-Progress")&&(R(!0),t(Ue(!1,I,u,r)))}));const v=A((b=>dt(b.accountState,b.accountListState,"reimbursementAccountList")));if(S==null)throw Error("Can't access address page without signing in...");const _={pathname:`../${r}`,search:n.search};return h.fetchState==="Completed"&&(d.current=!0),h.isDeleted===!0||h.billStage=="paid"||h.billStage=="scheduled"||d.current===!1&&h.fetchState==="Not-Started"||F&&h.billStatus==="rejected"||F===!1&&h.billStage==="pending_approval"&&h.billStatus!=="rejected"?s.jsx($,{to:_}):d.current!==!1||h.deleteStatus.fetchState!=="In-Progress"&&h.fetchState==="Completed"?s.jsxs(Xn,{windowSize:c,children:[s.jsx(re,{analytics:E,onLoad:b=>(M=>{r!=null&&h.deleteStatus.fetchState!=="Completed"&&M.trackReimbursementEditReimbursement(r)})(b)}),i&&c!=="small"?s.jsx(zn,{}):null,i&&c!=="small"?s.jsx(Gn,{children:s.jsx(De,{showAutofill:i,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:w?.tenantId??""},onSkipAutofill:()=>a(!1),onInvoiceUpload:b=>{b!=null&&t(de(b,o,!0,r,S?.userId))},updateInvoiceUploadFetchState:b=>{t(ce({reimbursementId:r,fetchState:b}))},allowMultiFiles:i,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:j.sp3,paddingBottom:"15px",paddingLeft:j.sp5},dropFilePlaceholder:{upload:H.upload,single:ne.dropReceipt.single,or:H.texts.or,multiple:ne.dropReceipt.multiple,receipts:H.texts.receipts2}})}):null,i&&c==="small"?s.jsxs(Zn,{children:[s.jsx(Vn,{onClick:()=>a(!1),children:s.jsx(Mn,{})}),s.jsx(De,{showAutofill:i,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:w?.tenantId??""},onSkipAutofill:()=>a(!1),onInvoiceUpload:b=>{b!=null&&t(de(b,o,!0,r,S?.userId))},updateInvoiceUploadFetchState:b=>{t(ce({reimbursementId:r,fetchState:b}))},allowMultiFiles:i,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:j.sp5,paddingRight:j.sp3,paddingBottom:j.sp5,paddingLeft:j.sp3},dropFilePlaceholder:{upload:H.upload,single:ne.dropReceipt.single,or:H.texts.or,multiple:ne.dropReceipt.multiple,receipts:H.texts.receipts2}})]}):null,s.jsx(Yn,{windowSize:c,children:s.jsx(On,{initialOpenThreadRequest:P??void 0,location:n,navigate:e,currentTenant:w,reimbursementId:r,themeState:m,uncategorizedAccounts:v,disableInternalOverlay:!0,showSkipAutoFill:i,setShowSkipAutoFill:a,onCurrentLineIdForUploadChange:l,isAiCfoAccessEnabled:T,onAskAiCfoClick:y})})]}):s.jsx(We,{isNewReimbursement:r==null})}const Xn=N.div`
1
+ import{j as s}from"./liveblocks-BLpmr1Pv.js";import{u as ae,j as A,h as Q,g as J,i as ie,N as $,l as ee,q as lt,n as mt,o as x}from"./core-CbdTrw7T.js";import{fJ as V,Oy as ct,XD as ge,c8 as he,NE as Ue,mm as dt,NT as ce,NS as de,XE as ut,bm as fe,g_ as Le,XF as pt,VY as bt,mb as Pe,V_ as ke,VZ as gt,kZ as ht,Xu as ft,lc as St,Ns as It,CY as yt,l4 as Rt,Od as $e,XG as Ne,XH as Ce,XI as vt,XJ as At,XK as kt,NZ as we,li as Ct,XL as wt,NR as Et,NC as xt,XM as Bt,NB as Tt,XN as Dt,NJ as Ee,O1 as jt,O0 as Ft,NY as Ut,XO as _e,Tp as Lt,bn as Pt,NM as $t,Ov as Nt,XP as _t,XQ as Mt,O9 as Ot,O6 as xe,W_ as Xt,Nz as zt,XR as Me,OY as Be,P4 as Gt,XS as Zt,XT as W,XU as Vt,XV as Oe,XW as Yt,XX as Xe,XY as ze,Ol as ue,d1 as Ht,bL as Se,cF as Ie,er as Ge,eq as Ze,XZ as Wt,gl as qt,Xb as Jt,X_ as Kt,X$ as Ve,Xf as Qt,Y0 as en,Y1 as tn,Y2 as nn,P1 as Te,P0 as an,Y3 as sn,Y4 as on,Y5 as rn,Y6 as ln,Y7 as mn,Y8 as cn,OT as dn,OX as un,bp as pn,bK as bn,cz as gn,cm as hn,bs as fn,hb as Sn,ec as In,ef as yn,ee as Rn,cy as vn}from"./zeni-epic-state-C5DO1jkr.js";import{b0 as An,j as Ye,a2 as He,p as oe,_ as U,z as L,b1 as We,a9 as re,c as E,aM as De,N as j,af as se,ag as kn,G as qe,b2 as Cn,s as q,al as Je,b3 as wn,V as le,b4 as En,aC as xn,ac as Bn,a8 as ye,R as Ke,w as Tn,aP as Dn,aj as jn,az as Fn,b5 as Un,i as Ln}from"./index-DtThPd2q.js";import{n as N,S as Pn,u as Qe}from"./mui-DNGY4bFU.js";import pe from"./NotFoundScreen-uAMK84U0.js";import{S as je}from"./SetupPagesScreen-DRxKoFqN.js";import{F as et}from"./FeaturePreviewScreen-C15dgqam.js";import{a as g}from"./sentry-DWNq3t8E.js";import{u as Re}from"./useAskAiCfoHostNavButtonProps-DSKusWDa.js";import{u as tt}from"./useInitialThreadRequest-DrEeSZz_.js";import{D as $n}from"./DrawerScreen-Ba5DQb-t.js";import{M as nt}from"./MobileAppDrawer-CCAbxLE2.js";import{F as Nn}from"./FallBackRoute-Ba8DnNt0.js";import{R as _n}from"./ReimbursementApprovalRoutes-CujO88Gv.js";import"./recharts-CTh_JhT_.js";import"./analytics-Vgn85Ur_.js";import"./plaid-DhfTjhua.js";import"./dnd-DuiAlI7w.js";import"./stripe-cKAAJElX.js";import"./lottie-Lb1ftKY1.js";import"./lexical-B-vxEaRQ.js";import"./pdf-B1uD4Ovv.js";import"./utils-CrhrpmD8.js";import"./BusinessVerificationPageScreen-CdT5YCya.js";import"./routePaths-DXYV831_.js";import"./analyticsHelper-CVZpPd-a.js";import"./InboxNotificationsProvider-CiKEEv6Q.js";import"./useTaskManagerAccess-CT25hqtF.js";import"./useIsCustomersTabEnabled-C9FFBZXp.js";import"./useEnsureVendorListLoaded-CIShbpK4.js";import"./ReimbursementApprovalRuleDetailScreen-CHtkyq9-.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]="0a469b2d-d40b-421a-85f4-86fa2bd1c254",e._sentryDebugIdIdentifier="sentry-dbid-0a469b2d-d40b-421a-85f4-86fa2bd1c254")}catch{}})();const at=e=>`/${e}/reimbursements`,Mn=e=>g.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},g.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{common:H,spendManagement:{reimbursement:{reimbursementDetail:ne}}}=qe.getLocalizedStrings(),On=ee((function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),m=L.getSignedInUser(),c=fe(m),d=r.plaidConnectionDetails,i=Le(e.companyState,n),a=e.tenantState.currentTenantId,o={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:a??""},l=ge(e,t.reimbursementId),p=pt(e,m?.userId??"");let I=`${m?.firstName} ${m?.lastName}`,u=!0;t.reimbursementId!=null&&(I=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,u=m?.userId===l.createdBy?.userId);const T=e.entityAutoCompleteState?.autoCompleteText?.common,y=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:y},authParams:o,defaultCurrency:{currencySymbol:i?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:i?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:i?.company.configInfo.mileageRateConfig,createdBy:I,isUserAdmin:he(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:d,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:p.bankAccountCreationState,bankAccounts:p.bankAccounts,analytics:E,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:u,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Pe(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:m,navigate:c,themeState:d}=t,{tenantEmailDomain:i}=r,a=L.getSignedInUser();return{onReceiptsUpload:(o,l,p)=>{o!=null&&e(de(o,l,p,n,a?.userId))},onExistingMerchantChange:(o,l)=>{e(Ee(!1,l,n,o,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Ut(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Ft())},clearRemiSaveStatus:()=>{e(jt("Not-Started",n))},onDuplicateLineClick:(o,l)=>window.open(`/${i}/reimbursement/${o}#L${l}`),onNewMerchantChange:(o,l)=>{e(Ee(!1,l,n,void 0,o))},removeFileFromLine:o=>{e(Dt({lineId:o,reimbursementId:n}))},onAmountChanged:(o,l)=>{e(Tt(l,o,n))},updateReimbursementType:(o,l,p)=>{e(Bt({reimbursementId:p,lineId:l,reimbursementType:o}))},onHomeCurrencyConversionUpdate:(o,l,p)=>{e(xt({reimbursementId:p,lineId:l,amountPayload:{amount:o.amount,currency_code:o.currencyCode,currency_symbol:o.currencySymbol}}))},onReimbursementDetailsChanged:o=>{e(Et({remiDetailLocalData:o,reimbursementId:n}))},saveRemiDetails:o=>{e(we(o,!1,n))},onUserBankDetailsUpdated:o=>{const{bankAccountSection:l}=o;e(wt({data:l}))},onFetchBankName:o=>{e(Ct(o))},submitRemiDetails:()=>{e(we("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:o=>{e(Ce({reimbursementId:o}))},updateInvoiceUploadFetchState:o=>{e(ce({reimbursementId:n,fetchState:o}))},clearTentativeNameForLine:o=>{e(kt({reimbursementId:n,lineId:o}))},removeDuplicateReimbursementForLine:o=>{e(At({lineId:o}))},onZeniLogoClick:()=>{d.toggle()},clearAddRemiAutoFields:o=>{e(vt({reimbursementId:n,lineId:o}))},redirectToReimbursementListScreen:()=>{e(Ne()),e(Ce({}));const o=at(i),l=q(m.state?.pathnameStackToGoBack,m.pathname);c(o,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(E.trackReimbursementDeleteReimbursement(n),e($e(n)))},onSaveBankAccount:()=>{a?.userId&&e(Rt(a?.userId,n))},onFetchLinkTokenClick:o=>{e(yt("user_reimbursement_account",o))},onEstablishConnectionClick:o=>{e(It(o,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:o=>{e(St(o,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,l)=>{o.trim().length>=2?e(gt({searchString:o,entityType:l,searchOrigin:"common"})):e(ke("common"))},onCancelAutoComplete:()=>{e(ke("common"))}}}}))(Cn);function Fe(){const e=Q(),t=ae(),n=J(),{reimbursementId:r}=ie(),m=Ye(),c=He(),d=g.useRef(!1),[i,a]=g.useState(r==null),[o,l]=g.useState(1),{useFeatureGate:p}=oe(),{isFeatureEnabled:I}=p(U.isLimitedCategoryForReimbursement),{isFeatureEnabled:u}=p(U.isShowDeletedReimbursementsFeatureEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:y}=Re({mobileExploreReferrer:"Reimbursement Details"}),B=J().pathname,D=B.includes("edit"),k=B.includes("reimbursement/new"),[C,R]=g.useState(!1),S=L.getSignedInUser(),w=A((b=>V(b))),h=A((b=>ge(b,r))),P=tt(w?.companyId,{clearParams:h.fetchState==="Completed"}),F=he(w?.userRole??[]);(function(){const b=ae(),M=A((K=>V(K))),O=M?.tenantId,{isApprovalRulesV3Enabled:X,isLoading:Y}=An(O),z=A((K=>K.remiSetupApproverViewState.fetchState));g.useEffect((()=>{O==null||Y||z==="Not-Started"&&b(ct(!0,!1,!1,X))}),[O,Y,X,z,b])})(),g.useEffect((()=>{(k&&!C||D&&!C&&h.fetchState!="Completed"&&h.fetchState!="In-Progress")&&(R(!0),t(Ue(!1,I,u,r)))}));const v=A((b=>dt(b.accountState,b.accountListState,"reimbursementAccountList")));if(S==null)throw Error("Can't access address page without signing in...");const _={pathname:`../${r}`,search:n.search};return h.fetchState==="Completed"&&(d.current=!0),h.isDeleted===!0||h.billStage=="paid"||h.billStage=="scheduled"||d.current===!1&&h.fetchState==="Not-Started"||F&&h.billStatus==="rejected"||F===!1&&h.billStage==="pending_approval"&&h.billStatus!=="rejected"?s.jsx($,{to:_}):d.current!==!1||h.deleteStatus.fetchState!=="In-Progress"&&h.fetchState==="Completed"?s.jsxs(Xn,{windowSize:c,children:[s.jsx(re,{analytics:E,onLoad:b=>(M=>{r!=null&&h.deleteStatus.fetchState!=="Completed"&&M.trackReimbursementEditReimbursement(r)})(b)}),i&&c!=="small"?s.jsx(zn,{}):null,i&&c!=="small"?s.jsx(Gn,{children:s.jsx(De,{showAutofill:i,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:w?.tenantId??""},onSkipAutofill:()=>a(!1),onInvoiceUpload:b=>{b!=null&&t(de(b,o,!0,r,S?.userId))},updateInvoiceUploadFetchState:b=>{t(ce({reimbursementId:r,fetchState:b}))},allowMultiFiles:i,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:j.sp3,paddingBottom:"15px",paddingLeft:j.sp5},dropFilePlaceholder:{upload:H.upload,single:ne.dropReceipt.single,or:H.texts.or,multiple:ne.dropReceipt.multiple,receipts:H.texts.receipts2}})}):null,i&&c==="small"?s.jsxs(Zn,{children:[s.jsx(Vn,{onClick:()=>a(!1),children:s.jsx(Mn,{})}),s.jsx(De,{showAutofill:i,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:w?.tenantId??""},onSkipAutofill:()=>a(!1),onInvoiceUpload:b=>{b!=null&&t(de(b,o,!0,r,S?.userId))},updateInvoiceUploadFetchState:b=>{t(ce({reimbursementId:r,fetchState:b}))},allowMultiFiles:i,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:j.sp5,paddingRight:j.sp3,paddingBottom:j.sp5,paddingLeft:j.sp3},dropFilePlaceholder:{upload:H.upload,single:ne.dropReceipt.single,or:H.texts.or,multiple:ne.dropReceipt.multiple,receipts:H.texts.receipts2}})]}):null,s.jsx(Yn,{windowSize:c,children:s.jsx(On,{initialOpenThreadRequest:P??void 0,location:n,navigate:e,currentTenant:w,reimbursementId:r,themeState:m,uncategorizedAccounts:v,disableInternalOverlay:!0,showSkipAutoFill:i,setShowSkipAutoFill:a,onCurrentLineIdForUploadChange:l,isAiCfoAccessEnabled:T,onAskAiCfoClick:y})})]}):s.jsx(We,{isNewReimbursement:r==null})}const Xn=N.div`
2
2
  display: flex;
3
3
  position: relative;
4
4
  height: 100vh;
@@ -1 +1 @@
1
- import{j as f}from"./liveblocks-BLpmr1Pv.js";import{g as te,h as ve,u as Ve,i as Ye,j as _,l as Ue,n as xe,o as oe}from"./core-CbdTrw7T.js";import{fJ as X,E$ as S,Wo as ze,mb as ue,uG as he,vv as V,lS as O,l$ as D,lT as P,kW as A,kN as E,kM as Z,E2 as Y,vA as ye,bp as Ge,Wg as He,bm as Ne,Fn as $e,YY as qe,YZ as We,ca as R,DX as ne,Y_ as re,Y$ as Qe,Z0 as Je,Z1 as Xe,Z2 as Ke,Z3 as ea,Z4 as aa,Z5 as sa,Z6 as ta,Z7 as oa,Z8 as na,Z9 as ra,Za as la,Zb as j,Zc as U,Zd as x,Ze as z,Zf as G,Zg as H,Zh as N,Zi as $,Zj as q,Zk as W,ej as ca,F1 as ia,EP as le,EQ as ce,F7 as da,EU as ie,bF as k,W2 as de,d2 as pe,EV as _e,Fd as pa,Zl as _a,Zm as fa,Zn as ba,Zo as ma,Zp as ua,Zq as ha,Zr as ya,Zs as Ca,Zt as ga,Zu as wa,er as Ra,eq as Ia}from"./zeni-epic-state-C5DO1jkr.js";import{bp as Sa,at as Ta,bq as ja,g as ka,a2 as Fa,p as Ce,_ as Q,z as ge,aC as Oa,V as Da,a as Pa,ar as Aa,al as Ea,a9 as Za,c as J,R as Ma,E as Ba,s as we,br as La,ax as va,aj as Va}from"./index-CnIO6_IQ.js";import"./mui-DNGY4bFU.js";import Ya from"./NotFoundScreen-DXy-BCit.js";import{F as Ua}from"./FeaturePreviewScreen-DHt0WFS8.js";import{a as u}from"./sentry-DWNq3t8E.js";import{u as xa}from"./useInitialThreadRequest-DAUsQlCl.js";import{a as fe,c as be,b as za}from"./routePaths-CV12X_S-.js";import{t as me}from"./reportTimeframe-DeLnONFM.js";import{M as Ga}from"./MobileAppDrawer-BWNb5zLN.js";import"./recharts-CTh_JhT_.js";import"./analytics-Vgn85Ur_.js";import"./plaid-DhfTjhua.js";import"./dnd-DuiAlI7w.js";import"./stripe-cKAAJElX.js";import"./lottie-Lb1ftKY1.js";import"./lexical-B-vxEaRQ.js";import"./pdf-B1uD4Ovv.js";import"./utils-CrhrpmD8.js";import"./InboxNotificationsProvider-CiKEEv6Q.js";import"./useTaskManagerAccess-Cm5trA3i.js";import"./useIsCustomersTabEnabled-C6mkabn2.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]="86117baf-6ea2-47a0-9455-da8528525fce",e._sentryDebugIdIdentifier="sentry-dbid-86117baf-6ea2-47a0-9455-da8528525fce")}catch{}})();const Ha=["profit_loss","balance_sheet","cash_flow"],I=e=>e==="balance_sheet"||e==="balance_sheet_by_classes"||e==="balance_sheet_by_projects",h=e=>{e(W({resetLeftScroll:!0})),e(q({resetLeftScroll:!0})),e($({resetLeftScroll:!0})),e(N({resetLeftScroll:!0})),e(H({resetLeftScroll:!0})),e(G({resetLeftScroll:!0})),e(U({resetLeftScroll:!0})),e(z({resetLeftScroll:!0})),e(x({resetLeftScroll:!0}))},Na=e=>{e(fa()),e(ba()),e(ma()),e(ua()),e(ha()),e(ya()),e(Ca()),e(ga()),e(wa())},$a=Ue((function(e){const o=ge.getSignedInUser(),b=e.tenantState.currentTenantId,m=X(e),a=m?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:b??""},t=S(e),n=He(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:J,isZeniUser:Ne(o),showAccountGroups:n===!0,isAccountingClassesEnabled:ue(e),isAccountingProjectsEnabled:he(e),currentTenantCompanyName:a,statementEndPoint:`${Va}/statement`,authParams:s,isZeniCOAUsed:n}}),(function(e,o){const{navigate:b,handleDrawerToggle:m}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(V(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(_a(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(pa(a)),s){const{isCompareModeOn:n,filter:r}=o,{additionalBalances:i,balancesRange:d}=r;let c=[...i];a==="year"&&(c=c.filter((p=>p!=="this_period_vs_same_period_last_year"&&p!=="this_period_vs_same_period_last_year_percent"&&p!=="same_period_last_year"))),e(le(o.firstMonthOfFY,n,d.numberOfPeriods<1?1:d.numberOfPeriods,c)),i.length>0&&e(ce(o.firstMonthOfFY,c.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",d.numberOfPeriods<1?1:d.numberOfPeriods,c))}t!==!0&&setTimeout((()=>h(e)),50)},onInitialDateRangeAvailable:(a,s)=>{const{filter:t}=o,n=me(t.timeframe),r=k(a),i=k(s),d=de(o.firstMonthOfFY,n,{startDate:r,endDate:i})??t.balancesRange.numberOfPeriods,{startOfTimeframeFY:c,endOfTimeframeFY:p}=pe(i,o.firstMonthOfFY,n);e(_e({numberOfPeriods:d,orderBy:t.balancesRange.orderBy,thisPeriod:{startDate:c,endDate:p}}))},onCustomDateRangeChanged:(a,s,t)=>{const{filter:n}=o,r=me(t??n.timeframe);switch(o.selectedReportID){case"profit_and_loss":case"profit_and_loss_by_classes":e(ye(r,void 0,!0,!1,a,s)),o.selectedReportID==="profit_and_loss_by_classes"&&o.isAccountingClassesEnabled&&e(ne());break;case"profit_and_loss_by_projects":o.isAccountingProjectsEnabled&&e(Y());break;case"balance_sheet":e(Z(r,!0,!1,a,s));break;case"balance_sheet_by_classes":e(Z(r,!0,!1,a,s)),o.isAccountingClassesEnabled&&e(E());break;case"balance_sheet_by_projects":e(Z(r,!0,!1,a,s)),o.isAccountingProjectsEnabled&&e(A());break;case"cash_flow":e(O(r,!0,a,s));break;case"cash_flow_by_classes":e(O(r,!0,a,s)),o.isAccountingClassesEnabled&&e(P());break;case"cash_flow_by_projects":e(O(r,!0,a,s)),o.isAccountingProjectsEnabled&&e(D())}const i=k(a),d=k(s),c=de(o.firstMonthOfFY,r,{startDate:i,endDate:d})??n.balancesRange.numberOfPeriods,{startOfTimeframeFY:p,endOfTimeframeFY:M}=pe(d,o.firstMonthOfFY,r);e(_e({numberOfPeriods:c,orderBy:n.balancesRange.orderBy,thisPeriod:{startDate:p,endDate:M}})),h(e)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(j(a)),(I(a)||R(a))&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(ie({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(re({classViewLayout:"vertical"})),h(e)},onCOABalancesRangeChanged:(a,s)=>{e(ie(a,s)),h(e)},onThisPeriodChanged:(a,s,t)=>{e(da(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&h(e)},onAdditionalBalanceSelectionChanged:(a,s,t,n)=>{e(le(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(ce(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),n!==!0&&o.isCompareModeOn===a||setTimeout((()=>h(e)),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,n)=>{e(ia({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:n}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let n,r;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(n=s.balanceTimeFrame,r=ca(s)):s.balanceTimeFrame==="year"?(n="quarter",r={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),r!=null&&n!=null){const i=a.accountName===""?a.accountDescription:a.accountName,d=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return fe(o.tenantEmailDomain,a.accountId,a.accountType,i,n,r);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return be(o.tenantEmailDomain,a.accountId,a.accountType,s.id,i,n,r)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?za(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,i,n,r):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?be(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],i,n,r):a.accountType!=null?fe(o.tenantEmailDomain,a.accountId,a.accountType,i,n,r):void 0})();if(d!=null){const c=we(o.location.state?.pathnameStackToGoBack,o.location.pathname);b(d,{state:{pathnameStackToGoBack:c,referrer:F(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(W({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(q({scrollPosition:s}));break;case"profit_and_loss_by_projects":e($({scrollPosition:s}));break;case"balance_sheet":e(N({scrollPosition:s}));break;case"balance_sheet_by_classes":e(H({scrollPosition:s}));break;case"balance_sheet_by_projects":e(G({scrollPosition:s}));break;case"cash_flow_by_classes":e(z({scrollPosition:s}));break;case"cash_flow_by_projects":e(x({scrollPosition:s}));break;case"cash_flow":e(U({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(W({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(q({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e($({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(N({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_classes":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_projects":e(G({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_classes":e(z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_projects":e(x({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(U({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{b("../../")},onUpdateAccountViewMode:(a,s)=>{const t=s??o.selectedReportID,n=I(t),r=R(t);r?(e(sa({viewMode:a})),e(ta({viewMode:a}))):n?(e(oa({viewMode:a})),e(na({viewMode:a}))):(e(ra({viewMode:a})),e(la({viewMode:a}))),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",F(t)),e(j(r?"cash_flow_by_classes":n?"balance_sheet_by_classes":"profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",F(t)),e(j(r?"cash_flow_by_projects":n?"balance_sheet_by_projects":"profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",F(t)),e(j(r?"cash_flow":n?"balance_sheet":"profit_and_loss"))),h(e)},onUpdateClassesToFilterOut:a=>{R(o.selectedReportID)?e(Ke({classesToFilterOut:a})):I(o.selectedReportID)?e(ea({classesToFilterOut:a})):e(aa({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{R(o.selectedReportID)?e(Qe({projectsToFilterOut:a})):I(o.selectedReportID)?e(Je({projectsToFilterOut:a})):e(Xe({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(re({classViewLayout:a}))},onOpenAccountViewMode:()=>{const a=I(o.selectedReportID),s=R(o.selectedReportID);o.isAccountingClassesEnabled&&e(s?P():a?E():ne()),o.isAccountingProjectsEnabled&&e(s?D():a?A():Y())},onUpdateDisplayOrder:a=>{e(We(a))},onUpdateReportFormat:a=>{Na(e),e(qe(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"?$e(a==="profit_and_loss_by_projects"?"profit_and_loss_by_projects":"profit_and_loss_by_classes"):D(!0):P(!0):A(!0):E(!0))}}}))(La);function qa(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=ka(),b=Fa(),m=va(b),a=ve(),s=Ve(),t=te(),{tenantEmailDomain:n}=Ye(),{useFeatureGate:r}=Ce(),{isFeatureEnabled:i}=r(Q.isReportsHorizontalClassLayoutSwitchEnabled),{isFeatureEnabled:d}=r(Q.isReportsCustomDateRangeEnabled),c=ge.getSignedInUser(),[p,M]=u.useState(!1),[K,Re]=u.useState(!1);if(c==null)throw Error("Can't access reports page without signing in...");const B=_((l=>X(l))),Ie=B.masterTOSInfo?.isMasterTOSAccepted??!1,Se=B.company?.companyInfo.firstMonthOfFY??1,Te=xa(B?.companyId),g=_((l=>S(l).fetchState)),je=_((l=>ze(l))),{areTenantIdsInSync:y}=Oa(),L=_((l=>l.financeStatementState.selectedReportId)),T=_((l=>ue(l))),w=_((l=>he(l))),ke=_((l=>S(l).isCompareModeOn)),C=_((l=>S(l).filter)),v=_((l=>S(l).selectedReportAndTimeframeFetchState)),Fe=_((l=>l.profitAndLossClassesViewState.uiState.classViewLayout));u.useEffect((()=>{!p&&y&&(M(!0),s(V(c.userId,!0,!0,!1)))}),[p,c,s,y]),u.useEffect((()=>{p&&!K&&g==="Completed"&&y&&(s(V(c.userId,!1,!0,!1)),Re(!0))}),[p,K,g,y]),u.useEffect((()=>{if(p&&v.fetchState==="Not-Started"&&C.timeframe!=="free_range"&&C.timeframe!=="week"&&y)switch(L){case"profit_and_loss":case"profit_and_loss_by_classes":s(ye(C.timeframe));break;case"profit_and_loss_by_projects":w&&s(Y());break;case"balance_sheet":s(Z(C.timeframe));break;case"balance_sheet_by_classes":T&&s(E());break;case"balance_sheet_by_projects":w&&s(A());break;case"cash_flow_by_classes":T&&s(P());break;case"cash_flow_by_projects":w&&s(D());break;case"cash_flow":s(O(C.timeframe))}}),[p,L,v,y,T,w]);const ee=Da(),Oe=ee?.loggedInUserRole!=null&&Ge(ee?.loggedInUserRole)!==!0,[De,Pe]=u.useState(!1),ae=l=>{Pe(l)},Ae=Pa(),Ee=Aa();return(function(l){const{isDataReady:Ze}=l,{pathname:Me}=te(),se=Sa(Me??"")==="reports",Be=Ta(Ze),Le=u.useMemo((()=>se?Ha:void 0),[se]);ja({canFetchSuggestedQuestions:Be,pageContexts:Le})})({isDataReady:g==="Completed"}),Ea({isDataReady:g==="Completed"}),f.jsxs(f.Fragment,{children:[g==="Completed"?f.jsx(Za,{analytics:J,onLoad:l=>l.trackPageLoaded(Ma.Event.reports)}):null,f.jsx(Ga,{isAppContentDrawerOpen:De,handleDrawerToggle:ae}),f.jsx($a,{firstMonthOfFY:Se,tenantEmailDomain:n,location:t,navigate:a,windowSize:b,classViewLayout:Fe,selectedReportID:L,analytics:J,filter:C,isAccountingClassesEnabled:T,isAccountingProjectsEnabled:w,isCompareModeOn:ke,hasTransactionAccess:Oe,signedInUser:c,selectedReportAndTimeframeFetchState:v,handleDrawerToggle:ae,reportsResyncFetchState:je.reportsResyncFetchState,isAiCfoAccessEnabled:Ee&&Ae&&!e,onAskAiCfoClick:()=>{if(Ie)if(m){const l=we(t.state?.pathnameStackToGoBack,t.pathname);a(`/${n}/ai-cfo/explore`,{state:{pathnameStackToGoBack:l,referrer:"Reports"}})}else o(!0);else Ba({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:i,isCustomDateRangeEnabled:d,initialOpenThreadRequest:Te})]})}const F=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 Cs(){const e=_((s=>X(s))),{useFeatureGate:o}=Ce(),{isFeatureEnabled:b}=o(Q.isDebitCardFeatureEnabled),m=Ra(b,e),a=Ia(e);return m===!0||a===!0?f.jsx(Ua,{}):f.jsxs(xe,{children:[f.jsx(oe,{path:"/",element:f.jsx(qa,{})}),f.jsx(oe,{path:"*",element:f.jsx(Ya,{})})]})}export{Cs as default};
1
+ import{j as f}from"./liveblocks-BLpmr1Pv.js";import{g as te,h as ve,u as Ve,i as Ye,j as _,l as Ue,n as xe,o as oe}from"./core-CbdTrw7T.js";import{fJ as X,E$ as S,Wo as ze,mb as ue,uG as he,vv as V,lS as O,l$ as D,lT as P,kW as A,kN as E,kM as Z,E2 as Y,vA as ye,bp as Ge,Wg as He,bm as Ne,Fn as $e,YY as qe,YZ as We,ca as R,DX as ne,Y_ as re,Y$ as Qe,Z0 as Je,Z1 as Xe,Z2 as Ke,Z3 as ea,Z4 as aa,Z5 as sa,Z6 as ta,Z7 as oa,Z8 as na,Z9 as ra,Za as la,Zb as j,Zc as U,Zd as x,Ze as z,Zf as G,Zg as H,Zh as N,Zi as $,Zj as q,Zk as W,ej as ca,F1 as ia,EP as le,EQ as ce,F7 as da,EU as ie,bF as k,W2 as de,d2 as pe,EV as _e,Fd as pa,Zl as _a,Zm as fa,Zn as ba,Zo as ma,Zp as ua,Zq as ha,Zr as ya,Zs as Ca,Zt as ga,Zu as wa,er as Ra,eq as Ia}from"./zeni-epic-state-C5DO1jkr.js";import{bp as Sa,at as Ta,bq as ja,g as ka,a2 as Fa,p as Ce,_ as Q,z as ge,aC as Oa,V as Da,a as Pa,ar as Aa,al as Ea,a9 as Za,c as J,R as Ma,E as Ba,s as we,br as La,ax as va,aj as Va}from"./index-DtThPd2q.js";import"./mui-DNGY4bFU.js";import Ya from"./NotFoundScreen-uAMK84U0.js";import{F as Ua}from"./FeaturePreviewScreen-C15dgqam.js";import{a as u}from"./sentry-DWNq3t8E.js";import{u as xa}from"./useInitialThreadRequest-DrEeSZz_.js";import{a as fe,c as be,b as za}from"./routePaths-DXYV831_.js";import{t as me}from"./reportTimeframe-DeLnONFM.js";import{M as Ga}from"./MobileAppDrawer-CCAbxLE2.js";import"./recharts-CTh_JhT_.js";import"./analytics-Vgn85Ur_.js";import"./plaid-DhfTjhua.js";import"./dnd-DuiAlI7w.js";import"./stripe-cKAAJElX.js";import"./lottie-Lb1ftKY1.js";import"./lexical-B-vxEaRQ.js";import"./pdf-B1uD4Ovv.js";import"./utils-CrhrpmD8.js";import"./InboxNotificationsProvider-CiKEEv6Q.js";import"./useTaskManagerAccess-CT25hqtF.js";import"./useIsCustomersTabEnabled-C9FFBZXp.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]="86117baf-6ea2-47a0-9455-da8528525fce",e._sentryDebugIdIdentifier="sentry-dbid-86117baf-6ea2-47a0-9455-da8528525fce")}catch{}})();const Ha=["profit_loss","balance_sheet","cash_flow"],I=e=>e==="balance_sheet"||e==="balance_sheet_by_classes"||e==="balance_sheet_by_projects",h=e=>{e(W({resetLeftScroll:!0})),e(q({resetLeftScroll:!0})),e($({resetLeftScroll:!0})),e(N({resetLeftScroll:!0})),e(H({resetLeftScroll:!0})),e(G({resetLeftScroll:!0})),e(U({resetLeftScroll:!0})),e(z({resetLeftScroll:!0})),e(x({resetLeftScroll:!0}))},Na=e=>{e(fa()),e(ba()),e(ma()),e(ua()),e(ha()),e(ya()),e(Ca()),e(ga()),e(wa())},$a=Ue((function(e){const o=ge.getSignedInUser(),b=e.tenantState.currentTenantId,m=X(e),a=m?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:b??""},t=S(e),n=He(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:J,isZeniUser:Ne(o),showAccountGroups:n===!0,isAccountingClassesEnabled:ue(e),isAccountingProjectsEnabled:he(e),currentTenantCompanyName:a,statementEndPoint:`${Va}/statement`,authParams:s,isZeniCOAUsed:n}}),(function(e,o){const{navigate:b,handleDrawerToggle:m}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(V(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(_a(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(pa(a)),s){const{isCompareModeOn:n,filter:r}=o,{additionalBalances:i,balancesRange:d}=r;let c=[...i];a==="year"&&(c=c.filter((p=>p!=="this_period_vs_same_period_last_year"&&p!=="this_period_vs_same_period_last_year_percent"&&p!=="same_period_last_year"))),e(le(o.firstMonthOfFY,n,d.numberOfPeriods<1?1:d.numberOfPeriods,c)),i.length>0&&e(ce(o.firstMonthOfFY,c.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",d.numberOfPeriods<1?1:d.numberOfPeriods,c))}t!==!0&&setTimeout((()=>h(e)),50)},onInitialDateRangeAvailable:(a,s)=>{const{filter:t}=o,n=me(t.timeframe),r=k(a),i=k(s),d=de(o.firstMonthOfFY,n,{startDate:r,endDate:i})??t.balancesRange.numberOfPeriods,{startOfTimeframeFY:c,endOfTimeframeFY:p}=pe(i,o.firstMonthOfFY,n);e(_e({numberOfPeriods:d,orderBy:t.balancesRange.orderBy,thisPeriod:{startDate:c,endDate:p}}))},onCustomDateRangeChanged:(a,s,t)=>{const{filter:n}=o,r=me(t??n.timeframe);switch(o.selectedReportID){case"profit_and_loss":case"profit_and_loss_by_classes":e(ye(r,void 0,!0,!1,a,s)),o.selectedReportID==="profit_and_loss_by_classes"&&o.isAccountingClassesEnabled&&e(ne());break;case"profit_and_loss_by_projects":o.isAccountingProjectsEnabled&&e(Y());break;case"balance_sheet":e(Z(r,!0,!1,a,s));break;case"balance_sheet_by_classes":e(Z(r,!0,!1,a,s)),o.isAccountingClassesEnabled&&e(E());break;case"balance_sheet_by_projects":e(Z(r,!0,!1,a,s)),o.isAccountingProjectsEnabled&&e(A());break;case"cash_flow":e(O(r,!0,a,s));break;case"cash_flow_by_classes":e(O(r,!0,a,s)),o.isAccountingClassesEnabled&&e(P());break;case"cash_flow_by_projects":e(O(r,!0,a,s)),o.isAccountingProjectsEnabled&&e(D())}const i=k(a),d=k(s),c=de(o.firstMonthOfFY,r,{startDate:i,endDate:d})??n.balancesRange.numberOfPeriods,{startOfTimeframeFY:p,endOfTimeframeFY:M}=pe(d,o.firstMonthOfFY,r);e(_e({numberOfPeriods:c,orderBy:n.balancesRange.orderBy,thisPeriod:{startDate:p,endDate:M}})),h(e)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(j(a)),(I(a)||R(a))&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(ie({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(re({classViewLayout:"vertical"})),h(e)},onCOABalancesRangeChanged:(a,s)=>{e(ie(a,s)),h(e)},onThisPeriodChanged:(a,s,t)=>{e(da(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&h(e)},onAdditionalBalanceSelectionChanged:(a,s,t,n)=>{e(le(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(ce(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),n!==!0&&o.isCompareModeOn===a||setTimeout((()=>h(e)),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,n)=>{e(ia({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:n}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let n,r;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(n=s.balanceTimeFrame,r=ca(s)):s.balanceTimeFrame==="year"?(n="quarter",r={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),r!=null&&n!=null){const i=a.accountName===""?a.accountDescription:a.accountName,d=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return fe(o.tenantEmailDomain,a.accountId,a.accountType,i,n,r);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return be(o.tenantEmailDomain,a.accountId,a.accountType,s.id,i,n,r)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?za(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,i,n,r):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?be(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],i,n,r):a.accountType!=null?fe(o.tenantEmailDomain,a.accountId,a.accountType,i,n,r):void 0})();if(d!=null){const c=we(o.location.state?.pathnameStackToGoBack,o.location.pathname);b(d,{state:{pathnameStackToGoBack:c,referrer:F(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(W({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(q({scrollPosition:s}));break;case"profit_and_loss_by_projects":e($({scrollPosition:s}));break;case"balance_sheet":e(N({scrollPosition:s}));break;case"balance_sheet_by_classes":e(H({scrollPosition:s}));break;case"balance_sheet_by_projects":e(G({scrollPosition:s}));break;case"cash_flow_by_classes":e(z({scrollPosition:s}));break;case"cash_flow_by_projects":e(x({scrollPosition:s}));break;case"cash_flow":e(U({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(W({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(q({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e($({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(N({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_classes":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_projects":e(G({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_classes":e(z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_projects":e(x({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(U({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{b("../../")},onUpdateAccountViewMode:(a,s)=>{const t=s??o.selectedReportID,n=I(t),r=R(t);r?(e(sa({viewMode:a})),e(ta({viewMode:a}))):n?(e(oa({viewMode:a})),e(na({viewMode:a}))):(e(ra({viewMode:a})),e(la({viewMode:a}))),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",F(t)),e(j(r?"cash_flow_by_classes":n?"balance_sheet_by_classes":"profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",F(t)),e(j(r?"cash_flow_by_projects":n?"balance_sheet_by_projects":"profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",F(t)),e(j(r?"cash_flow":n?"balance_sheet":"profit_and_loss"))),h(e)},onUpdateClassesToFilterOut:a=>{R(o.selectedReportID)?e(Ke({classesToFilterOut:a})):I(o.selectedReportID)?e(ea({classesToFilterOut:a})):e(aa({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{R(o.selectedReportID)?e(Qe({projectsToFilterOut:a})):I(o.selectedReportID)?e(Je({projectsToFilterOut:a})):e(Xe({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(re({classViewLayout:a}))},onOpenAccountViewMode:()=>{const a=I(o.selectedReportID),s=R(o.selectedReportID);o.isAccountingClassesEnabled&&e(s?P():a?E():ne()),o.isAccountingProjectsEnabled&&e(s?D():a?A():Y())},onUpdateDisplayOrder:a=>{e(We(a))},onUpdateReportFormat:a=>{Na(e),e(qe(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"?$e(a==="profit_and_loss_by_projects"?"profit_and_loss_by_projects":"profit_and_loss_by_classes"):D(!0):P(!0):A(!0):E(!0))}}}))(La);function qa(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=ka(),b=Fa(),m=va(b),a=ve(),s=Ve(),t=te(),{tenantEmailDomain:n}=Ye(),{useFeatureGate:r}=Ce(),{isFeatureEnabled:i}=r(Q.isReportsHorizontalClassLayoutSwitchEnabled),{isFeatureEnabled:d}=r(Q.isReportsCustomDateRangeEnabled),c=ge.getSignedInUser(),[p,M]=u.useState(!1),[K,Re]=u.useState(!1);if(c==null)throw Error("Can't access reports page without signing in...");const B=_((l=>X(l))),Ie=B.masterTOSInfo?.isMasterTOSAccepted??!1,Se=B.company?.companyInfo.firstMonthOfFY??1,Te=xa(B?.companyId),g=_((l=>S(l).fetchState)),je=_((l=>ze(l))),{areTenantIdsInSync:y}=Oa(),L=_((l=>l.financeStatementState.selectedReportId)),T=_((l=>ue(l))),w=_((l=>he(l))),ke=_((l=>S(l).isCompareModeOn)),C=_((l=>S(l).filter)),v=_((l=>S(l).selectedReportAndTimeframeFetchState)),Fe=_((l=>l.profitAndLossClassesViewState.uiState.classViewLayout));u.useEffect((()=>{!p&&y&&(M(!0),s(V(c.userId,!0,!0,!1)))}),[p,c,s,y]),u.useEffect((()=>{p&&!K&&g==="Completed"&&y&&(s(V(c.userId,!1,!0,!1)),Re(!0))}),[p,K,g,y]),u.useEffect((()=>{if(p&&v.fetchState==="Not-Started"&&C.timeframe!=="free_range"&&C.timeframe!=="week"&&y)switch(L){case"profit_and_loss":case"profit_and_loss_by_classes":s(ye(C.timeframe));break;case"profit_and_loss_by_projects":w&&s(Y());break;case"balance_sheet":s(Z(C.timeframe));break;case"balance_sheet_by_classes":T&&s(E());break;case"balance_sheet_by_projects":w&&s(A());break;case"cash_flow_by_classes":T&&s(P());break;case"cash_flow_by_projects":w&&s(D());break;case"cash_flow":s(O(C.timeframe))}}),[p,L,v,y,T,w]);const ee=Da(),Oe=ee?.loggedInUserRole!=null&&Ge(ee?.loggedInUserRole)!==!0,[De,Pe]=u.useState(!1),ae=l=>{Pe(l)},Ae=Pa(),Ee=Aa();return(function(l){const{isDataReady:Ze}=l,{pathname:Me}=te(),se=Sa(Me??"")==="reports",Be=Ta(Ze),Le=u.useMemo((()=>se?Ha:void 0),[se]);ja({canFetchSuggestedQuestions:Be,pageContexts:Le})})({isDataReady:g==="Completed"}),Ea({isDataReady:g==="Completed"}),f.jsxs(f.Fragment,{children:[g==="Completed"?f.jsx(Za,{analytics:J,onLoad:l=>l.trackPageLoaded(Ma.Event.reports)}):null,f.jsx(Ga,{isAppContentDrawerOpen:De,handleDrawerToggle:ae}),f.jsx($a,{firstMonthOfFY:Se,tenantEmailDomain:n,location:t,navigate:a,windowSize:b,classViewLayout:Fe,selectedReportID:L,analytics:J,filter:C,isAccountingClassesEnabled:T,isAccountingProjectsEnabled:w,isCompareModeOn:ke,hasTransactionAccess:Oe,signedInUser:c,selectedReportAndTimeframeFetchState:v,handleDrawerToggle:ae,reportsResyncFetchState:je.reportsResyncFetchState,isAiCfoAccessEnabled:Ee&&Ae&&!e,onAskAiCfoClick:()=>{if(Ie)if(m){const l=we(t.state?.pathnameStackToGoBack,t.pathname);a(`/${n}/ai-cfo/explore`,{state:{pathnameStackToGoBack:l,referrer:"Reports"}})}else o(!0);else Ba({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:i,isCustomDateRangeEnabled:d,initialOpenThreadRequest:Te})]})}const F=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 Cs(){const e=_((s=>X(s))),{useFeatureGate:o}=Ce(),{isFeatureEnabled:b}=o(Q.isDebitCardFeatureEnabled),m=Ra(b,e),a=Ia(e);return m===!0||a===!0?f.jsx(Ua,{}):f.jsxs(xe,{children:[f.jsx(oe,{path:"/",element:f.jsx(qa,{})}),f.jsx(oe,{path:"*",element:f.jsx(Ya,{})})]})}export{Cs as default};
@@ -1 +1 @@
1
- import{j as a}from"./liveblocks-BLpmr1Pv.js";import{z as b,a9 as v,c as f,R as S,ed as k,p as C,_ as I}from"./index-CnIO6_IQ.js";import"./mui-DNGY4bFU.js";import g from"./NotFoundScreen-DXy-BCit.js";import{a as m}from"./sentry-DWNq3t8E.js";import{u as D,j as h,h as F,g as L,l as _,n as P,o as d,N as y}from"./core-CbdTrw7T.js";import{fJ as T,a3N as j,a3O as p,EG as U,qt as V,a3P as G,EE as R}from"./zeni-epic-state-C5DO1jkr.js";import"./recharts-CTh_JhT_.js";import"./analytics-Vgn85Ur_.js";import"./plaid-DhfTjhua.js";import"./dnd-DuiAlI7w.js";import"./stripe-cKAAJElX.js";import"./lottie-Lb1ftKY1.js";import"./lexical-B-vxEaRQ.js";import"./pdf-B1uD4Ovv.js";import"./utils-CrhrpmD8.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]="5b9c6d1e-127a-40c2-96cb-a51258bc5a23",e._sentryDebugIdIdentifier="sentry-dbid-5b9c6d1e-127a-40c2-96cb-a51258bc5a23")}catch{}})();const q=_((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((c=>{s.push(c.companyName),r.push(c.emailIds[0])})),f.trackInviteEmailClicked("send",s,r,s.length)}e(R())},onUpdateInviteFormLocalData:s=>{e(G({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&f.trackInviteEmailClicked("cancel")}}}))(k),z=()=>{const e=D(),[t,n]=m.useState(!1),[i,s]=m.useState(!1),r=h((o=>T(o))),c=F(),w=L(),u=b.getSignedInUser();if(u==null)throw Error("Can't access invite referral screen without signing in...");const l=h((o=>j(o))),x=u?.firstName!=null?u.firstName:"User";m.useEffect((()=>{e(p()),r?.rewardsLastViewedTime==null&&i===!1&&(e(U()),s(!0))}),[]),m.useEffect((()=>{t||l.fetchState!=="Not-Started"||(n(!0),e(V(!0)))}),[l.fetchState,e]);const E=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[l.fetchState==="Completed"?a.jsx(v,{analytics:f,onLoad:o=>(N=>N.trackPageLoaded(S.Event.inviteEmailViewed))(o)}):null,a.jsx(q,{navigate:c,location:w,currentTenant:r,companyName:E,userName:x,inviteFormCompayData:l.localData})]})};function ne(){const{useFeatureGate:e}=C(),{isFeatureEnabled:t}=e(I.isReferralFeatureEnabled);return a.jsxs(P,{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(z,{}):a.jsx(g,{})}),a.jsx(d,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};
1
+ import{j as a}from"./liveblocks-BLpmr1Pv.js";import{z as b,a9 as v,c as f,R as S,ed as k,p as C,_ as I}from"./index-DtThPd2q.js";import"./mui-DNGY4bFU.js";import g from"./NotFoundScreen-uAMK84U0.js";import{a as m}from"./sentry-DWNq3t8E.js";import{u as D,j as h,h as F,g as L,l as _,n as P,o as d,N as y}from"./core-CbdTrw7T.js";import{fJ as T,a3N as j,a3O as p,EG as U,qt as V,a3P as G,EE as R}from"./zeni-epic-state-C5DO1jkr.js";import"./recharts-CTh_JhT_.js";import"./analytics-Vgn85Ur_.js";import"./plaid-DhfTjhua.js";import"./dnd-DuiAlI7w.js";import"./stripe-cKAAJElX.js";import"./lottie-Lb1ftKY1.js";import"./lexical-B-vxEaRQ.js";import"./pdf-B1uD4Ovv.js";import"./utils-CrhrpmD8.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]="5b9c6d1e-127a-40c2-96cb-a51258bc5a23",e._sentryDebugIdIdentifier="sentry-dbid-5b9c6d1e-127a-40c2-96cb-a51258bc5a23")}catch{}})();const q=_((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((c=>{s.push(c.companyName),r.push(c.emailIds[0])})),f.trackInviteEmailClicked("send",s,r,s.length)}e(R())},onUpdateInviteFormLocalData:s=>{e(G({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&f.trackInviteEmailClicked("cancel")}}}))(k),z=()=>{const e=D(),[t,n]=m.useState(!1),[i,s]=m.useState(!1),r=h((o=>T(o))),c=F(),w=L(),u=b.getSignedInUser();if(u==null)throw Error("Can't access invite referral screen without signing in...");const l=h((o=>j(o))),x=u?.firstName!=null?u.firstName:"User";m.useEffect((()=>{e(p()),r?.rewardsLastViewedTime==null&&i===!1&&(e(U()),s(!0))}),[]),m.useEffect((()=>{t||l.fetchState!=="Not-Started"||(n(!0),e(V(!0)))}),[l.fetchState,e]);const E=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[l.fetchState==="Completed"?a.jsx(v,{analytics:f,onLoad:o=>(N=>N.trackPageLoaded(S.Event.inviteEmailViewed))(o)}):null,a.jsx(q,{navigate:c,location:w,currentTenant:r,companyName:E,userName:x,inviteFormCompayData:l.localData})]})};function ne(){const{useFeatureGate:e}=C(),{isFeatureEnabled:t}=e(I.isReferralFeatureEnabled);return a.jsxs(P,{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(z,{}):a.jsx(g,{})}),a.jsx(d,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};
@@ -1,4 +1,4 @@
1
- import{j as E}from"./liveblocks-BLpmr1Pv.js";import{a as v}from"./sentry-DWNq3t8E.js";import{i as $,u as H,h as Q,g as ee,j as r,l as te}from"./core-CbdTrw7T.js";import{_T as Ge,$7 as Ve,mb as ae,s$ as Me,tb as $e,tr as Re,tp as Fe,ts as Ke,tu as Ue,a0T as Ye,fJ as K,$X as pe,a0U as Se,h3 as ne,ct as le,cu as se,G5 as ve,a0V as Ce,G9 as qe,gT as ce,t2 as ze,tD as Ze,dq as We,dp as Xe,Ug as fe,G3 as He,FZ as Qe,VY as De,FR as et,FQ as tt,FL as at,FW as nt,Ga as lt,V_ as Y,VZ as ge,FS as st,$Y as oe,Gq as Ae,Gj as Ie,a0W as xe,t5 as Te,Gd as be,Gb as Be,a0X as Le,Gx as Je,Gu as we,Ge as je,Gw as _e}from"./zeni-epic-state-C5DO1jkr.js";import{a5 as de,cG as ie,cH as ct,z as ot,o as dt,a8 as it,a9 as ue,c as N,aj as ut,cI as rt,s as V,G as ye,j as Ee,cJ as ht,cK as mt,cL as pt}from"./index-CnIO6_IQ.js";import{n as re}from"./mui-DNGY4bFU.js";import{p as St}from"./pathToGoBack-CJCquoqC.js";import{a as ft}from"./useActualMatchingMatchDetail-D-Ym3wTm.js";import X from"./NotFoundScreen-DXy-BCit.js";import{t as M}from"./routePaths-CV12X_S-.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]="b849bd5e-bffb-400e-9679-9a8aaa690f3b",e._sentryDebugIdIdentifier="sentry-dbid-b849bd5e-bffb-400e-9679-9a8aaa690f3b")}catch{}})();function Ut({isRenderedInPanel:e=!1,accrualIdOverride:t,onPanelNavigateBack:c}={}){const{accrualId:l}=$(),s=t??l,n=H(),i=Q(),a=ee(),{accrual:d,actionFetchState:o,detailFetchState:h,localData:A}=r((u=>Ge(u,s??""))),m=r((u=>Ve(u))),C=r((u=>ae(u))),y=ft(),S=v.useCallback((()=>{const u=de(a.state?.pathnameStackToGoBack);i(u.poppedPathname??St(4),{state:{pathnameStackToGoBack:u.newStack}})}),[a.state,i]),I=v.useRef(!1);return v.useEffect((()=>{o.fetchState!=="In-Progress"&&I.current&&o.fetchState==="Completed"&&(I.current=!1,S())}),[o.fetchState,S]),v.useEffect((()=>{s!=null&&d==null&&h.fetchState==="Not-Started"&&n(Me(s))}),[s,d,h.fetchState]),v.useEffect((()=>{n($e({scheduleType:"prepaid_expenses",shouldResetEnteredData:!1}))}),[n]),s==null?E.jsx(X,{}):d==null?h.fetchState==="Not-Started"||h.fetchState==="In-Progress"?E.jsx(ie,{}):E.jsx(X,{}):E.jsx(Dt,{children:E.jsx(ct,{isRenderedInPanel:e,accrual:d,actionFetchState:o.fetchState,isAccountingClassesEnabled:C,localData:A,newAccrualAccountsView:m,onAccrualFormChange:(u,f)=>{n(Ye({accrualId:u,localData:f}))},onAccrualFormClear:u=>{n(Ue({accrualId:u}))},onApproveAndPost:u=>{n(Ke(s,u))},onNavigateBack:c??S,onOpenJournalEntry:y,onRevert:(u,f)=>{I.current=!0,n(Fe(s,u,f))},onSkip:(u,f)=>{n(Re(s,u,f))}})})}const Dt=re.div`
1
+ import{j as E}from"./liveblocks-BLpmr1Pv.js";import{a as v}from"./sentry-DWNq3t8E.js";import{i as $,u as H,h as Q,g as ee,j as r,l as te}from"./core-CbdTrw7T.js";import{_T as Ge,$7 as Ve,mb as ae,s$ as Me,tb as $e,tr as Re,tp as Fe,ts as Ke,tu as Ue,a0T as Ye,fJ as K,$X as pe,a0U as Se,h3 as ne,ct as le,cu as se,G5 as ve,a0V as Ce,G9 as qe,gT as ce,t2 as ze,tD as Ze,dq as We,dp as Xe,Ug as fe,G3 as He,FZ as Qe,VY as De,FR as et,FQ as tt,FL as at,FW as nt,Ga as lt,V_ as Y,VZ as ge,FS as st,$Y as oe,Gq as Ae,Gj as Ie,a0W as xe,t5 as Te,Gd as be,Gb as Be,a0X as Le,Gx as Je,Gu as we,Ge as je,Gw as _e}from"./zeni-epic-state-C5DO1jkr.js";import{a5 as de,cG as ie,cH as ct,z as ot,o as dt,a8 as it,a9 as ue,c as N,aj as ut,cI as rt,s as V,G as ye,j as Ee,cJ as ht,cK as mt,cL as pt}from"./index-DtThPd2q.js";import{n as re}from"./mui-DNGY4bFU.js";import{p as St}from"./pathToGoBack-CJCquoqC.js";import{a as ft}from"./useActualMatchingMatchDetail-D9tjidmB.js";import X from"./NotFoundScreen-uAMK84U0.js";import{t as M}from"./routePaths-DXYV831_.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]="b849bd5e-bffb-400e-9679-9a8aaa690f3b",e._sentryDebugIdIdentifier="sentry-dbid-b849bd5e-bffb-400e-9679-9a8aaa690f3b")}catch{}})();function Ut({isRenderedInPanel:e=!1,accrualIdOverride:t,onPanelNavigateBack:c}={}){const{accrualId:l}=$(),s=t??l,n=H(),i=Q(),a=ee(),{accrual:d,actionFetchState:o,detailFetchState:h,localData:A}=r((u=>Ge(u,s??""))),m=r((u=>Ve(u))),C=r((u=>ae(u))),y=ft(),S=v.useCallback((()=>{const u=de(a.state?.pathnameStackToGoBack);i(u.poppedPathname??St(4),{state:{pathnameStackToGoBack:u.newStack}})}),[a.state,i]),I=v.useRef(!1);return v.useEffect((()=>{o.fetchState!=="In-Progress"&&I.current&&o.fetchState==="Completed"&&(I.current=!1,S())}),[o.fetchState,S]),v.useEffect((()=>{s!=null&&d==null&&h.fetchState==="Not-Started"&&n(Me(s))}),[s,d,h.fetchState]),v.useEffect((()=>{n($e({scheduleType:"prepaid_expenses",shouldResetEnteredData:!1}))}),[n]),s==null?E.jsx(X,{}):d==null?h.fetchState==="Not-Started"||h.fetchState==="In-Progress"?E.jsx(ie,{}):E.jsx(X,{}):E.jsx(Dt,{children:E.jsx(ct,{isRenderedInPanel:e,accrual:d,actionFetchState:o.fetchState,isAccountingClassesEnabled:C,localData:A,newAccrualAccountsView:m,onAccrualFormChange:(u,f)=>{n(Ye({accrualId:u,localData:f}))},onAccrualFormClear:u=>{n(Ue({accrualId:u}))},onApproveAndPost:u=>{n(Ke(s,u))},onNavigateBack:c??S,onOpenJournalEntry:y,onRevert:(u,f)=>{I.current=!0,n(Fe(s,u,f))},onSkip:(u,f)=>{n(Re(s,u,f))}})})}const Dt=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/ReportsRoutes-C7A0Ycu_.js","assets/sentry-DWNq3t8E.js","assets/core-CbdTrw7T.js","assets/zeni-epic-state-C5DO1jkr.js","assets/index-CnIO6_IQ.js","assets/mui-DNGY4bFU.js","assets/analytics-Vgn85Ur_.js","assets/utils-CrhrpmD8.js","assets/NotFoundScreen-DXy-BCit.js","assets/FeaturePreviewScreen-DHt0WFS8.js","assets/useInitialThreadRequest-DAUsQlCl.js","assets/routePaths-CV12X_S-.js","assets/reportTimeframe-DeLnONFM.js","assets/MobileAppDrawer-BWNb5zLN.js","assets/InboxNotificationsProvider-CiKEEv6Q.js","assets/useTaskManagerAccess-Cm5trA3i.js","assets/useIsCustomersTabEnabled-C6mkabn2.js","assets/index-BQ3cXEYt.css","assets/AddressRoutes-CVWN9CJv.js","assets/AddressScreen-DgUwrml_.js","assets/PeopleRoutes-kralZgbz.js","assets/useAskAiCfoHostNavButtonProps-DXFswt7R.js","assets/PandLWithForecastRoutes-Dm5Vnr71.js","assets/CustomerOnboardingRoutes-C0b805o-.js","assets/QBOConnectionScreen-DroXrkno.js","assets/empty-CjoB5KP4.js","assets/index-LGKtWUy9.js","assets/url-B2x9G6No.js","assets/index-BNFAuGus.js","assets/decodeURIComponentSafe-D7APy95S.js","assets/useEmailConnectResultRefresh-qgk6N8cm.js","assets/useChargeCardPusherEvents-Cq6Y4mMW.js","assets/VendorsRoutes-jETcYESc.js","assets/ScheduleDetailsPrepaidExpensesScreen-ZwdXW6K5.js","assets/pathToGoBack-CJCquoqC.js","assets/useActualMatchingMatchDetail-D-Ym3wTm.js","assets/stripSplatSuffix-DP9nmQOu.js","assets/DrawerScreen-BHaectiO.js","assets/accountMappingHelper-DSd2V454.js","assets/CustomersRoutes-DD5Gx1mW.js","assets/TransactionDetailRoutes-D-b6zdg4.js","assets/useEnsureVendorListLoaded-CIShbpK4.js","assets/TransactionDetailScreen-JBKbtouq.js","assets/expenseAutomationHelper-CgTsmmCm.js","assets/EntityDetailRoutes-BJzuW7dq.js","assets/withTransactionSidePanel-D-hDwbdr.js","assets/DashboardRoutes-C8RZkkYj.js","assets/analyticsHelper-CWMk7_rd.js","assets/CompanyPassportScreen-BLtXgkEd.js","assets/useAiCfoDashboardSuggestedQuestionsChips-Dqg5VVaq.js","assets/BillPayRoutes-HAS0-pNc.js","assets/DomesticWireDetailScreen-BxClNf2J.js","assets/BusinessVerificationPageScreen-DM_jBIuD.js","assets/SetupPagesScreen-D6ssIWb0.js","assets/BillPayApprovalRoutes-BcCgse3-.js","assets/ReimbursementApprovalRuleDetailScreen-CHTcY28V.js","assets/FallBackRoute-DuMHkNqk.js","assets/SettingsRoutes-_XBnyBgG.js","assets/AccountMappingScreen-C5mOiJ2U.js","assets/ReimbursementApprovalRoutes-B2ftFL0O.js","assets/InvoicingRoutes-Bsq4ym98.js","assets/ReimbursementRoutes-CI3m7PHD.js","assets/ZeniAccountRoutes-C8cr5UMy.js","assets/ZeniAccountStatementScreen-DAs1_LIC.js","assets/TreasuryRoutes-CgHwdyKd.js","assets/TransactionListRoutes-THtfycHC.js","assets/ChargeCardRoutes-DgtmFgR6.js","assets/NotificationRoutes-B2xHVaqf.js","assets/PerformanceRoutes-DJhuo9qY.js","assets/ExpenseAutomationRoutes-BKrWZyYV.js","assets/ActualMatchingMatchDetailScreen-wHD8fSWU.js","assets/RewardsRoutes-Dkg4zGB8.js","assets/TaskRoutes-D6cEqDZN.js","assets/TaskListScreen-Bmj5V_dR.js","assets/useTaskManagerPusherEvents-C1gzc-aA.js","assets/AiCfoScreen-yDQ2sphg.js","assets/CardsAiCfoScreen-yrI2CL7M.js"])))=>i.map(i=>d[i]);
2
- import{bm as hs,fJ as _s,er as ps,eq as xs,h8 as js,d4 as Es,c8 as gs,gN as Is,gd as Rs,eh as xe,cz as As,gr as Ts,cq as fs,bF as bs,bw as ys,h9 as ws,v as Cs,ha as Ds,bp as vs,hb as Us,bL as ks,bK as Fs,bs as Os,cm as Ps,hc as Hs,hd as Ss,ec as Bs,ef as Ls,ee as Ns,cy as Vs,cF as Zs,he as je,gm as Ee,h1 as Ms,go as ge,gP as Ie,gQ as Re,gp as zs,_ as r}from"./zeni-epic-state-C5DO1jkr.js";import{j as e}from"./liveblocks-BLpmr1Pv.js";import{a as U}from"./sentry-DWNq3t8E.js";import{u as Gs,h as $s,i as Ys,g as qs,j as z,q as Ae,N as d,n as Ws,o as s}from"./core-CbdTrw7T.js";import{u as Ks,z as f,p as Js,a as Qs,h as Xs,_ as L,i as en,K as sn,V as nn,L as F,G as Te,t as c,b as an,P as tn,c as ae,r as on,l as i,d as rn,Z as ln}from"./index-CnIO6_IQ.js";import{u as dn}from"./mui-DNGY4bFU.js";import{f as fe}from"./analyticsHelper-CWMk7_rd.js";import{t as cn}from"./getLocaleForTenant-B8EqveGi.js";import{u as un}from"./useIsCustomersTabEnabled-C6mkabn2.js";import{F as C}from"./FallBackRoute-DuMHkNqk.js";import"./recharts-CTh_JhT_.js";import"./analytics-Vgn85Ur_.js";import"./plaid-DhfTjhua.js";import"./dnd-DuiAlI7w.js";import"./stripe-cKAAJElX.js";import"./lottie-Lb1ftKY1.js";import"./lexical-B-vxEaRQ.js";import"./pdf-B1uD4Ovv.js";import"./utils-CrhrpmD8.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},b=new l.Error().stack;b&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[b]="1c231a9c-a720-4a84-9133-c2aa76ffe40d",l._sentryDebugIdIdentifier="sentry-dbid-1c231a9c-a720-4a84-9133-c2aa76ffe40d")}catch{}})();const mn=i((()=>r((()=>import("./ReportsRoutes-C7A0Ycu_.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17])))),hn=i((()=>r((()=>import("./AddressRoutes-CVWN9CJv.js")),__vite__mapDeps([18,1,2,3,19,4,5,6,7,8,17])))),_n=i((()=>r((()=>import("./PeopleRoutes-kralZgbz.js")),__vite__mapDeps([20,1,2,3,4,5,6,7,8,21,13,14,15,16,17])))),pn=i((()=>r((()=>import("./PandLWithForecastRoutes-Dm5Vnr71.js")),__vite__mapDeps([22,1,2,3,4,5,6,7,8,9,21,10,11,13,14,15,16,17])))),xn=i((()=>r((()=>import("./CustomerOnboardingRoutes-C0b805o-.js")),__vite__mapDeps([23,1,2,3,19,4,5,6,7,8,24,25,26,27,28,29,30,31,17])))),jn=i((()=>r((()=>import("./VendorsRoutes-jETcYESc.js")),__vite__mapDeps([32,1,2,3,4,5,6,7,19,8,9,33,34,35,36,29,11,21,13,14,15,16,37,38,17])))),En=i((()=>r((()=>import("./CustomersRoutes-DD5Gx1mW.js")),__vite__mapDeps([39,1,2,3,4,5,6,7,11,8,21,13,14,15,16,17])))),gn=i((()=>r((()=>import("./TransactionDetailRoutes-D-b6zdg4.js")),__vite__mapDeps([40,1,2,3,8,4,5,6,7,29,41,42,21,10,11,43,17])))),be=i((()=>r((()=>import("./EntityDetailRoutes-BJzuW7dq.js")),__vite__mapDeps([44,1,2,3,4,5,6,7,29,45,21,42,10,11,43,36,16,17])))),In=i((()=>r((()=>import("./DashboardRoutes-C8RZkkYj.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,45,21,42,29,10,11,43,36,16,8,12,47,48,13,14,15,49,9,17])))),ye=i((()=>r((()=>import("./BillPayRoutes-HAS0-pNc.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,19,8,51,21,10,52,11,13,14,15,16,37,9,53,47,54,41,55,56,17])))),Rn=i((()=>r((()=>import("./SettingsRoutes-_XBnyBgG.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,15,58,13,14,16,24,25,26,27,28,29,38,19,8,47,52,11,48,30,54,41,55,59,17])))),An=i((()=>r((()=>import("./InvoicingRoutes-Bsq4ym98.js")),__vite__mapDeps([60,1,2,3,4,5,6,7,19,8,13,14,15,16,24,25,26,27,28,29,17])))),we=i((()=>r((()=>import("./ReimbursementRoutes-CI3m7PHD.js")),__vite__mapDeps([61,1,2,3,4,5,6,7,8,53,52,11,13,14,15,16,47,9,21,10,37,56,59,41,55,17])))),Tn=i((()=>r((()=>import("./ZeniAccountRoutes-C8cr5UMy.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,8,53,52,11,13,14,15,16,47,9,51,19,21,63,17])))),fn=i((()=>r((()=>import("./TreasuryRoutes-CgHwdyKd.js")),__vite__mapDeps([64,1,2,3,4,5,6,7,8,53,52,11,13,14,15,16,47,21,10,9,17])))),bn=i((()=>r((()=>import("./TransactionListRoutes-THtfycHC.js")),__vite__mapDeps([65,1,2,3,4,5,6,7,45,21,42,29,10,11,43,36,63,17])))),yn=i((()=>r((()=>import("./ChargeCardRoutes-DgtmFgR6.js")),__vite__mapDeps([66,1,2,3,4,5,6,7,21,13,14,15,16,53,52,11,8,47,10,31,19,17])))),wn=i((()=>r((()=>import("./NotificationRoutes-B2xHVaqf.js")),__vite__mapDeps([67,1,2,3,8,4,5,6,7,21,15,17])))),Cn=i((()=>r((()=>import("./PerformanceRoutes-DJhuo9qY.js")),__vite__mapDeps([68,1,2,3,8,4,5,6,7,21,13,14,15,16,17])))),Dn=i((()=>r((()=>import("./ExpenseAutomationRoutes-BKrWZyYV.js")),__vite__mapDeps([69,1,2,3,8,4,5,6,7,21,42,29,10,11,43,35,36,45,33,34,38,37,17])))),vn=i((()=>r((()=>import("./ActualMatchingMatchDetailScreen-wHD8fSWU.js")),__vite__mapDeps([70,1,2,3,4,5,6,7,35,36,29,11,8,17])))),Un=i((()=>r((()=>import("./RewardsRoutes-Dkg4zGB8.js")),__vite__mapDeps([71,1,2,3,4,5,6,7,8,17])))),kn=i((()=>r((()=>import("./TaskRoutes-D6cEqDZN.js")),__vite__mapDeps([72,1,2,3,8,4,5,6,7,10,13,14,15,16,73,21,74,17])))),Fn=i((()=>r((()=>import("./AiCfoScreen-yDQ2sphg.js")),__vite__mapDeps([75,1,2,3,4,5,6,7,49,34,11,74,17])))),Ce=i((()=>r((()=>import("./CardsAiCfoScreen-yrI2CL7M.js")),__vite__mapDeps([76,1,2,3,4,5,6,7,17])))),R=i((()=>r((()=>import("./NotFoundScreen-DXy-BCit.js")),__vite__mapDeps([8,1,2,3,4,5,6,7,17])))),On=i((()=>r((()=>import("./TaskListScreen-Bmj5V_dR.js").then((l=>l.f))),__vite__mapDeps([73,1,2,3,4,5,6,7,21,13,14,15,16,74,17]))));function na({setTenantEmailDomain:l}){const b=Gs(),N=$s(),{tenantEmailDomain:o}=Ys(),V=dn().mode,{setLoading:O,clearAllLoading:W,clearLoading:H}=Ks(),y=f.getSignedInUserTenant(o)?.tenantId,A=f.getSignedInUser(),K=hs(A),G=qs(),[P,ve]=U.useState(!1),n=z((a=>_s(a))),{useFeatureGate:S}=Js(),Z=Qs(),J=Xs(),Ue=!!n.company?.companyZeniAccountInfo?.isZeniAccountEnabled,ke=n.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Fe}=S(L.isChargeCardFeatureEnabled),{isFeatureEnabled:te}=S(L.isDebitCardFeatureEnabled),T=z((a=>a.tenantState.fetchState)),x=z((a=>a.tenantState.activeTenantFetchState.fetchState)),m=x==="Completed"||T==="Completed"?ps(te,n):void 0,Q=x==="Completed"||T==="Completed"?xs(n):void 0,oe=x==="Completed"||T==="Completed"?js(n)&&!Es(n):void 0,Oe=en(n,Fe,te),{isCardsHidden:Pe}=sn(n?.tenantId),He=!Oe||!!Pe,{isFeatureEnabled:Se}=S(L.isSettingsFeatureEnabled),{isFeatureEnabled:X}=S(L.isAiCfoFileUploadEnabled),{isFeatureEnabled:Be}=S(L.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Le=n?.userRole!=null&&gs(n.userRole),$=z((a=>Is(a)));if(o!=null){const a=f.getSignedInUserTenant(o);A!=null&&a!=null&&fe(A,n,V)}const M={tenantId:y,userId:A?.userId,sessionId:A?.zeniSessionId},re=Rs(),h=nn(),Ne=un(n.company==null),Ve=n.company==null||h?.loggedInUserRoleMap!=null&&xe(h.loggedInUserRole),Ze=As(h?.loggedInUserRoleMap),ee=Ae("/:tenantEmailDomain/onboarding/*")!==null,Me=Ae("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),se=Me?.params.selectedPeriod,ze=z((a=>M.tenantId!=null?Ts(a,M.tenantId):void 0));U.useEffect((()=>{O(F.TENANT_FETCHING),l(o)}),[o]),U.useEffect((()=>{if(se!=null&&y!=null){const a=se.split("-");if(a.length===2){const D=fs(Number(a[0])),w=Number(a[1]),t=bs(`01-${D<10?`0${D}`:D}-${w}`,Te.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),_=ys();t.isAfter(_,"month")===!1?b(ws(y,{month:D,year:w})):N(`/${o}/month_end_close_checks/review`)}}}),[se,o,y]),U.useEffect((()=>{P||(ve(!0),O(F.TENANT_FETCHING))}),[P,M,re,A,b,f]),U.useLayoutEffect((()=>{!Cs(re,M)&&f.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,D,w,t){if(Ee(D?.userId,D?.zeniSessionId,a.tenantId),w(Ms(!0)),w(ge(a.tenantId)),a.tenantId!=null&&c.clearTenant(a.tenantId),a.tenantId!=null){const _=f.getSignedInUserTenantWithId(a.tenantId);t&&Te.updateAppLocaleID(cn(t)),_?.tenantEmailDomain!=null&&f.saveActiveTenantDomainForUser(_?.tenantEmailDomain)}a.userId!=null?ae.identify(a.userId,{tenant_id:a.tenantId}):ae.resetUserIdentity()})(M,A,b,ze))}),[y]),U.useEffect((()=>{f.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,D,w,t,_,ls,B){if(w==null&&t==null)return void console.warn("There is no current tenant selected!!");const Y=t!=null&&_?.zeniSessionId!=null,ds=w==null||w.tenantId!==t,cs=w!=null&&w.excludedResources==null,us=w!=null&&w.externalConnections==null;if(Y&&ds){B(ge(t));const q=f.getSignedInUserTenantWithId(t);q?.tenantEmailDomain!=null&&f.saveActiveTenantDomainForUser(q?.tenantEmailDomain),Ee(_?.userId,_?.zeniSessionId,t),c.shouldFetchExcludedResources(t)&&(c.markExcludedResourcesFetchStarted(t),B(Ie(_.userId,t))),c.shouldFetchConnections(t)&&(c.markConnectionsFetchStarted(t),B(Re(_.userId,t)))}else Y&&cs&&c.shouldFetchExcludedResources(t)&&(c.markExcludedResourcesFetchStarted(t),B(Ie(_.userId,t))),Y&&us&&c.shouldFetchConnections(t)&&(c.markConnectionsFetchStarted(t),B(Re(_.userId,t)));if(Y){ae.identify(_.userId,{tenant_id:t});const q=t==null||t!=null&&(D==="Completed"||D==="Error");if(a==="Completed"||D!=="Not-Started"&&D!=="Error"||t==null||!c.shouldFetchActiveTenant(t)||(c.markActiveTenantFetchStarted(t),ls(F.TENANT_FETCHING),B(zs(_.userId,t,_.zeniSessionId))),q&&(a==="Not-Started"||a==="Error")&&c.shouldFetchAllTenants()){c.markAllTenantsFetchStarted();const{userId:ms,zeniSessionId:pe}=_;on((()=>{f.getSignedInUser()?.zeniSessionId===pe?B(je(ms,pe)):c.markAllTenantsFetchFailed()}),Pn)}}})(T,x,n,y,A,O,b))}),[y,x]),U.useEffect((()=>{f.isSignedIn()&&T==="Completed"&&$.tenantsBaseInOrder.length>0&&(H(F.TENANT_FETCHING),f.saveSignedInUserTenants(Ds($.tenantsBaseInOrder)),A!=null&&fe(A,n,V,void 0,$.tenantsBaseInOrder))}),[$,T,n,A]),U.useEffect((()=>{x==="In-Progress"&&O(F.TENANT_FETCHING),x!=="Completed"&&x!=="Error"||(x==="Completed"&&y!=null?(performance.mark("zeni:boot_tenant_data"),W(),c.markActiveTenantFetchCompleted(y)):x==="Error"&&y!=null&&(c.markActiveTenantFetchFailed(y),H(F.TENANT_FETCHING),H(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?c.markAllTenantsFetchCompleted():T==="Error"&&c.markAllTenantsFetchFailed())}),[x,T,y,P]);const ie=U.useRef(!1);U.useEffect((()=>{!ie.current&&x==="Completed"&&P&&(ie.current=!0,an())}),[x,P]);const v=n?.userRole!=null&&vs(n?.userRole),{isFeatureEnabled:Ge}=S(L.isReferralFeatureEnabled),{isFeatureEnabled:$e}=S(L.isAccrualEnabled),Ye=n?.userRole!=null&&n.userRole.includes("charge_card_user"),qe=n?.userRole!=null&&n.userRole.includes("charge_card_admin"),k=n?.userRole!=null&&xe(n.userRole),le=n?.company==null||n.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!v,de=!He&&!v,We=Us(h?.loggedInUserRoleMap),Ke=n.externalConnections?.accounting[0]?.isValid,Je=n.externalConnections?.fetchState==="Completed",ne=n.company?.companyOnboardingInfo.isOnboardingCompleted,ce=n?.company==null||n.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!v,ue=ce&&ks(h?.loggedInUserRoleMap),me=Ue&&!v,Qe=ke&&!v,Xe=le&&Fs(h?.loggedInUserRoleMap),es=de&&Os(h?.loggedInUserRoleMap),ss=me&&Ps(h?.loggedInUserRoleMap),ns=Hs(h?.loggedInUserRoleMap),as=Ss(h?.loggedInUserRoleMap),ts=Bs(h?.loggedInUserRoleMap),os=Ls(h?.loggedInUserRoleMap),rs=Ns(h?.loggedInUserRoleMap),j=Vs(h?.loggedInUserRoleMap),E=Zs(h?.loggedInUserRoleMap),he=le&&j,_e=ce&&E,g=me&&ts,I=Qe&&os,u=de&&rs,is=n.excludedResources?.resources?.find((a=>a.resource==="/invites"))!=null||Ze===!0||We===!0||ns===!0||as===!0;return f.isSignedIn()?y==null?T==="Completed"?e.jsx(d,{to:"/",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}):(A!=null&&T!=="In-Progress"&&b(je(A.userId,A.zeniSessionId)),null):x!=="In-Progress"&&x!=="Not-Started"||T==="Completed"?(ne===!0||K&&!ee)&&Je&&Ke!==!0&&m===!1&&Q===!1&&oe===!1?(l(void 0),e.jsx(d,{to:"/connection/auth",replace:!0})):!P||oe!==!0||ne!==!0||ee||K?!P||ne!==!1||ee||K?P&&n?.userRole&&m!=null&&Q!=null&&o!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(Ws,{children:e.jsxs(s,{element:e.jsx(tn,{}),children:[e.jsx(s,{path:"/",element:e.jsx(Hn,{isDashboardAccess:k,showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,isTenantCardsOnly:Q,showChargeCardRoute:u})}),e.jsx(s,{path:"dashboard/*",element:k?e.jsx(In,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"reports/*",element:k?e.jsx(mn,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"people/*",element:is||k?e.jsx(_n,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"forecast/*",element:k?e.jsx(pn,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"onboarding/*",element:e.jsx(xn,{})}),e.jsx(s,{path:"transaction/*",element:k&&v===!1||Ye||qe?e.jsx(gn,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"transactions/*",element:k&&v===!1?e.jsx(bn,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"customer/*",element:k&&v===!1?e.jsx(be,{entityType:"customer"}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,isTenantBankingOnly:m,showTreasuryRoute:I,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"vendor/*",element:k&&v===!1?e.jsx(be,{entityType:"vendor"}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"tasks",element:e.jsx(On,{})}),e.jsx(s,{path:"tasks/*",element:e.jsx(kn,{})}),e.jsx(s,{path:"address/*",element:Xe||ue||ss||es?e.jsx(hn,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"checking/*",element:e.jsx(p,{isAllowed:g,fallback:e.jsx(R,{}),children:e.jsx(Tn,{})})}),e.jsx(s,{path:"treasury/*",element:e.jsx(p,{isAllowed:I,fallback:e.jsx(R,{}),children:e.jsx(fn,{})})}),e.jsx(s,{path:"performance",element:e.jsx(p,{isAllowed:J,fallback:e.jsx(De,{tenantEmailDomain:o}),children:e.jsx(Cn,{})})}),e.jsx(s,{path:"month_end_close_checks/review/*",element:e.jsx(p,{isAllowed:J&&!v,fallback:e.jsx(De,{tenantEmailDomain:o}),children:e.jsx(Dn,{})})}),e.jsx(s,{path:"expense-automation/actual-matching/:matchId",element:e.jsx(p,{isAllowed:J&&!v&&$e,fallback:e.jsx(R,{}),children:e.jsx(vn,{})})}),e.jsx(s,{path:"notifications/*",element:e.jsx(wn,{})}),e.jsx(s,{path:"vendors/*",element:e.jsx(p,{isAllowed:Ve,fallback:e.jsx(R,{}),children:e.jsx(jn,{})})}),e.jsx(s,{path:"customers/*",element:e.jsx(p,{isAllowed:Ne,fallback:e.jsx(R,{}),children:e.jsx(En,{})})}),e.jsx(s,{path:"bill/*",element:he?e.jsx(ye,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"bills/*",element:he?e.jsx(ye,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"reimbursement/*",element:_e?e.jsx(we,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"reimbursements/*",element:_e?e.jsx(we,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"settings/*",element:e.jsx(p,{isAllowed:Se,fallback:e.jsx(R,{}),children:e.jsx(Rn,{hasAdminLevelAccess:ue})})}),e.jsx(s,{path:"invoicing/*",element:e.jsx(p,{isAllowed:Be&&Le,fallback:e.jsx(R,{}),children:e.jsx(An,{})})}),e.jsx(s,{path:"cards/ask",element:e.jsx(p,{isAllowed:u&&Z,fallback:e.jsx(R,{}),children:e.jsx(Ce,{isFileUploadEnabled:X})})}),e.jsx(s,{path:"cards/ask/:session_id",element:e.jsx(p,{isAllowed:u&&Z,fallback:e.jsx(R,{}),children:e.jsx(Ce,{isFileUploadEnabled:X})})}),e.jsx(s,{path:"cards/*",element:e.jsx(p,{isAllowed:u,fallback:e.jsx(R,{}),children:e.jsx(yn,{})})}),e.jsx(s,{path:"rewards/*",element:e.jsx(p,{isAllowed:Ge,fallback:e.jsx(R,{}),children:e.jsx(Un,{})})}),e.jsx(s,{path:"/ai-cfo",element:e.jsx(p,{isAllowed:Z,fallback:e.jsx(R,{}),children:e.jsx(d,{to:"explore"})})}),e.jsx(s,{path:"/ai-cfo/",element:e.jsx(p,{isAllowed:Z,fallback:e.jsx(R,{}),children:e.jsx(d,{to:"explore"})})}),e.jsx(s,{path:"/ai-cfo/:session_id",element:e.jsx(p,{isAllowed:Z,fallback:e.jsx(R,{}),children:e.jsx(Fn,{isFileUploadEnabled:X})})}),e.jsx(s,{path:"*",element:e.jsx(R,{})})]})}):null:(l(void 0),e.jsx(d,{to:`/${o}/onboarding`,replace:!0})):(l(void 0),e.jsx(d,{to:`/${o}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),l(void 0),e.jsx(d,{to:"/signin/auth",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}))}const Pn=5e3,Hn=({isDashboardAccess:l,showZeniAccountRoute:b,isUserHasBillPayAccess:N,isUserHasReimbursementAccess:o,showTreasuryRoute:V,isTenantBankingOnly:O,isTenantCardsOnly:W,showChargeCardRoute:H})=>{if(O===!0){if(b)return e.jsx(d,{to:"checking"});if(V)return e.jsx(d,{to:"treasury"});if(H)return e.jsx(d,{to:"cards"})}return W===!0&&H?e.jsx(d,{to:"cards"}):l?e.jsx(d,{to:"dashboard"}):b?e.jsx(d,{to:"checking"}):V?e.jsx(d,{to:"treasury"}):H?e.jsx(d,{to:"cards"}):N?e.jsx(d,{to:"bills"}):o?e.jsx(d,{to:"reimbursements"}):e.jsx(d,{to:"dashboard"})},p=({children:l,fallback:b,isAllowed:N})=>{const o=rn();return N?l:o?e.jsx(ln,{fetchState:"In-Progress"}):b},De=({tenantEmailDomain:l})=>e.jsx(d,{to:`/${l}/dashboard`});export{na as default};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ReportsRoutes-Ul2BNSj_.js","assets/sentry-DWNq3t8E.js","assets/core-CbdTrw7T.js","assets/zeni-epic-state-C5DO1jkr.js","assets/index-DtThPd2q.js","assets/mui-DNGY4bFU.js","assets/analytics-Vgn85Ur_.js","assets/utils-CrhrpmD8.js","assets/NotFoundScreen-uAMK84U0.js","assets/FeaturePreviewScreen-C15dgqam.js","assets/useInitialThreadRequest-DrEeSZz_.js","assets/routePaths-DXYV831_.js","assets/reportTimeframe-DeLnONFM.js","assets/MobileAppDrawer-CCAbxLE2.js","assets/InboxNotificationsProvider-CiKEEv6Q.js","assets/useTaskManagerAccess-CT25hqtF.js","assets/useIsCustomersTabEnabled-C9FFBZXp.js","assets/index-BQ3cXEYt.css","assets/AddressRoutes-DcrBeuZZ.js","assets/AddressScreen-BVizi07H.js","assets/PeopleRoutes-CGvU4cdC.js","assets/useAskAiCfoHostNavButtonProps-DSKusWDa.js","assets/PandLWithForecastRoutes-CWaWZqMn.js","assets/CustomerOnboardingRoutes-Fqi_xQ8j.js","assets/QBOConnectionScreen-BcfAhM15.js","assets/empty-CjoB5KP4.js","assets/index-LGKtWUy9.js","assets/url-B2x9G6No.js","assets/index-BNFAuGus.js","assets/decodeURIComponentSafe-D7APy95S.js","assets/useEmailConnectResultRefresh-DAA2Py_6.js","assets/useChargeCardPusherEvents-fpHDIIMx.js","assets/VendorsRoutes-l3RUFxeF.js","assets/ScheduleDetailsPrepaidExpensesScreen-7Oe1wEIe.js","assets/pathToGoBack-CJCquoqC.js","assets/useActualMatchingMatchDetail-D9tjidmB.js","assets/stripSplatSuffix-DP9nmQOu.js","assets/DrawerScreen-Ba5DQb-t.js","assets/accountMappingHelper-DSd2V454.js","assets/CustomersRoutes-DHtFoA_j.js","assets/TransactionDetailRoutes-DU02DHgR.js","assets/useEnsureVendorListLoaded-CIShbpK4.js","assets/TransactionDetailScreen-DjsUNuX8.js","assets/expenseAutomationHelper-CgTsmmCm.js","assets/EntityDetailRoutes-CRmd3CZq.js","assets/withTransactionSidePanel-Dbd91mHL.js","assets/DashboardRoutes-DIfQCdfV.js","assets/analyticsHelper-CVZpPd-a.js","assets/CompanyPassportScreen-CC7A9ebT.js","assets/useAiCfoDashboardSuggestedQuestionsChips-piDOTVXb.js","assets/BillPayRoutes-B0bTM1N1.js","assets/DomesticWireDetailScreen-pNAj50PJ.js","assets/BusinessVerificationPageScreen-CdT5YCya.js","assets/SetupPagesScreen-DRxKoFqN.js","assets/BillPayApprovalRoutes-C0prBF5m.js","assets/ReimbursementApprovalRuleDetailScreen-CHtkyq9-.js","assets/FallBackRoute-Ba8DnNt0.js","assets/SettingsRoutes-CfzdYXCx.js","assets/AccountMappingScreen-CqBmv3P0.js","assets/ReimbursementApprovalRoutes-CujO88Gv.js","assets/InvoicingRoutes-BjTaT2Ks.js","assets/ReimbursementRoutes-Df3Aw7DR.js","assets/ZeniAccountRoutes-D866CG7l.js","assets/ZeniAccountStatementScreen-DcZ-Zp7O.js","assets/TreasuryRoutes-B34-6WTm.js","assets/TransactionListRoutes-DouUxWQV.js","assets/ChargeCardRoutes-snm4_qnH.js","assets/NotificationRoutes-k2xOmZgN.js","assets/PerformanceRoutes-DBkwWedw.js","assets/ExpenseAutomationRoutes-CqjUPpuq.js","assets/ActualMatchingMatchDetailScreen-C18ULFui.js","assets/RewardsRoutes-BdM-p5F5.js","assets/TaskRoutes-C4KiUyaQ.js","assets/TaskListScreen-CE88Gj9z.js","assets/useTaskManagerPusherEvents-DKQsgy5z.js","assets/AiCfoScreen-DocFe0IU.js","assets/CardsAiCfoScreen-mC2dN25g.js"])))=>i.map(i=>d[i]);
2
+ import{bm as hs,fJ as _s,er as ps,eq as xs,h8 as js,d4 as Es,c8 as gs,gN as Is,gd as Rs,eh as xe,cz as As,gr as Ts,cq as fs,bF as bs,bw as ys,h9 as ws,v as Cs,ha as Ds,bp as vs,hb as Us,bL as ks,bK as Fs,bs as Os,cm as Ps,hc as Hs,hd as Ss,ec as Bs,ef as Ls,ee as Ns,cy as Vs,cF as Zs,he as je,gm as Ee,h1 as Ms,go as ge,gP as Ie,gQ as Re,gp as zs,_ as r}from"./zeni-epic-state-C5DO1jkr.js";import{j as e}from"./liveblocks-BLpmr1Pv.js";import{a as U}from"./sentry-DWNq3t8E.js";import{u as Gs,h as $s,i as Ys,g as qs,j as z,q as Ae,N as d,n as Ws,o as s}from"./core-CbdTrw7T.js";import{u as Ks,z as f,p as Js,a as Qs,h as Xs,_ as L,i as en,K as sn,V as nn,L as F,G as Te,t as c,b as an,P as tn,c as ae,r as on,l as i,d as rn,Z as ln}from"./index-DtThPd2q.js";import{u as dn}from"./mui-DNGY4bFU.js";import{f as fe}from"./analyticsHelper-CVZpPd-a.js";import{t as cn}from"./getLocaleForTenant-dn31VMO2.js";import{u as un}from"./useIsCustomersTabEnabled-C9FFBZXp.js";import{F as C}from"./FallBackRoute-Ba8DnNt0.js";import"./recharts-CTh_JhT_.js";import"./analytics-Vgn85Ur_.js";import"./plaid-DhfTjhua.js";import"./dnd-DuiAlI7w.js";import"./stripe-cKAAJElX.js";import"./lottie-Lb1ftKY1.js";import"./lexical-B-vxEaRQ.js";import"./pdf-B1uD4Ovv.js";import"./utils-CrhrpmD8.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},b=new l.Error().stack;b&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[b]="1c231a9c-a720-4a84-9133-c2aa76ffe40d",l._sentryDebugIdIdentifier="sentry-dbid-1c231a9c-a720-4a84-9133-c2aa76ffe40d")}catch{}})();const mn=i((()=>r((()=>import("./ReportsRoutes-Ul2BNSj_.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17])))),hn=i((()=>r((()=>import("./AddressRoutes-DcrBeuZZ.js")),__vite__mapDeps([18,1,2,3,19,4,5,6,7,8,17])))),_n=i((()=>r((()=>import("./PeopleRoutes-CGvU4cdC.js")),__vite__mapDeps([20,1,2,3,4,5,6,7,8,21,13,14,15,16,17])))),pn=i((()=>r((()=>import("./PandLWithForecastRoutes-CWaWZqMn.js")),__vite__mapDeps([22,1,2,3,4,5,6,7,8,9,21,10,11,13,14,15,16,17])))),xn=i((()=>r((()=>import("./CustomerOnboardingRoutes-Fqi_xQ8j.js")),__vite__mapDeps([23,1,2,3,19,4,5,6,7,8,24,25,26,27,28,29,30,31,17])))),jn=i((()=>r((()=>import("./VendorsRoutes-l3RUFxeF.js")),__vite__mapDeps([32,1,2,3,4,5,6,7,19,8,9,33,34,35,36,29,11,21,13,14,15,16,37,38,17])))),En=i((()=>r((()=>import("./CustomersRoutes-DHtFoA_j.js")),__vite__mapDeps([39,1,2,3,4,5,6,7,11,8,21,13,14,15,16,17])))),gn=i((()=>r((()=>import("./TransactionDetailRoutes-DU02DHgR.js")),__vite__mapDeps([40,1,2,3,8,4,5,6,7,29,41,42,21,10,11,43,17])))),be=i((()=>r((()=>import("./EntityDetailRoutes-CRmd3CZq.js")),__vite__mapDeps([44,1,2,3,4,5,6,7,29,45,21,42,10,11,43,36,16,17])))),In=i((()=>r((()=>import("./DashboardRoutes-DIfQCdfV.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,45,21,42,29,10,11,43,36,16,8,12,47,48,13,14,15,49,9,17])))),ye=i((()=>r((()=>import("./BillPayRoutes-B0bTM1N1.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,19,8,51,21,10,52,11,13,14,15,16,37,9,53,47,54,41,55,56,17])))),Rn=i((()=>r((()=>import("./SettingsRoutes-CfzdYXCx.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,15,58,13,14,16,24,25,26,27,28,29,38,19,8,47,52,11,48,30,54,41,55,59,17])))),An=i((()=>r((()=>import("./InvoicingRoutes-BjTaT2Ks.js")),__vite__mapDeps([60,1,2,3,4,5,6,7,19,8,13,14,15,16,24,25,26,27,28,29,17])))),we=i((()=>r((()=>import("./ReimbursementRoutes-Df3Aw7DR.js")),__vite__mapDeps([61,1,2,3,4,5,6,7,8,53,52,11,13,14,15,16,47,9,21,10,37,56,59,41,55,17])))),Tn=i((()=>r((()=>import("./ZeniAccountRoutes-D866CG7l.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,8,53,52,11,13,14,15,16,47,9,51,19,21,63,17])))),fn=i((()=>r((()=>import("./TreasuryRoutes-B34-6WTm.js")),__vite__mapDeps([64,1,2,3,4,5,6,7,8,53,52,11,13,14,15,16,47,21,10,9,17])))),bn=i((()=>r((()=>import("./TransactionListRoutes-DouUxWQV.js")),__vite__mapDeps([65,1,2,3,4,5,6,7,45,21,42,29,10,11,43,36,63,17])))),yn=i((()=>r((()=>import("./ChargeCardRoutes-snm4_qnH.js")),__vite__mapDeps([66,1,2,3,4,5,6,7,21,13,14,15,16,53,52,11,8,47,10,31,19,17])))),wn=i((()=>r((()=>import("./NotificationRoutes-k2xOmZgN.js")),__vite__mapDeps([67,1,2,3,8,4,5,6,7,21,15,17])))),Cn=i((()=>r((()=>import("./PerformanceRoutes-DBkwWedw.js")),__vite__mapDeps([68,1,2,3,8,4,5,6,7,21,13,14,15,16,17])))),Dn=i((()=>r((()=>import("./ExpenseAutomationRoutes-CqjUPpuq.js")),__vite__mapDeps([69,1,2,3,8,4,5,6,7,21,42,29,10,11,43,35,36,45,33,34,38,37,17])))),vn=i((()=>r((()=>import("./ActualMatchingMatchDetailScreen-C18ULFui.js")),__vite__mapDeps([70,1,2,3,4,5,6,7,35,36,29,11,8,17])))),Un=i((()=>r((()=>import("./RewardsRoutes-BdM-p5F5.js")),__vite__mapDeps([71,1,2,3,4,5,6,7,8,17])))),kn=i((()=>r((()=>import("./TaskRoutes-C4KiUyaQ.js")),__vite__mapDeps([72,1,2,3,8,4,5,6,7,10,13,14,15,16,73,21,74,17])))),Fn=i((()=>r((()=>import("./AiCfoScreen-DocFe0IU.js")),__vite__mapDeps([75,1,2,3,4,5,6,7,49,34,11,74,17])))),Ce=i((()=>r((()=>import("./CardsAiCfoScreen-mC2dN25g.js")),__vite__mapDeps([76,1,2,3,4,5,6,7,17])))),R=i((()=>r((()=>import("./NotFoundScreen-uAMK84U0.js")),__vite__mapDeps([8,1,2,3,4,5,6,7,17])))),On=i((()=>r((()=>import("./TaskListScreen-CE88Gj9z.js").then((l=>l.f))),__vite__mapDeps([73,1,2,3,4,5,6,7,21,13,14,15,16,74,17]))));function na({setTenantEmailDomain:l}){const b=Gs(),N=$s(),{tenantEmailDomain:o}=Ys(),V=dn().mode,{setLoading:O,clearAllLoading:W,clearLoading:H}=Ks(),y=f.getSignedInUserTenant(o)?.tenantId,A=f.getSignedInUser(),K=hs(A),G=qs(),[P,ve]=U.useState(!1),n=z((a=>_s(a))),{useFeatureGate:S}=Js(),Z=Qs(),J=Xs(),Ue=!!n.company?.companyZeniAccountInfo?.isZeniAccountEnabled,ke=n.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Fe}=S(L.isChargeCardFeatureEnabled),{isFeatureEnabled:te}=S(L.isDebitCardFeatureEnabled),T=z((a=>a.tenantState.fetchState)),x=z((a=>a.tenantState.activeTenantFetchState.fetchState)),m=x==="Completed"||T==="Completed"?ps(te,n):void 0,Q=x==="Completed"||T==="Completed"?xs(n):void 0,oe=x==="Completed"||T==="Completed"?js(n)&&!Es(n):void 0,Oe=en(n,Fe,te),{isCardsHidden:Pe}=sn(n?.tenantId),He=!Oe||!!Pe,{isFeatureEnabled:Se}=S(L.isSettingsFeatureEnabled),{isFeatureEnabled:X}=S(L.isAiCfoFileUploadEnabled),{isFeatureEnabled:Be}=S(L.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Le=n?.userRole!=null&&gs(n.userRole),$=z((a=>Is(a)));if(o!=null){const a=f.getSignedInUserTenant(o);A!=null&&a!=null&&fe(A,n,V)}const M={tenantId:y,userId:A?.userId,sessionId:A?.zeniSessionId},re=Rs(),h=nn(),Ne=un(n.company==null),Ve=n.company==null||h?.loggedInUserRoleMap!=null&&xe(h.loggedInUserRole),Ze=As(h?.loggedInUserRoleMap),ee=Ae("/:tenantEmailDomain/onboarding/*")!==null,Me=Ae("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),se=Me?.params.selectedPeriod,ze=z((a=>M.tenantId!=null?Ts(a,M.tenantId):void 0));U.useEffect((()=>{O(F.TENANT_FETCHING),l(o)}),[o]),U.useEffect((()=>{if(se!=null&&y!=null){const a=se.split("-");if(a.length===2){const D=fs(Number(a[0])),w=Number(a[1]),t=bs(`01-${D<10?`0${D}`:D}-${w}`,Te.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),_=ys();t.isAfter(_,"month")===!1?b(ws(y,{month:D,year:w})):N(`/${o}/month_end_close_checks/review`)}}}),[se,o,y]),U.useEffect((()=>{P||(ve(!0),O(F.TENANT_FETCHING))}),[P,M,re,A,b,f]),U.useLayoutEffect((()=>{!Cs(re,M)&&f.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,D,w,t){if(Ee(D?.userId,D?.zeniSessionId,a.tenantId),w(Ms(!0)),w(ge(a.tenantId)),a.tenantId!=null&&c.clearTenant(a.tenantId),a.tenantId!=null){const _=f.getSignedInUserTenantWithId(a.tenantId);t&&Te.updateAppLocaleID(cn(t)),_?.tenantEmailDomain!=null&&f.saveActiveTenantDomainForUser(_?.tenantEmailDomain)}a.userId!=null?ae.identify(a.userId,{tenant_id:a.tenantId}):ae.resetUserIdentity()})(M,A,b,ze))}),[y]),U.useEffect((()=>{f.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,D,w,t,_,ls,B){if(w==null&&t==null)return void console.warn("There is no current tenant selected!!");const Y=t!=null&&_?.zeniSessionId!=null,ds=w==null||w.tenantId!==t,cs=w!=null&&w.excludedResources==null,us=w!=null&&w.externalConnections==null;if(Y&&ds){B(ge(t));const q=f.getSignedInUserTenantWithId(t);q?.tenantEmailDomain!=null&&f.saveActiveTenantDomainForUser(q?.tenantEmailDomain),Ee(_?.userId,_?.zeniSessionId,t),c.shouldFetchExcludedResources(t)&&(c.markExcludedResourcesFetchStarted(t),B(Ie(_.userId,t))),c.shouldFetchConnections(t)&&(c.markConnectionsFetchStarted(t),B(Re(_.userId,t)))}else Y&&cs&&c.shouldFetchExcludedResources(t)&&(c.markExcludedResourcesFetchStarted(t),B(Ie(_.userId,t))),Y&&us&&c.shouldFetchConnections(t)&&(c.markConnectionsFetchStarted(t),B(Re(_.userId,t)));if(Y){ae.identify(_.userId,{tenant_id:t});const q=t==null||t!=null&&(D==="Completed"||D==="Error");if(a==="Completed"||D!=="Not-Started"&&D!=="Error"||t==null||!c.shouldFetchActiveTenant(t)||(c.markActiveTenantFetchStarted(t),ls(F.TENANT_FETCHING),B(zs(_.userId,t,_.zeniSessionId))),q&&(a==="Not-Started"||a==="Error")&&c.shouldFetchAllTenants()){c.markAllTenantsFetchStarted();const{userId:ms,zeniSessionId:pe}=_;on((()=>{f.getSignedInUser()?.zeniSessionId===pe?B(je(ms,pe)):c.markAllTenantsFetchFailed()}),Pn)}}})(T,x,n,y,A,O,b))}),[y,x]),U.useEffect((()=>{f.isSignedIn()&&T==="Completed"&&$.tenantsBaseInOrder.length>0&&(H(F.TENANT_FETCHING),f.saveSignedInUserTenants(Ds($.tenantsBaseInOrder)),A!=null&&fe(A,n,V,void 0,$.tenantsBaseInOrder))}),[$,T,n,A]),U.useEffect((()=>{x==="In-Progress"&&O(F.TENANT_FETCHING),x!=="Completed"&&x!=="Error"||(x==="Completed"&&y!=null?(performance.mark("zeni:boot_tenant_data"),W(),c.markActiveTenantFetchCompleted(y)):x==="Error"&&y!=null&&(c.markActiveTenantFetchFailed(y),H(F.TENANT_FETCHING),H(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?c.markAllTenantsFetchCompleted():T==="Error"&&c.markAllTenantsFetchFailed())}),[x,T,y,P]);const ie=U.useRef(!1);U.useEffect((()=>{!ie.current&&x==="Completed"&&P&&(ie.current=!0,an())}),[x,P]);const v=n?.userRole!=null&&vs(n?.userRole),{isFeatureEnabled:Ge}=S(L.isReferralFeatureEnabled),{isFeatureEnabled:$e}=S(L.isAccrualEnabled),Ye=n?.userRole!=null&&n.userRole.includes("charge_card_user"),qe=n?.userRole!=null&&n.userRole.includes("charge_card_admin"),k=n?.userRole!=null&&xe(n.userRole),le=n?.company==null||n.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!v,de=!He&&!v,We=Us(h?.loggedInUserRoleMap),Ke=n.externalConnections?.accounting[0]?.isValid,Je=n.externalConnections?.fetchState==="Completed",ne=n.company?.companyOnboardingInfo.isOnboardingCompleted,ce=n?.company==null||n.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!v,ue=ce&&ks(h?.loggedInUserRoleMap),me=Ue&&!v,Qe=ke&&!v,Xe=le&&Fs(h?.loggedInUserRoleMap),es=de&&Os(h?.loggedInUserRoleMap),ss=me&&Ps(h?.loggedInUserRoleMap),ns=Hs(h?.loggedInUserRoleMap),as=Ss(h?.loggedInUserRoleMap),ts=Bs(h?.loggedInUserRoleMap),os=Ls(h?.loggedInUserRoleMap),rs=Ns(h?.loggedInUserRoleMap),j=Vs(h?.loggedInUserRoleMap),E=Zs(h?.loggedInUserRoleMap),he=le&&j,_e=ce&&E,g=me&&ts,I=Qe&&os,u=de&&rs,is=n.excludedResources?.resources?.find((a=>a.resource==="/invites"))!=null||Ze===!0||We===!0||ns===!0||as===!0;return f.isSignedIn()?y==null?T==="Completed"?e.jsx(d,{to:"/",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}):(A!=null&&T!=="In-Progress"&&b(je(A.userId,A.zeniSessionId)),null):x!=="In-Progress"&&x!=="Not-Started"||T==="Completed"?(ne===!0||K&&!ee)&&Je&&Ke!==!0&&m===!1&&Q===!1&&oe===!1?(l(void 0),e.jsx(d,{to:"/connection/auth",replace:!0})):!P||oe!==!0||ne!==!0||ee||K?!P||ne!==!1||ee||K?P&&n?.userRole&&m!=null&&Q!=null&&o!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(Ws,{children:e.jsxs(s,{element:e.jsx(tn,{}),children:[e.jsx(s,{path:"/",element:e.jsx(Hn,{isDashboardAccess:k,showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,isTenantCardsOnly:Q,showChargeCardRoute:u})}),e.jsx(s,{path:"dashboard/*",element:k?e.jsx(In,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"reports/*",element:k?e.jsx(mn,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"people/*",element:is||k?e.jsx(_n,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"forecast/*",element:k?e.jsx(pn,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"onboarding/*",element:e.jsx(xn,{})}),e.jsx(s,{path:"transaction/*",element:k&&v===!1||Ye||qe?e.jsx(gn,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"transactions/*",element:k&&v===!1?e.jsx(bn,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"customer/*",element:k&&v===!1?e.jsx(be,{entityType:"customer"}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,isTenantBankingOnly:m,showTreasuryRoute:I,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"vendor/*",element:k&&v===!1?e.jsx(be,{entityType:"vendor"}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"tasks",element:e.jsx(On,{})}),e.jsx(s,{path:"tasks/*",element:e.jsx(kn,{})}),e.jsx(s,{path:"address/*",element:Xe||ue||ss||es?e.jsx(hn,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"checking/*",element:e.jsx(p,{isAllowed:g,fallback:e.jsx(R,{}),children:e.jsx(Tn,{})})}),e.jsx(s,{path:"treasury/*",element:e.jsx(p,{isAllowed:I,fallback:e.jsx(R,{}),children:e.jsx(fn,{})})}),e.jsx(s,{path:"performance",element:e.jsx(p,{isAllowed:J,fallback:e.jsx(De,{tenantEmailDomain:o}),children:e.jsx(Cn,{})})}),e.jsx(s,{path:"month_end_close_checks/review/*",element:e.jsx(p,{isAllowed:J&&!v,fallback:e.jsx(De,{tenantEmailDomain:o}),children:e.jsx(Dn,{})})}),e.jsx(s,{path:"expense-automation/actual-matching/:matchId",element:e.jsx(p,{isAllowed:J&&!v&&$e,fallback:e.jsx(R,{}),children:e.jsx(vn,{})})}),e.jsx(s,{path:"notifications/*",element:e.jsx(wn,{})}),e.jsx(s,{path:"vendors/*",element:e.jsx(p,{isAllowed:Ve,fallback:e.jsx(R,{}),children:e.jsx(jn,{})})}),e.jsx(s,{path:"customers/*",element:e.jsx(p,{isAllowed:Ne,fallback:e.jsx(R,{}),children:e.jsx(En,{})})}),e.jsx(s,{path:"bill/*",element:he?e.jsx(ye,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"bills/*",element:he?e.jsx(ye,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"reimbursement/*",element:_e?e.jsx(we,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"reimbursements/*",element:_e?e.jsx(we,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"settings/*",element:e.jsx(p,{isAllowed:Se,fallback:e.jsx(R,{}),children:e.jsx(Rn,{hasAdminLevelAccess:ue})})}),e.jsx(s,{path:"invoicing/*",element:e.jsx(p,{isAllowed:Be&&Le,fallback:e.jsx(R,{}),children:e.jsx(An,{})})}),e.jsx(s,{path:"cards/ask",element:e.jsx(p,{isAllowed:u&&Z,fallback:e.jsx(R,{}),children:e.jsx(Ce,{isFileUploadEnabled:X})})}),e.jsx(s,{path:"cards/ask/:session_id",element:e.jsx(p,{isAllowed:u&&Z,fallback:e.jsx(R,{}),children:e.jsx(Ce,{isFileUploadEnabled:X})})}),e.jsx(s,{path:"cards/*",element:e.jsx(p,{isAllowed:u,fallback:e.jsx(R,{}),children:e.jsx(yn,{})})}),e.jsx(s,{path:"rewards/*",element:e.jsx(p,{isAllowed:Ge,fallback:e.jsx(R,{}),children:e.jsx(Un,{})})}),e.jsx(s,{path:"/ai-cfo",element:e.jsx(p,{isAllowed:Z,fallback:e.jsx(R,{}),children:e.jsx(d,{to:"explore"})})}),e.jsx(s,{path:"/ai-cfo/",element:e.jsx(p,{isAllowed:Z,fallback:e.jsx(R,{}),children:e.jsx(d,{to:"explore"})})}),e.jsx(s,{path:"/ai-cfo/:session_id",element:e.jsx(p,{isAllowed:Z,fallback:e.jsx(R,{}),children:e.jsx(Fn,{isFileUploadEnabled:X})})}),e.jsx(s,{path:"*",element:e.jsx(R,{})})]})}):null:(l(void 0),e.jsx(d,{to:`/${o}/onboarding`,replace:!0})):(l(void 0),e.jsx(d,{to:`/${o}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),l(void 0),e.jsx(d,{to:"/signin/auth",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}))}const Pn=5e3,Hn=({isDashboardAccess:l,showZeniAccountRoute:b,isUserHasBillPayAccess:N,isUserHasReimbursementAccess:o,showTreasuryRoute:V,isTenantBankingOnly:O,isTenantCardsOnly:W,showChargeCardRoute:H})=>{if(O===!0){if(b)return e.jsx(d,{to:"checking"});if(V)return e.jsx(d,{to:"treasury"});if(H)return e.jsx(d,{to:"cards"})}return W===!0&&H?e.jsx(d,{to:"cards"}):l?e.jsx(d,{to:"dashboard"}):b?e.jsx(d,{to:"checking"}):V?e.jsx(d,{to:"treasury"}):H?e.jsx(d,{to:"cards"}):N?e.jsx(d,{to:"bills"}):o?e.jsx(d,{to:"reimbursements"}):e.jsx(d,{to:"dashboard"})},p=({children:l,fallback:b,isAllowed:N})=>{const o=rn();return N?l:o?e.jsx(ln,{fetchState:"In-Progress"}):b},De=({tenantEmailDomain:l})=>e.jsx(d,{to:`/${l}/dashboard`});export{na as default};
@@ -1,4 +1,4 @@
1
- import{j as a}from"./liveblocks-BLpmr1Pv.js";import{a as d}from"./sentry-DWNq3t8E.js";import{h as Y,g as $,u as T,i as F,j as C,l as Z,n as J,o as k}from"./core-CbdTrw7T.js";import{fJ as w,Yn as je,Oy as ve,Xz as we,Yo as Ae,c8 as W,cM as De,cN as Ue,bp as Te,eg as _e,GQ as Re,Yp as Me,P$ as Be,Np as Ne,Ng as de,Nd as Ve,GU as ue,Nj as pe,Nm as ge,Ns as X,CY as ee,GT as Oe,lG as H,lJ as me,Yq as Ye,mT as Fe,H9 as Le,Yr as Ge,Ys as He,lE as $e,Yt as Ze,lH as Ke,v8 as ze,Yu as qe,Yv as Je,vc as Qe,i5 as We,VC as q,hZ as ae,hW as Xe,i2 as en,VD as nn,H6 as tn,Yw as an,Yx as on,NG as sn,mb as rn,eq as fe,er as he,Yy as ln,gG as cn,Wg as dn,H5 as oe,gL as se,gK as un,H4 as pn,gJ as gn,gI as mn,Yz as fn,V8 as Ce,YA as hn,YB as Cn,YC as bn,YD as yn,YE as Sn,YF as In,Hc as xn,YG as En,H3 as ie,GZ as G,YH as kn,YI as Pn,YJ as re,YK as jn,dG as vn,YL as wn,YM as An,YN as Dn,Vk as Un,dO as Tn,dV as _n,dU as Rn,dP as Mn,YO as Bn,dS as Nn,dR as Vn,dT as On,dQ as Yn}from"./zeni-epic-state-C5DO1jkr.js";import{b0 as Fn,z as v,V as L,a8 as ne,b7 as Ln,c as K,p as te,_ as V,i as be,K as ye,b8 as Gn,o as Hn,W as Se,b9 as $n,az as Zn,ba as Kn,bb as zn,aC as qn,bc as Jn,s as Qn,k as Ie,bd as Wn}from"./index-CnIO6_IQ.js";import{n as B}from"./mui-DNGY4bFU.js";import{u as xe}from"./useTaskManagerAccess-Cm5trA3i.js";import{U as Xn}from"./AccountMappingScreen-C5mOiJ2U.js";import{t as et,A as nt}from"./AddressScreen-DgUwrml_.js";import O from"./NotFoundScreen-DXy-BCit.js";import{g as tt}from"./analyticsHelper-CWMk7_rd.js";import{u as at,B as ot}from"./BusinessVerificationPageScreen-DM_jBIuD.js";import{C as st}from"./CompanyPassportScreen-BLtXgkEd.js";import{M as R}from"./MobileAppDrawer-BWNb5zLN.js";import{u as it,a as rt}from"./useEmailConnectResultRefresh-qgk6N8cm.js";import{q as le}from"./QBOConnectionScreen-DroXrkno.js";import{B as lt}from"./BillPayApprovalRoutes-BcCgse3-.js";import{R as ct}from"./ReimbursementApprovalRoutes-B2ftFL0O.js";import"./recharts-CTh_JhT_.js";import"./analytics-Vgn85Ur_.js";import"./plaid-DhfTjhua.js";import"./dnd-DuiAlI7w.js";import"./stripe-cKAAJElX.js";import"./lottie-Lb1ftKY1.js";import"./lexical-B-vxEaRQ.js";import"./pdf-B1uD4Ovv.js";import"./utils-CrhrpmD8.js";import"./accountMappingHelper-DSd2V454.js";import"./routePaths-CV12X_S-.js";import"./InboxNotificationsProvider-CiKEEv6Q.js";import"./useIsCustomersTabEnabled-C6mkabn2.js";import"./empty-CjoB5KP4.js";import"./pdf-lib-BKN88Kre.js";import"./index-LGKtWUy9.js";import"./url-B2x9G6No.js";import"./index-BNFAuGus.js";import"./decodeURIComponentSafe-D7APy95S.js";import"./useEnsureVendorListLoaded-CIShbpK4.js";import"./ReimbursementApprovalRuleDetailScreen-CHTcY28V.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new e.Error().stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="3dede6ee-5858-4d3d-887c-c76e2a2ba649",e._sentryDebugIdIdentifier="sentry-dbid-3dede6ee-5858-4d3d-887c-c76e2a2ba649")}catch{}})();const dt=B.div`
1
+ import{j as a}from"./liveblocks-BLpmr1Pv.js";import{a as d}from"./sentry-DWNq3t8E.js";import{h as Y,g as $,u as T,i as F,j as C,l as Z,n as J,o as k}from"./core-CbdTrw7T.js";import{fJ as w,Yn as je,Oy as ve,Xz as we,Yo as Ae,c8 as W,cM as De,cN as Ue,bp as Te,eg as _e,GQ as Re,Yp as Me,P$ as Be,Np as Ne,Ng as de,Nd as Ve,GU as ue,Nj as pe,Nm as ge,Ns as X,CY as ee,GT as Oe,lG as H,lJ as me,Yq as Ye,mT as Fe,H9 as Le,Yr as Ge,Ys as He,lE as $e,Yt as Ze,lH as Ke,v8 as ze,Yu as qe,Yv as Je,vc as Qe,i5 as We,VC as q,hZ as ae,hW as Xe,i2 as en,VD as nn,H6 as tn,Yw as an,Yx as on,NG as sn,mb as rn,eq as fe,er as he,Yy as ln,gG as cn,Wg as dn,H5 as oe,gL as se,gK as un,H4 as pn,gJ as gn,gI as mn,Yz as fn,V8 as Ce,YA as hn,YB as Cn,YC as bn,YD as yn,YE as Sn,YF as In,Hc as xn,YG as En,H3 as ie,GZ as G,YH as kn,YI as Pn,YJ as re,YK as jn,dG as vn,YL as wn,YM as An,YN as Dn,Vk as Un,dO as Tn,dV as _n,dU as Rn,dP as Mn,YO as Bn,dS as Nn,dR as Vn,dT as On,dQ as Yn}from"./zeni-epic-state-C5DO1jkr.js";import{b0 as Fn,z as v,V as L,a8 as ne,b7 as Ln,c as K,p as te,_ as V,i as be,K as ye,b8 as Gn,o as Hn,W as Se,b9 as $n,az as Zn,ba as Kn,bb as zn,aC as qn,bc as Jn,s as Qn,k as Ie,bd as Wn}from"./index-DtThPd2q.js";import{n as B}from"./mui-DNGY4bFU.js";import{u as xe}from"./useTaskManagerAccess-CT25hqtF.js";import{U as Xn}from"./AccountMappingScreen-CqBmv3P0.js";import{t as et,A as nt}from"./AddressScreen-BVizi07H.js";import O from"./NotFoundScreen-uAMK84U0.js";import{g as tt}from"./analyticsHelper-CVZpPd-a.js";import{u as at,B as ot}from"./BusinessVerificationPageScreen-CdT5YCya.js";import{C as st}from"./CompanyPassportScreen-CC7A9ebT.js";import{M as R}from"./MobileAppDrawer-CCAbxLE2.js";import{u as it,a as rt}from"./useEmailConnectResultRefresh-DAA2Py_6.js";import{q as le}from"./QBOConnectionScreen-BcfAhM15.js";import{B as lt}from"./BillPayApprovalRoutes-C0prBF5m.js";import{R as ct}from"./ReimbursementApprovalRoutes-CujO88Gv.js";import"./recharts-CTh_JhT_.js";import"./analytics-Vgn85Ur_.js";import"./plaid-DhfTjhua.js";import"./dnd-DuiAlI7w.js";import"./stripe-cKAAJElX.js";import"./lottie-Lb1ftKY1.js";import"./lexical-B-vxEaRQ.js";import"./pdf-B1uD4Ovv.js";import"./utils-CrhrpmD8.js";import"./accountMappingHelper-DSd2V454.js";import"./routePaths-DXYV831_.js";import"./InboxNotificationsProvider-CiKEEv6Q.js";import"./useIsCustomersTabEnabled-C9FFBZXp.js";import"./empty-CjoB5KP4.js";import"./pdf-lib-BKN88Kre.js";import"./index-LGKtWUy9.js";import"./url-B2x9G6No.js";import"./index-BNFAuGus.js";import"./decodeURIComponentSafe-D7APy95S.js";import"./useEnsureVendorListLoaded-CIShbpK4.js";import"./ReimbursementApprovalRuleDetailScreen-CHtkyq9-.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new e.Error().stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="3dede6ee-5858-4d3d-887c-c76e2a2ba649",e._sentryDebugIdIdentifier="sentry-dbid-3dede6ee-5858-4d3d-887c-c76e2a2ba649")}catch{}})();const dt=B.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as u}from"./liveblocks-BLpmr1Pv.js";import{h as Q,g as X,u as ee,i as W,j as k,N,l as K,t as en}from"./core-CbdTrw7T.js";import{bK as nn,fJ as x,cz as tn,II as Y,Xz as an,XC as sn,vr as ne,vf as te,mL as ae,Cu as L,a1j as be,gK as Ke,gJ as He,gI as Ge,a1k as on,IR as cn,Np as Ce,Ng as he,Nd as Ie,MU as J,Nj as Ae,Nm as _e,Ns as ke,CY as ve,h3 as rn,ct as un,er as dn,eq as ln,d4 as pn,bs as mn,cm as Fe,ZY as yn,LU as fe,Mw as fn,ZU as gn,bL as Sn,OK as ge,Oy as bn,Yo as Cn,Y8 as hn,OO as In,OS as An,a18 as je,Cn as _n,Tt as kn,a1l as vn,a1m as Pn,a1n as Tn,a1o as qe,a1p as En,a1q as Dn,a1r as Un,YV as wn,a1s as On,$Q as Ye,N4 as Fn,MY as xn,a1t as Vn,N0 as Bn,$R as we,Py as Je,mT as jn,vi as Qe,Cw as Nn,bF as Ne,CI as Re,cw as Rn,$O as Xe,Po as Oe,P5 as Ln,P6 as zn,Pa as Mn,$T as $n,Pr as Le,$P as Zn,a1u as Wn,$S as Kn,Qd as Se,a1g as Hn,g_ as Gn,K1 as qn,a1v as Yn,K6 as Jn,K5 as Qn}from"./zeni-epic-state-C5DO1jkr.js";import{az as Pe,V as ie,p as de,_ as q,z as E,a9 as se,c as D,a8 as Te,R as Z,cZ as Xn,af as oe,bH as V,au as xe,c_ as et,b0 as nt,c$ as tt,B as Be,d0 as at,s as ze,bg as Me,a2 as it,ac as st,d1 as ot,d2 as ct,d3 as rt,w as ut}from"./index-CnIO6_IQ.js";import{a as h}from"./sentry-DWNq3t8E.js";import{u as Ee,n as Ve,D as dt,S as lt}from"./mui-DNGY4bFU.js";import{u as pt,d as $e,B as Ue}from"./BusinessVerificationPageScreen-DM_jBIuD.js";import{M as le}from"./MobileAppDrawer-BWNb5zLN.js";import R from"./NotFoundScreen-DXy-BCit.js";import{a as Ze}from"./analyticsHelper-CWMk7_rd.js";import{d as We}from"./routePaths-CV12X_S-.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]="3536c048-999f-4f91-a21c-4f24553fa64c",e._sentryDebugIdIdentifier="sentry-dbid-3536c048-999f-4f91-a21c-4f24553fa64c")}catch{}})();const mt=Ve.div`
1
+ import{j as u}from"./liveblocks-BLpmr1Pv.js";import{h as Q,g as X,u as ee,i as W,j as k,N,l as K,t as en}from"./core-CbdTrw7T.js";import{bK as nn,fJ as x,cz as tn,II as Y,Xz as an,XC as sn,vr as ne,vf as te,mL as ae,Cu as L,a1j as be,gK as Ke,gJ as He,gI as Ge,a1k as on,IR as cn,Np as Ce,Ng as he,Nd as Ie,MU as J,Nj as Ae,Nm as _e,Ns as ke,CY as ve,h3 as rn,ct as un,er as dn,eq as ln,d4 as pn,bs as mn,cm as Fe,ZY as yn,LU as fe,Mw as fn,ZU as gn,bL as Sn,OK as ge,Oy as bn,Yo as Cn,Y8 as hn,OO as In,OS as An,a18 as je,Cn as _n,Tt as kn,a1l as vn,a1m as Pn,a1n as Tn,a1o as qe,a1p as En,a1q as Dn,a1r as Un,YV as wn,a1s as On,$Q as Ye,N4 as Fn,MY as xn,a1t as Vn,N0 as Bn,$R as we,Py as Je,mT as jn,vi as Qe,Cw as Nn,bF as Ne,CI as Re,cw as Rn,$O as Xe,Po as Oe,P5 as Ln,P6 as zn,Pa as Mn,$T as $n,Pr as Le,$P as Zn,a1u as Wn,$S as Kn,Qd as Se,a1g as Hn,g_ as Gn,K1 as qn,a1v as Yn,K6 as Jn,K5 as Qn}from"./zeni-epic-state-C5DO1jkr.js";import{az as Pe,V as ie,p as de,_ as q,z as E,a9 as se,c as D,a8 as Te,R as Z,cZ as Xn,af as oe,bH as V,au as xe,c_ as et,b0 as nt,c$ as tt,B as Be,d0 as at,s as ze,bg as Me,a2 as it,ac as st,d1 as ot,d2 as ct,d3 as rt,w as ut}from"./index-DtThPd2q.js";import{a as h}from"./sentry-DWNq3t8E.js";import{u as Ee,n as Ve,D as dt,S as lt}from"./mui-DNGY4bFU.js";import{u as pt,d as $e,B as Ue}from"./BusinessVerificationPageScreen-CdT5YCya.js";import{M as le}from"./MobileAppDrawer-CCAbxLE2.js";import R from"./NotFoundScreen-uAMK84U0.js";import{a as Ze}from"./analyticsHelper-CVZpPd-a.js";import{d as We}from"./routePaths-DXYV831_.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]="3536c048-999f-4f91-a21c-4f24553fa64c",e._sentryDebugIdIdentifier="sentry-dbid-3536c048-999f-4f91-a21c-4f24553fa64c")}catch{}})();const mt=Ve.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;