@zeniai/web-app-ui 5.3.43-dev → 5.3.43-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 (70) hide show
  1. package/dist/assets/{AccountMappingScreen-MfXsPj8M.js → AccountMappingScreen-A78kjWMW.js} +1 -1
  2. package/dist/assets/{ActualMatchingMatchDetailScreen-DPtLhEgD.js → ActualMatchingMatchDetailScreen-H6FIHzKS.js} +1 -1
  3. package/dist/assets/{AddressRoutes-CQjpNxne.js → AddressRoutes-NMfqz3GH.js} +1 -1
  4. package/dist/assets/{AddressScreen-tI262EI8.js → AddressScreen-DbL2JK9V.js} +1 -1
  5. package/dist/assets/{AiCfoScreen-DMyEpPj8.js → AiCfoScreen-DQ-_2zus.js} +1 -1
  6. package/dist/assets/{AppDrawer-CK8Oi_Um.js → AppDrawer-B21egTDJ.js} +1 -1
  7. package/dist/assets/{BillPayApprovalRoutes-BG4wkb9h.js → BillPayApprovalRoutes-C0QG7H0A.js} +1 -1
  8. package/dist/assets/{BillPayRoutes-B82H1r4T.js → BillPayRoutes-BquhDc0u.js} +1 -1
  9. package/dist/assets/{BusinessVerificationPageScreen-BLwno7qB.js → BusinessVerificationPageScreen-DlH1zL57.js} +1 -1
  10. package/dist/assets/{CardsAiCfoScreen-BJxdbSYR.js → CardsAiCfoScreen-B3hOZl8l.js} +1 -1
  11. package/dist/assets/{ChargeCardRoutes-CMUVGkhr.js → ChargeCardRoutes-CWYnFFCQ.js} +1 -1
  12. package/dist/assets/{CompanyPassportScreen-C_r9krre.js → CompanyPassportScreen-D55YyxAR.js} +1 -1
  13. package/dist/assets/{ConnectionAuthScreen-DckWKyp-.js → ConnectionAuthScreen-BzzSw1MN.js} +1 -1
  14. package/dist/assets/{CustomerOnboardingAuthScreen--oM8fIUf.js → CustomerOnboardingAuthScreen-CBDPd-_k.js} +1 -1
  15. package/dist/assets/{CustomerOnboardingRoutes-CbzfyCjZ.js → CustomerOnboardingRoutes-DZOpRUqN.js} +1 -1
  16. package/dist/assets/{DashboardRoutes-BeQuxWvV.js → DashboardRoutes-BWa2chAm.js} +1 -1
  17. package/dist/assets/{DefaultTenantHome-RKPiTReZ.js → DefaultTenantHome-DLN4EyYk.js} +1 -1
  18. package/dist/assets/{DomesticWireDetailScreen-42PVSRte.js → DomesticWireDetailScreen-Di0HmEb7.js} +1 -1
  19. package/dist/assets/{DrawerScreen-DQY8vrlv.js → DrawerScreen-BKD3lmi2.js} +1 -1
  20. package/dist/assets/{EntityDetailRoutes-Br-C_K-o.js → EntityDetailRoutes-Dkd2Wwk0.js} +1 -1
  21. package/dist/assets/{ExpenseAutomationRoutes-CurjmTHm.js → ExpenseAutomationRoutes-ChA7_dQU.js} +1 -1
  22. package/dist/assets/{FeaturePreviewScreen-C8dKuiF7.js → FeaturePreviewScreen-DFQePQma.js} +1 -1
  23. package/dist/assets/{HubSpotOAuthCallbackScreen-Ct9QwCVK.js → HubSpotOAuthCallbackScreen-Bho75VRj.js} +1 -1
  24. package/dist/assets/{InvoicingRoutes-B_3tGcpp.js → InvoicingRoutes-BIJoBfxF.js} +1 -1
  25. package/dist/assets/{MagicLinkRoutes-VkRBz-4x.js → MagicLinkRoutes-DSIncfO5.js} +1 -1
  26. package/dist/assets/{MagicLinkSignInScreen-D6KHJfXd.js → MagicLinkSignInScreen-CEPRWAV6.js} +1 -1
  27. package/dist/assets/{MobileAppDrawer-plEMRzd-.js → MobileAppDrawer-Ce8Zx46w.js} +1 -1
  28. package/dist/assets/{NotFoundScreen-DVcHaqdZ.js → NotFoundScreen-Duy6T6m3.js} +1 -1
  29. package/dist/assets/{NotificationRoutes-DporIbci.js → NotificationRoutes-RjDVJiKf.js} +1 -1
  30. package/dist/assets/{OAuthConsentScreen-Bwiy1dZe.js → OAuthConsentScreen-CtkoMagm.js} +1 -1
  31. package/dist/assets/{PandLWithForecastRoutes-4dzVDYi7.js → PandLWithForecastRoutes-GmhxMHoN.js} +1 -1
  32. package/dist/assets/{PaymentLinkScreen-xK_McxjH.js → PaymentLinkScreen-B64FHPQ1.js} +1 -1
  33. package/dist/assets/{PeopleRoutes-CzBniqLj.js → PeopleRoutes-ecEzCyKE.js} +1 -1
  34. package/dist/assets/{PerformanceRoutes-DQVFxHI8.js → PerformanceRoutes-BTYsYwgQ.js} +1 -1
  35. package/dist/assets/{QBOConnectionScreen-CqIFgusE.js → QBOConnectionScreen-DSxjIxzn.js} +1 -1
  36. package/dist/assets/{ReimbursementApprovalRoutes-B2dZhJk9.js → ReimbursementApprovalRoutes-BkXOBY6f.js} +1 -1
  37. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-NYDKW5M_.js → ReimbursementApprovalRuleDetailScreen-CgsllBgS.js} +1 -1
  38. package/dist/assets/{ReimbursementRoutes-B4vB3DWh.js → ReimbursementRoutes-BoLFmFGU.js} +1 -1
  39. package/dist/assets/{ReportsRoutes-QNTHdw6g.js → ReportsRoutes-CrzZ0bl7.js} +1 -1
  40. package/dist/assets/{RewardsRoutes-B7P2nmYk.js → RewardsRoutes-Bw-VJeWb.js} +1 -1
  41. package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-YdcDOaAu.js → ScheduleDetailsPrepaidExpensesScreen-DAsZ0K0d.js} +1 -1
  42. package/dist/assets/{ScreenRoutes-Cy1wpKTY.js → ScreenRoutes-BLctPWdO.js} +2 -2
  43. package/dist/assets/{SettingsRoutes-DIXSeHUD.js → SettingsRoutes-_eJ2ckP-.js} +1 -1
  44. package/dist/assets/{SetupPagesScreen-DV-Hyv78.js → SetupPagesScreen-Bn2r0Ale.js} +1 -1
  45. package/dist/assets/{SignInScreen-DvhFy3xy.js → SignInScreen-CV_GUIAF.js} +1 -1
  46. package/dist/assets/{SignOutScreen-C5uG0eM1.js → SignOutScreen-CJIt_MEN.js} +1 -1
  47. package/dist/assets/{TaskListScreen-CbiI2IGU.js → TaskListScreen-B7cUAwfe.js} +1 -1
  48. package/dist/assets/{TaskRoutes-DNWDTIHG.js → TaskRoutes-CTl9GKlH.js} +1 -1
  49. package/dist/assets/{TransactionDetailRoutes-CGamazG6.js → TransactionDetailRoutes-DWBtPRgg.js} +1 -1
  50. package/dist/assets/{TransactionDetailScreen-DA_15rvE.js → TransactionDetailScreen-C2_EB_46.js} +1 -1
  51. package/dist/assets/{TransactionListRoutes-DUel89dv.js → TransactionListRoutes-DpOuohtl.js} +1 -1
  52. package/dist/assets/{TreasuryRoutes-DNsqL_xe.js → TreasuryRoutes-DchkL4da.js} +1 -1
  53. package/dist/assets/{VendorsRoutes-DENWe8ir.js → VendorsRoutes-DVyJDGrt.js} +1 -1
  54. package/dist/assets/{WiseConfirmationScreen-CO8k4M88.js → WiseConfirmationScreen-DxziV1eR.js} +1 -1
  55. package/dist/assets/{ZeniAccountRoutes-BzmSgvJI.js → ZeniAccountRoutes-C4eET6j1.js} +1 -1
  56. package/dist/assets/{ZeniAccountStatementScreen-CuxmtWXH.js → ZeniAccountStatementScreen-33Pf07v4.js} +1 -1
  57. package/dist/assets/{analyticsHelper-BwLj34Ys.js → analyticsHelper-sj9huSc9.js} +1 -1
  58. package/dist/assets/{getLocaleForTenant-DzgzmDle.js → getLocaleForTenant-B-DdN2Lw.js} +1 -1
  59. package/dist/assets/{index-DTZt8DRK.js → index-CavSpTx-.js} +5 -5
  60. package/dist/assets/{routePaths-CPqwWbPN.js → routePaths-D5zGcGZG.js} +1 -1
  61. package/dist/assets/{useActualMatchingMatchDetail-Asb0lSO5.js → useActualMatchingMatchDetail-CxpYQNp7.js} +1 -1
  62. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-C3x9GIES.js → useAiCfoDashboardSuggestedQuestionsChips-B8_gxBhe.js} +1 -1
  63. package/dist/assets/{useAskAiCfoHostNavButtonProps-DzjGv8Xy.js → useAskAiCfoHostNavButtonProps-DQ3F86Nw.js} +1 -1
  64. package/dist/assets/{useChargeCardPusherEvents-aPfygpSV.js → useChargeCardPusherEvents-BZNmvp7i.js} +1 -1
  65. package/dist/assets/{useEmailConnectResultRefresh-CCE7kCjs.js → useEmailConnectResultRefresh-98UHJ7hj.js} +1 -1
  66. package/dist/assets/{useInitialThreadRequest-BWyM3F-W.js → useInitialThreadRequest-BRvCrjqu.js} +1 -1
  67. package/dist/assets/{useTaskManagerAccess-DRF4urEw.js → useTaskManagerAccess-B9_LRJIF.js} +1 -1
  68. package/dist/assets/{withTransactionSidePanel-Cd_M2p_z.js → withTransactionSidePanel-tINIzPX1.js} +1 -1
  69. package/dist/index.html +1 -1
  70. package/package.json +1 -1
