@zeniai/web-app-ui 5.3.70-dev → 5.3.70-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-D3djYfgp.js → AccountMappingScreen-DqcX7eSX.js} +1 -1
  2. package/dist/assets/{ActualMatchingMatchDetailScreen-Cq0gOwnW.js → ActualMatchingMatchDetailScreen-YIiKaKQ5.js} +1 -1
  3. package/dist/assets/{AddressRoutes-DgNiwEJi.js → AddressRoutes-BQwEhrxO.js} +1 -1
  4. package/dist/assets/{AddressScreen-BwYO5U79.js → AddressScreen-i3P2ph6T.js} +1 -1
  5. package/dist/assets/{AiCfoScreen-DA63Fu9p.js → AiCfoScreen-BssUSHKh.js} +1 -1
  6. package/dist/assets/{AppDrawer-BOrQkKOR.js → AppDrawer-Dql_QZ37.js} +1 -1
  7. package/dist/assets/{BillPayApprovalRoutes-B55H8WmV.js → BillPayApprovalRoutes-BCU4pCRz.js} +1 -1
  8. package/dist/assets/{BillPayRoutes-YFeZZcxr.js → BillPayRoutes-7r9rU7sl.js} +1 -1
  9. package/dist/assets/{BusinessVerificationPageScreen-DNvCS3RC.js → BusinessVerificationPageScreen-BtYE51TA.js} +1 -1
  10. package/dist/assets/{CardsAiCfoScreen-WX6-qDlM.js → CardsAiCfoScreen-C4xeVeSy.js} +1 -1
  11. package/dist/assets/{ChargeCardRoutes-DgHeyyF1.js → ChargeCardRoutes-BKebJlhL.js} +1 -1
  12. package/dist/assets/{CompanyPassportScreen-2YW4iiFQ.js → CompanyPassportScreen-BTV6sqcv.js} +1 -1
  13. package/dist/assets/{ConnectionAuthScreen-C3krXtMn.js → ConnectionAuthScreen-CxytsIZE.js} +1 -1
  14. package/dist/assets/{CustomerOnboardingAuthScreen-DuDZDqm3.js → CustomerOnboardingAuthScreen-BihvMY31.js} +1 -1
  15. package/dist/assets/{CustomerOnboardingRoutes-EqYjJciA.js → CustomerOnboardingRoutes-DNk5fzPY.js} +1 -1
  16. package/dist/assets/{DashboardRoutes-C3kckIqd.js → DashboardRoutes-D-v8IdFM.js} +1 -1
  17. package/dist/assets/{DefaultTenantHome-d_TjwNxm.js → DefaultTenantHome-Ctr8hbVg.js} +1 -1
  18. package/dist/assets/{DomesticWireDetailScreen-HvKTTv-k.js → DomesticWireDetailScreen-BhmYhgk9.js} +1 -1
  19. package/dist/assets/{DrawerScreen-lfwUNd7g.js → DrawerScreen-CiI0UwZ_.js} +1 -1
  20. package/dist/assets/{EntityDetailRoutes-C7CCgNbG.js → EntityDetailRoutes-DvFtuOf8.js} +1 -1
  21. package/dist/assets/{ExpenseAutomationRoutes-DhSen9oE.js → ExpenseAutomationRoutes-gNYcLYcp.js} +1 -1
  22. package/dist/assets/{FeaturePreviewScreen-DJDJb7ut.js → FeaturePreviewScreen-DiNAV9z-.js} +1 -1
  23. package/dist/assets/{HubSpotOAuthCallbackScreen-2bg-7CdA.js → HubSpotOAuthCallbackScreen-DweVccIt.js} +1 -1
  24. package/dist/assets/{InvoicingRoutes-DbeQ0GGQ.js → InvoicingRoutes-OgCHCVmr.js} +1 -1
  25. package/dist/assets/{MagicLinkRoutes-BJYHiuf3.js → MagicLinkRoutes-BwkRRCJu.js} +1 -1
  26. package/dist/assets/{MagicLinkSignInScreen-C_8LOIdG.js → MagicLinkSignInScreen-wnNTguw6.js} +1 -1
  27. package/dist/assets/{MobileAppDrawer-FDyQcQG6.js → MobileAppDrawer-C0d1iVMA.js} +1 -1
  28. package/dist/assets/{NotFoundScreen-Pkv6JCVI.js → NotFoundScreen-BEmDKBPw.js} +1 -1
  29. package/dist/assets/{NotificationRoutes-DRxPH61k.js → NotificationRoutes-CI7va7e0.js} +1 -1
  30. package/dist/assets/{OAuthConsentScreen-o8HVpzqy.js → OAuthConsentScreen-DV8WsAVC.js} +1 -1
  31. package/dist/assets/{PandLWithForecastRoutes-BoCd9gMg.js → PandLWithForecastRoutes-B1Gfn6ud.js} +1 -1
  32. package/dist/assets/{PaymentLinkScreen-BD2vlE8X.js → PaymentLinkScreen-CUXZafMx.js} +1 -1
  33. package/dist/assets/{PeopleRoutes-BrDezhiU.js → PeopleRoutes-Bn8rhJs3.js} +1 -1
  34. package/dist/assets/{PerformanceRoutes-CkvcEEfk.js → PerformanceRoutes-CvtwCDup.js} +1 -1
  35. package/dist/assets/{QBOConnectionScreen-rYcXSEuv.js → QBOConnectionScreen-2QWv8Ryp.js} +1 -1
  36. package/dist/assets/{ReimbursementApprovalRoutes-DeuDXp10.js → ReimbursementApprovalRoutes-EobIM3L1.js} +1 -1
  37. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-Dc1dHQbP.js → ReimbursementApprovalRuleDetailScreen-Wh8YBERv.js} +1 -1
  38. package/dist/assets/{ReimbursementRoutes-BiK6w-bL.js → ReimbursementRoutes-Cn40tr84.js} +1 -1
  39. package/dist/assets/{ReportsRoutes-B0eprtYT.js → ReportsRoutes-DnLayxiF.js} +1 -1
  40. package/dist/assets/{RewardsRoutes-BYgzQdTF.js → RewardsRoutes-xdDqPM6d.js} +1 -1
  41. package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-DWKBiKA_.js → ScheduleDetailsPrepaidExpensesScreen-CwSWMHf6.js} +1 -1
  42. package/dist/assets/{ScreenRoutes-CSYASqmo.js → ScreenRoutes-B8Lww7Hb.js} +2 -2
  43. package/dist/assets/{SettingsRoutes-C5_WEhpe.js → SettingsRoutes-C253rFo8.js} +1 -1
  44. package/dist/assets/{SetupPagesScreen-D70oyW5d.js → SetupPagesScreen-K8aynBOv.js} +1 -1
  45. package/dist/assets/{SignInScreen-CGIJ3MaT.js → SignInScreen-B673IWUl.js} +1 -1
  46. package/dist/assets/{SignOutScreen-ChO6ZqKr.js → SignOutScreen-BY00T1e6.js} +1 -1
  47. package/dist/assets/{TaskListScreen-D7zAKLvf.js → TaskListScreen-DqA1P3PO.js} +1 -1
  48. package/dist/assets/{TaskRoutes-BFQ2Wv7G.js → TaskRoutes-BXCCg41Z.js} +1 -1
  49. package/dist/assets/{TransactionDetailRoutes-8wfYIjz_.js → TransactionDetailRoutes-fr5aBjbx.js} +1 -1
  50. package/dist/assets/{TransactionDetailScreen-Dakxd2K4.js → TransactionDetailScreen-ZbhuUtai.js} +1 -1
  51. package/dist/assets/{TransactionListRoutes-wVc7qhB0.js → TransactionListRoutes-skEyucsa.js} +1 -1
  52. package/dist/assets/{TreasuryRoutes-C8xJsRN4.js → TreasuryRoutes-DULHfT4a.js} +1 -1
  53. package/dist/assets/{VendorsRoutes-BEDJSvt_.js → VendorsRoutes-DDjSbdmH.js} +1 -1
  54. package/dist/assets/{WiseConfirmationScreen-Dv4iPWVl.js → WiseConfirmationScreen-BeEAkT2z.js} +1 -1
  55. package/dist/assets/{ZeniAccountRoutes-BZbo3Uuo.js → ZeniAccountRoutes-ZpQZTXfH.js} +1 -1
  56. package/dist/assets/{ZeniAccountStatementScreen-CyKPDLyf.js → ZeniAccountStatementScreen-fYBBQyBB.js} +1 -1
  57. package/dist/assets/{analyticsHelper-D_76GpgW.js → analyticsHelper-CJXbjLla.js} +1 -1
  58. package/dist/assets/{getLocaleForTenant-DKQ9xDck.js → getLocaleForTenant-COzbHLDP.js} +1 -1
  59. package/dist/assets/{index-BUq8vLqs.js → index-D-DXs1ug.js} +5 -5
  60. package/dist/assets/{routePaths-BOMJaLfj.js → routePaths-BpwABclb.js} +1 -1
  61. package/dist/assets/{useActualMatchingMatchDetail-Boxo0AoI.js → useActualMatchingMatchDetail-CCjKruLV.js} +1 -1
  62. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-B1P2UXZw.js → useAiCfoDashboardSuggestedQuestionsChips-BeQw4E92.js} +1 -1
  63. package/dist/assets/{useAskAiCfoHostNavButtonProps-ClE0s8SA.js → useAskAiCfoHostNavButtonProps-B9dKaXC2.js} +1 -1
  64. package/dist/assets/{useChargeCardPusherEvents-XNiZ825w.js → useChargeCardPusherEvents-6cwlQnL1.js} +1 -1
  65. package/dist/assets/{useEmailConnectResultRefresh-C4LXGHtc.js → useEmailConnectResultRefresh-CD4x3asD.js} +1 -1
  66. package/dist/assets/{useInitialThreadRequest-8iuM_OK9.js → useInitialThreadRequest-CVcZLc8x.js} +1 -1
  67. package/dist/assets/{useTaskManagerAccess-Cv2RmrOC.js → useTaskManagerAccess-DkfJ_Uxt.js} +1 -1
  68. package/dist/assets/{useTaskManagerPusherEvents-D5RRqeH4.js → useTaskManagerPusherEvents-QjRM_WrB.js} +1 -1
  69. package/dist/assets/{withTransactionSidePanel-jttxQkuf.js → withTransactionSidePanel-_2doqhuK.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-CSh_vLcI.js";import{a as g}from"./sentry-BbRn6Rps.js";import{h as w,u as T,g as x,i as k,j as O,l as E}from"./core-BTRpO5kD.js";import{z as N,bs as F,a8 as P,m as L,T as V,s as b,bt as j,ae as A,aG as U,p as B}from"./index-BUq8vLqs.js";import{fI as D,gL as G,BL as M,gG as R,c9 as _,Yr as Y,bn as z,v1 as H,uR as Z,mC as $,ob as S,Ys as q,bF as J,cF as C,om as K,ow as Q}from"./zeni-epic-state-GGdMfKwk.js";import"./mui-DxxQrDXb.js";import{d as W}from"./routePaths-BOMJaLfj.js";import{M as X}from"./MobileAppDrawer-FDyQcQG6.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="15bc0f4b-2491-4737-838d-4e8a9d6628e6",t._sentryDebugIdIdentifier="sentry-dbid-15bc0f4b-2491-4737-838d-4e8a9d6628e6")}catch{}})();const ee=E((function(t){const a=R(t),i=N.getSignedInUser(),p=D(t),c=p.tenantId,l={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=_(p?.userRole??[])&&a.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=Y(t.companyConfigState),n=t.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:a.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:a,allIndustries:e.companyIndustries??[],allNationalityCountries:n,isDisabled:f,authParams:l,filesEndPoint:`${A.fileMicroServiceBaseUrl}`,isZeniUser:z(i)}}),(function(t,a){const{companyId:i,currentTenant:p,navigate:c,location:l}=a,{tenantEmailDomain:f}=p;return{onScheduleClick:e=>{let n=e.href;n.includes("http")||(n="https://".concat(n)),window.open(n,"_blank")},onSaveAll:()=>{t(Q())},onAddressClick:e=>{const n=W(f,e),o=B(l.state?.pathnameStackToGoBack,l.pathname);c(n,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{t(K({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:n,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:u}=n,{meetingLink:y}=d,{incDate:s}=o,{taxesFiledYears:h}=r,v={companyInfo:{...n,website:u!=""&&u!=null?C(u):void 0,meetingLink:y!=""&&y!=null?C(y):void 0,industry:n.industry.selectedOption,companyIndustryType:n.companyIndustryType?.selectedOption??void 0,companySubIndustry:n.companySubIndustry?.selectedOption??void 0,businessModel:n.businessModel.selectedOption??"",companySourceOfFunds:n.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:n.companySourceOfFundsDescription??void 0,countriesOfOperations:n.countriesOfOperations?.selectedOptions?.map((I=>I.length===2?I:U(I)))??[],transactionVolume:n.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:n.transactionVolumeDescription??void 0,regulatedStatus:n.regulatedStatus??void 0,regulatedStatusDescription:n.regulatedStatusDescription??void 0,usNexus:n.usNexus??void 0,usNexusTypes:n.usNexusTypes?.selectedOptions??[],purposeOfAccount:n.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:n.purposeOfAccountDescription??void 0},incInfo:{typeOfInc:o.typeOfInc.selectedOption??"",stateOfInc:o.stateOfInc.selectedOption??"",incDate:s!=null?J(s?.toString()):s,fileId:o.fileIds[0]},taxDetails:{taxIdOrEIN:r.taxIdOrEIN,sicCode:r.sicCode,naicsCode:r.naicsCode,dunsNumber:r.dunsNumber,taxesFiledYears:h.selectedOptions.map((I=>parseInt(I))),fileId:r.fileIds[0]}};t(S({companyDetails:v}))},onPrimaryContactDetailsUpdated:e=>{t(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{t(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=>{t(q(e))},onCompanyOfficerUpdated:e=>{t(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=>{t($({files:e}))},onDeleteFile:e=>{t(Z(e))},onEditFileName:(e,n)=>{t(H(e,n.split(".")[0]))}}}))(j);function de(){const t=w(),a=T(),i=x(),{tenantEmailDomain:p}=k(),[c,l]=g.useState(!1),[f,e]=g.useState(!1),n=O((s=>s.companyViewState.passportView.fetchState)),o=O((s=>s.companyConfigState.fetchState)),r=O((s=>D(s))),d=r.companyId??N.getSignedInUserTenant(p)?.companyId;if(N.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect((()=>{c||n!=="Not-Started"||d==null||(l(!0),a(G(d)))}),[c,n,d,a]),g.useEffect((()=>{o==="Not-Started"&&a(M())}),[o,a]);const u=s=>{e(s)},y=n==="Not-Started"||n==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&n==="Error"?m.jsx(F,{onGoHome:()=>t("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(P,{analytics:L,onLoad:s=>s.trackPageLoaded(V.Event.companyPassport,b(i)?"Settings":"Company Passport")}),b(i)?m.jsx(X,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:t,location:i,isLoading:y,currentTenant:r,isSettings:b(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
1
+ import{j as m}from"./liveblocks-CSh_vLcI.js";import{a as g}from"./sentry-BbRn6Rps.js";import{h as w,u as T,g as x,i as k,j as O,l as E}from"./core-BTRpO5kD.js";import{z as N,bs as F,a8 as P,m as L,T as V,s as b,bt as j,ae as A,aG as U,p as B}from"./index-D-DXs1ug.js";import{fI as D,gL as G,BL as M,gG as R,c9 as _,Yr as Y,bn as z,v1 as H,uR as Z,mC as $,ob as S,Ys as q,bF as J,cF as C,om as K,ow as Q}from"./zeni-epic-state-GGdMfKwk.js";import"./mui-DxxQrDXb.js";import{d as W}from"./routePaths-BpwABclb.js";import{M as X}from"./MobileAppDrawer-C0d1iVMA.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="15bc0f4b-2491-4737-838d-4e8a9d6628e6",t._sentryDebugIdIdentifier="sentry-dbid-15bc0f4b-2491-4737-838d-4e8a9d6628e6")}catch{}})();const ee=E((function(t){const a=R(t),i=N.getSignedInUser(),p=D(t),c=p.tenantId,l={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=_(p?.userRole??[])&&a.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=Y(t.companyConfigState),n=t.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:a.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:a,allIndustries:e.companyIndustries??[],allNationalityCountries:n,isDisabled:f,authParams:l,filesEndPoint:`${A.fileMicroServiceBaseUrl}`,isZeniUser:z(i)}}),(function(t,a){const{companyId:i,currentTenant:p,navigate:c,location:l}=a,{tenantEmailDomain:f}=p;return{onScheduleClick:e=>{let n=e.href;n.includes("http")||(n="https://".concat(n)),window.open(n,"_blank")},onSaveAll:()=>{t(Q())},onAddressClick:e=>{const n=W(f,e),o=B(l.state?.pathnameStackToGoBack,l.pathname);c(n,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{t(K({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:n,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:u}=n,{meetingLink:y}=d,{incDate:s}=o,{taxesFiledYears:h}=r,v={companyInfo:{...n,website:u!=""&&u!=null?C(u):void 0,meetingLink:y!=""&&y!=null?C(y):void 0,industry:n.industry.selectedOption,companyIndustryType:n.companyIndustryType?.selectedOption??void 0,companySubIndustry:n.companySubIndustry?.selectedOption??void 0,businessModel:n.businessModel.selectedOption??"",companySourceOfFunds:n.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:n.companySourceOfFundsDescription??void 0,countriesOfOperations:n.countriesOfOperations?.selectedOptions?.map((I=>I.length===2?I:U(I)))??[],transactionVolume:n.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:n.transactionVolumeDescription??void 0,regulatedStatus:n.regulatedStatus??void 0,regulatedStatusDescription:n.regulatedStatusDescription??void 0,usNexus:n.usNexus??void 0,usNexusTypes:n.usNexusTypes?.selectedOptions??[],purposeOfAccount:n.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:n.purposeOfAccountDescription??void 0},incInfo:{typeOfInc:o.typeOfInc.selectedOption??"",stateOfInc:o.stateOfInc.selectedOption??"",incDate:s!=null?J(s?.toString()):s,fileId:o.fileIds[0]},taxDetails:{taxIdOrEIN:r.taxIdOrEIN,sicCode:r.sicCode,naicsCode:r.naicsCode,dunsNumber:r.dunsNumber,taxesFiledYears:h.selectedOptions.map((I=>parseInt(I))),fileId:r.fileIds[0]}};t(S({companyDetails:v}))},onPrimaryContactDetailsUpdated:e=>{t(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{t(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=>{t(q(e))},onCompanyOfficerUpdated:e=>{t(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=>{t($({files:e}))},onDeleteFile:e=>{t(Z(e))},onEditFileName:(e,n)=>{t(H(e,n.split(".")[0]))}}}))(j);function de(){const t=w(),a=T(),i=x(),{tenantEmailDomain:p}=k(),[c,l]=g.useState(!1),[f,e]=g.useState(!1),n=O((s=>s.companyViewState.passportView.fetchState)),o=O((s=>s.companyConfigState.fetchState)),r=O((s=>D(s))),d=r.companyId??N.getSignedInUserTenant(p)?.companyId;if(N.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect((()=>{c||n!=="Not-Started"||d==null||(l(!0),a(G(d)))}),[c,n,d,a]),g.useEffect((()=>{o==="Not-Started"&&a(M())}),[o,a]);const u=s=>{e(s)},y=n==="Not-Started"||n==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&n==="Error"?m.jsx(F,{onGoHome:()=>t("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(P,{analytics:L,onLoad:s=>s.trackPageLoaded(V.Event.companyPassport,b(i)?"Settings":"Company Passport")}),b(i)?m.jsx(X,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:t,location:i,isLoading:y,currentTenant:r,isSettings:b(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
@@ -1,4 +1,4 @@
1
- import{j as I}from"./liveblocks-CSh_vLcI.js";import{a as o}from"./sentry-BbRn6Rps.js";import{u as F,h as R,g as H,j as C,N as w}from"./core-BTRpO5kD.js";import{U5 as q,fI as z,go as G,pV as V,gP as U,gn as Q,gl as B,Uv as J,gk as A}from"./zeni-epic-state-GGdMfKwk.js";import{u as K,z as E,L as D,G as M,N as W}from"./index-BUq8vLqs.js";import{n as X}from"./mui-DxxQrDXb.js";import{P as h,a as T}from"./AccountMappingScreen-D3djYfgp.js";import{t as Y}from"./getLocaleForTenant-DKQ9xDck.js";import{g as Z,Q as ee}from"./QBOConnectionScreen-rYcXSEuv.js";import"./recharts-TU-ixTpA.js";import"./analytics-Bwul-sh2.js";import"./plaid-BETTZw7O.js";import"./dnd-2ZjyQ0g9.js";import"./stripe-cKAAJElX.js";import"./lottie-CkDkDB9t.js";import"./lexical-B4Vx7iXM.js";import"./pdf-B5u-xbSo.js";import"./utils-CG6WKZWt.js";import"./MobileAppDrawer-FDyQcQG6.js";import"./InboxNotificationsProvider-RMyde6sE.js";import"./useTaskManagerAccess-Cv2RmrOC.js";import"./accountMappingHelper-CDXfdGYB.js";import"./empty-Cb7Nu9Hh.js";import"./pdf-lib-reHt5MEc.js";import"./index-EIrua76A.js";import"./url-COMcQU2v.js";import"./index-Ds59pPsN.js";import"./decodeURIComponentSafe-gQrUmSgy.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]="efa2a614-00e1-4012-a1b1-58014dbfd98e",t._sentryDebugIdIdentifier="sentry-dbid-efa2a614-00e1-4012-a1b1-58014dbfd98e")}catch{}})();const te=X.div`
1
+ import{j as I}from"./liveblocks-CSh_vLcI.js";import{a as o}from"./sentry-BbRn6Rps.js";import{u as F,h as R,g as H,j as C,N as w}from"./core-BTRpO5kD.js";import{U5 as q,fI as z,go as G,pV as V,gP as U,gn as Q,gl as B,Uv as J,gk as A}from"./zeni-epic-state-GGdMfKwk.js";import{u as K,z as E,L as D,G as M,N as W}from"./index-D-DXs1ug.js";import{n as X}from"./mui-DxxQrDXb.js";import{P as h,a as T}from"./AccountMappingScreen-DqcX7eSX.js";import{t as Y}from"./getLocaleForTenant-COzbHLDP.js";import{g as Z,Q as ee}from"./QBOConnectionScreen-2QWv8Ryp.js";import"./recharts-TU-ixTpA.js";import"./analytics-Bwul-sh2.js";import"./plaid-BETTZw7O.js";import"./dnd-2ZjyQ0g9.js";import"./stripe-cKAAJElX.js";import"./lottie-CkDkDB9t.js";import"./lexical-B4Vx7iXM.js";import"./pdf-B5u-xbSo.js";import"./utils-CG6WKZWt.js";import"./MobileAppDrawer-C0d1iVMA.js";import"./InboxNotificationsProvider-RMyde6sE.js";import"./useTaskManagerAccess-DkfJ_Uxt.js";import"./accountMappingHelper-CDXfdGYB.js";import"./empty-Cb7Nu9Hh.js";import"./pdf-lib-reHt5MEc.js";import"./index-EIrua76A.js";import"./url-COMcQU2v.js";import"./index-Ds59pPsN.js";import"./decodeURIComponentSafe-gQrUmSgy.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]="efa2a614-00e1-4012-a1b1-58014dbfd98e",t._sentryDebugIdIdentifier="sentry-dbid-efa2a614-00e1-4012-a1b1-58014dbfd98e")}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-CSh_vLcI.js";import{z as m}from"./index-BUq8vLqs.js";import{g as n}from"./QBOConnectionScreen-rYcXSEuv.js";import"./sentry-BbRn6Rps.js";import{g as p,N as a}from"./core-BTRpO5kD.js";import"./zeni-epic-state-GGdMfKwk.js";import"./recharts-TU-ixTpA.js";import"./mui-DxxQrDXb.js";import"./analytics-Bwul-sh2.js";import"./plaid-BETTZw7O.js";import"./dnd-2ZjyQ0g9.js";import"./stripe-cKAAJElX.js";import"./lottie-CkDkDB9t.js";import"./lexical-B4Vx7iXM.js";import"./pdf-B5u-xbSo.js";import"./utils-CG6WKZWt.js";import"./empty-Cb7Nu9Hh.js";import"./pdf-lib-reHt5MEc.js";import"./index-EIrua76A.js";import"./url-COMcQU2v.js";import"./index-Ds59pPsN.js";import"./decodeURIComponentSafe-gQrUmSgy.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-CSh_vLcI.js";import{z as m}from"./index-D-DXs1ug.js";import{g as n}from"./QBOConnectionScreen-2QWv8Ryp.js";import"./sentry-BbRn6Rps.js";import{g as p,N as a}from"./core-BTRpO5kD.js";import"./zeni-epic-state-GGdMfKwk.js";import"./recharts-TU-ixTpA.js";import"./mui-DxxQrDXb.js";import"./analytics-Bwul-sh2.js";import"./plaid-BETTZw7O.js";import"./dnd-2ZjyQ0g9.js";import"./stripe-cKAAJElX.js";import"./lottie-CkDkDB9t.js";import"./lexical-B4Vx7iXM.js";import"./pdf-B5u-xbSo.js";import"./utils-CG6WKZWt.js";import"./empty-Cb7Nu9Hh.js";import"./pdf-lib-reHt5MEc.js";import"./index-EIrua76A.js";import"./url-COMcQU2v.js";import"./index-Ds59pPsN.js";import"./decodeURIComponentSafe-gQrUmSgy.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-CSh_vLcI.js";import{t as wn,A as Me}from"./AddressScreen-BwYO5U79.js";import An from"./NotFoundScreen-Pkv6JCVI.js";import{a as d,t as $e}from"./sentry-BbRn6Rps.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-BTRpO5kD.js";import{fI as X,e0 as Ee,d$ as we,bq as jn,Um as Bn,bS as Fn,pT as Vn,Bv as Un,By as Rn,VJ as Ln,VK as Nn,lx as Oe,lA as dn,UZ as Gn,c0 as Mn,c9 as fe,BZ as Ae,BK as $n,VL as me,B_ as un,Sw as Qn,mK as ln,dj as pn,VM as Kn,VN as zn,uK as qn,UM as Ce,hY as Hn,UL as be,hV as Zn,Go as Jn,uO as Wn,hN as Yn,hQ as Qe,VO as mn,VP as Xn,Me as et,VQ as nt,Mi as tt,BB as at,VR as ot,VS as st,lv as rt,ly as it,Ca as ct,BM as gn,BY as dt,bF as Ke,cF as ut,C9 as ze,v1 as lt,uR as pt,mC as mt,gJ as gt,gI as ft,gH as yt,VT as ht,BE as Ct,Cb as bt,Ce as St,Ch as It,Cn as kt,dk as Ot}from"./zeni-epic-state-GGdMfKwk.js";import{z,c as Pe,g as W,A as vt,p as q,a8 as re,m as g,aE as _t,ai as fn,a1 as Tt,y as yn,W as hn,l as Y,Z as ge,T as ve,aF as xt,N as qe,C as He,ae as Et,aG as Ze,aH as wt,aI as At}from"./index-BUq8vLqs.js";import{n as De}from"./mui-DxxQrDXb.js";import{g as Pt,h as Dt,q as ie}from"./QBOConnectionScreen-rYcXSEuv.js";import{u as jt,a as Bt}from"./useEmailConnectResultRefresh-C4LXGHtc.js";import{u as Ft}from"./useChargeCardPusherEvents-XNiZ825w.js";import"./recharts-TU-ixTpA.js";import"./analytics-Bwul-sh2.js";import"./plaid-BETTZw7O.js";import"./dnd-2ZjyQ0g9.js";import"./stripe-cKAAJElX.js";import"./lottie-CkDkDB9t.js";import"./lexical-B4Vx7iXM.js";import"./pdf-B5u-xbSo.js";import"./utils-CG6WKZWt.js";import"./empty-Cb7Nu9Hh.js";import"./pdf-lib-reHt5MEc.js";import"./index-EIrua76A.js";import"./url-COMcQU2v.js";import"./index-Ds59pPsN.js";import"./decodeURIComponentSafe-gQrUmSgy.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]="d75e2f07-588a-420c-aef4-cef4c0dee99c",e._sentryDebugIdIdentifier="sentry-dbid-d75e2f07-588a-420c-aef4-cef4c0dee99c")}catch{}})();const Je=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(W.isApAgingFeatureEnabled),{isFeatureEnabled:a}=t(W.isArAgingFeatureEnabled),{isFeatureEnabled:A}=t(W.isReferralFeatureEnabled),{isFeatureEnabled:w}=t(W.isDebitCardFeatureEnabled),k=vt(),O=E((S=>X(S))),P=E((S=>S.onboardingCustomerViewState.fetchState)),_=O.excludedResources,F=O.companyId??z.getSignedInUserTenant(v)?.companyId;if(n==null)throw Error("Can't access onboarding flow without signing in...");const m=Ee(w,O),b=we(O),D=[],U=_?.resources?.find((S=>S.resource==="/reports/top_expenses"))==null,h=_?.resources?.find((S=>S.resource==="/reports/task_card"))==null,r=O?.userRole!=null&&jn(O?.userRole),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 Z=Bn(S,V);return Fn(Z.reportsInOrder.map((M=>({fetchState:M.fetchState,error:M.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:Je(L?.businessVerified?.status),isKycDone:Je(L?.identityVerified?.status),paymentType:"",paymentSource:"",qboConnectionSource:L?.accountingConnectionCreationMode??""};return s.jsxs(s.Fragment,{children:[s.jsx(re,{analytics:g,onLoad:S=>S.trackOnboardingDashboardActivation(ee)}),s.jsx(_t,{show:!0,onComplete:G})]})},Se=["reading_books","finance_graph","reconciliation","cfo_foundation"],Ie=["llm_fine_tuning","rag_knowledge_graph","personalized_context"],We=(e,l)=>{const i=new Map(e.map((o=>[o.key,o])));return l.map((o=>{return p=i.get(o)?.status,p==="starting"||p==="building"?p:"idle";var p}))},Ye=(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"))},Xe=De.div`
1
+ import{j as s}from"./liveblocks-CSh_vLcI.js";import{t as wn,A as Me}from"./AddressScreen-i3P2ph6T.js";import An from"./NotFoundScreen-BEmDKBPw.js";import{a as d,t as $e}from"./sentry-BbRn6Rps.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-BTRpO5kD.js";import{fI as X,e0 as Ee,d$ as we,bq as jn,Um as Bn,bS as Fn,pT as Vn,Bv as Un,By as Rn,VJ as Ln,VK as Nn,lx as Oe,lA as dn,UZ as Gn,c0 as Mn,c9 as fe,BZ as Ae,BK as $n,VL as me,B_ as un,Sw as Qn,mK as ln,dj as pn,VM as Kn,VN as zn,uK as qn,UM as Ce,hY as Hn,UL as be,hV as Zn,Go as Jn,uO as Wn,hN as Yn,hQ as Qe,VO as mn,VP as Xn,Me as et,VQ as nt,Mi as tt,BB as at,VR as ot,VS as st,lv as rt,ly as it,Ca as ct,BM as gn,BY as dt,bF as Ke,cF as ut,C9 as ze,v1 as lt,uR as pt,mC as mt,gJ as gt,gI as ft,gH as yt,VT as ht,BE as Ct,Cb as bt,Ce as St,Ch as It,Cn as kt,dk as Ot}from"./zeni-epic-state-GGdMfKwk.js";import{z,c as Pe,g as W,A as vt,p as q,a8 as re,m as g,aE as _t,ai as fn,a1 as Tt,y as yn,W as hn,l as Y,Z as ge,T as ve,aF as xt,N as qe,C as He,ae as Et,aG as Ze,aH as wt,aI as At}from"./index-D-DXs1ug.js";import{n as De}from"./mui-DxxQrDXb.js";import{g as Pt,h as Dt,q as ie}from"./QBOConnectionScreen-2QWv8Ryp.js";import{u as jt,a as Bt}from"./useEmailConnectResultRefresh-CD4x3asD.js";import{u as Ft}from"./useChargeCardPusherEvents-6cwlQnL1.js";import"./recharts-TU-ixTpA.js";import"./analytics-Bwul-sh2.js";import"./plaid-BETTZw7O.js";import"./dnd-2ZjyQ0g9.js";import"./stripe-cKAAJElX.js";import"./lottie-CkDkDB9t.js";import"./lexical-B4Vx7iXM.js";import"./pdf-B5u-xbSo.js";import"./utils-CG6WKZWt.js";import"./empty-Cb7Nu9Hh.js";import"./pdf-lib-reHt5MEc.js";import"./index-EIrua76A.js";import"./url-COMcQU2v.js";import"./index-Ds59pPsN.js";import"./decodeURIComponentSafe-gQrUmSgy.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]="d75e2f07-588a-420c-aef4-cef4c0dee99c",e._sentryDebugIdIdentifier="sentry-dbid-d75e2f07-588a-420c-aef4-cef4c0dee99c")}catch{}})();const Je=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(W.isApAgingFeatureEnabled),{isFeatureEnabled:a}=t(W.isArAgingFeatureEnabled),{isFeatureEnabled:A}=t(W.isReferralFeatureEnabled),{isFeatureEnabled:w}=t(W.isDebitCardFeatureEnabled),k=vt(),O=E((S=>X(S))),P=E((S=>S.onboardingCustomerViewState.fetchState)),_=O.excludedResources,F=O.companyId??z.getSignedInUserTenant(v)?.companyId;if(n==null)throw Error("Can't access onboarding flow without signing in...");const m=Ee(w,O),b=we(O),D=[],U=_?.resources?.find((S=>S.resource==="/reports/top_expenses"))==null,h=_?.resources?.find((S=>S.resource==="/reports/task_card"))==null,r=O?.userRole!=null&&jn(O?.userRole),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 Z=Bn(S,V);return Fn(Z.reportsInOrder.map((M=>({fetchState:M.fetchState,error:M.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:Je(L?.businessVerified?.status),isKycDone:Je(L?.identityVerified?.status),paymentType:"",paymentSource:"",qboConnectionSource:L?.accountingConnectionCreationMode??""};return s.jsxs(s.Fragment,{children:[s.jsx(re,{analytics:g,onLoad:S=>S.trackOnboardingDashboardActivation(ee)}),s.jsx(_t,{show:!0,onComplete:G})]})},Se=["reading_books","finance_graph","reconciliation","cfo_foundation"],Ie=["llm_fine_tuning","rag_knowledge_graph","personalized_context"],We=(e,l)=>{const i=new Map(e.map((o=>[o.key,o])));return l.map((o=>{return p=i.get(o)?.status,p==="starting"||p==="building"?p:"idle";var p}))},Ye=(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"))},Xe=De.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  background-color: ${e=>e.theme.colors.grey4};
@@ -1,4 +1,4 @@
1
- import{j as d}from"./liveblocks-CSh_vLcI.js";import{i as K,j as _,g as W,u as X,h as Z,l as ne,k as oa,n as ht,o as P,N as In}from"./core-BTRpO5kD.js";import{fI as B,W3 as Ze,bF as sa,br as Ee,Xr as En,kd as Tn,Xs as Vt,Xt as wn,kg as ft,Xu as Qe,Xv as xn,kl as Dn,Xw as Gt,Xx as Pn,kp as gt,Xy as He,Xz as On,XA as Fn,Wn as jn,lr as Rn,XB as Mn,bn as Je,XC as ra,X1 as le,bc as ia,lF as ca,lo as la,X3 as de,X2 as ae,fH as da,gd as Bn,gt as bt,XD as Yn,XE as Un,XF as ua,XG as Oe,E6 as Be,E7 as Ye,Ev as Te,Ep as ue,Eb as Ue,XH as Ln,c0 as Le,XI as Vn,XJ as Gn,XK as ma,XL as Fe,XM as Nn,ek as et,Ah as pa,XN as $n,XO as ha,XP as Xn,XQ as zn,XR as Kn,XS as St,U$ as _t,ug as we,m2 as xe,EF as kt,Ao as qn,Av as Qn,XT as Hn,XU as Wn,E8 as Nt,XV as Zn,Ak as ve,Af as fa,XW as ge,XX as $t,XY as Jn,XZ as yt,U_ as At,Cs as ga,X_ as eo,X$ as ba,Y0 as to,Y1 as ao,Y2 as no,Y3 as vt,CH as oo,CO as so,Y4 as ro,Y5 as io,Ea as Xt,Y6 as co,Cq as Ca,Y7 as be,Y8 as zt,Y9 as lo,bq as Sa,EK as _a,Ya as uo,Yb as ka,Yc as mo,Yd as po,Ye as ho,Yf as It,EC as fo,EE as go,Yg as bo,Yh as Co,E9 as Kt,Yi as So,EI as ya,Yj as Ce,Yk as qt,Yl as _o,Ym as ko,Yn as Aa,lT as va,p_ as Ia,lY as Ea,pY as Ta,pX as wa,pW as xa,BP as yo,dd as Ao,pT as vo,Um as Io,q8 as Eo,Yo as To,Yp as wo,Yq as xo,b5 as Et,q2 as Do,ig as Po,gL as Oo,q1 as Fo,lh as jo,p$ as Ro,pZ as Mo,e0 as Bo,d$ as Yo}from"./zeni-epic-state-GGdMfKwk.js";import{z as Y,av as oe,p as O,m as w,G as q,bb as Uo,as as Ve,a8 as Ge,bc as Da,T as N,bd as Lo,be as Pa,E as Vo,bf as Go,bg as No,a as Oa,a1 as Fa,e as ja,ar as $o,bh as Xo,ao as zo,c as Tt,bi as Ra,D as re,bj as Ma,bk as Ba,au as Ya,bl as Ko,ai as Ne,W as $e,bm as qo,X as Qo,bn as Ho,g as G,A as Wo,l as Zo,a4 as Jo,aq as es,bo as ts,bp as as,bq as ns,br as Ie}from"./index-BUq8vLqs.js";import{n as wt}from"./mui-DxxQrDXb.js";import{a as b}from"./sentry-BbRn6Rps.js";import{w as Ua}from"./withTransactionSidePanel-jttxQkuf.js";import{c as La,t as De,f as me,b as xt,a as Dt,v as os}from"./routePaths-BOMJaLfj.js";import{u as se}from"./useAskAiCfoHostNavButtonProps-ClE0s8SA.js";import Me from"./NotFoundScreen-Pkv6JCVI.js";import{u as Pt}from"./useInitialThreadRequest-8iuM_OK9.js";import{t as Va}from"./analyticsHelper-D_76GpgW.js";import{C as ss}from"./CompanyPassportScreen-2YW4iiFQ.js";import{u as rs}from"./useAiCfoDashboardSuggestedQuestionsChips-B1P2UXZw.js";import{F as is}from"./FeaturePreviewScreen-DJDJb7ut.js";import"./recharts-TU-ixTpA.js";import"./analytics-Bwul-sh2.js";import"./plaid-BETTZw7O.js";import"./dnd-2ZjyQ0g9.js";import"./stripe-cKAAJElX.js";import"./lottie-CkDkDB9t.js";import"./lexical-B4Vx7iXM.js";import"./pdf-B5u-xbSo.js";import"./utils-CG6WKZWt.js";import"./TransactionDetailScreen-Dakxd2K4.js";import"./decodeURIComponentSafe-gQrUmSgy.js";import"./expenseAutomationHelper-D83VUSa4.js";import"./stripSplatSuffix-CHEOIiL-.js";import"./MobileAppDrawer-FDyQcQG6.js";import"./InboxNotificationsProvider-RMyde6sE.js";import"./useTaskManagerAccess-Cv2RmrOC.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]="40c6a3c9-3044-4a38-9803-a7ffb504192f",e._sentryDebugIdIdentifier="sentry-dbid-40c6a3c9-3044-4a38-9803-a7ffb504192f")}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=W(),h=l?.companyName??"",f={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},c=b.useMemo((()=>({authParams:f,companyName:h,downloadEndPoint:`${oe}/agingDetailedReport`,timezone:Ze()})),[]),u=b.useMemo((()=>r!=null?sa(r):Ee()),[r]),C=X(),g=Z(),y=_((S=>En(S,u,o))),E=b.useCallback((()=>{o!=null&&y.fetchState!=="In-Progress"&&y.fetchState!=="Completed"&&C(Tn(o,u))}),[u]),v=b.useCallback((()=>{g("../../",{relative:"path"})}),[]),k=b.useCallback(((S,A)=>{C(Vt({sortKey:S,sortOrder:A}))}),[]),T=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]),x=b.useCallback((()=>{y.vendor!=null&&w.trackApAgingDetail("AP Aging",u.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),y.vendor.id,y.vendor.name)}),[y.vendor,u]);return b.useEffect((()=>{E()}),[]),b.useEffect((()=>{y.fetchState==="Completed"&&x()}),[x,y.fetchState]),d.jsx(Uo,{apAgingDetail:y,downloadParams:c,reportDate:u,analytics:w,onTransactionClick:R,onReload:E,onBackClick:v,onColumnSortConfigChanged:k,updateDownloadStateHandler:T,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),ls=()=>{const e=X(),a=Z(),t=_((k=>wn(k))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=se({mobileExploreReferrer:"AP Aging"});Ve({isDataReady:t.fetchState==="Completed"});const r=Y.getSignedInUser(),s=_((k=>k.tenantState.currentTenantId)),i=_((k=>B(k))),l=i?.companyName??"",m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},p=b.useMemo((()=>({authParams:m,companyName:l,downloadEndPoint:`${oe}/agingReport`,timezone:Ze()})),[]),h=t.apAgingUIState.selectedDate??Ee(),f=b.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(ft(h))}),[]);b.useEffect((()=>{f()}),[]);const c=b.useCallback((()=>{a("../",{relative:"path"})}),[]),u=b.useCallback((k=>{e(Qe({searchString:k}))}),[]),C=b.useCallback(((k,T)=>{e(Qe({sortKey:T,sortOrder:k}))}),[]),g=b.useCallback((k=>{a(`./${k}/${h.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[h]),y=b.useCallback((k=>{e(Qe({downloadState:k}))}),[]),E=b.useCallback(((k,T)=>{}),[]),v=b.useCallback(((k,T)=>{e(Qe({selectedDate:k,agingDateSelectionType:T})),e(ft(k))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ge,{analytics:w,onLoad:k=>k.trackPageLoaded(N.Event.agingReport,"AP Aging")}):null,d.jsx(Da,{uiState:t.apAgingUIState,report:t,downloadParams:p,analytics:w,onReloadReport:f,onBackClick:c,onSearchTextChange:u,onSortOrderChange:C,onEntityNameClick:g,updateDownloadStateHandler:y,onSelectedDateChanged: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=_((x=>B(x))),{tenantEmailDomain:l}=K(),m=W(),p=i.companyName,h={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},f=b.useMemo((()=>({authParams:h,companyName:p,downloadEndPoint:`${oe}/agingDetailedReport`,timezone:Ze()})),[]),c=b.useMemo((()=>r!=null?sa(r):Ee()),[r]),u=X(),C=Z(),g=_((x=>xn(x,c,o))),y=b.useCallback((()=>{o!=null&&g.fetchState!=="In-Progress"&&g.fetchState!=="Completed"&&u(Dn(o,c))}),[c]),E=b.useCallback((()=>{C("../../",{relative:"path"})}),[]),v=b.useCallback(((x,S)=>{u(Gt({sortKey:x,sortOrder:S}))}),[]),k=b.useCallback((x=>{u(Gt({downloadState:x}))}),[]),T=b.useCallback((x=>{if(e)e(x.transactionId,x.transactionType);else if(l!=null){const S=La({id:x.transactionId,type:x.transactionType},l);C(S);const A=O(m.state?.pathnameStackToGoBack,m.pathname);C(S,{state:{pathnameStackToGoBack:A}})}}),[l,e]),R=b.useCallback((()=>{g.customer!=null&&w.trackArAgingDetail("AR Aging",c.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),g.customer.id,g.customer.name)}),[g.customer,c]);return b.useEffect((()=>{y()}),[]),b.useEffect((()=>{g.fetchState==="Completed"&&R()}),[g.fetchState,R]),d.jsx(Lo,{arAgingDetail:g,downloadParams:f,reportDate:c,analytics:w,onTransactionClick:T,onReload:y,onBackClick:E,onColumnSortConfigChanged:v,updateDownloadStateHandler:k,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),us=()=>{const e=X(),a=Z(),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:Ze()})),[]),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(He({searchString:v}))}),[]),u=b.useCallback(((v,k)=>{e(He({sortKey:k,sortOrder:v}))}),[]),C=b.useCallback((v=>{a(`./${v}/${p.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[p]),g=b.useCallback((v=>{e(He({downloadState:v}))}),[]),y=b.useCallback(((v,k)=>{e(He({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:w,onLoad:v=>v.trackPageLoaded(N.Event.agingReport,"AR Aging")}):null,d.jsx(Da,{uiState:t.arAgingUIState,report:t,downloadParams:m,analytics:w,onReloadReport:h,onBackClick:f,onSearchTextChange:c,onSortOrderChange:u,onEntityNameClick:C,updateDownloadStateHandler:g,onSelectedDateChanged:y,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Ga=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function Na(e,a){const t=jn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=De(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(Rn(n,o))}}}const ms=ne((function(e){const a=Fn(e).accountsInOrder.map(((t,n)=>Ga(t,n)));return{sectionTitle:q.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,fetchState:e.cashBalanceState.fetchState,analytics:w}}),Na)(Pa),ps=ne((function(e){const a=Mn(e).accountsInOrder.map(((o,r)=>Ga(o,r))),t=Y.getSignedInUser(),n=Je(t);return{sectionTitle:q.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:w}}),Na)(Pa);function hs(){const e=Z(),a=W(),{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=Z(),a=W(),{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=wt.div`
1
+ import{j as d}from"./liveblocks-CSh_vLcI.js";import{i as K,j as _,g as W,u as X,h as Z,l as ne,k as oa,n as ht,o as P,N as In}from"./core-BTRpO5kD.js";import{fI as B,W3 as Ze,bF as sa,br as Ee,Xr as En,kd as Tn,Xs as Vt,Xt as wn,kg as ft,Xu as Qe,Xv as xn,kl as Dn,Xw as Gt,Xx as Pn,kp as gt,Xy as He,Xz as On,XA as Fn,Wn as jn,lr as Rn,XB as Mn,bn as Je,XC as ra,X1 as le,bc as ia,lF as ca,lo as la,X3 as de,X2 as ae,fH as da,gd as Bn,gt as bt,XD as Yn,XE as Un,XF as ua,XG as Oe,E6 as Be,E7 as Ye,Ev as Te,Ep as ue,Eb as Ue,XH as Ln,c0 as Le,XI as Vn,XJ as Gn,XK as ma,XL as Fe,XM as Nn,ek as et,Ah as pa,XN as $n,XO as ha,XP as Xn,XQ as zn,XR as Kn,XS as St,U$ as _t,ug as we,m2 as xe,EF as kt,Ao as qn,Av as Qn,XT as Hn,XU as Wn,E8 as Nt,XV as Zn,Ak as ve,Af as fa,XW as ge,XX as $t,XY as Jn,XZ as yt,U_ as At,Cs as ga,X_ as eo,X$ as ba,Y0 as to,Y1 as ao,Y2 as no,Y3 as vt,CH as oo,CO as so,Y4 as ro,Y5 as io,Ea as Xt,Y6 as co,Cq as Ca,Y7 as be,Y8 as zt,Y9 as lo,bq as Sa,EK as _a,Ya as uo,Yb as ka,Yc as mo,Yd as po,Ye as ho,Yf as It,EC as fo,EE as go,Yg as bo,Yh as Co,E9 as Kt,Yi as So,EI as ya,Yj as Ce,Yk as qt,Yl as _o,Ym as ko,Yn as Aa,lT as va,p_ as Ia,lY as Ea,pY as Ta,pX as wa,pW as xa,BP as yo,dd as Ao,pT as vo,Um as Io,q8 as Eo,Yo as To,Yp as wo,Yq as xo,b5 as Et,q2 as Do,ig as Po,gL as Oo,q1 as Fo,lh as jo,p$ as Ro,pZ as Mo,e0 as Bo,d$ as Yo}from"./zeni-epic-state-GGdMfKwk.js";import{z as Y,av as oe,p as O,m as w,G as q,bb as Uo,as as Ve,a8 as Ge,bc as Da,T as N,bd as Lo,be as Pa,E as Vo,bf as Go,bg as No,a as Oa,a1 as Fa,e as ja,ar as $o,bh as Xo,ao as zo,c as Tt,bi as Ra,D as re,bj as Ma,bk as Ba,au as Ya,bl as Ko,ai as Ne,W as $e,bm as qo,X as Qo,bn as Ho,g as G,A as Wo,l as Zo,a4 as Jo,aq as es,bo as ts,bp as as,bq as ns,br as Ie}from"./index-D-DXs1ug.js";import{n as wt}from"./mui-DxxQrDXb.js";import{a as b}from"./sentry-BbRn6Rps.js";import{w as Ua}from"./withTransactionSidePanel-_2doqhuK.js";import{c as La,t as De,f as me,b as xt,a as Dt,v as os}from"./routePaths-BpwABclb.js";import{u as se}from"./useAskAiCfoHostNavButtonProps-B9dKaXC2.js";import Me from"./NotFoundScreen-BEmDKBPw.js";import{u as Pt}from"./useInitialThreadRequest-CVcZLc8x.js";import{t as Va}from"./analyticsHelper-CJXbjLla.js";import{C as ss}from"./CompanyPassportScreen-BTV6sqcv.js";import{u as rs}from"./useAiCfoDashboardSuggestedQuestionsChips-BeQw4E92.js";import{F as is}from"./FeaturePreviewScreen-DiNAV9z-.js";import"./recharts-TU-ixTpA.js";import"./analytics-Bwul-sh2.js";import"./plaid-BETTZw7O.js";import"./dnd-2ZjyQ0g9.js";import"./stripe-cKAAJElX.js";import"./lottie-CkDkDB9t.js";import"./lexical-B4Vx7iXM.js";import"./pdf-B5u-xbSo.js";import"./utils-CG6WKZWt.js";import"./TransactionDetailScreen-ZbhuUtai.js";import"./decodeURIComponentSafe-gQrUmSgy.js";import"./expenseAutomationHelper-D83VUSa4.js";import"./stripSplatSuffix-CHEOIiL-.js";import"./MobileAppDrawer-C0d1iVMA.js";import"./InboxNotificationsProvider-RMyde6sE.js";import"./useTaskManagerAccess-DkfJ_Uxt.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]="40c6a3c9-3044-4a38-9803-a7ffb504192f",e._sentryDebugIdIdentifier="sentry-dbid-40c6a3c9-3044-4a38-9803-a7ffb504192f")}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=W(),h=l?.companyName??"",f={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},c=b.useMemo((()=>({authParams:f,companyName:h,downloadEndPoint:`${oe}/agingDetailedReport`,timezone:Ze()})),[]),u=b.useMemo((()=>r!=null?sa(r):Ee()),[r]),C=X(),g=Z(),y=_((S=>En(S,u,o))),E=b.useCallback((()=>{o!=null&&y.fetchState!=="In-Progress"&&y.fetchState!=="Completed"&&C(Tn(o,u))}),[u]),v=b.useCallback((()=>{g("../../",{relative:"path"})}),[]),k=b.useCallback(((S,A)=>{C(Vt({sortKey:S,sortOrder:A}))}),[]),T=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]),x=b.useCallback((()=>{y.vendor!=null&&w.trackApAgingDetail("AP Aging",u.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),y.vendor.id,y.vendor.name)}),[y.vendor,u]);return b.useEffect((()=>{E()}),[]),b.useEffect((()=>{y.fetchState==="Completed"&&x()}),[x,y.fetchState]),d.jsx(Uo,{apAgingDetail:y,downloadParams:c,reportDate:u,analytics:w,onTransactionClick:R,onReload:E,onBackClick:v,onColumnSortConfigChanged:k,updateDownloadStateHandler:T,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),ls=()=>{const e=X(),a=Z(),t=_((k=>wn(k))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=se({mobileExploreReferrer:"AP Aging"});Ve({isDataReady:t.fetchState==="Completed"});const r=Y.getSignedInUser(),s=_((k=>k.tenantState.currentTenantId)),i=_((k=>B(k))),l=i?.companyName??"",m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},p=b.useMemo((()=>({authParams:m,companyName:l,downloadEndPoint:`${oe}/agingReport`,timezone:Ze()})),[]),h=t.apAgingUIState.selectedDate??Ee(),f=b.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(ft(h))}),[]);b.useEffect((()=>{f()}),[]);const c=b.useCallback((()=>{a("../",{relative:"path"})}),[]),u=b.useCallback((k=>{e(Qe({searchString:k}))}),[]),C=b.useCallback(((k,T)=>{e(Qe({sortKey:T,sortOrder:k}))}),[]),g=b.useCallback((k=>{a(`./${k}/${h.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[h]),y=b.useCallback((k=>{e(Qe({downloadState:k}))}),[]),E=b.useCallback(((k,T)=>{}),[]),v=b.useCallback(((k,T)=>{e(Qe({selectedDate:k,agingDateSelectionType:T})),e(ft(k))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ge,{analytics:w,onLoad:k=>k.trackPageLoaded(N.Event.agingReport,"AP Aging")}):null,d.jsx(Da,{uiState:t.apAgingUIState,report:t,downloadParams:p,analytics:w,onReloadReport:f,onBackClick:c,onSearchTextChange:u,onSortOrderChange:C,onEntityNameClick:g,updateDownloadStateHandler:y,onSelectedDateChanged: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=_((x=>B(x))),{tenantEmailDomain:l}=K(),m=W(),p=i.companyName,h={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},f=b.useMemo((()=>({authParams:h,companyName:p,downloadEndPoint:`${oe}/agingDetailedReport`,timezone:Ze()})),[]),c=b.useMemo((()=>r!=null?sa(r):Ee()),[r]),u=X(),C=Z(),g=_((x=>xn(x,c,o))),y=b.useCallback((()=>{o!=null&&g.fetchState!=="In-Progress"&&g.fetchState!=="Completed"&&u(Dn(o,c))}),[c]),E=b.useCallback((()=>{C("../../",{relative:"path"})}),[]),v=b.useCallback(((x,S)=>{u(Gt({sortKey:x,sortOrder:S}))}),[]),k=b.useCallback((x=>{u(Gt({downloadState:x}))}),[]),T=b.useCallback((x=>{if(e)e(x.transactionId,x.transactionType);else if(l!=null){const S=La({id:x.transactionId,type:x.transactionType},l);C(S);const A=O(m.state?.pathnameStackToGoBack,m.pathname);C(S,{state:{pathnameStackToGoBack:A}})}}),[l,e]),R=b.useCallback((()=>{g.customer!=null&&w.trackArAgingDetail("AR Aging",c.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),g.customer.id,g.customer.name)}),[g.customer,c]);return b.useEffect((()=>{y()}),[]),b.useEffect((()=>{g.fetchState==="Completed"&&R()}),[g.fetchState,R]),d.jsx(Lo,{arAgingDetail:g,downloadParams:f,reportDate:c,analytics:w,onTransactionClick:T,onReload:y,onBackClick:E,onColumnSortConfigChanged:v,updateDownloadStateHandler:k,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),us=()=>{const e=X(),a=Z(),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:Ze()})),[]),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(He({searchString:v}))}),[]),u=b.useCallback(((v,k)=>{e(He({sortKey:k,sortOrder:v}))}),[]),C=b.useCallback((v=>{a(`./${v}/${p.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[p]),g=b.useCallback((v=>{e(He({downloadState:v}))}),[]),y=b.useCallback(((v,k)=>{e(He({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:w,onLoad:v=>v.trackPageLoaded(N.Event.agingReport,"AR Aging")}):null,d.jsx(Da,{uiState:t.arAgingUIState,report:t,downloadParams:m,analytics:w,onReloadReport:h,onBackClick:f,onSearchTextChange:c,onSortOrderChange:u,onEntityNameClick:C,updateDownloadStateHandler:g,onSelectedDateChanged:y,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Ga=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function Na(e,a){const t=jn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=De(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(Rn(n,o))}}}const ms=ne((function(e){const a=Fn(e).accountsInOrder.map(((t,n)=>Ga(t,n)));return{sectionTitle:q.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,fetchState:e.cashBalanceState.fetchState,analytics:w}}),Na)(Pa),ps=ne((function(e){const a=Mn(e).accountsInOrder.map(((o,r)=>Ga(o,r))),t=Y.getSignedInUser(),n=Je(t);return{sectionTitle:q.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:w}}),Na)(Pa);function hs(){const e=Z(),a=W(),{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=Z(),a=W(),{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=wt.div`
2
2
  display: flex;
3
3
  flex: 1 1 auto;
4
4
  min-height: 100%;
@@ -1 +1 @@
1
- import{j as v}from"./liveblocks-CSh_vLcI.js";import{a as u}from"./sentry-BbRn6Rps.js";import{u as y,j as b,l as U,g as w,N as A}from"./core-BTRpO5kD.js";import{U5 as N,fI as _,go as k,U6 as L,pV as R,U7 as z}from"./zeni-epic-state-GGdMfKwk.js";import{u as j,z as f,L as T,t as I,G as O,b as $}from"./index-BUq8vLqs.js";import"./mui-DxxQrDXb.js";import{t as P}from"./getLocaleForTenant-DKQ9xDck.js";import"./recharts-TU-ixTpA.js";import"./analytics-Bwul-sh2.js";import"./plaid-BETTZw7O.js";import"./dnd-2ZjyQ0g9.js";import"./stripe-cKAAJElX.js";import"./lottie-CkDkDB9t.js";import"./lexical-B4Vx7iXM.js";import"./pdf-B5u-xbSo.js";import"./utils-CG6WKZWt.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]="1c793b49-c430-4a38-abf6-caa9bd9677fb",t._sentryDebugIdIdentifier="sentry-dbid-1c793b49-c430-4a38-abf6-caa9bd9677fb")}catch{}})();const G=U((function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}}))((function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=w(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map((l=>l.tenantEmailDomain)),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,S=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,m="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce(((l,F)=>l||i.split("/").find((D=>D===F))!=null),!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,S=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=$(c,p);return v.jsx(A,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:S}})}}));function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=j(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b((e=>N(e))),n=b((e=>e.tenantState.fetchState)),i=b((e=>e.tenantState.error)),a=b((e=>e.tenantState.activeTenantFetchState.fetchState)),c=b((e=>_(e))),d=f.getSignedInUser();return u.useLayoutEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,h.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)}),[a,n]),u.useEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&I.shouldFetchActiveTenant(e)&&(h.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(k(d.userId,e))))}),[n,a,d,t]),u.useEffect((()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,S=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&S&&I.shouldFetchAllTenants()&&(r.current=!0,I.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!L(i))&&t(R(e.userId)))}),[n,a,i,d,t]),u.useEffect((()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())}),[m.tenantsCoreDetailsInOrder,n]),u.useEffect((()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(O.updateAppLocaleID(P(c)),o())}),[n,a,c]),v.jsx(G,{})}const Q=["dashboard/cash-balance","dashboard/card-balance","dashboard/operating-expenses","dashboard/revenue","dashboard/burn-rate","dashboard/cash-position","dashboard/top-expenses","dashboard/cash-in-cash-out","dashboard","reports","forecast","uncategorized-expense","uncategorized-income","missing-receipts","bills","cards/activate","cards","reimbursements","wise","checking","aicfo"],V={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of Q)if(t.toLocaleLowerCase().includes(s))return V[s]}export{oe as default};
1
+ import{j as v}from"./liveblocks-CSh_vLcI.js";import{a as u}from"./sentry-BbRn6Rps.js";import{u as y,j as b,l as U,g as w,N as A}from"./core-BTRpO5kD.js";import{U5 as N,fI as _,go as k,U6 as L,pV as R,U7 as z}from"./zeni-epic-state-GGdMfKwk.js";import{u as j,z as f,L as T,t as I,G as O,b as $}from"./index-D-DXs1ug.js";import"./mui-DxxQrDXb.js";import{t as P}from"./getLocaleForTenant-COzbHLDP.js";import"./recharts-TU-ixTpA.js";import"./analytics-Bwul-sh2.js";import"./plaid-BETTZw7O.js";import"./dnd-2ZjyQ0g9.js";import"./stripe-cKAAJElX.js";import"./lottie-CkDkDB9t.js";import"./lexical-B4Vx7iXM.js";import"./pdf-B5u-xbSo.js";import"./utils-CG6WKZWt.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]="1c793b49-c430-4a38-abf6-caa9bd9677fb",t._sentryDebugIdIdentifier="sentry-dbid-1c793b49-c430-4a38-abf6-caa9bd9677fb")}catch{}})();const G=U((function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}}))((function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=w(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map((l=>l.tenantEmailDomain)),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,S=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,m="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce(((l,F)=>l||i.split("/").find((D=>D===F))!=null),!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,S=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=$(c,p);return v.jsx(A,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:S}})}}));function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=j(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b((e=>N(e))),n=b((e=>e.tenantState.fetchState)),i=b((e=>e.tenantState.error)),a=b((e=>e.tenantState.activeTenantFetchState.fetchState)),c=b((e=>_(e))),d=f.getSignedInUser();return u.useLayoutEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,h.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)}),[a,n]),u.useEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&I.shouldFetchActiveTenant(e)&&(h.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(k(d.userId,e))))}),[n,a,d,t]),u.useEffect((()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,S=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&S&&I.shouldFetchAllTenants()&&(r.current=!0,I.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!L(i))&&t(R(e.userId)))}),[n,a,i,d,t]),u.useEffect((()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())}),[m.tenantsCoreDetailsInOrder,n]),u.useEffect((()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(O.updateAppLocaleID(P(c)),o())}),[n,a,c]),v.jsx(G,{})}const Q=["dashboard/cash-balance","dashboard/card-balance","dashboard/operating-expenses","dashboard/revenue","dashboard/burn-rate","dashboard/cash-position","dashboard/top-expenses","dashboard/cash-in-cash-out","dashboard","reports","forecast","uncategorized-expense","uncategorized-income","missing-receipts","bills","cards/activate","cards","reimbursements","wise","checking","aicfo"],V={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of Q)if(t.toLocaleLowerCase().includes(s))return V[s]}export{oe as default};
@@ -1,4 +1,4 @@
1
- import{j as l}from"./liveblocks-CSh_vLcI.js";import{h as w,g as C,j as h,l as A,i as V}from"./core-BTRpO5kD.js";import{Z4 as k,Zb as J,gJ as Q,gI as W,gH as X,kS as Y,X2 as q,uU as K,fI as B,YD as D,kQ as T,Z5 as S,Ze as F,kO as G,l9 as j}from"./zeni-epic-state-GGdMfKwk.js";import{bN as L,a1 as N,c as R,z as Z,E as U,a4 as p,g as v,a7 as O,bO as M,N as H,bP as ee,p as te}from"./index-BUq8vLqs.js";import{n as z}from"./mui-DxxQrDXb.js";import"./sentry-BbRn6Rps.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]="a37c8610-ac71-49b2-abbc-32143e670e9d",e._sentryDebugIdIdentifier="sentry-dbid-a37c8610-ac71-49b2-abbc-32143e670e9d")}catch{}})();const ae=A(null,(function(e,t){return{onSaveVendor:a=>{e(Y(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(q("common")),a!=null&&e(K(a))},onGetOtp:a=>{e(X(a,"BillPayVendor"))},onResendOtp:a=>{e(W(a,"BillPayVendor"))},onVerifyOtp:(a,n)=>{e(Q(a,n,"BillPayVendor"))},onVerifyOtpSuccess:(a,n,o)=>{e(J(a,n,o))}}}))(L);function _({vendorId:e,billId:t,isExpressPayPage:a}){const n=w(),o=C(),s=h((r=>k(r,e)));return l.jsx(ae,{location:o,navigate:n,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:a??!1})}const ne=z.div`
1
+ import{j as l}from"./liveblocks-CSh_vLcI.js";import{h as w,g as C,j as h,l as A,i as V}from"./core-BTRpO5kD.js";import{Z4 as k,Zb as J,gJ as Q,gI as W,gH as X,kS as Y,X2 as q,uU as K,fI as B,YD as D,kQ as T,Z5 as S,Ze as F,kO as G,l9 as j}from"./zeni-epic-state-GGdMfKwk.js";import{bN as L,a1 as N,c as R,z as Z,E as U,a4 as p,g as v,a7 as O,bO as M,N as H,bP as ee,p as te}from"./index-D-DXs1ug.js";import{n as z}from"./mui-DxxQrDXb.js";import"./sentry-BbRn6Rps.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]="a37c8610-ac71-49b2-abbc-32143e670e9d",e._sentryDebugIdIdentifier="sentry-dbid-a37c8610-ac71-49b2-abbc-32143e670e9d")}catch{}})();const ae=A(null,(function(e,t){return{onSaveVendor:a=>{e(Y(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(q("common")),a!=null&&e(K(a))},onGetOtp:a=>{e(X(a,"BillPayVendor"))},onResendOtp:a=>{e(W(a,"BillPayVendor"))},onVerifyOtp:(a,n)=>{e(Q(a,n,"BillPayVendor"))},onVerifyOtpSuccess:(a,n,o)=>{e(J(a,n,o))}}}))(L);function _({vendorId:e,billId:t,isExpressPayPage:a}){const n=w(),o=C(),s=h((r=>k(r,e)));return l.jsx(ae,{location:o,navigate:n,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:a??!1})}const ne=z.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{j as i}from"./liveblocks-CSh_vLcI.js";import{a1 as c,ab as l,E as f}from"./index-BUq8vLqs.js";import{D as p}from"./mui-DxxQrDXb.js";import"./sentry-BbRn6Rps.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="c06e3c71-2cdd-4b4c-9d6d-3f270023e5b2",e._sentryDebugIdIdentifier="sentry-dbid-c06e3c71-2cdd-4b4c-9d6d-3f270023e5b2")}catch{}})();const b={drawerLeftMargin:new l(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:d}=e,n=c(),s=o?.valuePx(n)??b.drawerLeftMargin.valuePx(n),a=f();return i.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.8,cursor:"pointer"}}},onClose:d,children:t})}export{h as D};
1
+ import{j as i}from"./liveblocks-CSh_vLcI.js";import{a1 as c,ab as l,E as f}from"./index-D-DXs1ug.js";import{D as p}from"./mui-DxxQrDXb.js";import"./sentry-BbRn6Rps.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="c06e3c71-2cdd-4b4c-9d6d-3f270023e5b2",e._sentryDebugIdIdentifier="sentry-dbid-c06e3c71-2cdd-4b4c-9d6d-3f270023e5b2")}catch{}})();const b={drawerLeftMargin:new l(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:d}=e,n=c(),s=o?.valuePx(n)??b.drawerLeftMargin.valuePx(n),a=f();return i.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.8,cursor:"pointer"}}},onClose:d,children:t})}export{h as D};
@@ -1 +1 @@
1
- import{j as s}from"./liveblocks-CSh_vLcI.js";import{a as d}from"./sentry-BbRn6Rps.js";import{h as q,u as A,g as G,i as W,j as c,N as X,l as F,n as N,o as O}from"./core-BTRpO5kD.js";import{X7 as _,fI as M,Wo as R,n2 as Y,Sp as k,Xc as $,X1 as z,m2 as V,Sq as S,Wt as H,Wu as J,X3 as K,X2 as L}from"./zeni-epic-state-GGdMfKwk.js";import{b8 as Q,m as U,a4 as Z,p as tt}from"./index-BUq8vLqs.js";import"./mui-DxxQrDXb.js";import{d as I}from"./decodeURIComponentSafe-gQrUmSgy.js";import{w as et}from"./withTransactionSidePanel-jttxQkuf.js";import{f as at,c as nt}from"./routePaths-BOMJaLfj.js";import"./recharts-TU-ixTpA.js";import"./analytics-Bwul-sh2.js";import"./plaid-BETTZw7O.js";import"./dnd-2ZjyQ0g9.js";import"./stripe-cKAAJElX.js";import"./lottie-CkDkDB9t.js";import"./lexical-B4Vx7iXM.js";import"./pdf-B5u-xbSo.js";import"./utils-CG6WKZWt.js";import"./useAskAiCfoHostNavButtonProps-ClE0s8SA.js";import"./TransactionDetailScreen-Dakxd2K4.js";import"./useInitialThreadRequest-8iuM_OK9.js";import"./expenseAutomationHelper-D83VUSa4.js";import"./stripSplatSuffix-CHEOIiL-.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]="f3a9daec-1477-489e-9717-5e357a30c8c2",a._sentryDebugIdIdentifier="sentry-dbid-f3a9daec-1477-489e-9717-5e357a30c8c2")}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(k(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(Q),it=et((function({entityType:a,...t}){const e=q(),o=A(),l=G(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:b,entityIdEncoded:w,entityNameEncoded:x}=W(),r=I(w??""),p=I(x??""),u=rt(r,p),j=[r,p].filter((n=>n!=null)),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=c((n=>_(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),v=c((n=>M(n).company?.companyInfo.firstMonthOfFY??1)),f=c((n=>R(n.trendWithTransactionsState,i,"EntityDetail")));d.useEffect((()=>{m===!1&&u===!0&&(T(!0),o(Y(i)))}),[m,u,i]);const E=c((n=>n.trendState.fetchState)),P=f?.selectedPeriod?.timePeriod??g,B=(function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y})(f?.selectedPeriod?.timePeriod,g);return d.useEffect((()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(k(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))}),[m,h,E]),u?s.jsx(ot,{firstMonthOfFY:v,tenantEmailDomain:b,location:l,navigate:e,entity:i,defaultTransactionTimePeriod:B,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(X,{to:C(j.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-CSh_vLcI.js";import{a as d}from"./sentry-BbRn6Rps.js";import{h as q,u as A,g as G,i as W,j as c,N as X,l as F,n as N,o as O}from"./core-BTRpO5kD.js";import{X7 as _,fI as M,Wo as R,n2 as Y,Sp as k,Xc as $,X1 as z,m2 as V,Sq as S,Wt as H,Wu as J,X3 as K,X2 as L}from"./zeni-epic-state-GGdMfKwk.js";import{b8 as Q,m as U,a4 as Z,p as tt}from"./index-D-DXs1ug.js";import"./mui-DxxQrDXb.js";import{d as I}from"./decodeURIComponentSafe-gQrUmSgy.js";import{w as et}from"./withTransactionSidePanel-_2doqhuK.js";import{f as at,c as nt}from"./routePaths-BpwABclb.js";import"./recharts-TU-ixTpA.js";import"./analytics-Bwul-sh2.js";import"./plaid-BETTZw7O.js";import"./dnd-2ZjyQ0g9.js";import"./stripe-cKAAJElX.js";import"./lottie-CkDkDB9t.js";import"./lexical-B4Vx7iXM.js";import"./pdf-B5u-xbSo.js";import"./utils-CG6WKZWt.js";import"./useAskAiCfoHostNavButtonProps-B9dKaXC2.js";import"./TransactionDetailScreen-ZbhuUtai.js";import"./useInitialThreadRequest-CVcZLc8x.js";import"./expenseAutomationHelper-D83VUSa4.js";import"./stripSplatSuffix-CHEOIiL-.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]="f3a9daec-1477-489e-9717-5e357a30c8c2",a._sentryDebugIdIdentifier="sentry-dbid-f3a9daec-1477-489e-9717-5e357a30c8c2")}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(k(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(Q),it=et((function({entityType:a,...t}){const e=q(),o=A(),l=G(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:b,entityIdEncoded:w,entityNameEncoded:x}=W(),r=I(w??""),p=I(x??""),u=rt(r,p),j=[r,p].filter((n=>n!=null)),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=c((n=>_(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),v=c((n=>M(n).company?.companyInfo.firstMonthOfFY??1)),f=c((n=>R(n.trendWithTransactionsState,i,"EntityDetail")));d.useEffect((()=>{m===!1&&u===!0&&(T(!0),o(Y(i)))}),[m,u,i]);const E=c((n=>n.trendState.fetchState)),P=f?.selectedPeriod?.timePeriod??g,B=(function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y})(f?.selectedPeriod?.timePeriod,g);return d.useEffect((()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(k(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))}),[m,h,E]),u?s.jsx(ot,{firstMonthOfFY:v,tenantEmailDomain:b,location:l,navigate:e,entity:i,defaultTransactionTimePeriod:B,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(X,{to:C(j.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-CSh_vLcI.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 Hn,o as We,N as Wn}from"./core-BTRpO5kD.js";import{fI as ke,a1f as Xn,q3 as Me,Uo as Kn,Aa as Qn,a1g as Zn,a1h as es,a1i as ts,a1j as Ct,a1k as Ke,gk as bt,a1l as ia,eY as as,g3 as ns,a1m as la,a1n as Qe,qW as ss,uX as os,gV as cs,gT as is,a1o as ls,r7 as rs,rg as ds,qe as us,qs as Ra,gS as ue,gU as ms,a1p as ps,qO as Da,rh as hs,qp as Ss,qk as gs,v1 as Cs,gR as Oe,a1q as tt,Ck as Fa,MK as _a,a1r as Ma,FF as Oa,a1s as fs,f0 as Is,f2 as ks,sY as Pt,X8 as ra,Xa as Ts,m5 as bs,Xb as Ps,mc as ys,dm as vs,DD as yt,a1t as Es,a1u as As,a1v as xs,a1w as ws,fp as vt,sM as da,X1 as Rs,a1x as Ds,a1y as Fs,me as _s,a1z as Ms,Rq as Os,md as Us,m2 as Bs,qH as Ua,rm as at,tz as Ba,tV as Vs,Ue as Va,rl as ua,ro as ja,rq as js,bF as zs,nB as Ls,ny as $s,rp as Ze,rn as Se,a1A as Gs,rH as ma,a1B as qs,a1C as Ns,sQ as Js,sR as Ys,WZ as Hs,W3 as Ws,a0J as Xs,a1D as Ks,X3 as pa,X2 as Xe,a1E as ha,mt as Qs,a1F as Zs,a1G as eo,a1H as to,a1I as ao,qC as no,a1J as so,a1K as oo,a1L as co,rx as io,mg as lo,m7 as ro,a1M as uo,mf as Sa,Xl as mo,a1N as po,a1O as ho,uy as So,u9 as go,u8 as ft,a1P as Co,a1Q as fo,a1R as Io,a1S as ko,nM as To,br as bo,nH as ga,nt as Po,a1T as yo,h2 as vo,nE as Eo,s_ as Ao,t0 as xo,sJ as wo,W6 as Ro,W7 as Do,F7 as Fo,F6 as _o,Fn as Mo,a1U as Ca,sP as Oo,sk as Uo,a1V as Bo,s0 as Vo,s5 as jo,sg as zo,s3 as Lo,a1W as $o,rY as Go,sf as qo,sV as No,a1X as Jo,t6 as Yo,sD as Ho,tc as Wo,sI as Xo,rI as Ko,a1Y as Qo,q_ as Zo,qy as ec,qF as fa,rs as tc,a1Z as ac,a1_ as nc,a1$ as sc,a20 as oc,a21 as cc,a22 as ic,a23 as lc,tg as rc,a24 as dc,a25 as uc,a26 as Ia,uJ as mc,u0 as pc,tR as ka,tP as hc,a27 as Sc,tE as gc,tj as Cc,tS as fc,a28 as Ic,a29 as kc,tp as Tc,a2a as bc,tk as Pc,to as yc,tm as vc,tY as Ec}from"./zeni-epic-state-GGdMfKwk.js";import za from"./NotFoundScreen-Pkv6JCVI.js";import{a as s,R as La}from"./sentry-BbRn6Rps.js";import{n as be,S as Ac}from"./mui-DxxQrDXb.js";import{c as Ve,g as H,m as W,p as ee,aq as $a,as as Ga,dO as xc,dP as wc,z as st,dQ as Rc,dR as Dc,dS as Fc,ae as Ue,dT as _c,dU as Ta,ba,dV as Mc,a7 as qa,dW as Oc,l as et,a as Uc,dX as Bc,dY as Vc,y as jc,W as zc,dZ as Lc,d_ as $c,d$ as Gc,b4 as qc,bs as Nc,ab as Jc,b5 as Yc,b6 as Hc,G as Wc,w as Xc,e0 as Kc,av as Pa,e1 as Qc}from"./index-BUq8vLqs.js";import{u as Na}from"./useAskAiCfoHostNavButtonProps-ClE0s8SA.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-Dakxd2K4.js";import{u as ci,a as ii}from"./useActualMatchingMatchDetail-Boxo0AoI.js";import{d as li}from"./decodeURIComponentSafe-gQrUmSgy.js";import{m as Ja,a as Ya}from"./expenseAutomationHelper-D83VUSa4.js";import{u as Ha,a as Wa,w as ri}from"./withTransactionSidePanel-jttxQkuf.js";import{b as di,S as ui,a as mi,J as pi}from"./ScheduleDetailsPrepaidExpensesScreen-DWKBiKA_.js";import{s as va,i as Xa,h as hi,v as Si,c as gi}from"./routePaths-BOMJaLfj.js";import{a as It}from"./accountMappingHelper-CDXfdGYB.js";import{D as Ci}from"./DrawerScreen-lfwUNd7g.js";import"./recharts-TU-ixTpA.js";import"./analytics-Bwul-sh2.js";import"./plaid-BETTZw7O.js";import"./dnd-2ZjyQ0g9.js";import"./stripe-cKAAJElX.js";import"./lottie-CkDkDB9t.js";import"./lexical-B4Vx7iXM.js";import"./pdf-B5u-xbSo.js";import"./utils-CG6WKZWt.js";import"./useInitialThreadRequest-8iuM_OK9.js";import"./stripSplatSuffix-CHEOIiL-.js";import"./pathToGoBack-CVTu70jh.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]="429481e3-f51b-41c4-8a7e-509e02be5074",t._sentryDebugIdIdentifier="sentry-dbid-429481e3-f51b-41c4-8a7e-509e02be5074")}catch{}})();const fi=()=>{const t=ge(),n=nt(),S=Te(),g=F((p=>ke(p))),{useFeatureGate:d}=Ve(),{isFeatureEnabled:i}=d(H.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=d(H.aiAuditScorePercentage),A=F((p=>p.expenseAutomationViewState.selectedPeriodByTenantId)),l=F((p=>Xn(p,g.tenantId))),{isAiCfoAccessEnabled:v,onAskAiCfoClick:x}=Na({mobileExploreReferrer:"Month-End Close Overview"}),b=s.useCallback(((p,P,_=!1)=>{t(Me({tenantId:P,period:{month:p.month,year:p.year},refreshViewInBackground:_}))}),[]),C=s.useCallback((p=>{const P=S.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&W.trackMonthCloseAuditPage(p.month,p.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,P??null),t(Kn(g.tenantId,p))}),[g.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),f=A[g.tenantId],m=s.useCallback((()=>{const p=S.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&W.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}=$a();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;W.trackMonthCloseAuditPage(l.selectedPeriod.month,l.selectedPeriod.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,p??null)}}),[l.fetchState,l.selectedPeriod,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),k.jsx(Ii,{children:k.jsx(xc,{monthEndCloseChecksView:l,isRealtimeInsightsFeatureEnabled:i,onMonthEndCheckClick:p=>{n(`./${p}/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:z,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:C,handleReviewButtonClick:w,onBackClick:()=>{n("../../dashboard")},onReload:m,isAiCfoAccessEnabled:v,onAskAiCfoClick:x,aiAuditScorePercentageEnabled:r})})},Ii=be.div`
1
+ import{j as k}from"./liveblocks-CSh_vLcI.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 Hn,o as We,N as Wn}from"./core-BTRpO5kD.js";import{fI as ke,a1f as Xn,q3 as Me,Uo as Kn,Aa as Qn,a1g as Zn,a1h as es,a1i as ts,a1j as Ct,a1k as Ke,gk as bt,a1l as ia,eY as as,g3 as ns,a1m as la,a1n as Qe,qW as ss,uX as os,gV as cs,gT as is,a1o as ls,r7 as rs,rg as ds,qe as us,qs as Ra,gS as ue,gU as ms,a1p as ps,qO as Da,rh as hs,qp as Ss,qk as gs,v1 as Cs,gR as Oe,a1q as tt,Ck as Fa,MK as _a,a1r as Ma,FF as Oa,a1s as fs,f0 as Is,f2 as ks,sY as Pt,X8 as ra,Xa as Ts,m5 as bs,Xb as Ps,mc as ys,dm as vs,DD as yt,a1t as Es,a1u as As,a1v as xs,a1w as ws,fp as vt,sM as da,X1 as Rs,a1x as Ds,a1y as Fs,me as _s,a1z as Ms,Rq as Os,md as Us,m2 as Bs,qH as Ua,rm as at,tz as Ba,tV as Vs,Ue as Va,rl as ua,ro as ja,rq as js,bF as zs,nB as Ls,ny as $s,rp as Ze,rn as Se,a1A as Gs,rH as ma,a1B as qs,a1C as Ns,sQ as Js,sR as Ys,WZ as Hs,W3 as Ws,a0J as Xs,a1D as Ks,X3 as pa,X2 as Xe,a1E as ha,mt as Qs,a1F as Zs,a1G as eo,a1H as to,a1I as ao,qC as no,a1J as so,a1K as oo,a1L as co,rx as io,mg as lo,m7 as ro,a1M as uo,mf as Sa,Xl as mo,a1N as po,a1O as ho,uy as So,u9 as go,u8 as ft,a1P as Co,a1Q as fo,a1R as Io,a1S as ko,nM as To,br as bo,nH as ga,nt as Po,a1T as yo,h2 as vo,nE as Eo,s_ as Ao,t0 as xo,sJ as wo,W6 as Ro,W7 as Do,F7 as Fo,F6 as _o,Fn as Mo,a1U as Ca,sP as Oo,sk as Uo,a1V as Bo,s0 as Vo,s5 as jo,sg as zo,s3 as Lo,a1W as $o,rY as Go,sf as qo,sV as No,a1X as Jo,t6 as Yo,sD as Ho,tc as Wo,sI as Xo,rI as Ko,a1Y as Qo,q_ as Zo,qy as ec,qF as fa,rs as tc,a1Z as ac,a1_ as nc,a1$ as sc,a20 as oc,a21 as cc,a22 as ic,a23 as lc,tg as rc,a24 as dc,a25 as uc,a26 as Ia,uJ as mc,u0 as pc,tR as ka,tP as hc,a27 as Sc,tE as gc,tj as Cc,tS as fc,a28 as Ic,a29 as kc,tp as Tc,a2a as bc,tk as Pc,to as yc,tm as vc,tY as Ec}from"./zeni-epic-state-GGdMfKwk.js";import za from"./NotFoundScreen-BEmDKBPw.js";import{a as s,R as La}from"./sentry-BbRn6Rps.js";import{n as be,S as Ac}from"./mui-DxxQrDXb.js";import{c as Ve,g as H,m as W,p as ee,aq as $a,as as Ga,dO as xc,dP as wc,z as st,dQ as Rc,dR as Dc,dS as Fc,ae as Ue,dT as _c,dU as Ta,ba,dV as Mc,a7 as qa,dW as Oc,l as et,a as Uc,dX as Bc,dY as Vc,y as jc,W as zc,dZ as Lc,d_ as $c,d$ as Gc,b4 as qc,bs as Nc,ab as Jc,b5 as Yc,b6 as Hc,G as Wc,w as Xc,e0 as Kc,av as Pa,e1 as Qc}from"./index-D-DXs1ug.js";import{u as Na}from"./useAskAiCfoHostNavButtonProps-B9dKaXC2.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-ZbhuUtai.js";import{u as ci,a as ii}from"./useActualMatchingMatchDetail-CCjKruLV.js";import{d as li}from"./decodeURIComponentSafe-gQrUmSgy.js";import{m as Ja,a as Ya}from"./expenseAutomationHelper-D83VUSa4.js";import{u as Ha,a as Wa,w as ri}from"./withTransactionSidePanel-_2doqhuK.js";import{b as di,S as ui,a as mi,J as pi}from"./ScheduleDetailsPrepaidExpensesScreen-CwSWMHf6.js";import{s as va,i as Xa,h as hi,v as Si,c as gi}from"./routePaths-BpwABclb.js";import{a as It}from"./accountMappingHelper-CDXfdGYB.js";import{D as Ci}from"./DrawerScreen-CiI0UwZ_.js";import"./recharts-TU-ixTpA.js";import"./analytics-Bwul-sh2.js";import"./plaid-BETTZw7O.js";import"./dnd-2ZjyQ0g9.js";import"./stripe-cKAAJElX.js";import"./lottie-CkDkDB9t.js";import"./lexical-B4Vx7iXM.js";import"./pdf-B5u-xbSo.js";import"./utils-CG6WKZWt.js";import"./useInitialThreadRequest-CVcZLc8x.js";import"./stripSplatSuffix-CHEOIiL-.js";import"./pathToGoBack-CVTu70jh.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]="429481e3-f51b-41c4-8a7e-509e02be5074",t._sentryDebugIdIdentifier="sentry-dbid-429481e3-f51b-41c4-8a7e-509e02be5074")}catch{}})();const fi=()=>{const t=ge(),n=nt(),S=Te(),g=F((p=>ke(p))),{useFeatureGate:d}=Ve(),{isFeatureEnabled:i}=d(H.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=d(H.aiAuditScorePercentage),A=F((p=>p.expenseAutomationViewState.selectedPeriodByTenantId)),l=F((p=>Xn(p,g.tenantId))),{isAiCfoAccessEnabled:v,onAskAiCfoClick:x}=Na({mobileExploreReferrer:"Month-End Close Overview"}),b=s.useCallback(((p,P,_=!1)=>{t(Me({tenantId:P,period:{month:p.month,year:p.year},refreshViewInBackground:_}))}),[]),C=s.useCallback((p=>{const P=S.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&W.trackMonthCloseAuditPage(p.month,p.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,P??null),t(Kn(g.tenantId,p))}),[g.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),f=A[g.tenantId],m=s.useCallback((()=>{const p=S.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&W.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}=$a();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;W.trackMonthCloseAuditPage(l.selectedPeriod.month,l.selectedPeriod.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,p??null)}}),[l.fetchState,l.selectedPeriod,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),k.jsx(Ii,{children:k.jsx(xc,{monthEndCloseChecksView:l,isRealtimeInsightsFeatureEnabled:i,onMonthEndCheckClick:p=>{n(`./${p}/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:z,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:C,handleReviewButtonClick:w,onBackClick:()=>{n("../../dashboard")},onReload:m,isAiCfoAccessEnabled:v,onAskAiCfoClick:x,aiAuditScorePercentageEnabled:r})})},Ii=be.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{j as s}from"./liveblocks-CSh_vLcI.js";import{a as r}from"./sentry-BbRn6Rps.js";import{aw as i,ax as l,v as p,a4 as m}from"./index-BUq8vLqs.js";import"./mui-DxxQrDXb.js";import c from"./NotFoundScreen-Pkv6JCVI.js";import{h as u,g as b}from"./core-BTRpO5kD.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="12db23f3-a3af-47a0-ad83-5eba9eef5259",a._sentryDebugIdIdentifier="sentry-dbid-12db23f3-a3af-47a0-ad83-5eba9eef5259")}catch{}})();const _=()=>{const a=u(),e=b(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),d=r.useCallback((()=>{(()=>{const n=m(e.state?.pathnameStackToGoBack),f=n.poppedPathname??k();a(f,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=i(e.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:d}):s.jsx(c,{})},k=(a=2)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e};export{_ as F};
1
+ import{j as s}from"./liveblocks-CSh_vLcI.js";import{a as r}from"./sentry-BbRn6Rps.js";import{aw as i,ax as l,v as p,a4 as m}from"./index-D-DXs1ug.js";import"./mui-DxxQrDXb.js";import c from"./NotFoundScreen-BEmDKBPw.js";import{h as u,g as b}from"./core-BTRpO5kD.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="12db23f3-a3af-47a0-ad83-5eba9eef5259",a._sentryDebugIdIdentifier="sentry-dbid-12db23f3-a3af-47a0-ad83-5eba9eef5259")}catch{}})();const _=()=>{const a=u(),e=b(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),d=r.useCallback((()=>{(()=>{const n=m(e.state?.pathnameStackToGoBack),f=n.poppedPathname??k();a(f,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=i(e.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:d}):s.jsx(c,{})},k=(a=2)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e};export{_ as F};
@@ -1 +1 @@
1
- import{a as r}from"./sentry-BbRn6Rps.js";import{u as f,h as l,g as m}from"./core-BTRpO5kD.js";import{h$ as p,UL as g,UM as _}from"./zeni-epic-state-GGdMfKwk.js";import{u as b,L as h,z as y}from"./index-BUq8vLqs.js";import"./liveblocks-CSh_vLcI.js";import"./recharts-TU-ixTpA.js";import"./mui-DxxQrDXb.js";import"./analytics-Bwul-sh2.js";import"./plaid-BETTZw7O.js";import"./dnd-2ZjyQ0g9.js";import"./stripe-cKAAJElX.js";import"./lottie-CkDkDB9t.js";import"./lexical-B4Vx7iXM.js";import"./pdf-B5u-xbSo.js";import"./utils-CG6WKZWt.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]="0fdf3891-5c7e-4a9e-b5ea-d15ebfeee038",e._sentryDebugIdIdentifier="sentry-dbid-0fdf3891-5c7e-4a9e-b5ea-d15ebfeee038")}catch{}})();function $(){const e=f(),n=l(),o=m(),{setLoading:i,clearAllLoading:c}=b(),s=r.useRef(!1);return r.useLayoutEffect((()=>{i(h.CONNECTION_AUTH)}),[i]),r.useEffect((()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(o.search).get("code"),d=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&d!=null){const t=JSON.parse(d);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}c();const u=y.getActiveTenantForUser();n(u?.tenantEmailDomain!=null?`/${u.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{$ as default};
1
+ import{a as r}from"./sentry-BbRn6Rps.js";import{u as f,h as l,g as m}from"./core-BTRpO5kD.js";import{h$ as p,UL as g,UM as _}from"./zeni-epic-state-GGdMfKwk.js";import{u as b,L as h,z as y}from"./index-D-DXs1ug.js";import"./liveblocks-CSh_vLcI.js";import"./recharts-TU-ixTpA.js";import"./mui-DxxQrDXb.js";import"./analytics-Bwul-sh2.js";import"./plaid-BETTZw7O.js";import"./dnd-2ZjyQ0g9.js";import"./stripe-cKAAJElX.js";import"./lottie-CkDkDB9t.js";import"./lexical-B4Vx7iXM.js";import"./pdf-B5u-xbSo.js";import"./utils-CG6WKZWt.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]="0fdf3891-5c7e-4a9e-b5ea-d15ebfeee038",e._sentryDebugIdIdentifier="sentry-dbid-0fdf3891-5c7e-4a9e-b5ea-d15ebfeee038")}catch{}})();function $(){const e=f(),n=l(),o=m(),{setLoading:i,clearAllLoading:c}=b(),s=r.useRef(!1);return r.useLayoutEffect((()=>{i(h.CONNECTION_AUTH)}),[i]),r.useEffect((()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(o.search).get("code"),d=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&d!=null){const t=JSON.parse(d);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}c();const u=y.getActiveTenantForUser();n(u?.tenantEmailDomain!=null?`/${u.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{$ as default};