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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/dist/assets/{AccountMappingScreen-6_GKC9vx.js → AccountMappingScreen-Bn4DiIps.js} +1 -1
  2. package/dist/assets/{ActualMatchingMatchDetailScreen-BtJ1PRf_.js → ActualMatchingMatchDetailScreen-CyKLkfoX.js} +1 -1
  3. package/dist/assets/{AddressRoutes-BGo6E_l0.js → AddressRoutes-CMlXZdpL.js} +1 -1
  4. package/dist/assets/{AddressScreen-BYfgTsTg.js → AddressScreen-CPZX6Mga.js} +1 -1
  5. package/dist/assets/{AiCfoScreen-HIFRX9qy.js → AiCfoScreen-BJhHFB_H.js} +1 -1
  6. package/dist/assets/{AppDrawer-HGV6a9mb.js → AppDrawer-f4P22T-s.js} +1 -1
  7. package/dist/assets/{BillPayApprovalRoutes-CJFVAxhN.js → BillPayApprovalRoutes-U0Rf3A34.js} +1 -1
  8. package/dist/assets/{BillPayRoutes-9qxDDuw-.js → BillPayRoutes-DGRh7xdO.js} +1 -1
  9. package/dist/assets/{BusinessVerificationPageScreen-ClHDLcIn.js → BusinessVerificationPageScreen-r1Ek9gB4.js} +1 -1
  10. package/dist/assets/{CardsAiCfoScreen-HQpPf571.js → CardsAiCfoScreen-0le7ZJMu.js} +1 -1
  11. package/dist/assets/{ChargeCardRoutes-D5HxBR-m.js → ChargeCardRoutes-DJ2vt6zk.js} +1 -1
  12. package/dist/assets/{CompanyPassportScreen-NKCcjvTx.js → CompanyPassportScreen-RZ6JI1G1.js} +1 -1
  13. package/dist/assets/{ConnectionAuthScreen-5_efBSJK.js → ConnectionAuthScreen-DmnnDeQw.js} +1 -1
  14. package/dist/assets/{CustomerOnboardingAuthScreen-LnGpx7c7.js → CustomerOnboardingAuthScreen-DbeMqdYb.js} +1 -1
  15. package/dist/assets/{CustomerOnboardingRoutes-DvA4xflo.js → CustomerOnboardingRoutes-s6nbTZNu.js} +1 -1
  16. package/dist/assets/{DashboardRoutes-BrD8wr4t.js → DashboardRoutes-BT8Ep0Zj.js} +1 -1
  17. package/dist/assets/{DefaultTenantHome-UgTfgsWU.js → DefaultTenantHome-Df11kb8h.js} +1 -1
  18. package/dist/assets/{DomesticWireDetailScreen-CnA3RoGS.js → DomesticWireDetailScreen-y2obrXna.js} +1 -1
  19. package/dist/assets/{DrawerScreen-Uxjfm6D_.js → DrawerScreen-oFb1moZ7.js} +1 -1
  20. package/dist/assets/{EntityDetailRoutes-DtNSByJA.js → EntityDetailRoutes-BSBRT0xT.js} +1 -1
  21. package/dist/assets/{ExpenseAutomationRoutes-CyGyQy2q.js → ExpenseAutomationRoutes-Ca8MyQ3F.js} +1 -1
  22. package/dist/assets/{FeaturePreviewScreen-C1hVuos1.js → FeaturePreviewScreen-hmh5qa1F.js} +1 -1
  23. package/dist/assets/{HubSpotOAuthCallbackScreen-BZRaCcdu.js → HubSpotOAuthCallbackScreen-BO5xFdxD.js} +1 -1
  24. package/dist/assets/{InvoicingRoutes-BER5-vbp.js → InvoicingRoutes-CdrMbO5s.js} +1 -1
  25. package/dist/assets/{MagicLinkRoutes-BGZcWo6O.js → MagicLinkRoutes-BK5YhMpS.js} +1 -1
  26. package/dist/assets/{MagicLinkSignInScreen-BclRPUfZ.js → MagicLinkSignInScreen-CwfKFdEK.js} +1 -1
  27. package/dist/assets/{MobileAppDrawer-B_zpLZqx.js → MobileAppDrawer-jPjMoXMc.js} +1 -1
  28. package/dist/assets/{NotFoundScreen-BXryZNID.js → NotFoundScreen-Cw8n2XQn.js} +1 -1
  29. package/dist/assets/{NotificationRoutes-CQasJ3IU.js → NotificationRoutes-bPTL-gx1.js} +1 -1
  30. package/dist/assets/{OAuthConsentScreen-Bo-ewMPc.js → OAuthConsentScreen-qHIRXDfy.js} +1 -1
  31. package/dist/assets/{PandLWithForecastRoutes-DdmupK5y.js → PandLWithForecastRoutes-iv8FS1Jh.js} +1 -1
  32. package/dist/assets/{PaymentLinkScreen-CAg7Uc1V.js → PaymentLinkScreen-ssw1HUNS.js} +1 -1
  33. package/dist/assets/{PeopleRoutes-CYUsZeQt.js → PeopleRoutes-gWK7cISf.js} +1 -1
  34. package/dist/assets/{PerformanceRoutes-DqTbj0rB.js → PerformanceRoutes-Q-0RiFCz.js} +1 -1
  35. package/dist/assets/{QBOConnectionScreen-CRdIfjOg.js → QBOConnectionScreen-CGXzaY9Z.js} +1 -1
  36. package/dist/assets/{ReimbursementApprovalRoutes-CgCsp1OP.js → ReimbursementApprovalRoutes-C_sgAcum.js} +1 -1
  37. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-ChXGgpkg.js → ReimbursementApprovalRuleDetailScreen-BaabHenl.js} +1 -1
  38. package/dist/assets/{ReimbursementRoutes-DKUCzczr.js → ReimbursementRoutes-uxVKhJh3.js} +1 -1
  39. package/dist/assets/{ReportsRoutes-CSUm6Emn.js → ReportsRoutes-DO9Wko2u.js} +1 -1
  40. package/dist/assets/{RewardsRoutes-DWpcmti-.js → RewardsRoutes-CpyMm_K4.js} +1 -1
  41. package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-CuQHddsr.js → ScheduleDetailsPrepaidExpensesScreen-DMzBHsBi.js} +1 -1
  42. package/dist/assets/{ScreenRoutes-evald5rF.js → ScreenRoutes-2kGhSSY5.js} +2 -2
  43. package/dist/assets/{SettingsRoutes-B7gRIVJU.js → SettingsRoutes-DLS1pb7Z.js} +1 -1
  44. package/dist/assets/{SetupPagesScreen-CabDNVlS.js → SetupPagesScreen-LpdfT-pH.js} +1 -1
  45. package/dist/assets/{SignInScreen-DfTwbUKW.js → SignInScreen-D0AGVtSB.js} +1 -1
  46. package/dist/assets/{SignOutScreen-CH6sLo8r.js → SignOutScreen-DqG7ICcF.js} +1 -1
  47. package/dist/assets/{TaskListScreen-d8rT1QCC.js → TaskListScreen-Mlh19Bfa.js} +1 -1
  48. package/dist/assets/{TaskRoutes-DVZrk18e.js → TaskRoutes-BLQqIb0y.js} +1 -1
  49. package/dist/assets/{TransactionDetailRoutes-CkeAEzHU.js → TransactionDetailRoutes-B7iSSfjs.js} +1 -1
  50. package/dist/assets/{TransactionDetailScreen-hIkUAVjY.js → TransactionDetailScreen-DSLjb6UM.js} +1 -1
  51. package/dist/assets/{TransactionListRoutes-BVLahxTu.js → TransactionListRoutes-Bw5UrSgh.js} +1 -1
  52. package/dist/assets/{TreasuryRoutes-D4vqz1Fs.js → TreasuryRoutes-CssMsW2Q.js} +1 -1
  53. package/dist/assets/{VendorsRoutes-Dd9qfBZi.js → VendorsRoutes-owMMCmOI.js} +1 -1
  54. package/dist/assets/{WiseConfirmationScreen-B9ReE25J.js → WiseConfirmationScreen-DjHi2MKV.js} +1 -1
  55. package/dist/assets/{ZeniAccountRoutes-BtAMcoNj.js → ZeniAccountRoutes-CmkqZp90.js} +1 -1
  56. package/dist/assets/{ZeniAccountStatementScreen-B3egvFmp.js → ZeniAccountStatementScreen-Cs6xkdf1.js} +1 -1
  57. package/dist/assets/{analyticsHelper-DoCIxX19.js → analyticsHelper-B0PgYJQ4.js} +1 -1
  58. package/dist/assets/{getLocaleForTenant-BYuz_wJa.js → getLocaleForTenant-DnBPPnzL.js} +1 -1
  59. package/dist/assets/{index-De2R2YuA.js → index-BhDgyETA.js} +5 -5
  60. package/dist/assets/{routePaths-BRju88LA.js → routePaths-BvbR2--r.js} +1 -1
  61. package/dist/assets/{useActualMatchingMatchDetail-lnPRleqr.js → useActualMatchingMatchDetail-vmzr0KEG.js} +1 -1
  62. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-DuZAl-a1.js → useAiCfoDashboardSuggestedQuestionsChips-BsM9KkGc.js} +1 -1
  63. package/dist/assets/{useAskAiCfoHostNavButtonProps-Bq-fQXG8.js → useAskAiCfoHostNavButtonProps-BmnPs4uO.js} +1 -1
  64. package/dist/assets/{useChargeCardPusherEvents-CrB7Excu.js → useChargeCardPusherEvents-BiuqGlTA.js} +1 -1
  65. package/dist/assets/{useEmailConnectResultRefresh-x1GFiNhw.js → useEmailConnectResultRefresh-DMSbnQoq.js} +1 -1
  66. package/dist/assets/{useInitialThreadRequest-C1rKRZSH.js → useInitialThreadRequest-CdCPw0ds.js} +1 -1
  67. package/dist/assets/{useTaskManagerAccess-CoE1FF6T.js → useTaskManagerAccess-ljLSKJCt.js} +1 -1
  68. package/dist/assets/{useTaskManagerPusherEvents-CgOrop-a.js → useTaskManagerPusherEvents-BBtG4erb.js} +1 -1
  69. package/dist/assets/{withTransactionSidePanel-CbnU34fe.js → withTransactionSidePanel-DG1lldsp.js} +1 -1
  70. package/dist/index.html +1 -1
  71. package/package.json +1 -1