@@ -1 +1 @@
1
- import{j as m}from"./liveblocks-y3zMPGKB.js";import{a as g}from"./sentry-Jm7O5sR0.js";import{h as w,u as T,g as k,i as x,j as O,l as E}from"./core-BwK6FGJd.js";import{z as C,br as F,a8 as P,k as V,T as A,o as N,bs as L,ae as j,aG as U,p as B}from"./index-DTZt8DRK.js";import{fE as D,gH as G,Bt as M,gC as _,c8 as R,X$ as z,bn as Y,uS as H,uG as $,my as X,o7 as S,Y0 as Z,bE as q,cE as b,oi as J,os as K}from"./zeni-epic-state-BugXGzus.js";import"./mui-CxIkaR9n.js";import{d as Q}from"./routePaths-CPqwWbPN.js";import{M as W}from"./MobileAppDrawer-plEMRzd-.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]="eb7a50cc-41ce-40ca-9d8f-7ca71de75efe",n._sentryDebugIdIdentifier="sentry-dbid-eb7a50cc-41ce-40ca-9d8f-7ca71de75efe")}catch{}})();const ee=E((function(n){const t=_(n),i=C.getSignedInUser(),p=D(n),c=p.tenantId,l={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=R(p?.userRole??[])&&t.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=z(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:`${j.fileMicroServiceBaseUrl}`,isZeniUser:Y(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=Q(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?b(u):void 0,meetingLink:y!=""&&y!=null?b(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?q(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(X({files:e}))},onDeleteFile:e=>{n($(e))},onEditFileName:(e,a)=>{n(H(e,a.split(".")[0]))}}}))(L);function de(){const n=w(),t=T(),i=k(),{tenantEmailDomain:p}=x(),[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=>D(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(G(d)))}),[c,a,d,t]),g.useEffect((()=>{o==="Not-Started"&&t(M())}),[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(A.Event.companyPassport,N(i)?"Settings":"Company Passport")}),N(i)?m.jsx(W,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:n,location:i,isLoading:y,currentTenant:r,isSettings:N(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
1
+ import{j as m}from"./liveblocks-y3zMPGKB.js";import{a as g}from"./sentry-Jm7O5sR0.js";import{h as w,u as T,g as k,i as x,j as O,l as E}from"./core-BwK6FGJd.js";import{z as C,br as F,a8 as P,k as V,T as A,o as N,bs as L,ae as j,aG as U,p as B}from"./index-CavSpTx-.js";import{fE as D,gH as G,Bt as M,gC as _,c8 as R,X$ as z,bn as Y,uS as H,uG as $,my as X,o7 as S,Y0 as Z,bE as q,cE as b,oi as J,os as K}from"./zeni-epic-state-BugXGzus.js";import"./mui-CxIkaR9n.js";import{d as Q}from"./routePaths-D5zGcGZG.js";import{M as W}from"./MobileAppDrawer-Ce8Zx46w.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]="eb7a50cc-41ce-40ca-9d8f-7ca71de75efe",n._sentryDebugIdIdentifier="sentry-dbid-eb7a50cc-41ce-40ca-9d8f-7ca71de75efe")}catch{}})();const ee=E((function(n){const t=_(n),i=C.getSignedInUser(),p=D(n),c=p.tenantId,l={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=R(p?.userRole??[])&&t.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=z(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:`${j.fileMicroServiceBaseUrl}`,isZeniUser:Y(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=Q(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?b(u):void 0,meetingLink:y!=""&&y!=null?b(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?q(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(X({files:e}))},onDeleteFile:e=>{n($(e))},onEditFileName:(e,a)=>{n(H(e,a.split(".")[0]))}}}))(L);function de(){const n=w(),t=T(),i=k(),{tenantEmailDomain:p}=x(),[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=>D(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(G(d)))}),[c,a,d,t]),g.useEffect((()=>{o==="Not-Started"&&t(M())}),[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(A.Event.companyPassport,N(i)?"Settings":"Company Passport")}),N(i)?m.jsx(W,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:n,location:i,isLoading:y,currentTenant:r,isSettings:N(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
@@ -1,4 +1,4 @@
1
- import{j as I}from"./liveblocks-y3zMPGKB.js";import{a as o}from"./sentry-Jm7O5sR0.js";import{u as F,h as P,g as G,j as C,N as w}from"./core-BwK6FGJd.js";import{TG as H,fE as q,gk as z,pR as J,gL as A,gj as Q,gh as V,U4 as B,gg as O}from"./zeni-epic-state-BugXGzus.js";import{u as K,z as E,L as D,G as M,J as W}from"./index-DTZt8DRK.js";import{n as X}from"./mui-CxIkaR9n.js";import{P as h,a as _}from"./AccountMappingScreen-MfXsPj8M.js";import{t as Y}from"./getLocaleForTenant-DzgzmDle.js";import{g as Z,Q as ee}from"./QBOConnectionScreen-CqIFgusE.js";import"./recharts-CoAMGh71.js";import"./analytics-BTvt2K3S.js";import"./plaid-CQqwPn97.js";import"./dnd-Cbdx7tVf.js";import"./stripe-cKAAJElX.js";import"./lottie-BQlGSG2c.js";import"./lexical-DRfKJLK3.js";import"./pdf-DGzvSuDl.js";import"./utils-BVIT21dc.js";import"./MobileAppDrawer-plEMRzd-.js";import"./InboxNotificationsProvider-ozJWRqdQ.js";import"./useTaskManagerAccess-DRF4urEw.js";import"./accountMappingHelper-CQrmB6jj.js";import"./empty-CTWnX7jn.js";import"./pdf-lib-Bm6tpkCo.js";import"./index-SQoDfHg2.js";import"./url-D9zjpdeS.js";import"./index-D2_EUTG6.js";import"./decodeURIComponentSafe-iAavL6tS.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]="323cd980-e61e-457e-ab5a-8f4f56ca6f1c",t._sentryDebugIdIdentifier="sentry-dbid-323cd980-e61e-457e-ab5a-8f4f56ca6f1c")}catch{}})();const te=X.div`
1
+ import{j as I}from"./liveblocks-y3zMPGKB.js";import{a as o}from"./sentry-Jm7O5sR0.js";import{u as F,h as P,g as G,j as C,N as w}from"./core-BwK6FGJd.js";import{TG as H,fE as q,gk as z,pR as J,gL as A,gj as Q,gh as V,U4 as B,gg as O}from"./zeni-epic-state-BugXGzus.js";import{u as K,z as E,L as D,G as M,J as W}from"./index-CavSpTx-.js";import{n as X}from"./mui-CxIkaR9n.js";import{P as h,a as _}from"./AccountMappingScreen-A78kjWMW.js";import{t as Y}from"./getLocaleForTenant-B-DdN2Lw.js";import{g as Z,Q as ee}from"./QBOConnectionScreen-DSxjIxzn.js";import"./recharts-CoAMGh71.js";import"./analytics-BTvt2K3S.js";import"./plaid-CQqwPn97.js";import"./dnd-Cbdx7tVf.js";import"./stripe-cKAAJElX.js";import"./lottie-BQlGSG2c.js";import"./lexical-DRfKJLK3.js";import"./pdf-DGzvSuDl.js";import"./utils-BVIT21dc.js";import"./MobileAppDrawer-Ce8Zx46w.js";import"./InboxNotificationsProvider-ozJWRqdQ.js";import"./useTaskManagerAccess-B9_LRJIF.js";import"./accountMappingHelper-CQrmB6jj.js";import"./empty-CTWnX7jn.js";import"./pdf-lib-Bm6tpkCo.js";import"./index-SQoDfHg2.js";import"./url-D9zjpdeS.js";import"./index-D2_EUTG6.js";import"./decodeURIComponentSafe-iAavL6tS.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]="323cd980-e61e-457e-ab5a-8f4f56ca6f1c",t._sentryDebugIdIdentifier="sentry-dbid-323cd980-e61e-457e-ab5a-8f4f56ca6f1c")}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-y3zMPGKB.js";import{z as m}from"./index-DTZt8DRK.js";import{g as n}from"./QBOConnectionScreen-CqIFgusE.js";import"./sentry-Jm7O5sR0.js";import{g as p,N as a}from"./core-BwK6FGJd.js";import"./zeni-epic-state-BugXGzus.js";import"./recharts-CoAMGh71.js";import"./mui-CxIkaR9n.js";import"./analytics-BTvt2K3S.js";import"./plaid-CQqwPn97.js";import"./dnd-Cbdx7tVf.js";import"./stripe-cKAAJElX.js";import"./lottie-BQlGSG2c.js";import"./lexical-DRfKJLK3.js";import"./pdf-DGzvSuDl.js";import"./utils-BVIT21dc.js";import"./empty-CTWnX7jn.js";import"./pdf-lib-Bm6tpkCo.js";import"./index-SQoDfHg2.js";import"./url-D9zjpdeS.js";import"./index-D2_EUTG6.js";import"./decodeURIComponentSafe-iAavL6tS.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-y3zMPGKB.js";import{z as m}from"./index-CavSpTx-.js";import{g as n}from"./QBOConnectionScreen-DSxjIxzn.js";import"./sentry-Jm7O5sR0.js";import{g as p,N as a}from"./core-BwK6FGJd.js";import"./zeni-epic-state-BugXGzus.js";import"./recharts-CoAMGh71.js";import"./mui-CxIkaR9n.js";import"./analytics-BTvt2K3S.js";import"./plaid-CQqwPn97.js";import"./dnd-Cbdx7tVf.js";import"./stripe-cKAAJElX.js";import"./lottie-BQlGSG2c.js";import"./lexical-DRfKJLK3.js";import"./pdf-DGzvSuDl.js";import"./utils-BVIT21dc.js";import"./empty-CTWnX7jn.js";import"./pdf-lib-Bm6tpkCo.js";import"./index-SQoDfHg2.js";import"./url-D9zjpdeS.js";import"./index-D2_EUTG6.js";import"./decodeURIComponentSafe-iAavL6tS.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-y3zMPGKB.js";import{t as xt,A as $e}from"./AddressScreen-tI262EI8.js";import wt from"./NotFoundScreen-DVcHaqdZ.js";import{a as d,t as Me}from"./sentry-Jm7O5sR0.js";import{h as _e,g as Ee,u as se,i as Te,j as x,N as Q,q as At,l as it,n as Pt,o as H}from"./core-BwK6FGJd.js";import{fE as Y,dZ as xe,dY as we,bq as Dt,TX as Bt,bR as jt,pP as Ft,Bd as Vt,Bg as Ut,Vi as Rt,Vj as Lt,lt as Oe,lw as ct,Uy as Nt,b$ as Gt,c8 as fe,BH as Ae,Bs as $t,Vk as me,BI as dt,S5 as Mt,mG as ut,dh as lt,Vl as Qt,Vm as Kt,uz as zt,Ul as Ce,hU as qt,Uk as be,hR as Ht,G5 as Jt,uD as Zt,hJ as Wt,hM as Qe,Vn as pt,Vo as Xt,LS as Yt,Vp as en,LW as tn,Bj as nn,Vq as an,Vr as on,lr as sn,lu as rn,BU as cn,Bu as mt,BG as dn,bE as Ke,cE as un,BT as ze,uS as ln,uG as pn,my as mn,gF as gn,gE as fn,gD as yn,Vs as hn,Bm as Cn,BV as bn,BY as Sn,B$ as In,C5 as kn,di as On}from"./zeni-epic-state-BugXGzus.js";import{z,O as Pe,c as W,B as vn,p as q,a8 as re,k as g,aE as _n,ai as gt,a1 as En,$ as ft,U as yt,j as X,X as ge,T as ve,aF as Tn,J as qe,v as He,ae as xn,aG as Je,aH as wn,aI as An}from"./index-DTZt8DRK.js";import{n as De}from"./mui-CxIkaR9n.js";import{g as Pn,h as Dn,q as ie}from"./QBOConnectionScreen-CqIFgusE.js";import{u as Bn,a as jn}from"./useEmailConnectResultRefresh-CCE7kCjs.js";import{u as Fn}from"./useChargeCardPusherEvents-aPfygpSV.js";import"./recharts-CoAMGh71.js";import"./analytics-BTvt2K3S.js";import"./plaid-CQqwPn97.js";import"./dnd-Cbdx7tVf.js";import"./stripe-cKAAJElX.js";import"./lottie-BQlGSG2c.js";import"./lexical-DRfKJLK3.js";import"./pdf-DGzvSuDl.js";import"./utils-BVIT21dc.js";import"./empty-CTWnX7jn.js";import"./pdf-lib-Bm6tpkCo.js";import"./index-SQoDfHg2.js";import"./url-D9zjpdeS.js";import"./index-D2_EUTG6.js";import"./decodeURIComponentSafe-iAavL6tS.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]="8ff25f96-c49b-40b2-a608-8ebc9d072a23",e._sentryDebugIdIdentifier="sentry-dbid-8ff25f96-c49b-40b2-a608-8ebc9d072a23")}catch{}})();const Ze=e=>{switch(e){case"Complete":return"yes";case"Pending Review":case"Incomplete":return"partially";default:return"no"}},Vn=()=>{const e=_e(),l=Ee(),i=se(),[a,p]=d.useState(!1),[u,c]=d.useState(!1),{tenantEmailDomain:v}=Te(),t=z.getSignedInUser(),{useFeatureGate:n}=Pe(),{isFeatureEnabled:C}=n(W.isApAgingFeatureEnabled),{isFeatureEnabled:o}=n(W.isArAgingFeatureEnabled),{isFeatureEnabled:A}=n(W.isReferralFeatureEnabled),{isFeatureEnabled:w}=n(W.isDebitCardFeatureEnabled),k=vn(),O=x((S=>Y(S))),P=x((S=>S.onboardingCustomerViewState.fetchState)),_=O.excludedResources,F=O.companyId??z.getSignedInUserTenant(v)?.companyId;if(t==null)throw Error("Can't access onboarding flow without signing in...");const m=xe(w,O),b=we(O),D=[],U=_?.resources?.find((S=>S.resource==="/reports/top_expenses"))==null,h=_?.resources?.find((S=>S.resource==="/reports/task_card"))==null,r=O?.userRole!=null&&Dt(O?.userRole),E=_?.resources?.find((S=>S.resource==="/bills"))==null&&!r,T=_?.resources?.find((S=>S.resource==="/reimbursements"))==null;U===!1&&D.push("top_expenses"),h===!1&&D.push("task_card"),E===!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=x((S=>{const V=[];C===!1&&V.push("accounts_payable_aging"),o===!1&&V.push("accounts_receivable_aging"),V.push("zeni_accounts_promo_card","treasury_promo_card"),A===!1&&V.push("rewards_card"),k===!1&&V.push("expense_automation_card");const J=Bt(S,V);return jt(J.reportsInOrder.map(($=>({fetchState:$.fetchState,error:$.error})))).fetchState}));d.useEffect((()=>{P!=="Completed"||a||m||b||(p(!0),i(Ft(t.userId,F,O.tenantId,!0,!1,D)))}),[a,P,m,b,t,O.tenantId,i]);const B=d.useRef(!1),N=d.useCallback((()=>{const S={pathnameStackToGoBack:q(l.state?.pathnameStackToGoBack,l.pathname),message:"activation"};e(m?"../../checking":b?"../../cards":"../../dashboard",{state:S})}),[e,l,m,b]),G=d.useCallback((()=>{B.current||(B.current=!0,N())}),[N]);if(d.useEffect((()=>{const S=setTimeout((()=>c(!0)),3e3);return()=>clearTimeout(S)}),[]),d.useEffect((()=>{const S=setTimeout(G,6e3);return()=>clearTimeout(S)}),[G]),d.useEffect((()=>{m||b||!u||f!=="Completed"&&f!=="Error"||G()}),[u,f,m,b,G]),P!=="Completed")return s.jsx(Q,{to:"../"});const L=O.company?.companyOnboardingInfo?.onboardingInfo,ee={timeSinceQuoteSign:L?.onboardingTimeSinceQuoteSigned??"",timeSinceQuoteSignInMinutes:L?.onboardingToQuoteSignMinutes??0,isKybDone:Ze(L?.businessVerified?.status),isKycDone:Ze(L?.identityVerified?.status),paymentType:"",paymentSource:"",qboConnectionSource:L?.accountingConnectionCreationMode??""};return s.jsxs(s.Fragment,{children:[s.jsx(re,{analytics:g,onLoad:S=>S.trackOnboardingDashboardActivation(ee)}),s.jsx(_n,{show:!0,onComplete:G})]})},Se=["reading_books","finance_graph","reconciliation","cfo_foundation"],Ie=["llm_fine_tuning","rag_knowledge_graph","personalized_context"],We=(e,l)=>{const i=new Map(e.map((a=>[a.key,a])));return l.map((a=>{return p=i.get(a)?.status,p==="starting"||p==="building"?p:"idle";var p}))},Xe=(e,l)=>{if(e.length===0)return!1;const i=new Map(e.map((a=>[a.key,a])));return l.every((a=>i.get(a)?.status==="ready"))},Ye=De.div`
1
+ import{j as s}from"./liveblocks-y3zMPGKB.js";import{t as xt,A as $e}from"./AddressScreen-DbL2JK9V.js";import wt from"./NotFoundScreen-Duy6T6m3.js";import{a as d,t as Me}from"./sentry-Jm7O5sR0.js";import{h as _e,g as Ee,u as se,i as Te,j as x,N as Q,q as At,l as it,n as Pt,o as H}from"./core-BwK6FGJd.js";import{fE as Y,dZ as xe,dY as we,bq as Dt,TX as Bt,bR as jt,pP as Ft,Bd as Vt,Bg as Ut,Vi as Rt,Vj as Lt,lt as Oe,lw as ct,Uy as Nt,b$ as Gt,c8 as fe,BH as Ae,Bs as $t,Vk as me,BI as dt,S5 as Mt,mG as ut,dh as lt,Vl as Qt,Vm as Kt,uz as zt,Ul as Ce,hU as qt,Uk as be,hR as Ht,G5 as Jt,uD as Zt,hJ as Wt,hM as Qe,Vn as pt,Vo as Xt,LS as Yt,Vp as en,LW as tn,Bj as nn,Vq as an,Vr as on,lr as sn,lu as rn,BU as cn,Bu as mt,BG as dn,bE as Ke,cE as un,BT as ze,uS as ln,uG as pn,my as mn,gF as gn,gE as fn,gD as yn,Vs as hn,Bm as Cn,BV as bn,BY as Sn,B$ as In,C5 as kn,di as On}from"./zeni-epic-state-BugXGzus.js";import{z,O as Pe,c as W,B as vn,p as q,a8 as re,k as g,aE as _n,ai as gt,a1 as En,$ as ft,U as yt,j as X,X as ge,T as ve,aF as Tn,J as qe,v as He,ae as xn,aG as Je,aH as wn,aI as An}from"./index-CavSpTx-.js";import{n as De}from"./mui-CxIkaR9n.js";import{g as Pn,h as Dn,q as ie}from"./QBOConnectionScreen-DSxjIxzn.js";import{u as Bn,a as jn}from"./useEmailConnectResultRefresh-98UHJ7hj.js";import{u as Fn}from"./useChargeCardPusherEvents-BZNmvp7i.js";import"./recharts-CoAMGh71.js";import"./analytics-BTvt2K3S.js";import"./plaid-CQqwPn97.js";import"./dnd-Cbdx7tVf.js";import"./stripe-cKAAJElX.js";import"./lottie-BQlGSG2c.js";import"./lexical-DRfKJLK3.js";import"./pdf-DGzvSuDl.js";import"./utils-BVIT21dc.js";import"./empty-CTWnX7jn.js";import"./pdf-lib-Bm6tpkCo.js";import"./index-SQoDfHg2.js";import"./url-D9zjpdeS.js";import"./index-D2_EUTG6.js";import"./decodeURIComponentSafe-iAavL6tS.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]="8ff25f96-c49b-40b2-a608-8ebc9d072a23",e._sentryDebugIdIdentifier="sentry-dbid-8ff25f96-c49b-40b2-a608-8ebc9d072a23")}catch{}})();const Ze=e=>{switch(e){case"Complete":return"yes";case"Pending Review":case"Incomplete":return"partially";default:return"no"}},Vn=()=>{const e=_e(),l=Ee(),i=se(),[a,p]=d.useState(!1),[u,c]=d.useState(!1),{tenantEmailDomain:v}=Te(),t=z.getSignedInUser(),{useFeatureGate:n}=Pe(),{isFeatureEnabled:C}=n(W.isApAgingFeatureEnabled),{isFeatureEnabled:o}=n(W.isArAgingFeatureEnabled),{isFeatureEnabled:A}=n(W.isReferralFeatureEnabled),{isFeatureEnabled:w}=n(W.isDebitCardFeatureEnabled),k=vn(),O=x((S=>Y(S))),P=x((S=>S.onboardingCustomerViewState.fetchState)),_=O.excludedResources,F=O.companyId??z.getSignedInUserTenant(v)?.companyId;if(t==null)throw Error("Can't access onboarding flow without signing in...");const m=xe(w,O),b=we(O),D=[],U=_?.resources?.find((S=>S.resource==="/reports/top_expenses"))==null,h=_?.resources?.find((S=>S.resource==="/reports/task_card"))==null,r=O?.userRole!=null&&Dt(O?.userRole),E=_?.resources?.find((S=>S.resource==="/bills"))==null&&!r,T=_?.resources?.find((S=>S.resource==="/reimbursements"))==null;U===!1&&D.push("top_expenses"),h===!1&&D.push("task_card"),E===!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=x((S=>{const V=[];C===!1&&V.push("accounts_payable_aging"),o===!1&&V.push("accounts_receivable_aging"),V.push("zeni_accounts_promo_card","treasury_promo_card"),A===!1&&V.push("rewards_card"),k===!1&&V.push("expense_automation_card");const J=Bt(S,V);return jt(J.reportsInOrder.map(($=>({fetchState:$.fetchState,error:$.error})))).fetchState}));d.useEffect((()=>{P!=="Completed"||a||m||b||(p(!0),i(Ft(t.userId,F,O.tenantId,!0,!1,D)))}),[a,P,m,b,t,O.tenantId,i]);const B=d.useRef(!1),N=d.useCallback((()=>{const S={pathnameStackToGoBack:q(l.state?.pathnameStackToGoBack,l.pathname),message:"activation"};e(m?"../../checking":b?"../../cards":"../../dashboard",{state:S})}),[e,l,m,b]),G=d.useCallback((()=>{B.current||(B.current=!0,N())}),[N]);if(d.useEffect((()=>{const S=setTimeout((()=>c(!0)),3e3);return()=>clearTimeout(S)}),[]),d.useEffect((()=>{const S=setTimeout(G,6e3);return()=>clearTimeout(S)}),[G]),d.useEffect((()=>{m||b||!u||f!=="Completed"&&f!=="Error"||G()}),[u,f,m,b,G]),P!=="Completed")return s.jsx(Q,{to:"../"});const L=O.company?.companyOnboardingInfo?.onboardingInfo,ee={timeSinceQuoteSign:L?.onboardingTimeSinceQuoteSigned??"",timeSinceQuoteSignInMinutes:L?.onboardingToQuoteSignMinutes??0,isKybDone:Ze(L?.businessVerified?.status),isKycDone:Ze(L?.identityVerified?.status),paymentType:"",paymentSource:"",qboConnectionSource:L?.accountingConnectionCreationMode??""};return s.jsxs(s.Fragment,{children:[s.jsx(re,{analytics:g,onLoad:S=>S.trackOnboardingDashboardActivation(ee)}),s.jsx(_n,{show:!0,onComplete:G})]})},Se=["reading_books","finance_graph","reconciliation","cfo_foundation"],Ie=["llm_fine_tuning","rag_knowledge_graph","personalized_context"],We=(e,l)=>{const i=new Map(e.map((a=>[a.key,a])));return l.map((a=>{return p=i.get(a)?.status,p==="starting"||p==="building"?p:"idle";var p}))},Xe=(e,l)=>{if(e.length===0)return!1;const i=new Map(e.map((a=>[a.key,a])));return l.every((a=>i.get(a)?.status==="ready"))},Ye=De.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  background-color: ${e=>e.theme.colors.grey4};
@@ -1,4 +1,4 @@
1
- import{j as d}from"./liveblocks-y3zMPGKB.js";import{i as q,j as S,g as W,u as z,h as J,l as ne,k as oa,n as ft,o as F,N as yn}from"./core-BwK6FGJd.js";import{fE as L,VE as We,bE as sa,br as Ee,W$ as vn,k9 as An,X0 as Xt,X1 as In,kc as gt,X2 as Qe,X3 as En,kh as Tn,X4 as Yt,X5 as xn,kl as bt,X6 as Ze,X7 as Dn,X8 as wn,VY as Pn,ln as On,X9 as Fn,bn as Je,Xa as ra,WC as ue,bc as ia,lB as ca,lk as la,WE as me,WD as ae,fD as da,g9 as jn,gp as Ct,Xb as Rn,Xc as Bn,Xd as ua,Xe as Oe,DO as Me,DP as Ue,Eb as Te,E5 as pe,DT as Le,Xf as Mn,b$ as Ve,Xg as Un,Xh as Ln,Xi as ma,Xj as Fe,Xk as Vn,eh as et,z$ as pa,Xl as Xn,Xm as ha,Xn as Yn,Xo as Gn,Xp as Nn,Xq as _t,UA as kt,u5 as xe,l_ as De,El as yt,A6 as $n,Ad as zn,Xr as Kn,Xs as qn,DQ as Gt,Xt as Qn,A2 as Ae,zZ as fa,Xu as be,Xv as Nt,Xw as Zn,Xx as vt,Uz as At,Ca as ga,Xy as Hn,Xz as ba,XA as Wn,XB as Jn,XC as eo,XD as It,Cp as to,Cw as ao,XE as no,XF as oo,DS as $t,XG as so,C8 as Ca,XH as Ce,XI as zt,XJ as ro,bq as Sa,Eq as _a,XK as io,XL as ka,XM as co,XN as lo,XO as uo,XP as Et,Ei as mo,Ek as po,XQ as ho,XR as fo,DR as Kt,XS as go,Eo as ya,XT as Se,XU as qt,XV as bo,XW as Co,XX as va,lP as Aa,pW as Ia,lU as Ea,pU as Ta,pT as xa,pS as Da,Bx as So,db as _o,pP as ko,TX as yo,q4 as vo,XY as Ao,XZ as Io,X_ as Eo,b5 as Tt,p_ as To,ib as xo,gH as Do,pZ as wo,ld as Po,pX as Oo,pV as Fo,dZ as jo,dY as Ro}from"./zeni-epic-state-BugXGzus.js";import{z as V,av as oe,p as j,k as T,G as Q,bb as Bo,as as Xe,a8 as Ye,bc as wa,T as N,bd as Mo,be as Pa,E as Uo,bf as Lo,bg as Vo,a as Oa,a1 as Fa,e as ja,ar as Xo,bh as Yo,ao as Go,O as we,bi as Ra,x as ce,bj as Ba,bk as Ma,au as Ua,bl as No,ai as Ge,U as Ne,c as X,bm as $o,B as zo,j as Ko,a4 as qo,aq as Qo,bn as Zo,bo as Ho,bp as Wo,bq as Ie}from"./index-DTZt8DRK.js";import{n as xt}from"./mui-CxIkaR9n.js";import{a as b}from"./sentry-Jm7O5sR0.js";import{w as La}from"./withTransactionSidePanel-Cd_M2p_z.js";import{c as Va,t as Pe,f as he,b as Dt,a as wt,v as Jo}from"./routePaths-CPqwWbPN.js";import{u as se}from"./useAskAiCfoHostNavButtonProps-DzjGv8Xy.js";import Be from"./NotFoundScreen-DVcHaqdZ.js";import{u as Pt}from"./useInitialThreadRequest-BWyM3F-W.js";import{t as Xa}from"./analyticsHelper-BwLj34Ys.js";import{C as es}from"./CompanyPassportScreen-C_r9krre.js";import{u as ts}from"./useAiCfoDashboardSuggestedQuestionsChips-C3x9GIES.js";import{F as as}from"./FeaturePreviewScreen-C8dKuiF7.js";import"./recharts-CoAMGh71.js";import"./analytics-BTvt2K3S.js";import"./plaid-CQqwPn97.js";import"./dnd-Cbdx7tVf.js";import"./stripe-cKAAJElX.js";import"./lottie-BQlGSG2c.js";import"./lexical-DRfKJLK3.js";import"./pdf-DGzvSuDl.js";import"./utils-BVIT21dc.js";import"./TransactionDetailScreen-DA_15rvE.js";import"./decodeURIComponentSafe-iAavL6tS.js";import"./expenseAutomationHelper-MxNxlZNN.js";import"./stripSplatSuffix-nQAZVh5Z.js";import"./MobileAppDrawer-plEMRzd-.js";import"./InboxNotificationsProvider-ozJWRqdQ.js";import"./useTaskManagerAccess-DRF4urEw.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="2e7dc61e-6d15-49bd-aa16-a100e5737ff6",e._sentryDebugIdIdentifier="sentry-dbid-2e7dc61e-6d15-49bd-aa16-a100e5737ff6")}catch{}})();const ns=La((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=q(),s=V.getSignedInUser(),i=S((E=>E.tenantState.currentTenantId)),l=S((E=>L(E))),{tenantEmailDomain:m}=q(),p=W(),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=J(),k=S((E=>vn(E,u,o))),I=b.useCallback((()=>{o!=null&&k.fetchState!=="In-Progress"&&k.fetchState!=="Completed"&&C(An(o,u))}),[u]),v=b.useCallback((()=>{g("../../",{relative:"path"})}),[]),_=b.useCallback(((E,B)=>{C(Xt({sortKey:E,sortOrder:B}))}),[]),x=b.useCallback((E=>{C(Xt({downloadState:E}))}),[]),P=b.useCallback((E=>{if(e)e(E.transactionId,E.transactionType);else if(m!=null){const B=Va({id:E.transactionId,type:E.transactionType},m);g(B);const y=j(p.state?.pathnameStackToGoBack,p.pathname);g(B,{state:{pathnameStackToGoBack:y}})}}),[m,e]),D=b.useCallback((()=>{k.vendor!=null&&T.trackApAgingDetail("AP Aging",u.format(Q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),k.vendor.id,k.vendor.name)}),[k.vendor,u]);return b.useEffect((()=>{I()}),[]),b.useEffect((()=>{k.fetchState==="Completed"&&D()}),[D,k.fetchState]),d.jsx(Bo,{apAgingDetail:k,downloadParams:c,reportDate:u,analytics:T,onTransactionClick:P,onReload:I,onBackClick:v,onColumnSortConfigChanged:_,updateDownloadStateHandler:x,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),os=()=>{const e=z(),a=J(),t=S((_=>In(_))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=se({mobileExploreReferrer:"AP Aging"});Xe({isDataReady:t.fetchState==="Completed"});const r=V.getSignedInUser(),s=S((_=>_.tenantState.currentTenantId)),i=S((_=>L(_))),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(gt(h))}),[]);b.useEffect((()=>{f()}),[]);const c=b.useCallback((()=>{a("../",{relative:"path"})}),[]),u=b.useCallback((_=>{e(Qe({searchString:_}))}),[]),C=b.useCallback(((_,x)=>{e(Qe({sortKey:x,sortOrder:_}))}),[]),g=b.useCallback((_=>{a(`./${_}/${h.format(Q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[h]),k=b.useCallback((_=>{e(Qe({downloadState:_}))}),[]),I=b.useCallback(((_,x)=>{}),[]),v=b.useCallback(((_,x)=>{e(Qe({selectedDate:_,agingDateSelectionType:x})),e(gt(_))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ye,{analytics:T,onLoad:_=>_.trackPageLoaded(N.Event.agingReport,"AP Aging")}):null,d.jsx(wa,{uiState:t.apAgingUIState,report:t,downloadParams:p,analytics:T,onReloadReport:f,onBackClick:c,onSearchTextChange:u,onSortOrderChange:C,onEntityNameClick:g,updateDownloadStateHandler:k,onSelectedDateChanged:v,onNodeCollapseToggled:I,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},ss=La((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=q(),s=V.getSignedInUser(),i=S((D=>L(D))),{tenantEmailDomain:l}=q(),m=W(),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=J(),g=S((D=>En(D,c,o))),k=b.useCallback((()=>{o!=null&&g.fetchState!=="In-Progress"&&g.fetchState!=="Completed"&&u(Tn(o,c))}),[c]),I=b.useCallback((()=>{C("../../",{relative:"path"})}),[]),v=b.useCallback(((D,E)=>{u(Yt({sortKey:D,sortOrder:E}))}),[]),_=b.useCallback((D=>{u(Yt({downloadState:D}))}),[]),x=b.useCallback((D=>{if(e)e(D.transactionId,D.transactionType);else if(l!=null){const E=Va({id:D.transactionId,type:D.transactionType},l);C(E);const B=j(m.state?.pathnameStackToGoBack,m.pathname);C(E,{state:{pathnameStackToGoBack:B}})}}),[l,e]),P=b.useCallback((()=>{g.customer!=null&&T.trackArAgingDetail("AR Aging",c.format(Q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),g.customer.id,g.customer.name)}),[g.customer,c]);return b.useEffect((()=>{k()}),[]),b.useEffect((()=>{g.fetchState==="Completed"&&P()}),[g.fetchState,P]),d.jsx(Mo,{arAgingDetail:g,downloadParams:f,reportDate:c,analytics:T,onTransactionClick:x,onReload:k,onBackClick:I,onColumnSortConfigChanged:v,updateDownloadStateHandler:_,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),rs=()=>{const e=z(),a=J(),t=S((v=>xn(v))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=se({mobileExploreReferrer:"AR Aging"});Xe({isDataReady:t.fetchState==="Completed"});const r=V.getSignedInUser(),s=S((v=>L(v))),i=s.companyName,l={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},m=b.useMemo((()=>({authParams:l,companyName:i,downloadEndPoint:`${oe}/agingReport`,timezone:We()})),[]),p=t.arAgingUIState.selectedDate??Ee(),h=b.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(bt(p))}),[]);b.useEffect((()=>{h()}),[]);const f=b.useCallback((()=>{a("../",{relative:"path"})}),[]),c=b.useCallback((v=>{e(Ze({searchString:v}))}),[]),u=b.useCallback(((v,_)=>{e(Ze({sortKey:_,sortOrder:v}))}),[]),C=b.useCallback((v=>{a(`./${v}/${p.format(Q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[p]),g=b.useCallback((v=>{e(Ze({downloadState:v}))}),[]),k=b.useCallback(((v,_)=>{e(Ze({selectedDate:v,agingDateSelectionType:_})),e(bt(v))}),[]),I=b.useCallback(((v,_)=>{e(Dn({nodeId:v,isCollapsed:_}))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ye,{analytics:T,onLoad:v=>v.trackPageLoaded(N.Event.agingReport,"AR Aging")}):null,d.jsx(wa,{uiState:t.arAgingUIState,report:t,downloadParams:m,analytics:T,onReloadReport:h,onBackClick:f,onSearchTextChange:c,onSortOrderChange:u,onEntityNameClick:C,updateDownloadStateHandler:g,onSelectedDateChanged:k,onNodeCollapseToggled:I,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Ya=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function Ga(e,a){const t=Pn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=Pe(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=j(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(On(n,o))}}}const is=ne((function(e){const a=wn(e).accountsInOrder.map(((t,n)=>Ya(t,n)));return{sectionTitle:Q.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,fetchState:e.cashBalanceState.fetchState,analytics:T}}),Ga)(Pa),cs=ne((function(e){const a=Fn(e).accountsInOrder.map(((o,r)=>Ya(o,r))),t=V.getSignedInUser(),n=Je(t);return{sectionTitle:Q.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:T}}),Ga)(Pa);function ls(){const e=J(),a=W(),{tenantEmailDomain:t}=q(),n=S((o=>L(o).company?.companyInfo.firstMonthOfFY??1));return S((o=>o.cashBalanceState.fetchState))==="Error"?d.jsx(Be,{}):d.jsx(is,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,firstMonthOfFY:n})}function ds(){const e=J(),a=W(),{tenantEmailDomain:t}=q(),n=S((o=>L(o).company?.companyInfo.firstMonthOfFY??1));return S((o=>o.cardBalanceState.fetchState))==="Error"?d.jsx(Be,{}):d.jsx(cs,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,firstMonthOfFY:n})}const us=xt.div`
1
+ import{j as d}from"./liveblocks-y3zMPGKB.js";import{i as q,j as S,g as W,u as z,h as J,l as ne,k as oa,n as ft,o as F,N as yn}from"./core-BwK6FGJd.js";import{fE as L,VE as We,bE as sa,br as Ee,W$ as vn,k9 as An,X0 as Xt,X1 as In,kc as gt,X2 as Qe,X3 as En,kh as Tn,X4 as Yt,X5 as xn,kl as bt,X6 as Ze,X7 as Dn,X8 as wn,VY as Pn,ln as On,X9 as Fn,bn as Je,Xa as ra,WC as ue,bc as ia,lB as ca,lk as la,WE as me,WD as ae,fD as da,g9 as jn,gp as Ct,Xb as Rn,Xc as Bn,Xd as ua,Xe as Oe,DO as Me,DP as Ue,Eb as Te,E5 as pe,DT as Le,Xf as Mn,b$ as Ve,Xg as Un,Xh as Ln,Xi as ma,Xj as Fe,Xk as Vn,eh as et,z$ as pa,Xl as Xn,Xm as ha,Xn as Yn,Xo as Gn,Xp as Nn,Xq as _t,UA as kt,u5 as xe,l_ as De,El as yt,A6 as $n,Ad as zn,Xr as Kn,Xs as qn,DQ as Gt,Xt as Qn,A2 as Ae,zZ as fa,Xu as be,Xv as Nt,Xw as Zn,Xx as vt,Uz as At,Ca as ga,Xy as Hn,Xz as ba,XA as Wn,XB as Jn,XC as eo,XD as It,Cp as to,Cw as ao,XE as no,XF as oo,DS as $t,XG as so,C8 as Ca,XH as Ce,XI as zt,XJ as ro,bq as Sa,Eq as _a,XK as io,XL as ka,XM as co,XN as lo,XO as uo,XP as Et,Ei as mo,Ek as po,XQ as ho,XR as fo,DR as Kt,XS as go,Eo as ya,XT as Se,XU as qt,XV as bo,XW as Co,XX as va,lP as Aa,pW as Ia,lU as Ea,pU as Ta,pT as xa,pS as Da,Bx as So,db as _o,pP as ko,TX as yo,q4 as vo,XY as Ao,XZ as Io,X_ as Eo,b5 as Tt,p_ as To,ib as xo,gH as Do,pZ as wo,ld as Po,pX as Oo,pV as Fo,dZ as jo,dY as Ro}from"./zeni-epic-state-BugXGzus.js";import{z as V,av as oe,p as j,k as T,G as Q,bb as Bo,as as Xe,a8 as Ye,bc as wa,T as N,bd as Mo,be as Pa,E as Uo,bf as Lo,bg as Vo,a as Oa,a1 as Fa,e as ja,ar as Xo,bh as Yo,ao as Go,O as we,bi as Ra,x as ce,bj as Ba,bk as Ma,au as Ua,bl as No,ai as Ge,U as Ne,c as X,bm as $o,B as zo,j as Ko,a4 as qo,aq as Qo,bn as Zo,bo as Ho,bp as Wo,bq as Ie}from"./index-CavSpTx-.js";import{n as xt}from"./mui-CxIkaR9n.js";import{a as b}from"./sentry-Jm7O5sR0.js";import{w as La}from"./withTransactionSidePanel-tINIzPX1.js";import{c as Va,t as Pe,f as he,b as Dt,a as wt,v as Jo}from"./routePaths-D5zGcGZG.js";import{u as se}from"./useAskAiCfoHostNavButtonProps-DQ3F86Nw.js";import Be from"./NotFoundScreen-Duy6T6m3.js";import{u as Pt}from"./useInitialThreadRequest-BRvCrjqu.js";import{t as Xa}from"./analyticsHelper-sj9huSc9.js";import{C as es}from"./CompanyPassportScreen-D55YyxAR.js";import{u as ts}from"./useAiCfoDashboardSuggestedQuestionsChips-B8_gxBhe.js";import{F as as}from"./FeaturePreviewScreen-DFQePQma.js";import"./recharts-CoAMGh71.js";import"./analytics-BTvt2K3S.js";import"./plaid-CQqwPn97.js";import"./dnd-Cbdx7tVf.js";import"./stripe-cKAAJElX.js";import"./lottie-BQlGSG2c.js";import"./lexical-DRfKJLK3.js";import"./pdf-DGzvSuDl.js";import"./utils-BVIT21dc.js";import"./TransactionDetailScreen-C2_EB_46.js";import"./decodeURIComponentSafe-iAavL6tS.js";import"./expenseAutomationHelper-MxNxlZNN.js";import"./stripSplatSuffix-nQAZVh5Z.js";import"./MobileAppDrawer-Ce8Zx46w.js";import"./InboxNotificationsProvider-ozJWRqdQ.js";import"./useTaskManagerAccess-B9_LRJIF.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]="2e7dc61e-6d15-49bd-aa16-a100e5737ff6",e._sentryDebugIdIdentifier="sentry-dbid-2e7dc61e-6d15-49bd-aa16-a100e5737ff6")}catch{}})();const ns=La((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=q(),s=V.getSignedInUser(),i=S((E=>E.tenantState.currentTenantId)),l=S((E=>L(E))),{tenantEmailDomain:m}=q(),p=W(),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=J(),k=S((E=>vn(E,u,o))),I=b.useCallback((()=>{o!=null&&k.fetchState!=="In-Progress"&&k.fetchState!=="Completed"&&C(An(o,u))}),[u]),v=b.useCallback((()=>{g("../../",{relative:"path"})}),[]),_=b.useCallback(((E,B)=>{C(Xt({sortKey:E,sortOrder:B}))}),[]),x=b.useCallback((E=>{C(Xt({downloadState:E}))}),[]),P=b.useCallback((E=>{if(e)e(E.transactionId,E.transactionType);else if(m!=null){const B=Va({id:E.transactionId,type:E.transactionType},m);g(B);const y=j(p.state?.pathnameStackToGoBack,p.pathname);g(B,{state:{pathnameStackToGoBack:y}})}}),[m,e]),D=b.useCallback((()=>{k.vendor!=null&&T.trackApAgingDetail("AP Aging",u.format(Q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),k.vendor.id,k.vendor.name)}),[k.vendor,u]);return b.useEffect((()=>{I()}),[]),b.useEffect((()=>{k.fetchState==="Completed"&&D()}),[D,k.fetchState]),d.jsx(Bo,{apAgingDetail:k,downloadParams:c,reportDate:u,analytics:T,onTransactionClick:P,onReload:I,onBackClick:v,onColumnSortConfigChanged:_,updateDownloadStateHandler:x,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),os=()=>{const e=z(),a=J(),t=S((_=>In(_))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=se({mobileExploreReferrer:"AP Aging"});Xe({isDataReady:t.fetchState==="Completed"});const r=V.getSignedInUser(),s=S((_=>_.tenantState.currentTenantId)),i=S((_=>L(_))),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(gt(h))}),[]);b.useEffect((()=>{f()}),[]);const c=b.useCallback((()=>{a("../",{relative:"path"})}),[]),u=b.useCallback((_=>{e(Qe({searchString:_}))}),[]),C=b.useCallback(((_,x)=>{e(Qe({sortKey:x,sortOrder:_}))}),[]),g=b.useCallback((_=>{a(`./${_}/${h.format(Q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[h]),k=b.useCallback((_=>{e(Qe({downloadState:_}))}),[]),I=b.useCallback(((_,x)=>{}),[]),v=b.useCallback(((_,x)=>{e(Qe({selectedDate:_,agingDateSelectionType:x})),e(gt(_))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ye,{analytics:T,onLoad:_=>_.trackPageLoaded(N.Event.agingReport,"AP Aging")}):null,d.jsx(wa,{uiState:t.apAgingUIState,report:t,downloadParams:p,analytics:T,onReloadReport:f,onBackClick:c,onSearchTextChange:u,onSortOrderChange:C,onEntityNameClick:g,updateDownloadStateHandler:k,onSelectedDateChanged:v,onNodeCollapseToggled:I,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},ss=La((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=q(),s=V.getSignedInUser(),i=S((D=>L(D))),{tenantEmailDomain:l}=q(),m=W(),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=J(),g=S((D=>En(D,c,o))),k=b.useCallback((()=>{o!=null&&g.fetchState!=="In-Progress"&&g.fetchState!=="Completed"&&u(Tn(o,c))}),[c]),I=b.useCallback((()=>{C("../../",{relative:"path"})}),[]),v=b.useCallback(((D,E)=>{u(Yt({sortKey:D,sortOrder:E}))}),[]),_=b.useCallback((D=>{u(Yt({downloadState:D}))}),[]),x=b.useCallback((D=>{if(e)e(D.transactionId,D.transactionType);else if(l!=null){const E=Va({id:D.transactionId,type:D.transactionType},l);C(E);const B=j(m.state?.pathnameStackToGoBack,m.pathname);C(E,{state:{pathnameStackToGoBack:B}})}}),[l,e]),P=b.useCallback((()=>{g.customer!=null&&T.trackArAgingDetail("AR Aging",c.format(Q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),g.customer.id,g.customer.name)}),[g.customer,c]);return b.useEffect((()=>{k()}),[]),b.useEffect((()=>{g.fetchState==="Completed"&&P()}),[g.fetchState,P]),d.jsx(Mo,{arAgingDetail:g,downloadParams:f,reportDate:c,analytics:T,onTransactionClick:x,onReload:k,onBackClick:I,onColumnSortConfigChanged:v,updateDownloadStateHandler:_,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),rs=()=>{const e=z(),a=J(),t=S((v=>xn(v))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=se({mobileExploreReferrer:"AR Aging"});Xe({isDataReady:t.fetchState==="Completed"});const r=V.getSignedInUser(),s=S((v=>L(v))),i=s.companyName,l={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},m=b.useMemo((()=>({authParams:l,companyName:i,downloadEndPoint:`${oe}/agingReport`,timezone:We()})),[]),p=t.arAgingUIState.selectedDate??Ee(),h=b.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(bt(p))}),[]);b.useEffect((()=>{h()}),[]);const f=b.useCallback((()=>{a("../",{relative:"path"})}),[]),c=b.useCallback((v=>{e(Ze({searchString:v}))}),[]),u=b.useCallback(((v,_)=>{e(Ze({sortKey:_,sortOrder:v}))}),[]),C=b.useCallback((v=>{a(`./${v}/${p.format(Q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[p]),g=b.useCallback((v=>{e(Ze({downloadState:v}))}),[]),k=b.useCallback(((v,_)=>{e(Ze({selectedDate:v,agingDateSelectionType:_})),e(bt(v))}),[]),I=b.useCallback(((v,_)=>{e(Dn({nodeId:v,isCollapsed:_}))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ye,{analytics:T,onLoad:v=>v.trackPageLoaded(N.Event.agingReport,"AR Aging")}):null,d.jsx(wa,{uiState:t.arAgingUIState,report:t,downloadParams:m,analytics:T,onReloadReport:h,onBackClick:f,onSearchTextChange:c,onSortOrderChange:u,onEntityNameClick:C,updateDownloadStateHandler:g,onSelectedDateChanged:k,onNodeCollapseToggled:I,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Ya=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function Ga(e,a){const t=Pn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=Pe(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=j(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(On(n,o))}}}const is=ne((function(e){const a=wn(e).accountsInOrder.map(((t,n)=>Ya(t,n)));return{sectionTitle:Q.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,fetchState:e.cashBalanceState.fetchState,analytics:T}}),Ga)(Pa),cs=ne((function(e){const a=Fn(e).accountsInOrder.map(((o,r)=>Ya(o,r))),t=V.getSignedInUser(),n=Je(t);return{sectionTitle:Q.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:T}}),Ga)(Pa);function ls(){const e=J(),a=W(),{tenantEmailDomain:t}=q(),n=S((o=>L(o).company?.companyInfo.firstMonthOfFY??1));return S((o=>o.cashBalanceState.fetchState))==="Error"?d.jsx(Be,{}):d.jsx(is,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,firstMonthOfFY:n})}function ds(){const e=J(),a=W(),{tenantEmailDomain:t}=q(),n=S((o=>L(o).company?.companyInfo.firstMonthOfFY??1));return S((o=>o.cardBalanceState.fetchState))==="Error"?d.jsx(Be,{}):d.jsx(cs,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,firstMonthOfFY:n})}const us=xt.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-y3zMPGKB.js";import{a as u}from"./sentry-Jm7O5sR0.js";import{u as y,j as b,l as w,g as A,N as k}from"./core-BwK6FGJd.js";import{TG as N,fE as _,gk as R,TH as U,pR as L,TI as z}from"./zeni-epic-state-BugXGzus.js";import{u as j,z as f,L as C,t as I,G as O,b as $}from"./index-DTZt8DRK.js";import"./mui-CxIkaR9n.js";import{t as G}from"./getLocaleForTenant-DzgzmDle.js";import"./recharts-CoAMGh71.js";import"./analytics-BTvt2K3S.js";import"./plaid-CQqwPn97.js";import"./dnd-Cbdx7tVf.js";import"./stripe-cKAAJElX.js";import"./lottie-BQlGSG2c.js";import"./lexical-DRfKJLK3.js";import"./pdf-DGzvSuDl.js";import"./utils-BVIT21dc.js";(function(){try{var 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]="b39cba71-7dc3-417c-bc50-f372249cb116",t._sentryDebugIdIdentifier="sentry-dbid-b39cba71-7dc3-417c-bc50-f372249cb116")}catch{}})();const P=w((function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}}))((function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=A(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map((l=>l.tenantEmailDomain)),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,S=null;const T=E(r.pathname);if(T!=null)c=`../${o.tenantEmailDomain}/${T}`,m="comingFromV2UrlPath",T==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce(((l,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(k,{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(C.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)}),[a,n]),u.useEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&I.shouldFetchActiveTenant(e)&&(h.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(C.TENANT_FETCHING),t(R(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"&&!U(i))&&t(L(e.userId)))}),[n,a,i,d,t]),u.useEffect((()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())}),[m.tenantsCoreDetailsInOrder,n]),u.useEffect((()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(O.updateAppLocaleID(G(c)),o())}),[n,a,c]),v.jsx(P,{})}const H=["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 H)if(t.toLocaleLowerCase().includes(s))return Q[s]}export{oe as default};
1
+ import{j as v}from"./liveblocks-y3zMPGKB.js";import{a as u}from"./sentry-Jm7O5sR0.js";import{u as y,j as b,l as w,g as A,N as k}from"./core-BwK6FGJd.js";import{TG as N,fE as _,gk as R,TH as U,pR as L,TI as z}from"./zeni-epic-state-BugXGzus.js";import{u as j,z as f,L as C,t as I,G as O,b as $}from"./index-CavSpTx-.js";import"./mui-CxIkaR9n.js";import{t as G}from"./getLocaleForTenant-B-DdN2Lw.js";import"./recharts-CoAMGh71.js";import"./analytics-BTvt2K3S.js";import"./plaid-CQqwPn97.js";import"./dnd-Cbdx7tVf.js";import"./stripe-cKAAJElX.js";import"./lottie-BQlGSG2c.js";import"./lexical-DRfKJLK3.js";import"./pdf-DGzvSuDl.js";import"./utils-BVIT21dc.js";(function(){try{var 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]="b39cba71-7dc3-417c-bc50-f372249cb116",t._sentryDebugIdIdentifier="sentry-dbid-b39cba71-7dc3-417c-bc50-f372249cb116")}catch{}})();const P=w((function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}}))((function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=A(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map((l=>l.tenantEmailDomain)),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,S=null;const T=E(r.pathname);if(T!=null)c=`../${o.tenantEmailDomain}/${T}`,m="comingFromV2UrlPath",T==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce(((l,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(k,{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(C.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)}),[a,n]),u.useEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&I.shouldFetchActiveTenant(e)&&(h.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(C.TENANT_FETCHING),t(R(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"&&!U(i))&&t(L(e.userId)))}),[n,a,i,d,t]),u.useEffect((()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())}),[m.tenantsCoreDetailsInOrder,n]),u.useEffect((()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(O.updateAppLocaleID(G(c)),o())}),[n,a,c]),v.jsx(P,{})}const H=["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 H)if(t.toLocaleLowerCase().includes(s))return Q[s]}export{oe as default};
@@ -1,4 +1,4 @@
1
- import{j as l}from"./liveblocks-y3zMPGKB.js";import{h as w,g as C,j as h,l as E,i as D}from"./core-BwK6FGJd.js";import{YE as k,YL as _,gF as J,gE as M,gD as W,kO as K,WD as L,uJ as q,fE as V,Yb as B,kM as F,YF as S,YO as T,kK as G,l5 as j}from"./zeni-epic-state-BugXGzus.js";import{bM as Q,a1 as N,O as R,z as O,E as U,a4 as p,c as v,a7 as Y,bN as X,J as Z,bO as ee,p as te}from"./index-DTZt8DRK.js";import{n as z}from"./mui-CxIkaR9n.js";import"./sentry-Jm7O5sR0.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]="a070e0d8-c3d0-43bc-a395-51a69c98b788",e._sentryDebugIdIdentifier="sentry-dbid-a070e0d8-c3d0-43bc-a395-51a69c98b788")}catch{}})();const ae=E(null,(function(e,t){return{onSaveVendor:a=>{e(K(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(L("common")),a!=null&&e(q(a))},onGetOtp:a=>{e(W(a,"BillPayVendor"))},onResendOtp:a=>{e(M(a,"BillPayVendor"))},onVerifyOtp:(a,n)=>{e(J(a,n,"BillPayVendor"))},onVerifyOtpSuccess:(a,n,o)=>{e(_(a,n,o))}}}))(Q);function H({vendorId:e,billId:t,isExpressPayPage:a}){const n=w(),o=C(),s=h((r=>k(r,e)));return l.jsx(ae,{location:o,navigate:n,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:a??!1})}const ne=z.div`
1
+ import{j as l}from"./liveblocks-y3zMPGKB.js";import{h as w,g as C,j as h,l as E,i as D}from"./core-BwK6FGJd.js";import{YE as k,YL as _,gF as J,gE as M,gD as W,kO as K,WD as L,uJ as q,fE as V,Yb as B,kM as F,YF as S,YO as T,kK as G,l5 as j}from"./zeni-epic-state-BugXGzus.js";import{bM as Q,a1 as N,O as R,z as O,E as U,a4 as p,c as v,a7 as Y,bN as X,J as Z,bO as ee,p as te}from"./index-CavSpTx-.js";import{n as z}from"./mui-CxIkaR9n.js";import"./sentry-Jm7O5sR0.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]="a070e0d8-c3d0-43bc-a395-51a69c98b788",e._sentryDebugIdIdentifier="sentry-dbid-a070e0d8-c3d0-43bc-a395-51a69c98b788")}catch{}})();const ae=E(null,(function(e,t){return{onSaveVendor:a=>{e(K(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(L("common")),a!=null&&e(q(a))},onGetOtp:a=>{e(W(a,"BillPayVendor"))},onResendOtp:a=>{e(M(a,"BillPayVendor"))},onVerifyOtp:(a,n)=>{e(J(a,n,"BillPayVendor"))},onVerifyOtpSuccess:(a,n,o)=>{e(_(a,n,o))}}}))(Q);function H({vendorId:e,billId:t,isExpressPayPage:a}){const n=w(),o=C(),s=h((r=>k(r,e)));return l.jsx(ae,{location:o,navigate:n,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:a??!1})}const ne=z.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{j as i}from"./liveblocks-y3zMPGKB.js";import{a1 as c,ab as l,E as f}from"./index-DTZt8DRK.js";import{D as p}from"./mui-CxIkaR9n.js";import"./sentry-Jm7O5sR0.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]="c06e3c71-2cdd-4b4c-9d6d-3f270023e5b2",e._sentryDebugIdIdentifier="sentry-dbid-c06e3c71-2cdd-4b4c-9d6d-3f270023e5b2")}catch{}})();const b={drawerLeftMargin:new l(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:d}=e,n=c(),s=o?.valuePx(n)??b.drawerLeftMargin.valuePx(n),a=f();return i.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.8,cursor:"pointer"}}},onClose:d,children:t})}export{h as D};
1
+ import{j as i}from"./liveblocks-y3zMPGKB.js";import{a1 as c,ab as l,E as f}from"./index-CavSpTx-.js";import{D as p}from"./mui-CxIkaR9n.js";import"./sentry-Jm7O5sR0.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]="c06e3c71-2cdd-4b4c-9d6d-3f270023e5b2",e._sentryDebugIdIdentifier="sentry-dbid-c06e3c71-2cdd-4b4c-9d6d-3f270023e5b2")}catch{}})();const b={drawerLeftMargin:new l(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:d}=e,n=c(),s=o?.valuePx(n)??b.drawerLeftMargin.valuePx(n),a=f();return i.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.8,cursor:"pointer"}}},onClose:d,children:t})}export{h as D};
@@ -1 +1 @@
1
- import{j as s}from"./liveblocks-y3zMPGKB.js";import{a as d}from"./sentry-Jm7O5sR0.js";import{h as B,u as A,g as G,i as _,j as c,N as q,l as F,n as R,o as N}from"./core-BwK6FGJd.js";import{WH as M,fE as O,VZ as $,m_ as H,R_ as k,WM as V,WC as Y,l_ as z,R$ as S,W2 as Z,W3 as J,WE as K,WD as L}from"./zeni-epic-state-BugXGzus.js";import{b8 as Q,k as U,a4 as X,p as tt}from"./index-DTZt8DRK.js";import"./mui-CxIkaR9n.js";import{d as b}from"./decodeURIComponentSafe-iAavL6tS.js";import{w as et}from"./withTransactionSidePanel-Cd_M2p_z.js";import{f as at,c as nt}from"./routePaths-CPqwWbPN.js";import"./recharts-CoAMGh71.js";import"./analytics-BTvt2K3S.js";import"./plaid-CQqwPn97.js";import"./dnd-Cbdx7tVf.js";import"./stripe-cKAAJElX.js";import"./lottie-BQlGSG2c.js";import"./lexical-DRfKJLK3.js";import"./pdf-DGzvSuDl.js";import"./utils-BVIT21dc.js";import"./useAskAiCfoHostNavButtonProps-DzjGv8Xy.js";import"./TransactionDetailScreen-DA_15rvE.js";import"./useInitialThreadRequest-BWyM3F-W.js";import"./expenseAutomationHelper-MxNxlZNN.js";import"./stripSplatSuffix-nQAZVh5Z.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]="72737838-9916-4c40-875b-c7c2dbcda324",a._sentryDebugIdIdentifier="sentry-dbid-72737838-9916-4c40-875b-c7c2dbcda324")}catch{}})();const ot=F((function(a,t){const e=t.entity,o=V(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:Y(a,"common")},trendWithTransactionsReport:o,analytics:U,isAccountingClassesEnabled:z(a)}}),(function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,l=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:l}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(K({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(L("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(Z()),a(J()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=X(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??I();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(k(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(Q),it=et((function({entityType:a,...t}){const e=B(),o=A(),l=G(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:W,entityNameEncoded:w}=_(),r=b(W??""),p=b(w??""),u=rt(r,p),x=[r,p].filter((n=>n!=null)),i={name:p,id:r,type:a,zeniId:r,qboId:r},E=c((n=>M(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),j=c((n=>O(n).company?.companyInfo.firstMonthOfFY??1)),f=c((n=>$(n.trendWithTransactionsState,i,"EntityDetail")));d.useEffect((()=>{m===!1&&u===!0&&(T(!0),o(H(i)))}),[m,u,i]);const g=c((n=>n.trendState.fetchState)),P=f?.selectedPeriod?.timePeriod??E,v=(function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y})(f?.selectedPeriod?.timePeriod,E);return d.useEffect((()=>{m===!0&&h===!1&&g==="Completed"&&(D(!0),P!=null&&o(k(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))}),[m,h,g]),u?s.jsx(ot,{firstMonthOfFY:j,tenantEmailDomain:C,location:l,navigate:e,entity:i,defaultTransactionTimePeriod:v,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(q,{to:I(x.length)})})),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,I=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function jt({entityType:a}){return s.jsx(R,{children:s.jsx(N,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{jt as EntityDetailRoutes,jt as default};
1
+ import{j as s}from"./liveblocks-y3zMPGKB.js";import{a as d}from"./sentry-Jm7O5sR0.js";import{h as B,u as A,g as G,i as _,j as c,N as q,l as F,n as R,o as N}from"./core-BwK6FGJd.js";import{WH as M,fE as O,VZ as $,m_ as H,R_ as k,WM as V,WC as Y,l_ as z,R$ as S,W2 as Z,W3 as J,WE as K,WD as L}from"./zeni-epic-state-BugXGzus.js";import{b8 as Q,k as U,a4 as X,p as tt}from"./index-CavSpTx-.js";import"./mui-CxIkaR9n.js";import{d as b}from"./decodeURIComponentSafe-iAavL6tS.js";import{w as et}from"./withTransactionSidePanel-tINIzPX1.js";import{f as at,c as nt}from"./routePaths-D5zGcGZG.js";import"./recharts-CoAMGh71.js";import"./analytics-BTvt2K3S.js";import"./plaid-CQqwPn97.js";import"./dnd-Cbdx7tVf.js";import"./stripe-cKAAJElX.js";import"./lottie-BQlGSG2c.js";import"./lexical-DRfKJLK3.js";import"./pdf-DGzvSuDl.js";import"./utils-BVIT21dc.js";import"./useAskAiCfoHostNavButtonProps-DQ3F86Nw.js";import"./TransactionDetailScreen-C2_EB_46.js";import"./useInitialThreadRequest-BRvCrjqu.js";import"./expenseAutomationHelper-MxNxlZNN.js";import"./stripSplatSuffix-nQAZVh5Z.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]="72737838-9916-4c40-875b-c7c2dbcda324",a._sentryDebugIdIdentifier="sentry-dbid-72737838-9916-4c40-875b-c7c2dbcda324")}catch{}})();const ot=F((function(a,t){const e=t.entity,o=V(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:Y(a,"common")},trendWithTransactionsReport:o,analytics:U,isAccountingClassesEnabled:z(a)}}),(function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,l=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:l}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(K({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(L("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(Z()),a(J()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=X(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??I();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(k(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(Q),it=et((function({entityType:a,...t}){const e=B(),o=A(),l=G(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:W,entityNameEncoded:w}=_(),r=b(W??""),p=b(w??""),u=rt(r,p),x=[r,p].filter((n=>n!=null)),i={name:p,id:r,type:a,zeniId:r,qboId:r},E=c((n=>M(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),j=c((n=>O(n).company?.companyInfo.firstMonthOfFY??1)),f=c((n=>$(n.trendWithTransactionsState,i,"EntityDetail")));d.useEffect((()=>{m===!1&&u===!0&&(T(!0),o(H(i)))}),[m,u,i]);const g=c((n=>n.trendState.fetchState)),P=f?.selectedPeriod?.timePeriod??E,v=(function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y})(f?.selectedPeriod?.timePeriod,E);return d.useEffect((()=>{m===!0&&h===!1&&g==="Completed"&&(D(!0),P!=null&&o(k(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))}),[m,h,g]),u?s.jsx(ot,{firstMonthOfFY:j,tenantEmailDomain:C,location:l,navigate:e,entity:i,defaultTransactionTimePeriod:v,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(q,{to:I(x.length)})})),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,I=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function jt({entityType:a}){return s.jsx(R,{children:s.jsx(N,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{jt as EntityDetailRoutes,jt as default};
@@ -1,4 +1,4 @@
1
- import{j as I}from"./liveblocks-y3zMPGKB.js";import{u as he,h as nt,g as be,j as F,i as Ue,t as qn,l as Jn,n as Wn,o as He,N as Yn}from"./core-BwK6FGJd.js";import{fE as ke,a0Q as Hn,p$ as _e,TZ as Kn,zU as Qn,a0R as Zn,a0S as Xn,a0T as es,a0U as gt,a0V as Qe,gg as bt,a0W as oa,eV as ts,f$ as as,a0X as ca,a0Y as Ze,qS as ns,uM as ss,gR as os,gP as cs,a0Z as is,r3 as ls,rc as rs,qa as ds,qo as xa,gO as re,gQ as us,a0_ as ms,qK as wa,rd as ps,ql as hs,qg as Ss,uS as gs,gN as Me,a0$ as tt,C2 as Ra,Mj as Da,a10 as Fa,Fl as _a,a11 as Cs,eY as Is,e_ as fs,sO as Tt,WI as ia,WK as ks,m1 as bs,WL as Ts,m8 as Ps,dk as ys,Dl as Pt,a12 as Es,a13 as vs,fl as yt,sC as la,WC as As,a14 as xs,a15 as ws,ma as Rs,a16 as Ds,Q$ as Fs,m9 as _s,l_ as Ms,qD as Ma,ri as at,to as Oa,tK as Os,TP as Ua,rh as ra,rk as Ba,rm as Us,bE as Bs,nx as Vs,nu as js,rl as Xe,rj as pe,a17 as zs,rD as da,a18 as Ls,a19 as $s,sG as Gs,sH as Ns,Wy as qs,VE as Js,a0i as Ws,a1a as Ys,WE as ua,WD as Ke,a1b as ma,mp as Hs,a1c as Ks,a1d as Qs,a1e as Zs,a1f as Xs,qy as eo,a1g as to,a1h as ao,a1i as no,rt as so,mc as oo,m3 as co,a1j as io,mb as pa,WV as lo,a1k as ro,a1l as uo,un as mo,t_ as po,tZ as Ct,a1m as ho,a1n as So,a1o as go,a1p as Co,nI as Io,br as fo,nD as ha,np as ko,a1q as bo,g_ as To,nA as Po,sQ as yo,sS as Eo,sz as vo,VH as Ao,VI as xo,EP as wo,EO as Ro,F3 as Do,a1r as Sa,sF as Fo,a1s as _o,rT as Mo,rZ as Oo,s8 as Uo,rW as Bo,a1t as Vo,s7 as jo,sL as zo,a1u as Lo,sY as $o,st as Go,t1 as No,sy as qo,rE as Jo,a1v as Wo,qW as Yo,qu as Ho,qB as ga,ro as Ko,a1w as Qo,a1x as Zo,a1y as Xo,a1z as ec,a1A as tc,a1B as ac,t5 as nc,a1C as sc,a1D as oc,a1E as Ca,uy as cc,tR as ic,tG as Ia,tE as lc,a1F as rc,tt as dc,t8 as uc,tH as mc,a1G as pc,a1H as hc,te as Sc,a1I as gc,t9 as Cc,td as Ic,tb as fc,tN as kc}from"./zeni-epic-state-BugXGzus.js";import Va from"./NotFoundScreen-DVcHaqdZ.js";import{a as s,R as ja}from"./sentry-Jm7O5sR0.js";import{n as Te,S as bc}from"./mui-CxIkaR9n.js";import{O as Be,c as H,k as Z,p as te,aq as za,as as La,dQ as Tc,dR as Pc,z as st,dS as yc,dT as Ec,dU as vc,ae as Oe,dV as Ac,dW as fa,ba as ka,dX as xc,a7 as $a,dY as wc,j as et,a as Rc,dZ as Dc,d_ as Fc,$ as _c,U as Mc,d$ as Oc,e0 as Uc,e1 as Bc,b4 as Vc,br as jc,ab as zc,b5 as Lc,b6 as $c,G as Gc,w as Nc,e2 as qc,av as ba,e3 as Jc}from"./index-DTZt8DRK.js";import{u as Ga}from"./useAskAiCfoHostNavButtonProps-DzjGv8Xy.js";import{g as Ta,b as Wc,c as Yc,h as Hc,a as Kc,i as Qc,r as Zc,C as Xc}from"./TransactionDetailScreen-DA_15rvE.js";import{u as ei}from"./useActualMatchingMatchDetail-Asb0lSO5.js";import{d as ti}from"./decodeURIComponentSafe-iAavL6tS.js";import{m as Na,a as qa}from"./expenseAutomationHelper-MxNxlZNN.js";import{u as Ja,a as Wa,w as ai}from"./withTransactionSidePanel-Cd_M2p_z.js";import{b as ni,S as si,a as oi,J as ci}from"./ScheduleDetailsPrepaidExpensesScreen-YdcDOaAu.js";import{s as Pa,i as Ya,h as ii,v as li,c as ri}from"./routePaths-CPqwWbPN.js";import{a as It}from"./accountMappingHelper-CQrmB6jj.js";import{D as di}from"./DrawerScreen-DQY8vrlv.js";import"./recharts-CoAMGh71.js";import"./analytics-BTvt2K3S.js";import"./plaid-CQqwPn97.js";import"./dnd-Cbdx7tVf.js";import"./stripe-cKAAJElX.js";import"./lottie-BQlGSG2c.js";import"./lexical-DRfKJLK3.js";import"./pdf-DGzvSuDl.js";import"./utils-BVIT21dc.js";import"./useInitialThreadRequest-BWyM3F-W.js";import"./stripSplatSuffix-nQAZVh5Z.js";import"./pathToGoBack-QMp9zrtx.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]="c346ea2c-d408-4b0b-aa66-6b707019ee0e",t._sentryDebugIdIdentifier="sentry-dbid-c346ea2c-d408-4b0b-aa66-6b707019ee0e")}catch{}})();const ui=()=>{const t=he(),n=nt(),S=be(),g=F((h=>ke(h))),{useFeatureGate:d}=Be(),{isFeatureEnabled:i}=d(H.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=d(H.aiAuditScorePercentage),A=F((h=>h.expenseAutomationViewState.selectedPeriodByTenantId)),l=F((h=>Hn(h,g.tenantId))),{isAiCfoAccessEnabled:b,onAskAiCfoClick:R}=Ga({mobileExploreReferrer:"Month-End Close Overview"}),k=s.useCallback(((h,T,z=!1)=>{t(_e({tenantId:T,period:{month:h.month,year:h.year},refreshViewInBackground:z}))}),[]),C=s.useCallback((h=>{const T=S.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&Z.trackMonthCloseAuditPage(h.month,h.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,T??null),t(Kn(g.tenantId,h))}),[g.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),f=A[g.tenantId],m=s.useCallback((()=>{const h=S.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&Z.trackMonthCloseAuditPage(f.month,f.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,h??null),k(f,g.tenantId,!0)}),[k,f,g.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),_=te(S.state?.pathnameStackToGoBack,S.pathname),x=s.useCallback((()=>{if(l.monthEndCloseChecks!=null&&f!=null){const h=l.monthEndCloseChecks.monthEndCloseCheckList.find((T=>T.progress<100));if(h!=null)return void n(`./${h.id}/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:_,message:"comingFromOverview"}});n(`./month_end_insights/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:_,message:"comingFromOverview"}})}}),[l.monthEndCloseChecks,f]),{areTenantIdsInSync:p}=za();return La({isDataReady:l.fetchState==="Completed"}),s.useEffect((()=>{f!=null&&l.fetchState!=="In-Progress"&&l.fetchState!=="Completed"&&p&&k(f,g.tenantId)}),[k,f,l.fetchState,g.tenantId,p]),s.useEffect((()=>{f!=null&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&p&&t(Qn(f))}),[f,l.monthClosePerformanceTrendFetchStatus.fetchState,p]),s.useEffect((()=>{const h=setInterval((()=>{l.fetchState!=="In-Progress"&&l.fetchState==="Completed"&&m()}),3e5);return()=>clearInterval(h)}),[l.fetchState]),s.useEffect((()=>{if(l.fetchState==="Completed"&&l.monthEndCloseChecks?.auditSummary!=null){const h=S.state?.referrer;Z.trackMonthCloseAuditPage(l.selectedPeriod.month,l.selectedPeriod.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,h??null)}}),[l.fetchState,l.selectedPeriod,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),I.jsx(mi,{children:I.jsx(Tc,{monthEndCloseChecksView:l,isRealtimeInsightsFeatureEnabled:i,onMonthEndCheckClick:h=>{n(`./${h}/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:_,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:C,handleReviewButtonClick:x,onBackClick:()=>{n("../../dashboard")},onReload:m,isAiCfoAccessEnabled:b,onAskAiCfoClick:R,aiAuditScorePercentageEnabled:r})})},mi=Te.div`
1
+ import{j as I}from"./liveblocks-y3zMPGKB.js";import{u as he,h as nt,g as be,j as F,i as Ue,t as qn,l as Jn,n as Wn,o as He,N as Yn}from"./core-BwK6FGJd.js";import{fE as ke,a0Q as Hn,p$ as _e,TZ as Kn,zU as Qn,a0R as Zn,a0S as Xn,a0T as es,a0U as gt,a0V as Qe,gg as bt,a0W as oa,eV as ts,f$ as as,a0X as ca,a0Y as Ze,qS as ns,uM as ss,gR as os,gP as cs,a0Z as is,r3 as ls,rc as rs,qa as ds,qo as xa,gO as re,gQ as us,a0_ as ms,qK as wa,rd as ps,ql as hs,qg as Ss,uS as gs,gN as Me,a0$ as tt,C2 as Ra,Mj as Da,a10 as Fa,Fl as _a,a11 as Cs,eY as Is,e_ as fs,sO as Tt,WI as ia,WK as ks,m1 as bs,WL as Ts,m8 as Ps,dk as ys,Dl as Pt,a12 as Es,a13 as vs,fl as yt,sC as la,WC as As,a14 as xs,a15 as ws,ma as Rs,a16 as Ds,Q$ as Fs,m9 as _s,l_ as Ms,qD as Ma,ri as at,to as Oa,tK as Os,TP as Ua,rh as ra,rk as Ba,rm as Us,bE as Bs,nx as Vs,nu as js,rl as Xe,rj as pe,a17 as zs,rD as da,a18 as Ls,a19 as $s,sG as Gs,sH as Ns,Wy as qs,VE as Js,a0i as Ws,a1a as Ys,WE as ua,WD as Ke,a1b as ma,mp as Hs,a1c as Ks,a1d as Qs,a1e as Zs,a1f as Xs,qy as eo,a1g as to,a1h as ao,a1i as no,rt as so,mc as oo,m3 as co,a1j as io,mb as pa,WV as lo,a1k as ro,a1l as uo,un as mo,t_ as po,tZ as Ct,a1m as ho,a1n as So,a1o as go,a1p as Co,nI as Io,br as fo,nD as ha,np as ko,a1q as bo,g_ as To,nA as Po,sQ as yo,sS as Eo,sz as vo,VH as Ao,VI as xo,EP as wo,EO as Ro,F3 as Do,a1r as Sa,sF as Fo,a1s as _o,rT as Mo,rZ as Oo,s8 as Uo,rW as Bo,a1t as Vo,s7 as jo,sL as zo,a1u as Lo,sY as $o,st as Go,t1 as No,sy as qo,rE as Jo,a1v as Wo,qW as Yo,qu as Ho,qB as ga,ro as Ko,a1w as Qo,a1x as Zo,a1y as Xo,a1z as ec,a1A as tc,a1B as ac,t5 as nc,a1C as sc,a1D as oc,a1E as Ca,uy as cc,tR as ic,tG as Ia,tE as lc,a1F as rc,tt as dc,t8 as uc,tH as mc,a1G as pc,a1H as hc,te as Sc,a1I as gc,t9 as Cc,td as Ic,tb as fc,tN as kc}from"./zeni-epic-state-BugXGzus.js";import Va from"./NotFoundScreen-Duy6T6m3.js";import{a as s,R as ja}from"./sentry-Jm7O5sR0.js";import{n as Te,S as bc}from"./mui-CxIkaR9n.js";import{O as Be,c as H,k as Z,p as te,aq as za,as as La,dQ as Tc,dR as Pc,z as st,dS as yc,dT as Ec,dU as vc,ae as Oe,dV as Ac,dW as fa,ba as ka,dX as xc,a7 as $a,dY as wc,j as et,a as Rc,dZ as Dc,d_ as Fc,$ as _c,U as Mc,d$ as Oc,e0 as Uc,e1 as Bc,b4 as Vc,br as jc,ab as zc,b5 as Lc,b6 as $c,G as Gc,w as Nc,e2 as qc,av as ba,e3 as Jc}from"./index-CavSpTx-.js";import{u as Ga}from"./useAskAiCfoHostNavButtonProps-DQ3F86Nw.js";import{g as Ta,b as Wc,c as Yc,h as Hc,a as Kc,i as Qc,r as Zc,C as Xc}from"./TransactionDetailScreen-C2_EB_46.js";import{u as ei}from"./useActualMatchingMatchDetail-CxpYQNp7.js";import{d as ti}from"./decodeURIComponentSafe-iAavL6tS.js";import{m as Na,a as qa}from"./expenseAutomationHelper-MxNxlZNN.js";import{u as Ja,a as Wa,w as ai}from"./withTransactionSidePanel-tINIzPX1.js";import{b as ni,S as si,a as oi,J as ci}from"./ScheduleDetailsPrepaidExpensesScreen-DAsZ0K0d.js";import{s as Pa,i as Ya,h as ii,v as li,c as ri}from"./routePaths-D5zGcGZG.js";import{a as It}from"./accountMappingHelper-CQrmB6jj.js";import{D as di}from"./DrawerScreen-BKD3lmi2.js";import"./recharts-CoAMGh71.js";import"./analytics-BTvt2K3S.js";import"./plaid-CQqwPn97.js";import"./dnd-Cbdx7tVf.js";import"./stripe-cKAAJElX.js";import"./lottie-BQlGSG2c.js";import"./lexical-DRfKJLK3.js";import"./pdf-DGzvSuDl.js";import"./utils-BVIT21dc.js";import"./useInitialThreadRequest-BRvCrjqu.js";import"./stripSplatSuffix-nQAZVh5Z.js";import"./pathToGoBack-QMp9zrtx.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]="c346ea2c-d408-4b0b-aa66-6b707019ee0e",t._sentryDebugIdIdentifier="sentry-dbid-c346ea2c-d408-4b0b-aa66-6b707019ee0e")}catch{}})();const ui=()=>{const t=he(),n=nt(),S=be(),g=F((h=>ke(h))),{useFeatureGate:d}=Be(),{isFeatureEnabled:i}=d(H.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=d(H.aiAuditScorePercentage),A=F((h=>h.expenseAutomationViewState.selectedPeriodByTenantId)),l=F((h=>Hn(h,g.tenantId))),{isAiCfoAccessEnabled:b,onAskAiCfoClick:R}=Ga({mobileExploreReferrer:"Month-End Close Overview"}),k=s.useCallback(((h,T,z=!1)=>{t(_e({tenantId:T,period:{month:h.month,year:h.year},refreshViewInBackground:z}))}),[]),C=s.useCallback((h=>{const T=S.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&Z.trackMonthCloseAuditPage(h.month,h.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,T??null),t(Kn(g.tenantId,h))}),[g.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),f=A[g.tenantId],m=s.useCallback((()=>{const h=S.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&Z.trackMonthCloseAuditPage(f.month,f.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,h??null),k(f,g.tenantId,!0)}),[k,f,g.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),_=te(S.state?.pathnameStackToGoBack,S.pathname),x=s.useCallback((()=>{if(l.monthEndCloseChecks!=null&&f!=null){const h=l.monthEndCloseChecks.monthEndCloseCheckList.find((T=>T.progress<100));if(h!=null)return void n(`./${h.id}/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:_,message:"comingFromOverview"}});n(`./month_end_insights/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:_,message:"comingFromOverview"}})}}),[l.monthEndCloseChecks,f]),{areTenantIdsInSync:p}=za();return La({isDataReady:l.fetchState==="Completed"}),s.useEffect((()=>{f!=null&&l.fetchState!=="In-Progress"&&l.fetchState!=="Completed"&&p&&k(f,g.tenantId)}),[k,f,l.fetchState,g.tenantId,p]),s.useEffect((()=>{f!=null&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&p&&t(Qn(f))}),[f,l.monthClosePerformanceTrendFetchStatus.fetchState,p]),s.useEffect((()=>{const h=setInterval((()=>{l.fetchState!=="In-Progress"&&l.fetchState==="Completed"&&m()}),3e5);return()=>clearInterval(h)}),[l.fetchState]),s.useEffect((()=>{if(l.fetchState==="Completed"&&l.monthEndCloseChecks?.auditSummary!=null){const h=S.state?.referrer;Z.trackMonthCloseAuditPage(l.selectedPeriod.month,l.selectedPeriod.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,h??null)}}),[l.fetchState,l.selectedPeriod,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),I.jsx(mi,{children:I.jsx(Tc,{monthEndCloseChecksView:l,isRealtimeInsightsFeatureEnabled:i,onMonthEndCheckClick:h=>{n(`./${h}/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:_,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:C,handleReviewButtonClick:x,onBackClick:()=>{n("../../dashboard")},onReload:m,isAiCfoAccessEnabled:b,onAskAiCfoClick:R,aiAuditScorePercentageEnabled:r})})},mi=Te.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{j as s}from"./liveblocks-y3zMPGKB.js";import{a as r}from"./sentry-Jm7O5sR0.js";import{aw as c,ax as l,q as p,a4 as f}from"./index-DTZt8DRK.js";import"./mui-CxIkaR9n.js";import m from"./NotFoundScreen-DVcHaqdZ.js";import{h as u,g as b}from"./core-BwK6FGJd.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]="0558ec16-7d14-475c-91d0-925b0ae2f1dd",e._sentryDebugIdIdentifier="sentry-dbid-0558ec16-7d14-475c-91d0-925b0ae2f1dd")}catch{}})();const _=()=>{const e=u(),a=b(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),d=r.useCallback((()=>{(()=>{const n=f(a.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=c(a.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:d}):s.jsx(m,{})},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-y3zMPGKB.js";import{a as r}from"./sentry-Jm7O5sR0.js";import{aw as c,ax as l,q as p,a4 as f}from"./index-CavSpTx-.js";import"./mui-CxIkaR9n.js";import m from"./NotFoundScreen-Duy6T6m3.js";import{h as u,g as b}from"./core-BwK6FGJd.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]="0558ec16-7d14-475c-91d0-925b0ae2f1dd",e._sentryDebugIdIdentifier="sentry-dbid-0558ec16-7d14-475c-91d0-925b0ae2f1dd")}catch{}})();const _=()=>{const e=u(),a=b(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),d=r.useCallback((()=>{(()=>{const n=f(a.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=c(a.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:d}):s.jsx(m,{})},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 r}from"./sentry-Jm7O5sR0.js";import{u as c,h as l,g as m}from"./core-BwK6FGJd.js";import{hX as p,Uk as b,Ul as g}from"./zeni-epic-state-BugXGzus.js";import{u as _,L as h,z as y}from"./index-DTZt8DRK.js";import"./liveblocks-y3zMPGKB.js";import"./recharts-CoAMGh71.js";import"./mui-CxIkaR9n.js";import"./analytics-BTvt2K3S.js";import"./plaid-CQqwPn97.js";import"./dnd-Cbdx7tVf.js";import"./stripe-cKAAJElX.js";import"./lottie-BQlGSG2c.js";import"./lexical-DRfKJLK3.js";import"./pdf-DGzvSuDl.js";import"./utils-BVIT21dc.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="5fbbbaef-3aa1-49f2-8d20-ef5d32ec58b8",e._sentryDebugIdIdentifier="sentry-dbid-5fbbbaef-3aa1-49f2-8d20-ef5d32ec58b8")}catch{}})();function R(){const e=c(),n=l(),o=m(),{setLoading:i,clearAllLoading:f}=_(),s=r.useRef(!1);return r.useLayoutEffect((()=>{i(h.CONNECTION_AUTH)}),[i]),r.useEffect((()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(o.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,b("revenue"),g("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}f();const u=y.getActiveTenantForUser();n(u?.tenantEmailDomain!=null?`/${u.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{R as default};
1
+ import{a as r}from"./sentry-Jm7O5sR0.js";import{u as c,h as l,g as m}from"./core-BwK6FGJd.js";import{hX as p,Uk as b,Ul as g}from"./zeni-epic-state-BugXGzus.js";import{u as _,L as h,z as y}from"./index-CavSpTx-.js";import"./liveblocks-y3zMPGKB.js";import"./recharts-CoAMGh71.js";import"./mui-CxIkaR9n.js";import"./analytics-BTvt2K3S.js";import"./plaid-CQqwPn97.js";import"./dnd-Cbdx7tVf.js";import"./stripe-cKAAJElX.js";import"./lottie-BQlGSG2c.js";import"./lexical-DRfKJLK3.js";import"./pdf-DGzvSuDl.js";import"./utils-BVIT21dc.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="5fbbbaef-3aa1-49f2-8d20-ef5d32ec58b8",e._sentryDebugIdIdentifier="sentry-dbid-5fbbbaef-3aa1-49f2-8d20-ef5d32ec58b8")}catch{}})();function R(){const e=c(),n=l(),o=m(),{setLoading:i,clearAllLoading:f}=_(),s=r.useRef(!1);return r.useLayoutEffect((()=>{i(h.CONNECTION_AUTH)}),[i]),r.useEffect((()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(o.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,b("revenue"),g("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}f();const u=y.getActiveTenantForUser();n(u?.tenantEmailDomain!=null?`/${u.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{R as default};