@zeniai/web-app-ui 5.3.25-qa → 5.3.26-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 (113) hide show
  1. package/dist/assets/{AccountMappingScreen-C0aQk3eU.js → AccountMappingScreen-vvnlkgXd.js} +1 -1
  2. package/dist/assets/AddressRoutes-CqGLkDqt.js +1 -0
  3. package/dist/assets/{AddressScreen-BD6hfTYm.js → AddressScreen-anqh6to9.js} +1 -1
  4. package/dist/assets/{AiCfoScreen-BQBOwbGt.js → AiCfoScreen-ZhNzgLev.js} +1 -1
  5. package/dist/assets/{AppDrawer-DhN1iuHe.js → AppDrawer-DMcZyfYw.js} +1 -1
  6. package/dist/assets/{BillPayApprovalRoutes-D-5hMi6f.js → BillPayApprovalRoutes-BWcKljpL.js} +1 -1
  7. package/dist/assets/{BillPayRoutes-Bl_cSE9O.js → BillPayRoutes-DxfZSGDE.js} +1 -1
  8. package/dist/assets/{BusinessVerificationPageScreen-C37udtB6.js → BusinessVerificationPageScreen-BnngOdPs.js} +1 -1
  9. package/dist/assets/{CardsAiCfoScreen-DmUDeMY2.js → CardsAiCfoScreen-C9jErKn4.js} +1 -1
  10. package/dist/assets/{ChargeCardRoutes-BbRPoXSC.js → ChargeCardRoutes-CpllRZ3I.js} +1 -1
  11. package/dist/assets/{CompanyPassportScreen-C02FQ11m.js → CompanyPassportScreen-BQcZnLc-.js} +1 -1
  12. package/dist/assets/{ConnectionAuthScreen-MC_AsURR.js → ConnectionAuthScreen-D3Mf7qK3.js} +1 -1
  13. package/dist/assets/CustomerOnboardingAuthScreen-C0sBjs60.js +1 -0
  14. package/dist/assets/{CustomerOnboardingRoutes-C3c9eOtd.js → CustomerOnboardingRoutes-C4NalCKf.js} +1 -1
  15. package/dist/assets/{DashboardRoutes-C_2UjNDc.js → DashboardRoutes-BYYgNdD2.js} +1 -1
  16. package/dist/assets/{DefaultTenantHome-DhIA-Auv.js → DefaultTenantHome-C6nJD7za.js} +1 -1
  17. package/dist/assets/{DomesticWireDetailScreen-BQNmPyj8.js → DomesticWireDetailScreen-Df9Zx-eI.js} +1 -1
  18. package/dist/assets/{DrawerScreen-BRJIwisq.js → DrawerScreen-B_ZAZq-c.js} +1 -1
  19. package/dist/assets/{EntityDetailRoutes-DbfX6l2s.js → EntityDetailRoutes-BPJmlwG-.js} +1 -1
  20. package/dist/assets/{ExpenseAutomationRoutes-BTeDD1VK.js → ExpenseAutomationRoutes-8pbTDpsO.js} +1 -1
  21. package/dist/assets/{FeaturePreviewScreen-o3aGYwm3.js → FeaturePreviewScreen-BhcrS0dM.js} +1 -1
  22. package/dist/assets/{HubSpotOAuthCallbackScreen-WSu5A4Ct.js → HubSpotOAuthCallbackScreen-DY9bdeeM.js} +1 -1
  23. package/dist/assets/{InboxNotificationsProvider-DDRknvRh.js → InboxNotificationsProvider-yp4VlF4V.js} +1 -1
  24. package/dist/assets/InvoicingRoutes-D5cSux-9.js +2 -0
  25. package/dist/assets/{MagicLinkRoutes-BjW61OFo.js → MagicLinkRoutes-rwao6E2u.js} +1 -1
  26. package/dist/assets/{MagicLinkSignInScreen-CuZ2N1Pw.js → MagicLinkSignInScreen-e8SmU6Yc.js} +1 -1
  27. package/dist/assets/{MobileAppDrawer-Dt611RZ9.js → MobileAppDrawer-C9wi8312.js} +1 -1
  28. package/dist/assets/NotFoundScreen-B6L1cY3I.js +1 -0
  29. package/dist/assets/{NotificationRoutes-BrF6wQ3V.js → NotificationRoutes-HbqGfq1a.js} +1 -1
  30. package/dist/assets/{OAuthConsentScreen-BmxCN9Az.js → OAuthConsentScreen-CwgWaIOt.js} +1 -1
  31. package/dist/assets/{PandLWithForecastRoutes-CHdKE6AL.js → PandLWithForecastRoutes-nx90MfxG.js} +1 -1
  32. package/dist/assets/{PaymentLinkScreen-DvX14mnT.js → PaymentLinkScreen-CxAwIeqN.js} +1 -1
  33. package/dist/assets/{PeopleRoutes-DdiAV2ss.js → PeopleRoutes-4LCfOWjr.js} +1 -1
  34. package/dist/assets/{PerformanceRoutes-DJdm2Hjh.js → PerformanceRoutes-EfI4IfLY.js} +1 -1
  35. package/dist/assets/{Preview-CscVzNW8.js → Preview-BxM5wosg.js} +1 -1
  36. package/dist/assets/{QBOConnectionScreen-Ck8uFfex.js → QBOConnectionScreen-CIODRsNA.js} +1 -1
  37. package/dist/assets/{ReimbursementApprovalRoutes-5mZE12FG.js → ReimbursementApprovalRoutes-DfUkgvoL.js} +1 -1
  38. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BFUt_Xh2.js → ReimbursementApprovalRuleDetailScreen-HPs-AWde.js} +1 -1
  39. package/dist/assets/{ReimbursementRoutes-CLw3cjMk.js → ReimbursementRoutes-DvUFtazN.js} +1 -1
  40. package/dist/assets/{ReportsRoutes-CBUKpJzK.js → ReportsRoutes-CFpVRFNe.js} +1 -1
  41. package/dist/assets/{RewardsRoutes-BBrOnwnJ.js → RewardsRoutes-CS-_8unl.js} +1 -1
  42. package/dist/assets/{ScreenRoutes-BUG6uyqt.js → ScreenRoutes-B_vqHZtF.js} +2 -2
  43. package/dist/assets/{SettingsRoutes-D9auvf6o.js → SettingsRoutes-Dv5UDyEV.js} +1 -1
  44. package/dist/assets/{SetupPagesScreen-C6kDqRGd.js → SetupPagesScreen-CvaReXCR.js} +1 -1
  45. package/dist/assets/{SignInScreen-DRDEbF4D.js → SignInScreen-Cis2Hrqo.js} +1 -1
  46. package/dist/assets/{SignOutScreen-uoV20vWX.js → SignOutScreen-CgiJ4aJR.js} +1 -1
  47. package/dist/assets/{TaskListScreen-Cln-YyNE.js → TaskListScreen-DsFWTjuD.js} +1 -1
  48. package/dist/assets/{TaskRoutes-CMDSqiu4.js → TaskRoutes-BDVAqm9e.js} +1 -1
  49. package/dist/assets/TransactionDetailRoutes-BDvPcX4f.js +1 -0
  50. package/dist/assets/{TransactionDetailScreen-B38w1Q4M.js → TransactionDetailScreen-Bgc2K53s.js} +1 -1
  51. package/dist/assets/{TransactionListRoutes-CtUzO7h7.js → TransactionListRoutes-ChfbF5Yn.js} +1 -1
  52. package/dist/assets/{TreasuryRoutes-CaCxjqBo.js → TreasuryRoutes-OIkwuzMV.js} +1 -1
  53. package/dist/assets/{VendorsRoutes-P3oVwEbQ.js → VendorsRoutes-BUXB41aT.js} +1 -1
  54. package/dist/assets/{WiseConfirmationScreen-BCBFNvno.js → WiseConfirmationScreen-D9W1pM9c.js} +1 -1
  55. package/dist/assets/{ZeniAccountRoutes-BRGQxOqx.js → ZeniAccountRoutes-DD4g7Ugu.js} +1 -1
  56. package/dist/assets/{ZeniAccountStatementScreen-DQaLVOUo.js → ZeniAccountStatementScreen-BlteVo42.js} +1 -1
  57. package/dist/assets/{accountMappingHelper-L9SkIWKz.js → accountMappingHelper-C4yUO_tP.js} +1 -1
  58. package/dist/assets/{analytics-CsbG8awP.js → analytics-p9dV2gEo.js} +1 -1
  59. package/dist/assets/{analyticsHelper-DtAHYi5r.js → analyticsHelper-Cq4tYGNc.js} +1 -1
  60. package/dist/assets/{core-CGqhbBHO.js → core-35eDsgGP.js} +1 -1
  61. package/dist/assets/{decodeURIComponentSafe-6FvQaIqS.js → decodeURIComponentSafe-DhnAz_92.js} +1 -1
  62. package/dist/assets/{dnd-CyZNzT3I.js → dnd-Dm1d6mZC.js} +1 -1
  63. package/dist/assets/{empty-CIUWZs8G.js → empty-BDPRkuRZ.js} +1 -1
  64. package/dist/assets/{empty-EE_1cMfQ.js → empty-DpY1OPz6.js} +1 -1
  65. package/dist/assets/{emptyVideoElement-CPGcaaig.js → emptyVideoElement-C6tD2_Is.js} +1 -1
  66. package/dist/assets/{epic-Cxd3kHt9.js → epic-BLC2ItWM.js} +1 -1
  67. package/dist/assets/{expenseAutomationHelper-wwug0Eyp.js → expenseAutomationHelper-XBf0IYWB.js} +1 -1
  68. package/dist/assets/{getLocaleForTenant-CSGkphtC.js → getLocaleForTenant-C0JZQLGG.js} +1 -1
  69. package/dist/assets/{index-BcNWzeQF.js → index-B3U6gyEe.js} +1 -1
  70. package/dist/assets/{index-CoKBrrSw.js → index-BBhWSYD8.js} +6 -6
  71. package/dist/assets/{index-Dv01hTrY.js → index-CJI7GB_s.js} +1 -1
  72. package/dist/assets/{index-QncEC5ur.js → index-D-ldiYpS.js} +1 -1
  73. package/dist/assets/{index-BVFow4eV.js → index-D-oz9cOM.js} +1 -1
  74. package/dist/assets/{index-BswIxmLx.js → index-DHtuXNZa.js} +1 -1
  75. package/dist/assets/{index-CpkJ0bAk.js → index-DqXFykf0.js} +1 -1
  76. package/dist/assets/{index-tzevB3Ch.js → index-g5u7iWai.js} +2 -2
  77. package/dist/assets/{lexical-C5ZCOEAv.js → lexical-DQ4lSvQh.js} +1 -1
  78. package/dist/assets/{liveblocks-D83XGo_c.js → liveblocks-D0hIH2N0.js} +1 -1
  79. package/dist/assets/{lottie-DeqWxWVC.js → lottie-TJOzQ6Cz.js} +1 -1
  80. package/dist/assets/{mui-CD71lp6N.js → mui-CY_LMiAy.js} +1 -1
  81. package/dist/assets/{pathToGoBack-CoDJzfH-.js → pathToGoBack-n4Mx0taW.js} +1 -1
  82. package/dist/assets/{pdf-D4eEcTTi.js → pdf-DElOA9Iz.js} +3 -3
  83. package/dist/assets/{pdf-lib-Bd7L71QV.js → pdf-lib-D54M6RaZ.js} +1 -1
  84. package/dist/assets/{plaid-C8_LWTII.js → plaid-CoaHurGj.js} +1 -1
  85. package/dist/assets/{pusher-BsMqYR11.js → pusher-BBz5Zhu2.js} +1 -1
  86. package/dist/assets/{react-Dd8IfcKg.js → react-CFjwLJT9.js} +1 -1
  87. package/dist/assets/{react-1_9r2O7V.js → react-CcppuOI-.js} +1 -1
  88. package/dist/assets/{react-DvKEjk5s.js → react-Cn6RRlX0.js} +1 -1
  89. package/dist/assets/{react-CNf4SjYR.js → react-DRB89Tf-.js} +1 -1
  90. package/dist/assets/{react-l2dFGOnI.js → react-DlGIFhE7.js} +1 -1
  91. package/dist/assets/{react-BEE0PagD.js → react-psgyYffq.js} +1 -1
  92. package/dist/assets/{recharts-2kmMgB1t.js → recharts-B8j-bW95.js} +1 -1
  93. package/dist/assets/{routePaths-DU2fgaW2.js → routePaths-BgYQMm9p.js} +1 -1
  94. package/dist/assets/{sentry-BPfEBx2C.js → sentry-DhqS_W-k.js} +1 -1
  95. package/dist/assets/{url-DSofFSVz.js → url-BlblTlRS.js} +1 -1
  96. package/dist/assets/{url-WFx5ES50.js → url-BniS_9P1.js} +1 -1
  97. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-BBuMQpNs.js → useAiCfoDashboardSuggestedQuestionsChips-Dw4vBi90.js} +1 -1
  98. package/dist/assets/{useAskAiCfoHostNavButtonProps-C4V1Wf7u.js → useAskAiCfoHostNavButtonProps-DGTLHvUD.js} +1 -1
  99. package/dist/assets/{useChargeCardPusherEvents-B1n0Fi92.js → useChargeCardPusherEvents-COwRMcoJ.js} +1 -1
  100. package/dist/assets/{useDeviceId-D_DsCe-9.js → useDeviceId-Cd5EU_Dl.js} +1 -1
  101. package/dist/assets/{useEmailConnectResultRefresh-BxNSbaGA.js → useEmailConnectResultRefresh-D_zBEeqz.js} +1 -1
  102. package/dist/assets/{useInitialThreadRequest-CP8MsLNf.js → useInitialThreadRequest-UvGRmRxR.js} +1 -1
  103. package/dist/assets/{useTaskManagerAccess-Dl-8FUHJ.js → useTaskManagerAccess-DRrr5b-Z.js} +1 -1
  104. package/dist/assets/{utils-B6XFkcn3.js → utils-CgQOqOwX.js} +1 -1
  105. package/dist/assets/{withTransactionSidePanel-D0UiF_in.js → withTransactionSidePanel-Cyf8gB6i.js} +1 -1
  106. package/dist/assets/{zeni-epic-state-DASyz1An.js → zeni-epic-state-BRRtwAQl.js} +3 -3
  107. package/dist/index.html +1 -1
  108. package/package.json +1 -1
  109. package/dist/assets/AddressRoutes-sfAfU_xp.js +0 -1
  110. package/dist/assets/CustomerOnboardingAuthScreen-96EM2Iem.js +0 -1
  111. package/dist/assets/InvoicingRoutes-BC26Hbp1.js +0 -2
  112. package/dist/assets/NotFoundScreen-RGfzDsux.js +0 -1
  113. package/dist/assets/TransactionDetailRoutes-DMotJtMw.js +0 -1
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-RGfzDsux.js","assets/sentry-BPfEBx2C.js","assets/core-CGqhbBHO.js","assets/zeni-epic-state-DASyz1An.js","assets/index-CoKBrrSw.js","assets/mui-CD71lp6N.js","assets/analytics-CsbG8awP.js","assets/utils-B6XFkcn3.js","assets/index-BhC2LNQw.css","assets/DashboardRoutes-C_2UjNDc.js","assets/withTransactionSidePanel-D0UiF_in.js","assets/useAskAiCfoHostNavButtonProps-C4V1Wf7u.js","assets/TransactionDetailScreen-B38w1Q4M.js","assets/decodeURIComponentSafe-6FvQaIqS.js","assets/useInitialThreadRequest-CP8MsLNf.js","assets/routePaths-DU2fgaW2.js","assets/expenseAutomationHelper-wwug0Eyp.js","assets/analyticsHelper-DtAHYi5r.js","assets/CompanyPassportScreen-C02FQ11m.js","assets/MobileAppDrawer-Dt611RZ9.js","assets/InboxNotificationsProvider-DDRknvRh.js","assets/useTaskManagerAccess-Dl-8FUHJ.js","assets/useAiCfoDashboardSuggestedQuestionsChips-BBuMQpNs.js","assets/FeaturePreviewScreen-o3aGYwm3.js","assets/BillPayRoutes-Bl_cSE9O.js","assets/AddressScreen-BD6hfTYm.js","assets/DomesticWireDetailScreen-BQNmPyj8.js","assets/BusinessVerificationPageScreen-C37udtB6.js","assets/DrawerScreen-BRJIwisq.js","assets/SetupPagesScreen-C6kDqRGd.js","assets/BillPayApprovalRoutes-D-5hMi6f.js","assets/ReimbursementApprovalRuleDetailScreen-BFUt_Xh2.js","assets/getLocaleForTenant-CSGkphtC.js","assets/ReimbursementRoutes-CLw3cjMk.js","assets/ReimbursementApprovalRoutes-5mZE12FG.js","assets/TransactionListRoutes-CtUzO7h7.js","assets/ZeniAccountStatementScreen-DQaLVOUo.js","assets/SettingsRoutes-D9auvf6o.js","assets/AccountMappingScreen-C0aQk3eU.js","assets/QBOConnectionScreen-Ck8uFfex.js","assets/empty-CIUWZs8G.js","assets/index-QncEC5ur.js","assets/url-DSofFSVz.js","assets/index-BcNWzeQF.js","assets/accountMappingHelper-L9SkIWKz.js","assets/useEmailConnectResultRefresh-BxNSbaGA.js","assets/ReportsRoutes-CBUKpJzK.js","assets/ChargeCardRoutes-BbRPoXSC.js","assets/useChargeCardPusherEvents-B1n0Fi92.js","assets/PeopleRoutes-DdiAV2ss.js","assets/ExpenseAutomationRoutes-BTeDD1VK.js","assets/TreasuryRoutes-CaCxjqBo.js","assets/VendorsRoutes-P3oVwEbQ.js","assets/pathToGoBack-CoDJzfH-.js","assets/ZeniAccountRoutes-BRGQxOqx.js","assets/AddressRoutes-sfAfU_xp.js","assets/PandLWithForecastRoutes-CHdKE6AL.js","assets/CustomerOnboardingRoutes-C3c9eOtd.js","assets/TransactionDetailRoutes-DMotJtMw.js","assets/EntityDetailRoutes-DbfX6l2s.js","assets/InvoicingRoutes-BC26Hbp1.js","assets/NotificationRoutes-BrF6wQ3V.js","assets/PerformanceRoutes-DJdm2Hjh.js","assets/RewardsRoutes-BBrOnwnJ.js","assets/TaskRoutes-CMDSqiu4.js","assets/TaskListScreen-Cln-YyNE.js","assets/AiCfoScreen-BQBOwbGt.js","assets/CardsAiCfoScreen-DmUDeMY2.js"])))=>i.map(i=>d[i]);
2
- import{_ as s,bn as ms,fB as _s,dV as Es,dU as hs,A3 as ps,de as gs,c7 as xs,gG as Rs,g5 as Is,db as pe,cF as js,gj as Ts,cx as As,bE as fs,br as bs,T9 as Ds,v as ys,Tb as Cs,bq as vs,Tc as Os,bK as Us,bJ as Ps,bt as ws,ct as Fs,Td as Ls,Te as Vs,d6 as ks,d9 as Hs,d8 as Bs,cE as Ss,cL as Ns,pw as ge,ge as xe,gV as Ms,gg as Re,gI as Ie,gJ as je,gh as Zs}from"./zeni-epic-state-DASyz1An.js";import{j as e}from"./liveblocks-D83XGo_c.js";import{a as P}from"./sentry-BPfEBx2C.js";import{N as u,u as Gs,h as $s,i as zs,g as qs,j as $,q as Te,n as Ys,o as t}from"./core-CGqhbBHO.js";import{M as l,E as Js,u as Ws,z as D,I as Qs,f as Ks,N as Xs,d as M,h as en,O as sn,U as nn,L as F,G as Ae,t as _,P as tn,Q as an,k as ne}from"./index-CoKBrrSw.js";import"./mui-CD71lp6N.js";import{f as fe}from"./analyticsHelper-DtAHYi5r.js";import{t as on}from"./getLocaleForTenant-CSGkphtC.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},A=new a.Error().stack;A&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[A]="52ecf991-2047-471a-8f87-1dd73c7e89fb",a._sentryDebugIdIdentifier="sentry-dbid-52ecf991-2047-471a-8f87-1dd73c7e89fb")}catch{}})();const rn=l((()=>s((()=>import("./NotFoundScreen-RGfzDsux.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),ln=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/reimbursements`}),un=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/bills`}),be=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/treasury`}),De=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/checking`}),ye=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/cards`}),y=({showZeniAccountRoute:a,isUserHasBillPayAccess:A,isUserHasReimbursementAccess:B,showTreasuryRoute:i,isTenantBankingOnly:V,showChargeCardRoute:O,tenantEmailDomain:v})=>{if(V===!0){if(a)return e.jsx(De,{tenantEmailDomain:v});if(i)return e.jsx(be,{tenantEmailDomain:v});if(O)return e.jsx(ye,{tenantEmailDomain:v})}return a?e.jsx(De,{tenantEmailDomain:v}):i?e.jsx(be,{tenantEmailDomain:v}):O?e.jsx(ye,{tenantEmailDomain:v}):A?e.jsx(un,{tenantEmailDomain:v}):B?e.jsx(ln,{tenantEmailDomain:v}):e.jsx(rn,{})},dn={dashboard:()=>s((()=>import("./DashboardRoutes-C_2UjNDc.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,0,17,18,19,20,21,22,23,8])),bills:()=>s((()=>import("./BillPayRoutes-Bl_cSE9O.js")),__vite__mapDeps([24,1,2,3,4,5,6,7,25,0,26,11,14,27,15,19,20,21,28,23,29,17,30,31,32,8])),reimbursement:()=>s((()=>import("./ReimbursementRoutes-CLw3cjMk.js")),__vite__mapDeps([33,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,11,14,28,34,31,32,8])),transactions:()=>s((()=>import("./TransactionListRoutes-CtUzO7h7.js")),__vite__mapDeps([35,1,2,3,4,5,6,7,10,11,12,13,14,15,16,36,8])),settings:()=>s((()=>import("./SettingsRoutes-D9auvf6o.js")),__vite__mapDeps([37,1,2,3,4,5,6,7,21,38,19,20,39,40,41,42,43,13,44,25,0,17,27,15,18,45,30,31,34,8])),reports:()=>s((()=>import("./ReportsRoutes-CBUKpJzK.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,0,23,14,15,19,20,21,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-BbRPoXSC.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,11,19,20,21,29,27,15,0,17,14,48,25,8])),people:()=>s((()=>import("./PeopleRoutes-DdiAV2ss.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,11,19,20,21,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-BTeDD1VK.js")),__vite__mapDeps([50,1,2,3,0,4,5,6,7,11,12,13,14,15,16,10,44,28,8])),treasury:()=>s((()=>import("./TreasuryRoutes-CaCxjqBo.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,11,14,23,8])),vendors:()=>s((()=>import("./VendorsRoutes-P3oVwEbQ.js")),__vite__mapDeps([52,1,2,3,4,5,6,7,25,0,23,53,15,11,19,20,21,28,44,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-BRGQxOqx.js")),__vite__mapDeps([54,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,26,25,11,36,8]))},cn=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],te=a=>{"requestIdleCallback"in window?requestIdleCallback(a):setTimeout(a,100)},mn=l((()=>s((()=>import("./ReportsRoutes-CBUKpJzK.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,0,23,14,15,19,20,21,8])))),_n=l((()=>s((()=>import("./AddressRoutes-sfAfU_xp.js")),__vite__mapDeps([55,1,2,3,25,4,5,6,7,0,8])))),En=l((()=>s((()=>import("./PeopleRoutes-DdiAV2ss.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,11,19,20,21,8])))),hn=l((()=>s((()=>import("./PandLWithForecastRoutes-CHdKE6AL.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,0,23,11,14,15,19,20,21,8])))),pn=l((()=>s((()=>import("./CustomerOnboardingRoutes-C3c9eOtd.js")),__vite__mapDeps([57,1,2,3,25,4,5,6,7,0,39,40,41,42,43,13,45,48,8])))),gn=l((()=>s((()=>import("./VendorsRoutes-P3oVwEbQ.js")),__vite__mapDeps([52,1,2,3,4,5,6,7,25,0,23,53,15,11,19,20,21,28,44,8])))),xn=l((()=>s((()=>import("./TransactionDetailRoutes-DMotJtMw.js")),__vite__mapDeps([58,1,2,3,0,4,5,6,7,12,11,13,14,15,16,8])))),Ce=l((()=>s((()=>import("./EntityDetailRoutes-DbfX6l2s.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,13,10,11,12,14,15,16,8])))),Rn=l((()=>s((()=>import("./DashboardRoutes-C_2UjNDc.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,0,17,18,19,20,21,22,23,8])))),ve=l((()=>s((()=>import("./BillPayRoutes-Bl_cSE9O.js")),__vite__mapDeps([24,1,2,3,4,5,6,7,25,0,26,11,14,27,15,19,20,21,28,23,29,17,30,31,32,8])))),In=l((()=>s((()=>import("./SettingsRoutes-D9auvf6o.js")),__vite__mapDeps([37,1,2,3,4,5,6,7,21,38,19,20,39,40,41,42,43,13,44,25,0,17,27,15,18,45,30,31,34,8])))),jn=l((()=>s((()=>import("./InvoicingRoutes-BC26Hbp1.js")),__vite__mapDeps([60,1,2,3,4,5,6,7,25,0,19,20,21,39,40,41,42,43,13,8])))),Oe=l((()=>s((()=>import("./ReimbursementRoutes-CLw3cjMk.js")),__vite__mapDeps([33,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,11,14,28,34,31,32,8])))),Tn=l((()=>s((()=>import("./ZeniAccountRoutes-BRGQxOqx.js")),__vite__mapDeps([54,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,26,25,11,36,8])))),An=l((()=>s((()=>import("./TreasuryRoutes-CaCxjqBo.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,11,14,23,8])))),fn=l((()=>s((()=>import("./TransactionListRoutes-CtUzO7h7.js")),__vite__mapDeps([35,1,2,3,4,5,6,7,10,11,12,13,14,15,16,36,8])))),bn=l((()=>s((()=>import("./ChargeCardRoutes-BbRPoXSC.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,11,19,20,21,29,27,15,0,17,14,48,25,8])))),Dn=l((()=>s((()=>import("./NotificationRoutes-BrF6wQ3V.js")),__vite__mapDeps([61,1,2,3,0,4,5,6,7,11,21,8])))),yn=l((()=>s((()=>import("./PerformanceRoutes-DJdm2Hjh.js")),__vite__mapDeps([62,1,2,3,0,4,5,6,7,11,19,20,21,8])))),Cn=l((()=>s((()=>import("./ExpenseAutomationRoutes-BTeDD1VK.js")),__vite__mapDeps([50,1,2,3,0,4,5,6,7,11,12,13,14,15,16,10,44,28,8])))),vn=l((()=>s((()=>import("./RewardsRoutes-BBrOnwnJ.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,0,8])))),On=l((()=>s((()=>import("./TaskRoutes-CMDSqiu4.js")),__vite__mapDeps([64,1,2,3,0,4,5,6,7,14,19,20,21,65,11,8])))),Un=l((()=>s((()=>import("./AiCfoScreen-BQBOwbGt.js")),__vite__mapDeps([66,1,2,3,4,5,6,7,22,53,8])))),Ue=l((()=>s((()=>import("./CardsAiCfoScreen-DmUDeMY2.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,8])))),C=l((()=>s((()=>import("./NotFoundScreen-RGfzDsux.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),Pn=l((()=>s((()=>import("./TaskListScreen-Cln-YyNE.js").then((a=>a.f))),__vite__mapDeps([65,1,2,3,4,5,6,7,11,19,20,21,8])))),wn=({isDashboardAccess:a,showZeniAccountRoute:A,isUserHasBillPayAccess:B,isUserHasReimbursementAccess:i,showTreasuryRoute:V,isTenantBankingOnly:O,isTenantCardsOnly:v,showChargeCardRoute:k})=>{if(O===!0){if(A)return e.jsx(u,{to:"checking"});if(V)return e.jsx(u,{to:"treasury"});if(k)return e.jsx(u,{to:"cards"})}return v===!0&&k?e.jsx(u,{to:"cards"}):a?e.jsx(u,{to:"dashboard"}):A?e.jsx(u,{to:"checking"}):V?e.jsx(u,{to:"treasury"}):k?e.jsx(u,{to:"cards"}):B?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},Pe=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/dashboard`}),Mn=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:a}){const A=Gs(),B=$s(),{tenantEmailDomain:i}=zs(),V=Js().mode,{setLoading:O,clearAllLoading:v,clearLoading:k}=Ws(),f=D.getSignedInUserTenant(i)?.tenantId,j=D.getSignedInUser(),W=ms(j),z=qs(),[L,we]=P.useState(!1),r=$((o=>_s(o))),{useFeatureGate:S}=Qs(),Z=Ks(),ae=Xs(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Ve}=S(M.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=S(M.isDebitCardFeatureEnabled),T=$((o=>o.tenantState.fetchState)),p=$((o=>o.tenantState.activeTenantFetchState.fetchState)),E=p==="Completed"||T==="Completed"?Es(oe,r):void 0,Q=p==="Completed"||T==="Completed"?hs(r):void 0,re=p==="Completed"||T==="Completed"?ps(r)&&!gs(r):void 0,ke=en(r,Ve,oe),{isCardsHidden:He}=sn(r?.tenantId),Be=!ke||!!He,{isFeatureEnabled:Se}=S(M.isSettingsFeatureEnabled),{isFeatureEnabled:K}=S(M.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=S(M.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||an==="DEV",Ze=r?.userRole!=null&&xs(r.userRole),q=$((o=>Rs(o)));if(i!=null){const o=D.getSignedInUserTenant(i);j!=null&&o!=null&&fe(j,r,V)}const G={tenantId:f,userId:j?.userId,sessionId:j?.zeniSessionId},ie=Is(),h=nn(),Ge=r.company==null||h?.loggedInUserRoleMap!=null&&pe(h.loggedInUserRole),$e=js(h?.loggedInUserRoleMap),X=Te("/:tenantEmailDomain/onboarding/*")!==null,ee=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),ze=$((o=>G.tenantId!=null?Ts(o,G.tenantId):void 0));P.useEffect((()=>{O(F.TENANT_FETCHING),a(i)}),[i]),P.useEffect((()=>{if(ee!=null&&f!=null){const o=ee.params.selectedPeriod;if(o!=null){const b=o.split("-");if(b.length===2){const d=As(Number(b[0])),n=Number(b[1]),c=fs(`01-${d<10?`0${d}`:d}-${n}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),N=bs();c.isAfter(N,"month")===!1?A(Ds(f,{month:d,year:n})):B(`/${i}/month_end_close_checks/review`)}}}}),[ee,f]),P.useEffect((()=>{L||(we(!0),O(F.TENANT_FETCHING))}),[L,G,ie,j,A,D]),P.useLayoutEffect((()=>{!ys(ie,G)&&D.isSignedIn()&&(O(F.TENANT_FETCHING),(function(o,b,d,n){if(xe(b?.userId,b?.zeniSessionId,o.tenantId),d(Ms(!0)),d(Re(o.tenantId)),o.tenantId!=null&&_.clearTenant(o.tenantId),o.tenantId!=null){const c=D.getSignedInUserTenantWithId(o.tenantId);n&&Ae.updateAppLocaleID(on(n)),c?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(c?.tenantEmailDomain)}o.userId!=null?ne.identify(o.userId,{tenant_id:o.tenantId}):ne.resetUserIdentity()})(G,j,A,ze))}),[f]),P.useEffect((()=>{D.isSignedIn()&&(O(F.TENANT_FETCHING),(function(o,b,d,n,c,N,H){if(d==null&&n==null)return void console.warn("There is no current tenant selected!!");const Y=n!=null&&c?.zeniSessionId!=null,us=d==null||d.tenantId!==n,ds=d!=null&&d.excludedResources==null,cs=d!=null&&d.externalConnections==null;if(Y&&us){H(Re(n));const J=D.getSignedInUserTenantWithId(n);J?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(J?.tenantEmailDomain),xe(c?.userId,c?.zeniSessionId,n),_.shouldFetchExcludedResources(n)&&(_.markExcludedResourcesFetchStarted(n),H(Ie(c.userId,n))),_.shouldFetchConnections(n)&&(_.markConnectionsFetchStarted(n),H(je(c.userId,n)))}else Y&&ds&&_.shouldFetchExcludedResources(n)&&(_.markExcludedResourcesFetchStarted(n),H(Ie(c.userId,n))),Y&&cs&&_.shouldFetchConnections(n)&&(_.markConnectionsFetchStarted(n),H(je(c.userId,n)));if(Y){ne.identify(c.userId,{tenant_id:n});const J=n==null||n!=null&&(b==="Completed"||b==="Error");o==="Completed"||b!=="Not-Started"&&b!=="Error"||n==null||!_.shouldFetchActiveTenant(n)||(_.markActiveTenantFetchStarted(n),N(F.TENANT_FETCHING),H(Zs(c.userId,n,c.zeniSessionId))),J&&(o==="Not-Started"||o==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),H(ge(c.userId,c.zeniSessionId)))}})(T,p,r,f,j,O,A))}),[f,p]),P.useEffect((()=>{D.isSignedIn()&&T==="Completed"&&q.tenantsBaseInOrder.length>0&&(k(F.TENANT_FETCHING),D.saveSignedInUserTenants(Cs(q.tenantsBaseInOrder)),j!=null&&fe(j,r,V,void 0,q.tenantsBaseInOrder))}),[q,T,r,j]),P.useEffect((()=>{p==="In-Progress"&&O(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&f!=null?(v(),_.markActiveTenantFetchCompleted(f)):p==="Error"&&f!=null&&(_.markActiveTenantFetchFailed(f),k(F.TENANT_FETCHING),k(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,f,L]);const le=P.useRef(!1);P.useEffect((()=>{!le.current&&p==="Completed"&&L&&(le.current=!0,(function(o=cn,b=3e3){setTimeout((()=>{const d=n=>{if(n>=o.length)return;const c=o[n],N=dn[c];N!=null?N().then((()=>te((()=>d(n+1))))).catch((()=>te((()=>d(n+1))))):d(n+1)};te((()=>d(0)))}),b)})())}),[p,L]);const U=r?.userRole!=null&&vs(r?.userRole),{isFeatureEnabled:qe}=S(M.isReferralFeatureEnabled),Ye=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Je=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),w=r?.userRole!=null&&pe(r.userRole),ue=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!U,de=!Be&&!U,We=Os(h?.loggedInUserRoleMap),Qe=r.externalConnections?.accounting[0]?.isValid,Ke=r.externalConnections?.fetchState==="Completed",se=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!U,me=ce&&Us(h?.loggedInUserRoleMap),_e=Fe&&!U,Xe=Le&&!U,es=ue&&Ps(h?.loggedInUserRoleMap),ss=de&&ws(h?.loggedInUserRoleMap),ns=_e&&Fs(h?.loggedInUserRoleMap),ts=Ls(h?.loggedInUserRoleMap),as=Vs(h?.loggedInUserRoleMap),os=ks(h?.loggedInUserRoleMap),rs=Hs(h?.loggedInUserRoleMap),is=Bs(h?.loggedInUserRoleMap),g=Ss(h?.loggedInUserRoleMap),x=Ns(h?.loggedInUserRoleMap),Ee=ue&&g,he=ce&&x,R=_e&&os,I=Xe&&rs,m=de&&is,ls=r.excludedResources?.resources?.find((o=>o.resource==="/invites"))!=null||$e===!0||We===!0||ts===!0||as===!0;return D.isSignedIn()?f==null?T==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(j!=null&&T!=="In-Progress"&&A(ge(j.userId,j.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||T==="Completed"?(se===!0||W&&!X)&&Ke&&Qe!==!0&&E===!1&&Q===!1&&re===!1?(a(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||re!==!0||se!==!0||X||W?!L||se!==!1||X||W?L&&r?.userRole&&E!=null&&Q!=null&&i!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(Ys,{children:e.jsxs(t,{element:e.jsx(tn,{}),children:[e.jsx(t,{path:"/",element:e.jsx(wn,{isDashboardAccess:w,showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,isTenantCardsOnly:Q,showChargeCardRoute:m})}),e.jsx(t,{path:"dashboard/*",element:w?e.jsx(Rn,{}):e.jsx(y,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reports/*",element:w?e.jsx(mn,{}):e.jsx(y,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"people/*",element:ls||w?e.jsx(En,{}):e.jsx(y,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"forecast/*",element:w?e.jsx(hn,{}):e.jsx(y,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(pn,{})}),e.jsx(t,{path:"transaction/*",element:w&&U===!1||Ye||Je?e.jsx(xn,{}):e.jsx(y,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"transactions/*",element:w&&U===!1?e.jsx(fn,{}):e.jsx(y,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"customer/*",element:w&&U===!1?e.jsx(Ce,{entityType:"customer"}):e.jsx(y,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isTenantBankingOnly:E,showTreasuryRoute:I,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"vendor/*",element:w&&U===!1?e.jsx(Ce,{entityType:"vendor"}):e.jsx(y,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"tasks",element:e.jsx(Pn,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(On,{})}),e.jsx(t,{path:"address/*",element:es||me||ns||ss?e.jsx(_n,{}):e.jsx(y,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"checking/*",element:R?e.jsx(Tn,{}):e.jsx(C,{})}),e.jsx(t,{path:"treasury/*",element:I?e.jsx(An,{}):e.jsx(C,{})}),e.jsx(t,{path:"performance",element:ae===!0?e.jsx(yn,{}):e.jsx(Pe,{tenantEmailDomain:i})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ae===!0&&U===!1?e.jsx(Cn,{}):e.jsx(Pe,{tenantEmailDomain:i})}),e.jsx(t,{path:"notifications/*",element:e.jsx(Dn,{})}),e.jsx(t,{path:"vendors/*",element:Ge?e.jsx(gn,{}):e.jsx(C,{})}),e.jsx(t,{path:"bill/*",element:Ee?e.jsx(ve,{}):e.jsx(y,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"bills/*",element:Ee?e.jsx(ve,{}):e.jsx(y,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reimbursement/*",element:he?e.jsx(Oe,{}):e.jsx(y,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reimbursements/*",element:he?e.jsx(Oe,{}):e.jsx(y,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"settings/*",element:Se?e.jsx(In,{hasAdminLevelAccess:me}):e.jsx(C,{})}),e.jsx(t,{path:"invoicing/*",element:Me&&Ze?e.jsx(jn,{}):e.jsx(C,{})}),e.jsx(t,{path:"cards/ask",element:m&&Z?e.jsx(Ue,{isFileUploadEnabled:K}):e.jsx(C,{})}),e.jsx(t,{path:"cards/ask/:session_id",element:m&&Z?e.jsx(Ue,{isFileUploadEnabled:K}):e.jsx(C,{})}),e.jsx(t,{path:"cards/*",element:m?e.jsx(bn,{}):e.jsx(C,{})}),e.jsx(t,{path:"rewards/*",element:qe?e.jsx(vn,{}):e.jsx(C,{})}),e.jsx(t,{path:"/ai-cfo",element:Z?e.jsx(u,{to:"explore"}):e.jsx(C,{})}),e.jsx(t,{path:"/ai-cfo/",element:Z?e.jsx(u,{to:"explore"}):e.jsx(C,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:Z?e.jsx(Un,{isFileUploadEnabled:K}):e.jsx(C,{})}),e.jsx(t,{path:"*",element:e.jsx(C,{})})]})}):null:(a(void 0),e.jsx(u,{to:`/${i}/onboarding`,replace:!0})):(a(void 0),e.jsx(u,{to:`/${i}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),a(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{y as F,Mn as S};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-B6L1cY3I.js","assets/sentry-DhqS_W-k.js","assets/core-35eDsgGP.js","assets/zeni-epic-state-BRRtwAQl.js","assets/index-BBhWSYD8.js","assets/mui-CY_LMiAy.js","assets/analytics-p9dV2gEo.js","assets/utils-CgQOqOwX.js","assets/index-BhC2LNQw.css","assets/DashboardRoutes-BYYgNdD2.js","assets/withTransactionSidePanel-Cyf8gB6i.js","assets/useAskAiCfoHostNavButtonProps-DGTLHvUD.js","assets/TransactionDetailScreen-Bgc2K53s.js","assets/decodeURIComponentSafe-DhnAz_92.js","assets/useInitialThreadRequest-UvGRmRxR.js","assets/routePaths-BgYQMm9p.js","assets/expenseAutomationHelper-XBf0IYWB.js","assets/analyticsHelper-Cq4tYGNc.js","assets/CompanyPassportScreen-BQcZnLc-.js","assets/MobileAppDrawer-C9wi8312.js","assets/InboxNotificationsProvider-yp4VlF4V.js","assets/useTaskManagerAccess-DRrr5b-Z.js","assets/useAiCfoDashboardSuggestedQuestionsChips-Dw4vBi90.js","assets/FeaturePreviewScreen-BhcrS0dM.js","assets/BillPayRoutes-DxfZSGDE.js","assets/AddressScreen-anqh6to9.js","assets/DomesticWireDetailScreen-Df9Zx-eI.js","assets/BusinessVerificationPageScreen-BnngOdPs.js","assets/DrawerScreen-B_ZAZq-c.js","assets/SetupPagesScreen-CvaReXCR.js","assets/BillPayApprovalRoutes-BWcKljpL.js","assets/ReimbursementApprovalRuleDetailScreen-HPs-AWde.js","assets/getLocaleForTenant-C0JZQLGG.js","assets/ReimbursementRoutes-DvUFtazN.js","assets/ReimbursementApprovalRoutes-DfUkgvoL.js","assets/TransactionListRoutes-ChfbF5Yn.js","assets/ZeniAccountStatementScreen-BlteVo42.js","assets/SettingsRoutes-Dv5UDyEV.js","assets/AccountMappingScreen-vvnlkgXd.js","assets/QBOConnectionScreen-CIODRsNA.js","assets/empty-BDPRkuRZ.js","assets/index-D-ldiYpS.js","assets/url-BlblTlRS.js","assets/index-B3U6gyEe.js","assets/accountMappingHelper-C4yUO_tP.js","assets/useEmailConnectResultRefresh-D_zBEeqz.js","assets/ReportsRoutes-CFpVRFNe.js","assets/ChargeCardRoutes-CpllRZ3I.js","assets/useChargeCardPusherEvents-COwRMcoJ.js","assets/PeopleRoutes-4LCfOWjr.js","assets/ExpenseAutomationRoutes-8pbTDpsO.js","assets/TreasuryRoutes-OIkwuzMV.js","assets/VendorsRoutes-BUXB41aT.js","assets/pathToGoBack-n4Mx0taW.js","assets/ZeniAccountRoutes-DD4g7Ugu.js","assets/AddressRoutes-CqGLkDqt.js","assets/PandLWithForecastRoutes-nx90MfxG.js","assets/CustomerOnboardingRoutes-C4NalCKf.js","assets/TransactionDetailRoutes-BDvPcX4f.js","assets/EntityDetailRoutes-BPJmlwG-.js","assets/InvoicingRoutes-D5cSux-9.js","assets/NotificationRoutes-HbqGfq1a.js","assets/PerformanceRoutes-EfI4IfLY.js","assets/RewardsRoutes-CS-_8unl.js","assets/TaskRoutes-BDVAqm9e.js","assets/TaskListScreen-DsFWTjuD.js","assets/AiCfoScreen-ZhNzgLev.js","assets/CardsAiCfoScreen-C9jErKn4.js"])))=>i.map(i=>d[i]);
2
+ import{_ as s,bn as ms,fB as _s,dV as Es,dU as hs,A3 as ps,de as gs,c7 as xs,gG as Rs,g5 as Is,db as pe,cF as js,gj as Ts,cx as As,bE as fs,br as bs,T9 as Ds,v as ys,Tb as Cs,bq as vs,Tc as Os,bK as Us,bJ as Ps,bt as ws,ct as Fs,Td as Ls,Te as Vs,d6 as ks,d9 as Hs,d8 as Bs,cE as Ss,cL as Ns,pw as ge,ge as xe,gV as Ms,gg as Re,gI as Ie,gJ as je,gh as Zs}from"./zeni-epic-state-BRRtwAQl.js";import{j as e}from"./liveblocks-D0hIH2N0.js";import{a as P}from"./sentry-DhqS_W-k.js";import{N as u,u as Gs,h as $s,i as zs,g as qs,j as $,q as Te,n as Ys,o as t}from"./core-35eDsgGP.js";import{M as l,E as Js,u as Ws,z as D,I as Qs,f as Ks,N as Xs,d as M,h as en,O as sn,U as nn,L as F,G as Ae,t as _,P as tn,Q as an,k as ne}from"./index-BBhWSYD8.js";import"./mui-CY_LMiAy.js";import{f as fe}from"./analyticsHelper-Cq4tYGNc.js";import{t as on}from"./getLocaleForTenant-C0JZQLGG.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},A=new a.Error().stack;A&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[A]="52ecf991-2047-471a-8f87-1dd73c7e89fb",a._sentryDebugIdIdentifier="sentry-dbid-52ecf991-2047-471a-8f87-1dd73c7e89fb")}catch{}})();const rn=l((()=>s((()=>import("./NotFoundScreen-B6L1cY3I.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),ln=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/reimbursements`}),un=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/bills`}),be=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/treasury`}),De=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/checking`}),ye=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/cards`}),y=({showZeniAccountRoute:a,isUserHasBillPayAccess:A,isUserHasReimbursementAccess:B,showTreasuryRoute:i,isTenantBankingOnly:V,showChargeCardRoute:O,tenantEmailDomain:v})=>{if(V===!0){if(a)return e.jsx(De,{tenantEmailDomain:v});if(i)return e.jsx(be,{tenantEmailDomain:v});if(O)return e.jsx(ye,{tenantEmailDomain:v})}return a?e.jsx(De,{tenantEmailDomain:v}):i?e.jsx(be,{tenantEmailDomain:v}):O?e.jsx(ye,{tenantEmailDomain:v}):A?e.jsx(un,{tenantEmailDomain:v}):B?e.jsx(ln,{tenantEmailDomain:v}):e.jsx(rn,{})},dn={dashboard:()=>s((()=>import("./DashboardRoutes-BYYgNdD2.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,0,17,18,19,20,21,22,23,8])),bills:()=>s((()=>import("./BillPayRoutes-DxfZSGDE.js")),__vite__mapDeps([24,1,2,3,4,5,6,7,25,0,26,11,14,27,15,19,20,21,28,23,29,17,30,31,32,8])),reimbursement:()=>s((()=>import("./ReimbursementRoutes-DvUFtazN.js")),__vite__mapDeps([33,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,11,14,28,34,31,32,8])),transactions:()=>s((()=>import("./TransactionListRoutes-ChfbF5Yn.js")),__vite__mapDeps([35,1,2,3,4,5,6,7,10,11,12,13,14,15,16,36,8])),settings:()=>s((()=>import("./SettingsRoutes-Dv5UDyEV.js")),__vite__mapDeps([37,1,2,3,4,5,6,7,21,38,19,20,39,40,41,42,43,13,44,25,0,17,27,15,18,45,30,31,34,8])),reports:()=>s((()=>import("./ReportsRoutes-CFpVRFNe.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,0,23,14,15,19,20,21,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-CpllRZ3I.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,11,19,20,21,29,27,15,0,17,14,48,25,8])),people:()=>s((()=>import("./PeopleRoutes-4LCfOWjr.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,11,19,20,21,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-8pbTDpsO.js")),__vite__mapDeps([50,1,2,3,0,4,5,6,7,11,12,13,14,15,16,10,44,28,8])),treasury:()=>s((()=>import("./TreasuryRoutes-OIkwuzMV.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,11,14,23,8])),vendors:()=>s((()=>import("./VendorsRoutes-BUXB41aT.js")),__vite__mapDeps([52,1,2,3,4,5,6,7,25,0,23,53,15,11,19,20,21,28,44,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-DD4g7Ugu.js")),__vite__mapDeps([54,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,26,25,11,36,8]))},cn=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],te=a=>{"requestIdleCallback"in window?requestIdleCallback(a):setTimeout(a,100)},mn=l((()=>s((()=>import("./ReportsRoutes-CFpVRFNe.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,0,23,14,15,19,20,21,8])))),_n=l((()=>s((()=>import("./AddressRoutes-CqGLkDqt.js")),__vite__mapDeps([55,1,2,3,25,4,5,6,7,0,8])))),En=l((()=>s((()=>import("./PeopleRoutes-4LCfOWjr.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,11,19,20,21,8])))),hn=l((()=>s((()=>import("./PandLWithForecastRoutes-nx90MfxG.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,0,23,11,14,15,19,20,21,8])))),pn=l((()=>s((()=>import("./CustomerOnboardingRoutes-C4NalCKf.js")),__vite__mapDeps([57,1,2,3,25,4,5,6,7,0,39,40,41,42,43,13,45,48,8])))),gn=l((()=>s((()=>import("./VendorsRoutes-BUXB41aT.js")),__vite__mapDeps([52,1,2,3,4,5,6,7,25,0,23,53,15,11,19,20,21,28,44,8])))),xn=l((()=>s((()=>import("./TransactionDetailRoutes-BDvPcX4f.js")),__vite__mapDeps([58,1,2,3,0,4,5,6,7,12,11,13,14,15,16,8])))),Ce=l((()=>s((()=>import("./EntityDetailRoutes-BPJmlwG-.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,13,10,11,12,14,15,16,8])))),Rn=l((()=>s((()=>import("./DashboardRoutes-BYYgNdD2.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,0,17,18,19,20,21,22,23,8])))),ve=l((()=>s((()=>import("./BillPayRoutes-DxfZSGDE.js")),__vite__mapDeps([24,1,2,3,4,5,6,7,25,0,26,11,14,27,15,19,20,21,28,23,29,17,30,31,32,8])))),In=l((()=>s((()=>import("./SettingsRoutes-Dv5UDyEV.js")),__vite__mapDeps([37,1,2,3,4,5,6,7,21,38,19,20,39,40,41,42,43,13,44,25,0,17,27,15,18,45,30,31,34,8])))),jn=l((()=>s((()=>import("./InvoicingRoutes-D5cSux-9.js")),__vite__mapDeps([60,1,2,3,4,5,6,7,25,0,19,20,21,39,40,41,42,43,13,8])))),Oe=l((()=>s((()=>import("./ReimbursementRoutes-DvUFtazN.js")),__vite__mapDeps([33,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,11,14,28,34,31,32,8])))),Tn=l((()=>s((()=>import("./ZeniAccountRoutes-DD4g7Ugu.js")),__vite__mapDeps([54,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,26,25,11,36,8])))),An=l((()=>s((()=>import("./TreasuryRoutes-OIkwuzMV.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,11,14,23,8])))),fn=l((()=>s((()=>import("./TransactionListRoutes-ChfbF5Yn.js")),__vite__mapDeps([35,1,2,3,4,5,6,7,10,11,12,13,14,15,16,36,8])))),bn=l((()=>s((()=>import("./ChargeCardRoutes-CpllRZ3I.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,11,19,20,21,29,27,15,0,17,14,48,25,8])))),Dn=l((()=>s((()=>import("./NotificationRoutes-HbqGfq1a.js")),__vite__mapDeps([61,1,2,3,0,4,5,6,7,11,21,8])))),yn=l((()=>s((()=>import("./PerformanceRoutes-EfI4IfLY.js")),__vite__mapDeps([62,1,2,3,0,4,5,6,7,11,19,20,21,8])))),Cn=l((()=>s((()=>import("./ExpenseAutomationRoutes-8pbTDpsO.js")),__vite__mapDeps([50,1,2,3,0,4,5,6,7,11,12,13,14,15,16,10,44,28,8])))),vn=l((()=>s((()=>import("./RewardsRoutes-CS-_8unl.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,0,8])))),On=l((()=>s((()=>import("./TaskRoutes-BDVAqm9e.js")),__vite__mapDeps([64,1,2,3,0,4,5,6,7,14,19,20,21,65,11,8])))),Un=l((()=>s((()=>import("./AiCfoScreen-ZhNzgLev.js")),__vite__mapDeps([66,1,2,3,4,5,6,7,22,53,8])))),Ue=l((()=>s((()=>import("./CardsAiCfoScreen-C9jErKn4.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,8])))),C=l((()=>s((()=>import("./NotFoundScreen-B6L1cY3I.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),Pn=l((()=>s((()=>import("./TaskListScreen-DsFWTjuD.js").then((a=>a.f))),__vite__mapDeps([65,1,2,3,4,5,6,7,11,19,20,21,8])))),wn=({isDashboardAccess:a,showZeniAccountRoute:A,isUserHasBillPayAccess:B,isUserHasReimbursementAccess:i,showTreasuryRoute:V,isTenantBankingOnly:O,isTenantCardsOnly:v,showChargeCardRoute:k})=>{if(O===!0){if(A)return e.jsx(u,{to:"checking"});if(V)return e.jsx(u,{to:"treasury"});if(k)return e.jsx(u,{to:"cards"})}return v===!0&&k?e.jsx(u,{to:"cards"}):a?e.jsx(u,{to:"dashboard"}):A?e.jsx(u,{to:"checking"}):V?e.jsx(u,{to:"treasury"}):k?e.jsx(u,{to:"cards"}):B?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},Pe=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/dashboard`}),Mn=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:a}){const A=Gs(),B=$s(),{tenantEmailDomain:i}=zs(),V=Js().mode,{setLoading:O,clearAllLoading:v,clearLoading:k}=Ws(),f=D.getSignedInUserTenant(i)?.tenantId,j=D.getSignedInUser(),W=ms(j),z=qs(),[L,we]=P.useState(!1),r=$((o=>_s(o))),{useFeatureGate:S}=Qs(),Z=Ks(),ae=Xs(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Ve}=S(M.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=S(M.isDebitCardFeatureEnabled),T=$((o=>o.tenantState.fetchState)),p=$((o=>o.tenantState.activeTenantFetchState.fetchState)),E=p==="Completed"||T==="Completed"?Es(oe,r):void 0,Q=p==="Completed"||T==="Completed"?hs(r):void 0,re=p==="Completed"||T==="Completed"?ps(r)&&!gs(r):void 0,ke=en(r,Ve,oe),{isCardsHidden:He}=sn(r?.tenantId),Be=!ke||!!He,{isFeatureEnabled:Se}=S(M.isSettingsFeatureEnabled),{isFeatureEnabled:K}=S(M.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=S(M.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||an==="DEV",Ze=r?.userRole!=null&&xs(r.userRole),q=$((o=>Rs(o)));if(i!=null){const o=D.getSignedInUserTenant(i);j!=null&&o!=null&&fe(j,r,V)}const G={tenantId:f,userId:j?.userId,sessionId:j?.zeniSessionId},ie=Is(),h=nn(),Ge=r.company==null||h?.loggedInUserRoleMap!=null&&pe(h.loggedInUserRole),$e=js(h?.loggedInUserRoleMap),X=Te("/:tenantEmailDomain/onboarding/*")!==null,ee=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),ze=$((o=>G.tenantId!=null?Ts(o,G.tenantId):void 0));P.useEffect((()=>{O(F.TENANT_FETCHING),a(i)}),[i]),P.useEffect((()=>{if(ee!=null&&f!=null){const o=ee.params.selectedPeriod;if(o!=null){const b=o.split("-");if(b.length===2){const d=As(Number(b[0])),n=Number(b[1]),c=fs(`01-${d<10?`0${d}`:d}-${n}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),N=bs();c.isAfter(N,"month")===!1?A(Ds(f,{month:d,year:n})):B(`/${i}/month_end_close_checks/review`)}}}}),[ee,f]),P.useEffect((()=>{L||(we(!0),O(F.TENANT_FETCHING))}),[L,G,ie,j,A,D]),P.useLayoutEffect((()=>{!ys(ie,G)&&D.isSignedIn()&&(O(F.TENANT_FETCHING),(function(o,b,d,n){if(xe(b?.userId,b?.zeniSessionId,o.tenantId),d(Ms(!0)),d(Re(o.tenantId)),o.tenantId!=null&&_.clearTenant(o.tenantId),o.tenantId!=null){const c=D.getSignedInUserTenantWithId(o.tenantId);n&&Ae.updateAppLocaleID(on(n)),c?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(c?.tenantEmailDomain)}o.userId!=null?ne.identify(o.userId,{tenant_id:o.tenantId}):ne.resetUserIdentity()})(G,j,A,ze))}),[f]),P.useEffect((()=>{D.isSignedIn()&&(O(F.TENANT_FETCHING),(function(o,b,d,n,c,N,H){if(d==null&&n==null)return void console.warn("There is no current tenant selected!!");const Y=n!=null&&c?.zeniSessionId!=null,us=d==null||d.tenantId!==n,ds=d!=null&&d.excludedResources==null,cs=d!=null&&d.externalConnections==null;if(Y&&us){H(Re(n));const J=D.getSignedInUserTenantWithId(n);J?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(J?.tenantEmailDomain),xe(c?.userId,c?.zeniSessionId,n),_.shouldFetchExcludedResources(n)&&(_.markExcludedResourcesFetchStarted(n),H(Ie(c.userId,n))),_.shouldFetchConnections(n)&&(_.markConnectionsFetchStarted(n),H(je(c.userId,n)))}else Y&&ds&&_.shouldFetchExcludedResources(n)&&(_.markExcludedResourcesFetchStarted(n),H(Ie(c.userId,n))),Y&&cs&&_.shouldFetchConnections(n)&&(_.markConnectionsFetchStarted(n),H(je(c.userId,n)));if(Y){ne.identify(c.userId,{tenant_id:n});const J=n==null||n!=null&&(b==="Completed"||b==="Error");o==="Completed"||b!=="Not-Started"&&b!=="Error"||n==null||!_.shouldFetchActiveTenant(n)||(_.markActiveTenantFetchStarted(n),N(F.TENANT_FETCHING),H(Zs(c.userId,n,c.zeniSessionId))),J&&(o==="Not-Started"||o==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),H(ge(c.userId,c.zeniSessionId)))}})(T,p,r,f,j,O,A))}),[f,p]),P.useEffect((()=>{D.isSignedIn()&&T==="Completed"&&q.tenantsBaseInOrder.length>0&&(k(F.TENANT_FETCHING),D.saveSignedInUserTenants(Cs(q.tenantsBaseInOrder)),j!=null&&fe(j,r,V,void 0,q.tenantsBaseInOrder))}),[q,T,r,j]),P.useEffect((()=>{p==="In-Progress"&&O(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&f!=null?(v(),_.markActiveTenantFetchCompleted(f)):p==="Error"&&f!=null&&(_.markActiveTenantFetchFailed(f),k(F.TENANT_FETCHING),k(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,f,L]);const le=P.useRef(!1);P.useEffect((()=>{!le.current&&p==="Completed"&&L&&(le.current=!0,(function(o=cn,b=3e3){setTimeout((()=>{const d=n=>{if(n>=o.length)return;const c=o[n],N=dn[c];N!=null?N().then((()=>te((()=>d(n+1))))).catch((()=>te((()=>d(n+1))))):d(n+1)};te((()=>d(0)))}),b)})())}),[p,L]);const U=r?.userRole!=null&&vs(r?.userRole),{isFeatureEnabled:qe}=S(M.isReferralFeatureEnabled),Ye=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Je=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),w=r?.userRole!=null&&pe(r.userRole),ue=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!U,de=!Be&&!U,We=Os(h?.loggedInUserRoleMap),Qe=r.externalConnections?.accounting[0]?.isValid,Ke=r.externalConnections?.fetchState==="Completed",se=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!U,me=ce&&Us(h?.loggedInUserRoleMap),_e=Fe&&!U,Xe=Le&&!U,es=ue&&Ps(h?.loggedInUserRoleMap),ss=de&&ws(h?.loggedInUserRoleMap),ns=_e&&Fs(h?.loggedInUserRoleMap),ts=Ls(h?.loggedInUserRoleMap),as=Vs(h?.loggedInUserRoleMap),os=ks(h?.loggedInUserRoleMap),rs=Hs(h?.loggedInUserRoleMap),is=Bs(h?.loggedInUserRoleMap),g=Ss(h?.loggedInUserRoleMap),x=Ns(h?.loggedInUserRoleMap),Ee=ue&&g,he=ce&&x,R=_e&&os,I=Xe&&rs,m=de&&is,ls=r.excludedResources?.resources?.find((o=>o.resource==="/invites"))!=null||$e===!0||We===!0||ts===!0||as===!0;return D.isSignedIn()?f==null?T==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(j!=null&&T!=="In-Progress"&&A(ge(j.userId,j.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||T==="Completed"?(se===!0||W&&!X)&&Ke&&Qe!==!0&&E===!1&&Q===!1&&re===!1?(a(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||re!==!0||se!==!0||X||W?!L||se!==!1||X||W?L&&r?.userRole&&E!=null&&Q!=null&&i!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(Ys,{children:e.jsxs(t,{element:e.jsx(tn,{}),children:[e.jsx(t,{path:"/",element:e.jsx(wn,{isDashboardAccess:w,showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,isTenantCardsOnly:Q,showChargeCardRoute:m})}),e.jsx(t,{path:"dashboard/*",element:w?e.jsx(Rn,{}):e.jsx(y,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reports/*",element:w?e.jsx(mn,{}):e.jsx(y,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"people/*",element:ls||w?e.jsx(En,{}):e.jsx(y,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"forecast/*",element:w?e.jsx(hn,{}):e.jsx(y,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(pn,{})}),e.jsx(t,{path:"transaction/*",element:w&&U===!1||Ye||Je?e.jsx(xn,{}):e.jsx(y,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"transactions/*",element:w&&U===!1?e.jsx(fn,{}):e.jsx(y,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"customer/*",element:w&&U===!1?e.jsx(Ce,{entityType:"customer"}):e.jsx(y,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isTenantBankingOnly:E,showTreasuryRoute:I,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"vendor/*",element:w&&U===!1?e.jsx(Ce,{entityType:"vendor"}):e.jsx(y,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"tasks",element:e.jsx(Pn,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(On,{})}),e.jsx(t,{path:"address/*",element:es||me||ns||ss?e.jsx(_n,{}):e.jsx(y,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"checking/*",element:R?e.jsx(Tn,{}):e.jsx(C,{})}),e.jsx(t,{path:"treasury/*",element:I?e.jsx(An,{}):e.jsx(C,{})}),e.jsx(t,{path:"performance",element:ae===!0?e.jsx(yn,{}):e.jsx(Pe,{tenantEmailDomain:i})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ae===!0&&U===!1?e.jsx(Cn,{}):e.jsx(Pe,{tenantEmailDomain:i})}),e.jsx(t,{path:"notifications/*",element:e.jsx(Dn,{})}),e.jsx(t,{path:"vendors/*",element:Ge?e.jsx(gn,{}):e.jsx(C,{})}),e.jsx(t,{path:"bill/*",element:Ee?e.jsx(ve,{}):e.jsx(y,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"bills/*",element:Ee?e.jsx(ve,{}):e.jsx(y,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reimbursement/*",element:he?e.jsx(Oe,{}):e.jsx(y,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reimbursements/*",element:he?e.jsx(Oe,{}):e.jsx(y,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"settings/*",element:Se?e.jsx(In,{hasAdminLevelAccess:me}):e.jsx(C,{})}),e.jsx(t,{path:"invoicing/*",element:Me&&Ze?e.jsx(jn,{}):e.jsx(C,{})}),e.jsx(t,{path:"cards/ask",element:m&&Z?e.jsx(Ue,{isFileUploadEnabled:K}):e.jsx(C,{})}),e.jsx(t,{path:"cards/ask/:session_id",element:m&&Z?e.jsx(Ue,{isFileUploadEnabled:K}):e.jsx(C,{})}),e.jsx(t,{path:"cards/*",element:m?e.jsx(bn,{}):e.jsx(C,{})}),e.jsx(t,{path:"rewards/*",element:qe?e.jsx(vn,{}):e.jsx(C,{})}),e.jsx(t,{path:"/ai-cfo",element:Z?e.jsx(u,{to:"explore"}):e.jsx(C,{})}),e.jsx(t,{path:"/ai-cfo/",element:Z?e.jsx(u,{to:"explore"}):e.jsx(C,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:Z?e.jsx(Un,{isFileUploadEnabled:K}):e.jsx(C,{})}),e.jsx(t,{path:"*",element:e.jsx(C,{})})]})}):null:(a(void 0),e.jsx(u,{to:`/${i}/onboarding`,replace:!0})):(a(void 0),e.jsx(u,{to:`/${i}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),a(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{y as F,Mn as S};
@@ -1,4 +1,4 @@
1
- import{j as a}from"./liveblocks-D83XGo_c.js";import{a as d}from"./sentry-BPfEBx2C.js";import{h as N,g as Z,u as T,i as V,j as C,l as K,n as Q,o as k}from"./core-CGqhbBHO.js";import{fB as w,Yk as ve,ME as Pe,XU as we,Y1 as Ae,c7 as J,cQ as De,cR as Ue,bq as Te,da as _e,E$ as Re,Yl as Me,O5 as Be,Lv as Fe,Lm as de,Lj as Le,F3 as ue,Lp as pe,Ls as ge,Ly as W,Bf as ee,F2 as Oe,l8 as G,lb as me,Ym as Ne,ml as Ve,Fl as Ye,UA as $e,UB as Ge,l6 as Ze,Yn as Ke,l9 as He,tK as ze,Uv as qe,Uw as Qe,tO as Xe,hS as Je,Tv as q,hK as ae,hH as We,hP as en,Tw as nn,Fi as tn,Yo as an,Yp as on,LM as sn,lF as rn,dU as fe,dV as he,Yq as ln,gz as cn,TK as dn,Fh as oe,gE as se,gD as un,Fg as pn,gC as gn,gB as mn,Yr as fn,S_ as Ce,Ys as hn,Yt as Cn,Yu as yn,Yv as Sn,Yw as bn,Yx as In,Fo as En,Yy as xn,Ff as ie,F9 as $,Yz as kn,YA as jn,YB as re,YC as vn,dN as Pn,YD as wn,YE as An,YF as Dn,T8 as Un,b$ as Tn,c6 as _n,c5 as Rn,c0 as Mn,YG as Bn,c3 as Fn,c2 as Ln,c4 as On,c1 as Nn}from"./zeni-epic-state-DASyz1An.js";import{bQ as Vn,z as P,U as Y,a5 as ne,c0 as Yn,k as H,I as te,d as L,h as ye,O as Se,c1 as $n,j as Gn,X as be,c2 as Zn,ag as Kn,c3 as Hn,c4 as zn,ao as qn,c5 as Qn,p as Xn,e as Ie,c6 as Jn}from"./index-CoKBrrSw.js";import{n as B}from"./mui-CD71lp6N.js";import{u as Ee}from"./useTaskManagerAccess-Dl-8FUHJ.js";import{U as Wn}from"./AccountMappingScreen-C0aQk3eU.js";import{t as et,A as nt}from"./AddressScreen-BD6hfTYm.js";import O from"./NotFoundScreen-RGfzDsux.js";import{g as tt}from"./analyticsHelper-DtAHYi5r.js";import{u as at,B as ot}from"./BusinessVerificationPageScreen-C37udtB6.js";import{C as st}from"./CompanyPassportScreen-C02FQ11m.js";import{M as R}from"./MobileAppDrawer-Dt611RZ9.js";import{u as it,a as rt}from"./useEmailConnectResultRefresh-BxNSbaGA.js";import{q as le}from"./QBOConnectionScreen-Ck8uFfex.js";import{B as lt}from"./BillPayApprovalRoutes-D-5hMi6f.js";import{R as ct}from"./ReimbursementApprovalRoutes-5mZE12FG.js";import"./recharts-2kmMgB1t.js";import"./analytics-CsbG8awP.js";import"./plaid-C8_LWTII.js";import"./dnd-CyZNzT3I.js";import"./stripe-cKAAJElX.js";import"./lottie-DeqWxWVC.js";import"./lexical-C5ZCOEAv.js";import"./pdf-D4eEcTTi.js";import"./utils-B6XFkcn3.js";import"./accountMappingHelper-L9SkIWKz.js";import"./routePaths-DU2fgaW2.js";import"./InboxNotificationsProvider-DDRknvRh.js";import"./empty-CIUWZs8G.js";import"./pdf-lib-Bd7L71QV.js";import"./index-QncEC5ur.js";import"./url-DSofFSVz.js";import"./index-BcNWzeQF.js";import"./decodeURIComponentSafe-6FvQaIqS.js";import"./ReimbursementApprovalRuleDetailScreen-BFUt_Xh2.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]="c3e3298e-7f1e-4ecf-abcf-bd085c2c02b6",e._sentryDebugIdIdentifier="sentry-dbid-c3e3298e-7f1e-4ecf-abcf-bd085c2c02b6")}catch{}})();const dt=B.div`
1
+ import{j as a}from"./liveblocks-D0hIH2N0.js";import{a as d}from"./sentry-DhqS_W-k.js";import{h as N,g as Z,u as T,i as V,j as C,l as K,n as Q,o as k}from"./core-35eDsgGP.js";import{fB as w,Yk as ve,ME as Pe,XU as we,Y1 as Ae,c7 as J,cQ as De,cR as Ue,bq as Te,da as _e,E$ as Re,Yl as Me,O5 as Be,Lv as Fe,Lm as de,Lj as Le,F3 as ue,Lp as pe,Ls as ge,Ly as W,Bf as ee,F2 as Oe,l8 as G,lb as me,Ym as Ne,ml as Ve,Fl as Ye,UA as $e,UB as Ge,l6 as Ze,Yn as Ke,l9 as He,tK as ze,Uv as qe,Uw as Qe,tO as Xe,hS as Je,Tv as q,hK as ae,hH as We,hP as en,Tw as nn,Fi as tn,Yo as an,Yp as on,LM as sn,lF as rn,dU as fe,dV as he,Yq as ln,gz as cn,TK as dn,Fh as oe,gE as se,gD as un,Fg as pn,gC as gn,gB as mn,Yr as fn,S_ as Ce,Ys as hn,Yt as Cn,Yu as yn,Yv as Sn,Yw as bn,Yx as In,Fo as En,Yy as xn,Ff as ie,F9 as $,Yz as kn,YA as jn,YB as re,YC as vn,dN as Pn,YD as wn,YE as An,YF as Dn,T8 as Un,b$ as Tn,c6 as _n,c5 as Rn,c0 as Mn,YG as Bn,c3 as Fn,c2 as Ln,c4 as On,c1 as Nn}from"./zeni-epic-state-BRRtwAQl.js";import{bQ as Vn,z as P,U as Y,a5 as ne,c0 as Yn,k as H,I as te,d as L,h as ye,O as Se,c1 as $n,j as Gn,X as be,c2 as Zn,ag as Kn,c3 as Hn,c4 as zn,ao as qn,c5 as Qn,p as Xn,e as Ie,c6 as Jn}from"./index-BBhWSYD8.js";import{n as B}from"./mui-CY_LMiAy.js";import{u as Ee}from"./useTaskManagerAccess-DRrr5b-Z.js";import{U as Wn}from"./AccountMappingScreen-vvnlkgXd.js";import{t as et,A as nt}from"./AddressScreen-anqh6to9.js";import O from"./NotFoundScreen-B6L1cY3I.js";import{g as tt}from"./analyticsHelper-Cq4tYGNc.js";import{u as at,B as ot}from"./BusinessVerificationPageScreen-BnngOdPs.js";import{C as st}from"./CompanyPassportScreen-BQcZnLc-.js";import{M as R}from"./MobileAppDrawer-C9wi8312.js";import{u as it,a as rt}from"./useEmailConnectResultRefresh-D_zBEeqz.js";import{q as le}from"./QBOConnectionScreen-CIODRsNA.js";import{B as lt}from"./BillPayApprovalRoutes-BWcKljpL.js";import{R as ct}from"./ReimbursementApprovalRoutes-DfUkgvoL.js";import"./recharts-B8j-bW95.js";import"./analytics-p9dV2gEo.js";import"./plaid-CoaHurGj.js";import"./dnd-Dm1d6mZC.js";import"./stripe-cKAAJElX.js";import"./lottie-TJOzQ6Cz.js";import"./lexical-DQ4lSvQh.js";import"./pdf-DElOA9Iz.js";import"./utils-CgQOqOwX.js";import"./accountMappingHelper-C4yUO_tP.js";import"./routePaths-BgYQMm9p.js";import"./InboxNotificationsProvider-yp4VlF4V.js";import"./empty-BDPRkuRZ.js";import"./pdf-lib-D54M6RaZ.js";import"./index-D-ldiYpS.js";import"./url-BlblTlRS.js";import"./index-B3U6gyEe.js";import"./decodeURIComponentSafe-DhnAz_92.js";import"./ReimbursementApprovalRuleDetailScreen-HPs-AWde.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]="c3e3298e-7f1e-4ecf-abcf-bd085c2c02b6",e._sentryDebugIdIdentifier="sentry-dbid-c3e3298e-7f1e-4ecf-abcf-bd085c2c02b6")}catch{}})();const dt=B.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as d}from"./liveblocks-D83XGo_c.js";import{h as Q,g as J,u as ee,i as G,j as v,N as j,l as W,t as Je}from"./core-CGqhbBHO.js";import{bJ as en,fB as F,cF as nn,GS as $,XU as tn,XX as an,u1 as ne,tR as te,md as ae,AN as R,XZ as Ce,gD as Ye,gC as Ge,gB as We,X_ as sn,G$ as on,Lv as he,Lm as Ie,Lj as Ae,L1 as q,Lp as _e,Ls as ke,Ly as ve,Bf as Pe,gX as cn,cA as rn,dV as dn,dU as un,de as ln,bt as pn,ct as Fe,X$ as mn,K1 as ue,KF as yn,Y0 as fn,bK as gn,MQ as le,ME as Sn,Y1 as bn,Y2 as Cn,MU as hn,MY as In,Y3 as je,AG as An,Rk as _n,Nu as be,Oj as pe,Y4 as kn,Y5 as vn,Y6 as Pn,Y7 as He,Y8 as Tn,Uj as En,X9 as Dn,Uy as Un,Y9 as Xe,L5 as wn,Uz as On,L9 as Fn,Ya as Oe,NE as Ke,ml as xn,tU as qe,AP as Vn,bE as Ne,A$ as Re,cD as Bn,Yb as Qe,Nb as jn,Nc as Nn,Ng as Rn,Yc as Ln,Nx as Le,Yd as zn,Ye as Mn,Yf as Zn,Yg as $n,gS as Yn,Ia as Gn,Yh as Wn,If as Hn,Ie as Xn}from"./zeni-epic-state-DASyz1An.js";import{ag as Te,U as ie,I as me,d as K,E as Ee,z as E,a6 as se,k as D,a5 as De,S as Y,bN as Kn,ac as oe,bO as x,bg as xe,bP as qn,bQ as Qn,bR as Jn,q as Be,bS as et,p as ze,aE as Me,$ as nt,a9 as tt,bT as at,bU as it,bV as st,w as ot}from"./index-CoKBrrSw.js";import{a as h}from"./sentry-BPfEBx2C.js";import{n as Ve,D as ct,S as rt}from"./mui-CD71lp6N.js";import{u as dt,B as we}from"./BusinessVerificationPageScreen-C37udtB6.js";import{M as ye}from"./MobileAppDrawer-Dt611RZ9.js";import N from"./NotFoundScreen-RGfzDsux.js";import{a as Ze}from"./analyticsHelper-DtAHYi5r.js";import{d as $e}from"./routePaths-DU2fgaW2.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="d89c0d9e-71fe-4e1d-9195-667756ce9ea3",e._sentryDebugIdIdentifier="sentry-dbid-d89c0d9e-71fe-4e1d-9195-667756ce9ea3")}catch{}})();const ut=Ve.div`
1
+ import{j as d}from"./liveblocks-D0hIH2N0.js";import{h as Q,g as J,u as ee,i as G,j as v,N as j,l as W,t as Je}from"./core-35eDsgGP.js";import{bJ as en,fB as F,cF as nn,GS as $,XU as tn,XX as an,u1 as ne,tR as te,md as ae,AN as R,XZ as Ce,gD as Ye,gC as Ge,gB as We,X_ as sn,G$ as on,Lv as he,Lm as Ie,Lj as Ae,L1 as q,Lp as _e,Ls as ke,Ly as ve,Bf as Pe,gX as cn,cA as rn,dV as dn,dU as un,de as ln,bt as pn,ct as Fe,X$ as mn,K1 as ue,KF as yn,Y0 as fn,bK as gn,MQ as le,ME as Sn,Y1 as bn,Y2 as Cn,MU as hn,MY as In,Y3 as je,AG as An,Rk as _n,Nu as be,Oj as pe,Y4 as kn,Y5 as vn,Y6 as Pn,Y7 as He,Y8 as Tn,Uj as En,X9 as Dn,Uy as Un,Y9 as Xe,L5 as wn,Uz as On,L9 as Fn,Ya as Oe,NE as Ke,ml as xn,tU as qe,AP as Vn,bE as Ne,A$ as Re,cD as Bn,Yb as Qe,Nb as jn,Nc as Nn,Ng as Rn,Yc as Ln,Nx as Le,Yd as zn,Ye as Mn,Yf as Zn,Yg as $n,gS as Yn,Ia as Gn,Yh as Wn,If as Hn,Ie as Xn}from"./zeni-epic-state-BRRtwAQl.js";import{ag as Te,U as ie,I as me,d as K,E as Ee,z as E,a6 as se,k as D,a5 as De,S as Y,bN as Kn,ac as oe,bO as x,bg as xe,bP as qn,bQ as Qn,bR as Jn,q as Be,bS as et,p as ze,aE as Me,$ as nt,a9 as tt,bT as at,bU as it,bV as st,w as ot}from"./index-BBhWSYD8.js";import{a as h}from"./sentry-DhqS_W-k.js";import{n as Ve,D as ct,S as rt}from"./mui-CY_LMiAy.js";import{u as dt,B as we}from"./BusinessVerificationPageScreen-BnngOdPs.js";import{M as ye}from"./MobileAppDrawer-C9wi8312.js";import N from"./NotFoundScreen-B6L1cY3I.js";import{a as Ze}from"./analyticsHelper-Cq4tYGNc.js";import{d as $e}from"./routePaths-BgYQMm9p.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="d89c0d9e-71fe-4e1d-9195-667756ce9ea3",e._sentryDebugIdIdentifier="sentry-dbid-d89c0d9e-71fe-4e1d-9195-667756ce9ea3")}catch{}})();const ut=Ve.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{j as u}from"./liveblocks-D83XGo_c.js";import{a as f,R as x,q as A}from"./sentry-BPfEBx2C.js";import{u as z,h as D,j as l,g as M,N as j,l as O}from"./core-CGqhbBHO.js";import{u as P,z as s,E as _,k as w,G as B,R as F,S as N,T as R,V,W,X as v}from"./index-CoKBrrSw.js";import{fB as X,SX as $,Tb as q,ge as J,gg as G,Tg as H,gR as K,df as Q,Th as T,Ti as Y,Tj as Z,b_ as y}from"./zeni-epic-state-DASyz1An.js";import"./mui-CD71lp6N.js";import{u as ee}from"./useDeviceId-D_DsCe-9.js";import{f as te}from"./analyticsHelper-DtAHYi5r.js";import{t as ne}from"./getLocaleForTenant-CSGkphtC.js";import"./recharts-2kmMgB1t.js";import"./analytics-CsbG8awP.js";import"./plaid-C8_LWTII.js";import"./dnd-CyZNzT3I.js";import"./stripe-cKAAJElX.js";import"./lottie-DeqWxWVC.js";import"./lexical-C5ZCOEAv.js";import"./pdf-D4eEcTTi.js";import"./utils-B6XFkcn3.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]="aa5b7564-a919-4761-81c1-26a63756f22d",t._sentryDebugIdIdentifier="sentry-dbid-aa5b7564-a919-4761-81c1-26a63756f22d")}catch{}})();const ie=O((function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}}),(function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const c=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Z({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(c),sourceUri:y(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(Y(n,a)))},clearSignInError:()=>{t(T())}}}))(W),ae=x.memo(ie);function ve({setTenantEmailDomain:t}){const i=z(),d=D(),{clearAllLoading:g}=P(),n=s.getSignedInUser();f.useLayoutEffect((()=>{g()}),[g]);const a=ee(),c=l((e=>e.tenantState.magicLinkCodeVerifier)),{sendEmailMagicLinkFetchState:h,accountLocked:b,accountUnlockTime:k}=l((e=>e.tenantState)),p=l((e=>e.tenantState.fetchState)),L=l((e=>e.tenantState.activeTenantFetchState.fetchState)),S=l((e=>e.tenantState.signInState)),o=l((e=>e.tenantState.loggedInUser)),r=l((e=>X(e))),I=l((e=>$(e))),m=M(),E=_().mode,C=m.state?.magicLinkExpired,U=m.state?.magicLinkAlreadyUsed;if(f.useEffect((()=>{h.fetchState==="Completed"&&c!=null&&(w.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))}),[h.fetchState,c]),f.useEffect((()=>{t(void 0)}),[]),f.useEffect((()=>{S!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(q(I.tenantsInOrder),o.zeniSessionId),J(o.userId,o.zeniSessionId,r.tenantId),i(G(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(H("Completed")),B.updateAppLocaleID(ne(r)),te(o,r,E,void 0,I.tenantsInOrder),K().then((()=>{const e=V();e!=null&&F(e)})),setTimeout((()=>{w.trackLogin(N.Event.loginSuccess,o.authProvider??"google",Q(r.productSettings))}),2e3))}),[S,p,L,o,r,I,E,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return u.jsx(j,{to:e,state:{...m.state,origin:""}})}return u.jsxs(u.Fragment,{children:[u.jsx(ae,{magicLinkExpired:!!C,magicLinkAlreadyUsed:!!U,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),b===!0&&k!=null?u.jsx(R,{onClose:()=>i(T()),unlockDate:k}):null]})}export{ve as default};
1
+ import{j as u}from"./liveblocks-D0hIH2N0.js";import{a as f,R as x,q as A}from"./sentry-DhqS_W-k.js";import{u as z,h as D,j as l,g as M,N as j,l as O}from"./core-35eDsgGP.js";import{u as P,z as s,E as _,k as w,G as B,R as F,S as N,T as R,V,W,X as v}from"./index-BBhWSYD8.js";import{fB as X,SX as $,Tb as q,ge as J,gg as G,Tg as H,gR as K,df as Q,Th as T,Ti as Y,Tj as Z,b_ as y}from"./zeni-epic-state-BRRtwAQl.js";import"./mui-CY_LMiAy.js";import{u as ee}from"./useDeviceId-Cd5EU_Dl.js";import{f as te}from"./analyticsHelper-Cq4tYGNc.js";import{t as ne}from"./getLocaleForTenant-C0JZQLGG.js";import"./recharts-B8j-bW95.js";import"./analytics-p9dV2gEo.js";import"./plaid-CoaHurGj.js";import"./dnd-Dm1d6mZC.js";import"./stripe-cKAAJElX.js";import"./lottie-TJOzQ6Cz.js";import"./lexical-DQ4lSvQh.js";import"./pdf-DElOA9Iz.js";import"./utils-CgQOqOwX.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]="aa5b7564-a919-4761-81c1-26a63756f22d",t._sentryDebugIdIdentifier="sentry-dbid-aa5b7564-a919-4761-81c1-26a63756f22d")}catch{}})();const ie=O((function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}}),(function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const c=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Z({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(c),sourceUri:y(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(Y(n,a)))},clearSignInError:()=>{t(T())}}}))(W),ae=x.memo(ie);function ve({setTenantEmailDomain:t}){const i=z(),d=D(),{clearAllLoading:g}=P(),n=s.getSignedInUser();f.useLayoutEffect((()=>{g()}),[g]);const a=ee(),c=l((e=>e.tenantState.magicLinkCodeVerifier)),{sendEmailMagicLinkFetchState:h,accountLocked:b,accountUnlockTime:k}=l((e=>e.tenantState)),p=l((e=>e.tenantState.fetchState)),L=l((e=>e.tenantState.activeTenantFetchState.fetchState)),S=l((e=>e.tenantState.signInState)),o=l((e=>e.tenantState.loggedInUser)),r=l((e=>X(e))),I=l((e=>$(e))),m=M(),E=_().mode,C=m.state?.magicLinkExpired,U=m.state?.magicLinkAlreadyUsed;if(f.useEffect((()=>{h.fetchState==="Completed"&&c!=null&&(w.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))}),[h.fetchState,c]),f.useEffect((()=>{t(void 0)}),[]),f.useEffect((()=>{S!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(q(I.tenantsInOrder),o.zeniSessionId),J(o.userId,o.zeniSessionId,r.tenantId),i(G(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(H("Completed")),B.updateAppLocaleID(ne(r)),te(o,r,E,void 0,I.tenantsInOrder),K().then((()=>{const e=V();e!=null&&F(e)})),setTimeout((()=>{w.trackLogin(N.Event.loginSuccess,o.authProvider??"google",Q(r.productSettings))}),2e3))}),[S,p,L,o,r,I,E,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return u.jsx(j,{to:e,state:{...m.state,origin:""}})}return u.jsxs(u.Fragment,{children:[u.jsx(ae,{magicLinkExpired:!!C,magicLinkAlreadyUsed:!!U,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),b===!0&&k!=null?u.jsx(R,{onClose:()=>i(T()),unlockDate:k}):null]})}export{ve as default};
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-D83XGo_c.js";import{a as i}from"./sentry-BPfEBx2C.js";import{u as l,g as d,N as u}from"./core-CGqhbBHO.js";import{z as n,k as a,S as m,a5 as p}from"./index-CoKBrrSw.js";import{gU as g,Tx as y}from"./zeni-epic-state-DASyz1An.js";import{n as b}from"./mui-CD71lp6N.js";import"./recharts-2kmMgB1t.js";import"./analytics-CsbG8awP.js";import"./plaid-C8_LWTII.js";import"./dnd-CyZNzT3I.js";import"./stripe-cKAAJElX.js";import"./lottie-DeqWxWVC.js";import"./lexical-C5ZCOEAv.js";import"./pdf-D4eEcTTi.js";import"./utils-B6XFkcn3.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]="f63f29c7-2bf9-45ec-94b2-1a28354962a9",e._sentryDebugIdIdentifier="sentry-dbid-f63f29c7-2bf9-45ec-94b2-1a28354962a9")}catch{}})();function N(){const e=l(),t=d(),r=i.useRef(!1),f=n.isSignedIn(),o=t.state?.message==="logout"||f;return i.useEffect((()=>{if(o&&!r.current){r.current=!0;try{e(g()),y(),a.trackLogout(m.Event.logoutSuccess),a.resetUserIdentity(),n.clearAll()}catch(c){console.error("Error during sign out:",c)}finally{window.location.replace("/signin/auth")}}}),[o,e]),o?s.jsx(h,{children:s.jsx(p,{fetchState:"In-Progress"})}):s.jsx(u,{to:"../",replace:!0})}const h=b.div`
1
+ import{j as s}from"./liveblocks-D0hIH2N0.js";import{a as i}from"./sentry-DhqS_W-k.js";import{u as l,g as d,N as u}from"./core-35eDsgGP.js";import{z as n,k as a,S as m,a5 as p}from"./index-BBhWSYD8.js";import{gU as g,Tx as y}from"./zeni-epic-state-BRRtwAQl.js";import{n as b}from"./mui-CY_LMiAy.js";import"./recharts-B8j-bW95.js";import"./analytics-p9dV2gEo.js";import"./plaid-CoaHurGj.js";import"./dnd-Dm1d6mZC.js";import"./stripe-cKAAJElX.js";import"./lottie-TJOzQ6Cz.js";import"./lexical-DQ4lSvQh.js";import"./pdf-DElOA9Iz.js";import"./utils-CgQOqOwX.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]="f63f29c7-2bf9-45ec-94b2-1a28354962a9",e._sentryDebugIdIdentifier="sentry-dbid-f63f29c7-2bf9-45ec-94b2-1a28354962a9")}catch{}})();function N(){const e=l(),t=d(),r=i.useRef(!1),f=n.isSignedIn(),o=t.state?.message==="logout"||f;return i.useEffect((()=>{if(o&&!r.current){r.current=!0;try{e(g()),y(),a.trackLogout(m.Event.logoutSuccess),a.resetUserIdentity(),n.clearAll()}catch(c){console.error("Error during sign out:",c)}finally{window.location.replace("/signin/auth")}}}),[o,e]),o?s.jsx(h,{children:s.jsx(p,{fetchState:"In-Progress"})}):s.jsx(u,{to:"../",replace:!0})}const h=b.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as C}from"./liveblocks-D83XGo_c.js";import{a as T}from"./sentry-BPfEBx2C.js";import{h as pa,u as fa,g as Ta,k as ga,j as F,i as _a,l as ma}from"./core-CGqhbBHO.js";import{aI as ba,aJ as Da,z as $,I as Sa,d as G,aq as ha,a6 as Ea,k as ya,S as Aa,e1 as Ca,p as w,a2 as Ga}from"./index-CoKBrrSw.js";import{fB as Ia,a0W as Y,Q6 as B,a0X as H,a0S as Ba,Pu as Q,a0Y as va,PC as W,Pc as Ka,OQ as La,Q7 as q,a0Z as V,gd as Pa,PZ as wa,Q2 as Ra,PR as Ua,PP as J,Q3 as Fa,PM as ja,a0_ as $a,a0$ as xa,a10 as Oa,a11 as Na,a12 as I,dt as Za,ds as za,a13 as Ma,P9 as Qa}from"./zeni-epic-state-DASyz1An.js";import{n as Wa}from"./mui-CD71lp6N.js";import{u as qa}from"./useAskAiCfoHostNavButtonProps-C4V1Wf7u.js";import{M as Va}from"./MobileAppDrawer-Dt611RZ9.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]="ebe7f48d-9921-4930-a0f3-3fb72864b653",e._sentryDebugIdIdentifier="sentry-dbid-ebe7f48d-9921-4930-a0f3-3fb72864b653")}catch{}})();const c={TASK_CREATED:"task-created",TASK_UPDATED:"task-updated",TASK_SNOOZE_RESURFACED:"task-snooze-resurfaced",TASKS_BULK_UPDATED:"tasks-bulk-updated",TASKS_BULK_DELETED:"tasks-bulk-deleted"},Ja=(e,a)=>e==null||e===""?[]:a.map((n=>`private-encrypted-${e}.${n}`)),Xa=(e,a)=>e==null||e===""?[]:a.map((n=>`private-encrypted-${e}.${n}`)),R=e=>Array.isArray(e)&&e.every((a=>typeof a=="string")),Ya=e=>{if(e==null||typeof e!="object")return null;const a=e,n=typeof a.task_id=="string"?a.task_id:typeof a.id=="string"?a.id:null;if(n==null||typeof a.tenant_id!="string"||typeof a.event_type!="string")return null;const o={task_id:n,tenant_id:a.tenant_id,event_type:a.event_type};return typeof a.is_private=="boolean"&&(o.is_private=a.is_private),R(a.assignees)&&(o.assignees=a.assignees),R(a.direct_assignees)&&(o.direct_assignees=a.direct_assignees),typeof a.created_by=="string"&&(o.created_by=a.created_by),R(a.task_group_ids)&&(o.task_group_ids=a.task_group_ids),typeof a.name=="string"&&(o.name=a.name),typeof a.parent_task_id=="string"&&(o.parent_task_id=a.parent_task_id),o},Ha=e=>{if(e==null||typeof e!="object")return null;const a=e;return R(a.task_ids)?{task_ids:a.task_ids}:null},pe=e=>{if(e==null||typeof e!="object")return null;const a=e;return typeof a.task_id!="string"?null:{task_id:a.task_id}},ae=e=>{const{events:a,onEvent:n,onSubscribed:o}=e,i=ba(),g=T.useRef(n),l=T.useRef(o),_=T.useRef(0);T.useEffect((()=>{g.current=n}),[n]),T.useEffect((()=>{l.current=o}),[o]);const t=T.useMemo((()=>[...a].sort().join("|")),[a]);T.useEffect((()=>{if(i==null||a.length===0)return;const s=[],p=new Set,S=()=>{if(l.current==null)return;const m=Date.now();m-_.current<5e3||(_.current=m,l.current())};return a.forEach((m=>{const[b,D]=Da(m);if(D==="")return;const E=i.channel(b),y=f=>{g.current(D,f)};let k;if(E?.subscribed===!0){if(k=E,k.bind(D,y),!p.has(b)){p.add(b),S();const f=()=>{S()};k.bind("pusher:subscription_succeeded",f),s.push((()=>{k.unbind("pusher:subscription_succeeded",f)}))}s.push((()=>{E.unbind(D,y)}))}else{if(k=E??i.subscribe(b),k.bind(D,y),!p.has(b)){p.add(b);const f=()=>{S()};k.bind("pusher:subscription_succeeded",f),s.push((()=>{k.unbind("pusher:subscription_succeeded",f)}))}s.push((()=>{k.unbind(D,y)}))}})),()=>{s.forEach((m=>m()))}}),[i,t])},ee=Wa.div`
1
+ import{j as C}from"./liveblocks-D0hIH2N0.js";import{a as T}from"./sentry-DhqS_W-k.js";import{h as pa,u as fa,g as Ta,k as ga,j as F,i as _a,l as ma}from"./core-35eDsgGP.js";import{aI as ba,aJ as Da,z as $,I as Sa,d as G,aq as ha,a6 as Ea,k as ya,S as Aa,e1 as Ca,p as w,a2 as Ga}from"./index-BBhWSYD8.js";import{fB as Ia,a0W as Y,Q6 as B,a0X as H,a0S as Ba,Pu as Q,a0Y as va,PC as W,Pc as Ka,OQ as La,Q7 as q,a0Z as V,gd as Pa,PZ as wa,Q2 as Ra,PR as Ua,PP as J,Q3 as Fa,PM as ja,a0_ as $a,a0$ as xa,a10 as Oa,a11 as Na,a12 as I,dt as Za,ds as za,a13 as Ma,P9 as Qa}from"./zeni-epic-state-BRRtwAQl.js";import{n as Wa}from"./mui-CY_LMiAy.js";import{u as qa}from"./useAskAiCfoHostNavButtonProps-DGTLHvUD.js";import{M as Va}from"./MobileAppDrawer-C9wi8312.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]="ebe7f48d-9921-4930-a0f3-3fb72864b653",e._sentryDebugIdIdentifier="sentry-dbid-ebe7f48d-9921-4930-a0f3-3fb72864b653")}catch{}})();const c={TASK_CREATED:"task-created",TASK_UPDATED:"task-updated",TASK_SNOOZE_RESURFACED:"task-snooze-resurfaced",TASKS_BULK_UPDATED:"tasks-bulk-updated",TASKS_BULK_DELETED:"tasks-bulk-deleted"},Ja=(e,a)=>e==null||e===""?[]:a.map((n=>`private-encrypted-${e}.${n}`)),Xa=(e,a)=>e==null||e===""?[]:a.map((n=>`private-encrypted-${e}.${n}`)),R=e=>Array.isArray(e)&&e.every((a=>typeof a=="string")),Ya=e=>{if(e==null||typeof e!="object")return null;const a=e,n=typeof a.task_id=="string"?a.task_id:typeof a.id=="string"?a.id:null;if(n==null||typeof a.tenant_id!="string"||typeof a.event_type!="string")return null;const o={task_id:n,tenant_id:a.tenant_id,event_type:a.event_type};return typeof a.is_private=="boolean"&&(o.is_private=a.is_private),R(a.assignees)&&(o.assignees=a.assignees),R(a.direct_assignees)&&(o.direct_assignees=a.direct_assignees),typeof a.created_by=="string"&&(o.created_by=a.created_by),R(a.task_group_ids)&&(o.task_group_ids=a.task_group_ids),typeof a.name=="string"&&(o.name=a.name),typeof a.parent_task_id=="string"&&(o.parent_task_id=a.parent_task_id),o},Ha=e=>{if(e==null||typeof e!="object")return null;const a=e;return R(a.task_ids)?{task_ids:a.task_ids}:null},pe=e=>{if(e==null||typeof e!="object")return null;const a=e;return typeof a.task_id!="string"?null:{task_id:a.task_id}},ae=e=>{const{events:a,onEvent:n,onSubscribed:o}=e,i=ba(),g=T.useRef(n),l=T.useRef(o),_=T.useRef(0);T.useEffect((()=>{g.current=n}),[n]),T.useEffect((()=>{l.current=o}),[o]);const t=T.useMemo((()=>[...a].sort().join("|")),[a]);T.useEffect((()=>{if(i==null||a.length===0)return;const s=[],p=new Set,S=()=>{if(l.current==null)return;const m=Date.now();m-_.current<5e3||(_.current=m,l.current())};return a.forEach((m=>{const[b,D]=Da(m);if(D==="")return;const E=i.channel(b),y=f=>{g.current(D,f)};let k;if(E?.subscribed===!0){if(k=E,k.bind(D,y),!p.has(b)){p.add(b),S();const f=()=>{S()};k.bind("pusher:subscription_succeeded",f),s.push((()=>{k.unbind("pusher:subscription_succeeded",f)}))}s.push((()=>{E.unbind(D,y)}))}else{if(k=E??i.subscribe(b),k.bind(D,y),!p.has(b)){p.add(b);const f=()=>{S()};k.bind("pusher:subscription_succeeded",f),s.push((()=>{k.unbind("pusher:subscription_succeeded",f)}))}s.push((()=>{k.unbind(D,y)}))}})),()=>{s.forEach((m=>m()))}}),[i,t])},ee=Wa.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as r}from"./liveblocks-D83XGo_c.js";import de from"./NotFoundScreen-RGfzDsux.js";import{a as k}from"./sentry-BPfEBx2C.js";import{h as J,u as ee,j as E,g as ue,i as ke,N as pe,l as me,n as Se,o as b}from"./core-CGqhbBHO.js";import{P1 as ae,P4 as fe,O_ as Te,YN as ge,fB as te,a0S as se,Pq as g,Pi as T,OX as he,PW as be,PP as Ee,a0T as ne,gd as oe,a0U as Z,OT as Ie,OQ as De,u1 as Ce,tR as Ge,md as Pe,Pg as _e,a0V as ye,Q7 as Re,Pc as Ue,PB as Be,Py as xe,P7 as ve,Pv as we,Pu as Ae}from"./zeni-epic-state-DASyz1An.js";import{z as _,d$ as je,c as Fe,I as Le,d as G,a2 as ie,p as P,a6 as Ke,k as M,S as $e,e0 as Oe,X as Q,ac as Ne}from"./index-CoKBrrSw.js";import{n as Ve}from"./mui-CD71lp6N.js";import{u as ze}from"./useInitialThreadRequest-CP8MsLNf.js";import{M as qe}from"./MobileAppDrawer-Dt611RZ9.js";import{b as Ze,a as Me,u as Qe,T as f,t as We,c as W,d as X,e as Xe}from"./TaskListScreen-Cln-YyNE.js";import"./recharts-2kmMgB1t.js";import"./analytics-CsbG8awP.js";import"./plaid-C8_LWTII.js";import"./dnd-CyZNzT3I.js";import"./stripe-cKAAJElX.js";import"./lottie-DeqWxWVC.js";import"./lexical-C5ZCOEAv.js";import"./pdf-D4eEcTTi.js";import"./utils-B6XFkcn3.js";import"./InboxNotificationsProvider-DDRknvRh.js";import"./useTaskManagerAccess-Dl-8FUHJ.js";import"./useAskAiCfoHostNavButtonProps-C4V1Wf7u.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]="3db9fd63-e5e6-40c9-aa83-3c5833b754de",e._sentryDebugIdIdentifier="sentry-dbid-3db9fd63-e5e6-40c9-aa83-3c5833b754de")}catch{}})();function Ye(){const e=J(),a=ee(),n=_.getSignedInUser(),{cannedResponses:c,fetchState:s,saveFetchState:d}=E((o=>o.cannedResponsesState)),u=k.useCallback((()=>{a(ae())}),[a]),m=k.useCallback(((o,I,D)=>{a(fe({name:o,content:I,cannedResponseId:D}))}),[a]),t=k.useCallback((o=>{a(Te({cannedResponseId:o}))}),[a]);if(n==null)throw Error("Can't access quick responses page without signing in...");return r.jsx(je,{cannedResponses:c,isLoading:s==="In-Progress"||s==="Not-Started",isSaving:d==="In-Progress",onBackClick:()=>e(-1),onDelete:t,onFetch:u,onSave:m})}const L=e=>e?.taskState?.taskByID,j=(e,a)=>{const n=L(e);if(a!=null&&n!=null)return n[a]?.parentTaskId??void 0},He=ge([j,(e,a)=>{const n=j(e,a),c=L(e);if(n!=null&&c!=null)return c[n]?.name},(e,a)=>{const n=j(e,a),c=L(e);return n!=null&&c!=null&&c[n]!=null}],((e,a,n)=>{if(e!=null&&n===!0)return{id:e,name:a??""}}));let Y,H=[];const Je=me((function(e,a){const{location:n,taskGroupId:c}=a,s=ne(e,a.taskId),d=te(e),u=He(e,a.taskId),m=s.taskGroupId??c,t=m!=null?Z(e.taskGroupState,m):void 0,o=_.getSignedInUser(),I=d.tenantId,D={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:I??""},B=se(e),{tenantEmailDomain:x}=d,y=s.recurringSourceTaskId,v=y!=null?`${Q.appUrl}/${x}/tasks/${encodeURIComponent(y)}`:void 0;var h;return{taskDetailSelectorView:s,authParams:D,isZeniUser:_.isZeniUser(),userGroupList:((h=e.userGroupsState.userGroupByUserGroupId)!==Y&&(Y=h,H=Object.values(h)),H),isNewClicked:n.state?.message==="comingFromTaskListPage",filesEndPoint:Ne.fileMicroServiceBaseUrl,companyName:a.currentTenant.companyName,companyId:a.currentTenant.companyId,currentUrl:`${Q.appUrl}${a.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:v,tagListView:B,taskGroupName:m!=null&&t!=null&&t.isDefault===!1?t.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map((S=>Z(e.taskGroupState,S))).filter((S=>S!=null&&!S.isDeleted)).map((S=>({id:S.id,name:S.name,isDefault:S.isDefault}))),subtasks:s.subtasks,parentTaskRef:u,subTaskCreateStatus:e.taskDetailState?.subTaskCreateStatus?.fetchState}}),(function(e,a){const{taskId:n,navigate:c,currentTenant:s,location:d,taskGroupId:u}=a,{tenantEmailDomain:m}=s;return{onSaveChangesToLocalStore:t=>{e(Ae({taskDetailLocalData:t,taskId:n}))},onSaveDetailClick:t=>{e(we(n,t??u))},onArchiveTaskClick:()=>{a.taskId!=null&&e(ve(a.taskId))},onSnoozeTask:(t,o)=>{e(xe(t,o))},onUnsnoozeTask:t=>{e(Be(t))},onCreateSubtask:(t,o)=>{e(Ue({...o,parentTaskId:t}))},onSubtaskUpdate:(t,o)=>{e(Re({task:t,updates:o}))},onShowToast:t=>{e(oe(t))},onSubtaskRowClick:t=>{c(`/${m}/tasks/${t}`,{state:{pathnameStackToGoBack:P(d.state?.pathnameStackToGoBack,d.pathname)}})},onParentBreadcrumbClick:t=>{c(`/${m}/tasks/${t}`,{state:{pathnameStackToGoBack:P(d.state?.pathnameStackToGoBack,d.pathname)}})},onDismissClick:()=>{if(d.state?.message==="triggerBackClick"){const t=ie(d.state?.pathnameStackToGoBack),o=t.poppedPathname??"../../dashboard";c(o,{state:{pathnameStackToGoBack:t.newStack}})}else{const t=U(m),o=P(d.state?.pathnameStackToGoBack,d.pathname);c(t,{state:{pathnameStackToGoBack:o}})}e(ye({taskId:n}))},onDeleteTaskClick:()=>{e(_e(n))},updateFilesEntity:t=>{e(Pe({files:t}))},onDeleteFile:t=>{e(Ge(t))},onEditFileName:(t,o)=>{e(Ce(t,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(g(!1,n))},onCreateTagClick:t=>{e(De(t,n))},onDeleteTagClick:t=>{e(Ie(t,n))},onFetchCannedResponses:()=>{e(ae())},onManageTemplatesClick:()=>{c(`/${s.tenantEmailDomain}/tasks/quick-responses`)}}}))(Oe);function F(){const e=J(),a=ee(),n=ue(),c=Fe(),{taskId:s,taskGroupId:d}=ke(),u=E((i=>te(i))),m=ze(u?.companyId),{useFeatureGate:t}=Le(),{isFeatureEnabled:o}=t(G.isTaskSnoozeEnabled),{isFeatureEnabled:I}=t(G.isTaskVisibilityEnabled),{isFeatureEnabled:D}=t(G.isTaskCannedResponsesEnabled),{isFeatureEnabled:B}=t(G.isTaskRecurringParentEnabled),{isFeatureEnabled:x}=t(G.isTaskGroupAssigneesEnabled),[y,v]=k.useState(!1),[h,S]=k.useState(!1),[K,re]=k.useState(!1),[$,w]=k.useState(!1),C=k.useRef(!1),R=E((i=>i.taskListState.updateTasksFetchState.fetchState)),O=E((i=>se(i))),N=E((i=>i.taskGroupViewState.fetchState));k.useEffect((()=>{a(g(!1,s)),s!=null&&a(T(s))}),[a,s]);const V=_.getSignedInUser()?.userId,ce=k.useMemo((()=>{const i=[f.TASK_CREATED,f.TASK_UPDATED,f.TASKS_BULK_UPDATED,f.TASKS_BULK_DELETED],l=[...i,f.TASK_SNOOZE_RESURFACED];return[...Ze(u?.companyId,i),...Me(V,l)]}),[u?.companyId,V]);Qe({events:ce,onSubscribed:()=>{s!=null&&(a(g(!0,s)),a(T(s)))},onEvent:(i,l)=>{if(s!=null)switch(i){case f.TASK_CREATED:{X(l)?.parent_task_id===s&&(a(g(!0,s)),a(T(s)));break}case f.TASK_UPDATED:{const p=X(l);if(p==null)break;p.task_id===s?(a(g(!0,s)),a(T(s))):p.parent_task_id===s&&a(T(s));break}case f.TASKS_BULK_UPDATED:{const p=W(l);if(p==null)break;p.task_ids.includes(s)&&a(g(!0,s)),a(T(s));break}case f.TASKS_BULK_DELETED:{const p=W(l);if(p==null)break;if(p.task_ids.includes(s)){a(oe({messageSection:"delete_task",messageText:"success",type:"success"})),u?.tenantEmailDomain!=null&&e(U(u.tenantEmailDomain));break}a(T(s));break}case f.TASK_SNOOZE_RESURFACED:{We(l)?.task_id===s&&a(g(!0,s));break}}}}),k.useEffect((()=>{h||O.fetchState==="Completed"||(S(!0),a(he()))}),[h,a,O.fetchState]),k.useEffect((()=>{K||N==="Completed"||(re(!0),a(be()))}),[K,a,N]);const le=k.useCallback((()=>{s!=null&&(C.current=!1,a(Ee([s],null,{isArchived:!1})),w(!0))}),[a,s]);k.useEffect((()=>{if($)if(R!=="In-Progress"){if(C.current){if(R==="Error")return w(!1),void(C.current=!1);if(R==="Completed"){w(!1),C.current=!1;const{tenantEmailDomain:i}=u;if(n.state?.message==="triggerBackClick"){const l=ie(n.state?.pathnameStackToGoBack);e(l.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:l.newStack}})}else{const l=U(i);e(l,{state:{pathnameStackToGoBack:P(n.state?.pathnameStackToGoBack,n.pathname)}})}}}}else C.current=!0}),[$,R,u,n,e]);const z=E((i=>ne(i,s))),A=z.fetchState,q=_.getSignedInUser();if(q==null)throw Error("Can't access task detail page without signing in...");if(A==="Error"&&z.error?.code===400){const{tenantEmailDomain:i}=u,l=U(i),p=P(n.state?.pathnameStackToGoBack,n.pathname);return r.jsx(pe,{to:l,state:{pathnameStackToGoBack:p}})}return r.jsxs(r.Fragment,{children:[A==="Completed"?r.jsx(Ke,{analytics:M,onLoad:i=>(l=>l.trackPageLoaded($e.Event.taskDetailPage))(i)}):null,r.jsxs(ea,{children:[r.jsx(qe,{isAppContentDrawerOpen:y,handleDrawerToggle:i=>{v(i)}}),r.jsx(Je,{analytics:M,currentTenant:u,handleZeniLogoClick:()=>{c.toggle()},initialOpenThreadRequest:m,location:n,loggedInUser:q,navigate:e,taskGroupId:d,taskId:s,taskDetailFetchState:A,onUnarchiveTaskClick:le,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:I,isTaskCannedResponsesEnabled:D,isTaskRecurringParentEnabled:B,isTaskGroupAssigneesEnabled:x})]})]})}const ea=Ve.div`
1
+ import{j as r}from"./liveblocks-D0hIH2N0.js";import de from"./NotFoundScreen-B6L1cY3I.js";import{a as k}from"./sentry-DhqS_W-k.js";import{h as J,u as ee,j as E,g as ue,i as ke,N as pe,l as me,n as Se,o as b}from"./core-35eDsgGP.js";import{P1 as ae,P4 as fe,O_ as Te,YN as ge,fB as te,a0S as se,Pq as g,Pi as T,OX as he,PW as be,PP as Ee,a0T as ne,gd as oe,a0U as Z,OT as Ie,OQ as De,u1 as Ce,tR as Ge,md as Pe,Pg as _e,a0V as ye,Q7 as Re,Pc as Ue,PB as Be,Py as xe,P7 as ve,Pv as we,Pu as Ae}from"./zeni-epic-state-BRRtwAQl.js";import{z as _,d$ as je,c as Fe,I as Le,d as G,a2 as ie,p as P,a6 as Ke,k as M,S as $e,e0 as Oe,X as Q,ac as Ne}from"./index-BBhWSYD8.js";import{n as Ve}from"./mui-CY_LMiAy.js";import{u as ze}from"./useInitialThreadRequest-UvGRmRxR.js";import{M as qe}from"./MobileAppDrawer-C9wi8312.js";import{b as Ze,a as Me,u as Qe,T as f,t as We,c as W,d as X,e as Xe}from"./TaskListScreen-DsFWTjuD.js";import"./recharts-B8j-bW95.js";import"./analytics-p9dV2gEo.js";import"./plaid-CoaHurGj.js";import"./dnd-Dm1d6mZC.js";import"./stripe-cKAAJElX.js";import"./lottie-TJOzQ6Cz.js";import"./lexical-DQ4lSvQh.js";import"./pdf-DElOA9Iz.js";import"./utils-CgQOqOwX.js";import"./InboxNotificationsProvider-yp4VlF4V.js";import"./useTaskManagerAccess-DRrr5b-Z.js";import"./useAskAiCfoHostNavButtonProps-DGTLHvUD.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]="3db9fd63-e5e6-40c9-aa83-3c5833b754de",e._sentryDebugIdIdentifier="sentry-dbid-3db9fd63-e5e6-40c9-aa83-3c5833b754de")}catch{}})();function Ye(){const e=J(),a=ee(),n=_.getSignedInUser(),{cannedResponses:c,fetchState:s,saveFetchState:d}=E((o=>o.cannedResponsesState)),u=k.useCallback((()=>{a(ae())}),[a]),m=k.useCallback(((o,I,D)=>{a(fe({name:o,content:I,cannedResponseId:D}))}),[a]),t=k.useCallback((o=>{a(Te({cannedResponseId:o}))}),[a]);if(n==null)throw Error("Can't access quick responses page without signing in...");return r.jsx(je,{cannedResponses:c,isLoading:s==="In-Progress"||s==="Not-Started",isSaving:d==="In-Progress",onBackClick:()=>e(-1),onDelete:t,onFetch:u,onSave:m})}const L=e=>e?.taskState?.taskByID,j=(e,a)=>{const n=L(e);if(a!=null&&n!=null)return n[a]?.parentTaskId??void 0},He=ge([j,(e,a)=>{const n=j(e,a),c=L(e);if(n!=null&&c!=null)return c[n]?.name},(e,a)=>{const n=j(e,a),c=L(e);return n!=null&&c!=null&&c[n]!=null}],((e,a,n)=>{if(e!=null&&n===!0)return{id:e,name:a??""}}));let Y,H=[];const Je=me((function(e,a){const{location:n,taskGroupId:c}=a,s=ne(e,a.taskId),d=te(e),u=He(e,a.taskId),m=s.taskGroupId??c,t=m!=null?Z(e.taskGroupState,m):void 0,o=_.getSignedInUser(),I=d.tenantId,D={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:I??""},B=se(e),{tenantEmailDomain:x}=d,y=s.recurringSourceTaskId,v=y!=null?`${Q.appUrl}/${x}/tasks/${encodeURIComponent(y)}`:void 0;var h;return{taskDetailSelectorView:s,authParams:D,isZeniUser:_.isZeniUser(),userGroupList:((h=e.userGroupsState.userGroupByUserGroupId)!==Y&&(Y=h,H=Object.values(h)),H),isNewClicked:n.state?.message==="comingFromTaskListPage",filesEndPoint:Ne.fileMicroServiceBaseUrl,companyName:a.currentTenant.companyName,companyId:a.currentTenant.companyId,currentUrl:`${Q.appUrl}${a.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:v,tagListView:B,taskGroupName:m!=null&&t!=null&&t.isDefault===!1?t.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map((S=>Z(e.taskGroupState,S))).filter((S=>S!=null&&!S.isDeleted)).map((S=>({id:S.id,name:S.name,isDefault:S.isDefault}))),subtasks:s.subtasks,parentTaskRef:u,subTaskCreateStatus:e.taskDetailState?.subTaskCreateStatus?.fetchState}}),(function(e,a){const{taskId:n,navigate:c,currentTenant:s,location:d,taskGroupId:u}=a,{tenantEmailDomain:m}=s;return{onSaveChangesToLocalStore:t=>{e(Ae({taskDetailLocalData:t,taskId:n}))},onSaveDetailClick:t=>{e(we(n,t??u))},onArchiveTaskClick:()=>{a.taskId!=null&&e(ve(a.taskId))},onSnoozeTask:(t,o)=>{e(xe(t,o))},onUnsnoozeTask:t=>{e(Be(t))},onCreateSubtask:(t,o)=>{e(Ue({...o,parentTaskId:t}))},onSubtaskUpdate:(t,o)=>{e(Re({task:t,updates:o}))},onShowToast:t=>{e(oe(t))},onSubtaskRowClick:t=>{c(`/${m}/tasks/${t}`,{state:{pathnameStackToGoBack:P(d.state?.pathnameStackToGoBack,d.pathname)}})},onParentBreadcrumbClick:t=>{c(`/${m}/tasks/${t}`,{state:{pathnameStackToGoBack:P(d.state?.pathnameStackToGoBack,d.pathname)}})},onDismissClick:()=>{if(d.state?.message==="triggerBackClick"){const t=ie(d.state?.pathnameStackToGoBack),o=t.poppedPathname??"../../dashboard";c(o,{state:{pathnameStackToGoBack:t.newStack}})}else{const t=U(m),o=P(d.state?.pathnameStackToGoBack,d.pathname);c(t,{state:{pathnameStackToGoBack:o}})}e(ye({taskId:n}))},onDeleteTaskClick:()=>{e(_e(n))},updateFilesEntity:t=>{e(Pe({files:t}))},onDeleteFile:t=>{e(Ge(t))},onEditFileName:(t,o)=>{e(Ce(t,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(g(!1,n))},onCreateTagClick:t=>{e(De(t,n))},onDeleteTagClick:t=>{e(Ie(t,n))},onFetchCannedResponses:()=>{e(ae())},onManageTemplatesClick:()=>{c(`/${s.tenantEmailDomain}/tasks/quick-responses`)}}}))(Oe);function F(){const e=J(),a=ee(),n=ue(),c=Fe(),{taskId:s,taskGroupId:d}=ke(),u=E((i=>te(i))),m=ze(u?.companyId),{useFeatureGate:t}=Le(),{isFeatureEnabled:o}=t(G.isTaskSnoozeEnabled),{isFeatureEnabled:I}=t(G.isTaskVisibilityEnabled),{isFeatureEnabled:D}=t(G.isTaskCannedResponsesEnabled),{isFeatureEnabled:B}=t(G.isTaskRecurringParentEnabled),{isFeatureEnabled:x}=t(G.isTaskGroupAssigneesEnabled),[y,v]=k.useState(!1),[h,S]=k.useState(!1),[K,re]=k.useState(!1),[$,w]=k.useState(!1),C=k.useRef(!1),R=E((i=>i.taskListState.updateTasksFetchState.fetchState)),O=E((i=>se(i))),N=E((i=>i.taskGroupViewState.fetchState));k.useEffect((()=>{a(g(!1,s)),s!=null&&a(T(s))}),[a,s]);const V=_.getSignedInUser()?.userId,ce=k.useMemo((()=>{const i=[f.TASK_CREATED,f.TASK_UPDATED,f.TASKS_BULK_UPDATED,f.TASKS_BULK_DELETED],l=[...i,f.TASK_SNOOZE_RESURFACED];return[...Ze(u?.companyId,i),...Me(V,l)]}),[u?.companyId,V]);Qe({events:ce,onSubscribed:()=>{s!=null&&(a(g(!0,s)),a(T(s)))},onEvent:(i,l)=>{if(s!=null)switch(i){case f.TASK_CREATED:{X(l)?.parent_task_id===s&&(a(g(!0,s)),a(T(s)));break}case f.TASK_UPDATED:{const p=X(l);if(p==null)break;p.task_id===s?(a(g(!0,s)),a(T(s))):p.parent_task_id===s&&a(T(s));break}case f.TASKS_BULK_UPDATED:{const p=W(l);if(p==null)break;p.task_ids.includes(s)&&a(g(!0,s)),a(T(s));break}case f.TASKS_BULK_DELETED:{const p=W(l);if(p==null)break;if(p.task_ids.includes(s)){a(oe({messageSection:"delete_task",messageText:"success",type:"success"})),u?.tenantEmailDomain!=null&&e(U(u.tenantEmailDomain));break}a(T(s));break}case f.TASK_SNOOZE_RESURFACED:{We(l)?.task_id===s&&a(g(!0,s));break}}}}),k.useEffect((()=>{h||O.fetchState==="Completed"||(S(!0),a(he()))}),[h,a,O.fetchState]),k.useEffect((()=>{K||N==="Completed"||(re(!0),a(be()))}),[K,a,N]);const le=k.useCallback((()=>{s!=null&&(C.current=!1,a(Ee([s],null,{isArchived:!1})),w(!0))}),[a,s]);k.useEffect((()=>{if($)if(R!=="In-Progress"){if(C.current){if(R==="Error")return w(!1),void(C.current=!1);if(R==="Completed"){w(!1),C.current=!1;const{tenantEmailDomain:i}=u;if(n.state?.message==="triggerBackClick"){const l=ie(n.state?.pathnameStackToGoBack);e(l.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:l.newStack}})}else{const l=U(i);e(l,{state:{pathnameStackToGoBack:P(n.state?.pathnameStackToGoBack,n.pathname)}})}}}}else C.current=!0}),[$,R,u,n,e]);const z=E((i=>ne(i,s))),A=z.fetchState,q=_.getSignedInUser();if(q==null)throw Error("Can't access task detail page without signing in...");if(A==="Error"&&z.error?.code===400){const{tenantEmailDomain:i}=u,l=U(i),p=P(n.state?.pathnameStackToGoBack,n.pathname);return r.jsx(pe,{to:l,state:{pathnameStackToGoBack:p}})}return r.jsxs(r.Fragment,{children:[A==="Completed"?r.jsx(Ke,{analytics:M,onLoad:i=>(l=>l.trackPageLoaded($e.Event.taskDetailPage))(i)}):null,r.jsxs(ea,{children:[r.jsx(qe,{isAppContentDrawerOpen:y,handleDrawerToggle:i=>{v(i)}}),r.jsx(Je,{analytics:M,currentTenant:u,handleZeniLogoClick:()=>{c.toggle()},initialOpenThreadRequest:m,location:n,loggedInUser:q,navigate:e,taskGroupId:d,taskId:s,taskDetailFetchState:A,onUnarchiveTaskClick:le,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:I,isTaskCannedResponsesEnabled:D,isTaskRecurringParentEnabled:B,isTaskGroupAssigneesEnabled:x})]})]})}const ea=Ve.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -0,0 +1 @@
1
+ import{j as t}from"./liveblocks-D0hIH2N0.js";import i from"./NotFoundScreen-B6L1cY3I.js";import{T as r}from"./TransactionDetailScreen-Bgc2K53s.js";import"./sentry-DhqS_W-k.js";import{n as a,o}from"./core-35eDsgGP.js";import"./zeni-epic-state-BRRtwAQl.js";import"./recharts-B8j-bW95.js";import"./index-BBhWSYD8.js";import"./mui-CY_LMiAy.js";import"./analytics-p9dV2gEo.js";import"./plaid-CoaHurGj.js";import"./dnd-Dm1d6mZC.js";import"./stripe-cKAAJElX.js";import"./lottie-TJOzQ6Cz.js";import"./lexical-DQ4lSvQh.js";import"./pdf-DElOA9Iz.js";import"./utils-CgQOqOwX.js";import"./useAskAiCfoHostNavButtonProps-DGTLHvUD.js";import"./decodeURIComponentSafe-DhnAz_92.js";import"./useInitialThreadRequest-UvGRmRxR.js";import"./routePaths-BgYQMm9p.js";import"./expenseAutomationHelper-XBf0IYWB.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]="9520d72a-46e5-44e2-9697-a97671635162",e._sentryDebugIdIdentifier="sentry-dbid-9520d72a-46e5-44e2-9697-a97671635162")}catch{}})();function z(){return t.jsxs(a,{children:[t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(o,{path:"/*",element:t.jsx(r,{})})]})}export{z as default};
@@ -1,4 +1,4 @@
1
- import{j as C}from"./liveblocks-D83XGo_c.js";import{a as i}from"./sentry-BPfEBx2C.js";import{u as M,k as ot,j as g,s as ge,g as De,h as Ce,i as Ae,N as st,l as ct}from"./core-CGqhbBHO.js";import{p9 as Ie,fB as J,gS as it,TD as rt,of as lt,nR as dt,CH as se,bn as ut,db as Re,bq as _e,rY as H,UT as Y,VR as we,VS as le,Vh as Pe,lQ as Ue,VT as Ve,Vm as de,Vn as ue,mF as Fe,Rd as me,UN as W,lK as xe,lI as Le,lU as mt,oY as pt,VU as ft,VV as ht,Cy as X,lP as Oe,Qy as Be,cl as St,dh as yt,VW as Tt,UM as bt,VX as gt,VY as It,VZ as kt,V_ as Et,Cu as vt,V$ as Dt,W0 as Ct,W1 as At,W2 as Rt,W3 as _t,lT as wt,W4 as Pt,W5 as Ut,UO as Vt,W6 as Ft,W7 as xt,W8 as Lt,Qs as Ot,Qi as Bt,QH as Nt,lV as zt,Re as ke,p1 as Mt}from"./zeni-epic-state-DASyz1An.js";import{I as Q,d as _,k as $,b0 as jt,z as Ne,E as Gt,$ as Wt,b1 as $t,a9 as qt,a2 as ce,U as Ht,b2 as Yt,p as ie,aq as Qt,b3 as Kt,b4 as Xt,b5 as Zt,ac as Jt,at as oe}from"./index-CoKBrrSw.js";import{n as en,S as tn,D as nn}from"./mui-CD71lp6N.js";import{u as an}from"./useAskAiCfoHostNavButtonProps-C4V1Wf7u.js";import{d as ze}from"./decodeURIComponentSafe-6FvQaIqS.js";import{u as on}from"./useInitialThreadRequest-CP8MsLNf.js";import{h as Me,c as je,g as sn,e as cn}from"./routePaths-DU2fgaW2.js";import{u as rn}from"./expenseAutomationHelper-wwug0Eyp.js";import{w as ln}from"./utils-B6XFkcn3.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="68c70865-ff9e-4a87-8935-a2c38831335d",t._sentryDebugIdIdentifier="sentry-dbid-68c70865-ff9e-4a87-8935-a2c38831335d")}catch{}})();function dn(t=!0){const e=M(),o=ot(),{useFeatureGate:n}=Q(),{isFeatureEnabled:a}=n(_.isCreateTransferEntryFromExpenseEnabled);i.useEffect((()=>{if(!t||a!==!0)return;const s=c=>{const u=o.getState().createTransferEntryState.transferAccountsByType[c].fetchState;return u!=="In-Progress"&&u!=="Completed"};s("transferEntryEligible")&&e(Ie({kind:"transferEntryEligible"})),s("creditCardOnlyEligible")&&e(Ie({kind:"creditCardOnlyEligible"}))}),[t,a,e,o])}function un(t,e){const o=(function(){const u=M(),[h,y]=i.useState(!1),[p,d]=i.useState(null),[r,f]=i.useState(null),{useDynamicConfig:k}=Q(),{configValue:D,isDynamicConfigLoading:T}=k("transaction_categorization_config"),b=!T&&D?.capitalization_enabled===!0,E=g((I=>J(I))),A=E.companyId,j=g((I=>it(I.companyState,E.companyId)?.company.companyLocaleInfo?.currencySymbol??"$")),{capitalizableAccounts:V,capitalizableAccountOverrides:F,dismissedAccounts:w}=g((I=>{const S=I.tenantState.currentTenantId,R=S!=null?I.tenantState.tenantsById[S]:void 0;return{capitalizableAccounts:R?.capitalizableAccounts??null,capitalizableAccountOverrides:R?.capitalizableAccountOverrides??null,dismissedAccounts:R?.capitalizationOnboardingDismissedAccounts??null}}),ge),x=i.useRef(V);x.current=V;const P=i.useRef(F);P.current=F;const L=i.useRef(w);L.current=w;const O=g((I=>rt(I.accountState)),ge),G=i.useMemo((()=>{const I={};for(const S of O)S.accountId!=null&&S.accountName!=null&&(I[S.accountId]=S.accountName);return I}),[O]),q=r!=null?G[r]??null:null,B=i.useCallback((I=>{if(!b)return;const S=x.current;if(S==null)return;const R=S.accounts??[],K=new Set(I),ee=P.current??{},te=L.current;for(const N of R)if(K.has(N.accountId)&&ee[N.accountId]==null&&te?.[N.accountId]==null)return d(N.classificationType),f(N.accountId),void y(!0)}),[b]),v=i.useCallback(((I,S)=>{u(lt(A,I,S,!0)),y(!1),d(null),f(null)}),[u,A]),l=i.useCallback((()=>{r!=null&&(u(dt(A,r)),y(!1),d(null),f(null))}),[u,A,r]);return{showPopup:h&&b,popupType:p,popupAccountId:r,popupAccountName:q,currencySymbol:j,checkAndShowPopup:B,handleSubmit:v,handleDismiss:l}})(),n=i.useRef(void 0),a=i.useRef([]),s=i.useRef(o.checkAndShowPopup);s.current=o.checkAndShowPopup;const c=i.useRef(e);return c.current=e,i.useEffect((()=>{t==="In-Progress"&&(a.current=c.current()),t==="Completed"&&n.current==="In-Progress"&&a.current.length>0&&(s.current(a.current),a.current=[]),n.current=t}),[t]),o}const z=new Map,Ee=(t,e,o)=>`${t}|${e??""}|${o}`,Z=(t,e)=>({recommendationFor:t.dimension,recommendationSetId:null,selectedSource:t.matchedSource,selectedRank:t.matchedRank,topPickSource:t.topPickSource,numberOfRecommendations:t.shownRecommendations.length,transactionId:e,lineId:t.lineId??null}),re=(t,e,o)=>({transactionId:e,lineId:t.lineId,dimension:t.dimension,outcome:t.outcome,selected:{name:t.selected.name,id:t.selected.id},matchedSource:t.matchedSource,matchedRank:t.matchedRank,topPickSource:t.topPickSource,shownRecommendations:t.shownRecommendations.map((n=>({source:n.source,rank:n.rank,value:{name:n.name,id:n.id},confidence:n.confidencePercentage!=null?n.confidencePercentage/100:void 0}))),...o}),Ge=(t,e,o)=>{$.trackRecommendationFeedbackRetracted(Z(e,o)),t(se(re(e,o,{outcome:"retracted"})))},Fn=(t,e)=>{const o=new Set(e.map(String));z.forEach(((n,a)=>{o.has(n.transactionId)&&(z.delete(a),Ge(t,n.feedback,n.transactionId))}))},xn=t=>{const e=new Set(t.map(String));z.forEach(((o,n)=>{e.has(o.transactionId)&&z.delete(n)}))};function mn(t){const e=M(),[o,n]=i.useState(null),{isEnabled:a,fallbackTransactionId:s}=t,c=i.useCallback((p=>p.transactionId??s??""),[s]),u=i.useCallback((p=>{if(!a)return;const d=c(p);if(d==="")return;if(p.outcome!=="accepted")return void n(p);((f,k,D,T)=>{const b=Ee(k,D,T),E=z.get(b);return E!=null&&(z.delete(b),Ge(f,E.feedback,E.transactionId),!0)})(e,d,p.lineId,p.dimension)||(((f,k)=>{$.trackRecommendationAccepted({...Z(f,k),recommendationConfidencePercentage:f.shownRecommendations[0]?.confidencePercentage??null})})(p,d),e(se(re(p,d,{}))))}),[a,c,e]),h=i.useCallback((p=>{if(o==null)return;const d=c(o);((r,f,k)=>{$.trackRecommendationFeedbackSubmitted({...Z(r,f),feedbackOutcome:r.outcome,feedbackReasonLength:k,isNewEntitySelected:!1})})(o,d,p.length),e(se(re(o,d,{reasonText:p,skipped:!1}))),((r,f)=>{z.set(Ee(f,r.lineId,r.dimension),{feedback:r,transactionId:f})})(o,d),n(null)}),[o,c,e]),y=i.useCallback((()=>{var p,d;o!=null&&(p=o,d=c(o),$.trackRecommendationFeedbackSkipped({...Z(p,d),feedbackOutcome:p.outcome,isNewEntitySelected:!1}),n(null))}),[o,c]);return{onRecommendationSelection:u,popup:o!=null?C.jsx(jt,{feedback:o,onSubmit:h,onSkip:y}):null}}const pe=()=>{const t=Ne.getSignedInUser(),{useFeatureGate:e}=Q(),{isFeatureEnabled:o}=e(_.isChainOfThoughtEnabled);return i.useMemo((()=>ut(t)&&o),[t,o])};function We(t){if(t!=null){if("customer"in t&&t.customer!=null){const{customer:e}=t;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in t&&t.vendor!=null){const{vendor:e}=t;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function Ln(t,e){const o=M(),{useFeatureGate:n}=Q(),a=g((l=>J(l))),s=a.userRole.includes("charge_card_user")||a.userRole.includes("charge_card_admin"),c=a.userRole!=null&&Re(a.userRole),u=a.userRole!=null&&_e(a.userRole),{isFeatureEnabled:h}=n(_.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:y}=n(_.isExpenseAutomationEnabled),p=pe(),d=i.useMemo((()=>({id:t,type:H(e)})),[t,e]),r=g((l=>Y(l,d))),f=r?.transactionDetailUpdateStatus?.fetchState,k=r?.transactionDetailLocalData?.lineItemById,D=g((l=>{const I=Y(l,d)?.transactionDetailLocalData.vendorUpdates?.id;return I==null?"Not-Started":l.transactionVendorViewState.editVendorStateById[I]?.saveStatus.fetchState??"Not-Started"})),T=i.useMemo((()=>r?.fetchState==="Completed"?We(r?.transaction):void 0),[r?.fetchState,r?.transaction]),b=g((l=>{if(T!=null)return we(l.customerIncomeState,l.vendorExpenseState,l.trendState,T,"month")})),E=g((l=>le(l))),A=g((l=>{if(T!=null)return Pe(l.trendWithTransactionsState,T,"TransactionDetail")})),j=a.company?.companyInfo.firstMonthOfFY??1,V=g((l=>Ue(l.accountState,l.accountListState,"accountList"))),[F,w]=i.useState(!1),[x,P]=i.useState(!1),[L,O]=i.useState(!1);i.useEffect((()=>{w(!1),P(!1),O(!1)}),[t,e]);const G=i.useCallback((()=>{w(!1),P(!1)}),[]),[q,B]=i.useState(!1),v=A?.selectedPeriod?.timePeriod;return i.useEffect((()=>{L||r==null||r.transaction==null||(o(Ve({id:r.transaction.id,type:r.transaction.type})),O(!0)),T!=null&&(!s||c&&u===!1)&&(F?x||b==null||(P(!0),o(me(T,"TransactionDetail",{timeframe:"month",timePeriod:v??b}))):(o(de()),o(ue()),w(!0),o(Fe(T))))}),[o,L,r?.fetchState,r?.transaction,T,s,c,u,F,x,b,v]),i.useEffect((()=>{E.newVendorState?.vendorDetailLocalData?.vendorName!=null?B(!0):B(!1)}),[E.newVendorState?.vendorDetailLocalData?.vendorName]),i.useEffect((()=>()=>{o(W("common"))}),[o]),{currentTenant:a,loggedInUserHasCardUserOrAdminRole:s,isUserHasDashboardAccess:c,isUserHasInvestorOrBankerAccess:u,isVendorBulkUpdateOnTransactionEnabled:h,isExpenseAutomationEnabled:y,isChainOfThoughtEnabled:p,selectedTransaction:d,transactionDetail:r,rawDetailSaveStatus:f,rawDetailLineItemById:k,vendorSaveStatus:D,tranEntity:T,defaultTrendTransactionTimePeriod:b,vendorViewDetails:E,uiState:A,firstMonthOfFY:j,uncategorizedAccounts:V,resetTrendIsFetchedStates:G,isCreateVendorDrawerOpen:q,setIsCreateVendorDrawerOpen:B}}const pn={overlayWidth:new qt(100,100,58)},fn=({isOpen:t,onSaveVendor:e,onSaveSuccess:o,onCancel:n,vendorViewDetails:a})=>{const s=Gt(),c=Wt(),u=M(),h=g((d=>le(d))),y=()=>{n()},p={vendorDetailView:a??h,onSaveSuccess:()=>{u(Le()),u(mt("Not-Started")),o()},onSaveVendor:e,onCancelClick:y,saveVendorDetailLocalData:d=>{u(xe({vendorId:void 0,localData:d}))}};return C.jsx(nn,{anchor:"right",open:t,PaperProps:{style:{width:pn.overlayWidth.valuePercentage(c),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.4,cursor:"pointer"}}},onClose:y,children:C.jsx(hn,{onClick:d=>d.stopPropagation(),children:C.jsx($t,{...p})})})},hn=en(tn)`
1
+ import{j as C}from"./liveblocks-D0hIH2N0.js";import{a as i}from"./sentry-DhqS_W-k.js";import{u as M,k as ot,j as g,s as ge,g as De,h as Ce,i as Ae,N as st,l as ct}from"./core-35eDsgGP.js";import{p9 as Ie,fB as J,gS as it,TD as rt,of as lt,nR as dt,CH as se,bn as ut,db as Re,bq as _e,rY as H,UT as Y,VR as we,VS as le,Vh as Pe,lQ as Ue,VT as Ve,Vm as de,Vn as ue,mF as Fe,Rd as me,UN as W,lK as xe,lI as Le,lU as mt,oY as pt,VU as ft,VV as ht,Cy as X,lP as Oe,Qy as Be,cl as St,dh as yt,VW as Tt,UM as bt,VX as gt,VY as It,VZ as kt,V_ as Et,Cu as vt,V$ as Dt,W0 as Ct,W1 as At,W2 as Rt,W3 as _t,lT as wt,W4 as Pt,W5 as Ut,UO as Vt,W6 as Ft,W7 as xt,W8 as Lt,Qs as Ot,Qi as Bt,QH as Nt,lV as zt,Re as ke,p1 as Mt}from"./zeni-epic-state-BRRtwAQl.js";import{I as Q,d as _,k as $,b0 as jt,z as Ne,E as Gt,$ as Wt,b1 as $t,a9 as qt,a2 as ce,U as Ht,b2 as Yt,p as ie,aq as Qt,b3 as Kt,b4 as Xt,b5 as Zt,ac as Jt,at as oe}from"./index-BBhWSYD8.js";import{n as en,S as tn,D as nn}from"./mui-CY_LMiAy.js";import{u as an}from"./useAskAiCfoHostNavButtonProps-DGTLHvUD.js";import{d as ze}from"./decodeURIComponentSafe-DhnAz_92.js";import{u as on}from"./useInitialThreadRequest-UvGRmRxR.js";import{h as Me,c as je,g as sn,e as cn}from"./routePaths-BgYQMm9p.js";import{u as rn}from"./expenseAutomationHelper-XBf0IYWB.js";import{w as ln}from"./utils-CgQOqOwX.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="68c70865-ff9e-4a87-8935-a2c38831335d",t._sentryDebugIdIdentifier="sentry-dbid-68c70865-ff9e-4a87-8935-a2c38831335d")}catch{}})();function dn(t=!0){const e=M(),o=ot(),{useFeatureGate:n}=Q(),{isFeatureEnabled:a}=n(_.isCreateTransferEntryFromExpenseEnabled);i.useEffect((()=>{if(!t||a!==!0)return;const s=c=>{const u=o.getState().createTransferEntryState.transferAccountsByType[c].fetchState;return u!=="In-Progress"&&u!=="Completed"};s("transferEntryEligible")&&e(Ie({kind:"transferEntryEligible"})),s("creditCardOnlyEligible")&&e(Ie({kind:"creditCardOnlyEligible"}))}),[t,a,e,o])}function un(t,e){const o=(function(){const u=M(),[h,y]=i.useState(!1),[p,d]=i.useState(null),[r,f]=i.useState(null),{useDynamicConfig:k}=Q(),{configValue:D,isDynamicConfigLoading:T}=k("transaction_categorization_config"),b=!T&&D?.capitalization_enabled===!0,E=g((I=>J(I))),A=E.companyId,j=g((I=>it(I.companyState,E.companyId)?.company.companyLocaleInfo?.currencySymbol??"$")),{capitalizableAccounts:V,capitalizableAccountOverrides:F,dismissedAccounts:w}=g((I=>{const S=I.tenantState.currentTenantId,R=S!=null?I.tenantState.tenantsById[S]:void 0;return{capitalizableAccounts:R?.capitalizableAccounts??null,capitalizableAccountOverrides:R?.capitalizableAccountOverrides??null,dismissedAccounts:R?.capitalizationOnboardingDismissedAccounts??null}}),ge),x=i.useRef(V);x.current=V;const P=i.useRef(F);P.current=F;const L=i.useRef(w);L.current=w;const O=g((I=>rt(I.accountState)),ge),G=i.useMemo((()=>{const I={};for(const S of O)S.accountId!=null&&S.accountName!=null&&(I[S.accountId]=S.accountName);return I}),[O]),q=r!=null?G[r]??null:null,B=i.useCallback((I=>{if(!b)return;const S=x.current;if(S==null)return;const R=S.accounts??[],K=new Set(I),ee=P.current??{},te=L.current;for(const N of R)if(K.has(N.accountId)&&ee[N.accountId]==null&&te?.[N.accountId]==null)return d(N.classificationType),f(N.accountId),void y(!0)}),[b]),v=i.useCallback(((I,S)=>{u(lt(A,I,S,!0)),y(!1),d(null),f(null)}),[u,A]),l=i.useCallback((()=>{r!=null&&(u(dt(A,r)),y(!1),d(null),f(null))}),[u,A,r]);return{showPopup:h&&b,popupType:p,popupAccountId:r,popupAccountName:q,currencySymbol:j,checkAndShowPopup:B,handleSubmit:v,handleDismiss:l}})(),n=i.useRef(void 0),a=i.useRef([]),s=i.useRef(o.checkAndShowPopup);s.current=o.checkAndShowPopup;const c=i.useRef(e);return c.current=e,i.useEffect((()=>{t==="In-Progress"&&(a.current=c.current()),t==="Completed"&&n.current==="In-Progress"&&a.current.length>0&&(s.current(a.current),a.current=[]),n.current=t}),[t]),o}const z=new Map,Ee=(t,e,o)=>`${t}|${e??""}|${o}`,Z=(t,e)=>({recommendationFor:t.dimension,recommendationSetId:null,selectedSource:t.matchedSource,selectedRank:t.matchedRank,topPickSource:t.topPickSource,numberOfRecommendations:t.shownRecommendations.length,transactionId:e,lineId:t.lineId??null}),re=(t,e,o)=>({transactionId:e,lineId:t.lineId,dimension:t.dimension,outcome:t.outcome,selected:{name:t.selected.name,id:t.selected.id},matchedSource:t.matchedSource,matchedRank:t.matchedRank,topPickSource:t.topPickSource,shownRecommendations:t.shownRecommendations.map((n=>({source:n.source,rank:n.rank,value:{name:n.name,id:n.id},confidence:n.confidencePercentage!=null?n.confidencePercentage/100:void 0}))),...o}),Ge=(t,e,o)=>{$.trackRecommendationFeedbackRetracted(Z(e,o)),t(se(re(e,o,{outcome:"retracted"})))},Fn=(t,e)=>{const o=new Set(e.map(String));z.forEach(((n,a)=>{o.has(n.transactionId)&&(z.delete(a),Ge(t,n.feedback,n.transactionId))}))},xn=t=>{const e=new Set(t.map(String));z.forEach(((o,n)=>{e.has(o.transactionId)&&z.delete(n)}))};function mn(t){const e=M(),[o,n]=i.useState(null),{isEnabled:a,fallbackTransactionId:s}=t,c=i.useCallback((p=>p.transactionId??s??""),[s]),u=i.useCallback((p=>{if(!a)return;const d=c(p);if(d==="")return;if(p.outcome!=="accepted")return void n(p);((f,k,D,T)=>{const b=Ee(k,D,T),E=z.get(b);return E!=null&&(z.delete(b),Ge(f,E.feedback,E.transactionId),!0)})(e,d,p.lineId,p.dimension)||(((f,k)=>{$.trackRecommendationAccepted({...Z(f,k),recommendationConfidencePercentage:f.shownRecommendations[0]?.confidencePercentage??null})})(p,d),e(se(re(p,d,{}))))}),[a,c,e]),h=i.useCallback((p=>{if(o==null)return;const d=c(o);((r,f,k)=>{$.trackRecommendationFeedbackSubmitted({...Z(r,f),feedbackOutcome:r.outcome,feedbackReasonLength:k,isNewEntitySelected:!1})})(o,d,p.length),e(se(re(o,d,{reasonText:p,skipped:!1}))),((r,f)=>{z.set(Ee(f,r.lineId,r.dimension),{feedback:r,transactionId:f})})(o,d),n(null)}),[o,c,e]),y=i.useCallback((()=>{var p,d;o!=null&&(p=o,d=c(o),$.trackRecommendationFeedbackSkipped({...Z(p,d),feedbackOutcome:p.outcome,isNewEntitySelected:!1}),n(null))}),[o,c]);return{onRecommendationSelection:u,popup:o!=null?C.jsx(jt,{feedback:o,onSubmit:h,onSkip:y}):null}}const pe=()=>{const t=Ne.getSignedInUser(),{useFeatureGate:e}=Q(),{isFeatureEnabled:o}=e(_.isChainOfThoughtEnabled);return i.useMemo((()=>ut(t)&&o),[t,o])};function We(t){if(t!=null){if("customer"in t&&t.customer!=null){const{customer:e}=t;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in t&&t.vendor!=null){const{vendor:e}=t;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function Ln(t,e){const o=M(),{useFeatureGate:n}=Q(),a=g((l=>J(l))),s=a.userRole.includes("charge_card_user")||a.userRole.includes("charge_card_admin"),c=a.userRole!=null&&Re(a.userRole),u=a.userRole!=null&&_e(a.userRole),{isFeatureEnabled:h}=n(_.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:y}=n(_.isExpenseAutomationEnabled),p=pe(),d=i.useMemo((()=>({id:t,type:H(e)})),[t,e]),r=g((l=>Y(l,d))),f=r?.transactionDetailUpdateStatus?.fetchState,k=r?.transactionDetailLocalData?.lineItemById,D=g((l=>{const I=Y(l,d)?.transactionDetailLocalData.vendorUpdates?.id;return I==null?"Not-Started":l.transactionVendorViewState.editVendorStateById[I]?.saveStatus.fetchState??"Not-Started"})),T=i.useMemo((()=>r?.fetchState==="Completed"?We(r?.transaction):void 0),[r?.fetchState,r?.transaction]),b=g((l=>{if(T!=null)return we(l.customerIncomeState,l.vendorExpenseState,l.trendState,T,"month")})),E=g((l=>le(l))),A=g((l=>{if(T!=null)return Pe(l.trendWithTransactionsState,T,"TransactionDetail")})),j=a.company?.companyInfo.firstMonthOfFY??1,V=g((l=>Ue(l.accountState,l.accountListState,"accountList"))),[F,w]=i.useState(!1),[x,P]=i.useState(!1),[L,O]=i.useState(!1);i.useEffect((()=>{w(!1),P(!1),O(!1)}),[t,e]);const G=i.useCallback((()=>{w(!1),P(!1)}),[]),[q,B]=i.useState(!1),v=A?.selectedPeriod?.timePeriod;return i.useEffect((()=>{L||r==null||r.transaction==null||(o(Ve({id:r.transaction.id,type:r.transaction.type})),O(!0)),T!=null&&(!s||c&&u===!1)&&(F?x||b==null||(P(!0),o(me(T,"TransactionDetail",{timeframe:"month",timePeriod:v??b}))):(o(de()),o(ue()),w(!0),o(Fe(T))))}),[o,L,r?.fetchState,r?.transaction,T,s,c,u,F,x,b,v]),i.useEffect((()=>{E.newVendorState?.vendorDetailLocalData?.vendorName!=null?B(!0):B(!1)}),[E.newVendorState?.vendorDetailLocalData?.vendorName]),i.useEffect((()=>()=>{o(W("common"))}),[o]),{currentTenant:a,loggedInUserHasCardUserOrAdminRole:s,isUserHasDashboardAccess:c,isUserHasInvestorOrBankerAccess:u,isVendorBulkUpdateOnTransactionEnabled:h,isExpenseAutomationEnabled:y,isChainOfThoughtEnabled:p,selectedTransaction:d,transactionDetail:r,rawDetailSaveStatus:f,rawDetailLineItemById:k,vendorSaveStatus:D,tranEntity:T,defaultTrendTransactionTimePeriod:b,vendorViewDetails:E,uiState:A,firstMonthOfFY:j,uncategorizedAccounts:V,resetTrendIsFetchedStates:G,isCreateVendorDrawerOpen:q,setIsCreateVendorDrawerOpen:B}}const pn={overlayWidth:new qt(100,100,58)},fn=({isOpen:t,onSaveVendor:e,onSaveSuccess:o,onCancel:n,vendorViewDetails:a})=>{const s=Gt(),c=Wt(),u=M(),h=g((d=>le(d))),y=()=>{n()},p={vendorDetailView:a??h,onSaveSuccess:()=>{u(Le()),u(mt("Not-Started")),o()},onSaveVendor:e,onCancelClick:y,saveVendorDetailLocalData:d=>{u(xe({vendorId:void 0,localData:d}))}};return C.jsx(nn,{anchor:"right",open:t,PaperProps:{style:{width:pn.overlayWidth.valuePercentage(c),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.4,cursor:"pointer"}}},onClose:y,children:C.jsx(hn,{onClick:d=>d.stopPropagation(),children:C.jsx($t,{...p})})})},hn=en(tn)`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  flex-direction: column;
@@ -1 +1 @@
1
- import{j as s}from"./liveblocks-D83XGo_c.js";import{h as Q,g as q,u as W,i as X,j as h,N as U,l as Z,n as Me,o as C}from"./core-CGqhbBHO.js";import{fB as H,tg as ee,kV as p,et as te,R4 as Se,br as pe,_E as Be,lF as ae,Vj as ne,_F as fe,_G as Fe,bE as k,R0 as ge,_H as Le,_I as Te,_J as Oe,R3 as he,_K as _e,_L as De,_M as Ge,_N as Ie,_O as ze,_P as we,_Q as ye,Sg as Re}from"./zeni-epic-state-DASyz1An.js";import{I as ce,d as N,k as L,G as ke,da as oe,p as w,a2 as se,ao as $e,N as Ve}from"./index-CoKBrrSw.js";import"./mui-CD71lp6N.js";import{a as y}from"./sentry-BPfEBx2C.js";import{w as ie}from"./withTransactionSidePanel-D0UiF_in.js";import{p as re,c as de}from"./routePaths-DU2fgaW2.js";import{x as Je}from"./utils-B6XFkcn3.js";import{d as j}from"./decodeURIComponentSafe-6FvQaIqS.js";import{Z as Ne}from"./ZeniAccountStatementScreen-DQaLVOUo.js";import"./recharts-2kmMgB1t.js";import"./analytics-CsbG8awP.js";import"./plaid-C8_LWTII.js";import"./dnd-CyZNzT3I.js";import"./stripe-cKAAJElX.js";import"./lottie-DeqWxWVC.js";import"./lexical-C5ZCOEAv.js";import"./pdf-D4eEcTTi.js";import"./useAskAiCfoHostNavButtonProps-C4V1Wf7u.js";import"./TransactionDetailScreen-B38w1Q4M.js";import"./useInitialThreadRequest-CP8MsLNf.js";import"./expenseAutomationHelper-wwug0Eyp.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]="6073252a-8701-4cd3-89da-1ec1d54ccfb0",a._sentryDebugIdIdentifier="sentry-dbid-6073252a-8701-4cd3-89da-1ec1d54ccfb0")}catch{}})();const qe=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],J=a=>Je(a),Ye=()=>{const{common:a,uncategorizedTransactionList:e}=ke.getLocalizedStrings();return{amount:e.missingReceipt.missingReceiptMinAmount.amount,currencyCode:a.currency.currencyCode,currencySymbol:a.currency.currencySymbol}},Ue=Z((function(a,e){const t=Be(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,J(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=J(e.selectedAccount.tranListType),d=Qe(t,n,c,o,e.bookCloseDate);L.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(fe({uiState:{dateRange:d},type:J(e.selectedAccount.tranListType)})),a(Se(o,p(d),!1,o==="missingReceipts"?Ye():void 0)),e.onSelectedTimePeriodChange(p(d))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({uiState:{scrollYOffset:t},type:J(e.selectedAccount.tranListType)}))}}}))(oe),V=ie((function({...a}){const e=Q(),t=q(),n=W(),c=t.pathname.split("/").find((l=>qe.includes(l))),o=c??"uncategorized-expense",{tenantEmailDomain:d}=X(),{accountType:Y,title:v,subTitle:A}=He(o),f="month",T=h((l=>H(l))),b=T.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:S}=ce(),{isFeatureEnabled:g}=S(N.isProjectsTransactionsEnabled),I=h((l=>ee(l)))&&g,{dataAvailable:x,initialTimeframeTick:O}=Ke(o,b,T.bookCloseDate),[P,_]=y.useState(!1),[E,G]=y.useState(void 0),u=y.useMemo((()=>{const l=p(O);return{tranListType:o,accountType:te(Y),title:v,subTitle:A,timeframe:f,period:l}}),[o,f,Y,x]);y.useEffect((()=>{if(!P&&u!=null){_(!0),L.trackTransactionList(void 0,void 0,void 0,u.title);const l=J(u.tranListType);n(Se(l,u.period,!0,l==="missingReceipts"?Ye():void 0))}}),[P,u,n]);let M=u;return u!=null&&E!=null&&(M={...u,period:E}),c==null||M==null?s.jsx(U,{to:"../"}):s.jsx(Ue,{firstMonthOfFY:b,tenantEmailDomain:d,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:x,navigate:e,showProjectField:I,selectedAccount:M,referrerType:o,bookCloseDate:T.bookCloseDate,onSelectedTimePeriodChange:l=>G(l),...a})})),He=a=>{let e="",t="";const n=ke.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.common.texts.uncategorizedExpenses;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.common.texts.receipts}return{accountType:e,title:t,subTitle:""}},Ke=(a,e,t)=>{const n=pe();let c=pe().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:re(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Qe=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},We=Z((function(a,e){const t=Le(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??ve();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}}))(oe),Xe=ie((function({referrerType:a,...e}){const t=Q(),n=q(),c=W(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,classIdEncoded:v,timeframe:A,startDate:f,endDate:T,titleEncoded:b}=X(),S=j(d??""),g=j(Y??""),I=j(v??""),x=j(b??""),O=h((r=>Fe(r.transactionListState,g,S,I))),[P,_]=y.useState(!1),[E,G]=y.useState(void 0),u=h((r=>H(r))),M=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ce(),{isFeatureEnabled:m}=l(N.isProjectsTransactionsEnabled),z=h((r=>ee(r)))&&m;let i;const F=Ze(S,g,I,A,f,T,x);if(F){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},$=et(O?.dateRange,r);i={accountId:g,accountType:te(S),classId:I,title:x,timeframe:A,period:$}}y.useEffect((()=>{P||i==null||(_(!0),L.trackTransactionList(i.accountId,void 0,a,i.title),c(ge(i.accountId,i.accountType,i.classId,i.period)))}),[P,i,c]);let B=i;i!=null&&E!=null&&(B={...i,period:E});const R=[d,Y,v,A,f,T,b].filter((r=>r!=null));return F&&B!=null?s.jsx(We,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,showProjectField:z,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>G(r),...e}):s.jsx(U,{to:ve(R.length)})})),ve=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ze=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,et=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),tt=Z((function(a,e){const t=_e(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??be();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(De({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(he(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(De({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}}))(oe),at=ie((function({referrerType:a,...e}){const t=Q(),n=q(),c=W(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,projectIdEncoded:v,timeframe:A,startDate:f,endDate:T,titleEncoded:b}=X(),S=j(d??""),g=j(Y??""),I=j(v??""),x=j(b??""),O=h((r=>Oe(r.transactionListState,g,S,I))),[P,_]=y.useState(!1),[E,G]=y.useState(void 0),u=h((r=>H(r))),M=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ce(),{isFeatureEnabled:m}=l(N.isProjectsTransactionsEnabled),z=h((r=>ee(r)))&&m;let i;const F=nt(S,g,I,A,f,T,x);if(F){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},$=ct(O?.dateRange,r);i={accountId:g,accountType:te(S),projectId:I,title:x,timeframe:A,period:$}}y.useEffect((()=>{P||i==null||(_(!0),L.trackTransactionList(i.accountId,void 0,a,i.title),c(he(i.accountId,i.accountType,i.projectId,i.period)))}),[P,i,c]);let B=i;i!=null&&E!=null&&(B={...i,period:E});const R=[d,Y,v,A,f,T,b].filter((r=>r!=null));return F&&B!=null?s.jsx(tt,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,showProjectField:z,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>G(r),...e}):s.jsx(U,{to:be(R.length)})})),be=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},nt=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,ct=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),ot=Z((function(a,e){const t=ze(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&we(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Pe();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(ye({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(Ie(e.selectedAccount.accountId,e.selectedAccount.accountType,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ye({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=rt(e.tenantEmailDomain),n=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}}))(oe),Ae=ie((function({referrerType:a,...e}){const t=Q(),n=q(),c=W(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,timeframe:v,startDate:A,endDate:f,titleEncoded:T,excludeSubAccounts:b}=X(),S=j(d??""),g=j(Y??""),I=j(T??""),x=!(b!=null&&b==="exclude_subaccounts"),O=h((D=>Ge(D.transactionListState,g,S))),[P,_]=y.useState(!1),[E,G]=y.useState(void 0),u=h((D=>H(D))),M=u.company?.featuresActivationInfo.connectedAccountProvider==="unit",l=u.company?.companyInfo.firstMonthOfFY??1;let m;const z=st(S,g,v,A,f,I);if(z){const D={startDate:k(A,"YYYY-MM-DD"),endDate:k(f,"YYYY-MM-DD")},le=it(O?.dateRange,D);m={accountId:g,accountType:te(S),title:I,timeframe:v,period:le}}let i=m;m!=null&&E!=null&&(i={...m,period:E});const{useFeatureGate:F}=ce(),{isFeatureEnabled:B}=F(N.isTransactionCommentingEnabled),R=y.useCallback(((D,le)=>{if(o==null)return;const me=D.url.split(`/${o}/`)[1];if(me==null)return;const[je,xe]=me.split("?"),K=new URLSearchParams(xe??"");K.set("view","full"),K.set("thread_id",le),K.set("entity_type",D.entityType);const Ce=w(n.state?.pathnameStackToGoBack,n.pathname);t(`/${o}/${je}?${K.toString()}`,{state:{pathnameStackToGoBack:Ce}})}),[t,o,n.state,n.pathname]),{isFeatureEnabled:r}=F(N.isProjectsTransactionsEnabled),$=h((D=>ee(D)))&&r,{areTenantIdsInSync:ue}=$e();y.useEffect((()=>{!P&&m!=null&&ue&&(_(!0),L.trackTransactionList(m.accountId,void 0,a,m.title),c(Ie(m.accountId,m.accountType,m.period,void 0,!1,x)))}),[P,m,c,ue]);const Ee=[d,Y,v,A,f,T].filter((D=>D!=null));return z&&i!=null?s.jsx(ot,{firstMonthOfFY:l,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:M,isTransactionCommentingEnabled:B,onCommentThreadClick:R,showProjectField:$,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:D=>G(D),...e}):s.jsx(U,{to:Pe(Ee.length)})})),Pe=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},st=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&k(n,"YYYY-MM-DD").isValid()&&k(c,"YYYY-MM-DD").isValid()&&o!=null,it=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),rt=a=>`/${a}/transactions/${Re}/statements`;function Mt(){const a=q().state?.referrer,e=h((n=>n.expenseAutomationViewState.selectedPeriodByTenantId))[h((n=>H(n))).tenantId],t=Ve();return s.jsxs(Me,{children:[s.jsx(C,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(Ae,{referrerType:a})}),s.jsx(C,{path:"/zeni-clearing-account/statements",element:s.jsx(Ne,{})}),s.jsx(C,{path:"/*",element:s.jsx(Ae,{referrerType:a})}),s.jsx(C,{path:"/uncategorized-income/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/uncategorized-expense/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/miscategorized-income/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/miscategorized-expense/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/missing-receipts/*",element:t?s.jsx(U,{to:`../../month_end_close_checks/review/missing_receipts/${e.month}-${e.year}`}):s.jsx(V,{})}),s.jsx(C,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Xe,{referrerType:a})}),s.jsx(C,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(at,{referrerType:a})})]})}export{Mt as default};
1
+ import{j as s}from"./liveblocks-D0hIH2N0.js";import{h as Q,g as q,u as W,i as X,j as h,N as U,l as Z,n as Me,o as C}from"./core-35eDsgGP.js";import{fB as H,tg as ee,kV as p,et as te,R4 as Se,br as pe,_E as Be,lF as ae,Vj as ne,_F as fe,_G as Fe,bE as k,R0 as ge,_H as Le,_I as Te,_J as Oe,R3 as he,_K as _e,_L as De,_M as Ge,_N as Ie,_O as ze,_P as we,_Q as ye,Sg as Re}from"./zeni-epic-state-BRRtwAQl.js";import{I as ce,d as N,k as L,G as ke,da as oe,p as w,a2 as se,ao as $e,N as Ve}from"./index-BBhWSYD8.js";import"./mui-CY_LMiAy.js";import{a as y}from"./sentry-DhqS_W-k.js";import{w as ie}from"./withTransactionSidePanel-Cyf8gB6i.js";import{p as re,c as de}from"./routePaths-BgYQMm9p.js";import{x as Je}from"./utils-CgQOqOwX.js";import{d as j}from"./decodeURIComponentSafe-DhnAz_92.js";import{Z as Ne}from"./ZeniAccountStatementScreen-BlteVo42.js";import"./recharts-B8j-bW95.js";import"./analytics-p9dV2gEo.js";import"./plaid-CoaHurGj.js";import"./dnd-Dm1d6mZC.js";import"./stripe-cKAAJElX.js";import"./lottie-TJOzQ6Cz.js";import"./lexical-DQ4lSvQh.js";import"./pdf-DElOA9Iz.js";import"./useAskAiCfoHostNavButtonProps-DGTLHvUD.js";import"./TransactionDetailScreen-Bgc2K53s.js";import"./useInitialThreadRequest-UvGRmRxR.js";import"./expenseAutomationHelper-XBf0IYWB.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]="6073252a-8701-4cd3-89da-1ec1d54ccfb0",a._sentryDebugIdIdentifier="sentry-dbid-6073252a-8701-4cd3-89da-1ec1d54ccfb0")}catch{}})();const qe=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],J=a=>Je(a),Ye=()=>{const{common:a,uncategorizedTransactionList:e}=ke.getLocalizedStrings();return{amount:e.missingReceipt.missingReceiptMinAmount.amount,currencyCode:a.currency.currencyCode,currencySymbol:a.currency.currencySymbol}},Ue=Z((function(a,e){const t=Be(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,J(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=J(e.selectedAccount.tranListType),d=Qe(t,n,c,o,e.bookCloseDate);L.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(fe({uiState:{dateRange:d},type:J(e.selectedAccount.tranListType)})),a(Se(o,p(d),!1,o==="missingReceipts"?Ye():void 0)),e.onSelectedTimePeriodChange(p(d))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({uiState:{scrollYOffset:t},type:J(e.selectedAccount.tranListType)}))}}}))(oe),V=ie((function({...a}){const e=Q(),t=q(),n=W(),c=t.pathname.split("/").find((l=>qe.includes(l))),o=c??"uncategorized-expense",{tenantEmailDomain:d}=X(),{accountType:Y,title:v,subTitle:A}=He(o),f="month",T=h((l=>H(l))),b=T.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:S}=ce(),{isFeatureEnabled:g}=S(N.isProjectsTransactionsEnabled),I=h((l=>ee(l)))&&g,{dataAvailable:x,initialTimeframeTick:O}=Ke(o,b,T.bookCloseDate),[P,_]=y.useState(!1),[E,G]=y.useState(void 0),u=y.useMemo((()=>{const l=p(O);return{tranListType:o,accountType:te(Y),title:v,subTitle:A,timeframe:f,period:l}}),[o,f,Y,x]);y.useEffect((()=>{if(!P&&u!=null){_(!0),L.trackTransactionList(void 0,void 0,void 0,u.title);const l=J(u.tranListType);n(Se(l,u.period,!0,l==="missingReceipts"?Ye():void 0))}}),[P,u,n]);let M=u;return u!=null&&E!=null&&(M={...u,period:E}),c==null||M==null?s.jsx(U,{to:"../"}):s.jsx(Ue,{firstMonthOfFY:b,tenantEmailDomain:d,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:x,navigate:e,showProjectField:I,selectedAccount:M,referrerType:o,bookCloseDate:T.bookCloseDate,onSelectedTimePeriodChange:l=>G(l),...a})})),He=a=>{let e="",t="";const n=ke.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.common.texts.uncategorizedExpenses;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.common.texts.receipts}return{accountType:e,title:t,subTitle:""}},Ke=(a,e,t)=>{const n=pe();let c=pe().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:re(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Qe=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},We=Z((function(a,e){const t=Le(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??ve();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}}))(oe),Xe=ie((function({referrerType:a,...e}){const t=Q(),n=q(),c=W(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,classIdEncoded:v,timeframe:A,startDate:f,endDate:T,titleEncoded:b}=X(),S=j(d??""),g=j(Y??""),I=j(v??""),x=j(b??""),O=h((r=>Fe(r.transactionListState,g,S,I))),[P,_]=y.useState(!1),[E,G]=y.useState(void 0),u=h((r=>H(r))),M=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ce(),{isFeatureEnabled:m}=l(N.isProjectsTransactionsEnabled),z=h((r=>ee(r)))&&m;let i;const F=Ze(S,g,I,A,f,T,x);if(F){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},$=et(O?.dateRange,r);i={accountId:g,accountType:te(S),classId:I,title:x,timeframe:A,period:$}}y.useEffect((()=>{P||i==null||(_(!0),L.trackTransactionList(i.accountId,void 0,a,i.title),c(ge(i.accountId,i.accountType,i.classId,i.period)))}),[P,i,c]);let B=i;i!=null&&E!=null&&(B={...i,period:E});const R=[d,Y,v,A,f,T,b].filter((r=>r!=null));return F&&B!=null?s.jsx(We,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,showProjectField:z,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>G(r),...e}):s.jsx(U,{to:ve(R.length)})})),ve=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ze=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,et=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),tt=Z((function(a,e){const t=_e(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??be();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(De({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(he(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(De({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}}))(oe),at=ie((function({referrerType:a,...e}){const t=Q(),n=q(),c=W(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,projectIdEncoded:v,timeframe:A,startDate:f,endDate:T,titleEncoded:b}=X(),S=j(d??""),g=j(Y??""),I=j(v??""),x=j(b??""),O=h((r=>Oe(r.transactionListState,g,S,I))),[P,_]=y.useState(!1),[E,G]=y.useState(void 0),u=h((r=>H(r))),M=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ce(),{isFeatureEnabled:m}=l(N.isProjectsTransactionsEnabled),z=h((r=>ee(r)))&&m;let i;const F=nt(S,g,I,A,f,T,x);if(F){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},$=ct(O?.dateRange,r);i={accountId:g,accountType:te(S),projectId:I,title:x,timeframe:A,period:$}}y.useEffect((()=>{P||i==null||(_(!0),L.trackTransactionList(i.accountId,void 0,a,i.title),c(he(i.accountId,i.accountType,i.projectId,i.period)))}),[P,i,c]);let B=i;i!=null&&E!=null&&(B={...i,period:E});const R=[d,Y,v,A,f,T,b].filter((r=>r!=null));return F&&B!=null?s.jsx(tt,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,showProjectField:z,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>G(r),...e}):s.jsx(U,{to:be(R.length)})})),be=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},nt=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,ct=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),ot=Z((function(a,e){const t=ze(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&we(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Pe();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(ye({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(Ie(e.selectedAccount.accountId,e.selectedAccount.accountType,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ye({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=rt(e.tenantEmailDomain),n=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}}))(oe),Ae=ie((function({referrerType:a,...e}){const t=Q(),n=q(),c=W(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,timeframe:v,startDate:A,endDate:f,titleEncoded:T,excludeSubAccounts:b}=X(),S=j(d??""),g=j(Y??""),I=j(T??""),x=!(b!=null&&b==="exclude_subaccounts"),O=h((D=>Ge(D.transactionListState,g,S))),[P,_]=y.useState(!1),[E,G]=y.useState(void 0),u=h((D=>H(D))),M=u.company?.featuresActivationInfo.connectedAccountProvider==="unit",l=u.company?.companyInfo.firstMonthOfFY??1;let m;const z=st(S,g,v,A,f,I);if(z){const D={startDate:k(A,"YYYY-MM-DD"),endDate:k(f,"YYYY-MM-DD")},le=it(O?.dateRange,D);m={accountId:g,accountType:te(S),title:I,timeframe:v,period:le}}let i=m;m!=null&&E!=null&&(i={...m,period:E});const{useFeatureGate:F}=ce(),{isFeatureEnabled:B}=F(N.isTransactionCommentingEnabled),R=y.useCallback(((D,le)=>{if(o==null)return;const me=D.url.split(`/${o}/`)[1];if(me==null)return;const[je,xe]=me.split("?"),K=new URLSearchParams(xe??"");K.set("view","full"),K.set("thread_id",le),K.set("entity_type",D.entityType);const Ce=w(n.state?.pathnameStackToGoBack,n.pathname);t(`/${o}/${je}?${K.toString()}`,{state:{pathnameStackToGoBack:Ce}})}),[t,o,n.state,n.pathname]),{isFeatureEnabled:r}=F(N.isProjectsTransactionsEnabled),$=h((D=>ee(D)))&&r,{areTenantIdsInSync:ue}=$e();y.useEffect((()=>{!P&&m!=null&&ue&&(_(!0),L.trackTransactionList(m.accountId,void 0,a,m.title),c(Ie(m.accountId,m.accountType,m.period,void 0,!1,x)))}),[P,m,c,ue]);const Ee=[d,Y,v,A,f,T].filter((D=>D!=null));return z&&i!=null?s.jsx(ot,{firstMonthOfFY:l,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:M,isTransactionCommentingEnabled:B,onCommentThreadClick:R,showProjectField:$,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:D=>G(D),...e}):s.jsx(U,{to:Pe(Ee.length)})})),Pe=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},st=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&k(n,"YYYY-MM-DD").isValid()&&k(c,"YYYY-MM-DD").isValid()&&o!=null,it=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),rt=a=>`/${a}/transactions/${Re}/statements`;function Mt(){const a=q().state?.referrer,e=h((n=>n.expenseAutomationViewState.selectedPeriodByTenantId))[h((n=>H(n))).tenantId],t=Ve();return s.jsxs(Me,{children:[s.jsx(C,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(Ae,{referrerType:a})}),s.jsx(C,{path:"/zeni-clearing-account/statements",element:s.jsx(Ne,{})}),s.jsx(C,{path:"/*",element:s.jsx(Ae,{referrerType:a})}),s.jsx(C,{path:"/uncategorized-income/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/uncategorized-expense/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/miscategorized-income/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/miscategorized-expense/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/missing-receipts/*",element:t?s.jsx(U,{to:`../../month_end_close_checks/review/missing_receipts/${e.month}-${e.year}`}):s.jsx(V,{})}),s.jsx(C,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Xe,{referrerType:a})}),s.jsx(C,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(at,{referrerType:a})})]})}export{Mt as default};
@@ -1,4 +1,4 @@
1
- import{j as e}from"./liveblocks-D83XGo_c.js";import{h as L,g as F,u as B,i as V,j as y,N as D,l as M,n as Te,o as k}from"./core-CGqhbBHO.js";import{cu as O,fB as v,Yb as U,Nu as ae,Nb as Z,Nc as ne,Yd as Ie,Nx as we,Y9 as Ce,Ya as se,Yp as ke,Ly as je,Bf as Ae,Yf as be,NE as Ee,Yc as re,d9 as q,FL as oe,dU as ve,dV as De,_B as Le,_C as Fe,Nd as Be,_D as Ue,Ne as Pe,Nn as Re,bq as Ne,bJ as Ve,cF as Me,bK as Oe,ct as _e,bt as ze,Tc as $e,cs as Ge}from"./zeni-epic-state-DASyz1An.js";import{U as _,j as Ye,z as E,a6 as z,k as A,d3 as Ze,d4 as qe,d5 as Y,$ as H,E as He,ao as Ke,aq as We,I as ie,d as R,a9 as Je,a5 as Qe,d6 as Xe,ac as K,p as et,d7 as tt,a2 as W,d8 as at,ag as nt,Z as Q,d9 as st,h as rt}from"./index-CoKBrrSw.js";import{D as ot,n as N,S as it}from"./mui-CD71lp6N.js";import ct from"./NotFoundScreen-RGfzDsux.js";import{S as X}from"./SetupPagesScreen-C6kDqRGd.js";import{a as p}from"./sentry-BPfEBx2C.js";import{u as lt}from"./useAskAiCfoHostNavButtonProps-C4V1Wf7u.js";import{u as ut}from"./useInitialThreadRequest-CP8MsLNf.js";import{M as ce}from"./MobileAppDrawer-Dt611RZ9.js";import{F as dt}from"./FeaturePreviewScreen-o3aGYwm3.js";import{a as ee}from"./analyticsHelper-DtAHYi5r.js";import"./recharts-2kmMgB1t.js";import"./analytics-CsbG8awP.js";import"./plaid-C8_LWTII.js";import"./dnd-CyZNzT3I.js";import"./stripe-cKAAJElX.js";import"./lottie-DeqWxWVC.js";import"./lexical-C5ZCOEAv.js";import"./pdf-D4eEcTTi.js";import"./utils-B6XFkcn3.js";import"./BusinessVerificationPageScreen-C37udtB6.js";import"./routePaths-DU2fgaW2.js";import"./InboxNotificationsProvider-DDRknvRh.js";import"./useTaskManagerAccess-Dl-8FUHJ.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]="2f110050-1c73-47f5-9398-73528f4e69ca",t._sentryDebugIdIdentifier="sentry-dbid-2f110050-1c73-47f5-9398-73528f4e69ca")}catch{}})();const pt=M((function(t,a){const{companyId:n}=a;return{treasurySetupView:U(t,n),analytics:A}}),(function(t,a){const{navigate:n,analytics:o,treasurySetupView:i}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=i.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(we(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(Ie(r))}}}))(Ze);function mt(){const t=L(),a=F(),n=B(),{tenantEmailDomain:o}=V(),i=_(),r=y((w=>w.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState)),m=Ye(r),s=O(i?.loggedInUserRoleMap),[d,c]=p.useState(!1),[S,T]=p.useState(!1),[l,u]=p.useState(!1),x=y((w=>v(w))),f=E.getSignedInUserTenant(o)?.companyId??x.companyId,C=E.getSignedInUser(),h=y((w=>U(w,f))),g=y((w=>w.treasurySetupViewState.fetchState)),j=y((w=>w.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),I=y((w=>w.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState));if(C==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(p.useEffect((()=>{d||g!=="Not-Started"||f==null||(c(!0),n(ae(f,!0,!1)))}),[d,g,f,n]),p.useEffect((()=>{l||I!=="Not-Started"||f==null||(u(!0),n(Z()))}),[l,I,f,n]),p.useEffect((()=>{S||j!=="Not-Started"||f==null||(T(!0),n(ne()))}),[S,j,f,n]),p.useEffect((()=>{m==="In-Progress"&&r==="Completed"&&t("../")}),[m,r,t]),x.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(D,{to:"../promo"});const P=x.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||g!=="Completed";return e.jsxs(e.Fragment,{children:[!P&&e.jsx(z,{analytics:A,onLoad:()=>{}}),e.jsx(pt,{navigate:t,location:a,companyId:f,isEditMode:!0,isLoading:P,isReadOnly:!s,treasurySetupView:h,analytics:A})]})}const ft=M((function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:ke(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:U(t,n)}}),(function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:i}=a,r=o.treasuryTransferMoneyLocalData,m=i.fundAllocationLocalData;return{onCancelClick:()=>{Y(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{Y(a.analytics,"confirm",r,m,"Transfer"),t(Ee())},onSaveChangesToLocalStore:s=>{t(be(s))},onFetchLinkTokenClick:s=>{t(Ae("treasury_setup",s))},onEstablishConnectionClick:s=>{t(je(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}}))(qe),yt=({isFirstTransfer:t,isTransactionsLoaded:a})=>{const n=L(),{tenantEmailDomain:o}=V(),i=B(),[r,m]=p.useState(!1),[s,d]=p.useState(!1),[c,S]=p.useState(!1),[T,l]=p.useState(!1),u=y((I=>I.treasurySetupViewState.fetchState)),x=y((I=>I.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState)),f=y((I=>I.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),C=y((I=>v(I))),h=E.getSignedInUserTenant(o)?.companyId??C.companyId,g=y((I=>Ce(I))),j=y((I=>U(I,h)));if(E.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return p.useEffect((()=>{s||u!=="Not-Started"||h==null||(d(!0),i(ae(h,!0,!1)))}),[s,u,h,i]),p.useEffect((()=>{c||x!=="Not-Started"||h==null||(S(!0),i(Z()))}),[c,x,h,i]),p.useEffect((()=>{T||f!=="Not-Started"||h==null||(l(!0),i(ne()))}),[T,f,h,i]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:A,onLoad:()=>{}}),e.jsx(ft,{analytics:A,navigate:n,transferDetails:g,onAnotherTransferClick:()=>{m(!1),i(se())},currentTenant:C,treasurySetupView:j,showReviewContent:r,maxInsuredAmount:5e5,onReviewClick:()=>{Y(A,"review",g.treasuryTransferMoneyLocalData,j.fundAllocationLocalData,"Transfer"),m(!0)},isFirstTransfer:t,isTransactionsLoaded:a,setShowReviewContent:m,onBackClick:()=>{}})]})},gt=N.div`
1
+ import{j as e}from"./liveblocks-D0hIH2N0.js";import{h as L,g as F,u as B,i as V,j as y,N as D,l as M,n as Te,o as k}from"./core-35eDsgGP.js";import{cu as O,fB as v,Yb as U,Nu as ae,Nb as Z,Nc as ne,Yd as Ie,Nx as we,Y9 as Ce,Ya as se,Yp as ke,Ly as je,Bf as Ae,Yf as be,NE as Ee,Yc as re,d9 as q,FL as oe,dU as ve,dV as De,_B as Le,_C as Fe,Nd as Be,_D as Ue,Ne as Pe,Nn as Re,bq as Ne,bJ as Ve,cF as Me,bK as Oe,ct as _e,bt as ze,Tc as $e,cs as Ge}from"./zeni-epic-state-BRRtwAQl.js";import{U as _,j as Ye,z as E,a6 as z,k as A,d3 as Ze,d4 as qe,d5 as Y,$ as H,E as He,ao as Ke,aq as We,I as ie,d as R,a9 as Je,a5 as Qe,d6 as Xe,ac as K,p as et,d7 as tt,a2 as W,d8 as at,ag as nt,Z as Q,d9 as st,h as rt}from"./index-BBhWSYD8.js";import{D as ot,n as N,S as it}from"./mui-CY_LMiAy.js";import ct from"./NotFoundScreen-B6L1cY3I.js";import{S as X}from"./SetupPagesScreen-CvaReXCR.js";import{a as p}from"./sentry-DhqS_W-k.js";import{u as lt}from"./useAskAiCfoHostNavButtonProps-DGTLHvUD.js";import{u as ut}from"./useInitialThreadRequest-UvGRmRxR.js";import{M as ce}from"./MobileAppDrawer-C9wi8312.js";import{F as dt}from"./FeaturePreviewScreen-BhcrS0dM.js";import{a as ee}from"./analyticsHelper-Cq4tYGNc.js";import"./recharts-B8j-bW95.js";import"./analytics-p9dV2gEo.js";import"./plaid-CoaHurGj.js";import"./dnd-Dm1d6mZC.js";import"./stripe-cKAAJElX.js";import"./lottie-TJOzQ6Cz.js";import"./lexical-DQ4lSvQh.js";import"./pdf-DElOA9Iz.js";import"./utils-CgQOqOwX.js";import"./BusinessVerificationPageScreen-BnngOdPs.js";import"./routePaths-BgYQMm9p.js";import"./InboxNotificationsProvider-yp4VlF4V.js";import"./useTaskManagerAccess-DRrr5b-Z.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]="2f110050-1c73-47f5-9398-73528f4e69ca",t._sentryDebugIdIdentifier="sentry-dbid-2f110050-1c73-47f5-9398-73528f4e69ca")}catch{}})();const pt=M((function(t,a){const{companyId:n}=a;return{treasurySetupView:U(t,n),analytics:A}}),(function(t,a){const{navigate:n,analytics:o,treasurySetupView:i}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=i.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(we(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(Ie(r))}}}))(Ze);function mt(){const t=L(),a=F(),n=B(),{tenantEmailDomain:o}=V(),i=_(),r=y((w=>w.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState)),m=Ye(r),s=O(i?.loggedInUserRoleMap),[d,c]=p.useState(!1),[S,T]=p.useState(!1),[l,u]=p.useState(!1),x=y((w=>v(w))),f=E.getSignedInUserTenant(o)?.companyId??x.companyId,C=E.getSignedInUser(),h=y((w=>U(w,f))),g=y((w=>w.treasurySetupViewState.fetchState)),j=y((w=>w.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),I=y((w=>w.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState));if(C==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(p.useEffect((()=>{d||g!=="Not-Started"||f==null||(c(!0),n(ae(f,!0,!1)))}),[d,g,f,n]),p.useEffect((()=>{l||I!=="Not-Started"||f==null||(u(!0),n(Z()))}),[l,I,f,n]),p.useEffect((()=>{S||j!=="Not-Started"||f==null||(T(!0),n(ne()))}),[S,j,f,n]),p.useEffect((()=>{m==="In-Progress"&&r==="Completed"&&t("../")}),[m,r,t]),x.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(D,{to:"../promo"});const P=x.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||g!=="Completed";return e.jsxs(e.Fragment,{children:[!P&&e.jsx(z,{analytics:A,onLoad:()=>{}}),e.jsx(pt,{navigate:t,location:a,companyId:f,isEditMode:!0,isLoading:P,isReadOnly:!s,treasurySetupView:h,analytics:A})]})}const ft=M((function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:ke(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:U(t,n)}}),(function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:i}=a,r=o.treasuryTransferMoneyLocalData,m=i.fundAllocationLocalData;return{onCancelClick:()=>{Y(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{Y(a.analytics,"confirm",r,m,"Transfer"),t(Ee())},onSaveChangesToLocalStore:s=>{t(be(s))},onFetchLinkTokenClick:s=>{t(Ae("treasury_setup",s))},onEstablishConnectionClick:s=>{t(je(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}}))(qe),yt=({isFirstTransfer:t,isTransactionsLoaded:a})=>{const n=L(),{tenantEmailDomain:o}=V(),i=B(),[r,m]=p.useState(!1),[s,d]=p.useState(!1),[c,S]=p.useState(!1),[T,l]=p.useState(!1),u=y((I=>I.treasurySetupViewState.fetchState)),x=y((I=>I.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState)),f=y((I=>I.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),C=y((I=>v(I))),h=E.getSignedInUserTenant(o)?.companyId??C.companyId,g=y((I=>Ce(I))),j=y((I=>U(I,h)));if(E.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return p.useEffect((()=>{s||u!=="Not-Started"||h==null||(d(!0),i(ae(h,!0,!1)))}),[s,u,h,i]),p.useEffect((()=>{c||x!=="Not-Started"||h==null||(S(!0),i(Z()))}),[c,x,h,i]),p.useEffect((()=>{T||f!=="Not-Started"||h==null||(l(!0),i(ne()))}),[T,f,h,i]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:A,onLoad:()=>{}}),e.jsx(ft,{analytics:A,navigate:n,transferDetails:g,onAnotherTransferClick:()=>{m(!1),i(se())},currentTenant:C,treasurySetupView:j,showReviewContent:r,maxInsuredAmount:5e5,onReviewClick:()=>{Y(A,"review",g.treasuryTransferMoneyLocalData,j.fundAllocationLocalData,"Transfer"),m(!0)},isFirstTransfer:t,isTransactionsLoaded:a,setShowReviewContent:m,onBackClick:()=>{}})]})},gt=N.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as l}from"./liveblocks-D83XGo_c.js";import{a as f}from"./sentry-BPfEBx2C.js";import{i as O,u as z,h as J,g as K,j as m,l as G,n as at,o as B,N as $}from"./core-CGqhbBHO.js";import{UG as zt,UH as Yt,lF as W,ry as Kt,rK as qt,s0 as Ht,r_ as Qt,s1 as Wt,s4 as Xt,UI as Zt,fB as L,UJ as Ee,UK as Me,gX as te,cA as Ie,cB as be,Eg as St,UL as nt,Ek as ea,S7 as ae,Ee as ta,E8 as aa,UM as Je,E0 as na,D$ as sa,DW as oa,E5 as la,El as ia,UN as ue,UO as Ge,E1 as ca,UP as he,gL as ft,EB as gt,Eu as vt,UQ as xt,rE as Tt,Eo as yt,Em as Ct,UR as Dt,EI as Et,EF as It,Ep as bt,EH as $e,Qy as kt,US as da,UT as ra,cD as ua,UU as ha,UV as pa,UW as pe,UX as ie,UY as ke,S8 as ze,EX as Te,S6 as ye,EK as wt,Eh as Ye,UZ as ma,S9 as H,U_ as Ke,Eb as Sa,U$ as fa,V0 as ga,V1 as qe,V2 as He,V3 as Qe,V4 as We,ER as we,V5 as At,Ey as Vt,V6 as va,V7 as xa,V8 as Ta,V9 as ya,Va as Ca,Vb as Da,Vc as Ea,Vd as Ia,Br as ba,Bz as ka,Bs as wa,Re as je,Ve as Aa,Vf as Va,kV as Pe,br as Fa,Vg as ja,Vh as Pa,mD as _a,mM as La,Rd as _e,bE as st,Vi as Ft,QQ as jt,Vj as Ba,Vk as Ua,Vl as Oa,mO as Ra,Vm as ot,Vn as lt,Vo as it,Vp as ct,Vq as Na,mK as Ma,Vr as Ja,mN as Ga,Vs as $a,Vt as Pt,Rz as _t,m1 as za,Vu as Ya,Vv as Le,Vw as Lt,Rx as Bt,Hg as Ka,Vx as qa,Vy as Ha,ml as Ut,Vz as Qa,VA as Wa,RL as Xa,um as Za,VB as Ot,VC as dt,RI as Be,VD as rt,VE as en,RN as tn,VF as an,VG as nn,VH as sn,VI as on,VJ as ln,up as cn,VK as dn,Sa as rn,TF as un,Rq as Ue,i7 as hn,TH as pn,TG as mn,i5 as Sn,VL as fn,VM as gn,Hl as vn,VN as xn,VO as Tn,VP as yn,VQ as Cn,m5 as Dn,bn as En,dV as In,dU as bn}from"./zeni-epic-state-DASyz1An.js";import{a2 as Ce,aK as Ae,aL as kn,z as R,j as Oe,a5 as Rt,a6 as Z,k as V,at as ee,aM as wn,p as M,G as De,c as ce,aN as An,aO as Vn,aP as Fn,E as jn,$ as de,a9 as Xe,I as ne,d as Y,aQ as Pn,X as Ze,aq as me,aR as _n,aS as Nt,ao as Ln,aT as Bn,U as Un,aU as On,ac as Mt,aV as Rn,J as X,a7 as Nn,ad as Jt,ae as Mn,aW as Jn,aX as Gn,S as et,aY as $n,aZ as zn,a1 as Yn,a_ as Kn,a$ as qn}from"./index-CoKBrrSw.js";import{n as N,D as Hn,S as Gt}from"./mui-CD71lp6N.js";import{t as Qn,A as Wn}from"./AddressScreen-BD6hfTYm.js";import Q from"./NotFoundScreen-RGfzDsux.js";import{F as Xn}from"./FeaturePreviewScreen-o3aGYwm3.js";import{p as Zn}from"./pathToGoBack-CoDJzfH-.js";import{c as q,v as tt,d as es}from"./routePaths-DU2fgaW2.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-C4V1Wf7u.js";import{M as fe}from"./MobileAppDrawer-Dt611RZ9.js";import{D as ts}from"./DrawerScreen-BRJIwisq.js";import{a as as,m as ns}from"./accountMappingHelper-L9SkIWKz.js";import"./recharts-2kmMgB1t.js";import"./analytics-CsbG8awP.js";import"./plaid-C8_LWTII.js";import"./dnd-CyZNzT3I.js";import"./stripe-cKAAJElX.js";import"./lottie-DeqWxWVC.js";import"./lexical-C5ZCOEAv.js";import"./pdf-D4eEcTTi.js";import"./utils-B6XFkcn3.js";import"./InboxNotificationsProvider-DDRknvRh.js";import"./useTaskManagerAccess-Dl-8FUHJ.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]="869a29be-af0e-4abf-9631-524419e205e3",e._sentryDebugIdIdentifier="sentry-dbid-869a29be-af0e-4abf-9631-524419e205e3")}catch{}})();function ss(){const{accrualId:e}=O(),a=z(),s=J(),t=K(),{accrual:n,actionFetchState:o,detailFetchState:d,localData:i}=m((c=>zt(c,e??""))),u=m((c=>Yt(c))),h=m((c=>W(c))),S=f.useCallback((()=>{const c=Ce(t.state?.pathnameStackToGoBack);s(c.poppedPathname??Zn(4),{state:{pathnameStackToGoBack:c.newStack}})}),[t.state,s]),r=f.useRef(!1);return f.useEffect((()=>{o.fetchState!=="In-Progress"&&r.current&&o.fetchState==="Completed"&&(r.current=!1,S())}),[o.fetchState,S]),f.useEffect((()=>{e!=null&&n==null&&d.fetchState==="Not-Started"&&a(Kt(e))}),[e,n,d.fetchState]),f.useEffect((()=>{a(qt({scheduleType:"prepaid_expenses",shouldResetEnteredData:!1}))}),[a]),e==null?l.jsx(Q,{}):n==null?d.fetchState==="Not-Started"||d.fetchState==="In-Progress"?l.jsx(Ae,{}):l.jsx(Q,{}):l.jsx(kn,{accrual:n,actionFetchState:o.fetchState,isAccountingClassesEnabled:h,localData:i,newAccrualAccountsView:u,onAccrualFormChange:(c,p)=>{a(Zt({accrualId:c,localData:p}))},onAccrualFormClear:c=>{a(Xt({accrualId:c}))},onApproveAndPost:c=>{a(Wt(e,c))},onNavigateBack:S,onRevert:(c,p)=>{r.current=!0,a(Qt(e,c,p))},onSkip:(c,p)=>{a(Ht(e,c,p))}})}const os=De.getLocalizedStrings(),ls=G((function(e,a){const s=Me(e,a.scheduleTab),t=e.tenantState.currentTenantId;return{authParams:{userId:a.signedInUser.userId??"",sessionId:a.signedInUser.zeniSessionId??"",tenantId:t??""},linkBillExpenseView:s.linkBillExpenseView,transactions:s.linkBillExpenseView.transactions}}),(function(e,a){const{navigate:s,location:t}=a;return{onTransactionSelect(n){e(nt({selectedTransaction:n}))},onBackClick:()=>{s("..",{relative:"path"})},onCancel(){e(nt({selectedTransaction:void 0})),e(ea()),s("..",{relative:"path"})},onTransactionClick:n=>{const o=`${q(n,a.tenantEmailDomain)}`,d=M(t.state?.pathnameStackToGoBack,t.pathname);s(o,{state:{pathnameStackToGoBack:d}})},onLinkSave(){a.setShouldNavigateBack(!1),e(St(a.scheduleTab,a.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}}))(wn),is=({setShouldNavigateBack:e})=>{const a=J(),s=K(),{scheduleDetailId:t,tenantEmailDomain:n}=O(),{scheduleType:o}=O();if(n==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const d=m((g=>L(g))),i=Ee(o)??"accrued_expenses",u=R.getSignedInUser();if(u==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const h=m((g=>Me(g,i))),S=h.selectedJELinkRowIndex,r=m((g=>te(g,d.companyId))),c=Oe(h.updateStatus.fetchState);f.useEffect((()=>{c==="In-Progress"&&h.updateStatus.fetchState==="Completed"&&a("..",{relative:"path"})}),[c,h.updateStatus.fetchState]),f.useEffect((()=>{h.fetchState==="Not-Started"&&a("..",{relative:"path"})}),[]),f.useEffect((()=>{h.selectedJEAccruedSchedule!=null&&h.selectedJELinkRowIndex!=null||a("..",{relative:"path"})}),[h.selectedJEAccruedSchedule,h.selectedJELinkRowIndex]);const p=h.linkBillExpenseView.fetchState==="Completed";return l.jsx(l.Fragment,{children:h.linkBillExpenseView.fetchState==="In-Progress"?l.jsx(Rt,{fetchState:h.linkBillExpenseView.fetchState}):h.selectedJEAccruedSchedule!=null&&S!=null?l.jsxs(l.Fragment,{children:[p===!0?l.jsx(Z,{analytics:V,onLoad:()=>{cs(h,i,r)}}):null,l.jsx(ls,{signedInUser:u,attachmentEndPoint:`${ee}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:h.selectedJEAccruedSchedule.vendor.id??"",location:s,tenantEmailDomain:n,scheduleAccruedDetailsView:h,saveFetchState:h.updateStatus.fetchState,scheduleTab:i,navigate:a,analytics:V,controllerUserDetails:r,saveStatus:h.updateStatus.fetchState,jeAccruedSchedule:h.selectedJEAccruedSchedule,localData:h.scheduleAccruedDetailsLocalData.jeScheduleDetails[S]})]}):null})},$t=e=>{const a=os.dateFormat.analytics.YYYYDashMMDashDDFormat;return{scheduleCreateDate:e.createTime.format(a)??null,scheduleMonthlyAmount:e.recurringAmount??null,startingBalance:e.otherAttributes.startingBalance??null,scheduleAccountCategory:e.jeCredit.account?.accountName??null,description:e.memo,runningBalance:e.balanceAsOfToday??null,currentBalance:e.balanceAsOfToday??null,currentStatus:e.status.label,period:e.period??null,startMonth:e.startDate?.format(a)??null,endMonth:e.endDate?.format(a)??null}},cs=(e,a,s)=>{const t=e.selectedJEAccruedSchedule,n=e.selectedJELinkRowIndex;let o;n!=null&&t!=null&&(o=t.scheduledJournalEntry[n]);const{transactions:d}=e.linkBillExpenseView,i=d.some((S=>S.isRecommendedTransaction===!0)),u=Ie(s.controllers),h=be(s.controllerUserIds);t!=null&&V.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...$t(t)},scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:i,journalEntryPostingStatus:o?.status.label??""},vendorName:t.vendor.name??null,controllerEmails:u,controllerUserIds:h})},ds=N.div`
1
+ import{j as l}from"./liveblocks-D0hIH2N0.js";import{a as f}from"./sentry-DhqS_W-k.js";import{i as O,u as z,h as J,g as K,j as m,l as G,n as at,o as B,N as $}from"./core-35eDsgGP.js";import{UG as zt,UH as Yt,lF as W,ry as Kt,rK as qt,s0 as Ht,r_ as Qt,s1 as Wt,s4 as Xt,UI as Zt,fB as L,UJ as Ee,UK as Me,gX as te,cA as Ie,cB as be,Eg as St,UL as nt,Ek as ea,S7 as ae,Ee as ta,E8 as aa,UM as Je,E0 as na,D$ as sa,DW as oa,E5 as la,El as ia,UN as ue,UO as Ge,E1 as ca,UP as he,gL as ft,EB as gt,Eu as vt,UQ as xt,rE as Tt,Eo as yt,Em as Ct,UR as Dt,EI as Et,EF as It,Ep as bt,EH as $e,Qy as kt,US as da,UT as ra,cD as ua,UU as ha,UV as pa,UW as pe,UX as ie,UY as ke,S8 as ze,EX as Te,S6 as ye,EK as wt,Eh as Ye,UZ as ma,S9 as H,U_ as Ke,Eb as Sa,U$ as fa,V0 as ga,V1 as qe,V2 as He,V3 as Qe,V4 as We,ER as we,V5 as At,Ey as Vt,V6 as va,V7 as xa,V8 as Ta,V9 as ya,Va as Ca,Vb as Da,Vc as Ea,Vd as Ia,Br as ba,Bz as ka,Bs as wa,Re as je,Ve as Aa,Vf as Va,kV as Pe,br as Fa,Vg as ja,Vh as Pa,mD as _a,mM as La,Rd as _e,bE as st,Vi as Ft,QQ as jt,Vj as Ba,Vk as Ua,Vl as Oa,mO as Ra,Vm as ot,Vn as lt,Vo as it,Vp as ct,Vq as Na,mK as Ma,Vr as Ja,mN as Ga,Vs as $a,Vt as Pt,Rz as _t,m1 as za,Vu as Ya,Vv as Le,Vw as Lt,Rx as Bt,Hg as Ka,Vx as qa,Vy as Ha,ml as Ut,Vz as Qa,VA as Wa,RL as Xa,um as Za,VB as Ot,VC as dt,RI as Be,VD as rt,VE as en,RN as tn,VF as an,VG as nn,VH as sn,VI as on,VJ as ln,up as cn,VK as dn,Sa as rn,TF as un,Rq as Ue,i7 as hn,TH as pn,TG as mn,i5 as Sn,VL as fn,VM as gn,Hl as vn,VN as xn,VO as Tn,VP as yn,VQ as Cn,m5 as Dn,bn as En,dV as In,dU as bn}from"./zeni-epic-state-BRRtwAQl.js";import{a2 as Ce,aK as Ae,aL as kn,z as R,j as Oe,a5 as Rt,a6 as Z,k as V,at as ee,aM as wn,p as M,G as De,c as ce,aN as An,aO as Vn,aP as Fn,E as jn,$ as de,a9 as Xe,I as ne,d as Y,aQ as Pn,X as Ze,aq as me,aR as _n,aS as Nt,ao as Ln,aT as Bn,U as Un,aU as On,ac as Mt,aV as Rn,J as X,a7 as Nn,ad as Jt,ae as Mn,aW as Jn,aX as Gn,S as et,aY as $n,aZ as zn,a1 as Yn,a_ as Kn,a$ as qn}from"./index-BBhWSYD8.js";import{n as N,D as Hn,S as Gt}from"./mui-CY_LMiAy.js";import{t as Qn,A as Wn}from"./AddressScreen-anqh6to9.js";import Q from"./NotFoundScreen-B6L1cY3I.js";import{F as Xn}from"./FeaturePreviewScreen-BhcrS0dM.js";import{p as Zn}from"./pathToGoBack-n4Mx0taW.js";import{c as q,v as tt,d as es}from"./routePaths-BgYQMm9p.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-DGTLHvUD.js";import{M as fe}from"./MobileAppDrawer-C9wi8312.js";import{D as ts}from"./DrawerScreen-B_ZAZq-c.js";import{a as as,m as ns}from"./accountMappingHelper-C4yUO_tP.js";import"./recharts-B8j-bW95.js";import"./analytics-p9dV2gEo.js";import"./plaid-CoaHurGj.js";import"./dnd-Dm1d6mZC.js";import"./stripe-cKAAJElX.js";import"./lottie-TJOzQ6Cz.js";import"./lexical-DQ4lSvQh.js";import"./pdf-DElOA9Iz.js";import"./utils-CgQOqOwX.js";import"./InboxNotificationsProvider-yp4VlF4V.js";import"./useTaskManagerAccess-DRrr5b-Z.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]="869a29be-af0e-4abf-9631-524419e205e3",e._sentryDebugIdIdentifier="sentry-dbid-869a29be-af0e-4abf-9631-524419e205e3")}catch{}})();function ss(){const{accrualId:e}=O(),a=z(),s=J(),t=K(),{accrual:n,actionFetchState:o,detailFetchState:d,localData:i}=m((c=>zt(c,e??""))),u=m((c=>Yt(c))),h=m((c=>W(c))),S=f.useCallback((()=>{const c=Ce(t.state?.pathnameStackToGoBack);s(c.poppedPathname??Zn(4),{state:{pathnameStackToGoBack:c.newStack}})}),[t.state,s]),r=f.useRef(!1);return f.useEffect((()=>{o.fetchState!=="In-Progress"&&r.current&&o.fetchState==="Completed"&&(r.current=!1,S())}),[o.fetchState,S]),f.useEffect((()=>{e!=null&&n==null&&d.fetchState==="Not-Started"&&a(Kt(e))}),[e,n,d.fetchState]),f.useEffect((()=>{a(qt({scheduleType:"prepaid_expenses",shouldResetEnteredData:!1}))}),[a]),e==null?l.jsx(Q,{}):n==null?d.fetchState==="Not-Started"||d.fetchState==="In-Progress"?l.jsx(Ae,{}):l.jsx(Q,{}):l.jsx(kn,{accrual:n,actionFetchState:o.fetchState,isAccountingClassesEnabled:h,localData:i,newAccrualAccountsView:u,onAccrualFormChange:(c,p)=>{a(Zt({accrualId:c,localData:p}))},onAccrualFormClear:c=>{a(Xt({accrualId:c}))},onApproveAndPost:c=>{a(Wt(e,c))},onNavigateBack:S,onRevert:(c,p)=>{r.current=!0,a(Qt(e,c,p))},onSkip:(c,p)=>{a(Ht(e,c,p))}})}const os=De.getLocalizedStrings(),ls=G((function(e,a){const s=Me(e,a.scheduleTab),t=e.tenantState.currentTenantId;return{authParams:{userId:a.signedInUser.userId??"",sessionId:a.signedInUser.zeniSessionId??"",tenantId:t??""},linkBillExpenseView:s.linkBillExpenseView,transactions:s.linkBillExpenseView.transactions}}),(function(e,a){const{navigate:s,location:t}=a;return{onTransactionSelect(n){e(nt({selectedTransaction:n}))},onBackClick:()=>{s("..",{relative:"path"})},onCancel(){e(nt({selectedTransaction:void 0})),e(ea()),s("..",{relative:"path"})},onTransactionClick:n=>{const o=`${q(n,a.tenantEmailDomain)}`,d=M(t.state?.pathnameStackToGoBack,t.pathname);s(o,{state:{pathnameStackToGoBack:d}})},onLinkSave(){a.setShouldNavigateBack(!1),e(St(a.scheduleTab,a.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}}))(wn),is=({setShouldNavigateBack:e})=>{const a=J(),s=K(),{scheduleDetailId:t,tenantEmailDomain:n}=O(),{scheduleType:o}=O();if(n==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const d=m((g=>L(g))),i=Ee(o)??"accrued_expenses",u=R.getSignedInUser();if(u==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const h=m((g=>Me(g,i))),S=h.selectedJELinkRowIndex,r=m((g=>te(g,d.companyId))),c=Oe(h.updateStatus.fetchState);f.useEffect((()=>{c==="In-Progress"&&h.updateStatus.fetchState==="Completed"&&a("..",{relative:"path"})}),[c,h.updateStatus.fetchState]),f.useEffect((()=>{h.fetchState==="Not-Started"&&a("..",{relative:"path"})}),[]),f.useEffect((()=>{h.selectedJEAccruedSchedule!=null&&h.selectedJELinkRowIndex!=null||a("..",{relative:"path"})}),[h.selectedJEAccruedSchedule,h.selectedJELinkRowIndex]);const p=h.linkBillExpenseView.fetchState==="Completed";return l.jsx(l.Fragment,{children:h.linkBillExpenseView.fetchState==="In-Progress"?l.jsx(Rt,{fetchState:h.linkBillExpenseView.fetchState}):h.selectedJEAccruedSchedule!=null&&S!=null?l.jsxs(l.Fragment,{children:[p===!0?l.jsx(Z,{analytics:V,onLoad:()=>{cs(h,i,r)}}):null,l.jsx(ls,{signedInUser:u,attachmentEndPoint:`${ee}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:h.selectedJEAccruedSchedule.vendor.id??"",location:s,tenantEmailDomain:n,scheduleAccruedDetailsView:h,saveFetchState:h.updateStatus.fetchState,scheduleTab:i,navigate:a,analytics:V,controllerUserDetails:r,saveStatus:h.updateStatus.fetchState,jeAccruedSchedule:h.selectedJEAccruedSchedule,localData:h.scheduleAccruedDetailsLocalData.jeScheduleDetails[S]})]}):null})},$t=e=>{const a=os.dateFormat.analytics.YYYYDashMMDashDDFormat;return{scheduleCreateDate:e.createTime.format(a)??null,scheduleMonthlyAmount:e.recurringAmount??null,startingBalance:e.otherAttributes.startingBalance??null,scheduleAccountCategory:e.jeCredit.account?.accountName??null,description:e.memo,runningBalance:e.balanceAsOfToday??null,currentBalance:e.balanceAsOfToday??null,currentStatus:e.status.label,period:e.period??null,startMonth:e.startDate?.format(a)??null,endMonth:e.endDate?.format(a)??null}},cs=(e,a,s)=>{const t=e.selectedJEAccruedSchedule,n=e.selectedJELinkRowIndex;let o;n!=null&&t!=null&&(o=t.scheduledJournalEntry[n]);const{transactions:d}=e.linkBillExpenseView,i=d.some((S=>S.isRecommendedTransaction===!0)),u=Ie(s.controllers),h=be(s.controllerUserIds);t!=null&&V.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...$t(t)},scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:i,journalEntryPostingStatus:o?.status.label??""},vendorName:t.vendor.name??null,controllerEmails:u,controllerUserIds:h})},ds=N.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as o}from"./liveblocks-D83XGo_c.js";import{a as f}from"./sentry-BPfEBx2C.js";import{t as u,u as h,j as y,N as I}from"./core-CGqhbBHO.js";import{Tu as b,ge as w,IB as j}from"./zeni-epic-state-DASyz1An.js";import{z as l,a5 as x,ad as S,ae as D}from"./index-CoKBrrSw.js";import{n as c}from"./mui-CD71lp6N.js";import"./recharts-2kmMgB1t.js";import"./analytics-CsbG8awP.js";import"./plaid-C8_LWTII.js";import"./dnd-CyZNzT3I.js";import"./stripe-cKAAJElX.js";import"./lottie-DeqWxWVC.js";import"./lexical-C5ZCOEAv.js";import"./pdf-D4eEcTTi.js";import"./utils-B6XFkcn3.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]="ea41ccea-5f53-4bd9-9774-3f8e93475442",e._sentryDebugIdIdentifier="sentry-dbid-ea41ccea-5f53-4bd9-9774-3f8e93475442")}catch{}})();const F=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",g=e.get("profileId")??"",[n,p]=f.useState(!1),a=h(),i=y((m=>b(m))),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(I,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect((()=>{n||(p(!0),a(j(t,g,s)))}),[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(T,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},E=c.div`
1
+ import{j as o}from"./liveblocks-D0hIH2N0.js";import{a as f}from"./sentry-DhqS_W-k.js";import{t as u,u as h,j as y,N as I}from"./core-35eDsgGP.js";import{Tu as b,ge as w,IB as j}from"./zeni-epic-state-BRRtwAQl.js";import{z as l,a5 as x,ad as S,ae as D}from"./index-BBhWSYD8.js";import{n as c}from"./mui-CY_LMiAy.js";import"./recharts-B8j-bW95.js";import"./analytics-p9dV2gEo.js";import"./plaid-CoaHurGj.js";import"./dnd-Dm1d6mZC.js";import"./stripe-cKAAJElX.js";import"./lottie-TJOzQ6Cz.js";import"./lexical-DQ4lSvQh.js";import"./pdf-DElOA9Iz.js";import"./utils-CgQOqOwX.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]="ea41ccea-5f53-4bd9-9774-3f8e93475442",e._sentryDebugIdIdentifier="sentry-dbid-ea41ccea-5f53-4bd9-9774-3f8e93475442")}catch{}})();const F=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",g=e.get("profileId")??"",[n,p]=f.useState(!1),a=h(),i=y((m=>b(m))),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(I,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect((()=>{n||(p(!0),a(j(t,g,s)))}),[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(T,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},E=c.div`
2
2
  display: flex;
3
3
  width: 100%;
4
4
  height: 100vh;
@@ -1,4 +1,4 @@
1
- import{j as e}from"./liveblocks-D83XGo_c.js";import{u as M,h as ae,g as W,i as G,j as D,l as te,N as ee,n as Le,o as C}from"./core-CGqhbBHO.js";import{_g as Re,Kt as Ue,_h as ze,fB as F,FJ as Me,_i as wn,ct as ne,cu as Ve,FD as kn,_j as Dn,_k as In,FG as Sn,FN as ge,FA as bn,Fx as jn,XP as le,_l as vn,N_ as Pn,UM as En,O0 as Tn,mm as je,_m as On,u1 as $e,tR as Ne,md as Ze,mg as ve,UN as Pe,UO as _n,_n as Bn,mf as Fn,mC as Ln,m4 as Rn,ku as Un,kt as zn,_o as Mn,_p as he,NH as Vn,_q as $n,_r as Nn,Y3 as ye,_s as Ee,_t as Zn,Ob as Hn,Yp as Wn,Ly as He,Bf as We,_u as Gn,O8 as Yn,_v as Ge,d6 as xe,Of as Ye,dU as Je,dV as Ce,Od as Jn,Ls as qn,O5 as Kn,_w as qe,_x as Ke,NJ as Xe,NT as Te,_y as Xn,Yg as Qn,Og as ea,bq as na,bJ as aa,cF as ta,bK as oa,bt as sa,Tc as ia}from"./zeni-epic-state-DASyz1An.js";import{U as oe,I as N,d as z,z as b,at as Ae,E as L,a5 as de,cU as ra,$,a9 as Y,a2 as Qe,j as ca,q as Oe,k as O,cV as la,ac as we,cW as da,a6 as ue,cX as ua,S as ke,bg as H,cY as pa,ao as ma,aq as en,cZ as _e,c_ as ga,p as ce,c$ as ha,ag as fa,d0 as ya,d1 as xa,h as Ca,J as Aa}from"./index-CoKBrrSw.js";import{n as R,D as J,S as q}from"./mui-CD71lp6N.js";import Q from"./NotFoundScreen-RGfzDsux.js";import{S as Be}from"./SetupPagesScreen-C6kDqRGd.js";import{F as nn}from"./FeaturePreviewScreen-o3aGYwm3.js";import{a as m}from"./sentry-BPfEBx2C.js";import{M as pe}from"./MobileAppDrawer-Dt611RZ9.js";import{A as wa,D as ka,V as Da}from"./DomesticWireDetailScreen-BQNmPyj8.js";import{A as Ia}from"./AddressScreen-BD6hfTYm.js";import{u as an}from"./useAskAiCfoHostNavButtonProps-C4V1Wf7u.js";import{Z as Sa}from"./ZeniAccountStatementScreen-DQaLVOUo.js";import"./recharts-2kmMgB1t.js";import"./analytics-CsbG8awP.js";import"./plaid-C8_LWTII.js";import"./dnd-CyZNzT3I.js";import"./stripe-cKAAJElX.js";import"./lottie-DeqWxWVC.js";import"./lexical-C5ZCOEAv.js";import"./pdf-D4eEcTTi.js";import"./utils-B6XFkcn3.js";import"./BusinessVerificationPageScreen-C37udtB6.js";import"./routePaths-DU2fgaW2.js";import"./analyticsHelper-DtAHYi5r.js";import"./InboxNotificationsProvider-DDRknvRh.js";import"./useTaskManagerAccess-Dl-8FUHJ.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="350113d7-ba41-463c-bee9-fecc4f8e2a00",n._sentryDebugIdIdentifier="sentry-dbid-350113d7-ba41-463c-bee9-fecc4f8e2a00")}catch{}})();const ba=R.div`
1
+ import{j as e}from"./liveblocks-D0hIH2N0.js";import{u as M,h as ae,g as W,i as G,j as D,l as te,N as ee,n as Le,o as C}from"./core-35eDsgGP.js";import{_g as Re,Kt as Ue,_h as ze,fB as F,FJ as Me,_i as wn,ct as ne,cu as Ve,FD as kn,_j as Dn,_k as In,FG as Sn,FN as ge,FA as bn,Fx as jn,XP as le,_l as vn,N_ as Pn,UM as En,O0 as Tn,mm as je,_m as On,u1 as $e,tR as Ne,md as Ze,mg as ve,UN as Pe,UO as _n,_n as Bn,mf as Fn,mC as Ln,m4 as Rn,ku as Un,kt as zn,_o as Mn,_p as he,NH as Vn,_q as $n,_r as Nn,Y3 as ye,_s as Ee,_t as Zn,Ob as Hn,Yp as Wn,Ly as He,Bf as We,_u as Gn,O8 as Yn,_v as Ge,d6 as xe,Of as Ye,dU as Je,dV as Ce,Od as Jn,Ls as qn,O5 as Kn,_w as qe,_x as Ke,NJ as Xe,NT as Te,_y as Xn,Yg as Qn,Og as ea,bq as na,bJ as aa,cF as ta,bK as oa,bt as sa,Tc as ia}from"./zeni-epic-state-BRRtwAQl.js";import{U as oe,I as N,d as z,z as b,at as Ae,E as L,a5 as de,cU as ra,$,a9 as Y,a2 as Qe,j as ca,q as Oe,k as O,cV as la,ac as we,cW as da,a6 as ue,cX as ua,S as ke,bg as H,cY as pa,ao as ma,aq as en,cZ as _e,c_ as ga,p as ce,c$ as ha,ag as fa,d0 as ya,d1 as xa,h as Ca,J as Aa}from"./index-BBhWSYD8.js";import{n as R,D as J,S as q}from"./mui-CY_LMiAy.js";import Q from"./NotFoundScreen-B6L1cY3I.js";import{S as Be}from"./SetupPagesScreen-CvaReXCR.js";import{F as nn}from"./FeaturePreviewScreen-BhcrS0dM.js";import{a as m}from"./sentry-DhqS_W-k.js";import{M as pe}from"./MobileAppDrawer-C9wi8312.js";import{A as wa,D as ka,V as Da}from"./DomesticWireDetailScreen-Df9Zx-eI.js";import{A as Ia}from"./AddressScreen-anqh6to9.js";import{u as an}from"./useAskAiCfoHostNavButtonProps-DGTLHvUD.js";import{Z as Sa}from"./ZeniAccountStatementScreen-BlteVo42.js";import"./recharts-B8j-bW95.js";import"./analytics-p9dV2gEo.js";import"./plaid-CoaHurGj.js";import"./dnd-Dm1d6mZC.js";import"./stripe-cKAAJElX.js";import"./lottie-TJOzQ6Cz.js";import"./lexical-DQ4lSvQh.js";import"./pdf-DElOA9Iz.js";import"./utils-CgQOqOwX.js";import"./BusinessVerificationPageScreen-BnngOdPs.js";import"./routePaths-BgYQMm9p.js";import"./analyticsHelper-Cq4tYGNc.js";import"./InboxNotificationsProvider-yp4VlF4V.js";import"./useTaskManagerAccess-DRrr5b-Z.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="350113d7-ba41-463c-bee9-fecc4f8e2a00",n._sentryDebugIdIdentifier="sentry-dbid-350113d7-ba41-463c-bee9-fecc4f8e2a00")}catch{}})();const ba=R.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as i}from"./liveblocks-D83XGo_c.js";import{a as u}from"./sentry-BPfEBx2C.js";import{h as x,u as $,g as j,i as B,j as p}from"./core-CGqhbBHO.js";import{Sg as s,Sf as v,_z as z,fB as C,_A as E}from"./zeni-epic-state-DASyz1An.js";import{$ as T,ac as g,E as _,z as D,a5 as L,d2 as P,a2 as N}from"./index-CoKBrrSw.js";import{n as U}from"./mui-CD71lp6N.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]="4e6b1f95-9ca1-4b93-95c0-f5ff21527dcf",e._sentryDebugIdIdentifier="sentry-dbid-4e6b1f95-9ca1-4b93-95c0-f5ff21527dcf")}catch{}})();const A=U.div`
1
+ import{j as i}from"./liveblocks-D0hIH2N0.js";import{a as u}from"./sentry-DhqS_W-k.js";import{h as x,u as $,g as j,i as B,j as p}from"./core-35eDsgGP.js";import{Sg as s,Sf as v,_z as z,fB as C,_A as E}from"./zeni-epic-state-BRRtwAQl.js";import{$ as T,ac as g,E as _,z as D,a5 as L,d2 as P,a2 as N}from"./index-BBhWSYD8.js";import{n as U}from"./mui-CY_LMiAy.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]="4e6b1f95-9ca1-4b93-95c0-f5ff21527dcf",e._sentryDebugIdIdentifier="sentry-dbid-4e6b1f95-9ca1-4b93-95c0-f5ff21527dcf")}catch{}})();const A=U.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import"./sentry-BPfEBx2C.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]="459d6150-40e4-4fe0-88f2-7336312ca00a",e._sentryDebugIdIdentifier="sentry-dbid-459d6150-40e4-4fe0-88f2-7336312ca00a")}catch{}})();function d(e,t){if(t!=null)return e.find((n=>n.qboId===t))}function i(e,t){return e.filter((n=>n.qboId!=null&&t.includes(n.qboId)))}function s(e,t){return t.map((n=>({accountId:d(e,n.accountId.selectedOption)?.accountId??"",expenseType:n.expenseType.selectedOption??"",type1099:n.type1099.selectedOption??"",boxType:n.boxType.selectedOption??""})))}export{i as a,d as g,s as m};
1
+ import"./sentry-DhqS_W-k.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]="459d6150-40e4-4fe0-88f2-7336312ca00a",e._sentryDebugIdIdentifier="sentry-dbid-459d6150-40e4-4fe0-88f2-7336312ca00a")}catch{}})();function d(e,t){if(t!=null)return e.find((n=>n.qboId===t))}function i(e,t){return e.filter((n=>n.qboId!=null&&t.includes(n.qboId)))}function s(e,t){return t.map((n=>({accountId:d(e,n.accountId.selectedOption)?.accountId??"",expenseType:n.expenseType.selectedOption??"",type1099:n.type1099.selectedOption??"",boxType:n.boxType.selectedOption??""})))}export{i as a,d as g,s as m};