@zeniai/web-app-ui 5.3.83-dev → 5.3.83-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 (71) hide show
  1. package/dist/assets/{AccountMappingScreen-BlAlbrnx.js → AccountMappingScreen-US2XVxHS.js} +1 -1
  2. package/dist/assets/{ActualMatchingMatchDetailScreen-BJS18VqA.js → ActualMatchingMatchDetailScreen-CIWPn1Y6.js} +1 -1
  3. package/dist/assets/{AddressRoutes-CjGixOCb.js → AddressRoutes-Bc244OpL.js} +1 -1
  4. package/dist/assets/{AddressScreen-BaUyC6hl.js → AddressScreen-D6cv_M67.js} +1 -1
  5. package/dist/assets/{AiCfoScreen-C2aGObgH.js → AiCfoScreen-B5-4LiJc.js} +1 -1
  6. package/dist/assets/{AppDrawer-B_sqYgfu.js → AppDrawer-DTnf9CFV.js} +1 -1
  7. package/dist/assets/{BillPayApprovalRoutes-BdAzyIqn.js → BillPayApprovalRoutes-DmDSGeDR.js} +1 -1
  8. package/dist/assets/{BillPayRoutes-zkvSlLIB.js → BillPayRoutes-DOtQLf2H.js} +1 -1
  9. package/dist/assets/{BusinessVerificationPageScreen-DNhcrJIG.js → BusinessVerificationPageScreen-LkGxRSTs.js} +1 -1
  10. package/dist/assets/{CardsAiCfoScreen-C6zY5aHa.js → CardsAiCfoScreen-DMWgyqr4.js} +1 -1
  11. package/dist/assets/{ChargeCardRoutes-CUIv6Ff9.js → ChargeCardRoutes-0xaYBK7a.js} +1 -1
  12. package/dist/assets/{CompanyPassportScreen-2YfwMC3n.js → CompanyPassportScreen-CCGN8XdD.js} +1 -1
  13. package/dist/assets/{ConnectionAuthScreen-Dbf96wBm.js → ConnectionAuthScreen-B4ZsVkss.js} +1 -1
  14. package/dist/assets/{CustomerOnboardingAuthScreen-CsgeY_a3.js → CustomerOnboardingAuthScreen-8djGWQzD.js} +1 -1
  15. package/dist/assets/{CustomerOnboardingRoutes-CmTSBCfZ.js → CustomerOnboardingRoutes-BUPPuViZ.js} +1 -1
  16. package/dist/assets/{DashboardRoutes-ePaa6RzM.js → DashboardRoutes-DMjkbJKm.js} +1 -1
  17. package/dist/assets/{DefaultTenantHome-GxNyS_7I.js → DefaultTenantHome-ccHioZuC.js} +1 -1
  18. package/dist/assets/{DomesticWireDetailScreen-DGTecQgJ.js → DomesticWireDetailScreen-C0ktkm9X.js} +1 -1
  19. package/dist/assets/{DrawerScreen-Ac2BNHGU.js → DrawerScreen-iwe9vo8N.js} +1 -1
  20. package/dist/assets/{EntityDetailRoutes-By8U2MA9.js → EntityDetailRoutes-BkUIJeVW.js} +1 -1
  21. package/dist/assets/{ExpenseAutomationRoutes-CbAy6bRF.js → ExpenseAutomationRoutes-inQz41D4.js} +1 -1
  22. package/dist/assets/{FeaturePreviewScreen-WONNYPz2.js → FeaturePreviewScreen-X-JDJxdp.js} +1 -1
  23. package/dist/assets/{HubSpotOAuthCallbackScreen-CFlvNlLf.js → HubSpotOAuthCallbackScreen-CYYMDVs4.js} +1 -1
  24. package/dist/assets/{InvoicingRoutes-7QJOc7_T.js → InvoicingRoutes-YIPTztGo.js} +1 -1
  25. package/dist/assets/{MagicLinkRoutes-BibsnD1q.js → MagicLinkRoutes-DCjdmJsu.js} +1 -1
  26. package/dist/assets/{MagicLinkSignInScreen-BpOShVw6.js → MagicLinkSignInScreen-DIHfTzR_.js} +1 -1
  27. package/dist/assets/{MobileAppDrawer-l8XzezC6.js → MobileAppDrawer-DbZpT3WI.js} +1 -1
  28. package/dist/assets/{NotFoundScreen-azJwEf6u.js → NotFoundScreen-D9bcBk9H.js} +1 -1
  29. package/dist/assets/{NotificationRoutes-C4m7rB7l.js → NotificationRoutes-BzMEu6Wm.js} +1 -1
  30. package/dist/assets/{OAuthConsentScreen-CuXtenPv.js → OAuthConsentScreen-CK67H2gL.js} +1 -1
  31. package/dist/assets/{PandLWithForecastRoutes-FHrcpjWT.js → PandLWithForecastRoutes-DOamJ_Fj.js} +1 -1
  32. package/dist/assets/{PaymentLinkScreen-BSk9RfvR.js → PaymentLinkScreen-eQl1XPPA.js} +1 -1
  33. package/dist/assets/{PeopleRoutes-BxrX1JFh.js → PeopleRoutes-RAr7GTqt.js} +1 -1
  34. package/dist/assets/{PerformanceRoutes-u7jsxKOk.js → PerformanceRoutes-BlaxgxAu.js} +1 -1
  35. package/dist/assets/{QBOConnectionScreen-BSw99hss.js → QBOConnectionScreen-DUhvVruv.js} +1 -1
  36. package/dist/assets/{ReimbursementApprovalRoutes-Q1SCHF1l.js → ReimbursementApprovalRoutes-siKEt4P5.js} +1 -1
  37. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DILlSzn2.js → ReimbursementApprovalRuleDetailScreen-LTuYNlBh.js} +1 -1
  38. package/dist/assets/{ReimbursementRoutes-6xzsoOoQ.js → ReimbursementRoutes-VvEa2eeW.js} +1 -1
  39. package/dist/assets/{ReportsRoutes-BOEFIFhM.js → ReportsRoutes-C2d97Zc4.js} +1 -1
  40. package/dist/assets/{RewardsRoutes-DJDgplhQ.js → RewardsRoutes-CD8Bg_Li.js} +1 -1
  41. package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-5-GevFMn.js → ScheduleDetailsPrepaidExpensesScreen-RqztnMI8.js} +1 -1
  42. package/dist/assets/{ScreenRoutes-C3N1CK9B.js → ScreenRoutes-rMyVJ0Wa.js} +2 -2
  43. package/dist/assets/{SettingsRoutes-DFwRhTG0.js → SettingsRoutes-D-DVCxRY.js} +1 -1
  44. package/dist/assets/{SetupPagesScreen-Bwcyn81K.js → SetupPagesScreen-BeL32jvE.js} +1 -1
  45. package/dist/assets/{SignInScreen-VNP75F_z.js → SignInScreen-ir027M2w.js} +1 -1
  46. package/dist/assets/{SignOutScreen-DqT1J3CH.js → SignOutScreen-Dh2r2ma7.js} +1 -1
  47. package/dist/assets/{TaskListScreen-vhycpFEZ.js → TaskListScreen-bWUpRp3D.js} +1 -1
  48. package/dist/assets/{TaskRoutes-B6-8g-HW.js → TaskRoutes-Lle5AHhb.js} +1 -1
  49. package/dist/assets/{TransactionDetailRoutes-BHcGo7KC.js → TransactionDetailRoutes-SxiOJJwM.js} +1 -1
  50. package/dist/assets/{TransactionDetailScreen-CuKBIwpF.js → TransactionDetailScreen-C1bVEOAX.js} +1 -1
  51. package/dist/assets/{TransactionListRoutes-D-MmK7A2.js → TransactionListRoutes-Bmw678LX.js} +1 -1
  52. package/dist/assets/{TreasuryRoutes-Pqnpfg2v.js → TreasuryRoutes-M8WR0qHE.js} +1 -1
  53. package/dist/assets/{VendorsRoutes-CNNCASwJ.js → VendorsRoutes-DJp0syoy.js} +1 -1
  54. package/dist/assets/{WiseConfirmationScreen-Q6839g40.js → WiseConfirmationScreen-Fy_GbEXJ.js} +1 -1
  55. package/dist/assets/{ZeniAccountRoutes-5EIDUyAv.js → ZeniAccountRoutes-Bt_zuUh-.js} +1 -1
  56. package/dist/assets/{ZeniAccountStatementScreen-DEVWrSPx.js → ZeniAccountStatementScreen-Bu1Mm_37.js} +1 -1
  57. package/dist/assets/{analyticsHelper-D3Z95hnv.js → analyticsHelper-D5T9Pp0r.js} +1 -1
  58. package/dist/assets/{getLocaleForTenant-CZcWFJHh.js → getLocaleForTenant-D6brqFOn.js} +1 -1
  59. package/dist/assets/{index-BvMe6BwU.js → index-DvOt4VS9.js} +5 -5
  60. package/dist/assets/{routePaths-CehqSbwZ.js → routePaths-of7B18Ze.js} +1 -1
  61. package/dist/assets/{useActualMatchingMatchDetail-hr4zSrCe.js → useActualMatchingMatchDetail-YT3I0Lzu.js} +1 -1
  62. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-C5O_5leW.js → useAiCfoDashboardSuggestedQuestionsChips-Dm2nLAVE.js} +1 -1
  63. package/dist/assets/{useAskAiCfoHostNavButtonProps-BCWJ7jlQ.js → useAskAiCfoHostNavButtonProps-DqbLwjuM.js} +1 -1
  64. package/dist/assets/{useChargeCardPusherEvents-C3NE2ZHP.js → useChargeCardPusherEvents-DIzup14w.js} +1 -1
  65. package/dist/assets/{useEmailConnectResultRefresh-Bv3uwquX.js → useEmailConnectResultRefresh-CaTrYS8H.js} +1 -1
  66. package/dist/assets/{useInitialThreadRequest-BCD3tBzH.js → useInitialThreadRequest-B8hjmQPb.js} +1 -1
  67. package/dist/assets/{useTaskManagerAccess-BRPFjPMD.js → useTaskManagerAccess-CsQUeQX-.js} +1 -1
  68. package/dist/assets/{useTaskManagerPusherEvents-6s-T5fU4.js → useTaskManagerPusherEvents-DPwaoExz.js} +1 -1
  69. package/dist/assets/{withTransactionSidePanel-C47wmMlX.js → withTransactionSidePanel-dWI8TaQe.js} +1 -1
  70. package/dist/index.html +1 -1
  71. package/package.json +1 -1
