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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/dist/assets/{AccountMappingScreen-wN76eX8x.js → AccountMappingScreen-EqyOLk0W.js} +1 -1
  2. package/dist/assets/{ActualMatchingMatchDetailScreen-DesQndtQ.js → ActualMatchingMatchDetailScreen-B_Hxuz1x.js} +1 -1
  3. package/dist/assets/{AddressRoutes-Bx3-O7R0.js → AddressRoutes-ByQnL6Ep.js} +1 -1
  4. package/dist/assets/{AddressScreen-DOHRJgNm.js → AddressScreen-C2qj6tYr.js} +1 -1
  5. package/dist/assets/{AiCfoScreen-Dz9VmjDJ.js → AiCfoScreen-DgiomMQs.js} +1 -1
  6. package/dist/assets/{AppDrawer-CuwDG4i2.js → AppDrawer-C9JSspSl.js} +1 -1
  7. package/dist/assets/{BillPayApprovalRoutes-ZvXWZ4qY.js → BillPayApprovalRoutes-CtPNwVvl.js} +1 -1
  8. package/dist/assets/{BillPayRoutes-B6UGTljV.js → BillPayRoutes-Duz6Vx7D.js} +1 -1
  9. package/dist/assets/{BusinessVerificationPageScreen-DrH4Xh9l.js → BusinessVerificationPageScreen-BAWcvg1q.js} +1 -1
  10. package/dist/assets/{CardsAiCfoScreen-DR0WQjnK.js → CardsAiCfoScreen-BdTJBLec.js} +1 -1
  11. package/dist/assets/{ChargeCardRoutes-5JojYZ7y.js → ChargeCardRoutes-B08xwpTq.js} +1 -1
  12. package/dist/assets/{CompanyPassportScreen-CZ0CexZb.js → CompanyPassportScreen-CbwVCSdf.js} +1 -1
  13. package/dist/assets/{ConnectionAuthScreen-DHtuCBfP.js → ConnectionAuthScreen-BcoTZa8L.js} +1 -1
  14. package/dist/assets/{CustomerOnboardingAuthScreen-rIhWee1i.js → CustomerOnboardingAuthScreen-BpGFH1t5.js} +1 -1
  15. package/dist/assets/{CustomerOnboardingRoutes-3PDTOTim.js → CustomerOnboardingRoutes-BP006ys9.js} +1 -1
  16. package/dist/assets/{DashboardRoutes-U29blEjz.js → DashboardRoutes-DKsy8kjy.js} +1 -1
  17. package/dist/assets/{DefaultTenantHome-DDjo6DdI.js → DefaultTenantHome-h9sstg-6.js} +1 -1
  18. package/dist/assets/{DomesticWireDetailScreen-CYJRxpzs.js → DomesticWireDetailScreen-DdrkO-LG.js} +1 -1
  19. package/dist/assets/{DrawerScreen-C0RPM-YO.js → DrawerScreen-KSeYe6Xi.js} +1 -1
  20. package/dist/assets/{EntityDetailRoutes-B6kEwNqt.js → EntityDetailRoutes-TJfEMlzp.js} +1 -1
  21. package/dist/assets/{ExpenseAutomationRoutes-CZEx-mPd.js → ExpenseAutomationRoutes-FRK8lYq7.js} +1 -1
  22. package/dist/assets/{FeaturePreviewScreen-t00mgiPb.js → FeaturePreviewScreen-R_rh5xYj.js} +1 -1
  23. package/dist/assets/{HubSpotOAuthCallbackScreen-D0XpQwqB.js → HubSpotOAuthCallbackScreen-Bf48Zrcv.js} +1 -1
  24. package/dist/assets/{InvoicingRoutes-CEbeWuJ_.js → InvoicingRoutes-D9DMbY6F.js} +1 -1
  25. package/dist/assets/{MagicLinkRoutes-B-uK9pQa.js → MagicLinkRoutes-DVS2kuyq.js} +1 -1
  26. package/dist/assets/{MagicLinkSignInScreen-DPLtHJ6T.js → MagicLinkSignInScreen-CmaiVv9M.js} +1 -1
  27. package/dist/assets/{MobileAppDrawer-DbFom2zh.js → MobileAppDrawer-DEm85bH8.js} +1 -1
  28. package/dist/assets/{NotFoundScreen-BScz3VcE.js → NotFoundScreen-CS6UgwGr.js} +1 -1
  29. package/dist/assets/{NotificationRoutes-Btu3I9BW.js → NotificationRoutes-DlVY8cS0.js} +1 -1
  30. package/dist/assets/{OAuthConsentScreen-BvZ6UonX.js → OAuthConsentScreen-0eyA85wD.js} +1 -1
  31. package/dist/assets/{PandLWithForecastRoutes-B_NSnbx3.js → PandLWithForecastRoutes-Ciu8QGi3.js} +1 -1
  32. package/dist/assets/{PaymentLinkScreen-CVpQrKPS.js → PaymentLinkScreen-DSvOcNW8.js} +1 -1
  33. package/dist/assets/{PeopleRoutes-BRGNn5z0.js → PeopleRoutes-B29gnv2-.js} +1 -1
  34. package/dist/assets/{PerformanceRoutes-BssWGUh3.js → PerformanceRoutes-C-oSemZm.js} +1 -1
  35. package/dist/assets/{QBOConnectionScreen-NNh_c5sH.js → QBOConnectionScreen-CUhLSYvc.js} +1 -1
  36. package/dist/assets/{ReimbursementApprovalRoutes-BputYX4N.js → ReimbursementApprovalRoutes-CS9p1qcB.js} +1 -1
  37. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-Cp2buMpa.js → ReimbursementApprovalRuleDetailScreen-CJnxkFoz.js} +1 -1
  38. package/dist/assets/{ReimbursementRoutes-CLUfJEzf.js → ReimbursementRoutes-DaGg2TTR.js} +1 -1
  39. package/dist/assets/{ReportsRoutes-BRWTnngq.js → ReportsRoutes-BsvYUCIx.js} +1 -1
  40. package/dist/assets/{RewardsRoutes-R7jP_3At.js → RewardsRoutes-BeNSEmB_.js} +1 -1
  41. package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-VG_9abqY.js → ScheduleDetailsPrepaidExpensesScreen-CJ28c5Wc.js} +1 -1
  42. package/dist/assets/{ScreenRoutes-C1jevG_n.js → ScreenRoutes-Lei7nnrR.js} +2 -2
  43. package/dist/assets/{SettingsRoutes-D-pfv1Ev.js → SettingsRoutes-DJiPiJIZ.js} +1 -1
  44. package/dist/assets/{SetupPagesScreen-CysLzuEg.js → SetupPagesScreen-BzPNt5Xb.js} +1 -1
  45. package/dist/assets/{SignInScreen-BjCXQzNb.js → SignInScreen-OFMK0Fhv.js} +1 -1
  46. package/dist/assets/{SignOutScreen-CSA1o3iG.js → SignOutScreen-Duww-LZM.js} +1 -1
  47. package/dist/assets/{TaskListScreen-zIhpHyB0.js → TaskListScreen-Dy6L1Gr_.js} +1 -1
  48. package/dist/assets/{TaskRoutes-BEeYmQIS.js → TaskRoutes-BAifN0A-.js} +1 -1
  49. package/dist/assets/{TransactionDetailRoutes-Cqr24PBj.js → TransactionDetailRoutes-KEbThb3n.js} +1 -1
  50. package/dist/assets/{TransactionDetailScreen-uFx1hV5M.js → TransactionDetailScreen-C32uKUIF.js} +1 -1
  51. package/dist/assets/{TransactionListRoutes-2lehJ6Xh.js → TransactionListRoutes-Ebou9bMl.js} +1 -1
  52. package/dist/assets/{TreasuryRoutes-CZmm7Kla.js → TreasuryRoutes-Bq4RVae3.js} +1 -1
  53. package/dist/assets/{VendorsRoutes-DTnVN004.js → VendorsRoutes-dtzf2p8G.js} +1 -1
  54. package/dist/assets/{WiseConfirmationScreen-BXHRx74i.js → WiseConfirmationScreen-Dzz50WS2.js} +1 -1
  55. package/dist/assets/{ZeniAccountRoutes-C_vaL98S.js → ZeniAccountRoutes-C2FWt_0o.js} +1 -1
  56. package/dist/assets/{ZeniAccountStatementScreen-ibYC20mc.js → ZeniAccountStatementScreen-CJtdjYJW.js} +1 -1
  57. package/dist/assets/{analyticsHelper-yBGPOCZK.js → analyticsHelper-k_Sp-PwA.js} +1 -1
  58. package/dist/assets/{getLocaleForTenant-BbLwvfGn.js → getLocaleForTenant-Cv6I-eSM.js} +1 -1
  59. package/dist/assets/{index-mRsR5jtB.js → index-C2L5Bzwa.js} +5 -5
  60. package/dist/assets/{routePaths-Ch3GR24x.js → routePaths-BrIEdo8u.js} +1 -1
  61. package/dist/assets/{useActualMatchingMatchDetail-D-xkseKQ.js → useActualMatchingMatchDetail-C-OzIN8B.js} +1 -1
  62. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-DUvHQuQx.js → useAiCfoDashboardSuggestedQuestionsChips-CZodBcrZ.js} +1 -1
  63. package/dist/assets/{useAskAiCfoHostNavButtonProps-qLwQUrxF.js → useAskAiCfoHostNavButtonProps-4TGjNsPg.js} +1 -1
  64. package/dist/assets/{useChargeCardPusherEvents-BMgEvn3W.js → useChargeCardPusherEvents-B3svLsmE.js} +1 -1
  65. package/dist/assets/{useEmailConnectResultRefresh-C0MkzUvF.js → useEmailConnectResultRefresh-CIZ_wxDt.js} +1 -1
  66. package/dist/assets/{useInitialThreadRequest-BbYhZx86.js → useInitialThreadRequest-BNsRpSRE.js} +1 -1
  67. package/dist/assets/{useTaskManagerAccess-BMDBcsNO.js → useTaskManagerAccess-Bhr2JI_X.js} +1 -1
  68. package/dist/assets/{withTransactionSidePanel-BaeEJKqt.js → withTransactionSidePanel-mkP2Wc9X.js} +1 -1
  69. package/dist/index.html +1 -1
  70. package/package.json +1 -1
