@zeniai/web-app-ui 5.3.81-dev → 5.3.81-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-BqrHv3lf.js → AccountMappingScreen-DLteNDhT.js} +1 -1
  2. package/dist/assets/{ActualMatchingMatchDetailScreen-h8TCOzmP.js → ActualMatchingMatchDetailScreen-Dd6Ln_Ly.js} +1 -1
  3. package/dist/assets/{AddressRoutes-CevDzchV.js → AddressRoutes-DnkJjFp_.js} +1 -1
  4. package/dist/assets/{AddressScreen-Goy7OAa3.js → AddressScreen-DJINkAL1.js} +1 -1
  5. package/dist/assets/{AiCfoScreen-CRBP1pbJ.js → AiCfoScreen-HapdjxOD.js} +1 -1
  6. package/dist/assets/{AppDrawer-O4ZEFSY7.js → AppDrawer-Dxf-oJEd.js} +1 -1
  7. package/dist/assets/{BillPayApprovalRoutes-CEnfa_wS.js → BillPayApprovalRoutes-D6vB9NPC.js} +1 -1
  8. package/dist/assets/{BillPayRoutes-lyhC_q-2.js → BillPayRoutes-6_xJqqGQ.js} +1 -1
  9. package/dist/assets/{BusinessVerificationPageScreen-CRJRFoBF.js → BusinessVerificationPageScreen-CGqqEoYv.js} +1 -1
  10. package/dist/assets/{CardsAiCfoScreen-DrIgNEMk.js → CardsAiCfoScreen-CLUNzA-P.js} +1 -1
  11. package/dist/assets/{ChargeCardRoutes-BOqQM_C6.js → ChargeCardRoutes-WS8f92hC.js} +1 -1
  12. package/dist/assets/{CompanyPassportScreen-CxZJl1bJ.js → CompanyPassportScreen-YEVLcwNH.js} +1 -1
  13. package/dist/assets/{ConnectionAuthScreen-CxIPuBQD.js → ConnectionAuthScreen-bkPD9gpi.js} +1 -1
  14. package/dist/assets/{CustomerOnboardingAuthScreen-r36YH7JA.js → CustomerOnboardingAuthScreen-DqimhjZd.js} +1 -1
  15. package/dist/assets/{CustomerOnboardingRoutes-Q5ECv8HT.js → CustomerOnboardingRoutes-tq1bG99V.js} +1 -1
  16. package/dist/assets/{DashboardRoutes-BKSV9vko.js → DashboardRoutes-D6iqpnEM.js} +1 -1
  17. package/dist/assets/{DefaultTenantHome-BBKs-l6f.js → DefaultTenantHome-DmBZeKqQ.js} +1 -1
  18. package/dist/assets/{DomesticWireDetailScreen-C8qRoekM.js → DomesticWireDetailScreen-CsP1PkdI.js} +1 -1
  19. package/dist/assets/{DrawerScreen-CN9HYciY.js → DrawerScreen-Dt4KuLag.js} +1 -1
  20. package/dist/assets/{EntityDetailRoutes-DvnbYoBF.js → EntityDetailRoutes-CdJErssQ.js} +1 -1
  21. package/dist/assets/{ExpenseAutomationRoutes-DGlzQW9f.js → ExpenseAutomationRoutes-Oek2q3EP.js} +1 -1
  22. package/dist/assets/{FeaturePreviewScreen-C6K1_63v.js → FeaturePreviewScreen-D6dXXcAI.js} +1 -1
  23. package/dist/assets/{HubSpotOAuthCallbackScreen-COzUIs57.js → HubSpotOAuthCallbackScreen-CZgLcZqM.js} +1 -1
  24. package/dist/assets/{InvoicingRoutes-DxRpDPHw.js → InvoicingRoutes-CQFHxh_p.js} +1 -1
  25. package/dist/assets/{MagicLinkRoutes-DatBzzr0.js → MagicLinkRoutes-DqCPogmR.js} +1 -1
  26. package/dist/assets/{MagicLinkSignInScreen-BJzYh3J4.js → MagicLinkSignInScreen-CnmpXy0i.js} +1 -1
  27. package/dist/assets/{MobileAppDrawer-CgJ60E2m.js → MobileAppDrawer-DWJWEsgY.js} +1 -1
  28. package/dist/assets/{NotFoundScreen-DK36JFcR.js → NotFoundScreen-AyzG_edV.js} +1 -1
  29. package/dist/assets/{NotificationRoutes-DRUjl08J.js → NotificationRoutes-DlSXn8Vb.js} +1 -1
  30. package/dist/assets/{OAuthConsentScreen-DBjBNnQJ.js → OAuthConsentScreen-gcS2VjsF.js} +1 -1
  31. package/dist/assets/{PandLWithForecastRoutes-U9sR4r18.js → PandLWithForecastRoutes-CF_kHOT2.js} +1 -1
  32. package/dist/assets/{PaymentLinkScreen-DwyYqfzu.js → PaymentLinkScreen-sSvolSg5.js} +1 -1
  33. package/dist/assets/{PeopleRoutes-CN01cV2T.js → PeopleRoutes-DeHFKU9C.js} +1 -1
  34. package/dist/assets/{PerformanceRoutes-sPgEs3ei.js → PerformanceRoutes-TLNLhbse.js} +1 -1
  35. package/dist/assets/{QBOConnectionScreen-DFycm_ki.js → QBOConnectionScreen-CxZg_rRm.js} +1 -1
  36. package/dist/assets/{ReimbursementApprovalRoutes-BUzBZ8wT.js → ReimbursementApprovalRoutes-DWE7Gluj.js} +1 -1
  37. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-C_dMNpou.js → ReimbursementApprovalRuleDetailScreen-DgApOKF9.js} +1 -1
  38. package/dist/assets/{ReimbursementRoutes-CverQIks.js → ReimbursementRoutes-D_mWRPjF.js} +1 -1
  39. package/dist/assets/{ReportsRoutes-BCJIsVHt.js → ReportsRoutes-D7rNax5S.js} +1 -1
  40. package/dist/assets/{RewardsRoutes-DL4U3zKu.js → RewardsRoutes-Cg5LhxOB.js} +1 -1
  41. package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-BKYsisUv.js → ScheduleDetailsPrepaidExpensesScreen-CW0w2OzE.js} +1 -1
  42. package/dist/assets/{ScreenRoutes-ChqMx09J.js → ScreenRoutes-CxfBglvk.js} +2 -2
  43. package/dist/assets/{SettingsRoutes-C6bz6i-5.js → SettingsRoutes-hxA43Z-s.js} +1 -1
  44. package/dist/assets/{SetupPagesScreen-B2ZhtNLX.js → SetupPagesScreen-CQ8_0WFz.js} +1 -1
  45. package/dist/assets/{SignInScreen-BhdMuyKL.js → SignInScreen-BaWgr39E.js} +1 -1
  46. package/dist/assets/{SignOutScreen-DhNypZcK.js → SignOutScreen-BOLcCb1r.js} +1 -1
  47. package/dist/assets/{TaskListScreen-uIZd6Y1d.js → TaskListScreen-CNW94Y4K.js} +1 -1
  48. package/dist/assets/{TaskRoutes-CmCsn1P4.js → TaskRoutes-CkHCiA8n.js} +1 -1
  49. package/dist/assets/{TransactionDetailRoutes-Vh6CRIwx.js → TransactionDetailRoutes-Co8PYNZ3.js} +1 -1
  50. package/dist/assets/{TransactionDetailScreen-JD8O14oY.js → TransactionDetailScreen-C8rio2jQ.js} +1 -1
  51. package/dist/assets/{TransactionListRoutes-Cn4w6j8O.js → TransactionListRoutes-CPNRUweC.js} +1 -1
  52. package/dist/assets/{TreasuryRoutes-C3gzhi0V.js → TreasuryRoutes-B0v2Y6DT.js} +1 -1
  53. package/dist/assets/{VendorsRoutes-BwM6t0j-.js → VendorsRoutes-D1Tdtkwz.js} +1 -1
  54. package/dist/assets/{WiseConfirmationScreen-BrP-8WW4.js → WiseConfirmationScreen-BymKIX08.js} +1 -1
  55. package/dist/assets/{ZeniAccountRoutes-CGLFu0Ov.js → ZeniAccountRoutes-Bl11u55z.js} +1 -1
  56. package/dist/assets/{ZeniAccountStatementScreen-TsXZSj_4.js → ZeniAccountStatementScreen-Cm7iiz_H.js} +1 -1
  57. package/dist/assets/{analyticsHelper-CnJWG9bB.js → analyticsHelper-CuV1rDft.js} +1 -1
  58. package/dist/assets/{getLocaleForTenant-YwW4TLUd.js → getLocaleForTenant-D6Fn-XVk.js} +1 -1
  59. package/dist/assets/{index-BfNeAGgC.js → index-uiG3EKFS.js} +5 -5
  60. package/dist/assets/{routePaths-uZogBPDo.js → routePaths-rrjrsp87.js} +1 -1
  61. package/dist/assets/{useActualMatchingMatchDetail-4m9qzYbe.js → useActualMatchingMatchDetail-_hiYAs66.js} +1 -1
  62. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-4BNh0D5K.js → useAiCfoDashboardSuggestedQuestionsChips-BN8gHaSp.js} +1 -1
  63. package/dist/assets/{useAskAiCfoHostNavButtonProps-B4mYX3VH.js → useAskAiCfoHostNavButtonProps-23fa71Mo.js} +1 -1
  64. package/dist/assets/{useChargeCardPusherEvents-DIeSIWcP.js → useChargeCardPusherEvents-anzX4Mc_.js} +1 -1
  65. package/dist/assets/{useEmailConnectResultRefresh-DjE-2Sye.js → useEmailConnectResultRefresh-27ElC7dd.js} +1 -1
  66. package/dist/assets/{useInitialThreadRequest-BhgsGG5D.js → useInitialThreadRequest-CSnvFEFF.js} +1 -1
  67. package/dist/assets/{useTaskManagerAccess-IxEInAYM.js → useTaskManagerAccess-C8EkaXwf.js} +1 -1
  68. package/dist/assets/{useTaskManagerPusherEvents-DIUFIhyQ.js → useTaskManagerPusherEvents-CiGLRrDo.js} +1 -1
  69. package/dist/assets/{withTransactionSidePanel-DH0DiNtU.js → withTransactionSidePanel-C94wKtuS.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-DwoS2LTS.js";import{a as g}from"./sentry-BF2EAQwc.js";import{h as w,u as x,g as T,i as k,j as O,l as E}from"./core-Beu9kTtR.js";import{z as D,bq as F,a6 as P,j as V,Q as j,n as C,br as A,ac as L,aE as U,p as B}from"./index-BfNeAGgC.js";import{fI as h,gL as M,BQ as _,gG as z,c9 as G,Yz as R,bn as Y,v2 as Q,uS as q,mD as H,oc as S,YA as Z,bF as $,cF as N,on as J,ox as K}from"./zeni-epic-state-1d5RmIXy.js";import"./mui-DEiF_Hb4.js";import{d as W}from"./routePaths-uZogBPDo.js";import{M as X}from"./MobileAppDrawer-CgJ60E2m.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new n.Error().stack;t&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[t]="aad20d45-c526-4e74-a9a8-081ce72f2fc8",n._sentryDebugIdIdentifier="sentry-dbid-aad20d45-c526-4e74-a9a8-081ce72f2fc8")}catch{}})();const ee=E((function(n){const t=z(n),i=D.getSignedInUser(),p=h(n),c=p.tenantId,l={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=G(p?.userRole??[])&&t.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=R(n.companyConfigState),a=n.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:t.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:t,allIndustries:e.companyIndustries??[],allNationalityCountries:a,isDisabled:f,authParams:l,filesEndPoint:`${L.fileMicroServiceBaseUrl}`,isZeniUser:Y(i)}}),(function(n,t){const{companyId:i,currentTenant:p,navigate:c,location:l}=t,{tenantEmailDomain:f}=p;return{onScheduleClick:e=>{let a=e.href;a.includes("http")||(a="https://".concat(a)),window.open(a,"_blank")},onSaveAll:()=>{n(K())},onAddressClick:e=>{const a=W(f,e),o=B(l.state?.pathnameStackToGoBack,l.pathname);c(a,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{n(J({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:a,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:u}=a,{meetingLink:y}=d,{incDate:s}=o,{taxesFiledYears:b}=r,v={companyInfo:{...a,website:u!=""&&u!=null?N(u):void 0,meetingLink:y!=""&&y!=null?N(y):void 0,industry:a.industry.selectedOption,companyIndustryType:a.companyIndustryType?.selectedOption??void 0,companySubIndustry:a.companySubIndustry?.selectedOption??void 0,businessModel:a.businessModel.selectedOption??"",companySourceOfFunds:a.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:a.companySourceOfFundsDescription??void 0,countriesOfOperations:a.countriesOfOperations?.selectedOptions?.map((I=>I.length===2?I:U(I)))??[],transactionVolume:a.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:a.transactionVolumeDescription??void 0,regulatedStatus:a.regulatedStatus??void 0,regulatedStatusDescription:a.regulatedStatusDescription??void 0,usNexus:a.usNexus??void 0,usNexusTypes:a.usNexusTypes?.selectedOptions??[],purposeOfAccount:a.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:a.purposeOfAccountDescription??void 0},incInfo:{typeOfInc:o.typeOfInc.selectedOption??"",stateOfInc:o.stateOfInc.selectedOption??"",incDate:s!=null?$(s?.toString()):s,fileId:o.fileIds[0]},taxDetails:{taxIdOrEIN:r.taxIdOrEIN,sicCode:r.sicCode,naicsCode:r.naicsCode,dunsNumber:r.dunsNumber,taxesFiledYears:b.selectedOptions.map((I=>parseInt(I))),fileId:r.fileIds[0]}};n(S({companyDetails:v}))},onPrimaryContactDetailsUpdated:e=>{n(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{n(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:void 0}]}))},onNewCompanyOfficerRemoved:e=>{n(Z(e))},onCompanyOfficerUpdated:e=>{n(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:e.userId}]}))},updateFilesEntity:e=>{n(H({files:e}))},onDeleteFile:e=>{n(q(e))},onEditFileName:(e,a)=>{n(Q(e,a.split(".")[0]))}}}))(A);function de(){const n=w(),t=x(),i=T(),{tenantEmailDomain:p}=k(),[c,l]=g.useState(!1),[f,e]=g.useState(!1),a=O((s=>s.companyViewState.passportView.fetchState)),o=O((s=>s.companyConfigState.fetchState)),r=O((s=>h(s))),d=r.companyId??D.getSignedInUserTenant(p)?.companyId;if(D.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect((()=>{c||a!=="Not-Started"||d==null||(l(!0),t(M(d)))}),[c,a,d,t]),g.useEffect((()=>{o==="Not-Started"&&t(_())}),[o,t]);const u=s=>{e(s)},y=a==="Not-Started"||a==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&a==="Error"?m.jsx(F,{onGoHome:()=>n("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(P,{analytics:V,onLoad:s=>s.trackPageLoaded(j.Event.companyPassport,C(i)?"Settings":"Company Passport")}),C(i)?m.jsx(X,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:n,location:i,isLoading:y,currentTenant:r,isSettings:C(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
1
+ import{j as m}from"./liveblocks-DwoS2LTS.js";import{a as g}from"./sentry-BF2EAQwc.js";import{h as w,u as x,g as T,i as k,j as O,l as E}from"./core-Beu9kTtR.js";import{z as D,bq as F,a6 as P,j as V,Q as j,n as C,br as A,ac as L,aE as U,p as B}from"./index-uiG3EKFS.js";import{fI as h,gL as M,BQ as _,gG as z,c9 as G,Yz as R,bn as Y,v2 as Q,uS as q,mD as H,oc as S,YA as Z,bF as $,cF as N,on as J,ox as K}from"./zeni-epic-state-1d5RmIXy.js";import"./mui-DEiF_Hb4.js";import{d as W}from"./routePaths-rrjrsp87.js";import{M as X}from"./MobileAppDrawer-DWJWEsgY.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new n.Error().stack;t&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[t]="aad20d45-c526-4e74-a9a8-081ce72f2fc8",n._sentryDebugIdIdentifier="sentry-dbid-aad20d45-c526-4e74-a9a8-081ce72f2fc8")}catch{}})();const ee=E((function(n){const t=z(n),i=D.getSignedInUser(),p=h(n),c=p.tenantId,l={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=G(p?.userRole??[])&&t.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=R(n.companyConfigState),a=n.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:t.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:t,allIndustries:e.companyIndustries??[],allNationalityCountries:a,isDisabled:f,authParams:l,filesEndPoint:`${L.fileMicroServiceBaseUrl}`,isZeniUser:Y(i)}}),(function(n,t){const{companyId:i,currentTenant:p,navigate:c,location:l}=t,{tenantEmailDomain:f}=p;return{onScheduleClick:e=>{let a=e.href;a.includes("http")||(a="https://".concat(a)),window.open(a,"_blank")},onSaveAll:()=>{n(K())},onAddressClick:e=>{const a=W(f,e),o=B(l.state?.pathnameStackToGoBack,l.pathname);c(a,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{n(J({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:a,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:u}=a,{meetingLink:y}=d,{incDate:s}=o,{taxesFiledYears:b}=r,v={companyInfo:{...a,website:u!=""&&u!=null?N(u):void 0,meetingLink:y!=""&&y!=null?N(y):void 0,industry:a.industry.selectedOption,companyIndustryType:a.companyIndustryType?.selectedOption??void 0,companySubIndustry:a.companySubIndustry?.selectedOption??void 0,businessModel:a.businessModel.selectedOption??"",companySourceOfFunds:a.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:a.companySourceOfFundsDescription??void 0,countriesOfOperations:a.countriesOfOperations?.selectedOptions?.map((I=>I.length===2?I:U(I)))??[],transactionVolume:a.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:a.transactionVolumeDescription??void 0,regulatedStatus:a.regulatedStatus??void 0,regulatedStatusDescription:a.regulatedStatusDescription??void 0,usNexus:a.usNexus??void 0,usNexusTypes:a.usNexusTypes?.selectedOptions??[],purposeOfAccount:a.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:a.purposeOfAccountDescription??void 0},incInfo:{typeOfInc:o.typeOfInc.selectedOption??"",stateOfInc:o.stateOfInc.selectedOption??"",incDate:s!=null?$(s?.toString()):s,fileId:o.fileIds[0]},taxDetails:{taxIdOrEIN:r.taxIdOrEIN,sicCode:r.sicCode,naicsCode:r.naicsCode,dunsNumber:r.dunsNumber,taxesFiledYears:b.selectedOptions.map((I=>parseInt(I))),fileId:r.fileIds[0]}};n(S({companyDetails:v}))},onPrimaryContactDetailsUpdated:e=>{n(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{n(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:void 0}]}))},onNewCompanyOfficerRemoved:e=>{n(Z(e))},onCompanyOfficerUpdated:e=>{n(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:e.userId}]}))},updateFilesEntity:e=>{n(H({files:e}))},onDeleteFile:e=>{n(q(e))},onEditFileName:(e,a)=>{n(Q(e,a.split(".")[0]))}}}))(A);function de(){const n=w(),t=x(),i=T(),{tenantEmailDomain:p}=k(),[c,l]=g.useState(!1),[f,e]=g.useState(!1),a=O((s=>s.companyViewState.passportView.fetchState)),o=O((s=>s.companyConfigState.fetchState)),r=O((s=>h(s))),d=r.companyId??D.getSignedInUserTenant(p)?.companyId;if(D.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect((()=>{c||a!=="Not-Started"||d==null||(l(!0),t(M(d)))}),[c,a,d,t]),g.useEffect((()=>{o==="Not-Started"&&t(_())}),[o,t]);const u=s=>{e(s)},y=a==="Not-Started"||a==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&a==="Error"?m.jsx(F,{onGoHome:()=>n("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(P,{analytics:V,onLoad:s=>s.trackPageLoaded(j.Event.companyPassport,C(i)?"Settings":"Company Passport")}),C(i)?m.jsx(X,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:n,location:i,isLoading:y,currentTenant:r,isSettings:C(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
@@ -1,4 +1,4 @@
1
- import{j as I}from"./liveblocks-DwoS2LTS.js";import{a as o}from"./sentry-BF2EAQwc.js";import{u as k,h as R,g as H,j as C,N as w}from"./core-Beu9kTtR.js";import{Ud as q,fI as z,go as G,pW as Q,gP as U,gn as V,gl as W,UD as B,gk as A}from"./zeni-epic-state-1d5RmIXy.js";import{u as J,z as E,L as T,G as K,F as M}from"./index-BfNeAGgC.js";import{n as X}from"./mui-DEiF_Hb4.js";import{P as b,a as _}from"./AccountMappingScreen-BqrHv3lf.js";import{t as Y}from"./getLocaleForTenant-YwW4TLUd.js";import{g as Z,Q as ee}from"./QBOConnectionScreen-DFycm_ki.js";import"./recharts-MD3a-5g4.js";import"./analytics-k_LuQgHs.js";import"./plaid-UFuUhVwC.js";import"./dnd-BD4CdaiB.js";import"./stripe-cKAAJElX.js";import"./lottie-BGwNmPax.js";import"./lexical-ae4wZrjx.js";import"./pdf-CuKXyKjy.js";import"./utils-CaDQp8mU.js";import"./MobileAppDrawer-CgJ60E2m.js";import"./InboxNotificationsProvider-EoJhdrtc.js";import"./useTaskManagerAccess-IxEInAYM.js";import"./accountMappingHelper-DKrp-2iY.js";import"./empty-C_-q3sdl.js";import"./pdf-lib-jUWLVDc9.js";import"./index-Dxjgx_aK.js";import"./url-CcLycjqh.js";import"./index-CMLe_P16.js";import"./decodeURIComponentSafe-0ml5lsEu.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]="0d6dbe04-649d-494c-abdb-b26aaa946f5a",t._sentryDebugIdIdentifier="sentry-dbid-0d6dbe04-649d-494c-abdb-b26aaa946f5a")}catch{}})();const te=X.div`
1
+ import{j as I}from"./liveblocks-DwoS2LTS.js";import{a as o}from"./sentry-BF2EAQwc.js";import{u as k,h as R,g as H,j as C,N as w}from"./core-Beu9kTtR.js";import{Ud as q,fI as z,go as G,pW as Q,gP as U,gn as V,gl as W,UD as B,gk as A}from"./zeni-epic-state-1d5RmIXy.js";import{u as J,z as E,L as T,G as K,F as M}from"./index-uiG3EKFS.js";import{n as X}from"./mui-DEiF_Hb4.js";import{P as b,a as _}from"./AccountMappingScreen-DLteNDhT.js";import{t as Y}from"./getLocaleForTenant-D6Fn-XVk.js";import{g as Z,Q as ee}from"./QBOConnectionScreen-CxZg_rRm.js";import"./recharts-MD3a-5g4.js";import"./analytics-k_LuQgHs.js";import"./plaid-UFuUhVwC.js";import"./dnd-BD4CdaiB.js";import"./stripe-cKAAJElX.js";import"./lottie-BGwNmPax.js";import"./lexical-ae4wZrjx.js";import"./pdf-CuKXyKjy.js";import"./utils-CaDQp8mU.js";import"./MobileAppDrawer-DWJWEsgY.js";import"./InboxNotificationsProvider-EoJhdrtc.js";import"./useTaskManagerAccess-C8EkaXwf.js";import"./accountMappingHelper-DKrp-2iY.js";import"./empty-C_-q3sdl.js";import"./pdf-lib-jUWLVDc9.js";import"./index-Dxjgx_aK.js";import"./url-CcLycjqh.js";import"./index-CMLe_P16.js";import"./decodeURIComponentSafe-0ml5lsEu.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]="0d6dbe04-649d-494c-abdb-b26aaa946f5a",t._sentryDebugIdIdentifier="sentry-dbid-0d6dbe04-649d-494c-abdb-b26aaa946f5a")}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-DwoS2LTS.js";import{z as m}from"./index-BfNeAGgC.js";import{g as n}from"./QBOConnectionScreen-DFycm_ki.js";import"./sentry-BF2EAQwc.js";import{g as p,N as a}from"./core-Beu9kTtR.js";import"./zeni-epic-state-1d5RmIXy.js";import"./recharts-MD3a-5g4.js";import"./mui-DEiF_Hb4.js";import"./analytics-k_LuQgHs.js";import"./plaid-UFuUhVwC.js";import"./dnd-BD4CdaiB.js";import"./stripe-cKAAJElX.js";import"./lottie-BGwNmPax.js";import"./lexical-ae4wZrjx.js";import"./pdf-CuKXyKjy.js";import"./utils-CaDQp8mU.js";import"./empty-C_-q3sdl.js";import"./pdf-lib-jUWLVDc9.js";import"./index-Dxjgx_aK.js";import"./url-CcLycjqh.js";import"./index-CMLe_P16.js";import"./decodeURIComponentSafe-0ml5lsEu.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-DwoS2LTS.js";import{z as m}from"./index-uiG3EKFS.js";import{g as n}from"./QBOConnectionScreen-CxZg_rRm.js";import"./sentry-BF2EAQwc.js";import{g as p,N as a}from"./core-Beu9kTtR.js";import"./zeni-epic-state-1d5RmIXy.js";import"./recharts-MD3a-5g4.js";import"./mui-DEiF_Hb4.js";import"./analytics-k_LuQgHs.js";import"./plaid-UFuUhVwC.js";import"./dnd-BD4CdaiB.js";import"./stripe-cKAAJElX.js";import"./lottie-BGwNmPax.js";import"./lexical-ae4wZrjx.js";import"./pdf-CuKXyKjy.js";import"./utils-CaDQp8mU.js";import"./empty-C_-q3sdl.js";import"./pdf-lib-jUWLVDc9.js";import"./index-Dxjgx_aK.js";import"./url-CcLycjqh.js";import"./index-CMLe_P16.js";import"./decodeURIComponentSafe-0ml5lsEu.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-DwoS2LTS.js";import{t as wn,A as $e}from"./AddressScreen-Goy7OAa3.js";import An from"./NotFoundScreen-DK36JFcR.js";import{a as d,u as Me}from"./sentry-BF2EAQwc.js";import{h as _e,g as Te,u as se,i as xe,j as E,N as Q,q as Pn,l as cn,n as Dn,o as H}from"./core-Beu9kTtR.js";import{fI as Y,e0 as Ee,d$ as we,bq as jn,Uu as Bn,bS as Fn,pU as Vn,BA as Un,BD as Rn,VR as Ln,VS as Nn,ly as Oe,lB as dn,V5 as Gn,c0 as $n,c9 as fe,C2 as Ae,BP as Mn,VT as me,C3 as un,SE as Qn,mL as ln,dj as pn,VU as Kn,VV as zn,uL as qn,UU as Ce,hZ as Hn,UT as be,hW as Wn,Gt as Zn,uP as Jn,hO as Xn,hR as Qe,VW as mn,VX as Yn,Mj as et,VY as nt,Mn as tt,BG as at,VZ as ot,V_ as st,lw as rt,lz as it,Cf as ct,BR as gn,C1 as dt,bF as Ke,cF as ut,Ce as ze,v2 as lt,uS as pt,mD as mt,gJ as gt,gI as ft,gH as yt,V$ as ht,BJ as Ct,Cg as bt,Cj as St,Cm as It,Cs as kt,dk as Ot}from"./zeni-epic-state-1d5RmIXy.js";import{z,W as Pe,A as J,B as vt,p as q,a6 as re,j as g,aC as _t,ag as fn,_ as Tt,K as yn,V as hn,h as X,U as ge,Q as ve,aD as xt,F as qe,r as He,ac as Et,aE as We,aF as wt,aG as At}from"./index-BfNeAGgC.js";import{n as De}from"./mui-DEiF_Hb4.js";import{g as Pt,h as Dt,q as ie}from"./QBOConnectionScreen-DFycm_ki.js";import{u as jt,a as Bt}from"./useEmailConnectResultRefresh-DjE-2Sye.js";import{u as Ft}from"./useChargeCardPusherEvents-DIeSIWcP.js";import"./recharts-MD3a-5g4.js";import"./analytics-k_LuQgHs.js";import"./plaid-UFuUhVwC.js";import"./dnd-BD4CdaiB.js";import"./stripe-cKAAJElX.js";import"./lottie-BGwNmPax.js";import"./lexical-ae4wZrjx.js";import"./pdf-CuKXyKjy.js";import"./utils-CaDQp8mU.js";import"./empty-C_-q3sdl.js";import"./pdf-lib-jUWLVDc9.js";import"./index-Dxjgx_aK.js";import"./url-CcLycjqh.js";import"./index-CMLe_P16.js";import"./decodeURIComponentSafe-0ml5lsEu.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]="885d8a80-144b-4ea8-892e-5247511969d9",e._sentryDebugIdIdentifier="sentry-dbid-885d8a80-144b-4ea8-892e-5247511969d9")}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=Te(),i=se(),[o,p]=d.useState(!1),[u,c]=d.useState(!1),{tenantEmailDomain:v}=xe(),n=z.getSignedInUser(),{useFeatureGate:t}=Pe(),{isFeatureEnabled:C}=t(J.isApAgingFeatureEnabled),{isFeatureEnabled:a}=t(J.isArAgingFeatureEnabled),{isFeatureEnabled:A}=t(J.isReferralFeatureEnabled),{isFeatureEnabled:w}=t(J.isDebitCardFeatureEnabled),k=vt(),O=E((S=>Y(S))),P=E((S=>S.onboardingCustomerViewState.fetchState)),_=O.excludedResources,F=O.companyId??z.getSignedInUserTenant(v)?.companyId;if(n==null)throw Error("Can't access onboarding flow without signing in...");const m=Ee(w,O),b=we(O),D=[],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),T=_?.resources?.find((S=>S.resource==="/bills"))==null&&!r,x=_?.resources?.find((S=>S.resource==="/reimbursements"))==null;U===!1&&D.push("top_expenses"),h===!1&&D.push("task_card"),T===!1&&D.push("bill_pay_card","bill_pay_promo_card"),x===!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"),a===!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 W=Bn(S,V);return Fn(W.reportsInOrder.map(($=>({fetchState:$.fetchState,error:$.error})))).fetchState}));d.useEffect((()=>{P!=="Completed"||o||m||b||(p(!0),i(Vn(n.userId,F,O.tenantId,!0,!1,D)))}),[o,P,m,b,n,O.tenantId,i]);const j=d.useRef(!1),N=d.useCallback((()=>{const S={pathnameStackToGoBack: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"],Je=(e,l)=>{const i=new Map(e.map((o=>[o.key,o])));return l.map((o=>{return p=i.get(o)?.status,p==="starting"||p==="building"?p:"idle";var p}))},Xe=(e,l)=>{if(e.length===0)return!1;const i=new Map(e.map((o=>[o.key,o])));return l.every((o=>i.get(o)?.status==="ready"))},Ye=De.div`
1
+ import{j as s}from"./liveblocks-DwoS2LTS.js";import{t as wn,A as $e}from"./AddressScreen-DJINkAL1.js";import An from"./NotFoundScreen-AyzG_edV.js";import{a as d,u as Me}from"./sentry-BF2EAQwc.js";import{h as _e,g as Te,u as se,i as xe,j as E,N as Q,q as Pn,l as cn,n as Dn,o as H}from"./core-Beu9kTtR.js";import{fI as Y,e0 as Ee,d$ as we,bq as jn,Uu as Bn,bS as Fn,pU as Vn,BA as Un,BD as Rn,VR as Ln,VS as Nn,ly as Oe,lB as dn,V5 as Gn,c0 as $n,c9 as fe,C2 as Ae,BP as Mn,VT as me,C3 as un,SE as Qn,mL as ln,dj as pn,VU as Kn,VV as zn,uL as qn,UU as Ce,hZ as Hn,UT as be,hW as Wn,Gt as Zn,uP as Jn,hO as Xn,hR as Qe,VW as mn,VX as Yn,Mj as et,VY as nt,Mn as tt,BG as at,VZ as ot,V_ as st,lw as rt,lz as it,Cf as ct,BR as gn,C1 as dt,bF as Ke,cF as ut,Ce as ze,v2 as lt,uS as pt,mD as mt,gJ as gt,gI as ft,gH as yt,V$ as ht,BJ as Ct,Cg as bt,Cj as St,Cm as It,Cs as kt,dk as Ot}from"./zeni-epic-state-1d5RmIXy.js";import{z,W as Pe,A as J,B as vt,p as q,a6 as re,j as g,aC as _t,ag as fn,_ as Tt,K as yn,V as hn,h as X,U as ge,Q as ve,aD as xt,F as qe,r as He,ac as Et,aE as We,aF as wt,aG as At}from"./index-uiG3EKFS.js";import{n as De}from"./mui-DEiF_Hb4.js";import{g as Pt,h as Dt,q as ie}from"./QBOConnectionScreen-CxZg_rRm.js";import{u as jt,a as Bt}from"./useEmailConnectResultRefresh-27ElC7dd.js";import{u as Ft}from"./useChargeCardPusherEvents-anzX4Mc_.js";import"./recharts-MD3a-5g4.js";import"./analytics-k_LuQgHs.js";import"./plaid-UFuUhVwC.js";import"./dnd-BD4CdaiB.js";import"./stripe-cKAAJElX.js";import"./lottie-BGwNmPax.js";import"./lexical-ae4wZrjx.js";import"./pdf-CuKXyKjy.js";import"./utils-CaDQp8mU.js";import"./empty-C_-q3sdl.js";import"./pdf-lib-jUWLVDc9.js";import"./index-Dxjgx_aK.js";import"./url-CcLycjqh.js";import"./index-CMLe_P16.js";import"./decodeURIComponentSafe-0ml5lsEu.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]="885d8a80-144b-4ea8-892e-5247511969d9",e._sentryDebugIdIdentifier="sentry-dbid-885d8a80-144b-4ea8-892e-5247511969d9")}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=Te(),i=se(),[o,p]=d.useState(!1),[u,c]=d.useState(!1),{tenantEmailDomain:v}=xe(),n=z.getSignedInUser(),{useFeatureGate:t}=Pe(),{isFeatureEnabled:C}=t(J.isApAgingFeatureEnabled),{isFeatureEnabled:a}=t(J.isArAgingFeatureEnabled),{isFeatureEnabled:A}=t(J.isReferralFeatureEnabled),{isFeatureEnabled:w}=t(J.isDebitCardFeatureEnabled),k=vt(),O=E((S=>Y(S))),P=E((S=>S.onboardingCustomerViewState.fetchState)),_=O.excludedResources,F=O.companyId??z.getSignedInUserTenant(v)?.companyId;if(n==null)throw Error("Can't access onboarding flow without signing in...");const m=Ee(w,O),b=we(O),D=[],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),T=_?.resources?.find((S=>S.resource==="/bills"))==null&&!r,x=_?.resources?.find((S=>S.resource==="/reimbursements"))==null;U===!1&&D.push("top_expenses"),h===!1&&D.push("task_card"),T===!1&&D.push("bill_pay_card","bill_pay_promo_card"),x===!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"),a===!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 W=Bn(S,V);return Fn(W.reportsInOrder.map(($=>({fetchState:$.fetchState,error:$.error})))).fetchState}));d.useEffect((()=>{P!=="Completed"||o||m||b||(p(!0),i(Vn(n.userId,F,O.tenantId,!0,!1,D)))}),[o,P,m,b,n,O.tenantId,i]);const j=d.useRef(!1),N=d.useCallback((()=>{const S={pathnameStackToGoBack: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"],Je=(e,l)=>{const i=new Map(e.map((o=>[o.key,o])));return l.map((o=>{return p=i.get(o)?.status,p==="starting"||p==="building"?p:"idle";var p}))},Xe=(e,l)=>{if(e.length===0)return!1;const i=new Map(e.map((o=>[o.key,o])));return l.every((o=>i.get(o)?.status==="ready"))},Ye=De.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  background-color: ${e=>e.theme.colors.grey4};
@@ -1,4 +1,4 @@
1
- import{j as d}from"./liveblocks-DwoS2LTS.js";import{i as K,j as _,g as H,u as X,h as W,l as ne,k as oa,n as ht,o as P,N as In}from"./core-Beu9kTtR.js";import{fI as B,Wb as We,bF as sa,br as Ee,Xz as En,ke as xn,XA as Vt,XB as Tn,kh as ft,XC as Qe,XD as wn,km as Dn,XE as Gt,XF as Pn,kq as gt,XG as Ze,XH as On,XI as Fn,Wv as jn,ls as Rn,XJ as Mn,bn as Je,XK as ra,X9 as le,bc as ia,lG as ca,lp as la,Xb as de,Xa as ae,fH as da,gd as Bn,gt as bt,XL as Yn,XM as Un,XN as ua,XO as Oe,Eb as Be,Ec as Ye,EA as xe,Eu as ue,Eg as Ue,XP as Ln,c0 as Le,XQ as Vn,XR as Gn,XS as ma,XT as Fe,XU as Nn,ek as et,Am as pa,XV as $n,XW as ha,XX as Xn,XY as zn,XZ as Kn,X_ as St,V7 as _t,uh as Te,m3 as we,EK as kt,At as qn,AA as Qn,X$ as Zn,Y0 as Hn,Ed as Nt,Y1 as Wn,Ap as ve,Ak as fa,Y2 as ge,Y3 as $t,Y4 as Jn,Y5 as yt,V6 as At,Cx as ga,Y6 as eo,Y7 as ba,Y8 as to,Y9 as ao,Ya as no,Yb as vt,CM as oo,CT as so,Yc as ro,Yd as io,Ef as Xt,Ye as co,Cv as Ca,Yf as be,Yg as zt,Yh as lo,bq as Sa,EP as _a,Yi as uo,Yj as ka,Yk as mo,Yl as po,Ym as ho,Yn as It,EH as fo,EJ as go,Yo as bo,Yp as Co,Ee as Kt,Yq as So,EN as ya,Yr as Ce,Ys as qt,Yt as _o,Yu as ko,Yv as Aa,lU as va,p$ as Ia,lZ as Ea,pZ as xa,pY as Ta,pX as wa,BU as yo,dd as Ao,pU as vo,Uu as Io,q9 as Eo,Yw as xo,Yx as To,Yy as wo,b5 as Et,q3 as Do,ih as Po,gL as Oo,q2 as Fo,li as jo,q0 as Ro,p_ as Mo,e0 as Bo,d$ as Yo}from"./zeni-epic-state-1d5RmIXy.js";import{z as Y,at as oe,p as O,j as T,G as q,b9 as Uo,aq as Ve,a6 as Ge,ba as Da,Q as N,bb as Lo,bc as Pa,bd as Vo,be as Go,a as Oa,_ as Fa,d as ja,ap as No,bf as $o,am as Xo,W as xt,bg as Ra,s as re,bh as Ma,bi as Ba,as as Ya,bj as zo,ag as Ne,V as $e,bk as Ko,M as qo,bl as Qo,A as G,B as Zo,h as Ho,a2 as Wo,ao as Jo,bm as es,bn as ts,bo as as,bp as Ie}from"./index-BfNeAGgC.js";import{u as ns,n as Tt}from"./mui-DEiF_Hb4.js";import{a as b}from"./sentry-BF2EAQwc.js";import{w as Ua}from"./withTransactionSidePanel-DH0DiNtU.js";import{c as La,t as De,f as me,b as wt,a as Dt,v as os}from"./routePaths-uZogBPDo.js";import{u as se}from"./useAskAiCfoHostNavButtonProps-B4mYX3VH.js";import Me from"./NotFoundScreen-DK36JFcR.js";import{u as Pt}from"./useInitialThreadRequest-BhgsGG5D.js";import{t as Va}from"./analyticsHelper-CnJWG9bB.js";import{C as ss}from"./CompanyPassportScreen-CxZJl1bJ.js";import{u as rs}from"./useAiCfoDashboardSuggestedQuestionsChips-4BNh0D5K.js";import{F as is}from"./FeaturePreviewScreen-C6K1_63v.js";import"./recharts-MD3a-5g4.js";import"./analytics-k_LuQgHs.js";import"./plaid-UFuUhVwC.js";import"./dnd-BD4CdaiB.js";import"./stripe-cKAAJElX.js";import"./lottie-BGwNmPax.js";import"./lexical-ae4wZrjx.js";import"./pdf-CuKXyKjy.js";import"./utils-CaDQp8mU.js";import"./TransactionDetailScreen-JD8O14oY.js";import"./decodeURIComponentSafe-0ml5lsEu.js";import"./expenseAutomationHelper-dXFQtPOw.js";import"./stripSplatSuffix-6CTGoq-D.js";import"./MobileAppDrawer-CgJ60E2m.js";import"./InboxNotificationsProvider-EoJhdrtc.js";import"./useTaskManagerAccess-IxEInAYM.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]="595cd95f-61bb-41c4-8372-ba80d37cf9ba",e._sentryDebugIdIdentifier="sentry-dbid-595cd95f-61bb-41c4-8372-ba80d37cf9ba")}catch{}})();const cs=Ua((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=K(),s=Y.getSignedInUser(),i=_((S=>S.tenantState.currentTenantId)),l=_((S=>B(S))),{tenantEmailDomain:m}=K(),p=H(),h=l?.companyName??"",f={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},c=b.useMemo((()=>({authParams:f,companyName:h,downloadEndPoint:`${oe}/agingDetailedReport`,timezone:We()})),[]),u=b.useMemo((()=>r!=null?sa(r):Ee()),[r]),C=X(),g=W(),y=_((S=>En(S,u,o))),E=b.useCallback((()=>{o!=null&&y.fetchState!=="In-Progress"&&y.fetchState!=="Completed"&&C(xn(o,u))}),[u]),v=b.useCallback((()=>{g("../../",{relative:"path"})}),[]),k=b.useCallback(((S,A)=>{C(Vt({sortKey:S,sortOrder:A}))}),[]),x=b.useCallback((S=>{C(Vt({downloadState:S}))}),[]),R=b.useCallback((S=>{if(e)e(S.transactionId,S.transactionType);else if(m!=null){const A=La({id:S.transactionId,type:S.transactionType},m);g(A);const U=O(p.state?.pathnameStackToGoBack,p.pathname);g(A,{state:{pathnameStackToGoBack:U}})}}),[m,e]),w=b.useCallback((()=>{y.vendor!=null&&T.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"&&w()}),[w,y.fetchState]),d.jsx(Uo,{apAgingDetail:y,downloadParams:c,reportDate:u,analytics:T,onTransactionClick:R,onReload:E,onBackClick:v,onColumnSortConfigChanged:k,updateDownloadStateHandler:x,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),ls=()=>{const e=X(),a=W(),t=_((k=>Tn(k))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=se({mobileExploreReferrer:"AP Aging"});Ve({isDataReady:t.fetchState==="Completed"});const r=Y.getSignedInUser(),s=_((k=>k.tenantState.currentTenantId)),i=_((k=>B(k))),l=i?.companyName??"",m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},p=b.useMemo((()=>({authParams:m,companyName:l,downloadEndPoint:`${oe}/agingReport`,timezone:We()})),[]),h=t.apAgingUIState.selectedDate??Ee(),f=b.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(ft(h))}),[]);b.useEffect((()=>{f()}),[]);const c=b.useCallback((()=>{a("../",{relative:"path"})}),[]),u=b.useCallback((k=>{e(Qe({searchString:k}))}),[]),C=b.useCallback(((k,x)=>{e(Qe({sortKey:x,sortOrder:k}))}),[]),g=b.useCallback((k=>{a(`./${k}/${h.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[h]),y=b.useCallback((k=>{e(Qe({downloadState:k}))}),[]),E=b.useCallback(((k,x)=>{}),[]),v=b.useCallback(((k,x)=>{e(Qe({selectedDate:k,agingDateSelectionType:x})),e(ft(k))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ge,{analytics:T,onLoad:k=>k.trackPageLoaded(N.Event.agingReport,"AP Aging")}):null,d.jsx(Da,{uiState:t.apAgingUIState,report:t,downloadParams:p,analytics:T,onReloadReport:f,onBackClick:c,onSearchTextChange:u,onSortOrderChange:C,onEntityNameClick:g,updateDownloadStateHandler:y,onSelectedDateChanged:v,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=_((w=>B(w))),{tenantEmailDomain:l}=K(),m=H(),p=i.companyName,h={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},f=b.useMemo((()=>({authParams:h,companyName:p,downloadEndPoint:`${oe}/agingDetailedReport`,timezone:We()})),[]),c=b.useMemo((()=>r!=null?sa(r):Ee()),[r]),u=X(),C=W(),g=_((w=>wn(w,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"})}),[]),v=b.useCallback(((w,S)=>{u(Gt({sortKey:w,sortOrder:S}))}),[]),k=b.useCallback((w=>{u(Gt({downloadState:w}))}),[]),x=b.useCallback((w=>{if(e)e(w.transactionId,w.transactionType);else if(l!=null){const S=La({id:w.transactionId,type:w.transactionType},l);C(S);const A=O(m.state?.pathnameStackToGoBack,m.pathname);C(S,{state:{pathnameStackToGoBack:A}})}}),[l,e]),R=b.useCallback((()=>{g.customer!=null&&T.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:T,onTransactionClick:x,onReload:y,onBackClick:E,onColumnSortConfigChanged:v,updateDownloadStateHandler:k,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),us=()=>{const e=X(),a=W(),t=_((v=>Pn(v))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=se({mobileExploreReferrer:"AR Aging"});Ve({isDataReady:t.fetchState==="Completed"});const r=Y.getSignedInUser(),s=_((v=>B(v))),i=s.companyName,l={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},m=b.useMemo((()=>({authParams:l,companyName:i,downloadEndPoint:`${oe}/agingReport`,timezone:We()})),[]),p=t.arAgingUIState.selectedDate??Ee(),h=b.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(gt(p))}),[]);b.useEffect((()=>{h()}),[]);const f=b.useCallback((()=>{a("../",{relative:"path"})}),[]),c=b.useCallback((v=>{e(Ze({searchString:v}))}),[]),u=b.useCallback(((v,k)=>{e(Ze({sortKey:k,sortOrder:v}))}),[]),C=b.useCallback((v=>{a(`./${v}/${p.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[p]),g=b.useCallback((v=>{e(Ze({downloadState:v}))}),[]),y=b.useCallback(((v,k)=>{e(Ze({selectedDate:v,agingDateSelectionType:k})),e(gt(v))}),[]),E=b.useCallback(((v,k)=>{e(On({nodeId:v,isCollapsed:k}))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ge,{analytics:T,onLoad:v=>v.trackPageLoaded(N.Event.agingReport,"AR Aging")}):null,d.jsx(Da,{uiState:t.arAgingUIState,report:t,downloadParams:m,analytics:T,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:T}}),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:T}}),Na)(Pa);function hs(){const e=W(),a=H(),{tenantEmailDomain:t}=K(),n=_((o=>B(o).company?.companyInfo.firstMonthOfFY??1));return _((o=>o.cashBalanceState.fetchState))==="Error"?d.jsx(Me,{}):d.jsx(ms,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,firstMonthOfFY:n})}function fs(){const e=W(),a=H(),{tenantEmailDomain:t}=K(),n=_((o=>B(o).company?.companyInfo.firstMonthOfFY??1));return _((o=>o.cardBalanceState.fetchState))==="Error"?d.jsx(Me,{}):d.jsx(ps,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,firstMonthOfFY:n})}const gs=Tt.div`
1
+ import{j as d}from"./liveblocks-DwoS2LTS.js";import{i as K,j as _,g as H,u as X,h as W,l as ne,k as oa,n as ht,o as P,N as In}from"./core-Beu9kTtR.js";import{fI as B,Wb as We,bF as sa,br as Ee,Xz as En,ke as xn,XA as Vt,XB as Tn,kh as ft,XC as Qe,XD as wn,km as Dn,XE as Gt,XF as Pn,kq as gt,XG as Ze,XH as On,XI as Fn,Wv as jn,ls as Rn,XJ as Mn,bn as Je,XK as ra,X9 as le,bc as ia,lG as ca,lp as la,Xb as de,Xa as ae,fH as da,gd as Bn,gt as bt,XL as Yn,XM as Un,XN as ua,XO as Oe,Eb as Be,Ec as Ye,EA as xe,Eu as ue,Eg as Ue,XP as Ln,c0 as Le,XQ as Vn,XR as Gn,XS as ma,XT as Fe,XU as Nn,ek as et,Am as pa,XV as $n,XW as ha,XX as Xn,XY as zn,XZ as Kn,X_ as St,V7 as _t,uh as Te,m3 as we,EK as kt,At as qn,AA as Qn,X$ as Zn,Y0 as Hn,Ed as Nt,Y1 as Wn,Ap as ve,Ak as fa,Y2 as ge,Y3 as $t,Y4 as Jn,Y5 as yt,V6 as At,Cx as ga,Y6 as eo,Y7 as ba,Y8 as to,Y9 as ao,Ya as no,Yb as vt,CM as oo,CT as so,Yc as ro,Yd as io,Ef as Xt,Ye as co,Cv as Ca,Yf as be,Yg as zt,Yh as lo,bq as Sa,EP as _a,Yi as uo,Yj as ka,Yk as mo,Yl as po,Ym as ho,Yn as It,EH as fo,EJ as go,Yo as bo,Yp as Co,Ee as Kt,Yq as So,EN as ya,Yr as Ce,Ys as qt,Yt as _o,Yu as ko,Yv as Aa,lU as va,p$ as Ia,lZ as Ea,pZ as xa,pY as Ta,pX as wa,BU as yo,dd as Ao,pU as vo,Uu as Io,q9 as Eo,Yw as xo,Yx as To,Yy as wo,b5 as Et,q3 as Do,ih as Po,gL as Oo,q2 as Fo,li as jo,q0 as Ro,p_ as Mo,e0 as Bo,d$ as Yo}from"./zeni-epic-state-1d5RmIXy.js";import{z as Y,at as oe,p as O,j as T,G as q,b9 as Uo,aq as Ve,a6 as Ge,ba as Da,Q as N,bb as Lo,bc as Pa,bd as Vo,be as Go,a as Oa,_ as Fa,d as ja,ap as No,bf as $o,am as Xo,W as xt,bg as Ra,s as re,bh as Ma,bi as Ba,as as Ya,bj as zo,ag as Ne,V as $e,bk as Ko,M as qo,bl as Qo,A as G,B as Zo,h as Ho,a2 as Wo,ao as Jo,bm as es,bn as ts,bo as as,bp as Ie}from"./index-uiG3EKFS.js";import{u as ns,n as Tt}from"./mui-DEiF_Hb4.js";import{a as b}from"./sentry-BF2EAQwc.js";import{w as Ua}from"./withTransactionSidePanel-C94wKtuS.js";import{c as La,t as De,f as me,b as wt,a as Dt,v as os}from"./routePaths-rrjrsp87.js";import{u as se}from"./useAskAiCfoHostNavButtonProps-23fa71Mo.js";import Me from"./NotFoundScreen-AyzG_edV.js";import{u as Pt}from"./useInitialThreadRequest-CSnvFEFF.js";import{t as Va}from"./analyticsHelper-CuV1rDft.js";import{C as ss}from"./CompanyPassportScreen-YEVLcwNH.js";import{u as rs}from"./useAiCfoDashboardSuggestedQuestionsChips-BN8gHaSp.js";import{F as is}from"./FeaturePreviewScreen-D6dXXcAI.js";import"./recharts-MD3a-5g4.js";import"./analytics-k_LuQgHs.js";import"./plaid-UFuUhVwC.js";import"./dnd-BD4CdaiB.js";import"./stripe-cKAAJElX.js";import"./lottie-BGwNmPax.js";import"./lexical-ae4wZrjx.js";import"./pdf-CuKXyKjy.js";import"./utils-CaDQp8mU.js";import"./TransactionDetailScreen-C8rio2jQ.js";import"./decodeURIComponentSafe-0ml5lsEu.js";import"./expenseAutomationHelper-dXFQtPOw.js";import"./stripSplatSuffix-6CTGoq-D.js";import"./MobileAppDrawer-DWJWEsgY.js";import"./InboxNotificationsProvider-EoJhdrtc.js";import"./useTaskManagerAccess-C8EkaXwf.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]="595cd95f-61bb-41c4-8372-ba80d37cf9ba",e._sentryDebugIdIdentifier="sentry-dbid-595cd95f-61bb-41c4-8372-ba80d37cf9ba")}catch{}})();const cs=Ua((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=K(),s=Y.getSignedInUser(),i=_((S=>S.tenantState.currentTenantId)),l=_((S=>B(S))),{tenantEmailDomain:m}=K(),p=H(),h=l?.companyName??"",f={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},c=b.useMemo((()=>({authParams:f,companyName:h,downloadEndPoint:`${oe}/agingDetailedReport`,timezone:We()})),[]),u=b.useMemo((()=>r!=null?sa(r):Ee()),[r]),C=X(),g=W(),y=_((S=>En(S,u,o))),E=b.useCallback((()=>{o!=null&&y.fetchState!=="In-Progress"&&y.fetchState!=="Completed"&&C(xn(o,u))}),[u]),v=b.useCallback((()=>{g("../../",{relative:"path"})}),[]),k=b.useCallback(((S,A)=>{C(Vt({sortKey:S,sortOrder:A}))}),[]),x=b.useCallback((S=>{C(Vt({downloadState:S}))}),[]),R=b.useCallback((S=>{if(e)e(S.transactionId,S.transactionType);else if(m!=null){const A=La({id:S.transactionId,type:S.transactionType},m);g(A);const U=O(p.state?.pathnameStackToGoBack,p.pathname);g(A,{state:{pathnameStackToGoBack:U}})}}),[m,e]),w=b.useCallback((()=>{y.vendor!=null&&T.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"&&w()}),[w,y.fetchState]),d.jsx(Uo,{apAgingDetail:y,downloadParams:c,reportDate:u,analytics:T,onTransactionClick:R,onReload:E,onBackClick:v,onColumnSortConfigChanged:k,updateDownloadStateHandler:x,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),ls=()=>{const e=X(),a=W(),t=_((k=>Tn(k))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=se({mobileExploreReferrer:"AP Aging"});Ve({isDataReady:t.fetchState==="Completed"});const r=Y.getSignedInUser(),s=_((k=>k.tenantState.currentTenantId)),i=_((k=>B(k))),l=i?.companyName??"",m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},p=b.useMemo((()=>({authParams:m,companyName:l,downloadEndPoint:`${oe}/agingReport`,timezone:We()})),[]),h=t.apAgingUIState.selectedDate??Ee(),f=b.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(ft(h))}),[]);b.useEffect((()=>{f()}),[]);const c=b.useCallback((()=>{a("../",{relative:"path"})}),[]),u=b.useCallback((k=>{e(Qe({searchString:k}))}),[]),C=b.useCallback(((k,x)=>{e(Qe({sortKey:x,sortOrder:k}))}),[]),g=b.useCallback((k=>{a(`./${k}/${h.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[h]),y=b.useCallback((k=>{e(Qe({downloadState:k}))}),[]),E=b.useCallback(((k,x)=>{}),[]),v=b.useCallback(((k,x)=>{e(Qe({selectedDate:k,agingDateSelectionType:x})),e(ft(k))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ge,{analytics:T,onLoad:k=>k.trackPageLoaded(N.Event.agingReport,"AP Aging")}):null,d.jsx(Da,{uiState:t.apAgingUIState,report:t,downloadParams:p,analytics:T,onReloadReport:f,onBackClick:c,onSearchTextChange:u,onSortOrderChange:C,onEntityNameClick:g,updateDownloadStateHandler:y,onSelectedDateChanged:v,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=_((w=>B(w))),{tenantEmailDomain:l}=K(),m=H(),p=i.companyName,h={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},f=b.useMemo((()=>({authParams:h,companyName:p,downloadEndPoint:`${oe}/agingDetailedReport`,timezone:We()})),[]),c=b.useMemo((()=>r!=null?sa(r):Ee()),[r]),u=X(),C=W(),g=_((w=>wn(w,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"})}),[]),v=b.useCallback(((w,S)=>{u(Gt({sortKey:w,sortOrder:S}))}),[]),k=b.useCallback((w=>{u(Gt({downloadState:w}))}),[]),x=b.useCallback((w=>{if(e)e(w.transactionId,w.transactionType);else if(l!=null){const S=La({id:w.transactionId,type:w.transactionType},l);C(S);const A=O(m.state?.pathnameStackToGoBack,m.pathname);C(S,{state:{pathnameStackToGoBack:A}})}}),[l,e]),R=b.useCallback((()=>{g.customer!=null&&T.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:T,onTransactionClick:x,onReload:y,onBackClick:E,onColumnSortConfigChanged:v,updateDownloadStateHandler:k,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),us=()=>{const e=X(),a=W(),t=_((v=>Pn(v))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=se({mobileExploreReferrer:"AR Aging"});Ve({isDataReady:t.fetchState==="Completed"});const r=Y.getSignedInUser(),s=_((v=>B(v))),i=s.companyName,l={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},m=b.useMemo((()=>({authParams:l,companyName:i,downloadEndPoint:`${oe}/agingReport`,timezone:We()})),[]),p=t.arAgingUIState.selectedDate??Ee(),h=b.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(gt(p))}),[]);b.useEffect((()=>{h()}),[]);const f=b.useCallback((()=>{a("../",{relative:"path"})}),[]),c=b.useCallback((v=>{e(Ze({searchString:v}))}),[]),u=b.useCallback(((v,k)=>{e(Ze({sortKey:k,sortOrder:v}))}),[]),C=b.useCallback((v=>{a(`./${v}/${p.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[p]),g=b.useCallback((v=>{e(Ze({downloadState:v}))}),[]),y=b.useCallback(((v,k)=>{e(Ze({selectedDate:v,agingDateSelectionType:k})),e(gt(v))}),[]),E=b.useCallback(((v,k)=>{e(On({nodeId:v,isCollapsed:k}))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ge,{analytics:T,onLoad:v=>v.trackPageLoaded(N.Event.agingReport,"AR Aging")}):null,d.jsx(Da,{uiState:t.arAgingUIState,report:t,downloadParams:m,analytics:T,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:T}}),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:T}}),Na)(Pa);function hs(){const e=W(),a=H(),{tenantEmailDomain:t}=K(),n=_((o=>B(o).company?.companyInfo.firstMonthOfFY??1));return _((o=>o.cashBalanceState.fetchState))==="Error"?d.jsx(Me,{}):d.jsx(ms,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,firstMonthOfFY:n})}function fs(){const e=W(),a=H(),{tenantEmailDomain:t}=K(),n=_((o=>B(o).company?.companyInfo.firstMonthOfFY??1));return _((o=>o.cardBalanceState.fetchState))==="Error"?d.jsx(Me,{}):d.jsx(ps,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,firstMonthOfFY:n})}const gs=Tt.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-DwoS2LTS.js";import{a as u}from"./sentry-BF2EAQwc.js";import{u as y,j as b,l as U,g as w,N as A}from"./core-Beu9kTtR.js";import{Ud as N,fI as _,go as k,Ue as L,pW as R,Uf as z}from"./zeni-epic-state-1d5RmIXy.js";import{u as j,z as f,L as T,t as I,G as O,b as $}from"./index-BfNeAGgC.js";import"./mui-DEiF_Hb4.js";import{t as P}from"./getLocaleForTenant-YwW4TLUd.js";import"./recharts-MD3a-5g4.js";import"./analytics-k_LuQgHs.js";import"./plaid-UFuUhVwC.js";import"./dnd-BD4CdaiB.js";import"./stripe-cKAAJElX.js";import"./lottie-BGwNmPax.js";import"./lexical-ae4wZrjx.js";import"./pdf-CuKXyKjy.js";import"./utils-CaDQp8mU.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]="68fd5728-1db5-46a6-ae69-b0b8e81b5be6",t._sentryDebugIdIdentifier="sentry-dbid-68fd5728-1db5-46a6-ae69-b0b8e81b5be6")}catch{}})();const G=U((function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}}))((function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=w(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map((l=>l.tenantEmailDomain)),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,S=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,m="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce(((l,F)=>l||i.split("/").find((D=>D===F))!=null),!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,S=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=$(c,p);return v.jsx(A,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:S}})}}));function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=j(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b((e=>N(e))),n=b((e=>e.tenantState.fetchState)),i=b((e=>e.tenantState.error)),a=b((e=>e.tenantState.activeTenantFetchState.fetchState)),c=b((e=>_(e))),d=f.getSignedInUser();return u.useLayoutEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,h.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)}),[a,n]),u.useEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&I.shouldFetchActiveTenant(e)&&(h.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(k(d.userId,e))))}),[n,a,d,t]),u.useEffect((()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,S=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&S&&I.shouldFetchAllTenants()&&(r.current=!0,I.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!L(i))&&t(R(e.userId)))}),[n,a,i,d,t]),u.useEffect((()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())}),[m.tenantsCoreDetailsInOrder,n]),u.useEffect((()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(O.updateAppLocaleID(P(c)),o())}),[n,a,c]),v.jsx(G,{})}const Q=["dashboard/cash-balance","dashboard/card-balance","dashboard/operating-expenses","dashboard/revenue","dashboard/burn-rate","dashboard/cash-position","dashboard/top-expenses","dashboard/cash-in-cash-out","dashboard","reports","forecast","uncategorized-expense","uncategorized-income","missing-receipts","bills","cards/activate","cards","reimbursements","wise","checking","aicfo"],q={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of Q)if(t.toLocaleLowerCase().includes(s))return q[s]}export{oe as default};
1
+ import{j as v}from"./liveblocks-DwoS2LTS.js";import{a as u}from"./sentry-BF2EAQwc.js";import{u as y,j as b,l as U,g as w,N as A}from"./core-Beu9kTtR.js";import{Ud as N,fI as _,go as k,Ue as L,pW as R,Uf as z}from"./zeni-epic-state-1d5RmIXy.js";import{u as j,z as f,L as T,t as I,G as O,b as $}from"./index-uiG3EKFS.js";import"./mui-DEiF_Hb4.js";import{t as P}from"./getLocaleForTenant-D6Fn-XVk.js";import"./recharts-MD3a-5g4.js";import"./analytics-k_LuQgHs.js";import"./plaid-UFuUhVwC.js";import"./dnd-BD4CdaiB.js";import"./stripe-cKAAJElX.js";import"./lottie-BGwNmPax.js";import"./lexical-ae4wZrjx.js";import"./pdf-CuKXyKjy.js";import"./utils-CaDQp8mU.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]="68fd5728-1db5-46a6-ae69-b0b8e81b5be6",t._sentryDebugIdIdentifier="sentry-dbid-68fd5728-1db5-46a6-ae69-b0b8e81b5be6")}catch{}})();const G=U((function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}}))((function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=w(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map((l=>l.tenantEmailDomain)),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,S=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,m="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce(((l,F)=>l||i.split("/").find((D=>D===F))!=null),!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,S=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=$(c,p);return v.jsx(A,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:S}})}}));function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=j(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b((e=>N(e))),n=b((e=>e.tenantState.fetchState)),i=b((e=>e.tenantState.error)),a=b((e=>e.tenantState.activeTenantFetchState.fetchState)),c=b((e=>_(e))),d=f.getSignedInUser();return u.useLayoutEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,h.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)}),[a,n]),u.useEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&I.shouldFetchActiveTenant(e)&&(h.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(k(d.userId,e))))}),[n,a,d,t]),u.useEffect((()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,S=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&S&&I.shouldFetchAllTenants()&&(r.current=!0,I.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!L(i))&&t(R(e.userId)))}),[n,a,i,d,t]),u.useEffect((()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())}),[m.tenantsCoreDetailsInOrder,n]),u.useEffect((()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(O.updateAppLocaleID(P(c)),o())}),[n,a,c]),v.jsx(G,{})}const Q=["dashboard/cash-balance","dashboard/card-balance","dashboard/operating-expenses","dashboard/revenue","dashboard/burn-rate","dashboard/cash-position","dashboard/top-expenses","dashboard/cash-in-cash-out","dashboard","reports","forecast","uncategorized-expense","uncategorized-income","missing-receipts","bills","cards/activate","cards","reimbursements","wise","checking","aicfo"],q={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of Q)if(t.toLocaleLowerCase().includes(s))return q[s]}export{oe as default};
@@ -1,4 +1,4 @@
1
- import{j as l}from"./liveblocks-DwoS2LTS.js";import{h as w,g as C,j as h,l as A,i as V}from"./core-Beu9kTtR.js";import{Zc as k,Zj as L,gJ as W,gI as J,gH as M,kT as X,Xa as Y,uV as q,fI as B,YL as D,kR as T,Zd as S,Zm as F,kP as G,la as j}from"./zeni-epic-state-1d5RmIXy.js";import{bL as K,_ as R,W as N,z as Z,a2 as b,A as v,a5 as U,bM as Q,F as _,bN as ee,p as te}from"./index-BfNeAGgC.js";import{u as H,n as O}from"./mui-DEiF_Hb4.js";import"./sentry-BF2EAQwc.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]="af8a2603-a2ce-4547-8a63-d50c15a23ef2",e._sentryDebugIdIdentifier="sentry-dbid-af8a2603-a2ce-4547-8a63-d50c15a23ef2")}catch{}})();const ae=A(null,(function(e,t){return{onSaveVendor:a=>{e(X(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(Y("common")),a!=null&&e(q(a))},onGetOtp:a=>{e(M(a,"BillPayVendor"))},onResendOtp:a=>{e(J(a,"BillPayVendor"))},onVerifyOtp:(a,n)=>{e(W(a,n,"BillPayVendor"))},onVerifyOtpSuccess:(a,n,o)=>{e(L(a,n,o))}}}))(K);function z({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=O.div`
1
+ import{j as l}from"./liveblocks-DwoS2LTS.js";import{h as w,g as C,j as h,l as A,i as V}from"./core-Beu9kTtR.js";import{Zc as k,Zj as L,gJ as W,gI as J,gH as M,kT as X,Xa as Y,uV as q,fI as B,YL as D,kR as T,Zd as S,Zm as F,kP as G,la as j}from"./zeni-epic-state-1d5RmIXy.js";import{bL as K,_ as R,W as N,z as Z,a2 as b,A as v,a5 as U,bM as Q,F as _,bN as ee,p as te}from"./index-uiG3EKFS.js";import{u as H,n as O}from"./mui-DEiF_Hb4.js";import"./sentry-BF2EAQwc.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]="af8a2603-a2ce-4547-8a63-d50c15a23ef2",e._sentryDebugIdIdentifier="sentry-dbid-af8a2603-a2ce-4547-8a63-d50c15a23ef2")}catch{}})();const ae=A(null,(function(e,t){return{onSaveVendor:a=>{e(X(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(Y("common")),a!=null&&e(q(a))},onGetOtp:a=>{e(M(a,"BillPayVendor"))},onResendOtp:a=>{e(J(a,"BillPayVendor"))},onVerifyOtp:(a,n)=>{e(W(a,n,"BillPayVendor"))},onVerifyOtpSuccess:(a,n,o)=>{e(L(a,n,o))}}}))(K);function z({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=O.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{j as i}from"./liveblocks-DwoS2LTS.js";import{_ as l,a9 as c}from"./index-BfNeAGgC.js";import{u as f,D as p}from"./mui-DEiF_Hb4.js";import"./sentry-BF2EAQwc.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]="7343a8d4-dee6-4ca7-9ab3-2b3236099e14",e._sentryDebugIdIdentifier="sentry-dbid-7343a8d4-dee6-4ca7-9ab3-2b3236099e14")}catch{}})();const b={drawerLeftMargin:new c(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:a,onClose:t}=e,n=l(),s=o?.valuePx(n)??b.drawerLeftMargin.valuePx(n),d=f();return i.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.8,cursor:"pointer"}}},onClose:t,children:a})}export{h as D};
1
+ import{j as i}from"./liveblocks-DwoS2LTS.js";import{_ as l,a9 as c}from"./index-uiG3EKFS.js";import{u as f,D as p}from"./mui-DEiF_Hb4.js";import"./sentry-BF2EAQwc.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]="7343a8d4-dee6-4ca7-9ab3-2b3236099e14",e._sentryDebugIdIdentifier="sentry-dbid-7343a8d4-dee6-4ca7-9ab3-2b3236099e14")}catch{}})();const b={drawerLeftMargin:new c(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:a,onClose:t}=e,n=l(),s=o?.valuePx(n)??b.drawerLeftMargin.valuePx(n),d=f();return i.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.8,cursor:"pointer"}}},onClose:t,children:a})}export{h as D};
@@ -1 +1 @@
1
- import{j as s}from"./liveblocks-DwoS2LTS.js";import{a as c}from"./sentry-BF2EAQwc.js";import{h as A,u as G,g as X,i as q,j as d,N as W,l as F,n as N,o as O}from"./core-Beu9kTtR.js";import{Xf as _,fI as M,Ww as R,n3 as Y,Sx as I,Xk as $,X9 as z,m3 as V,Sy as S,WB as H,WC as J,Xb as K,Xa as L}from"./zeni-epic-state-1d5RmIXy.js";import{b6 as Q,j as U,a2 as Z,p as tt}from"./index-BfNeAGgC.js";import"./mui-DEiF_Hb4.js";import{d as k}from"./decodeURIComponentSafe-0ml5lsEu.js";import{w as et}from"./withTransactionSidePanel-DH0DiNtU.js";import{f as at,c as nt}from"./routePaths-uZogBPDo.js";import"./recharts-MD3a-5g4.js";import"./analytics-k_LuQgHs.js";import"./plaid-UFuUhVwC.js";import"./dnd-BD4CdaiB.js";import"./stripe-cKAAJElX.js";import"./lottie-BGwNmPax.js";import"./lexical-ae4wZrjx.js";import"./pdf-CuKXyKjy.js";import"./utils-CaDQp8mU.js";import"./useAskAiCfoHostNavButtonProps-B4mYX3VH.js";import"./TransactionDetailScreen-JD8O14oY.js";import"./useInitialThreadRequest-BhgsGG5D.js";import"./expenseAutomationHelper-dXFQtPOw.js";import"./stripSplatSuffix-6CTGoq-D.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]="c222fd5a-c590-4c28-89c3-9ef1e79a557a",a._sentryDebugIdIdentifier="sentry-dbid-c222fd5a-c590-4c28-89c3-9ef1e79a557a")}catch{}})();const ot=F((function(a,t){const e=t.entity,o=$(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:z(a,"common")},trendWithTransactionsReport:o,analytics:U,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(K({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(L("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(H()),a(J()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??C();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(I(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(Q),it=et((function({entityType:a,...t}){const e=A(),o=G(),l=X(),[m,T]=c.useState(!1),[h,D]=c.useState(!1),{tenantEmailDomain:b,entityIdEncoded:x,entityNameEncoded:j}=q(),r=k(x??""),p=k(j??""),f=rt(r,p),w=[r,p].filter((n=>n!=null)),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=d((n=>_(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),v=d((n=>M(n).company?.companyInfo.firstMonthOfFY??1)),u=d((n=>R(n.trendWithTransactionsState,i,"EntityDetail")));c.useEffect((()=>{m===!1&&f===!0&&(T(!0),o(Y(i)))}),[m,f,i]);const E=d((n=>n.trendState.fetchState)),P=u?.selectedPeriod?.timePeriod??g,B=(function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y})(u?.selectedPeriod?.timePeriod,g);return c.useEffect((()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(I(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))}),[m,h,E]),f?s.jsx(ot,{firstMonthOfFY:v,tenantEmailDomain:b,location:l,navigate:e,entity:i,defaultTransactionTimePeriod:B,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(W,{to:C(w.length)})})),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,C=(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-DwoS2LTS.js";import{a as c}from"./sentry-BF2EAQwc.js";import{h as A,u as G,g as X,i as q,j as d,N as W,l as F,n as N,o as O}from"./core-Beu9kTtR.js";import{Xf as _,fI as M,Ww as R,n3 as Y,Sx as I,Xk as $,X9 as z,m3 as V,Sy as S,WB as H,WC as J,Xb as K,Xa as L}from"./zeni-epic-state-1d5RmIXy.js";import{b6 as Q,j as U,a2 as Z,p as tt}from"./index-uiG3EKFS.js";import"./mui-DEiF_Hb4.js";import{d as k}from"./decodeURIComponentSafe-0ml5lsEu.js";import{w as et}from"./withTransactionSidePanel-C94wKtuS.js";import{f as at,c as nt}from"./routePaths-rrjrsp87.js";import"./recharts-MD3a-5g4.js";import"./analytics-k_LuQgHs.js";import"./plaid-UFuUhVwC.js";import"./dnd-BD4CdaiB.js";import"./stripe-cKAAJElX.js";import"./lottie-BGwNmPax.js";import"./lexical-ae4wZrjx.js";import"./pdf-CuKXyKjy.js";import"./utils-CaDQp8mU.js";import"./useAskAiCfoHostNavButtonProps-23fa71Mo.js";import"./TransactionDetailScreen-C8rio2jQ.js";import"./useInitialThreadRequest-CSnvFEFF.js";import"./expenseAutomationHelper-dXFQtPOw.js";import"./stripSplatSuffix-6CTGoq-D.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]="c222fd5a-c590-4c28-89c3-9ef1e79a557a",a._sentryDebugIdIdentifier="sentry-dbid-c222fd5a-c590-4c28-89c3-9ef1e79a557a")}catch{}})();const ot=F((function(a,t){const e=t.entity,o=$(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:z(a,"common")},trendWithTransactionsReport:o,analytics:U,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(K({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(L("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(H()),a(J()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??C();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(I(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(Q),it=et((function({entityType:a,...t}){const e=A(),o=G(),l=X(),[m,T]=c.useState(!1),[h,D]=c.useState(!1),{tenantEmailDomain:b,entityIdEncoded:x,entityNameEncoded:j}=q(),r=k(x??""),p=k(j??""),f=rt(r,p),w=[r,p].filter((n=>n!=null)),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=d((n=>_(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),v=d((n=>M(n).company?.companyInfo.firstMonthOfFY??1)),u=d((n=>R(n.trendWithTransactionsState,i,"EntityDetail")));c.useEffect((()=>{m===!1&&f===!0&&(T(!0),o(Y(i)))}),[m,f,i]);const E=d((n=>n.trendState.fetchState)),P=u?.selectedPeriod?.timePeriod??g,B=(function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y})(u?.selectedPeriod?.timePeriod,g);return c.useEffect((()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(I(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))}),[m,h,E]),f?s.jsx(ot,{firstMonthOfFY:v,tenantEmailDomain:b,location:l,navigate:e,entity:i,defaultTransactionTimePeriod:B,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(W,{to:C(w.length)})})),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,C=(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-DwoS2LTS.js";import{u as ge,h as nt,g as Te,j as F,i as Be,t as Jn,l as Yn,n as Wn,o as Ke,N as Kn}from"./core-Beu9kTtR.js";import{fI as ke,a1n as Hn,q4 as Me,Uw as Xn,Af as Qn,a1o as Zn,a1p as es,a1q as ts,a1r as Ct,a1s as Xe,gk as bt,a1t as ia,eH as as,g3 as ns,a1u as la,a1v as Qe,qX as ss,uY as os,gW as cs,gU as is,a1w as ls,r8 as rs,rh as ds,qf as us,qt as Ra,gT as ue,gV as ms,a1x as ps,qP as Da,ri as hs,qq as Ss,ql as gs,v2 as Cs,gS as Oe,a1y as tt,Cp as Fa,MP as _a,a1z as Ma,FK as Oa,a1A as fs,e$ as Is,f1 as ks,sZ as Pt,Xg as ra,Xi as Ts,m6 as bs,Xj as Ps,md as ys,dm as vs,DI as yt,a1B as Es,a1C as As,a1D as xs,a1E as ws,fp as vt,sN as da,X9 as Rs,a1F as Ds,a1G as Fs,mf as _s,a1H as Ms,Ry as Os,me as Us,m3 as Bs,qI as Ua,rn as at,tA as Ba,tW as Vs,Um as Va,rm as ua,rp as ja,rr as js,bF as zs,nC as $s,nz as Ls,rq as Ze,ro as Se,a1I as Gs,rI as ma,a1J as Ns,a1K as qs,sR as Js,sS as Ys,X5 as Ws,Wb as Ks,a0R as Hs,a1L as Xs,Xb as pa,Xa as He,a1M as ha,mu as Qs,a1N as Zs,a1O as eo,a1P as to,a1Q as ao,qD as no,a1R as so,a1S as oo,a1T as co,ry as io,mh as lo,m8 as ro,a1U as uo,mg as Sa,Xt as mo,a1V as po,a1W as ho,uz as So,ua as go,u9 as ft,a1X as Co,a1Y as fo,a1Z as Io,a1_ as ko,nN as To,br as bo,nI as ga,nu as Po,a1$ as yo,h3 as vo,nF as Eo,s$ as Ao,t1 as xo,sK as wo,We as Ro,Wf as Do,Fc as Fo,Fb as _o,Fs as Mo,a20 as Ca,sQ as Oo,sl as Uo,a21 as Bo,s1 as Vo,s6 as jo,sh as zo,s4 as $o,a22 as Lo,rZ as Go,sg as No,sW as qo,a23 as Jo,t7 as Yo,sE as Wo,td as Ko,sJ as Ho,rJ as Xo,a24 as Qo,q$ as Zo,qz as ec,qG as fa,rt as tc,a25 as ac,a26 as nc,a27 as sc,a28 as oc,a29 as cc,a2a as ic,a2b as lc,th as rc,a2c as dc,a2d as uc,a2e as Ia,uK as mc,u1 as pc,tS as ka,tQ as hc,a2f as Sc,tF as gc,tk as Cc,tT as fc,a2g as Ic,a2h as kc,tq as Tc,a2i as bc,tl as Pc,tp as yc,tn as vc,tZ as Ec}from"./zeni-epic-state-1d5RmIXy.js";import za from"./NotFoundScreen-DK36JFcR.js";import{a as s,R as $a}from"./sentry-BF2EAQwc.js";import{n as be,S as Ac}from"./mui-DEiF_Hb4.js";import{W as Ve,A as W,j as K,p as ee,ao as La,aq as Ga,dM as xc,dN as wc,z as st,dO as Rc,dP as Dc,dQ as Fc,ac as Ue,dR as _c,dS as Ta,b8 as ba,dT as Mc,a5 as Na,dU as Oc,h as et,a as Uc,dV as Bc,dW as Vc,K as jc,V as zc,dX as $c,dY as Lc,dZ as Gc,b2 as Nc,bq as qc,a9 as Jc,b3 as Yc,b4 as Wc,G as Kc,w as Hc,d_ as Xc,at as Pa,d$ as Qc}from"./index-BfNeAGgC.js";import{u as qa}from"./useAskAiCfoHostNavButtonProps-B4mYX3VH.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-JD8O14oY.js";import{u as ci,a as ii}from"./useActualMatchingMatchDetail-4m9qzYbe.js";import{d as li}from"./decodeURIComponentSafe-0ml5lsEu.js";import{m as Ja,a as Ya}from"./expenseAutomationHelper-dXFQtPOw.js";import{u as Wa,a as Ka,w as ri}from"./withTransactionSidePanel-DH0DiNtU.js";import{b as di,S as ui,a as mi,J as pi}from"./ScheduleDetailsPrepaidExpensesScreen-BKYsisUv.js";import{s as va,i as Ha,h as hi,v as Si,c as gi}from"./routePaths-uZogBPDo.js";import{a as It}from"./accountMappingHelper-DKrp-2iY.js";import{D as Ci}from"./DrawerScreen-CN9HYciY.js";import"./recharts-MD3a-5g4.js";import"./analytics-k_LuQgHs.js";import"./plaid-UFuUhVwC.js";import"./dnd-BD4CdaiB.js";import"./stripe-cKAAJElX.js";import"./lottie-BGwNmPax.js";import"./lexical-ae4wZrjx.js";import"./pdf-CuKXyKjy.js";import"./utils-CaDQp8mU.js";import"./useInitialThreadRequest-BhgsGG5D.js";import"./stripSplatSuffix-6CTGoq-D.js";import"./pathToGoBack-DlfSGzqF.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]="53aafec7-3472-484a-8930-cbd958e7d6e6",t._sentryDebugIdIdentifier="sentry-dbid-53aafec7-3472-484a-8930-cbd958e7d6e6")}catch{}})();const fi=()=>{const t=ge(),n=nt(),S=Te(),g=F((p=>ke(p))),{useFeatureGate:d}=Ve(),{isFeatureEnabled:i}=d(W.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=d(W.aiAuditScorePercentage),A=F((p=>p.expenseAutomationViewState.selectedPeriodByTenantId)),l=F((p=>Hn(p,g.tenantId))),{isAiCfoAccessEnabled:v,onAskAiCfoClick:x}=qa({mobileExploreReferrer:"Month-End Close Overview"}),b=s.useCallback(((p,P,_=!1)=>{t(Me({tenantId:P,period:{month:p.month,year:p.year},refreshViewInBackground:_}))}),[]),C=s.useCallback((p=>{const P=S.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&K.trackMonthCloseAuditPage(p.month,p.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,P??null),t(Xn(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&&K.trackMonthCloseAuditPage(f.month,f.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,p??null),b(f,g.tenantId,!0)}),[b,f,g.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),z=ee(S.state?.pathnameStackToGoBack,S.pathname),w=s.useCallback((()=>{if(l.monthEndCloseChecks!=null&&f!=null){const p=l.monthEndCloseChecks.monthEndCloseCheckList.find((P=>P.progress<100));if(p!=null)return void n(`./${p.id}/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:z,message:"comingFromOverview"}});n(`./month_end_insights/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:z,message:"comingFromOverview"}})}}),[l.monthEndCloseChecks,f]),{areTenantIdsInSync:I}=La();return Ga({isDataReady:l.fetchState==="Completed"}),s.useEffect((()=>{f!=null&&l.fetchState!=="In-Progress"&&l.fetchState!=="Completed"&&I&&b(f,g.tenantId)}),[b,f,l.fetchState,g.tenantId,I]),s.useEffect((()=>{f!=null&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&I&&t(Qn(f))}),[f,l.monthClosePerformanceTrendFetchStatus.fetchState,I]),s.useEffect((()=>{const p=setInterval((()=>{l.fetchState!=="In-Progress"&&l.fetchState==="Completed"&&m()}),3e5);return()=>clearInterval(p)}),[l.fetchState]),s.useEffect((()=>{if(l.fetchState==="Completed"&&l.monthEndCloseChecks?.auditSummary!=null){const p=S.state?.referrer;K.trackMonthCloseAuditPage(l.selectedPeriod.month,l.selectedPeriod.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,p??null)}}),[l.fetchState,l.selectedPeriod,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),k.jsx(Ii,{children:k.jsx(xc,{monthEndCloseChecksView:l,isRealtimeInsightsFeatureEnabled:i,onMonthEndCheckClick:p=>{n(`./${p}/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:z,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:C,handleReviewButtonClick:w,onBackClick:()=>{n("../../dashboard")},onReload:m,isAiCfoAccessEnabled:v,onAskAiCfoClick:x,aiAuditScorePercentageEnabled:r})})},Ii=be.div`
1
+ import{j as k}from"./liveblocks-DwoS2LTS.js";import{u as ge,h as nt,g as Te,j as F,i as Be,t as Jn,l as Yn,n as Wn,o as Ke,N as Kn}from"./core-Beu9kTtR.js";import{fI as ke,a1n as Hn,q4 as Me,Uw as Xn,Af as Qn,a1o as Zn,a1p as es,a1q as ts,a1r as Ct,a1s as Xe,gk as bt,a1t as ia,eH as as,g3 as ns,a1u as la,a1v as Qe,qX as ss,uY as os,gW as cs,gU as is,a1w as ls,r8 as rs,rh as ds,qf as us,qt as Ra,gT as ue,gV as ms,a1x as ps,qP as Da,ri as hs,qq as Ss,ql as gs,v2 as Cs,gS as Oe,a1y as tt,Cp as Fa,MP as _a,a1z as Ma,FK as Oa,a1A as fs,e$ as Is,f1 as ks,sZ as Pt,Xg as ra,Xi as Ts,m6 as bs,Xj as Ps,md as ys,dm as vs,DI as yt,a1B as Es,a1C as As,a1D as xs,a1E as ws,fp as vt,sN as da,X9 as Rs,a1F as Ds,a1G as Fs,mf as _s,a1H as Ms,Ry as Os,me as Us,m3 as Bs,qI as Ua,rn as at,tA as Ba,tW as Vs,Um as Va,rm as ua,rp as ja,rr as js,bF as zs,nC as $s,nz as Ls,rq as Ze,ro as Se,a1I as Gs,rI as ma,a1J as Ns,a1K as qs,sR as Js,sS as Ys,X5 as Ws,Wb as Ks,a0R as Hs,a1L as Xs,Xb as pa,Xa as He,a1M as ha,mu as Qs,a1N as Zs,a1O as eo,a1P as to,a1Q as ao,qD as no,a1R as so,a1S as oo,a1T as co,ry as io,mh as lo,m8 as ro,a1U as uo,mg as Sa,Xt as mo,a1V as po,a1W as ho,uz as So,ua as go,u9 as ft,a1X as Co,a1Y as fo,a1Z as Io,a1_ as ko,nN as To,br as bo,nI as ga,nu as Po,a1$ as yo,h3 as vo,nF as Eo,s$ as Ao,t1 as xo,sK as wo,We as Ro,Wf as Do,Fc as Fo,Fb as _o,Fs as Mo,a20 as Ca,sQ as Oo,sl as Uo,a21 as Bo,s1 as Vo,s6 as jo,sh as zo,s4 as $o,a22 as Lo,rZ as Go,sg as No,sW as qo,a23 as Jo,t7 as Yo,sE as Wo,td as Ko,sJ as Ho,rJ as Xo,a24 as Qo,q$ as Zo,qz as ec,qG as fa,rt as tc,a25 as ac,a26 as nc,a27 as sc,a28 as oc,a29 as cc,a2a as ic,a2b as lc,th as rc,a2c as dc,a2d as uc,a2e as Ia,uK as mc,u1 as pc,tS as ka,tQ as hc,a2f as Sc,tF as gc,tk as Cc,tT as fc,a2g as Ic,a2h as kc,tq as Tc,a2i as bc,tl as Pc,tp as yc,tn as vc,tZ as Ec}from"./zeni-epic-state-1d5RmIXy.js";import za from"./NotFoundScreen-AyzG_edV.js";import{a as s,R as $a}from"./sentry-BF2EAQwc.js";import{n as be,S as Ac}from"./mui-DEiF_Hb4.js";import{W as Ve,A as W,j as K,p as ee,ao as La,aq as Ga,dM as xc,dN as wc,z as st,dO as Rc,dP as Dc,dQ as Fc,ac as Ue,dR as _c,dS as Ta,b8 as ba,dT as Mc,a5 as Na,dU as Oc,h as et,a as Uc,dV as Bc,dW as Vc,K as jc,V as zc,dX as $c,dY as Lc,dZ as Gc,b2 as Nc,bq as qc,a9 as Jc,b3 as Yc,b4 as Wc,G as Kc,w as Hc,d_ as Xc,at as Pa,d$ as Qc}from"./index-uiG3EKFS.js";import{u as qa}from"./useAskAiCfoHostNavButtonProps-23fa71Mo.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-C8rio2jQ.js";import{u as ci,a as ii}from"./useActualMatchingMatchDetail-_hiYAs66.js";import{d as li}from"./decodeURIComponentSafe-0ml5lsEu.js";import{m as Ja,a as Ya}from"./expenseAutomationHelper-dXFQtPOw.js";import{u as Wa,a as Ka,w as ri}from"./withTransactionSidePanel-C94wKtuS.js";import{b as di,S as ui,a as mi,J as pi}from"./ScheduleDetailsPrepaidExpensesScreen-CW0w2OzE.js";import{s as va,i as Ha,h as hi,v as Si,c as gi}from"./routePaths-rrjrsp87.js";import{a as It}from"./accountMappingHelper-DKrp-2iY.js";import{D as Ci}from"./DrawerScreen-Dt4KuLag.js";import"./recharts-MD3a-5g4.js";import"./analytics-k_LuQgHs.js";import"./plaid-UFuUhVwC.js";import"./dnd-BD4CdaiB.js";import"./stripe-cKAAJElX.js";import"./lottie-BGwNmPax.js";import"./lexical-ae4wZrjx.js";import"./pdf-CuKXyKjy.js";import"./utils-CaDQp8mU.js";import"./useInitialThreadRequest-CSnvFEFF.js";import"./stripSplatSuffix-6CTGoq-D.js";import"./pathToGoBack-DlfSGzqF.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]="53aafec7-3472-484a-8930-cbd958e7d6e6",t._sentryDebugIdIdentifier="sentry-dbid-53aafec7-3472-484a-8930-cbd958e7d6e6")}catch{}})();const fi=()=>{const t=ge(),n=nt(),S=Te(),g=F((p=>ke(p))),{useFeatureGate:d}=Ve(),{isFeatureEnabled:i}=d(W.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=d(W.aiAuditScorePercentage),A=F((p=>p.expenseAutomationViewState.selectedPeriodByTenantId)),l=F((p=>Hn(p,g.tenantId))),{isAiCfoAccessEnabled:v,onAskAiCfoClick:x}=qa({mobileExploreReferrer:"Month-End Close Overview"}),b=s.useCallback(((p,P,_=!1)=>{t(Me({tenantId:P,period:{month:p.month,year:p.year},refreshViewInBackground:_}))}),[]),C=s.useCallback((p=>{const P=S.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&K.trackMonthCloseAuditPage(p.month,p.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,P??null),t(Xn(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&&K.trackMonthCloseAuditPage(f.month,f.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,p??null),b(f,g.tenantId,!0)}),[b,f,g.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),z=ee(S.state?.pathnameStackToGoBack,S.pathname),w=s.useCallback((()=>{if(l.monthEndCloseChecks!=null&&f!=null){const p=l.monthEndCloseChecks.monthEndCloseCheckList.find((P=>P.progress<100));if(p!=null)return void n(`./${p.id}/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:z,message:"comingFromOverview"}});n(`./month_end_insights/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:z,message:"comingFromOverview"}})}}),[l.monthEndCloseChecks,f]),{areTenantIdsInSync:I}=La();return Ga({isDataReady:l.fetchState==="Completed"}),s.useEffect((()=>{f!=null&&l.fetchState!=="In-Progress"&&l.fetchState!=="Completed"&&I&&b(f,g.tenantId)}),[b,f,l.fetchState,g.tenantId,I]),s.useEffect((()=>{f!=null&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&I&&t(Qn(f))}),[f,l.monthClosePerformanceTrendFetchStatus.fetchState,I]),s.useEffect((()=>{const p=setInterval((()=>{l.fetchState!=="In-Progress"&&l.fetchState==="Completed"&&m()}),3e5);return()=>clearInterval(p)}),[l.fetchState]),s.useEffect((()=>{if(l.fetchState==="Completed"&&l.monthEndCloseChecks?.auditSummary!=null){const p=S.state?.referrer;K.trackMonthCloseAuditPage(l.selectedPeriod.month,l.selectedPeriod.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,p??null)}}),[l.fetchState,l.selectedPeriod,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),k.jsx(Ii,{children:k.jsx(xc,{monthEndCloseChecksView:l,isRealtimeInsightsFeatureEnabled:i,onMonthEndCheckClick:p=>{n(`./${p}/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:z,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:C,handleReviewButtonClick:w,onBackClick:()=>{n("../../dashboard")},onReload:m,isAiCfoAccessEnabled:v,onAskAiCfoClick:x,aiAuditScorePercentageEnabled:r})})},Ii=be.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{j as s}from"./liveblocks-DwoS2LTS.js";import{a as r}from"./sentry-BF2EAQwc.js";import{au as d,av as l,$ as p,a2 as f}from"./index-BfNeAGgC.js";import"./mui-DEiF_Hb4.js";import m from"./NotFoundScreen-DK36JFcR.js";import{h as u,g as b}from"./core-Beu9kTtR.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]="e05c8e10-94d4-42c9-8a76-8483c25ef913",e._sentryDebugIdIdentifier="sentry-dbid-e05c8e10-94d4-42c9-8a76-8483c25ef913")}catch{}})();const _=()=>{const e=u(),a=b(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),c=r.useCallback((()=>{(()=>{const n=f(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:c}):s.jsx(m,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{_ as F};
1
+ import{j as s}from"./liveblocks-DwoS2LTS.js";import{a as r}from"./sentry-BF2EAQwc.js";import{au as d,av as l,$ as p,a2 as f}from"./index-uiG3EKFS.js";import"./mui-DEiF_Hb4.js";import m from"./NotFoundScreen-AyzG_edV.js";import{h as u,g as b}from"./core-Beu9kTtR.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]="e05c8e10-94d4-42c9-8a76-8483c25ef913",e._sentryDebugIdIdentifier="sentry-dbid-e05c8e10-94d4-42c9-8a76-8483c25ef913")}catch{}})();const _=()=>{const e=u(),a=b(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),c=r.useCallback((()=>{(()=>{const n=f(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:c}):s.jsx(m,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{_ as F};
@@ -1 +1 @@
1
- import{a as i}from"./sentry-BF2EAQwc.js";import{u as f,h as l,g as m}from"./core-Beu9kTtR.js";import{i0 as p,UT as g,UU as _}from"./zeni-epic-state-1d5RmIXy.js";import{u as b,L as h,z as y}from"./index-BfNeAGgC.js";import"./liveblocks-DwoS2LTS.js";import"./recharts-MD3a-5g4.js";import"./mui-DEiF_Hb4.js";import"./analytics-k_LuQgHs.js";import"./plaid-UFuUhVwC.js";import"./dnd-BD4CdaiB.js";import"./stripe-cKAAJElX.js";import"./lottie-BGwNmPax.js";import"./lexical-ae4wZrjx.js";import"./pdf-CuKXyKjy.js";import"./utils-CaDQp8mU.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]="3a817b4c-87f7-4e7d-964e-fd2d1ac22f81",e._sentryDebugIdIdentifier="sentry-dbid-3a817b4c-87f7-4e7d-964e-fd2d1ac22f81")}catch{}})();function j(){const e=f(),n=l(),r=m(),{setLoading:o,clearAllLoading:u}=b(),s=i.useRef(!1);return i.useLayoutEffect((()=>{o(h.CONNECTION_AUTH)}),[o]),i.useEffect((()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(r.search).get("code"),d=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&d!=null){const t=JSON.parse(d);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}u();const c=y.getActiveTenantForUser();n(c?.tenantEmailDomain!=null?`/${c.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{j as default};
1
+ import{a as i}from"./sentry-BF2EAQwc.js";import{u as f,h as l,g as m}from"./core-Beu9kTtR.js";import{i0 as p,UT as g,UU as _}from"./zeni-epic-state-1d5RmIXy.js";import{u as b,L as h,z as y}from"./index-uiG3EKFS.js";import"./liveblocks-DwoS2LTS.js";import"./recharts-MD3a-5g4.js";import"./mui-DEiF_Hb4.js";import"./analytics-k_LuQgHs.js";import"./plaid-UFuUhVwC.js";import"./dnd-BD4CdaiB.js";import"./stripe-cKAAJElX.js";import"./lottie-BGwNmPax.js";import"./lexical-ae4wZrjx.js";import"./pdf-CuKXyKjy.js";import"./utils-CaDQp8mU.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]="3a817b4c-87f7-4e7d-964e-fd2d1ac22f81",e._sentryDebugIdIdentifier="sentry-dbid-3a817b4c-87f7-4e7d-964e-fd2d1ac22f81")}catch{}})();function j(){const e=f(),n=l(),r=m(),{setLoading:o,clearAllLoading:u}=b(),s=i.useRef(!1);return i.useLayoutEffect((()=>{o(h.CONNECTION_AUTH)}),[o]),i.useEffect((()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(r.search).get("code"),d=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&d!=null){const t=JSON.parse(d);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}u();const c=y.getActiveTenantForUser();n(c?.tenantEmailDomain!=null?`/${c.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{j as default};