@@ -1 +1 @@
1
- import{j as m}from"./liveblocks-QExkfWwX.js";import{a as g}from"./sentry-oILOkT84.js";import{h as w,u as x,g as T,i as k,j as O,l as E}from"./core-C9JgQJB4.js";import{z as C,bq as F,a6 as P,j as V,Q as j,n as b,br as L,ac as A,aE as U,p as B}from"./index-BvMe6BwU.js";import{fI as N,gL as M,BY as Y,gG as _,c9 as G,YH as R,bn as z,v2 as H,uS as q,mD as Q,oc as S,YI as Z,bF as $,cF as D,on as J,ox as K}from"./zeni-epic-state-DLEY0NmH.js";import"./mui-DA_IUYGW.js";import{d as W}from"./routePaths-CehqSbwZ.js";import{M as X}from"./MobileAppDrawer-l8XzezC6.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new n.Error().stack;t&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[t]="2eac4cb8-5ba1-4abe-9fef-03acabe2e4a2",n._sentryDebugIdIdentifier="sentry-dbid-2eac4cb8-5ba1-4abe-9fef-03acabe2e4a2")}catch{}})();const ee=E((function(n){const t=_(n),i=C.getSignedInUser(),p=N(n),c=p.tenantId,l={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=G(p?.userRole??[])&&t.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=R(n.companyConfigState),a=n.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:t.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:t,allIndustries:e.companyIndustries??[],allNationalityCountries:a,isDisabled:f,authParams:l,filesEndPoint:`${A.fileMicroServiceBaseUrl}`,isZeniUser:z(i)}}),(function(n,t){const{companyId:i,currentTenant:p,navigate:c,location:l}=t,{tenantEmailDomain:f}=p;return{onScheduleClick:e=>{let a=e.href;a.includes("http")||(a="https://".concat(a)),window.open(a,"_blank")},onSaveAll:()=>{n(K())},onAddressClick:e=>{const a=W(f,e),o=B(l.state?.pathnameStackToGoBack,l.pathname);c(a,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{n(J({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:a,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:u}=a,{meetingLink:y}=d,{incDate:s}=o,{taxesFiledYears:h}=r,v={companyInfo:{...a,website:u!=""&&u!=null?D(u):void 0,meetingLink:y!=""&&y!=null?D(y):void 0,industry:a.industry.selectedOption,companyIndustryType:a.companyIndustryType?.selectedOption??void 0,companySubIndustry:a.companySubIndustry?.selectedOption??void 0,businessModel:a.businessModel.selectedOption??"",companySourceOfFunds:a.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:a.companySourceOfFundsDescription??void 0,countriesOfOperations:a.countriesOfOperations?.selectedOptions?.map((I=>I.length===2?I:U(I)))??[],transactionVolume:a.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:a.transactionVolumeDescription??void 0,regulatedStatus:a.regulatedStatus??void 0,regulatedStatusDescription:a.regulatedStatusDescription??void 0,usNexus:a.usNexus??void 0,usNexusTypes:a.usNexusTypes?.selectedOptions??[],purposeOfAccount:a.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:a.purposeOfAccountDescription??void 0},incInfo:{typeOfInc:o.typeOfInc.selectedOption??"",stateOfInc:o.stateOfInc.selectedOption??"",incDate:s!=null?$(s?.toString()):s,fileId:o.fileIds[0]},taxDetails:{taxIdOrEIN:r.taxIdOrEIN,sicCode:r.sicCode,naicsCode:r.naicsCode,dunsNumber:r.dunsNumber,taxesFiledYears:h.selectedOptions.map((I=>parseInt(I))),fileId:r.fileIds[0]}};n(S({companyDetails:v}))},onPrimaryContactDetailsUpdated:e=>{n(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{n(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:void 0}]}))},onNewCompanyOfficerRemoved:e=>{n(Z(e))},onCompanyOfficerUpdated:e=>{n(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:e.userId}]}))},updateFilesEntity:e=>{n(Q({files:e}))},onDeleteFile:e=>{n(q(e))},onEditFileName:(e,a)=>{n(H(e,a.split(".")[0]))}}}))(L);function de(){const n=w(),t=x(),i=T(),{tenantEmailDomain:p}=k(),[c,l]=g.useState(!1),[f,e]=g.useState(!1),a=O((s=>s.companyViewState.passportView.fetchState)),o=O((s=>s.companyConfigState.fetchState)),r=O((s=>N(s))),d=r.companyId??C.getSignedInUserTenant(p)?.companyId;if(C.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect((()=>{c||a!=="Not-Started"||d==null||(l(!0),t(M(d)))}),[c,a,d,t]),g.useEffect((()=>{o==="Not-Started"&&t(Y())}),[o,t]);const u=s=>{e(s)},y=a==="Not-Started"||a==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&a==="Error"?m.jsx(F,{onGoHome:()=>n("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(P,{analytics:V,onLoad:s=>s.trackPageLoaded(j.Event.companyPassport,b(i)?"Settings":"Company Passport")}),b(i)?m.jsx(X,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:n,location:i,isLoading:y,currentTenant:r,isSettings:b(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
1
+ import{j as m}from"./liveblocks-QExkfWwX.js";import{a as g}from"./sentry-oILOkT84.js";import{h as w,u as x,g as T,i as k,j as O,l as E}from"./core-C9JgQJB4.js";import{z as C,bq as F,a6 as P,j as V,Q as j,n as b,br as L,ac as A,aE as U,p as B}from"./index-DvOt4VS9.js";import{fI as N,gL as M,BY as Y,gG as _,c9 as G,YH as R,bn as z,v2 as H,uS as q,mD as Q,oc as S,YI as Z,bF as $,cF as D,on as J,ox as K}from"./zeni-epic-state-DLEY0NmH.js";import"./mui-DA_IUYGW.js";import{d as W}from"./routePaths-of7B18Ze.js";import{M as X}from"./MobileAppDrawer-DbZpT3WI.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new n.Error().stack;t&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[t]="2eac4cb8-5ba1-4abe-9fef-03acabe2e4a2",n._sentryDebugIdIdentifier="sentry-dbid-2eac4cb8-5ba1-4abe-9fef-03acabe2e4a2")}catch{}})();const ee=E((function(n){const t=_(n),i=C.getSignedInUser(),p=N(n),c=p.tenantId,l={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=G(p?.userRole??[])&&t.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=R(n.companyConfigState),a=n.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:t.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:t,allIndustries:e.companyIndustries??[],allNationalityCountries:a,isDisabled:f,authParams:l,filesEndPoint:`${A.fileMicroServiceBaseUrl}`,isZeniUser:z(i)}}),(function(n,t){const{companyId:i,currentTenant:p,navigate:c,location:l}=t,{tenantEmailDomain:f}=p;return{onScheduleClick:e=>{let a=e.href;a.includes("http")||(a="https://".concat(a)),window.open(a,"_blank")},onSaveAll:()=>{n(K())},onAddressClick:e=>{const a=W(f,e),o=B(l.state?.pathnameStackToGoBack,l.pathname);c(a,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{n(J({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:a,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:u}=a,{meetingLink:y}=d,{incDate:s}=o,{taxesFiledYears:h}=r,v={companyInfo:{...a,website:u!=""&&u!=null?D(u):void 0,meetingLink:y!=""&&y!=null?D(y):void 0,industry:a.industry.selectedOption,companyIndustryType:a.companyIndustryType?.selectedOption??void 0,companySubIndustry:a.companySubIndustry?.selectedOption??void 0,businessModel:a.businessModel.selectedOption??"",companySourceOfFunds:a.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:a.companySourceOfFundsDescription??void 0,countriesOfOperations:a.countriesOfOperations?.selectedOptions?.map((I=>I.length===2?I:U(I)))??[],transactionVolume:a.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:a.transactionVolumeDescription??void 0,regulatedStatus:a.regulatedStatus??void 0,regulatedStatusDescription:a.regulatedStatusDescription??void 0,usNexus:a.usNexus??void 0,usNexusTypes:a.usNexusTypes?.selectedOptions??[],purposeOfAccount:a.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:a.purposeOfAccountDescription??void 0},incInfo:{typeOfInc:o.typeOfInc.selectedOption??"",stateOfInc:o.stateOfInc.selectedOption??"",incDate:s!=null?$(s?.toString()):s,fileId:o.fileIds[0]},taxDetails:{taxIdOrEIN:r.taxIdOrEIN,sicCode:r.sicCode,naicsCode:r.naicsCode,dunsNumber:r.dunsNumber,taxesFiledYears:h.selectedOptions.map((I=>parseInt(I))),fileId:r.fileIds[0]}};n(S({companyDetails:v}))},onPrimaryContactDetailsUpdated:e=>{n(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{n(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:void 0}]}))},onNewCompanyOfficerRemoved:e=>{n(Z(e))},onCompanyOfficerUpdated:e=>{n(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:e.userId}]}))},updateFilesEntity:e=>{n(Q({files:e}))},onDeleteFile:e=>{n(q(e))},onEditFileName:(e,a)=>{n(H(e,a.split(".")[0]))}}}))(L);function de(){const n=w(),t=x(),i=T(),{tenantEmailDomain:p}=k(),[c,l]=g.useState(!1),[f,e]=g.useState(!1),a=O((s=>s.companyViewState.passportView.fetchState)),o=O((s=>s.companyConfigState.fetchState)),r=O((s=>N(s))),d=r.companyId??C.getSignedInUserTenant(p)?.companyId;if(C.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect((()=>{c||a!=="Not-Started"||d==null||(l(!0),t(M(d)))}),[c,a,d,t]),g.useEffect((()=>{o==="Not-Started"&&t(Y())}),[o,t]);const u=s=>{e(s)},y=a==="Not-Started"||a==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&a==="Error"?m.jsx(F,{onGoHome:()=>n("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(P,{analytics:V,onLoad:s=>s.trackPageLoaded(j.Event.companyPassport,b(i)?"Settings":"Company Passport")}),b(i)?m.jsx(X,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:n,location:i,isLoading:y,currentTenant:r,isSettings:b(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
@@ -1,4 +1,4 @@
1
- import{j as I}from"./liveblocks-QExkfWwX.js";import{a as o}from"./sentry-oILOkT84.js";import{u as F,h as H,g as R,j as C,N as w}from"./core-C9JgQJB4.js";import{Ul as q,fI as z,go as G,pW as Q,gP as U,gn as V,gl as W,UL as B,gk as A}from"./zeni-epic-state-DLEY0NmH.js";import{u as J,z as E,L as T,G as K,H as M}from"./index-BvMe6BwU.js";import{n as X}from"./mui-DA_IUYGW.js";import{P as h,a as _}from"./AccountMappingScreen-BlAlbrnx.js";import{t as Y}from"./getLocaleForTenant-CZcWFJHh.js";import{g as Z,Q as ee}from"./QBOConnectionScreen-BSw99hss.js";import"./recharts-ikWEYduq.js";import"./analytics-Dk2G_EzJ.js";import"./plaid-CG0Jj5NR.js";import"./dnd-C8GpPG0g.js";import"./stripe-cKAAJElX.js";import"./lottie-C8c0mGol.js";import"./lexical-DewpM37L.js";import"./pdf-CglQcGFZ.js";import"./utils-A5fkS8h7.js";import"./MobileAppDrawer-l8XzezC6.js";import"./InboxNotificationsProvider-yQHZ5K7x.js";import"./useTaskManagerAccess-BRPFjPMD.js";import"./accountMappingHelper-Cmqzt3o8.js";import"./empty-Bn6LwN65.js";import"./pdf-lib-C9IVGH9O.js";import"./index-B2whCLRz.js";import"./url-DoKU4Zzh.js";import"./index-BuFdtVKe.js";import"./decodeURIComponentSafe-CYuijBUP.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="d7e16884-fd2e-4aff-a431-016f7e6248d1",t._sentryDebugIdIdentifier="sentry-dbid-d7e16884-fd2e-4aff-a431-016f7e6248d1")}catch{}})();const te=X.div`
1
+ import{j as I}from"./liveblocks-QExkfWwX.js";import{a as o}from"./sentry-oILOkT84.js";import{u as F,h as H,g as R,j as C,N as w}from"./core-C9JgQJB4.js";import{Ul as q,fI as z,go as G,pW as Q,gP as U,gn as V,gl as W,UL as B,gk as A}from"./zeni-epic-state-DLEY0NmH.js";import{u as J,z as E,L as T,G as K,H as M}from"./index-DvOt4VS9.js";import{n as X}from"./mui-DA_IUYGW.js";import{P as h,a as _}from"./AccountMappingScreen-US2XVxHS.js";import{t as Y}from"./getLocaleForTenant-D6brqFOn.js";import{g as Z,Q as ee}from"./QBOConnectionScreen-DUhvVruv.js";import"./recharts-ikWEYduq.js";import"./analytics-Dk2G_EzJ.js";import"./plaid-CG0Jj5NR.js";import"./dnd-C8GpPG0g.js";import"./stripe-cKAAJElX.js";import"./lottie-C8c0mGol.js";import"./lexical-DewpM37L.js";import"./pdf-CglQcGFZ.js";import"./utils-A5fkS8h7.js";import"./MobileAppDrawer-DbZpT3WI.js";import"./InboxNotificationsProvider-yQHZ5K7x.js";import"./useTaskManagerAccess-CsQUeQX-.js";import"./accountMappingHelper-Cmqzt3o8.js";import"./empty-Bn6LwN65.js";import"./pdf-lib-C9IVGH9O.js";import"./index-B2whCLRz.js";import"./url-DoKU4Zzh.js";import"./index-BuFdtVKe.js";import"./decodeURIComponentSafe-CYuijBUP.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="d7e16884-fd2e-4aff-a431-016f7e6248d1",t._sentryDebugIdIdentifier="sentry-dbid-d7e16884-fd2e-4aff-a431-016f7e6248d1")}catch{}})();const te=X.div`
2
2
  display: flex;
3
3
  flex: 1 1 auto;
4
4
  flex-direction: row;