@@ -1 +1 @@
1
- import{j as m}from"./liveblocks-CzCs-qU3.js";import{a as g}from"./sentry-CWp8Ph3h.js";import{h as w,u as T,g as x,i as k,j as b,l as E}from"./core-BBG4mxvC.js";import{z as N,bs as F,a8 as P,j as V,T as j,r as O,bt as L,ae as A,aG as U,p as B}from"./index-De2R2YuA.js";import{fI as D,gL as G,BK as M,gG as R,c9 as _,Yn as Y,bn as z,v1 as H,uR as K,mC as Z,ob as S,Yo as $,bF as q,cF as C,om as J,ow as Q}from"./zeni-epic-state-FRanwwFO.js";import"./mui-B2F_PvWe.js";import{d as W}from"./routePaths-BRju88LA.js";import{M as X}from"./MobileAppDrawer-B_zpLZqx.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]="0f39e074-fa6a-4e21-b0e3-9bd0bbc969a1",a._sentryDebugIdIdentifier="sentry-dbid-0f39e074-fa6a-4e21-b0e3-9bd0bbc969a1")}catch{}})();const ee=E((function(a){const t=R(a),i=N.getSignedInUser(),p=D(a),c=p.tenantId,l={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=_(p?.userRole??[])&&t.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=Y(a.companyConfigState),n=a.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:t.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:t,allIndustries:e.companyIndustries??[],allNationalityCountries:n,isDisabled:f,authParams:l,filesEndPoint:`${A.fileMicroServiceBaseUrl}`,isZeniUser:z(i)}}),(function(a,t){const{companyId:i,currentTenant:p,navigate:c,location:l}=t,{tenantEmailDomain:f}=p;return{onScheduleClick:e=>{let n=e.href;n.includes("http")||(n="https://".concat(n)),window.open(n,"_blank")},onSaveAll:()=>{a(Q())},onAddressClick:e=>{const n=W(f,e),o=B(l.state?.pathnameStackToGoBack,l.pathname);c(n,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{a(J({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:n,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:u}=n,{meetingLink:y}=d,{incDate:s}=o,{taxesFiledYears:h}=r,v={companyInfo:{...n,website:u!=""&&u!=null?C(u):void 0,meetingLink:y!=""&&y!=null?C(y):void 0,industry:n.industry.selectedOption,companyIndustryType:n.companyIndustryType?.selectedOption??void 0,companySubIndustry:n.companySubIndustry?.selectedOption??void 0,businessModel:n.businessModel.selectedOption??"",companySourceOfFunds:n.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:n.companySourceOfFundsDescription??void 0,countriesOfOperations:n.countriesOfOperations?.selectedOptions?.map((I=>I.length===2?I:U(I)))??[],transactionVolume:n.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:n.transactionVolumeDescription??void 0,regulatedStatus:n.regulatedStatus??void 0,regulatedStatusDescription:n.regulatedStatusDescription??void 0,usNexus:n.usNexus??void 0,usNexusTypes:n.usNexusTypes?.selectedOptions??[],purposeOfAccount:n.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:n.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]}};a(S({companyDetails:v}))},onPrimaryContactDetailsUpdated:e=>{a(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{a(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=>{a($(e))},onCompanyOfficerUpdated:e=>{a(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=>{a(Z({files:e}))},onDeleteFile:e=>{a(K(e))},onEditFileName:(e,n)=>{a(H(e,n.split(".")[0]))}}}))(L);function de(){const a=w(),t=T(),i=x(),{tenantEmailDomain:p}=k(),[c,l]=g.useState(!1),[f,e]=g.useState(!1),n=b((s=>s.companyViewState.passportView.fetchState)),o=b((s=>s.companyConfigState.fetchState)),r=b((s=>D(s))),d=r.companyId??N.getSignedInUserTenant(p)?.companyId;if(N.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect((()=>{c||n!=="Not-Started"||d==null||(l(!0),t(G(d)))}),[c,n,d,t]),g.useEffect((()=>{o==="Not-Started"&&t(M())}),[o,t]);const u=s=>{e(s)},y=n==="Not-Started"||n==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&n==="Error"?m.jsx(F,{onGoHome:()=>a("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(P,{analytics:V,onLoad:s=>s.trackPageLoaded(j.Event.companyPassport,O(i)?"Settings":"Company Passport")}),O(i)?m.jsx(X,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:a,location:i,isLoading:y,currentTenant:r,isSettings:O(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
1
+ import{j as m}from"./liveblocks-CzCs-qU3.js";import{a as g}from"./sentry-CWp8Ph3h.js";import{h as w,u as T,g as x,i as k,j as b,l as E}from"./core-BBG4mxvC.js";import{z as N,bs as F,a8 as P,j as V,T as j,r as O,bt as L,ae as A,aG as U,p as B}from"./index-BhDgyETA.js";import{fI as D,gL as G,BK as M,gG as R,c9 as _,Yn as Y,bn as z,v1 as H,uR as K,mC as Z,ob as S,Yo as $,bF as q,cF as C,om as J,ow as Q}from"./zeni-epic-state-FRanwwFO.js";import"./mui-B2F_PvWe.js";import{d as W}from"./routePaths-BvbR2--r.js";import{M as X}from"./MobileAppDrawer-jPjMoXMc.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]="0f39e074-fa6a-4e21-b0e3-9bd0bbc969a1",a._sentryDebugIdIdentifier="sentry-dbid-0f39e074-fa6a-4e21-b0e3-9bd0bbc969a1")}catch{}})();const ee=E((function(a){const t=R(a),i=N.getSignedInUser(),p=D(a),c=p.tenantId,l={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=_(p?.userRole??[])&&t.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=Y(a.companyConfigState),n=a.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:t.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:t,allIndustries:e.companyIndustries??[],allNationalityCountries:n,isDisabled:f,authParams:l,filesEndPoint:`${A.fileMicroServiceBaseUrl}`,isZeniUser:z(i)}}),(function(a,t){const{companyId:i,currentTenant:p,navigate:c,location:l}=t,{tenantEmailDomain:f}=p;return{onScheduleClick:e=>{let n=e.href;n.includes("http")||(n="https://".concat(n)),window.open(n,"_blank")},onSaveAll:()=>{a(Q())},onAddressClick:e=>{const n=W(f,e),o=B(l.state?.pathnameStackToGoBack,l.pathname);c(n,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{a(J({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:n,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:u}=n,{meetingLink:y}=d,{incDate:s}=o,{taxesFiledYears:h}=r,v={companyInfo:{...n,website:u!=""&&u!=null?C(u):void 0,meetingLink:y!=""&&y!=null?C(y):void 0,industry:n.industry.selectedOption,companyIndustryType:n.companyIndustryType?.selectedOption??void 0,companySubIndustry:n.companySubIndustry?.selectedOption??void 0,businessModel:n.businessModel.selectedOption??"",companySourceOfFunds:n.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:n.companySourceOfFundsDescription??void 0,countriesOfOperations:n.countriesOfOperations?.selectedOptions?.map((I=>I.length===2?I:U(I)))??[],transactionVolume:n.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:n.transactionVolumeDescription??void 0,regulatedStatus:n.regulatedStatus??void 0,regulatedStatusDescription:n.regulatedStatusDescription??void 0,usNexus:n.usNexus??void 0,usNexusTypes:n.usNexusTypes?.selectedOptions??[],purposeOfAccount:n.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:n.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]}};a(S({companyDetails:v}))},onPrimaryContactDetailsUpdated:e=>{a(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{a(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=>{a($(e))},onCompanyOfficerUpdated:e=>{a(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=>{a(Z({files:e}))},onDeleteFile:e=>{a(K(e))},onEditFileName:(e,n)=>{a(H(e,n.split(".")[0]))}}}))(L);function de(){const a=w(),t=T(),i=x(),{tenantEmailDomain:p}=k(),[c,l]=g.useState(!1),[f,e]=g.useState(!1),n=b((s=>s.companyViewState.passportView.fetchState)),o=b((s=>s.companyConfigState.fetchState)),r=b((s=>D(s))),d=r.companyId??N.getSignedInUserTenant(p)?.companyId;if(N.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect((()=>{c||n!=="Not-Started"||d==null||(l(!0),t(G(d)))}),[c,n,d,t]),g.useEffect((()=>{o==="Not-Started"&&t(M())}),[o,t]);const u=s=>{e(s)},y=n==="Not-Started"||n==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&n==="Error"?m.jsx(F,{onGoHome:()=>a("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(P,{analytics:V,onLoad:s=>s.trackPageLoaded(j.Event.companyPassport,O(i)?"Settings":"Company Passport")}),O(i)?m.jsx(X,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:a,location:i,isLoading:y,currentTenant:r,isSettings:O(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
@@ -1,4 +1,4 @@
1
- import{j as I}from"./liveblocks-CzCs-qU3.js";import{a as o}from"./sentry-CWp8Ph3h.js";import{u as F,h as R,g as H,j as C,N as w}from"./core-BBG4mxvC.js";import{U1 as q,fI as z,go as G,pV as V,gP as U,gn as M,gl as Q,Ur as B,gk as A}from"./zeni-epic-state-FRanwwFO.js";import{u as J,z as E,L as T,G as K,M as W}from"./index-De2R2YuA.js";import{n as X}from"./mui-B2F_PvWe.js";import{P as h,a as _}from"./AccountMappingScreen-6_GKC9vx.js";import{t as Y}from"./getLocaleForTenant-BYuz_wJa.js";import{g as Z,Q as ee}from"./QBOConnectionScreen-CRdIfjOg.js";import"./recharts-CzGMTm3v.js";import"./analytics-cC2XJoxx.js";import"./plaid-BWZxX3Bn.js";import"./dnd-oIrpOltC.js";import"./stripe-cKAAJElX.js";import"./lottie-ULJlrwjP.js";import"./lexical-BRrdO5Cu.js";import"./pdf-CeVn9A9c.js";import"./utils-u0mlLj2I.js";import"./MobileAppDrawer-B_zpLZqx.js";import"./InboxNotificationsProvider-J2K-16R3.js";import"./useTaskManagerAccess-CoE1FF6T.js";import"./accountMappingHelper-mjWJVrZb.js";import"./empty-zUa_Ywzm.js";import"./pdf-lib-DiMa7ymi.js";import"./index-lbu92FYh.js";import"./url-DV6CtKQ5.js";import"./index-CD8RychW.js";import"./decodeURIComponentSafe-DgKmvHaP.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]="763a13dc-2c3c-4656-a8ee-82fc55014cce",t._sentryDebugIdIdentifier="sentry-dbid-763a13dc-2c3c-4656-a8ee-82fc55014cce")}catch{}})();const te=X.div`
1
+ import{j as I}from"./liveblocks-CzCs-qU3.js";import{a as o}from"./sentry-CWp8Ph3h.js";import{u as F,h as R,g as H,j as C,N as w}from"./core-BBG4mxvC.js";import{U1 as q,fI as z,go as G,pV as V,gP as U,gn as M,gl as Q,Ur as B,gk as A}from"./zeni-epic-state-FRanwwFO.js";import{u as J,z as E,L as T,G as K,M as W}from"./index-BhDgyETA.js";import{n as X}from"./mui-B2F_PvWe.js";import{P as h,a as _}from"./AccountMappingScreen-Bn4DiIps.js";import{t as Y}from"./getLocaleForTenant-DnBPPnzL.js";import{g as Z,Q as ee}from"./QBOConnectionScreen-CGXzaY9Z.js";import"./recharts-CzGMTm3v.js";import"./analytics-cC2XJoxx.js";import"./plaid-BWZxX3Bn.js";import"./dnd-oIrpOltC.js";import"./stripe-cKAAJElX.js";import"./lottie-ULJlrwjP.js";import"./lexical-BRrdO5Cu.js";import"./pdf-CeVn9A9c.js";import"./utils-u0mlLj2I.js";import"./MobileAppDrawer-jPjMoXMc.js";import"./InboxNotificationsProvider-J2K-16R3.js";import"./useTaskManagerAccess-ljLSKJCt.js";import"./accountMappingHelper-mjWJVrZb.js";import"./empty-zUa_Ywzm.js";import"./pdf-lib-DiMa7ymi.js";import"./index-lbu92FYh.js";import"./url-DV6CtKQ5.js";import"./index-CD8RychW.js";import"./decodeURIComponentSafe-DgKmvHaP.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]="763a13dc-2c3c-4656-a8ee-82fc55014cce",t._sentryDebugIdIdentifier="sentry-dbid-763a13dc-2c3c-4656-a8ee-82fc55014cce")}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-CzCs-qU3.js";import{z as m}from"./index-De2R2YuA.js";import{g as n}from"./QBOConnectionScreen-CRdIfjOg.js";import"./sentry-CWp8Ph3h.js";import{g as p,N as a}from"./core-BBG4mxvC.js";import"./zeni-epic-state-FRanwwFO.js";import"./recharts-CzGMTm3v.js";import"./mui-B2F_PvWe.js";import"./analytics-cC2XJoxx.js";import"./plaid-BWZxX3Bn.js";import"./dnd-oIrpOltC.js";import"./stripe-cKAAJElX.js";import"./lottie-ULJlrwjP.js";import"./lexical-BRrdO5Cu.js";import"./pdf-CeVn9A9c.js";import"./utils-u0mlLj2I.js";import"./empty-zUa_Ywzm.js";import"./pdf-lib-DiMa7ymi.js";import"./index-lbu92FYh.js";import"./url-DV6CtKQ5.js";import"./index-CD8RychW.js";import"./decodeURIComponentSafe-DgKmvHaP.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-CzCs-qU3.js";import{z as m}from"./index-BhDgyETA.js";import{g as n}from"./QBOConnectionScreen-CGXzaY9Z.js";import"./sentry-CWp8Ph3h.js";import{g as p,N as a}from"./core-BBG4mxvC.js";import"./zeni-epic-state-FRanwwFO.js";import"./recharts-CzGMTm3v.js";import"./mui-B2F_PvWe.js";import"./analytics-cC2XJoxx.js";import"./plaid-BWZxX3Bn.js";import"./dnd-oIrpOltC.js";import"./stripe-cKAAJElX.js";import"./lottie-ULJlrwjP.js";import"./lexical-BRrdO5Cu.js";import"./pdf-CeVn9A9c.js";import"./utils-u0mlLj2I.js";import"./empty-zUa_Ywzm.js";import"./pdf-lib-DiMa7ymi.js";import"./index-lbu92FYh.js";import"./url-DV6CtKQ5.js";import"./index-CD8RychW.js";import"./decodeURIComponentSafe-DgKmvHaP.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-CzCs-qU3.js";import{t as wn,A as $e}from"./AddressScreen-BYfgTsTg.js";import An from"./NotFoundScreen-BXryZNID.js";import{a as d,t as Me}from"./sentry-CWp8Ph3h.js";import{h as _e,g as xe,u as se,i as Te,j as E,N as Q,q as Pn,l as cn,n as Dn,o as H}from"./core-BBG4mxvC.js";import{fI as X,e0 as Ee,d$ as we,bq as jn,Ui as Bn,bS as Fn,pT as Vn,Bu as Un,Bx as Rn,VF as Ln,VG as Nn,lx as Oe,lA as dn,UV as Gn,c0 as $n,c9 as fe,BY as Ae,BJ as Mn,VH as me,BZ as un,Ss as Qn,mK as ln,dj as pn,VI as Kn,VJ as zn,uK as qn,UI as Ce,hY as Hn,UH as be,hV as Jn,Gn as Zn,uO as Wn,hN as Yn,hQ as Qe,VK as mn,VL as Xn,Md as et,VM as nt,Mh as tt,BA as at,VN as ot,VO as st,lv as rt,ly as it,C9 as ct,BL as gn,BX as dt,bF as Ke,cF as ut,C8 as ze,v1 as lt,uR as pt,mC as mt,gJ as gt,gI as ft,gH as yt,VP as ht,BD as Ct,Ca as bt,Cd as St,Cg as It,Cm as kt,dk as Ot}from"./zeni-epic-state-FRanwwFO.js";import{z,c as Pe,m as W,k as vt,p as q,a8 as re,j as g,aE as _t,ai as fn,a1 as xt,Z as yn,_ as hn,l as Y,W as ge,T as ve,aF as Tt,M as qe,B as He,ae as Et,aG as Je,aH as wt,aI as At}from"./index-De2R2YuA.js";import{n as De}from"./mui-B2F_PvWe.js";import{g as Pt,h as Dt,q as ie}from"./QBOConnectionScreen-CRdIfjOg.js";import{u as jt,a as Bt}from"./useEmailConnectResultRefresh-x1GFiNhw.js";import{u as Ft}from"./useChargeCardPusherEvents-CrB7Excu.js";import"./recharts-CzGMTm3v.js";import"./analytics-cC2XJoxx.js";import"./plaid-BWZxX3Bn.js";import"./dnd-oIrpOltC.js";import"./stripe-cKAAJElX.js";import"./lottie-ULJlrwjP.js";import"./lexical-BRrdO5Cu.js";import"./pdf-CeVn9A9c.js";import"./utils-u0mlLj2I.js";import"./empty-zUa_Ywzm.js";import"./pdf-lib-DiMa7ymi.js";import"./index-lbu92FYh.js";import"./url-DV6CtKQ5.js";import"./index-CD8RychW.js";import"./decodeURIComponentSafe-DgKmvHaP.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]="74cc6002-5342-4569-a1dc-5e86631562ac",e._sentryDebugIdIdentifier="sentry-dbid-74cc6002-5342-4569-a1dc-5e86631562ac")}catch{}})();const Ze=e=>{switch(e){case"Complete":return"yes";case"Pending Review":case"Incomplete":return"partially";default:return"no"}},Vt=()=>{const e=_e(),l=xe(),i=se(),[a,p]=d.useState(!1),[u,c]=d.useState(!1),{tenantEmailDomain:v}=Te(),n=z.getSignedInUser(),{useFeatureGate:t}=Pe(),{isFeatureEnabled:C}=t(W.isApAgingFeatureEnabled),{isFeatureEnabled:o}=t(W.isArAgingFeatureEnabled),{isFeatureEnabled:A}=t(W.isReferralFeatureEnabled),{isFeatureEnabled:w}=t(W.isDebitCardFeatureEnabled),k=vt(),O=E((S=>X(S))),P=E((S=>S.onboardingCustomerViewState.fetchState)),_=O.excludedResources,F=O.companyId??z.getSignedInUserTenant(v)?.companyId;if(n==null)throw Error("Can't access onboarding flow without signing in...");const m=Ee(w,O),b=we(O),D=[],U=_?.resources?.find((S=>S.resource==="/reports/top_expenses"))==null,h=_?.resources?.find((S=>S.resource==="/reports/task_card"))==null,r=O?.userRole!=null&&jn(O?.userRole),x=_?.resources?.find((S=>S.resource==="/bills"))==null&&!r,T=_?.resources?.find((S=>S.resource==="/reimbursements"))==null;U===!1&&D.push("top_expenses"),h===!1&&D.push("task_card"),x===!1&&D.push("bill_pay_card","bill_pay_promo_card"),T===!1&&D.push("reimbursement_card","reimbursement_promo_card"),D.push("zeni_accounts_promo_card","treasury_promo_card"),A===!1&&D.push("rewards_card");const f=E((S=>{const 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=Bn(S,V);return Fn(J.reportsInOrder.map(($=>({fetchState:$.fetchState,error:$.error})))).fetchState}));d.useEffect((()=>{P!=="Completed"||a||m||b||(p(!0),i(Vn(n.userId,F,O.tenantId,!0,!1,D)))}),[a,P,m,b,n,O.tenantId,i]);const j=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((()=>{j.current||(j.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(_t,{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}))},Ye=(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"))},Xe=De.div`
1
+ import{j as s}from"./liveblocks-CzCs-qU3.js";import{t as wn,A as $e}from"./AddressScreen-CPZX6Mga.js";import An from"./NotFoundScreen-Cw8n2XQn.js";import{a as d,t as Me}from"./sentry-CWp8Ph3h.js";import{h as _e,g as xe,u as se,i as Te,j as E,N as Q,q as Pn,l as cn,n as Dn,o as H}from"./core-BBG4mxvC.js";import{fI as X,e0 as Ee,d$ as we,bq as jn,Ui as Bn,bS as Fn,pT as Vn,Bu as Un,Bx as Rn,VF as Ln,VG as Nn,lx as Oe,lA as dn,UV as Gn,c0 as $n,c9 as fe,BY as Ae,BJ as Mn,VH as me,BZ as un,Ss as Qn,mK as ln,dj as pn,VI as Kn,VJ as zn,uK as qn,UI as Ce,hY as Hn,UH as be,hV as Jn,Gn as Zn,uO as Wn,hN as Yn,hQ as Qe,VK as mn,VL as Xn,Md as et,VM as nt,Mh as tt,BA as at,VN as ot,VO as st,lv as rt,ly as it,C9 as ct,BL as gn,BX as dt,bF as Ke,cF as ut,C8 as ze,v1 as lt,uR as pt,mC as mt,gJ as gt,gI as ft,gH as yt,VP as ht,BD as Ct,Ca as bt,Cd as St,Cg as It,Cm as kt,dk as Ot}from"./zeni-epic-state-FRanwwFO.js";import{z,c as Pe,m as W,k as vt,p as q,a8 as re,j as g,aE as _t,ai as fn,a1 as xt,Z as yn,_ as hn,l as Y,W as ge,T as ve,aF as Tt,M as qe,B as He,ae as Et,aG as Je,aH as wt,aI as At}from"./index-BhDgyETA.js";import{n as De}from"./mui-B2F_PvWe.js";import{g as Pt,h as Dt,q as ie}from"./QBOConnectionScreen-CGXzaY9Z.js";import{u as jt,a as Bt}from"./useEmailConnectResultRefresh-DMSbnQoq.js";import{u as Ft}from"./useChargeCardPusherEvents-BiuqGlTA.js";import"./recharts-CzGMTm3v.js";import"./analytics-cC2XJoxx.js";import"./plaid-BWZxX3Bn.js";import"./dnd-oIrpOltC.js";import"./stripe-cKAAJElX.js";import"./lottie-ULJlrwjP.js";import"./lexical-BRrdO5Cu.js";import"./pdf-CeVn9A9c.js";import"./utils-u0mlLj2I.js";import"./empty-zUa_Ywzm.js";import"./pdf-lib-DiMa7ymi.js";import"./index-lbu92FYh.js";import"./url-DV6CtKQ5.js";import"./index-CD8RychW.js";import"./decodeURIComponentSafe-DgKmvHaP.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]="74cc6002-5342-4569-a1dc-5e86631562ac",e._sentryDebugIdIdentifier="sentry-dbid-74cc6002-5342-4569-a1dc-5e86631562ac")}catch{}})();const Ze=e=>{switch(e){case"Complete":return"yes";case"Pending Review":case"Incomplete":return"partially";default:return"no"}},Vt=()=>{const e=_e(),l=xe(),i=se(),[a,p]=d.useState(!1),[u,c]=d.useState(!1),{tenantEmailDomain:v}=Te(),n=z.getSignedInUser(),{useFeatureGate:t}=Pe(),{isFeatureEnabled:C}=t(W.isApAgingFeatureEnabled),{isFeatureEnabled:o}=t(W.isArAgingFeatureEnabled),{isFeatureEnabled:A}=t(W.isReferralFeatureEnabled),{isFeatureEnabled:w}=t(W.isDebitCardFeatureEnabled),k=vt(),O=E((S=>X(S))),P=E((S=>S.onboardingCustomerViewState.fetchState)),_=O.excludedResources,F=O.companyId??z.getSignedInUserTenant(v)?.companyId;if(n==null)throw Error("Can't access onboarding flow without signing in...");const m=Ee(w,O),b=we(O),D=[],U=_?.resources?.find((S=>S.resource==="/reports/top_expenses"))==null,h=_?.resources?.find((S=>S.resource==="/reports/task_card"))==null,r=O?.userRole!=null&&jn(O?.userRole),x=_?.resources?.find((S=>S.resource==="/bills"))==null&&!r,T=_?.resources?.find((S=>S.resource==="/reimbursements"))==null;U===!1&&D.push("top_expenses"),h===!1&&D.push("task_card"),x===!1&&D.push("bill_pay_card","bill_pay_promo_card"),T===!1&&D.push("reimbursement_card","reimbursement_promo_card"),D.push("zeni_accounts_promo_card","treasury_promo_card"),A===!1&&D.push("rewards_card");const f=E((S=>{const 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=Bn(S,V);return Fn(J.reportsInOrder.map(($=>({fetchState:$.fetchState,error:$.error})))).fetchState}));d.useEffect((()=>{P!=="Completed"||a||m||b||(p(!0),i(Vn(n.userId,F,O.tenantId,!0,!1,D)))}),[a,P,m,b,n,O.tenantId,i]);const j=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((()=>{j.current||(j.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(_t,{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}))},Ye=(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"))},Xe=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-CzCs-qU3.js";import{i as K,j as S,g as W,u as X,h as H,l as ne,k as oa,n as ht,o as P,N as vn}from"./core-BBG4mxvC.js";import{fI as B,V$ as He,bF as sa,br as Ee,Xn as En,kd as Tn,Xo as Vt,Xp as wn,kg as ft,Xq as Qe,Xr as xn,kl as Dn,Xs as Gt,Xt as Pn,kp as gt,Xu as Ze,Xv as On,Xw as Fn,Wj as jn,lr as Rn,Xx as Mn,bn as Je,Xy as ra,WZ as le,bc as ia,lF as ca,lo as la,W$ as de,W_ as ae,fH as da,gd as Bn,gt as bt,Xz as Yn,XA as Un,XB as ua,XC as Oe,E5 as Be,E6 as Ye,Eu as Te,Eo as ue,Ea as Ue,XD as Ln,c0 as Le,XE as Vn,XF as Gn,XG as ma,XH as Fe,XI as Nn,ek as et,Ag as pa,XJ as $n,XK as ha,XL as Xn,XM as zn,XN as Kn,XO as _t,UX as St,ug as we,m2 as xe,EE as kt,An as qn,Au as Qn,XP as Zn,XQ as Wn,E7 as Nt,XR as Hn,Aj as Ie,Ae as fa,XS as ge,XT as $t,XU as Jn,XV as yt,UW as At,Cr as ga,XW as eo,XX as ba,XY as to,XZ as ao,X_ as no,X$ as It,CG as oo,CN as so,Y0 as ro,Y1 as io,E9 as Xt,Y2 as co,Cp as Ca,Y3 as be,Y4 as zt,Y5 as lo,bq as _a,EJ as Sa,Y6 as uo,Y7 as ka,Y8 as mo,Y9 as po,Ya as ho,Yb as vt,EB as fo,ED as go,Yc as bo,Yd as Co,E8 as Kt,Ye as _o,EH as ya,Yf as Ce,Yg as qt,Yh as So,Yi as ko,Yj as Aa,lT as Ia,p_ as va,lY as Ea,pY as Ta,pX as wa,pW as xa,BO as yo,dd as Ao,pT as Io,Ui as vo,q8 as Eo,Yk as To,Yl as wo,Ym as xo,b5 as Et,q2 as Do,ig as Po,gL as Oo,q1 as Fo,lh as jo,p$ as Ro,pZ as Mo,e0 as Bo,d$ as Yo}from"./zeni-epic-state-FRanwwFO.js";import{z as Y,av as oe,p as O,j as w,G as q,bb as Uo,as as Ve,a8 as Ge,bc as Da,T as N,bd as Lo,be as Pa,E as Vo,bf as Go,bg as No,a as Oa,a1 as Fa,e as ja,ar as $o,bh as Xo,ao as zo,c as Tt,bi as Ra,C as re,bj as Ma,bk as Ba,au as Ya,bl as Ko,ai as Ne,_ as $e,bm as qo,P as Qo,bn as Zo,m as G,k as Wo,l as Ho,a4 as Jo,aq as es,bo as ts,bp as as,bq as ns,br as ve}from"./index-De2R2YuA.js";import{n as wt}from"./mui-B2F_PvWe.js";import{a as b}from"./sentry-CWp8Ph3h.js";import{w as Ua}from"./withTransactionSidePanel-CbnU34fe.js";import{c as La,t as De,f as me,b as xt,a as Dt,v as os}from"./routePaths-BRju88LA.js";import{u as se}from"./useAskAiCfoHostNavButtonProps-Bq-fQXG8.js";import Me from"./NotFoundScreen-BXryZNID.js";import{u as Pt}from"./useInitialThreadRequest-C1rKRZSH.js";import{t as Va}from"./analyticsHelper-DoCIxX19.js";import{C as ss}from"./CompanyPassportScreen-NKCcjvTx.js";import{u as rs}from"./useAiCfoDashboardSuggestedQuestionsChips-DuZAl-a1.js";import{F as is}from"./FeaturePreviewScreen-C1hVuos1.js";import"./recharts-CzGMTm3v.js";import"./analytics-cC2XJoxx.js";import"./plaid-BWZxX3Bn.js";import"./dnd-oIrpOltC.js";import"./stripe-cKAAJElX.js";import"./lottie-ULJlrwjP.js";import"./lexical-BRrdO5Cu.js";import"./pdf-CeVn9A9c.js";import"./utils-u0mlLj2I.js";import"./TransactionDetailScreen-hIkUAVjY.js";import"./decodeURIComponentSafe-DgKmvHaP.js";import"./expenseAutomationHelper-BkZxz0F-.js";import"./stripSplatSuffix-BWJSV6oD.js";import"./MobileAppDrawer-B_zpLZqx.js";import"./InboxNotificationsProvider-J2K-16R3.js";import"./useTaskManagerAccess-CoE1FF6T.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]="d41865a2-4fd5-455b-99db-2b87d745c1e1",e._sentryDebugIdIdentifier="sentry-dbid-d41865a2-4fd5-455b-99db-2b87d745c1e1")}catch{}})();const cs=Ua((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=K(),s=Y.getSignedInUser(),i=S((_=>_.tenantState.currentTenantId)),l=S((_=>B(_))),{tenantEmailDomain:m}=K(),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:He()})),[]),u=b.useMemo((()=>r!=null?sa(r):Ee()),[r]),C=X(),g=H(),y=S((_=>En(_,u,o))),E=b.useCallback((()=>{o!=null&&y.fetchState!=="In-Progress"&&y.fetchState!=="Completed"&&C(Tn(o,u))}),[u]),I=b.useCallback((()=>{g("../../",{relative:"path"})}),[]),k=b.useCallback(((_,A)=>{C(Vt({sortKey:_,sortOrder:A}))}),[]),T=b.useCallback((_=>{C(Vt({downloadState:_}))}),[]),R=b.useCallback((_=>{if(e)e(_.transactionId,_.transactionType);else if(m!=null){const A=La({id:_.transactionId,type:_.transactionType},m);g(A);const U=O(p.state?.pathnameStackToGoBack,p.pathname);g(A,{state:{pathnameStackToGoBack:U}})}}),[m,e]),x=b.useCallback((()=>{y.vendor!=null&&w.trackApAgingDetail("AP Aging",u.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),y.vendor.id,y.vendor.name)}),[y.vendor,u]);return b.useEffect((()=>{E()}),[]),b.useEffect((()=>{y.fetchState==="Completed"&&x()}),[x,y.fetchState]),d.jsx(Uo,{apAgingDetail:y,downloadParams:c,reportDate:u,analytics:w,onTransactionClick:R,onReload:E,onBackClick:I,onColumnSortConfigChanged:k,updateDownloadStateHandler:T,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),ls=()=>{const e=X(),a=H(),t=S((k=>wn(k))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=se({mobileExploreReferrer:"AP Aging"});Ve({isDataReady:t.fetchState==="Completed"});const r=Y.getSignedInUser(),s=S((k=>k.tenantState.currentTenantId)),i=S((k=>B(k))),l=i?.companyName??"",m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},p=b.useMemo((()=>({authParams:m,companyName:l,downloadEndPoint:`${oe}/agingReport`,timezone:He()})),[]),h=t.apAgingUIState.selectedDate??Ee(),f=b.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(ft(h))}),[]);b.useEffect((()=>{f()}),[]);const c=b.useCallback((()=>{a("../",{relative:"path"})}),[]),u=b.useCallback((k=>{e(Qe({searchString:k}))}),[]),C=b.useCallback(((k,T)=>{e(Qe({sortKey:T,sortOrder:k}))}),[]),g=b.useCallback((k=>{a(`./${k}/${h.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[h]),y=b.useCallback((k=>{e(Qe({downloadState:k}))}),[]),E=b.useCallback(((k,T)=>{}),[]),I=b.useCallback(((k,T)=>{e(Qe({selectedDate:k,agingDateSelectionType:T})),e(ft(k))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ge,{analytics:w,onLoad:k=>k.trackPageLoaded(N.Event.agingReport,"AP Aging")}):null,d.jsx(Da,{uiState:t.apAgingUIState,report:t,downloadParams:p,analytics:w,onReloadReport:f,onBackClick:c,onSearchTextChange:u,onSortOrderChange:C,onEntityNameClick:g,updateDownloadStateHandler:y,onSelectedDateChanged:I,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},ds=Ua((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=K(),s=Y.getSignedInUser(),i=S((x=>B(x))),{tenantEmailDomain:l}=K(),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:He()})),[]),c=b.useMemo((()=>r!=null?sa(r):Ee()),[r]),u=X(),C=H(),g=S((x=>xn(x,c,o))),y=b.useCallback((()=>{o!=null&&g.fetchState!=="In-Progress"&&g.fetchState!=="Completed"&&u(Dn(o,c))}),[c]),E=b.useCallback((()=>{C("../../",{relative:"path"})}),[]),I=b.useCallback(((x,_)=>{u(Gt({sortKey:x,sortOrder:_}))}),[]),k=b.useCallback((x=>{u(Gt({downloadState:x}))}),[]),T=b.useCallback((x=>{if(e)e(x.transactionId,x.transactionType);else if(l!=null){const _=La({id:x.transactionId,type:x.transactionType},l);C(_);const A=O(m.state?.pathnameStackToGoBack,m.pathname);C(_,{state:{pathnameStackToGoBack:A}})}}),[l,e]),R=b.useCallback((()=>{g.customer!=null&&w.trackArAgingDetail("AR Aging",c.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),g.customer.id,g.customer.name)}),[g.customer,c]);return b.useEffect((()=>{y()}),[]),b.useEffect((()=>{g.fetchState==="Completed"&&R()}),[g.fetchState,R]),d.jsx(Lo,{arAgingDetail:g,downloadParams:f,reportDate:c,analytics:w,onTransactionClick:T,onReload:y,onBackClick:E,onColumnSortConfigChanged:I,updateDownloadStateHandler:k,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),us=()=>{const e=X(),a=H(),t=S((I=>Pn(I))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=se({mobileExploreReferrer:"AR Aging"});Ve({isDataReady:t.fetchState==="Completed"});const r=Y.getSignedInUser(),s=S((I=>B(I))),i=s.companyName,l={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},m=b.useMemo((()=>({authParams:l,companyName:i,downloadEndPoint:`${oe}/agingReport`,timezone:He()})),[]),p=t.arAgingUIState.selectedDate??Ee(),h=b.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(gt(p))}),[]);b.useEffect((()=>{h()}),[]);const f=b.useCallback((()=>{a("../",{relative:"path"})}),[]),c=b.useCallback((I=>{e(Ze({searchString:I}))}),[]),u=b.useCallback(((I,k)=>{e(Ze({sortKey:k,sortOrder:I}))}),[]),C=b.useCallback((I=>{a(`./${I}/${p.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[p]),g=b.useCallback((I=>{e(Ze({downloadState:I}))}),[]),y=b.useCallback(((I,k)=>{e(Ze({selectedDate:I,agingDateSelectionType:k})),e(gt(I))}),[]),E=b.useCallback(((I,k)=>{e(On({nodeId:I,isCollapsed:k}))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ge,{analytics:w,onLoad:I=>I.trackPageLoaded(N.Event.agingReport,"AR Aging")}):null,d.jsx(Da,{uiState:t.arAgingUIState,report:t,downloadParams:m,analytics:w,onReloadReport:h,onBackClick:f,onSearchTextChange:c,onSortOrderChange:u,onEntityNameClick:C,updateDownloadStateHandler:g,onSelectedDateChanged:y,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Ga=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function Na(e,a){const t=jn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=De(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(Rn(n,o))}}}const ms=ne((function(e){const a=Fn(e).accountsInOrder.map(((t,n)=>Ga(t,n)));return{sectionTitle:q.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,fetchState:e.cashBalanceState.fetchState,analytics:w}}),Na)(Pa),ps=ne((function(e){const a=Mn(e).accountsInOrder.map(((o,r)=>Ga(o,r))),t=Y.getSignedInUser(),n=Je(t);return{sectionTitle:q.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:w}}),Na)(Pa);function hs(){const e=H(),a=W(),{tenantEmailDomain:t}=K(),n=S((o=>B(o).company?.companyInfo.firstMonthOfFY??1));return S((o=>o.cashBalanceState.fetchState))==="Error"?d.jsx(Me,{}):d.jsx(ms,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,firstMonthOfFY:n})}function fs(){const e=H(),a=W(),{tenantEmailDomain:t}=K(),n=S((o=>B(o).company?.companyInfo.firstMonthOfFY??1));return S((o=>o.cardBalanceState.fetchState))==="Error"?d.jsx(Me,{}):d.jsx(ps,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,firstMonthOfFY:n})}const gs=wt.div`
1
+ import{j as d}from"./liveblocks-CzCs-qU3.js";import{i as K,j as S,g as W,u as X,h as H,l as ne,k as oa,n as ht,o as P,N as vn}from"./core-BBG4mxvC.js";import{fI as B,V$ as He,bF as sa,br as Ee,Xn as En,kd as Tn,Xo as Vt,Xp as wn,kg as ft,Xq as Qe,Xr as xn,kl as Dn,Xs as Gt,Xt as Pn,kp as gt,Xu as Ze,Xv as On,Xw as Fn,Wj as jn,lr as Rn,Xx as Mn,bn as Je,Xy as ra,WZ as le,bc as ia,lF as ca,lo as la,W$ as de,W_ as ae,fH as da,gd as Bn,gt as bt,Xz as Yn,XA as Un,XB as ua,XC as Oe,E5 as Be,E6 as Ye,Eu as Te,Eo as ue,Ea as Ue,XD as Ln,c0 as Le,XE as Vn,XF as Gn,XG as ma,XH as Fe,XI as Nn,ek as et,Ag as pa,XJ as $n,XK as ha,XL as Xn,XM as zn,XN as Kn,XO as _t,UX as St,ug as we,m2 as xe,EE as kt,An as qn,Au as Qn,XP as Zn,XQ as Wn,E7 as Nt,XR as Hn,Aj as Ie,Ae as fa,XS as ge,XT as $t,XU as Jn,XV as yt,UW as At,Cr as ga,XW as eo,XX as ba,XY as to,XZ as ao,X_ as no,X$ as It,CG as oo,CN as so,Y0 as ro,Y1 as io,E9 as Xt,Y2 as co,Cp as Ca,Y3 as be,Y4 as zt,Y5 as lo,bq as _a,EJ as Sa,Y6 as uo,Y7 as ka,Y8 as mo,Y9 as po,Ya as ho,Yb as vt,EB as fo,ED as go,Yc as bo,Yd as Co,E8 as Kt,Ye as _o,EH as ya,Yf as Ce,Yg as qt,Yh as So,Yi as ko,Yj as Aa,lT as Ia,p_ as va,lY as Ea,pY as Ta,pX as wa,pW as xa,BO as yo,dd as Ao,pT as Io,Ui as vo,q8 as Eo,Yk as To,Yl as wo,Ym as xo,b5 as Et,q2 as Do,ig as Po,gL as Oo,q1 as Fo,lh as jo,p$ as Ro,pZ as Mo,e0 as Bo,d$ as Yo}from"./zeni-epic-state-FRanwwFO.js";import{z as Y,av as oe,p as O,j as w,G as q,bb as Uo,as as Ve,a8 as Ge,bc as Da,T as N,bd as Lo,be as Pa,E as Vo,bf as Go,bg as No,a as Oa,a1 as Fa,e as ja,ar as $o,bh as Xo,ao as zo,c as Tt,bi as Ra,C as re,bj as Ma,bk as Ba,au as Ya,bl as Ko,ai as Ne,_ as $e,bm as qo,P as Qo,bn as Zo,m as G,k as Wo,l as Ho,a4 as Jo,aq as es,bo as ts,bp as as,bq as ns,br as ve}from"./index-BhDgyETA.js";import{n as wt}from"./mui-B2F_PvWe.js";import{a as b}from"./sentry-CWp8Ph3h.js";import{w as Ua}from"./withTransactionSidePanel-DG1lldsp.js";import{c as La,t as De,f as me,b as xt,a as Dt,v as os}from"./routePaths-BvbR2--r.js";import{u as se}from"./useAskAiCfoHostNavButtonProps-BmnPs4uO.js";import Me from"./NotFoundScreen-Cw8n2XQn.js";import{u as Pt}from"./useInitialThreadRequest-CdCPw0ds.js";import{t as Va}from"./analyticsHelper-B0PgYJQ4.js";import{C as ss}from"./CompanyPassportScreen-RZ6JI1G1.js";import{u as rs}from"./useAiCfoDashboardSuggestedQuestionsChips-BsM9KkGc.js";import{F as is}from"./FeaturePreviewScreen-hmh5qa1F.js";import"./recharts-CzGMTm3v.js";import"./analytics-cC2XJoxx.js";import"./plaid-BWZxX3Bn.js";import"./dnd-oIrpOltC.js";import"./stripe-cKAAJElX.js";import"./lottie-ULJlrwjP.js";import"./lexical-BRrdO5Cu.js";import"./pdf-CeVn9A9c.js";import"./utils-u0mlLj2I.js";import"./TransactionDetailScreen-DSLjb6UM.js";import"./decodeURIComponentSafe-DgKmvHaP.js";import"./expenseAutomationHelper-BkZxz0F-.js";import"./stripSplatSuffix-BWJSV6oD.js";import"./MobileAppDrawer-jPjMoXMc.js";import"./InboxNotificationsProvider-J2K-16R3.js";import"./useTaskManagerAccess-ljLSKJCt.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]="d41865a2-4fd5-455b-99db-2b87d745c1e1",e._sentryDebugIdIdentifier="sentry-dbid-d41865a2-4fd5-455b-99db-2b87d745c1e1")}catch{}})();const cs=Ua((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=K(),s=Y.getSignedInUser(),i=S((_=>_.tenantState.currentTenantId)),l=S((_=>B(_))),{tenantEmailDomain:m}=K(),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:He()})),[]),u=b.useMemo((()=>r!=null?sa(r):Ee()),[r]),C=X(),g=H(),y=S((_=>En(_,u,o))),E=b.useCallback((()=>{o!=null&&y.fetchState!=="In-Progress"&&y.fetchState!=="Completed"&&C(Tn(o,u))}),[u]),I=b.useCallback((()=>{g("../../",{relative:"path"})}),[]),k=b.useCallback(((_,A)=>{C(Vt({sortKey:_,sortOrder:A}))}),[]),T=b.useCallback((_=>{C(Vt({downloadState:_}))}),[]),R=b.useCallback((_=>{if(e)e(_.transactionId,_.transactionType);else if(m!=null){const A=La({id:_.transactionId,type:_.transactionType},m);g(A);const U=O(p.state?.pathnameStackToGoBack,p.pathname);g(A,{state:{pathnameStackToGoBack:U}})}}),[m,e]),x=b.useCallback((()=>{y.vendor!=null&&w.trackApAgingDetail("AP Aging",u.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),y.vendor.id,y.vendor.name)}),[y.vendor,u]);return b.useEffect((()=>{E()}),[]),b.useEffect((()=>{y.fetchState==="Completed"&&x()}),[x,y.fetchState]),d.jsx(Uo,{apAgingDetail:y,downloadParams:c,reportDate:u,analytics:w,onTransactionClick:R,onReload:E,onBackClick:I,onColumnSortConfigChanged:k,updateDownloadStateHandler:T,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),ls=()=>{const e=X(),a=H(),t=S((k=>wn(k))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=se({mobileExploreReferrer:"AP Aging"});Ve({isDataReady:t.fetchState==="Completed"});const r=Y.getSignedInUser(),s=S((k=>k.tenantState.currentTenantId)),i=S((k=>B(k))),l=i?.companyName??"",m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},p=b.useMemo((()=>({authParams:m,companyName:l,downloadEndPoint:`${oe}/agingReport`,timezone:He()})),[]),h=t.apAgingUIState.selectedDate??Ee(),f=b.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(ft(h))}),[]);b.useEffect((()=>{f()}),[]);const c=b.useCallback((()=>{a("../",{relative:"path"})}),[]),u=b.useCallback((k=>{e(Qe({searchString:k}))}),[]),C=b.useCallback(((k,T)=>{e(Qe({sortKey:T,sortOrder:k}))}),[]),g=b.useCallback((k=>{a(`./${k}/${h.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[h]),y=b.useCallback((k=>{e(Qe({downloadState:k}))}),[]),E=b.useCallback(((k,T)=>{}),[]),I=b.useCallback(((k,T)=>{e(Qe({selectedDate:k,agingDateSelectionType:T})),e(ft(k))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ge,{analytics:w,onLoad:k=>k.trackPageLoaded(N.Event.agingReport,"AP Aging")}):null,d.jsx(Da,{uiState:t.apAgingUIState,report:t,downloadParams:p,analytics:w,onReloadReport:f,onBackClick:c,onSearchTextChange:u,onSortOrderChange:C,onEntityNameClick:g,updateDownloadStateHandler:y,onSelectedDateChanged:I,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},ds=Ua((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=K(),s=Y.getSignedInUser(),i=S((x=>B(x))),{tenantEmailDomain:l}=K(),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:He()})),[]),c=b.useMemo((()=>r!=null?sa(r):Ee()),[r]),u=X(),C=H(),g=S((x=>xn(x,c,o))),y=b.useCallback((()=>{o!=null&&g.fetchState!=="In-Progress"&&g.fetchState!=="Completed"&&u(Dn(o,c))}),[c]),E=b.useCallback((()=>{C("../../",{relative:"path"})}),[]),I=b.useCallback(((x,_)=>{u(Gt({sortKey:x,sortOrder:_}))}),[]),k=b.useCallback((x=>{u(Gt({downloadState:x}))}),[]),T=b.useCallback((x=>{if(e)e(x.transactionId,x.transactionType);else if(l!=null){const _=La({id:x.transactionId,type:x.transactionType},l);C(_);const A=O(m.state?.pathnameStackToGoBack,m.pathname);C(_,{state:{pathnameStackToGoBack:A}})}}),[l,e]),R=b.useCallback((()=>{g.customer!=null&&w.trackArAgingDetail("AR Aging",c.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),g.customer.id,g.customer.name)}),[g.customer,c]);return b.useEffect((()=>{y()}),[]),b.useEffect((()=>{g.fetchState==="Completed"&&R()}),[g.fetchState,R]),d.jsx(Lo,{arAgingDetail:g,downloadParams:f,reportDate:c,analytics:w,onTransactionClick:T,onReload:y,onBackClick:E,onColumnSortConfigChanged:I,updateDownloadStateHandler:k,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),us=()=>{const e=X(),a=H(),t=S((I=>Pn(I))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=se({mobileExploreReferrer:"AR Aging"});Ve({isDataReady:t.fetchState==="Completed"});const r=Y.getSignedInUser(),s=S((I=>B(I))),i=s.companyName,l={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},m=b.useMemo((()=>({authParams:l,companyName:i,downloadEndPoint:`${oe}/agingReport`,timezone:He()})),[]),p=t.arAgingUIState.selectedDate??Ee(),h=b.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(gt(p))}),[]);b.useEffect((()=>{h()}),[]);const f=b.useCallback((()=>{a("../",{relative:"path"})}),[]),c=b.useCallback((I=>{e(Ze({searchString:I}))}),[]),u=b.useCallback(((I,k)=>{e(Ze({sortKey:k,sortOrder:I}))}),[]),C=b.useCallback((I=>{a(`./${I}/${p.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[p]),g=b.useCallback((I=>{e(Ze({downloadState:I}))}),[]),y=b.useCallback(((I,k)=>{e(Ze({selectedDate:I,agingDateSelectionType:k})),e(gt(I))}),[]),E=b.useCallback(((I,k)=>{e(On({nodeId:I,isCollapsed:k}))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ge,{analytics:w,onLoad:I=>I.trackPageLoaded(N.Event.agingReport,"AR Aging")}):null,d.jsx(Da,{uiState:t.arAgingUIState,report:t,downloadParams:m,analytics:w,onReloadReport:h,onBackClick:f,onSearchTextChange:c,onSortOrderChange:u,onEntityNameClick:C,updateDownloadStateHandler:g,onSelectedDateChanged:y,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Ga=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function Na(e,a){const t=jn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=De(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(Rn(n,o))}}}const ms=ne((function(e){const a=Fn(e).accountsInOrder.map(((t,n)=>Ga(t,n)));return{sectionTitle:q.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,fetchState:e.cashBalanceState.fetchState,analytics:w}}),Na)(Pa),ps=ne((function(e){const a=Mn(e).accountsInOrder.map(((o,r)=>Ga(o,r))),t=Y.getSignedInUser(),n=Je(t);return{sectionTitle:q.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:w}}),Na)(Pa);function hs(){const e=H(),a=W(),{tenantEmailDomain:t}=K(),n=S((o=>B(o).company?.companyInfo.firstMonthOfFY??1));return S((o=>o.cashBalanceState.fetchState))==="Error"?d.jsx(Me,{}):d.jsx(ms,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,firstMonthOfFY:n})}function fs(){const e=H(),a=W(),{tenantEmailDomain:t}=K(),n=S((o=>B(o).company?.companyInfo.firstMonthOfFY??1));return S((o=>o.cardBalanceState.fetchState))==="Error"?d.jsx(Me,{}):d.jsx(ps,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,firstMonthOfFY:n})}const gs=wt.div`
2
2
  display: flex;
