@zeniai/web-app-ui 5.1.76-next → 5.1.76-prod

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 (102) hide show
  1. package/dist/assets/AddressRoutes-CQEm5psH.js +1 -0
  2. package/dist/assets/{AddressScreen-D3HAG5Pr.js → AddressScreen-DLTJPBtB.js} +1 -1
  3. package/dist/assets/{AiCfoScreen-CTc-VcRc.js → AiCfoScreen-CIW6Rkrd.js} +1 -1
  4. package/dist/assets/{BillPayApprovalRoutes-gDdPXgYD.js → BillPayApprovalRoutes-BvMuz4fH.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-CAewvRkJ.js → BillPayRoutes-DCoEJWAC.js} +1 -1
  6. package/dist/assets/{BusinessVerificationPageScreen-BbDxcN3K.js → BusinessVerificationPageScreen-BXKB7X5s.js} +1 -1
  7. package/dist/assets/{ChargeCardRoutes-6QU1QBxN.js → ChargeCardRoutes-CSwlWrZ1.js} +1 -1
  8. package/dist/assets/{CompanyPassportScreen-CC2QSh6z.js → CompanyPassportScreen-BLsZ8Uuy.js} +1 -1
  9. package/dist/assets/{ConnectionAuthScreen-CUgHHwsJ.js → ConnectionAuthScreen-B13ytSR6.js} +1 -1
  10. package/dist/assets/CustomerOnboardingAuthScreen-bHMRpQpq.js +1 -0
  11. package/dist/assets/{CustomerOnboardingRoutes-1feU8VPE.js → CustomerOnboardingRoutes-Bb0R8e9B.js} +1 -1
  12. package/dist/assets/{DashboardRoutes-NArRDQJ-.js → DashboardRoutes-Xszs783p.js} +1 -1
  13. package/dist/assets/{DefaultTenantHome-BuXiJZb7.js → DefaultTenantHome-Ckgm6fYm.js} +1 -1
  14. package/dist/assets/{DomesticWireDetailScreen-BnYbmIQy.js → DomesticWireDetailScreen-R5H3Lj3F.js} +1 -1
  15. package/dist/assets/{DrawerScreen-DGyfdHJW.js → DrawerScreen-C1-3TQnN.js} +1 -1
  16. package/dist/assets/{EntityDetailRoutes-BkBZEVBw.js → EntityDetailRoutes-BklwOWcC.js} +1 -1
  17. package/dist/assets/{ExpenseAutomationRoutes-BBY95n1E.js → ExpenseAutomationRoutes-CkJkhfFq.js} +1 -1
  18. package/dist/assets/{FeaturePreviewScreen-DDv7GOn2.js → FeaturePreviewScreen-DeAByMab.js} +1 -1
  19. package/dist/assets/{HubSpotOAuthCallbackScreen-DhJqrvHU.js → HubSpotOAuthCallbackScreen-tj9Ftuv9.js} +1 -1
  20. package/dist/assets/{MagicLinkRoutes-D7su7riK.js → MagicLinkRoutes-DuELPviL.js} +1 -1
  21. package/dist/assets/{MagicLinkSignInScreen-Di_hmBzG.js → MagicLinkSignInScreen-CRn0-bwq.js} +1 -1
  22. package/dist/assets/{MobileAppDrawer-Df4Qimmh.js → MobileAppDrawer-C6MRZ7yW.js} +1 -1
  23. package/dist/assets/NotFoundScreen-BXgaohYF.js +1 -0
  24. package/dist/assets/{NotificationRoutes-CiWM75s-.js → NotificationRoutes-CJQORxml.js} +1 -1
  25. package/dist/assets/{OAuthConsentScreen-CWFjUYEE.js → OAuthConsentScreen-BBkfTgiS.js} +1 -1
  26. package/dist/assets/{PandLWithForecastRoutes-BxTz-s5z.js → PandLWithForecastRoutes-DC7TR9_4.js} +1 -1
  27. package/dist/assets/{PeopleRoutes-DVOlkZuO.js → PeopleRoutes-csHlQp5o.js} +1 -1
  28. package/dist/assets/{PerformanceRoutes-BEdQ7JSy.js → PerformanceRoutes-BzTXPXqo.js} +1 -1
  29. package/dist/assets/{Preview-CjoXDjPl.js → Preview-Cw7jL1Lj.js} +1 -1
  30. package/dist/assets/{QBOConnectionScreen-CHdv-UVo.js → QBOConnectionScreen-YQRuxVuF.js} +1 -1
  31. package/dist/assets/{ReferralListScreen-CySa3ted.js → ReferralListScreen-jCzCZDWf.js} +1 -1
  32. package/dist/assets/{ReimbursementApprovalRoutes-LmykdpDG.js → ReimbursementApprovalRoutes-YTWZ_f_x.js} +1 -1
  33. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-CeUHThGh.js → ReimbursementApprovalRuleDetailScreen-DqNByTW4.js} +1 -1
  34. package/dist/assets/{ReimbursementRoutes-BHzQla-l.js → ReimbursementRoutes-CKT5CdX2.js} +1 -1
  35. package/dist/assets/{ReportsRoutes-CQmypnoq.js → ReportsRoutes-BBHE4Oo-.js} +1 -1
  36. package/dist/assets/{RewardsRoutes-fl2VG6Nw.js → RewardsRoutes-BuxVlZVs.js} +1 -1
  37. package/dist/assets/{ScreenRoutes-DjKy2K-h.js → ScreenRoutes-CGfFu7WV.js} +2 -2
  38. package/dist/assets/{SettingsRoutes-DAHFIT1_.js → SettingsRoutes-CZbvgGLZ.js} +1 -1
  39. package/dist/assets/{SetupPagesScreen-DFqkA6OC.js → SetupPagesScreen-DhoJ2EKU.js} +1 -1
  40. package/dist/assets/{SignInScreen-BPpnP2Dl.js → SignInScreen-C8GQD2TL.js} +1 -1
  41. package/dist/assets/{SignOutScreen-DG3qj3-0.js → SignOutScreen-BDPFv8fh.js} +1 -1
  42. package/dist/assets/{TaskListScreen-DG4Dv6A-.js → TaskListScreen-BAOvGtza.js} +1 -1
  43. package/dist/assets/{TaskRoutes-CcM2JaZH.js → TaskRoutes-BO5cvZoD.js} +1 -1
  44. package/dist/assets/{TransactionDetailRoutes-CiYZElQb.js → TransactionDetailRoutes-7L3zeSND.js} +1 -1
  45. package/dist/assets/{TransactionDetailScreen-C7_imF3Y.js → TransactionDetailScreen-DY5IcfRV.js} +1 -1
  46. package/dist/assets/{TransactionListRoutes-n2hWV2dp.js → TransactionListRoutes-Bgj6-3fA.js} +1 -1
  47. package/dist/assets/{TreasuryRoutes-B-c4f7k7.js → TreasuryRoutes-BVhGqN6W.js} +1 -1
  48. package/dist/assets/{VendorsRoutes-BoEmibsm.js → VendorsRoutes-BnxlBevs.js} +1 -1
  49. package/dist/assets/{WiseConfirmationScreen-D52utSHx.js → WiseConfirmationScreen-CnaVF5HH.js} +1 -1
  50. package/dist/assets/{ZeniAccountRoutes-DQHAmu9e.js → ZeniAccountRoutes-DNooyVe8.js} +1 -1
  51. package/dist/assets/{ZeniAccountStatementScreen-BrO9jMz2.js → ZeniAccountStatementScreen-CyycwdN8.js} +1 -1
  52. package/dist/assets/{accountMappingHelper-BNXnlSEh.js → accountMappingHelper-C2f8hGo7.js} +1 -1
  53. package/dist/assets/{analytics-7J1CNh2i.js → analytics-BYlEHy--.js} +1 -1
  54. package/dist/assets/{analyticsHelper-B5epc-PZ.js → analyticsHelper-Cw9lxNal.js} +1 -1
  55. package/dist/assets/{core-BwBLfZO1.js → core-CvVQwh-G.js} +1 -1
  56. package/dist/assets/{decodeURIComponentSafe-Cau4zUJU.js → decodeURIComponentSafe-C_ttRntx.js} +1 -1
  57. package/dist/assets/{dnd-yE3kwzv1.js → dnd-DNR-B7xM.js} +1 -1
  58. package/dist/assets/{empty-Cf0SP1Fa.js → empty-BINoIGGW.js} +1 -1
  59. package/dist/assets/{empty-CCgcIyVB.js → empty-CqdRwXT0.js} +1 -1
  60. package/dist/assets/{emptyVideoElement-BStn4F8t.js → emptyVideoElement-C5q-nSLE.js} +1 -1
  61. package/dist/assets/{epic-CYiMnVeW.js → epic-C5jlPncF.js} +1 -1
  62. package/dist/assets/{getLocaleForTenant-Bn0H95YD.js → getLocaleForTenant-BKpCR6Mg.js} +1 -1
  63. package/dist/assets/{index-DqVSCvOK.js → index-6ei8cz0C.js} +1 -1
  64. package/dist/assets/{index-A51o-oGI.js → index-CBYzZDpo.js} +1 -1
  65. package/dist/assets/{index-BerjEF27.js → index-CFH22x4t.js} +1 -1
  66. package/dist/assets/{index-VDS7QZz-.js → index-CyWCR990.js} +2 -2
  67. package/dist/assets/{index-t__Gmvon.js → index-DkXdrecr.js} +1 -1
  68. package/dist/assets/{index-aoY9thIU.js → index-H3w7aQmk.js} +1 -1
  69. package/dist/assets/{index-aRVrbNiC.js → index-LzTRB_X0.js} +7 -7
  70. package/dist/assets/{index-CF_NP1ls.js → index-iPhf2_13.js} +1 -1
  71. package/dist/assets/{lexical-CppAuKk8.js → lexical-DEMTOP18.js} +1 -1
  72. package/dist/assets/{liveblocks-BRoLXdu-.js → liveblocks-OUACL7Sm.js} +1 -1
  73. package/dist/assets/{lottie-BAjpdqbN.js → lottie-CtoJzpCG.js} +1 -1
  74. package/dist/assets/{mui-BBkWv1mU.js → mui-B_sWk5no.js} +1 -1
  75. package/dist/assets/{pathToGoBack-Bp5PBNhl.js → pathToGoBack-CJrDL_Y4.js} +1 -1
  76. package/dist/assets/{pdf-BQyDOTnR.js → pdf-Bd_BBdKz.js} +3 -3
  77. package/dist/assets/{pdf-lib-B_thHwDW.js → pdf-lib-B6zbzfIK.js} +1 -1
  78. package/dist/assets/{plaid-Gte2Ckk-.js → plaid-BeX18ubU.js} +1 -1
  79. package/dist/assets/{pusher-DvtgmJur.js → pusher-aLhruJgZ.js} +1 -1
  80. package/dist/assets/{react-NEHU30OY.js → react-BGSmuuzy.js} +1 -1
  81. package/dist/assets/{react-B7dU6M-a.js → react-BvotTNj-.js} +1 -1
  82. package/dist/assets/{react-CgknZZrM.js → react-CVqp8PAx.js} +1 -1
  83. package/dist/assets/{react-CNo23rWl.js → react-D3Ygj9wO.js} +1 -1
  84. package/dist/assets/{react-MOAFD_Zh.js → react-T1MP5N4W.js} +1 -1
  85. package/dist/assets/{react-B02axkNd.js → react-zqzsPGgA.js} +1 -1
  86. package/dist/assets/{recharts-CiU9jjGx.js → recharts-ScPc1hFQ.js} +1 -1
  87. package/dist/assets/{routePaths-hmakpH65.js → routePaths-CCOmiobh.js} +1 -1
  88. package/dist/assets/{sentry-B_UPXuSC.js → sentry-COtwFETz.js} +1 -1
  89. package/dist/assets/{url-DMkZVN82.js → url-DgoPdzhF.js} +1 -1
  90. package/dist/assets/{url-DUFXwvN_.js → url-sMzMgETT.js} +1 -1
  91. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-DHhcASUk.js → useAiCfoDashboardSuggestedQuestionsChips-CP6mqvu5.js} +1 -1
  92. package/dist/assets/{useAskAiCfoHostNavButtonProps-DO0seTDc.js → useAskAiCfoHostNavButtonProps-CT6wQzQG.js} +1 -1
  93. package/dist/assets/{useDeviceId-b4A3GNY_.js → useDeviceId-FKP5CkBV.js} +1 -1
  94. package/dist/assets/{useInitialThreadRequest-D_32gSqj.js → useInitialThreadRequest-BRMmNSgV.js} +1 -1
  95. package/dist/assets/{utils-ox49Wmvb.js → utils-B-68Nh7i.js} +1 -1
  96. package/dist/assets/{withTransactionSidePanel-B6uMMn0i.js → withTransactionSidePanel-CNv0kM7W.js} +1 -1
  97. package/dist/assets/{zeni-epic-state-5KAN0o5k.js → zeni-epic-state-CECAZYIg.js} +3 -3
  98. package/dist/index.html +1 -1
  99. package/package.json +1 -1
  100. package/dist/assets/AddressRoutes-DS2UgHxm.js +0 -1
  101. package/dist/assets/CustomerOnboardingAuthScreen-kSr2iHC6.js +0 -1
  102. package/dist/assets/NotFoundScreen-DVKBuN7e.js +0 -1
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-NArRDQJ-.js","assets/sentry-B_UPXuSC.js","assets/core-BwBLfZO1.js","assets/zeni-epic-state-5KAN0o5k.js","assets/index-aRVrbNiC.js","assets/mui-BBkWv1mU.js","assets/analytics-7J1CNh2i.js","assets/utils-ox49Wmvb.js","assets/withTransactionSidePanel-B6uMMn0i.js","assets/useAskAiCfoHostNavButtonProps-DO0seTDc.js","assets/TransactionDetailScreen-C7_imF3Y.js","assets/decodeURIComponentSafe-Cau4zUJU.js","assets/routePaths-hmakpH65.js","assets/NotFoundScreen-DVKBuN7e.js","assets/useInitialThreadRequest-D_32gSqj.js","assets/analyticsHelper-B5epc-PZ.js","assets/CompanyPassportScreen-CC2QSh6z.js","assets/MobileAppDrawer-Df4Qimmh.js","assets/useAiCfoDashboardSuggestedQuestionsChips-DHhcASUk.js","assets/FeaturePreviewScreen-DDv7GOn2.js","assets/ReferralListScreen-CySa3ted.js","assets/index-R6GjjTB3.css","assets/BillPayRoutes-CAewvRkJ.js","assets/AddressScreen-D3HAG5Pr.js","assets/DomesticWireDetailScreen-BnYbmIQy.js","assets/DrawerScreen-DGyfdHJW.js","assets/SetupPagesScreen-DFqkA6OC.js","assets/BusinessVerificationPageScreen-BbDxcN3K.js","assets/BillPayApprovalRoutes-gDdPXgYD.js","assets/ReimbursementApprovalRuleDetailScreen-CeUHThGh.js","assets/getLocaleForTenant-Bn0H95YD.js","assets/ReimbursementRoutes-BHzQla-l.js","assets/ReimbursementApprovalRoutes-LmykdpDG.js","assets/TransactionListRoutes-n2hWV2dp.js","assets/ZeniAccountStatementScreen-BrO9jMz2.js","assets/SettingsRoutes-DAHFIT1_.js","assets/accountMappingHelper-BNXnlSEh.js","assets/QBOConnectionScreen-CHdv-UVo.js","assets/empty-CCgcIyVB.js","assets/index-t__Gmvon.js","assets/url-DMkZVN82.js","assets/index-DqVSCvOK.js","assets/ReportsRoutes-CQmypnoq.js","assets/ChargeCardRoutes-6QU1QBxN.js","assets/PeopleRoutes-DVOlkZuO.js","assets/ExpenseAutomationRoutes-BBY95n1E.js","assets/TreasuryRoutes-B-c4f7k7.js","assets/VendorsRoutes-BoEmibsm.js","assets/pathToGoBack-Bp5PBNhl.js","assets/ZeniAccountRoutes-DQHAmu9e.js","assets/AddressRoutes-DS2UgHxm.js","assets/PandLWithForecastRoutes-BxTz-s5z.js","assets/CustomerOnboardingRoutes-1feU8VPE.js","assets/TransactionDetailRoutes-CiYZElQb.js","assets/EntityDetailRoutes-BkBZEVBw.js","assets/NotificationRoutes-CiWM75s-.js","assets/PerformanceRoutes-BEdQ7JSy.js","assets/RewardsRoutes-fl2VG6Nw.js","assets/TaskRoutes-CcM2JaZH.js","assets/TaskListScreen-DG4Dv6A-.js","assets/AiCfoScreen-CTc-VcRc.js"])))=>i.map(i=>d[i]);
2
- import{_ as n,bn as as,eS as ts,f1 as rs,e$ as is,fK as os,eW as ls,cP as pe,cw as cs,fh as ds,co as us,bE as ms,bo as _s,fm as Es,v as ps,J$ as As,bs as hs,K0 as Is,bG as gs,fj as xs,bF as Ts,bt as js,ck as Rs,K1 as Us,K2 as Ds,cL as fs,cO as ys,cN as bs,cv as Cs,cB as Hs,nh as Ae,eZ as he,fU as vs,fq as Ie,fR as ge,fS as xe,fr as Os}from"./zeni-epic-state-5KAN0o5k.js";import{j as e}from"./liveblocks-BRoLXdu-.js";import{a as v}from"./sentry-B_UPXuSC.js";import{u as Ps,h as Fs,i as Ls,g as ks,j as G,l as Te,N as c,o as Bs,p as t}from"./core-BwBLfZO1.js";import{m as Ss,u as Vs,z as D,a as Ns,c as ws,k as Zs,G as B,i as Ms,I as Gs,L as F,D as je,t as m,P as $s,d as Q,l}from"./index-aRVrbNiC.js";import"./mui-BBkWv1mU.js";import{f as Re}from"./analyticsHelper-B5epc-PZ.js";import{t as zs}from"./getLocaleForTenant-Bn0H95YD.js";import"./recharts-CiU9jjGx.js";import"./analytics-7J1CNh2i.js";import"./plaid-Gte2Ckk-.js";import"./dnd-yE3kwzv1.js";import"./stripe-DMRn4zHo.js";import"./lottie-BAjpdqbN.js";import"./lexical-CppAuKk8.js";import"./pdf-BQyDOTnR.js";import"./utils-ox49Wmvb.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},j=new r.Error().stack;j&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[j]="f78a06f7-83cb-4529-8d73-29c684387af9",r._sentryDebugIdIdentifier="sentry-dbid-f78a06f7-83cb-4529-8d73-29c684387af9")}catch{}})();const Ks={dashboard:()=>n(()=>import("./DashboardRoutes-NArRDQJ-.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),bills:()=>n(()=>import("./BillPayRoutes-CAewvRkJ.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21])),reimbursement:()=>n(()=>import("./ReimbursementRoutes-BHzQla-l.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21])),transactions:()=>n(()=>import("./TransactionListRoutes-n2hWV2dp.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21])),settings:()=>n(()=>import("./SettingsRoutes-DAHFIT1_.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,11,28,29,32,21])),reports:()=>n(()=>import("./ReportsRoutes-CQmypnoq.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-6QU1QBxN.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,13,15,12,27,14,9,23,21])),people:()=>n(()=>import("./PeopleRoutes-DVOlkZuO.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-BBY95n1E.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21])),treasury:()=>n(()=>import("./TreasuryRoutes-B-c4f7k7.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,19,21])),vendors:()=>n(()=>import("./VendorsRoutes-BoEmibsm.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,13,19,12,48,9,17,25,36,21])),zeniAccounts:()=>n(()=>import("./ZeniAccountRoutes-DQHAmu9e.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,13,26,17,15,12,27,19,24,23,9,34,21]))},Ws=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],X=r=>{"requestIdleCallback"in window?requestIdleCallback(r):setTimeout(r,100)},Ys=l(()=>n(()=>import("./ReportsRoutes-CQmypnoq.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21]))),qs=l(()=>n(()=>import("./AddressRoutes-DS2UgHxm.js"),__vite__mapDeps([50,1,2,3,23,4,5,6,7,13,21]))),Js=l(()=>n(()=>import("./PeopleRoutes-DVOlkZuO.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21]))),Qs=l(()=>n(()=>import("./PandLWithForecastRoutes-BxTz-s5z.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,13,19,9,14,12,17,21]))),Xs=l(()=>n(()=>import("./CustomerOnboardingRoutes-1feU8VPE.js"),__vite__mapDeps([52,1,2,3,23,4,5,6,7,13,37,38,39,40,41,11,21]))),en=l(()=>n(()=>import("./VendorsRoutes-BoEmibsm.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,13,19,12,48,9,17,25,36,21]))),sn=l(()=>n(()=>import("./TransactionDetailRoutes-CiYZElQb.js"),__vite__mapDeps([53,1,2,3,13,4,5,6,7,10,9,11,12,21]))),Ue=l(()=>n(()=>import("./EntityDetailRoutes-BkBZEVBw.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,11,8,9,10,12,21]))),nn=l(()=>n(()=>import("./DashboardRoutes-NArRDQJ-.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]))),De=l(()=>n(()=>import("./BillPayRoutes-CAewvRkJ.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21]))),an=l(()=>n(()=>import("./SettingsRoutes-DAHFIT1_.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,11,28,29,32,21]))),fe=l(()=>n(()=>import("./ReimbursementRoutes-BHzQla-l.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21]))),tn=l(()=>n(()=>import("./ZeniAccountRoutes-DQHAmu9e.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,13,26,17,15,12,27,19,24,23,9,34,21]))),rn=l(()=>n(()=>import("./TreasuryRoutes-B-c4f7k7.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,19,21]))),on=l(()=>n(()=>import("./TransactionListRoutes-n2hWV2dp.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21]))),ln=l(()=>n(()=>import("./ChargeCardRoutes-6QU1QBxN.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,13,15,12,27,14,9,23,21]))),cn=l(()=>n(()=>import("./NotificationRoutes-CiWM75s-.js"),__vite__mapDeps([55,1,2,3,13,4,5,6,7,9,21]))),dn=l(()=>n(()=>import("./PerformanceRoutes-BEdQ7JSy.js"),__vite__mapDeps([56,1,2,3,13,4,5,6,7,9,17,21]))),un=l(()=>n(()=>import("./ExpenseAutomationRoutes-BBY95n1E.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21]))),mn=l(()=>n(()=>import("./RewardsRoutes-fl2VG6Nw.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,13,20,9,17,21]))),_n=l(()=>n(()=>import("./TaskRoutes-CcM2JaZH.js"),__vite__mapDeps([58,1,2,3,13,4,5,6,7,14,17,59,9,21]))),En=l(()=>n(()=>import("./AiCfoScreen-CTc-VcRc.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,18,48,21]))),b=l(()=>n(()=>import("./NotFoundScreen-DVKBuN7e.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,21]))),pn=l(()=>n(()=>import("./TaskListScreen-DG4Dv6A-.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,17,21])));function Vn({setTenantEmailDomain:r}){const j=Ps(),S=Fs(),{tenantEmailDomain:o}=Ls(),V=Ss().mode,{setLoading:C,clearAllLoading:O,clearLoading:N}=Vs(),y=D.getSignedInUserTenant(o)?.tenantId,x=D.getSignedInUser(),ee=as(x),$=ks(),[w,be]=v.useState(!1),i=G(a=>ts(a)),{useFeatureGate:L}=Ns(),Y=ws(),se=Zs(),{isFeatureEnabled:Ce}=L(B.isDepositAccountsFeatureEnabled),{isFeatureEnabled:He}=L(B.isTreasuryEnabled),{isFeatureEnabled:ve}=L(B.isChargeCardFeatureEnabled),{isFeatureEnabled:ne}=L(B.isDebitCardFeatureEnabled),R=G(a=>a.tenantState.fetchState),T=G(a=>a.tenantState.activeTenantFetchState.fetchState),_=T==="Completed"||R==="Completed"?rs(ne,i):void 0,q=T==="Completed"||R==="Completed"?is(i):void 0,Oe=Ms(i,ve,ne),{isFeatureEnabled:Pe}=L(B.isSettingsFeatureEnabled),{isFeatureEnabled:Fe}=L(B.isAiCfoFileUploadEnabled),z=G(a=>os(a));if(o!=null){const a=D.getSignedInUserTenant(o);x!=null&&a!=null&&Re(x,i,V)}const M={tenantId:y,userId:x?.userId,sessionId:x?.zeniSessionId},ae=ls(),E=Gs(),Le=i.company==null||E?.loggedInUserRoleMap!=null&&pe(E.loggedInUserRole),ke=cs(E?.loggedInUserRoleMap),te=v.useRef(!0),re=Te("/:tenantEmailDomain/onboarding/*")!==null,J=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Be=G(a=>M.tenantId!=null?ds(a,M.tenantId):void 0);v.useEffect(()=>{C(F.TENANT_FETCHING),r(o)},[o]),v.useEffect(()=>{if(J!=null&&y!=null){const a=J.params.selectedPeriod;if(a!=null){const U=a.split("-");if(U.length===2){const d=us(Number(U[0])),s=Number(U[1]),u=ms(`01-${d<10?`0${d}`:d}-${s}`,je.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),Z=_s();u.isAfter(Z,"month")===!1?j(Es(y,{month:d,year:s})):S("./month_end_close_checks/review")}}}},[J,y]),v.useEffect(()=>{w||(be(!0),C(F.TENANT_FETCHING)),te.current?te.current=!1:!ps(ae,M)&&D.isSignedIn()&&(C(F.TENANT_FETCHING),function(a,U,d,s){if(he(U?.userId,U?.zeniSessionId,a.tenantId),d(vs(!0)),d(Ie(a.tenantId)),a.tenantId!=null&&m.clearTenant(a.tenantId),a.tenantId!=null){const u=D.getSignedInUserTenantWithId(a.tenantId);s&&je.updateAppLocaleID(zs(s)),u?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(u?.tenantEmailDomain)}a.userId!=null?Q.identify(a.userId,{tenant_id:a.tenantId}):Q.resetUserIdentity()}(M,x,j,Be))},[M,ae,x,j,D]),v.useEffect(()=>{D.isSignedIn()&&(C(F.TENANT_FETCHING),function(a,U,d,s,u,Z,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const K=s!=null&&u?.zeniSessionId!=null,es=d==null||d.tenantId!==s,ss=d!=null&&d.excludedResources==null,ns=d!=null&&d.externalConnections==null;if(K&&es){k(Ie(s));const W=D.getSignedInUserTenantWithId(s);W?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(W?.tenantEmailDomain),he(u?.userId,u?.zeniSessionId,s),m.shouldFetchExcludedResources(s)&&(m.markExcludedResourcesFetchStarted(s),k(ge(u.userId,s))),m.shouldFetchConnections(s)&&(m.markConnectionsFetchStarted(s),k(xe(u.userId,s)))}else K&&ss&&m.shouldFetchExcludedResources(s)&&(m.markExcludedResourcesFetchStarted(s),k(ge(u.userId,s))),K&&ns&&m.shouldFetchConnections(s)&&(m.markConnectionsFetchStarted(s),k(xe(u.userId,s)));if(K){Q.identify(u.userId,{tenant_id:s});const W=s==null||s!=null&&(U==="Completed"||U==="Error");a==="Completed"||U!=="Not-Started"&&U!=="Error"||s==null||!m.shouldFetchActiveTenant(s)||(m.markActiveTenantFetchStarted(s),Z(F.TENANT_FETCHING),k(Os(u.userId,s,u.zeniSessionId))),W&&(a==="Not-Started"||a==="Error")&&m.shouldFetchAllTenants()&&(m.markAllTenantsFetchStarted(),k(Ae(u.userId,u.zeniSessionId)))}}(R,T,i,y,x,C,j))},[y,T]),v.useEffect(()=>{D.isSignedIn()&&R==="Completed"&&z.tenantsBaseInOrder.length>0&&(N(F.TENANT_FETCHING),D.saveSignedInUserTenants(As(z.tenantsBaseInOrder)),x!=null&&Re(x,i,V,void 0,z.tenantsBaseInOrder))},[z,R,i,x]),v.useEffect(()=>{T==="In-Progress"&&C(F.TENANT_FETCHING),T!=="Completed"&&T!=="Error"||(T==="Completed"&&y!=null?(O(),m.markActiveTenantFetchCompleted(y)):T==="Error"&&y!=null&&(m.markActiveTenantFetchFailed(y),N(F.TENANT_FETCHING),N(F.TENANT_SWITCHING))),R!=="Completed"&&R!=="Error"||(R==="Completed"?m.markAllTenantsFetchCompleted():R==="Error"&&m.markAllTenantsFetchFailed())},[T,R,y,w]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&T==="Completed"&&w&&(ie.current=!0,function(a=Ws,U=3e3){setTimeout(()=>{const d=s=>{if(s>=a.length)return;const u=a[s],Z=Ks[u];Z!=null?Z().then(()=>X(()=>d(s+1))).catch(()=>X(()=>d(s+1))):d(s+1)};X(()=>d(0))},U)}())},[T,w]);const H=i?.userRole!=null&&hs(i?.userRole),{isFeatureEnabled:Se}=L(B.isReferralFeatureEnabled),Ve=i?.userRole!=null&&i.userRole.includes("charge_card_user"),Ne=i?.userRole!=null&&i.userRole.includes("charge_card_admin"),P=i?.userRole!=null&&pe(i.userRole),oe=i?.company==null||i.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!H,le=Oe&&!H,we=Is(E?.loggedInUserRoleMap),Ze=i.externalConnections?.accounting[0]?.isValid,ce=i.company?.companyOnboardingInfo.isOnboardingCompleted,de=i?.company==null||i.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!H,ue=de&&gs(E?.loggedInUserRoleMap),me=Ce&&!H,Me=i.company!=null&&xs(i.company),Ge=He&&Me===!0&&!H,$e=oe&&Ts(E?.loggedInUserRoleMap),ze=le&&js(E?.loggedInUserRoleMap),Ke=me&&Rs(E?.loggedInUserRoleMap),We=Us(E?.loggedInUserRoleMap),Ye=Ds(E?.loggedInUserRoleMap),p=fs(E?.loggedInUserRoleMap),A=ys(E?.loggedInUserRoleMap),qe=bs(E?.loggedInUserRoleMap),h=Cs(E?.loggedInUserRoleMap),I=Hs(E?.loggedInUserRoleMap),_e=oe&&h,Ee=de&&I,Je=me&&p,Qe=Ge&&A,g=le&&qe,Xe=i.excludedResources?.resources?.find(a=>a.resource==="/invites")!=null||ke===!0||we===!0||We===!0||Ye===!0;return D.isSignedIn()?y==null?R==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(x!=null&&R!=="In-Progress"&&j(Ae(x.userId,x.zeniSessionId)),null):T!=="In-Progress"&&T!=="Not-Started"||R==="Completed"?(ce===!0||ee&&!re)&&Ze===!1&&_===!1&&q===!1?(r(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!w||ce!==!1||re||ee?w&&i?.userRole&&_!=null&&q!=null&&o!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Bs,{children:e.jsxs(t,{element:e.jsx($s,{}),children:[e.jsx(t,{path:"/",element:e.jsx(An,{isDashboardAccess:P,isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,isTenantCardsOnly:q,showChargeCardRoute:g})}),e.jsx(t,{path:"dashboard/*",element:P?e.jsx(nn,{}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:P?e.jsx(Ys,{}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:Xe||P?e.jsx(Js,{}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:P?e.jsx(Qs,{}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(Xs,{})}),e.jsx(t,{path:"transaction/*",element:P&&H===!1||Ve||Ne?e.jsx(sn,{}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:P&&H===!1?e.jsx(on,{}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:P&&H===!1?e.jsx(Ue,{entityType:"customer"}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isTenantBankingOnly:_,isUserHasTreasuryAccess:A,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:P&&H===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(pn,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(_n,{})}),e.jsx(t,{path:"address/*",element:$e||ue||Ke||ze?e.jsx(qs,{}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:Je?e.jsx(tn,{}):e.jsx(b,{})}),e.jsx(t,{path:"treasury/*",element:Qe?e.jsx(rn,{}):e.jsx(b,{})}),e.jsx(t,{path:"performance",element:se===!0?e.jsx(dn,{}):e.jsx(ye,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:se===!0&&H===!1?e.jsx(un,{}):e.jsx(ye,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(cn,{})}),e.jsx(t,{path:"vendors/*",element:Le?e.jsx(en,{}):e.jsx(b,{})}),e.jsx(t,{path:"bill/*",element:_e?e.jsx(De,{}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:_e?e.jsx(De,{}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:Ee?e.jsx(fe,{}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:Ee?e.jsx(fe,{}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:Pe?e.jsx(an,{hasAdminLevelAccess:ue}):e.jsx(b,{})}),e.jsx(t,{path:"cards/*",element:g?e.jsx(ln,{}):e.jsx(b,{})}),e.jsx(t,{path:"rewards/*",element:Se?e.jsx(mn,{}):e.jsx(b,{})}),e.jsx(t,{path:"/ai-cfo",element:Y?e.jsx(c,{to:"explore"}):e.jsx(b,{})}),e.jsx(t,{path:"/ai-cfo/",element:Y?e.jsx(c,{to:"explore"}):e.jsx(b,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:Y?e.jsx(En,{isFileUploadEnabled:Fe}):e.jsx(b,{})}),e.jsx(t,{path:"*",element:e.jsx(b,{})})]})}):null:(r(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),r(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}const An=({isDashboardAccess:r,isUserHasZeniAccountsAccess:j,isUserHasBillPayAccess:S,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:V,isTenantBankingOnly:C,isTenantCardsOnly:O,showChargeCardRoute:N})=>C===!0&&j?e.jsx(c,{to:"checking"}):O===!0&&N?e.jsx(c,{to:"cards"}):r?e.jsx(c,{to:"dashboard"}):j?e.jsx(c,{to:"checking"}):V?e.jsx(c,{to:"treasury"}):N?e.jsx(c,{to:"cards"}):S?e.jsx(c,{to:"bills"}):o?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),f=({isUserHasZeniAccountsAccess:r,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:o,isTenantBankingOnly:V,showChargeCardRoute:C,tenantEmailDomain:O})=>V===!0||r?e.jsx(xn,{tenantEmailDomain:O}):o?e.jsx(gn,{tenantEmailDomain:O}):C?e.jsx(Tn,{tenantEmailDomain:O}):j?e.jsx(In,{tenantEmailDomain:O}):S?e.jsx(hn,{tenantEmailDomain:O}):e.jsx(b,{}),hn=({tenantEmailDomain:r})=>e.jsx(c,{to:`/${r}/reimbursements`}),In=({tenantEmailDomain:r})=>e.jsx(c,{to:`/${r}/bills`}),gn=({tenantEmailDomain:r})=>e.jsx(c,{to:`/${r}/treasury`}),xn=({tenantEmailDomain:r})=>e.jsx(c,{to:`/${r}/checking`}),Tn=({tenantEmailDomain:r})=>e.jsx(c,{to:`/${r}/cards`}),ye=({tenantEmailDomain:r})=>e.jsx(c,{to:`/${r}/dashboard`});export{f as FallBackRoute,Vn as default};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-Xszs783p.js","assets/sentry-COtwFETz.js","assets/core-CvVQwh-G.js","assets/zeni-epic-state-CECAZYIg.js","assets/index-LzTRB_X0.js","assets/mui-B_sWk5no.js","assets/analytics-BYlEHy--.js","assets/utils-B-68Nh7i.js","assets/withTransactionSidePanel-CNv0kM7W.js","assets/useAskAiCfoHostNavButtonProps-CT6wQzQG.js","assets/TransactionDetailScreen-DY5IcfRV.js","assets/decodeURIComponentSafe-C_ttRntx.js","assets/routePaths-CCOmiobh.js","assets/NotFoundScreen-BXgaohYF.js","assets/useInitialThreadRequest-BRMmNSgV.js","assets/analyticsHelper-Cw9lxNal.js","assets/CompanyPassportScreen-BLsZ8Uuy.js","assets/MobileAppDrawer-C6MRZ7yW.js","assets/useAiCfoDashboardSuggestedQuestionsChips-CP6mqvu5.js","assets/FeaturePreviewScreen-DeAByMab.js","assets/ReferralListScreen-jCzCZDWf.js","assets/index-R6GjjTB3.css","assets/BillPayRoutes-DCoEJWAC.js","assets/AddressScreen-DLTJPBtB.js","assets/DomesticWireDetailScreen-R5H3Lj3F.js","assets/DrawerScreen-C1-3TQnN.js","assets/SetupPagesScreen-DhoJ2EKU.js","assets/BusinessVerificationPageScreen-BXKB7X5s.js","assets/BillPayApprovalRoutes-BvMuz4fH.js","assets/ReimbursementApprovalRuleDetailScreen-DqNByTW4.js","assets/getLocaleForTenant-BKpCR6Mg.js","assets/ReimbursementRoutes-CKT5CdX2.js","assets/ReimbursementApprovalRoutes-YTWZ_f_x.js","assets/TransactionListRoutes-Bgj6-3fA.js","assets/ZeniAccountStatementScreen-CyycwdN8.js","assets/SettingsRoutes-CZbvgGLZ.js","assets/accountMappingHelper-C2f8hGo7.js","assets/QBOConnectionScreen-YQRuxVuF.js","assets/empty-CqdRwXT0.js","assets/index-DkXdrecr.js","assets/url-DgoPdzhF.js","assets/index-6ei8cz0C.js","assets/ReportsRoutes-BBHE4Oo-.js","assets/ChargeCardRoutes-CSwlWrZ1.js","assets/PeopleRoutes-csHlQp5o.js","assets/ExpenseAutomationRoutes-CkJkhfFq.js","assets/TreasuryRoutes-BVhGqN6W.js","assets/VendorsRoutes-BnxlBevs.js","assets/pathToGoBack-CJrDL_Y4.js","assets/ZeniAccountRoutes-DNooyVe8.js","assets/AddressRoutes-CQEm5psH.js","assets/PandLWithForecastRoutes-DC7TR9_4.js","assets/CustomerOnboardingRoutes-Bb0R8e9B.js","assets/TransactionDetailRoutes-7L3zeSND.js","assets/EntityDetailRoutes-BklwOWcC.js","assets/NotificationRoutes-CJQORxml.js","assets/PerformanceRoutes-BzTXPXqo.js","assets/RewardsRoutes-BuxVlZVs.js","assets/TaskRoutes-BO5cvZoD.js","assets/TaskListScreen-BAOvGtza.js","assets/AiCfoScreen-CIW6Rkrd.js"])))=>i.map(i=>d[i]);
2
+ import{_ as n,bn as as,eS as ts,f1 as rs,e$ as is,fK as os,eW as ls,cP as pe,cw as cs,fh as ds,co as us,bE as ms,bo as _s,fm as Es,v as ps,J$ as As,bs as hs,K0 as Is,bG as gs,fj as xs,bF as Ts,bt as js,ck as Rs,K1 as Us,K2 as Ds,cL as fs,cO as ys,cN as bs,cv as Cs,cB as Hs,nh as Ae,eZ as he,fU as vs,fq as Ie,fR as ge,fS as xe,fr as Os}from"./zeni-epic-state-CECAZYIg.js";import{j as e}from"./liveblocks-OUACL7Sm.js";import{a as v}from"./sentry-COtwFETz.js";import{u as Ps,h as Fs,i as Ls,g as ks,j as G,l as Te,N as c,o as Bs,p as t}from"./core-CvVQwh-G.js";import{m as Ss,u as Vs,z as D,a as Ns,c as ws,k as Zs,G as B,i as Ms,I as Gs,L as F,D as je,t as m,P as $s,d as Q,l}from"./index-LzTRB_X0.js";import"./mui-B_sWk5no.js";import{f as Re}from"./analyticsHelper-Cw9lxNal.js";import{t as zs}from"./getLocaleForTenant-BKpCR6Mg.js";import"./recharts-ScPc1hFQ.js";import"./analytics-BYlEHy--.js";import"./plaid-BeX18ubU.js";import"./dnd-DNR-B7xM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CtoJzpCG.js";import"./lexical-DEMTOP18.js";import"./pdf-Bd_BBdKz.js";import"./utils-B-68Nh7i.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},j=new r.Error().stack;j&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[j]="f78a06f7-83cb-4529-8d73-29c684387af9",r._sentryDebugIdIdentifier="sentry-dbid-f78a06f7-83cb-4529-8d73-29c684387af9")}catch{}})();const Ks={dashboard:()=>n(()=>import("./DashboardRoutes-Xszs783p.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),bills:()=>n(()=>import("./BillPayRoutes-DCoEJWAC.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21])),reimbursement:()=>n(()=>import("./ReimbursementRoutes-CKT5CdX2.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21])),transactions:()=>n(()=>import("./TransactionListRoutes-Bgj6-3fA.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21])),settings:()=>n(()=>import("./SettingsRoutes-CZbvgGLZ.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,11,28,29,32,21])),reports:()=>n(()=>import("./ReportsRoutes-BBHE4Oo-.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-CSwlWrZ1.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,13,15,12,27,14,9,23,21])),people:()=>n(()=>import("./PeopleRoutes-csHlQp5o.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-CkJkhfFq.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21])),treasury:()=>n(()=>import("./TreasuryRoutes-BVhGqN6W.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,19,21])),vendors:()=>n(()=>import("./VendorsRoutes-BnxlBevs.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,13,19,12,48,9,17,25,36,21])),zeniAccounts:()=>n(()=>import("./ZeniAccountRoutes-DNooyVe8.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,13,26,17,15,12,27,19,24,23,9,34,21]))},Ws=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],X=r=>{"requestIdleCallback"in window?requestIdleCallback(r):setTimeout(r,100)},Ys=l(()=>n(()=>import("./ReportsRoutes-BBHE4Oo-.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21]))),qs=l(()=>n(()=>import("./AddressRoutes-CQEm5psH.js"),__vite__mapDeps([50,1,2,3,23,4,5,6,7,13,21]))),Js=l(()=>n(()=>import("./PeopleRoutes-csHlQp5o.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21]))),Qs=l(()=>n(()=>import("./PandLWithForecastRoutes-DC7TR9_4.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,13,19,9,14,12,17,21]))),Xs=l(()=>n(()=>import("./CustomerOnboardingRoutes-Bb0R8e9B.js"),__vite__mapDeps([52,1,2,3,23,4,5,6,7,13,37,38,39,40,41,11,21]))),en=l(()=>n(()=>import("./VendorsRoutes-BnxlBevs.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,13,19,12,48,9,17,25,36,21]))),sn=l(()=>n(()=>import("./TransactionDetailRoutes-7L3zeSND.js"),__vite__mapDeps([53,1,2,3,13,4,5,6,7,10,9,11,12,21]))),Ue=l(()=>n(()=>import("./EntityDetailRoutes-BklwOWcC.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,11,8,9,10,12,21]))),nn=l(()=>n(()=>import("./DashboardRoutes-Xszs783p.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]))),De=l(()=>n(()=>import("./BillPayRoutes-DCoEJWAC.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21]))),an=l(()=>n(()=>import("./SettingsRoutes-CZbvgGLZ.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,11,28,29,32,21]))),fe=l(()=>n(()=>import("./ReimbursementRoutes-CKT5CdX2.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21]))),tn=l(()=>n(()=>import("./ZeniAccountRoutes-DNooyVe8.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,13,26,17,15,12,27,19,24,23,9,34,21]))),rn=l(()=>n(()=>import("./TreasuryRoutes-BVhGqN6W.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,19,21]))),on=l(()=>n(()=>import("./TransactionListRoutes-Bgj6-3fA.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21]))),ln=l(()=>n(()=>import("./ChargeCardRoutes-CSwlWrZ1.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,13,15,12,27,14,9,23,21]))),cn=l(()=>n(()=>import("./NotificationRoutes-CJQORxml.js"),__vite__mapDeps([55,1,2,3,13,4,5,6,7,9,21]))),dn=l(()=>n(()=>import("./PerformanceRoutes-BzTXPXqo.js"),__vite__mapDeps([56,1,2,3,13,4,5,6,7,9,17,21]))),un=l(()=>n(()=>import("./ExpenseAutomationRoutes-CkJkhfFq.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21]))),mn=l(()=>n(()=>import("./RewardsRoutes-BuxVlZVs.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,13,20,9,17,21]))),_n=l(()=>n(()=>import("./TaskRoutes-BO5cvZoD.js"),__vite__mapDeps([58,1,2,3,13,4,5,6,7,14,17,59,9,21]))),En=l(()=>n(()=>import("./AiCfoScreen-CIW6Rkrd.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,18,48,21]))),b=l(()=>n(()=>import("./NotFoundScreen-BXgaohYF.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,21]))),pn=l(()=>n(()=>import("./TaskListScreen-BAOvGtza.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,17,21])));function Vn({setTenantEmailDomain:r}){const j=Ps(),S=Fs(),{tenantEmailDomain:o}=Ls(),V=Ss().mode,{setLoading:C,clearAllLoading:O,clearLoading:N}=Vs(),y=D.getSignedInUserTenant(o)?.tenantId,x=D.getSignedInUser(),ee=as(x),$=ks(),[w,be]=v.useState(!1),i=G(a=>ts(a)),{useFeatureGate:L}=Ns(),Y=ws(),se=Zs(),{isFeatureEnabled:Ce}=L(B.isDepositAccountsFeatureEnabled),{isFeatureEnabled:He}=L(B.isTreasuryEnabled),{isFeatureEnabled:ve}=L(B.isChargeCardFeatureEnabled),{isFeatureEnabled:ne}=L(B.isDebitCardFeatureEnabled),R=G(a=>a.tenantState.fetchState),T=G(a=>a.tenantState.activeTenantFetchState.fetchState),_=T==="Completed"||R==="Completed"?rs(ne,i):void 0,q=T==="Completed"||R==="Completed"?is(i):void 0,Oe=Ms(i,ve,ne),{isFeatureEnabled:Pe}=L(B.isSettingsFeatureEnabled),{isFeatureEnabled:Fe}=L(B.isAiCfoFileUploadEnabled),z=G(a=>os(a));if(o!=null){const a=D.getSignedInUserTenant(o);x!=null&&a!=null&&Re(x,i,V)}const M={tenantId:y,userId:x?.userId,sessionId:x?.zeniSessionId},ae=ls(),E=Gs(),Le=i.company==null||E?.loggedInUserRoleMap!=null&&pe(E.loggedInUserRole),ke=cs(E?.loggedInUserRoleMap),te=v.useRef(!0),re=Te("/:tenantEmailDomain/onboarding/*")!==null,J=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Be=G(a=>M.tenantId!=null?ds(a,M.tenantId):void 0);v.useEffect(()=>{C(F.TENANT_FETCHING),r(o)},[o]),v.useEffect(()=>{if(J!=null&&y!=null){const a=J.params.selectedPeriod;if(a!=null){const U=a.split("-");if(U.length===2){const d=us(Number(U[0])),s=Number(U[1]),u=ms(`01-${d<10?`0${d}`:d}-${s}`,je.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),Z=_s();u.isAfter(Z,"month")===!1?j(Es(y,{month:d,year:s})):S("./month_end_close_checks/review")}}}},[J,y]),v.useEffect(()=>{w||(be(!0),C(F.TENANT_FETCHING)),te.current?te.current=!1:!ps(ae,M)&&D.isSignedIn()&&(C(F.TENANT_FETCHING),function(a,U,d,s){if(he(U?.userId,U?.zeniSessionId,a.tenantId),d(vs(!0)),d(Ie(a.tenantId)),a.tenantId!=null&&m.clearTenant(a.tenantId),a.tenantId!=null){const u=D.getSignedInUserTenantWithId(a.tenantId);s&&je.updateAppLocaleID(zs(s)),u?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(u?.tenantEmailDomain)}a.userId!=null?Q.identify(a.userId,{tenant_id:a.tenantId}):Q.resetUserIdentity()}(M,x,j,Be))},[M,ae,x,j,D]),v.useEffect(()=>{D.isSignedIn()&&(C(F.TENANT_FETCHING),function(a,U,d,s,u,Z,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const K=s!=null&&u?.zeniSessionId!=null,es=d==null||d.tenantId!==s,ss=d!=null&&d.excludedResources==null,ns=d!=null&&d.externalConnections==null;if(K&&es){k(Ie(s));const W=D.getSignedInUserTenantWithId(s);W?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(W?.tenantEmailDomain),he(u?.userId,u?.zeniSessionId,s),m.shouldFetchExcludedResources(s)&&(m.markExcludedResourcesFetchStarted(s),k(ge(u.userId,s))),m.shouldFetchConnections(s)&&(m.markConnectionsFetchStarted(s),k(xe(u.userId,s)))}else K&&ss&&m.shouldFetchExcludedResources(s)&&(m.markExcludedResourcesFetchStarted(s),k(ge(u.userId,s))),K&&ns&&m.shouldFetchConnections(s)&&(m.markConnectionsFetchStarted(s),k(xe(u.userId,s)));if(K){Q.identify(u.userId,{tenant_id:s});const W=s==null||s!=null&&(U==="Completed"||U==="Error");a==="Completed"||U!=="Not-Started"&&U!=="Error"||s==null||!m.shouldFetchActiveTenant(s)||(m.markActiveTenantFetchStarted(s),Z(F.TENANT_FETCHING),k(Os(u.userId,s,u.zeniSessionId))),W&&(a==="Not-Started"||a==="Error")&&m.shouldFetchAllTenants()&&(m.markAllTenantsFetchStarted(),k(Ae(u.userId,u.zeniSessionId)))}}(R,T,i,y,x,C,j))},[y,T]),v.useEffect(()=>{D.isSignedIn()&&R==="Completed"&&z.tenantsBaseInOrder.length>0&&(N(F.TENANT_FETCHING),D.saveSignedInUserTenants(As(z.tenantsBaseInOrder)),x!=null&&Re(x,i,V,void 0,z.tenantsBaseInOrder))},[z,R,i,x]),v.useEffect(()=>{T==="In-Progress"&&C(F.TENANT_FETCHING),T!=="Completed"&&T!=="Error"||(T==="Completed"&&y!=null?(O(),m.markActiveTenantFetchCompleted(y)):T==="Error"&&y!=null&&(m.markActiveTenantFetchFailed(y),N(F.TENANT_FETCHING),N(F.TENANT_SWITCHING))),R!=="Completed"&&R!=="Error"||(R==="Completed"?m.markAllTenantsFetchCompleted():R==="Error"&&m.markAllTenantsFetchFailed())},[T,R,y,w]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&T==="Completed"&&w&&(ie.current=!0,function(a=Ws,U=3e3){setTimeout(()=>{const d=s=>{if(s>=a.length)return;const u=a[s],Z=Ks[u];Z!=null?Z().then(()=>X(()=>d(s+1))).catch(()=>X(()=>d(s+1))):d(s+1)};X(()=>d(0))},U)}())},[T,w]);const H=i?.userRole!=null&&hs(i?.userRole),{isFeatureEnabled:Se}=L(B.isReferralFeatureEnabled),Ve=i?.userRole!=null&&i.userRole.includes("charge_card_user"),Ne=i?.userRole!=null&&i.userRole.includes("charge_card_admin"),P=i?.userRole!=null&&pe(i.userRole),oe=i?.company==null||i.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!H,le=Oe&&!H,we=Is(E?.loggedInUserRoleMap),Ze=i.externalConnections?.accounting[0]?.isValid,ce=i.company?.companyOnboardingInfo.isOnboardingCompleted,de=i?.company==null||i.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!H,ue=de&&gs(E?.loggedInUserRoleMap),me=Ce&&!H,Me=i.company!=null&&xs(i.company),Ge=He&&Me===!0&&!H,$e=oe&&Ts(E?.loggedInUserRoleMap),ze=le&&js(E?.loggedInUserRoleMap),Ke=me&&Rs(E?.loggedInUserRoleMap),We=Us(E?.loggedInUserRoleMap),Ye=Ds(E?.loggedInUserRoleMap),p=fs(E?.loggedInUserRoleMap),A=ys(E?.loggedInUserRoleMap),qe=bs(E?.loggedInUserRoleMap),h=Cs(E?.loggedInUserRoleMap),I=Hs(E?.loggedInUserRoleMap),_e=oe&&h,Ee=de&&I,Je=me&&p,Qe=Ge&&A,g=le&&qe,Xe=i.excludedResources?.resources?.find(a=>a.resource==="/invites")!=null||ke===!0||we===!0||We===!0||Ye===!0;return D.isSignedIn()?y==null?R==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(x!=null&&R!=="In-Progress"&&j(Ae(x.userId,x.zeniSessionId)),null):T!=="In-Progress"&&T!=="Not-Started"||R==="Completed"?(ce===!0||ee&&!re)&&Ze===!1&&_===!1&&q===!1?(r(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!w||ce!==!1||re||ee?w&&i?.userRole&&_!=null&&q!=null&&o!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Bs,{children:e.jsxs(t,{element:e.jsx($s,{}),children:[e.jsx(t,{path:"/",element:e.jsx(An,{isDashboardAccess:P,isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,isTenantCardsOnly:q,showChargeCardRoute:g})}),e.jsx(t,{path:"dashboard/*",element:P?e.jsx(nn,{}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:P?e.jsx(Ys,{}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:Xe||P?e.jsx(Js,{}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:P?e.jsx(Qs,{}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(Xs,{})}),e.jsx(t,{path:"transaction/*",element:P&&H===!1||Ve||Ne?e.jsx(sn,{}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:P&&H===!1?e.jsx(on,{}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:P&&H===!1?e.jsx(Ue,{entityType:"customer"}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isTenantBankingOnly:_,isUserHasTreasuryAccess:A,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:P&&H===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(pn,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(_n,{})}),e.jsx(t,{path:"address/*",element:$e||ue||Ke||ze?e.jsx(qs,{}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:Je?e.jsx(tn,{}):e.jsx(b,{})}),e.jsx(t,{path:"treasury/*",element:Qe?e.jsx(rn,{}):e.jsx(b,{})}),e.jsx(t,{path:"performance",element:se===!0?e.jsx(dn,{}):e.jsx(ye,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:se===!0&&H===!1?e.jsx(un,{}):e.jsx(ye,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(cn,{})}),e.jsx(t,{path:"vendors/*",element:Le?e.jsx(en,{}):e.jsx(b,{})}),e.jsx(t,{path:"bill/*",element:_e?e.jsx(De,{}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:_e?e.jsx(De,{}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:Ee?e.jsx(fe,{}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:Ee?e.jsx(fe,{}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:Pe?e.jsx(an,{hasAdminLevelAccess:ue}):e.jsx(b,{})}),e.jsx(t,{path:"cards/*",element:g?e.jsx(ln,{}):e.jsx(b,{})}),e.jsx(t,{path:"rewards/*",element:Se?e.jsx(mn,{}):e.jsx(b,{})}),e.jsx(t,{path:"/ai-cfo",element:Y?e.jsx(c,{to:"explore"}):e.jsx(b,{})}),e.jsx(t,{path:"/ai-cfo/",element:Y?e.jsx(c,{to:"explore"}):e.jsx(b,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:Y?e.jsx(En,{isFileUploadEnabled:Fe}):e.jsx(b,{})}),e.jsx(t,{path:"*",element:e.jsx(b,{})})]})}):null:(r(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),r(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}const An=({isDashboardAccess:r,isUserHasZeniAccountsAccess:j,isUserHasBillPayAccess:S,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:V,isTenantBankingOnly:C,isTenantCardsOnly:O,showChargeCardRoute:N})=>C===!0&&j?e.jsx(c,{to:"checking"}):O===!0&&N?e.jsx(c,{to:"cards"}):r?e.jsx(c,{to:"dashboard"}):j?e.jsx(c,{to:"checking"}):V?e.jsx(c,{to:"treasury"}):N?e.jsx(c,{to:"cards"}):S?e.jsx(c,{to:"bills"}):o?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),f=({isUserHasZeniAccountsAccess:r,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:o,isTenantBankingOnly:V,showChargeCardRoute:C,tenantEmailDomain:O})=>V===!0||r?e.jsx(xn,{tenantEmailDomain:O}):o?e.jsx(gn,{tenantEmailDomain:O}):C?e.jsx(Tn,{tenantEmailDomain:O}):j?e.jsx(In,{tenantEmailDomain:O}):S?e.jsx(hn,{tenantEmailDomain:O}):e.jsx(b,{}),hn=({tenantEmailDomain:r})=>e.jsx(c,{to:`/${r}/reimbursements`}),In=({tenantEmailDomain:r})=>e.jsx(c,{to:`/${r}/bills`}),gn=({tenantEmailDomain:r})=>e.jsx(c,{to:`/${r}/treasury`}),xn=({tenantEmailDomain:r})=>e.jsx(c,{to:`/${r}/checking`}),Tn=({tenantEmailDomain:r})=>e.jsx(c,{to:`/${r}/cards`}),ye=({tenantEmailDomain:r})=>e.jsx(c,{to:`/${r}/dashboard`});export{f as FallBackRoute,Vn as default};
@@ -1,4 +1,4 @@
1
- import{j as o}from"./liveblocks-BRoLXdu-.js";import{a as p}from"./sentry-B_UPXuSC.js";import{h as z,g as $,u as F,j as f,t as ce,n as K,i as G,o as Y,p as E}from"./core-BwBLfZO1.js";import{bn as ke,eS as P,fP as Pe,m6 as le,Md as De,gQ as me,M4 as Me,p$ as Ue,jJ as fe,m2 as Oe,gS as Te,M6 as _e,M5 as Fe,Ov as Re,yl as Be,CQ as Ve,O4 as ze,Od as Le,c1 as ne,cG as Ne,cH as $e,Kb as Ke,Ow as Ge,Kc as He,wN as qe,Ox as Qe,Fc as Ze,Cw as Je,Cn as he,Ck as Xe,wR as be,Cq as Se,Ct as Ce,Cz as te,td as ae,wQ as Ye,jl as W,jo as ye,Oy as We,kp as en,x4 as nn,K$ as tn,L0 as an,jj as on,Oz as sn,jm as cn,qt as ln,OA as rn,OB as dn,qx as un,gA as pn,Kk as X,gp as gn,gw as mn,Kl as fn,x1 as hn,OC as bn,OD as Sn,CN as Cn,e$ as Ie,f1 as xe,OE as yn,fD as In,Ku as xn,x0 as re,fI as de,fH as En,w$ as An,fG as wn,fF as vn,OF as jn,f4 as Ee,OG as kn,OH as Pn,x7 as Dn,w_ as ue,OI as Mn,fl as Un,wX as On,bU as Tn,c0 as _n,b$ as Fn,bV as Rn,bZ as Bn,bY as Vn,bX as zn,b_ as Ln,bW as Nn}from"./zeni-epic-state-5KAN0o5k.js";import{a as Z,G as _,z as v,af as Ae,bK as $n,d as J,f as Kn,I as H,B as oe,bL as Gn,i as we,bM as Hn,aq as qn,j as ve,bN as Qn,bO as Zn,bP as Jn,Y as Xn,bQ as Yn,q as Wn,bR as et}from"./index-aRVrbNiC.js";import{n as B}from"./mui-BBkWv1mU.js";import{M as R}from"./MobileAppDrawer-Df4Qimmh.js";import{a as q,g as Q,m as nt}from"./accountMappingHelper-BNXnlSEh.js";import{t as tt,A as at}from"./AddressScreen-D3HAG5Pr.js";import N from"./NotFoundScreen-DVKBuN7e.js";import{g as ot}from"./analyticsHelper-B5epc-PZ.js";import{B as st}from"./BusinessVerificationPageScreen-BbDxcN3K.js";import{C as it}from"./CompanyPassportScreen-CC2QSh6z.js";import{q as pe}from"./QBOConnectionScreen-CHdv-UVo.js";import{B as ct}from"./BillPayApprovalRoutes-gDdPXgYD.js";import{R as lt}from"./ReimbursementApprovalRoutes-LmykdpDG.js";import"./recharts-CiU9jjGx.js";import"./analytics-7J1CNh2i.js";import"./plaid-Gte2Ckk-.js";import"./dnd-yE3kwzv1.js";import"./stripe-DMRn4zHo.js";import"./lottie-BAjpdqbN.js";import"./lexical-CppAuKk8.js";import"./pdf-BQyDOTnR.js";import"./utils-ox49Wmvb.js";import"./routePaths-hmakpH65.js";import"./empty-CCgcIyVB.js";import"./pdf-lib-B_thHwDW.js";import"./index-t__Gmvon.js";import"./url-DMkZVN82.js";import"./index-DqVSCvOK.js";import"./decodeURIComponentSafe-Cau4zUJU.js";import"./ReimbursementApprovalRuleDetailScreen-CeUHThGh.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]="cd54ce84-8259-418e-a9c3-915ac141dee6",e._sentryDebugIdIdentifier="sentry-dbid-cd54ce84-8259-418e-a9c3-915ac141dee6")}catch{}})();const rt=B.div`
1
+ import{j as o}from"./liveblocks-OUACL7Sm.js";import{a as p}from"./sentry-COtwFETz.js";import{h as z,g as $,u as F,j as f,t as ce,n as K,i as G,o as Y,p as E}from"./core-CvVQwh-G.js";import{bn as ke,eS as P,fP as Pe,m6 as le,Md as De,gQ as me,M4 as Me,p$ as Ue,jJ as fe,m2 as Oe,gS as Te,M6 as _e,M5 as Fe,Ov as Re,yl as Be,CQ as Ve,O4 as ze,Od as Le,c1 as ne,cG as Ne,cH as $e,Kb as Ke,Ow as Ge,Kc as He,wN as qe,Ox as Qe,Fc as Ze,Cw as Je,Cn as he,Ck as Xe,wR as be,Cq as Se,Ct as Ce,Cz as te,td as ae,wQ as Ye,jl as W,jo as ye,Oy as We,kp as en,x4 as nn,K$ as tn,L0 as an,jj as on,Oz as sn,jm as cn,qt as ln,OA as rn,OB as dn,qx as un,gA as pn,Kk as X,gp as gn,gw as mn,Kl as fn,x1 as hn,OC as bn,OD as Sn,CN as Cn,e$ as Ie,f1 as xe,OE as yn,fD as In,Ku as xn,x0 as re,fI as de,fH as En,w$ as An,fG as wn,fF as vn,OF as jn,f4 as Ee,OG as kn,OH as Pn,x7 as Dn,w_ as ue,OI as Mn,fl as Un,wX as On,bU as Tn,c0 as _n,b$ as Fn,bV as Rn,bZ as Bn,bY as Vn,bX as zn,b_ as Ln,bW as Nn}from"./zeni-epic-state-CECAZYIg.js";import{a as Z,G as _,z as v,af as Ae,bK as $n,d as J,f as Kn,I as H,B as oe,bL as Gn,i as we,bM as Hn,aq as qn,j as ve,bN as Qn,bO as Zn,bP as Jn,Y as Xn,bQ as Yn,q as Wn,bR as et}from"./index-LzTRB_X0.js";import{n as B}from"./mui-B_sWk5no.js";import{M as R}from"./MobileAppDrawer-C6MRZ7yW.js";import{a as q,g as Q,m as nt}from"./accountMappingHelper-C2f8hGo7.js";import{t as tt,A as at}from"./AddressScreen-DLTJPBtB.js";import N from"./NotFoundScreen-BXgaohYF.js";import{g as ot}from"./analyticsHelper-Cw9lxNal.js";import{B as st}from"./BusinessVerificationPageScreen-BXKB7X5s.js";import{C as it}from"./CompanyPassportScreen-BLsZ8Uuy.js";import{q as pe}from"./QBOConnectionScreen-YQRuxVuF.js";import{B as ct}from"./BillPayApprovalRoutes-BvMuz4fH.js";import{R as lt}from"./ReimbursementApprovalRoutes-YTWZ_f_x.js";import"./recharts-ScPc1hFQ.js";import"./analytics-BYlEHy--.js";import"./plaid-BeX18ubU.js";import"./dnd-DNR-B7xM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CtoJzpCG.js";import"./lexical-DEMTOP18.js";import"./pdf-Bd_BBdKz.js";import"./utils-B-68Nh7i.js";import"./routePaths-CCOmiobh.js";import"./empty-CqdRwXT0.js";import"./pdf-lib-B6zbzfIK.js";import"./index-DkXdrecr.js";import"./url-DgoPdzhF.js";import"./index-6ei8cz0C.js";import"./decodeURIComponentSafe-C_ttRntx.js";import"./ReimbursementApprovalRuleDetailScreen-DqNByTW4.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]="cd54ce84-8259-418e-a9c3-915ac141dee6",e._sentryDebugIdIdentifier="sentry-dbid-cd54ce84-8259-418e-a9c3-915ac141dee6")}catch{}})();const rt=B.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as u}from"./liveblocks-BRoLXdu-.js";import{h as X,g as J,u as Y,i as G,j as E,N,n as W,s as Je}from"./core-BwBLfZO1.js";import{bF as Ye,ck as Ie,NU as ye,eS as V,cw as en,yw as Z,yl as nn,O4 as tn,O7 as an,qM as ee,qA as ne,kh as te,sL as z,O9 as Ae,fH as $e,fG as Ge,fF as We,Oa as sn,yF as on,Cw as ke,Cn as _e,Ck as ve,Cb as K,Cq as Pe,Ct as Ee,Cz as we,td as Te,fW as cn,cr as rn,f1 as un,e$ as dn,f0 as ln,bt as pn,Ob as mn,Bd as le,BR as yn,Oc as fn,bG as gn,DM as pe,CQ as Sn,Od as bn,Oe as hn,DQ as Cn,DU as In,sE as An,Ik as kn,Ep as Ce,Fq as me,Of as _n,Og as vn,Oh as Pn,Oi as qe,Oj as En,KO as wn,Nh as Tn,K_ as Dn,Ok as He,Ol as Be,EL as Ke,kp as On,qD as Qe,sN as Un,bE as je,sZ as Ne,cu as Fn,Om as Xe,fk as Bn,E7 as Vn,Eb as xn,On as jn,Es as Re,Oo as Nn,Op as Rn,Oq as zn,Or as Ln,fP as Mn,zQ as Zn,Os as $n,zV as Gn,zU as Wn}from"./zeni-epic-state-5KAN0o5k.js";import{I as ae,a as ie,G as de,m as De,aN as Q,z as w,s as se,d as T,B as Oe,f as $,bz as qn,at as oe,bA as x,bB as Hn,bC as Kn,af as xe,bD as Qn,q as ze,au as Le,X as Xn,w as Jn,bE as Yn,bF as et,bG as nt,a8 as tt}from"./index-aRVrbNiC.js";import{a as C}from"./sentry-B_UPXuSC.js";import{n as Ve,D as at,S as it}from"./mui-BBkWv1mU.js";import{M as fe}from"./MobileAppDrawer-Df4Qimmh.js";import R from"./NotFoundScreen-DVKBuN7e.js";import{a as Me}from"./analyticsHelper-B5epc-PZ.js";import{d as Ze}from"./routePaths-hmakpH65.js";import{B as Fe}from"./BusinessVerificationPageScreen-BbDxcN3K.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]="11c42e02-abe7-4015-a44d-5e7317aec186",e._sentryDebugIdIdentifier="sentry-dbid-11c42e02-abe7-4015-a44d-5e7317aec186")}catch{}})();const st=Ve.div`
1
+ import{j as u}from"./liveblocks-OUACL7Sm.js";import{h as X,g as J,u as Y,i as G,j as E,N,n as W,s as Je}from"./core-CvVQwh-G.js";import{bF as Ye,ck as Ie,NU as ye,eS as V,cw as en,yw as Z,yl as nn,O4 as tn,O7 as an,qM as ee,qA as ne,kh as te,sL as z,O9 as Ae,fH as $e,fG as Ge,fF as We,Oa as sn,yF as on,Cw as ke,Cn as _e,Ck as ve,Cb as K,Cq as Pe,Ct as Ee,Cz as we,td as Te,fW as cn,cr as rn,f1 as un,e$ as dn,f0 as ln,bt as pn,Ob as mn,Bd as le,BR as yn,Oc as fn,bG as gn,DM as pe,CQ as Sn,Od as bn,Oe as hn,DQ as Cn,DU as In,sE as An,Ik as kn,Ep as Ce,Fq as me,Of as _n,Og as vn,Oh as Pn,Oi as qe,Oj as En,KO as wn,Nh as Tn,K_ as Dn,Ok as He,Ol as Be,EL as Ke,kp as On,qD as Qe,sN as Un,bE as je,sZ as Ne,cu as Fn,Om as Xe,fk as Bn,E7 as Vn,Eb as xn,On as jn,Es as Re,Oo as Nn,Op as Rn,Oq as zn,Or as Ln,fP as Mn,zQ as Zn,Os as $n,zV as Gn,zU as Wn}from"./zeni-epic-state-CECAZYIg.js";import{I as ae,a as ie,G as de,m as De,aN as Q,z as w,s as se,d as T,B as Oe,f as $,bz as qn,at as oe,bA as x,bB as Hn,bC as Kn,af as xe,bD as Qn,q as ze,au as Le,X as Xn,w as Jn,bE as Yn,bF as et,bG as nt,a8 as tt}from"./index-LzTRB_X0.js";import{a as C}from"./sentry-COtwFETz.js";import{n as Ve,D as at,S as it}from"./mui-B_sWk5no.js";import{M as fe}from"./MobileAppDrawer-C6MRZ7yW.js";import R from"./NotFoundScreen-BXgaohYF.js";import{a as Me}from"./analyticsHelper-Cw9lxNal.js";import{d as Ze}from"./routePaths-CCOmiobh.js";import{B as Fe}from"./BusinessVerificationPageScreen-BXKB7X5s.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]="11c42e02-abe7-4015-a44d-5e7317aec186",e._sentryDebugIdIdentifier="sentry-dbid-11c42e02-abe7-4015-a44d-5e7317aec186")}catch{}})();const st=Ve.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{j as f}from"./liveblocks-BRoLXdu-.js";import{a as u,b as T,q as A}from"./sentry-B_UPXuSC.js";import{u as D,h as z,j as l,g as M,N as j,n as O}from"./core-BwBLfZO1.js";import{u as F,z as s,m as P,d as E,D as _,e as K,f as B,A as J,g as N,h as $,j as v}from"./index-aRVrbNiC.js";import{eS as q,J_ as V,J$ as W,eZ as Z,fq as H,K4 as G,fO as Q,cT as R,K5 as b,K6 as X,K7 as Y,bT as y}from"./zeni-epic-state-5KAN0o5k.js";import"./mui-BBkWv1mU.js";import{u as ee}from"./useDeviceId-b4A3GNY_.js";import{f as te}from"./analyticsHelper-B5epc-PZ.js";import{t as ne}from"./getLocaleForTenant-Bn0H95YD.js";import"./recharts-CiU9jjGx.js";import"./analytics-7J1CNh2i.js";import"./plaid-Gte2Ckk-.js";import"./dnd-yE3kwzv1.js";import"./stripe-DMRn4zHo.js";import"./lottie-BAjpdqbN.js";import"./lexical-CppAuKk8.js";import"./pdf-BQyDOTnR.js";import"./utils-ox49Wmvb.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]="68686461-6e99-4820-94bb-6f589740d7e8",t._sentryDebugIdIdentifier="sentry-dbid-68686461-6e99-4820-94bb-6f589740d7e8")}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(Y({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(X(n,a)))},clearSignInError:()=>{t(b())}}})($),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=D(),d=z(),{clearAllLoading:g}=F(),n=s.getSignedInUser();u.useLayoutEffect(()=>{g()},[g]);const a=ee(),c=l(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:h,accountLocked:C,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=>q(e)),I=l(e=>V(e)),m=M(),w=P().mode,U=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{h.fetchState==="Completed"&&c!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))},[h.fetchState,c]),u.useEffect(()=>{t(void 0)},[]),u.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(W(I.tenantsInOrder),o.zeniSessionId),Z(o.userId,o.zeniSessionId,r.tenantId),i(H(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(G("Completed")),_.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),Q().then(()=>{const e=N();e!=null&&K(e)}),setTimeout(()=>{E.trackLogin(B.Event.loginSuccess,o.authProvider??"google",R(r.productSettings))},2e3))},[S,p,L,o,r,I,w,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(j,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!U,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),C===!0&&k!=null?f.jsx(J,{onClose:()=>i(b()),unlockDate:k}):null]})}export{ve as default};
1
+ import{j as f}from"./liveblocks-OUACL7Sm.js";import{a as u,b as T,q as A}from"./sentry-COtwFETz.js";import{u as D,h as z,j as l,g as M,N as j,n as O}from"./core-CvVQwh-G.js";import{u as F,z as s,m as P,d as E,D as _,e as K,f as B,A as J,g as N,h as $,j as v}from"./index-LzTRB_X0.js";import{eS as q,J_ as V,J$ as W,eZ as Z,fq as H,K4 as G,fO as Q,cT as R,K5 as b,K6 as X,K7 as Y,bT as y}from"./zeni-epic-state-CECAZYIg.js";import"./mui-B_sWk5no.js";import{u as ee}from"./useDeviceId-FKP5CkBV.js";import{f as te}from"./analyticsHelper-Cw9lxNal.js";import{t as ne}from"./getLocaleForTenant-BKpCR6Mg.js";import"./recharts-ScPc1hFQ.js";import"./analytics-BYlEHy--.js";import"./plaid-BeX18ubU.js";import"./dnd-DNR-B7xM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CtoJzpCG.js";import"./lexical-DEMTOP18.js";import"./pdf-Bd_BBdKz.js";import"./utils-B-68Nh7i.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]="68686461-6e99-4820-94bb-6f589740d7e8",t._sentryDebugIdIdentifier="sentry-dbid-68686461-6e99-4820-94bb-6f589740d7e8")}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(Y({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(X(n,a)))},clearSignInError:()=>{t(b())}}})($),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=D(),d=z(),{clearAllLoading:g}=F(),n=s.getSignedInUser();u.useLayoutEffect(()=>{g()},[g]);const a=ee(),c=l(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:h,accountLocked:C,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=>q(e)),I=l(e=>V(e)),m=M(),w=P().mode,U=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{h.fetchState==="Completed"&&c!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))},[h.fetchState,c]),u.useEffect(()=>{t(void 0)},[]),u.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(W(I.tenantsInOrder),o.zeniSessionId),Z(o.userId,o.zeniSessionId,r.tenantId),i(H(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(G("Completed")),_.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),Q().then(()=>{const e=N();e!=null&&K(e)}),setTimeout(()=>{E.trackLogin(B.Event.loginSuccess,o.authProvider??"google",R(r.productSettings))},2e3))},[S,p,L,o,r,I,w,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(j,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!U,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),C===!0&&k!=null?f.jsx(J,{onClose:()=>i(b()),unlockDate:k}):null]})}export{ve as default};
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-BRoLXdu-.js";import{a as n}from"./sentry-B_UPXuSC.js";import{u,g as m,h as p,N as g}from"./core-BwBLfZO1.js";import{z as f,B as y,t as b,d,f as h}from"./index-aRVrbNiC.js";import{fT as x,fU as I,Km as j}from"./zeni-epic-state-5KAN0o5k.js";import{n as w}from"./mui-BBkWv1mU.js";import"./recharts-CiU9jjGx.js";import"./analytics-7J1CNh2i.js";import"./plaid-Gte2Ckk-.js";import"./dnd-yE3kwzv1.js";import"./stripe-DMRn4zHo.js";import"./lottie-BAjpdqbN.js";import"./lexical-CppAuKk8.js";import"./pdf-BQyDOTnR.js";import"./utils-ox49Wmvb.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]="942bcaf7-6052-4bd0-9a01-95967fcd39f6",e._sentryDebugIdIdentifier="sentry-dbid-942bcaf7-6052-4bd0-9a01-95967fcd39f6")}catch{}})();function $(){const e=u(),t=m(),i=p(),a=n.useRef(!1),c=f.isSignedIn(),r=t.state?.message==="logout",o=r||c;return n.useEffect(()=>{o&&!a.current&&(a.current=!0,setTimeout(()=>{try{f.clearAll(),e(x()),e(I(!1)),j(),b.reset(),d.trackLogout(h.Event.logoutSuccess),d.resetUserIdentity()}catch(l){console.error("Error during sign out:",l)}finally{r||i("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(v,{children:s.jsx(y,{fetchState:"In-Progress"})}):s.jsx(g,{to:"../",replace:!0})}const v=w.div`
1
+ import{j as s}from"./liveblocks-OUACL7Sm.js";import{a as n}from"./sentry-COtwFETz.js";import{u,g as m,h as p,N as g}from"./core-CvVQwh-G.js";import{z as f,B as y,t as b,d,f as h}from"./index-LzTRB_X0.js";import{fT as x,fU as I,Km as j}from"./zeni-epic-state-CECAZYIg.js";import{n as w}from"./mui-B_sWk5no.js";import"./recharts-ScPc1hFQ.js";import"./analytics-BYlEHy--.js";import"./plaid-BeX18ubU.js";import"./dnd-DNR-B7xM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CtoJzpCG.js";import"./lexical-DEMTOP18.js";import"./pdf-Bd_BBdKz.js";import"./utils-B-68Nh7i.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]="942bcaf7-6052-4bd0-9a01-95967fcd39f6",e._sentryDebugIdIdentifier="sentry-dbid-942bcaf7-6052-4bd0-9a01-95967fcd39f6")}catch{}})();function $(){const e=u(),t=m(),i=p(),a=n.useRef(!1),c=f.isSignedIn(),r=t.state?.message==="logout",o=r||c;return n.useEffect(()=>{o&&!a.current&&(a.current=!0,setTimeout(()=>{try{f.clearAll(),e(x()),e(I(!1)),j(),b.reset(),d.trackLogout(h.Event.logoutSuccess),d.resetUserIdentity()}catch(l){console.error("Error during sign out:",l)}finally{r||i("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(v,{children:s.jsx(y,{fetchState:"In-Progress"})}):s.jsx(g,{to:"../",replace:!0})}const v=w.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as p}from"./liveblocks-BRoLXdu-.js";import{a as D}from"./sentry-B_UPXuSC.js";import{h as U,u as z,g as K,j as b,i as _,n as H}from"./core-BwBLfZO1.js";import{z as L,a as q,G as d,$ as O,s as W,d as M,f as Q,cT as V,q as g,p as Z}from"./index-aRVrbNiC.js";import{eS as X,Rp as F,H5 as y,Rq as x,Rl as Y,Gt as E,Rr as J,GB as S,FX as aa,H6 as I,Rs as R,gW as ea,GY as ta,H1 as sa,GQ as oa,GO as B,H2 as na,GL as ia,Rt as la,Ru as ra,Rv as ca,Rw as ka,Rx as m,ee as ua,Ry as pa,Rz as da}from"./zeni-epic-state-5KAN0o5k.js";import{n as ma}from"./mui-BBkWv1mU.js";import{u as Ta}from"./useAskAiCfoHostNavButtonProps-DO0seTDc.js";import{M as ga}from"./MobileAppDrawer-Df4Qimmh.js";import"./recharts-CiU9jjGx.js";import"./analytics-7J1CNh2i.js";import"./plaid-Gte2Ckk-.js";import"./dnd-yE3kwzv1.js";import"./stripe-DMRn4zHo.js";import"./lottie-BAjpdqbN.js";import"./lexical-CppAuKk8.js";import"./pdf-BQyDOTnR.js";import"./utils-ox49Wmvb.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]="74f5ee0c-e749-4869-81c9-4569e89383b4",e._sentryDebugIdIdentifier="sentry-dbid-74f5ee0c-e749-4869-81c9-4569e89383b4")}catch{}})();const fa=ma.div`
1
+ import{j as p}from"./liveblocks-OUACL7Sm.js";import{a as D}from"./sentry-COtwFETz.js";import{h as U,u as z,g as K,j as b,i as _,n as H}from"./core-CvVQwh-G.js";import{z as L,a as q,G as d,$ as O,s as W,d as M,f as Q,cT as V,q as g,p as Z}from"./index-LzTRB_X0.js";import{eS as X,Rp as F,H5 as y,Rq as x,Rl as Y,Gt as E,Rr as J,GB as S,FX as aa,H6 as I,Rs as R,gW as ea,GY as ta,H1 as sa,GQ as oa,GO as B,H2 as na,GL as ia,Rt as la,Ru as ra,Rv as ca,Rw as ka,Rx as m,ee as ua,Ry as pa,Rz as da}from"./zeni-epic-state-CECAZYIg.js";import{n as ma}from"./mui-B_sWk5no.js";import{u as Ta}from"./useAskAiCfoHostNavButtonProps-CT6wQzQG.js";import{M as ga}from"./MobileAppDrawer-C6MRZ7yW.js";import"./recharts-ScPc1hFQ.js";import"./analytics-BYlEHy--.js";import"./plaid-BeX18ubU.js";import"./dnd-DNR-B7xM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CtoJzpCG.js";import"./lexical-DEMTOP18.js";import"./pdf-Bd_BBdKz.js";import"./utils-B-68Nh7i.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]="74f5ee0c-e749-4869-81c9-4569e89383b4",e._sentryDebugIdIdentifier="sentry-dbid-74f5ee0c-e749-4869-81c9-4569e89383b4")}catch{}})();const fa=ma.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as n}from"./liveblocks-BRoLXdu-.js";import se from"./NotFoundScreen-DVKBuN7e.js";import{a as c}from"./sentry-B_UPXuSC.js";import{h as M,u as O,j as f,g as ne,i as oe,N as ie,n as re,o as ce,p as g}from"./core-BwBLfZO1.js";import{G8 as Z,Gb as le,G5 as de,eS as K,Rl as X,Gp as H,G2 as pe,GV as ue,GO as ke,Rm as Q,Rn as A,F_ as me,FX as ge,qM as fe,qA as he,kh as Se,Gj as Ge,Ro as Ie,GA as Te,Gx as be,Ge as Ee,Gu as Ce,Gt as De}from"./zeni-epic-state-5KAN0o5k.js";import{z as C,cR as xe,K as je,a as Re,G as T,p as W,q as w,s as ye,d as N,f as we,cS as ve,j as V,at as Fe}from"./index-aRVrbNiC.js";import{n as Be}from"./mui-BBkWv1mU.js";import{u as Pe}from"./useInitialThreadRequest-D_32gSqj.js";import{M as Ue}from"./MobileAppDrawer-Df4Qimmh.js";import Le from"./TaskListScreen-DG4Dv6A-.js";import"./recharts-CiU9jjGx.js";import"./analytics-7J1CNh2i.js";import"./plaid-Gte2Ckk-.js";import"./dnd-yE3kwzv1.js";import"./stripe-DMRn4zHo.js";import"./lottie-BAjpdqbN.js";import"./lexical-CppAuKk8.js";import"./pdf-BQyDOTnR.js";import"./utils-ox49Wmvb.js";import"./useAskAiCfoHostNavButtonProps-DO0seTDc.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]="9862931e-9372-499d-a209-1e27cb52e2b6",e._sentryDebugIdIdentifier="sentry-dbid-9862931e-9372-499d-a209-1e27cb52e2b6")}catch{}})();function $e(){const e=M(),t=O(),s=C.getSignedInUser(),{cannedResponses:u,fetchState:r,saveFetchState:d}=f(o=>o.cannedResponsesState),l=c.useCallback(()=>{t(Z())},[t]),k=c.useCallback((o,h,S)=>{t(le({name:o,content:h,cannedResponseId:S}))},[t]),a=c.useCallback(o=>{t(de({cannedResponseId:o}))},[t]);if(s==null)throw Error("Can't access quick responses page without signing in...");return n.jsx(xe,{cannedResponses:u,isLoading:r==="In-Progress"||r==="Not-Started",isSaving:d==="In-Progress",onBackClick:()=>e(-1),onDelete:a,onFetch:l,onSave:k})}let z,_=[];const qe=re(function(e,t){const{location:s,taskGroupId:u}=t,r=Q(e,t.taskId),d=K(e),l=r.taskGroupId??u,k=l!=null?A(e.taskGroupState,l):void 0,a=C.getSignedInUser(),o=d.tenantId,h={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:o??""},S=X(e),{tenantEmailDomain:D}=d,b=r.recurringSourceTaskId,x=b!=null?`${V.appUrl}/${D}/tasks/${encodeURIComponent(b)}`:void 0;var G;return{taskDetailSelectorView:r,authParams:h,isZeniUser:C.isZeniUser(),userGroupList:((G=e.userGroupsState.userGroupByUserGroupId)!==z&&(z=G,_=Object.values(G)),_),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Fe.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${V.appUrl}${t.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:x,tagListView:S,taskGroupName:l!=null&&k!=null&&k.isDefault===!1?k.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map(p=>A(e.taskGroupState,p)).filter(p=>p!=null&&!p.isDeleted).map(p=>({id:p.id,name:p.name,isDefault:p.isDefault}))}},function(e,t){const{taskId:s,navigate:u,currentTenant:r,location:d,taskGroupId:l}=t,{tenantEmailDomain:k}=r;return{onSaveChangesToLocalStore:a=>{e(De({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(Ce(s,a??l))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ee(t.taskId))},onSnoozeTask:(a,o)=>{e(be(a,o))},onUnsnoozeTask:a=>{e(Te(a))},onDismissClick:()=>{if(d.state?.message==="triggerBackClick"){const a=W(d.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";u(o,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=v(k),o=w(d.state?.pathnameStackToGoBack,d.pathname);u(a,{state:{pathnameStackToGoBack:o}})}e(Ie({taskId:s}))},onDeleteTaskClick:()=>{e(Ge(s))},updateFilesEntity:a=>{e(Se({files:a}))},onDeleteFile:a=>{e(he(a))},onEditFileName:(a,o)=>{e(fe(a,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(H(!1,s))},onCreateTagClick:a=>{e(ge(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(Z())},onManageTemplatesClick:()=>{u(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}})(ve);function y(){const e=M(),t=O(),s=ne(),u=je(),{taskId:r,taskGroupId:d}=oe(),l=f(i=>K(i)),k=Pe(l?.companyId),{useFeatureGate:a}=Re(),{isFeatureEnabled:o}=a(T.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(T.isTaskVisibilityEnabled),{isFeatureEnabled:S}=a(T.isTaskCannedResponsesEnabled),{isFeatureEnabled:D}=a(T.isTaskRecurringParentEnabled),{isFeatureEnabled:b}=a(T.isTaskGroupAssigneesEnabled),[x,G]=c.useState(!1),[p,Y]=c.useState(!1),[F,J]=c.useState(!1),[B,ee]=c.useState(!1),[P,j]=c.useState(!1),I=c.useRef(!1),E=f(i=>i.taskListState.updateTasksFetchState.fetchState),U=f(i=>X(i)),L=f(i=>i.taskGroupViewState.fetchState);c.useEffect(()=>{p||(Y(!0),t(H(!1,r)))},[p,t]),c.useEffect(()=>{F||U.fetchState==="Completed"||(J(!0),t(pe()))},[F,t,U.fetchState]),c.useEffect(()=>{B||L==="Completed"||(ee(!0),t(ue()))},[B,t,L]);const ae=c.useCallback(()=>{r!=null&&(I.current=!1,t(ke([r],null,{isArchived:!1})),j(!0))},[t,r]);c.useEffect(()=>{if(P)if(E!=="In-Progress"){if(I.current){if(E==="Error")return j(!1),void(I.current=!1);if(E==="Completed"){j(!1),I.current=!1;const{tenantEmailDomain:i}=l;if(s.state?.message==="triggerBackClick"){const m=W(s.state?.pathnameStackToGoBack);e(m.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:m.newStack}})}else{const m=v(i);e(m,{state:{pathnameStackToGoBack:w(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else I.current=!0},[P,E,l,s,e]);const $=f(i=>Q(i,r)),R=$.fetchState,q=C.getSignedInUser();if(q==null)throw Error("Can't access task detail page without signing in...");if(R==="Error"&&$.error?.code===400){const{tenantEmailDomain:i}=l,m=v(i),te=w(s.state?.pathnameStackToGoBack,s.pathname);return n.jsx(ie,{to:m,state:{pathnameStackToGoBack:te}})}return n.jsxs(n.Fragment,{children:[R==="Completed"?n.jsx(ye,{analytics:N,onLoad:i=>(m=>m.trackPageLoaded(we.Event.taskDetailPage))(i)}):null,n.jsxs(Ae,{children:[n.jsx(Ue,{isAppContentDrawerOpen:x,handleDrawerToggle:i=>{G(i)}}),n.jsx(qe,{analytics:N,currentTenant:l,handleZeniLogoClick:()=>{u.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:q,navigate:e,taskGroupId:d,taskId:r,taskDetailFetchState:R,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:S,isTaskRecurringParentEnabled:D,isTaskGroupAssigneesEnabled:b})]})]})}const Ae=Be.div`
1
+ import{j as n}from"./liveblocks-OUACL7Sm.js";import se from"./NotFoundScreen-BXgaohYF.js";import{a as c}from"./sentry-COtwFETz.js";import{h as M,u as O,j as f,g as ne,i as oe,N as ie,n as re,o as ce,p as g}from"./core-CvVQwh-G.js";import{G8 as Z,Gb as le,G5 as de,eS as K,Rl as X,Gp as H,G2 as pe,GV as ue,GO as ke,Rm as Q,Rn as A,F_ as me,FX as ge,qM as fe,qA as he,kh as Se,Gj as Ge,Ro as Ie,GA as Te,Gx as be,Ge as Ee,Gu as Ce,Gt as De}from"./zeni-epic-state-CECAZYIg.js";import{z as C,cR as xe,K as je,a as Re,G as T,p as W,q as w,s as ye,d as N,f as we,cS as ve,j as V,at as Fe}from"./index-LzTRB_X0.js";import{n as Be}from"./mui-B_sWk5no.js";import{u as Pe}from"./useInitialThreadRequest-BRMmNSgV.js";import{M as Ue}from"./MobileAppDrawer-C6MRZ7yW.js";import Le from"./TaskListScreen-BAOvGtza.js";import"./recharts-ScPc1hFQ.js";import"./analytics-BYlEHy--.js";import"./plaid-BeX18ubU.js";import"./dnd-DNR-B7xM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CtoJzpCG.js";import"./lexical-DEMTOP18.js";import"./pdf-Bd_BBdKz.js";import"./utils-B-68Nh7i.js";import"./useAskAiCfoHostNavButtonProps-CT6wQzQG.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]="9862931e-9372-499d-a209-1e27cb52e2b6",e._sentryDebugIdIdentifier="sentry-dbid-9862931e-9372-499d-a209-1e27cb52e2b6")}catch{}})();function $e(){const e=M(),t=O(),s=C.getSignedInUser(),{cannedResponses:u,fetchState:r,saveFetchState:d}=f(o=>o.cannedResponsesState),l=c.useCallback(()=>{t(Z())},[t]),k=c.useCallback((o,h,S)=>{t(le({name:o,content:h,cannedResponseId:S}))},[t]),a=c.useCallback(o=>{t(de({cannedResponseId:o}))},[t]);if(s==null)throw Error("Can't access quick responses page without signing in...");return n.jsx(xe,{cannedResponses:u,isLoading:r==="In-Progress"||r==="Not-Started",isSaving:d==="In-Progress",onBackClick:()=>e(-1),onDelete:a,onFetch:l,onSave:k})}let z,_=[];const qe=re(function(e,t){const{location:s,taskGroupId:u}=t,r=Q(e,t.taskId),d=K(e),l=r.taskGroupId??u,k=l!=null?A(e.taskGroupState,l):void 0,a=C.getSignedInUser(),o=d.tenantId,h={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:o??""},S=X(e),{tenantEmailDomain:D}=d,b=r.recurringSourceTaskId,x=b!=null?`${V.appUrl}/${D}/tasks/${encodeURIComponent(b)}`:void 0;var G;return{taskDetailSelectorView:r,authParams:h,isZeniUser:C.isZeniUser(),userGroupList:((G=e.userGroupsState.userGroupByUserGroupId)!==z&&(z=G,_=Object.values(G)),_),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Fe.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${V.appUrl}${t.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:x,tagListView:S,taskGroupName:l!=null&&k!=null&&k.isDefault===!1?k.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map(p=>A(e.taskGroupState,p)).filter(p=>p!=null&&!p.isDeleted).map(p=>({id:p.id,name:p.name,isDefault:p.isDefault}))}},function(e,t){const{taskId:s,navigate:u,currentTenant:r,location:d,taskGroupId:l}=t,{tenantEmailDomain:k}=r;return{onSaveChangesToLocalStore:a=>{e(De({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(Ce(s,a??l))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ee(t.taskId))},onSnoozeTask:(a,o)=>{e(be(a,o))},onUnsnoozeTask:a=>{e(Te(a))},onDismissClick:()=>{if(d.state?.message==="triggerBackClick"){const a=W(d.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";u(o,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=v(k),o=w(d.state?.pathnameStackToGoBack,d.pathname);u(a,{state:{pathnameStackToGoBack:o}})}e(Ie({taskId:s}))},onDeleteTaskClick:()=>{e(Ge(s))},updateFilesEntity:a=>{e(Se({files:a}))},onDeleteFile:a=>{e(he(a))},onEditFileName:(a,o)=>{e(fe(a,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(H(!1,s))},onCreateTagClick:a=>{e(ge(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(Z())},onManageTemplatesClick:()=>{u(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}})(ve);function y(){const e=M(),t=O(),s=ne(),u=je(),{taskId:r,taskGroupId:d}=oe(),l=f(i=>K(i)),k=Pe(l?.companyId),{useFeatureGate:a}=Re(),{isFeatureEnabled:o}=a(T.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(T.isTaskVisibilityEnabled),{isFeatureEnabled:S}=a(T.isTaskCannedResponsesEnabled),{isFeatureEnabled:D}=a(T.isTaskRecurringParentEnabled),{isFeatureEnabled:b}=a(T.isTaskGroupAssigneesEnabled),[x,G]=c.useState(!1),[p,Y]=c.useState(!1),[F,J]=c.useState(!1),[B,ee]=c.useState(!1),[P,j]=c.useState(!1),I=c.useRef(!1),E=f(i=>i.taskListState.updateTasksFetchState.fetchState),U=f(i=>X(i)),L=f(i=>i.taskGroupViewState.fetchState);c.useEffect(()=>{p||(Y(!0),t(H(!1,r)))},[p,t]),c.useEffect(()=>{F||U.fetchState==="Completed"||(J(!0),t(pe()))},[F,t,U.fetchState]),c.useEffect(()=>{B||L==="Completed"||(ee(!0),t(ue()))},[B,t,L]);const ae=c.useCallback(()=>{r!=null&&(I.current=!1,t(ke([r],null,{isArchived:!1})),j(!0))},[t,r]);c.useEffect(()=>{if(P)if(E!=="In-Progress"){if(I.current){if(E==="Error")return j(!1),void(I.current=!1);if(E==="Completed"){j(!1),I.current=!1;const{tenantEmailDomain:i}=l;if(s.state?.message==="triggerBackClick"){const m=W(s.state?.pathnameStackToGoBack);e(m.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:m.newStack}})}else{const m=v(i);e(m,{state:{pathnameStackToGoBack:w(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else I.current=!0},[P,E,l,s,e]);const $=f(i=>Q(i,r)),R=$.fetchState,q=C.getSignedInUser();if(q==null)throw Error("Can't access task detail page without signing in...");if(R==="Error"&&$.error?.code===400){const{tenantEmailDomain:i}=l,m=v(i),te=w(s.state?.pathnameStackToGoBack,s.pathname);return n.jsx(ie,{to:m,state:{pathnameStackToGoBack:te}})}return n.jsxs(n.Fragment,{children:[R==="Completed"?n.jsx(ye,{analytics:N,onLoad:i=>(m=>m.trackPageLoaded(we.Event.taskDetailPage))(i)}):null,n.jsxs(Ae,{children:[n.jsx(Ue,{isAppContentDrawerOpen:x,handleDrawerToggle:i=>{G(i)}}),n.jsx(qe,{analytics:N,currentTenant:l,handleZeniLogoClick:()=>{u.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:q,navigate:e,taskGroupId:d,taskId:r,taskDetailFetchState:R,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:S,isTaskRecurringParentEnabled:D,isTaskGroupAssigneesEnabled:b})]})]})}const Ae=Be.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{j as t}from"./liveblocks-BRoLXdu-.js";import i from"./NotFoundScreen-DVKBuN7e.js";import{T as r}from"./TransactionDetailScreen-C7_imF3Y.js";import"./sentry-B_UPXuSC.js";import{o as a,p as o}from"./core-BwBLfZO1.js";import"./zeni-epic-state-5KAN0o5k.js";import"./recharts-CiU9jjGx.js";import"./index-aRVrbNiC.js";import"./mui-BBkWv1mU.js";import"./analytics-7J1CNh2i.js";import"./plaid-Gte2Ckk-.js";import"./dnd-yE3kwzv1.js";import"./stripe-DMRn4zHo.js";import"./lottie-BAjpdqbN.js";import"./lexical-CppAuKk8.js";import"./pdf-BQyDOTnR.js";import"./utils-ox49Wmvb.js";import"./useAskAiCfoHostNavButtonProps-DO0seTDc.js";import"./decodeURIComponentSafe-Cau4zUJU.js";import"./routePaths-hmakpH65.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]="8f33aac6-3389-4f99-92e2-514bb2135525",e._sentryDebugIdIdentifier="sentry-dbid-8f33aac6-3389-4f99-92e2-514bb2135525")}catch{}})();function k(){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{k as default};
1
+ import{j as t}from"./liveblocks-OUACL7Sm.js";import i from"./NotFoundScreen-BXgaohYF.js";import{T as r}from"./TransactionDetailScreen-DY5IcfRV.js";import"./sentry-COtwFETz.js";import{o as a,p as o}from"./core-CvVQwh-G.js";import"./zeni-epic-state-CECAZYIg.js";import"./recharts-ScPc1hFQ.js";import"./index-LzTRB_X0.js";import"./mui-B_sWk5no.js";import"./analytics-BYlEHy--.js";import"./plaid-BeX18ubU.js";import"./dnd-DNR-B7xM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CtoJzpCG.js";import"./lexical-DEMTOP18.js";import"./pdf-Bd_BBdKz.js";import"./utils-B-68Nh7i.js";import"./useAskAiCfoHostNavButtonProps-CT6wQzQG.js";import"./decodeURIComponentSafe-C_ttRntx.js";import"./routePaths-CCOmiobh.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]="8f33aac6-3389-4f99-92e2-514bb2135525",e._sentryDebugIdIdentifier="sentry-dbid-8f33aac6-3389-4f99-92e2-514bb2135525")}catch{}})();function k(){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{k as default};
@@ -1,4 +1,4 @@
1
- import{j as P}from"./liveblocks-BRoLXdu-.js";import{a as i}from"./sentry-B_UPXuSC.js";import{u as H,k as Je,j as S,t as fe,g as ge,h as Te,i as be,N as Qe,n as Ze}from"./core-BwBLfZO1.js";import{mV as he,eS as Q,fP as Ke,Md as et,m6 as tt,m0 as at,bn as nt,cP as Ee,bs as Ie,qk as q,Lc as W,Me as ve,Mf as oe,LC as De,jU as Ce,Mg as ke,LH as se,LI as ce,kJ as Ae,Ic as ie,L6 as $,jO as Ue,jM as xe,jY as ot,mI as st,Mh as ct,Mi as it,ur as J,jT as Pe,Hx as we,cU as rt,cV as lt,Mj as dt,L5 as ut,Mk as mt,un as pt,Ml as ft,Mm as ht,Mn as yt,Mo as St,Mp as gt,jX as Tt,Mq as bt,Mr as Et,L7 as It,Ms as vt,Mt as Dt,Mu as Ct,Hr as kt,Hh as At,HG as Ut,jZ as xt,Id as ye,mN as Pt}from"./zeni-epic-state-5KAN0o5k.js";import{a as Y,G as w,z as _e,aN as Le,m as wt,X as _t,aO as Lt,w as Ft,p as ae,I as Vt,aP as Ot,q as ne,$ as Bt,aQ as Rt,d as Fe,aR as zt,at as Nt,a3 as te}from"./index-aRVrbNiC.js";import{n as Mt,S as jt,D as Gt}from"./mui-BBkWv1mU.js";import{u as $t}from"./useAskAiCfoHostNavButtonProps-DO0seTDc.js";import{d as Ve}from"./decodeURIComponentSafe-Cau4zUJU.js";import{h as Oe,c as Be,g as Ht,e as qt}from"./routePaths-hmakpH65.js";import{t as Wt}from"./utils-ox49Wmvb.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]="bf9d082e-454b-453c-ae79-edf65849620a",t._sentryDebugIdIdentifier="sentry-dbid-bf9d082e-454b-453c-ae79-edf65849620a")}catch{}})();function Yt(t=!0){const e=H(),s=Je(),{useFeatureGate:a}=Y(),{isFeatureEnabled:n}=a(w.isCreateTransferEntryFromExpenseEnabled);i.useEffect(()=>{if(!t||n!==!0)return;const o=c=>{const r=s.getState().createTransferEntryState.transferAccountsByType[c].fetchState;return r!=="In-Progress"&&r!=="Completed"};o("transferEntryEligible")&&e(he({kind:"transferEntryEligible"})),o("creditCardOnlyEligible")&&e(he({kind:"creditCardOnlyEligible"}))},[t,n,e,s])}function Xt(t,e){const s=function(){const r=H(),[p,g]=i.useState(!1),[A,y]=i.useState(null),[m,U]=i.useState(null),{useDynamicConfig:T}=Y(),{configValue:f,isDynamicConfigLoading:C}=T("transaction_categorization_config"),v=!C&&f?.capitalization_enabled===!0,k=S(h=>Q(h)),b=k.companyId,x=S(h=>Ke(h.companyState,k.companyId)?.company.companyLocaleInfo?.currencySymbol??"$"),{capitalizableAccounts:_,capitalizableAccountOverrides:O,dismissedAccounts:N}=S(h=>{const E=h.tenantState.currentTenantId,u=E!=null?h.tenantState.tenantsById[E]:void 0;return{capitalizableAccounts:u?.capitalizableAccounts??null,capitalizableAccountOverrides:u?.capitalizableAccountOverrides??null,dismissedAccounts:u?.capitalizationOnboardingDismissedAccounts??null}},fe),M=i.useRef(_);M.current=_;const B=i.useRef(O);B.current=O;const L=i.useRef(N);L.current=N;const R=S(h=>et(h.accountState),fe),I=i.useMemo(()=>{const h={};for(const E of R)E.accountId!=null&&E.accountName!=null&&(h[E.accountId]=E.accountName);return h},[R]),l=m!=null?I[m]??null:null,j=i.useCallback(h=>{if(!v)return;const E=M.current;if(E==null)return;const u=E.accounts??[],G=new Set(h),Z=B.current??{},X=L.current;for(const z of u)if(G.has(z.accountId)&&Z[z.accountId]==null&&X?.[z.accountId]==null)return y(z.classificationType),U(z.accountId),void g(!0)},[v]),D=i.useCallback((h,E)=>{r(tt(b,h,E,!0)),g(!1),y(null),U(null)},[r,b]),F=i.useCallback(()=>{m!=null&&(r(at(b,m)),g(!1),y(null),U(null))},[r,b,m]);return{showPopup:p&&v,popupType:A,popupAccountId:m,popupAccountName:l,currencySymbol:x,checkAndShowPopup:j,handleSubmit:D,handleDismiss:F}}(),a=i.useRef(void 0),n=i.useRef([]),o=i.useRef(s.checkAndShowPopup);o.current=s.checkAndShowPopup;const c=i.useRef(e);return c.current=e,i.useEffect(()=>{t==="In-Progress"&&(n.current=c.current()),t==="Completed"&&a.current==="In-Progress"&&n.current.length>0&&(o.current(n.current),n.current=[]),a.current=t},[t]),s}const re=()=>{const t=_e.getSignedInUser(),{useFeatureGate:e}=Y(),{isFeatureEnabled:s}=e(w.isChainOfThoughtEnabled);return i.useMemo(()=>nt(t)&&s,[t,s])};function Re(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 ha(t,e){const s=H(),{useFeatureGate:a,useDynamicConfig:n}=Y(),o=S(u=>Q(u)),c=o.userRole.includes("charge_card_user")||o.userRole.includes("charge_card_admin"),r=o.userRole!=null&&Ee(o.userRole),p=o.userRole!=null&&Ie(o.userRole),{isFeatureEnabled:g}=a(w.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:A}=a(w.isExpenseAutomationEnabled),{configValue:y}=n(Le.enableUncategorizedExpenseCategory),m=y?.uncategorized_expense_category_enabled===!0,U=re(),T=i.useMemo(()=>({id:t,type:q(e)}),[t,e]),f=S(u=>W(u,T)),C=f?.transactionDetailUpdateStatus?.fetchState,v=f?.transactionDetailLocalData?.lineItemById,k=S(u=>{const G=W(u,T)?.transactionDetailLocalData.vendorUpdates?.id;return G==null?"Not-Started":u.transactionVendorViewState.editVendorStateById[G]?.saveStatus.fetchState??"Not-Started"}),b=i.useMemo(()=>f?.fetchState==="Completed"?Re(f?.transaction):void 0,[f?.fetchState,f?.transaction]),x=S(u=>{if(b!=null)return ve(u.customerIncomeState,u.vendorExpenseState,u.trendState,b,"month")}),_=S(u=>oe(u)),O=S(u=>{if(b!=null)return De(u.trendWithTransactionsState,b,"TransactionDetail")}),N=o.company?.companyInfo.firstMonthOfFY??1,M=S(u=>Ce(u.accountState,u.accountListState,"accountList")),[B,L]=i.useState(!1),[R,I]=i.useState(!1),[l,j]=i.useState(!1);i.useEffect(()=>{L(!1),I(!1),j(!1)},[t,e]);const D=i.useCallback(()=>{L(!1),I(!1)},[]),[F,h]=i.useState(!1),E=O?.selectedPeriod?.timePeriod;return i.useEffect(()=>{l||f==null||f.transaction==null||(s(ke({id:f.transaction.id,type:f.transaction.type})),j(!0)),b!=null&&(!c||r&&p===!1)&&(B?R||x==null||(I(!0),s(ie(b,"TransactionDetail",{timeframe:"month",timePeriod:E??x}))):(s(se()),s(ce()),L(!0),s(Ae(b))))},[s,l,f?.fetchState,f?.transaction,b,c,r,p,B,R,x,E]),i.useEffect(()=>{_.newVendorState?.vendorDetailLocalData?.vendorName!=null?h(!0):h(!1)},[_.newVendorState?.vendorDetailLocalData?.vendorName]),i.useEffect(()=>()=>{s($("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:c,isUserHasDashboardAccess:r,isUserHasInvestorOrBankerAccess:p,isVendorBulkUpdateOnTransactionEnabled:g,isExpenseAutomationEnabled:A,isUncategorizedExpenseCategoryEnabled:m,isChainOfThoughtEnabled:U,selectedTransaction:T,transactionDetail:f,rawDetailSaveStatus:C,rawDetailLineItemById:v,vendorSaveStatus:k,tranEntity:b,defaultTrendTransactionTimePeriod:x,vendorViewDetails:_,uiState:O,firstMonthOfFY:N,uncategorizedAccounts:M,resetTrendIsFetchedStates:D,isCreateVendorDrawerOpen:F,setIsCreateVendorDrawerOpen:h}}const Jt={overlayWidth:new Ft(100,100,58)},Qt=({isOpen:t,onSaveVendor:e,onSaveSuccess:s,onCancel:a,vendorViewDetails:n})=>{const o=wt(),c=_t(),r=H(),p=S(y=>oe(y)),g=()=>{a()},A={vendorDetailView:n??p,onSaveSuccess:()=>{r(xe()),r(ot("Not-Started")),s()},onSaveVendor:e,onCancelClick:g,saveVendorDetailLocalData:y=>{r(Ue({vendorId:void 0,localData:y}))}};return P.jsx(Gt,{anchor:"right",open:t,PaperProps:{style:{width:Jt.overlayWidth.valuePercentage(c),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:g,children:P.jsx(Zt,{onClick:y=>y.stopPropagation(),children:P.jsx(Lt,{...A})})})},Zt=Mt(jt)`
1
+ import{j as P}from"./liveblocks-OUACL7Sm.js";import{a as i}from"./sentry-COtwFETz.js";import{u as H,k as Je,j as S,t as fe,g as ge,h as Te,i as be,N as Qe,n as Ze}from"./core-CvVQwh-G.js";import{mV as he,eS as Q,fP as Ke,Md as et,m6 as tt,m0 as at,bn as nt,cP as Ee,bs as Ie,qk as q,Lc as W,Me as ve,Mf as oe,LC as De,jU as Ce,Mg as ke,LH as se,LI as ce,kJ as Ae,Ic as ie,L6 as $,jO as Ue,jM as xe,jY as ot,mI as st,Mh as ct,Mi as it,ur as J,jT as Pe,Hx as we,cU as rt,cV as lt,Mj as dt,L5 as ut,Mk as mt,un as pt,Ml as ft,Mm as ht,Mn as yt,Mo as St,Mp as gt,jX as Tt,Mq as bt,Mr as Et,L7 as It,Ms as vt,Mt as Dt,Mu as Ct,Hr as kt,Hh as At,HG as Ut,jZ as xt,Id as ye,mN as Pt}from"./zeni-epic-state-CECAZYIg.js";import{a as Y,G as w,z as _e,aN as Le,m as wt,X as _t,aO as Lt,w as Ft,p as ae,I as Vt,aP as Ot,q as ne,$ as Bt,aQ as Rt,d as Fe,aR as zt,at as Nt,a3 as te}from"./index-LzTRB_X0.js";import{n as Mt,S as jt,D as Gt}from"./mui-B_sWk5no.js";import{u as $t}from"./useAskAiCfoHostNavButtonProps-CT6wQzQG.js";import{d as Ve}from"./decodeURIComponentSafe-C_ttRntx.js";import{h as Oe,c as Be,g as Ht,e as qt}from"./routePaths-CCOmiobh.js";import{t as Wt}from"./utils-B-68Nh7i.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]="bf9d082e-454b-453c-ae79-edf65849620a",t._sentryDebugIdIdentifier="sentry-dbid-bf9d082e-454b-453c-ae79-edf65849620a")}catch{}})();function Yt(t=!0){const e=H(),s=Je(),{useFeatureGate:a}=Y(),{isFeatureEnabled:n}=a(w.isCreateTransferEntryFromExpenseEnabled);i.useEffect(()=>{if(!t||n!==!0)return;const o=c=>{const r=s.getState().createTransferEntryState.transferAccountsByType[c].fetchState;return r!=="In-Progress"&&r!=="Completed"};o("transferEntryEligible")&&e(he({kind:"transferEntryEligible"})),o("creditCardOnlyEligible")&&e(he({kind:"creditCardOnlyEligible"}))},[t,n,e,s])}function Xt(t,e){const s=function(){const r=H(),[p,g]=i.useState(!1),[A,y]=i.useState(null),[m,U]=i.useState(null),{useDynamicConfig:T}=Y(),{configValue:f,isDynamicConfigLoading:C}=T("transaction_categorization_config"),v=!C&&f?.capitalization_enabled===!0,k=S(h=>Q(h)),b=k.companyId,x=S(h=>Ke(h.companyState,k.companyId)?.company.companyLocaleInfo?.currencySymbol??"$"),{capitalizableAccounts:_,capitalizableAccountOverrides:O,dismissedAccounts:N}=S(h=>{const E=h.tenantState.currentTenantId,u=E!=null?h.tenantState.tenantsById[E]:void 0;return{capitalizableAccounts:u?.capitalizableAccounts??null,capitalizableAccountOverrides:u?.capitalizableAccountOverrides??null,dismissedAccounts:u?.capitalizationOnboardingDismissedAccounts??null}},fe),M=i.useRef(_);M.current=_;const B=i.useRef(O);B.current=O;const L=i.useRef(N);L.current=N;const R=S(h=>et(h.accountState),fe),I=i.useMemo(()=>{const h={};for(const E of R)E.accountId!=null&&E.accountName!=null&&(h[E.accountId]=E.accountName);return h},[R]),l=m!=null?I[m]??null:null,j=i.useCallback(h=>{if(!v)return;const E=M.current;if(E==null)return;const u=E.accounts??[],G=new Set(h),Z=B.current??{},X=L.current;for(const z of u)if(G.has(z.accountId)&&Z[z.accountId]==null&&X?.[z.accountId]==null)return y(z.classificationType),U(z.accountId),void g(!0)},[v]),D=i.useCallback((h,E)=>{r(tt(b,h,E,!0)),g(!1),y(null),U(null)},[r,b]),F=i.useCallback(()=>{m!=null&&(r(at(b,m)),g(!1),y(null),U(null))},[r,b,m]);return{showPopup:p&&v,popupType:A,popupAccountId:m,popupAccountName:l,currencySymbol:x,checkAndShowPopup:j,handleSubmit:D,handleDismiss:F}}(),a=i.useRef(void 0),n=i.useRef([]),o=i.useRef(s.checkAndShowPopup);o.current=s.checkAndShowPopup;const c=i.useRef(e);return c.current=e,i.useEffect(()=>{t==="In-Progress"&&(n.current=c.current()),t==="Completed"&&a.current==="In-Progress"&&n.current.length>0&&(o.current(n.current),n.current=[]),a.current=t},[t]),s}const re=()=>{const t=_e.getSignedInUser(),{useFeatureGate:e}=Y(),{isFeatureEnabled:s}=e(w.isChainOfThoughtEnabled);return i.useMemo(()=>nt(t)&&s,[t,s])};function Re(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 ha(t,e){const s=H(),{useFeatureGate:a,useDynamicConfig:n}=Y(),o=S(u=>Q(u)),c=o.userRole.includes("charge_card_user")||o.userRole.includes("charge_card_admin"),r=o.userRole!=null&&Ee(o.userRole),p=o.userRole!=null&&Ie(o.userRole),{isFeatureEnabled:g}=a(w.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:A}=a(w.isExpenseAutomationEnabled),{configValue:y}=n(Le.enableUncategorizedExpenseCategory),m=y?.uncategorized_expense_category_enabled===!0,U=re(),T=i.useMemo(()=>({id:t,type:q(e)}),[t,e]),f=S(u=>W(u,T)),C=f?.transactionDetailUpdateStatus?.fetchState,v=f?.transactionDetailLocalData?.lineItemById,k=S(u=>{const G=W(u,T)?.transactionDetailLocalData.vendorUpdates?.id;return G==null?"Not-Started":u.transactionVendorViewState.editVendorStateById[G]?.saveStatus.fetchState??"Not-Started"}),b=i.useMemo(()=>f?.fetchState==="Completed"?Re(f?.transaction):void 0,[f?.fetchState,f?.transaction]),x=S(u=>{if(b!=null)return ve(u.customerIncomeState,u.vendorExpenseState,u.trendState,b,"month")}),_=S(u=>oe(u)),O=S(u=>{if(b!=null)return De(u.trendWithTransactionsState,b,"TransactionDetail")}),N=o.company?.companyInfo.firstMonthOfFY??1,M=S(u=>Ce(u.accountState,u.accountListState,"accountList")),[B,L]=i.useState(!1),[R,I]=i.useState(!1),[l,j]=i.useState(!1);i.useEffect(()=>{L(!1),I(!1),j(!1)},[t,e]);const D=i.useCallback(()=>{L(!1),I(!1)},[]),[F,h]=i.useState(!1),E=O?.selectedPeriod?.timePeriod;return i.useEffect(()=>{l||f==null||f.transaction==null||(s(ke({id:f.transaction.id,type:f.transaction.type})),j(!0)),b!=null&&(!c||r&&p===!1)&&(B?R||x==null||(I(!0),s(ie(b,"TransactionDetail",{timeframe:"month",timePeriod:E??x}))):(s(se()),s(ce()),L(!0),s(Ae(b))))},[s,l,f?.fetchState,f?.transaction,b,c,r,p,B,R,x,E]),i.useEffect(()=>{_.newVendorState?.vendorDetailLocalData?.vendorName!=null?h(!0):h(!1)},[_.newVendorState?.vendorDetailLocalData?.vendorName]),i.useEffect(()=>()=>{s($("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:c,isUserHasDashboardAccess:r,isUserHasInvestorOrBankerAccess:p,isVendorBulkUpdateOnTransactionEnabled:g,isExpenseAutomationEnabled:A,isUncategorizedExpenseCategoryEnabled:m,isChainOfThoughtEnabled:U,selectedTransaction:T,transactionDetail:f,rawDetailSaveStatus:C,rawDetailLineItemById:v,vendorSaveStatus:k,tranEntity:b,defaultTrendTransactionTimePeriod:x,vendorViewDetails:_,uiState:O,firstMonthOfFY:N,uncategorizedAccounts:M,resetTrendIsFetchedStates:D,isCreateVendorDrawerOpen:F,setIsCreateVendorDrawerOpen:h}}const Jt={overlayWidth:new Ft(100,100,58)},Qt=({isOpen:t,onSaveVendor:e,onSaveSuccess:s,onCancel:a,vendorViewDetails:n})=>{const o=wt(),c=_t(),r=H(),p=S(y=>oe(y)),g=()=>{a()},A={vendorDetailView:n??p,onSaveSuccess:()=>{r(xe()),r(ot("Not-Started")),s()},onSaveVendor:e,onCancelClick:g,saveVendorDetailLocalData:y=>{r(Ue({vendorId:void 0,localData:y}))}};return P.jsx(Gt,{anchor:"right",open:t,PaperProps:{style:{width:Jt.overlayWidth.valuePercentage(c),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:g,children:P.jsx(Zt,{onClick:y=>y.stopPropagation(),children:P.jsx(Lt,{...A})})})},Zt=Mt(jt)`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  flex-direction: column;
@@ -1 +1 @@
1
- import{j as s}from"./liveblocks-BRoLXdu-.js";import{h as K,g as H,u as Q,i as W,j as h,N as G,n as Z,o as Ye,p as j}from"./core-BwBLfZO1.js";import{eS as U,p$ as X,j6 as u,PA as ee,I3 as De,bo as le,PB as ve,jJ as te,LE as ae,PC as ue,PD as Ee,bE as P,H$ as ye,PE as be,PF as me,PG as je,I2 as Ae,PH as xe,PI as pe,PJ as Me,PK as ge,PL as Le,PM as Ce,PN as fe,Jg as Be}from"./zeni-epic-state-5KAN0o5k.js";import{D as de,a as ne,G as q,d as w,ce,q as N,p as oe,Y as Fe,k as Oe}from"./index-aRVrbNiC.js";import"./mui-BBkWv1mU.js";import{a as g}from"./sentry-B_UPXuSC.js";import{w as se}from"./withTransactionSidePanel-B6uMMn0i.js";import{p as ie,c as re}from"./routePaths-hmakpH65.js";import{u as ze}from"./utils-ox49Wmvb.js";import{d as v}from"./decodeURIComponentSafe-Cau4zUJU.js";import{Z as we}from"./ZeniAccountStatementScreen-BrO9jMz2.js";import"./recharts-CiU9jjGx.js";import"./analytics-7J1CNh2i.js";import"./plaid-Gte2Ckk-.js";import"./dnd-yE3kwzv1.js";import"./stripe-DMRn4zHo.js";import"./lottie-BAjpdqbN.js";import"./lexical-CppAuKk8.js";import"./pdf-BQyDOTnR.js";import"./useAskAiCfoHostNavButtonProps-DO0seTDc.js";import"./TransactionDetailScreen-C7_imF3Y.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]="3360201c-77fd-4e77-94da-c68ee1873aae",a._sentryDebugIdIdentifier="sentry-dbid-3360201c-77fd-4e77-94da-c68ee1873aae")}catch{}})();const Ge=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],V=a=>ze(a),$e=Z(function(a,e){const t=ve(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,V(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=de.getLocalizedStrings(),l=V(e.selectedAccount.tranListType),m=Je(t,n,c,l,e.bookCloseDate);w.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(ue({uiState:{dateRange:m},type:V(e.selectedAccount.tranListType)})),a(De(l,u(m),!1,l==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(u(m))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=N(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ue({uiState:{scrollYOffset:t},type:V(e.selectedAccount.tranListType)}))}}})(ce),J=se(function({...a}){const e=K(),t=H(),n=Q(),c=t.pathname.split("/").find(r=>Ge.includes(r)),o=c??"uncategorized-expense",{tenantEmailDomain:l}=W(),m=de.getLocalizedStrings(),{accountType:S,title:T,subTitle:D}=_e(o),y="month",I=h(r=>U(r)),p=I.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:A}=ne(),{isFeatureEnabled:k}=A(q.isProjectsTransactionsEnabled),x=h(r=>X(r))&&k,{dataAvailable:C,initialTimeframeTick:E}=Re(o,p,I.bookCloseDate),[B,b]=g.useState(!1),[F,O]=g.useState(void 0),f=g.useMemo(()=>{const r=u(E);return{tranListType:o,accountType:ee(S),title:T,subTitle:D,timeframe:y,period:r}},[o,y,S,C]);g.useEffect(()=>{if(!B&&f!=null){b(!0),w.trackTransactionList(void 0,void 0,void 0,f.title);const r=V(f.tranListType);n(De(r,f.period,!0,r==="missingReceipts"?m.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[B,f,n]);let M=f;return f!=null&&F!=null&&(M={...f,period:F}),c==null||M==null?s.jsx(G,{to:"../"}):s.jsx($e,{firstMonthOfFY:p,tenantEmailDomain:l,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:C,navigate:e,showProjectField:x,selectedAccount:M,referrerType:o,bookCloseDate:I.bookCloseDate,onSelectedTimePeriodChange:r=>O(r),...a})}),_e=a=>{let e="",t="";const n=de.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.uncategorizedTransactionList.expense.title;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.uncategorizedTransactionList.missingReceipt.title}return{accountType:e,title:t,subTitle:""}},Re=(a,e,t)=>{const n=le();let c=le().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:ie(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Je=(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},Ve=Z(function(a,e){const t=be(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:ae(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??he();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)}`),w.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(ye(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=N(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(ce),qe=se(function({referrerType:a,...e}){const t=K(),n=H(),c=Q(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,classIdEncoded:S,timeframe:T,startDate:D,endDate:y,titleEncoded:I}=W(),p=v(l??""),A=v(m??""),k=v(S??""),x=v(I??""),C=h(d=>Ee(d.transactionListState,A,p,k)),[E,B]=g.useState(!1),[b,F]=g.useState(void 0),O=h(d=>U(d)),f=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=ne(),{isFeatureEnabled:r}=M(q.isProjectsTransactionsEnabled),$=h(d=>X(d))&&r;let i;const z=Ne(p,A,k,T,D,y,x);if(z){const d={startDate:P(D,"YYYY-MM-DD"),endDate:P(y,"YYYY-MM-DD")},_=He(C?.dateRange,d);i={accountId:A,accountType:ee(p),classId:k,title:x,timeframe:T,period:_}}g.useEffect(()=>{E||i==null||(B(!0),w.trackTransactionList(i.accountId,void 0,a,i.title),c(ye(i.accountId,i.accountType,i.classId,i.period)))},[E,i,c]);let L=i;i!=null&&b!=null&&(L={...i,period:b});const R=[l,m,S,T,D,y,I].filter(d=>d!=null);return z&&L!=null?s.jsx(Ve,{firstMonthOfFY:f,tenantEmailDomain:o,location:n,navigate:t,showProjectField:$,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>F(d),...e}):s.jsx(G,{to:he(R.length)})}),he=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ne=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&P(c,"YYYY-MM-DD").isValid()&&P(o,"YYYY-MM-DD").isValid()&&l!=null,He=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),Ue=Z(function(a,e){const t=xe(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:ae(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Se();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)}`),w.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(Ae(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=N(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}})(ce),Ke=se(function({referrerType:a,...e}){const t=K(),n=H(),c=Q(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,projectIdEncoded:S,timeframe:T,startDate:D,endDate:y,titleEncoded:I}=W(),p=v(l??""),A=v(m??""),k=v(S??""),x=v(I??""),C=h(d=>je(d.transactionListState,A,p,k)),[E,B]=g.useState(!1),[b,F]=g.useState(void 0),O=h(d=>U(d)),f=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=ne(),{isFeatureEnabled:r}=M(q.isProjectsTransactionsEnabled),$=h(d=>X(d))&&r;let i;const z=Qe(p,A,k,T,D,y,x);if(z){const d={startDate:P(D,"YYYY-MM-DD"),endDate:P(y,"YYYY-MM-DD")},_=We(C?.dateRange,d);i={accountId:A,accountType:ee(p),projectId:k,title:x,timeframe:T,period:_}}g.useEffect(()=>{E||i==null||(B(!0),w.trackTransactionList(i.accountId,void 0,a,i.title),c(Ae(i.accountId,i.accountType,i.projectId,i.period)))},[E,i,c]);let L=i;i!=null&&b!=null&&(L={...i,period:b});const R=[l,m,S,T,D,y,I].filter(d=>d!=null);return z&&L!=null?s.jsx(Ue,{firstMonthOfFY:f,tenantEmailDomain:o,location:n,navigate:t,showProjectField:$,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>F(d),...e}):s.jsx(G,{to:Se(R.length)})}),Se=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Qe=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&P(c,"YYYY-MM-DD").isValid()&&P(o,"YYYY-MM-DD").isValid()&&l!=null,We=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),Ze=Z(function(a,e){const t=Le(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&Ce(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:te(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ie();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)}`),w.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=N(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=tt(e.tenantEmailDomain),n=N(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ce),Te=se(function({referrerType:a,...e}){const t=K(),n=H(),c=Q(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,timeframe:S,startDate:T,endDate:D,titleEncoded:y,excludeSubAccounts:I}=W(),p=v(l??""),A=v(m??""),k=v(y??""),x=!(I!=null&&I==="exclude_subaccounts"),C=h(Y=>Me(Y.transactionListState,A,p)),[E,B]=g.useState(!1),[b,F]=g.useState(void 0),O=h(Y=>U(Y)),f=O.company?.featuresActivationInfo.connectedAccountProvider==="unit",M=O.company?.companyInfo.firstMonthOfFY??1;let r;const $=Xe(p,A,S,T,D,k);if($){const Y={startDate:P(T,"YYYY-MM-DD"),endDate:P(D,"YYYY-MM-DD")},Pe=et(C?.dateRange,Y);r={accountId:A,accountType:ee(p),title:k,timeframe:S,period:Pe}}let i=r;r!=null&&b!=null&&(i={...r,period:b});const{useFeatureGate:z}=ne(),{isFeatureEnabled:L}=z(q.isTransactionCommentingEnabled),{isFeatureEnabled:R}=z(q.isProjectsTransactionsEnabled),d=h(Y=>X(Y))&&R,{areTenantIdsInSync:_}=Fe();g.useEffect(()=>{!E&&r!=null&&_&&(B(!0),w.trackTransactionList(r.accountId,void 0,a,r.title),c(ge(r.accountId,r.accountType,r.period,void 0,!1,x)))},[E,r,c,_]);const ke=[l,m,S,T,D,y].filter(Y=>Y!=null);return $&&i!=null?s.jsx(Ze,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:f,isTransactionCommentingEnabled:L,showProjectField:d,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:Y=>F(Y),...e}):s.jsx(G,{to:Ie(ke.length)})}),Ie=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Xe=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&P(n,"YYYY-MM-DD").isValid()&&P(c,"YYYY-MM-DD").isValid()&&o!=null,et=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),tt=a=>`/${a}/transactions/${Be}/statements`;function kt(){const a=H().state?.referrer,e=h(n=>n.expenseAutomationViewState.selectedPeriodByTenantId)[h(n=>U(n)).tenantId],t=Oe();return s.jsxs(Ye,{children:[s.jsx(j,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/zeni-clearing-account/statements",element:s.jsx(we,{})}),s.jsx(j,{path:"/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/uncategorized-income/*",element:s.jsx(J,{})}),s.jsx(j,{path:"/uncategorized-expense/*",element:t?s.jsx(G,{to:`../../month_end_close_checks/review/transaction_categorization/${e.month}-${e.year}`}):s.jsx(J,{})}),s.jsx(j,{path:"/miscategorized-income/*",element:s.jsx(J,{})}),s.jsx(j,{path:"/miscategorized-expense/*",element:t?s.jsx(G,{to:`../../month_end_close_checks/review/transaction_categorization/${e.month}-${e.year}`}):s.jsx(J,{})}),s.jsx(j,{path:"/missing-receipts/*",element:t?s.jsx(G,{to:`../../month_end_close_checks/review/missing_receipts/${e.month}-${e.year}`}):s.jsx(J,{})}),s.jsx(j,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(qe,{referrerType:a})}),s.jsx(j,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Ke,{referrerType:a})})]})}export{kt as default};
1
+ import{j as s}from"./liveblocks-OUACL7Sm.js";import{h as K,g as H,u as Q,i as W,j as h,N as G,n as Z,o as Ye,p as j}from"./core-CvVQwh-G.js";import{eS as U,p$ as X,j6 as u,PA as ee,I3 as De,bo as le,PB as ve,jJ as te,LE as ae,PC as ue,PD as Ee,bE as P,H$ as ye,PE as be,PF as me,PG as je,I2 as Ae,PH as xe,PI as pe,PJ as Me,PK as ge,PL as Le,PM as Ce,PN as fe,Jg as Be}from"./zeni-epic-state-CECAZYIg.js";import{D as de,a as ne,G as q,d as w,ce,q as N,p as oe,Y as Fe,k as Oe}from"./index-LzTRB_X0.js";import"./mui-B_sWk5no.js";import{a as g}from"./sentry-COtwFETz.js";import{w as se}from"./withTransactionSidePanel-CNv0kM7W.js";import{p as ie,c as re}from"./routePaths-CCOmiobh.js";import{u as ze}from"./utils-B-68Nh7i.js";import{d as v}from"./decodeURIComponentSafe-C_ttRntx.js";import{Z as we}from"./ZeniAccountStatementScreen-CyycwdN8.js";import"./recharts-ScPc1hFQ.js";import"./analytics-BYlEHy--.js";import"./plaid-BeX18ubU.js";import"./dnd-DNR-B7xM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CtoJzpCG.js";import"./lexical-DEMTOP18.js";import"./pdf-Bd_BBdKz.js";import"./useAskAiCfoHostNavButtonProps-CT6wQzQG.js";import"./TransactionDetailScreen-DY5IcfRV.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]="3360201c-77fd-4e77-94da-c68ee1873aae",a._sentryDebugIdIdentifier="sentry-dbid-3360201c-77fd-4e77-94da-c68ee1873aae")}catch{}})();const Ge=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],V=a=>ze(a),$e=Z(function(a,e){const t=ve(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,V(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=de.getLocalizedStrings(),l=V(e.selectedAccount.tranListType),m=Je(t,n,c,l,e.bookCloseDate);w.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(ue({uiState:{dateRange:m},type:V(e.selectedAccount.tranListType)})),a(De(l,u(m),!1,l==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(u(m))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=N(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ue({uiState:{scrollYOffset:t},type:V(e.selectedAccount.tranListType)}))}}})(ce),J=se(function({...a}){const e=K(),t=H(),n=Q(),c=t.pathname.split("/").find(r=>Ge.includes(r)),o=c??"uncategorized-expense",{tenantEmailDomain:l}=W(),m=de.getLocalizedStrings(),{accountType:S,title:T,subTitle:D}=_e(o),y="month",I=h(r=>U(r)),p=I.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:A}=ne(),{isFeatureEnabled:k}=A(q.isProjectsTransactionsEnabled),x=h(r=>X(r))&&k,{dataAvailable:C,initialTimeframeTick:E}=Re(o,p,I.bookCloseDate),[B,b]=g.useState(!1),[F,O]=g.useState(void 0),f=g.useMemo(()=>{const r=u(E);return{tranListType:o,accountType:ee(S),title:T,subTitle:D,timeframe:y,period:r}},[o,y,S,C]);g.useEffect(()=>{if(!B&&f!=null){b(!0),w.trackTransactionList(void 0,void 0,void 0,f.title);const r=V(f.tranListType);n(De(r,f.period,!0,r==="missingReceipts"?m.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[B,f,n]);let M=f;return f!=null&&F!=null&&(M={...f,period:F}),c==null||M==null?s.jsx(G,{to:"../"}):s.jsx($e,{firstMonthOfFY:p,tenantEmailDomain:l,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:C,navigate:e,showProjectField:x,selectedAccount:M,referrerType:o,bookCloseDate:I.bookCloseDate,onSelectedTimePeriodChange:r=>O(r),...a})}),_e=a=>{let e="",t="";const n=de.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.uncategorizedTransactionList.expense.title;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.uncategorizedTransactionList.missingReceipt.title}return{accountType:e,title:t,subTitle:""}},Re=(a,e,t)=>{const n=le();let c=le().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:ie(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Je=(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},Ve=Z(function(a,e){const t=be(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:ae(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??he();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)}`),w.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(ye(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=N(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(ce),qe=se(function({referrerType:a,...e}){const t=K(),n=H(),c=Q(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,classIdEncoded:S,timeframe:T,startDate:D,endDate:y,titleEncoded:I}=W(),p=v(l??""),A=v(m??""),k=v(S??""),x=v(I??""),C=h(d=>Ee(d.transactionListState,A,p,k)),[E,B]=g.useState(!1),[b,F]=g.useState(void 0),O=h(d=>U(d)),f=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=ne(),{isFeatureEnabled:r}=M(q.isProjectsTransactionsEnabled),$=h(d=>X(d))&&r;let i;const z=Ne(p,A,k,T,D,y,x);if(z){const d={startDate:P(D,"YYYY-MM-DD"),endDate:P(y,"YYYY-MM-DD")},_=He(C?.dateRange,d);i={accountId:A,accountType:ee(p),classId:k,title:x,timeframe:T,period:_}}g.useEffect(()=>{E||i==null||(B(!0),w.trackTransactionList(i.accountId,void 0,a,i.title),c(ye(i.accountId,i.accountType,i.classId,i.period)))},[E,i,c]);let L=i;i!=null&&b!=null&&(L={...i,period:b});const R=[l,m,S,T,D,y,I].filter(d=>d!=null);return z&&L!=null?s.jsx(Ve,{firstMonthOfFY:f,tenantEmailDomain:o,location:n,navigate:t,showProjectField:$,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>F(d),...e}):s.jsx(G,{to:he(R.length)})}),he=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ne=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&P(c,"YYYY-MM-DD").isValid()&&P(o,"YYYY-MM-DD").isValid()&&l!=null,He=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),Ue=Z(function(a,e){const t=xe(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:ae(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Se();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)}`),w.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(Ae(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=N(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}})(ce),Ke=se(function({referrerType:a,...e}){const t=K(),n=H(),c=Q(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,projectIdEncoded:S,timeframe:T,startDate:D,endDate:y,titleEncoded:I}=W(),p=v(l??""),A=v(m??""),k=v(S??""),x=v(I??""),C=h(d=>je(d.transactionListState,A,p,k)),[E,B]=g.useState(!1),[b,F]=g.useState(void 0),O=h(d=>U(d)),f=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=ne(),{isFeatureEnabled:r}=M(q.isProjectsTransactionsEnabled),$=h(d=>X(d))&&r;let i;const z=Qe(p,A,k,T,D,y,x);if(z){const d={startDate:P(D,"YYYY-MM-DD"),endDate:P(y,"YYYY-MM-DD")},_=We(C?.dateRange,d);i={accountId:A,accountType:ee(p),projectId:k,title:x,timeframe:T,period:_}}g.useEffect(()=>{E||i==null||(B(!0),w.trackTransactionList(i.accountId,void 0,a,i.title),c(Ae(i.accountId,i.accountType,i.projectId,i.period)))},[E,i,c]);let L=i;i!=null&&b!=null&&(L={...i,period:b});const R=[l,m,S,T,D,y,I].filter(d=>d!=null);return z&&L!=null?s.jsx(Ue,{firstMonthOfFY:f,tenantEmailDomain:o,location:n,navigate:t,showProjectField:$,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>F(d),...e}):s.jsx(G,{to:Se(R.length)})}),Se=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Qe=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&P(c,"YYYY-MM-DD").isValid()&&P(o,"YYYY-MM-DD").isValid()&&l!=null,We=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),Ze=Z(function(a,e){const t=Le(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&Ce(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:te(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ie();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)}`),w.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=N(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=tt(e.tenantEmailDomain),n=N(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ce),Te=se(function({referrerType:a,...e}){const t=K(),n=H(),c=Q(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,timeframe:S,startDate:T,endDate:D,titleEncoded:y,excludeSubAccounts:I}=W(),p=v(l??""),A=v(m??""),k=v(y??""),x=!(I!=null&&I==="exclude_subaccounts"),C=h(Y=>Me(Y.transactionListState,A,p)),[E,B]=g.useState(!1),[b,F]=g.useState(void 0),O=h(Y=>U(Y)),f=O.company?.featuresActivationInfo.connectedAccountProvider==="unit",M=O.company?.companyInfo.firstMonthOfFY??1;let r;const $=Xe(p,A,S,T,D,k);if($){const Y={startDate:P(T,"YYYY-MM-DD"),endDate:P(D,"YYYY-MM-DD")},Pe=et(C?.dateRange,Y);r={accountId:A,accountType:ee(p),title:k,timeframe:S,period:Pe}}let i=r;r!=null&&b!=null&&(i={...r,period:b});const{useFeatureGate:z}=ne(),{isFeatureEnabled:L}=z(q.isTransactionCommentingEnabled),{isFeatureEnabled:R}=z(q.isProjectsTransactionsEnabled),d=h(Y=>X(Y))&&R,{areTenantIdsInSync:_}=Fe();g.useEffect(()=>{!E&&r!=null&&_&&(B(!0),w.trackTransactionList(r.accountId,void 0,a,r.title),c(ge(r.accountId,r.accountType,r.period,void 0,!1,x)))},[E,r,c,_]);const ke=[l,m,S,T,D,y].filter(Y=>Y!=null);return $&&i!=null?s.jsx(Ze,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:f,isTransactionCommentingEnabled:L,showProjectField:d,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:Y=>F(Y),...e}):s.jsx(G,{to:Ie(ke.length)})}),Ie=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Xe=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&P(n,"YYYY-MM-DD").isValid()&&P(c,"YYYY-MM-DD").isValid()&&o!=null,et=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),tt=a=>`/${a}/transactions/${Be}/statements`;function kt(){const a=H().state?.referrer,e=h(n=>n.expenseAutomationViewState.selectedPeriodByTenantId)[h(n=>U(n)).tenantId],t=Oe();return s.jsxs(Ye,{children:[s.jsx(j,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/zeni-clearing-account/statements",element:s.jsx(we,{})}),s.jsx(j,{path:"/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/uncategorized-income/*",element:s.jsx(J,{})}),s.jsx(j,{path:"/uncategorized-expense/*",element:t?s.jsx(G,{to:`../../month_end_close_checks/review/transaction_categorization/${e.month}-${e.year}`}):s.jsx(J,{})}),s.jsx(j,{path:"/miscategorized-income/*",element:s.jsx(J,{})}),s.jsx(j,{path:"/miscategorized-expense/*",element:t?s.jsx(G,{to:`../../month_end_close_checks/review/transaction_categorization/${e.month}-${e.year}`}):s.jsx(J,{})}),s.jsx(j,{path:"/missing-receipts/*",element:t?s.jsx(G,{to:`../../month_end_close_checks/review/missing_receipts/${e.month}-${e.year}`}):s.jsx(J,{})}),s.jsx(j,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(qe,{referrerType:a})}),s.jsx(j,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Ke,{referrerType:a})})]})}export{kt as default};
@@ -1,4 +1,4 @@
1
- import{j as e}from"./liveblocks-BRoLXdu-.js";import{h as P,g as U,u as B,i as M,j as f,N as L,n as V,o as we,p as k}from"./core-BwBLfZO1.js";import{cl as N,eS as D,Om as O,Ep as ae,fk as H,E7 as ne,Oo as Te,Es as Ie,Ok as Ce,Ol as se,OD as ke,Cz as je,td as be,Oq as Ee,EL as Ae,On as re,cO as Z,xu as oe,e$ as ve,f1 as De,Px as Fe,Py as Le,E8 as Pe,Pz as Ue,E9 as Be,Ei as Oe,bs as Re,bF as Me,cw as Ve,bG as Ne,ck as ze,fj as _e,bt as $e,K0 as Ge,cj as qe}from"./zeni-epic-state-5KAN0o5k.js";import{I as z,aq as He,z as E,s as _,d as j,c7 as Ze,c8 as Ke,c9 as q,X as K,m as We,Y as Je,$ as Ye,a as ie,G as v,w as Qe,B as Xe,ca as et,at as W,q as tt,cb as at,p as J,cc as nt,R as Q,cd as st,i as rt}from"./index-aRVrbNiC.js";import{D as ot,n as R,S as it}from"./mui-BBkWv1mU.js";import ct from"./NotFoundScreen-DVKBuN7e.js";import{S as X}from"./SetupPagesScreen-DFqkA6OC.js";import{a as d}from"./sentry-B_UPXuSC.js";import{u as lt}from"./useAskAiCfoHostNavButtonProps-DO0seTDc.js";import{u as ut}from"./useInitialThreadRequest-D_32gSqj.js";import{M as ce}from"./MobileAppDrawer-Df4Qimmh.js";import{F as dt}from"./FeaturePreviewScreen-DDv7GOn2.js";import{a as ee}from"./analyticsHelper-B5epc-PZ.js";import"./recharts-CiU9jjGx.js";import"./analytics-7J1CNh2i.js";import"./plaid-Gte2Ckk-.js";import"./dnd-yE3kwzv1.js";import"./stripe-DMRn4zHo.js";import"./lottie-BAjpdqbN.js";import"./lexical-CppAuKk8.js";import"./pdf-BQyDOTnR.js";import"./utils-ox49Wmvb.js";import"./routePaths-hmakpH65.js";import"./BusinessVerificationPageScreen-BbDxcN3K.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]="b5cb97a5-f405-44df-8522-1cfd5952ccd1",t._sentryDebugIdIdentifier="sentry-dbid-b5cb97a5-f405-44df-8522-1cfd5952ccd1")}catch{}})();const pt=V(function(t,a){const{companyId:n}=a;return{treasurySetupView:O(t,n),analytics:j}},function(t,a){const{navigate:n,analytics:o,treasurySetupView:p}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=p.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(Ie(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(Te(r))}}})(Ze);function mt(){const t=P(),a=U(),n=B(),{tenantEmailDomain:o}=M(),p=z(),r=f(C=>C.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=He(r),s=N(p?.loggedInUserRoleMap),[l,i]=d.useState(!1),[g,I]=d.useState(!1),[u,c]=d.useState(!1),h=f(C=>D(C)),y=E.getSignedInUserTenant(o)?.companyId??h.companyId,w=E.getSignedInUser(),S=f(C=>O(C,y)),T=f(C=>C.treasurySetupViewState.fetchState),x=f(C=>C.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=f(C=>C.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(w==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{l||T!=="Not-Started"||y==null||(i(!0),n(ae(y,!0,!1)))},[l,T,y,n]),d.useEffect(()=>{u||F!=="Not-Started"||y==null||(c(!0),n(H()))},[u,F,y,n]),d.useEffect(()=>{g||x!=="Not-Started"||y==null||(I(!0),n(ne()))},[g,x,y,n]),d.useEffect(()=>{m==="In-Progress"&&r==="Completed"&&t("../")},[m,r,t]),h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(L,{to:"../promo"});const A=h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||T!=="Completed";return e.jsxs(e.Fragment,{children:[!A&&e.jsx(_,{analytics:j,onLoad:()=>{}}),e.jsx(pt,{navigate:t,location:a,companyId:y,isEditMode:!0,isLoading:A,isReadOnly:!s,treasurySetupView:S,analytics:j})]})}const ft=V(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:ke(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:O(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{q(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{q(a.analytics,"confirm",r,m,"Transfer"),t(Ae())},onSaveChangesToLocalStore:s=>{t(Ee(s))},onFetchLinkTokenClick:s=>{t(be("treasury_setup",s))},onEstablishConnectionClick:s=>{t(je(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(Ke),yt=({isFirstTransfer:t})=>{const a=P(),{tenantEmailDomain:n}=M(),o=B(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[l,i]=d.useState(!1),[g,I]=d.useState(!1),u=f(x=>x.treasurySetupViewState.fetchState),c=f(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),h=f(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),y=f(x=>D(x)),w=E.getSignedInUserTenant(n)?.companyId??y.companyId,S=f(x=>Ce(x)),T=f(x=>O(x,w));if(E.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||w==null||(s(!0),o(ae(w,!0,!1)))},[m,u,w,o]),d.useEffect(()=>{l||c!=="Not-Started"||w==null||(i(!0),o(H()))},[l,c,w,o]),d.useEffect(()=>{g||h!=="Not-Started"||w==null||(I(!0),o(ne()))},[g,h,w,o]),e.jsxs(e.Fragment,{children:[e.jsx(_,{analytics:j,onLoad:()=>{}}),e.jsx(ft,{analytics:j,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:y,treasurySetupView:T,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{q(j,"review",S.treasuryTransferMoneyLocalData,T.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},gt=R.div`
1
+ import{j as e}from"./liveblocks-OUACL7Sm.js";import{h as P,g as U,u as B,i as M,j as f,N as L,n as V,o as we,p as k}from"./core-CvVQwh-G.js";import{cl as N,eS as D,Om as O,Ep as ae,fk as H,E7 as ne,Oo as Te,Es as Ie,Ok as Ce,Ol as se,OD as ke,Cz as je,td as be,Oq as Ee,EL as Ae,On as re,cO as Z,xu as oe,e$ as ve,f1 as De,Px as Fe,Py as Le,E8 as Pe,Pz as Ue,E9 as Be,Ei as Oe,bs as Re,bF as Me,cw as Ve,bG as Ne,ck as ze,fj as _e,bt as $e,K0 as Ge,cj as qe}from"./zeni-epic-state-CECAZYIg.js";import{I as z,aq as He,z as E,s as _,d as j,c7 as Ze,c8 as Ke,c9 as q,X as K,m as We,Y as Je,$ as Ye,a as ie,G as v,w as Qe,B as Xe,ca as et,at as W,q as tt,cb as at,p as J,cc as nt,R as Q,cd as st,i as rt}from"./index-LzTRB_X0.js";import{D as ot,n as R,S as it}from"./mui-B_sWk5no.js";import ct from"./NotFoundScreen-BXgaohYF.js";import{S as X}from"./SetupPagesScreen-DhoJ2EKU.js";import{a as d}from"./sentry-COtwFETz.js";import{u as lt}from"./useAskAiCfoHostNavButtonProps-CT6wQzQG.js";import{u as ut}from"./useInitialThreadRequest-BRMmNSgV.js";import{M as ce}from"./MobileAppDrawer-C6MRZ7yW.js";import{F as dt}from"./FeaturePreviewScreen-DeAByMab.js";import{a as ee}from"./analyticsHelper-Cw9lxNal.js";import"./recharts-ScPc1hFQ.js";import"./analytics-BYlEHy--.js";import"./plaid-BeX18ubU.js";import"./dnd-DNR-B7xM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CtoJzpCG.js";import"./lexical-DEMTOP18.js";import"./pdf-Bd_BBdKz.js";import"./utils-B-68Nh7i.js";import"./routePaths-CCOmiobh.js";import"./BusinessVerificationPageScreen-BXKB7X5s.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]="b5cb97a5-f405-44df-8522-1cfd5952ccd1",t._sentryDebugIdIdentifier="sentry-dbid-b5cb97a5-f405-44df-8522-1cfd5952ccd1")}catch{}})();const pt=V(function(t,a){const{companyId:n}=a;return{treasurySetupView:O(t,n),analytics:j}},function(t,a){const{navigate:n,analytics:o,treasurySetupView:p}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=p.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(Ie(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(Te(r))}}})(Ze);function mt(){const t=P(),a=U(),n=B(),{tenantEmailDomain:o}=M(),p=z(),r=f(C=>C.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=He(r),s=N(p?.loggedInUserRoleMap),[l,i]=d.useState(!1),[g,I]=d.useState(!1),[u,c]=d.useState(!1),h=f(C=>D(C)),y=E.getSignedInUserTenant(o)?.companyId??h.companyId,w=E.getSignedInUser(),S=f(C=>O(C,y)),T=f(C=>C.treasurySetupViewState.fetchState),x=f(C=>C.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=f(C=>C.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(w==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{l||T!=="Not-Started"||y==null||(i(!0),n(ae(y,!0,!1)))},[l,T,y,n]),d.useEffect(()=>{u||F!=="Not-Started"||y==null||(c(!0),n(H()))},[u,F,y,n]),d.useEffect(()=>{g||x!=="Not-Started"||y==null||(I(!0),n(ne()))},[g,x,y,n]),d.useEffect(()=>{m==="In-Progress"&&r==="Completed"&&t("../")},[m,r,t]),h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(L,{to:"../promo"});const A=h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||T!=="Completed";return e.jsxs(e.Fragment,{children:[!A&&e.jsx(_,{analytics:j,onLoad:()=>{}}),e.jsx(pt,{navigate:t,location:a,companyId:y,isEditMode:!0,isLoading:A,isReadOnly:!s,treasurySetupView:S,analytics:j})]})}const ft=V(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:ke(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:O(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{q(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{q(a.analytics,"confirm",r,m,"Transfer"),t(Ae())},onSaveChangesToLocalStore:s=>{t(Ee(s))},onFetchLinkTokenClick:s=>{t(be("treasury_setup",s))},onEstablishConnectionClick:s=>{t(je(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(Ke),yt=({isFirstTransfer:t})=>{const a=P(),{tenantEmailDomain:n}=M(),o=B(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[l,i]=d.useState(!1),[g,I]=d.useState(!1),u=f(x=>x.treasurySetupViewState.fetchState),c=f(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),h=f(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),y=f(x=>D(x)),w=E.getSignedInUserTenant(n)?.companyId??y.companyId,S=f(x=>Ce(x)),T=f(x=>O(x,w));if(E.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||w==null||(s(!0),o(ae(w,!0,!1)))},[m,u,w,o]),d.useEffect(()=>{l||c!=="Not-Started"||w==null||(i(!0),o(H()))},[l,c,w,o]),d.useEffect(()=>{g||h!=="Not-Started"||w==null||(I(!0),o(ne()))},[g,h,w,o]),e.jsxs(e.Fragment,{children:[e.jsx(_,{analytics:j,onLoad:()=>{}}),e.jsx(ft,{analytics:j,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:y,treasurySetupView:T,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{q(j,"review",S.treasuryTransferMoneyLocalData,T.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},gt=R.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-BRoLXdu-.js";import{a as g}from"./sentry-B_UPXuSC.js";import{h as J,g as K,i as M,j as S,n as G,u as Y,o as at,p as B,N as $}from"./core-BwBLfZO1.js";import{eS as V,L2 as Ie,L3 as Re,fW as X,cr as Ee,cs as we,w3 as St,L4 as nt,w7 as Yt,J7 as ee,jJ as te,w1 as Kt,vX as qt,L5 as Ue,vP as Ht,vO as Qt,vI as Wt,vU as Zt,w8 as Xt,L6 as he,L7 as Ne,vQ as ea,L8 as pe,f6 as ft,wn as gt,wg as vt,L9 as xt,oP as Tt,wb as yt,w9 as Dt,La as Ct,wu as It,wr as Et,wc as wt,wt as Je,Hx as bt,Lb as ta,Lc as aa,cu as na,Ld as sa,Le as oa,Lf as me,Lg as ie,Lh as be,J8 as Ge,wJ as ye,J6 as De,ww as kt,w4 as $e,Li as la,J9 as H,Lj as ze,v_ as ia,Lk as ca,Ll as da,Lm as Ye,Ln as Ke,Lo as qe,Lp as He,wD as ke,Lq as At,wk as Lt,Lr as ra,Ls as ua,Lt as ha,Lu as pa,Lv as ma,Lw as Sa,Lx as fa,Ly as ga,tp as va,tq as xa,Id as Le,Lz as Ta,LA as ya,j6 as je,bo as Da,LB as Ca,LC as Ia,kH as Ea,kQ as wa,Ic as Fe,bE as st,LD as jt,HP as Ft,LE as ba,LF as ka,LG as Aa,kS as La,LH as ot,LI as lt,LJ as it,LK as ct,LL as ja,kO as Fa,LM as Pa,kR as _a,LN as Va,LO as Pt,Iz as _t,k5 as Ba,LP as Oa,LQ as Pe,LR as Vt,Ix as Bt,yW as Ma,LS as Ra,LT as Ua,kp as Ot,LU as Na,LV as Ja,IL as Ga,r5 as $a,LW as Mt,LX as dt,II as _e,LY as rt,LZ as za,IN as Ya,L_ as Ka,L$ as qa,M0 as Ha,M1 as Qa,M2 as Wa,r8 as Za,M3 as Xa,Ja as en,M4 as tn,Iq as Ve,gS as an,M5 as nn,M6 as sn,gQ as on,M7 as ln,M8 as cn,y_ as dn,M9 as rn,Ma as un,Mb as hn,Mc as pn,k9 as mn,bn as Sn,f1 as fn,e$ as gn}from"./zeni-epic-state-5KAN0o5k.js";import{z as R,aq as Be,B as Rt,s as W,d as L,a3 as Z,aw as vn,q as N,D as Ce,K as ce,ax as Qe,ay as xn,az as Tn,p as We,aA as yn,m as Dn,X as de,w as Ze,a as ae,G as z,aB as Cn,j as Xe,$ as Se,aC as In,aD as Ut,Y as En,aE as wn,I as bn,aF as kn,at as Nt,aG as An,o as Q,S as Ln,x as Jt,y as jn,aH as Fn,aI as Pn,f as et,aJ as _n,aK as Vn,O as Bn,aL as On,aM as Mn}from"./index-aRVrbNiC.js";import{n as U,D as Rn,S as Gt}from"./mui-BBkWv1mU.js";import{t as Un,A as Nn}from"./AddressScreen-D3HAG5Pr.js";import le from"./NotFoundScreen-DVKBuN7e.js";import{F as Jn}from"./FeaturePreviewScreen-DDv7GOn2.js";import{c as q,v as tt,d as Gn}from"./routePaths-hmakpH65.js";import{p as $t}from"./pathToGoBack-Bp5PBNhl.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-DO0seTDc.js";import{M as ge}from"./MobileAppDrawer-Df4Qimmh.js";import{D as $n}from"./DrawerScreen-DGyfdHJW.js";import{g as zn,m as Yn}from"./accountMappingHelper-BNXnlSEh.js";import"./recharts-CiU9jjGx.js";import"./analytics-7J1CNh2i.js";import"./plaid-Gte2Ckk-.js";import"./dnd-yE3kwzv1.js";import"./stripe-DMRn4zHo.js";import"./lottie-BAjpdqbN.js";import"./lexical-CppAuKk8.js";import"./pdf-BQyDOTnR.js";import"./utils-ox49Wmvb.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]="9f8ce819-cce1-4c06-9861-1c3a4f9ffa52",e._sentryDebugIdIdentifier="sentry-dbid-9f8ce819-cce1-4c06-9861-1c3a4f9ffa52")}catch{}})();const Kn=Ce.getLocalizedStrings(),qn=G(function(e,a){const s=Re(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(Yt()),s("..",{relative:"path"})},onTransactionClick:n=>{const o=`${q(n,a.tenantEmailDomain)}`,c=N(t.state?.pathnameStackToGoBack,t.pathname);s(o,{state:{pathnameStackToGoBack:c}})},onLinkSave(){a.setShouldNavigateBack(!1),e(St(a.scheduleTab,a.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}})(vn),Hn=({setShouldNavigateBack:e})=>{const a=J(),s=K(),{scheduleDetailId:t,tenantEmailDomain:n}=M(),{scheduleType:o}=M();if(n==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const c=S(f=>V(f)),r=Ie(o)??"accrued_expenses",h=R.getSignedInUser();if(h==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const i=S(f=>Re(f,r)),m=i.selectedJELinkRowIndex,d=S(f=>X(f,c.companyId)),u=Be(i.updateStatus.fetchState);g.useEffect(()=>{u==="In-Progress"&&i.updateStatus.fetchState==="Completed"&&a("..",{relative:"path"})},[u,i.updateStatus.fetchState]),g.useEffect(()=>{i.fetchState==="Not-Started"&&a("..",{relative:"path"})},[]),g.useEffect(()=>{i.selectedJEAccruedSchedule!=null&&i.selectedJELinkRowIndex!=null||a("..",{relative:"path"})},[i.selectedJEAccruedSchedule,i.selectedJELinkRowIndex]);const p=i.linkBillExpenseView.fetchState==="Completed";return l.jsx(l.Fragment,{children:i.linkBillExpenseView.fetchState==="In-Progress"?l.jsx(Rt,{fetchState:i.linkBillExpenseView.fetchState}):i.selectedJEAccruedSchedule!=null&&m!=null?l.jsxs(l.Fragment,{children:[p===!0?l.jsx(W,{analytics:L,onLoad:()=>{Qn(i,r,d)}}):null,l.jsx(qn,{signedInUser:h,attachmentEndPoint:`${Z}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:i.selectedJEAccruedSchedule.vendor.id??"",location:s,tenantEmailDomain:n,scheduleAccruedDetailsView:i,saveFetchState:i.updateStatus.fetchState,scheduleTab:r,navigate:a,analytics:L,controllerUserDetails:d,saveStatus:i.updateStatus.fetchState,jeAccruedSchedule:i.selectedJEAccruedSchedule,localData:i.scheduleAccruedDetailsLocalData.jeScheduleDetails[m]})]}):null})},zt=e=>{const a=Kn.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}},Qn=(e,a,s)=>{const t=e.selectedJEAccruedSchedule,n=e.selectedJELinkRowIndex;let o;n!=null&&t!=null&&(o=t.scheduledJournalEntry[n]);const{transactions:c}=e.linkBillExpenseView,r=c.some(m=>m.isRecommendedTransaction===!0),h=Ee(s.controllers),i=we(s.controllerUserIds);t!=null&&L.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...zt(t)},scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:r,journalEntryPostingStatus:o?.status.label??""},vendorName:t.vendor.name??null,controllerEmails:h,controllerUserIds:i})},Wn=U.div`
1
+ import{j as l}from"./liveblocks-OUACL7Sm.js";import{a as g}from"./sentry-COtwFETz.js";import{h as J,g as K,i as M,j as S,n as G,u as Y,o as at,p as B,N as $}from"./core-CvVQwh-G.js";import{eS as V,L2 as Ie,L3 as Re,fW as X,cr as Ee,cs as we,w3 as St,L4 as nt,w7 as Yt,J7 as ee,jJ as te,w1 as Kt,vX as qt,L5 as Ue,vP as Ht,vO as Qt,vI as Wt,vU as Zt,w8 as Xt,L6 as he,L7 as Ne,vQ as ea,L8 as pe,f6 as ft,wn as gt,wg as vt,L9 as xt,oP as Tt,wb as yt,w9 as Dt,La as Ct,wu as It,wr as Et,wc as wt,wt as Je,Hx as bt,Lb as ta,Lc as aa,cu as na,Ld as sa,Le as oa,Lf as me,Lg as ie,Lh as be,J8 as Ge,wJ as ye,J6 as De,ww as kt,w4 as $e,Li as la,J9 as H,Lj as ze,v_ as ia,Lk as ca,Ll as da,Lm as Ye,Ln as Ke,Lo as qe,Lp as He,wD as ke,Lq as At,wk as Lt,Lr as ra,Ls as ua,Lt as ha,Lu as pa,Lv as ma,Lw as Sa,Lx as fa,Ly as ga,tp as va,tq as xa,Id as Le,Lz as Ta,LA as ya,j6 as je,bo as Da,LB as Ca,LC as Ia,kH as Ea,kQ as wa,Ic as Fe,bE as st,LD as jt,HP as Ft,LE as ba,LF as ka,LG as Aa,kS as La,LH as ot,LI as lt,LJ as it,LK as ct,LL as ja,kO as Fa,LM as Pa,kR as _a,LN as Va,LO as Pt,Iz as _t,k5 as Ba,LP as Oa,LQ as Pe,LR as Vt,Ix as Bt,yW as Ma,LS as Ra,LT as Ua,kp as Ot,LU as Na,LV as Ja,IL as Ga,r5 as $a,LW as Mt,LX as dt,II as _e,LY as rt,LZ as za,IN as Ya,L_ as Ka,L$ as qa,M0 as Ha,M1 as Qa,M2 as Wa,r8 as Za,M3 as Xa,Ja as en,M4 as tn,Iq as Ve,gS as an,M5 as nn,M6 as sn,gQ as on,M7 as ln,M8 as cn,y_ as dn,M9 as rn,Ma as un,Mb as hn,Mc as pn,k9 as mn,bn as Sn,f1 as fn,e$ as gn}from"./zeni-epic-state-CECAZYIg.js";import{z as R,aq as Be,B as Rt,s as W,d as L,a3 as Z,aw as vn,q as N,D as Ce,K as ce,ax as Qe,ay as xn,az as Tn,p as We,aA as yn,m as Dn,X as de,w as Ze,a as ae,G as z,aB as Cn,j as Xe,$ as Se,aC as In,aD as Ut,Y as En,aE as wn,I as bn,aF as kn,at as Nt,aG as An,o as Q,S as Ln,x as Jt,y as jn,aH as Fn,aI as Pn,f as et,aJ as _n,aK as Vn,O as Bn,aL as On,aM as Mn}from"./index-LzTRB_X0.js";import{n as U,D as Rn,S as Gt}from"./mui-B_sWk5no.js";import{t as Un,A as Nn}from"./AddressScreen-DLTJPBtB.js";import le from"./NotFoundScreen-BXgaohYF.js";import{F as Jn}from"./FeaturePreviewScreen-DeAByMab.js";import{c as q,v as tt,d as Gn}from"./routePaths-CCOmiobh.js";import{p as $t}from"./pathToGoBack-CJrDL_Y4.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-CT6wQzQG.js";import{M as ge}from"./MobileAppDrawer-C6MRZ7yW.js";import{D as $n}from"./DrawerScreen-C1-3TQnN.js";import{g as zn,m as Yn}from"./accountMappingHelper-C2f8hGo7.js";import"./recharts-ScPc1hFQ.js";import"./analytics-BYlEHy--.js";import"./plaid-BeX18ubU.js";import"./dnd-DNR-B7xM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CtoJzpCG.js";import"./lexical-DEMTOP18.js";import"./pdf-Bd_BBdKz.js";import"./utils-B-68Nh7i.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]="9f8ce819-cce1-4c06-9861-1c3a4f9ffa52",e._sentryDebugIdIdentifier="sentry-dbid-9f8ce819-cce1-4c06-9861-1c3a4f9ffa52")}catch{}})();const Kn=Ce.getLocalizedStrings(),qn=G(function(e,a){const s=Re(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(Yt()),s("..",{relative:"path"})},onTransactionClick:n=>{const o=`${q(n,a.tenantEmailDomain)}`,c=N(t.state?.pathnameStackToGoBack,t.pathname);s(o,{state:{pathnameStackToGoBack:c}})},onLinkSave(){a.setShouldNavigateBack(!1),e(St(a.scheduleTab,a.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}})(vn),Hn=({setShouldNavigateBack:e})=>{const a=J(),s=K(),{scheduleDetailId:t,tenantEmailDomain:n}=M(),{scheduleType:o}=M();if(n==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const c=S(f=>V(f)),r=Ie(o)??"accrued_expenses",h=R.getSignedInUser();if(h==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const i=S(f=>Re(f,r)),m=i.selectedJELinkRowIndex,d=S(f=>X(f,c.companyId)),u=Be(i.updateStatus.fetchState);g.useEffect(()=>{u==="In-Progress"&&i.updateStatus.fetchState==="Completed"&&a("..",{relative:"path"})},[u,i.updateStatus.fetchState]),g.useEffect(()=>{i.fetchState==="Not-Started"&&a("..",{relative:"path"})},[]),g.useEffect(()=>{i.selectedJEAccruedSchedule!=null&&i.selectedJELinkRowIndex!=null||a("..",{relative:"path"})},[i.selectedJEAccruedSchedule,i.selectedJELinkRowIndex]);const p=i.linkBillExpenseView.fetchState==="Completed";return l.jsx(l.Fragment,{children:i.linkBillExpenseView.fetchState==="In-Progress"?l.jsx(Rt,{fetchState:i.linkBillExpenseView.fetchState}):i.selectedJEAccruedSchedule!=null&&m!=null?l.jsxs(l.Fragment,{children:[p===!0?l.jsx(W,{analytics:L,onLoad:()=>{Qn(i,r,d)}}):null,l.jsx(qn,{signedInUser:h,attachmentEndPoint:`${Z}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:i.selectedJEAccruedSchedule.vendor.id??"",location:s,tenantEmailDomain:n,scheduleAccruedDetailsView:i,saveFetchState:i.updateStatus.fetchState,scheduleTab:r,navigate:a,analytics:L,controllerUserDetails:d,saveStatus:i.updateStatus.fetchState,jeAccruedSchedule:i.selectedJEAccruedSchedule,localData:i.scheduleAccruedDetailsLocalData.jeScheduleDetails[m]})]}):null})},zt=e=>{const a=Kn.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}},Qn=(e,a,s)=>{const t=e.selectedJEAccruedSchedule,n=e.selectedJELinkRowIndex;let o;n!=null&&t!=null&&(o=t.scheduledJournalEntry[n]);const{transactions:c}=e.linkBillExpenseView,r=c.some(m=>m.isRecommendedTransaction===!0),h=Ee(s.controllers),i=we(s.controllerUserIds);t!=null&&L.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...zt(t)},scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:r,journalEntryPostingStatus:o?.status.label??""},vendorName:t.vendor.name??null,controllerEmails:h,controllerUserIds:i})},Wn=U.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-BRoLXdu-.js";import{a as f}from"./sentry-B_UPXuSC.js";import{s as u,u as h,j as y,N as b}from"./core-BwBLfZO1.js";import{Kj as I,eZ as w,Af as j}from"./zeni-epic-state-5KAN0o5k.js";import{z as l,B as x,x as S,y as D}from"./index-aRVrbNiC.js";import{n as c}from"./mui-BBkWv1mU.js";import"./recharts-CiU9jjGx.js";import"./analytics-7J1CNh2i.js";import"./plaid-Gte2Ckk-.js";import"./dnd-yE3kwzv1.js";import"./stripe-DMRn4zHo.js";import"./lottie-BAjpdqbN.js";import"./lexical-CppAuKk8.js";import"./pdf-BQyDOTnR.js";import"./utils-ox49Wmvb.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]="4032c6be-a20c-4729-b186-f76641d9a93f",e._sentryDebugIdIdentifier="sentry-dbid-4032c6be-a20c-4729-b186-f76641d9a93f")}catch{}})();const Z=()=>{const[e]=u(),t=e.get("code")??"",i=e.get("state")??"",p=e.get("profileId")??"",[n,g]=f.useState(!1),a=h(),s=y(m=>I(m)),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(i);if(r==null||d==null)return o.jsx(b,{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||(g(!0),a(j(t,p,i)))},[n,a]),s.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:s.error?.message??""})}):(s.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},E=c.div`
1
+ import{j as o}from"./liveblocks-OUACL7Sm.js";import{a as f}from"./sentry-COtwFETz.js";import{s as u,u as h,j as y,N as b}from"./core-CvVQwh-G.js";import{Kj as I,eZ as w,Af as j}from"./zeni-epic-state-CECAZYIg.js";import{z as l,B as x,x as S,y as D}from"./index-LzTRB_X0.js";import{n as c}from"./mui-B_sWk5no.js";import"./recharts-ScPc1hFQ.js";import"./analytics-BYlEHy--.js";import"./plaid-BeX18ubU.js";import"./dnd-DNR-B7xM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CtoJzpCG.js";import"./lexical-DEMTOP18.js";import"./pdf-Bd_BBdKz.js";import"./utils-B-68Nh7i.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]="4032c6be-a20c-4729-b186-f76641d9a93f",e._sentryDebugIdIdentifier="sentry-dbid-4032c6be-a20c-4729-b186-f76641d9a93f")}catch{}})();const Z=()=>{const[e]=u(),t=e.get("code")??"",i=e.get("state")??"",p=e.get("profileId")??"",[n,g]=f.useState(!1),a=h(),s=y(m=>I(m)),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(i);if(r==null||d==null)return o.jsx(b,{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||(g(!0),a(j(t,p,i)))},[n,a]),s.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:s.error?.message??""})}):(s.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 n}from"./liveblocks-BRoLXdu-.js";import{h as ne,g as W,u as M,i as q,j as w,n as Y,N as J,o as $e,p as k}from"./core-BwBLfZO1.js";import{eS as U,Pd as Ce,Pe as Ve,ck as ee,cl as He,fj as Ne,xs as ke,BF as Ze,xm as Tn,Pf as Fn,Pg as Bn,xp as On,xw as fe,xj as Ln,xg as Rn,N$ as le,Ph as Un,F5 as _n,L5 as zn,F7 as Mn,kq as Fe,Pi as $n,qM as Ge,qA as We,kh as qe,kk as Be,L6 as Oe,L7 as Vn,Pj as Hn,kj as Nn,kG as Zn,k8 as Gn,iH as Wn,iG as qn,Pk as Yn,Pl as ye,EO as Kn,Pm as Qn,Pn as Xn,NU as we,Po as Le,Pp as Jn,Fi as ea,OD as na,Cz as Ye,td as Ke,Pq as aa,Ff as ta,Pr as Qe,cL as Ae,Fm as Xe,fk as oa,e$ as Je,f1 as De,Fk as sa,Ct as ra,Fc as ia,Ps as en,Pt as nn,EQ as an,E_ as Re,Pu as ca,Or as la,Fn as da,bs as ua,bF as pa,cw as ma,bG as ha,bt as ga,K0 as fa}from"./zeni-epic-state-5KAN0o5k.js";import{I as ae,a as H,z as S,G as O,m as _,B as de,bY as ya,a3 as Ie,X as $,w as K,p as tn,aq as xa,af as Ue,d as L,bZ as Ca,at as Se,b_ as ka,s as ue,b$ as wa,f as be,aN as G,c0 as Aa,Y as Da,$ as on,ac as Ia,c1 as _e,c2 as Sa,q as ce,c3 as ba,c4 as Pa,c5 as Ea,i as va,o as ja}from"./index-aRVrbNiC.js";import{n as z,D as Q,S as X}from"./mui-BBkWv1mU.js";import ie from"./NotFoundScreen-DVKBuN7e.js";import{S as ze}from"./SetupPagesScreen-DFqkA6OC.js";import{F as sn}from"./FeaturePreviewScreen-DDv7GOn2.js";import{a as d}from"./sentry-B_UPXuSC.js";import{M as pe}from"./MobileAppDrawer-Df4Qimmh.js";import{A as Ta,D as Fa,V as Ba}from"./DomesticWireDetailScreen-BnYbmIQy.js";import{A as Oa}from"./AddressScreen-D3HAG5Pr.js";import{u as rn}from"./useAskAiCfoHostNavButtonProps-DO0seTDc.js";import{Z as La}from"./ZeniAccountStatementScreen-BrO9jMz2.js";import"./recharts-CiU9jjGx.js";import"./analytics-7J1CNh2i.js";import"./plaid-Gte2Ckk-.js";import"./dnd-yE3kwzv1.js";import"./stripe-DMRn4zHo.js";import"./lottie-BAjpdqbN.js";import"./lexical-CppAuKk8.js";import"./pdf-BQyDOTnR.js";import"./utils-ox49Wmvb.js";import"./analyticsHelper-B5epc-PZ.js";import"./routePaths-hmakpH65.js";import"./BusinessVerificationPageScreen-BbDxcN3K.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]="ea9d53c9-84ae-4559-acb6-acade163fb26",e._sentryDebugIdIdentifier="sentry-dbid-ea9d53c9-84ae-4559-acb6-acade163fb26")}catch{}})();const Ra=z.div`
1
+ import{j as n}from"./liveblocks-OUACL7Sm.js";import{h as ne,g as W,u as M,i as q,j as w,n as Y,N as J,o as $e,p as k}from"./core-CvVQwh-G.js";import{eS as U,Pd as Ce,Pe as Ve,ck as ee,cl as He,fj as Ne,xs as ke,BF as Ze,xm as Tn,Pf as Fn,Pg as Bn,xp as On,xw as fe,xj as Ln,xg as Rn,N$ as le,Ph as Un,F5 as _n,L5 as zn,F7 as Mn,kq as Fe,Pi as $n,qM as Ge,qA as We,kh as qe,kk as Be,L6 as Oe,L7 as Vn,Pj as Hn,kj as Nn,kG as Zn,k8 as Gn,iH as Wn,iG as qn,Pk as Yn,Pl as ye,EO as Kn,Pm as Qn,Pn as Xn,NU as we,Po as Le,Pp as Jn,Fi as ea,OD as na,Cz as Ye,td as Ke,Pq as aa,Ff as ta,Pr as Qe,cL as Ae,Fm as Xe,fk as oa,e$ as Je,f1 as De,Fk as sa,Ct as ra,Fc as ia,Ps as en,Pt as nn,EQ as an,E_ as Re,Pu as ca,Or as la,Fn as da,bs as ua,bF as pa,cw as ma,bG as ha,bt as ga,K0 as fa}from"./zeni-epic-state-CECAZYIg.js";import{I as ae,a as H,z as S,G as O,m as _,B as de,bY as ya,a3 as Ie,X as $,w as K,p as tn,aq as xa,af as Ue,d as L,bZ as Ca,at as Se,b_ as ka,s as ue,b$ as wa,f as be,aN as G,c0 as Aa,Y as Da,$ as on,ac as Ia,c1 as _e,c2 as Sa,q as ce,c3 as ba,c4 as Pa,c5 as Ea,i as va,o as ja}from"./index-LzTRB_X0.js";import{n as z,D as Q,S as X}from"./mui-B_sWk5no.js";import ie from"./NotFoundScreen-BXgaohYF.js";import{S as ze}from"./SetupPagesScreen-DhoJ2EKU.js";import{F as sn}from"./FeaturePreviewScreen-DeAByMab.js";import{a as d}from"./sentry-COtwFETz.js";import{M as pe}from"./MobileAppDrawer-C6MRZ7yW.js";import{A as Ta,D as Fa,V as Ba}from"./DomesticWireDetailScreen-R5H3Lj3F.js";import{A as Oa}from"./AddressScreen-DLTJPBtB.js";import{u as rn}from"./useAskAiCfoHostNavButtonProps-CT6wQzQG.js";import{Z as La}from"./ZeniAccountStatementScreen-CyycwdN8.js";import"./recharts-ScPc1hFQ.js";import"./analytics-BYlEHy--.js";import"./plaid-BeX18ubU.js";import"./dnd-DNR-B7xM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CtoJzpCG.js";import"./lexical-DEMTOP18.js";import"./pdf-Bd_BBdKz.js";import"./utils-B-68Nh7i.js";import"./analyticsHelper-Cw9lxNal.js";import"./routePaths-CCOmiobh.js";import"./BusinessVerificationPageScreen-BXKB7X5s.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]="ea9d53c9-84ae-4559-acb6-acade163fb26",e._sentryDebugIdIdentifier="sentry-dbid-ea9d53c9-84ae-4559-acb6-acade163fb26")}catch{}})();const Ra=z.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-BRoLXdu-.js";import{a as u}from"./sentry-B_UPXuSC.js";import{h as x,u as j,g as v,i as B,j as p}from"./core-BwBLfZO1.js";import{Jg as s,Jf as P,Pv as $,eS as C,Pw as T}from"./zeni-epic-state-5KAN0o5k.js";import{X as z,at as g,m as D,z as E,B as L,c6 as N,p as U}from"./index-aRVrbNiC.js";import{n as _}from"./mui-BBkWv1mU.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]="de2ed6e8-7bb2-4fe0-ad74-9c85453e3221",e._sentryDebugIdIdentifier="sentry-dbid-de2ed6e8-7bb2-4fe0-ad74-9c85453e3221")}catch{}})();const G=_.div`
1
+ import{j as i}from"./liveblocks-OUACL7Sm.js";import{a as u}from"./sentry-COtwFETz.js";import{h as x,u as j,g as v,i as B,j as p}from"./core-CvVQwh-G.js";import{Jg as s,Jf as P,Pv as $,eS as C,Pw as T}from"./zeni-epic-state-CECAZYIg.js";import{X as z,at as g,m as D,z as E,B as L,c6 as N,p as U}from"./index-LzTRB_X0.js";import{n as _}from"./mui-B_sWk5no.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]="de2ed6e8-7bb2-4fe0-ad74-9c85453e3221",e._sentryDebugIdIdentifier="sentry-dbid-de2ed6e8-7bb2-4fe0-ad74-9c85453e3221")}catch{}})();const G=_.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import"./sentry-B_UPXuSC.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]="aeade864-8999-4b65-a5fe-284d93c9cae4",e._sentryDebugIdIdentifier="sentry-dbid-aeade864-8999-4b65-a5fe-284d93c9cae4")}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 a(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{d as a,i as g,a as m};
1
+ import"./sentry-COtwFETz.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]="aeade864-8999-4b65-a5fe-284d93c9cae4",e._sentryDebugIdIdentifier="sentry-dbid-aeade864-8999-4b65-a5fe-284d93c9cae4")}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 a(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{d as a,i as g,a as m};