@zeniai/web-app-ui 5.0.82-dev → 5.0.83-dev

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 (103) hide show
  1. package/dist/assets/AddressRoutes-JvTiiWK5.js +1 -0
  2. package/dist/assets/{AddressScreen-BO5kE47C.js → AddressScreen-DT0Q15o7.js} +1 -1
  3. package/dist/assets/{AiCfoScreen-n-g5ZCq7.js → AiCfoScreen-v5CVNL3j.js} +1 -1
  4. package/dist/assets/{BillPayApprovalRoutes-BA_vIxAT.js → BillPayApprovalRoutes-BVQZfKuM.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-D_6WStre.js → BillPayRoutes-BnuP6nVO.js} +1 -1
  6. package/dist/assets/{BusinessVerificationPageScreen-Ctv5uoxk.js → BusinessVerificationPageScreen-CdptLI3O.js} +1 -1
  7. package/dist/assets/{ChargeCardRoutes-BIMHkQHv.js → ChargeCardRoutes-D3SdjHvX.js} +1 -1
  8. package/dist/assets/{CompanyPassportScreen-EJi3DgAW.js → CompanyPassportScreen-BSC4O5TV.js} +1 -1
  9. package/dist/assets/{ConnectionAuthScreen-CGIK6duf.js → ConnectionAuthScreen-Dr1IfznG.js} +1 -1
  10. package/dist/assets/CustomerOnboardingAuthScreen-YfK_o0qz.js +1 -0
  11. package/dist/assets/{CustomerOnboardingRoutes-Dfk02AGT.js → CustomerOnboardingRoutes-BXabGwpN.js} +1 -1
  12. package/dist/assets/{DashboardRoutes-DznhOqNV.js → DashboardRoutes-CvNojOn1.js} +1 -1
  13. package/dist/assets/{DefaultTenantHome-Cu24mQdG.js → DefaultTenantHome-BkycKg61.js} +1 -1
  14. package/dist/assets/{DomesticWireDetailScreen-U3JdTr0p.js → DomesticWireDetailScreen-cxTAfHcb.js} +1 -1
  15. package/dist/assets/{DrawerScreen-DTyA42lM.js → DrawerScreen-C7_25xjY.js} +1 -1
  16. package/dist/assets/{EntityDetailRoutes-Ci84GPuO.js → EntityDetailRoutes-CQUv4fcU.js} +1 -1
  17. package/dist/assets/{ExpenseAutomationRoutes-B06zryLs.js → ExpenseAutomationRoutes-DMlkcAnN.js} +1 -1
  18. package/dist/assets/{FeaturePreviewScreen-FgARC5V8.js → FeaturePreviewScreen-C38iY35s.js} +1 -1
  19. package/dist/assets/{HubSpotOAuthCallbackScreen-Ey74LUTw.js → HubSpotOAuthCallbackScreen-453Cbbtd.js} +1 -1
  20. package/dist/assets/{MagicLinkRoutes-Cb21pYTK.js → MagicLinkRoutes-CyBHzAa4.js} +1 -1
  21. package/dist/assets/{MagicLinkSignInScreen-X0YMlO94.js → MagicLinkSignInScreen-DUAV5Zdq.js} +1 -1
  22. package/dist/assets/{MobileAppDrawer-BueQODeb.js → MobileAppDrawer-B5ryN7bV.js} +1 -1
  23. package/dist/assets/NotFoundScreen-CiYbMRBm.js +1 -0
  24. package/dist/assets/{NotificationRoutes-CODqH4m6.js → NotificationRoutes-DVeyMkq-.js} +1 -1
  25. package/dist/assets/{OAuthConsentScreen-jvssXoBP.js → OAuthConsentScreen-_8k8Mx_3.js} +1 -1
  26. package/dist/assets/{PandLWithForecastRoutes-DekQYAm1.js → PandLWithForecastRoutes-C2_HmJpg.js} +1 -1
  27. package/dist/assets/{PeopleRoutes-D84cA3AE.js → PeopleRoutes-BP3GsUae.js} +1 -1
  28. package/dist/assets/{PerformanceRoutes-CULTxdg0.js → PerformanceRoutes-Do9BajCP.js} +1 -1
  29. package/dist/assets/{Preview-7pvb10lj.js → Preview-Dk35mkO2.js} +1 -1
  30. package/dist/assets/{QBOConnectionScreen-BEIBHFJV.js → QBOConnectionScreen-D3T_HW3H.js} +1 -1
  31. package/dist/assets/{ReferralListScreen-CkP_92Ie.js → ReferralListScreen-BIW3RLSW.js} +1 -1
  32. package/dist/assets/{ReimbursementApprovalRoutes-D-7zxW_G.js → ReimbursementApprovalRoutes-v95q9aWZ.js} +1 -1
  33. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-B-BrMEXt.js → ReimbursementApprovalRuleDetailScreen-DxQnj1Nr.js} +1 -1
  34. package/dist/assets/{ReimbursementRoutes-CIl3zBFz.js → ReimbursementRoutes-_EXm0KMO.js} +1 -1
  35. package/dist/assets/{ReportsRoutes-BG40-ygm.js → ReportsRoutes-C1AXA5Bz.js} +1 -1
  36. package/dist/assets/{RewardsRoutes-cCyG5a3O.js → RewardsRoutes-GXGSL_JR.js} +1 -1
  37. package/dist/assets/{ScreenRoutes-CbuBXRoq.js → ScreenRoutes-BFCvivVX.js} +2 -2
  38. package/dist/assets/{SettingsRoutes-zF3HF10E.js → SettingsRoutes-DtVKDqWM.js} +1 -1
  39. package/dist/assets/{SetupPagesScreen-BQGBgHyQ.js → SetupPagesScreen-BbHEiKJR.js} +1 -1
  40. package/dist/assets/{SignInScreen-DegCyRah.js → SignInScreen-DsOYu6LX.js} +1 -1
  41. package/dist/assets/{SignOutScreen-DhCUt8NL.js → SignOutScreen-BLqW2pDa.js} +1 -1
  42. package/dist/assets/{TaskListScreen-BUamgaz2.js → TaskListScreen-BBtnIRpq.js} +1 -1
  43. package/dist/assets/{TaskRoutes-BPqp__CB.js → TaskRoutes-D8Wkm19g.js} +1 -1
  44. package/dist/assets/TransactionDetailRoutes-l-T5k5a_.js +1 -0
  45. package/dist/assets/{TransactionDetailScreen-2jVMUnKw.js → TransactionDetailScreen-DBF06PeT.js} +1 -1
  46. package/dist/assets/{TransactionListRoutes-CFkkzo55.js → TransactionListRoutes-BocCKVMK.js} +1 -1
  47. package/dist/assets/{TreasuryRoutes-kQ3DN0PE.js → TreasuryRoutes-B9p98adV.js} +1 -1
  48. package/dist/assets/{VendorsRoutes-C65XiXXp.js → VendorsRoutes-D5Vv_W7I.js} +1 -1
  49. package/dist/assets/{WiseConfirmationScreen-C-CMayHy.js → WiseConfirmationScreen-Br0VqiWX.js} +1 -1
  50. package/dist/assets/{ZeniAccountRoutes-BBvtMFBX.js → ZeniAccountRoutes-D4wfXaC9.js} +1 -1
  51. package/dist/assets/{ZeniAccountStatementScreen-DKQAWQ4j.js → ZeniAccountStatementScreen-C83btU9G.js} +1 -1
  52. package/dist/assets/{accountMappingHelper-BonLh9TQ.js → accountMappingHelper-DN2NK9FA.js} +1 -1
  53. package/dist/assets/{analytics-B4UJAsLA.js → analytics-B134UjSL.js} +1 -1
  54. package/dist/assets/{analyticsHelper-E0KniwhU.js → analyticsHelper-CRpkSjLL.js} +1 -1
  55. package/dist/assets/{core-BR1djmRq.js → core-B1Jz41nC.js} +1 -1
  56. package/dist/assets/{decodeURIComponentSafe-rU-V5qiY.js → decodeURIComponentSafe-HQbzOYEL.js} +1 -1
  57. package/dist/assets/{dnd-WGKE6-QR.js → dnd-DumzdahX.js} +1 -1
  58. package/dist/assets/{empty-Ojvc40D_.js → empty-ByyVwI2e.js} +1 -1
  59. package/dist/assets/{empty-fPNr7WEf.js → empty-oTLwTSll.js} +1 -1
  60. package/dist/assets/{emptyVideoElement-CELRYPbu.js → emptyVideoElement-C6Cu7fXI.js} +1 -1
  61. package/dist/assets/{epic-qi_TA2Na.js → epic-BnAvJDb_.js} +1 -1
  62. package/dist/assets/{getLocaleForTenant-DmXc_MIz.js → getLocaleForTenant-D68g9mo1.js} +1 -1
  63. package/dist/assets/{index-FsVF33P-.js → index-B90Cr8bv.js} +1 -1
  64. package/dist/assets/{index-RLXxDu6p.js → index-C6t5Pm8y.js} +1 -1
  65. package/dist/assets/{index-GH_WOHnD.js → index-C8wkuIN5.js} +1 -1
  66. package/dist/assets/{index-Cp8OWlD9.js → index-DbMluP3a.js} +1 -1
  67. package/dist/assets/{index-C2lHPYmZ.js → index-DegTeG1R.js} +1 -1
  68. package/dist/assets/{index-DyLQ8mi9.js → index-DnoGJKuR.js} +5 -5
  69. package/dist/assets/{index-CjfIOV0m.js → index-Ve4RRM-O.js} +1 -1
  70. package/dist/assets/{index-BC1PrBTy.js → index-jkshGKhR.js} +2 -2
  71. package/dist/assets/{lexical-GYG14AuY.js → lexical-DsIUchFW.js} +1 -1
  72. package/dist/assets/{liveblocks-DNAiUJc8.js → liveblocks-Cjqg1XsV.js} +1 -1
  73. package/dist/assets/{lottie-CXwx4IFe.js → lottie-B-v1nIzb.js} +1 -1
  74. package/dist/assets/{mui-CgXDoZXy.js → mui-DSSmRxLI.js} +1 -1
  75. package/dist/assets/{pathToGoBack-oVjtOboc.js → pathToGoBack-DUiwH7Zn.js} +1 -1
  76. package/dist/assets/{pdf-B31DLhP9.js → pdf-SAu_SEbF.js} +3 -3
  77. package/dist/assets/{pdf-lib-BJaZbPRK.js → pdf-lib-DFDlNXnV.js} +1 -1
  78. package/dist/assets/{plaid-A3mYO1wj.js → plaid-H6p_O3yl.js} +1 -1
  79. package/dist/assets/{pusher-CUyOQlLA.js → pusher-fPmkj0tk.js} +1 -1
  80. package/dist/assets/{react-ByhUurzo.js → react-B5_vH0ZV.js} +1 -1
  81. package/dist/assets/{react-D0AyXc_c.js → react-BNA9zwlm.js} +1 -1
  82. package/dist/assets/{react-C9za7tht.js → react-CmgKrC8_.js} +1 -1
  83. package/dist/assets/{react-LoJfqmu-.js → react-CykgLUvo.js} +1 -1
  84. package/dist/assets/{react-C10xY9rt.js → react-Db4JNA42.js} +1 -1
  85. package/dist/assets/{react-ggLrwSum.js → react-OAg8acZB.js} +1 -1
  86. package/dist/assets/{recharts-DzRX0aWK.js → recharts-DW5j2-RD.js} +1 -1
  87. package/dist/assets/{routePaths-mOv9oizB.js → routePaths-DBUEUOgS.js} +1 -1
  88. package/dist/assets/{sentry-3H-Lcjnl.js → sentry-DTwqiEdO.js} +1 -1
  89. package/dist/assets/{url-c0rW6TXY.js → url-CFX7crLz.js} +1 -1
  90. package/dist/assets/{url-0VTK57Fm.js → url-CQOi-x1h.js} +1 -1
  91. package/dist/assets/{useAskAiCfoHostNavButtonProps-DOg8XSPO.js → useAskAiCfoHostNavButtonProps-D1ncSYVo.js} +1 -1
  92. package/dist/assets/{useDeviceId-D7AFffaE.js → useDeviceId-DOSS9iCb.js} +1 -1
  93. package/dist/assets/{useFetchSuggestedQuestionsWhenReady-BGkosJUF.js → useFetchSuggestedQuestionsWhenReady-BD5FIrcH.js} +1 -1
  94. package/dist/assets/{useInitialThreadRequest-BCkp7NE4.js → useInitialThreadRequest-CPdwuo-t.js} +1 -1
  95. package/dist/assets/{utils-BrTYpNjH.js → utils-CCEyXo02.js} +1 -1
  96. package/dist/assets/{withTransactionSidePanel-CyW-aabp.js → withTransactionSidePanel-75BTvZCV.js} +1 -1
  97. package/dist/assets/{zeni-epic-state-B1K_6mks.js → zeni-epic-state-CFJ-5drS.js} +3 -3
  98. package/dist/index.html +1 -1
  99. package/package.json +3 -3
  100. package/dist/assets/AddressRoutes-BqJUiqUV.js +0 -1
  101. package/dist/assets/CustomerOnboardingAuthScreen-C7l8GcmG.js +0 -1
  102. package/dist/assets/NotFoundScreen-CeLQUNEa.js +0 -1
  103. package/dist/assets/TransactionDetailRoutes-bwrsAwRj.js +0 -1
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-DznhOqNV.js","assets/sentry-3H-Lcjnl.js","assets/core-BR1djmRq.js","assets/zeni-epic-state-B1K_6mks.js","assets/index-DyLQ8mi9.js","assets/mui-CgXDoZXy.js","assets/analytics-B4UJAsLA.js","assets/utils-BrTYpNjH.js","assets/withTransactionSidePanel-CyW-aabp.js","assets/useAskAiCfoHostNavButtonProps-DOg8XSPO.js","assets/useFetchSuggestedQuestionsWhenReady-BGkosJUF.js","assets/TransactionDetailScreen-2jVMUnKw.js","assets/decodeURIComponentSafe-rU-V5qiY.js","assets/routePaths-mOv9oizB.js","assets/NotFoundScreen-CeLQUNEa.js","assets/useInitialThreadRequest-BCkp7NE4.js","assets/analyticsHelper-E0KniwhU.js","assets/CompanyPassportScreen-EJi3DgAW.js","assets/MobileAppDrawer-BueQODeb.js","assets/FeaturePreviewScreen-FgARC5V8.js","assets/ReferralListScreen-CkP_92Ie.js","assets/index-Bc34frN_.css","assets/BillPayRoutes-D_6WStre.js","assets/AddressScreen-BO5kE47C.js","assets/DomesticWireDetailScreen-U3JdTr0p.js","assets/DrawerScreen-DTyA42lM.js","assets/SetupPagesScreen-BQGBgHyQ.js","assets/BusinessVerificationPageScreen-Ctv5uoxk.js","assets/BillPayApprovalRoutes-BA_vIxAT.js","assets/ReimbursementApprovalRuleDetailScreen-B-BrMEXt.js","assets/getLocaleForTenant-DmXc_MIz.js","assets/ReimbursementRoutes-CIl3zBFz.js","assets/ReimbursementApprovalRoutes-D-7zxW_G.js","assets/TransactionListRoutes-CFkkzo55.js","assets/ZeniAccountStatementScreen-DKQAWQ4j.js","assets/SettingsRoutes-zF3HF10E.js","assets/accountMappingHelper-BonLh9TQ.js","assets/QBOConnectionScreen-BEIBHFJV.js","assets/empty-fPNr7WEf.js","assets/index-RLXxDu6p.js","assets/url-c0rW6TXY.js","assets/index-FsVF33P-.js","assets/ReportsRoutes-BG40-ygm.js","assets/ChargeCardRoutes-BIMHkQHv.js","assets/PeopleRoutes-D84cA3AE.js","assets/ExpenseAutomationRoutes-B06zryLs.js","assets/TreasuryRoutes-kQ3DN0PE.js","assets/VendorsRoutes-C65XiXXp.js","assets/pathToGoBack-oVjtOboc.js","assets/ZeniAccountRoutes-BBvtMFBX.js","assets/AddressRoutes-BqJUiqUV.js","assets/PandLWithForecastRoutes-DekQYAm1.js","assets/CustomerOnboardingRoutes-Dfk02AGT.js","assets/TransactionDetailRoutes-bwrsAwRj.js","assets/EntityDetailRoutes-Ci84GPuO.js","assets/NotificationRoutes-CODqH4m6.js","assets/PerformanceRoutes-CULTxdg0.js","assets/RewardsRoutes-cCyG5a3O.js","assets/TaskRoutes-BPqp__CB.js","assets/TaskListScreen-BUamgaz2.js","assets/AiCfoScreen-n-g5ZCq7.js"])))=>i.map(i=>d[i]);
2
- import{_ as n,bn as os,eQ as ls,eW as cs,eU as ds,eV as ms,fF as us,eS as _s,cQ as Ee,cx as Es,fb as As,cp as ps,bE as gs,bq as xs,fg as Is,v as Ts,Jc as hs,bv as js,Jd as Us,bG as bs,fd as Hs,bF as Rs,bs as Ds,cl as ys,Je as fs,Jf as Cs,cN as vs,cP as Os,cO as Ps,cw as Fs,cC as Ls,mS as Ae,eR as pe,fP as Bs,fk as ge,fM as xe,fN as Ie,fl as ks}from"./zeni-epic-state-B1K_6mks.js";import{j as e}from"./liveblocks-DNAiUJc8.js";import{a as v}from"./sentry-3H-Lcjnl.js";import{h as Vs,j as Ss,l as Ns,u as Ms,g as G,i as Te,N as c,n as Zs,o as t}from"./core-BR1djmRq.js";import{m as ws,u as Gs,z as H,y as zs,a as $s,V as Js,S as L,c as Ws,L as B,D as he,t as _,P as Ys,d as X,l}from"./index-DyLQ8mi9.js";import"./mui-CgXDoZXy.js";import{f as je}from"./analyticsHelper-E0KniwhU.js";import{t as qs}from"./getLocaleForTenant-DmXc_MIz.js";import"./recharts-DzRX0aWK.js";import"./analytics-B4UJAsLA.js";import"./plaid-A3mYO1wj.js";import"./dnd-WGKE6-QR.js";import"./stripe-DMRn4zHo.js";import"./lottie-CXwx4IFe.js";import"./lexical-GYG14AuY.js";import"./pdf-B31DLhP9.js";import"./utils-BrTYpNjH.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},U=new i.Error().stack;U&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[U]="5f116b53-0a69-4156-9d59-37354b16af35",i._sentryDebugIdIdentifier="sentry-dbid-5f116b53-0a69-4156-9d59-37354b16af35")}catch{}})();const Qs={dashboard:()=>n(()=>import("./DashboardRoutes-DznhOqNV.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-D_6WStre.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,14,24,9,10,15,25,18,19,26,16,13,27,28,29,30,21])),reimbursement:()=>n(()=>import("./ReimbursementRoutes-CIl3zBFz.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,18,16,13,27,19,9,10,15,25,32,29,30,21])),transactions:()=>n(()=>import("./TransactionListRoutes-CFkkzo55.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,21])),settings:()=>n(()=>import("./SettingsRoutes-zF3HF10E.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,18,36,23,14,16,27,13,17,37,38,39,40,41,12,28,29,32,21])),reports:()=>n(()=>import("./ReportsRoutes-BG40-ygm.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,19,10,15,13,18,21])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-BIMHkQHv.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,18,14,16,13,27,9,10,23,21])),people:()=>n(()=>import("./PeopleRoutes-D84cA3AE.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,18,21])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-B06zryLs.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,21])),treasury:()=>n(()=>import("./TreasuryRoutes-kQ3DN0PE.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,18,16,13,27,9,10,15,19,21])),vendors:()=>n(()=>import("./VendorsRoutes-C65XiXXp.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,14,19,13,48,9,10,18,25,36,21])),zeniAccounts:()=>n(()=>import("./ZeniAccountRoutes-BBvtMFBX.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,18,16,13,27,19,24,23,9,10,34,21]))},Ks=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Xs=l(()=>n(()=>import("./ReportsRoutes-BG40-ygm.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,19,10,15,13,18,21]))),en=l(()=>n(()=>import("./AddressRoutes-BqJUiqUV.js"),__vite__mapDeps([50,1,2,3,23,4,5,6,7,14,21]))),sn=l(()=>n(()=>import("./PeopleRoutes-D84cA3AE.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,18,21]))),nn=l(()=>n(()=>import("./PandLWithForecastRoutes-DekQYAm1.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,14,19,9,10,15,13,18,21]))),an=l(()=>n(()=>import("./CustomerOnboardingRoutes-Dfk02AGT.js"),__vite__mapDeps([52,1,2,3,23,4,5,6,7,14,37,38,39,40,41,12,21]))),tn=l(()=>n(()=>import("./VendorsRoutes-C65XiXXp.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,14,19,13,48,9,10,18,25,36,21]))),rn=l(()=>n(()=>import("./TransactionDetailRoutes-bwrsAwRj.js"),__vite__mapDeps([53,1,2,3,14,4,5,6,7,11,9,10,12,13,21]))),Ue=l(()=>n(()=>import("./EntityDetailRoutes-Ci84GPuO.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,12,8,9,10,11,13,21]))),on=l(()=>n(()=>import("./DashboardRoutes-DznhOqNV.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]))),be=l(()=>n(()=>import("./BillPayRoutes-D_6WStre.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,14,24,9,10,15,25,18,19,26,16,13,27,28,29,30,21]))),ln=l(()=>n(()=>import("./SettingsRoutes-zF3HF10E.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,18,36,23,14,16,27,13,17,37,38,39,40,41,12,28,29,32,21]))),He=l(()=>n(()=>import("./ReimbursementRoutes-CIl3zBFz.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,18,16,13,27,19,9,10,15,25,32,29,30,21]))),cn=l(()=>n(()=>import("./ZeniAccountRoutes-BBvtMFBX.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,18,16,13,27,19,24,23,9,10,34,21]))),dn=l(()=>n(()=>import("./TreasuryRoutes-kQ3DN0PE.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,18,16,13,27,9,10,15,19,21]))),mn=l(()=>n(()=>import("./TransactionListRoutes-CFkkzo55.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,21]))),un=l(()=>n(()=>import("./ChargeCardRoutes-BIMHkQHv.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,18,14,16,13,27,9,10,23,21]))),_n=l(()=>n(()=>import("./NotificationRoutes-CODqH4m6.js"),__vite__mapDeps([55,1,2,3,14,4,5,6,7,9,10,21]))),En=l(()=>n(()=>import("./PerformanceRoutes-CULTxdg0.js"),__vite__mapDeps([56,1,2,3,14,4,5,6,7,9,10,18,21]))),An=l(()=>n(()=>import("./ExpenseAutomationRoutes-B06zryLs.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,21]))),pn=l(()=>n(()=>import("./RewardsRoutes-cCyG5a3O.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,14,20,9,10,18,21]))),gn=l(()=>n(()=>import("./TaskRoutes-BPqp__CB.js"),__vite__mapDeps([58,1,2,3,14,4,5,6,7,15,18,59,9,10,21]))),xn=l(()=>n(()=>import("./AiCfoScreen-n-g5ZCq7.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,48,21]))),y=l(()=>n(()=>import("./NotFoundScreen-CeLQUNEa.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,21]))),In=l(()=>n(()=>import("./TaskListScreen-BUamgaz2.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,10,18,21])));function wn({setTenantEmailDomain:i}){const U=Vs(),V=Ss(),{tenantEmailDomain:o}=Ns(),S=ws().mode,{setLoading:f,clearAllLoading:O,clearLoading:Z}=Gs(),D=H.getSignedInUserTenant(o)?.tenantId,h=H.getSignedInUser(),q=os(h),z=Ms(),[N,De]=v.useState(!1),r=G(a=>ls(a)),{useFeatureGate:P}=zs(),Q=$s(),ye=Js(),{isFeatureEnabled:fe}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Ce}=P(L.isExpenseAutomationEnabledV2),ve=Ce||fe&&q,{isFeatureEnabled:Oe}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Pe}=P(L.isTreasuryEnabled),{isFeatureEnabled:Fe}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:se}=P(L.isDebitCardFeatureEnabled),j=G(a=>a.tenantState.fetchState),A=G(a=>a.tenantState.activeTenantFetchState.fetchState),u=A==="Completed"||j==="Completed"?cs(se,r):void 0,$=A==="Completed"||j==="Completed"?ds(r):void 0,Le=A==="Completed"||j==="Completed"?ms(r):void 0,Be=Fe||se||!!Le||!!$||!!u,{isFeatureEnabled:ke}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:Ve}=P(L.isAiCfoFileUploadEnabled),J=G(a=>us(a));if(o!=null){const a=H.getSignedInUserTenant(o);h!=null&&a!=null&&je(h,r,S)}const w={tenantId:D,userId:h?.userId,sessionId:h?.zeniSessionId},ne=_s(),E=Ws(),Se=r.company==null||E?.loggedInUserRoleMap!=null&&Ee(E.loggedInUserRole),Ne=Es(E?.loggedInUserRoleMap),ae=v.useRef(!0),te=Te("/:tenantEmailDomain/onboarding/*")!==null,K=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=G(a=>w.tenantId!=null?As(a,w.tenantId):void 0);v.useEffect(()=>{f(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(K!=null&&D!=null){const a=K.params.selectedPeriod;if(a!=null){const b=a.split("-");if(b.length===2){const d=ps(Number(b[0])),s=Number(b[1]),m=gs(`01-${d<10?`0${d}`:d}-${s}`,he.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=xs();m.isAfter(M,"month")===!1?U(Is(D,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[K,D]),v.useEffect(()=>{N||(De(!0),f(B.TENANT_FETCHING)),ae.current?ae.current=!1:!Ts(ne,w)&&H.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,b,d,s){if(pe(b?.userId,b?.zeniSessionId,a.tenantId),d(Bs(!0)),d(ge(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const m=H.getSignedInUserTenantWithId(a.tenantId);s&&he.updateAppLocaleID(qs(s)),m?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}a.userId!=null?X.identify(a.userId,{tenant_id:a.tenantId}):X.resetUserIdentity()}(w,h,U,Me))},[w,ne,h,U,H]),v.useEffect(()=>{H.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,b,d,s,m,M,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const W=s!=null&&m?.zeniSessionId!=null,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(W&&ts){k(ge(s));const Y=H.getSignedInUserTenantWithId(s);Y?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(Y?.tenantEmailDomain),pe(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(xe(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(Ie(m.userId,s)))}else W&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(xe(m.userId,s))),W&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(Ie(m.userId,s)));if(W){X.identify(m.userId,{tenant_id:s});const Y=s==null||s!=null&&(b==="Completed"||b==="Error");a==="Completed"||b!=="Not-Started"&&b!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(ks(m.userId,s,m.zeniSessionId))),Y&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Ae(m.userId,m.zeniSessionId)))}}(j,A,r,D,h,f,U))},[D,A]),v.useEffect(()=>{H.isSignedIn()&&j==="Completed"&&J.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),H.saveSignedInUserTenants(hs(J.tenantsBaseInOrder)),h!=null&&je(h,r,S,void 0,J.tenantsBaseInOrder))},[J,j,r,h]),v.useEffect(()=>{A==="In-Progress"&&f(B.TENANT_FETCHING),A!=="Completed"&&A!=="Error"||(A==="Completed"&&D!=null?(O(),_.markActiveTenantFetchCompleted(D)):A==="Error"&&D!=null&&(_.markActiveTenantFetchFailed(D),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[A,j,D,N]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&A==="Completed"&&N&&(ie.current=!0,function(a=Ks,b=3e3){setTimeout(()=>{const d=s=>{if(s>=a.length)return;const m=a[s],M=Qs[m];M!=null?M().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},b)}())},[A,N]);const C=r?.userRole!=null&&js(r?.userRole),{isFeatureEnabled:Ze}=P(L.isReferralFeatureEnabled),we=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Ge=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ee(r.userRole),re=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,oe=Be&&!C,ze=Us(E?.loggedInUserRoleMap),$e=r.externalConnections?.accounting[0]?.isValid,le=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,de=ce&&bs(E?.loggedInUserRoleMap),me=Oe&&!C,Je=r.company!=null&&Hs(r.company),We=Pe&&Je===!0&&!C,Ye=re&&Rs(E?.loggedInUserRoleMap),qe=oe&&Ds(E?.loggedInUserRoleMap),Qe=me&&ys(E?.loggedInUserRoleMap),Ke=fs(E?.loggedInUserRoleMap),Xe=Cs(E?.loggedInUserRoleMap),p=vs(E?.loggedInUserRoleMap),g=Os(E?.loggedInUserRoleMap),x=Ps(E?.loggedInUserRoleMap),I=Fs(E?.loggedInUserRoleMap),T=Ls(E?.loggedInUserRoleMap),ue=re&&I,_e=ce&&T,es=me&&p,ss=We&&g,ns=oe&&x,as=r.excludedResources?.resources?.find(a=>a.resource==="/invites")!=null||Ne===!0||ze===!0||Ke===!0||Xe===!0;return H.isSignedIn()?D==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ae(h.userId,h.zeniSessionId)),null):A!=="In-Progress"&&A!=="Not-Started"||j==="Completed"?(le===!0||q&&!te)&&$e===!1&&u===!1&&$===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||le!==!1||te||q?N&&r?.userRole&&u!=null&&$!=null&&o!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Zs,{children:e.jsxs(t,{element:e.jsx(Ys,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Tn,{isDashboardAccess:F,isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,isTenantCardsOnly:$})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(on,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(Xs,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:as||F?e.jsx(sn,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(nn,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(an,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||we||Ge?e.jsx(rn,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(mn,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(Ue,{entityType:"customer"}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:g,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(In,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(gn,{})}),e.jsx(t,{path:"address/*",element:Ye||de||Qe||qe?e.jsx(en,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:es?e.jsx(cn,{}):e.jsx(y,{})}),e.jsx(t,{path:"treasury/*",element:ss?e.jsx(dn,{}):e.jsx(y,{})}),e.jsx(t,{path:"performance",element:ye?e.jsx(En,{}):e.jsx(Re,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ve&&C===!1?e.jsx(An,{}):e.jsx(Re,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(_n,{})}),e.jsx(t,{path:"vendors/*",element:Se?e.jsx(tn,{}):e.jsx(y,{})}),e.jsx(t,{path:"bill/*",element:ue?e.jsx(be,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:ue?e.jsx(be,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:_e?e.jsx(He,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:_e?e.jsx(He,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:ke?e.jsx(ln,{hasAdminLevelAccess:de}):e.jsx(y,{})}),e.jsx(t,{path:"cards/*",element:ns?e.jsx(un,{}):e.jsx(y,{})}),e.jsx(t,{path:"rewards/*",element:Ze?e.jsx(pn,{}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo",element:Q?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/",element:Q?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:Q?e.jsx(xn,{isFileUploadEnabled:Ve}):e.jsx(y,{})}),e.jsx(t,{path:"*",element:e.jsx(y,{})})]})}):null:(i(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),i(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}))}const Tn=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:V,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:f,isTenantBankingOnly:O,isTenantCardsOnly:Z})=>O===!0&&U?e.jsx(c,{to:"checking"}):Z===!0?e.jsx(c,{to:"cards"}):i?e.jsx(c,{to:"dashboard"}):U?e.jsx(c,{to:"checking"}):f?e.jsx(c,{to:"treasury"}):V?e.jsx(c,{to:"cards"}):o?e.jsx(c,{to:"bills"}):S?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),R=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:f,tenantEmailDomain:O})=>f===!0||i?e.jsx(bn,{tenantEmailDomain:O}):S?e.jsx(Un,{tenantEmailDomain:O}):U?e.jsx(Hn,{tenantEmailDomain:O}):V?e.jsx(jn,{tenantEmailDomain:O}):o?e.jsx(hn,{tenantEmailDomain:O}):e.jsx(y,{}),hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),jn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),Un=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),bn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),Hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),Re=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{R as FallBackRoute,wn as default};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-CvNojOn1.js","assets/sentry-DTwqiEdO.js","assets/core-B1Jz41nC.js","assets/zeni-epic-state-CFJ-5drS.js","assets/index-DnoGJKuR.js","assets/mui-DSSmRxLI.js","assets/analytics-B134UjSL.js","assets/utils-CCEyXo02.js","assets/withTransactionSidePanel-75BTvZCV.js","assets/useAskAiCfoHostNavButtonProps-D1ncSYVo.js","assets/useFetchSuggestedQuestionsWhenReady-BD5FIrcH.js","assets/TransactionDetailScreen-DBF06PeT.js","assets/decodeURIComponentSafe-HQbzOYEL.js","assets/routePaths-DBUEUOgS.js","assets/NotFoundScreen-CiYbMRBm.js","assets/useInitialThreadRequest-CPdwuo-t.js","assets/analyticsHelper-CRpkSjLL.js","assets/CompanyPassportScreen-BSC4O5TV.js","assets/MobileAppDrawer-B5ryN7bV.js","assets/FeaturePreviewScreen-C38iY35s.js","assets/ReferralListScreen-BIW3RLSW.js","assets/index-Bc34frN_.css","assets/BillPayRoutes-BnuP6nVO.js","assets/AddressScreen-DT0Q15o7.js","assets/DomesticWireDetailScreen-cxTAfHcb.js","assets/DrawerScreen-C7_25xjY.js","assets/SetupPagesScreen-BbHEiKJR.js","assets/BusinessVerificationPageScreen-CdptLI3O.js","assets/BillPayApprovalRoutes-BVQZfKuM.js","assets/ReimbursementApprovalRuleDetailScreen-DxQnj1Nr.js","assets/getLocaleForTenant-D68g9mo1.js","assets/ReimbursementRoutes-_EXm0KMO.js","assets/ReimbursementApprovalRoutes-v95q9aWZ.js","assets/TransactionListRoutes-BocCKVMK.js","assets/ZeniAccountStatementScreen-C83btU9G.js","assets/SettingsRoutes-DtVKDqWM.js","assets/accountMappingHelper-DN2NK9FA.js","assets/QBOConnectionScreen-D3T_HW3H.js","assets/empty-oTLwTSll.js","assets/index-C6t5Pm8y.js","assets/url-CFX7crLz.js","assets/index-B90Cr8bv.js","assets/ReportsRoutes-C1AXA5Bz.js","assets/ChargeCardRoutes-D3SdjHvX.js","assets/PeopleRoutes-BP3GsUae.js","assets/ExpenseAutomationRoutes-DMlkcAnN.js","assets/TreasuryRoutes-B9p98adV.js","assets/VendorsRoutes-D5Vv_W7I.js","assets/pathToGoBack-DUiwH7Zn.js","assets/ZeniAccountRoutes-D4wfXaC9.js","assets/AddressRoutes-JvTiiWK5.js","assets/PandLWithForecastRoutes-C2_HmJpg.js","assets/CustomerOnboardingRoutes-BXabGwpN.js","assets/TransactionDetailRoutes-l-T5k5a_.js","assets/EntityDetailRoutes-CQUv4fcU.js","assets/NotificationRoutes-DVeyMkq-.js","assets/PerformanceRoutes-Do9BajCP.js","assets/RewardsRoutes-GXGSL_JR.js","assets/TaskRoutes-D8Wkm19g.js","assets/TaskListScreen-BBtnIRpq.js","assets/AiCfoScreen-v5CVNL3j.js"])))=>i.map(i=>d[i]);
2
+ import{_ as n,bn as os,eQ as ls,eW as cs,eU as ds,eV as ms,fF as us,eS as _s,cQ as Ee,cx as Es,fb as As,cp as ps,bE as gs,bq as xs,fg as Is,v as Ts,Jc as hs,bv as js,Jd as Us,bG as bs,fd as Hs,bF as Rs,bs as Ds,cl as ys,Je as fs,Jf as Cs,cN as vs,cP as Os,cO as Ps,cw as Fs,cC as Ls,mS as Ae,eR as pe,fP as Bs,fk as ge,fM as xe,fN as Ie,fl as ks}from"./zeni-epic-state-CFJ-5drS.js";import{j as e}from"./liveblocks-Cjqg1XsV.js";import{a as v}from"./sentry-DTwqiEdO.js";import{h as Vs,j as Ss,l as Ns,u as Ms,g as G,i as Te,N as c,n as Zs,o as t}from"./core-B1Jz41nC.js";import{m as ws,u as Gs,z as H,y as zs,a as $s,V as Js,S as L,c as Ws,L as B,D as he,t as _,P as Ys,d as X,l}from"./index-DnoGJKuR.js";import"./mui-DSSmRxLI.js";import{f as je}from"./analyticsHelper-CRpkSjLL.js";import{t as qs}from"./getLocaleForTenant-D68g9mo1.js";import"./recharts-DW5j2-RD.js";import"./analytics-B134UjSL.js";import"./plaid-H6p_O3yl.js";import"./dnd-DumzdahX.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-v1nIzb.js";import"./lexical-DsIUchFW.js";import"./pdf-SAu_SEbF.js";import"./utils-CCEyXo02.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},U=new i.Error().stack;U&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[U]="5f116b53-0a69-4156-9d59-37354b16af35",i._sentryDebugIdIdentifier="sentry-dbid-5f116b53-0a69-4156-9d59-37354b16af35")}catch{}})();const Qs={dashboard:()=>n(()=>import("./DashboardRoutes-CvNojOn1.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-BnuP6nVO.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,14,24,9,10,15,25,18,19,26,16,13,27,28,29,30,21])),reimbursement:()=>n(()=>import("./ReimbursementRoutes-_EXm0KMO.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,18,16,13,27,19,9,10,15,25,32,29,30,21])),transactions:()=>n(()=>import("./TransactionListRoutes-BocCKVMK.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,21])),settings:()=>n(()=>import("./SettingsRoutes-DtVKDqWM.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,18,36,23,14,16,27,13,17,37,38,39,40,41,12,28,29,32,21])),reports:()=>n(()=>import("./ReportsRoutes-C1AXA5Bz.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,19,10,15,13,18,21])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-D3SdjHvX.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,18,14,16,13,27,9,10,23,21])),people:()=>n(()=>import("./PeopleRoutes-BP3GsUae.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,18,21])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-DMlkcAnN.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,21])),treasury:()=>n(()=>import("./TreasuryRoutes-B9p98adV.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,18,16,13,27,9,10,15,19,21])),vendors:()=>n(()=>import("./VendorsRoutes-D5Vv_W7I.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,14,19,13,48,9,10,18,25,36,21])),zeniAccounts:()=>n(()=>import("./ZeniAccountRoutes-D4wfXaC9.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,18,16,13,27,19,24,23,9,10,34,21]))},Ks=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Xs=l(()=>n(()=>import("./ReportsRoutes-C1AXA5Bz.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,19,10,15,13,18,21]))),en=l(()=>n(()=>import("./AddressRoutes-JvTiiWK5.js"),__vite__mapDeps([50,1,2,3,23,4,5,6,7,14,21]))),sn=l(()=>n(()=>import("./PeopleRoutes-BP3GsUae.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,18,21]))),nn=l(()=>n(()=>import("./PandLWithForecastRoutes-C2_HmJpg.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,14,19,9,10,15,13,18,21]))),an=l(()=>n(()=>import("./CustomerOnboardingRoutes-BXabGwpN.js"),__vite__mapDeps([52,1,2,3,23,4,5,6,7,14,37,38,39,40,41,12,21]))),tn=l(()=>n(()=>import("./VendorsRoutes-D5Vv_W7I.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,14,19,13,48,9,10,18,25,36,21]))),rn=l(()=>n(()=>import("./TransactionDetailRoutes-l-T5k5a_.js"),__vite__mapDeps([53,1,2,3,14,4,5,6,7,11,9,10,12,13,21]))),Ue=l(()=>n(()=>import("./EntityDetailRoutes-CQUv4fcU.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,12,8,9,10,11,13,21]))),on=l(()=>n(()=>import("./DashboardRoutes-CvNojOn1.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]))),be=l(()=>n(()=>import("./BillPayRoutes-BnuP6nVO.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,14,24,9,10,15,25,18,19,26,16,13,27,28,29,30,21]))),ln=l(()=>n(()=>import("./SettingsRoutes-DtVKDqWM.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,18,36,23,14,16,27,13,17,37,38,39,40,41,12,28,29,32,21]))),He=l(()=>n(()=>import("./ReimbursementRoutes-_EXm0KMO.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,18,16,13,27,19,9,10,15,25,32,29,30,21]))),cn=l(()=>n(()=>import("./ZeniAccountRoutes-D4wfXaC9.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,18,16,13,27,19,24,23,9,10,34,21]))),dn=l(()=>n(()=>import("./TreasuryRoutes-B9p98adV.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,18,16,13,27,9,10,15,19,21]))),mn=l(()=>n(()=>import("./TransactionListRoutes-BocCKVMK.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,21]))),un=l(()=>n(()=>import("./ChargeCardRoutes-D3SdjHvX.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,18,14,16,13,27,9,10,23,21]))),_n=l(()=>n(()=>import("./NotificationRoutes-DVeyMkq-.js"),__vite__mapDeps([55,1,2,3,14,4,5,6,7,9,10,21]))),En=l(()=>n(()=>import("./PerformanceRoutes-Do9BajCP.js"),__vite__mapDeps([56,1,2,3,14,4,5,6,7,9,10,18,21]))),An=l(()=>n(()=>import("./ExpenseAutomationRoutes-DMlkcAnN.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,21]))),pn=l(()=>n(()=>import("./RewardsRoutes-GXGSL_JR.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,14,20,9,10,18,21]))),gn=l(()=>n(()=>import("./TaskRoutes-D8Wkm19g.js"),__vite__mapDeps([58,1,2,3,14,4,5,6,7,15,18,59,9,10,21]))),xn=l(()=>n(()=>import("./AiCfoScreen-v5CVNL3j.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,48,21]))),y=l(()=>n(()=>import("./NotFoundScreen-CiYbMRBm.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,21]))),In=l(()=>n(()=>import("./TaskListScreen-BBtnIRpq.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,10,18,21])));function wn({setTenantEmailDomain:i}){const U=Vs(),V=Ss(),{tenantEmailDomain:o}=Ns(),S=ws().mode,{setLoading:f,clearAllLoading:O,clearLoading:Z}=Gs(),D=H.getSignedInUserTenant(o)?.tenantId,h=H.getSignedInUser(),q=os(h),z=Ms(),[N,De]=v.useState(!1),r=G(a=>ls(a)),{useFeatureGate:P}=zs(),Q=$s(),ye=Js(),{isFeatureEnabled:fe}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Ce}=P(L.isExpenseAutomationEnabledV2),ve=Ce||fe&&q,{isFeatureEnabled:Oe}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Pe}=P(L.isTreasuryEnabled),{isFeatureEnabled:Fe}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:se}=P(L.isDebitCardFeatureEnabled),j=G(a=>a.tenantState.fetchState),A=G(a=>a.tenantState.activeTenantFetchState.fetchState),u=A==="Completed"||j==="Completed"?cs(se,r):void 0,$=A==="Completed"||j==="Completed"?ds(r):void 0,Le=A==="Completed"||j==="Completed"?ms(r):void 0,Be=Fe||se||!!Le||!!$||!!u,{isFeatureEnabled:ke}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:Ve}=P(L.isAiCfoFileUploadEnabled),J=G(a=>us(a));if(o!=null){const a=H.getSignedInUserTenant(o);h!=null&&a!=null&&je(h,r,S)}const w={tenantId:D,userId:h?.userId,sessionId:h?.zeniSessionId},ne=_s(),E=Ws(),Se=r.company==null||E?.loggedInUserRoleMap!=null&&Ee(E.loggedInUserRole),Ne=Es(E?.loggedInUserRoleMap),ae=v.useRef(!0),te=Te("/:tenantEmailDomain/onboarding/*")!==null,K=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=G(a=>w.tenantId!=null?As(a,w.tenantId):void 0);v.useEffect(()=>{f(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(K!=null&&D!=null){const a=K.params.selectedPeriod;if(a!=null){const b=a.split("-");if(b.length===2){const d=ps(Number(b[0])),s=Number(b[1]),m=gs(`01-${d<10?`0${d}`:d}-${s}`,he.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=xs();m.isAfter(M,"month")===!1?U(Is(D,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[K,D]),v.useEffect(()=>{N||(De(!0),f(B.TENANT_FETCHING)),ae.current?ae.current=!1:!Ts(ne,w)&&H.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,b,d,s){if(pe(b?.userId,b?.zeniSessionId,a.tenantId),d(Bs(!0)),d(ge(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const m=H.getSignedInUserTenantWithId(a.tenantId);s&&he.updateAppLocaleID(qs(s)),m?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}a.userId!=null?X.identify(a.userId,{tenant_id:a.tenantId}):X.resetUserIdentity()}(w,h,U,Me))},[w,ne,h,U,H]),v.useEffect(()=>{H.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,b,d,s,m,M,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const W=s!=null&&m?.zeniSessionId!=null,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(W&&ts){k(ge(s));const Y=H.getSignedInUserTenantWithId(s);Y?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(Y?.tenantEmailDomain),pe(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(xe(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(Ie(m.userId,s)))}else W&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(xe(m.userId,s))),W&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(Ie(m.userId,s)));if(W){X.identify(m.userId,{tenant_id:s});const Y=s==null||s!=null&&(b==="Completed"||b==="Error");a==="Completed"||b!=="Not-Started"&&b!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(ks(m.userId,s,m.zeniSessionId))),Y&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Ae(m.userId,m.zeniSessionId)))}}(j,A,r,D,h,f,U))},[D,A]),v.useEffect(()=>{H.isSignedIn()&&j==="Completed"&&J.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),H.saveSignedInUserTenants(hs(J.tenantsBaseInOrder)),h!=null&&je(h,r,S,void 0,J.tenantsBaseInOrder))},[J,j,r,h]),v.useEffect(()=>{A==="In-Progress"&&f(B.TENANT_FETCHING),A!=="Completed"&&A!=="Error"||(A==="Completed"&&D!=null?(O(),_.markActiveTenantFetchCompleted(D)):A==="Error"&&D!=null&&(_.markActiveTenantFetchFailed(D),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[A,j,D,N]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&A==="Completed"&&N&&(ie.current=!0,function(a=Ks,b=3e3){setTimeout(()=>{const d=s=>{if(s>=a.length)return;const m=a[s],M=Qs[m];M!=null?M().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},b)}())},[A,N]);const C=r?.userRole!=null&&js(r?.userRole),{isFeatureEnabled:Ze}=P(L.isReferralFeatureEnabled),we=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Ge=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ee(r.userRole),re=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,oe=Be&&!C,ze=Us(E?.loggedInUserRoleMap),$e=r.externalConnections?.accounting[0]?.isValid,le=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,de=ce&&bs(E?.loggedInUserRoleMap),me=Oe&&!C,Je=r.company!=null&&Hs(r.company),We=Pe&&Je===!0&&!C,Ye=re&&Rs(E?.loggedInUserRoleMap),qe=oe&&Ds(E?.loggedInUserRoleMap),Qe=me&&ys(E?.loggedInUserRoleMap),Ke=fs(E?.loggedInUserRoleMap),Xe=Cs(E?.loggedInUserRoleMap),p=vs(E?.loggedInUserRoleMap),g=Os(E?.loggedInUserRoleMap),x=Ps(E?.loggedInUserRoleMap),I=Fs(E?.loggedInUserRoleMap),T=Ls(E?.loggedInUserRoleMap),ue=re&&I,_e=ce&&T,es=me&&p,ss=We&&g,ns=oe&&x,as=r.excludedResources?.resources?.find(a=>a.resource==="/invites")!=null||Ne===!0||ze===!0||Ke===!0||Xe===!0;return H.isSignedIn()?D==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ae(h.userId,h.zeniSessionId)),null):A!=="In-Progress"&&A!=="Not-Started"||j==="Completed"?(le===!0||q&&!te)&&$e===!1&&u===!1&&$===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||le!==!1||te||q?N&&r?.userRole&&u!=null&&$!=null&&o!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Zs,{children:e.jsxs(t,{element:e.jsx(Ys,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Tn,{isDashboardAccess:F,isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,isTenantCardsOnly:$})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(on,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(Xs,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:as||F?e.jsx(sn,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(nn,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(an,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||we||Ge?e.jsx(rn,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(mn,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(Ue,{entityType:"customer"}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:g,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(In,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(gn,{})}),e.jsx(t,{path:"address/*",element:Ye||de||Qe||qe?e.jsx(en,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:es?e.jsx(cn,{}):e.jsx(y,{})}),e.jsx(t,{path:"treasury/*",element:ss?e.jsx(dn,{}):e.jsx(y,{})}),e.jsx(t,{path:"performance",element:ye?e.jsx(En,{}):e.jsx(Re,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ve&&C===!1?e.jsx(An,{}):e.jsx(Re,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(_n,{})}),e.jsx(t,{path:"vendors/*",element:Se?e.jsx(tn,{}):e.jsx(y,{})}),e.jsx(t,{path:"bill/*",element:ue?e.jsx(be,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:ue?e.jsx(be,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:_e?e.jsx(He,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:_e?e.jsx(He,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:ke?e.jsx(ln,{hasAdminLevelAccess:de}):e.jsx(y,{})}),e.jsx(t,{path:"cards/*",element:ns?e.jsx(un,{}):e.jsx(y,{})}),e.jsx(t,{path:"rewards/*",element:Ze?e.jsx(pn,{}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo",element:Q?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/",element:Q?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:Q?e.jsx(xn,{isFileUploadEnabled:Ve}):e.jsx(y,{})}),e.jsx(t,{path:"*",element:e.jsx(y,{})})]})}):null:(i(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),i(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}))}const Tn=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:V,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:f,isTenantBankingOnly:O,isTenantCardsOnly:Z})=>O===!0&&U?e.jsx(c,{to:"checking"}):Z===!0?e.jsx(c,{to:"cards"}):i?e.jsx(c,{to:"dashboard"}):U?e.jsx(c,{to:"checking"}):f?e.jsx(c,{to:"treasury"}):V?e.jsx(c,{to:"cards"}):o?e.jsx(c,{to:"bills"}):S?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),R=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:f,tenantEmailDomain:O})=>f===!0||i?e.jsx(bn,{tenantEmailDomain:O}):S?e.jsx(Un,{tenantEmailDomain:O}):U?e.jsx(Hn,{tenantEmailDomain:O}):V?e.jsx(jn,{tenantEmailDomain:O}):o?e.jsx(hn,{tenantEmailDomain:O}):e.jsx(y,{}),hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),jn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),Un=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),bn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),Hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),Re=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{R as FallBackRoute,wn as default};
@@ -1,4 +1,4 @@
1
- import{j as a}from"./liveblocks-DNAiUJc8.js";import{a as p}from"./sentry-3H-Lcjnl.js";import{j as _,u as R,h as P,g as h,k as B,l as F,n as W,o as C}from"./core-BR1djmRq.js";import{bn as xe,eQ as j,gI as de,Li as Ee,JH as Ae,jC as ue,lV as we,gK as je,Lk as ke,Lj as Pe,NJ as ve,xG as De,C9 as Ue,Ni as Me,Nr as _e,c2 as Y,cH as Te,cI as Re,Jo as Be,NK as Fe,Jp as Ne,w6 as Ve,NL as Le,Ep as Oe,BR as $e,BI as pe,BF as Je,wa as ge,BL as me,BO as fe,BU as ee,sJ as ne,w9 as Ke,je as q,jh as he,NM as Ge,ki as He,wp as ze,Kd as Ze,Ke as Qe,jc as We,NN as qe,jf as Xe,r7 as Ye,NO as en,NP as nn,rb as tn,gk as an,Jx as se,gr as sn,Jy as on,wm as cn,NQ as rn,NR as ln,C6 as dn,eU as be,eW as Se,NS as un,fy as pn,JI as gn,wl as oe,fD as ie,fC as mn,wk as fn,fB as hn,fA as bn,NT as Sn,eZ as Ie,NU as In,NV as yn,ws as Cn,wj as ce,NW as xn,ff as En,wg as An,bV as wn,c1 as jn,c0 as kn,bW as Pn,b_ as vn,bZ as Dn,bY as Un,b$ as Mn,bX as _n}from"./zeni-epic-state-B1K_6mks.js";import{y as te,S as U,z as x,ac as ye,bB as Tn,d as J,f as Rn,c as N,v as ae,bC as Bn,bD as Fn,an as Nn,h as Ce,bE as Vn,bF as Ln,bG as On,a6 as $n,T as Jn,bH as Kn,q as Gn,bI as Hn}from"./index-DyLQ8mi9.js";import{n as M}from"./mui-CgXDoZXy.js";import{M as v}from"./MobileAppDrawer-BueQODeb.js";import{a as O,g as $,m as zn}from"./accountMappingHelper-BonLh9TQ.js";import{t as Zn,A as Qn}from"./AddressScreen-BO5kE47C.js";import T from"./NotFoundScreen-CeLQUNEa.js";import{g as Wn}from"./analyticsHelper-E0KniwhU.js";import{B as qn}from"./BusinessVerificationPageScreen-Ctv5uoxk.js";import{C as Xn}from"./CompanyPassportScreen-EJi3DgAW.js";import{q as re}from"./QBOConnectionScreen-BEIBHFJV.js";import{B as Yn}from"./BillPayApprovalRoutes-BA_vIxAT.js";import{R as et}from"./ReimbursementApprovalRoutes-D-7zxW_G.js";import"./recharts-DzRX0aWK.js";import"./analytics-B4UJAsLA.js";import"./plaid-A3mYO1wj.js";import"./dnd-WGKE6-QR.js";import"./stripe-DMRn4zHo.js";import"./lottie-CXwx4IFe.js";import"./lexical-GYG14AuY.js";import"./pdf-B31DLhP9.js";import"./utils-BrTYpNjH.js";import"./routePaths-mOv9oizB.js";import"./empty-fPNr7WEf.js";import"./pdf-lib-BJaZbPRK.js";import"./index-RLXxDu6p.js";import"./url-c0rW6TXY.js";import"./index-FsVF33P-.js";import"./decodeURIComponentSafe-rU-V5qiY.js";import"./ReimbursementApprovalRuleDetailScreen-B-BrMEXt.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="4ab4d029-a10f-4cc8-abef-12348e2c5f62",e._sentryDebugIdIdentifier="sentry-dbid-4ab4d029-a10f-4cc8-abef-12348e2c5f62")}catch{}})();const nt=M.div`
1
+ import{j as a}from"./liveblocks-Cjqg1XsV.js";import{a as p}from"./sentry-DTwqiEdO.js";import{j as _,u as R,h as P,g as h,k as B,l as F,n as W,o as C}from"./core-B1Jz41nC.js";import{bn as xe,eQ as j,gI as de,Li as Ee,JH as Ae,jC as ue,lV as we,gK as je,Lk as ke,Lj as Pe,NJ as ve,xG as De,C9 as Ue,Ni as Me,Nr as _e,c2 as Y,cH as Te,cI as Re,Jo as Be,NK as Fe,Jp as Ne,w6 as Ve,NL as Le,Ep as Oe,BR as $e,BI as pe,BF as Je,wa as ge,BL as me,BO as fe,BU as ee,sJ as ne,w9 as Ke,je as q,jh as he,NM as Ge,ki as He,wp as ze,Kd as Ze,Ke as Qe,jc as We,NN as qe,jf as Xe,r7 as Ye,NO as en,NP as nn,rb as tn,gk as an,Jx as se,gr as sn,Jy as on,wm as cn,NQ as rn,NR as ln,C6 as dn,eU as be,eW as Se,NS as un,fy as pn,JI as gn,wl as oe,fD as ie,fC as mn,wk as fn,fB as hn,fA as bn,NT as Sn,eZ as Ie,NU as In,NV as yn,ws as Cn,wj as ce,NW as xn,ff as En,wg as An,bV as wn,c1 as jn,c0 as kn,bW as Pn,b_ as vn,bZ as Dn,bY as Un,b$ as Mn,bX as _n}from"./zeni-epic-state-CFJ-5drS.js";import{y as te,S as U,z as x,ac as ye,bB as Tn,d as J,f as Rn,c as N,v as ae,bC as Bn,bD as Fn,an as Nn,h as Ce,bE as Vn,bF as Ln,bG as On,a6 as $n,T as Jn,bH as Kn,q as Gn,bI as Hn}from"./index-DnoGJKuR.js";import{n as M}from"./mui-DSSmRxLI.js";import{M as v}from"./MobileAppDrawer-B5ryN7bV.js";import{a as O,g as $,m as zn}from"./accountMappingHelper-DN2NK9FA.js";import{t as Zn,A as Qn}from"./AddressScreen-DT0Q15o7.js";import T from"./NotFoundScreen-CiYbMRBm.js";import{g as Wn}from"./analyticsHelper-CRpkSjLL.js";import{B as qn}from"./BusinessVerificationPageScreen-CdptLI3O.js";import{C as Xn}from"./CompanyPassportScreen-BSC4O5TV.js";import{q as re}from"./QBOConnectionScreen-D3T_HW3H.js";import{B as Yn}from"./BillPayApprovalRoutes-BVQZfKuM.js";import{R as et}from"./ReimbursementApprovalRoutes-v95q9aWZ.js";import"./recharts-DW5j2-RD.js";import"./analytics-B134UjSL.js";import"./plaid-H6p_O3yl.js";import"./dnd-DumzdahX.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-v1nIzb.js";import"./lexical-DsIUchFW.js";import"./pdf-SAu_SEbF.js";import"./utils-CCEyXo02.js";import"./routePaths-DBUEUOgS.js";import"./empty-oTLwTSll.js";import"./pdf-lib-DFDlNXnV.js";import"./index-C6t5Pm8y.js";import"./url-CFX7crLz.js";import"./index-B90Cr8bv.js";import"./decodeURIComponentSafe-HQbzOYEL.js";import"./ReimbursementApprovalRuleDetailScreen-DxQnj1Nr.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="4ab4d029-a10f-4cc8-abef-12348e2c5f62",e._sentryDebugIdIdentifier="sentry-dbid-4ab4d029-a10f-4cc8-abef-12348e2c5f62")}catch{}})();const nt=M.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as u}from"./liveblocks-DNAiUJc8.js";import{j as Q,u as Y,h as X,l as G,g as w,N as j,k as W,q as Ye}from"./core-BR1djmRq.js";import{bF as Xe,cl as Ie,N6 as ye,eQ as F,cx as en,xR as Z,xG as nn,Ni as tn,Nl as an,q9 as ee,pZ as ne,ka as te,sf as z,Nn as Ae,fC as $e,fB as Ge,fA as We,No as sn,x_ as on,BR as ke,BI as _e,BF as ve,Bw as K,BL as Pe,BO as we,BU as Ee,sJ as De,fR as cn,cs as rn,eW as un,eU as dn,eV as ln,bs as pn,Np as mn,Ay as le,Ba as yn,Nq as fn,bG as gn,D5 as pe,C9 as Sn,Nr as bn,Ns as hn,D9 as Cn,Dd as In,s8 as An,Hx as kn,DK as Ce,ED as me,Nt as _n,Nu as vn,Nv as Pn,Nw as qe,Nx as wn,K0 as En,Mv as Dn,Kc as Tn,Ny as He,Nz as xe,DY as Ke,ki as Un,q0 as Je,sh as On,bE as Ne,st as je,cv as Bn,NA as Qe,fe as xn,Ds as Fn,Dw as Vn,NB as Nn,DN as Re,NC as jn,ND as Rn,NE as zn,NF as Ln,fK as Mn,z9 as Zn,NG as $n,ze as Gn,zd as Wn}from"./zeni-epic-state-B1K_6mks.js";import{c as ae,y as ie,S as de,m as Te,aK as J,z as D,x as se,d as E,v as Ue,f as $,bq as qn,aq as oe,br as V,bs as Hn,bt as Kn,ac as Ve,bu as Jn,q as ze,ar as Le,Z as Qn,G as Yn,bv as Xn,bw as et,bx as nt,a3 as tt}from"./index-DyLQ8mi9.js";import{a as C}from"./sentry-3H-Lcjnl.js";import{n as Fe,D as at,S as it}from"./mui-CgXDoZXy.js";import{M as fe}from"./MobileAppDrawer-BueQODeb.js";import R from"./NotFoundScreen-CeLQUNEa.js";import{a as Me}from"./analyticsHelper-E0KniwhU.js";import{c as Ze}from"./routePaths-mOv9oizB.js";import{B as Be}from"./BusinessVerificationPageScreen-Ctv5uoxk.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]="9baa748b-c7be-438d-a67d-0b9f1fb6aa62",e._sentryDebugIdIdentifier="sentry-dbid-9baa748b-c7be-438d-a67d-0b9f1fb6aa62")}catch{}})();const st=Fe.div`
1
+ import{j as u}from"./liveblocks-Cjqg1XsV.js";import{j as Q,u as Y,h as X,l as G,g as w,N as j,k as W,q as Ye}from"./core-B1Jz41nC.js";import{bF as Xe,cl as Ie,N6 as ye,eQ as F,cx as en,xR as Z,xG as nn,Ni as tn,Nl as an,q9 as ee,pZ as ne,ka as te,sf as z,Nn as Ae,fC as $e,fB as Ge,fA as We,No as sn,x_ as on,BR as ke,BI as _e,BF as ve,Bw as K,BL as Pe,BO as we,BU as Ee,sJ as De,fR as cn,cs as rn,eW as un,eU as dn,eV as ln,bs as pn,Np as mn,Ay as le,Ba as yn,Nq as fn,bG as gn,D5 as pe,C9 as Sn,Nr as bn,Ns as hn,D9 as Cn,Dd as In,s8 as An,Hx as kn,DK as Ce,ED as me,Nt as _n,Nu as vn,Nv as Pn,Nw as qe,Nx as wn,K0 as En,Mv as Dn,Kc as Tn,Ny as He,Nz as xe,DY as Ke,ki as Un,q0 as Je,sh as On,bE as Ne,st as je,cv as Bn,NA as Qe,fe as xn,Ds as Fn,Dw as Vn,NB as Nn,DN as Re,NC as jn,ND as Rn,NE as zn,NF as Ln,fK as Mn,z9 as Zn,NG as $n,ze as Gn,zd as Wn}from"./zeni-epic-state-CFJ-5drS.js";import{c as ae,y as ie,S as de,m as Te,aK as J,z as D,x as se,d as E,v as Ue,f as $,bq as qn,aq as oe,br as V,bs as Hn,bt as Kn,ac as Ve,bu as Jn,q as ze,ar as Le,Z as Qn,G as Yn,bv as Xn,bw as et,bx as nt,a3 as tt}from"./index-DnoGJKuR.js";import{a as C}from"./sentry-DTwqiEdO.js";import{n as Fe,D as at,S as it}from"./mui-DSSmRxLI.js";import{M as fe}from"./MobileAppDrawer-B5ryN7bV.js";import R from"./NotFoundScreen-CiYbMRBm.js";import{a as Me}from"./analyticsHelper-CRpkSjLL.js";import{c as Ze}from"./routePaths-DBUEUOgS.js";import{B as Be}from"./BusinessVerificationPageScreen-CdptLI3O.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]="9baa748b-c7be-438d-a67d-0b9f1fb6aa62",e._sentryDebugIdIdentifier="sentry-dbid-9baa748b-c7be-438d-a67d-0b9f1fb6aa62")}catch{}})();const st=Fe.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{j as f}from"./liveblocks-DNAiUJc8.js";import{a as u,b as T,q as A}from"./sentry-3H-Lcjnl.js";import{h as D,j as z,g as l,u as J,N as j,k as M}from"./core-BR1djmRq.js";import{u as P,z as s,m as F,d as E,D as O,e as _,f as B,n as N,g as V,F as $,h as v}from"./index-DyLQ8mi9.js";import{eQ as q,Jb as Q,Jc as R,eR as W,fk as H,Jh as G,fJ as K,cU as X,Ji as b,Jj as Y,Jk as Z,bT as y}from"./zeni-epic-state-B1K_6mks.js";import"./mui-CgXDoZXy.js";import{u as ee}from"./useDeviceId-D7AFffaE.js";import{f as te}from"./analyticsHelper-E0KniwhU.js";import{t as ne}from"./getLocaleForTenant-DmXc_MIz.js";import"./recharts-DzRX0aWK.js";import"./analytics-B4UJAsLA.js";import"./plaid-A3mYO1wj.js";import"./dnd-WGKE6-QR.js";import"./stripe-DMRn4zHo.js";import"./lottie-CXwx4IFe.js";import"./lexical-GYG14AuY.js";import"./pdf-B31DLhP9.js";import"./utils-BrTYpNjH.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]="891fb1e1-5266-47a4-a9ac-38dd3deaf86b",t._sentryDebugIdIdentifier="sentry-dbid-891fb1e1-5266-47a4-a9ac-38dd3deaf86b")}catch{}})();const ie=M(function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}},function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const c=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Z({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(c),sourceUri:y(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(Y(n,a)))},clearSignInError:()=>{t(b())}}})($),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=D(),d=z(),{clearAllLoading:g}=P(),n=s.getSignedInUser();u.useLayoutEffect(()=>{g()},[g]);const a=ee(),c=l(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:k,accountLocked:U,accountUnlockTime:h}=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=>Q(e)),m=J(),w=F().mode,C=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{k.fetchState==="Completed"&&c!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))},[k.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(R(I.tenantsInOrder),o.zeniSessionId),W(o.userId,o.zeniSessionId,r.tenantId),i(H(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(G("Completed")),O.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),K().then(()=>{const e=V();e!=null&&_(e)}),setTimeout(()=>{E.trackLogin(B.Event.loginSuccess,o.authProvider??"google",X(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:!!C,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),U===!0&&h!=null?f.jsx(N,{onClose:()=>i(b()),unlockDate:h}):null]})}export{ve as default};
1
+ import{j as f}from"./liveblocks-Cjqg1XsV.js";import{a as u,b as T,q as A}from"./sentry-DTwqiEdO.js";import{h as D,j as z,g as l,u as J,N as j,k as M}from"./core-B1Jz41nC.js";import{u as P,z as s,m as F,d as E,D as O,e as _,f as B,n as N,g as V,F as $,h as v}from"./index-DnoGJKuR.js";import{eQ as q,Jb as Q,Jc as R,eR as W,fk as H,Jh as G,fJ as K,cU as X,Ji as b,Jj as Y,Jk as Z,bT as y}from"./zeni-epic-state-CFJ-5drS.js";import"./mui-DSSmRxLI.js";import{u as ee}from"./useDeviceId-DOSS9iCb.js";import{f as te}from"./analyticsHelper-CRpkSjLL.js";import{t as ne}from"./getLocaleForTenant-D68g9mo1.js";import"./recharts-DW5j2-RD.js";import"./analytics-B134UjSL.js";import"./plaid-H6p_O3yl.js";import"./dnd-DumzdahX.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-v1nIzb.js";import"./lexical-DsIUchFW.js";import"./pdf-SAu_SEbF.js";import"./utils-CCEyXo02.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]="891fb1e1-5266-47a4-a9ac-38dd3deaf86b",t._sentryDebugIdIdentifier="sentry-dbid-891fb1e1-5266-47a4-a9ac-38dd3deaf86b")}catch{}})();const ie=M(function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}},function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const c=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Z({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(c),sourceUri:y(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(Y(n,a)))},clearSignInError:()=>{t(b())}}})($),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=D(),d=z(),{clearAllLoading:g}=P(),n=s.getSignedInUser();u.useLayoutEffect(()=>{g()},[g]);const a=ee(),c=l(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:k,accountLocked:U,accountUnlockTime:h}=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=>Q(e)),m=J(),w=F().mode,C=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{k.fetchState==="Completed"&&c!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))},[k.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(R(I.tenantsInOrder),o.zeniSessionId),W(o.userId,o.zeniSessionId,r.tenantId),i(H(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(G("Completed")),O.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),K().then(()=>{const e=V();e!=null&&_(e)}),setTimeout(()=>{E.trackLogin(B.Event.loginSuccess,o.authProvider??"google",X(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:!!C,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),U===!0&&h!=null?f.jsx(N,{onClose:()=>i(b()),unlockDate:h}):null]})}export{ve as default};
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-DNAiUJc8.js";import{a as n}from"./sentry-3H-Lcjnl.js";import{h as u,u as m,j as p,N as g}from"./core-BR1djmRq.js";import{z as c,v as y,t as h,d as f,f as b}from"./index-DyLQ8mi9.js";import{fO as x,fP as I,Jz as j}from"./zeni-epic-state-B1K_6mks.js";import{n as v}from"./mui-CgXDoZXy.js";import"./recharts-DzRX0aWK.js";import"./analytics-B4UJAsLA.js";import"./plaid-A3mYO1wj.js";import"./dnd-WGKE6-QR.js";import"./stripe-DMRn4zHo.js";import"./lottie-CXwx4IFe.js";import"./lexical-GYG14AuY.js";import"./pdf-B31DLhP9.js";import"./utils-BrTYpNjH.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]="0a7bfdca-8031-4f77-9c02-c507a77c9c4a",e._sentryDebugIdIdentifier="sentry-dbid-0a7bfdca-8031-4f77-9c02-c507a77c9c4a")}catch{}})();function $(){const e=u(),t=m(),a=p(),i=n.useRef(!1),d=c.isSignedIn(),r=t.state?.message==="logout",o=r||d;return n.useEffect(()=>{o&&!i.current&&(i.current=!0,setTimeout(()=>{try{c.clearAll(),e(x()),e(I(!1)),j(),h.reset(),f.trackLogout(b.Event.logoutSuccess),f.resetUserIdentity()}catch(l){console.error("Error during sign out:",l)}finally{r||a("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(w,{children:s.jsx(y,{fetchState:"In-Progress"})}):s.jsx(g,{to:"../",replace:!0})}const w=v.div`
1
+ import{j as s}from"./liveblocks-Cjqg1XsV.js";import{a as n}from"./sentry-DTwqiEdO.js";import{h as u,u as m,j as p,N as g}from"./core-B1Jz41nC.js";import{z as c,v as y,t as h,d as f,f as b}from"./index-DnoGJKuR.js";import{fO as x,fP as I,Jz as j}from"./zeni-epic-state-CFJ-5drS.js";import{n as v}from"./mui-DSSmRxLI.js";import"./recharts-DW5j2-RD.js";import"./analytics-B134UjSL.js";import"./plaid-H6p_O3yl.js";import"./dnd-DumzdahX.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-v1nIzb.js";import"./lexical-DsIUchFW.js";import"./pdf-SAu_SEbF.js";import"./utils-CCEyXo02.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]="0a7bfdca-8031-4f77-9c02-c507a77c9c4a",e._sentryDebugIdIdentifier="sentry-dbid-0a7bfdca-8031-4f77-9c02-c507a77c9c4a")}catch{}})();function $(){const e=u(),t=m(),a=p(),i=n.useRef(!1),d=c.isSignedIn(),r=t.state?.message==="logout",o=r||d;return n.useEffect(()=>{o&&!i.current&&(i.current=!0,setTimeout(()=>{try{c.clearAll(),e(x()),e(I(!1)),j(),h.reset(),f.trackLogout(b.Event.logoutSuccess),f.resetUserIdentity()}catch(l){console.error("Error during sign out:",l)}finally{r||a("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(w,{children:s.jsx(y,{fetchState:"In-Progress"})}):s.jsx(g,{to:"../",replace:!0})}const w=v.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as d}from"./liveblocks-DNAiUJc8.js";import{a as g}from"./sentry-3H-Lcjnl.js";import{j as K,h as _,u as z,g as b,l as q,k as O}from"./core-BR1djmRq.js";import{z as x,y as M,S as p,x as V,d as W,f as Z,cI as H,q as f,p as J}from"./index-DyLQ8mi9.js";import{eQ as X,Qo as Q,G9 as y,Qp as R,Qk as Y,FB as E,Qq as aa,FF as I,F8 as ea,Ga as B,Qr as w,gO as ta,G0 as sa,G5 as oa,FU as na,FS as F,G6 as ia,FP as la,Qs as ra,Qt as ka,Qu as ca,Qv as ua,Qw as m,ec as da,Qx as pa,Qy as ma}from"./zeni-epic-state-B1K_6mks.js";import{n as Ta}from"./mui-CgXDoZXy.js";import{u as ga}from"./useAskAiCfoHostNavButtonProps-DOg8XSPO.js";import{c as fa}from"./useFetchSuggestedQuestionsWhenReady-BGkosJUF.js";import{M as Ga}from"./MobileAppDrawer-BueQODeb.js";import"./recharts-DzRX0aWK.js";import"./analytics-B4UJAsLA.js";import"./plaid-A3mYO1wj.js";import"./dnd-WGKE6-QR.js";import"./stripe-DMRn4zHo.js";import"./lottie-CXwx4IFe.js";import"./lexical-GYG14AuY.js";import"./pdf-B31DLhP9.js";import"./utils-BrTYpNjH.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]="f783273f-0294-4e8f-aea5-fca5d7290d93",e._sentryDebugIdIdentifier="sentry-dbid-f783273f-0294-4e8f-aea5-fca5d7290d93")}catch{}})();const ha=Ta.div`
1
+ import{j as d}from"./liveblocks-Cjqg1XsV.js";import{a as g}from"./sentry-DTwqiEdO.js";import{j as K,h as _,u as z,g as b,l as q,k as O}from"./core-B1Jz41nC.js";import{z as x,y as M,S as p,x as V,d as W,f as Z,cI as H,q as f,p as J}from"./index-DnoGJKuR.js";import{eQ as X,Qo as Q,G9 as y,Qp as R,Qk as Y,FB as E,Qq as aa,FF as I,F8 as ea,Ga as B,Qr as w,gO as ta,G0 as sa,G5 as oa,FU as na,FS as F,G6 as ia,FP as la,Qs as ra,Qt as ka,Qu as ca,Qv as ua,Qw as m,ec as da,Qx as pa,Qy as ma}from"./zeni-epic-state-CFJ-5drS.js";import{n as Ta}from"./mui-DSSmRxLI.js";import{u as ga}from"./useAskAiCfoHostNavButtonProps-D1ncSYVo.js";import{c as fa}from"./useFetchSuggestedQuestionsWhenReady-BD5FIrcH.js";import{M as Ga}from"./MobileAppDrawer-B5ryN7bV.js";import"./recharts-DW5j2-RD.js";import"./analytics-B134UjSL.js";import"./plaid-H6p_O3yl.js";import"./dnd-DumzdahX.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-v1nIzb.js";import"./lexical-DsIUchFW.js";import"./pdf-SAu_SEbF.js";import"./utils-CCEyXo02.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]="f783273f-0294-4e8f-aea5-fca5d7290d93",e._sentryDebugIdIdentifier="sentry-dbid-f783273f-0294-4e8f-aea5-fca5d7290d93")}catch{}})();const ha=Ta.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-DNAiUJc8.js";import se from"./NotFoundScreen-CeLQUNEa.js";import{a as c}from"./sentry-3H-Lcjnl.js";import{j as Z,h as _,g,u as ne,l as oe,N as ie,k as re,n as ce,o as f}from"./core-BR1djmRq.js";import{Gd as M,Gg as le,Gj as de,eQ as O,Qk as H,Fx as W,Ff as pe,FZ as ue,FS as ke,Ql as X,Qm as N,Fb as me,F8 as fe,q9 as ge,pZ as he,ka as Se,Fn as Ie,Qn as Te,Fs as be,Fp as Ge,Fi as Ee,FC as Ce,FB as Fe}from"./zeni-epic-state-B1K_6mks.js";import{z as C,cG as De,r as xe,y as ye,S as b,p as Y,q as w,x as je,d as z,f as we,cH as ve,h as V,aq as Re}from"./index-DyLQ8mi9.js";import{n as Be}from"./mui-CgXDoZXy.js";import{u as Pe}from"./useInitialThreadRequest-BCkp7NE4.js";import{M as Ue}from"./MobileAppDrawer-BueQODeb.js";import Le from"./TaskListScreen-BUamgaz2.js";import"./recharts-DzRX0aWK.js";import"./analytics-B4UJAsLA.js";import"./plaid-A3mYO1wj.js";import"./dnd-WGKE6-QR.js";import"./stripe-DMRn4zHo.js";import"./lottie-CXwx4IFe.js";import"./lexical-GYG14AuY.js";import"./pdf-B31DLhP9.js";import"./utils-BrTYpNjH.js";import"./useAskAiCfoHostNavButtonProps-DOg8XSPO.js";import"./useFetchSuggestedQuestionsWhenReady-BGkosJUF.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]="7a5d74c3-c947-4acf-b38d-f6ff942fe3b2",e._sentryDebugIdIdentifier="sentry-dbid-7a5d74c3-c947-4acf-b38d-f6ff942fe3b2")}catch{}})();function $e(){const e=Z(),t=_(),s=C.getSignedInUser(),{cannedResponses:u,fetchState:r,saveFetchState:d}=g(o=>o.cannedResponsesState),l=c.useCallback(()=>{t(M())},[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(De,{cannedResponses:u,isLoading:r==="In-Progress"||r==="Not-Started",isSaving:d==="In-Progress",onBackClick:()=>e(-1),onDelete:a,onFetch:l,onSave:k})}let A,Q=[];const qe=re(function(e,t){const{location:s,taskGroupId:u}=t,r=X(e,t.taskId),d=O(e),l=r.taskGroupId??u,k=l!=null?N(e.taskGroupState,l):void 0,a=C.getSignedInUser(),o=d.tenantId,h={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:o??""},S=H(e),{tenantEmailDomain:F}=d,G=r.recurringSourceTaskId,D=G!=null?`${V.appUrl}/${F}/tasks/${encodeURIComponent(G)}`:void 0;var I;return{taskDetailSelectorView:r,authParams:h,isZeniUser:C.isZeniUser(),userGroupList:((I=e.userGroupsState.userGroupByUserGroupId)!==A&&(A=I,Q=Object.values(I)),Q),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Re.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:D,tagListView:S,taskGroupName:l!=null&&k!=null&&k.isDefault===!1?k.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map(p=>N(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(Fe({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(Ce(s,a??l))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ee(t.taskId))},onSnoozeTask:(a,o)=>{e(Ge(a,o))},onUnsnoozeTask:a=>{e(be(a))},onDismissClick:()=>{if(d.state?.message==="triggerBackClick"){const a=Y(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(Te({taskId:s}))},onDeleteTaskClick:()=>{e(Ie(s))},updateFilesEntity:a=>{e(Se({files:a}))},onDeleteFile:a=>{e(he(a))},onEditFileName:(a,o)=>{e(ge(a,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(W(!1,s))},onCreateTagClick:a=>{e(fe(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(M())},onManageTemplatesClick:()=>{u(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}})(ve);function j(){const e=Z(),t=_(),s=ne(),u=xe(),{taskId:r,taskGroupId:d}=oe(),l=g(i=>O(i)),k=Pe(l?.companyId),{useFeatureGate:a}=ye(),{isFeatureEnabled:o}=a(b.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(b.isTaskVisibilityEnabled),{isFeatureEnabled:S}=a(b.isTaskCannedResponsesEnabled),{isFeatureEnabled:F}=a(b.isTaskRecurringParentEnabled),{isFeatureEnabled:G}=a(b.isTaskGroupAssigneesEnabled),[D,I]=c.useState(!1),[p,J]=c.useState(!1),[R,K]=c.useState(!1),[B,ee]=c.useState(!1),[P,x]=c.useState(!1),T=c.useRef(!1),E=g(i=>i.taskListState.updateTasksFetchState.fetchState),U=g(i=>H(i)),L=g(i=>i.taskGroupViewState.fetchState);c.useEffect(()=>{p||(J(!0),t(W(!1,r)))},[p,t]),c.useEffect(()=>{R||U.fetchState==="Completed"||(K(!0),t(pe()))},[R,t,U.fetchState]),c.useEffect(()=>{B||L==="Completed"||(ee(!0),t(ue()))},[B,t,L]);const ae=c.useCallback(()=>{r!=null&&(T.current=!1,t(ke([r],null,{isArchived:!1})),x(!0))},[t,r]);c.useEffect(()=>{if(P)if(E!=="In-Progress"){if(T.current){if(E==="Error")return x(!1),void(T.current=!1);if(E==="Completed"){x(!1),T.current=!1;const{tenantEmailDomain:i}=l;if(s.state?.message==="triggerBackClick"){const m=Y(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 T.current=!0},[P,E,l,s,e]);const $=g(i=>X(i,r)),y=$.fetchState,q=C.getSignedInUser();if(q==null)throw Error("Can't access task detail page without signing in...");if(y==="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:[y==="Completed"?n.jsx(je,{analytics:z,onLoad:i=>(m=>m.trackPageLoaded(we.Event.taskDetailPage))(i)}):null,n.jsxs(Ne,{children:[n.jsx(Ue,{isAppContentDrawerOpen:D,handleDrawerToggle:i=>{I(i)}}),n.jsx(qe,{analytics:z,currentTenant:l,handleZeniLogoClick:()=>{u.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:q,navigate:e,taskGroupId:d,taskId:r,taskDetailFetchState:y,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:S,isTaskRecurringParentEnabled:F,isTaskGroupAssigneesEnabled:G})]})]})}const Ne=Be.div`
1
+ import{j as n}from"./liveblocks-Cjqg1XsV.js";import se from"./NotFoundScreen-CiYbMRBm.js";import{a as c}from"./sentry-DTwqiEdO.js";import{j as Z,h as _,g,u as ne,l as oe,N as ie,k as re,n as ce,o as f}from"./core-B1Jz41nC.js";import{Gd as M,Gg as le,Gj as de,eQ as O,Qk as H,Fx as W,Ff as pe,FZ as ue,FS as ke,Ql as X,Qm as N,Fb as me,F8 as fe,q9 as ge,pZ as he,ka as Se,Fn as Ie,Qn as Te,Fs as be,Fp as Ge,Fi as Ee,FC as Ce,FB as Fe}from"./zeni-epic-state-CFJ-5drS.js";import{z as C,cG as De,r as xe,y as ye,S as b,p as Y,q as w,x as je,d as z,f as we,cH as ve,h as V,aq as Re}from"./index-DnoGJKuR.js";import{n as Be}from"./mui-DSSmRxLI.js";import{u as Pe}from"./useInitialThreadRequest-CPdwuo-t.js";import{M as Ue}from"./MobileAppDrawer-B5ryN7bV.js";import Le from"./TaskListScreen-BBtnIRpq.js";import"./recharts-DW5j2-RD.js";import"./analytics-B134UjSL.js";import"./plaid-H6p_O3yl.js";import"./dnd-DumzdahX.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-v1nIzb.js";import"./lexical-DsIUchFW.js";import"./pdf-SAu_SEbF.js";import"./utils-CCEyXo02.js";import"./useAskAiCfoHostNavButtonProps-D1ncSYVo.js";import"./useFetchSuggestedQuestionsWhenReady-BD5FIrcH.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]="7a5d74c3-c947-4acf-b38d-f6ff942fe3b2",e._sentryDebugIdIdentifier="sentry-dbid-7a5d74c3-c947-4acf-b38d-f6ff942fe3b2")}catch{}})();function $e(){const e=Z(),t=_(),s=C.getSignedInUser(),{cannedResponses:u,fetchState:r,saveFetchState:d}=g(o=>o.cannedResponsesState),l=c.useCallback(()=>{t(M())},[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(De,{cannedResponses:u,isLoading:r==="In-Progress"||r==="Not-Started",isSaving:d==="In-Progress",onBackClick:()=>e(-1),onDelete:a,onFetch:l,onSave:k})}let A,Q=[];const qe=re(function(e,t){const{location:s,taskGroupId:u}=t,r=X(e,t.taskId),d=O(e),l=r.taskGroupId??u,k=l!=null?N(e.taskGroupState,l):void 0,a=C.getSignedInUser(),o=d.tenantId,h={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:o??""},S=H(e),{tenantEmailDomain:F}=d,G=r.recurringSourceTaskId,D=G!=null?`${V.appUrl}/${F}/tasks/${encodeURIComponent(G)}`:void 0;var I;return{taskDetailSelectorView:r,authParams:h,isZeniUser:C.isZeniUser(),userGroupList:((I=e.userGroupsState.userGroupByUserGroupId)!==A&&(A=I,Q=Object.values(I)),Q),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Re.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:D,tagListView:S,taskGroupName:l!=null&&k!=null&&k.isDefault===!1?k.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map(p=>N(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(Fe({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(Ce(s,a??l))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ee(t.taskId))},onSnoozeTask:(a,o)=>{e(Ge(a,o))},onUnsnoozeTask:a=>{e(be(a))},onDismissClick:()=>{if(d.state?.message==="triggerBackClick"){const a=Y(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(Te({taskId:s}))},onDeleteTaskClick:()=>{e(Ie(s))},updateFilesEntity:a=>{e(Se({files:a}))},onDeleteFile:a=>{e(he(a))},onEditFileName:(a,o)=>{e(ge(a,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(W(!1,s))},onCreateTagClick:a=>{e(fe(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(M())},onManageTemplatesClick:()=>{u(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}})(ve);function j(){const e=Z(),t=_(),s=ne(),u=xe(),{taskId:r,taskGroupId:d}=oe(),l=g(i=>O(i)),k=Pe(l?.companyId),{useFeatureGate:a}=ye(),{isFeatureEnabled:o}=a(b.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(b.isTaskVisibilityEnabled),{isFeatureEnabled:S}=a(b.isTaskCannedResponsesEnabled),{isFeatureEnabled:F}=a(b.isTaskRecurringParentEnabled),{isFeatureEnabled:G}=a(b.isTaskGroupAssigneesEnabled),[D,I]=c.useState(!1),[p,J]=c.useState(!1),[R,K]=c.useState(!1),[B,ee]=c.useState(!1),[P,x]=c.useState(!1),T=c.useRef(!1),E=g(i=>i.taskListState.updateTasksFetchState.fetchState),U=g(i=>H(i)),L=g(i=>i.taskGroupViewState.fetchState);c.useEffect(()=>{p||(J(!0),t(W(!1,r)))},[p,t]),c.useEffect(()=>{R||U.fetchState==="Completed"||(K(!0),t(pe()))},[R,t,U.fetchState]),c.useEffect(()=>{B||L==="Completed"||(ee(!0),t(ue()))},[B,t,L]);const ae=c.useCallback(()=>{r!=null&&(T.current=!1,t(ke([r],null,{isArchived:!1})),x(!0))},[t,r]);c.useEffect(()=>{if(P)if(E!=="In-Progress"){if(T.current){if(E==="Error")return x(!1),void(T.current=!1);if(E==="Completed"){x(!1),T.current=!1;const{tenantEmailDomain:i}=l;if(s.state?.message==="triggerBackClick"){const m=Y(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 T.current=!0},[P,E,l,s,e]);const $=g(i=>X(i,r)),y=$.fetchState,q=C.getSignedInUser();if(q==null)throw Error("Can't access task detail page without signing in...");if(y==="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:[y==="Completed"?n.jsx(je,{analytics:z,onLoad:i=>(m=>m.trackPageLoaded(we.Event.taskDetailPage))(i)}):null,n.jsxs(Ne,{children:[n.jsx(Ue,{isAppContentDrawerOpen:D,handleDrawerToggle:i=>{I(i)}}),n.jsx(qe,{analytics:z,currentTenant:l,handleZeniLogoClick:()=>{u.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:q,navigate:e,taskGroupId:d,taskId:r,taskDetailFetchState:y,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:S,isTaskRecurringParentEnabled:F,isTaskGroupAssigneesEnabled:G})]})]})}const Ne=Be.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -0,0 +1 @@
1
+ import{j as t}from"./liveblocks-Cjqg1XsV.js";import i from"./NotFoundScreen-CiYbMRBm.js";import{T as r}from"./TransactionDetailScreen-DBF06PeT.js";import"./sentry-DTwqiEdO.js";import{n as a,o}from"./core-B1Jz41nC.js";import"./zeni-epic-state-CFJ-5drS.js";import"./recharts-DW5j2-RD.js";import"./index-DnoGJKuR.js";import"./mui-DSSmRxLI.js";import"./analytics-B134UjSL.js";import"./plaid-H6p_O3yl.js";import"./dnd-DumzdahX.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-v1nIzb.js";import"./lexical-DsIUchFW.js";import"./pdf-SAu_SEbF.js";import"./utils-CCEyXo02.js";import"./useAskAiCfoHostNavButtonProps-D1ncSYVo.js";import"./useFetchSuggestedQuestionsWhenReady-BD5FIrcH.js";import"./decodeURIComponentSafe-HQbzOYEL.js";import"./routePaths-DBUEUOgS.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]="eb8d9915-3f2e-47a0-a713-5db167080b95",e._sentryDebugIdIdentifier="sentry-dbid-eb8d9915-3f2e-47a0-a713-5db167080b95")}catch{}})();function q(){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{q as default};
@@ -1,4 +1,4 @@
1
- import{j as I}from"./liveblocks-DNAiUJc8.js";import{a as d}from"./sentry-3H-Lcjnl.js";import{h as j,g as S,u as re,j as le,l as de,N as Oe,k as Re}from"./core-BR1djmRq.js";import{bn as je,eQ as K,cQ as ue,bv as me,pQ as Q,Kq as w,Lr as pe,Ls as Y,KQ as he,jN as fe,Lt as ge,KV as X,KW as Z,kC as Se,Hp as J,Kk as x,jH as ye,jF as Te,jR as Me,Lu as $e,Lv as qe,tM as R,jM as ve,GM as Ee,cV as He,cW as We,Lw as Ke,Kj as Qe,Lx as Ye,tQ as Xe,Ly as Ze,Lz as Je,LA as ea,LB as aa,LC as ta,jQ as na,LD as oa,LE as sa,Kl as ia,LF as ca,LG as ra,LH as la,GG as da,Gu as ua,GY as ma,jS as pa,Hq as ie,GD as ha}from"./zeni-epic-state-B1K_6mks.js";import{z as De,y as ee,S as _,aK as be,m as fa,Z as ga,aL as Sa,G as ya,p as H,c as Ta,aM as va,q as W,d as Ce,aN as Ea,aq as Da,X as q}from"./index-DyLQ8mi9.js";import{n as ba,S as Ca,D as Ia}from"./mui-CgXDoZXy.js";import{u as ka}from"./useAskAiCfoHostNavButtonProps-DOg8XSPO.js";import{c as La}from"./useFetchSuggestedQuestionsWhenReady-BGkosJUF.js";import{d as Ie}from"./decodeURIComponentSafe-rU-V5qiY.js";import{h as ke,g as Aa,d as Ua,b as xa}from"./routePaths-mOv9oizB.js";import{t as _a}from"./utils-BrTYpNjH.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]="3d5c8071-bb8d-4705-b71a-f55829df25e1",a._sentryDebugIdIdentifier="sentry-dbid-3d5c8071-bb8d-4705-b71a-f55829df25e1")}catch{}})();const ae=()=>{const a=De.getSignedInUser(),{useFeatureGate:e}=ee(),{isFeatureEnabled:s}=e(_.isChainOfThoughtEnabled);return d.useMemo(()=>je(a)&&s,[a,s])};function Le(a){if(a!=null){if("customer"in a&&a.customer!=null){const{customer:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in a&&a.vendor!=null){const{vendor:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function Ya(a,e){const s=j(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=S(u=>K(u)),i=o.userRole.includes("charge_card_user")||o.userRole.includes("charge_card_admin"),l=o.userRole!=null&&ue(o.userRole),g=o.userRole!=null&&me(o.userRole),{isFeatureEnabled:y}=t(_.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:C}=t(_.isExpenseAutomationEnabled),{configValue:h}=n(be.enableUncategorizedExpenseCategory),f=h?.uncategorized_expense_category_enabled===!0,k=ae(),T=d.useMemo(()=>({id:a,type:Q(e)}),[a,e]),m=S(u=>w(u,T)),b=S(u=>{const N=w(u,T)?.transactionDetailLocalData.vendorUpdates?.id;return N==null?"Not-Started":u.transactionVendorViewState.editVendorStateById[N]?.saveStatus.fetchState??"Not-Started"}),p=d.useMemo(()=>m?.fetchState==="Completed"?Le(m?.transaction):void 0,[m?.fetchState,m?.transaction]),E=S(u=>{if(p!=null)return pe(u.customerIncomeState,u.vendorExpenseState,u.trendState,p,"month")}),L=S(u=>Y(u)),V=S(u=>{if(p!=null)return he(u.trendWithTransactionsState,p,"TransactionDetail")}),M=o.company?.companyInfo.firstMonthOfFY??1,$=S(u=>fe(u.accountState,u.accountListState,"accountList")),[P,B]=d.useState(!1),[F,v]=d.useState(!1),[c,z]=d.useState(!1);d.useEffect(()=>{B(!1),v(!1),z(!1)},[a,e]);const D=d.useCallback(()=>{B(!1),v(!1)},[]),[A,U]=d.useState(!1),G=V?.selectedPeriod?.timePeriod;return d.useEffect(()=>{c||m==null||m.transaction==null||(s(ge({id:m.transaction.id,type:m.transaction.type})),z(!0)),p!=null&&(!i||l&&g===!1)&&(P?F||E==null||(v(!0),s(J(p,"TransactionDetail",{timeframe:"month",timePeriod:G??E}))):(s(X()),s(Z()),B(!0),s(Se(p))))},[s,c,m?.fetchState,m?.transaction,p,i,l,g,P,F,E,G]),d.useEffect(()=>{L.newVendorState?.vendorDetailLocalData?.vendorName!=null?U(!0):U(!1)},[L.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{s(x("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:i,isUserHasDashboardAccess:l,isUserHasInvestorOrBankerAccess:g,isVendorBulkUpdateOnTransactionEnabled:y,isExpenseAutomationEnabled:C,isUncategorizedExpenseCategoryEnabled:f,isChainOfThoughtEnabled:k,selectedTransaction:T,transactionDetail:m,vendorSaveStatus:b,tranEntity:p,defaultTrendTransactionTimePeriod:E,vendorViewDetails:L,uiState:V,firstMonthOfFY:M,uncategorizedAccounts:$,resetTrendIsFetchedStates:D,isCreateVendorDrawerOpen:A,setIsCreateVendorDrawerOpen:U}}const Va={overlayWidth:new ya(100,100,58)},Ba=({isOpen:a,onSaveVendor:e,onSaveSuccess:s,onCancel:t,vendorViewDetails:n})=>{const o=fa(),i=ga(),l=j(),g=S(h=>Y(h)),y=()=>{t()},C={vendorDetailView:n??g,onSaveSuccess:()=>{l(Te()),l(Me("Not-Started")),s()},onSaveVendor:e,onCancelClick:y,saveVendorDetailLocalData:h=>{l(ye({vendorId:void 0,localData:h}))}};return I.jsx(Ia,{anchor:"right",open:a,PaperProps:{style:{width:Va.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:y,children:I.jsx(wa,{onClick:h=>h.stopPropagation(),children:I.jsx(Sa,{...C})})})},wa=ba(Ca)`
1
+ import{j as I}from"./liveblocks-Cjqg1XsV.js";import{a as d}from"./sentry-DTwqiEdO.js";import{h as j,g as S,u as re,j as le,l as de,N as Oe,k as Re}from"./core-B1Jz41nC.js";import{bn as je,eQ as K,cQ as ue,bv as me,pQ as Q,Kq as w,Lr as pe,Ls as Y,KQ as he,jN as fe,Lt as ge,KV as X,KW as Z,kC as Se,Hp as J,Kk as x,jH as ye,jF as Te,jR as Me,Lu as $e,Lv as qe,tM as R,jM as ve,GM as Ee,cV as He,cW as We,Lw as Ke,Kj as Qe,Lx as Ye,tQ as Xe,Ly as Ze,Lz as Je,LA as ea,LB as aa,LC as ta,jQ as na,LD as oa,LE as sa,Kl as ia,LF as ca,LG as ra,LH as la,GG as da,Gu as ua,GY as ma,jS as pa,Hq as ie,GD as ha}from"./zeni-epic-state-CFJ-5drS.js";import{z as De,y as ee,S as _,aK as be,m as fa,Z as ga,aL as Sa,G as ya,p as H,c as Ta,aM as va,q as W,d as Ce,aN as Ea,aq as Da,X as q}from"./index-DnoGJKuR.js";import{n as ba,S as Ca,D as Ia}from"./mui-DSSmRxLI.js";import{u as ka}from"./useAskAiCfoHostNavButtonProps-D1ncSYVo.js";import{c as La}from"./useFetchSuggestedQuestionsWhenReady-BD5FIrcH.js";import{d as Ie}from"./decodeURIComponentSafe-HQbzOYEL.js";import{h as ke,g as Aa,d as Ua,b as xa}from"./routePaths-DBUEUOgS.js";import{t as _a}from"./utils-CCEyXo02.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]="3d5c8071-bb8d-4705-b71a-f55829df25e1",a._sentryDebugIdIdentifier="sentry-dbid-3d5c8071-bb8d-4705-b71a-f55829df25e1")}catch{}})();const ae=()=>{const a=De.getSignedInUser(),{useFeatureGate:e}=ee(),{isFeatureEnabled:s}=e(_.isChainOfThoughtEnabled);return d.useMemo(()=>je(a)&&s,[a,s])};function Le(a){if(a!=null){if("customer"in a&&a.customer!=null){const{customer:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in a&&a.vendor!=null){const{vendor:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function Ya(a,e){const s=j(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=S(u=>K(u)),i=o.userRole.includes("charge_card_user")||o.userRole.includes("charge_card_admin"),l=o.userRole!=null&&ue(o.userRole),g=o.userRole!=null&&me(o.userRole),{isFeatureEnabled:y}=t(_.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:C}=t(_.isExpenseAutomationEnabled),{configValue:h}=n(be.enableUncategorizedExpenseCategory),f=h?.uncategorized_expense_category_enabled===!0,k=ae(),T=d.useMemo(()=>({id:a,type:Q(e)}),[a,e]),m=S(u=>w(u,T)),b=S(u=>{const N=w(u,T)?.transactionDetailLocalData.vendorUpdates?.id;return N==null?"Not-Started":u.transactionVendorViewState.editVendorStateById[N]?.saveStatus.fetchState??"Not-Started"}),p=d.useMemo(()=>m?.fetchState==="Completed"?Le(m?.transaction):void 0,[m?.fetchState,m?.transaction]),E=S(u=>{if(p!=null)return pe(u.customerIncomeState,u.vendorExpenseState,u.trendState,p,"month")}),L=S(u=>Y(u)),V=S(u=>{if(p!=null)return he(u.trendWithTransactionsState,p,"TransactionDetail")}),M=o.company?.companyInfo.firstMonthOfFY??1,$=S(u=>fe(u.accountState,u.accountListState,"accountList")),[P,B]=d.useState(!1),[F,v]=d.useState(!1),[c,z]=d.useState(!1);d.useEffect(()=>{B(!1),v(!1),z(!1)},[a,e]);const D=d.useCallback(()=>{B(!1),v(!1)},[]),[A,U]=d.useState(!1),G=V?.selectedPeriod?.timePeriod;return d.useEffect(()=>{c||m==null||m.transaction==null||(s(ge({id:m.transaction.id,type:m.transaction.type})),z(!0)),p!=null&&(!i||l&&g===!1)&&(P?F||E==null||(v(!0),s(J(p,"TransactionDetail",{timeframe:"month",timePeriod:G??E}))):(s(X()),s(Z()),B(!0),s(Se(p))))},[s,c,m?.fetchState,m?.transaction,p,i,l,g,P,F,E,G]),d.useEffect(()=>{L.newVendorState?.vendorDetailLocalData?.vendorName!=null?U(!0):U(!1)},[L.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{s(x("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:i,isUserHasDashboardAccess:l,isUserHasInvestorOrBankerAccess:g,isVendorBulkUpdateOnTransactionEnabled:y,isExpenseAutomationEnabled:C,isUncategorizedExpenseCategoryEnabled:f,isChainOfThoughtEnabled:k,selectedTransaction:T,transactionDetail:m,vendorSaveStatus:b,tranEntity:p,defaultTrendTransactionTimePeriod:E,vendorViewDetails:L,uiState:V,firstMonthOfFY:M,uncategorizedAccounts:$,resetTrendIsFetchedStates:D,isCreateVendorDrawerOpen:A,setIsCreateVendorDrawerOpen:U}}const Va={overlayWidth:new ya(100,100,58)},Ba=({isOpen:a,onSaveVendor:e,onSaveSuccess:s,onCancel:t,vendorViewDetails:n})=>{const o=fa(),i=ga(),l=j(),g=S(h=>Y(h)),y=()=>{t()},C={vendorDetailView:n??g,onSaveSuccess:()=>{l(Te()),l(Me("Not-Started")),s()},onSaveVendor:e,onCancelClick:y,saveVendorDetailLocalData:h=>{l(ye({vendorId:void 0,localData:h}))}};return I.jsx(Ia,{anchor:"right",open:a,PaperProps:{style:{width:Va.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:y,children:I.jsx(wa,{onClick:h=>h.stopPropagation(),children:I.jsx(Sa,{...C})})})},wa=ba(Ca)`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  flex-direction: column;
@@ -1 +1 @@
1
- import{j as i}from"./liveblocks-DNAiUJc8.js";import{j as J,u as R,h as N,l as H,g as j,N as z,k as Q,n as Ae,o as b}from"./core-BR1djmRq.js";import{eQ as $,i$ as T,OP as Z,Hg as ue,bq as ie,OQ as Se,jC as K,KS as W,OR as se,OS as he,bE as x,Hd as me,OT as ke,OU as re,OV as Ie,OW as pe,OX as be,OY as ve,OZ as de,It as Ye,bn as xe}from"./zeni-epic-state-B1K_6mks.js";import{D as X,d as M,c6 as ee,q as w,p as te,y as fe,S as U,T as Ee,z as Pe}from"./index-DyLQ8mi9.js";import"./mui-CgXDoZXy.js";import{a as y}from"./sentry-3H-Lcjnl.js";import{w as ae}from"./withTransactionSidePanel-CyW-aabp.js";import{p as ne,b as ce}from"./routePaths-mOv9oizB.js";import{u as Oe}from"./utils-BrTYpNjH.js";import{d as O}from"./decodeURIComponentSafe-rU-V5qiY.js";import{Z as je}from"./ZeniAccountStatementScreen-DKQAWQ4j.js";import"./recharts-DzRX0aWK.js";import"./analytics-B4UJAsLA.js";import"./plaid-A3mYO1wj.js";import"./dnd-WGKE6-QR.js";import"./stripe-DMRn4zHo.js";import"./lottie-CXwx4IFe.js";import"./lexical-GYG14AuY.js";import"./pdf-B31DLhP9.js";import"./useAskAiCfoHostNavButtonProps-DOg8XSPO.js";import"./useFetchSuggestedQuestionsWhenReady-BGkosJUF.js";import"./TransactionDetailScreen-2jVMUnKw.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]="4cb5c4bd-712d-4e1d-9df6-3bf5436e1e51",a._sentryDebugIdIdentifier="sentry-dbid-4cb5c4bd-712d-4e1d-9df6-3bf5436e1e51")}catch{}})();const Le=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],G=a=>Oe(a),ze=Q(function(a,e){const t=Se(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,G(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=X.getLocalizedStrings(),s=G(e.selectedAccount.tranListType),r=Be(t,n,c,s,e.bookCloseDate);M.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(se({uiState:{dateRange:r},type:G(e.selectedAccount.tranListType)})),a(ue(s,T(r),!1,s==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(T(r))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(se({uiState:{scrollYOffset:t},type:G(e.selectedAccount.tranListType)}))}}})(ee),_=ae(function({...a}){const e=J(),t=R(),n=N(),c=t.pathname.split("/").find(d=>Le.includes(d)),o=c??"uncategorized-expense",{tenantEmailDomain:s}=H(),r=X.getLocalizedStrings(),{accountType:p,title:A,subTitle:S}=Me(o),h="month",k=j(d=>$(d)),D=k.company?.companyInfo.firstMonthOfFY??1,{dataAvailable:g,initialTimeframeTick:v}=Ce(o,D,k.bookCloseDate),[E,C]=y.useState(!1),[Y,B]=y.useState(void 0),l=y.useMemo(()=>{const d=T(v);return{tranListType:o,accountType:Z(p),title:A,subTitle:S,timeframe:h,period:d}},[o,h,p,g]);y.useEffect(()=>{if(!E&&l!=null){C(!0),M.trackTransactionList(void 0,void 0,void 0,l.title);const d=G(l.tranListType);n(ue(d,l.period,!0,d==="missingReceipts"?r.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[E,l,n]);let P=l;return l!=null&&Y!=null&&(P={...l,period:Y}),c==null||P==null?i.jsx(z,{to:"../"}):i.jsx(ze,{firstMonthOfFY:D,tenantEmailDomain:s,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:g,navigate:e,selectedAccount:P,referrerType:o,bookCloseDate:k.bookCloseDate,onSelectedTimePeriodChange:d=>B(d),...a})}),Me=a=>{let e="",t="";const n=X.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:""}},Ce=(a,e,t)=>{const n=ie();let c=ie().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:ne(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Be=(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},Fe=Q(function(a,e){const t=ke(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:W(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Te();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)}`),M.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(me(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(ee),_e=ae(function({referrerType:a,...e}){const t=J(),n=R(),c=N(),{tenantEmailDomain:o,accountTypeEncoded:s,accountIdEncoded:r,classIdEncoded:p,timeframe:A,startDate:S,endDate:h,titleEncoded:k}=H(),D=O(s??""),g=O(r??""),v=O(p??""),E=O(k??""),C=j(f=>he(f.transactionListState,g,D,v)),[Y,B]=y.useState(!1),[l,P]=y.useState(void 0),d=j(f=>$(f)),V=d.company?.companyInfo.firstMonthOfFY??1;let u;const m=Ge(D,g,v,A,S,h,E);if(m){const f={startDate:x(S,"YYYY-MM-DD"),endDate:x(h,"YYYY-MM-DD")},q=we(C?.dateRange,f);u={accountId:g,accountType:Z(D),classId:v,title:E,timeframe:A,period:q}}y.useEffect(()=>{Y||u==null||(B(!0),M.trackTransactionList(u.accountId,void 0,a,u.title),c(me(u.accountId,u.accountType,u.classId,u.period)))},[Y,u,c]);let L=u;u!=null&&l!=null&&(L={...u,period:l});const F=[s,r,p,A,S,h,k].filter(f=>f!=null);return m&&L!=null?i.jsx(Fe,{firstMonthOfFY:V,tenantEmailDomain:o,location:n,navigate:t,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:f=>P(f),...e}):i.jsx(z,{to:Te(F.length)})}),Te=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ge=(a,e,t,n,c,o,s)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&x(c,"YYYY-MM-DD").isValid()&&x(o,"YYYY-MM-DD").isValid()&&s!=null,we=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),Re=Q(function(a,e){const t=be(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&ve(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??De();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)}`),M.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(pe(e.selectedAccount.accountId,e.selectedAccount.accountType,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=qe(e.tenantEmailDomain),n=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ee),le=ae(function({referrerType:a,...e}){const t=J(),n=R(),c=N(),{tenantEmailDomain:o,accountTypeEncoded:s,accountIdEncoded:r,timeframe:p,startDate:A,endDate:S,titleEncoded:h,excludeSubAccounts:k}=H(),D=O(s??""),g=O(r??""),v=O(h??""),E=!(k!=null&&k==="exclude_subaccounts"),C=j(I=>Ie(I.transactionListState,g,D)),[Y,B]=y.useState(!1),[l,P]=y.useState(void 0),d=j(I=>$(I)),V=d.company?.featuresActivationInfo.connectedAccountProvider==="unit",u=d.company?.companyInfo.firstMonthOfFY??1;let m;const L=$e(D,g,p,A,S,v);if(L){const I={startDate:x(A,"YYYY-MM-DD"),endDate:x(S,"YYYY-MM-DD")},ye=Ve(C?.dateRange,I);m={accountId:g,accountType:Z(D),title:v,timeframe:p,period:ye}}let F=m;m!=null&&l!=null&&(F={...m,period:l});const{useFeatureGate:f}=fe(),{isFeatureEnabled:q}=f(U.isTransactionCommentingEnabled),{areTenantIdsInSync:oe}=Ee();y.useEffect(()=>{!Y&&m!=null&&oe&&(B(!0),M.trackTransactionList(m.accountId,void 0,a,m.title),c(pe(m.accountId,m.accountType,m.period,void 0,!1,E)))},[Y,m,c,oe]);const ge=[s,r,p,A,S,h].filter(I=>I!=null);return L&&F!=null?i.jsx(Re,{firstMonthOfFY:u,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:V,isTransactionCommentingEnabled:q,selectedAccount:F,referrerType:a,onSelectedTimePeriodChange:I=>P(I),...e}):i.jsx(z,{to:De(ge.length)})}),De=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},$e=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&x(n,"YYYY-MM-DD").isValid()&&x(c,"YYYY-MM-DD").isValid()&&o!=null,Ve=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),qe=a=>`/${a}/transactions/${Ye}/statements`;function pt(){const a=R().state?.referrer,e=Pe.getSignedInUser(),t=xe(e),{useFeatureGate:n}=fe(),{isFeatureEnabled:c}=n(U.isExpenseAutomationEnabled),o=j(p=>p.expenseAutomationViewState.selectedPeriodByTenantId)[j(p=>$(p)).tenantId],{isFeatureEnabled:s}=n(U.isExpenseAutomationEnabledV2),r=s||c&&t;return i.jsxs(Ae,{children:[i.jsx(b,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:i.jsx(le,{referrerType:a})}),i.jsx(b,{path:"/zeni-clearing-account/statements",element:i.jsx(je,{})}),i.jsx(b,{path:"/*",element:i.jsx(le,{referrerType:a})}),i.jsx(b,{path:"/uncategorized-income/*",element:i.jsx(_,{})}),i.jsx(b,{path:"/uncategorized-expense/*",element:r?i.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(_,{})}),i.jsx(b,{path:"/miscategorized-income/*",element:i.jsx(_,{})}),i.jsx(b,{path:"/miscategorized-expense/*",element:r?i.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(_,{})}),i.jsx(b,{path:"/missing-receipts/*",element:r?i.jsx(z,{to:`../../month_end_close_checks/review/missing_receipts/${o.month}-${o.year}`}):i.jsx(_,{})}),i.jsx(b,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:i.jsx(_e,{referrerType:a})})]})}export{pt as default};
1
+ import{j as i}from"./liveblocks-Cjqg1XsV.js";import{j as J,u as R,h as N,l as H,g as j,N as z,k as Q,n as Ae,o as b}from"./core-B1Jz41nC.js";import{eQ as $,i$ as T,OP as Z,Hg as ue,bq as ie,OQ as Se,jC as K,KS as W,OR as se,OS as he,bE as x,Hd as me,OT as ke,OU as re,OV as Ie,OW as pe,OX as be,OY as ve,OZ as de,It as Ye,bn as xe}from"./zeni-epic-state-CFJ-5drS.js";import{D as X,d as M,c6 as ee,q as w,p as te,y as fe,S as U,T as Ee,z as Pe}from"./index-DnoGJKuR.js";import"./mui-DSSmRxLI.js";import{a as y}from"./sentry-DTwqiEdO.js";import{w as ae}from"./withTransactionSidePanel-75BTvZCV.js";import{p as ne,b as ce}from"./routePaths-DBUEUOgS.js";import{u as Oe}from"./utils-CCEyXo02.js";import{d as O}from"./decodeURIComponentSafe-HQbzOYEL.js";import{Z as je}from"./ZeniAccountStatementScreen-C83btU9G.js";import"./recharts-DW5j2-RD.js";import"./analytics-B134UjSL.js";import"./plaid-H6p_O3yl.js";import"./dnd-DumzdahX.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-v1nIzb.js";import"./lexical-DsIUchFW.js";import"./pdf-SAu_SEbF.js";import"./useAskAiCfoHostNavButtonProps-D1ncSYVo.js";import"./useFetchSuggestedQuestionsWhenReady-BD5FIrcH.js";import"./TransactionDetailScreen-DBF06PeT.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]="4cb5c4bd-712d-4e1d-9df6-3bf5436e1e51",a._sentryDebugIdIdentifier="sentry-dbid-4cb5c4bd-712d-4e1d-9df6-3bf5436e1e51")}catch{}})();const Le=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],G=a=>Oe(a),ze=Q(function(a,e){const t=Se(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,G(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=X.getLocalizedStrings(),s=G(e.selectedAccount.tranListType),r=Be(t,n,c,s,e.bookCloseDate);M.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(se({uiState:{dateRange:r},type:G(e.selectedAccount.tranListType)})),a(ue(s,T(r),!1,s==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(T(r))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(se({uiState:{scrollYOffset:t},type:G(e.selectedAccount.tranListType)}))}}})(ee),_=ae(function({...a}){const e=J(),t=R(),n=N(),c=t.pathname.split("/").find(d=>Le.includes(d)),o=c??"uncategorized-expense",{tenantEmailDomain:s}=H(),r=X.getLocalizedStrings(),{accountType:p,title:A,subTitle:S}=Me(o),h="month",k=j(d=>$(d)),D=k.company?.companyInfo.firstMonthOfFY??1,{dataAvailable:g,initialTimeframeTick:v}=Ce(o,D,k.bookCloseDate),[E,C]=y.useState(!1),[Y,B]=y.useState(void 0),l=y.useMemo(()=>{const d=T(v);return{tranListType:o,accountType:Z(p),title:A,subTitle:S,timeframe:h,period:d}},[o,h,p,g]);y.useEffect(()=>{if(!E&&l!=null){C(!0),M.trackTransactionList(void 0,void 0,void 0,l.title);const d=G(l.tranListType);n(ue(d,l.period,!0,d==="missingReceipts"?r.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[E,l,n]);let P=l;return l!=null&&Y!=null&&(P={...l,period:Y}),c==null||P==null?i.jsx(z,{to:"../"}):i.jsx(ze,{firstMonthOfFY:D,tenantEmailDomain:s,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:g,navigate:e,selectedAccount:P,referrerType:o,bookCloseDate:k.bookCloseDate,onSelectedTimePeriodChange:d=>B(d),...a})}),Me=a=>{let e="",t="";const n=X.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:""}},Ce=(a,e,t)=>{const n=ie();let c=ie().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:ne(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Be=(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},Fe=Q(function(a,e){const t=ke(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:W(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Te();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)}`),M.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(me(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(ee),_e=ae(function({referrerType:a,...e}){const t=J(),n=R(),c=N(),{tenantEmailDomain:o,accountTypeEncoded:s,accountIdEncoded:r,classIdEncoded:p,timeframe:A,startDate:S,endDate:h,titleEncoded:k}=H(),D=O(s??""),g=O(r??""),v=O(p??""),E=O(k??""),C=j(f=>he(f.transactionListState,g,D,v)),[Y,B]=y.useState(!1),[l,P]=y.useState(void 0),d=j(f=>$(f)),V=d.company?.companyInfo.firstMonthOfFY??1;let u;const m=Ge(D,g,v,A,S,h,E);if(m){const f={startDate:x(S,"YYYY-MM-DD"),endDate:x(h,"YYYY-MM-DD")},q=we(C?.dateRange,f);u={accountId:g,accountType:Z(D),classId:v,title:E,timeframe:A,period:q}}y.useEffect(()=>{Y||u==null||(B(!0),M.trackTransactionList(u.accountId,void 0,a,u.title),c(me(u.accountId,u.accountType,u.classId,u.period)))},[Y,u,c]);let L=u;u!=null&&l!=null&&(L={...u,period:l});const F=[s,r,p,A,S,h,k].filter(f=>f!=null);return m&&L!=null?i.jsx(Fe,{firstMonthOfFY:V,tenantEmailDomain:o,location:n,navigate:t,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:f=>P(f),...e}):i.jsx(z,{to:Te(F.length)})}),Te=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ge=(a,e,t,n,c,o,s)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&x(c,"YYYY-MM-DD").isValid()&&x(o,"YYYY-MM-DD").isValid()&&s!=null,we=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),Re=Q(function(a,e){const t=be(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&ve(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??De();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)}`),M.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(pe(e.selectedAccount.accountId,e.selectedAccount.accountType,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=qe(e.tenantEmailDomain),n=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ee),le=ae(function({referrerType:a,...e}){const t=J(),n=R(),c=N(),{tenantEmailDomain:o,accountTypeEncoded:s,accountIdEncoded:r,timeframe:p,startDate:A,endDate:S,titleEncoded:h,excludeSubAccounts:k}=H(),D=O(s??""),g=O(r??""),v=O(h??""),E=!(k!=null&&k==="exclude_subaccounts"),C=j(I=>Ie(I.transactionListState,g,D)),[Y,B]=y.useState(!1),[l,P]=y.useState(void 0),d=j(I=>$(I)),V=d.company?.featuresActivationInfo.connectedAccountProvider==="unit",u=d.company?.companyInfo.firstMonthOfFY??1;let m;const L=$e(D,g,p,A,S,v);if(L){const I={startDate:x(A,"YYYY-MM-DD"),endDate:x(S,"YYYY-MM-DD")},ye=Ve(C?.dateRange,I);m={accountId:g,accountType:Z(D),title:v,timeframe:p,period:ye}}let F=m;m!=null&&l!=null&&(F={...m,period:l});const{useFeatureGate:f}=fe(),{isFeatureEnabled:q}=f(U.isTransactionCommentingEnabled),{areTenantIdsInSync:oe}=Ee();y.useEffect(()=>{!Y&&m!=null&&oe&&(B(!0),M.trackTransactionList(m.accountId,void 0,a,m.title),c(pe(m.accountId,m.accountType,m.period,void 0,!1,E)))},[Y,m,c,oe]);const ge=[s,r,p,A,S,h].filter(I=>I!=null);return L&&F!=null?i.jsx(Re,{firstMonthOfFY:u,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:V,isTransactionCommentingEnabled:q,selectedAccount:F,referrerType:a,onSelectedTimePeriodChange:I=>P(I),...e}):i.jsx(z,{to:De(ge.length)})}),De=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},$e=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&x(n,"YYYY-MM-DD").isValid()&&x(c,"YYYY-MM-DD").isValid()&&o!=null,Ve=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),qe=a=>`/${a}/transactions/${Ye}/statements`;function pt(){const a=R().state?.referrer,e=Pe.getSignedInUser(),t=xe(e),{useFeatureGate:n}=fe(),{isFeatureEnabled:c}=n(U.isExpenseAutomationEnabled),o=j(p=>p.expenseAutomationViewState.selectedPeriodByTenantId)[j(p=>$(p)).tenantId],{isFeatureEnabled:s}=n(U.isExpenseAutomationEnabledV2),r=s||c&&t;return i.jsxs(Ae,{children:[i.jsx(b,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:i.jsx(le,{referrerType:a})}),i.jsx(b,{path:"/zeni-clearing-account/statements",element:i.jsx(je,{})}),i.jsx(b,{path:"/*",element:i.jsx(le,{referrerType:a})}),i.jsx(b,{path:"/uncategorized-income/*",element:i.jsx(_,{})}),i.jsx(b,{path:"/uncategorized-expense/*",element:r?i.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(_,{})}),i.jsx(b,{path:"/miscategorized-income/*",element:i.jsx(_,{})}),i.jsx(b,{path:"/miscategorized-expense/*",element:r?i.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(_,{})}),i.jsx(b,{path:"/missing-receipts/*",element:r?i.jsx(z,{to:`../../month_end_close_checks/review/missing_receipts/${o.month}-${o.year}`}):i.jsx(_,{})}),i.jsx(b,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:i.jsx(_e,{referrerType:a})})]})}export{pt as default};
@@ -1,4 +1,4 @@
1
- import{j as e}from"./liveblocks-DNAiUJc8.js";import{j as B,u as L,h as P,l as O,g as f,N as U,k as M,n as Te,o as k}from"./core-BR1djmRq.js";import{cm as V,eQ as D,NA as R,DK as ae,fe as H,Ds as ne,NC as we,DN as Ie,Ny as Ce,Nz as se,NR as ke,BU as je,sJ as be,NE as Ae,DY as Ee,NB as re,cP as W,wP as oe,eU as ve,eW as De,OM as Fe,ON as Ue,Dt as Be,OO as Le,Du as Pe,DD as Re,bv as Ne,bF as Oe,cx as Me,bG as Ve,cl as ze,fd as _e,bs as Ge,Jd as $e,ck as qe}from"./zeni-epic-state-B1K_6mks.js";import{c as z,an as He,z as A,x as _,d as j,b$ as We,c0 as Ze,c1 as q,Z,m as Ke,T as Je,y as ie,S as v,G as Qe,v as Ye,c2 as Xe,aq as K,q as et,c3 as tt,p as J,c4 as at,B as Y,c5 as nt,a6 as st}from"./index-DyLQ8mi9.js";import{D as rt,n as N,S as ot}from"./mui-CgXDoZXy.js";import it from"./NotFoundScreen-CeLQUNEa.js";import{S as X}from"./SetupPagesScreen-BQGBgHyQ.js";import{a as d}from"./sentry-3H-Lcjnl.js";import{u as ct}from"./useAskAiCfoHostNavButtonProps-DOg8XSPO.js";import{c as lt}from"./useFetchSuggestedQuestionsWhenReady-BGkosJUF.js";import{u as ut}from"./useInitialThreadRequest-BCkp7NE4.js";import{M as ce}from"./MobileAppDrawer-BueQODeb.js";import{F as dt}from"./FeaturePreviewScreen-FgARC5V8.js";import{a as ee}from"./analyticsHelper-E0KniwhU.js";import"./recharts-DzRX0aWK.js";import"./analytics-B4UJAsLA.js";import"./plaid-A3mYO1wj.js";import"./dnd-WGKE6-QR.js";import"./stripe-DMRn4zHo.js";import"./lottie-CXwx4IFe.js";import"./lexical-GYG14AuY.js";import"./pdf-B31DLhP9.js";import"./utils-BrTYpNjH.js";import"./routePaths-mOv9oizB.js";import"./BusinessVerificationPageScreen-Ctv5uoxk.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]="c79479de-cac3-4687-8847-b765637e72a7",t._sentryDebugIdIdentifier="sentry-dbid-c79479de-cac3-4687-8847-b765637e72a7")}catch{}})();const pt=M(function(t,a){const{companyId:n}=a;return{treasurySetupView:R(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(we(r))}}})(We);function mt(){const t=B(),a=L(),n=P(),{tenantEmailDomain:o}=O(),p=z(),r=f(C=>C.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=He(r),s=V(p?.loggedInUserRoleMap),[l,i]=d.useState(!1),[g,I]=d.useState(!1),[u,c]=d.useState(!1),h=f(C=>D(C)),y=A.getSignedInUserTenant(o)?.companyId??h.companyId,T=A.getSignedInUser(),S=f(C=>R(C,y)),w=f(C=>C.treasurySetupViewState.fetchState),x=f(C=>C.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=f(C=>C.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(T==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{l||w!=="Not-Started"||y==null||(i(!0),n(ae(y,!0,!1)))},[l,w,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(U,{to:"../promo"});const E=h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||w!=="Completed";return e.jsxs(e.Fragment,{children:[!E&&e.jsx(_,{analytics:j,onLoad:()=>{}}),e.jsx(pt,{navigate:t,location:a,companyId:y,isEditMode:!0,isLoading:E,isReadOnly:!s,treasurySetupView:S,analytics:j})]})}const ft=M(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:ke(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:R(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(Ee())},onSaveChangesToLocalStore:s=>{t(Ae(s))},onFetchLinkTokenClick:s=>{t(be("treasury_setup",s))},onEstablishConnectionClick:s=>{t(je(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(Ze),yt=({isFirstTransfer:t})=>{const a=B(),{tenantEmailDomain:n}=O(),o=P(),[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)),T=A.getSignedInUserTenant(n)?.companyId??y.companyId,S=f(x=>Ce(x)),w=f(x=>R(x,T));if(A.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||T==null||(s(!0),o(ae(T,!0,!1)))},[m,u,T,o]),d.useEffect(()=>{l||c!=="Not-Started"||T==null||(i(!0),o(H()))},[l,c,T,o]),d.useEffect(()=>{g||h!=="Not-Started"||T==null||(I(!0),o(ne()))},[g,h,T,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:w,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{q(j,"review",S.treasuryTransferMoneyLocalData,w.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},gt=N.div`
1
+ import{j as e}from"./liveblocks-Cjqg1XsV.js";import{j as B,u as L,h as P,l as O,g as f,N as U,k as M,n as Te,o as k}from"./core-B1Jz41nC.js";import{cm as V,eQ as D,NA as R,DK as ae,fe as H,Ds as ne,NC as we,DN as Ie,Ny as Ce,Nz as se,NR as ke,BU as je,sJ as be,NE as Ae,DY as Ee,NB as re,cP as W,wP as oe,eU as ve,eW as De,OM as Fe,ON as Ue,Dt as Be,OO as Le,Du as Pe,DD as Re,bv as Ne,bF as Oe,cx as Me,bG as Ve,cl as ze,fd as _e,bs as Ge,Jd as $e,ck as qe}from"./zeni-epic-state-CFJ-5drS.js";import{c as z,an as He,z as A,x as _,d as j,b$ as We,c0 as Ze,c1 as q,Z,m as Ke,T as Je,y as ie,S as v,G as Qe,v as Ye,c2 as Xe,aq as K,q as et,c3 as tt,p as J,c4 as at,B as Y,c5 as nt,a6 as st}from"./index-DnoGJKuR.js";import{D as rt,n as N,S as ot}from"./mui-DSSmRxLI.js";import it from"./NotFoundScreen-CiYbMRBm.js";import{S as X}from"./SetupPagesScreen-BbHEiKJR.js";import{a as d}from"./sentry-DTwqiEdO.js";import{u as ct}from"./useAskAiCfoHostNavButtonProps-D1ncSYVo.js";import{c as lt}from"./useFetchSuggestedQuestionsWhenReady-BD5FIrcH.js";import{u as ut}from"./useInitialThreadRequest-CPdwuo-t.js";import{M as ce}from"./MobileAppDrawer-B5ryN7bV.js";import{F as dt}from"./FeaturePreviewScreen-C38iY35s.js";import{a as ee}from"./analyticsHelper-CRpkSjLL.js";import"./recharts-DW5j2-RD.js";import"./analytics-B134UjSL.js";import"./plaid-H6p_O3yl.js";import"./dnd-DumzdahX.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-v1nIzb.js";import"./lexical-DsIUchFW.js";import"./pdf-SAu_SEbF.js";import"./utils-CCEyXo02.js";import"./routePaths-DBUEUOgS.js";import"./BusinessVerificationPageScreen-CdptLI3O.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]="c79479de-cac3-4687-8847-b765637e72a7",t._sentryDebugIdIdentifier="sentry-dbid-c79479de-cac3-4687-8847-b765637e72a7")}catch{}})();const pt=M(function(t,a){const{companyId:n}=a;return{treasurySetupView:R(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(we(r))}}})(We);function mt(){const t=B(),a=L(),n=P(),{tenantEmailDomain:o}=O(),p=z(),r=f(C=>C.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=He(r),s=V(p?.loggedInUserRoleMap),[l,i]=d.useState(!1),[g,I]=d.useState(!1),[u,c]=d.useState(!1),h=f(C=>D(C)),y=A.getSignedInUserTenant(o)?.companyId??h.companyId,T=A.getSignedInUser(),S=f(C=>R(C,y)),w=f(C=>C.treasurySetupViewState.fetchState),x=f(C=>C.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=f(C=>C.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(T==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{l||w!=="Not-Started"||y==null||(i(!0),n(ae(y,!0,!1)))},[l,w,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(U,{to:"../promo"});const E=h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||w!=="Completed";return e.jsxs(e.Fragment,{children:[!E&&e.jsx(_,{analytics:j,onLoad:()=>{}}),e.jsx(pt,{navigate:t,location:a,companyId:y,isEditMode:!0,isLoading:E,isReadOnly:!s,treasurySetupView:S,analytics:j})]})}const ft=M(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:ke(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:R(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(Ee())},onSaveChangesToLocalStore:s=>{t(Ae(s))},onFetchLinkTokenClick:s=>{t(be("treasury_setup",s))},onEstablishConnectionClick:s=>{t(je(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(Ze),yt=({isFirstTransfer:t})=>{const a=B(),{tenantEmailDomain:n}=O(),o=P(),[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)),T=A.getSignedInUserTenant(n)?.companyId??y.companyId,S=f(x=>Ce(x)),w=f(x=>R(x,T));if(A.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||T==null||(s(!0),o(ae(T,!0,!1)))},[m,u,T,o]),d.useEffect(()=>{l||c!=="Not-Started"||T==null||(i(!0),o(H()))},[l,c,T,o]),d.useEffect(()=>{g||h!=="Not-Started"||T==null||(I(!0),o(ne()))},[g,h,T,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:w,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{q(j,"review",S.treasuryTransferMoneyLocalData,w.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},gt=N.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as l}from"./liveblocks-DNAiUJc8.js";import{a as g}from"./sentry-3H-Lcjnl.js";import{j as K,u as Y,l as R,g as S,k as J,h as z,n as at,o as B,N as G}from"./core-BR1djmRq.js";import{eQ as V,Kg as Ee,Kh as Ue,fR as X,cs as Ie,ct as be,vo as St,Ki as nt,vs as zt,Ik as ee,jC as te,vm as Yt,vg as qt,Kj as Me,v8 as Ht,v7 as Wt,v1 as Qt,vd as Zt,vt as Xt,Kk as he,Kl as Ne,v9 as ea,Km as pe,e$ as ft,vI as gt,vB as vt,Kn as xt,oo as Tt,vw as yt,vu as Dt,Ko as Ct,vP as Et,vM as It,vx as bt,vO as Ke,GM as kt,Kp as ta,Kq as aa,cv as na,Kr as sa,Ks as oa,Kt as me,Ku as ie,Kv as ke,Il as Je,w2 as ye,Ij as De,vR as wt,vp as Ge,Kw as la,Im as H,Kx as $e,vj as ia,Ky as ca,Kz as da,KA as ze,KB as Ye,KC as qe,KD as He,vY as we,KE as At,vF as jt,KF as ra,KG as ua,KH as ha,KI as pa,KJ as ma,KK as Sa,KL as fa,KM as ga,sV as va,sW as xa,Hq as je,KN as Ta,KO as ya,i$ as Fe,bq as Da,KP as Ca,KQ as Ea,kA as Ia,kJ as ba,Hp as Le,bE as st,KR as Ft,H5 as Lt,KS as ka,KT as wa,KU as Aa,kL as ja,KV as ot,KW as lt,KX as it,KY as ct,KZ as Fa,kH as La,K_ as Pa,kK as _a,K$ as Va,L0 as Pt,HM as _t,j_ as Ba,L1 as Oa,L2 as Pe,L3 as Vt,HK as Bt,yf as Ra,L4 as Ua,L5 as Ma,ki as Ot,L6 as Na,L7 as Ka,HY as Ja,qu as Ga,L8 as Rt,L9 as dt,HV as _e,La as rt,Lb as $a,H_ as za,Lc as Ya,Ld as qa,Le as Ha,Lf as Wa,Lg as Qa,qx as Za,Lh as Xa,In as en,Li as tn,HD as Ve,gK as an,Lj as nn,Lk as sn,gI as on,Ll as ln,Lm as cn,yj as dn,Ln as rn,Lo as un,Lp as hn,Lq as pn,k2 as mn,bn as Sn,eW as fn,eU as gn}from"./zeni-epic-state-B1K_6mks.js";import{z as U,an as Be,v as Ut,x as Q,d as j,X as Z,at as vn,q as N,D as Ce,r as ce,au as We,av as xn,aw as Tn,p as Qe,ax as yn,m as Dn,Z as de,G as Ze,y as ae,S as $,ay as Cn,h as Xe,az as En,aA as Mt,T as In,aB as bn,c as kn,aC as wn,aq as Nt,aD as An,o as W,A as jn,H as Kt,I as Fn,aE as Ln,aF as Pn,f as et,aG as _n,aH as Vn,j as Bn,aI as On,aJ as Rn}from"./index-DyLQ8mi9.js";import{n as M,D as Un,S as Jt}from"./mui-CgXDoZXy.js";import{t as Mn,A as Nn}from"./AddressScreen-BO5kE47C.js";import le from"./NotFoundScreen-CeLQUNEa.js";import{F as Kn}from"./FeaturePreviewScreen-FgARC5V8.js";import{b as q,v as tt,c as Jn}from"./routePaths-mOv9oizB.js";import{p as Gt}from"./pathToGoBack-oVjtOboc.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-DOg8XSPO.js";import{c as fe}from"./useFetchSuggestedQuestionsWhenReady-BGkosJUF.js";import{M as ge}from"./MobileAppDrawer-BueQODeb.js";import{D as Gn}from"./DrawerScreen-DTyA42lM.js";import{g as $n,m as zn}from"./accountMappingHelper-BonLh9TQ.js";import"./recharts-DzRX0aWK.js";import"./analytics-B4UJAsLA.js";import"./plaid-A3mYO1wj.js";import"./dnd-WGKE6-QR.js";import"./stripe-DMRn4zHo.js";import"./lottie-CXwx4IFe.js";import"./lexical-GYG14AuY.js";import"./pdf-B31DLhP9.js";import"./utils-BrTYpNjH.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]="8661fe81-ed7d-47c6-9345-e6ea1212889c",e._sentryDebugIdIdentifier="sentry-dbid-8661fe81-ed7d-47c6-9345-e6ea1212889c")}catch{}})();const Yn=Ce.getLocalizedStrings(),qn=J(function(e,a){const s=Ue(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(zt()),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=K(),s=Y(),{scheduleDetailId:t,tenantEmailDomain:n}=R(),{scheduleType:o}=R();if(n==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const c=S(f=>V(f)),r=Ee(o)??"accrued_expenses",h=U.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=>Ue(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(Ut,{fetchState:i.linkBillExpenseView.fetchState}):i.selectedJEAccruedSchedule!=null&&m!=null?l.jsxs(l.Fragment,{children:[p===!0?l.jsx(Q,{analytics:j,onLoad:()=>{Wn(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:j,controllerUserDetails:d,saveStatus:i.updateStatus.fetchState,jeAccruedSchedule:i.selectedJEAccruedSchedule,localData:i.scheduleAccruedDetailsLocalData.jeScheduleDetails[m]})]}):null})},$t=e=>{const a=Yn.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}},Wn=(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=Ie(s.controllers),i=be(s.controllerUserIds);t!=null&&j.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...$t(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})},Qn=M.div`
1
+ import{j as l}from"./liveblocks-Cjqg1XsV.js";import{a as g}from"./sentry-DTwqiEdO.js";import{j as K,u as Y,l as R,g as S,k as J,h as z,n as at,o as B,N as G}from"./core-B1Jz41nC.js";import{eQ as V,Kg as Ee,Kh as Ue,fR as X,cs as Ie,ct as be,vo as St,Ki as nt,vs as zt,Ik as ee,jC as te,vm as Yt,vg as qt,Kj as Me,v8 as Ht,v7 as Wt,v1 as Qt,vd as Zt,vt as Xt,Kk as he,Kl as Ne,v9 as ea,Km as pe,e$ as ft,vI as gt,vB as vt,Kn as xt,oo as Tt,vw as yt,vu as Dt,Ko as Ct,vP as Et,vM as It,vx as bt,vO as Ke,GM as kt,Kp as ta,Kq as aa,cv as na,Kr as sa,Ks as oa,Kt as me,Ku as ie,Kv as ke,Il as Je,w2 as ye,Ij as De,vR as wt,vp as Ge,Kw as la,Im as H,Kx as $e,vj as ia,Ky as ca,Kz as da,KA as ze,KB as Ye,KC as qe,KD as He,vY as we,KE as At,vF as jt,KF as ra,KG as ua,KH as ha,KI as pa,KJ as ma,KK as Sa,KL as fa,KM as ga,sV as va,sW as xa,Hq as je,KN as Ta,KO as ya,i$ as Fe,bq as Da,KP as Ca,KQ as Ea,kA as Ia,kJ as ba,Hp as Le,bE as st,KR as Ft,H5 as Lt,KS as ka,KT as wa,KU as Aa,kL as ja,KV as ot,KW as lt,KX as it,KY as ct,KZ as Fa,kH as La,K_ as Pa,kK as _a,K$ as Va,L0 as Pt,HM as _t,j_ as Ba,L1 as Oa,L2 as Pe,L3 as Vt,HK as Bt,yf as Ra,L4 as Ua,L5 as Ma,ki as Ot,L6 as Na,L7 as Ka,HY as Ja,qu as Ga,L8 as Rt,L9 as dt,HV as _e,La as rt,Lb as $a,H_ as za,Lc as Ya,Ld as qa,Le as Ha,Lf as Wa,Lg as Qa,qx as Za,Lh as Xa,In as en,Li as tn,HD as Ve,gK as an,Lj as nn,Lk as sn,gI as on,Ll as ln,Lm as cn,yj as dn,Ln as rn,Lo as un,Lp as hn,Lq as pn,k2 as mn,bn as Sn,eW as fn,eU as gn}from"./zeni-epic-state-CFJ-5drS.js";import{z as U,an as Be,v as Ut,x as Q,d as j,X as Z,at as vn,q as N,D as Ce,r as ce,au as We,av as xn,aw as Tn,p as Qe,ax as yn,m as Dn,Z as de,G as Ze,y as ae,S as $,ay as Cn,h as Xe,az as En,aA as Mt,T as In,aB as bn,c as kn,aC as wn,aq as Nt,aD as An,o as W,A as jn,H as Kt,I as Fn,aE as Ln,aF as Pn,f as et,aG as _n,aH as Vn,j as Bn,aI as On,aJ as Rn}from"./index-DnoGJKuR.js";import{n as M,D as Un,S as Jt}from"./mui-DSSmRxLI.js";import{t as Mn,A as Nn}from"./AddressScreen-DT0Q15o7.js";import le from"./NotFoundScreen-CiYbMRBm.js";import{F as Kn}from"./FeaturePreviewScreen-C38iY35s.js";import{b as q,v as tt,c as Jn}from"./routePaths-DBUEUOgS.js";import{p as Gt}from"./pathToGoBack-DUiwH7Zn.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-D1ncSYVo.js";import{c as fe}from"./useFetchSuggestedQuestionsWhenReady-BD5FIrcH.js";import{M as ge}from"./MobileAppDrawer-B5ryN7bV.js";import{D as Gn}from"./DrawerScreen-C7_25xjY.js";import{g as $n,m as zn}from"./accountMappingHelper-DN2NK9FA.js";import"./recharts-DW5j2-RD.js";import"./analytics-B134UjSL.js";import"./plaid-H6p_O3yl.js";import"./dnd-DumzdahX.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-v1nIzb.js";import"./lexical-DsIUchFW.js";import"./pdf-SAu_SEbF.js";import"./utils-CCEyXo02.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]="8661fe81-ed7d-47c6-9345-e6ea1212889c",e._sentryDebugIdIdentifier="sentry-dbid-8661fe81-ed7d-47c6-9345-e6ea1212889c")}catch{}})();const Yn=Ce.getLocalizedStrings(),qn=J(function(e,a){const s=Ue(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(zt()),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=K(),s=Y(),{scheduleDetailId:t,tenantEmailDomain:n}=R(),{scheduleType:o}=R();if(n==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const c=S(f=>V(f)),r=Ee(o)??"accrued_expenses",h=U.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=>Ue(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(Ut,{fetchState:i.linkBillExpenseView.fetchState}):i.selectedJEAccruedSchedule!=null&&m!=null?l.jsxs(l.Fragment,{children:[p===!0?l.jsx(Q,{analytics:j,onLoad:()=>{Wn(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:j,controllerUserDetails:d,saveStatus:i.updateStatus.fetchState,jeAccruedSchedule:i.selectedJEAccruedSchedule,localData:i.scheduleAccruedDetailsLocalData.jeScheduleDetails[m]})]}):null})},$t=e=>{const a=Yn.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}},Wn=(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=Ie(s.controllers),i=be(s.controllerUserIds);t!=null&&j.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...$t(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})},Qn=M.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-DNAiUJc8.js";import{a as f}from"./sentry-3H-Lcjnl.js";import{q as u,h,g as y,N as I}from"./core-BR1djmRq.js";import{Jw as b,eR as w,zA as x}from"./zeni-epic-state-B1K_6mks.js";import{z as l,v as j,H as S,I as v}from"./index-DyLQ8mi9.js";import{n as g}from"./mui-CgXDoZXy.js";import"./recharts-DzRX0aWK.js";import"./analytics-B4UJAsLA.js";import"./plaid-A3mYO1wj.js";import"./dnd-WGKE6-QR.js";import"./stripe-DMRn4zHo.js";import"./lottie-CXwx4IFe.js";import"./lexical-GYG14AuY.js";import"./pdf-B31DLhP9.js";import"./utils-BrTYpNjH.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]="b56603a3-9052-46d1-b3fa-284d64471162",e._sentryDebugIdIdentifier="sentry-dbid-b56603a3-9052-46d1-b3fa-284d64471162")}catch{}})();const W=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",p=e.get("profileId")??"",[n,m]=f.useState(!1),a=h(),i=y(c=>b(c)),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(I,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect(()=>{n||(m(!0),a(x(t,p,s)))},[n,a]),i.fetchState==="Error"?o.jsx(D,{children:o.jsx(E,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(j,{fetchState:"In-Progress"}))},D=g.div`
1
+ import{j as o}from"./liveblocks-Cjqg1XsV.js";import{a as f}from"./sentry-DTwqiEdO.js";import{q as u,h,g as y,N as I}from"./core-B1Jz41nC.js";import{Jw as b,eR as w,zA as x}from"./zeni-epic-state-CFJ-5drS.js";import{z as l,v as j,H as S,I as v}from"./index-DnoGJKuR.js";import{n as g}from"./mui-DSSmRxLI.js";import"./recharts-DW5j2-RD.js";import"./analytics-B134UjSL.js";import"./plaid-H6p_O3yl.js";import"./dnd-DumzdahX.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-v1nIzb.js";import"./lexical-DsIUchFW.js";import"./pdf-SAu_SEbF.js";import"./utils-CCEyXo02.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]="b56603a3-9052-46d1-b3fa-284d64471162",e._sentryDebugIdIdentifier="sentry-dbid-b56603a3-9052-46d1-b3fa-284d64471162")}catch{}})();const W=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",p=e.get("profileId")??"",[n,m]=f.useState(!1),a=h(),i=y(c=>b(c)),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(I,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect(()=>{n||(m(!0),a(x(t,p,s)))},[n,a]),i.fetchState==="Error"?o.jsx(D,{children:o.jsx(E,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(j,{fetchState:"In-Progress"}))},D=g.div`
2
2
  display: flex;
3
3
  width: 100%;
4
4
  height: 100vh;
@@ -1,4 +1,4 @@
1
- import{j as n}from"./liveblocks-DNAiUJc8.js";import{j as K,u as Y,h as z,l as Z,g as w,k as q,N as ne,n as Me,o as k}from"./core-BR1djmRq.js";import{eQ as _,Or as Ce,Os as $e,cl as te,cm as Ne,fd as Ze,wN as ke,A_ as Ge,wH as Tn,Ot as On,Ou as Bn,wK as Fn,wR as fe,wE as Rn,wB as Un,Nd as le,Ov as Ln,Ei as zn,Kj as _n,Ek as Vn,kj as Oe,Ow as Mn,q9 as He,pZ as We,ka as Ke,kd as Be,Kk as Fe,Kl as $n,Ox as Nn,kc as Zn,kz as Gn,k1 as Hn,iA as Wn,iz as Kn,Oy as Yn,Oz as ye,D$ as qn,OA as Jn,OB as Qn,N6 as we,OC as Re,OD as Xn,Ev as et,NR as nt,BU as Ye,sJ as qe,OE as tt,Es as at,OF as Je,cN as Ae,Ez as Qe,fe as ot,eU as Xe,eW as De,Ex as st,BO as rt,Ep as it,OG as en,OH as nn,E1 as tn,Eb as Ue,OI as ct,E5 as lt,OJ as dt,NF as ut,EA as pt,bv as mt,bF as ht,cx as gt,bG as ft,bs as yt,Jd as xt}from"./zeni-epic-state-B1K_6mks.js";import{c as ae,y as $,z as D,S as O,m as V,v as de,bP as Ct,X as Ie,Z as M,G as J,p as an,an as kt,ac as Le,d as R,bQ as wt,aq as Se,bR as At,x as ue,bS as Dt,f as be,aK as W,bT as It,T as St,a9 as bt,bU as ze,bV as Et,q as ee,bW as vt,bX as jt,bY as Pt,bZ as Tt,a6 as Ot,o as Bt}from"./index-DyLQ8mi9.js";import{n as U,D as Q,S as X}from"./mui-CgXDoZXy.js";import ce from"./NotFoundScreen-CeLQUNEa.js";import{S as _e}from"./SetupPagesScreen-BQGBgHyQ.js";import{F as on}from"./FeaturePreviewScreen-FgARC5V8.js";import{a as u}from"./sentry-3H-Lcjnl.js";import{M as pe}from"./MobileAppDrawer-BueQODeb.js";import{A as Ft,D as Rt,V as Ut}from"./DomesticWireDetailScreen-U3JdTr0p.js";import{A as Lt}from"./AddressScreen-BO5kE47C.js";import{u as sn}from"./useAskAiCfoHostNavButtonProps-DOg8XSPO.js";import{c as rn}from"./useFetchSuggestedQuestionsWhenReady-BGkosJUF.js";import{Z as zt}from"./ZeniAccountStatementScreen-DKQAWQ4j.js";import"./recharts-DzRX0aWK.js";import"./analytics-B4UJAsLA.js";import"./plaid-A3mYO1wj.js";import"./dnd-WGKE6-QR.js";import"./stripe-DMRn4zHo.js";import"./lottie-CXwx4IFe.js";import"./lexical-GYG14AuY.js";import"./pdf-B31DLhP9.js";import"./utils-BrTYpNjH.js";import"./analyticsHelper-E0KniwhU.js";import"./routePaths-mOv9oizB.js";import"./BusinessVerificationPageScreen-Ctv5uoxk.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]="5b531593-a709-422a-87a5-e620716fdf3c",e._sentryDebugIdIdentifier="sentry-dbid-5b531593-a709-422a-87a5-e620716fdf3c")}catch{}})();const _t=U.div`
1
+ import{j as n}from"./liveblocks-Cjqg1XsV.js";import{j as K,u as Y,h as z,l as Z,g as w,k as q,N as ne,n as Me,o as k}from"./core-B1Jz41nC.js";import{eQ as _,Or as Ce,Os as $e,cl as te,cm as Ne,fd as Ze,wN as ke,A_ as Ge,wH as Tn,Ot as On,Ou as Bn,wK as Fn,wR as fe,wE as Rn,wB as Un,Nd as le,Ov as Ln,Ei as zn,Kj as _n,Ek as Vn,kj as Oe,Ow as Mn,q9 as He,pZ as We,ka as Ke,kd as Be,Kk as Fe,Kl as $n,Ox as Nn,kc as Zn,kz as Gn,k1 as Hn,iA as Wn,iz as Kn,Oy as Yn,Oz as ye,D$ as qn,OA as Jn,OB as Qn,N6 as we,OC as Re,OD as Xn,Ev as et,NR as nt,BU as Ye,sJ as qe,OE as tt,Es as at,OF as Je,cN as Ae,Ez as Qe,fe as ot,eU as Xe,eW as De,Ex as st,BO as rt,Ep as it,OG as en,OH as nn,E1 as tn,Eb as Ue,OI as ct,E5 as lt,OJ as dt,NF as ut,EA as pt,bv as mt,bF as ht,cx as gt,bG as ft,bs as yt,Jd as xt}from"./zeni-epic-state-CFJ-5drS.js";import{c as ae,y as $,z as D,S as O,m as V,v as de,bP as Ct,X as Ie,Z as M,G as J,p as an,an as kt,ac as Le,d as R,bQ as wt,aq as Se,bR as At,x as ue,bS as Dt,f as be,aK as W,bT as It,T as St,a9 as bt,bU as ze,bV as Et,q as ee,bW as vt,bX as jt,bY as Pt,bZ as Tt,a6 as Ot,o as Bt}from"./index-DnoGJKuR.js";import{n as U,D as Q,S as X}from"./mui-DSSmRxLI.js";import ce from"./NotFoundScreen-CiYbMRBm.js";import{S as _e}from"./SetupPagesScreen-BbHEiKJR.js";import{F as on}from"./FeaturePreviewScreen-C38iY35s.js";import{a as u}from"./sentry-DTwqiEdO.js";import{M as pe}from"./MobileAppDrawer-B5ryN7bV.js";import{A as Ft,D as Rt,V as Ut}from"./DomesticWireDetailScreen-cxTAfHcb.js";import{A as Lt}from"./AddressScreen-DT0Q15o7.js";import{u as sn}from"./useAskAiCfoHostNavButtonProps-D1ncSYVo.js";import{c as rn}from"./useFetchSuggestedQuestionsWhenReady-BD5FIrcH.js";import{Z as zt}from"./ZeniAccountStatementScreen-C83btU9G.js";import"./recharts-DW5j2-RD.js";import"./analytics-B134UjSL.js";import"./plaid-H6p_O3yl.js";import"./dnd-DumzdahX.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-v1nIzb.js";import"./lexical-DsIUchFW.js";import"./pdf-SAu_SEbF.js";import"./utils-CCEyXo02.js";import"./analyticsHelper-CRpkSjLL.js";import"./routePaths-DBUEUOgS.js";import"./BusinessVerificationPageScreen-CdptLI3O.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]="5b531593-a709-422a-87a5-e620716fdf3c",e._sentryDebugIdIdentifier="sentry-dbid-5b531593-a709-422a-87a5-e620716fdf3c")}catch{}})();const _t=U.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-DNAiUJc8.js";import{a as f}from"./sentry-3H-Lcjnl.js";import{j as x,h as j,u as v,l as $,g as p}from"./core-BR1djmRq.js";import{It as s,Is as B,OK as C,eQ as L,OL as T}from"./zeni-epic-state-B1K_6mks.js";import{Z as z,aq as g,m as D,z as E,v as P,b_ as _,p as N}from"./index-DyLQ8mi9.js";import{n as U}from"./mui-CgXDoZXy.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]="c03cbbd2-d95e-4e01-81a2-474ec0a73adf",e._sentryDebugIdIdentifier="sentry-dbid-c03cbbd2-d95e-4e01-81a2-474ec0a73adf")}catch{}})();const G=U.div`
1
+ import{j as i}from"./liveblocks-Cjqg1XsV.js";import{a as f}from"./sentry-DTwqiEdO.js";import{j as x,h as j,u as v,l as $,g as p}from"./core-B1Jz41nC.js";import{It as s,Is as B,OK as C,eQ as L,OL as T}from"./zeni-epic-state-CFJ-5drS.js";import{Z as z,aq as g,m as D,z as E,v as P,b_ as _,p as N}from"./index-DnoGJKuR.js";import{n as U}from"./mui-DSSmRxLI.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]="c03cbbd2-d95e-4e01-81a2-474ec0a73adf",e._sentryDebugIdIdentifier="sentry-dbid-c03cbbd2-d95e-4e01-81a2-474ec0a73adf")}catch{}})();const G=U.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import"./sentry-3H-Lcjnl.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-DTwqiEdO.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};