3
3
  flex: 1 1 auto;
4
4
  min-height: 100%;
@@ -1 +1 @@
1
- import{j as v}from"./liveblocks-CzCs-qU3.js";import{a as u}from"./sentry-CWp8Ph3h.js";import{u as y,j as b,l as U,g as w,N as A}from"./core-BBG4mxvC.js";import{U1 as N,fI as _,go as k,U2 as L,pV as R,U3 as z}from"./zeni-epic-state-FRanwwFO.js";import{u as j,z as f,L as T,t as I,G as O,b as $}from"./index-De2R2YuA.js";import"./mui-B2F_PvWe.js";import{t as P}from"./getLocaleForTenant-BYuz_wJa.js";import"./recharts-CzGMTm3v.js";import"./analytics-cC2XJoxx.js";import"./plaid-BWZxX3Bn.js";import"./dnd-oIrpOltC.js";import"./stripe-cKAAJElX.js";import"./lottie-ULJlrwjP.js";import"./lexical-BRrdO5Cu.js";import"./pdf-CeVn9A9c.js";import"./utils-u0mlLj2I.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]="447ace2f-b847-415e-8589-13f2424a61c7",t._sentryDebugIdIdentifier="sentry-dbid-447ace2f-b847-415e-8589-13f2424a61c7")}catch{}})();const G=U((function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}}))((function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=w(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map((l=>l.tenantEmailDomain)),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,S=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,m="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce(((l,F)=>l||i.split("/").find((D=>D===F))!=null),!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,S=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=$(c,p);return v.jsx(A,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:S}})}}));function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=j(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b((e=>N(e))),n=b((e=>e.tenantState.fetchState)),i=b((e=>e.tenantState.error)),a=b((e=>e.tenantState.activeTenantFetchState.fetchState)),c=b((e=>_(e))),d=f.getSignedInUser();return u.useLayoutEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,h.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)}),[a,n]),u.useEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&I.shouldFetchActiveTenant(e)&&(h.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(k(d.userId,e))))}),[n,a,d,t]),u.useEffect((()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,S=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&S&&I.shouldFetchAllTenants()&&(r.current=!0,I.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!L(i))&&t(R(e.userId)))}),[n,a,i,d,t]),u.useEffect((()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())}),[m.tenantsCoreDetailsInOrder,n]),u.useEffect((()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(O.updateAppLocaleID(P(c)),o())}),[n,a,c]),v.jsx(G,{})}const Q=["dashboard/cash-balance","dashboard/card-balance","dashboard/operating-expenses","dashboard/revenue","dashboard/burn-rate","dashboard/cash-position","dashboard/top-expenses","dashboard/cash-in-cash-out","dashboard","reports","forecast","uncategorized-expense","uncategorized-income","missing-receipts","bills","cards/activate","cards","reimbursements","wise","checking","aicfo"],V={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of Q)if(t.toLocaleLowerCase().includes(s))return V[s]}export{oe as default};
1
+ import{j as v}from"./liveblocks-CzCs-qU3.js";import{a as u}from"./sentry-CWp8Ph3h.js";import{u as y,j as b,l as U,g as w,N as A}from"./core-BBG4mxvC.js";import{U1 as N,fI as _,go as k,U2 as L,pV as R,U3 as z}from"./zeni-epic-state-FRanwwFO.js";import{u as j,z as f,L as T,t as I,G as O,b as $}from"./index-BhDgyETA.js";import"./mui-B2F_PvWe.js";import{t as P}from"./getLocaleForTenant-DnBPPnzL.js";import"./recharts-CzGMTm3v.js";import"./analytics-cC2XJoxx.js";import"./plaid-BWZxX3Bn.js";import"./dnd-oIrpOltC.js";import"./stripe-cKAAJElX.js";import"./lottie-ULJlrwjP.js";import"./lexical-BRrdO5Cu.js";import"./pdf-CeVn9A9c.js";import"./utils-u0mlLj2I.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]="447ace2f-b847-415e-8589-13f2424a61c7",t._sentryDebugIdIdentifier="sentry-dbid-447ace2f-b847-415e-8589-13f2424a61c7")}catch{}})();const G=U((function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}}))((function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=w(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map((l=>l.tenantEmailDomain)),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,S=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,m="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce(((l,F)=>l||i.split("/").find((D=>D===F))!=null),!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,S=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=$(c,p);return v.jsx(A,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:S}})}}));function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=j(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b((e=>N(e))),n=b((e=>e.tenantState.fetchState)),i=b((e=>e.tenantState.error)),a=b((e=>e.tenantState.activeTenantFetchState.fetchState)),c=b((e=>_(e))),d=f.getSignedInUser();return u.useLayoutEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,h.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)}),[a,n]),u.useEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&I.shouldFetchActiveTenant(e)&&(h.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(k(d.userId,e))))}),[n,a,d,t]),u.useEffect((()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,S=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&S&&I.shouldFetchAllTenants()&&(r.current=!0,I.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!L(i))&&t(R(e.userId)))}),[n,a,i,d,t]),u.useEffect((()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())}),[m.tenantsCoreDetailsInOrder,n]),u.useEffect((()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(O.updateAppLocaleID(P(c)),o())}),[n,a,c]),v.jsx(G,{})}const Q=["dashboard/cash-balance","dashboard/card-balance","dashboard/operating-expenses","dashboard/revenue","dashboard/burn-rate","dashboard/cash-position","dashboard/top-expenses","dashboard/cash-in-cash-out","dashboard","reports","forecast","uncategorized-expense","uncategorized-income","missing-receipts","bills","cards/activate","cards","reimbursements","wise","checking","aicfo"],V={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of Q)if(t.toLocaleLowerCase().includes(s))return V[s]}export{oe as default};
@@ -1,4 +1,4 @@
1
- import{j as l}from"./liveblocks-CzCs-qU3.js";import{h as w,g as C,j as h,l as A,i as V}from"./core-BBG4mxvC.js";import{Z0 as k,Z7 as W,gJ as J,gI as M,gH as Q,kS as Y,W_ as q,uU as K,fI as B,Yz as D,kQ as T,Z1 as S,Za as F,kO as G,l9 as j}from"./zeni-epic-state-FRanwwFO.js";import{bN as L,a1 as N,c as R,z as Z,E as U,a4 as p,m as v,a7 as O,bO as X,M as _,bP as ee,p as te}from"./index-De2R2YuA.js";import{n as z}from"./mui-B2F_PvWe.js";import"./sentry-CWp8Ph3h.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]="dd6f1e5a-29af-4794-8d46-fc686198bee2",e._sentryDebugIdIdentifier="sentry-dbid-dd6f1e5a-29af-4794-8d46-fc686198bee2")}catch{}})();const ae=A(null,(function(e,t){return{onSaveVendor:a=>{e(Y(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(q("common")),a!=null&&e(K(a))},onGetOtp:a=>{e(Q(a,"BillPayVendor"))},onResendOtp:a=>{e(M(a,"BillPayVendor"))},onVerifyOtp:(a,n)=>{e(J(a,n,"BillPayVendor"))},onVerifyOtpSuccess:(a,n,o)=>{e(W(a,n,o))}}}))(L);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-CzCs-qU3.js";import{h as w,g as C,j as h,l as A,i as V}from"./core-BBG4mxvC.js";import{Z0 as k,Z7 as W,gJ as J,gI as M,gH as Q,kS as Y,W_ as q,uU as K,fI as B,Yz as D,kQ as T,Z1 as S,Za as F,kO as G,l9 as j}from"./zeni-epic-state-FRanwwFO.js";import{bN as L,a1 as N,c as R,z as Z,E as U,a4 as p,m as v,a7 as O,bO as X,M as _,bP as ee,p as te}from"./index-BhDgyETA.js";import{n as z}from"./mui-B2F_PvWe.js";import"./sentry-CWp8Ph3h.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]="dd6f1e5a-29af-4794-8d46-fc686198bee2",e._sentryDebugIdIdentifier="sentry-dbid-dd6f1e5a-29af-4794-8d46-fc686198bee2")}catch{}})();const ae=A(null,(function(e,t){return{onSaveVendor:a=>{e(Y(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(q("common")),a!=null&&e(K(a))},onGetOtp:a=>{e(Q(a,"BillPayVendor"))},onResendOtp:a=>{e(M(a,"BillPayVendor"))},onVerifyOtp:(a,n)=>{e(J(a,n,"BillPayVendor"))},onVerifyOtpSuccess:(a,n,o)=>{e(W(a,n,o))}}}))(L);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-CzCs-qU3.js";import{a1 as c,ab as l,E as f}from"./index-De2R2YuA.js";import{D as p}from"./mui-B2F_PvWe.js";import"./sentry-CWp8Ph3h.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-CzCs-qU3.js";import{a1 as c,ab as l,E as f}from"./index-BhDgyETA.js";import{D as p}from"./mui-B2F_PvWe.js";import"./sentry-CWp8Ph3h.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-CzCs-qU3.js";import{a as d}from"./sentry-CWp8Ph3h.js";import{h as B,u as G,g as A,i as q,j as c,N as F,l as _,n as N,o as O}from"./core-BBG4mxvC.js";import{X3 as R,fI as $,Wk as M,n2 as X,Sl as k,X8 as Y,WZ as z,m2 as V,Sm as S,Wp as Z,Wq as H,W$ as J,W_ as K}from"./zeni-epic-state-FRanwwFO.js";import{b8 as L,j as Q,a4 as U,p as tt}from"./index-De2R2YuA.js";import"./mui-B2F_PvWe.js";import{d as b}from"./decodeURIComponentSafe-DgKmvHaP.js";import{w as et}from"./withTransactionSidePanel-CbnU34fe.js";import{f as at,c as nt}from"./routePaths-BRju88LA.js";import"./recharts-CzGMTm3v.js";import"./analytics-cC2XJoxx.js";import"./plaid-BWZxX3Bn.js";import"./dnd-oIrpOltC.js";import"./stripe-cKAAJElX.js";import"./lottie-ULJlrwjP.js";import"./lexical-BRrdO5Cu.js";import"./pdf-CeVn9A9c.js";import"./utils-u0mlLj2I.js";import"./useAskAiCfoHostNavButtonProps-Bq-fQXG8.js";import"./TransactionDetailScreen-hIkUAVjY.js";import"./useInitialThreadRequest-C1rKRZSH.js";import"./expenseAutomationHelper-BkZxz0F-.js";import"./stripSplatSuffix-BWJSV6oD.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]="ca3bb1e9-fa4c-4062-a411-b043bd85351c",a._sentryDebugIdIdentifier="sentry-dbid-ca3bb1e9-fa4c-4062-a411-b043bd85351c")}catch{}})();const ot=_((function(a,t){const e=t.entity,o=Y(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:z(a,"common")},trendWithTransactionsReport:o,analytics:Q,isAccountingClassesEnabled:V(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(J({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(K("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(Z()),a(H()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=U(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}))}}}}))(L),it=et((function({entityType:a,...t}){const e=B(),o=G(),l=A(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:x,entityNameEncoded:W}=q(),r=b(x??""),p=b(W??""),u=rt(r,p),j=[r,p].filter((n=>n!=null)),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=c((n=>R(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),v=c((n=>$(n).company?.companyInfo.firstMonthOfFY??1)),f=c((n=>M(n.trendWithTransactionsState,i,"EntityDetail")));d.useEffect((()=>{m===!1&&u===!0&&(T(!0),o(X(i)))}),[m,u,i]);const E=c((n=>n.trendState.fetchState)),P=f?.selectedPeriod?.timePeriod??g,w=(function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y})(f?.selectedPeriod?.timePeriod,g);return d.useEffect((()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(k(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))}),[m,h,E]),u?s.jsx(ot,{firstMonthOfFY:v,tenantEmailDomain:C,location:l,navigate:e,entity:i,defaultTransactionTimePeriod:w,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(F,{to:I(j.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 vt({entityType:a}){return s.jsx(N,{children:s.jsx(O,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{vt as EntityDetailRoutes,vt as default};
1
+ import{j as s}from"./liveblocks-CzCs-qU3.js";import{a as d}from"./sentry-CWp8Ph3h.js";import{h as B,u as G,g as A,i as q,j as c,N as F,l as _,n as N,o as O}from"./core-BBG4mxvC.js";import{X3 as R,fI as $,Wk as M,n2 as X,Sl as k,X8 as Y,WZ as z,m2 as V,Sm as S,Wp as Z,Wq as H,W$ as J,W_ as K}from"./zeni-epic-state-FRanwwFO.js";import{b8 as L,j as Q,a4 as U,p as tt}from"./index-BhDgyETA.js";import"./mui-B2F_PvWe.js";import{d as b}from"./decodeURIComponentSafe-DgKmvHaP.js";import{w as et}from"./withTransactionSidePanel-DG1lldsp.js";import{f as at,c as nt}from"./routePaths-BvbR2--r.js";import"./recharts-CzGMTm3v.js";import"./analytics-cC2XJoxx.js";import"./plaid-BWZxX3Bn.js";import"./dnd-oIrpOltC.js";import"./stripe-cKAAJElX.js";import"./lottie-ULJlrwjP.js";import"./lexical-BRrdO5Cu.js";import"./pdf-CeVn9A9c.js";import"./utils-u0mlLj2I.js";import"./useAskAiCfoHostNavButtonProps-BmnPs4uO.js";import"./TransactionDetailScreen-DSLjb6UM.js";import"./useInitialThreadRequest-CdCPw0ds.js";import"./expenseAutomationHelper-BkZxz0F-.js";import"./stripSplatSuffix-BWJSV6oD.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]="ca3bb1e9-fa4c-4062-a411-b043bd85351c",a._sentryDebugIdIdentifier="sentry-dbid-ca3bb1e9-fa4c-4062-a411-b043bd85351c")}catch{}})();const ot=_((function(a,t){const e=t.entity,o=Y(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:z(a,"common")},trendWithTransactionsReport:o,analytics:Q,isAccountingClassesEnabled:V(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(J({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(K("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(Z()),a(H()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=U(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}))}}}}))(L),it=et((function({entityType:a,...t}){const e=B(),o=G(),l=A(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:x,entityNameEncoded:W}=q(),r=b(x??""),p=b(W??""),u=rt(r,p),j=[r,p].filter((n=>n!=null)),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=c((n=>R(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),v=c((n=>$(n).company?.companyInfo.firstMonthOfFY??1)),f=c((n=>M(n.trendWithTransactionsState,i,"EntityDetail")));d.useEffect((()=>{m===!1&&u===!0&&(T(!0),o(X(i)))}),[m,u,i]);const E=c((n=>n.trendState.fetchState)),P=f?.selectedPeriod?.timePeriod??g,w=(function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y})(f?.selectedPeriod?.timePeriod,g);return d.useEffect((()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(k(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))}),[m,h,E]),u?s.jsx(ot,{firstMonthOfFY:v,tenantEmailDomain:C,location:l,navigate:e,entity:i,defaultTransactionTimePeriod:w,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(F,{to:I(j.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 vt({entityType:a}){return s.jsx(N,{children:s.jsx(O,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{vt as EntityDetailRoutes,vt as default};
@@ -1,4 +1,4 @@
1
- import{j as k}from"./liveblocks-CzCs-qU3.js";import{u as ge,h as nt,g as be,j as F,i as Be,t as Jn,l as Yn,n as Hn,o as We,N as Wn}from"./core-BBG4mxvC.js";import{fI as ke,a1a as Kn,q3 as Me,Uk as Qn,A9 as Xn,a1b as Zn,a1c as es,a1d as ts,a1e as Ct,a1f as Qe,gk as Tt,a1g as ia,eY as as,g3 as ns,a1h as la,a1i as Xe,qW as ss,uX as os,gV as cs,gT as is,a1j as ls,r7 as rs,rg as ds,qe as us,qs as Ra,gS as ue,gU as ms,a1k as ps,qO as Da,rh as hs,qp as Ss,qk as gs,v1 as Cs,gR as Oe,a1l as tt,Cj as Fa,MG as _a,a1m as Ma,FE as Oa,a1n as fs,f0 as Is,f2 as ks,sY as Pt,X4 as ra,X6 as bs,m5 as Ts,X7 as Ps,mc as ys,dm as vs,DC as yt,a1o as Es,a1p as As,a1q as xs,a1r as ws,fp as vt,sM as da,WZ as Rs,a1s as Ds,a1t as Fs,me as _s,a1u as Ms,Rm as Os,md as Us,m2 as Bs,qH as Ua,rm as at,tz as Ba,tV as Vs,Ua as Va,rl as ua,ro as ja,rq as js,bF as zs,nB as Ls,ny as $s,rp as Ze,rn as Se,a1v as Gs,rH as ma,a1w as Ns,a1x as qs,sQ as Js,sR as Ys,WV as Hs,V$ as Ws,a0E as Ks,a1y as Qs,W$ as pa,W_ as Ke,a1z as ha,mt as Xs,a1A as Zs,a1B as eo,a1C as to,a1D as ao,qC as no,a1E as so,a1F as oo,a1G as co,rx as io,mg as lo,m7 as ro,a1H as uo,mf as Sa,Xh as mo,a1I as po,a1J as ho,uy as So,u9 as go,u8 as ft,a1K as Co,a1L as fo,a1M as Io,a1N as ko,nM as bo,br as To,nH as ga,nt as Po,a1O as yo,h2 as vo,nE as Eo,s_ as Ao,t0 as xo,sJ as wo,W2 as Ro,W3 as Do,F6 as Fo,F5 as _o,Fm as Mo,a1P as Ca,sP as Oo,sk as Uo,a1Q as Bo,s0 as Vo,s5 as jo,sg as zo,s3 as Lo,a1R as $o,rY as Go,sf as No,sV as qo,a1S as Jo,t6 as Yo,sD as Ho,tc as Wo,sI as Ko,rI as Qo,a1T as Xo,q_ as Zo,qy as ec,qF as fa,rs as tc,a1U as ac,a1V as nc,a1W as sc,a1X as oc,a1Y as cc,a1Z as ic,a1_ as lc,tg as rc,a1$ as dc,a20 as uc,a21 as Ia,uJ as mc,u0 as pc,tR as ka,tP as hc,a22 as Sc,tE as gc,tj as Cc,tS as fc,a23 as Ic,a24 as kc,tp as bc,a25 as Tc,tk as Pc,to as yc,tm as vc,tY as Ec}from"./zeni-epic-state-FRanwwFO.js";import za from"./NotFoundScreen-BXryZNID.js";import{a as s,R as La}from"./sentry-CWp8Ph3h.js";import{n as Te,S as Ac}from"./mui-B2F_PvWe.js";import{c as Ve,m as H,j as W,p as ee,aq as $a,as as Ga,dO as xc,dP as wc,z as st,dQ as Rc,dR as Dc,dS as Fc,ae as Ue,dT as _c,dU as ba,ba as Ta,dV as Mc,a7 as Na,dW as Oc,l as et,a as Uc,dX as Bc,dY as Vc,Z as jc,_ as zc,dZ as Lc,d_ as $c,d$ as Gc,b4 as Nc,bs as qc,ab as Jc,b5 as Yc,b6 as Hc,G as Wc,w as Kc,e0 as Qc,av as Pa,e1 as Xc}from"./index-De2R2YuA.js";import{u as qa}from"./useAskAiCfoHostNavButtonProps-Bq-fQXG8.js";import{g as ya,b as Zc,c as ei,h as ti,a as ai,i as ni,r as si,C as oi}from"./TransactionDetailScreen-hIkUAVjY.js";import{u as ci,a as ii}from"./useActualMatchingMatchDetail-lnPRleqr.js";import{d as li}from"./decodeURIComponentSafe-DgKmvHaP.js";import{m as Ja,a as Ya}from"./expenseAutomationHelper-BkZxz0F-.js";import{u as Ha,a as Wa,w as ri}from"./withTransactionSidePanel-CbnU34fe.js";import{b as di,S as ui,a as mi,J as pi}from"./ScheduleDetailsPrepaidExpensesScreen-CuQHddsr.js";import{s as va,i as Ka,h as hi,v as Si,c as gi}from"./routePaths-BRju88LA.js";import{a as It}from"./accountMappingHelper-mjWJVrZb.js";import{D as Ci}from"./DrawerScreen-Uxjfm6D_.js";import"./recharts-CzGMTm3v.js";import"./analytics-cC2XJoxx.js";import"./plaid-BWZxX3Bn.js";import"./dnd-oIrpOltC.js";import"./stripe-cKAAJElX.js";import"./lottie-ULJlrwjP.js";import"./lexical-BRrdO5Cu.js";import"./pdf-CeVn9A9c.js";import"./utils-u0mlLj2I.js";import"./useInitialThreadRequest-C1rKRZSH.js";import"./stripSplatSuffix-BWJSV6oD.js";import"./pathToGoBack-e0pJACvC.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]="bb7c6e7b-e52a-46a2-89c5-53658d2067c5",t._sentryDebugIdIdentifier="sentry-dbid-bb7c6e7b-e52a-46a2-89c5-53658d2067c5")}catch{}})();const fi=()=>{const t=ge(),n=nt(),S=be(),g=F((p=>ke(p))),{useFeatureGate:d}=Ve(),{isFeatureEnabled:i}=d(H.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=d(H.aiAuditScorePercentage),A=F((p=>p.expenseAutomationViewState.selectedPeriodByTenantId)),l=F((p=>Kn(p,g.tenantId))),{isAiCfoAccessEnabled:v,onAskAiCfoClick:x}=qa({mobileExploreReferrer:"Month-End Close Overview"}),T=s.useCallback(((p,P,_=!1)=>{t(Me({tenantId:P,period:{month:p.month,year:p.year},refreshViewInBackground:_}))}),[]),C=s.useCallback((p=>{const P=S.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&W.trackMonthCloseAuditPage(p.month,p.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,P??null),t(Qn(g.tenantId,p))}),[g.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),f=A[g.tenantId],m=s.useCallback((()=>{const p=S.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&W.trackMonthCloseAuditPage(f.month,f.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,p??null),T(f,g.tenantId,!0)}),[T,f,g.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),z=ee(S.state?.pathnameStackToGoBack,S.pathname),w=s.useCallback((()=>{if(l.monthEndCloseChecks!=null&&f!=null){const p=l.monthEndCloseChecks.monthEndCloseCheckList.find((P=>P.progress<100));if(p!=null)return void n(`./${p.id}/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:z,message:"comingFromOverview"}});n(`./month_end_insights/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:z,message:"comingFromOverview"}})}}),[l.monthEndCloseChecks,f]),{areTenantIdsInSync:I}=$a();return Ga({isDataReady:l.fetchState==="Completed"}),s.useEffect((()=>{f!=null&&l.fetchState!=="In-Progress"&&l.fetchState!=="Completed"&&I&&T(f,g.tenantId)}),[T,f,l.fetchState,g.tenantId,I]),s.useEffect((()=>{f!=null&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&I&&t(Xn(f))}),[f,l.monthClosePerformanceTrendFetchStatus.fetchState,I]),s.useEffect((()=>{const p=setInterval((()=>{l.fetchState!=="In-Progress"&&l.fetchState==="Completed"&&m()}),3e5);return()=>clearInterval(p)}),[l.fetchState]),s.useEffect((()=>{if(l.fetchState==="Completed"&&l.monthEndCloseChecks?.auditSummary!=null){const p=S.state?.referrer;W.trackMonthCloseAuditPage(l.selectedPeriod.month,l.selectedPeriod.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,p??null)}}),[l.fetchState,l.selectedPeriod,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),k.jsx(Ii,{children:k.jsx(xc,{monthEndCloseChecksView:l,isRealtimeInsightsFeatureEnabled:i,onMonthEndCheckClick:p=>{n(`./${p}/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:z,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:C,handleReviewButtonClick:w,onBackClick:()=>{n("../../dashboard")},onReload:m,isAiCfoAccessEnabled:v,onAskAiCfoClick:x,aiAuditScorePercentageEnabled:r})})},Ii=Te.div`
1
+ import{j as k}from"./liveblocks-CzCs-qU3.js";import{u as ge,h as nt,g as be,j as F,i as Be,t as Jn,l as Yn,n as Hn,o as We,N as Wn}from"./core-BBG4mxvC.js";import{fI as ke,a1a as Kn,q3 as Me,Uk as Qn,A9 as Xn,a1b as Zn,a1c as es,a1d as ts,a1e as Ct,a1f as Qe,gk as Tt,a1g as ia,eY as as,g3 as ns,a1h as la,a1i as Xe,qW as ss,uX as os,gV as cs,gT as is,a1j as ls,r7 as rs,rg as ds,qe as us,qs as Ra,gS as ue,gU as ms,a1k as ps,qO as Da,rh as hs,qp as Ss,qk as gs,v1 as Cs,gR as Oe,a1l as tt,Cj as Fa,MG as _a,a1m as Ma,FE as Oa,a1n as fs,f0 as Is,f2 as ks,sY as Pt,X4 as ra,X6 as bs,m5 as Ts,X7 as Ps,mc as ys,dm as vs,DC as yt,a1o as Es,a1p as As,a1q as xs,a1r as ws,fp as vt,sM as da,WZ as Rs,a1s as Ds,a1t as Fs,me as _s,a1u as Ms,Rm as Os,md as Us,m2 as Bs,qH as Ua,rm as at,tz as Ba,tV as Vs,Ua as Va,rl as ua,ro as ja,rq as js,bF as zs,nB as Ls,ny as $s,rp as Ze,rn as Se,a1v as Gs,rH as ma,a1w as Ns,a1x as qs,sQ as Js,sR as Ys,WV as Hs,V$ as Ws,a0E as Ks,a1y as Qs,W$ as pa,W_ as Ke,a1z as ha,mt as Xs,a1A as Zs,a1B as eo,a1C as to,a1D as ao,qC as no,a1E as so,a1F as oo,a1G as co,rx as io,mg as lo,m7 as ro,a1H as uo,mf as Sa,Xh as mo,a1I as po,a1J as ho,uy as So,u9 as go,u8 as ft,a1K as Co,a1L as fo,a1M as Io,a1N as ko,nM as bo,br as To,nH as ga,nt as Po,a1O as yo,h2 as vo,nE as Eo,s_ as Ao,t0 as xo,sJ as wo,W2 as Ro,W3 as Do,F6 as Fo,F5 as _o,Fm as Mo,a1P as Ca,sP as Oo,sk as Uo,a1Q as Bo,s0 as Vo,s5 as jo,sg as zo,s3 as Lo,a1R as $o,rY as Go,sf as No,sV as qo,a1S as Jo,t6 as Yo,sD as Ho,tc as Wo,sI as Ko,rI as Qo,a1T as Xo,q_ as Zo,qy as ec,qF as fa,rs as tc,a1U as ac,a1V as nc,a1W as sc,a1X as oc,a1Y as cc,a1Z as ic,a1_ as lc,tg as rc,a1$ as dc,a20 as uc,a21 as Ia,uJ as mc,u0 as pc,tR as ka,tP as hc,a22 as Sc,tE as gc,tj as Cc,tS as fc,a23 as Ic,a24 as kc,tp as bc,a25 as Tc,tk as Pc,to as yc,tm as vc,tY as Ec}from"./zeni-epic-state-FRanwwFO.js";import za from"./NotFoundScreen-Cw8n2XQn.js";import{a as s,R as La}from"./sentry-CWp8Ph3h.js";import{n as Te,S as Ac}from"./mui-B2F_PvWe.js";import{c as Ve,m as H,j as W,p as ee,aq as $a,as as Ga,dO as xc,dP as wc,z as st,dQ as Rc,dR as Dc,dS as Fc,ae as Ue,dT as _c,dU as ba,ba as Ta,dV as Mc,a7 as Na,dW as Oc,l as et,a as Uc,dX as Bc,dY as Vc,Z as jc,_ as zc,dZ as Lc,d_ as $c,d$ as Gc,b4 as Nc,bs as qc,ab as Jc,b5 as Yc,b6 as Hc,G as Wc,w as Kc,e0 as Qc,av as Pa,e1 as Xc}from"./index-BhDgyETA.js";import{u as qa}from"./useAskAiCfoHostNavButtonProps-BmnPs4uO.js";import{g as ya,b as Zc,c as ei,h as ti,a as ai,i as ni,r as si,C as oi}from"./TransactionDetailScreen-DSLjb6UM.js";import{u as ci,a as ii}from"./useActualMatchingMatchDetail-vmzr0KEG.js";import{d as li}from"./decodeURIComponentSafe-DgKmvHaP.js";import{m as Ja,a as Ya}from"./expenseAutomationHelper-BkZxz0F-.js";import{u as Ha,a as Wa,w as ri}from"./withTransactionSidePanel-DG1lldsp.js";import{b as di,S as ui,a as mi,J as pi}from"./ScheduleDetailsPrepaidExpensesScreen-DMzBHsBi.js";import{s as va,i as Ka,h as hi,v as Si,c as gi}from"./routePaths-BvbR2--r.js";import{a as It}from"./accountMappingHelper-mjWJVrZb.js";import{D as Ci}from"./DrawerScreen-oFb1moZ7.js";import"./recharts-CzGMTm3v.js";import"./analytics-cC2XJoxx.js";import"./plaid-BWZxX3Bn.js";import"./dnd-oIrpOltC.js";import"./stripe-cKAAJElX.js";import"./lottie-ULJlrwjP.js";import"./lexical-BRrdO5Cu.js";import"./pdf-CeVn9A9c.js";import"./utils-u0mlLj2I.js";import"./useInitialThreadRequest-CdCPw0ds.js";import"./stripSplatSuffix-BWJSV6oD.js";import"./pathToGoBack-e0pJACvC.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]="bb7c6e7b-e52a-46a2-89c5-53658d2067c5",t._sentryDebugIdIdentifier="sentry-dbid-bb7c6e7b-e52a-46a2-89c5-53658d2067c5")}catch{}})();const fi=()=>{const t=ge(),n=nt(),S=be(),g=F((p=>ke(p))),{useFeatureGate:d}=Ve(),{isFeatureEnabled:i}=d(H.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=d(H.aiAuditScorePercentage),A=F((p=>p.expenseAutomationViewState.selectedPeriodByTenantId)),l=F((p=>Kn(p,g.tenantId))),{isAiCfoAccessEnabled:v,onAskAiCfoClick:x}=qa({mobileExploreReferrer:"Month-End Close Overview"}),T=s.useCallback(((p,P,_=!1)=>{t(Me({tenantId:P,period:{month:p.month,year:p.year},refreshViewInBackground:_}))}),[]),C=s.useCallback((p=>{const P=S.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&W.trackMonthCloseAuditPage(p.month,p.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,P??null),t(Qn(g.tenantId,p))}),[g.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),f=A[g.tenantId],m=s.useCallback((()=>{const p=S.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&W.trackMonthCloseAuditPage(f.month,f.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,p??null),T(f,g.tenantId,!0)}),[T,f,g.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),z=ee(S.state?.pathnameStackToGoBack,S.pathname),w=s.useCallback((()=>{if(l.monthEndCloseChecks!=null&&f!=null){const p=l.monthEndCloseChecks.monthEndCloseCheckList.find((P=>P.progress<100));if(p!=null)return void n(`./${p.id}/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:z,message:"comingFromOverview"}});n(`./month_end_insights/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:z,message:"comingFromOverview"}})}}),[l.monthEndCloseChecks,f]),{areTenantIdsInSync:I}=$a();return Ga({isDataReady:l.fetchState==="Completed"}),s.useEffect((()=>{f!=null&&l.fetchState!=="In-Progress"&&l.fetchState!=="Completed"&&I&&T(f,g.tenantId)}),[T,f,l.fetchState,g.tenantId,I]),s.useEffect((()=>{f!=null&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&I&&t(Xn(f))}),[f,l.monthClosePerformanceTrendFetchStatus.fetchState,I]),s.useEffect((()=>{const p=setInterval((()=>{l.fetchState!=="In-Progress"&&l.fetchState==="Completed"&&m()}),3e5);return()=>clearInterval(p)}),[l.fetchState]),s.useEffect((()=>{if(l.fetchState==="Completed"&&l.monthEndCloseChecks?.auditSummary!=null){const p=S.state?.referrer;W.trackMonthCloseAuditPage(l.selectedPeriod.month,l.selectedPeriod.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,p??null)}}),[l.fetchState,l.selectedPeriod,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),k.jsx(Ii,{children:k.jsx(xc,{monthEndCloseChecksView:l,isRealtimeInsightsFeatureEnabled:i,onMonthEndCheckClick:p=>{n(`./${p}/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:z,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:C,handleReviewButtonClick:w,onBackClick:()=>{n("../../dashboard")},onReload:m,isAiCfoAccessEnabled:v,onAskAiCfoClick:x,aiAuditScorePercentageEnabled:r})})},Ii=Te.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{j as s}from"./liveblocks-CzCs-qU3.js";import{a as r}from"./sentry-CWp8Ph3h.js";import{aw as d,ax as l,s as p,a4 as m}from"./index-De2R2YuA.js";import"./mui-B2F_PvWe.js";import c from"./NotFoundScreen-BXryZNID.js";import{h as u,g as b}from"./core-BBG4mxvC.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]="052e3476-042d-44ff-b15b-67fe1524a52f",e._sentryDebugIdIdentifier="sentry-dbid-052e3476-042d-44ff-b15b-67fe1524a52f")}catch{}})();const _=()=>{const e=u(),a=b(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),f=r.useCallback((()=>{(()=>{const n=m(a.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=d(a.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:f}):s.jsx(c,{})},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-CzCs-qU3.js";import{a as r}from"./sentry-CWp8Ph3h.js";import{aw as d,ax as l,s as p,a4 as m}from"./index-BhDgyETA.js";import"./mui-B2F_PvWe.js";import c from"./NotFoundScreen-Cw8n2XQn.js";import{h as u,g as b}from"./core-BBG4mxvC.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]="052e3476-042d-44ff-b15b-67fe1524a52f",e._sentryDebugIdIdentifier="sentry-dbid-052e3476-042d-44ff-b15b-67fe1524a52f")}catch{}})();const _=()=>{const e=u(),a=b(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),f=r.useCallback((()=>{(()=>{const n=m(a.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=d(a.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:f}):s.jsx(c,{})},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-CWp8Ph3h.js";import{u as l,h as f,g as m}from"./core-BBG4mxvC.js";import{h$ as p,UH as g,UI as b}from"./zeni-epic-state-FRanwwFO.js";import{u as _,L as h,z as y}from"./index-De2R2YuA.js";import"./liveblocks-CzCs-qU3.js";import"./recharts-CzGMTm3v.js";import"./mui-B2F_PvWe.js";import"./analytics-cC2XJoxx.js";import"./plaid-BWZxX3Bn.js";import"./dnd-oIrpOltC.js";import"./stripe-cKAAJElX.js";import"./lottie-ULJlrwjP.js";import"./lexical-BRrdO5Cu.js";import"./pdf-CeVn9A9c.js";import"./utils-u0mlLj2I.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]="cbaf99b7-e770-4476-819d-df693b100290",e._sentryDebugIdIdentifier="sentry-dbid-cbaf99b7-e770-4476-819d-df693b100290")}catch{}})();function R(){const e=l(),n=f(),o=m(),{setLoading:i,clearAllLoading:c}=_(),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,g("revenue"),b("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}c();const u=y.getActiveTenantForUser();n(u?.tenantEmailDomain!=null?`/${u.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{R as default};
1
+ import{a as r}from"./sentry-CWp8Ph3h.js";import{u as l,h as f,g as m}from"./core-BBG4mxvC.js";import{h$ as p,UH as g,UI as b}from"./zeni-epic-state-FRanwwFO.js";import{u as _,L as h,z as y}from"./index-BhDgyETA.js";import"./liveblocks-CzCs-qU3.js";import"./recharts-CzGMTm3v.js";import"./mui-B2F_PvWe.js";import"./analytics-cC2XJoxx.js";import"./plaid-BWZxX3Bn.js";import"./dnd-oIrpOltC.js";import"./stripe-cKAAJElX.js";import"./lottie-ULJlrwjP.js";import"./lexical-BRrdO5Cu.js";import"./pdf-CeVn9A9c.js";import"./utils-u0mlLj2I.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]="cbaf99b7-e770-4476-819d-df693b100290",e._sentryDebugIdIdentifier="sentry-dbid-cbaf99b7-e770-4476-819d-df693b100290")}catch{}})();function R(){const e=l(),n=f(),o=m(),{setLoading:i,clearAllLoading:c}=_(),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,g("revenue"),b("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}c();const u=y.getActiveTenantForUser();n(u?.tenantEmailDomain!=null?`/${u.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{R as default};