@@ -1 +1 @@
1
- import{j as m}from"./liveblocks-CW9yScMF.js";import{a as g}from"./sentry-C_uJQK1a.js";import{h as w,u as T,g as k,i as x,j as O,l as E}from"./core-BI5oX4mx.js";import{z as D,br as F,a8 as P,k as V,S as j,o as C,bs as A,ae as L,aG as U,p as B}from"./index-mRsR5jtB.js";import{fF as b,gI as M,Bw as _,gD as z,c8 as G,Y2 as R,bn as Y,uT as H,uH as Z,mz as $,o8 as S,Y3 as q,bE as J,cE as N,oj as K,ot as Q}from"./zeni-epic-state-CIizsNeB.js";import"./mui-KP5Ep0NX.js";import{d as W}from"./routePaths-Ch3GR24x.js";import{M as X}from"./MobileAppDrawer-DbFom2zh.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]="d1fde12b-49e0-4487-80c8-e213a3e4f8e7",t._sentryDebugIdIdentifier="sentry-dbid-d1fde12b-49e0-4487-80c8-e213a3e4f8e7")}catch{}})();const ee=E((function(t){const a=z(t),i=D.getSignedInUser(),p=b(t),c=p.tenantId,l={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=G(p?.userRole??[])&&a.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=R(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:`${L.fileMicroServiceBaseUrl}`,isZeniUser:Y(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?N(u):void 0,meetingLink:y!=""&&y!=null?N(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]))}}}))(A);function de(){const t=w(),a=T(),i=k(),{tenantEmailDomain:p}=x(),[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=>b(s))),d=r.companyId??D.getSignedInUserTenant(p)?.companyId;if(D.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect((()=>{c||n!=="Not-Started"||d==null||(l(!0),a(M(d)))}),[c,n,d,a]),g.useEffect((()=>{o==="Not-Started"&&a(_())}),[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:V,onLoad:s=>s.trackPageLoaded(j.Event.companyPassport,C(i)?"Settings":"Company Passport")}),C(i)?m.jsx(X,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:t,location:i,isLoading:y,currentTenant:r,isSettings:C(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
1
+ import{j as m}from"./liveblocks-CW9yScMF.js";import{a as g}from"./sentry-C_uJQK1a.js";import{h as w,u as T,g as k,i as x,j as O,l as E}from"./core-BI5oX4mx.js";import{z as D,br as F,a8 as P,k as V,S as j,o as C,bs as A,ae as L,aG as U,p as B}from"./index-C2L5Bzwa.js";import{fF as b,gI as M,Bw as _,gD as z,c8 as G,Y2 as R,bn as Y,uT as H,uH as Z,mz as $,o8 as S,Y3 as q,bE as J,cE as N,oj as K,ot as Q}from"./zeni-epic-state-CIizsNeB.js";import"./mui-KP5Ep0NX.js";import{d as W}from"./routePaths-BrIEdo8u.js";import{M as X}from"./MobileAppDrawer-DEm85bH8.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]="d1fde12b-49e0-4487-80c8-e213a3e4f8e7",t._sentryDebugIdIdentifier="sentry-dbid-d1fde12b-49e0-4487-80c8-e213a3e4f8e7")}catch{}})();const ee=E((function(t){const a=z(t),i=D.getSignedInUser(),p=b(t),c=p.tenantId,l={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=G(p?.userRole??[])&&a.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=R(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:`${L.fileMicroServiceBaseUrl}`,isZeniUser:Y(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?N(u):void 0,meetingLink:y!=""&&y!=null?N(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]))}}}))(A);function de(){const t=w(),a=T(),i=k(),{tenantEmailDomain:p}=x(),[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=>b(s))),d=r.companyId??D.getSignedInUserTenant(p)?.companyId;if(D.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect((()=>{c||n!=="Not-Started"||d==null||(l(!0),a(M(d)))}),[c,n,d,a]),g.useEffect((()=>{o==="Not-Started"&&a(_())}),[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:V,onLoad:s=>s.trackPageLoaded(j.Event.companyPassport,C(i)?"Settings":"Company Passport")}),C(i)?m.jsx(X,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:t,location:i,isLoading:y,currentTenant:r,isSettings:C(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
@@ -1,4 +1,4 @@
1
- import{j as I}from"./liveblocks-CW9yScMF.js";import{a as o}from"./sentry-C_uJQK1a.js";import{u as P,h as R,g as H,j as C,N as w}from"./core-BI5oX4mx.js";import{TJ as q,fF as z,gl as G,pS as J,gM as A,gk as M,gi as Q,U7 as V,gh as O}from"./zeni-epic-state-CIizsNeB.js";import{u as B,z as E,L as D,G as K,I as W}from"./index-mRsR5jtB.js";import{n as X}from"./mui-KP5Ep0NX.js";import{P as h,a as _}from"./AccountMappingScreen-wN76eX8x.js";import{t as Y}from"./getLocaleForTenant-BbLwvfGn.js";import{g as Z,Q as ee}from"./QBOConnectionScreen-NNh_c5sH.js";import"./recharts-DRl2ZsSW.js";import"./analytics-5LJ4BXQX.js";import"./plaid-BrgJMdej.js";import"./dnd-D6wtGmk9.js";import"./stripe-cKAAJElX.js";import"./lottie-lQbJqTc2.js";import"./lexical-BLu7UAko.js";import"./pdf-DflcYtDk.js";import"./utils-BzQpFQvw.js";import"./MobileAppDrawer-DbFom2zh.js";import"./InboxNotificationsProvider-CMirleoY.js";import"./useTaskManagerAccess-BMDBcsNO.js";import"./accountMappingHelper-B5wpHG39.js";import"./empty-D1y42ZwI.js";import"./pdf-lib-iL5hUpKl.js";import"./index-BT5wSX8Z.js";import"./url-0wqXxJRo.js";import"./index-Cf-PV9pR.js";import"./decodeURIComponentSafe-B7oIXSPO.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]="88bcfe96-a2a9-4293-97cb-93a7171719ee",t._sentryDebugIdIdentifier="sentry-dbid-88bcfe96-a2a9-4293-97cb-93a7171719ee")}catch{}})();const te=X.div`
1
+ import{j as I}from"./liveblocks-CW9yScMF.js";import{a as o}from"./sentry-C_uJQK1a.js";import{u as P,h as R,g as H,j as C,N as w}from"./core-BI5oX4mx.js";import{TJ as q,fF as z,gl as G,pS as J,gM as A,gk as M,gi as Q,U7 as V,gh as O}from"./zeni-epic-state-CIizsNeB.js";import{u as B,z as E,L as D,G as K,I as W}from"./index-C2L5Bzwa.js";import{n as X}from"./mui-KP5Ep0NX.js";import{P as h,a as _}from"./AccountMappingScreen-EqyOLk0W.js";import{t as Y}from"./getLocaleForTenant-Cv6I-eSM.js";import{g as Z,Q as ee}from"./QBOConnectionScreen-CUhLSYvc.js";import"./recharts-DRl2ZsSW.js";import"./analytics-5LJ4BXQX.js";import"./plaid-BrgJMdej.js";import"./dnd-D6wtGmk9.js";import"./stripe-cKAAJElX.js";import"./lottie-lQbJqTc2.js";import"./lexical-BLu7UAko.js";import"./pdf-DflcYtDk.js";import"./utils-BzQpFQvw.js";import"./MobileAppDrawer-DEm85bH8.js";import"./InboxNotificationsProvider-CMirleoY.js";import"./useTaskManagerAccess-Bhr2JI_X.js";import"./accountMappingHelper-B5wpHG39.js";import"./empty-D1y42ZwI.js";import"./pdf-lib-iL5hUpKl.js";import"./index-BT5wSX8Z.js";import"./url-0wqXxJRo.js";import"./index-Cf-PV9pR.js";import"./decodeURIComponentSafe-B7oIXSPO.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]="88bcfe96-a2a9-4293-97cb-93a7171719ee",t._sentryDebugIdIdentifier="sentry-dbid-88bcfe96-a2a9-4293-97cb-93a7171719ee")}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-CW9yScMF.js";import{z as m}from"./index-mRsR5jtB.js";import{g as n}from"./QBOConnectionScreen-NNh_c5sH.js";import"./sentry-C_uJQK1a.js";import{g as p,N as a}from"./core-BI5oX4mx.js";import"./zeni-epic-state-CIizsNeB.js";import"./recharts-DRl2ZsSW.js";import"./mui-KP5Ep0NX.js";import"./analytics-5LJ4BXQX.js";import"./plaid-BrgJMdej.js";import"./dnd-D6wtGmk9.js";import"./stripe-cKAAJElX.js";import"./lottie-lQbJqTc2.js";import"./lexical-BLu7UAko.js";import"./pdf-DflcYtDk.js";import"./utils-BzQpFQvw.js";import"./empty-D1y42ZwI.js";import"./pdf-lib-iL5hUpKl.js";import"./index-BT5wSX8Z.js";import"./url-0wqXxJRo.js";import"./index-Cf-PV9pR.js";import"./decodeURIComponentSafe-B7oIXSPO.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-CW9yScMF.js";import{z as m}from"./index-C2L5Bzwa.js";import{g as n}from"./QBOConnectionScreen-CUhLSYvc.js";import"./sentry-C_uJQK1a.js";import{g as p,N as a}from"./core-BI5oX4mx.js";import"./zeni-epic-state-CIizsNeB.js";import"./recharts-DRl2ZsSW.js";import"./mui-KP5Ep0NX.js";import"./analytics-5LJ4BXQX.js";import"./plaid-BrgJMdej.js";import"./dnd-D6wtGmk9.js";import"./stripe-cKAAJElX.js";import"./lottie-lQbJqTc2.js";import"./lexical-BLu7UAko.js";import"./pdf-DflcYtDk.js";import"./utils-BzQpFQvw.js";import"./empty-D1y42ZwI.js";import"./pdf-lib-iL5hUpKl.js";import"./index-BT5wSX8Z.js";import"./url-0wqXxJRo.js";import"./index-Cf-PV9pR.js";import"./decodeURIComponentSafe-B7oIXSPO.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-CW9yScMF.js";import{t as wn,A as $e}from"./AddressScreen-DOHRJgNm.js";import An from"./NotFoundScreen-BScz3VcE.js";import{a as d,t as Me}from"./sentry-C_uJQK1a.js";import{h as _e,g as Ee,u as se,i as xe,j as T,N as Q,q as Pn,l as cn,n as Dn,o as H}from"./core-BI5oX4mx.js";import{fF as Y,d_ as Te,dZ as we,bq as Bn,T_ as jn,bR as Fn,pQ as Vn,Bg as Un,Bj as Ln,Vl as Rn,Vm as Nn,lu as Oe,lx as dn,UB as Gn,b$ as $n,c8 as fe,BK as Ae,Bv as Mn,Vn as me,BL as un,S8 as Qn,mH as ln,di as pn,Vo as Kn,Vp as zn,uA as qn,Uo as Ce,hV as Hn,Un as be,hS as Zn,G8 as Jn,uE as Wn,hK as Xn,hN as Qe,Vq as mn,Vr as Yn,LV as et,Vs as nt,LZ as tt,Bm as at,Vt as ot,Vu as st,ls as rt,lv as it,BX as ct,Bx as gn,BJ as dt,bE as Ke,cE as ut,BW as ze,uT as lt,uH as pt,mz as mt,gG as gt,gF as ft,gE as yt,Vv as ht,Bp as Ct,BY as bt,B$ as St,C2 as It,C8 as kt,dj as Ot}from"./zeni-epic-state-CIizsNeB.js";import{z,N as Pe,d as W,q as vt,p as q,a8 as re,k as g,aE as _t,ai as fn,a1 as Et,E as yn,U as hn,j as X,Z as ge,S as ve,aF as xt,I as qe,v as He,ae as Tt,aG as Ze,aH as wt,aI as At}from"./index-mRsR5jtB.js";import{n as De}from"./mui-KP5Ep0NX.js";import{g as Pt,h as Dt,q as ie}from"./QBOConnectionScreen-NNh_c5sH.js";import{u as Bt,a as jt}from"./useEmailConnectResultRefresh-C0MkzUvF.js";import{u as Ft}from"./useChargeCardPusherEvents-BMgEvn3W.js";import"./recharts-DRl2ZsSW.js";import"./analytics-5LJ4BXQX.js";import"./plaid-BrgJMdej.js";import"./dnd-D6wtGmk9.js";import"./stripe-cKAAJElX.js";import"./lottie-lQbJqTc2.js";import"./lexical-BLu7UAko.js";import"./pdf-DflcYtDk.js";import"./utils-BzQpFQvw.js";import"./empty-D1y42ZwI.js";import"./pdf-lib-iL5hUpKl.js";import"./index-BT5wSX8Z.js";import"./url-0wqXxJRo.js";import"./index-Cf-PV9pR.js";import"./decodeURIComponentSafe-B7oIXSPO.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]="ce44276f-1e9e-41ef-8194-d239ea480661",e._sentryDebugIdIdentifier="sentry-dbid-ce44276f-1e9e-41ef-8194-d239ea480661")}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=Ee(),i=se(),[a,p]=d.useState(!1),[u,c]=d.useState(!1),{tenantEmailDomain:v}=xe(),n=z.getSignedInUser(),{useFeatureGate:t}=Pe(),{isFeatureEnabled:C}=t(W.isApAgingFeatureEnabled),{isFeatureEnabled:o}=t(W.isArAgingFeatureEnabled),{isFeatureEnabled:A}=t(W.isReferralFeatureEnabled),{isFeatureEnabled:w}=t(W.isDebitCardFeatureEnabled),k=vt(),O=T((S=>Y(S))),P=T((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=Te(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&&Bn(O?.userRole),E=_?.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"),E===!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=T((S=>{const V=[];C===!1&&V.push("accounts_payable_aging"),o===!1&&V.push("accounts_receivable_aging"),V.push("zeni_accounts_promo_card","treasury_promo_card"),A===!1&&V.push("rewards_card"),k===!1&&V.push("expense_automation_card");const Z=jn(S,V);return Fn(Z.reportsInOrder.map(($=>({fetchState:$.fetchState,error:$.error})))).fetchState}));d.useEffect((()=>{P!=="Completed"||a||m||b||(p(!0),i(Vn(n.userId,F,O.tenantId,!0,!1,D)))}),[a,P,m,b,n,O.tenantId,i]);const B=d.useRef(!1),N=d.useCallback((()=>{const S={pathnameStackToGoBack:q(l.state?.pathnameStackToGoBack,l.pathname),message:"activation"};e(m?"../../checking":b?"../../cards":"../../dashboard",{state:S})}),[e,l,m,b]),G=d.useCallback((()=>{B.current||(B.current=!0,N())}),[N]);if(d.useEffect((()=>{const S=setTimeout((()=>c(!0)),3e3);return()=>clearTimeout(S)}),[]),d.useEffect((()=>{const S=setTimeout(G,6e3);return()=>clearTimeout(S)}),[G]),d.useEffect((()=>{m||b||!u||f!=="Completed"&&f!=="Error"||G()}),[u,f,m,b,G]),P!=="Completed")return s.jsx(Q,{to:"../"});const R=O.company?.companyOnboardingInfo?.onboardingInfo,ee={timeSinceQuoteSign:R?.onboardingTimeSinceQuoteSigned??"",timeSinceQuoteSignInMinutes:R?.onboardingToQuoteSignMinutes??0,isKybDone:Je(R?.businessVerified?.status),isKycDone:Je(R?.identityVerified?.status),paymentType:"",paymentSource:"",qboConnectionSource:R?.accountingConnectionCreationMode??""};return s.jsxs(s.Fragment,{children:[s.jsx(re,{analytics:g,onLoad:S=>S.trackOnboardingDashboardActivation(ee)}),s.jsx(_t,{show:!0,onComplete:G})]})},Se=["reading_books","finance_graph","reconciliation","cfo_foundation"],Ie=["llm_fine_tuning","rag_knowledge_graph","personalized_context"],We=(e,l)=>{const i=new Map(e.map((a=>[a.key,a])));return l.map((a=>{return p=i.get(a)?.status,p==="starting"||p==="building"?p:"idle";var p}))},Xe=(e,l)=>{if(e.length===0)return!1;const i=new Map(e.map((a=>[a.key,a])));return l.every((a=>i.get(a)?.status==="ready"))},Ye=De.div`
1
+ import{j as s}from"./liveblocks-CW9yScMF.js";import{t as wn,A as $e}from"./AddressScreen-C2qj6tYr.js";import An from"./NotFoundScreen-CS6UgwGr.js";import{a as d,t as Me}from"./sentry-C_uJQK1a.js";import{h as _e,g as Ee,u as se,i as xe,j as T,N as Q,q as Pn,l as cn,n as Dn,o as H}from"./core-BI5oX4mx.js";import{fF as Y,d_ as Te,dZ as we,bq as Bn,T_ as jn,bR as Fn,pQ as Vn,Bg as Un,Bj as Ln,Vl as Rn,Vm as Nn,lu as Oe,lx as dn,UB as Gn,b$ as $n,c8 as fe,BK as Ae,Bv as Mn,Vn as me,BL as un,S8 as Qn,mH as ln,di as pn,Vo as Kn,Vp as zn,uA as qn,Uo as Ce,hV as Hn,Un as be,hS as Zn,G8 as Jn,uE as Wn,hK as Xn,hN as Qe,Vq as mn,Vr as Yn,LV as et,Vs as nt,LZ as tt,Bm as at,Vt as ot,Vu as st,ls as rt,lv as it,BX as ct,Bx as gn,BJ as dt,bE as Ke,cE as ut,BW as ze,uT as lt,uH as pt,mz as mt,gG as gt,gF as ft,gE as yt,Vv as ht,Bp as Ct,BY as bt,B$ as St,C2 as It,C8 as kt,dj as Ot}from"./zeni-epic-state-CIizsNeB.js";import{z,N as Pe,d as W,q as vt,p as q,a8 as re,k as g,aE as _t,ai as fn,a1 as Et,E as yn,U as hn,j as X,Z as ge,S as ve,aF as xt,I as qe,v as He,ae as Tt,aG as Ze,aH as wt,aI as At}from"./index-C2L5Bzwa.js";import{n as De}from"./mui-KP5Ep0NX.js";import{g as Pt,h as Dt,q as ie}from"./QBOConnectionScreen-CUhLSYvc.js";import{u as Bt,a as jt}from"./useEmailConnectResultRefresh-CIZ_wxDt.js";import{u as Ft}from"./useChargeCardPusherEvents-B3svLsmE.js";import"./recharts-DRl2ZsSW.js";import"./analytics-5LJ4BXQX.js";import"./plaid-BrgJMdej.js";import"./dnd-D6wtGmk9.js";import"./stripe-cKAAJElX.js";import"./lottie-lQbJqTc2.js";import"./lexical-BLu7UAko.js";import"./pdf-DflcYtDk.js";import"./utils-BzQpFQvw.js";import"./empty-D1y42ZwI.js";import"./pdf-lib-iL5hUpKl.js";import"./index-BT5wSX8Z.js";import"./url-0wqXxJRo.js";import"./index-Cf-PV9pR.js";import"./decodeURIComponentSafe-B7oIXSPO.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]="ce44276f-1e9e-41ef-8194-d239ea480661",e._sentryDebugIdIdentifier="sentry-dbid-ce44276f-1e9e-41ef-8194-d239ea480661")}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=Ee(),i=se(),[a,p]=d.useState(!1),[u,c]=d.useState(!1),{tenantEmailDomain:v}=xe(),n=z.getSignedInUser(),{useFeatureGate:t}=Pe(),{isFeatureEnabled:C}=t(W.isApAgingFeatureEnabled),{isFeatureEnabled:o}=t(W.isArAgingFeatureEnabled),{isFeatureEnabled:A}=t(W.isReferralFeatureEnabled),{isFeatureEnabled:w}=t(W.isDebitCardFeatureEnabled),k=vt(),O=T((S=>Y(S))),P=T((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=Te(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&&Bn(O?.userRole),E=_?.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"),E===!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=T((S=>{const V=[];C===!1&&V.push("accounts_payable_aging"),o===!1&&V.push("accounts_receivable_aging"),V.push("zeni_accounts_promo_card","treasury_promo_card"),A===!1&&V.push("rewards_card"),k===!1&&V.push("expense_automation_card");const Z=jn(S,V);return Fn(Z.reportsInOrder.map(($=>({fetchState:$.fetchState,error:$.error})))).fetchState}));d.useEffect((()=>{P!=="Completed"||a||m||b||(p(!0),i(Vn(n.userId,F,O.tenantId,!0,!1,D)))}),[a,P,m,b,n,O.tenantId,i]);const B=d.useRef(!1),N=d.useCallback((()=>{const S={pathnameStackToGoBack:q(l.state?.pathnameStackToGoBack,l.pathname),message:"activation"};e(m?"../../checking":b?"../../cards":"../../dashboard",{state:S})}),[e,l,m,b]),G=d.useCallback((()=>{B.current||(B.current=!0,N())}),[N]);if(d.useEffect((()=>{const S=setTimeout((()=>c(!0)),3e3);return()=>clearTimeout(S)}),[]),d.useEffect((()=>{const S=setTimeout(G,6e3);return()=>clearTimeout(S)}),[G]),d.useEffect((()=>{m||b||!u||f!=="Completed"&&f!=="Error"||G()}),[u,f,m,b,G]),P!=="Completed")return s.jsx(Q,{to:"../"});const R=O.company?.companyOnboardingInfo?.onboardingInfo,ee={timeSinceQuoteSign:R?.onboardingTimeSinceQuoteSigned??"",timeSinceQuoteSignInMinutes:R?.onboardingToQuoteSignMinutes??0,isKybDone:Je(R?.businessVerified?.status),isKycDone:Je(R?.identityVerified?.status),paymentType:"",paymentSource:"",qboConnectionSource:R?.accountingConnectionCreationMode??""};return s.jsxs(s.Fragment,{children:[s.jsx(re,{analytics:g,onLoad:S=>S.trackOnboardingDashboardActivation(ee)}),s.jsx(_t,{show:!0,onComplete:G})]})},Se=["reading_books","finance_graph","reconciliation","cfo_foundation"],Ie=["llm_fine_tuning","rag_knowledge_graph","personalized_context"],We=(e,l)=>{const i=new Map(e.map((a=>[a.key,a])));return l.map((a=>{return p=i.get(a)?.status,p==="starting"||p==="building"?p:"idle";var p}))},Xe=(e,l)=>{if(e.length===0)return!1;const i=new Map(e.map((a=>[a.key,a])));return l.every((a=>i.get(a)?.status==="ready"))},Ye=De.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  background-color: ${e=>e.theme.colors.grey4};
@@ -1,4 +1,4 @@
1
- import{j as d}from"./liveblocks-CW9yScMF.js";import{i as q,j as _,g as Z,u as z,h as J,l as ne,k as oa,n as ft,o as F,N as yn}from"./core-BI5oX4mx.js";import{fF as L,VH as Ze,bE as sa,br as Ee,X2 as An,ka as vn,X3 as Xt,X4 as In,kd as gt,X5 as Qe,X6 as En,ki as Tn,X7 as Yt,X8 as xn,km as bt,X9 as He,Xa as Dn,Xb as wn,V$ as Pn,lo as On,Xc as Fn,bn as Je,Xd as ra,WF as ue,bc as ia,lC as ca,ll as la,WH as me,WG as ae,fE as da,ga as jn,gq as Ct,Xe as Rn,Xf as Bn,Xg as ua,Xh as Oe,DR as Me,DS as Ue,Ee as Te,E8 as pe,DW as Le,Xi as Mn,b$ as Ve,Xj as Un,Xk as Ln,Xl as ma,Xm as Fe,Xn as Vn,ei as et,A2 as pa,Xo as Xn,Xp as ha,Xq as Yn,Xr as Gn,Xs as Nn,Xt as St,UD as kt,u6 as xe,l$ as De,Eo as yt,A9 as $n,Ag as zn,Xu as Kn,Xv as qn,DT as Gt,Xw as Qn,A5 as ve,A0 as fa,Xx as be,Xy as Nt,Xz as Hn,XA as At,UC as vt,Cd as ga,XB as Wn,XC as ba,XD as Zn,XE as Jn,XF as eo,XG as It,Cs as to,Cz as ao,XH as no,XI as oo,DV as $t,XJ as so,Cb as Ca,XK as Ce,XL as zt,XM as ro,bq as _a,Et as Sa,XN as io,XO as ka,XP as co,XQ as lo,XR as uo,XS as Et,El as mo,En as po,XT as ho,XU as fo,DU as Kt,XV as go,Er as ya,XW as _e,XX as qt,XY as bo,XZ as Co,X_ as Aa,lQ as va,pX as Ia,lV as Ea,pV as Ta,pU as xa,pT as Da,BA as _o,dc as So,pQ as ko,T_ as yo,q5 as Ao,X$ as vo,Y0 as Io,Y1 as Eo,b5 as Tt,p$ as To,ic as xo,gI as Do,p_ as wo,le as Po,pY as Oo,pW as Fo,d_ as jo,dZ as Ro}from"./zeni-epic-state-CIizsNeB.js";import{z as V,av as oe,p as j,k as T,G as Q,bb as Bo,as as Xe,a8 as Ye,bc as wa,S as N,bd as Mo,be as Pa,c as Uo,bf as Lo,bg as Vo,a as Oa,a1 as Fa,f as ja,ar as Xo,bh as Yo,ao as Go,N as we,bi as Ra,x as ce,bj as Ba,bk as Ma,au as Ua,bl as No,ai as Ge,U as Ne,d as X,bm as $o,q as zo,j as Ko,a4 as qo,aq as Qo,bn as Ho,bo as Wo,bp as Zo,bq as Ie}from"./index-mRsR5jtB.js";import{n as xt}from"./mui-KP5Ep0NX.js";import{a as b}from"./sentry-C_uJQK1a.js";import{w as La}from"./withTransactionSidePanel-BaeEJKqt.js";import{c as Va,t as Pe,f as he,b as Dt,a as wt,v as Jo}from"./routePaths-Ch3GR24x.js";import{u as se}from"./useAskAiCfoHostNavButtonProps-qLwQUrxF.js";import Be from"./NotFoundScreen-BScz3VcE.js";import{u as Pt}from"./useInitialThreadRequest-BbYhZx86.js";import{t as Xa}from"./analyticsHelper-yBGPOCZK.js";import{C as es}from"./CompanyPassportScreen-CZ0CexZb.js";import{u as ts}from"./useAiCfoDashboardSuggestedQuestionsChips-DUvHQuQx.js";import{F as as}from"./FeaturePreviewScreen-t00mgiPb.js";import"./recharts-DRl2ZsSW.js";import"./analytics-5LJ4BXQX.js";import"./plaid-BrgJMdej.js";import"./dnd-D6wtGmk9.js";import"./stripe-cKAAJElX.js";import"./lottie-lQbJqTc2.js";import"./lexical-BLu7UAko.js";import"./pdf-DflcYtDk.js";import"./utils-BzQpFQvw.js";import"./TransactionDetailScreen-uFx1hV5M.js";import"./decodeURIComponentSafe-B7oIXSPO.js";import"./expenseAutomationHelper-CqPrLTRM.js";import"./stripSplatSuffix-CSXpdRK5.js";import"./MobileAppDrawer-DbFom2zh.js";import"./InboxNotificationsProvider-CMirleoY.js";import"./useTaskManagerAccess-BMDBcsNO.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]="47387ef9-e809-459a-8518-82fa4cb9b56b",e._sentryDebugIdIdentifier="sentry-dbid-47387ef9-e809-459a-8518-82fa4cb9b56b")}catch{}})();const ns=La((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=q(),s=V.getSignedInUser(),i=_((E=>E.tenantState.currentTenantId)),l=_((E=>L(E))),{tenantEmailDomain:m}=q(),p=Z(),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=z(),g=J(),k=_((E=>An(E,u,o))),I=b.useCallback((()=>{o!=null&&k.fetchState!=="In-Progress"&&k.fetchState!=="Completed"&&C(vn(o,u))}),[u]),A=b.useCallback((()=>{g("../../",{relative:"path"})}),[]),S=b.useCallback(((E,B)=>{C(Xt({sortKey:E,sortOrder:B}))}),[]),x=b.useCallback((E=>{C(Xt({downloadState:E}))}),[]),P=b.useCallback((E=>{if(e)e(E.transactionId,E.transactionType);else if(m!=null){const B=Va({id:E.transactionId,type:E.transactionType},m);g(B);const y=j(p.state?.pathnameStackToGoBack,p.pathname);g(B,{state:{pathnameStackToGoBack:y}})}}),[m,e]),D=b.useCallback((()=>{k.vendor!=null&&T.trackApAgingDetail("AP Aging",u.format(Q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),k.vendor.id,k.vendor.name)}),[k.vendor,u]);return b.useEffect((()=>{I()}),[]),b.useEffect((()=>{k.fetchState==="Completed"&&D()}),[D,k.fetchState]),d.jsx(Bo,{apAgingDetail:k,downloadParams:c,reportDate:u,analytics:T,onTransactionClick:P,onReload:I,onBackClick:A,onColumnSortConfigChanged:S,updateDownloadStateHandler:x,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),os=()=>{const e=z(),a=J(),t=_((S=>In(S))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=se({mobileExploreReferrer:"AP Aging"});Xe({isDataReady:t.fetchState==="Completed"});const r=V.getSignedInUser(),s=_((S=>S.tenantState.currentTenantId)),i=_((S=>L(S))),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(gt(h))}),[]);b.useEffect((()=>{f()}),[]);const c=b.useCallback((()=>{a("../",{relative:"path"})}),[]),u=b.useCallback((S=>{e(Qe({searchString:S}))}),[]),C=b.useCallback(((S,x)=>{e(Qe({sortKey:x,sortOrder:S}))}),[]),g=b.useCallback((S=>{a(`./${S}/${h.format(Q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[h]),k=b.useCallback((S=>{e(Qe({downloadState:S}))}),[]),I=b.useCallback(((S,x)=>{}),[]),A=b.useCallback(((S,x)=>{e(Qe({selectedDate:S,agingDateSelectionType:x})),e(gt(S))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ye,{analytics:T,onLoad:S=>S.trackPageLoaded(N.Event.agingReport,"AP Aging")}):null,d.jsx(wa,{uiState:t.apAgingUIState,report:t,downloadParams:p,analytics:T,onReloadReport:f,onBackClick:c,onSearchTextChange:u,onSortOrderChange:C,onEntityNameClick:g,updateDownloadStateHandler:k,onSelectedDateChanged:A,onNodeCollapseToggled:I,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},ss=La((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=q(),s=V.getSignedInUser(),i=_((D=>L(D))),{tenantEmailDomain:l}=q(),m=Z(),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=z(),C=J(),g=_((D=>En(D,c,o))),k=b.useCallback((()=>{o!=null&&g.fetchState!=="In-Progress"&&g.fetchState!=="Completed"&&u(Tn(o,c))}),[c]),I=b.useCallback((()=>{C("../../",{relative:"path"})}),[]),A=b.useCallback(((D,E)=>{u(Yt({sortKey:D,sortOrder:E}))}),[]),S=b.useCallback((D=>{u(Yt({downloadState:D}))}),[]),x=b.useCallback((D=>{if(e)e(D.transactionId,D.transactionType);else if(l!=null){const E=Va({id:D.transactionId,type:D.transactionType},l);C(E);const B=j(m.state?.pathnameStackToGoBack,m.pathname);C(E,{state:{pathnameStackToGoBack:B}})}}),[l,e]),P=b.useCallback((()=>{g.customer!=null&&T.trackArAgingDetail("AR Aging",c.format(Q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),g.customer.id,g.customer.name)}),[g.customer,c]);return b.useEffect((()=>{k()}),[]),b.useEffect((()=>{g.fetchState==="Completed"&&P()}),[g.fetchState,P]),d.jsx(Mo,{arAgingDetail:g,downloadParams:f,reportDate:c,analytics:T,onTransactionClick:x,onReload:k,onBackClick:I,onColumnSortConfigChanged:A,updateDownloadStateHandler:S,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),rs=()=>{const e=z(),a=J(),t=_((A=>xn(A))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=se({mobileExploreReferrer:"AR Aging"});Xe({isDataReady:t.fetchState==="Completed"});const r=V.getSignedInUser(),s=_((A=>L(A))),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(bt(p))}),[]);b.useEffect((()=>{h()}),[]);const f=b.useCallback((()=>{a("../",{relative:"path"})}),[]),c=b.useCallback((A=>{e(He({searchString:A}))}),[]),u=b.useCallback(((A,S)=>{e(He({sortKey:S,sortOrder:A}))}),[]),C=b.useCallback((A=>{a(`./${A}/${p.format(Q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[p]),g=b.useCallback((A=>{e(He({downloadState:A}))}),[]),k=b.useCallback(((A,S)=>{e(He({selectedDate:A,agingDateSelectionType:S})),e(bt(A))}),[]),I=b.useCallback(((A,S)=>{e(Dn({nodeId:A,isCollapsed:S}))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ye,{analytics:T,onLoad:A=>A.trackPageLoaded(N.Event.agingReport,"AR Aging")}):null,d.jsx(wa,{uiState:t.arAgingUIState,report:t,downloadParams:m,analytics:T,onReloadReport:h,onBackClick:f,onSearchTextChange:c,onSortOrderChange:u,onEntityNameClick:C,updateDownloadStateHandler:g,onSelectedDateChanged:k,onNodeCollapseToggled:I,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Ya=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function Ga(e,a){const t=Pn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=Pe(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=j(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(On(n,o))}}}const is=ne((function(e){const a=wn(e).accountsInOrder.map(((t,n)=>Ya(t,n)));return{sectionTitle:Q.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,fetchState:e.cashBalanceState.fetchState,analytics:T}}),Ga)(Pa),cs=ne((function(e){const a=Fn(e).accountsInOrder.map(((o,r)=>Ya(o,r))),t=V.getSignedInUser(),n=Je(t);return{sectionTitle:Q.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:T}}),Ga)(Pa);function ls(){const e=J(),a=Z(),{tenantEmailDomain:t}=q(),n=_((o=>L(o).company?.companyInfo.firstMonthOfFY??1));return _((o=>o.cashBalanceState.fetchState))==="Error"?d.jsx(Be,{}):d.jsx(is,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,firstMonthOfFY:n})}function ds(){const e=J(),a=Z(),{tenantEmailDomain:t}=q(),n=_((o=>L(o).company?.companyInfo.firstMonthOfFY??1));return _((o=>o.cardBalanceState.fetchState))==="Error"?d.jsx(Be,{}):d.jsx(cs,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,firstMonthOfFY:n})}const us=xt.div`
1
+ import{j as d}from"./liveblocks-CW9yScMF.js";import{i as q,j as _,g as Z,u as z,h as J,l as ne,k as oa,n as ft,o as F,N as yn}from"./core-BI5oX4mx.js";import{fF as L,VH as Ze,bE as sa,br as Ee,X2 as An,ka as vn,X3 as Xt,X4 as In,kd as gt,X5 as Qe,X6 as En,ki as Tn,X7 as Yt,X8 as xn,km as bt,X9 as He,Xa as Dn,Xb as wn,V$ as Pn,lo as On,Xc as Fn,bn as Je,Xd as ra,WF as ue,bc as ia,lC as ca,ll as la,WH as me,WG as ae,fE as da,ga as jn,gq as Ct,Xe as Rn,Xf as Bn,Xg as ua,Xh as Oe,DR as Me,DS as Ue,Ee as Te,E8 as pe,DW as Le,Xi as Mn,b$ as Ve,Xj as Un,Xk as Ln,Xl as ma,Xm as Fe,Xn as Vn,ei as et,A2 as pa,Xo as Xn,Xp as ha,Xq as Yn,Xr as Gn,Xs as Nn,Xt as St,UD as kt,u6 as xe,l$ as De,Eo as yt,A9 as $n,Ag as zn,Xu as Kn,Xv as qn,DT as Gt,Xw as Qn,A5 as ve,A0 as fa,Xx as be,Xy as Nt,Xz as Hn,XA as At,UC as vt,Cd as ga,XB as Wn,XC as ba,XD as Zn,XE as Jn,XF as eo,XG as It,Cs as to,Cz as ao,XH as no,XI as oo,DV as $t,XJ as so,Cb as Ca,XK as Ce,XL as zt,XM as ro,bq as _a,Et as Sa,XN as io,XO as ka,XP as co,XQ as lo,XR as uo,XS as Et,El as mo,En as po,XT as ho,XU as fo,DU as Kt,XV as go,Er as ya,XW as _e,XX as qt,XY as bo,XZ as Co,X_ as Aa,lQ as va,pX as Ia,lV as Ea,pV as Ta,pU as xa,pT as Da,BA as _o,dc as So,pQ as ko,T_ as yo,q5 as Ao,X$ as vo,Y0 as Io,Y1 as Eo,b5 as Tt,p$ as To,ic as xo,gI as Do,p_ as wo,le as Po,pY as Oo,pW as Fo,d_ as jo,dZ as Ro}from"./zeni-epic-state-CIizsNeB.js";import{z as V,av as oe,p as j,k as T,G as Q,bb as Bo,as as Xe,a8 as Ye,bc as wa,S as N,bd as Mo,be as Pa,c as Uo,bf as Lo,bg as Vo,a as Oa,a1 as Fa,f as ja,ar as Xo,bh as Yo,ao as Go,N as we,bi as Ra,x as ce,bj as Ba,bk as Ma,au as Ua,bl as No,ai as Ge,U as Ne,d as X,bm as $o,q as zo,j as Ko,a4 as qo,aq as Qo,bn as Ho,bo as Wo,bp as Zo,bq as Ie}from"./index-C2L5Bzwa.js";import{n as xt}from"./mui-KP5Ep0NX.js";import{a as b}from"./sentry-C_uJQK1a.js";import{w as La}from"./withTransactionSidePanel-mkP2Wc9X.js";import{c as Va,t as Pe,f as he,b as Dt,a as wt,v as Jo}from"./routePaths-BrIEdo8u.js";import{u as se}from"./useAskAiCfoHostNavButtonProps-4TGjNsPg.js";import Be from"./NotFoundScreen-CS6UgwGr.js";import{u as Pt}from"./useInitialThreadRequest-BNsRpSRE.js";import{t as Xa}from"./analyticsHelper-k_Sp-PwA.js";import{C as es}from"./CompanyPassportScreen-CbwVCSdf.js";import{u as ts}from"./useAiCfoDashboardSuggestedQuestionsChips-CZodBcrZ.js";import{F as as}from"./FeaturePreviewScreen-R_rh5xYj.js";import"./recharts-DRl2ZsSW.js";import"./analytics-5LJ4BXQX.js";import"./plaid-BrgJMdej.js";import"./dnd-D6wtGmk9.js";import"./stripe-cKAAJElX.js";import"./lottie-lQbJqTc2.js";import"./lexical-BLu7UAko.js";import"./pdf-DflcYtDk.js";import"./utils-BzQpFQvw.js";import"./TransactionDetailScreen-C32uKUIF.js";import"./decodeURIComponentSafe-B7oIXSPO.js";import"./expenseAutomationHelper-CqPrLTRM.js";import"./stripSplatSuffix-CSXpdRK5.js";import"./MobileAppDrawer-DEm85bH8.js";import"./InboxNotificationsProvider-CMirleoY.js";import"./useTaskManagerAccess-Bhr2JI_X.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]="47387ef9-e809-459a-8518-82fa4cb9b56b",e._sentryDebugIdIdentifier="sentry-dbid-47387ef9-e809-459a-8518-82fa4cb9b56b")}catch{}})();const ns=La((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=q(),s=V.getSignedInUser(),i=_((E=>E.tenantState.currentTenantId)),l=_((E=>L(E))),{tenantEmailDomain:m}=q(),p=Z(),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=z(),g=J(),k=_((E=>An(E,u,o))),I=b.useCallback((()=>{o!=null&&k.fetchState!=="In-Progress"&&k.fetchState!=="Completed"&&C(vn(o,u))}),[u]),A=b.useCallback((()=>{g("../../",{relative:"path"})}),[]),S=b.useCallback(((E,B)=>{C(Xt({sortKey:E,sortOrder:B}))}),[]),x=b.useCallback((E=>{C(Xt({downloadState:E}))}),[]),P=b.useCallback((E=>{if(e)e(E.transactionId,E.transactionType);else if(m!=null){const B=Va({id:E.transactionId,type:E.transactionType},m);g(B);const y=j(p.state?.pathnameStackToGoBack,p.pathname);g(B,{state:{pathnameStackToGoBack:y}})}}),[m,e]),D=b.useCallback((()=>{k.vendor!=null&&T.trackApAgingDetail("AP Aging",u.format(Q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),k.vendor.id,k.vendor.name)}),[k.vendor,u]);return b.useEffect((()=>{I()}),[]),b.useEffect((()=>{k.fetchState==="Completed"&&D()}),[D,k.fetchState]),d.jsx(Bo,{apAgingDetail:k,downloadParams:c,reportDate:u,analytics:T,onTransactionClick:P,onReload:I,onBackClick:A,onColumnSortConfigChanged:S,updateDownloadStateHandler:x,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),os=()=>{const e=z(),a=J(),t=_((S=>In(S))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=se({mobileExploreReferrer:"AP Aging"});Xe({isDataReady:t.fetchState==="Completed"});const r=V.getSignedInUser(),s=_((S=>S.tenantState.currentTenantId)),i=_((S=>L(S))),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(gt(h))}),[]);b.useEffect((()=>{f()}),[]);const c=b.useCallback((()=>{a("../",{relative:"path"})}),[]),u=b.useCallback((S=>{e(Qe({searchString:S}))}),[]),C=b.useCallback(((S,x)=>{e(Qe({sortKey:x,sortOrder:S}))}),[]),g=b.useCallback((S=>{a(`./${S}/${h.format(Q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[h]),k=b.useCallback((S=>{e(Qe({downloadState:S}))}),[]),I=b.useCallback(((S,x)=>{}),[]),A=b.useCallback(((S,x)=>{e(Qe({selectedDate:S,agingDateSelectionType:x})),e(gt(S))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ye,{analytics:T,onLoad:S=>S.trackPageLoaded(N.Event.agingReport,"AP Aging")}):null,d.jsx(wa,{uiState:t.apAgingUIState,report:t,downloadParams:p,analytics:T,onReloadReport:f,onBackClick:c,onSearchTextChange:u,onSortOrderChange:C,onEntityNameClick:g,updateDownloadStateHandler:k,onSelectedDateChanged:A,onNodeCollapseToggled:I,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},ss=La((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=q(),s=V.getSignedInUser(),i=_((D=>L(D))),{tenantEmailDomain:l}=q(),m=Z(),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=z(),C=J(),g=_((D=>En(D,c,o))),k=b.useCallback((()=>{o!=null&&g.fetchState!=="In-Progress"&&g.fetchState!=="Completed"&&u(Tn(o,c))}),[c]),I=b.useCallback((()=>{C("../../",{relative:"path"})}),[]),A=b.useCallback(((D,E)=>{u(Yt({sortKey:D,sortOrder:E}))}),[]),S=b.useCallback((D=>{u(Yt({downloadState:D}))}),[]),x=b.useCallback((D=>{if(e)e(D.transactionId,D.transactionType);else if(l!=null){const E=Va({id:D.transactionId,type:D.transactionType},l);C(E);const B=j(m.state?.pathnameStackToGoBack,m.pathname);C(E,{state:{pathnameStackToGoBack:B}})}}),[l,e]),P=b.useCallback((()=>{g.customer!=null&&T.trackArAgingDetail("AR Aging",c.format(Q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),g.customer.id,g.customer.name)}),[g.customer,c]);return b.useEffect((()=>{k()}),[]),b.useEffect((()=>{g.fetchState==="Completed"&&P()}),[g.fetchState,P]),d.jsx(Mo,{arAgingDetail:g,downloadParams:f,reportDate:c,analytics:T,onTransactionClick:x,onReload:k,onBackClick:I,onColumnSortConfigChanged:A,updateDownloadStateHandler:S,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),rs=()=>{const e=z(),a=J(),t=_((A=>xn(A))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=se({mobileExploreReferrer:"AR Aging"});Xe({isDataReady:t.fetchState==="Completed"});const r=V.getSignedInUser(),s=_((A=>L(A))),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(bt(p))}),[]);b.useEffect((()=>{h()}),[]);const f=b.useCallback((()=>{a("../",{relative:"path"})}),[]),c=b.useCallback((A=>{e(He({searchString:A}))}),[]),u=b.useCallback(((A,S)=>{e(He({sortKey:S,sortOrder:A}))}),[]),C=b.useCallback((A=>{a(`./${A}/${p.format(Q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[p]),g=b.useCallback((A=>{e(He({downloadState:A}))}),[]),k=b.useCallback(((A,S)=>{e(He({selectedDate:A,agingDateSelectionType:S})),e(bt(A))}),[]),I=b.useCallback(((A,S)=>{e(Dn({nodeId:A,isCollapsed:S}))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ye,{analytics:T,onLoad:A=>A.trackPageLoaded(N.Event.agingReport,"AR Aging")}):null,d.jsx(wa,{uiState:t.arAgingUIState,report:t,downloadParams:m,analytics:T,onReloadReport:h,onBackClick:f,onSearchTextChange:c,onSortOrderChange:u,onEntityNameClick:C,updateDownloadStateHandler:g,onSelectedDateChanged:k,onNodeCollapseToggled:I,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Ya=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function Ga(e,a){const t=Pn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=Pe(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=j(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(On(n,o))}}}const is=ne((function(e){const a=wn(e).accountsInOrder.map(((t,n)=>Ya(t,n)));return{sectionTitle:Q.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,fetchState:e.cashBalanceState.fetchState,analytics:T}}),Ga)(Pa),cs=ne((function(e){const a=Fn(e).accountsInOrder.map(((o,r)=>Ya(o,r))),t=V.getSignedInUser(),n=Je(t);return{sectionTitle:Q.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:T}}),Ga)(Pa);function ls(){const e=J(),a=Z(),{tenantEmailDomain:t}=q(),n=_((o=>L(o).company?.companyInfo.firstMonthOfFY??1));return _((o=>o.cashBalanceState.fetchState))==="Error"?d.jsx(Be,{}):d.jsx(is,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,firstMonthOfFY:n})}function ds(){const e=J(),a=Z(),{tenantEmailDomain:t}=q(),n=_((o=>L(o).company?.companyInfo.firstMonthOfFY??1));return _((o=>o.cardBalanceState.fetchState))==="Error"?d.jsx(Be,{}):d.jsx(cs,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,firstMonthOfFY:n})}const us=xt.div`
2
2
  display: flex;
3
3
  flex: 1 1 auto;
4
4
  min-height: 100%;
@@ -1 +1 @@
1
- import{j as v}from"./liveblocks-CW9yScMF.js";import{a as u}from"./sentry-C_uJQK1a.js";import{u as y,j as p,l as w,g as A,N as L}from"./core-BI5oX4mx.js";import{TJ as N,fF as _,gl as U,TK as k,pS as R,TL as z}from"./zeni-epic-state-CIizsNeB.js";import{u as j,z as f,L as C,t as I,G as O,b as $}from"./index-mRsR5jtB.js";import"./mui-KP5Ep0NX.js";import{t as P}from"./getLocaleForTenant-BbLwvfGn.js";import"./recharts-DRl2ZsSW.js";import"./analytics-5LJ4BXQX.js";import"./plaid-BrgJMdej.js";import"./dnd-D6wtGmk9.js";import"./stripe-cKAAJElX.js";import"./lottie-lQbJqTc2.js";import"./lexical-BLu7UAko.js";import"./pdf-DflcYtDk.js";import"./utils-BzQpFQvw.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]="93b3b57e-ba53-412d-b9e0-47eb1fb35df7",t._sentryDebugIdIdentifier="sentry-dbid-93b3b57e-ba53-412d-b9e0-47eb1fb35df7")}catch{}})();const G=w((function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}}))((function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=A(),m=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let b="";const n=h.map((l=>l.tenantEmailDomain)),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,S=null;const T=E(r.pathname);if(T!=null)c=`../${o.tenantEmailDomain}/${T}`,b="comingFromV2UrlPath",T==="ai-cfo/explore"&&(d=m.get("question")?.replace(/^["']|["']$/g,"")??null,e=m.get("should_submit")==="true");else if(i!=null)if(n.reduce(((l,x)=>l||i.split("/").find((D=>D===x))!=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}`,b="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 F=$(c,m);return v.jsx(L,{to:F,replace:!0,state:{...r.state,origin:"",message:b,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),m=u.useRef(null),b=p((e=>N(e))),n=p((e=>e.tenantState.fetchState)),i=p((e=>e.tenantState.error)),a=p((e=>e.tenantState.activeTenantFetchState.fetchState)),c=p((e=>_(e))),d=f.getSignedInUser();return u.useLayoutEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId??null;m.current!==e&&(m.current=e,h.current=!1,r.current=!1,s(C.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)}),[a,n]),u.useEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&I.shouldFetchActiveTenant(e)&&(h.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(C.TENANT_FETCHING),t(U(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"&&!k(i))&&t(R(e.userId)))}),[n,a,i,d,t]),u.useEffect((()=>{f.isSignedIn()&&n==="Completed"&&b.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(b.tenantsCoreDetailsInOrder),o())}),[b.tenantsCoreDetailsInOrder,n]),u.useEffect((()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(O.updateAppLocaleID(P(c)),o())}),[n,a,c]),v.jsx(G,{})}const Q=["dashboard/cash-balance","dashboard/card-balance","dashboard/operating-expenses","dashboard/revenue","dashboard/burn-rate","dashboard/cash-position","dashboard/top-expenses","dashboard/cash-in-cash-out","dashboard","reports","forecast","uncategorized-expense","uncategorized-income","missing-receipts","bills","cards/activate","cards","reimbursements","wise","checking","aicfo"],q={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of Q)if(t.toLocaleLowerCase().includes(s))return q[s]}export{oe as default};
1
+ import{j as v}from"./liveblocks-CW9yScMF.js";import{a as u}from"./sentry-C_uJQK1a.js";import{u as y,j as p,l as w,g as A,N as L}from"./core-BI5oX4mx.js";import{TJ as N,fF as _,gl as U,TK as k,pS as R,TL as z}from"./zeni-epic-state-CIizsNeB.js";import{u as j,z as f,L as C,t as I,G as O,b as $}from"./index-C2L5Bzwa.js";import"./mui-KP5Ep0NX.js";import{t as P}from"./getLocaleForTenant-Cv6I-eSM.js";import"./recharts-DRl2ZsSW.js";import"./analytics-5LJ4BXQX.js";import"./plaid-BrgJMdej.js";import"./dnd-D6wtGmk9.js";import"./stripe-cKAAJElX.js";import"./lottie-lQbJqTc2.js";import"./lexical-BLu7UAko.js";import"./pdf-DflcYtDk.js";import"./utils-BzQpFQvw.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]="93b3b57e-ba53-412d-b9e0-47eb1fb35df7",t._sentryDebugIdIdentifier="sentry-dbid-93b3b57e-ba53-412d-b9e0-47eb1fb35df7")}catch{}})();const G=w((function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}}))((function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=A(),m=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let b="";const n=h.map((l=>l.tenantEmailDomain)),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,S=null;const T=E(r.pathname);if(T!=null)c=`../${o.tenantEmailDomain}/${T}`,b="comingFromV2UrlPath",T==="ai-cfo/explore"&&(d=m.get("question")?.replace(/^["']|["']$/g,"")??null,e=m.get("should_submit")==="true");else if(i!=null)if(n.reduce(((l,x)=>l||i.split("/").find((D=>D===x))!=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}`,b="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 F=$(c,m);return v.jsx(L,{to:F,replace:!0,state:{...r.state,origin:"",message:b,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),m=u.useRef(null),b=p((e=>N(e))),n=p((e=>e.tenantState.fetchState)),i=p((e=>e.tenantState.error)),a=p((e=>e.tenantState.activeTenantFetchState.fetchState)),c=p((e=>_(e))),d=f.getSignedInUser();return u.useLayoutEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId??null;m.current!==e&&(m.current=e,h.current=!1,r.current=!1,s(C.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)}),[a,n]),u.useEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&I.shouldFetchActiveTenant(e)&&(h.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(C.TENANT_FETCHING),t(U(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"&&!k(i))&&t(R(e.userId)))}),[n,a,i,d,t]),u.useEffect((()=>{f.isSignedIn()&&n==="Completed"&&b.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(b.tenantsCoreDetailsInOrder),o())}),[b.tenantsCoreDetailsInOrder,n]),u.useEffect((()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(O.updateAppLocaleID(P(c)),o())}),[n,a,c]),v.jsx(G,{})}const Q=["dashboard/cash-balance","dashboard/card-balance","dashboard/operating-expenses","dashboard/revenue","dashboard/burn-rate","dashboard/cash-position","dashboard/top-expenses","dashboard/cash-in-cash-out","dashboard","reports","forecast","uncategorized-expense","uncategorized-income","missing-receipts","bills","cards/activate","cards","reimbursements","wise","checking","aicfo"],q={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of Q)if(t.toLocaleLowerCase().includes(s))return q[s]}export{oe as default};
@@ -1,4 +1,4 @@
1
- import{j as l}from"./liveblocks-CW9yScMF.js";import{h as w,g as C,j as h,l as A,i as V}from"./core-BI5oX4mx.js";import{YH as k,YO as _,gG as W,gF as K,gE as L,kP as M,WG as q,uK as J,fF as B,Ye as D,kN as F,YI as S,YR as G,kL as T,l6 as j}from"./zeni-epic-state-CIizsNeB.js";import{bM as Q,a1 as N,N as R,z as O,c as U,a4 as p,d as v,a7 as Y,bN as X,I as H,bO as ee,p as te}from"./index-mRsR5jtB.js";import{n as Z}from"./mui-KP5Ep0NX.js";import"./sentry-C_uJQK1a.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]="a8051536-f0c7-4a2b-a940-d5ca45f4d45e",e._sentryDebugIdIdentifier="sentry-dbid-a8051536-f0c7-4a2b-a940-d5ca45f4d45e")}catch{}})();const ae=A(null,(function(e,t){return{onSaveVendor:a=>{e(M(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(q("common")),a!=null&&e(J(a))},onGetOtp:a=>{e(L(a,"BillPayVendor"))},onResendOtp:a=>{e(K(a,"BillPayVendor"))},onVerifyOtp:(a,n)=>{e(W(a,n,"BillPayVendor"))},onVerifyOtpSuccess:(a,n,o)=>{e(_(a,n,o))}}}))(Q);function z({vendorId:e,billId:t,isExpressPayPage:a}){const n=w(),o=C(),s=h((d=>k(d,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-CW9yScMF.js";import{h as w,g as C,j as h,l as A,i as V}from"./core-BI5oX4mx.js";import{YH as k,YO as _,gG as W,gF as K,gE as L,kP as M,WG as q,uK as J,fF as B,Ye as D,kN as F,YI as S,YR as G,kL as T,l6 as j}from"./zeni-epic-state-CIizsNeB.js";import{bM as Q,a1 as N,N as R,z as O,c as U,a4 as p,d as v,a7 as Y,bN as X,I as H,bO as ee,p as te}from"./index-C2L5Bzwa.js";import{n as Z}from"./mui-KP5Ep0NX.js";import"./sentry-C_uJQK1a.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]="a8051536-f0c7-4a2b-a940-d5ca45f4d45e",e._sentryDebugIdIdentifier="sentry-dbid-a8051536-f0c7-4a2b-a940-d5ca45f4d45e")}catch{}})();const ae=A(null,(function(e,t){return{onSaveVendor:a=>{e(M(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(q("common")),a!=null&&e(J(a))},onGetOtp:a=>{e(L(a,"BillPayVendor"))},onResendOtp:a=>{e(K(a,"BillPayVendor"))},onVerifyOtp:(a,n)=>{e(W(a,n,"BillPayVendor"))},onVerifyOtpSuccess:(a,n,o)=>{e(_(a,n,o))}}}))(Q);function z({vendorId:e,billId:t,isExpressPayPage:a}){const n=w(),o=C(),s=h((d=>k(d,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-CW9yScMF.js";import{a1 as d,ab as l,c as f}from"./index-mRsR5jtB.js";import{D as b}from"./mui-KP5Ep0NX.js";import"./sentry-C_uJQK1a.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]="c0c598f3-c0a4-43a6-914b-a6b171c990b0",e._sentryDebugIdIdentifier="sentry-dbid-c0c598f3-c0a4-43a6-914b-a6b171c990b0")}catch{}})();const p={drawerLeftMargin:new l(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:n,onClose:t}=e,a=d(),s=o?.valuePx(a)??p.drawerLeftMargin.valuePx(a),c=f();return i.jsx(b,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:c.colors.black,opacity:.8,cursor:"pointer"}}},onClose:t,children:n})}export{h as D};
1
+ import{j as i}from"./liveblocks-CW9yScMF.js";import{a1 as d,ab as l,c as f}from"./index-C2L5Bzwa.js";import{D as b}from"./mui-KP5Ep0NX.js";import"./sentry-C_uJQK1a.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]="c0c598f3-c0a4-43a6-914b-a6b171c990b0",e._sentryDebugIdIdentifier="sentry-dbid-c0c598f3-c0a4-43a6-914b-a6b171c990b0")}catch{}})();const p={drawerLeftMargin:new l(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:n,onClose:t}=e,a=d(),s=o?.valuePx(a)??p.drawerLeftMargin.valuePx(a),c=f();return i.jsx(b,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:c.colors.black,opacity:.8,cursor:"pointer"}}},onClose:t,children:n})}export{h as D};
@@ -1 +1 @@
1
- import{j as s}from"./liveblocks-CW9yScMF.js";import{a as d}from"./sentry-C_uJQK1a.js";import{h as B,u as F,g as G,i as A,j as l,N as q,l as $,n as N,o as _}from"./core-BI5oX4mx.js";import{WK as O,fF as H,W0 as M,m$ as R,S1 as b,WP as Y,WF as z,l$ as K,S2 as S,W5 as V,W6 as J,WH as L,WG as Q}from"./zeni-epic-state-CIizsNeB.js";import{b8 as U,k as X,a4 as Z,p as tt}from"./index-mRsR5jtB.js";import"./mui-KP5Ep0NX.js";import{d as k}from"./decodeURIComponentSafe-B7oIXSPO.js";import{w as et}from"./withTransactionSidePanel-BaeEJKqt.js";import{f as at,c as nt}from"./routePaths-Ch3GR24x.js";import"./recharts-DRl2ZsSW.js";import"./analytics-5LJ4BXQX.js";import"./plaid-BrgJMdej.js";import"./dnd-D6wtGmk9.js";import"./stripe-cKAAJElX.js";import"./lottie-lQbJqTc2.js";import"./lexical-BLu7UAko.js";import"./pdf-DflcYtDk.js";import"./utils-BzQpFQvw.js";import"./useAskAiCfoHostNavButtonProps-qLwQUrxF.js";import"./TransactionDetailScreen-uFx1hV5M.js";import"./useInitialThreadRequest-BbYhZx86.js";import"./expenseAutomationHelper-CqPrLTRM.js";import"./stripSplatSuffix-CSXpdRK5.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]="69950759-caf3-4b5d-ab45-0ac231985032",a._sentryDebugIdIdentifier="sentry-dbid-69950759-caf3-4b5d-ab45-0ac231985032")}catch{}})();const ot=$((function(a,t){const e=t.entity,o=Y(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:z(a,"common")},trendWithTransactionsReport:o,analytics:X,isAccountingClassesEnabled:K(a)}}),(function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,c=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:c}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(L({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(Q("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(V()),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??I();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(b(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(U),it=et((function({entityType:a,...t}){const e=B(),o=F(),c=G(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:W,entityNameEncoded:w}=A(),r=k(W??""),p=k(w??""),u=rt(r,p),x=[r,p].filter((n=>n!=null)),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=l((n=>O(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),j=l((n=>H(n).company?.companyInfo.firstMonthOfFY??1)),f=l((n=>M(n.trendWithTransactionsState,i,"EntityDetail")));d.useEffect((()=>{m===!1&&u===!0&&(T(!0),o(R(i)))}),[m,u,i]);const P=l((n=>n.trendState.fetchState)),E=f?.selectedPeriod?.timePeriod??g,v=(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&&P==="Completed"&&(D(!0),E!=null&&o(b(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:E})))}),[m,h,P]),u?s.jsx(ot,{firstMonthOfFY:j,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:v,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(q,{to:I(x.length)})})),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,I=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function jt({entityType:a}){return s.jsx(N,{children:s.jsx(_,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{jt as EntityDetailRoutes,jt as default};
1
+ import{j as s}from"./liveblocks-CW9yScMF.js";import{a as d}from"./sentry-C_uJQK1a.js";import{h as B,u as F,g as G,i as A,j as l,N as q,l as $,n as N,o as _}from"./core-BI5oX4mx.js";import{WK as O,fF as H,W0 as M,m$ as R,S1 as b,WP as Y,WF as z,l$ as K,S2 as S,W5 as V,W6 as J,WH as L,WG as Q}from"./zeni-epic-state-CIizsNeB.js";import{b8 as U,k as X,a4 as Z,p as tt}from"./index-C2L5Bzwa.js";import"./mui-KP5Ep0NX.js";import{d as k}from"./decodeURIComponentSafe-B7oIXSPO.js";import{w as et}from"./withTransactionSidePanel-mkP2Wc9X.js";import{f as at,c as nt}from"./routePaths-BrIEdo8u.js";import"./recharts-DRl2ZsSW.js";import"./analytics-5LJ4BXQX.js";import"./plaid-BrgJMdej.js";import"./dnd-D6wtGmk9.js";import"./stripe-cKAAJElX.js";import"./lottie-lQbJqTc2.js";import"./lexical-BLu7UAko.js";import"./pdf-DflcYtDk.js";import"./utils-BzQpFQvw.js";import"./useAskAiCfoHostNavButtonProps-4TGjNsPg.js";import"./TransactionDetailScreen-C32uKUIF.js";import"./useInitialThreadRequest-BNsRpSRE.js";import"./expenseAutomationHelper-CqPrLTRM.js";import"./stripSplatSuffix-CSXpdRK5.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]="69950759-caf3-4b5d-ab45-0ac231985032",a._sentryDebugIdIdentifier="sentry-dbid-69950759-caf3-4b5d-ab45-0ac231985032")}catch{}})();const ot=$((function(a,t){const e=t.entity,o=Y(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:z(a,"common")},trendWithTransactionsReport:o,analytics:X,isAccountingClassesEnabled:K(a)}}),(function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,c=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:c}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(L({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(Q("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(V()),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??I();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(b(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(U),it=et((function({entityType:a,...t}){const e=B(),o=F(),c=G(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:W,entityNameEncoded:w}=A(),r=k(W??""),p=k(w??""),u=rt(r,p),x=[r,p].filter((n=>n!=null)),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=l((n=>O(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),j=l((n=>H(n).company?.companyInfo.firstMonthOfFY??1)),f=l((n=>M(n.trendWithTransactionsState,i,"EntityDetail")));d.useEffect((()=>{m===!1&&u===!0&&(T(!0),o(R(i)))}),[m,u,i]);const P=l((n=>n.trendState.fetchState)),E=f?.selectedPeriod?.timePeriod??g,v=(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&&P==="Completed"&&(D(!0),E!=null&&o(b(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:E})))}),[m,h,P]),u?s.jsx(ot,{firstMonthOfFY:j,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:v,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(q,{to:I(x.length)})})),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,I=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function jt({entityType:a}){return s.jsx(N,{children:s.jsx(_,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{jt as EntityDetailRoutes,jt as default};
@@ -1,4 +1,4 @@
1
- import{j as f}from"./liveblocks-CW9yScMF.js";import{u as he,h as nt,g as be,j as F,i as Ue,t as qn,l as Jn,n as Wn,o as He,N as Yn}from"./core-BI5oX4mx.js";import{fF as ke,a0S as Hn,q0 as _e,U0 as Kn,zX as Zn,a0T as Qn,a0U as Xn,a0V as es,a0W as gt,a0X as Ze,gh as bt,a0Y as oa,eW as ts,g0 as as,a0Z as ca,a0_ as Qe,qT as ns,uN as ss,gS as os,gQ as cs,a0$ as is,r4 as ls,rd as rs,qb as ds,qp as xa,gP as re,gR as us,a10 as ms,qL as wa,re as ps,qm as hs,qh as Ss,uT as gs,gO as Me,a11 as tt,C5 as Ra,Mm as Da,a12 as Fa,Fo as _a,a13 as Cs,eZ as fs,e$ as Is,sP as Tt,WL as ia,WN as ks,m2 as bs,WO as Ts,m9 as Ps,dl as ys,Do as Pt,a14 as vs,a15 as Es,fm as yt,sD as la,WF as As,a16 as xs,a17 as ws,mb as Rs,a18 as Ds,R2 as Fs,ma as _s,l$ as Ms,qE as Ma,rj as at,tp as Oa,tL as Os,TS as Ua,ri as ra,rl as Ba,rn as Us,bE as Bs,ny as Vs,nv as js,rm as Xe,rk as pe,a19 as zs,rE as da,a1a as Ls,a1b as $s,sH as Gs,sI as Ns,WB as qs,VH as Js,a0k as Ws,a1c as Ys,WH as ua,WG as Ke,a1d as ma,mq as Hs,a1e as Ks,a1f as Zs,a1g as Qs,a1h as Xs,qz as eo,a1i as to,a1j as ao,a1k as no,ru as so,md as oo,m4 as co,a1l as io,mc as pa,WY as lo,a1m as ro,a1n as uo,uo as mo,t$ as po,t_ as Ct,a1o as ho,a1p as So,a1q as go,a1r as Co,nJ as fo,br as Io,nE as ha,nq as ko,a1s as bo,g$ as To,nB as Po,sR as yo,sT as vo,sA as Eo,VK as Ao,VL as xo,ES as wo,ER as Ro,F6 as Do,a1t as Sa,sG as Fo,a1u as _o,rU as Mo,r_ as Oo,s9 as Uo,rX as Bo,a1v as Vo,s8 as jo,sM as zo,a1w as Lo,sZ as $o,su as Go,t2 as No,sz as qo,rF as Jo,a1x as Wo,qX as Yo,qv as Ho,qC as ga,rp as Ko,a1y as Zo,a1z as Qo,a1A as Xo,a1B as ec,a1C as tc,a1D as ac,t6 as nc,a1E as sc,a1F as oc,a1G as Ca,uz as cc,tS as ic,tH as fa,tF as lc,a1H as rc,tu as dc,t9 as uc,tI as mc,a1I as pc,a1J as hc,tf as Sc,a1K as gc,ta as Cc,te as fc,tc as Ic,tO as kc}from"./zeni-epic-state-CIizsNeB.js";import Va from"./NotFoundScreen-BScz3VcE.js";import{a as s,R as ja}from"./sentry-C_uJQK1a.js";import{n as Te,S as bc}from"./mui-KP5Ep0NX.js";import{N as Be,d as H,k as Q,p as te,aq as za,as as La,dQ as Tc,dR as Pc,z as st,dS as yc,dT as vc,dU as Ec,ae as Oe,dV as Ac,dW as Ia,ba as ka,dX as xc,a7 as $a,dY as wc,j as et,a as Rc,dZ as Dc,d_ as Fc,E as _c,U as Mc,d$ as Oc,e0 as Uc,e1 as Bc,b4 as Vc,br as jc,ab as zc,b5 as Lc,b6 as $c,G as Gc,w as Nc,e2 as qc,av as ba,e3 as Jc}from"./index-mRsR5jtB.js";import{u as Ga}from"./useAskAiCfoHostNavButtonProps-qLwQUrxF.js";import{g as Ta,b as Wc,c as Yc,h as Hc,a as Kc,i as Zc,r as Qc,C as Xc}from"./TransactionDetailScreen-uFx1hV5M.js";import{u as ei}from"./useActualMatchingMatchDetail-D-xkseKQ.js";import{d as ti}from"./decodeURIComponentSafe-B7oIXSPO.js";import{m as Na,a as qa}from"./expenseAutomationHelper-CqPrLTRM.js";import{u as Ja,a as Wa,w as ai}from"./withTransactionSidePanel-BaeEJKqt.js";import{b as ni,S as si,a as oi,J as ci}from"./ScheduleDetailsPrepaidExpensesScreen-VG_9abqY.js";import{s as Pa,i as Ya,h as ii,v as li,c as ri}from"./routePaths-Ch3GR24x.js";import{a as ft}from"./accountMappingHelper-B5wpHG39.js";import{D as di}from"./DrawerScreen-C0RPM-YO.js";import"./recharts-DRl2ZsSW.js";import"./analytics-5LJ4BXQX.js";import"./plaid-BrgJMdej.js";import"./dnd-D6wtGmk9.js";import"./stripe-cKAAJElX.js";import"./lottie-lQbJqTc2.js";import"./lexical-BLu7UAko.js";import"./pdf-DflcYtDk.js";import"./utils-BzQpFQvw.js";import"./useInitialThreadRequest-BbYhZx86.js";import"./stripSplatSuffix-CSXpdRK5.js";import"./pathToGoBack-Ddmf68xx.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]="93a7b086-4301-4476-b15a-9a2594932ed3",t._sentryDebugIdIdentifier="sentry-dbid-93a7b086-4301-4476-b15a-9a2594932ed3")}catch{}})();const ui=()=>{const t=he(),n=nt(),S=be(),g=F((h=>ke(h))),{useFeatureGate:d}=Be(),{isFeatureEnabled:i}=d(H.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=d(H.aiAuditScorePercentage),A=F((h=>h.expenseAutomationViewState.selectedPeriodByTenantId)),l=F((h=>Hn(h,g.tenantId))),{isAiCfoAccessEnabled:b,onAskAiCfoClick:R}=Ga({mobileExploreReferrer:"Month-End Close Overview"}),k=s.useCallback(((h,T,z=!1)=>{t(_e({tenantId:T,period:{month:h.month,year:h.year},refreshViewInBackground:z}))}),[]),C=s.useCallback((h=>{const T=S.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&Q.trackMonthCloseAuditPage(h.month,h.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,T??null),t(Kn(g.tenantId,h))}),[g.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),I=A[g.tenantId],m=s.useCallback((()=>{const h=S.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&Q.trackMonthCloseAuditPage(I.month,I.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,h??null),k(I,g.tenantId,!0)}),[k,I,g.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),_=te(S.state?.pathnameStackToGoBack,S.pathname),x=s.useCallback((()=>{if(l.monthEndCloseChecks!=null&&I!=null){const h=l.monthEndCloseChecks.monthEndCloseCheckList.find((T=>T.progress<100));if(h!=null)return void n(`./${h.id}/${I.month}-${I.year}`,{state:{pathnameStackToGoBack:_,message:"comingFromOverview"}});n(`./month_end_insights/${I.month}-${I.year}`,{state:{pathnameStackToGoBack:_,message:"comingFromOverview"}})}}),[l.monthEndCloseChecks,I]),{areTenantIdsInSync:p}=za();return La({isDataReady:l.fetchState==="Completed"}),s.useEffect((()=>{I!=null&&l.fetchState!=="In-Progress"&&l.fetchState!=="Completed"&&p&&k(I,g.tenantId)}),[k,I,l.fetchState,g.tenantId,p]),s.useEffect((()=>{I!=null&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&p&&t(Zn(I))}),[I,l.monthClosePerformanceTrendFetchStatus.fetchState,p]),s.useEffect((()=>{const h=setInterval((()=>{l.fetchState!=="In-Progress"&&l.fetchState==="Completed"&&m()}),3e5);return()=>clearInterval(h)}),[l.fetchState]),s.useEffect((()=>{if(l.fetchState==="Completed"&&l.monthEndCloseChecks?.auditSummary!=null){const h=S.state?.referrer;Q.trackMonthCloseAuditPage(l.selectedPeriod.month,l.selectedPeriod.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,h??null)}}),[l.fetchState,l.selectedPeriod,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),f.jsx(mi,{children:f.jsx(Tc,{monthEndCloseChecksView:l,isRealtimeInsightsFeatureEnabled:i,onMonthEndCheckClick:h=>{n(`./${h}/${I.month}-${I.year}`,{state:{pathnameStackToGoBack:_,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:C,handleReviewButtonClick:x,onBackClick:()=>{n("../../dashboard")},onReload:m,isAiCfoAccessEnabled:b,onAskAiCfoClick:R,aiAuditScorePercentageEnabled:r})})},mi=Te.div`
1
+ import{j as f}from"./liveblocks-CW9yScMF.js";import{u as he,h as nt,g as be,j as F,i as Ue,t as qn,l as Jn,n as Wn,o as He,N as Yn}from"./core-BI5oX4mx.js";import{fF as ke,a0S as Hn,q0 as _e,U0 as Kn,zX as Zn,a0T as Qn,a0U as Xn,a0V as es,a0W as gt,a0X as Ze,gh as bt,a0Y as oa,eW as ts,g0 as as,a0Z as ca,a0_ as Qe,qT as ns,uN as ss,gS as os,gQ as cs,a0$ as is,r4 as ls,rd as rs,qb as ds,qp as xa,gP as re,gR as us,a10 as ms,qL as wa,re as ps,qm as hs,qh as Ss,uT as gs,gO as Me,a11 as tt,C5 as Ra,Mm as Da,a12 as Fa,Fo as _a,a13 as Cs,eZ as fs,e$ as Is,sP as Tt,WL as ia,WN as ks,m2 as bs,WO as Ts,m9 as Ps,dl as ys,Do as Pt,a14 as vs,a15 as Es,fm as yt,sD as la,WF as As,a16 as xs,a17 as ws,mb as Rs,a18 as Ds,R2 as Fs,ma as _s,l$ as Ms,qE as Ma,rj as at,tp as Oa,tL as Os,TS as Ua,ri as ra,rl as Ba,rn as Us,bE as Bs,ny as Vs,nv as js,rm as Xe,rk as pe,a19 as zs,rE as da,a1a as Ls,a1b as $s,sH as Gs,sI as Ns,WB as qs,VH as Js,a0k as Ws,a1c as Ys,WH as ua,WG as Ke,a1d as ma,mq as Hs,a1e as Ks,a1f as Zs,a1g as Qs,a1h as Xs,qz as eo,a1i as to,a1j as ao,a1k as no,ru as so,md as oo,m4 as co,a1l as io,mc as pa,WY as lo,a1m as ro,a1n as uo,uo as mo,t$ as po,t_ as Ct,a1o as ho,a1p as So,a1q as go,a1r as Co,nJ as fo,br as Io,nE as ha,nq as ko,a1s as bo,g$ as To,nB as Po,sR as yo,sT as vo,sA as Eo,VK as Ao,VL as xo,ES as wo,ER as Ro,F6 as Do,a1t as Sa,sG as Fo,a1u as _o,rU as Mo,r_ as Oo,s9 as Uo,rX as Bo,a1v as Vo,s8 as jo,sM as zo,a1w as Lo,sZ as $o,su as Go,t2 as No,sz as qo,rF as Jo,a1x as Wo,qX as Yo,qv as Ho,qC as ga,rp as Ko,a1y as Zo,a1z as Qo,a1A as Xo,a1B as ec,a1C as tc,a1D as ac,t6 as nc,a1E as sc,a1F as oc,a1G as Ca,uz as cc,tS as ic,tH as fa,tF as lc,a1H as rc,tu as dc,t9 as uc,tI as mc,a1I as pc,a1J as hc,tf as Sc,a1K as gc,ta as Cc,te as fc,tc as Ic,tO as kc}from"./zeni-epic-state-CIizsNeB.js";import Va from"./NotFoundScreen-CS6UgwGr.js";import{a as s,R as ja}from"./sentry-C_uJQK1a.js";import{n as Te,S as bc}from"./mui-KP5Ep0NX.js";import{N as Be,d as H,k as Q,p as te,aq as za,as as La,dQ as Tc,dR as Pc,z as st,dS as yc,dT as vc,dU as Ec,ae as Oe,dV as Ac,dW as Ia,ba as ka,dX as xc,a7 as $a,dY as wc,j as et,a as Rc,dZ as Dc,d_ as Fc,E as _c,U as Mc,d$ as Oc,e0 as Uc,e1 as Bc,b4 as Vc,br as jc,ab as zc,b5 as Lc,b6 as $c,G as Gc,w as Nc,e2 as qc,av as ba,e3 as Jc}from"./index-C2L5Bzwa.js";import{u as Ga}from"./useAskAiCfoHostNavButtonProps-4TGjNsPg.js";import{g as Ta,b as Wc,c as Yc,h as Hc,a as Kc,i as Zc,r as Qc,C as Xc}from"./TransactionDetailScreen-C32uKUIF.js";import{u as ei}from"./useActualMatchingMatchDetail-C-OzIN8B.js";import{d as ti}from"./decodeURIComponentSafe-B7oIXSPO.js";import{m as Na,a as qa}from"./expenseAutomationHelper-CqPrLTRM.js";import{u as Ja,a as Wa,w as ai}from"./withTransactionSidePanel-mkP2Wc9X.js";import{b as ni,S as si,a as oi,J as ci}from"./ScheduleDetailsPrepaidExpensesScreen-CJ28c5Wc.js";import{s as Pa,i as Ya,h as ii,v as li,c as ri}from"./routePaths-BrIEdo8u.js";import{a as ft}from"./accountMappingHelper-B5wpHG39.js";import{D as di}from"./DrawerScreen-KSeYe6Xi.js";import"./recharts-DRl2ZsSW.js";import"./analytics-5LJ4BXQX.js";import"./plaid-BrgJMdej.js";import"./dnd-D6wtGmk9.js";import"./stripe-cKAAJElX.js";import"./lottie-lQbJqTc2.js";import"./lexical-BLu7UAko.js";import"./pdf-DflcYtDk.js";import"./utils-BzQpFQvw.js";import"./useInitialThreadRequest-BNsRpSRE.js";import"./stripSplatSuffix-CSXpdRK5.js";import"./pathToGoBack-Ddmf68xx.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]="93a7b086-4301-4476-b15a-9a2594932ed3",t._sentryDebugIdIdentifier="sentry-dbid-93a7b086-4301-4476-b15a-9a2594932ed3")}catch{}})();const ui=()=>{const t=he(),n=nt(),S=be(),g=F((h=>ke(h))),{useFeatureGate:d}=Be(),{isFeatureEnabled:i}=d(H.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=d(H.aiAuditScorePercentage),A=F((h=>h.expenseAutomationViewState.selectedPeriodByTenantId)),l=F((h=>Hn(h,g.tenantId))),{isAiCfoAccessEnabled:b,onAskAiCfoClick:R}=Ga({mobileExploreReferrer:"Month-End Close Overview"}),k=s.useCallback(((h,T,z=!1)=>{t(_e({tenantId:T,period:{month:h.month,year:h.year},refreshViewInBackground:z}))}),[]),C=s.useCallback((h=>{const T=S.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&Q.trackMonthCloseAuditPage(h.month,h.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,T??null),t(Kn(g.tenantId,h))}),[g.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),I=A[g.tenantId],m=s.useCallback((()=>{const h=S.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&Q.trackMonthCloseAuditPage(I.month,I.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,h??null),k(I,g.tenantId,!0)}),[k,I,g.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),_=te(S.state?.pathnameStackToGoBack,S.pathname),x=s.useCallback((()=>{if(l.monthEndCloseChecks!=null&&I!=null){const h=l.monthEndCloseChecks.monthEndCloseCheckList.find((T=>T.progress<100));if(h!=null)return void n(`./${h.id}/${I.month}-${I.year}`,{state:{pathnameStackToGoBack:_,message:"comingFromOverview"}});n(`./month_end_insights/${I.month}-${I.year}`,{state:{pathnameStackToGoBack:_,message:"comingFromOverview"}})}}),[l.monthEndCloseChecks,I]),{areTenantIdsInSync:p}=za();return La({isDataReady:l.fetchState==="Completed"}),s.useEffect((()=>{I!=null&&l.fetchState!=="In-Progress"&&l.fetchState!=="Completed"&&p&&k(I,g.tenantId)}),[k,I,l.fetchState,g.tenantId,p]),s.useEffect((()=>{I!=null&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&p&&t(Zn(I))}),[I,l.monthClosePerformanceTrendFetchStatus.fetchState,p]),s.useEffect((()=>{const h=setInterval((()=>{l.fetchState!=="In-Progress"&&l.fetchState==="Completed"&&m()}),3e5);return()=>clearInterval(h)}),[l.fetchState]),s.useEffect((()=>{if(l.fetchState==="Completed"&&l.monthEndCloseChecks?.auditSummary!=null){const h=S.state?.referrer;Q.trackMonthCloseAuditPage(l.selectedPeriod.month,l.selectedPeriod.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,h??null)}}),[l.fetchState,l.selectedPeriod,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),f.jsx(mi,{children:f.jsx(Tc,{monthEndCloseChecksView:l,isRealtimeInsightsFeatureEnabled:i,onMonthEndCheckClick:h=>{n(`./${h}/${I.month}-${I.year}`,{state:{pathnameStackToGoBack:_,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:C,handleReviewButtonClick:x,onBackClick:()=>{n("../../dashboard")},onReload:m,isAiCfoAccessEnabled:b,onAskAiCfoClick:R,aiAuditScorePercentageEnabled:r})})},mi=Te.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{j as s}from"./liveblocks-CW9yScMF.js";import{a as r}from"./sentry-C_uJQK1a.js";import{aw as f,ax as c,r as l,a4 as p}from"./index-mRsR5jtB.js";import"./mui-KP5Ep0NX.js";import m from"./NotFoundScreen-BScz3VcE.js";import{h as b,g as u}from"./core-BI5oX4mx.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]="aafc30b9-341c-40aa-86a1-bb77a9af613d",a._sentryDebugIdIdentifier="sentry-dbid-aafc30b9-341c-40aa-86a1-bb77a9af613d")}catch{}})();const _=()=>{const a=b(),e=u(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),i=r.useCallback((()=>{(()=>{const n=p(e.state?.pathnameStackToGoBack),d=n.poppedPathname??k();a(d,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=f(e.pathname);return o!=null?s.jsx(c,{menuItem:l(o),onDemoClick:t,onGoBack:i}):s.jsx(m,{})},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-CW9yScMF.js";import{a as r}from"./sentry-C_uJQK1a.js";import{aw as f,ax as c,r as l,a4 as p}from"./index-C2L5Bzwa.js";import"./mui-KP5Ep0NX.js";import m from"./NotFoundScreen-CS6UgwGr.js";import{h as b,g as u}from"./core-BI5oX4mx.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]="aafc30b9-341c-40aa-86a1-bb77a9af613d",a._sentryDebugIdIdentifier="sentry-dbid-aafc30b9-341c-40aa-86a1-bb77a9af613d")}catch{}})();const _=()=>{const a=b(),e=u(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),i=r.useCallback((()=>{(()=>{const n=p(e.state?.pathnameStackToGoBack),d=n.poppedPathname??k();a(d,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=f(e.pathname);return o!=null?s.jsx(c,{menuItem:l(o),onDemoClick:t,onGoBack:i}):s.jsx(m,{})},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 o}from"./sentry-C_uJQK1a.js";import{u as l,h as f,g as m}from"./core-BI5oX4mx.js";import{hY as p,Un as g,Uo as _}from"./zeni-epic-state-CIizsNeB.js";import{u as b,L as h,z as y}from"./index-mRsR5jtB.js";import"./liveblocks-CW9yScMF.js";import"./recharts-DRl2ZsSW.js";import"./mui-KP5Ep0NX.js";import"./analytics-5LJ4BXQX.js";import"./plaid-BrgJMdej.js";import"./dnd-D6wtGmk9.js";import"./stripe-cKAAJElX.js";import"./lottie-lQbJqTc2.js";import"./lexical-BLu7UAko.js";import"./pdf-DflcYtDk.js";import"./utils-BzQpFQvw.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]="82557390-56bd-46f8-81c9-de5dca58baf7",e._sentryDebugIdIdentifier="sentry-dbid-82557390-56bd-46f8-81c9-de5dca58baf7")}catch{}})();function j(){const e=l(),n=f(),r=m(),{setLoading:i,clearAllLoading:u}=b(),s=o.useRef(!1);return o.useLayoutEffect((()=>{i(h.CONNECTION_AUTH)}),[i]),o.useEffect((()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(r.search).get("code"),d=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&d!=null){const t=JSON.parse(d);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}u();const c=y.getActiveTenantForUser();n(c?.tenantEmailDomain!=null?`/${c.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{j as default};
1
+ import{a as o}from"./sentry-C_uJQK1a.js";import{u as l,h as f,g as m}from"./core-BI5oX4mx.js";import{hY as p,Un as g,Uo as _}from"./zeni-epic-state-CIizsNeB.js";import{u as b,L as h,z as y}from"./index-C2L5Bzwa.js";import"./liveblocks-CW9yScMF.js";import"./recharts-DRl2ZsSW.js";import"./mui-KP5Ep0NX.js";import"./analytics-5LJ4BXQX.js";import"./plaid-BrgJMdej.js";import"./dnd-D6wtGmk9.js";import"./stripe-cKAAJElX.js";import"./lottie-lQbJqTc2.js";import"./lexical-BLu7UAko.js";import"./pdf-DflcYtDk.js";import"./utils-BzQpFQvw.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]="82557390-56bd-46f8-81c9-de5dca58baf7",e._sentryDebugIdIdentifier="sentry-dbid-82557390-56bd-46f8-81c9-de5dca58baf7")}catch{}})();function j(){const e=l(),n=f(),r=m(),{setLoading:i,clearAllLoading:u}=b(),s=o.useRef(!1);return o.useLayoutEffect((()=>{i(h.CONNECTION_AUTH)}),[i]),o.useEffect((()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(r.search).get("code"),d=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&d!=null){const t=JSON.parse(d);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}u();const c=y.getActiveTenantForUser();n(c?.tenantEmailDomain!=null?`/${c.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{j as default};