@zeniai/web-app-ui 5.1.64-dev → 5.1.64-next

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/dist/assets/AddressRoutes-C-xv804N.js +1 -0
  2. package/dist/assets/{AddressScreen-BnC-xeNO.js → AddressScreen-u2DKTod9.js} +1 -1
  3. package/dist/assets/{AiCfoScreen-D7S1jmtC.js → AiCfoScreen-DO34Km7z.js} +1 -1
  4. package/dist/assets/{BillPayApprovalRoutes-BKtx1kJ3.js → BillPayApprovalRoutes-N09AjOOc.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-g07_m1Yx.js → BillPayRoutes-a5H_tJQE.js} +1 -1
  6. package/dist/assets/{BusinessVerificationPageScreen-CpGRtjnS.js → BusinessVerificationPageScreen-9ZoKahxa.js} +1 -1
  7. package/dist/assets/{ChargeCardRoutes-WsjwCttT.js → ChargeCardRoutes-2_W1Hb5L.js} +1 -1
  8. package/dist/assets/{CompanyPassportScreen-Cx74K6-1.js → CompanyPassportScreen-BG4GjyzW.js} +1 -1
  9. package/dist/assets/{ConnectionAuthScreen-BIRo2BaP.js → ConnectionAuthScreen-BgTeOXn0.js} +1 -1
  10. package/dist/assets/CustomerOnboardingAuthScreen-BzGKVnQb.js +1 -0
  11. package/dist/assets/{CustomerOnboardingRoutes-BV1QbewZ.js → CustomerOnboardingRoutes-KzbRwyxk.js} +1 -1
  12. package/dist/assets/{DashboardRoutes-ClXxpw2D.js → DashboardRoutes-BC3rWAZ9.js} +1 -1
  13. package/dist/assets/{DefaultTenantHome-k3m2vfzP.js → DefaultTenantHome-BKCR290o.js} +1 -1
  14. package/dist/assets/{DomesticWireDetailScreen-DuPKfc2x.js → DomesticWireDetailScreen-wUhcMv0F.js} +1 -1
  15. package/dist/assets/{DrawerScreen-1fdGLdyV.js → DrawerScreen-CkQ0nkdX.js} +1 -1
  16. package/dist/assets/{EntityDetailRoutes-Brh486Q-.js → EntityDetailRoutes-BQrCFcrn.js} +1 -1
  17. package/dist/assets/{ExpenseAutomationRoutes-DNJSb5io.js → ExpenseAutomationRoutes-b2kjRAmk.js} +1 -1
  18. package/dist/assets/{FeaturePreviewScreen-wzurtqwt.js → FeaturePreviewScreen-DgRclQNo.js} +1 -1
  19. package/dist/assets/{HubSpotOAuthCallbackScreen-0mV19jgL.js → HubSpotOAuthCallbackScreen-DGjZMWHR.js} +1 -1
  20. package/dist/assets/{MagicLinkRoutes-D6TmVWte.js → MagicLinkRoutes-D_4O8J8q.js} +1 -1
  21. package/dist/assets/{MagicLinkSignInScreen-C6WlM5JI.js → MagicLinkSignInScreen-DYRKRg3n.js} +1 -1
  22. package/dist/assets/{MobileAppDrawer-w7Ih7RbS.js → MobileAppDrawer-DTL1WoBD.js} +1 -1
  23. package/dist/assets/NotFoundScreen-BJjtFMw-.js +1 -0
  24. package/dist/assets/{NotificationRoutes-CQSd1khI.js → NotificationRoutes-Mz0nlcI4.js} +1 -1
  25. package/dist/assets/{OAuthConsentScreen-BbKUoIMi.js → OAuthConsentScreen-BY1ludHq.js} +1 -1
  26. package/dist/assets/{PandLWithForecastRoutes-DeUji8s7.js → PandLWithForecastRoutes-DmAeH6yz.js} +1 -1
  27. package/dist/assets/{PeopleRoutes-Bv6D04K8.js → PeopleRoutes-BW-33fMj.js} +1 -1
  28. package/dist/assets/{PerformanceRoutes-B4uBsUKn.js → PerformanceRoutes-DzYPlTUi.js} +1 -1
  29. package/dist/assets/{Preview-44tjfNzS.js → Preview-BTOVtpCI.js} +1 -1
  30. package/dist/assets/{QBOConnectionScreen-Dppvtafz.js → QBOConnectionScreen-BxNpQBSW.js} +1 -1
  31. package/dist/assets/{ReferralListScreen-BH3bO2h_.js → ReferralListScreen-q_fN40Me.js} +1 -1
  32. package/dist/assets/{ReimbursementApprovalRoutes-DrhBbGrt.js → ReimbursementApprovalRoutes-CkS321K6.js} +1 -1
  33. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-_CUcSO8M.js → ReimbursementApprovalRuleDetailScreen-BBaWKiTp.js} +1 -1
  34. package/dist/assets/{ReimbursementRoutes-Ck88YnRC.js → ReimbursementRoutes-SL5fxS7J.js} +1 -1
  35. package/dist/assets/{ReportsRoutes-EgjleUVF.js → ReportsRoutes-DLhTpIpW.js} +1 -1
  36. package/dist/assets/{RewardsRoutes-Cs04goLx.js → RewardsRoutes-DOQc40-T.js} +1 -1
  37. package/dist/assets/{ScreenRoutes-DAVGJEPC.js → ScreenRoutes-C7nGxFGa.js} +2 -2
  38. package/dist/assets/{SettingsRoutes-CGwpR34_.js → SettingsRoutes-BcNsJlyt.js} +1 -1
  39. package/dist/assets/{SetupPagesScreen-DVYIUml2.js → SetupPagesScreen-Cf1zce1j.js} +1 -1
  40. package/dist/assets/{SignInScreen-BfIi8mxH.js → SignInScreen-CFcpV8AB.js} +1 -1
  41. package/dist/assets/{SignOutScreen-CRjp33Uq.js → SignOutScreen-CRkLA2qR.js} +1 -1
  42. package/dist/assets/{TaskListScreen-zDige7Qx.js → TaskListScreen-B5UUNKNq.js} +1 -1
  43. package/dist/assets/{TaskRoutes-DZSVbSVg.js → TaskRoutes-C3Y1_GTH.js} +1 -1
  44. package/dist/assets/{TransactionDetailRoutes-CAIheVGH.js → TransactionDetailRoutes-DJW-MXcA.js} +1 -1
  45. package/dist/assets/{TransactionDetailScreen-Nhb9Cdoj.js → TransactionDetailScreen-THar40Gx.js} +1 -1
  46. package/dist/assets/{TransactionListRoutes-CCSHgT8f.js → TransactionListRoutes-BwyRdzWG.js} +1 -1
  47. package/dist/assets/{TreasuryRoutes-BEe2hzHB.js → TreasuryRoutes-BB5h4O53.js} +1 -1
  48. package/dist/assets/{VendorsRoutes-DkoRIuON.js → VendorsRoutes-yLXsrus9.js} +1 -1
  49. package/dist/assets/{WiseConfirmationScreen-C2xx_UCS.js → WiseConfirmationScreen-BiE62PED.js} +1 -1
  50. package/dist/assets/{ZeniAccountRoutes-CAOHS1Ia.js → ZeniAccountRoutes-D2gUWZ45.js} +1 -1
  51. package/dist/assets/{ZeniAccountStatementScreen-CO_1LwB4.js → ZeniAccountStatementScreen-msNMuYwl.js} +1 -1
  52. package/dist/assets/{accountMappingHelper-CDd_SN9l.js → accountMappingHelper-B8UfZatj.js} +1 -1
  53. package/dist/assets/{analytics-CStLmwuB.js → analytics-DioYovd8.js} +1 -1
  54. package/dist/assets/{analyticsHelper-DLbyZBKc.js → analyticsHelper-BAFKFTEz.js} +1 -1
  55. package/dist/assets/{core-DvGkVhX0.js → core-BlIgFgLa.js} +1 -1
  56. package/dist/assets/{decodeURIComponentSafe-D3G61A3x.js → decodeURIComponentSafe-BAori_t5.js} +1 -1
  57. package/dist/assets/{dnd-DVf98RdY.js → dnd-Cx0n399a.js} +1 -1
  58. package/dist/assets/{empty-C73IrULF.js → empty-CKxjE7L7.js} +1 -1
  59. package/dist/assets/{empty-C94l7QZZ.js → empty-Dxxvbuzj.js} +1 -1
  60. package/dist/assets/{emptyVideoElement-C0Gsi5o3.js → emptyVideoElement-2C6UIbKN.js} +1 -1
  61. package/dist/assets/{epic-6iIIFADw.js → epic-BHivMeS4.js} +1 -1
  62. package/dist/assets/{getLocaleForTenant-cEMfjXsu.js → getLocaleForTenant-DCl0hO76.js} +1 -1
  63. package/dist/assets/{index-CR_F8qmF.js → index-BdJIoPkw.js} +1 -1
  64. package/dist/assets/{index-DH8DxHEc.js → index-C9K1ww2W.js} +2 -2
  65. package/dist/assets/{index-DKlRxDbB.js → index-CeVqc9lu.js} +1 -1
  66. package/dist/assets/{index-Dm6nOQvo.js → index-CyWmtl_l.js} +1 -1
  67. package/dist/assets/{index-D4KKzLMy.js → index-DRYjcsAT.js} +1 -1
  68. package/dist/assets/{index-ChP5wU0r.js → index-DncvUSxy.js} +7 -7
  69. package/dist/assets/{index-DBkI4Pc2.js → index-DuRJs9U1.js} +1 -1
  70. package/dist/assets/{index-D82ghQVK.js → index-s-rW1AdC.js} +1 -1
  71. package/dist/assets/{lexical-BStGoUxq.js → lexical-DUO8UoPe.js} +1 -1
  72. package/dist/assets/{liveblocks-CfHMBm08.js → liveblocks-B5BvoK0c.js} +1 -1
  73. package/dist/assets/{lottie-Byecfo2L.js → lottie-s3ChESX6.js} +1 -1
  74. package/dist/assets/{mui-D2FQmczV.js → mui-CS8zbV3O.js} +1 -1
  75. package/dist/assets/{pathToGoBack-DSTCEkoM.js → pathToGoBack-laKxrJZN.js} +1 -1
  76. package/dist/assets/{pdf-CojJ326Z.js → pdf-C5qZkmhF.js} +3 -3
  77. package/dist/assets/{pdf-lib-D37uSEI7.js → pdf-lib-DGiLdKDM.js} +1 -1
  78. package/dist/assets/{plaid-DzUK2ot_.js → plaid-C04vDugB.js} +1 -1
  79. package/dist/assets/{pusher-9dHg1-dz.js → pusher-BTA9DgOU.js} +1 -1
  80. package/dist/assets/{react-DhZhbZXR.js → react-C5PzK68u.js} +1 -1
  81. package/dist/assets/{react-8lRluBI7.js → react-CfsJJUT2.js} +1 -1
  82. package/dist/assets/{react-C8Da0Bh3.js → react-DqrK0YVB.js} +1 -1
  83. package/dist/assets/{react-CpxXCBmF.js → react-DrpLYoaS.js} +1 -1
  84. package/dist/assets/{react-DgijNfbO.js → react-baEFrWNz.js} +1 -1
  85. package/dist/assets/{react-D0gT4wkv.js → react-tuH3nGfw.js} +1 -1
  86. package/dist/assets/{recharts-CnIvro2v.js → recharts-DYM_S90p.js} +1 -1
  87. package/dist/assets/{routePaths-CL9hJjr9.js → routePaths-Dmvu-NCC.js} +1 -1
  88. package/dist/assets/{sentry-0vIaNqsr.js → sentry-BfAQgAk9.js} +1 -1
  89. package/dist/assets/{url-D3bpmQ93.js → url-D_crimgO.js} +1 -1
  90. package/dist/assets/{url-DBgQsa85.js → url-DirNXFVY.js} +1 -1
  91. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-DsMWHBWn.js → useAiCfoDashboardSuggestedQuestionsChips-DKQ7ZLxd.js} +1 -1
  92. package/dist/assets/{useAskAiCfoHostNavButtonProps-RTOhQENK.js → useAskAiCfoHostNavButtonProps-D3AdUzbU.js} +1 -1
  93. package/dist/assets/{useDeviceId-BXBJZ6FP.js → useDeviceId-DlJFeskE.js} +1 -1
  94. package/dist/assets/{useInitialThreadRequest-CLh-E-cE.js → useInitialThreadRequest-BSNit8Dm.js} +1 -1
  95. package/dist/assets/{utils-DF5mLbko.js → utils-DVmhNkL_.js} +1 -1
  96. package/dist/assets/{withTransactionSidePanel-rHr5DjOB.js → withTransactionSidePanel-BIvBB9re.js} +1 -1
  97. package/dist/assets/{zeni-epic-state-D_HFZhXl.js → zeni-epic-state-DuZnqF9c.js} +3 -3
  98. package/dist/index.html +1 -1
  99. package/package.json +1 -1
  100. package/dist/assets/AddressRoutes-DTd0NBaA.js +0 -1
  101. package/dist/assets/CustomerOnboardingAuthScreen-L8PntkLo.js +0 -1
  102. package/dist/assets/NotFoundScreen-BNcKpH4N.js +0 -1
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-ClXxpw2D.js","assets/sentry-0vIaNqsr.js","assets/core-DvGkVhX0.js","assets/zeni-epic-state-D_HFZhXl.js","assets/index-ChP5wU0r.js","assets/mui-D2FQmczV.js","assets/analytics-CStLmwuB.js","assets/utils-DF5mLbko.js","assets/withTransactionSidePanel-rHr5DjOB.js","assets/useAskAiCfoHostNavButtonProps-RTOhQENK.js","assets/TransactionDetailScreen-Nhb9Cdoj.js","assets/decodeURIComponentSafe-D3G61A3x.js","assets/routePaths-CL9hJjr9.js","assets/NotFoundScreen-BNcKpH4N.js","assets/useInitialThreadRequest-CLh-E-cE.js","assets/analyticsHelper-DLbyZBKc.js","assets/CompanyPassportScreen-Cx74K6-1.js","assets/MobileAppDrawer-w7Ih7RbS.js","assets/useAiCfoDashboardSuggestedQuestionsChips-DsMWHBWn.js","assets/FeaturePreviewScreen-wzurtqwt.js","assets/ReferralListScreen-BH3bO2h_.js","assets/index-R6GjjTB3.css","assets/BillPayRoutes-g07_m1Yx.js","assets/AddressScreen-BnC-xeNO.js","assets/DomesticWireDetailScreen-DuPKfc2x.js","assets/DrawerScreen-1fdGLdyV.js","assets/SetupPagesScreen-DVYIUml2.js","assets/BusinessVerificationPageScreen-CpGRtjnS.js","assets/BillPayApprovalRoutes-BKtx1kJ3.js","assets/ReimbursementApprovalRuleDetailScreen-_CUcSO8M.js","assets/getLocaleForTenant-cEMfjXsu.js","assets/ReimbursementRoutes-Ck88YnRC.js","assets/ReimbursementApprovalRoutes-DrhBbGrt.js","assets/TransactionListRoutes-CCSHgT8f.js","assets/ZeniAccountStatementScreen-CO_1LwB4.js","assets/SettingsRoutes-CGwpR34_.js","assets/accountMappingHelper-CDd_SN9l.js","assets/QBOConnectionScreen-Dppvtafz.js","assets/empty-C73IrULF.js","assets/index-D4KKzLMy.js","assets/url-D3bpmQ93.js","assets/index-CR_F8qmF.js","assets/ReportsRoutes-EgjleUVF.js","assets/ChargeCardRoutes-WsjwCttT.js","assets/PeopleRoutes-Bv6D04K8.js","assets/ExpenseAutomationRoutes-DNJSb5io.js","assets/TreasuryRoutes-BEe2hzHB.js","assets/VendorsRoutes-DkoRIuON.js","assets/pathToGoBack-DSTCEkoM.js","assets/ZeniAccountRoutes-CAOHS1Ia.js","assets/AddressRoutes-DTd0NBaA.js","assets/PandLWithForecastRoutes-DeUji8s7.js","assets/CustomerOnboardingRoutes-BV1QbewZ.js","assets/TransactionDetailRoutes-CAIheVGH.js","assets/EntityDetailRoutes-Brh486Q-.js","assets/NotificationRoutes-CQSd1khI.js","assets/PerformanceRoutes-B4uBsUKn.js","assets/RewardsRoutes-Cs04goLx.js","assets/TaskRoutes-DZSVbSVg.js","assets/TaskListScreen-zDige7Qx.js","assets/AiCfoScreen-D7S1jmtC.js"])))=>i.map(i=>d[i]);
2
- import{_ as n,bn as ts,eR as is,f0 as rs,e_ as os,e$ as ls,fJ as cs,eV as ds,cO as pe,cw as ms,fg as us,co as _s,bE as As,bo as ps,fl as Es,v as gs,JZ as Is,bs as Ts,J_ as xs,bG as hs,fi as js,bF as Us,bt as Rs,ck as bs,J$ as Hs,K0 as Ds,cL as ys,cN as fs,cM as Cs,cv as vs,cB as Os,ng as Ee,eY as ge,fT as Ps,fp as Ie,fQ as Te,fR as xe,fq as Fs}from"./zeni-epic-state-D_HFZhXl.js";import{j as e}from"./liveblocks-CfHMBm08.js";import{a as v}from"./sentry-0vIaNqsr.js";import{u as Ls,h as Bs,i as ks,g as Vs,j as G,l as he,N as c,o as Ss,p as t}from"./core-DvGkVhX0.js";import{m as Ns,u as Ms,z as b,a as Zs,c as ws,d as Gs,G as k,k as $s,L as F,D as je,t as _,P as zs,e as Q,l}from"./index-ChP5wU0r.js";import"./mui-D2FQmczV.js";import{f as Ue}from"./analyticsHelper-DLbyZBKc.js";import{t as Ys}from"./getLocaleForTenant-cEMfjXsu.js";import"./recharts-CnIvro2v.js";import"./analytics-CStLmwuB.js";import"./plaid-DzUK2ot_.js";import"./dnd-DVf98RdY.js";import"./stripe-DMRn4zHo.js";import"./lottie-Byecfo2L.js";import"./lexical-BStGoUxq.js";import"./pdf-CojJ326Z.js";import"./utils-DF5mLbko.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]="a20a87b6-2e0f-43c5-bb31-ec3d0b9294cc",i._sentryDebugIdIdentifier="sentry-dbid-a20a87b6-2e0f-43c5-bb31-ec3d0b9294cc")}catch{}})();const Js={dashboard:()=>n(()=>import("./DashboardRoutes-ClXxpw2D.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-g07_m1Yx.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21])),reimbursement:()=>n(()=>import("./ReimbursementRoutes-Ck88YnRC.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21])),transactions:()=>n(()=>import("./TransactionListRoutes-CCSHgT8f.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21])),settings:()=>n(()=>import("./SettingsRoutes-CGwpR34_.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,11,28,29,32,21])),reports:()=>n(()=>import("./ReportsRoutes-EgjleUVF.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-WsjwCttT.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,13,15,12,27,14,9,23,21])),people:()=>n(()=>import("./PeopleRoutes-Bv6D04K8.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-DNJSb5io.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21])),treasury:()=>n(()=>import("./TreasuryRoutes-BEe2hzHB.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,19,21])),vendors:()=>n(()=>import("./VendorsRoutes-DkoRIuON.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,13,19,12,48,9,17,25,36,21])),zeniAccounts:()=>n(()=>import("./ZeniAccountRoutes-CAOHS1Ia.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,13,26,17,15,12,27,19,24,23,9,34,21]))},qs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],X=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Ws=l(()=>n(()=>import("./ReportsRoutes-EgjleUVF.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21]))),Ks=l(()=>n(()=>import("./AddressRoutes-DTd0NBaA.js"),__vite__mapDeps([50,1,2,3,23,4,5,6,7,13,21]))),Qs=l(()=>n(()=>import("./PeopleRoutes-Bv6D04K8.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21]))),Xs=l(()=>n(()=>import("./PandLWithForecastRoutes-DeUji8s7.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,13,19,9,14,12,17,21]))),en=l(()=>n(()=>import("./CustomerOnboardingRoutes-BV1QbewZ.js"),__vite__mapDeps([52,1,2,3,23,4,5,6,7,13,37,38,39,40,41,11,21]))),sn=l(()=>n(()=>import("./VendorsRoutes-DkoRIuON.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,13,19,12,48,9,17,25,36,21]))),nn=l(()=>n(()=>import("./TransactionDetailRoutes-CAIheVGH.js"),__vite__mapDeps([53,1,2,3,13,4,5,6,7,10,9,11,12,21]))),Re=l(()=>n(()=>import("./EntityDetailRoutes-Brh486Q-.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,11,8,9,10,12,21]))),an=l(()=>n(()=>import("./DashboardRoutes-ClXxpw2D.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-g07_m1Yx.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21]))),tn=l(()=>n(()=>import("./SettingsRoutes-CGwpR34_.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,11,28,29,32,21]))),He=l(()=>n(()=>import("./ReimbursementRoutes-Ck88YnRC.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21]))),rn=l(()=>n(()=>import("./ZeniAccountRoutes-CAOHS1Ia.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,13,26,17,15,12,27,19,24,23,9,34,21]))),on=l(()=>n(()=>import("./TreasuryRoutes-BEe2hzHB.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,19,21]))),ln=l(()=>n(()=>import("./TransactionListRoutes-CCSHgT8f.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21]))),cn=l(()=>n(()=>import("./ChargeCardRoutes-WsjwCttT.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,13,15,12,27,14,9,23,21]))),dn=l(()=>n(()=>import("./NotificationRoutes-CQSd1khI.js"),__vite__mapDeps([55,1,2,3,13,4,5,6,7,9,21]))),mn=l(()=>n(()=>import("./PerformanceRoutes-B4uBsUKn.js"),__vite__mapDeps([56,1,2,3,13,4,5,6,7,9,17,21]))),un=l(()=>n(()=>import("./ExpenseAutomationRoutes-DNJSb5io.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21]))),_n=l(()=>n(()=>import("./RewardsRoutes-Cs04goLx.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,13,20,9,17,21]))),An=l(()=>n(()=>import("./TaskRoutes-DZSVbSVg.js"),__vite__mapDeps([58,1,2,3,13,4,5,6,7,14,17,59,9,21]))),pn=l(()=>n(()=>import("./AiCfoScreen-D7S1jmtC.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,18,48,21]))),y=l(()=>n(()=>import("./NotFoundScreen-BNcKpH4N.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,21]))),En=l(()=>n(()=>import("./TaskListScreen-zDige7Qx.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,17,21])));function Nn({setTenantEmailDomain:i}){const U=Ls(),V=Bs(),{tenantEmailDomain:o}=ks(),S=Ns().mode,{setLoading:f,clearAllLoading:O,clearLoading:Z}=Ms(),D=b.getSignedInUserTenant(o)?.tenantId,h=b.getSignedInUser(),ee=ts(h),$=Vs(),[N,ye]=v.useState(!1),r=G(a=>is(a)),{useFeatureGate:L}=Zs(),W=ws(),se=Gs(),{isFeatureEnabled:fe}=L(k.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Ce}=L(k.isTreasuryEnabled),{isFeatureEnabled:ve}=L(k.isChargeCardFeatureEnabled),{isFeatureEnabled:ne}=L(k.isDebitCardFeatureEnabled),j=G(a=>a.tenantState.fetchState),p=G(a=>a.tenantState.activeTenantFetchState.fetchState),u=p==="Completed"||j==="Completed"?rs(ne,r):void 0,z=p==="Completed"||j==="Completed"?os(r):void 0,Oe=p==="Completed"||j==="Completed"?ls(r):void 0,Pe=ve||ne||!!Oe||!!z||!!u,{isFeatureEnabled:Fe}=L(k.isSettingsFeatureEnabled),{isFeatureEnabled:Le}=L(k.isAiCfoFileUploadEnabled),Y=G(a=>cs(a));if(o!=null){const a=b.getSignedInUserTenant(o);h!=null&&a!=null&&Ue(h,r,S)}const w={tenantId:D,userId:h?.userId,sessionId:h?.zeniSessionId},ae=ds(),A=$s(),Be=r.company==null||A?.loggedInUserRoleMap!=null&&pe(A.loggedInUserRole),ke=ms(A?.loggedInUserRoleMap),te=v.useRef(!0),ie=he("/:tenantEmailDomain/onboarding/*")!==null,K=he("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Ve=G(a=>w.tenantId!=null?us(a,w.tenantId):void 0);v.useEffect(()=>{f(F.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(K!=null&&D!=null){const a=K.params.selectedPeriod;if(a!=null){const R=a.split("-");if(R.length===2){const d=_s(Number(R[0])),s=Number(R[1]),m=As(`01-${d<10?`0${d}`:d}-${s}`,je.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=ps();m.isAfter(M,"month")===!1?U(Es(D,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[K,D]),v.useEffect(()=>{N||(ye(!0),f(F.TENANT_FETCHING)),te.current?te.current=!1:!gs(ae,w)&&b.isSignedIn()&&(f(F.TENANT_FETCHING),function(a,R,d,s){if(ge(R?.userId,R?.zeniSessionId,a.tenantId),d(Ps(!0)),d(Ie(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const m=b.getSignedInUserTenantWithId(a.tenantId);s&&je.updateAppLocaleID(Ys(s)),m?.tenantEmailDomain!=null&&b.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}a.userId!=null?Q.identify(a.userId,{tenant_id:a.tenantId}):Q.resetUserIdentity()}(w,h,U,Ve))},[w,ae,h,U,b]),v.useEffect(()=>{b.isSignedIn()&&(f(F.TENANT_FETCHING),function(a,R,d,s,m,M,B){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const J=s!=null&&m?.zeniSessionId!=null,ss=d==null||d.tenantId!==s,ns=d!=null&&d.excludedResources==null,as=d!=null&&d.externalConnections==null;if(J&&ss){B(Ie(s));const q=b.getSignedInUserTenantWithId(s);q?.tenantEmailDomain!=null&&b.saveActiveTenantDomainForUser(q?.tenantEmailDomain),ge(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),B(Te(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),B(xe(m.userId,s)))}else J&&ns&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),B(Te(m.userId,s))),J&&as&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),B(xe(m.userId,s)));if(J){Q.identify(m.userId,{tenant_id:s});const q=s==null||s!=null&&(R==="Completed"||R==="Error");a==="Completed"||R!=="Not-Started"&&R!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(F.TENANT_FETCHING),B(Fs(m.userId,s,m.zeniSessionId))),q&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),B(Ee(m.userId,m.zeniSessionId)))}}(j,p,r,D,h,f,U))},[D,p]),v.useEffect(()=>{b.isSignedIn()&&j==="Completed"&&Y.tenantsBaseInOrder.length>0&&(Z(F.TENANT_FETCHING),b.saveSignedInUserTenants(Is(Y.tenantsBaseInOrder)),h!=null&&Ue(h,r,S,void 0,Y.tenantsBaseInOrder))},[Y,j,r,h]),v.useEffect(()=>{p==="In-Progress"&&f(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&D!=null?(O(),_.markActiveTenantFetchCompleted(D)):p==="Error"&&D!=null&&(_.markActiveTenantFetchFailed(D),Z(F.TENANT_FETCHING),Z(F.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[p,j,D,N]);const re=v.useRef(!1);v.useEffect(()=>{!re.current&&p==="Completed"&&N&&(re.current=!0,function(a=qs,R=3e3){setTimeout(()=>{const d=s=>{if(s>=a.length)return;const m=a[s],M=Js[m];M!=null?M().then(()=>X(()=>d(s+1))).catch(()=>X(()=>d(s+1))):d(s+1)};X(()=>d(0))},R)}())},[p,N]);const C=r?.userRole!=null&&Ts(r?.userRole),{isFeatureEnabled:Se}=L(k.isReferralFeatureEnabled),Ne=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Me=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),P=r?.userRole!=null&&pe(r.userRole),oe=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,le=Pe&&!C,Ze=xs(A?.loggedInUserRoleMap),we=r.externalConnections?.accounting[0]?.isValid,ce=r.company?.companyOnboardingInfo.isOnboardingCompleted,de=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,me=de&&hs(A?.loggedInUserRoleMap),ue=fe&&!C,Ge=r.company!=null&&js(r.company),$e=Ce&&Ge===!0&&!C,ze=oe&&Us(A?.loggedInUserRoleMap),Ye=le&&Rs(A?.loggedInUserRoleMap),Je=ue&&bs(A?.loggedInUserRoleMap),qe=Hs(A?.loggedInUserRoleMap),We=Ds(A?.loggedInUserRoleMap),E=ys(A?.loggedInUserRoleMap),g=fs(A?.loggedInUserRoleMap),I=Cs(A?.loggedInUserRoleMap),T=vs(A?.loggedInUserRoleMap),x=Os(A?.loggedInUserRoleMap),_e=oe&&T,Ae=de&&x,Ke=ue&&E,Qe=$e&&g,Xe=le&&I,es=r.excludedResources?.resources?.find(a=>a.resource==="/invites")!=null||ke===!0||Ze===!0||qe===!0||We===!0;return b.isSignedIn()?D==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ee(h.userId,h.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||j==="Completed"?(ce===!0||ee&&!ie)&&we===!1&&u===!1&&z===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||ce!==!1||ie||ee?N&&r?.userRole&&u!=null&&z!=null&&o!=null&&Object.keys(A.loggedInUserRoleMap).length>0?e.jsx(Ss,{children:e.jsxs(t,{element:e.jsx(zs,{}),children:[e.jsx(t,{path:"/",element:e.jsx(gn,{isDashboardAccess:P,isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,isTenantCardsOnly:z})}),e.jsx(t,{path:"dashboard/*",element:P?e.jsx(an,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:P?e.jsx(Ws,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:es||P?e.jsx(Qs,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:P?e.jsx(Xs,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(en,{})}),e.jsx(t,{path:"transaction/*",element:P&&C===!1||Ne||Me?e.jsx(nn,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:P&&C===!1?e.jsx(ln,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:P&&C===!1?e.jsx(Re,{entityType:"customer"}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isTenantBankingOnly:u,isUserHasTreasuryAccess:g,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:P&&C===!1?e.jsx(Re,{entityType:"vendor"}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(En,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(An,{})}),e.jsx(t,{path:"address/*",element:ze||me||Je||Ye?e.jsx(Ks,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:Ke?e.jsx(rn,{}):e.jsx(y,{})}),e.jsx(t,{path:"treasury/*",element:Qe?e.jsx(on,{}):e.jsx(y,{})}),e.jsx(t,{path:"performance",element:se===!0?e.jsx(mn,{}):e.jsx(De,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:se===!0&&C===!1?e.jsx(un,{}):e.jsx(De,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(dn,{})}),e.jsx(t,{path:"vendors/*",element:Be?e.jsx(sn,{}):e.jsx(y,{})}),e.jsx(t,{path:"bill/*",element:_e?e.jsx(be,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:_e?e.jsx(be,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:Ae?e.jsx(He,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:Ae?e.jsx(He,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:Fe?e.jsx(tn,{hasAdminLevelAccess:me}):e.jsx(y,{})}),e.jsx(t,{path:"cards/*",element:Xe?e.jsx(cn,{}):e.jsx(y,{})}),e.jsx(t,{path:"rewards/*",element:Se?e.jsx(_n,{}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo",element:W?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/",element:W?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:W?e.jsx(pn,{isFileUploadEnabled:Le}):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:{...$.state,message:"...",origin:$.pathname}}))}const gn=({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"}),H=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:f,tenantEmailDomain:O})=>f===!0||i?e.jsx(hn,{tenantEmailDomain:O}):S?e.jsx(xn,{tenantEmailDomain:O}):U?e.jsx(jn,{tenantEmailDomain:O}):V?e.jsx(Tn,{tenantEmailDomain:O}):o?e.jsx(In,{tenantEmailDomain:O}):e.jsx(y,{}),In=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),Tn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),xn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),jn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),De=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{H as FallBackRoute,Nn as default};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-BC3rWAZ9.js","assets/sentry-BfAQgAk9.js","assets/core-BlIgFgLa.js","assets/zeni-epic-state-DuZnqF9c.js","assets/index-DncvUSxy.js","assets/mui-CS8zbV3O.js","assets/analytics-DioYovd8.js","assets/utils-DVmhNkL_.js","assets/withTransactionSidePanel-BIvBB9re.js","assets/useAskAiCfoHostNavButtonProps-D3AdUzbU.js","assets/TransactionDetailScreen-THar40Gx.js","assets/decodeURIComponentSafe-BAori_t5.js","assets/routePaths-Dmvu-NCC.js","assets/NotFoundScreen-BJjtFMw-.js","assets/useInitialThreadRequest-BSNit8Dm.js","assets/analyticsHelper-BAFKFTEz.js","assets/CompanyPassportScreen-BG4GjyzW.js","assets/MobileAppDrawer-DTL1WoBD.js","assets/useAiCfoDashboardSuggestedQuestionsChips-DKQ7ZLxd.js","assets/FeaturePreviewScreen-DgRclQNo.js","assets/ReferralListScreen-q_fN40Me.js","assets/index-R6GjjTB3.css","assets/BillPayRoutes-a5H_tJQE.js","assets/AddressScreen-u2DKTod9.js","assets/DomesticWireDetailScreen-wUhcMv0F.js","assets/DrawerScreen-CkQ0nkdX.js","assets/SetupPagesScreen-Cf1zce1j.js","assets/BusinessVerificationPageScreen-9ZoKahxa.js","assets/BillPayApprovalRoutes-N09AjOOc.js","assets/ReimbursementApprovalRuleDetailScreen-BBaWKiTp.js","assets/getLocaleForTenant-DCl0hO76.js","assets/ReimbursementRoutes-SL5fxS7J.js","assets/ReimbursementApprovalRoutes-CkS321K6.js","assets/TransactionListRoutes-BwyRdzWG.js","assets/ZeniAccountStatementScreen-msNMuYwl.js","assets/SettingsRoutes-BcNsJlyt.js","assets/accountMappingHelper-B8UfZatj.js","assets/QBOConnectionScreen-BxNpQBSW.js","assets/empty-CKxjE7L7.js","assets/index-DRYjcsAT.js","assets/url-D_crimgO.js","assets/index-BdJIoPkw.js","assets/ReportsRoutes-DLhTpIpW.js","assets/ChargeCardRoutes-2_W1Hb5L.js","assets/PeopleRoutes-BW-33fMj.js","assets/ExpenseAutomationRoutes-b2kjRAmk.js","assets/TreasuryRoutes-BB5h4O53.js","assets/VendorsRoutes-yLXsrus9.js","assets/pathToGoBack-laKxrJZN.js","assets/ZeniAccountRoutes-D2gUWZ45.js","assets/AddressRoutes-C-xv804N.js","assets/PandLWithForecastRoutes-DmAeH6yz.js","assets/CustomerOnboardingRoutes-KzbRwyxk.js","assets/TransactionDetailRoutes-DJW-MXcA.js","assets/EntityDetailRoutes-BQrCFcrn.js","assets/NotificationRoutes-Mz0nlcI4.js","assets/PerformanceRoutes-DzYPlTUi.js","assets/RewardsRoutes-DOQc40-T.js","assets/TaskRoutes-C3Y1_GTH.js","assets/TaskListScreen-B5UUNKNq.js","assets/AiCfoScreen-DO34Km7z.js"])))=>i.map(i=>d[i]);
2
+ import{_ as n,bn as ts,eR as is,f0 as rs,e_ as os,e$ as ls,fJ as cs,eV as ds,cO as pe,cw as ms,fg as us,co as _s,bE as As,bo as ps,fl as Es,v as gs,JZ as Is,bs as Ts,J_ as xs,bG as hs,fi as js,bF as Us,bt as Rs,ck as bs,J$ as Hs,K0 as Ds,cL as ys,cN as fs,cM as Cs,cv as vs,cB as Os,ng as Ee,eY as ge,fT as Ps,fp as Ie,fQ as Te,fR as xe,fq as Fs}from"./zeni-epic-state-DuZnqF9c.js";import{j as e}from"./liveblocks-B5BvoK0c.js";import{a as v}from"./sentry-BfAQgAk9.js";import{u as Ls,h as Bs,i as ks,g as Vs,j as G,l as he,N as c,o as Ss,p as t}from"./core-BlIgFgLa.js";import{m as Ns,u as Ms,z as b,a as Zs,c as ws,d as Gs,G as k,k as $s,L as F,D as je,t as _,P as zs,e as Q,l}from"./index-DncvUSxy.js";import"./mui-CS8zbV3O.js";import{f as Ue}from"./analyticsHelper-BAFKFTEz.js";import{t as Ys}from"./getLocaleForTenant-DCl0hO76.js";import"./recharts-DYM_S90p.js";import"./analytics-DioYovd8.js";import"./plaid-C04vDugB.js";import"./dnd-Cx0n399a.js";import"./stripe-DMRn4zHo.js";import"./lottie-s3ChESX6.js";import"./lexical-DUO8UoPe.js";import"./pdf-C5qZkmhF.js";import"./utils-DVmhNkL_.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]="a20a87b6-2e0f-43c5-bb31-ec3d0b9294cc",i._sentryDebugIdIdentifier="sentry-dbid-a20a87b6-2e0f-43c5-bb31-ec3d0b9294cc")}catch{}})();const Js={dashboard:()=>n(()=>import("./DashboardRoutes-BC3rWAZ9.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-a5H_tJQE.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21])),reimbursement:()=>n(()=>import("./ReimbursementRoutes-SL5fxS7J.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21])),transactions:()=>n(()=>import("./TransactionListRoutes-BwyRdzWG.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21])),settings:()=>n(()=>import("./SettingsRoutes-BcNsJlyt.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,11,28,29,32,21])),reports:()=>n(()=>import("./ReportsRoutes-DLhTpIpW.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-2_W1Hb5L.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,13,15,12,27,14,9,23,21])),people:()=>n(()=>import("./PeopleRoutes-BW-33fMj.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-b2kjRAmk.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21])),treasury:()=>n(()=>import("./TreasuryRoutes-BB5h4O53.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,19,21])),vendors:()=>n(()=>import("./VendorsRoutes-yLXsrus9.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,13,19,12,48,9,17,25,36,21])),zeniAccounts:()=>n(()=>import("./ZeniAccountRoutes-D2gUWZ45.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,13,26,17,15,12,27,19,24,23,9,34,21]))},qs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],X=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Ws=l(()=>n(()=>import("./ReportsRoutes-DLhTpIpW.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21]))),Ks=l(()=>n(()=>import("./AddressRoutes-C-xv804N.js"),__vite__mapDeps([50,1,2,3,23,4,5,6,7,13,21]))),Qs=l(()=>n(()=>import("./PeopleRoutes-BW-33fMj.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21]))),Xs=l(()=>n(()=>import("./PandLWithForecastRoutes-DmAeH6yz.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,13,19,9,14,12,17,21]))),en=l(()=>n(()=>import("./CustomerOnboardingRoutes-KzbRwyxk.js"),__vite__mapDeps([52,1,2,3,23,4,5,6,7,13,37,38,39,40,41,11,21]))),sn=l(()=>n(()=>import("./VendorsRoutes-yLXsrus9.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,13,19,12,48,9,17,25,36,21]))),nn=l(()=>n(()=>import("./TransactionDetailRoutes-DJW-MXcA.js"),__vite__mapDeps([53,1,2,3,13,4,5,6,7,10,9,11,12,21]))),Re=l(()=>n(()=>import("./EntityDetailRoutes-BQrCFcrn.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,11,8,9,10,12,21]))),an=l(()=>n(()=>import("./DashboardRoutes-BC3rWAZ9.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-a5H_tJQE.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21]))),tn=l(()=>n(()=>import("./SettingsRoutes-BcNsJlyt.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,11,28,29,32,21]))),He=l(()=>n(()=>import("./ReimbursementRoutes-SL5fxS7J.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21]))),rn=l(()=>n(()=>import("./ZeniAccountRoutes-D2gUWZ45.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,13,26,17,15,12,27,19,24,23,9,34,21]))),on=l(()=>n(()=>import("./TreasuryRoutes-BB5h4O53.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,19,21]))),ln=l(()=>n(()=>import("./TransactionListRoutes-BwyRdzWG.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21]))),cn=l(()=>n(()=>import("./ChargeCardRoutes-2_W1Hb5L.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,13,15,12,27,14,9,23,21]))),dn=l(()=>n(()=>import("./NotificationRoutes-Mz0nlcI4.js"),__vite__mapDeps([55,1,2,3,13,4,5,6,7,9,21]))),mn=l(()=>n(()=>import("./PerformanceRoutes-DzYPlTUi.js"),__vite__mapDeps([56,1,2,3,13,4,5,6,7,9,17,21]))),un=l(()=>n(()=>import("./ExpenseAutomationRoutes-b2kjRAmk.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21]))),_n=l(()=>n(()=>import("./RewardsRoutes-DOQc40-T.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,13,20,9,17,21]))),An=l(()=>n(()=>import("./TaskRoutes-C3Y1_GTH.js"),__vite__mapDeps([58,1,2,3,13,4,5,6,7,14,17,59,9,21]))),pn=l(()=>n(()=>import("./AiCfoScreen-DO34Km7z.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,18,48,21]))),y=l(()=>n(()=>import("./NotFoundScreen-BJjtFMw-.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,21]))),En=l(()=>n(()=>import("./TaskListScreen-B5UUNKNq.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,17,21])));function Nn({setTenantEmailDomain:i}){const U=Ls(),V=Bs(),{tenantEmailDomain:o}=ks(),S=Ns().mode,{setLoading:f,clearAllLoading:O,clearLoading:Z}=Ms(),D=b.getSignedInUserTenant(o)?.tenantId,h=b.getSignedInUser(),ee=ts(h),$=Vs(),[N,ye]=v.useState(!1),r=G(a=>is(a)),{useFeatureGate:L}=Zs(),W=ws(),se=Gs(),{isFeatureEnabled:fe}=L(k.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Ce}=L(k.isTreasuryEnabled),{isFeatureEnabled:ve}=L(k.isChargeCardFeatureEnabled),{isFeatureEnabled:ne}=L(k.isDebitCardFeatureEnabled),j=G(a=>a.tenantState.fetchState),p=G(a=>a.tenantState.activeTenantFetchState.fetchState),u=p==="Completed"||j==="Completed"?rs(ne,r):void 0,z=p==="Completed"||j==="Completed"?os(r):void 0,Oe=p==="Completed"||j==="Completed"?ls(r):void 0,Pe=ve||ne||!!Oe||!!z||!!u,{isFeatureEnabled:Fe}=L(k.isSettingsFeatureEnabled),{isFeatureEnabled:Le}=L(k.isAiCfoFileUploadEnabled),Y=G(a=>cs(a));if(o!=null){const a=b.getSignedInUserTenant(o);h!=null&&a!=null&&Ue(h,r,S)}const w={tenantId:D,userId:h?.userId,sessionId:h?.zeniSessionId},ae=ds(),A=$s(),Be=r.company==null||A?.loggedInUserRoleMap!=null&&pe(A.loggedInUserRole),ke=ms(A?.loggedInUserRoleMap),te=v.useRef(!0),ie=he("/:tenantEmailDomain/onboarding/*")!==null,K=he("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Ve=G(a=>w.tenantId!=null?us(a,w.tenantId):void 0);v.useEffect(()=>{f(F.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(K!=null&&D!=null){const a=K.params.selectedPeriod;if(a!=null){const R=a.split("-");if(R.length===2){const d=_s(Number(R[0])),s=Number(R[1]),m=As(`01-${d<10?`0${d}`:d}-${s}`,je.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=ps();m.isAfter(M,"month")===!1?U(Es(D,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[K,D]),v.useEffect(()=>{N||(ye(!0),f(F.TENANT_FETCHING)),te.current?te.current=!1:!gs(ae,w)&&b.isSignedIn()&&(f(F.TENANT_FETCHING),function(a,R,d,s){if(ge(R?.userId,R?.zeniSessionId,a.tenantId),d(Ps(!0)),d(Ie(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const m=b.getSignedInUserTenantWithId(a.tenantId);s&&je.updateAppLocaleID(Ys(s)),m?.tenantEmailDomain!=null&&b.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}a.userId!=null?Q.identify(a.userId,{tenant_id:a.tenantId}):Q.resetUserIdentity()}(w,h,U,Ve))},[w,ae,h,U,b]),v.useEffect(()=>{b.isSignedIn()&&(f(F.TENANT_FETCHING),function(a,R,d,s,m,M,B){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const J=s!=null&&m?.zeniSessionId!=null,ss=d==null||d.tenantId!==s,ns=d!=null&&d.excludedResources==null,as=d!=null&&d.externalConnections==null;if(J&&ss){B(Ie(s));const q=b.getSignedInUserTenantWithId(s);q?.tenantEmailDomain!=null&&b.saveActiveTenantDomainForUser(q?.tenantEmailDomain),ge(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),B(Te(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),B(xe(m.userId,s)))}else J&&ns&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),B(Te(m.userId,s))),J&&as&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),B(xe(m.userId,s)));if(J){Q.identify(m.userId,{tenant_id:s});const q=s==null||s!=null&&(R==="Completed"||R==="Error");a==="Completed"||R!=="Not-Started"&&R!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(F.TENANT_FETCHING),B(Fs(m.userId,s,m.zeniSessionId))),q&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),B(Ee(m.userId,m.zeniSessionId)))}}(j,p,r,D,h,f,U))},[D,p]),v.useEffect(()=>{b.isSignedIn()&&j==="Completed"&&Y.tenantsBaseInOrder.length>0&&(Z(F.TENANT_FETCHING),b.saveSignedInUserTenants(Is(Y.tenantsBaseInOrder)),h!=null&&Ue(h,r,S,void 0,Y.tenantsBaseInOrder))},[Y,j,r,h]),v.useEffect(()=>{p==="In-Progress"&&f(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&D!=null?(O(),_.markActiveTenantFetchCompleted(D)):p==="Error"&&D!=null&&(_.markActiveTenantFetchFailed(D),Z(F.TENANT_FETCHING),Z(F.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[p,j,D,N]);const re=v.useRef(!1);v.useEffect(()=>{!re.current&&p==="Completed"&&N&&(re.current=!0,function(a=qs,R=3e3){setTimeout(()=>{const d=s=>{if(s>=a.length)return;const m=a[s],M=Js[m];M!=null?M().then(()=>X(()=>d(s+1))).catch(()=>X(()=>d(s+1))):d(s+1)};X(()=>d(0))},R)}())},[p,N]);const C=r?.userRole!=null&&Ts(r?.userRole),{isFeatureEnabled:Se}=L(k.isReferralFeatureEnabled),Ne=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Me=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),P=r?.userRole!=null&&pe(r.userRole),oe=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,le=Pe&&!C,Ze=xs(A?.loggedInUserRoleMap),we=r.externalConnections?.accounting[0]?.isValid,ce=r.company?.companyOnboardingInfo.isOnboardingCompleted,de=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,me=de&&hs(A?.loggedInUserRoleMap),ue=fe&&!C,Ge=r.company!=null&&js(r.company),$e=Ce&&Ge===!0&&!C,ze=oe&&Us(A?.loggedInUserRoleMap),Ye=le&&Rs(A?.loggedInUserRoleMap),Je=ue&&bs(A?.loggedInUserRoleMap),qe=Hs(A?.loggedInUserRoleMap),We=Ds(A?.loggedInUserRoleMap),E=ys(A?.loggedInUserRoleMap),g=fs(A?.loggedInUserRoleMap),I=Cs(A?.loggedInUserRoleMap),T=vs(A?.loggedInUserRoleMap),x=Os(A?.loggedInUserRoleMap),_e=oe&&T,Ae=de&&x,Ke=ue&&E,Qe=$e&&g,Xe=le&&I,es=r.excludedResources?.resources?.find(a=>a.resource==="/invites")!=null||ke===!0||Ze===!0||qe===!0||We===!0;return b.isSignedIn()?D==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ee(h.userId,h.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||j==="Completed"?(ce===!0||ee&&!ie)&&we===!1&&u===!1&&z===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||ce!==!1||ie||ee?N&&r?.userRole&&u!=null&&z!=null&&o!=null&&Object.keys(A.loggedInUserRoleMap).length>0?e.jsx(Ss,{children:e.jsxs(t,{element:e.jsx(zs,{}),children:[e.jsx(t,{path:"/",element:e.jsx(gn,{isDashboardAccess:P,isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,isTenantCardsOnly:z})}),e.jsx(t,{path:"dashboard/*",element:P?e.jsx(an,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:P?e.jsx(Ws,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:es||P?e.jsx(Qs,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:P?e.jsx(Xs,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(en,{})}),e.jsx(t,{path:"transaction/*",element:P&&C===!1||Ne||Me?e.jsx(nn,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:P&&C===!1?e.jsx(ln,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:P&&C===!1?e.jsx(Re,{entityType:"customer"}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isTenantBankingOnly:u,isUserHasTreasuryAccess:g,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:P&&C===!1?e.jsx(Re,{entityType:"vendor"}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(En,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(An,{})}),e.jsx(t,{path:"address/*",element:ze||me||Je||Ye?e.jsx(Ks,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:Ke?e.jsx(rn,{}):e.jsx(y,{})}),e.jsx(t,{path:"treasury/*",element:Qe?e.jsx(on,{}):e.jsx(y,{})}),e.jsx(t,{path:"performance",element:se===!0?e.jsx(mn,{}):e.jsx(De,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:se===!0&&C===!1?e.jsx(un,{}):e.jsx(De,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(dn,{})}),e.jsx(t,{path:"vendors/*",element:Be?e.jsx(sn,{}):e.jsx(y,{})}),e.jsx(t,{path:"bill/*",element:_e?e.jsx(be,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:_e?e.jsx(be,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:Ae?e.jsx(He,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:Ae?e.jsx(He,{}):e.jsx(H,{isUserHasZeniAccountsAccess:E,isUserHasChargeCardAccess:I,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:x,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:Fe?e.jsx(tn,{hasAdminLevelAccess:me}):e.jsx(y,{})}),e.jsx(t,{path:"cards/*",element:Xe?e.jsx(cn,{}):e.jsx(y,{})}),e.jsx(t,{path:"rewards/*",element:Se?e.jsx(_n,{}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo",element:W?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/",element:W?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:W?e.jsx(pn,{isFileUploadEnabled:Le}):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:{...$.state,message:"...",origin:$.pathname}}))}const gn=({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"}),H=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:f,tenantEmailDomain:O})=>f===!0||i?e.jsx(hn,{tenantEmailDomain:O}):S?e.jsx(xn,{tenantEmailDomain:O}):U?e.jsx(jn,{tenantEmailDomain:O}):V?e.jsx(Tn,{tenantEmailDomain:O}):o?e.jsx(In,{tenantEmailDomain:O}):e.jsx(y,{}),In=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),Tn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),xn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),jn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),De=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{H as FallBackRoute,Nn as default};
@@ -1,4 +1,4 @@
1
- import{j as o}from"./liveblocks-CfHMBm08.js";import{a as p}from"./sentry-0vIaNqsr.js";import{h as z,g as $,u as M,j as h,t as se,n as K,i as G,o as W,p as I}from"./core-DvGkVhX0.js";import{bn as Ee,eR as P,fO as Ae,m5 as we,Os as ve,gP as ue,M2 as je,p_ as ke,jI as pe,l$ as Pe,gR as Te,M4 as Me,M3 as De,Ot as Ue,yj as _e,CO as Oe,O1 as Re,Oa as Fe,c1 as ee,cG as Be,cH as ze,K9 as Ve,Ou as Le,Ka as Ne,wL as $e,Ov as Ke,Fa as Ge,Cu as Ze,Cl as ge,Ci as He,wP as me,Co as he,Cr as fe,Cx as ne,tc as te,wO as qe,jk as Y,jn as be,Ow as Qe,ko as Je,x2 as We,KZ as Ye,K_ as Xe,ji as en,Ox as nn,jl as tn,qs as an,Oy as on,Oz as sn,qw as cn,gz as ln,Ki as J,go as rn,gv as dn,Kj as un,w$ as pn,OA as gn,OB as mn,CL as hn,e_ as Se,f0 as Ce,OC as fn,fC as bn,Ks as Sn,w_ as ie,fH as ce,fG as Cn,wZ as yn,fF as In,fE as xn,OD as En,f3 as ye,OE as An,OF as wn,x5 as vn,wY as le,OG as jn,fk as kn,wV as Pn,bU as Tn,c0 as Mn,b$ as Dn,bV as Un,bZ as _n,bY as On,bX as Rn,b_ as Fn,bW as Bn}from"./zeni-epic-state-D_HFZhXl.js";import{a as ae,G as O,z as A,af as Ie,bK as zn,e as Q,g as Vn,k as Z,B as oe,bL as Ln,bM as Nn,aq as $n,i as xe,bN as Kn,bO as Gn,bP as Zn,a9 as Hn,W as qn,bQ as Qn,s as Jn,bR as Wn}from"./index-ChP5wU0r.js";import{n as R}from"./mui-D2FQmczV.js";import{M as D}from"./MobileAppDrawer-w7Ih7RbS.js";import{a as H,g as q,m as Yn}from"./accountMappingHelper-CDd_SN9l.js";import{t as Xn,A as et}from"./AddressScreen-BnC-xeNO.js";import N from"./NotFoundScreen-BNcKpH4N.js";import{g as nt}from"./analyticsHelper-DLbyZBKc.js";import{B as tt}from"./BusinessVerificationPageScreen-CpGRtjnS.js";import{C as at}from"./CompanyPassportScreen-Cx74K6-1.js";import{q as re}from"./QBOConnectionScreen-Dppvtafz.js";import{B as ot}from"./BillPayApprovalRoutes-BKtx1kJ3.js";import{R as st}from"./ReimbursementApprovalRoutes-DrhBbGrt.js";import"./recharts-CnIvro2v.js";import"./analytics-CStLmwuB.js";import"./plaid-DzUK2ot_.js";import"./dnd-DVf98RdY.js";import"./stripe-DMRn4zHo.js";import"./lottie-Byecfo2L.js";import"./lexical-BStGoUxq.js";import"./pdf-CojJ326Z.js";import"./utils-DF5mLbko.js";import"./routePaths-CL9hJjr9.js";import"./empty-C73IrULF.js";import"./pdf-lib-D37uSEI7.js";import"./index-D4KKzLMy.js";import"./url-D3bpmQ93.js";import"./index-CR_F8qmF.js";import"./decodeURIComponentSafe-D3G61A3x.js";import"./ReimbursementApprovalRuleDetailScreen-_CUcSO8M.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]="31137241-3477-49dd-98ec-2ea3c2116ce0",e._sentryDebugIdIdentifier="sentry-dbid-31137241-3477-49dd-98ec-2ea3c2116ce0")}catch{}})();const it=R.div`
1
+ import{j as o}from"./liveblocks-B5BvoK0c.js";import{a as p}from"./sentry-BfAQgAk9.js";import{h as z,g as $,u as M,j as h,t as se,n as K,i as G,o as W,p as I}from"./core-BlIgFgLa.js";import{bn as Ee,eR as P,fO as Ae,m5 as we,Os as ve,gP as ue,M2 as je,p_ as ke,jI as pe,l$ as Pe,gR as Te,M4 as Me,M3 as De,Ot as Ue,yj as _e,CO as Oe,O1 as Re,Oa as Fe,c1 as ee,cG as Be,cH as ze,K9 as Ve,Ou as Le,Ka as Ne,wL as $e,Ov as Ke,Fa as Ge,Cu as Ze,Cl as ge,Ci as He,wP as me,Co as he,Cr as fe,Cx as ne,tc as te,wO as qe,jk as Y,jn as be,Ow as Qe,ko as Je,x2 as We,KZ as Ye,K_ as Xe,ji as en,Ox as nn,jl as tn,qs as an,Oy as on,Oz as sn,qw as cn,gz as ln,Ki as J,go as rn,gv as dn,Kj as un,w$ as pn,OA as gn,OB as mn,CL as hn,e_ as Se,f0 as Ce,OC as fn,fC as bn,Ks as Sn,w_ as ie,fH as ce,fG as Cn,wZ as yn,fF as In,fE as xn,OD as En,f3 as ye,OE as An,OF as wn,x5 as vn,wY as le,OG as jn,fk as kn,wV as Pn,bU as Tn,c0 as Mn,b$ as Dn,bV as Un,bZ as _n,bY as On,bX as Rn,b_ as Fn,bW as Bn}from"./zeni-epic-state-DuZnqF9c.js";import{a as ae,G as O,z as A,af as Ie,bK as zn,e as Q,g as Vn,k as Z,B as oe,bL as Ln,bM as Nn,aq as $n,i as xe,bN as Kn,bO as Gn,bP as Zn,a9 as Hn,W as qn,bQ as Qn,s as Jn,bR as Wn}from"./index-DncvUSxy.js";import{n as R}from"./mui-CS8zbV3O.js";import{M as D}from"./MobileAppDrawer-DTL1WoBD.js";import{a as H,g as q,m as Yn}from"./accountMappingHelper-B8UfZatj.js";import{t as Xn,A as et}from"./AddressScreen-u2DKTod9.js";import N from"./NotFoundScreen-BJjtFMw-.js";import{g as nt}from"./analyticsHelper-BAFKFTEz.js";import{B as tt}from"./BusinessVerificationPageScreen-9ZoKahxa.js";import{C as at}from"./CompanyPassportScreen-BG4GjyzW.js";import{q as re}from"./QBOConnectionScreen-BxNpQBSW.js";import{B as ot}from"./BillPayApprovalRoutes-N09AjOOc.js";import{R as st}from"./ReimbursementApprovalRoutes-CkS321K6.js";import"./recharts-DYM_S90p.js";import"./analytics-DioYovd8.js";import"./plaid-C04vDugB.js";import"./dnd-Cx0n399a.js";import"./stripe-DMRn4zHo.js";import"./lottie-s3ChESX6.js";import"./lexical-DUO8UoPe.js";import"./pdf-C5qZkmhF.js";import"./utils-DVmhNkL_.js";import"./routePaths-Dmvu-NCC.js";import"./empty-CKxjE7L7.js";import"./pdf-lib-DGiLdKDM.js";import"./index-DRYjcsAT.js";import"./url-D_crimgO.js";import"./index-BdJIoPkw.js";import"./decodeURIComponentSafe-BAori_t5.js";import"./ReimbursementApprovalRuleDetailScreen-BBaWKiTp.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]="31137241-3477-49dd-98ec-2ea3c2116ce0",e._sentryDebugIdIdentifier="sentry-dbid-31137241-3477-49dd-98ec-2ea3c2116ce0")}catch{}})();const it=R.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as u}from"./liveblocks-CfHMBm08.js";import{h as Y,g as Q,u as X,i as G,j as E,N as R,n as W,s as Qe}from"./core-DvGkVhX0.js";import{bF as Xe,ck as Ie,NR as ye,eR as V,cw as en,yu as Z,yj as nn,O1 as tn,O4 as an,qL as ee,qz as ne,kg as te,sK as z,O6 as Ae,fG as $e,fF as Ge,fE as We,O7 as sn,yD as on,Cu as ke,Cl as _e,Ci as ve,C9 as K,Co as Pe,Cr as Ee,Cx as we,tc as Te,fV as cn,cr as rn,f0 as un,e_ as dn,e$ as ln,bt as pn,O8 as mn,Bb as le,BP as yn,O9 as fn,bG as gn,DK as pe,CO as Sn,Oa as bn,Ob as hn,DO as Cn,DS as In,sD as An,Ii as kn,En as Ce,Fo as me,Oc as _n,Od as vn,Oe as Pn,Of as He,Og as En,KM as wn,Ne as Tn,KY as Dn,Oh as qe,Oi as Be,EJ as Ke,ko as On,qC as Je,sM as Un,bE as je,sY as Re,cu as Fn,Oj as Ye,fj as Bn,E5 as Vn,E9 as xn,Ok as jn,Eq as Ne,Ol as Rn,Om as Nn,On as zn,Oo as Ln,fO as Mn,zO as Zn,Op as $n,zT as Gn,zS as Wn}from"./zeni-epic-state-D_HFZhXl.js";import{k as ae,a as ie,G as de,m as De,aN as J,z as w,y as se,e as T,B as Oe,g as $,bz as Hn,at as oe,bA as x,bB as qn,bC as Kn,af as xe,bD as Jn,s as ze,au as Le,J as Yn,E as Qn,bE as Xn,bF as et,bG as nt,a7 as tt}from"./index-ChP5wU0r.js";import{a as C}from"./sentry-0vIaNqsr.js";import{n as Ve,D as at,S as it}from"./mui-D2FQmczV.js";import{M as fe}from"./MobileAppDrawer-w7Ih7RbS.js";import N from"./NotFoundScreen-BNcKpH4N.js";import{a as Me}from"./analyticsHelper-DLbyZBKc.js";import{d as Ze}from"./routePaths-CL9hJjr9.js";import{B as Fe}from"./BusinessVerificationPageScreen-CpGRtjnS.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]="0ddcdb9e-c59b-44f3-9308-86965afc135c",e._sentryDebugIdIdentifier="sentry-dbid-0ddcdb9e-c59b-44f3-9308-86965afc135c")}catch{}})();const st=Ve.div`
1
+ import{j as u}from"./liveblocks-B5BvoK0c.js";import{h as Y,g as Q,u as X,i as G,j as E,N as R,n as W,s as Qe}from"./core-BlIgFgLa.js";import{bF as Xe,ck as Ie,NR as ye,eR as V,cw as en,yu as Z,yj as nn,O1 as tn,O4 as an,qL as ee,qz as ne,kg as te,sK as z,O6 as Ae,fG as $e,fF as Ge,fE as We,O7 as sn,yD as on,Cu as ke,Cl as _e,Ci as ve,C9 as K,Co as Pe,Cr as Ee,Cx as we,tc as Te,fV as cn,cr as rn,f0 as un,e_ as dn,e$ as ln,bt as pn,O8 as mn,Bb as le,BP as yn,O9 as fn,bG as gn,DK as pe,CO as Sn,Oa as bn,Ob as hn,DO as Cn,DS as In,sD as An,Ii as kn,En as Ce,Fo as me,Oc as _n,Od as vn,Oe as Pn,Of as He,Og as En,KM as wn,Ne as Tn,KY as Dn,Oh as qe,Oi as Be,EJ as Ke,ko as On,qC as Je,sM as Un,bE as je,sY as Re,cu as Fn,Oj as Ye,fj as Bn,E5 as Vn,E9 as xn,Ok as jn,Eq as Ne,Ol as Rn,Om as Nn,On as zn,Oo as Ln,fO as Mn,zO as Zn,Op as $n,zT as Gn,zS as Wn}from"./zeni-epic-state-DuZnqF9c.js";import{k as ae,a as ie,G as de,m as De,aN as J,z as w,y as se,e as T,B as Oe,g as $,bz as Hn,at as oe,bA as x,bB as qn,bC as Kn,af as xe,bD as Jn,s as ze,au as Le,J as Yn,E as Qn,bE as Xn,bF as et,bG as nt,a7 as tt}from"./index-DncvUSxy.js";import{a as C}from"./sentry-BfAQgAk9.js";import{n as Ve,D as at,S as it}from"./mui-CS8zbV3O.js";import{M as fe}from"./MobileAppDrawer-DTL1WoBD.js";import N from"./NotFoundScreen-BJjtFMw-.js";import{a as Me}from"./analyticsHelper-BAFKFTEz.js";import{d as Ze}from"./routePaths-Dmvu-NCC.js";import{B as Fe}from"./BusinessVerificationPageScreen-9ZoKahxa.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]="0ddcdb9e-c59b-44f3-9308-86965afc135c",e._sentryDebugIdIdentifier="sentry-dbid-0ddcdb9e-c59b-44f3-9308-86965afc135c")}catch{}})();const st=Ve.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{j as f}from"./liveblocks-CfHMBm08.js";import{a as u,b as T,q as A}from"./sentry-0vIaNqsr.js";import{u as D,h as z,j as l,g as M,N as O,n as j}from"./core-DvGkVhX0.js";import{u as P,z as s,m as F,e as E,D as K,f as N,g as _,M as B,h as J,C as V,i as v}from"./index-ChP5wU0r.js";import{eR as Y,JY as $,JZ as q,eY as R,fp as W,K2 as H,fN as Z,cS as G,K3 as b,K4 as Q,K5 as X,bT as y}from"./zeni-epic-state-D_HFZhXl.js";import"./mui-D2FQmczV.js";import{u as ee}from"./useDeviceId-BXBJZ6FP.js";import{f as te}from"./analyticsHelper-DLbyZBKc.js";import{t as ne}from"./getLocaleForTenant-cEMfjXsu.js";import"./recharts-CnIvro2v.js";import"./analytics-CStLmwuB.js";import"./plaid-DzUK2ot_.js";import"./dnd-DVf98RdY.js";import"./stripe-DMRn4zHo.js";import"./lottie-Byecfo2L.js";import"./lexical-BStGoUxq.js";import"./pdf-CojJ326Z.js";import"./utils-DF5mLbko.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]="e23feb85-7aa0-4f71-8e99-a4dea793c1e6",t._sentryDebugIdIdentifier="sentry-dbid-e23feb85-7aa0-4f71-8e99-a4dea793c1e6")}catch{}})();const ie=j(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(X({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(Q(n,a)))},clearSignInError:()=>{t(b())}}})(V),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:h,accountLocked:C,accountUnlockTime:k}=l(e=>e.tenantState),p=l(e=>e.tenantState.fetchState),L=l(e=>e.tenantState.activeTenantFetchState.fetchState),S=l(e=>e.tenantState.signInState),o=l(e=>e.tenantState.loggedInUser),r=l(e=>Y(e)),I=l(e=>$(e)),m=M(),w=F().mode,U=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{h.fetchState==="Completed"&&c!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))},[h.fetchState,c]),u.useEffect(()=>{t(void 0)},[]),u.useEffect(()=>{S!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(q(I.tenantsInOrder),o.zeniSessionId),R(o.userId,o.zeniSessionId,r.tenantId),i(W(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(H("Completed")),K.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),Z().then(()=>{const e=J();e!=null&&N(e)}),setTimeout(()=>{E.trackLogin(_.Event.loginSuccess,o.authProvider??"google",G(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(O,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!U,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),C===!0&&k!=null?f.jsx(B,{onClose:()=>i(b()),unlockDate:k}):null]})}export{ve as default};
1
+ import{j as f}from"./liveblocks-B5BvoK0c.js";import{a as u,b as T,q as A}from"./sentry-BfAQgAk9.js";import{u as D,h as z,j as l,g as M,N as O,n as j}from"./core-BlIgFgLa.js";import{u as P,z as s,m as F,e as E,D as K,f as N,g as _,M as B,h as J,C as V,i as v}from"./index-DncvUSxy.js";import{eR as Y,JY as $,JZ as q,eY as R,fp as W,K2 as H,fN as Z,cS as G,K3 as b,K4 as Q,K5 as X,bT as y}from"./zeni-epic-state-DuZnqF9c.js";import"./mui-CS8zbV3O.js";import{u as ee}from"./useDeviceId-DlJFeskE.js";import{f as te}from"./analyticsHelper-BAFKFTEz.js";import{t as ne}from"./getLocaleForTenant-DCl0hO76.js";import"./recharts-DYM_S90p.js";import"./analytics-DioYovd8.js";import"./plaid-C04vDugB.js";import"./dnd-Cx0n399a.js";import"./stripe-DMRn4zHo.js";import"./lottie-s3ChESX6.js";import"./lexical-DUO8UoPe.js";import"./pdf-C5qZkmhF.js";import"./utils-DVmhNkL_.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]="e23feb85-7aa0-4f71-8e99-a4dea793c1e6",t._sentryDebugIdIdentifier="sentry-dbid-e23feb85-7aa0-4f71-8e99-a4dea793c1e6")}catch{}})();const ie=j(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(X({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(Q(n,a)))},clearSignInError:()=>{t(b())}}})(V),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:h,accountLocked:C,accountUnlockTime:k}=l(e=>e.tenantState),p=l(e=>e.tenantState.fetchState),L=l(e=>e.tenantState.activeTenantFetchState.fetchState),S=l(e=>e.tenantState.signInState),o=l(e=>e.tenantState.loggedInUser),r=l(e=>Y(e)),I=l(e=>$(e)),m=M(),w=F().mode,U=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{h.fetchState==="Completed"&&c!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))},[h.fetchState,c]),u.useEffect(()=>{t(void 0)},[]),u.useEffect(()=>{S!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(q(I.tenantsInOrder),o.zeniSessionId),R(o.userId,o.zeniSessionId,r.tenantId),i(W(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(H("Completed")),K.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),Z().then(()=>{const e=J();e!=null&&N(e)}),setTimeout(()=>{E.trackLogin(_.Event.loginSuccess,o.authProvider??"google",G(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(O,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!U,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),C===!0&&k!=null?f.jsx(B,{onClose:()=>i(b()),unlockDate:k}):null]})}export{ve as default};
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-CfHMBm08.js";import{a as n}from"./sentry-0vIaNqsr.js";import{u,g as m,h as g,N as p}from"./core-DvGkVhX0.js";import{z as f,B as y,t as h,e as l,g as b}from"./index-ChP5wU0r.js";import{fS as x,fT as I,Kk as w}from"./zeni-epic-state-D_HFZhXl.js";import{n as j}from"./mui-D2FQmczV.js";import"./recharts-CnIvro2v.js";import"./analytics-CStLmwuB.js";import"./plaid-DzUK2ot_.js";import"./dnd-DVf98RdY.js";import"./stripe-DMRn4zHo.js";import"./lottie-Byecfo2L.js";import"./lexical-BStGoUxq.js";import"./pdf-CojJ326Z.js";import"./utils-DF5mLbko.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]="09495237-999e-4971-a511-2c548a6a2aa3",e._sentryDebugIdIdentifier="sentry-dbid-09495237-999e-4971-a511-2c548a6a2aa3")}catch{}})();function $(){const e=u(),t=m(),a=g(),i=n.useRef(!1),c=f.isSignedIn(),r=t.state?.message==="logout",o=r||c;return n.useEffect(()=>{o&&!i.current&&(i.current=!0,setTimeout(()=>{try{f.clearAll(),e(x()),e(I(!1)),w(),h.reset(),l.trackLogout(b.Event.logoutSuccess),l.resetUserIdentity()}catch(d){console.error("Error during sign out:",d)}finally{r||a("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(k,{children:s.jsx(y,{fetchState:"In-Progress"})}):s.jsx(p,{to:"../",replace:!0})}const k=j.div`
1
+ import{j as s}from"./liveblocks-B5BvoK0c.js";import{a as n}from"./sentry-BfAQgAk9.js";import{u,g as m,h as g,N as p}from"./core-BlIgFgLa.js";import{z as f,B as y,t as h,e as l,g as b}from"./index-DncvUSxy.js";import{fS as x,fT as I,Kk as w}from"./zeni-epic-state-DuZnqF9c.js";import{n as j}from"./mui-CS8zbV3O.js";import"./recharts-DYM_S90p.js";import"./analytics-DioYovd8.js";import"./plaid-C04vDugB.js";import"./dnd-Cx0n399a.js";import"./stripe-DMRn4zHo.js";import"./lottie-s3ChESX6.js";import"./lexical-DUO8UoPe.js";import"./pdf-C5qZkmhF.js";import"./utils-DVmhNkL_.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]="09495237-999e-4971-a511-2c548a6a2aa3",e._sentryDebugIdIdentifier="sentry-dbid-09495237-999e-4971-a511-2c548a6a2aa3")}catch{}})();function $(){const e=u(),t=m(),a=g(),i=n.useRef(!1),c=f.isSignedIn(),r=t.state?.message==="logout",o=r||c;return n.useEffect(()=>{o&&!i.current&&(i.current=!0,setTimeout(()=>{try{f.clearAll(),e(x()),e(I(!1)),w(),h.reset(),l.trackLogout(b.Event.logoutSuccess),l.resetUserIdentity()}catch(d){console.error("Error during sign out:",d)}finally{r||a("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(k,{children:s.jsx(y,{fetchState:"In-Progress"})}):s.jsx(p,{to:"../",replace:!0})}const k=j.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as u}from"./liveblocks-CfHMBm08.js";import{a as D}from"./sentry-0vIaNqsr.js";import{h as U,u as _,g as z,j as b,i as K,n as V}from"./core-DvGkVhX0.js";import{z as L,a as H,G as p,_ as M,y as O,e as W,g as q,cT as Z,s as g,r as J}from"./index-ChP5wU0r.js";import{eR as Q,Rn as F,H3 as y,Ro as x,Rj as X,Gr as E,Rp as Y,Gz as S,FV as aa,H4 as I,Rq as R,gV as ea,GW as ta,G$ as sa,GO as oa,GM as B,H0 as na,GJ as ia,Rr as la,Rs as ra,Rt as ka,Ru as ca,Rv as m,ed as da,Rw as ua,Rx as pa}from"./zeni-epic-state-D_HFZhXl.js";import{n as ma}from"./mui-D2FQmczV.js";import{u as Ta}from"./useAskAiCfoHostNavButtonProps-RTOhQENK.js";import{M as ga}from"./MobileAppDrawer-w7Ih7RbS.js";import"./recharts-CnIvro2v.js";import"./analytics-CStLmwuB.js";import"./plaid-DzUK2ot_.js";import"./dnd-DVf98RdY.js";import"./stripe-DMRn4zHo.js";import"./lottie-Byecfo2L.js";import"./lexical-BStGoUxq.js";import"./pdf-CojJ326Z.js";import"./utils-DF5mLbko.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]="4ded1fb1-5049-409d-b5ae-81210a19cadf",e._sentryDebugIdIdentifier="sentry-dbid-4ded1fb1-5049-409d-b5ae-81210a19cadf")}catch{}})();const fa=ma.div`
1
+ import{j as u}from"./liveblocks-B5BvoK0c.js";import{a as D}from"./sentry-BfAQgAk9.js";import{h as U,u as _,g as z,j as b,i as K,n as V}from"./core-BlIgFgLa.js";import{z as L,a as H,G as p,_ as M,y as O,e as W,g as q,cT as Z,s as g,r as J}from"./index-DncvUSxy.js";import{eR as Q,Rn as F,H3 as y,Ro as x,Rj as X,Gr as E,Rp as Y,Gz as S,FV as aa,H4 as I,Rq as R,gV as ea,GW as ta,G$ as sa,GO as oa,GM as B,H0 as na,GJ as ia,Rr as la,Rs as ra,Rt as ka,Ru as ca,Rv as m,ed as da,Rw as ua,Rx as pa}from"./zeni-epic-state-DuZnqF9c.js";import{n as ma}from"./mui-CS8zbV3O.js";import{u as Ta}from"./useAskAiCfoHostNavButtonProps-D3AdUzbU.js";import{M as ga}from"./MobileAppDrawer-DTL1WoBD.js";import"./recharts-DYM_S90p.js";import"./analytics-DioYovd8.js";import"./plaid-C04vDugB.js";import"./dnd-Cx0n399a.js";import"./stripe-DMRn4zHo.js";import"./lottie-s3ChESX6.js";import"./lexical-DUO8UoPe.js";import"./pdf-C5qZkmhF.js";import"./utils-DVmhNkL_.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]="4ded1fb1-5049-409d-b5ae-81210a19cadf",e._sentryDebugIdIdentifier="sentry-dbid-4ded1fb1-5049-409d-b5ae-81210a19cadf")}catch{}})();const fa=ma.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as n}from"./liveblocks-CfHMBm08.js";import se from"./NotFoundScreen-BNcKpH4N.js";import{a as c}from"./sentry-0vIaNqsr.js";import{h as M,u as Z,j as f,g as ne,i as oe,N as ie,n as re,o as ce,p as g}from"./core-DvGkVhX0.js";import{G6 as O,G9 as le,G3 as de,eR as Y,Rj as H,Gn as J,G0 as pe,GT as ue,GM as ke,Rk as W,Rl as N,FY as me,FV as ge,qL as fe,qz as he,kg as Se,Gh as Ge,Rm as Ie,Gy as be,Gv as Te,Gc as Ee,Gs as Ce,Gr as De}from"./zeni-epic-state-D_HFZhXl.js";import{z as C,cR as ye,w as Re,a as xe,G as b,r as X,s as w,y as je,e as V,g as we,cS as ve,i as q,at as Fe}from"./index-ChP5wU0r.js";import{n as Be}from"./mui-D2FQmczV.js";import{u as Pe}from"./useInitialThreadRequest-CLh-E-cE.js";import{M as Ue}from"./MobileAppDrawer-w7Ih7RbS.js";import Le from"./TaskListScreen-zDige7Qx.js";import"./recharts-CnIvro2v.js";import"./analytics-CStLmwuB.js";import"./plaid-DzUK2ot_.js";import"./dnd-DVf98RdY.js";import"./stripe-DMRn4zHo.js";import"./lottie-Byecfo2L.js";import"./lexical-BStGoUxq.js";import"./pdf-CojJ326Z.js";import"./utils-DF5mLbko.js";import"./useAskAiCfoHostNavButtonProps-RTOhQENK.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]="67be747c-f509-476c-abe6-b6e00cb67fad",e._sentryDebugIdIdentifier="sentry-dbid-67be747c-f509-476c-abe6-b6e00cb67fad")}catch{}})();function $e(){const e=M(),t=Z(),s=C.getSignedInUser(),{cannedResponses:u,fetchState:r,saveFetchState:d}=f(o=>o.cannedResponsesState),l=c.useCallback(()=>{t(O())},[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(ye,{cannedResponses:u,isLoading:r==="In-Progress"||r==="Not-Started",isSaving:d==="In-Progress",onBackClick:()=>e(-1),onDelete:a,onFetch:l,onSave:k})}let A,_=[];const ze=re(function(e,t){const{location:s,taskGroupId:u}=t,r=W(e,t.taskId),d=Y(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:D}=d,T=r.recurringSourceTaskId,y=T!=null?`${q.appUrl}/${D}/tasks/${encodeURIComponent(T)}`:void 0;var G;return{taskDetailSelectorView:r,authParams:h,isZeniUser:C.isZeniUser(),userGroupList:((G=e.userGroupsState.userGroupByUserGroupId)!==A&&(A=G,_=Object.values(G)),_),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Fe.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${q.appUrl}${t.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:y,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(De({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(Ce(s,a??l))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ee(t.taskId))},onSnoozeTask:(a,o)=>{e(Te(a,o))},onUnsnoozeTask:a=>{e(be(a))},onDismissClick:()=>{if(d.state?.message==="triggerBackClick"){const a=X(d.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";u(o,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=v(k),o=w(d.state?.pathnameStackToGoBack,d.pathname);u(a,{state:{pathnameStackToGoBack:o}})}e(Ie({taskId:s}))},onDeleteTaskClick:()=>{e(Ge(s))},updateFilesEntity:a=>{e(Se({files:a}))},onDeleteFile:a=>{e(he(a))},onEditFileName:(a,o)=>{e(fe(a,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(J(!1,s))},onCreateTagClick:a=>{e(ge(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(O())},onManageTemplatesClick:()=>{u(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}})(ve);function j(){const e=M(),t=Z(),s=ne(),u=Re(),{taskId:r,taskGroupId:d}=oe(),l=f(i=>Y(i)),k=Pe(l?.companyId),{useFeatureGate:a}=xe(),{isFeatureEnabled:o}=a(b.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(b.isTaskVisibilityEnabled),{isFeatureEnabled:S}=a(b.isTaskCannedResponsesEnabled),{isFeatureEnabled:D}=a(b.isTaskRecurringParentEnabled),{isFeatureEnabled:T}=a(b.isTaskGroupAssigneesEnabled),[y,G]=c.useState(!1),[p,K]=c.useState(!1),[F,Q]=c.useState(!1),[B,ee]=c.useState(!1),[P,R]=c.useState(!1),I=c.useRef(!1),E=f(i=>i.taskListState.updateTasksFetchState.fetchState),U=f(i=>H(i)),L=f(i=>i.taskGroupViewState.fetchState);c.useEffect(()=>{p||(K(!0),t(J(!1,r)))},[p,t]),c.useEffect(()=>{F||U.fetchState==="Completed"||(Q(!0),t(pe()))},[F,t,U.fetchState]),c.useEffect(()=>{B||L==="Completed"||(ee(!0),t(ue()))},[B,t,L]);const ae=c.useCallback(()=>{r!=null&&(I.current=!1,t(ke([r],null,{isArchived:!1})),R(!0))},[t,r]);c.useEffect(()=>{if(P)if(E!=="In-Progress"){if(I.current){if(E==="Error")return R(!1),void(I.current=!1);if(E==="Completed"){R(!1),I.current=!1;const{tenantEmailDomain:i}=l;if(s.state?.message==="triggerBackClick"){const m=X(s.state?.pathnameStackToGoBack);e(m.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:m.newStack}})}else{const m=v(i);e(m,{state:{pathnameStackToGoBack:w(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else I.current=!0},[P,E,l,s,e]);const $=f(i=>W(i,r)),x=$.fetchState,z=C.getSignedInUser();if(z==null)throw Error("Can't access task detail page without signing in...");if(x==="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:[x==="Completed"?n.jsx(je,{analytics:V,onLoad:i=>(m=>m.trackPageLoaded(we.Event.taskDetailPage))(i)}):null,n.jsxs(Ne,{children:[n.jsx(Ue,{isAppContentDrawerOpen:y,handleDrawerToggle:i=>{G(i)}}),n.jsx(ze,{analytics:V,currentTenant:l,handleZeniLogoClick:()=>{u.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:z,navigate:e,taskGroupId:d,taskId:r,taskDetailFetchState:x,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:S,isTaskRecurringParentEnabled:D,isTaskGroupAssigneesEnabled:T})]})]})}const Ne=Be.div`
1
+ import{j as n}from"./liveblocks-B5BvoK0c.js";import se from"./NotFoundScreen-BJjtFMw-.js";import{a as c}from"./sentry-BfAQgAk9.js";import{h as M,u as Z,j as f,g as ne,i as oe,N as ie,n as re,o as ce,p as g}from"./core-BlIgFgLa.js";import{G6 as O,G9 as le,G3 as de,eR as Y,Rj as H,Gn as J,G0 as pe,GT as ue,GM as ke,Rk as W,Rl as N,FY as me,FV as ge,qL as fe,qz as he,kg as Se,Gh as Ge,Rm as Ie,Gy as be,Gv as Te,Gc as Ee,Gs as Ce,Gr as De}from"./zeni-epic-state-DuZnqF9c.js";import{z as C,cR as ye,w as Re,a as xe,G as b,r as X,s as w,y as je,e as V,g as we,cS as ve,i as q,at as Fe}from"./index-DncvUSxy.js";import{n as Be}from"./mui-CS8zbV3O.js";import{u as Pe}from"./useInitialThreadRequest-BSNit8Dm.js";import{M as Ue}from"./MobileAppDrawer-DTL1WoBD.js";import Le from"./TaskListScreen-B5UUNKNq.js";import"./recharts-DYM_S90p.js";import"./analytics-DioYovd8.js";import"./plaid-C04vDugB.js";import"./dnd-Cx0n399a.js";import"./stripe-DMRn4zHo.js";import"./lottie-s3ChESX6.js";import"./lexical-DUO8UoPe.js";import"./pdf-C5qZkmhF.js";import"./utils-DVmhNkL_.js";import"./useAskAiCfoHostNavButtonProps-D3AdUzbU.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]="67be747c-f509-476c-abe6-b6e00cb67fad",e._sentryDebugIdIdentifier="sentry-dbid-67be747c-f509-476c-abe6-b6e00cb67fad")}catch{}})();function $e(){const e=M(),t=Z(),s=C.getSignedInUser(),{cannedResponses:u,fetchState:r,saveFetchState:d}=f(o=>o.cannedResponsesState),l=c.useCallback(()=>{t(O())},[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(ye,{cannedResponses:u,isLoading:r==="In-Progress"||r==="Not-Started",isSaving:d==="In-Progress",onBackClick:()=>e(-1),onDelete:a,onFetch:l,onSave:k})}let A,_=[];const ze=re(function(e,t){const{location:s,taskGroupId:u}=t,r=W(e,t.taskId),d=Y(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:D}=d,T=r.recurringSourceTaskId,y=T!=null?`${q.appUrl}/${D}/tasks/${encodeURIComponent(T)}`:void 0;var G;return{taskDetailSelectorView:r,authParams:h,isZeniUser:C.isZeniUser(),userGroupList:((G=e.userGroupsState.userGroupByUserGroupId)!==A&&(A=G,_=Object.values(G)),_),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Fe.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${q.appUrl}${t.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:y,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(De({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(Ce(s,a??l))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ee(t.taskId))},onSnoozeTask:(a,o)=>{e(Te(a,o))},onUnsnoozeTask:a=>{e(be(a))},onDismissClick:()=>{if(d.state?.message==="triggerBackClick"){const a=X(d.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";u(o,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=v(k),o=w(d.state?.pathnameStackToGoBack,d.pathname);u(a,{state:{pathnameStackToGoBack:o}})}e(Ie({taskId:s}))},onDeleteTaskClick:()=>{e(Ge(s))},updateFilesEntity:a=>{e(Se({files:a}))},onDeleteFile:a=>{e(he(a))},onEditFileName:(a,o)=>{e(fe(a,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(J(!1,s))},onCreateTagClick:a=>{e(ge(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(O())},onManageTemplatesClick:()=>{u(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}})(ve);function j(){const e=M(),t=Z(),s=ne(),u=Re(),{taskId:r,taskGroupId:d}=oe(),l=f(i=>Y(i)),k=Pe(l?.companyId),{useFeatureGate:a}=xe(),{isFeatureEnabled:o}=a(b.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(b.isTaskVisibilityEnabled),{isFeatureEnabled:S}=a(b.isTaskCannedResponsesEnabled),{isFeatureEnabled:D}=a(b.isTaskRecurringParentEnabled),{isFeatureEnabled:T}=a(b.isTaskGroupAssigneesEnabled),[y,G]=c.useState(!1),[p,K]=c.useState(!1),[F,Q]=c.useState(!1),[B,ee]=c.useState(!1),[P,R]=c.useState(!1),I=c.useRef(!1),E=f(i=>i.taskListState.updateTasksFetchState.fetchState),U=f(i=>H(i)),L=f(i=>i.taskGroupViewState.fetchState);c.useEffect(()=>{p||(K(!0),t(J(!1,r)))},[p,t]),c.useEffect(()=>{F||U.fetchState==="Completed"||(Q(!0),t(pe()))},[F,t,U.fetchState]),c.useEffect(()=>{B||L==="Completed"||(ee(!0),t(ue()))},[B,t,L]);const ae=c.useCallback(()=>{r!=null&&(I.current=!1,t(ke([r],null,{isArchived:!1})),R(!0))},[t,r]);c.useEffect(()=>{if(P)if(E!=="In-Progress"){if(I.current){if(E==="Error")return R(!1),void(I.current=!1);if(E==="Completed"){R(!1),I.current=!1;const{tenantEmailDomain:i}=l;if(s.state?.message==="triggerBackClick"){const m=X(s.state?.pathnameStackToGoBack);e(m.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:m.newStack}})}else{const m=v(i);e(m,{state:{pathnameStackToGoBack:w(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else I.current=!0},[P,E,l,s,e]);const $=f(i=>W(i,r)),x=$.fetchState,z=C.getSignedInUser();if(z==null)throw Error("Can't access task detail page without signing in...");if(x==="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:[x==="Completed"?n.jsx(je,{analytics:V,onLoad:i=>(m=>m.trackPageLoaded(we.Event.taskDetailPage))(i)}):null,n.jsxs(Ne,{children:[n.jsx(Ue,{isAppContentDrawerOpen:y,handleDrawerToggle:i=>{G(i)}}),n.jsx(ze,{analytics:V,currentTenant:l,handleZeniLogoClick:()=>{u.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:z,navigate:e,taskGroupId:d,taskId:r,taskDetailFetchState:x,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:S,isTaskRecurringParentEnabled:D,isTaskGroupAssigneesEnabled:T})]})]})}const Ne=Be.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{j as t}from"./liveblocks-CfHMBm08.js";import i from"./NotFoundScreen-BNcKpH4N.js";import{T as r}from"./TransactionDetailScreen-Nhb9Cdoj.js";import"./sentry-0vIaNqsr.js";import{o as a,p as o}from"./core-DvGkVhX0.js";import"./zeni-epic-state-D_HFZhXl.js";import"./recharts-CnIvro2v.js";import"./index-ChP5wU0r.js";import"./mui-D2FQmczV.js";import"./analytics-CStLmwuB.js";import"./plaid-DzUK2ot_.js";import"./dnd-DVf98RdY.js";import"./stripe-DMRn4zHo.js";import"./lottie-Byecfo2L.js";import"./lexical-BStGoUxq.js";import"./pdf-CojJ326Z.js";import"./utils-DF5mLbko.js";import"./useAskAiCfoHostNavButtonProps-RTOhQENK.js";import"./decodeURIComponentSafe-D3G61A3x.js";import"./routePaths-CL9hJjr9.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="8f33aac6-3389-4f99-92e2-514bb2135525",e._sentryDebugIdIdentifier="sentry-dbid-8f33aac6-3389-4f99-92e2-514bb2135525")}catch{}})();function k(){return t.jsxs(a,{children:[t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(o,{path:"/*",element:t.jsx(r,{})})]})}export{k as default};
1
+ import{j as t}from"./liveblocks-B5BvoK0c.js";import i from"./NotFoundScreen-BJjtFMw-.js";import{T as r}from"./TransactionDetailScreen-THar40Gx.js";import"./sentry-BfAQgAk9.js";import{o as a,p as o}from"./core-BlIgFgLa.js";import"./zeni-epic-state-DuZnqF9c.js";import"./recharts-DYM_S90p.js";import"./index-DncvUSxy.js";import"./mui-CS8zbV3O.js";import"./analytics-DioYovd8.js";import"./plaid-C04vDugB.js";import"./dnd-Cx0n399a.js";import"./stripe-DMRn4zHo.js";import"./lottie-s3ChESX6.js";import"./lexical-DUO8UoPe.js";import"./pdf-C5qZkmhF.js";import"./utils-DVmhNkL_.js";import"./useAskAiCfoHostNavButtonProps-D3AdUzbU.js";import"./decodeURIComponentSafe-BAori_t5.js";import"./routePaths-Dmvu-NCC.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="8f33aac6-3389-4f99-92e2-514bb2135525",e._sentryDebugIdIdentifier="sentry-dbid-8f33aac6-3389-4f99-92e2-514bb2135525")}catch{}})();function k(){return t.jsxs(a,{children:[t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(o,{path:"/*",element:t.jsx(r,{})})]})}export{k as default};
@@ -1,4 +1,4 @@
1
- import{j as w}from"./liveblocks-CfHMBm08.js";import{a as r}from"./sentry-0vIaNqsr.js";import{u as N,k as Je,j as h,t as Qe,g as he,h as ge,i as Se,N as Xe,n as Ke}from"./core-DvGkVhX0.js";import{mU as me,eR as J,fO as Ze,m5 as ea,m3 as aa,bn as ta,cO as ye,bs as Te,qj as G,La as $,Mb as be,Mc as ae,LA as Ee,jT as Ie,Md as ve,LF as te,LG as ne,kI as Ce,Ia as oe,L4 as M,jN as De,jL as ke,jX as na,mH as oa,Me as sa,Mf as ia,up as Y,jS as Ae,Hv as xe,cT as ra,cU as ca,Mg as la,L3 as da,Mh as ua,ul as ma,Mi as pa,Mj as fa,Mk as ha,Ml as ga,Mm as Sa,jW as ya,Mn as Ta,Mo as ba,L5 as Ea,Mp as Ia,Mq as va,Mr as Ca,Hp as Da,Hf as ka,HE as Aa,jY as xa,Ib as pe,mM as wa}from"./zeni-epic-state-D_HFZhXl.js";import{a as H,G as F,z as we,aN as Fe,m as Fa,J as Ua,aO as Pa,E as _a,r as Z,k as La,aP as Va,s as ee,_ as Ba,aQ as Oa,e as Ue,aR as Ra,at as za,a2 as K}from"./index-ChP5wU0r.js";import{n as Ma,S as Na,D as ja}from"./mui-D2FQmczV.js";import{u as Ga}from"./useAskAiCfoHostNavButtonProps-RTOhQENK.js";import{d as Pe}from"./decodeURIComponentSafe-D3G61A3x.js";import{h as _e,c as Le,g as $a,e as Ha}from"./routePaths-CL9hJjr9.js";import{t as qa}from"./utils-DF5mLbko.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]="7bc5d0f3-7017-4c55-910c-362657a0df5b",a._sentryDebugIdIdentifier="sentry-dbid-7bc5d0f3-7017-4c55-910c-362657a0df5b")}catch{}})();function Wa(a=!0){const e=N(),s=Je(),{useFeatureGate:t}=H(),{isFeatureEnabled:n}=t(F.isCreateTransferEntryFromExpenseEnabled);r.useEffect(()=>{if(!a||n!==!0)return;const o=i=>{const l=s.getState().createTransferEntryState.transferAccountsByType[i].fetchState;return l!=="In-Progress"&&l!=="Completed"};o("transferEntryEligible")&&e(me({kind:"transferEntryEligible"})),o("creditCardOnlyEligible")&&e(me({kind:"creditCardOnlyEligible"}))},[a,n,e,s])}function Ya(a,e){const s=function(){const l=N(),[m,f]=r.useState(!1),[E,p]=r.useState(null),{useDynamicConfig:g}=H(),{configValue:U,isDynamicConfigLoading:T}=g("transaction_categorization_config"),u=!T&&U?.capitalization_enabled===!0,D=h(v=>J(v)),I=D.companyId,A=h(v=>Ze(v.companyState,D.companyId)?.company.companyLocaleInfo?.currencySymbol??"$"),{capitalizableAccounts:b,globalThreshold:k,maxCeiling:P,onboardingShownForPrepaid:_,onboardingShownForFixedAsset:B}=h(v=>{const S=v.tenantState.currentTenantId,c=S!=null?v.tenantState.tenantsById[S]:void 0;return{capitalizableAccounts:c?.capitalizableAccounts??null,globalThreshold:c?.capitalizationThreshold??null,maxCeiling:c?.capitalizationThresholdMaxCeiling??null,onboardingShownForPrepaid:c?.capitalizationOnboardingShownForPrepaid===!0,onboardingShownForFixedAsset:c?.capitalizationOnboardingShownForFixedAsset===!0}},Qe),j=r.useCallback(v=>{if(!u||b==null||k!=null&&k>0)return;const S=b.accounts??[],c=new Set(v);let V=!1,C=!1;for(const x of S)c.has(x.accountId)&&(x.classificationType==="prepaid"?V=!0:x.classificationType==="fixed_asset"&&(C=!0));V&&!_?(p("prepaid"),f(!0)):C&&!B&&(p("fixed_asset"),f(!0))},[u,b,k,_,B]),O=r.useCallback(v=>{E!=null&&(l(ea(I,v,P,E)),f(!1),p(null))},[l,I,E,P]),L=r.useCallback(()=>{E!=null&&(l(aa(I,E)),f(!1),p(null))},[l,I,E]);return{showPopup:m&&u,popupType:E,currencySymbol:A,checkAndShowPopup:j,handleSubmit:O,handleDismiss:L}}(),t=r.useRef(void 0),n=r.useRef([]),o=r.useRef(s.checkAndShowPopup);o.current=s.checkAndShowPopup;const i=r.useRef(e);return i.current=e,r.useEffect(()=>{a==="In-Progress"&&(n.current=i.current()),a==="Completed"&&t.current==="In-Progress"&&n.current.length>0&&(o.current(n.current),n.current=[]),t.current=a},[a]),s}const se=()=>{const a=we.getSignedInUser(),{useFeatureGate:e}=H(),{isFeatureEnabled:s}=e(F.isChainOfThoughtEnabled);return r.useMemo(()=>ta(a)&&s,[a,s])};function Ve(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 ft(a,e){const s=N(),{useFeatureGate:t,useDynamicConfig:n}=H(),o=h(y=>J(y)),i=o.userRole.includes("charge_card_user")||o.userRole.includes("charge_card_admin"),l=o.userRole!=null&&ye(o.userRole),m=o.userRole!=null&&Te(o.userRole),{isFeatureEnabled:f}=t(F.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:E}=t(F.isExpenseAutomationEnabled),{configValue:p}=n(Fe.enableUncategorizedExpenseCategory),g=p?.uncategorized_expense_category_enabled===!0,U=se(),T=r.useMemo(()=>({id:a,type:G(e)}),[a,e]),u=h(y=>$(y,T)),D=u?.transactionDetailUpdateStatus?.fetchState,I=u?.transactionDetailLocalData?.lineItemById,A=h(y=>{const W=$(y,T)?.transactionDetailLocalData.vendorUpdates?.id;return W==null?"Not-Started":y.transactionVendorViewState.editVendorStateById[W]?.saveStatus.fetchState??"Not-Started"}),b=r.useMemo(()=>u?.fetchState==="Completed"?Ve(u?.transaction):void 0,[u?.fetchState,u?.transaction]),k=h(y=>{if(b!=null)return be(y.customerIncomeState,y.vendorExpenseState,y.trendState,b,"month")}),P=h(y=>ae(y)),_=h(y=>{if(b!=null)return Ee(y.trendWithTransactionsState,b,"TransactionDetail")}),B=o.company?.companyInfo.firstMonthOfFY??1,j=h(y=>Ie(y.accountState,y.accountListState,"accountList")),[O,L]=r.useState(!1),[v,S]=r.useState(!1),[c,V]=r.useState(!1);r.useEffect(()=>{L(!1),S(!1),V(!1)},[a,e]);const C=r.useCallback(()=>{L(!1),S(!1)},[]),[x,R]=r.useState(!1),q=_?.selectedPeriod?.timePeriod;return r.useEffect(()=>{c||u==null||u.transaction==null||(s(ve({id:u.transaction.id,type:u.transaction.type})),V(!0)),b!=null&&(!i||l&&m===!1)&&(O?v||k==null||(S(!0),s(oe(b,"TransactionDetail",{timeframe:"month",timePeriod:q??k}))):(s(te()),s(ne()),L(!0),s(Ce(b))))},[s,c,u?.fetchState,u?.transaction,b,i,l,m,O,v,k,q]),r.useEffect(()=>{P.newVendorState?.vendorDetailLocalData?.vendorName!=null?R(!0):R(!1)},[P.newVendorState?.vendorDetailLocalData?.vendorName]),r.useEffect(()=>()=>{s(M("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:i,isUserHasDashboardAccess:l,isUserHasInvestorOrBankerAccess:m,isVendorBulkUpdateOnTransactionEnabled:f,isExpenseAutomationEnabled:E,isUncategorizedExpenseCategoryEnabled:g,isChainOfThoughtEnabled:U,selectedTransaction:T,transactionDetail:u,rawDetailSaveStatus:D,rawDetailLineItemById:I,vendorSaveStatus:A,tranEntity:b,defaultTrendTransactionTimePeriod:k,vendorViewDetails:P,uiState:_,firstMonthOfFY:B,uncategorizedAccounts:j,resetTrendIsFetchedStates:C,isCreateVendorDrawerOpen:x,setIsCreateVendorDrawerOpen:R}}const Ja={overlayWidth:new _a(100,100,58)},Qa=({isOpen:a,onSaveVendor:e,onSaveSuccess:s,onCancel:t,vendorViewDetails:n})=>{const o=Fa(),i=Ua(),l=N(),m=h(p=>ae(p)),f=()=>{t()},E={vendorDetailView:n??m,onSaveSuccess:()=>{l(ke()),l(na("Not-Started")),s()},onSaveVendor:e,onCancelClick:f,saveVendorDetailLocalData:p=>{l(De({vendorId:void 0,localData:p}))}};return w.jsx(ja,{anchor:"right",open:a,PaperProps:{style:{width:Ja.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:f,children:w.jsx(Xa,{onClick:p=>p.stopPropagation(),children:w.jsx(Pa,{...E})})})},Xa=Ma(Na)`
1
+ import{j as w}from"./liveblocks-B5BvoK0c.js";import{a as r}from"./sentry-BfAQgAk9.js";import{u as N,k as Je,j as h,t as Qe,g as he,h as ge,i as Se,N as Xe,n as Ke}from"./core-BlIgFgLa.js";import{mU as me,eR as J,fO as Ze,m5 as ea,m3 as aa,bn as ta,cO as ye,bs as Te,qj as G,La as $,Mb as be,Mc as ae,LA as Ee,jT as Ie,Md as ve,LF as te,LG as ne,kI as Ce,Ia as oe,L4 as M,jN as De,jL as ke,jX as na,mH as oa,Me as sa,Mf as ia,up as Y,jS as Ae,Hv as xe,cT as ra,cU as ca,Mg as la,L3 as da,Mh as ua,ul as ma,Mi as pa,Mj as fa,Mk as ha,Ml as ga,Mm as Sa,jW as ya,Mn as Ta,Mo as ba,L5 as Ea,Mp as Ia,Mq as va,Mr as Ca,Hp as Da,Hf as ka,HE as Aa,jY as xa,Ib as pe,mM as wa}from"./zeni-epic-state-DuZnqF9c.js";import{a as H,G as F,z as we,aN as Fe,m as Fa,J as Ua,aO as Pa,E as _a,r as Z,k as La,aP as Va,s as ee,_ as Ba,aQ as Oa,e as Ue,aR as Ra,at as za,a2 as K}from"./index-DncvUSxy.js";import{n as Ma,S as Na,D as ja}from"./mui-CS8zbV3O.js";import{u as Ga}from"./useAskAiCfoHostNavButtonProps-D3AdUzbU.js";import{d as Pe}from"./decodeURIComponentSafe-BAori_t5.js";import{h as _e,c as Le,g as $a,e as Ha}from"./routePaths-Dmvu-NCC.js";import{t as qa}from"./utils-DVmhNkL_.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]="7bc5d0f3-7017-4c55-910c-362657a0df5b",a._sentryDebugIdIdentifier="sentry-dbid-7bc5d0f3-7017-4c55-910c-362657a0df5b")}catch{}})();function Wa(a=!0){const e=N(),s=Je(),{useFeatureGate:t}=H(),{isFeatureEnabled:n}=t(F.isCreateTransferEntryFromExpenseEnabled);r.useEffect(()=>{if(!a||n!==!0)return;const o=i=>{const l=s.getState().createTransferEntryState.transferAccountsByType[i].fetchState;return l!=="In-Progress"&&l!=="Completed"};o("transferEntryEligible")&&e(me({kind:"transferEntryEligible"})),o("creditCardOnlyEligible")&&e(me({kind:"creditCardOnlyEligible"}))},[a,n,e,s])}function Ya(a,e){const s=function(){const l=N(),[m,f]=r.useState(!1),[E,p]=r.useState(null),{useDynamicConfig:g}=H(),{configValue:U,isDynamicConfigLoading:T}=g("transaction_categorization_config"),u=!T&&U?.capitalization_enabled===!0,D=h(v=>J(v)),I=D.companyId,A=h(v=>Ze(v.companyState,D.companyId)?.company.companyLocaleInfo?.currencySymbol??"$"),{capitalizableAccounts:b,globalThreshold:k,maxCeiling:P,onboardingShownForPrepaid:_,onboardingShownForFixedAsset:B}=h(v=>{const S=v.tenantState.currentTenantId,c=S!=null?v.tenantState.tenantsById[S]:void 0;return{capitalizableAccounts:c?.capitalizableAccounts??null,globalThreshold:c?.capitalizationThreshold??null,maxCeiling:c?.capitalizationThresholdMaxCeiling??null,onboardingShownForPrepaid:c?.capitalizationOnboardingShownForPrepaid===!0,onboardingShownForFixedAsset:c?.capitalizationOnboardingShownForFixedAsset===!0}},Qe),j=r.useCallback(v=>{if(!u||b==null||k!=null&&k>0)return;const S=b.accounts??[],c=new Set(v);let V=!1,C=!1;for(const x of S)c.has(x.accountId)&&(x.classificationType==="prepaid"?V=!0:x.classificationType==="fixed_asset"&&(C=!0));V&&!_?(p("prepaid"),f(!0)):C&&!B&&(p("fixed_asset"),f(!0))},[u,b,k,_,B]),O=r.useCallback(v=>{E!=null&&(l(ea(I,v,P,E)),f(!1),p(null))},[l,I,E,P]),L=r.useCallback(()=>{E!=null&&(l(aa(I,E)),f(!1),p(null))},[l,I,E]);return{showPopup:m&&u,popupType:E,currencySymbol:A,checkAndShowPopup:j,handleSubmit:O,handleDismiss:L}}(),t=r.useRef(void 0),n=r.useRef([]),o=r.useRef(s.checkAndShowPopup);o.current=s.checkAndShowPopup;const i=r.useRef(e);return i.current=e,r.useEffect(()=>{a==="In-Progress"&&(n.current=i.current()),a==="Completed"&&t.current==="In-Progress"&&n.current.length>0&&(o.current(n.current),n.current=[]),t.current=a},[a]),s}const se=()=>{const a=we.getSignedInUser(),{useFeatureGate:e}=H(),{isFeatureEnabled:s}=e(F.isChainOfThoughtEnabled);return r.useMemo(()=>ta(a)&&s,[a,s])};function Ve(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 ft(a,e){const s=N(),{useFeatureGate:t,useDynamicConfig:n}=H(),o=h(y=>J(y)),i=o.userRole.includes("charge_card_user")||o.userRole.includes("charge_card_admin"),l=o.userRole!=null&&ye(o.userRole),m=o.userRole!=null&&Te(o.userRole),{isFeatureEnabled:f}=t(F.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:E}=t(F.isExpenseAutomationEnabled),{configValue:p}=n(Fe.enableUncategorizedExpenseCategory),g=p?.uncategorized_expense_category_enabled===!0,U=se(),T=r.useMemo(()=>({id:a,type:G(e)}),[a,e]),u=h(y=>$(y,T)),D=u?.transactionDetailUpdateStatus?.fetchState,I=u?.transactionDetailLocalData?.lineItemById,A=h(y=>{const W=$(y,T)?.transactionDetailLocalData.vendorUpdates?.id;return W==null?"Not-Started":y.transactionVendorViewState.editVendorStateById[W]?.saveStatus.fetchState??"Not-Started"}),b=r.useMemo(()=>u?.fetchState==="Completed"?Ve(u?.transaction):void 0,[u?.fetchState,u?.transaction]),k=h(y=>{if(b!=null)return be(y.customerIncomeState,y.vendorExpenseState,y.trendState,b,"month")}),P=h(y=>ae(y)),_=h(y=>{if(b!=null)return Ee(y.trendWithTransactionsState,b,"TransactionDetail")}),B=o.company?.companyInfo.firstMonthOfFY??1,j=h(y=>Ie(y.accountState,y.accountListState,"accountList")),[O,L]=r.useState(!1),[v,S]=r.useState(!1),[c,V]=r.useState(!1);r.useEffect(()=>{L(!1),S(!1),V(!1)},[a,e]);const C=r.useCallback(()=>{L(!1),S(!1)},[]),[x,R]=r.useState(!1),q=_?.selectedPeriod?.timePeriod;return r.useEffect(()=>{c||u==null||u.transaction==null||(s(ve({id:u.transaction.id,type:u.transaction.type})),V(!0)),b!=null&&(!i||l&&m===!1)&&(O?v||k==null||(S(!0),s(oe(b,"TransactionDetail",{timeframe:"month",timePeriod:q??k}))):(s(te()),s(ne()),L(!0),s(Ce(b))))},[s,c,u?.fetchState,u?.transaction,b,i,l,m,O,v,k,q]),r.useEffect(()=>{P.newVendorState?.vendorDetailLocalData?.vendorName!=null?R(!0):R(!1)},[P.newVendorState?.vendorDetailLocalData?.vendorName]),r.useEffect(()=>()=>{s(M("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:i,isUserHasDashboardAccess:l,isUserHasInvestorOrBankerAccess:m,isVendorBulkUpdateOnTransactionEnabled:f,isExpenseAutomationEnabled:E,isUncategorizedExpenseCategoryEnabled:g,isChainOfThoughtEnabled:U,selectedTransaction:T,transactionDetail:u,rawDetailSaveStatus:D,rawDetailLineItemById:I,vendorSaveStatus:A,tranEntity:b,defaultTrendTransactionTimePeriod:k,vendorViewDetails:P,uiState:_,firstMonthOfFY:B,uncategorizedAccounts:j,resetTrendIsFetchedStates:C,isCreateVendorDrawerOpen:x,setIsCreateVendorDrawerOpen:R}}const Ja={overlayWidth:new _a(100,100,58)},Qa=({isOpen:a,onSaveVendor:e,onSaveSuccess:s,onCancel:t,vendorViewDetails:n})=>{const o=Fa(),i=Ua(),l=N(),m=h(p=>ae(p)),f=()=>{t()},E={vendorDetailView:n??m,onSaveSuccess:()=>{l(ke()),l(na("Not-Started")),s()},onSaveVendor:e,onCancelClick:f,saveVendorDetailLocalData:p=>{l(De({vendorId:void 0,localData:p}))}};return w.jsx(ja,{anchor:"right",open:a,PaperProps:{style:{width:Ja.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:f,children:w.jsx(Xa,{onClick:p=>p.stopPropagation(),children:w.jsx(Pa,{...E})})})},Xa=Ma(Na)`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  flex-direction: column;
@@ -1 +1 @@
1
- import{j as s}from"./liveblocks-CfHMBm08.js";import{h as K,g as H,u as W,i as Z,j as h,N as G,n as Q,o as Ye,p as j}from"./core-DvGkVhX0.js";import{eR as U,p_ as X,j5 as u,Py as ee,I1 as De,bo as le,Pz as ve,jI as te,LC as ae,PA as ue,PB as be,bE as P,HZ as ye,PC as Ee,PD as me,PE as je,I0 as Ae,PF as xe,PG as pe,PH as Me,PI as ge,PJ as Le,PK as Ce,PL as fe,Je as Be}from"./zeni-epic-state-D_HFZhXl.js";import{D as de,a as ne,G as q,e as w,ce,s as J,r as oe,W as Fe,d as Oe}from"./index-ChP5wU0r.js";import"./mui-D2FQmczV.js";import{a as g}from"./sentry-0vIaNqsr.js";import{w as se}from"./withTransactionSidePanel-rHr5DjOB.js";import{p as ie,c as re}from"./routePaths-CL9hJjr9.js";import{u as ze}from"./utils-DF5mLbko.js";import{d as v}from"./decodeURIComponentSafe-D3G61A3x.js";import{Z as we}from"./ZeniAccountStatementScreen-CO_1LwB4.js";import"./recharts-CnIvro2v.js";import"./analytics-CStLmwuB.js";import"./plaid-DzUK2ot_.js";import"./dnd-DVf98RdY.js";import"./stripe-DMRn4zHo.js";import"./lottie-Byecfo2L.js";import"./lexical-BStGoUxq.js";import"./pdf-CojJ326Z.js";import"./useAskAiCfoHostNavButtonProps-RTOhQENK.js";import"./TransactionDetailScreen-Nhb9Cdoj.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]="cb8d9a0f-d706-4eef-a8df-d5566befc699",a._sentryDebugIdIdentifier="sentry-dbid-cb8d9a0f-d706-4eef-a8df-d5566befc699")}catch{}})();const Ge=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],N=a=>ze(a),Re=Q(function(a,e){const t=ve(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,N(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=de.getLocalizedStrings(),l=N(e.selectedAccount.tranListType),m=Ve(t,n,c,l,e.bookCloseDate);w.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(ue({uiState:{dateRange:m},type:N(e.selectedAccount.tranListType)})),a(De(l,u(m),!1,l==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(u(m))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=J(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ue({uiState:{scrollYOffset:t},type:N(e.selectedAccount.tranListType)}))}}})(ce),V=se(function({...a}){const e=K(),t=H(),n=W(),c=t.pathname.split("/").find(r=>Ge.includes(r)),o=c??"uncategorized-expense",{tenantEmailDomain:l}=Z(),m=de.getLocalizedStrings(),{accountType:I,title:T,subTitle:D}=_e(o),y="month",S=h(r=>U(r)),p=S.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:A}=ne(),{isFeatureEnabled:k}=A(q.isProjectsTransactionsEnabled),x=h(r=>X(r))&&k,{dataAvailable:C,initialTimeframeTick:b}=$e(o,p,S.bookCloseDate),[B,E]=g.useState(!1),[F,O]=g.useState(void 0),f=g.useMemo(()=>{const r=u(b);return{tranListType:o,accountType:ee(I),title:T,subTitle:D,timeframe:y,period:r}},[o,y,I,C]);g.useEffect(()=>{if(!B&&f!=null){E(!0),w.trackTransactionList(void 0,void 0,void 0,f.title);const r=N(f.tranListType);n(De(r,f.period,!0,r==="missingReceipts"?m.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[B,f,n]);let M=f;return f!=null&&F!=null&&(M={...f,period:F}),c==null||M==null?s.jsx(G,{to:"../"}):s.jsx(Re,{firstMonthOfFY:p,tenantEmailDomain:l,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:C,navigate:e,showProjectField:x,selectedAccount:M,referrerType:o,bookCloseDate:S.bookCloseDate,onSelectedTimePeriodChange:r=>O(r),...a})}),_e=a=>{let e="",t="";const n=de.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.uncategorizedTransactionList.expense.title;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.uncategorizedTransactionList.missingReceipt.title}return{accountType:e,title:t,subTitle:""}},$e=(a,e,t)=>{const n=le();let c=le().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:ie(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Ve=(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},Ne=Q(function(a,e){const t=Ee(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??he();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),w.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(ye(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=J(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(ce),qe=se(function({referrerType:a,...e}){const t=K(),n=H(),c=W(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,classIdEncoded:I,timeframe:T,startDate:D,endDate:y,titleEncoded:S}=Z(),p=v(l??""),A=v(m??""),k=v(I??""),x=v(S??""),C=h(d=>be(d.transactionListState,A,p,k)),[b,B]=g.useState(!1),[E,F]=g.useState(void 0),O=h(d=>U(d)),f=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=ne(),{isFeatureEnabled:r}=M(q.isProjectsTransactionsEnabled),R=h(d=>X(d))&&r;let i;const z=Je(p,A,k,T,D,y,x);if(z){const d={startDate:P(D,"YYYY-MM-DD"),endDate:P(y,"YYYY-MM-DD")},_=He(C?.dateRange,d);i={accountId:A,accountType:ee(p),classId:k,title:x,timeframe:T,period:_}}g.useEffect(()=>{b||i==null||(B(!0),w.trackTransactionList(i.accountId,void 0,a,i.title),c(ye(i.accountId,i.accountType,i.classId,i.period)))},[b,i,c]);let L=i;i!=null&&E!=null&&(L={...i,period:E});const $=[l,m,I,T,D,y,S].filter(d=>d!=null);return z&&L!=null?s.jsx(Ne,{firstMonthOfFY:f,tenantEmailDomain:o,location:n,navigate:t,showProjectField:R,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>F(d),...e}):s.jsx(G,{to:he($.length)})}),he=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Je=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&P(c,"YYYY-MM-DD").isValid()&&P(o,"YYYY-MM-DD").isValid()&&l!=null,He=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),Ue=Q(function(a,e){const t=xe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ie();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),w.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(Ae(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=J(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}})(ce),Ke=se(function({referrerType:a,...e}){const t=K(),n=H(),c=W(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,projectIdEncoded:I,timeframe:T,startDate:D,endDate:y,titleEncoded:S}=Z(),p=v(l??""),A=v(m??""),k=v(I??""),x=v(S??""),C=h(d=>je(d.transactionListState,A,p,k)),[b,B]=g.useState(!1),[E,F]=g.useState(void 0),O=h(d=>U(d)),f=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=ne(),{isFeatureEnabled:r}=M(q.isProjectsTransactionsEnabled),R=h(d=>X(d))&&r;let i;const z=We(p,A,k,T,D,y,x);if(z){const d={startDate:P(D,"YYYY-MM-DD"),endDate:P(y,"YYYY-MM-DD")},_=Ze(C?.dateRange,d);i={accountId:A,accountType:ee(p),projectId:k,title:x,timeframe:T,period:_}}g.useEffect(()=>{b||i==null||(B(!0),w.trackTransactionList(i.accountId,void 0,a,i.title),c(Ae(i.accountId,i.accountType,i.projectId,i.period)))},[b,i,c]);let L=i;i!=null&&E!=null&&(L={...i,period:E});const $=[l,m,I,T,D,y,S].filter(d=>d!=null);return z&&L!=null?s.jsx(Ue,{firstMonthOfFY:f,tenantEmailDomain:o,location:n,navigate:t,showProjectField:R,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>F(d),...e}):s.jsx(G,{to:Ie($.length)})}),Ie=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},We=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&P(c,"YYYY-MM-DD").isValid()&&P(o,"YYYY-MM-DD").isValid()&&l!=null,Ze=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),Qe=Q(function(a,e){const t=Le(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&Ce(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:te(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Se();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),w.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=J(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=tt(e.tenantEmailDomain),n=J(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ce),Te=se(function({referrerType:a,...e}){const t=K(),n=H(),c=W(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,timeframe:I,startDate:T,endDate:D,titleEncoded:y,excludeSubAccounts:S}=Z(),p=v(l??""),A=v(m??""),k=v(y??""),x=!(S!=null&&S==="exclude_subaccounts"),C=h(Y=>Me(Y.transactionListState,A,p)),[b,B]=g.useState(!1),[E,F]=g.useState(void 0),O=h(Y=>U(Y)),f=O.company?.featuresActivationInfo.connectedAccountProvider==="unit",M=O.company?.companyInfo.firstMonthOfFY??1;let r;const R=Xe(p,A,I,T,D,k);if(R){const Y={startDate:P(T,"YYYY-MM-DD"),endDate:P(D,"YYYY-MM-DD")},Pe=et(C?.dateRange,Y);r={accountId:A,accountType:ee(p),title:k,timeframe:I,period:Pe}}let i=r;r!=null&&E!=null&&(i={...r,period:E});const{useFeatureGate:z}=ne(),{isFeatureEnabled:L}=z(q.isTransactionCommentingEnabled),{isFeatureEnabled:$}=z(q.isProjectsTransactionsEnabled),d=h(Y=>X(Y))&&$,{areTenantIdsInSync:_}=Fe();g.useEffect(()=>{!b&&r!=null&&_&&(B(!0),w.trackTransactionList(r.accountId,void 0,a,r.title),c(ge(r.accountId,r.accountType,r.period,void 0,!1,x)))},[b,r,c,_]);const ke=[l,m,I,T,D,y].filter(Y=>Y!=null);return R&&i!=null?s.jsx(Qe,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:f,isTransactionCommentingEnabled:L,showProjectField:d,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:Y=>F(Y),...e}):s.jsx(G,{to:Se(ke.length)})}),Se=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Xe=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&P(n,"YYYY-MM-DD").isValid()&&P(c,"YYYY-MM-DD").isValid()&&o!=null,et=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),tt=a=>`/${a}/transactions/${Be}/statements`;function kt(){const a=H().state?.referrer,e=h(n=>n.expenseAutomationViewState.selectedPeriodByTenantId)[h(n=>U(n)).tenantId],t=Oe();return s.jsxs(Ye,{children:[s.jsx(j,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/zeni-clearing-account/statements",element:s.jsx(we,{})}),s.jsx(j,{path:"/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/uncategorized-income/*",element:s.jsx(V,{})}),s.jsx(j,{path:"/uncategorized-expense/*",element:t?s.jsx(G,{to:`../../month_end_close_checks/review/transaction_categorization/${e.month}-${e.year}`}):s.jsx(V,{})}),s.jsx(j,{path:"/miscategorized-income/*",element:s.jsx(V,{})}),s.jsx(j,{path:"/miscategorized-expense/*",element:t?s.jsx(G,{to:`../../month_end_close_checks/review/transaction_categorization/${e.month}-${e.year}`}):s.jsx(V,{})}),s.jsx(j,{path:"/missing-receipts/*",element:t?s.jsx(G,{to:`../../month_end_close_checks/review/missing_receipts/${e.month}-${e.year}`}):s.jsx(V,{})}),s.jsx(j,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(qe,{referrerType:a})}),s.jsx(j,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Ke,{referrerType:a})})]})}export{kt as default};
1
+ import{j as s}from"./liveblocks-B5BvoK0c.js";import{h as K,g as H,u as W,i as Z,j as h,N as G,n as Q,o as Ye,p as j}from"./core-BlIgFgLa.js";import{eR as U,p_ as X,j5 as u,Py as ee,I1 as De,bo as le,Pz as ve,jI as te,LC as ae,PA as ue,PB as be,bE as P,HZ as ye,PC as Ee,PD as me,PE as je,I0 as Ae,PF as xe,PG as pe,PH as Me,PI as ge,PJ as Le,PK as Ce,PL as fe,Je as Be}from"./zeni-epic-state-DuZnqF9c.js";import{D as de,a as ne,G as q,e as w,ce,s as J,r as oe,W as Fe,d as Oe}from"./index-DncvUSxy.js";import"./mui-CS8zbV3O.js";import{a as g}from"./sentry-BfAQgAk9.js";import{w as se}from"./withTransactionSidePanel-BIvBB9re.js";import{p as ie,c as re}from"./routePaths-Dmvu-NCC.js";import{u as ze}from"./utils-DVmhNkL_.js";import{d as v}from"./decodeURIComponentSafe-BAori_t5.js";import{Z as we}from"./ZeniAccountStatementScreen-msNMuYwl.js";import"./recharts-DYM_S90p.js";import"./analytics-DioYovd8.js";import"./plaid-C04vDugB.js";import"./dnd-Cx0n399a.js";import"./stripe-DMRn4zHo.js";import"./lottie-s3ChESX6.js";import"./lexical-DUO8UoPe.js";import"./pdf-C5qZkmhF.js";import"./useAskAiCfoHostNavButtonProps-D3AdUzbU.js";import"./TransactionDetailScreen-THar40Gx.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]="cb8d9a0f-d706-4eef-a8df-d5566befc699",a._sentryDebugIdIdentifier="sentry-dbid-cb8d9a0f-d706-4eef-a8df-d5566befc699")}catch{}})();const Ge=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],N=a=>ze(a),Re=Q(function(a,e){const t=ve(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,N(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=de.getLocalizedStrings(),l=N(e.selectedAccount.tranListType),m=Ve(t,n,c,l,e.bookCloseDate);w.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(ue({uiState:{dateRange:m},type:N(e.selectedAccount.tranListType)})),a(De(l,u(m),!1,l==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(u(m))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=J(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ue({uiState:{scrollYOffset:t},type:N(e.selectedAccount.tranListType)}))}}})(ce),V=se(function({...a}){const e=K(),t=H(),n=W(),c=t.pathname.split("/").find(r=>Ge.includes(r)),o=c??"uncategorized-expense",{tenantEmailDomain:l}=Z(),m=de.getLocalizedStrings(),{accountType:I,title:T,subTitle:D}=_e(o),y="month",S=h(r=>U(r)),p=S.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:A}=ne(),{isFeatureEnabled:k}=A(q.isProjectsTransactionsEnabled),x=h(r=>X(r))&&k,{dataAvailable:C,initialTimeframeTick:b}=$e(o,p,S.bookCloseDate),[B,E]=g.useState(!1),[F,O]=g.useState(void 0),f=g.useMemo(()=>{const r=u(b);return{tranListType:o,accountType:ee(I),title:T,subTitle:D,timeframe:y,period:r}},[o,y,I,C]);g.useEffect(()=>{if(!B&&f!=null){E(!0),w.trackTransactionList(void 0,void 0,void 0,f.title);const r=N(f.tranListType);n(De(r,f.period,!0,r==="missingReceipts"?m.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[B,f,n]);let M=f;return f!=null&&F!=null&&(M={...f,period:F}),c==null||M==null?s.jsx(G,{to:"../"}):s.jsx(Re,{firstMonthOfFY:p,tenantEmailDomain:l,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:C,navigate:e,showProjectField:x,selectedAccount:M,referrerType:o,bookCloseDate:S.bookCloseDate,onSelectedTimePeriodChange:r=>O(r),...a})}),_e=a=>{let e="",t="";const n=de.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.uncategorizedTransactionList.expense.title;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.uncategorizedTransactionList.missingReceipt.title}return{accountType:e,title:t,subTitle:""}},$e=(a,e,t)=>{const n=le();let c=le().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:ie(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Ve=(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},Ne=Q(function(a,e){const t=Ee(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??he();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),w.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(ye(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=J(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(ce),qe=se(function({referrerType:a,...e}){const t=K(),n=H(),c=W(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,classIdEncoded:I,timeframe:T,startDate:D,endDate:y,titleEncoded:S}=Z(),p=v(l??""),A=v(m??""),k=v(I??""),x=v(S??""),C=h(d=>be(d.transactionListState,A,p,k)),[b,B]=g.useState(!1),[E,F]=g.useState(void 0),O=h(d=>U(d)),f=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=ne(),{isFeatureEnabled:r}=M(q.isProjectsTransactionsEnabled),R=h(d=>X(d))&&r;let i;const z=Je(p,A,k,T,D,y,x);if(z){const d={startDate:P(D,"YYYY-MM-DD"),endDate:P(y,"YYYY-MM-DD")},_=He(C?.dateRange,d);i={accountId:A,accountType:ee(p),classId:k,title:x,timeframe:T,period:_}}g.useEffect(()=>{b||i==null||(B(!0),w.trackTransactionList(i.accountId,void 0,a,i.title),c(ye(i.accountId,i.accountType,i.classId,i.period)))},[b,i,c]);let L=i;i!=null&&E!=null&&(L={...i,period:E});const $=[l,m,I,T,D,y,S].filter(d=>d!=null);return z&&L!=null?s.jsx(Ne,{firstMonthOfFY:f,tenantEmailDomain:o,location:n,navigate:t,showProjectField:R,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>F(d),...e}):s.jsx(G,{to:he($.length)})}),he=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Je=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&P(c,"YYYY-MM-DD").isValid()&&P(o,"YYYY-MM-DD").isValid()&&l!=null,He=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),Ue=Q(function(a,e){const t=xe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ie();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),w.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(Ae(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=J(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}})(ce),Ke=se(function({referrerType:a,...e}){const t=K(),n=H(),c=W(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,projectIdEncoded:I,timeframe:T,startDate:D,endDate:y,titleEncoded:S}=Z(),p=v(l??""),A=v(m??""),k=v(I??""),x=v(S??""),C=h(d=>je(d.transactionListState,A,p,k)),[b,B]=g.useState(!1),[E,F]=g.useState(void 0),O=h(d=>U(d)),f=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=ne(),{isFeatureEnabled:r}=M(q.isProjectsTransactionsEnabled),R=h(d=>X(d))&&r;let i;const z=We(p,A,k,T,D,y,x);if(z){const d={startDate:P(D,"YYYY-MM-DD"),endDate:P(y,"YYYY-MM-DD")},_=Ze(C?.dateRange,d);i={accountId:A,accountType:ee(p),projectId:k,title:x,timeframe:T,period:_}}g.useEffect(()=>{b||i==null||(B(!0),w.trackTransactionList(i.accountId,void 0,a,i.title),c(Ae(i.accountId,i.accountType,i.projectId,i.period)))},[b,i,c]);let L=i;i!=null&&E!=null&&(L={...i,period:E});const $=[l,m,I,T,D,y,S].filter(d=>d!=null);return z&&L!=null?s.jsx(Ue,{firstMonthOfFY:f,tenantEmailDomain:o,location:n,navigate:t,showProjectField:R,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>F(d),...e}):s.jsx(G,{to:Ie($.length)})}),Ie=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},We=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&P(c,"YYYY-MM-DD").isValid()&&P(o,"YYYY-MM-DD").isValid()&&l!=null,Ze=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),Qe=Q(function(a,e){const t=Le(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&Ce(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:te(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Se();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),w.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=J(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=tt(e.tenantEmailDomain),n=J(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ce),Te=se(function({referrerType:a,...e}){const t=K(),n=H(),c=W(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,timeframe:I,startDate:T,endDate:D,titleEncoded:y,excludeSubAccounts:S}=Z(),p=v(l??""),A=v(m??""),k=v(y??""),x=!(S!=null&&S==="exclude_subaccounts"),C=h(Y=>Me(Y.transactionListState,A,p)),[b,B]=g.useState(!1),[E,F]=g.useState(void 0),O=h(Y=>U(Y)),f=O.company?.featuresActivationInfo.connectedAccountProvider==="unit",M=O.company?.companyInfo.firstMonthOfFY??1;let r;const R=Xe(p,A,I,T,D,k);if(R){const Y={startDate:P(T,"YYYY-MM-DD"),endDate:P(D,"YYYY-MM-DD")},Pe=et(C?.dateRange,Y);r={accountId:A,accountType:ee(p),title:k,timeframe:I,period:Pe}}let i=r;r!=null&&E!=null&&(i={...r,period:E});const{useFeatureGate:z}=ne(),{isFeatureEnabled:L}=z(q.isTransactionCommentingEnabled),{isFeatureEnabled:$}=z(q.isProjectsTransactionsEnabled),d=h(Y=>X(Y))&&$,{areTenantIdsInSync:_}=Fe();g.useEffect(()=>{!b&&r!=null&&_&&(B(!0),w.trackTransactionList(r.accountId,void 0,a,r.title),c(ge(r.accountId,r.accountType,r.period,void 0,!1,x)))},[b,r,c,_]);const ke=[l,m,I,T,D,y].filter(Y=>Y!=null);return R&&i!=null?s.jsx(Qe,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:f,isTransactionCommentingEnabled:L,showProjectField:d,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:Y=>F(Y),...e}):s.jsx(G,{to:Se(ke.length)})}),Se=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Xe=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&P(n,"YYYY-MM-DD").isValid()&&P(c,"YYYY-MM-DD").isValid()&&o!=null,et=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),tt=a=>`/${a}/transactions/${Be}/statements`;function kt(){const a=H().state?.referrer,e=h(n=>n.expenseAutomationViewState.selectedPeriodByTenantId)[h(n=>U(n)).tenantId],t=Oe();return s.jsxs(Ye,{children:[s.jsx(j,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/zeni-clearing-account/statements",element:s.jsx(we,{})}),s.jsx(j,{path:"/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/uncategorized-income/*",element:s.jsx(V,{})}),s.jsx(j,{path:"/uncategorized-expense/*",element:t?s.jsx(G,{to:`../../month_end_close_checks/review/transaction_categorization/${e.month}-${e.year}`}):s.jsx(V,{})}),s.jsx(j,{path:"/miscategorized-income/*",element:s.jsx(V,{})}),s.jsx(j,{path:"/miscategorized-expense/*",element:t?s.jsx(G,{to:`../../month_end_close_checks/review/transaction_categorization/${e.month}-${e.year}`}):s.jsx(V,{})}),s.jsx(j,{path:"/missing-receipts/*",element:t?s.jsx(G,{to:`../../month_end_close_checks/review/missing_receipts/${e.month}-${e.year}`}):s.jsx(V,{})}),s.jsx(j,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(qe,{referrerType:a})}),s.jsx(j,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Ke,{referrerType:a})})]})}export{kt as default};
@@ -1,4 +1,4 @@
1
- import{j as e}from"./liveblocks-CfHMBm08.js";import{h as B,g as P,u as U,i as M,j as f,N as L,n as V,o as we,p as k}from"./core-DvGkVhX0.js";import{cl as N,eR as D,Oj as O,En as ae,fj as H,E5 as ne,Ol as Te,Eq as Ie,Oh as Ce,Oi as se,OB as ke,Cx as je,tc as Ee,On as be,EJ as Ae,Ok as re,cN as W,xs as oe,e_ as ve,f0 as De,Pv as Fe,Pw as Le,E6 as Be,Px as Pe,E7 as Ue,Eg as Oe,bs as Re,bF as Me,cw as Ve,bG as Ne,ck as _e,fi as ze,bt as Ge,J_ as $e,cj as qe}from"./zeni-epic-state-D_HFZhXl.js";import{k as _,aq as He,z as b,y as z,e as j,c7 as We,c8 as Je,c9 as q,J,m as Ze,W as Ke,_ as Qe,a as ie,G as v,E as Xe,B as Ye,ca as et,at as Z,s as tt,cb as at,r as K,cc as nt,n as X,cd as st,a9 as rt}from"./index-ChP5wU0r.js";import{D as ot,n as R,S as it}from"./mui-D2FQmczV.js";import ct from"./NotFoundScreen-BNcKpH4N.js";import{S as Y}from"./SetupPagesScreen-DVYIUml2.js";import{a as d}from"./sentry-0vIaNqsr.js";import{u as lt}from"./useAskAiCfoHostNavButtonProps-RTOhQENK.js";import{u as ut}from"./useInitialThreadRequest-CLh-E-cE.js";import{M as ce}from"./MobileAppDrawer-w7Ih7RbS.js";import{F as dt}from"./FeaturePreviewScreen-wzurtqwt.js";import{a as ee}from"./analyticsHelper-DLbyZBKc.js";import"./recharts-CnIvro2v.js";import"./analytics-CStLmwuB.js";import"./plaid-DzUK2ot_.js";import"./dnd-DVf98RdY.js";import"./stripe-DMRn4zHo.js";import"./lottie-Byecfo2L.js";import"./lexical-BStGoUxq.js";import"./pdf-CojJ326Z.js";import"./utils-DF5mLbko.js";import"./routePaths-CL9hJjr9.js";import"./BusinessVerificationPageScreen-CpGRtjnS.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]="30108cda-34a7-4b36-b6ea-050de8f689ea",t._sentryDebugIdIdentifier="sentry-dbid-30108cda-34a7-4b36-b6ea-050de8f689ea")}catch{}})();const pt=V(function(t,a){const{companyId:n}=a;return{treasurySetupView:O(t,n),analytics:j}},function(t,a){const{navigate:n,analytics:o,treasurySetupView:p}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=p.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(Ie(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(Te(r))}}})(We);function mt(){const t=B(),a=P(),n=U(),{tenantEmailDomain:o}=M(),p=_(),r=f(C=>C.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=He(r),s=N(p?.loggedInUserRoleMap),[l,i]=d.useState(!1),[g,I]=d.useState(!1),[u,c]=d.useState(!1),h=f(C=>D(C)),y=b.getSignedInUserTenant(o)?.companyId??h.companyId,w=b.getSignedInUser(),S=f(C=>O(C,y)),T=f(C=>C.treasurySetupViewState.fetchState),x=f(C=>C.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=f(C=>C.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(w==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{l||T!=="Not-Started"||y==null||(i(!0),n(ae(y,!0,!1)))},[l,T,y,n]),d.useEffect(()=>{u||F!=="Not-Started"||y==null||(c(!0),n(H()))},[u,F,y,n]),d.useEffect(()=>{g||x!=="Not-Started"||y==null||(I(!0),n(ne()))},[g,x,y,n]),d.useEffect(()=>{m==="In-Progress"&&r==="Completed"&&t("../")},[m,r,t]),h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(L,{to:"../promo"});const A=h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||T!=="Completed";return e.jsxs(e.Fragment,{children:[!A&&e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(pt,{navigate:t,location:a,companyId:y,isEditMode:!0,isLoading:A,isReadOnly:!s,treasurySetupView:S,analytics:j})]})}const ft=V(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:ke(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:O(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{q(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{q(a.analytics,"confirm",r,m,"Transfer"),t(Ae())},onSaveChangesToLocalStore:s=>{t(be(s))},onFetchLinkTokenClick:s=>{t(Ee("treasury_setup",s))},onEstablishConnectionClick:s=>{t(je(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(Je),yt=({isFirstTransfer:t})=>{const a=B(),{tenantEmailDomain:n}=M(),o=U(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[l,i]=d.useState(!1),[g,I]=d.useState(!1),u=f(x=>x.treasurySetupViewState.fetchState),c=f(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),h=f(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),y=f(x=>D(x)),w=b.getSignedInUserTenant(n)?.companyId??y.companyId,S=f(x=>Ce(x)),T=f(x=>O(x,w));if(b.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||w==null||(s(!0),o(ae(w,!0,!1)))},[m,u,w,o]),d.useEffect(()=>{l||c!=="Not-Started"||w==null||(i(!0),o(H()))},[l,c,w,o]),d.useEffect(()=>{g||h!=="Not-Started"||w==null||(I(!0),o(ne()))},[g,h,w,o]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(ft,{analytics:j,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:y,treasurySetupView:T,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{q(j,"review",S.treasuryTransferMoneyLocalData,T.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},gt=R.div`
1
+ import{j as e}from"./liveblocks-B5BvoK0c.js";import{h as B,g as P,u as U,i as M,j as f,N as L,n as V,o as we,p as k}from"./core-BlIgFgLa.js";import{cl as N,eR as D,Oj as O,En as ae,fj as H,E5 as ne,Ol as Te,Eq as Ie,Oh as Ce,Oi as se,OB as ke,Cx as je,tc as Ee,On as be,EJ as Ae,Ok as re,cN as W,xs as oe,e_ as ve,f0 as De,Pv as Fe,Pw as Le,E6 as Be,Px as Pe,E7 as Ue,Eg as Oe,bs as Re,bF as Me,cw as Ve,bG as Ne,ck as _e,fi as ze,bt as Ge,J_ as $e,cj as qe}from"./zeni-epic-state-DuZnqF9c.js";import{k as _,aq as He,z as b,y as z,e as j,c7 as We,c8 as Je,c9 as q,J,m as Ze,W as Ke,_ as Qe,a as ie,G as v,E as Xe,B as Ye,ca as et,at as Z,s as tt,cb as at,r as K,cc as nt,n as X,cd as st,a9 as rt}from"./index-DncvUSxy.js";import{D as ot,n as R,S as it}from"./mui-CS8zbV3O.js";import ct from"./NotFoundScreen-BJjtFMw-.js";import{S as Y}from"./SetupPagesScreen-Cf1zce1j.js";import{a as d}from"./sentry-BfAQgAk9.js";import{u as lt}from"./useAskAiCfoHostNavButtonProps-D3AdUzbU.js";import{u as ut}from"./useInitialThreadRequest-BSNit8Dm.js";import{M as ce}from"./MobileAppDrawer-DTL1WoBD.js";import{F as dt}from"./FeaturePreviewScreen-DgRclQNo.js";import{a as ee}from"./analyticsHelper-BAFKFTEz.js";import"./recharts-DYM_S90p.js";import"./analytics-DioYovd8.js";import"./plaid-C04vDugB.js";import"./dnd-Cx0n399a.js";import"./stripe-DMRn4zHo.js";import"./lottie-s3ChESX6.js";import"./lexical-DUO8UoPe.js";import"./pdf-C5qZkmhF.js";import"./utils-DVmhNkL_.js";import"./routePaths-Dmvu-NCC.js";import"./BusinessVerificationPageScreen-9ZoKahxa.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]="30108cda-34a7-4b36-b6ea-050de8f689ea",t._sentryDebugIdIdentifier="sentry-dbid-30108cda-34a7-4b36-b6ea-050de8f689ea")}catch{}})();const pt=V(function(t,a){const{companyId:n}=a;return{treasurySetupView:O(t,n),analytics:j}},function(t,a){const{navigate:n,analytics:o,treasurySetupView:p}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=p.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(Ie(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(Te(r))}}})(We);function mt(){const t=B(),a=P(),n=U(),{tenantEmailDomain:o}=M(),p=_(),r=f(C=>C.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=He(r),s=N(p?.loggedInUserRoleMap),[l,i]=d.useState(!1),[g,I]=d.useState(!1),[u,c]=d.useState(!1),h=f(C=>D(C)),y=b.getSignedInUserTenant(o)?.companyId??h.companyId,w=b.getSignedInUser(),S=f(C=>O(C,y)),T=f(C=>C.treasurySetupViewState.fetchState),x=f(C=>C.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=f(C=>C.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(w==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{l||T!=="Not-Started"||y==null||(i(!0),n(ae(y,!0,!1)))},[l,T,y,n]),d.useEffect(()=>{u||F!=="Not-Started"||y==null||(c(!0),n(H()))},[u,F,y,n]),d.useEffect(()=>{g||x!=="Not-Started"||y==null||(I(!0),n(ne()))},[g,x,y,n]),d.useEffect(()=>{m==="In-Progress"&&r==="Completed"&&t("../")},[m,r,t]),h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(L,{to:"../promo"});const A=h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||T!=="Completed";return e.jsxs(e.Fragment,{children:[!A&&e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(pt,{navigate:t,location:a,companyId:y,isEditMode:!0,isLoading:A,isReadOnly:!s,treasurySetupView:S,analytics:j})]})}const ft=V(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:ke(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:O(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{q(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{q(a.analytics,"confirm",r,m,"Transfer"),t(Ae())},onSaveChangesToLocalStore:s=>{t(be(s))},onFetchLinkTokenClick:s=>{t(Ee("treasury_setup",s))},onEstablishConnectionClick:s=>{t(je(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(Je),yt=({isFirstTransfer:t})=>{const a=B(),{tenantEmailDomain:n}=M(),o=U(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[l,i]=d.useState(!1),[g,I]=d.useState(!1),u=f(x=>x.treasurySetupViewState.fetchState),c=f(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),h=f(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),y=f(x=>D(x)),w=b.getSignedInUserTenant(n)?.companyId??y.companyId,S=f(x=>Ce(x)),T=f(x=>O(x,w));if(b.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||w==null||(s(!0),o(ae(w,!0,!1)))},[m,u,w,o]),d.useEffect(()=>{l||c!=="Not-Started"||w==null||(i(!0),o(H()))},[l,c,w,o]),d.useEffect(()=>{g||h!=="Not-Started"||w==null||(I(!0),o(ne()))},[g,h,w,o]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(ft,{analytics:j,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:y,treasurySetupView:T,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{q(j,"review",S.treasuryTransferMoneyLocalData,T.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},gt=R.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as l}from"./liveblocks-CfHMBm08.js";import{a as g}from"./sentry-0vIaNqsr.js";import{h as J,g as K,i as R,j as S,n as G,u as z,o as at,p as B,N as $}from"./core-DvGkVhX0.js";import{eR as V,L0 as Ee,L1 as Me,fV as X,cr as Ie,cs as be,w1 as St,L2 as nt,w5 as zt,J5 as ee,jI as te,v$ as Kt,vV as qt,L3 as Ue,vN as Ht,vM as Wt,vG as Qt,vS as Zt,w6 as Xt,L4 as he,L5 as Ne,vO as ea,L6 as pe,f5 as ft,wl as gt,we as vt,L7 as xt,oO as Tt,w9 as yt,w7 as Dt,L8 as Ct,ws as Et,wp as It,wa as bt,wr as Je,Hv as wt,L9 as ta,La as aa,cu as na,Lb as sa,Lc as oa,Ld as me,Le as ie,Lf as we,J6 as Ge,wH as ye,J4 as De,wu as kt,w2 as $e,Lg as la,J7 as H,Lh as Ye,vY as ia,Li as ca,Lj as da,Lk as ze,Ll as Ke,Lm as qe,Ln as He,wB as ke,Lo as At,wi as Lt,Lp as ra,Lq as ua,Lr as ha,Ls as pa,Lt as ma,Lu as Sa,Lv as fa,Lw as ga,to as va,tp as xa,Ib as Le,Lx as Ta,Ly as ya,j5 as je,bo as Da,Lz as Ca,LA as Ea,kG as Ia,kP as ba,Ia as Fe,bE as st,LB as jt,HN as Ft,LC as wa,LD as ka,LE as Aa,kR as La,LF as ot,LG as lt,LH as it,LI as ct,LJ as ja,kN as Fa,LK as Pa,kQ as _a,LL as Va,LM as Pt,Ix as _t,k4 as Ba,LN as Oa,LO as Pe,LP as Vt,Iv as Bt,yU as Ra,LQ as Ma,LR as Ua,ko as Ot,LS as Na,LT as Ja,IJ as Ga,r4 as $a,LU as Rt,LV as dt,IG as _e,LW as rt,LX as Ya,IL as za,LY as Ka,LZ as qa,L_ as Ha,L$ as Wa,M0 as Qa,r7 as Za,M1 as Xa,J8 as en,M2 as tn,Io as Ve,gR as an,M3 as nn,M4 as sn,gP as on,M5 as ln,M6 as cn,yY as dn,M7 as rn,M8 as un,M9 as hn,Ma as pn,k8 as mn,bn as Sn,f0 as fn,e_ as gn}from"./zeni-epic-state-D_HFZhXl.js";import{z as M,aq as Be,B as Mt,y as Q,e as L,a2 as Z,aw as vn,s as N,D as Ce,w as ce,ax as We,ay as xn,az as Tn,r as Qe,aA as yn,m as Dn,J as de,E as Ze,a as ae,G as Y,aB as Cn,i as Xe,_ as Se,aC as En,aD as Ut,W as In,aE as bn,k as wn,aF as kn,at as Nt,aG as An,o as W,S as Ln,H as Jt,I as jn,aH as Fn,aI as Pn,g as et,aJ as _n,aK as Vn,q as Bn,aL as On,aM as Rn}from"./index-ChP5wU0r.js";import{n as U,D as Mn,S as Gt}from"./mui-D2FQmczV.js";import{t as Un,A as Nn}from"./AddressScreen-BnC-xeNO.js";import le from"./NotFoundScreen-BNcKpH4N.js";import{F as Jn}from"./FeaturePreviewScreen-wzurtqwt.js";import{c as q,v as tt,d as Gn}from"./routePaths-CL9hJjr9.js";import{p as $t}from"./pathToGoBack-DSTCEkoM.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-RTOhQENK.js";import{M as ge}from"./MobileAppDrawer-w7Ih7RbS.js";import{D as $n}from"./DrawerScreen-1fdGLdyV.js";import{g as Yn,m as zn}from"./accountMappingHelper-CDd_SN9l.js";import"./recharts-CnIvro2v.js";import"./analytics-CStLmwuB.js";import"./plaid-DzUK2ot_.js";import"./dnd-DVf98RdY.js";import"./stripe-DMRn4zHo.js";import"./lottie-Byecfo2L.js";import"./lexical-BStGoUxq.js";import"./pdf-CojJ326Z.js";import"./utils-DF5mLbko.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]="5417b33a-de4c-4bcb-8458-908e3748a20c",e._sentryDebugIdIdentifier="sentry-dbid-5417b33a-de4c-4bcb-8458-908e3748a20c")}catch{}})();const Kn=Ce.getLocalizedStrings(),qn=G(function(e,a){const s=Me(e,a.scheduleTab),t=e.tenantState.currentTenantId;return{authParams:{userId:a.signedInUser.userId??"",sessionId:a.signedInUser.zeniSessionId??"",tenantId:t??""},linkBillExpenseView:s.linkBillExpenseView,transactions:s.linkBillExpenseView.transactions}},function(e,a){const{navigate:s,location:t}=a;return{onTransactionSelect(n){e(nt({selectedTransaction:n}))},onBackClick:()=>{s("..",{relative:"path"})},onCancel(){e(nt({selectedTransaction:void 0})),e(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=J(),s=K(),{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=M.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=>Me(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(Mt,{fetchState:i.linkBillExpenseView.fetchState}):i.selectedJEAccruedSchedule!=null&&m!=null?l.jsxs(l.Fragment,{children:[p===!0?l.jsx(Q,{analytics:L,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:L,controllerUserDetails:d,saveStatus:i.updateStatus.fetchState,jeAccruedSchedule:i.selectedJEAccruedSchedule,localData:i.scheduleAccruedDetailsLocalData.jeScheduleDetails[m]})]}):null})},Yt=e=>{const a=Kn.dateFormat.analytics.YYYYDashMMDashDDFormat;return{scheduleCreateDate:e.createTime.format(a)??null,scheduleMonthlyAmount:e.recurringAmount??null,startingBalance:e.otherAttributes.startingBalance??null,scheduleAccountCategory:e.jeCredit.account?.accountName??null,description:e.memo,runningBalance:e.balanceAsOfToday??null,currentBalance:e.balanceAsOfToday??null,currentStatus:e.status.label,period:e.period??null,startMonth:e.startDate?.format(a)??null,endMonth:e.endDate?.format(a)??null}},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&&L.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...Yt(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=U.div`
1
+ import{j as l}from"./liveblocks-B5BvoK0c.js";import{a as g}from"./sentry-BfAQgAk9.js";import{h as J,g as K,i as R,j as S,n as G,u as z,o as at,p as B,N as $}from"./core-BlIgFgLa.js";import{eR as V,L0 as Ee,L1 as Me,fV as X,cr as Ie,cs as be,w1 as St,L2 as nt,w5 as zt,J5 as ee,jI as te,v$ as Kt,vV as qt,L3 as Ue,vN as Ht,vM as Wt,vG as Qt,vS as Zt,w6 as Xt,L4 as he,L5 as Ne,vO as ea,L6 as pe,f5 as ft,wl as gt,we as vt,L7 as xt,oO as Tt,w9 as yt,w7 as Dt,L8 as Ct,ws as Et,wp as It,wa as bt,wr as Je,Hv as wt,L9 as ta,La as aa,cu as na,Lb as sa,Lc as oa,Ld as me,Le as ie,Lf as we,J6 as Ge,wH as ye,J4 as De,wu as kt,w2 as $e,Lg as la,J7 as H,Lh as Ye,vY as ia,Li as ca,Lj as da,Lk as ze,Ll as Ke,Lm as qe,Ln as He,wB as ke,Lo as At,wi as Lt,Lp as ra,Lq as ua,Lr as ha,Ls as pa,Lt as ma,Lu as Sa,Lv as fa,Lw as ga,to as va,tp as xa,Ib as Le,Lx as Ta,Ly as ya,j5 as je,bo as Da,Lz as Ca,LA as Ea,kG as Ia,kP as ba,Ia as Fe,bE as st,LB as jt,HN as Ft,LC as wa,LD as ka,LE as Aa,kR as La,LF as ot,LG as lt,LH as it,LI as ct,LJ as ja,kN as Fa,LK as Pa,kQ as _a,LL as Va,LM as Pt,Ix as _t,k4 as Ba,LN as Oa,LO as Pe,LP as Vt,Iv as Bt,yU as Ra,LQ as Ma,LR as Ua,ko as Ot,LS as Na,LT as Ja,IJ as Ga,r4 as $a,LU as Rt,LV as dt,IG as _e,LW as rt,LX as Ya,IL as za,LY as Ka,LZ as qa,L_ as Ha,L$ as Wa,M0 as Qa,r7 as Za,M1 as Xa,J8 as en,M2 as tn,Io as Ve,gR as an,M3 as nn,M4 as sn,gP as on,M5 as ln,M6 as cn,yY as dn,M7 as rn,M8 as un,M9 as hn,Ma as pn,k8 as mn,bn as Sn,f0 as fn,e_ as gn}from"./zeni-epic-state-DuZnqF9c.js";import{z as M,aq as Be,B as Mt,y as Q,e as L,a2 as Z,aw as vn,s as N,D as Ce,w as ce,ax as We,ay as xn,az as Tn,r as Qe,aA as yn,m as Dn,J as de,E as Ze,a as ae,G as Y,aB as Cn,i as Xe,_ as Se,aC as En,aD as Ut,W as In,aE as bn,k as wn,aF as kn,at as Nt,aG as An,o as W,S as Ln,H as Jt,I as jn,aH as Fn,aI as Pn,g as et,aJ as _n,aK as Vn,q as Bn,aL as On,aM as Rn}from"./index-DncvUSxy.js";import{n as U,D as Mn,S as Gt}from"./mui-CS8zbV3O.js";import{t as Un,A as Nn}from"./AddressScreen-u2DKTod9.js";import le from"./NotFoundScreen-BJjtFMw-.js";import{F as Jn}from"./FeaturePreviewScreen-DgRclQNo.js";import{c as q,v as tt,d as Gn}from"./routePaths-Dmvu-NCC.js";import{p as $t}from"./pathToGoBack-laKxrJZN.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-D3AdUzbU.js";import{M as ge}from"./MobileAppDrawer-DTL1WoBD.js";import{D as $n}from"./DrawerScreen-CkQ0nkdX.js";import{g as Yn,m as zn}from"./accountMappingHelper-B8UfZatj.js";import"./recharts-DYM_S90p.js";import"./analytics-DioYovd8.js";import"./plaid-C04vDugB.js";import"./dnd-Cx0n399a.js";import"./stripe-DMRn4zHo.js";import"./lottie-s3ChESX6.js";import"./lexical-DUO8UoPe.js";import"./pdf-C5qZkmhF.js";import"./utils-DVmhNkL_.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]="5417b33a-de4c-4bcb-8458-908e3748a20c",e._sentryDebugIdIdentifier="sentry-dbid-5417b33a-de4c-4bcb-8458-908e3748a20c")}catch{}})();const Kn=Ce.getLocalizedStrings(),qn=G(function(e,a){const s=Me(e,a.scheduleTab),t=e.tenantState.currentTenantId;return{authParams:{userId:a.signedInUser.userId??"",sessionId:a.signedInUser.zeniSessionId??"",tenantId:t??""},linkBillExpenseView:s.linkBillExpenseView,transactions:s.linkBillExpenseView.transactions}},function(e,a){const{navigate:s,location:t}=a;return{onTransactionSelect(n){e(nt({selectedTransaction:n}))},onBackClick:()=>{s("..",{relative:"path"})},onCancel(){e(nt({selectedTransaction:void 0})),e(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=J(),s=K(),{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=M.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=>Me(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(Mt,{fetchState:i.linkBillExpenseView.fetchState}):i.selectedJEAccruedSchedule!=null&&m!=null?l.jsxs(l.Fragment,{children:[p===!0?l.jsx(Q,{analytics:L,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:L,controllerUserDetails:d,saveStatus:i.updateStatus.fetchState,jeAccruedSchedule:i.selectedJEAccruedSchedule,localData:i.scheduleAccruedDetailsLocalData.jeScheduleDetails[m]})]}):null})},Yt=e=>{const a=Kn.dateFormat.analytics.YYYYDashMMDashDDFormat;return{scheduleCreateDate:e.createTime.format(a)??null,scheduleMonthlyAmount:e.recurringAmount??null,startingBalance:e.otherAttributes.startingBalance??null,scheduleAccountCategory:e.jeCredit.account?.accountName??null,description:e.memo,runningBalance:e.balanceAsOfToday??null,currentBalance:e.balanceAsOfToday??null,currentStatus:e.status.label,period:e.period??null,startMonth:e.startDate?.format(a)??null,endMonth:e.endDate?.format(a)??null}},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&&L.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...Yt(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=U.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as o}from"./liveblocks-CfHMBm08.js";import{a as l}from"./sentry-0vIaNqsr.js";import{s as u,u as h,j as y,N as I}from"./core-DvGkVhX0.js";import{Kh as b,eY as w,Ad as j}from"./zeni-epic-state-D_HFZhXl.js";import{z as f,B as x,H as S,I as D}from"./index-ChP5wU0r.js";import{n as p}from"./mui-D2FQmczV.js";import"./recharts-CnIvro2v.js";import"./analytics-CStLmwuB.js";import"./plaid-DzUK2ot_.js";import"./dnd-DVf98RdY.js";import"./stripe-DMRn4zHo.js";import"./lottie-Byecfo2L.js";import"./lexical-BStGoUxq.js";import"./pdf-CojJ326Z.js";import"./utils-DF5mLbko.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]="853b3dab-8ee7-4346-9918-d39ae04516c8",e._sentryDebugIdIdentifier="sentry-dbid-853b3dab-8ee7-4346-9918-d39ae04516c8")}catch{}})();const W=()=>{const[e]=u(),t=e.get("code")??"",i=e.get("state")??"",c=e.get("profileId")??"",[n,g]=l.useState(!1),a=h(),s=y(m=>b(m)),r=f.getSignedInUser(),d=f.getSignedInUserTenantWithId(i);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),l.useEffect(()=>{n||(g(!0),a(j(t,c,i)))},[n,a]),s.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:s.error?.message??""})}):(s.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},E=p.div`
1
+ import{j as o}from"./liveblocks-B5BvoK0c.js";import{a as l}from"./sentry-BfAQgAk9.js";import{s as u,u as h,j as y,N as I}from"./core-BlIgFgLa.js";import{Kh as b,eY as w,Ad as j}from"./zeni-epic-state-DuZnqF9c.js";import{z as f,B as x,H as S,I as D}from"./index-DncvUSxy.js";import{n as p}from"./mui-CS8zbV3O.js";import"./recharts-DYM_S90p.js";import"./analytics-DioYovd8.js";import"./plaid-C04vDugB.js";import"./dnd-Cx0n399a.js";import"./stripe-DMRn4zHo.js";import"./lottie-s3ChESX6.js";import"./lexical-DUO8UoPe.js";import"./pdf-C5qZkmhF.js";import"./utils-DVmhNkL_.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]="853b3dab-8ee7-4346-9918-d39ae04516c8",e._sentryDebugIdIdentifier="sentry-dbid-853b3dab-8ee7-4346-9918-d39ae04516c8")}catch{}})();const W=()=>{const[e]=u(),t=e.get("code")??"",i=e.get("state")??"",c=e.get("profileId")??"",[n,g]=l.useState(!1),a=h(),s=y(m=>b(m)),r=f.getSignedInUser(),d=f.getSignedInUserTenantWithId(i);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),l.useEffect(()=>{n||(g(!0),a(j(t,c,i)))},[n,a]),s.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:s.error?.message??""})}):(s.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},E=p.div`
2
2
  display: flex;
3
3
  width: 100%;
4
4
  height: 100vh;
@@ -1,4 +1,4 @@
1
- import{j as n}from"./liveblocks-CfHMBm08.js";import{h as ne,g as W,u as M,i as Y,j as w,n as q,N as X,o as Ve,p as k}from"./core-DvGkVhX0.js";import{eR as U,Pb as Ce,Pc as $e,ck as ee,cl as Ne,fi as Ze,xq as ke,BD as He,xk as Tn,Pd as Fn,Pe as Bn,xn as On,xu as fe,xh as Ln,xe as Rn,NY as le,Pf as Un,F3 as _n,L3 as zn,F5 as Mn,kp as Fe,Pg as Vn,qL as Ge,qz as We,kg as Ye,kj as Be,L4 as Oe,L5 as $n,Ph as Nn,ki as Zn,kF as Hn,k7 as Gn,iG as Wn,iF as Yn,Pi as qn,Pj as ye,EM as Jn,Pk as Kn,Pl as Qn,NR as we,Pm as Le,Pn as Xn,Fg as ea,OB as na,Cx as qe,tc as Je,Po as aa,Fd as ta,Pp as Ke,cL as Ae,Fk as Qe,fj as oa,e_ as Xe,f0 as De,Fi as sa,Cr as ra,Fa as ia,Pq as en,Pr as nn,EO as an,EY as Re,Ps as ca,Oo as la,Fl as da,bs as ua,bF as pa,cw as ma,bG as ga,bt as ha,J_ as fa}from"./zeni-epic-state-D_HFZhXl.js";import{k as ae,a as N,z as S,G as O,m as _,B as de,bY as ya,a2 as Ie,J as V,E as J,r as tn,aq as xa,af as Ue,e as L,bZ as Ca,at as Se,b_ as ka,y as ue,b$ as wa,g as be,aN as G,c0 as Aa,W as Da,_ as on,ac as Ia,c1 as _e,c2 as Sa,s as ce,c3 as ba,c4 as Pa,c5 as Ea,a9 as va,o as ja}from"./index-ChP5wU0r.js";import{n as z,D as K,S as Q}from"./mui-D2FQmczV.js";import ie from"./NotFoundScreen-BNcKpH4N.js";import{S as ze}from"./SetupPagesScreen-DVYIUml2.js";import{F as sn}from"./FeaturePreviewScreen-wzurtqwt.js";import{a as d}from"./sentry-0vIaNqsr.js";import{M as pe}from"./MobileAppDrawer-w7Ih7RbS.js";import{A as Ta,D as Fa,V as Ba}from"./DomesticWireDetailScreen-DuPKfc2x.js";import{A as Oa}from"./AddressScreen-BnC-xeNO.js";import{u as rn}from"./useAskAiCfoHostNavButtonProps-RTOhQENK.js";import{Z as La}from"./ZeniAccountStatementScreen-CO_1LwB4.js";import"./recharts-CnIvro2v.js";import"./analytics-CStLmwuB.js";import"./plaid-DzUK2ot_.js";import"./dnd-DVf98RdY.js";import"./stripe-DMRn4zHo.js";import"./lottie-Byecfo2L.js";import"./lexical-BStGoUxq.js";import"./pdf-CojJ326Z.js";import"./utils-DF5mLbko.js";import"./analyticsHelper-DLbyZBKc.js";import"./routePaths-CL9hJjr9.js";import"./BusinessVerificationPageScreen-CpGRtjnS.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]="f4cba401-2612-4bb3-ae1b-968cd271d736",e._sentryDebugIdIdentifier="sentry-dbid-f4cba401-2612-4bb3-ae1b-968cd271d736")}catch{}})();const Ra=z.div`
1
+ import{j as n}from"./liveblocks-B5BvoK0c.js";import{h as ne,g as W,u as M,i as Y,j as w,n as q,N as X,o as Ve,p as k}from"./core-BlIgFgLa.js";import{eR as U,Pb as Ce,Pc as $e,ck as ee,cl as Ne,fi as Ze,xq as ke,BD as He,xk as Tn,Pd as Fn,Pe as Bn,xn as On,xu as fe,xh as Ln,xe as Rn,NY as le,Pf as Un,F3 as _n,L3 as zn,F5 as Mn,kp as Fe,Pg as Vn,qL as Ge,qz as We,kg as Ye,kj as Be,L4 as Oe,L5 as $n,Ph as Nn,ki as Zn,kF as Hn,k7 as Gn,iG as Wn,iF as Yn,Pi as qn,Pj as ye,EM as Jn,Pk as Kn,Pl as Qn,NR as we,Pm as Le,Pn as Xn,Fg as ea,OB as na,Cx as qe,tc as Je,Po as aa,Fd as ta,Pp as Ke,cL as Ae,Fk as Qe,fj as oa,e_ as Xe,f0 as De,Fi as sa,Cr as ra,Fa as ia,Pq as en,Pr as nn,EO as an,EY as Re,Ps as ca,Oo as la,Fl as da,bs as ua,bF as pa,cw as ma,bG as ga,bt as ha,J_ as fa}from"./zeni-epic-state-DuZnqF9c.js";import{k as ae,a as N,z as S,G as O,m as _,B as de,bY as ya,a2 as Ie,J as V,E as J,r as tn,aq as xa,af as Ue,e as L,bZ as Ca,at as Se,b_ as ka,y as ue,b$ as wa,g as be,aN as G,c0 as Aa,W as Da,_ as on,ac as Ia,c1 as _e,c2 as Sa,s as ce,c3 as ba,c4 as Pa,c5 as Ea,a9 as va,o as ja}from"./index-DncvUSxy.js";import{n as z,D as K,S as Q}from"./mui-CS8zbV3O.js";import ie from"./NotFoundScreen-BJjtFMw-.js";import{S as ze}from"./SetupPagesScreen-Cf1zce1j.js";import{F as sn}from"./FeaturePreviewScreen-DgRclQNo.js";import{a as d}from"./sentry-BfAQgAk9.js";import{M as pe}from"./MobileAppDrawer-DTL1WoBD.js";import{A as Ta,D as Fa,V as Ba}from"./DomesticWireDetailScreen-wUhcMv0F.js";import{A as Oa}from"./AddressScreen-u2DKTod9.js";import{u as rn}from"./useAskAiCfoHostNavButtonProps-D3AdUzbU.js";import{Z as La}from"./ZeniAccountStatementScreen-msNMuYwl.js";import"./recharts-DYM_S90p.js";import"./analytics-DioYovd8.js";import"./plaid-C04vDugB.js";import"./dnd-Cx0n399a.js";import"./stripe-DMRn4zHo.js";import"./lottie-s3ChESX6.js";import"./lexical-DUO8UoPe.js";import"./pdf-C5qZkmhF.js";import"./utils-DVmhNkL_.js";import"./analyticsHelper-BAFKFTEz.js";import"./routePaths-Dmvu-NCC.js";import"./BusinessVerificationPageScreen-9ZoKahxa.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]="f4cba401-2612-4bb3-ae1b-968cd271d736",e._sentryDebugIdIdentifier="sentry-dbid-f4cba401-2612-4bb3-ae1b-968cd271d736")}catch{}})();const Ra=z.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as i}from"./liveblocks-CfHMBm08.js";import{a as u}from"./sentry-0vIaNqsr.js";import{h as x,u as B,g as P,i as $,j as p}from"./core-DvGkVhX0.js";import{Je as s,Jd as j,Pt as v,eR as C,Pu as T}from"./zeni-epic-state-D_HFZhXl.js";import{J as z,at as g,m as D,z as E,B as L,c6 as N,r as U}from"./index-ChP5wU0r.js";import{n as _}from"./mui-D2FQmczV.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]="1f627d18-2f82-44a2-b661-b31949ce5bb7",e._sentryDebugIdIdentifier="sentry-dbid-1f627d18-2f82-44a2-b661-b31949ce5bb7")}catch{}})();const J=_.div`
1
+ import{j as i}from"./liveblocks-B5BvoK0c.js";import{a as u}from"./sentry-BfAQgAk9.js";import{h as x,u as B,g as P,i as $,j as p}from"./core-BlIgFgLa.js";import{Je as s,Jd as j,Pt as v,eR as C,Pu as T}from"./zeni-epic-state-DuZnqF9c.js";import{J as z,at as g,m as D,z as E,B as L,c6 as N,r as U}from"./index-DncvUSxy.js";import{n as _}from"./mui-CS8zbV3O.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]="1f627d18-2f82-44a2-b661-b31949ce5bb7",e._sentryDebugIdIdentifier="sentry-dbid-1f627d18-2f82-44a2-b661-b31949ce5bb7")}catch{}})();const J=_.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import"./sentry-0vIaNqsr.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-BfAQgAk9.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};