@@ -1 +1 @@
1
- import{j as i}from"./liveblocks-QExkfWwX.js";import{z as m}from"./index-BvMe6BwU.js";import{g as n}from"./QBOConnectionScreen-BSw99hss.js";import"./sentry-oILOkT84.js";import{g as p,N as a}from"./core-C9JgQJB4.js";import"./zeni-epic-state-DLEY0NmH.js";import"./recharts-ikWEYduq.js";import"./mui-DA_IUYGW.js";import"./analytics-Dk2G_EzJ.js";import"./plaid-CG0Jj5NR.js";import"./dnd-C8GpPG0g.js";import"./stripe-cKAAJElX.js";import"./lottie-C8c0mGol.js";import"./lexical-DewpM37L.js";import"./pdf-CglQcGFZ.js";import"./utils-A5fkS8h7.js";import"./empty-Bn6LwN65.js";import"./pdf-lib-C9IVGH9O.js";import"./index-B2whCLRz.js";import"./url-DoKU4Zzh.js";import"./index-BuFdtVKe.js";import"./decodeURIComponentSafe-CYuijBUP.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="a1205b81-d106-415b-bd92-85aeae53ace3",t._sentryDebugIdIdentifier="sentry-dbid-a1205b81-d106-415b-bd92-85aeae53ace3")}catch{}})();const U=()=>{const t=p(),{code:o,realmId:r,state:e}=n(t.search),s=m.getSignedInUser()?.userId??"";if(f(o,r,e,s)===!0){const d=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return i.jsx(a,{to:d})}return i.jsx(a,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
1
+ import{j as i}from"./liveblocks-QExkfWwX.js";import{z as m}from"./index-DvOt4VS9.js";import{g as n}from"./QBOConnectionScreen-DUhvVruv.js";import"./sentry-oILOkT84.js";import{g as p,N as a}from"./core-C9JgQJB4.js";import"./zeni-epic-state-DLEY0NmH.js";import"./recharts-ikWEYduq.js";import"./mui-DA_IUYGW.js";import"./analytics-Dk2G_EzJ.js";import"./plaid-CG0Jj5NR.js";import"./dnd-C8GpPG0g.js";import"./stripe-cKAAJElX.js";import"./lottie-C8c0mGol.js";import"./lexical-DewpM37L.js";import"./pdf-CglQcGFZ.js";import"./utils-A5fkS8h7.js";import"./empty-Bn6LwN65.js";import"./pdf-lib-C9IVGH9O.js";import"./index-B2whCLRz.js";import"./url-DoKU4Zzh.js";import"./index-BuFdtVKe.js";import"./decodeURIComponentSafe-CYuijBUP.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="a1205b81-d106-415b-bd92-85aeae53ace3",t._sentryDebugIdIdentifier="sentry-dbid-a1205b81-d106-415b-bd92-85aeae53ace3")}catch{}})();const U=()=>{const t=p(),{code:o,realmId:r,state:e}=n(t.search),s=m.getSignedInUser()?.userId??"";if(f(o,r,e,s)===!0){const d=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return i.jsx(a,{to:d})}return i.jsx(a,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-QExkfWwX.js";import{t as wn,A as Ge}from"./AddressScreen-BaUyC6hl.js";import An from"./NotFoundScreen-azJwEf6u.js";import{a as d,u as Me}from"./sentry-oILOkT84.js";import{h as _e,g as xe,u as se,i as Te,j as E,N as Q,q as Pn,l as cn,n as Dn,o as q}from"./core-C9JgQJB4.js";import{fI as Y,e0 as Ee,d$ as we,bq as jn,UC as Bn,bS as Fn,pU as Un,BI as Vn,BL as Rn,VZ as Ln,V_ as Nn,ly as Oe,lB as dn,Vd as $n,c0 as Gn,c9 as fe,Ca as Ae,BX as Mn,V$ as me,Cb as un,SM as Qn,mL as ln,dj as pn,W0 as Kn,W1 as zn,uL as Wn,V0 as Ce,hZ as qn,U$ as be,hW as Hn,GB as Zn,uP as Jn,hO as Xn,hR as Qe,W2 as mn,W3 as Yn,Mr as et,W4 as nt,Mv as tt,BO as at,W5 as ot,W6 as st,lw as rt,lz as it,Cn as ct,BZ as gn,C9 as dt,bF as Ke,cF as ut,Cm as ze,v2 as lt,uS as pt,mD as mt,gJ as gt,gI as ft,gH as yt,W7 as ht,BR as Ct,Co as bt,Cr as St,Cu as It,CA as kt,dk as Ot}from"./zeni-epic-state-DLEY0NmH.js";import{z,W as Pe,A as J,D as vt,p as W,a6 as re,j as g,aC as _t,ag as fn,$ as xt,K as yn,V as hn,h as X,X as ge,Q as ve,aD as Tt,H as We,r as qe,ac as Et,aE as He,aF as wt,aG as At}from"./index-BvMe6BwU.js";import{n as De}from"./mui-DA_IUYGW.js";import{g as Pt,h as Dt,q as ie}from"./QBOConnectionScreen-BSw99hss.js";import{u as jt,a as Bt}from"./useEmailConnectResultRefresh-Bv3uwquX.js";import{u as Ft}from"./useChargeCardPusherEvents-C3NE2ZHP.js";import"./recharts-ikWEYduq.js";import"./analytics-Dk2G_EzJ.js";import"./plaid-CG0Jj5NR.js";import"./dnd-C8GpPG0g.js";import"./stripe-cKAAJElX.js";import"./lottie-C8c0mGol.js";import"./lexical-DewpM37L.js";import"./pdf-CglQcGFZ.js";import"./utils-A5fkS8h7.js";import"./empty-Bn6LwN65.js";import"./pdf-lib-C9IVGH9O.js";import"./index-B2whCLRz.js";import"./url-DoKU4Zzh.js";import"./index-BuFdtVKe.js";import"./decodeURIComponentSafe-CYuijBUP.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]="5b055bf8-0b58-403d-bf69-17f7c09fb3e3",e._sentryDebugIdIdentifier="sentry-dbid-5b055bf8-0b58-403d-bf69-17f7c09fb3e3")}catch{}})();const Ze=e=>{switch(e){case"Complete":return"yes";case"Pending Review":case"Incomplete":return"partially";default:return"no"}},Ut=()=>{const e=_e(),l=xe(),i=se(),[o,p]=d.useState(!1),[u,c]=d.useState(!1),{tenantEmailDomain:v}=Te(),n=z.getSignedInUser(),{useFeatureGate:t}=Pe(),{isFeatureEnabled:C}=t(J.isApAgingFeatureEnabled),{isFeatureEnabled:a}=t(J.isArAgingFeatureEnabled),{isFeatureEnabled:A}=t(J.isReferralFeatureEnabled),{isFeatureEnabled:w}=t(J.isDebitCardFeatureEnabled),k=vt(),O=E((S=>Y(S))),P=E((S=>S.onboardingCustomerViewState.fetchState)),_=O.excludedResources,F=O.companyId??z.getSignedInUserTenant(v)?.companyId;if(n==null)throw Error("Can't access onboarding flow without signing in...");const m=Ee(w,O),b=we(O),D=[],V=_?.resources?.find((S=>S.resource==="/reports/top_expenses"))==null,h=_?.resources?.find((S=>S.resource==="/reports/task_card"))==null,r=O?.userRole!=null&&jn(O?.userRole),x=_?.resources?.find((S=>S.resource==="/bills"))==null&&!r,T=_?.resources?.find((S=>S.resource==="/reimbursements"))==null;V===!1&&D.push("top_expenses"),h===!1&&D.push("task_card"),x===!1&&D.push("bill_pay_card","bill_pay_promo_card"),T===!1&&D.push("reimbursement_card","reimbursement_promo_card"),D.push("zeni_accounts_promo_card","treasury_promo_card"),A===!1&&D.push("rewards_card");const f=E((S=>{const U=[];C===!1&&U.push("accounts_payable_aging"),a===!1&&U.push("accounts_receivable_aging"),U.push("zeni_accounts_promo_card","treasury_promo_card"),A===!1&&U.push("rewards_card"),k===!1&&U.push("expense_automation_card");const H=Bn(S,U);return Fn(H.reportsInOrder.map((G=>({fetchState:G.fetchState,error:G.error})))).fetchState}));d.useEffect((()=>{P!=="Completed"||o||m||b||(p(!0),i(Un(n.userId,F,O.tenantId,!0,!1,D)))}),[o,P,m,b,n,O.tenantId,i]);const j=d.useRef(!1),N=d.useCallback((()=>{const S={pathnameStackToGoBack:W(l.state?.pathnameStackToGoBack,l.pathname),message:"activation"};e(m?"../../checking":b?"../../cards":"../../dashboard",{state:S})}),[e,l,m,b]),$=d.useCallback((()=>{j.current||(j.current=!0,N())}),[N]);if(d.useEffect((()=>{const S=setTimeout((()=>c(!0)),3e3);return()=>clearTimeout(S)}),[]),d.useEffect((()=>{const S=setTimeout($,6e3);return()=>clearTimeout(S)}),[$]),d.useEffect((()=>{m||b||!u||f!=="Completed"&&f!=="Error"||$()}),[u,f,m,b,$]),P!=="Completed")return s.jsx(Q,{to:"../"});const L=O.company?.companyOnboardingInfo?.onboardingInfo,ee={timeSinceQuoteSign:L?.onboardingTimeSinceQuoteSigned??"",timeSinceQuoteSignInMinutes:L?.onboardingToQuoteSignMinutes??0,isKybDone:Ze(L?.businessVerified?.status),isKycDone:Ze(L?.identityVerified?.status),paymentType:"",paymentSource:"",qboConnectionSource:L?.accountingConnectionCreationMode??""};return s.jsxs(s.Fragment,{children:[s.jsx(re,{analytics:g,onLoad:S=>S.trackOnboardingDashboardActivation(ee)}),s.jsx(_t,{show:!0,onComplete:$})]})},Se=["reading_books","finance_graph","reconciliation","cfo_foundation"],Ie=["llm_fine_tuning","rag_knowledge_graph","personalized_context"],Je=(e,l)=>{const i=new Map(e.map((o=>[o.key,o])));return l.map((o=>{return p=i.get(o)?.status,p==="starting"||p==="building"?p:"idle";var p}))},Xe=(e,l)=>{if(e.length===0)return!1;const i=new Map(e.map((o=>[o.key,o])));return l.every((o=>i.get(o)?.status==="ready"))},Ye=De.div`
1
+ import{j as s}from"./liveblocks-QExkfWwX.js";import{t as wn,A as Ge}from"./AddressScreen-D6cv_M67.js";import An from"./NotFoundScreen-D9bcBk9H.js";import{a as d,u as Me}from"./sentry-oILOkT84.js";import{h as _e,g as xe,u as se,i as Te,j as E,N as Q,q as Pn,l as cn,n as Dn,o as q}from"./core-C9JgQJB4.js";import{fI as Y,e0 as Ee,d$ as we,bq as jn,UC as Bn,bS as Fn,pU as Un,BI as Vn,BL as Rn,VZ as Ln,V_ as Nn,ly as Oe,lB as dn,Vd as $n,c0 as Gn,c9 as fe,Ca as Ae,BX as Mn,V$ as me,Cb as un,SM as Qn,mL as ln,dj as pn,W0 as Kn,W1 as zn,uL as Wn,V0 as Ce,hZ as qn,U$ as be,hW as Hn,GB as Zn,uP as Jn,hO as Xn,hR as Qe,W2 as mn,W3 as Yn,Mr as et,W4 as nt,Mv as tt,BO as at,W5 as ot,W6 as st,lw as rt,lz as it,Cn as ct,BZ as gn,C9 as dt,bF as Ke,cF as ut,Cm as ze,v2 as lt,uS as pt,mD as mt,gJ as gt,gI as ft,gH as yt,W7 as ht,BR as Ct,Co as bt,Cr as St,Cu as It,CA as kt,dk as Ot}from"./zeni-epic-state-DLEY0NmH.js";import{z,W as Pe,A as J,D as vt,p as W,a6 as re,j as g,aC as _t,ag as fn,$ as xt,K as yn,V as hn,h as X,X as ge,Q as ve,aD as Tt,H as We,r as qe,ac as Et,aE as He,aF as wt,aG as At}from"./index-DvOt4VS9.js";import{n as De}from"./mui-DA_IUYGW.js";import{g as Pt,h as Dt,q as ie}from"./QBOConnectionScreen-DUhvVruv.js";import{u as jt,a as Bt}from"./useEmailConnectResultRefresh-CaTrYS8H.js";import{u as Ft}from"./useChargeCardPusherEvents-DIzup14w.js";import"./recharts-ikWEYduq.js";import"./analytics-Dk2G_EzJ.js";import"./plaid-CG0Jj5NR.js";import"./dnd-C8GpPG0g.js";import"./stripe-cKAAJElX.js";import"./lottie-C8c0mGol.js";import"./lexical-DewpM37L.js";import"./pdf-CglQcGFZ.js";import"./utils-A5fkS8h7.js";import"./empty-Bn6LwN65.js";import"./pdf-lib-C9IVGH9O.js";import"./index-B2whCLRz.js";import"./url-DoKU4Zzh.js";import"./index-BuFdtVKe.js";import"./decodeURIComponentSafe-CYuijBUP.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]="5b055bf8-0b58-403d-bf69-17f7c09fb3e3",e._sentryDebugIdIdentifier="sentry-dbid-5b055bf8-0b58-403d-bf69-17f7c09fb3e3")}catch{}})();const Ze=e=>{switch(e){case"Complete":return"yes";case"Pending Review":case"Incomplete":return"partially";default:return"no"}},Ut=()=>{const e=_e(),l=xe(),i=se(),[o,p]=d.useState(!1),[u,c]=d.useState(!1),{tenantEmailDomain:v}=Te(),n=z.getSignedInUser(),{useFeatureGate:t}=Pe(),{isFeatureEnabled:C}=t(J.isApAgingFeatureEnabled),{isFeatureEnabled:a}=t(J.isArAgingFeatureEnabled),{isFeatureEnabled:A}=t(J.isReferralFeatureEnabled),{isFeatureEnabled:w}=t(J.isDebitCardFeatureEnabled),k=vt(),O=E((S=>Y(S))),P=E((S=>S.onboardingCustomerViewState.fetchState)),_=O.excludedResources,F=O.companyId??z.getSignedInUserTenant(v)?.companyId;if(n==null)throw Error("Can't access onboarding flow without signing in...");const m=Ee(w,O),b=we(O),D=[],V=_?.resources?.find((S=>S.resource==="/reports/top_expenses"))==null,h=_?.resources?.find((S=>S.resource==="/reports/task_card"))==null,r=O?.userRole!=null&&jn(O?.userRole),x=_?.resources?.find((S=>S.resource==="/bills"))==null&&!r,T=_?.resources?.find((S=>S.resource==="/reimbursements"))==null;V===!1&&D.push("top_expenses"),h===!1&&D.push("task_card"),x===!1&&D.push("bill_pay_card","bill_pay_promo_card"),T===!1&&D.push("reimbursement_card","reimbursement_promo_card"),D.push("zeni_accounts_promo_card","treasury_promo_card"),A===!1&&D.push("rewards_card");const f=E((S=>{const U=[];C===!1&&U.push("accounts_payable_aging"),a===!1&&U.push("accounts_receivable_aging"),U.push("zeni_accounts_promo_card","treasury_promo_card"),A===!1&&U.push("rewards_card"),k===!1&&U.push("expense_automation_card");const H=Bn(S,U);return Fn(H.reportsInOrder.map((G=>({fetchState:G.fetchState,error:G.error})))).fetchState}));d.useEffect((()=>{P!=="Completed"||o||m||b||(p(!0),i(Un(n.userId,F,O.tenantId,!0,!1,D)))}),[o,P,m,b,n,O.tenantId,i]);const j=d.useRef(!1),N=d.useCallback((()=>{const S={pathnameStackToGoBack:W(l.state?.pathnameStackToGoBack,l.pathname),message:"activation"};e(m?"../../checking":b?"../../cards":"../../dashboard",{state:S})}),[e,l,m,b]),$=d.useCallback((()=>{j.current||(j.current=!0,N())}),[N]);if(d.useEffect((()=>{const S=setTimeout((()=>c(!0)),3e3);return()=>clearTimeout(S)}),[]),d.useEffect((()=>{const S=setTimeout($,6e3);return()=>clearTimeout(S)}),[$]),d.useEffect((()=>{m||b||!u||f!=="Completed"&&f!=="Error"||$()}),[u,f,m,b,$]),P!=="Completed")return s.jsx(Q,{to:"../"});const L=O.company?.companyOnboardingInfo?.onboardingInfo,ee={timeSinceQuoteSign:L?.onboardingTimeSinceQuoteSigned??"",timeSinceQuoteSignInMinutes:L?.onboardingToQuoteSignMinutes??0,isKybDone:Ze(L?.businessVerified?.status),isKycDone:Ze(L?.identityVerified?.status),paymentType:"",paymentSource:"",qboConnectionSource:L?.accountingConnectionCreationMode??""};return s.jsxs(s.Fragment,{children:[s.jsx(re,{analytics:g,onLoad:S=>S.trackOnboardingDashboardActivation(ee)}),s.jsx(_t,{show:!0,onComplete:$})]})},Se=["reading_books","finance_graph","reconciliation","cfo_foundation"],Ie=["llm_fine_tuning","rag_knowledge_graph","personalized_context"],Je=(e,l)=>{const i=new Map(e.map((o=>[o.key,o])));return l.map((o=>{return p=i.get(o)?.status,p==="starting"||p==="building"?p:"idle";var p}))},Xe=(e,l)=>{if(e.length===0)return!1;const i=new Map(e.map((o=>[o.key,o])));return l.every((o=>i.get(o)?.status==="ready"))},Ye=De.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  background-color: ${e=>e.theme.colors.grey4};
@@ -1,4 +1,4 @@
1
- import{j as d}from"./liveblocks-QExkfWwX.js";import{i as X,j as _,g as H,u as z,h as W,l as ne,k as oa,n as ht,o as P,N as vn}from"./core-C9JgQJB4.js";import{fI as B,Wj as We,bF as sa,br as Ee,XH as En,ke as xn,XI as Vt,XJ as wn,kh as ft,XK as Qe,XL as Tn,km as Dn,XM as Gt,XN as Pn,kq as gt,XO as Ze,XP as On,XQ as Fn,WD as jn,ls as Rn,XR as Mn,bn as Je,XS as ra,Xh as le,bc as ia,lG as ca,lp as la,Xj as de,Xi as ae,fH as da,gd as Bn,gt as bt,XT as Yn,XU as Un,XV as ua,XW as Oe,Ej as Be,Ek as Ye,EI as xe,EC as ue,Eo as Ue,XX as Ln,c0 as Le,XY as Vn,XZ as Gn,X_ as ma,X$ as Fe,Y0 as Nn,ek as et,Au as pa,Y1 as $n,Y2 as ha,Y3 as zn,Y4 as Kn,Y5 as Xn,Y6 as St,Vf as _t,uh as we,m3 as Te,ES as kt,AB as qn,AI as Qn,Y7 as Zn,Y8 as Hn,El as Nt,Y9 as Wn,Ax as Ie,As as fa,Ya as ge,Yb as $t,Yc as Jn,Yd as yt,Ve as At,CF as ga,Ye as eo,Yf as ba,Yg as to,Yh as ao,Yi as no,Yj as It,CU as oo,C$ as so,Yk as ro,Yl as io,En as zt,Ym as co,CD as Ca,Yn as be,Yo as Kt,Yp as lo,bq as Sa,EX as _a,Yq as uo,Yr as ka,Ys as mo,Yt as po,Yu as ho,Yv as vt,EP as fo,ER as go,Yw as bo,Yx as Co,Em as Xt,Yy as So,EV as ya,Yz as Ce,YA as qt,YB as _o,YC as ko,YD as Aa,lU as Ia,p$ as va,lZ as Ea,pZ as xa,pY as wa,pX as Ta,C0 as yo,dd as Ao,pU as Io,UC as vo,q9 as Eo,YE as xo,YF as wo,YG as To,b5 as Et,q3 as Do,ih as Po,gL as Oo,q2 as Fo,li as jo,q0 as Ro,p_ as Mo,e0 as Bo,d$ as Yo}from"./zeni-epic-state-DLEY0NmH.js";import{z as Y,at as oe,p as O,j as w,G as q,b9 as Uo,aq as Ve,a6 as Ge,ba as Da,Q as N,bb as Lo,bc as Pa,bd as Vo,be as Go,a as Oa,$ as Fa,d as ja,ap as No,bf as $o,am as zo,W as xt,bg as Ra,s as re,bh as Ma,bi as Ba,as as Ya,bj as Ko,ag as Ne,V as $e,bk as Xo,M as qo,bl as Qo,A as G,D as Zo,h as Ho,a2 as Wo,ao as Jo,bm as es,bn as ts,bo as as,bp as ve}from"./index-BvMe6BwU.js";import{u as ns,n as wt}from"./mui-DA_IUYGW.js";import{a as b}from"./sentry-oILOkT84.js";import{w as Ua}from"./withTransactionSidePanel-C47wmMlX.js";import{c as La,t as De,f as me,b as Tt,a as Dt,v as os}from"./routePaths-CehqSbwZ.js";import{u as se}from"./useAskAiCfoHostNavButtonProps-BCWJ7jlQ.js";import Me from"./NotFoundScreen-azJwEf6u.js";import{u as Pt}from"./useInitialThreadRequest-BCD3tBzH.js";import{t as Va}from"./analyticsHelper-D3Z95hnv.js";import{C as ss}from"./CompanyPassportScreen-2YfwMC3n.js";import{u as rs}from"./useAiCfoDashboardSuggestedQuestionsChips-C5O_5leW.js";import{F as is}from"./FeaturePreviewScreen-WONNYPz2.js";import"./recharts-ikWEYduq.js";import"./analytics-Dk2G_EzJ.js";import"./plaid-CG0Jj5NR.js";import"./dnd-C8GpPG0g.js";import"./stripe-cKAAJElX.js";import"./lottie-C8c0mGol.js";import"./lexical-DewpM37L.js";import"./pdf-CglQcGFZ.js";import"./utils-A5fkS8h7.js";import"./TransactionDetailScreen-CuKBIwpF.js";import"./decodeURIComponentSafe-CYuijBUP.js";import"./expenseAutomationHelper-jtvNac2y.js";import"./stripSplatSuffix-DfsbDgo5.js";import"./MobileAppDrawer-l8XzezC6.js";import"./InboxNotificationsProvider-yQHZ5K7x.js";import"./useTaskManagerAccess-BRPFjPMD.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="61394266-8043-4dd3-aa59-10ca042bd27b",e._sentryDebugIdIdentifier="sentry-dbid-61394266-8043-4dd3-aa59-10ca042bd27b")}catch{}})();const cs=Ua((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=X(),s=Y.getSignedInUser(),i=_((S=>S.tenantState.currentTenantId)),l=_((S=>B(S))),{tenantEmailDomain:m}=X(),p=H(),h=l?.companyName??"",f={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},c=b.useMemo((()=>({authParams:f,companyName:h,downloadEndPoint:`${oe}/agingDetailedReport`,timezone:We()})),[]),u=b.useMemo((()=>r!=null?sa(r):Ee()),[r]),C=z(),g=W(),y=_((S=>En(S,u,o))),E=b.useCallback((()=>{o!=null&&y.fetchState!=="In-Progress"&&y.fetchState!=="Completed"&&C(xn(o,u))}),[u]),I=b.useCallback((()=>{g("../../",{relative:"path"})}),[]),k=b.useCallback(((S,A)=>{C(Vt({sortKey:S,sortOrder:A}))}),[]),x=b.useCallback((S=>{C(Vt({downloadState:S}))}),[]),R=b.useCallback((S=>{if(e)e(S.transactionId,S.transactionType);else if(m!=null){const A=La({id:S.transactionId,type:S.transactionType},m);g(A);const U=O(p.state?.pathnameStackToGoBack,p.pathname);g(A,{state:{pathnameStackToGoBack:U}})}}),[m,e]),T=b.useCallback((()=>{y.vendor!=null&&w.trackApAgingDetail("AP Aging",u.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),y.vendor.id,y.vendor.name)}),[y.vendor,u]);return b.useEffect((()=>{E()}),[]),b.useEffect((()=>{y.fetchState==="Completed"&&T()}),[T,y.fetchState]),d.jsx(Uo,{apAgingDetail:y,downloadParams:c,reportDate:u,analytics:w,onTransactionClick:R,onReload:E,onBackClick:I,onColumnSortConfigChanged:k,updateDownloadStateHandler:x,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),ls=()=>{const e=z(),a=W(),t=_((k=>wn(k))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=se({mobileExploreReferrer:"AP Aging"});Ve({isDataReady:t.fetchState==="Completed"});const r=Y.getSignedInUser(),s=_((k=>k.tenantState.currentTenantId)),i=_((k=>B(k))),l=i?.companyName??"",m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},p=b.useMemo((()=>({authParams:m,companyName:l,downloadEndPoint:`${oe}/agingReport`,timezone:We()})),[]),h=t.apAgingUIState.selectedDate??Ee(),f=b.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(ft(h))}),[]);b.useEffect((()=>{f()}),[]);const c=b.useCallback((()=>{a("../",{relative:"path"})}),[]),u=b.useCallback((k=>{e(Qe({searchString:k}))}),[]),C=b.useCallback(((k,x)=>{e(Qe({sortKey:x,sortOrder:k}))}),[]),g=b.useCallback((k=>{a(`./${k}/${h.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[h]),y=b.useCallback((k=>{e(Qe({downloadState:k}))}),[]),E=b.useCallback(((k,x)=>{}),[]),I=b.useCallback(((k,x)=>{e(Qe({selectedDate:k,agingDateSelectionType:x})),e(ft(k))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ge,{analytics:w,onLoad:k=>k.trackPageLoaded(N.Event.agingReport,"AP Aging")}):null,d.jsx(Da,{uiState:t.apAgingUIState,report:t,downloadParams:p,analytics:w,onReloadReport:f,onBackClick:c,onSearchTextChange:u,onSortOrderChange:C,onEntityNameClick:g,updateDownloadStateHandler:y,onSelectedDateChanged:I,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},ds=Ua((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=X(),s=Y.getSignedInUser(),i=_((T=>B(T))),{tenantEmailDomain:l}=X(),m=H(),p=i.companyName,h={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},f=b.useMemo((()=>({authParams:h,companyName:p,downloadEndPoint:`${oe}/agingDetailedReport`,timezone:We()})),[]),c=b.useMemo((()=>r!=null?sa(r):Ee()),[r]),u=z(),C=W(),g=_((T=>Tn(T,c,o))),y=b.useCallback((()=>{o!=null&&g.fetchState!=="In-Progress"&&g.fetchState!=="Completed"&&u(Dn(o,c))}),[c]),E=b.useCallback((()=>{C("../../",{relative:"path"})}),[]),I=b.useCallback(((T,S)=>{u(Gt({sortKey:T,sortOrder:S}))}),[]),k=b.useCallback((T=>{u(Gt({downloadState:T}))}),[]),x=b.useCallback((T=>{if(e)e(T.transactionId,T.transactionType);else if(l!=null){const S=La({id:T.transactionId,type:T.transactionType},l);C(S);const A=O(m.state?.pathnameStackToGoBack,m.pathname);C(S,{state:{pathnameStackToGoBack:A}})}}),[l,e]),R=b.useCallback((()=>{g.customer!=null&&w.trackArAgingDetail("AR Aging",c.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),g.customer.id,g.customer.name)}),[g.customer,c]);return b.useEffect((()=>{y()}),[]),b.useEffect((()=>{g.fetchState==="Completed"&&R()}),[g.fetchState,R]),d.jsx(Lo,{arAgingDetail:g,downloadParams:f,reportDate:c,analytics:w,onTransactionClick:x,onReload:y,onBackClick:E,onColumnSortConfigChanged:I,updateDownloadStateHandler:k,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),us=()=>{const e=z(),a=W(),t=_((I=>Pn(I))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=se({mobileExploreReferrer:"AR Aging"});Ve({isDataReady:t.fetchState==="Completed"});const r=Y.getSignedInUser(),s=_((I=>B(I))),i=s.companyName,l={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},m=b.useMemo((()=>({authParams:l,companyName:i,downloadEndPoint:`${oe}/agingReport`,timezone:We()})),[]),p=t.arAgingUIState.selectedDate??Ee(),h=b.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(gt(p))}),[]);b.useEffect((()=>{h()}),[]);const f=b.useCallback((()=>{a("../",{relative:"path"})}),[]),c=b.useCallback((I=>{e(Ze({searchString:I}))}),[]),u=b.useCallback(((I,k)=>{e(Ze({sortKey:k,sortOrder:I}))}),[]),C=b.useCallback((I=>{a(`./${I}/${p.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[p]),g=b.useCallback((I=>{e(Ze({downloadState:I}))}),[]),y=b.useCallback(((I,k)=>{e(Ze({selectedDate:I,agingDateSelectionType:k})),e(gt(I))}),[]),E=b.useCallback(((I,k)=>{e(On({nodeId:I,isCollapsed:k}))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ge,{analytics:w,onLoad:I=>I.trackPageLoaded(N.Event.agingReport,"AR Aging")}):null,d.jsx(Da,{uiState:t.arAgingUIState,report:t,downloadParams:m,analytics:w,onReloadReport:h,onBackClick:f,onSearchTextChange:c,onSortOrderChange:u,onEntityNameClick:C,updateDownloadStateHandler:g,onSelectedDateChanged:y,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Ga=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function Na(e,a){const t=jn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=De(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(Rn(n,o))}}}const ms=ne((function(e){const a=Fn(e).accountsInOrder.map(((t,n)=>Ga(t,n)));return{sectionTitle:q.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,fetchState:e.cashBalanceState.fetchState,analytics:w}}),Na)(Pa),ps=ne((function(e){const a=Mn(e).accountsInOrder.map(((o,r)=>Ga(o,r))),t=Y.getSignedInUser(),n=Je(t);return{sectionTitle:q.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:w}}),Na)(Pa);function hs(){const e=W(),a=H(),{tenantEmailDomain:t}=X(),n=_((o=>B(o).company?.companyInfo.firstMonthOfFY??1));return _((o=>o.cashBalanceState.fetchState))==="Error"?d.jsx(Me,{}):d.jsx(ms,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,firstMonthOfFY:n})}function fs(){const e=W(),a=H(),{tenantEmailDomain:t}=X(),n=_((o=>B(o).company?.companyInfo.firstMonthOfFY??1));return _((o=>o.cardBalanceState.fetchState))==="Error"?d.jsx(Me,{}):d.jsx(ps,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,firstMonthOfFY:n})}const gs=wt.div`
1
+ import{j as d}from"./liveblocks-QExkfWwX.js";import{i as X,j as _,g as H,u as z,h as W,l as ne,k as oa,n as ht,o as P,N as vn}from"./core-C9JgQJB4.js";import{fI as B,Wj as We,bF as sa,br as Ee,XH as En,ke as xn,XI as Vt,XJ as wn,kh as ft,XK as Qe,XL as Tn,km as Dn,XM as Gt,XN as Pn,kq as gt,XO as Ze,XP as On,XQ as Fn,WD as jn,ls as Rn,XR as Mn,bn as Je,XS as ra,Xh as le,bc as ia,lG as ca,lp as la,Xj as de,Xi as ae,fH as da,gd as Bn,gt as bt,XT as Yn,XU as Un,XV as ua,XW as Oe,Ej as Be,Ek as Ye,EI as xe,EC as ue,Eo as Ue,XX as Ln,c0 as Le,XY as Vn,XZ as Gn,X_ as ma,X$ as Fe,Y0 as Nn,ek as et,Au as pa,Y1 as $n,Y2 as ha,Y3 as zn,Y4 as Kn,Y5 as Xn,Y6 as St,Vf as _t,uh as we,m3 as Te,ES as kt,AB as qn,AI as Qn,Y7 as Zn,Y8 as Hn,El as Nt,Y9 as Wn,Ax as Ie,As as fa,Ya as ge,Yb as $t,Yc as Jn,Yd as yt,Ve as At,CF as ga,Ye as eo,Yf as ba,Yg as to,Yh as ao,Yi as no,Yj as It,CU as oo,C$ as so,Yk as ro,Yl as io,En as zt,Ym as co,CD as Ca,Yn as be,Yo as Kt,Yp as lo,bq as Sa,EX as _a,Yq as uo,Yr as ka,Ys as mo,Yt as po,Yu as ho,Yv as vt,EP as fo,ER as go,Yw as bo,Yx as Co,Em as Xt,Yy as So,EV as ya,Yz as Ce,YA as qt,YB as _o,YC as ko,YD as Aa,lU as Ia,p$ as va,lZ as Ea,pZ as xa,pY as wa,pX as Ta,C0 as yo,dd as Ao,pU as Io,UC as vo,q9 as Eo,YE as xo,YF as wo,YG as To,b5 as Et,q3 as Do,ih as Po,gL as Oo,q2 as Fo,li as jo,q0 as Ro,p_ as Mo,e0 as Bo,d$ as Yo}from"./zeni-epic-state-DLEY0NmH.js";import{z as Y,at as oe,p as O,j as w,G as q,b9 as Uo,aq as Ve,a6 as Ge,ba as Da,Q as N,bb as Lo,bc as Pa,bd as Vo,be as Go,a as Oa,$ as Fa,d as ja,ap as No,bf as $o,am as zo,W as xt,bg as Ra,s as re,bh as Ma,bi as Ba,as as Ya,bj as Ko,ag as Ne,V as $e,bk as Xo,M as qo,bl as Qo,A as G,D as Zo,h as Ho,a2 as Wo,ao as Jo,bm as es,bn as ts,bo as as,bp as ve}from"./index-DvOt4VS9.js";import{u as ns,n as wt}from"./mui-DA_IUYGW.js";import{a as b}from"./sentry-oILOkT84.js";import{w as Ua}from"./withTransactionSidePanel-dWI8TaQe.js";import{c as La,t as De,f as me,b as Tt,a as Dt,v as os}from"./routePaths-of7B18Ze.js";import{u as se}from"./useAskAiCfoHostNavButtonProps-DqbLwjuM.js";import Me from"./NotFoundScreen-D9bcBk9H.js";import{u as Pt}from"./useInitialThreadRequest-B8hjmQPb.js";import{t as Va}from"./analyticsHelper-D5T9Pp0r.js";import{C as ss}from"./CompanyPassportScreen-CCGN8XdD.js";import{u as rs}from"./useAiCfoDashboardSuggestedQuestionsChips-Dm2nLAVE.js";import{F as is}from"./FeaturePreviewScreen-X-JDJxdp.js";import"./recharts-ikWEYduq.js";import"./analytics-Dk2G_EzJ.js";import"./plaid-CG0Jj5NR.js";import"./dnd-C8GpPG0g.js";import"./stripe-cKAAJElX.js";import"./lottie-C8c0mGol.js";import"./lexical-DewpM37L.js";import"./pdf-CglQcGFZ.js";import"./utils-A5fkS8h7.js";import"./TransactionDetailScreen-C1bVEOAX.js";import"./decodeURIComponentSafe-CYuijBUP.js";import"./expenseAutomationHelper-jtvNac2y.js";import"./stripSplatSuffix-DfsbDgo5.js";import"./MobileAppDrawer-DbZpT3WI.js";import"./InboxNotificationsProvider-yQHZ5K7x.js";import"./useTaskManagerAccess-CsQUeQX-.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="61394266-8043-4dd3-aa59-10ca042bd27b",e._sentryDebugIdIdentifier="sentry-dbid-61394266-8043-4dd3-aa59-10ca042bd27b")}catch{}})();const cs=Ua((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=X(),s=Y.getSignedInUser(),i=_((S=>S.tenantState.currentTenantId)),l=_((S=>B(S))),{tenantEmailDomain:m}=X(),p=H(),h=l?.companyName??"",f={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},c=b.useMemo((()=>({authParams:f,companyName:h,downloadEndPoint:`${oe}/agingDetailedReport`,timezone:We()})),[]),u=b.useMemo((()=>r!=null?sa(r):Ee()),[r]),C=z(),g=W(),y=_((S=>En(S,u,o))),E=b.useCallback((()=>{o!=null&&y.fetchState!=="In-Progress"&&y.fetchState!=="Completed"&&C(xn(o,u))}),[u]),I=b.useCallback((()=>{g("../../",{relative:"path"})}),[]),k=b.useCallback(((S,A)=>{C(Vt({sortKey:S,sortOrder:A}))}),[]),x=b.useCallback((S=>{C(Vt({downloadState:S}))}),[]),R=b.useCallback((S=>{if(e)e(S.transactionId,S.transactionType);else if(m!=null){const A=La({id:S.transactionId,type:S.transactionType},m);g(A);const U=O(p.state?.pathnameStackToGoBack,p.pathname);g(A,{state:{pathnameStackToGoBack:U}})}}),[m,e]),T=b.useCallback((()=>{y.vendor!=null&&w.trackApAgingDetail("AP Aging",u.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),y.vendor.id,y.vendor.name)}),[y.vendor,u]);return b.useEffect((()=>{E()}),[]),b.useEffect((()=>{y.fetchState==="Completed"&&T()}),[T,y.fetchState]),d.jsx(Uo,{apAgingDetail:y,downloadParams:c,reportDate:u,analytics:w,onTransactionClick:R,onReload:E,onBackClick:I,onColumnSortConfigChanged:k,updateDownloadStateHandler:x,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),ls=()=>{const e=z(),a=W(),t=_((k=>wn(k))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=se({mobileExploreReferrer:"AP Aging"});Ve({isDataReady:t.fetchState==="Completed"});const r=Y.getSignedInUser(),s=_((k=>k.tenantState.currentTenantId)),i=_((k=>B(k))),l=i?.companyName??"",m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},p=b.useMemo((()=>({authParams:m,companyName:l,downloadEndPoint:`${oe}/agingReport`,timezone:We()})),[]),h=t.apAgingUIState.selectedDate??Ee(),f=b.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(ft(h))}),[]);b.useEffect((()=>{f()}),[]);const c=b.useCallback((()=>{a("../",{relative:"path"})}),[]),u=b.useCallback((k=>{e(Qe({searchString:k}))}),[]),C=b.useCallback(((k,x)=>{e(Qe({sortKey:x,sortOrder:k}))}),[]),g=b.useCallback((k=>{a(`./${k}/${h.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[h]),y=b.useCallback((k=>{e(Qe({downloadState:k}))}),[]),E=b.useCallback(((k,x)=>{}),[]),I=b.useCallback(((k,x)=>{e(Qe({selectedDate:k,agingDateSelectionType:x})),e(ft(k))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ge,{analytics:w,onLoad:k=>k.trackPageLoaded(N.Event.agingReport,"AP Aging")}):null,d.jsx(Da,{uiState:t.apAgingUIState,report:t,downloadParams:p,analytics:w,onReloadReport:f,onBackClick:c,onSearchTextChange:u,onSortOrderChange:C,onEntityNameClick:g,updateDownloadStateHandler:y,onSelectedDateChanged:I,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},ds=Ua((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=X(),s=Y.getSignedInUser(),i=_((T=>B(T))),{tenantEmailDomain:l}=X(),m=H(),p=i.companyName,h={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},f=b.useMemo((()=>({authParams:h,companyName:p,downloadEndPoint:`${oe}/agingDetailedReport`,timezone:We()})),[]),c=b.useMemo((()=>r!=null?sa(r):Ee()),[r]),u=z(),C=W(),g=_((T=>Tn(T,c,o))),y=b.useCallback((()=>{o!=null&&g.fetchState!=="In-Progress"&&g.fetchState!=="Completed"&&u(Dn(o,c))}),[c]),E=b.useCallback((()=>{C("../../",{relative:"path"})}),[]),I=b.useCallback(((T,S)=>{u(Gt({sortKey:T,sortOrder:S}))}),[]),k=b.useCallback((T=>{u(Gt({downloadState:T}))}),[]),x=b.useCallback((T=>{if(e)e(T.transactionId,T.transactionType);else if(l!=null){const S=La({id:T.transactionId,type:T.transactionType},l);C(S);const A=O(m.state?.pathnameStackToGoBack,m.pathname);C(S,{state:{pathnameStackToGoBack:A}})}}),[l,e]),R=b.useCallback((()=>{g.customer!=null&&w.trackArAgingDetail("AR Aging",c.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),g.customer.id,g.customer.name)}),[g.customer,c]);return b.useEffect((()=>{y()}),[]),b.useEffect((()=>{g.fetchState==="Completed"&&R()}),[g.fetchState,R]),d.jsx(Lo,{arAgingDetail:g,downloadParams:f,reportDate:c,analytics:w,onTransactionClick:x,onReload:y,onBackClick:E,onColumnSortConfigChanged:I,updateDownloadStateHandler:k,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),us=()=>{const e=z(),a=W(),t=_((I=>Pn(I))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=se({mobileExploreReferrer:"AR Aging"});Ve({isDataReady:t.fetchState==="Completed"});const r=Y.getSignedInUser(),s=_((I=>B(I))),i=s.companyName,l={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},m=b.useMemo((()=>({authParams:l,companyName:i,downloadEndPoint:`${oe}/agingReport`,timezone:We()})),[]),p=t.arAgingUIState.selectedDate??Ee(),h=b.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(gt(p))}),[]);b.useEffect((()=>{h()}),[]);const f=b.useCallback((()=>{a("../",{relative:"path"})}),[]),c=b.useCallback((I=>{e(Ze({searchString:I}))}),[]),u=b.useCallback(((I,k)=>{e(Ze({sortKey:k,sortOrder:I}))}),[]),C=b.useCallback((I=>{a(`./${I}/${p.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[p]),g=b.useCallback((I=>{e(Ze({downloadState:I}))}),[]),y=b.useCallback(((I,k)=>{e(Ze({selectedDate:I,agingDateSelectionType:k})),e(gt(I))}),[]),E=b.useCallback(((I,k)=>{e(On({nodeId:I,isCollapsed:k}))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ge,{analytics:w,onLoad:I=>I.trackPageLoaded(N.Event.agingReport,"AR Aging")}):null,d.jsx(Da,{uiState:t.arAgingUIState,report:t,downloadParams:m,analytics:w,onReloadReport:h,onBackClick:f,onSearchTextChange:c,onSortOrderChange:u,onEntityNameClick:C,updateDownloadStateHandler:g,onSelectedDateChanged:y,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Ga=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function Na(e,a){const t=jn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=De(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(Rn(n,o))}}}const ms=ne((function(e){const a=Fn(e).accountsInOrder.map(((t,n)=>Ga(t,n)));return{sectionTitle:q.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,fetchState:e.cashBalanceState.fetchState,analytics:w}}),Na)(Pa),ps=ne((function(e){const a=Mn(e).accountsInOrder.map(((o,r)=>Ga(o,r))),t=Y.getSignedInUser(),n=Je(t);return{sectionTitle:q.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:w}}),Na)(Pa);function hs(){const e=W(),a=H(),{tenantEmailDomain:t}=X(),n=_((o=>B(o).company?.companyInfo.firstMonthOfFY??1));return _((o=>o.cashBalanceState.fetchState))==="Error"?d.jsx(Me,{}):d.jsx(ms,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,firstMonthOfFY:n})}function fs(){const e=W(),a=H(),{tenantEmailDomain:t}=X(),n=_((o=>B(o).company?.companyInfo.firstMonthOfFY??1));return _((o=>o.cardBalanceState.fetchState))==="Error"?d.jsx(Me,{}):d.jsx(ps,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,firstMonthOfFY:n})}const gs=wt.div`
2
2
  display: flex;
3
3
  flex: 1 1 auto;
4
4
  min-height: 100%;
@@ -1 +1 @@
1
- import{j as v}from"./liveblocks-QExkfWwX.js";import{a as u}from"./sentry-oILOkT84.js";import{u as y,j as b,l as U,g as w,N as A}from"./core-C9JgQJB4.js";import{Ul as N,fI as _,go as k,Um as L,pW as R,Un as z}from"./zeni-epic-state-DLEY0NmH.js";import{u as j,z as f,L as T,t as I,G as O,b as $}from"./index-BvMe6BwU.js";import"./mui-DA_IUYGW.js";import{t as P}from"./getLocaleForTenant-CZcWFJHh.js";import"./recharts-ikWEYduq.js";import"./analytics-Dk2G_EzJ.js";import"./plaid-CG0Jj5NR.js";import"./dnd-C8GpPG0g.js";import"./stripe-cKAAJElX.js";import"./lottie-C8c0mGol.js";import"./lexical-DewpM37L.js";import"./pdf-CglQcGFZ.js";import"./utils-A5fkS8h7.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="ae19f635-c1c3-4f74-aea3-bcbfa9b26c47",t._sentryDebugIdIdentifier="sentry-dbid-ae19f635-c1c3-4f74-aea3-bcbfa9b26c47")}catch{}})();const G=U((function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}}))((function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=w(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map((l=>l.tenantEmailDomain)),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,S=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,m="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce(((l,F)=>l||i.split("/").find((D=>D===F))!=null),!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,S=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=$(c,p);return v.jsx(A,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:S}})}}));function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=j(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b((e=>N(e))),n=b((e=>e.tenantState.fetchState)),i=b((e=>e.tenantState.error)),a=b((e=>e.tenantState.activeTenantFetchState.fetchState)),c=b((e=>_(e))),d=f.getSignedInUser();return u.useLayoutEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,h.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)}),[a,n]),u.useEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&I.shouldFetchActiveTenant(e)&&(h.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(k(d.userId,e))))}),[n,a,d,t]),u.useEffect((()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,S=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&S&&I.shouldFetchAllTenants()&&(r.current=!0,I.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!L(i))&&t(R(e.userId)))}),[n,a,i,d,t]),u.useEffect((()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())}),[m.tenantsCoreDetailsInOrder,n]),u.useEffect((()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(O.updateAppLocaleID(P(c)),o())}),[n,a,c]),v.jsx(G,{})}const Q=["dashboard/cash-balance","dashboard/card-balance","dashboard/operating-expenses","dashboard/revenue","dashboard/burn-rate","dashboard/cash-position","dashboard/top-expenses","dashboard/cash-in-cash-out","dashboard","reports","forecast","uncategorized-expense","uncategorized-income","missing-receipts","bills","cards/activate","cards","reimbursements","wise","checking","aicfo"],q={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of Q)if(t.toLocaleLowerCase().includes(s))return q[s]}export{oe as default};
1
+ import{j as v}from"./liveblocks-QExkfWwX.js";import{a as u}from"./sentry-oILOkT84.js";import{u as y,j as b,l as U,g as w,N as A}from"./core-C9JgQJB4.js";import{Ul as N,fI as _,go as k,Um as L,pW as R,Un as z}from"./zeni-epic-state-DLEY0NmH.js";import{u as j,z as f,L as T,t as I,G as O,b as $}from"./index-DvOt4VS9.js";import"./mui-DA_IUYGW.js";import{t as P}from"./getLocaleForTenant-D6brqFOn.js";import"./recharts-ikWEYduq.js";import"./analytics-Dk2G_EzJ.js";import"./plaid-CG0Jj5NR.js";import"./dnd-C8GpPG0g.js";import"./stripe-cKAAJElX.js";import"./lottie-C8c0mGol.js";import"./lexical-DewpM37L.js";import"./pdf-CglQcGFZ.js";import"./utils-A5fkS8h7.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="ae19f635-c1c3-4f74-aea3-bcbfa9b26c47",t._sentryDebugIdIdentifier="sentry-dbid-ae19f635-c1c3-4f74-aea3-bcbfa9b26c47")}catch{}})();const G=U((function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}}))((function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=w(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map((l=>l.tenantEmailDomain)),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,S=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,m="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce(((l,F)=>l||i.split("/").find((D=>D===F))!=null),!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,S=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=$(c,p);return v.jsx(A,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:S}})}}));function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=j(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b((e=>N(e))),n=b((e=>e.tenantState.fetchState)),i=b((e=>e.tenantState.error)),a=b((e=>e.tenantState.activeTenantFetchState.fetchState)),c=b((e=>_(e))),d=f.getSignedInUser();return u.useLayoutEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,h.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)}),[a,n]),u.useEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&I.shouldFetchActiveTenant(e)&&(h.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(k(d.userId,e))))}),[n,a,d,t]),u.useEffect((()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,S=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&S&&I.shouldFetchAllTenants()&&(r.current=!0,I.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!L(i))&&t(R(e.userId)))}),[n,a,i,d,t]),u.useEffect((()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())}),[m.tenantsCoreDetailsInOrder,n]),u.useEffect((()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(O.updateAppLocaleID(P(c)),o())}),[n,a,c]),v.jsx(G,{})}const Q=["dashboard/cash-balance","dashboard/card-balance","dashboard/operating-expenses","dashboard/revenue","dashboard/burn-rate","dashboard/cash-position","dashboard/top-expenses","dashboard/cash-in-cash-out","dashboard","reports","forecast","uncategorized-expense","uncategorized-income","missing-receipts","bills","cards/activate","cards","reimbursements","wise","checking","aicfo"],q={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of Q)if(t.toLocaleLowerCase().includes(s))return q[s]}export{oe as default};
@@ -1,4 +1,4 @@
1
- import{j as l}from"./liveblocks-QExkfWwX.js";import{h as w,g as C,j as h,l as A,i as V}from"./core-C9JgQJB4.js";import{Zk as k,Zr as W,gJ as J,gI as L,gH as M,kT as X,Xi as Y,uV as q,fI as B,YT as D,kR as T,Zl as S,Zu as F,kP as G,la as j}from"./zeni-epic-state-DLEY0NmH.js";import{bL as K,$ as R,W as N,z as Z,a2 as p,A as v,a5 as U,bM as Q,H,bN as ee,p as te}from"./index-BvMe6BwU.js";import{u as O,n as z}from"./mui-DA_IUYGW.js";import"./sentry-oILOkT84.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]="ceee5ec1-11ca-421e-9ee5-43e37b3587d0",e._sentryDebugIdIdentifier="sentry-dbid-ceee5ec1-11ca-421e-9ee5-43e37b3587d0")}catch{}})();const ae=A(null,(function(e,t){return{onSaveVendor:a=>{e(X(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(Y("common")),a!=null&&e(q(a))},onGetOtp:a=>{e(M(a,"BillPayVendor"))},onResendOtp:a=>{e(L(a,"BillPayVendor"))},onVerifyOtp:(a,n)=>{e(J(a,n,"BillPayVendor"))},onVerifyOtpSuccess:(a,n,o)=>{e(W(a,n,o))}}}))(K);function _({vendorId:e,billId:t,isExpressPayPage:a}){const n=w(),o=C(),s=h((r=>k(r,e)));return l.jsx(ae,{location:o,navigate:n,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:a??!1})}const ne=z.div`
1
+ import{j as l}from"./liveblocks-QExkfWwX.js";import{h as w,g as C,j as h,l as A,i as V}from"./core-C9JgQJB4.js";import{Zk as k,Zr as W,gJ as J,gI as L,gH as M,kT as X,Xi as Y,uV as q,fI as B,YT as D,kR as T,Zl as S,Zu as F,kP as G,la as j}from"./zeni-epic-state-DLEY0NmH.js";import{bL as K,$ as R,W as N,z as Z,a2 as p,A as v,a5 as U,bM as Q,H,bN as ee,p as te}from"./index-DvOt4VS9.js";import{u as O,n as z}from"./mui-DA_IUYGW.js";import"./sentry-oILOkT84.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]="ceee5ec1-11ca-421e-9ee5-43e37b3587d0",e._sentryDebugIdIdentifier="sentry-dbid-ceee5ec1-11ca-421e-9ee5-43e37b3587d0")}catch{}})();const ae=A(null,(function(e,t){return{onSaveVendor:a=>{e(X(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(Y("common")),a!=null&&e(q(a))},onGetOtp:a=>{e(M(a,"BillPayVendor"))},onResendOtp:a=>{e(L(a,"BillPayVendor"))},onVerifyOtp:(a,n)=>{e(J(a,n,"BillPayVendor"))},onVerifyOtpSuccess:(a,n,o)=>{e(W(a,n,o))}}}))(K);function _({vendorId:e,billId:t,isExpressPayPage:a}){const n=w(),o=C(),s=h((r=>k(r,e)));return l.jsx(ae,{location:o,navigate:n,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:a??!1})}const ne=z.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{j as i}from"./liveblocks-QExkfWwX.js";import{$ as f,a9 as l}from"./index-BvMe6BwU.js";import{u as c,D as p}from"./mui-DA_IUYGW.js";import"./sentry-oILOkT84.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="0a5deef5-89fb-4f1a-a578-78487c6fdc33",e._sentryDebugIdIdentifier="sentry-dbid-0a5deef5-89fb-4f1a-a578-78487c6fdc33")}catch{}})();const u={drawerLeftMargin:new l(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:a,onClose:t}=e,n=f(),s=o?.valuePx(n)??u.drawerLeftMargin.valuePx(n),d=c();return i.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.8,cursor:"pointer"}}},onClose:t,children:a})}export{h as D};
1
+ import{j as i}from"./liveblocks-QExkfWwX.js";import{$ as f,a9 as l}from"./index-DvOt4VS9.js";import{u as c,D as p}from"./mui-DA_IUYGW.js";import"./sentry-oILOkT84.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="0a5deef5-89fb-4f1a-a578-78487c6fdc33",e._sentryDebugIdIdentifier="sentry-dbid-0a5deef5-89fb-4f1a-a578-78487c6fdc33")}catch{}})();const u={drawerLeftMargin:new l(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:a,onClose:t}=e,n=f(),s=o?.valuePx(n)??u.drawerLeftMargin.valuePx(n),d=c();return i.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.8,cursor:"pointer"}}},onClose:t,children:a})}export{h as D};
@@ -1 +1 @@
1
- import{j as s}from"./liveblocks-QExkfWwX.js";import{a as d}from"./sentry-oILOkT84.js";import{h as B,u as A,g as X,i as q,j as l,N as F,l as W,n as N,o as O}from"./core-C9JgQJB4.js";import{Xn as _,fI as M,WE as R,n3 as Y,SF as I,Xs as $,Xh as z,m3 as J,SG as P,WJ as K,WK as V,Xj as H,Xi as L}from"./zeni-epic-state-DLEY0NmH.js";import{b6 as Q,j as U,a2 as Z,p as tt}from"./index-BvMe6BwU.js";import"./mui-DA_IUYGW.js";import{d as S}from"./decodeURIComponentSafe-CYuijBUP.js";import{w as et}from"./withTransactionSidePanel-C47wmMlX.js";import{f as at,c as nt}from"./routePaths-CehqSbwZ.js";import"./recharts-ikWEYduq.js";import"./analytics-Dk2G_EzJ.js";import"./plaid-CG0Jj5NR.js";import"./dnd-C8GpPG0g.js";import"./stripe-cKAAJElX.js";import"./lottie-C8c0mGol.js";import"./lexical-DewpM37L.js";import"./pdf-CglQcGFZ.js";import"./utils-A5fkS8h7.js";import"./useAskAiCfoHostNavButtonProps-BCWJ7jlQ.js";import"./TransactionDetailScreen-CuKBIwpF.js";import"./useInitialThreadRequest-BCD3tBzH.js";import"./expenseAutomationHelper-jtvNac2y.js";import"./stripSplatSuffix-DfsbDgo5.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="c12a93b1-71bb-4b00-bfe8-3de142b92b1d",a._sentryDebugIdIdentifier="sentry-dbid-c12a93b1-71bb-4b00-bfe8-3de142b92b1d")}catch{}})();const it=W((function(a,t){const e=t.entity,i=$(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:z(a,"common")},trendWithTransactionsReport:i,analytics:U,isAccountingClassesEnabled:J(a)}}),(function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const i=`${nt(e,t.tenantEmailDomain)}`,c=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(i,{state:{pathnameStackToGoBack:c}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(H({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(L("common"))},onAutoCompleteEntity:e=>{const i=at(e,t.tenantEmailDomain);a(K()),a(V()),t.resetTrendIsFetchedStates(),t.navigate(i,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),i=e.poppedPathname??k();t.navigate(i,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(P(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const i=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(I(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(P(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:i}))}}}}))(Q),ot=et((function({entityType:a,...t}){const e=B(),i=A(),c=X(),[m,h]=d.useState(!1),[T,b]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:j,entityNameEncoded:x}=q(),r=S(j??""),p=S(x??""),u=rt(r,p),v=[r,p].filter((n=>n!=null)),o={name:p,id:r,type:a,zeniId:r,qboId:r},D=l((n=>_(n.customerIncomeState,n.vendorExpenseState,n.trendState,o,"quarter"))),w=l((n=>M(n).company?.companyInfo.firstMonthOfFY??1)),f=l((n=>R(n.trendWithTransactionsState,o,"EntityDetail")));d.useEffect((()=>{m===!1&&u===!0&&(h(!0),i(Y(o)))}),[m,u,o]);const g=l((n=>n.trendState.fetchState)),E=f?.selectedPeriod?.timePeriod??D,G=(function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y})(f?.selectedPeriod?.timePeriod,D);return d.useEffect((()=>{m===!0&&T===!1&&g==="Completed"&&(b(!0),E!=null&&i(I(o,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:E})))}),[m,T,g]),u?s.jsx(it,{firstMonthOfFY:w,tenantEmailDomain:C,location:c,navigate:e,entity:o,defaultTransactionTimePeriod:G,resetTrendIsFetchedStates:()=>{h(!1),b(!1)},...t}):s.jsx(F,{to:k(v.length)})})),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,k=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function wt({entityType:a}){return s.jsx(N,{children:s.jsx(O,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(ot,{entityType:a})})})}export{wt as EntityDetailRoutes,wt as default};
1
+ import{j as s}from"./liveblocks-QExkfWwX.js";import{a as d}from"./sentry-oILOkT84.js";import{h as B,u as A,g as X,i as q,j as l,N as F,l as W,n as N,o as O}from"./core-C9JgQJB4.js";import{Xn as _,fI as M,WE as R,n3 as Y,SF as I,Xs as $,Xh as z,m3 as J,SG as P,WJ as K,WK as V,Xj as H,Xi as L}from"./zeni-epic-state-DLEY0NmH.js";import{b6 as Q,j as U,a2 as Z,p as tt}from"./index-DvOt4VS9.js";import"./mui-DA_IUYGW.js";import{d as S}from"./decodeURIComponentSafe-CYuijBUP.js";import{w as et}from"./withTransactionSidePanel-dWI8TaQe.js";import{f as at,c as nt}from"./routePaths-of7B18Ze.js";import"./recharts-ikWEYduq.js";import"./analytics-Dk2G_EzJ.js";import"./plaid-CG0Jj5NR.js";import"./dnd-C8GpPG0g.js";import"./stripe-cKAAJElX.js";import"./lottie-C8c0mGol.js";import"./lexical-DewpM37L.js";import"./pdf-CglQcGFZ.js";import"./utils-A5fkS8h7.js";import"./useAskAiCfoHostNavButtonProps-DqbLwjuM.js";import"./TransactionDetailScreen-C1bVEOAX.js";import"./useInitialThreadRequest-B8hjmQPb.js";import"./expenseAutomationHelper-jtvNac2y.js";import"./stripSplatSuffix-DfsbDgo5.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="c12a93b1-71bb-4b00-bfe8-3de142b92b1d",a._sentryDebugIdIdentifier="sentry-dbid-c12a93b1-71bb-4b00-bfe8-3de142b92b1d")}catch{}})();const it=W((function(a,t){const e=t.entity,i=$(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:z(a,"common")},trendWithTransactionsReport:i,analytics:U,isAccountingClassesEnabled:J(a)}}),(function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const i=`${nt(e,t.tenantEmailDomain)}`,c=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(i,{state:{pathnameStackToGoBack:c}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(H({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(L("common"))},onAutoCompleteEntity:e=>{const i=at(e,t.tenantEmailDomain);a(K()),a(V()),t.resetTrendIsFetchedStates(),t.navigate(i,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),i=e.poppedPathname??k();t.navigate(i,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(P(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const i=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(I(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(P(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:i}))}}}}))(Q),ot=et((function({entityType:a,...t}){const e=B(),i=A(),c=X(),[m,h]=d.useState(!1),[T,b]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:j,entityNameEncoded:x}=q(),r=S(j??""),p=S(x??""),u=rt(r,p),v=[r,p].filter((n=>n!=null)),o={name:p,id:r,type:a,zeniId:r,qboId:r},D=l((n=>_(n.customerIncomeState,n.vendorExpenseState,n.trendState,o,"quarter"))),w=l((n=>M(n).company?.companyInfo.firstMonthOfFY??1)),f=l((n=>R(n.trendWithTransactionsState,o,"EntityDetail")));d.useEffect((()=>{m===!1&&u===!0&&(h(!0),i(Y(o)))}),[m,u,o]);const g=l((n=>n.trendState.fetchState)),E=f?.selectedPeriod?.timePeriod??D,G=(function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y})(f?.selectedPeriod?.timePeriod,D);return d.useEffect((()=>{m===!0&&T===!1&&g==="Completed"&&(b(!0),E!=null&&i(I(o,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:E})))}),[m,T,g]),u?s.jsx(it,{firstMonthOfFY:w,tenantEmailDomain:C,location:c,navigate:e,entity:o,defaultTransactionTimePeriod:G,resetTrendIsFetchedStates:()=>{h(!1),b(!1)},...t}):s.jsx(F,{to:k(v.length)})})),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,k=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function wt({entityType:a}){return s.jsx(N,{children:s.jsx(O,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(ot,{entityType:a})})})}export{wt as EntityDetailRoutes,wt as default};
@@ -1,4 +1,4 @@
1
- import{j as k}from"./liveblocks-QExkfWwX.js";import{u as ge,h as nt,g as Te,j as F,i as Be,t as Jn,l as Yn,n as Wn,o as Xe,N as Xn}from"./core-C9JgQJB4.js";import{fI as ke,a1w as Hn,q4 as Me,UE as Kn,An as Qn,a1x as Zn,a1y as es,a1z as ts,a1A as Ct,a1B as Ke,gk as bt,a1C as ia,eH as as,g3 as ns,a1D as la,a1E as Qe,qX as ss,uY as os,gW as cs,gU as is,a1F as ls,r8 as rs,rh as ds,qf as us,qt as Ra,gT as ue,gV as ms,a1G as ps,qP as Da,ri as hs,qq as Ss,ql as gs,v2 as Cs,gS as Oe,a1H as tt,Cx as Fa,MX as _a,a1I as Ma,FS as Oa,a1J as fs,e$ as Is,f1 as ks,sZ as Pt,Xo as ra,Xq as Ts,m6 as bs,Xr as Ps,md as ys,dm as vs,DQ as yt,a1K as Es,a1L as As,a1M as xs,a1N as ws,fp as vt,sN as da,Xh as Rs,a1O as Ds,a1P as Fs,mf as _s,a1Q as Ms,RG as Os,me as Us,m3 as Bs,qI as Ua,rn as at,tA as Ba,tW as Vs,Uu as Va,rm as ua,rp as ja,rr as js,bF as zs,nC as $s,nz as Ls,rq as Ze,ro as Se,a1R as Gs,rI as ma,a1S as qs,a1T as Ns,sR as Js,sS as Ys,Xd as Ws,Wj as Xs,a0_ as Hs,a1U as Ks,Xj as pa,Xi as He,a1V as ha,mu as Qs,a1W as Zs,a1X as eo,a1Y as to,a1Z as ao,qD as no,a1_ as so,a1$ as oo,a20 as co,ry as io,mh as lo,m8 as ro,a21 as uo,mg as Sa,XB as mo,a22 as po,a23 as ho,uz as So,ua as go,u9 as ft,a24 as Co,a25 as fo,a26 as Io,a27 as ko,nN as To,br as bo,nI as ga,nu as Po,a28 as yo,h3 as vo,nF as Eo,s$ as Ao,t1 as xo,sK as wo,Wm as Ro,Wn as Do,Fk as Fo,Fj as _o,FA as Mo,a29 as Ca,sQ as Oo,sl as Uo,a2a as Bo,s1 as Vo,s6 as jo,sh as zo,s4 as $o,a2b as Lo,rZ as Go,sg as qo,sW as No,a2c as Jo,t7 as Yo,sE as Wo,td as Xo,sJ as Ho,rJ as Ko,a2d as Qo,q$ as Zo,qz as ec,qG as fa,rt as tc,a2e as ac,a2f as nc,a2g as sc,a2h as oc,a2i as cc,a2j as ic,a2k as lc,th as rc,a2l as dc,a2m as uc,a2n as Ia,uK as mc,u1 as pc,tS as ka,tQ as hc,a2o as Sc,tF as gc,tk as Cc,tT as fc,a2p as Ic,a2q as kc,tq as Tc,a2r as bc,tl as Pc,tp as yc,tn as vc,tZ as Ec}from"./zeni-epic-state-DLEY0NmH.js";import za from"./NotFoundScreen-azJwEf6u.js";import{a as s,R as $a}from"./sentry-oILOkT84.js";import{n as be,S as Ac}from"./mui-DA_IUYGW.js";import{W as Ve,A as W,j as X,p as ee,ao as La,aq as Ga,dM as xc,dN as wc,z as st,dO as Rc,dP as Dc,dQ as Fc,ac as Ue,dR as _c,dS as Ta,b8 as ba,dT as Mc,a5 as qa,dU as Oc,h as et,a as Uc,dV as Bc,dW as Vc,K as jc,V as zc,dX as $c,dY as Lc,dZ as Gc,b2 as qc,bq as Nc,a9 as Jc,b3 as Yc,b4 as Wc,G as Xc,w as Hc,d_ as Kc,at as Pa,d$ as Qc}from"./index-BvMe6BwU.js";import{u as Na}from"./useAskAiCfoHostNavButtonProps-BCWJ7jlQ.js";import{g as ya,b as Zc,c as ei,h as ti,a as ai,i as ni,r as si,C as oi}from"./TransactionDetailScreen-CuKBIwpF.js";import{u as ci,a as ii}from"./useActualMatchingMatchDetail-hr4zSrCe.js";import{d as li}from"./decodeURIComponentSafe-CYuijBUP.js";import{m as Ja,a as Ya}from"./expenseAutomationHelper-jtvNac2y.js";import{u as Wa,a as Xa,w as ri}from"./withTransactionSidePanel-C47wmMlX.js";import{b as di,S as ui,a as mi,J as pi}from"./ScheduleDetailsPrepaidExpensesScreen-5-GevFMn.js";import{s as va,i as Ha,h as hi,v as Si,c as gi}from"./routePaths-CehqSbwZ.js";import{a as It}from"./accountMappingHelper-Cmqzt3o8.js";import{D as Ci}from"./DrawerScreen-Ac2BNHGU.js";import"./recharts-ikWEYduq.js";import"./analytics-Dk2G_EzJ.js";import"./plaid-CG0Jj5NR.js";import"./dnd-C8GpPG0g.js";import"./stripe-cKAAJElX.js";import"./lottie-C8c0mGol.js";import"./lexical-DewpM37L.js";import"./pdf-CglQcGFZ.js";import"./utils-A5fkS8h7.js";import"./useInitialThreadRequest-BCD3tBzH.js";import"./stripSplatSuffix-DfsbDgo5.js";import"./pathToGoBack-Cad-ghSF.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="87ce31e1-b11e-4626-81f7-0b83418c1248",t._sentryDebugIdIdentifier="sentry-dbid-87ce31e1-b11e-4626-81f7-0b83418c1248")}catch{}})();const fi=()=>{const t=ge(),n=nt(),S=Te(),g=F((p=>ke(p))),{useFeatureGate:d}=Ve(),{isFeatureEnabled:i}=d(W.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=d(W.aiAuditScorePercentage),A=F((p=>p.expenseAutomationViewState.selectedPeriodByTenantId)),l=F((p=>Hn(p,g.tenantId))),{isAiCfoAccessEnabled:v,onAskAiCfoClick:x}=Na({mobileExploreReferrer:"Month-End Close Overview"}),b=s.useCallback(((p,P,_=!1)=>{t(Me({tenantId:P,period:{month:p.month,year:p.year},refreshViewInBackground:_}))}),[]),C=s.useCallback((p=>{const P=S.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&X.trackMonthCloseAuditPage(p.month,p.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,P??null),t(Kn(g.tenantId,p))}),[g.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),f=A[g.tenantId],m=s.useCallback((()=>{const p=S.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&X.trackMonthCloseAuditPage(f.month,f.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,p??null),b(f,g.tenantId,!0)}),[b,f,g.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),z=ee(S.state?.pathnameStackToGoBack,S.pathname),w=s.useCallback((()=>{if(l.monthEndCloseChecks!=null&&f!=null){const p=l.monthEndCloseChecks.monthEndCloseCheckList.find((P=>P.progress<100));if(p!=null)return void n(`./${p.id}/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:z,message:"comingFromOverview"}});n(`./month_end_insights/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:z,message:"comingFromOverview"}})}}),[l.monthEndCloseChecks,f]),{areTenantIdsInSync:I}=La();return Ga({isDataReady:l.fetchState==="Completed"}),s.useEffect((()=>{f!=null&&l.fetchState!=="In-Progress"&&l.fetchState!=="Completed"&&I&&b(f,g.tenantId)}),[b,f,l.fetchState,g.tenantId,I]),s.useEffect((()=>{f!=null&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&I&&t(Qn(f))}),[f,l.monthClosePerformanceTrendFetchStatus.fetchState,I]),s.useEffect((()=>{const p=setInterval((()=>{l.fetchState!=="In-Progress"&&l.fetchState==="Completed"&&m()}),3e5);return()=>clearInterval(p)}),[l.fetchState]),s.useEffect((()=>{if(l.fetchState==="Completed"&&l.monthEndCloseChecks?.auditSummary!=null){const p=S.state?.referrer;X.trackMonthCloseAuditPage(l.selectedPeriod.month,l.selectedPeriod.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,p??null)}}),[l.fetchState,l.selectedPeriod,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),k.jsx(Ii,{children:k.jsx(xc,{monthEndCloseChecksView:l,isRealtimeInsightsFeatureEnabled:i,onMonthEndCheckClick:p=>{n(`./${p}/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:z,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:C,handleReviewButtonClick:w,onBackClick:()=>{n("../../dashboard")},onReload:m,isAiCfoAccessEnabled:v,onAskAiCfoClick:x,aiAuditScorePercentageEnabled:r})})},Ii=be.div`
1
+ import{j as k}from"./liveblocks-QExkfWwX.js";import{u as ge,h as nt,g as Te,j as F,i as Be,t as Jn,l as Yn,n as Wn,o as Xe,N as Xn}from"./core-C9JgQJB4.js";import{fI as ke,a1w as Hn,q4 as Me,UE as Kn,An as Qn,a1x as Zn,a1y as es,a1z as ts,a1A as Ct,a1B as Ke,gk as bt,a1C as ia,eH as as,g3 as ns,a1D as la,a1E as Qe,qX as ss,uY as os,gW as cs,gU as is,a1F as ls,r8 as rs,rh as ds,qf as us,qt as Ra,gT as ue,gV as ms,a1G as ps,qP as Da,ri as hs,qq as Ss,ql as gs,v2 as Cs,gS as Oe,a1H as tt,Cx as Fa,MX as _a,a1I as Ma,FS as Oa,a1J as fs,e$ as Is,f1 as ks,sZ as Pt,Xo as ra,Xq as Ts,m6 as bs,Xr as Ps,md as ys,dm as vs,DQ as yt,a1K as Es,a1L as As,a1M as xs,a1N as ws,fp as vt,sN as da,Xh as Rs,a1O as Ds,a1P as Fs,mf as _s,a1Q as Ms,RG as Os,me as Us,m3 as Bs,qI as Ua,rn as at,tA as Ba,tW as Vs,Uu as Va,rm as ua,rp as ja,rr as js,bF as zs,nC as $s,nz as Ls,rq as Ze,ro as Se,a1R as Gs,rI as ma,a1S as qs,a1T as Ns,sR as Js,sS as Ys,Xd as Ws,Wj as Xs,a0_ as Hs,a1U as Ks,Xj as pa,Xi as He,a1V as ha,mu as Qs,a1W as Zs,a1X as eo,a1Y as to,a1Z as ao,qD as no,a1_ as so,a1$ as oo,a20 as co,ry as io,mh as lo,m8 as ro,a21 as uo,mg as Sa,XB as mo,a22 as po,a23 as ho,uz as So,ua as go,u9 as ft,a24 as Co,a25 as fo,a26 as Io,a27 as ko,nN as To,br as bo,nI as ga,nu as Po,a28 as yo,h3 as vo,nF as Eo,s$ as Ao,t1 as xo,sK as wo,Wm as Ro,Wn as Do,Fk as Fo,Fj as _o,FA as Mo,a29 as Ca,sQ as Oo,sl as Uo,a2a as Bo,s1 as Vo,s6 as jo,sh as zo,s4 as $o,a2b as Lo,rZ as Go,sg as qo,sW as No,a2c as Jo,t7 as Yo,sE as Wo,td as Xo,sJ as Ho,rJ as Ko,a2d as Qo,q$ as Zo,qz as ec,qG as fa,rt as tc,a2e as ac,a2f as nc,a2g as sc,a2h as oc,a2i as cc,a2j as ic,a2k as lc,th as rc,a2l as dc,a2m as uc,a2n as Ia,uK as mc,u1 as pc,tS as ka,tQ as hc,a2o as Sc,tF as gc,tk as Cc,tT as fc,a2p as Ic,a2q as kc,tq as Tc,a2r as bc,tl as Pc,tp as yc,tn as vc,tZ as Ec}from"./zeni-epic-state-DLEY0NmH.js";import za from"./NotFoundScreen-D9bcBk9H.js";import{a as s,R as $a}from"./sentry-oILOkT84.js";import{n as be,S as Ac}from"./mui-DA_IUYGW.js";import{W as Ve,A as W,j as X,p as ee,ao as La,aq as Ga,dM as xc,dN as wc,z as st,dO as Rc,dP as Dc,dQ as Fc,ac as Ue,dR as _c,dS as Ta,b8 as ba,dT as Mc,a5 as qa,dU as Oc,h as et,a as Uc,dV as Bc,dW as Vc,K as jc,V as zc,dX as $c,dY as Lc,dZ as Gc,b2 as qc,bq as Nc,a9 as Jc,b3 as Yc,b4 as Wc,G as Xc,w as Hc,d_ as Kc,at as Pa,d$ as Qc}from"./index-DvOt4VS9.js";import{u as Na}from"./useAskAiCfoHostNavButtonProps-DqbLwjuM.js";import{g as ya,b as Zc,c as ei,h as ti,a as ai,i as ni,r as si,C as oi}from"./TransactionDetailScreen-C1bVEOAX.js";import{u as ci,a as ii}from"./useActualMatchingMatchDetail-YT3I0Lzu.js";import{d as li}from"./decodeURIComponentSafe-CYuijBUP.js";import{m as Ja,a as Ya}from"./expenseAutomationHelper-jtvNac2y.js";import{u as Wa,a as Xa,w as ri}from"./withTransactionSidePanel-dWI8TaQe.js";import{b as di,S as ui,a as mi,J as pi}from"./ScheduleDetailsPrepaidExpensesScreen-RqztnMI8.js";import{s as va,i as Ha,h as hi,v as Si,c as gi}from"./routePaths-of7B18Ze.js";import{a as It}from"./accountMappingHelper-Cmqzt3o8.js";import{D as Ci}from"./DrawerScreen-iwe9vo8N.js";import"./recharts-ikWEYduq.js";import"./analytics-Dk2G_EzJ.js";import"./plaid-CG0Jj5NR.js";import"./dnd-C8GpPG0g.js";import"./stripe-cKAAJElX.js";import"./lottie-C8c0mGol.js";import"./lexical-DewpM37L.js";import"./pdf-CglQcGFZ.js";import"./utils-A5fkS8h7.js";import"./useInitialThreadRequest-B8hjmQPb.js";import"./stripSplatSuffix-DfsbDgo5.js";import"./pathToGoBack-Cad-ghSF.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="87ce31e1-b11e-4626-81f7-0b83418c1248",t._sentryDebugIdIdentifier="sentry-dbid-87ce31e1-b11e-4626-81f7-0b83418c1248")}catch{}})();const fi=()=>{const t=ge(),n=nt(),S=Te(),g=F((p=>ke(p))),{useFeatureGate:d}=Ve(),{isFeatureEnabled:i}=d(W.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=d(W.aiAuditScorePercentage),A=F((p=>p.expenseAutomationViewState.selectedPeriodByTenantId)),l=F((p=>Hn(p,g.tenantId))),{isAiCfoAccessEnabled:v,onAskAiCfoClick:x}=Na({mobileExploreReferrer:"Month-End Close Overview"}),b=s.useCallback(((p,P,_=!1)=>{t(Me({tenantId:P,period:{month:p.month,year:p.year},refreshViewInBackground:_}))}),[]),C=s.useCallback((p=>{const P=S.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&X.trackMonthCloseAuditPage(p.month,p.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,P??null),t(Kn(g.tenantId,p))}),[g.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),f=A[g.tenantId],m=s.useCallback((()=>{const p=S.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&X.trackMonthCloseAuditPage(f.month,f.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,p??null),b(f,g.tenantId,!0)}),[b,f,g.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),z=ee(S.state?.pathnameStackToGoBack,S.pathname),w=s.useCallback((()=>{if(l.monthEndCloseChecks!=null&&f!=null){const p=l.monthEndCloseChecks.monthEndCloseCheckList.find((P=>P.progress<100));if(p!=null)return void n(`./${p.id}/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:z,message:"comingFromOverview"}});n(`./month_end_insights/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:z,message:"comingFromOverview"}})}}),[l.monthEndCloseChecks,f]),{areTenantIdsInSync:I}=La();return Ga({isDataReady:l.fetchState==="Completed"}),s.useEffect((()=>{f!=null&&l.fetchState!=="In-Progress"&&l.fetchState!=="Completed"&&I&&b(f,g.tenantId)}),[b,f,l.fetchState,g.tenantId,I]),s.useEffect((()=>{f!=null&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&I&&t(Qn(f))}),[f,l.monthClosePerformanceTrendFetchStatus.fetchState,I]),s.useEffect((()=>{const p=setInterval((()=>{l.fetchState!=="In-Progress"&&l.fetchState==="Completed"&&m()}),3e5);return()=>clearInterval(p)}),[l.fetchState]),s.useEffect((()=>{if(l.fetchState==="Completed"&&l.monthEndCloseChecks?.auditSummary!=null){const p=S.state?.referrer;X.trackMonthCloseAuditPage(l.selectedPeriod.month,l.selectedPeriod.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,p??null)}}),[l.fetchState,l.selectedPeriod,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),k.jsx(Ii,{children:k.jsx(xc,{monthEndCloseChecksView:l,isRealtimeInsightsFeatureEnabled:i,onMonthEndCheckClick:p=>{n(`./${p}/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:z,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:C,handleReviewButtonClick:w,onBackClick:()=>{n("../../dashboard")},onReload:m,isAiCfoAccessEnabled:v,onAskAiCfoClick:x,aiAuditScorePercentageEnabled:r})})},Ii=be.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{j as s}from"./liveblocks-QExkfWwX.js";import{a as d}from"./sentry-oILOkT84.js";import{au as i,av as l,o as p,a2 as m}from"./index-BvMe6BwU.js";import"./mui-DA_IUYGW.js";import f from"./NotFoundScreen-azJwEf6u.js";import{h as u,g as b}from"./core-C9JgQJB4.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="6ddb47ae-a6dc-4561-8d29-76ae28ac5edc",e._sentryDebugIdIdentifier="sentry-dbid-6ddb47ae-a6dc-4561-8d29-76ae28ac5edc")}catch{}})();const _=()=>{const e=u(),a=b(),t=d.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),r=d.useCallback((()=>{(()=>{const n=m(a.state?.pathnameStackToGoBack),c=n.poppedPathname??k();e(c,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=i(a.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:r}):s.jsx(f,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{_ as F};
1
+ import{j as s}from"./liveblocks-QExkfWwX.js";import{a as d}from"./sentry-oILOkT84.js";import{au as i,av as l,o as p,a2 as m}from"./index-DvOt4VS9.js";import"./mui-DA_IUYGW.js";import f from"./NotFoundScreen-D9bcBk9H.js";import{h as u,g as b}from"./core-C9JgQJB4.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="6ddb47ae-a6dc-4561-8d29-76ae28ac5edc",e._sentryDebugIdIdentifier="sentry-dbid-6ddb47ae-a6dc-4561-8d29-76ae28ac5edc")}catch{}})();const _=()=>{const e=u(),a=b(),t=d.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),r=d.useCallback((()=>{(()=>{const n=m(a.state?.pathnameStackToGoBack),c=n.poppedPathname??k();e(c,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=i(a.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:r}):s.jsx(f,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{_ as F};
@@ -1 +1 @@
1
- import{a as i}from"./sentry-oILOkT84.js";import{u as l,h as f,g as m}from"./core-C9JgQJB4.js";import{i0 as p,U$ as g,V0 as _}from"./zeni-epic-state-DLEY0NmH.js";import{u as b,L as h,z as y}from"./index-BvMe6BwU.js";import"./liveblocks-QExkfWwX.js";import"./recharts-ikWEYduq.js";import"./mui-DA_IUYGW.js";import"./analytics-Dk2G_EzJ.js";import"./plaid-CG0Jj5NR.js";import"./dnd-C8GpPG0g.js";import"./stripe-cKAAJElX.js";import"./lottie-C8c0mGol.js";import"./lexical-DewpM37L.js";import"./pdf-CglQcGFZ.js";import"./utils-A5fkS8h7.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="9c98bf96-8152-4a09-ae37-837d3d9d3885",e._sentryDebugIdIdentifier="sentry-dbid-9c98bf96-8152-4a09-ae37-837d3d9d3885")}catch{}})();function $(){const e=l(),n=f(),r=m(),{setLoading:o,clearAllLoading:c}=b(),s=i.useRef(!1);return i.useLayoutEffect((()=>{o(h.CONNECTION_AUTH)}),[o]),i.useEffect((()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(r.search).get("code"),d=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&d!=null){const t=JSON.parse(d);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}c();const u=y.getActiveTenantForUser();n(u?.tenantEmailDomain!=null?`/${u.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{$ as default};
1
+ import{a as i}from"./sentry-oILOkT84.js";import{u as l,h as f,g as m}from"./core-C9JgQJB4.js";import{i0 as p,U$ as g,V0 as _}from"./zeni-epic-state-DLEY0NmH.js";import{u as b,L as h,z as y}from"./index-DvOt4VS9.js";import"./liveblocks-QExkfWwX.js";import"./recharts-ikWEYduq.js";import"./mui-DA_IUYGW.js";import"./analytics-Dk2G_EzJ.js";import"./plaid-CG0Jj5NR.js";import"./dnd-C8GpPG0g.js";import"./stripe-cKAAJElX.js";import"./lottie-C8c0mGol.js";import"./lexical-DewpM37L.js";import"./pdf-CglQcGFZ.js";import"./utils-A5fkS8h7.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="9c98bf96-8152-4a09-ae37-837d3d9d3885",e._sentryDebugIdIdentifier="sentry-dbid-9c98bf96-8152-4a09-ae37-837d3d9d3885")}catch{}})();function $(){const e=l(),n=f(),r=m(),{setLoading:o,clearAllLoading:c}=b(),s=i.useRef(!1);return i.useLayoutEffect((()=>{o(h.CONNECTION_AUTH)}),[o]),i.useEffect((()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(r.search).get("code"),d=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&d!=null){const t=JSON.parse(d);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}c();const u=y.getActiveTenantForUser();n(u?.tenantEmailDomain!=null?`/${u.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{$ as default};