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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/assets/{AddressRoutes-Clm_yxMo.js → AddressRoutes-O04th73J.js} +1 -1
  2. package/dist/assets/{AddressScreen-ByYpZmgQ.js → AddressScreen-Bk_munT3.js} +1 -1
  3. package/dist/assets/{AiCfoScreen-DbYSFoNw.js → AiCfoScreen-9dFOdDvS.js} +1 -1
  4. package/dist/assets/{BillPayApprovalRoutes-CX2-tB9Z.js → BillPayApprovalRoutes-COiJeUFT.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-CFin72Sd.js → BillPayRoutes-DRXDrSZP.js} +1 -1
  6. package/dist/assets/{BusinessVerificationPageScreen-C-d6e6xJ.js → BusinessVerificationPageScreen-CnAB8eUQ.js} +1 -1
  7. package/dist/assets/{ChargeCardRoutes-BqilxZnu.js → ChargeCardRoutes-C9NA04uL.js} +1 -1
  8. package/dist/assets/{CompanyPassportScreen-Btm8q2XT.js → CompanyPassportScreen-BWjh-1tt.js} +1 -1
  9. package/dist/assets/{ConnectionAuthScreen-B3NEPge1.js → ConnectionAuthScreen-D6DaHf5c.js} +1 -1
  10. package/dist/assets/{CustomerOnboardingAuthScreen-BP98cwHW.js → CustomerOnboardingAuthScreen-3eEcB707.js} +1 -1
  11. package/dist/assets/{CustomerOnboardingRoutes-Cx10OoO6.js → CustomerOnboardingRoutes-l7rM0eut.js} +1 -1
  12. package/dist/assets/{DashboardRoutes-Dr7E3H8N.js → DashboardRoutes-BR-AxyQo.js} +1 -1
  13. package/dist/assets/{DefaultTenantHome-BmA8DcRx.js → DefaultTenantHome-C74gAQVt.js} +1 -1
  14. package/dist/assets/{DomesticWireDetailScreen-CzSUYZwn.js → DomesticWireDetailScreen-CWWX1EFM.js} +1 -1
  15. package/dist/assets/{DrawerScreen-AH0ysY6V.js → DrawerScreen-DzkaoOWL.js} +1 -1
  16. package/dist/assets/{EntityDetailRoutes-DVGIBaLz.js → EntityDetailRoutes-B7e2LtGS.js} +1 -1
  17. package/dist/assets/{ExpenseAutomationRoutes-BhbZS8a1.js → ExpenseAutomationRoutes-But3rf3J.js} +1 -1
  18. package/dist/assets/{FeaturePreviewScreen-DPxCLrsp.js → FeaturePreviewScreen-B2O-98_e.js} +1 -1
  19. package/dist/assets/{HubSpotOAuthCallbackScreen-BvqLZI0N.js → HubSpotOAuthCallbackScreen-DexCFc1l.js} +1 -1
  20. package/dist/assets/{MagicLinkRoutes-jZeMo5Ui.js → MagicLinkRoutes-Chwo-qkP.js} +1 -1
  21. package/dist/assets/{MagicLinkSignInScreen-PJSTdmbN.js → MagicLinkSignInScreen-DWsNyqtg.js} +1 -1
  22. package/dist/assets/{MobileAppDrawer-CNxBiA0K.js → MobileAppDrawer-B3x5wY10.js} +1 -1
  23. package/dist/assets/{NotFoundScreen-CsEhUGfR.js → NotFoundScreen-t1ueGvDG.js} +1 -1
  24. package/dist/assets/{NotificationRoutes-9IJgVYJ1.js → NotificationRoutes-CIdj2V-n.js} +1 -1
  25. package/dist/assets/{OAuthConsentScreen-1ZY7Ls_k.js → OAuthConsentScreen-CP2RFaGU.js} +1 -1
  26. package/dist/assets/{PandLWithForecastRoutes-8SC0GJZW.js → PandLWithForecastRoutes-BXYFz1ZW.js} +1 -1
  27. package/dist/assets/{PeopleRoutes-DQ3Y767r.js → PeopleRoutes-MqrPexG5.js} +1 -1
  28. package/dist/assets/{PerformanceRoutes-BZb18QS3.js → PerformanceRoutes-B1RTm-Zq.js} +1 -1
  29. package/dist/assets/{QBOConnectionScreen-BRrDd8wr.js → QBOConnectionScreen-CzbbjqA7.js} +1 -1
  30. package/dist/assets/{ReferralListScreen-DWAGGjua.js → ReferralListScreen-DTQFACuG.js} +1 -1
  31. package/dist/assets/{ReimbursementApprovalRoutes-DSgEFO1H.js → ReimbursementApprovalRoutes-Dclz8XkB.js} +1 -1
  32. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-CtZbBICM.js → ReimbursementApprovalRuleDetailScreen-Cf6fN3gm.js} +1 -1
  33. package/dist/assets/{ReimbursementRoutes-Iavqnxfs.js → ReimbursementRoutes-Dd9IEYb-.js} +1 -1
  34. package/dist/assets/{ReportsRoutes-CjoIF9EB.js → ReportsRoutes-B9O7T9pm.js} +1 -1
  35. package/dist/assets/{RewardsRoutes-CTiffYxG.js → RewardsRoutes-DN2HacCh.js} +1 -1
  36. package/dist/assets/{ScreenRoutes-zUtLUY3P.js → ScreenRoutes-BsLKoqEt.js} +2 -2
  37. package/dist/assets/{SettingsRoutes-Dr2cLQZf.js → SettingsRoutes-B6i5o_xZ.js} +1 -1
  38. package/dist/assets/{SetupPagesScreen-BMUAJOjI.js → SetupPagesScreen-D9wDjvOC.js} +1 -1
  39. package/dist/assets/{SignInScreen-BO8V1s1B.js → SignInScreen-D68DdO0g.js} +1 -1
  40. package/dist/assets/{SignOutScreen-B1QfOGXO.js → SignOutScreen-CiC1xhyM.js} +1 -1
  41. package/dist/assets/{TaskListScreen-DdoFZv0I.js → TaskListScreen-BXp_P6Ec.js} +1 -1
  42. package/dist/assets/{TaskRoutes-DR1BBqXQ.js → TaskRoutes-Dne-2qND.js} +1 -1
  43. package/dist/assets/{TransactionDetailRoutes-DLkTkOiV.js → TransactionDetailRoutes-C1ih2pnm.js} +1 -1
  44. package/dist/assets/{TransactionDetailScreen--PMkud8g.js → TransactionDetailScreen-DRZw6o-C.js} +1 -1
  45. package/dist/assets/{TransactionListRoutes-quiJ_wNs.js → TransactionListRoutes-BOekcd9c.js} +1 -1
  46. package/dist/assets/{TreasuryRoutes-BVcC0j-i.js → TreasuryRoutes-BMXt9CZJ.js} +1 -1
  47. package/dist/assets/{VendorsRoutes-DJYa05bm.js → VendorsRoutes-ZfxM-ykJ.js} +1 -1
  48. package/dist/assets/{WiseConfirmationScreen-CTaGbwbB.js → WiseConfirmationScreen-D5IG7vtp.js} +1 -1
  49. package/dist/assets/{ZeniAccountRoutes-CpYvVE1u.js → ZeniAccountRoutes-CpvkXgX6.js} +1 -1
  50. package/dist/assets/{ZeniAccountStatementScreen-C8feQjoH.js → ZeniAccountStatementScreen-C_K9i07r.js} +1 -1
  51. package/dist/assets/{analyticsHelper-DhD4YoYg.js → analyticsHelper-BunVJ4K_.js} +1 -1
  52. package/dist/assets/{getLocaleForTenant-CFQN8jbL.js → getLocaleForTenant-BVZe9vGW.js} +1 -1
  53. package/dist/assets/{index-CeZ7L-BQ.js → index-DojfCsv7.js} +5 -5
  54. package/dist/assets/{routePaths-vUmlDccC.js → routePaths-DoAvT9jx.js} +1 -1
  55. package/dist/assets/{useAskAiCfoHostNavButtonProps-D4_eEE1f.js → useAskAiCfoHostNavButtonProps-It-lF7wN.js} +1 -1
  56. package/dist/assets/{useFetchSuggestedQuestionsWhenReady-b8cA6qxS.js → useFetchSuggestedQuestionsWhenReady-D9n2AKQx.js} +1 -1
  57. package/dist/assets/{useInitialThreadRequest-cRvS9PIT.js → useInitialThreadRequest-Dbj0dyeX.js} +1 -1
  58. package/dist/assets/{withTransactionSidePanel-BS7S2wn5.js → withTransactionSidePanel-DN0z2FuE.js} +1 -1
  59. package/dist/index.html +1 -1
  60. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-Dr7E3H8N.js","assets/sentry-131ydzJg.js","assets/core-uYqCzel8.js","assets/zeni-epic-state-BmAPZlsC.js","assets/index-CeZ7L-BQ.js","assets/mui-CTbUXhla.js","assets/analytics-CgRNtlDm.js","assets/utils-BkkIzijx.js","assets/withTransactionSidePanel-BS7S2wn5.js","assets/useAskAiCfoHostNavButtonProps-D4_eEE1f.js","assets/useFetchSuggestedQuestionsWhenReady-b8cA6qxS.js","assets/TransactionDetailScreen--PMkud8g.js","assets/decodeURIComponentSafe-DCnYf30M.js","assets/routePaths-vUmlDccC.js","assets/NotFoundScreen-CsEhUGfR.js","assets/analyticsHelper-DhD4YoYg.js","assets/CompanyPassportScreen-Btm8q2XT.js","assets/MobileAppDrawer-CNxBiA0K.js","assets/FeaturePreviewScreen-DPxCLrsp.js","assets/ReferralListScreen-DWAGGjua.js","assets/index-Bc34frN_.css","assets/BillPayRoutes-CFin72Sd.js","assets/AddressScreen-ByYpZmgQ.js","assets/DomesticWireDetailScreen-CzSUYZwn.js","assets/useInitialThreadRequest-cRvS9PIT.js","assets/DrawerScreen-AH0ysY6V.js","assets/SetupPagesScreen-BMUAJOjI.js","assets/BusinessVerificationPageScreen-C-d6e6xJ.js","assets/BillPayApprovalRoutes-CX2-tB9Z.js","assets/ReimbursementApprovalRuleDetailScreen-CtZbBICM.js","assets/getLocaleForTenant-CFQN8jbL.js","assets/ReimbursementRoutes-Iavqnxfs.js","assets/ReimbursementApprovalRoutes-DSgEFO1H.js","assets/TransactionListRoutes-quiJ_wNs.js","assets/ZeniAccountStatementScreen-C8feQjoH.js","assets/SettingsRoutes-Dr2cLQZf.js","assets/accountMappingHelper-D6x0RpVY.js","assets/QBOConnectionScreen-BRrDd8wr.js","assets/empty-CKinwWZY.js","assets/index-DeBaxB_L.js","assets/url-BRm_J7V6.js","assets/index-CxWCBC6O.js","assets/ReportsRoutes-CjoIF9EB.js","assets/ChargeCardRoutes-BqilxZnu.js","assets/PeopleRoutes-DQ3Y767r.js","assets/ExpenseAutomationRoutes-BhbZS8a1.js","assets/TreasuryRoutes-BVcC0j-i.js","assets/VendorsRoutes-DJYa05bm.js","assets/pathToGoBack-Y7yporNq.js","assets/ZeniAccountRoutes-CpYvVE1u.js","assets/AddressRoutes-Clm_yxMo.js","assets/PandLWithForecastRoutes-8SC0GJZW.js","assets/CustomerOnboardingRoutes-Cx10OoO6.js","assets/TransactionDetailRoutes-DLkTkOiV.js","assets/EntityDetailRoutes-DVGIBaLz.js","assets/NotificationRoutes-9IJgVYJ1.js","assets/PerformanceRoutes-BZb18QS3.js","assets/RewardsRoutes-CTiffYxG.js","assets/TaskRoutes-DR1BBqXQ.js","assets/TaskListScreen-DdoFZv0I.js","assets/AiCfoScreen-DbYSFoNw.js"])))=>i.map(i=>d[i]);
2
- import{_ as n,bn as os,eQ as ls,eW as cs,eU as ds,eV as ms,fF as us,eS as _s,cQ as Ee,cx as Es,fb as As,cp as ps,bE as gs,bq as xs,fg as Is,v as Ts,Jc as hs,bv as js,Jd as Us,bG as Hs,fd as Rs,bF as Ds,bs,cl as ys,Je as fs,Jf as Cs,cN as vs,cP as Os,cO as Ps,cw as Fs,cC as Ls,mS as Ae,eR as pe,fP as Bs,fk as ge,fM as xe,fN as Ie,fl as ks}from"./zeni-epic-state-BmAPZlsC.js";import{j as e}from"./liveblocks-CfCKAQeM.js";import{a as v}from"./sentry-131ydzJg.js";import{h as Vs,j as Ss,l as Ns,u as Ms,g as G,i as Te,N as c,n as Zs,o as t}from"./core-uYqCzel8.js";import{m as ws,u as Gs,z as R,y as zs,a as $s,M as Js,S as L,c as Ws,L as B,D as he,t as _,P as Ys,d as X,l}from"./index-CeZ7L-BQ.js";import"./mui-CTbUXhla.js";import{f as je}from"./analyticsHelper-DhD4YoYg.js";import{t as qs}from"./getLocaleForTenant-CFQN8jbL.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.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]="678d69e8-81cc-474a-9ccc-d975a94edf1a",i._sentryDebugIdIdentifier="sentry-dbid-678d69e8-81cc-474a-9ccc-d975a94edf1a")}catch{}})();const Qs={dashboard:()=>n(()=>import("./DashboardRoutes-Dr7E3H8N.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),bills:()=>n(()=>import("./BillPayRoutes-CFin72Sd.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20])),reimbursement:()=>n(()=>import("./ReimbursementRoutes-Iavqnxfs.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,9,10,24,25,32,29,30,20])),transactions:()=>n(()=>import("./TransactionListRoutes-quiJ_wNs.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20])),settings:()=>n(()=>import("./SettingsRoutes-Dr2cLQZf.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20])),reports:()=>n(()=>import("./ReportsRoutes-CjoIF9EB.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-BqilxZnu.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20])),people:()=>n(()=>import("./PeopleRoutes-DQ3Y767r.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-BhbZS8a1.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20])),treasury:()=>n(()=>import("./TreasuryRoutes-BVcC0j-i.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20])),vendors:()=>n(()=>import("./VendorsRoutes-DJYa05bm.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20])),zeniAccounts:()=>n(()=>import("./ZeniAccountRoutes-CpYvVE1u.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))},Ks=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Xs=l(()=>n(()=>import("./ReportsRoutes-CjoIF9EB.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20]))),en=l(()=>n(()=>import("./AddressRoutes-Clm_yxMo.js"),__vite__mapDeps([50,1,2,3,22,4,5,6,7,14,20]))),sn=l(()=>n(()=>import("./PeopleRoutes-DQ3Y767r.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20]))),nn=l(()=>n(()=>import("./PandLWithForecastRoutes-8SC0GJZW.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,14,18,9,10,24,13,17,20]))),an=l(()=>n(()=>import("./CustomerOnboardingRoutes-Cx10OoO6.js"),__vite__mapDeps([52,1,2,3,22,4,5,6,7,14,37,38,39,40,41,12,20]))),tn=l(()=>n(()=>import("./VendorsRoutes-DJYa05bm.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20]))),rn=l(()=>n(()=>import("./TransactionDetailRoutes-DLkTkOiV.js"),__vite__mapDeps([53,1,2,3,14,4,5,6,7,11,9,10,12,13,20]))),Ue=l(()=>n(()=>import("./EntityDetailRoutes-DVGIBaLz.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,12,8,9,10,11,13,20]))),on=l(()=>n(()=>import("./DashboardRoutes-Dr7E3H8N.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))),He=l(()=>n(()=>import("./BillPayRoutes-CFin72Sd.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20]))),ln=l(()=>n(()=>import("./SettingsRoutes-Dr2cLQZf.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20]))),Re=l(()=>n(()=>import("./ReimbursementRoutes-Iavqnxfs.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,9,10,24,25,32,29,30,20]))),cn=l(()=>n(()=>import("./ZeniAccountRoutes-CpYvVE1u.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))),dn=l(()=>n(()=>import("./TreasuryRoutes-BVcC0j-i.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20]))),mn=l(()=>n(()=>import("./TransactionListRoutes-quiJ_wNs.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20]))),un=l(()=>n(()=>import("./ChargeCardRoutes-BqilxZnu.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20]))),_n=l(()=>n(()=>import("./NotificationRoutes-9IJgVYJ1.js"),__vite__mapDeps([55,1,2,3,14,4,5,6,7,9,10,20]))),En=l(()=>n(()=>import("./PerformanceRoutes-BZb18QS3.js"),__vite__mapDeps([56,1,2,3,14,4,5,6,7,9,10,17,20]))),An=l(()=>n(()=>import("./ExpenseAutomationRoutes-BhbZS8a1.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20]))),pn=l(()=>n(()=>import("./RewardsRoutes-CTiffYxG.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,14,19,9,10,17,20]))),gn=l(()=>n(()=>import("./TaskRoutes-DR1BBqXQ.js"),__vite__mapDeps([58,1,2,3,14,4,5,6,7,24,17,59,9,10,20]))),xn=l(()=>n(()=>import("./AiCfoScreen-DbYSFoNw.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,48,20]))),y=l(()=>n(()=>import("./NotFoundScreen-CsEhUGfR.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,20]))),In=l(()=>n(()=>import("./TaskListScreen-DdoFZv0I.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,10,17,20])));function wn({setTenantEmailDomain:i}){const U=Vs(),V=Ss(),{tenantEmailDomain:o}=Ns(),S=ws().mode,{setLoading:f,clearAllLoading:O,clearLoading:Z}=Gs(),b=R.getSignedInUserTenant(o)?.tenantId,h=R.getSignedInUser(),q=os(h),z=Ms(),[N,be]=v.useState(!1),r=G(a=>ls(a)),{useFeatureGate:P}=zs(),Q=$s(),ye=Js(),{isFeatureEnabled:fe}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Ce}=P(L.isExpenseAutomationEnabledV2),ve=Ce||fe&&q,{isFeatureEnabled:Oe}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Pe}=P(L.isTreasuryEnabled),{isFeatureEnabled:Fe}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:se}=P(L.isDebitCardFeatureEnabled),j=G(a=>a.tenantState.fetchState),A=G(a=>a.tenantState.activeTenantFetchState.fetchState),u=A==="Completed"||j==="Completed"?cs(se,r):void 0,$=A==="Completed"||j==="Completed"?ds(r):void 0,Le=A==="Completed"||j==="Completed"?ms(r):void 0,Be=Fe||se||!!Le||!!$||!!u,{isFeatureEnabled:ke}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:Ve}=P(L.isAiCfoFileUploadEnabled),J=G(a=>us(a));if(o!=null){const a=R.getSignedInUserTenant(o);h!=null&&a!=null&&je(h,r,S)}const w={tenantId:b,userId:h?.userId,sessionId:h?.zeniSessionId},ne=_s(),E=Ws(),Se=r.company==null||E?.loggedInUserRoleMap!=null&&Ee(E.loggedInUserRole),Ne=Es(E?.loggedInUserRoleMap),ae=v.useRef(!0),te=Te("/:tenantEmailDomain/onboarding/*")!==null,K=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=G(a=>w.tenantId!=null?As(a,w.tenantId):void 0);v.useEffect(()=>{f(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(K!=null&&b!=null){const a=K.params.selectedPeriod;if(a!=null){const H=a.split("-");if(H.length===2){const d=ps(Number(H[0])),s=Number(H[1]),m=gs(`01-${d<10?`0${d}`:d}-${s}`,he.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=xs();m.isAfter(M,"month")===!1?U(Is(b,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[K,b]),v.useEffect(()=>{N||(be(!0),f(B.TENANT_FETCHING)),ae.current?ae.current=!1:!Ts(ne,w)&&R.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,H,d,s){if(pe(H?.userId,H?.zeniSessionId,a.tenantId),d(Bs(!0)),d(ge(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const m=R.getSignedInUserTenantWithId(a.tenantId);s&&he.updateAppLocaleID(qs(s)),m?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}a.userId!=null?X.identify(a.userId,{tenant_id:a.tenantId}):X.resetUserIdentity()}(w,h,U,Me))},[w,ne,h,U,R]),v.useEffect(()=>{R.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,H,d,s,m,M,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const W=s!=null&&m?.zeniSessionId!=null,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(W&&ts){k(ge(s));const Y=R.getSignedInUserTenantWithId(s);Y?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(Y?.tenantEmailDomain),pe(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(xe(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(Ie(m.userId,s)))}else W&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(xe(m.userId,s))),W&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(Ie(m.userId,s)));if(W){X.identify(m.userId,{tenant_id:s});const Y=s==null||s!=null&&(H==="Completed"||H==="Error");a==="Completed"||H!=="Not-Started"&&H!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(ks(m.userId,s,m.zeniSessionId))),Y&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Ae(m.userId,m.zeniSessionId)))}}(j,A,r,b,h,f,U))},[b,A]),v.useEffect(()=>{R.isSignedIn()&&j==="Completed"&&J.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),R.saveSignedInUserTenants(hs(J.tenantsBaseInOrder)),h!=null&&je(h,r,S,void 0,J.tenantsBaseInOrder))},[J,j,r,h]),v.useEffect(()=>{A==="In-Progress"&&f(B.TENANT_FETCHING),A!=="Completed"&&A!=="Error"||(A==="Completed"&&b!=null?(O(),_.markActiveTenantFetchCompleted(b)):A==="Error"&&b!=null&&(_.markActiveTenantFetchFailed(b),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[A,j,b,N]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&A==="Completed"&&N&&(ie.current=!0,function(a=Ks,H=3e3){setTimeout(()=>{const d=s=>{if(s>=a.length)return;const m=a[s],M=Qs[m];M!=null?M().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},H)}())},[A,N]);const C=r?.userRole!=null&&js(r?.userRole),{isFeatureEnabled:Ze}=P(L.isReferralFeatureEnabled),we=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Ge=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ee(r.userRole),re=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,oe=Be&&!C,ze=Us(E?.loggedInUserRoleMap),$e=r.externalConnections?.accounting[0]?.isValid,le=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,de=ce&&Hs(E?.loggedInUserRoleMap),me=Oe&&!C,Je=r.company!=null&&Rs(r.company),We=Pe&&Je===!0&&!C,Ye=re&&Ds(E?.loggedInUserRoleMap),qe=oe&&bs(E?.loggedInUserRoleMap),Qe=me&&ys(E?.loggedInUserRoleMap),Ke=fs(E?.loggedInUserRoleMap),Xe=Cs(E?.loggedInUserRoleMap),p=vs(E?.loggedInUserRoleMap),g=Os(E?.loggedInUserRoleMap),x=Ps(E?.loggedInUserRoleMap),I=Fs(E?.loggedInUserRoleMap),T=Ls(E?.loggedInUserRoleMap),ue=re&&I,_e=ce&&T,es=me&&p,ss=We&&g,ns=oe&&x,as=r.excludedResources?.resources?.find(a=>a.resource==="/invites")!=null||Ne===!0||ze===!0||Ke===!0||Xe===!0;return R.isSignedIn()?b==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ae(h.userId,h.zeniSessionId)),null):A!=="In-Progress"&&A!=="Not-Started"||j==="Completed"?(le===!0||q&&!te)&&$e===!1&&u===!1&&$===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||le!==!1||te||q?N&&r?.userRole&&u!=null&&$!=null&&o!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Zs,{children:e.jsxs(t,{element:e.jsx(Ys,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Tn,{isDashboardAccess:F,isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,isTenantCardsOnly:$})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(on,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(Xs,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:as||F?e.jsx(sn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(nn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(an,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||we||Ge?e.jsx(rn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(mn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(Ue,{entityType:"customer"}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:g,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(In,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(gn,{})}),e.jsx(t,{path:"address/*",element:Ye||de||Qe||qe?e.jsx(en,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:es?e.jsx(cn,{}):e.jsx(y,{})}),e.jsx(t,{path:"treasury/*",element:ss?e.jsx(dn,{}):e.jsx(y,{})}),e.jsx(t,{path:"performance",element:ye?e.jsx(En,{}):e.jsx(De,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ve&&C===!1?e.jsx(An,{}):e.jsx(De,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(_n,{})}),e.jsx(t,{path:"vendors/*",element:Se?e.jsx(tn,{}):e.jsx(y,{})}),e.jsx(t,{path:"bill/*",element:ue?e.jsx(He,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:ue?e.jsx(He,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:_e?e.jsx(Re,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:_e?e.jsx(Re,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:ke?e.jsx(ln,{hasAdminLevelAccess:de}):e.jsx(y,{})}),e.jsx(t,{path:"cards/*",element:ns?e.jsx(un,{}):e.jsx(y,{})}),e.jsx(t,{path:"rewards/*",element:Ze?e.jsx(pn,{}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo",element:Q?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/",element:Q?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:Q?e.jsx(xn,{isFileUploadEnabled:Ve}):e.jsx(y,{})}),e.jsx(t,{path:"*",element:e.jsx(y,{})})]})}):null:(i(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),i(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}))}const Tn=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:V,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:f,isTenantBankingOnly:O,isTenantCardsOnly:Z})=>O===!0&&U?e.jsx(c,{to:"checking"}):Z===!0?e.jsx(c,{to:"cards"}):i?e.jsx(c,{to:"dashboard"}):U?e.jsx(c,{to:"checking"}):f?e.jsx(c,{to:"treasury"}):V?e.jsx(c,{to:"cards"}):o?e.jsx(c,{to:"bills"}):S?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),D=({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(Un,{tenantEmailDomain:O}):U?e.jsx(Rn,{tenantEmailDomain:O}):V?e.jsx(jn,{tenantEmailDomain:O}):o?e.jsx(hn,{tenantEmailDomain:O}):e.jsx(y,{}),hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),jn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),Un=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),Hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),Rn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),De=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{D as FallBackRoute,wn as default};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-BR-AxyQo.js","assets/sentry-131ydzJg.js","assets/core-uYqCzel8.js","assets/zeni-epic-state-BmAPZlsC.js","assets/index-DojfCsv7.js","assets/mui-CTbUXhla.js","assets/analytics-CgRNtlDm.js","assets/utils-BkkIzijx.js","assets/withTransactionSidePanel-DN0z2FuE.js","assets/useAskAiCfoHostNavButtonProps-It-lF7wN.js","assets/useFetchSuggestedQuestionsWhenReady-D9n2AKQx.js","assets/TransactionDetailScreen-DRZw6o-C.js","assets/decodeURIComponentSafe-DCnYf30M.js","assets/routePaths-DoAvT9jx.js","assets/NotFoundScreen-t1ueGvDG.js","assets/analyticsHelper-BunVJ4K_.js","assets/CompanyPassportScreen-BWjh-1tt.js","assets/MobileAppDrawer-B3x5wY10.js","assets/FeaturePreviewScreen-B2O-98_e.js","assets/ReferralListScreen-DTQFACuG.js","assets/index-Bc34frN_.css","assets/BillPayRoutes-DRXDrSZP.js","assets/AddressScreen-Bk_munT3.js","assets/DomesticWireDetailScreen-CWWX1EFM.js","assets/useInitialThreadRequest-Dbj0dyeX.js","assets/DrawerScreen-DzkaoOWL.js","assets/SetupPagesScreen-D9wDjvOC.js","assets/BusinessVerificationPageScreen-CnAB8eUQ.js","assets/BillPayApprovalRoutes-COiJeUFT.js","assets/ReimbursementApprovalRuleDetailScreen-Cf6fN3gm.js","assets/getLocaleForTenant-BVZe9vGW.js","assets/ReimbursementRoutes-Dd9IEYb-.js","assets/ReimbursementApprovalRoutes-Dclz8XkB.js","assets/TransactionListRoutes-BOekcd9c.js","assets/ZeniAccountStatementScreen-C_K9i07r.js","assets/SettingsRoutes-B6i5o_xZ.js","assets/accountMappingHelper-D6x0RpVY.js","assets/QBOConnectionScreen-CzbbjqA7.js","assets/empty-CKinwWZY.js","assets/index-DeBaxB_L.js","assets/url-BRm_J7V6.js","assets/index-CxWCBC6O.js","assets/ReportsRoutes-B9O7T9pm.js","assets/ChargeCardRoutes-C9NA04uL.js","assets/PeopleRoutes-MqrPexG5.js","assets/ExpenseAutomationRoutes-But3rf3J.js","assets/TreasuryRoutes-BMXt9CZJ.js","assets/VendorsRoutes-ZfxM-ykJ.js","assets/pathToGoBack-Y7yporNq.js","assets/ZeniAccountRoutes-CpvkXgX6.js","assets/AddressRoutes-O04th73J.js","assets/PandLWithForecastRoutes-BXYFz1ZW.js","assets/CustomerOnboardingRoutes-l7rM0eut.js","assets/TransactionDetailRoutes-C1ih2pnm.js","assets/EntityDetailRoutes-B7e2LtGS.js","assets/NotificationRoutes-CIdj2V-n.js","assets/PerformanceRoutes-B1RTm-Zq.js","assets/RewardsRoutes-DN2HacCh.js","assets/TaskRoutes-Dne-2qND.js","assets/TaskListScreen-BXp_P6Ec.js","assets/AiCfoScreen-9dFOdDvS.js"])))=>i.map(i=>d[i]);
2
+ import{_ as n,bn as os,eQ as ls,eW as cs,eU as ds,eV as ms,fF as us,eS as _s,cQ as Ee,cx as Es,fb as As,cp as ps,bE as gs,bq as xs,fg as Is,v as Ts,Jc as hs,bv as js,Jd as Us,bG as Hs,fd as Rs,bF as Ds,bs,cl as ys,Je as fs,Jf as Cs,cN as vs,cP as Os,cO as Ps,cw as Fs,cC as Ls,mS as Ae,eR as pe,fP as Bs,fk as ge,fM as xe,fN as Ie,fl as ks}from"./zeni-epic-state-BmAPZlsC.js";import{j as e}from"./liveblocks-CfCKAQeM.js";import{a as v}from"./sentry-131ydzJg.js";import{h as Vs,j as Ss,l as Ns,u as Ms,g as G,i as Te,N as c,n as Zs,o as t}from"./core-uYqCzel8.js";import{m as ws,u as Gs,z as R,y as zs,a as $s,M as Js,S as L,c as Ws,L as B,D as he,t as _,P as Ys,d as X,l}from"./index-DojfCsv7.js";import"./mui-CTbUXhla.js";import{f as je}from"./analyticsHelper-BunVJ4K_.js";import{t as qs}from"./getLocaleForTenant-BVZe9vGW.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.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]="678d69e8-81cc-474a-9ccc-d975a94edf1a",i._sentryDebugIdIdentifier="sentry-dbid-678d69e8-81cc-474a-9ccc-d975a94edf1a")}catch{}})();const Qs={dashboard:()=>n(()=>import("./DashboardRoutes-BR-AxyQo.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),bills:()=>n(()=>import("./BillPayRoutes-DRXDrSZP.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20])),reimbursement:()=>n(()=>import("./ReimbursementRoutes-Dd9IEYb-.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,9,10,24,25,32,29,30,20])),transactions:()=>n(()=>import("./TransactionListRoutes-BOekcd9c.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20])),settings:()=>n(()=>import("./SettingsRoutes-B6i5o_xZ.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20])),reports:()=>n(()=>import("./ReportsRoutes-B9O7T9pm.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-C9NA04uL.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20])),people:()=>n(()=>import("./PeopleRoutes-MqrPexG5.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-But3rf3J.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20])),treasury:()=>n(()=>import("./TreasuryRoutes-BMXt9CZJ.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20])),vendors:()=>n(()=>import("./VendorsRoutes-ZfxM-ykJ.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20])),zeniAccounts:()=>n(()=>import("./ZeniAccountRoutes-CpvkXgX6.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))},Ks=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Xs=l(()=>n(()=>import("./ReportsRoutes-B9O7T9pm.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20]))),en=l(()=>n(()=>import("./AddressRoutes-O04th73J.js"),__vite__mapDeps([50,1,2,3,22,4,5,6,7,14,20]))),sn=l(()=>n(()=>import("./PeopleRoutes-MqrPexG5.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20]))),nn=l(()=>n(()=>import("./PandLWithForecastRoutes-BXYFz1ZW.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,14,18,9,10,24,13,17,20]))),an=l(()=>n(()=>import("./CustomerOnboardingRoutes-l7rM0eut.js"),__vite__mapDeps([52,1,2,3,22,4,5,6,7,14,37,38,39,40,41,12,20]))),tn=l(()=>n(()=>import("./VendorsRoutes-ZfxM-ykJ.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20]))),rn=l(()=>n(()=>import("./TransactionDetailRoutes-C1ih2pnm.js"),__vite__mapDeps([53,1,2,3,14,4,5,6,7,11,9,10,12,13,20]))),Ue=l(()=>n(()=>import("./EntityDetailRoutes-B7e2LtGS.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,12,8,9,10,11,13,20]))),on=l(()=>n(()=>import("./DashboardRoutes-BR-AxyQo.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))),He=l(()=>n(()=>import("./BillPayRoutes-DRXDrSZP.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20]))),ln=l(()=>n(()=>import("./SettingsRoutes-B6i5o_xZ.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20]))),Re=l(()=>n(()=>import("./ReimbursementRoutes-Dd9IEYb-.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,9,10,24,25,32,29,30,20]))),cn=l(()=>n(()=>import("./ZeniAccountRoutes-CpvkXgX6.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))),dn=l(()=>n(()=>import("./TreasuryRoutes-BMXt9CZJ.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20]))),mn=l(()=>n(()=>import("./TransactionListRoutes-BOekcd9c.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20]))),un=l(()=>n(()=>import("./ChargeCardRoutes-C9NA04uL.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20]))),_n=l(()=>n(()=>import("./NotificationRoutes-CIdj2V-n.js"),__vite__mapDeps([55,1,2,3,14,4,5,6,7,9,10,20]))),En=l(()=>n(()=>import("./PerformanceRoutes-B1RTm-Zq.js"),__vite__mapDeps([56,1,2,3,14,4,5,6,7,9,10,17,20]))),An=l(()=>n(()=>import("./ExpenseAutomationRoutes-But3rf3J.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20]))),pn=l(()=>n(()=>import("./RewardsRoutes-DN2HacCh.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,14,19,9,10,17,20]))),gn=l(()=>n(()=>import("./TaskRoutes-Dne-2qND.js"),__vite__mapDeps([58,1,2,3,14,4,5,6,7,24,17,59,9,10,20]))),xn=l(()=>n(()=>import("./AiCfoScreen-9dFOdDvS.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,48,20]))),y=l(()=>n(()=>import("./NotFoundScreen-t1ueGvDG.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,20]))),In=l(()=>n(()=>import("./TaskListScreen-BXp_P6Ec.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,10,17,20])));function wn({setTenantEmailDomain:i}){const U=Vs(),V=Ss(),{tenantEmailDomain:o}=Ns(),S=ws().mode,{setLoading:f,clearAllLoading:O,clearLoading:Z}=Gs(),b=R.getSignedInUserTenant(o)?.tenantId,h=R.getSignedInUser(),q=os(h),z=Ms(),[N,be]=v.useState(!1),r=G(a=>ls(a)),{useFeatureGate:P}=zs(),Q=$s(),ye=Js(),{isFeatureEnabled:fe}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Ce}=P(L.isExpenseAutomationEnabledV2),ve=Ce||fe&&q,{isFeatureEnabled:Oe}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Pe}=P(L.isTreasuryEnabled),{isFeatureEnabled:Fe}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:se}=P(L.isDebitCardFeatureEnabled),j=G(a=>a.tenantState.fetchState),A=G(a=>a.tenantState.activeTenantFetchState.fetchState),u=A==="Completed"||j==="Completed"?cs(se,r):void 0,$=A==="Completed"||j==="Completed"?ds(r):void 0,Le=A==="Completed"||j==="Completed"?ms(r):void 0,Be=Fe||se||!!Le||!!$||!!u,{isFeatureEnabled:ke}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:Ve}=P(L.isAiCfoFileUploadEnabled),J=G(a=>us(a));if(o!=null){const a=R.getSignedInUserTenant(o);h!=null&&a!=null&&je(h,r,S)}const w={tenantId:b,userId:h?.userId,sessionId:h?.zeniSessionId},ne=_s(),E=Ws(),Se=r.company==null||E?.loggedInUserRoleMap!=null&&Ee(E.loggedInUserRole),Ne=Es(E?.loggedInUserRoleMap),ae=v.useRef(!0),te=Te("/:tenantEmailDomain/onboarding/*")!==null,K=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=G(a=>w.tenantId!=null?As(a,w.tenantId):void 0);v.useEffect(()=>{f(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(K!=null&&b!=null){const a=K.params.selectedPeriod;if(a!=null){const H=a.split("-");if(H.length===2){const d=ps(Number(H[0])),s=Number(H[1]),m=gs(`01-${d<10?`0${d}`:d}-${s}`,he.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=xs();m.isAfter(M,"month")===!1?U(Is(b,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[K,b]),v.useEffect(()=>{N||(be(!0),f(B.TENANT_FETCHING)),ae.current?ae.current=!1:!Ts(ne,w)&&R.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,H,d,s){if(pe(H?.userId,H?.zeniSessionId,a.tenantId),d(Bs(!0)),d(ge(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const m=R.getSignedInUserTenantWithId(a.tenantId);s&&he.updateAppLocaleID(qs(s)),m?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}a.userId!=null?X.identify(a.userId,{tenant_id:a.tenantId}):X.resetUserIdentity()}(w,h,U,Me))},[w,ne,h,U,R]),v.useEffect(()=>{R.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,H,d,s,m,M,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const W=s!=null&&m?.zeniSessionId!=null,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(W&&ts){k(ge(s));const Y=R.getSignedInUserTenantWithId(s);Y?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(Y?.tenantEmailDomain),pe(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(xe(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(Ie(m.userId,s)))}else W&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(xe(m.userId,s))),W&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(Ie(m.userId,s)));if(W){X.identify(m.userId,{tenant_id:s});const Y=s==null||s!=null&&(H==="Completed"||H==="Error");a==="Completed"||H!=="Not-Started"&&H!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(ks(m.userId,s,m.zeniSessionId))),Y&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Ae(m.userId,m.zeniSessionId)))}}(j,A,r,b,h,f,U))},[b,A]),v.useEffect(()=>{R.isSignedIn()&&j==="Completed"&&J.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),R.saveSignedInUserTenants(hs(J.tenantsBaseInOrder)),h!=null&&je(h,r,S,void 0,J.tenantsBaseInOrder))},[J,j,r,h]),v.useEffect(()=>{A==="In-Progress"&&f(B.TENANT_FETCHING),A!=="Completed"&&A!=="Error"||(A==="Completed"&&b!=null?(O(),_.markActiveTenantFetchCompleted(b)):A==="Error"&&b!=null&&(_.markActiveTenantFetchFailed(b),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[A,j,b,N]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&A==="Completed"&&N&&(ie.current=!0,function(a=Ks,H=3e3){setTimeout(()=>{const d=s=>{if(s>=a.length)return;const m=a[s],M=Qs[m];M!=null?M().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},H)}())},[A,N]);const C=r?.userRole!=null&&js(r?.userRole),{isFeatureEnabled:Ze}=P(L.isReferralFeatureEnabled),we=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Ge=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ee(r.userRole),re=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,oe=Be&&!C,ze=Us(E?.loggedInUserRoleMap),$e=r.externalConnections?.accounting[0]?.isValid,le=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,de=ce&&Hs(E?.loggedInUserRoleMap),me=Oe&&!C,Je=r.company!=null&&Rs(r.company),We=Pe&&Je===!0&&!C,Ye=re&&Ds(E?.loggedInUserRoleMap),qe=oe&&bs(E?.loggedInUserRoleMap),Qe=me&&ys(E?.loggedInUserRoleMap),Ke=fs(E?.loggedInUserRoleMap),Xe=Cs(E?.loggedInUserRoleMap),p=vs(E?.loggedInUserRoleMap),g=Os(E?.loggedInUserRoleMap),x=Ps(E?.loggedInUserRoleMap),I=Fs(E?.loggedInUserRoleMap),T=Ls(E?.loggedInUserRoleMap),ue=re&&I,_e=ce&&T,es=me&&p,ss=We&&g,ns=oe&&x,as=r.excludedResources?.resources?.find(a=>a.resource==="/invites")!=null||Ne===!0||ze===!0||Ke===!0||Xe===!0;return R.isSignedIn()?b==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ae(h.userId,h.zeniSessionId)),null):A!=="In-Progress"&&A!=="Not-Started"||j==="Completed"?(le===!0||q&&!te)&&$e===!1&&u===!1&&$===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||le!==!1||te||q?N&&r?.userRole&&u!=null&&$!=null&&o!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Zs,{children:e.jsxs(t,{element:e.jsx(Ys,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Tn,{isDashboardAccess:F,isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,isTenantCardsOnly:$})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(on,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(Xs,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:as||F?e.jsx(sn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(nn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(an,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||we||Ge?e.jsx(rn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(mn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(Ue,{entityType:"customer"}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:g,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(In,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(gn,{})}),e.jsx(t,{path:"address/*",element:Ye||de||Qe||qe?e.jsx(en,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:es?e.jsx(cn,{}):e.jsx(y,{})}),e.jsx(t,{path:"treasury/*",element:ss?e.jsx(dn,{}):e.jsx(y,{})}),e.jsx(t,{path:"performance",element:ye?e.jsx(En,{}):e.jsx(De,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ve&&C===!1?e.jsx(An,{}):e.jsx(De,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(_n,{})}),e.jsx(t,{path:"vendors/*",element:Se?e.jsx(tn,{}):e.jsx(y,{})}),e.jsx(t,{path:"bill/*",element:ue?e.jsx(He,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:ue?e.jsx(He,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:_e?e.jsx(Re,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:_e?e.jsx(Re,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:ke?e.jsx(ln,{hasAdminLevelAccess:de}):e.jsx(y,{})}),e.jsx(t,{path:"cards/*",element:ns?e.jsx(un,{}):e.jsx(y,{})}),e.jsx(t,{path:"rewards/*",element:Ze?e.jsx(pn,{}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo",element:Q?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/",element:Q?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:Q?e.jsx(xn,{isFileUploadEnabled:Ve}):e.jsx(y,{})}),e.jsx(t,{path:"*",element:e.jsx(y,{})})]})}):null:(i(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),i(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}))}const Tn=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:V,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:f,isTenantBankingOnly:O,isTenantCardsOnly:Z})=>O===!0&&U?e.jsx(c,{to:"checking"}):Z===!0?e.jsx(c,{to:"cards"}):i?e.jsx(c,{to:"dashboard"}):U?e.jsx(c,{to:"checking"}):f?e.jsx(c,{to:"treasury"}):V?e.jsx(c,{to:"cards"}):o?e.jsx(c,{to:"bills"}):S?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),D=({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(Un,{tenantEmailDomain:O}):U?e.jsx(Rn,{tenantEmailDomain:O}):V?e.jsx(jn,{tenantEmailDomain:O}):o?e.jsx(hn,{tenantEmailDomain:O}):e.jsx(y,{}),hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),jn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),Un=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),Hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),Rn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),De=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{D as FallBackRoute,wn as default};
@@ -1,4 +1,4 @@
1
- import{j as a}from"./liveblocks-CfCKAQeM.js";import{a as p}from"./sentry-131ydzJg.js";import{j as _,u as T,h as P,g as h,k as B,l as F,n as W,o as C}from"./core-uYqCzel8.js";import{bn as xe,eQ as j,gI as de,Li as Ee,JH as Ae,jC as ue,lV as we,gK as je,Lk as ke,Lj as Pe,NJ as ve,xG as De,C9 as Ue,Ni as Me,Nr as _e,c2 as Y,cH as Re,cI as Te,Jo as Be,NK as Fe,Jp as Ne,w6 as Ve,NL as Le,Ep as Oe,BR as $e,BI as pe,BF as Je,wa as ge,BL as me,BO as fe,BU as ee,sJ as ne,w9 as Ke,je as q,jh as he,NM as Ge,ki as He,wp as ze,Kd as Ze,Ke as Qe,jc as We,NN as qe,jf as Xe,r7 as Ye,NO as en,NP as nn,rb as tn,gk as an,Jx as se,gr as sn,Jy as on,wm as cn,NQ as rn,NR as ln,C6 as dn,eU as be,eW as Se,NS as un,fy as pn,JI as gn,wl as oe,fD as ie,fC as mn,wk as fn,fB as hn,fA as bn,NT as Sn,eZ as Ie,NU as In,NV as yn,ws as Cn,wj as ce,NW as xn,ff as En,wg as An,bV as wn,c1 as jn,c0 as kn,bW as Pn,b_ as vn,bZ as Dn,bY as Un,b$ as Mn,bX as _n}from"./zeni-epic-state-BmAPZlsC.js";import{y as te,S as U,z as x,ac as ye,bB as Rn,d as J,f as Tn,c as N,x as ae,bC as Bn,bD as Fn,an as Nn,h as Ce,bE as Vn,bF as Ln,bG as On,a6 as $n,U as Jn,bH as Kn,q as Gn,bI as Hn}from"./index-CeZ7L-BQ.js";import{n as M}from"./mui-CTbUXhla.js";import{M as v}from"./MobileAppDrawer-CNxBiA0K.js";import{a as O,g as $,m as zn}from"./accountMappingHelper-D6x0RpVY.js";import{t as Zn,A as Qn}from"./AddressScreen-ByYpZmgQ.js";import R from"./NotFoundScreen-CsEhUGfR.js";import{g as Wn}from"./analyticsHelper-DhD4YoYg.js";import{B as qn}from"./BusinessVerificationPageScreen-C-d6e6xJ.js";import{C as Xn}from"./CompanyPassportScreen-Btm8q2XT.js";import{q as re}from"./QBOConnectionScreen-BRrDd8wr.js";import{B as Yn}from"./BillPayApprovalRoutes-CX2-tB9Z.js";import{R as et}from"./ReimbursementApprovalRoutes-DSgEFO1H.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.js";import"./routePaths-vUmlDccC.js";import"./empty-CKinwWZY.js";import"./pdf-lib-CNgiyR2K.js";import"./index-DeBaxB_L.js";import"./url-BRm_J7V6.js";import"./index-CxWCBC6O.js";import"./decodeURIComponentSafe-DCnYf30M.js";import"./ReimbursementApprovalRuleDetailScreen-CtZbBICM.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="2ec8d538-4cea-4041-aadb-74a1e92fd3fe",e._sentryDebugIdIdentifier="sentry-dbid-2ec8d538-4cea-4041-aadb-74a1e92fd3fe")}catch{}})();const nt=M.div`
1
+ import{j as a}from"./liveblocks-CfCKAQeM.js";import{a as p}from"./sentry-131ydzJg.js";import{j as _,u as T,h as P,g as h,k as B,l as F,n as W,o as C}from"./core-uYqCzel8.js";import{bn as xe,eQ as j,gI as de,Li as Ee,JH as Ae,jC as ue,lV as we,gK as je,Lk as ke,Lj as Pe,NJ as ve,xG as De,C9 as Ue,Ni as Me,Nr as _e,c2 as Y,cH as Re,cI as Te,Jo as Be,NK as Fe,Jp as Ne,w6 as Ve,NL as Le,Ep as Oe,BR as $e,BI as pe,BF as Je,wa as ge,BL as me,BO as fe,BU as ee,sJ as ne,w9 as Ke,je as q,jh as he,NM as Ge,ki as He,wp as ze,Kd as Ze,Ke as Qe,jc as We,NN as qe,jf as Xe,r7 as Ye,NO as en,NP as nn,rb as tn,gk as an,Jx as se,gr as sn,Jy as on,wm as cn,NQ as rn,NR as ln,C6 as dn,eU as be,eW as Se,NS as un,fy as pn,JI as gn,wl as oe,fD as ie,fC as mn,wk as fn,fB as hn,fA as bn,NT as Sn,eZ as Ie,NU as In,NV as yn,ws as Cn,wj as ce,NW as xn,ff as En,wg as An,bV as wn,c1 as jn,c0 as kn,bW as Pn,b_ as vn,bZ as Dn,bY as Un,b$ as Mn,bX as _n}from"./zeni-epic-state-BmAPZlsC.js";import{y as te,S as U,z as x,ac as ye,bB as Rn,d as J,f as Tn,c as N,x as ae,bC as Bn,bD as Fn,an as Nn,h as Ce,bE as Vn,bF as Ln,bG as On,a6 as $n,U as Jn,bH as Kn,q as Gn,bI as Hn}from"./index-DojfCsv7.js";import{n as M}from"./mui-CTbUXhla.js";import{M as v}from"./MobileAppDrawer-B3x5wY10.js";import{a as O,g as $,m as zn}from"./accountMappingHelper-D6x0RpVY.js";import{t as Zn,A as Qn}from"./AddressScreen-Bk_munT3.js";import R from"./NotFoundScreen-t1ueGvDG.js";import{g as Wn}from"./analyticsHelper-BunVJ4K_.js";import{B as qn}from"./BusinessVerificationPageScreen-CnAB8eUQ.js";import{C as Xn}from"./CompanyPassportScreen-BWjh-1tt.js";import{q as re}from"./QBOConnectionScreen-CzbbjqA7.js";import{B as Yn}from"./BillPayApprovalRoutes-COiJeUFT.js";import{R as et}from"./ReimbursementApprovalRoutes-Dclz8XkB.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.js";import"./routePaths-DoAvT9jx.js";import"./empty-CKinwWZY.js";import"./pdf-lib-CNgiyR2K.js";import"./index-DeBaxB_L.js";import"./url-BRm_J7V6.js";import"./index-CxWCBC6O.js";import"./decodeURIComponentSafe-DCnYf30M.js";import"./ReimbursementApprovalRuleDetailScreen-Cf6fN3gm.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="2ec8d538-4cea-4041-aadb-74a1e92fd3fe",e._sentryDebugIdIdentifier="sentry-dbid-2ec8d538-4cea-4041-aadb-74a1e92fd3fe")}catch{}})();const nt=M.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as u}from"./liveblocks-CfCKAQeM.js";import{j as Q,u as Y,h as X,l as G,g as w,N as j,k as W,q as Ye}from"./core-uYqCzel8.js";import{bF as Xe,cl as Ie,N6 as ye,eQ as F,cx as en,xR as Z,xG as nn,Ni as tn,Nl as an,q9 as ee,pZ as ne,ka as te,sf as z,Nn as Ae,fC as $e,fB as Ge,fA as We,No as sn,x_ as on,BR as ke,BI as _e,BF as ve,Bw as K,BL as Pe,BO as we,BU as Ee,sJ as De,fR as cn,cs as rn,eW as un,eU as dn,eV as ln,bs as pn,Np as mn,Ay as le,Ba as yn,Nq as fn,bG as gn,D5 as pe,C9 as Sn,Nr as bn,Ns as hn,D9 as Cn,Dd as In,s8 as An,Hx as kn,DK as Ce,ED as me,Nt as _n,Nu as vn,Nv as Pn,Nw as qe,Nx as wn,K0 as En,Mv as Dn,Kc as Tn,Ny as He,Nz as xe,DY as Ke,ki as Un,q0 as Je,sh as On,bE as Ne,st as je,cv as Bn,NA as Qe,fe as xn,Ds as Fn,Dw as Vn,NB as Nn,DN as Re,NC as jn,ND as Rn,NE as zn,NF as Ln,fK as Mn,z9 as Zn,NG as $n,ze as Gn,zd as Wn}from"./zeni-epic-state-BmAPZlsC.js";import{c as ae,y as ie,S as de,m as Te,aK as J,z as D,A as se,d as E,x as Ue,f as $,bq as qn,aq as oe,br as V,bs as Hn,bt as Kn,ac as Ve,bu as Jn,q as ze,ar as Le,Z as Qn,G as Yn,bv as Xn,bw as et,bx as nt,a3 as tt}from"./index-CeZ7L-BQ.js";import{a as C}from"./sentry-131ydzJg.js";import{n as Fe,D as at,S as it}from"./mui-CTbUXhla.js";import{M as fe}from"./MobileAppDrawer-CNxBiA0K.js";import R from"./NotFoundScreen-CsEhUGfR.js";import{a as Me}from"./analyticsHelper-DhD4YoYg.js";import{c as Ze}from"./routePaths-vUmlDccC.js";import{B as Be}from"./BusinessVerificationPageScreen-C-d6e6xJ.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]="2979ee65-4fb2-4e35-a0d7-79a14185295b",e._sentryDebugIdIdentifier="sentry-dbid-2979ee65-4fb2-4e35-a0d7-79a14185295b")}catch{}})();const st=Fe.div`
1
+ import{j as u}from"./liveblocks-CfCKAQeM.js";import{j as Q,u as Y,h as X,l as G,g as w,N as j,k as W,q as Ye}from"./core-uYqCzel8.js";import{bF as Xe,cl as Ie,N6 as ye,eQ as F,cx as en,xR as Z,xG as nn,Ni as tn,Nl as an,q9 as ee,pZ as ne,ka as te,sf as z,Nn as Ae,fC as $e,fB as Ge,fA as We,No as sn,x_ as on,BR as ke,BI as _e,BF as ve,Bw as K,BL as Pe,BO as we,BU as Ee,sJ as De,fR as cn,cs as rn,eW as un,eU as dn,eV as ln,bs as pn,Np as mn,Ay as le,Ba as yn,Nq as fn,bG as gn,D5 as pe,C9 as Sn,Nr as bn,Ns as hn,D9 as Cn,Dd as In,s8 as An,Hx as kn,DK as Ce,ED as me,Nt as _n,Nu as vn,Nv as Pn,Nw as qe,Nx as wn,K0 as En,Mv as Dn,Kc as Tn,Ny as He,Nz as xe,DY as Ke,ki as Un,q0 as Je,sh as On,bE as Ne,st as je,cv as Bn,NA as Qe,fe as xn,Ds as Fn,Dw as Vn,NB as Nn,DN as Re,NC as jn,ND as Rn,NE as zn,NF as Ln,fK as Mn,z9 as Zn,NG as $n,ze as Gn,zd as Wn}from"./zeni-epic-state-BmAPZlsC.js";import{c as ae,y as ie,S as de,m as Te,aK as J,z as D,A as se,d as E,x as Ue,f as $,bq as qn,aq as oe,br as V,bs as Hn,bt as Kn,ac as Ve,bu as Jn,q as ze,ar as Le,Z as Qn,G as Yn,bv as Xn,bw as et,bx as nt,a3 as tt}from"./index-DojfCsv7.js";import{a as C}from"./sentry-131ydzJg.js";import{n as Fe,D as at,S as it}from"./mui-CTbUXhla.js";import{M as fe}from"./MobileAppDrawer-B3x5wY10.js";import R from"./NotFoundScreen-t1ueGvDG.js";import{a as Me}from"./analyticsHelper-BunVJ4K_.js";import{c as Ze}from"./routePaths-DoAvT9jx.js";import{B as Be}from"./BusinessVerificationPageScreen-CnAB8eUQ.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]="2979ee65-4fb2-4e35-a0d7-79a14185295b",e._sentryDebugIdIdentifier="sentry-dbid-2979ee65-4fb2-4e35-a0d7-79a14185295b")}catch{}})();const st=Fe.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{j as f}from"./liveblocks-CfCKAQeM.js";import{a as u,b as T,q as A}from"./sentry-131ydzJg.js";import{h as D,j as z,g as d,u as J,N as j,k as M}from"./core-uYqCzel8.js";import{u as P,z as s,m as F,d as E,D as O,e as _,f as B,F as N,g as V,v as $,h as v}from"./index-CeZ7L-BQ.js";import{eQ as q,Jb as Q,Jc as R,eR as W,fk as H,Jh as G,fJ as K,cU as X,Ji as b,Jj as Y,Jk as Z,bT as y}from"./zeni-epic-state-BmAPZlsC.js";import"./mui-CTbUXhla.js";import{u as ee}from"./useDeviceId-CBU-vDdN.js";import{f as te}from"./analyticsHelper-DhD4YoYg.js";import{t as ne}from"./getLocaleForTenant-CFQN8jbL.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.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]="5c586f82-c3e8-48e7-83b5-68432973b1c8",t._sentryDebugIdIdentifier="sentry-dbid-5c586f82-c3e8-48e7-83b5-68432973b1c8")}catch{}})();const ie=M(function(t,i){const c=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:c,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}},function(t,i){const{location:c,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 l=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Z({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(l),sourceUri:y(c.state!=null?c.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=c.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(Y(n,a)))},clearSignInError:()=>{t(b())}}})($),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=D(),c=z(),{clearAllLoading:g}=P(),n=s.getSignedInUser();u.useLayoutEffect(()=>{g()},[g]);const a=ee(),l=d(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:k,accountLocked:U,accountUnlockTime:h}=d(e=>e.tenantState),p=d(e=>e.tenantState.fetchState),L=d(e=>e.tenantState.activeTenantFetchState.fetchState),S=d(e=>e.tenantState.signInState),o=d(e=>e.tenantState.loggedInUser),r=d(e=>q(e)),I=d(e=>Q(e)),m=J(),w=F().mode,C=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{k.fetchState==="Completed"&&l!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(l))},[k.fetchState,l]),u.useEffect(()=>{t(void 0)},[]),u.useEffect(()=>{S!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(R(I.tenantsInOrder),o.zeniSessionId),W(o.userId,o.zeniSessionId,r.tenantId),i(H(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(G("Completed")),O.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),K().then(()=>{const e=V();e!=null&&_(e)}),setTimeout(()=>{E.trackLogin(B.Event.loginSuccess,o.authProvider??"google",X(r.productSettings))},2e3))},[S,p,L,o,r,I,w,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(j,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!C,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:c,deviceId:a??void 0,showEmailLogin:!0}),U===!0&&h!=null?f.jsx(N,{onClose:()=>i(b()),unlockDate:h}):null]})}export{ve as default};
1
+ import{j as f}from"./liveblocks-CfCKAQeM.js";import{a as u,b as T,q as A}from"./sentry-131ydzJg.js";import{h as D,j as z,g as d,u as J,N as j,k as M}from"./core-uYqCzel8.js";import{u as P,z as s,m as F,d as E,D as O,e as _,f as B,F as N,g as V,v as $,h as v}from"./index-DojfCsv7.js";import{eQ as q,Jb as Q,Jc as R,eR as W,fk as H,Jh as G,fJ as K,cU as X,Ji as b,Jj as Y,Jk as Z,bT as y}from"./zeni-epic-state-BmAPZlsC.js";import"./mui-CTbUXhla.js";import{u as ee}from"./useDeviceId-CBU-vDdN.js";import{f as te}from"./analyticsHelper-BunVJ4K_.js";import{t as ne}from"./getLocaleForTenant-BVZe9vGW.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.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]="5c586f82-c3e8-48e7-83b5-68432973b1c8",t._sentryDebugIdIdentifier="sentry-dbid-5c586f82-c3e8-48e7-83b5-68432973b1c8")}catch{}})();const ie=M(function(t,i){const c=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:c,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}},function(t,i){const{location:c,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 l=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Z({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(l),sourceUri:y(c.state!=null?c.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=c.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(Y(n,a)))},clearSignInError:()=>{t(b())}}})($),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=D(),c=z(),{clearAllLoading:g}=P(),n=s.getSignedInUser();u.useLayoutEffect(()=>{g()},[g]);const a=ee(),l=d(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:k,accountLocked:U,accountUnlockTime:h}=d(e=>e.tenantState),p=d(e=>e.tenantState.fetchState),L=d(e=>e.tenantState.activeTenantFetchState.fetchState),S=d(e=>e.tenantState.signInState),o=d(e=>e.tenantState.loggedInUser),r=d(e=>q(e)),I=d(e=>Q(e)),m=J(),w=F().mode,C=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{k.fetchState==="Completed"&&l!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(l))},[k.fetchState,l]),u.useEffect(()=>{t(void 0)},[]),u.useEffect(()=>{S!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(R(I.tenantsInOrder),o.zeniSessionId),W(o.userId,o.zeniSessionId,r.tenantId),i(H(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(G("Completed")),O.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),K().then(()=>{const e=V();e!=null&&_(e)}),setTimeout(()=>{E.trackLogin(B.Event.loginSuccess,o.authProvider??"google",X(r.productSettings))},2e3))},[S,p,L,o,r,I,w,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(j,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!C,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:c,deviceId:a??void 0,showEmailLogin:!0}),U===!0&&h!=null?f.jsx(N,{onClose:()=>i(b()),unlockDate:h}):null]})}export{ve as default};
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-CfCKAQeM.js";import{a as n}from"./sentry-131ydzJg.js";import{h as c,u as m,j as p,N as g}from"./core-uYqCzel8.js";import{z as d,x as y,t as h,d as f,f as b}from"./index-CeZ7L-BQ.js";import{fO as x,fP as I,Jz as j}from"./zeni-epic-state-BmAPZlsC.js";import{n as w}from"./mui-CTbUXhla.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.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]="0d4e10f8-6e4d-4060-b559-a82d79d922a8",e._sentryDebugIdIdentifier="sentry-dbid-0d4e10f8-6e4d-4060-b559-a82d79d922a8")}catch{}})();function $(){const e=c(),t=m(),i=p(),a=n.useRef(!1),l=d.isSignedIn(),r=t.state?.message==="logout",o=r||l;return n.useEffect(()=>{o&&!a.current&&(a.current=!0,setTimeout(()=>{try{d.clearAll(),e(x()),e(I(!1)),j(),h.reset(),f.trackLogout(b.Event.logoutSuccess),f.resetUserIdentity()}catch(u){console.error("Error during sign out:",u)}finally{r||i("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(v,{children:s.jsx(y,{fetchState:"In-Progress"})}):s.jsx(g,{to:"../",replace:!0})}const v=w.div`
1
+ import{j as s}from"./liveblocks-CfCKAQeM.js";import{a as n}from"./sentry-131ydzJg.js";import{h as c,u as m,j as p,N as g}from"./core-uYqCzel8.js";import{z as d,x as y,t as h,d as f,f as b}from"./index-DojfCsv7.js";import{fO as x,fP as I,Jz as j}from"./zeni-epic-state-BmAPZlsC.js";import{n as w}from"./mui-CTbUXhla.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.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]="0d4e10f8-6e4d-4060-b559-a82d79d922a8",e._sentryDebugIdIdentifier="sentry-dbid-0d4e10f8-6e4d-4060-b559-a82d79d922a8")}catch{}})();function $(){const e=c(),t=m(),i=p(),a=n.useRef(!1),l=d.isSignedIn(),r=t.state?.message==="logout",o=r||l;return n.useEffect(()=>{o&&!a.current&&(a.current=!0,setTimeout(()=>{try{d.clearAll(),e(x()),e(I(!1)),j(),h.reset(),f.trackLogout(b.Event.logoutSuccess),f.resetUserIdentity()}catch(u){console.error("Error during sign out:",u)}finally{r||i("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(v,{children:s.jsx(y,{fetchState:"In-Progress"})}):s.jsx(g,{to:"../",replace:!0})}const v=w.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as p}from"./liveblocks-CfCKAQeM.js";import{a as g}from"./sentry-131ydzJg.js";import{j as K,h as _,u as z,g as b,l as q,k as O}from"./core-uYqCzel8.js";import{z as Q,y as M,S as d,A as V,d as W,f as Z,cI as H,q as f,p as J}from"./index-CeZ7L-BQ.js";import{eQ as X,Qo as R,G9 as y,Qp as x,Qk as Y,FB as E,Qq as aa,FF as I,F8 as ea,Ga as B,Qr as w,gO as ta,G0 as sa,G5 as oa,FU as na,FS as F,G6 as ia,FP as la,Qs as ra,Qt as ca,Qu as ka,Qv as ua,Qw as m,ec as pa,Qx as da,Qy as ma}from"./zeni-epic-state-BmAPZlsC.js";import{n as Ta}from"./mui-CTbUXhla.js";import{u as ga}from"./useAskAiCfoHostNavButtonProps-D4_eEE1f.js";import{c as fa}from"./useFetchSuggestedQuestionsWhenReady-b8cA6qxS.js";import{M as Ga}from"./MobileAppDrawer-CNxBiA0K.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.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]="b458cc17-57ec-4a82-a2ee-1b6c40dcf302",e._sentryDebugIdIdentifier="sentry-dbid-b458cc17-57ec-4a82-a2ee-1b6c40dcf302")}catch{}})();const ha=Ta.div`
1
+ import{j as p}from"./liveblocks-CfCKAQeM.js";import{a as g}from"./sentry-131ydzJg.js";import{j as K,h as _,u as z,g as b,l as q,k as O}from"./core-uYqCzel8.js";import{z as Q,y as M,S as d,A as V,d as W,f as Z,cI as H,q as f,p as J}from"./index-DojfCsv7.js";import{eQ as X,Qo as R,G9 as y,Qp as x,Qk as Y,FB as E,Qq as aa,FF as I,F8 as ea,Ga as B,Qr as w,gO as ta,G0 as sa,G5 as oa,FU as na,FS as F,G6 as ia,FP as la,Qs as ra,Qt as ca,Qu as ka,Qv as ua,Qw as m,ec as pa,Qx as da,Qy as ma}from"./zeni-epic-state-BmAPZlsC.js";import{n as Ta}from"./mui-CTbUXhla.js";import{u as ga}from"./useAskAiCfoHostNavButtonProps-It-lF7wN.js";import{c as fa}from"./useFetchSuggestedQuestionsWhenReady-D9n2AKQx.js";import{M as Ga}from"./MobileAppDrawer-B3x5wY10.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.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]="b458cc17-57ec-4a82-a2ee-1b6c40dcf302",e._sentryDebugIdIdentifier="sentry-dbid-b458cc17-57ec-4a82-a2ee-1b6c40dcf302")}catch{}})();const ha=Ta.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as n}from"./liveblocks-CfCKAQeM.js";import se from"./NotFoundScreen-CsEhUGfR.js";import{a as c}from"./sentry-131ydzJg.js";import{j as Z,h as _,g,u as ne,l as oe,N as ie,k as re,n as ce,o as f}from"./core-uYqCzel8.js";import{Gd as M,Gg as le,Gj as de,eQ as O,Qk as H,Fx as W,Ff as pe,FZ as ue,FS as ke,Ql as X,Qm as N,Fb as me,F8 as fe,q9 as ge,pZ as he,ka as Se,Fn as Ie,Qn as Te,Fs as be,Fp as Ge,Fi as Ee,FC as Ce,FB as Fe}from"./zeni-epic-state-BmAPZlsC.js";import{z as C,cG as De,s as xe,y as ye,S as b,p as Y,q as w,A as je,d as z,f as we,cH as ve,h as A,aq as Re}from"./index-CeZ7L-BQ.js";import{n as Be}from"./mui-CTbUXhla.js";import{u as Pe}from"./useInitialThreadRequest-cRvS9PIT.js";import{M as Ue}from"./MobileAppDrawer-CNxBiA0K.js";import Le from"./TaskListScreen-DdoFZv0I.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.js";import"./useAskAiCfoHostNavButtonProps-D4_eEE1f.js";import"./useFetchSuggestedQuestionsWhenReady-b8cA6qxS.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]="16d0f71a-5cb1-4ef9-9150-5e701deda351",e._sentryDebugIdIdentifier="sentry-dbid-16d0f71a-5cb1-4ef9-9150-5e701deda351")}catch{}})();function $e(){const e=Z(),t=_(),s=C.getSignedInUser(),{cannedResponses:u,fetchState:r,saveFetchState:d}=g(o=>o.cannedResponsesState),l=c.useCallback(()=>{t(M())},[t]),k=c.useCallback((o,h,S)=>{t(le({name:o,content:h,cannedResponseId:S}))},[t]),a=c.useCallback(o=>{t(de({cannedResponseId:o}))},[t]);if(s==null)throw Error("Can't access quick responses page without signing in...");return n.jsx(De,{cannedResponses:u,isLoading:r==="In-Progress"||r==="Not-Started",isSaving:d==="In-Progress",onBackClick:()=>e(-1),onDelete:a,onFetch:l,onSave:k})}let V,Q=[];const qe=re(function(e,t){const{location:s,taskGroupId:u}=t,r=X(e,t.taskId),d=O(e),l=r.taskGroupId??u,k=l!=null?N(e.taskGroupState,l):void 0,a=C.getSignedInUser(),o=d.tenantId,h={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:o??""},S=H(e),{tenantEmailDomain:F}=d,G=r.recurringSourceTaskId,D=G!=null?`${A.appUrl}/${F}/tasks/${encodeURIComponent(G)}`:void 0;var I;return{taskDetailSelectorView:r,authParams:h,isZeniUser:C.isZeniUser(),userGroupList:((I=e.userGroupsState.userGroupByUserGroupId)!==V&&(V=I,Q=Object.values(I)),Q),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Re.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${A.appUrl}${t.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:D,tagListView:S,taskGroupName:l!=null&&k!=null&&k.isDefault===!1?k.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map(p=>N(e.taskGroupState,p)).filter(p=>p!=null&&!p.isDeleted).map(p=>({id:p.id,name:p.name,isDefault:p.isDefault}))}},function(e,t){const{taskId:s,navigate:u,currentTenant:r,location:d,taskGroupId:l}=t,{tenantEmailDomain:k}=r;return{onSaveChangesToLocalStore:a=>{e(Fe({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(Ce(s,a??l))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ee(t.taskId))},onSnoozeTask:(a,o)=>{e(Ge(a,o))},onUnsnoozeTask:a=>{e(be(a))},onDismissClick:()=>{if(d.state?.message==="triggerBackClick"){const a=Y(d.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";u(o,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=v(k),o=w(d.state?.pathnameStackToGoBack,d.pathname);u(a,{state:{pathnameStackToGoBack:o}})}e(Te({taskId:s}))},onDeleteTaskClick:()=>{e(Ie(s))},updateFilesEntity:a=>{e(Se({files:a}))},onDeleteFile:a=>{e(he(a))},onEditFileName:(a,o)=>{e(ge(a,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(W(!1,s))},onCreateTagClick:a=>{e(fe(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(M())},onManageTemplatesClick:()=>{u(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}})(ve);function j(){const e=Z(),t=_(),s=ne(),u=xe(),{taskId:r,taskGroupId:d}=oe(),l=g(i=>O(i)),k=Pe(l?.companyId),{useFeatureGate:a}=ye(),{isFeatureEnabled:o}=a(b.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(b.isTaskVisibilityEnabled),{isFeatureEnabled:S}=a(b.isTaskCannedResponsesEnabled),{isFeatureEnabled:F}=a(b.isTaskRecurringParentEnabled),{isFeatureEnabled:G}=a(b.isTaskGroupAssigneesEnabled),[D,I]=c.useState(!1),[p,J]=c.useState(!1),[R,K]=c.useState(!1),[B,ee]=c.useState(!1),[P,x]=c.useState(!1),T=c.useRef(!1),E=g(i=>i.taskListState.updateTasksFetchState.fetchState),U=g(i=>H(i)),L=g(i=>i.taskGroupViewState.fetchState);c.useEffect(()=>{p||(J(!0),t(W(!1,r)))},[p,t]),c.useEffect(()=>{R||U.fetchState==="Completed"||(K(!0),t(pe()))},[R,t,U.fetchState]),c.useEffect(()=>{B||L==="Completed"||(ee(!0),t(ue()))},[B,t,L]);const ae=c.useCallback(()=>{r!=null&&(T.current=!1,t(ke([r],null,{isArchived:!1})),x(!0))},[t,r]);c.useEffect(()=>{if(P)if(E!=="In-Progress"){if(T.current){if(E==="Error")return x(!1),void(T.current=!1);if(E==="Completed"){x(!1),T.current=!1;const{tenantEmailDomain:i}=l;if(s.state?.message==="triggerBackClick"){const m=Y(s.state?.pathnameStackToGoBack);e(m.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:m.newStack}})}else{const m=v(i);e(m,{state:{pathnameStackToGoBack:w(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else T.current=!0},[P,E,l,s,e]);const $=g(i=>X(i,r)),y=$.fetchState,q=C.getSignedInUser();if(q==null)throw Error("Can't access task detail page without signing in...");if(y==="Error"&&$.error?.code===400){const{tenantEmailDomain:i}=l,m=v(i),te=w(s.state?.pathnameStackToGoBack,s.pathname);return n.jsx(ie,{to:m,state:{pathnameStackToGoBack:te}})}return n.jsxs(n.Fragment,{children:[y==="Completed"?n.jsx(je,{analytics:z,onLoad:i=>(m=>m.trackPageLoaded(we.Event.taskDetailPage))(i)}):null,n.jsxs(Ne,{children:[n.jsx(Ue,{isAppContentDrawerOpen:D,handleDrawerToggle:i=>{I(i)}}),n.jsx(qe,{analytics:z,currentTenant:l,handleZeniLogoClick:()=>{u.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:q,navigate:e,taskGroupId:d,taskId:r,taskDetailFetchState:y,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:S,isTaskRecurringParentEnabled:F,isTaskGroupAssigneesEnabled:G})]})]})}const Ne=Be.div`
1
+ import{j as n}from"./liveblocks-CfCKAQeM.js";import se from"./NotFoundScreen-t1ueGvDG.js";import{a as c}from"./sentry-131ydzJg.js";import{j as Z,h as _,g,u as ne,l as oe,N as ie,k as re,n as ce,o as f}from"./core-uYqCzel8.js";import{Gd as M,Gg as le,Gj as de,eQ as O,Qk as H,Fx as W,Ff as pe,FZ as ue,FS as ke,Ql as X,Qm as N,Fb as me,F8 as fe,q9 as ge,pZ as he,ka as Se,Fn as Ie,Qn as Te,Fs as be,Fp as Ge,Fi as Ee,FC as Ce,FB as Fe}from"./zeni-epic-state-BmAPZlsC.js";import{z as C,cG as De,s as xe,y as ye,S as b,p as Y,q as w,A as je,d as z,f as we,cH as ve,h as A,aq as Re}from"./index-DojfCsv7.js";import{n as Be}from"./mui-CTbUXhla.js";import{u as Pe}from"./useInitialThreadRequest-Dbj0dyeX.js";import{M as Ue}from"./MobileAppDrawer-B3x5wY10.js";import Le from"./TaskListScreen-BXp_P6Ec.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.js";import"./useAskAiCfoHostNavButtonProps-It-lF7wN.js";import"./useFetchSuggestedQuestionsWhenReady-D9n2AKQx.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]="16d0f71a-5cb1-4ef9-9150-5e701deda351",e._sentryDebugIdIdentifier="sentry-dbid-16d0f71a-5cb1-4ef9-9150-5e701deda351")}catch{}})();function $e(){const e=Z(),t=_(),s=C.getSignedInUser(),{cannedResponses:u,fetchState:r,saveFetchState:d}=g(o=>o.cannedResponsesState),l=c.useCallback(()=>{t(M())},[t]),k=c.useCallback((o,h,S)=>{t(le({name:o,content:h,cannedResponseId:S}))},[t]),a=c.useCallback(o=>{t(de({cannedResponseId:o}))},[t]);if(s==null)throw Error("Can't access quick responses page without signing in...");return n.jsx(De,{cannedResponses:u,isLoading:r==="In-Progress"||r==="Not-Started",isSaving:d==="In-Progress",onBackClick:()=>e(-1),onDelete:a,onFetch:l,onSave:k})}let V,Q=[];const qe=re(function(e,t){const{location:s,taskGroupId:u}=t,r=X(e,t.taskId),d=O(e),l=r.taskGroupId??u,k=l!=null?N(e.taskGroupState,l):void 0,a=C.getSignedInUser(),o=d.tenantId,h={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:o??""},S=H(e),{tenantEmailDomain:F}=d,G=r.recurringSourceTaskId,D=G!=null?`${A.appUrl}/${F}/tasks/${encodeURIComponent(G)}`:void 0;var I;return{taskDetailSelectorView:r,authParams:h,isZeniUser:C.isZeniUser(),userGroupList:((I=e.userGroupsState.userGroupByUserGroupId)!==V&&(V=I,Q=Object.values(I)),Q),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Re.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${A.appUrl}${t.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:D,tagListView:S,taskGroupName:l!=null&&k!=null&&k.isDefault===!1?k.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map(p=>N(e.taskGroupState,p)).filter(p=>p!=null&&!p.isDeleted).map(p=>({id:p.id,name:p.name,isDefault:p.isDefault}))}},function(e,t){const{taskId:s,navigate:u,currentTenant:r,location:d,taskGroupId:l}=t,{tenantEmailDomain:k}=r;return{onSaveChangesToLocalStore:a=>{e(Fe({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(Ce(s,a??l))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ee(t.taskId))},onSnoozeTask:(a,o)=>{e(Ge(a,o))},onUnsnoozeTask:a=>{e(be(a))},onDismissClick:()=>{if(d.state?.message==="triggerBackClick"){const a=Y(d.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";u(o,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=v(k),o=w(d.state?.pathnameStackToGoBack,d.pathname);u(a,{state:{pathnameStackToGoBack:o}})}e(Te({taskId:s}))},onDeleteTaskClick:()=>{e(Ie(s))},updateFilesEntity:a=>{e(Se({files:a}))},onDeleteFile:a=>{e(he(a))},onEditFileName:(a,o)=>{e(ge(a,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(W(!1,s))},onCreateTagClick:a=>{e(fe(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(M())},onManageTemplatesClick:()=>{u(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}})(ve);function j(){const e=Z(),t=_(),s=ne(),u=xe(),{taskId:r,taskGroupId:d}=oe(),l=g(i=>O(i)),k=Pe(l?.companyId),{useFeatureGate:a}=ye(),{isFeatureEnabled:o}=a(b.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(b.isTaskVisibilityEnabled),{isFeatureEnabled:S}=a(b.isTaskCannedResponsesEnabled),{isFeatureEnabled:F}=a(b.isTaskRecurringParentEnabled),{isFeatureEnabled:G}=a(b.isTaskGroupAssigneesEnabled),[D,I]=c.useState(!1),[p,J]=c.useState(!1),[R,K]=c.useState(!1),[B,ee]=c.useState(!1),[P,x]=c.useState(!1),T=c.useRef(!1),E=g(i=>i.taskListState.updateTasksFetchState.fetchState),U=g(i=>H(i)),L=g(i=>i.taskGroupViewState.fetchState);c.useEffect(()=>{p||(J(!0),t(W(!1,r)))},[p,t]),c.useEffect(()=>{R||U.fetchState==="Completed"||(K(!0),t(pe()))},[R,t,U.fetchState]),c.useEffect(()=>{B||L==="Completed"||(ee(!0),t(ue()))},[B,t,L]);const ae=c.useCallback(()=>{r!=null&&(T.current=!1,t(ke([r],null,{isArchived:!1})),x(!0))},[t,r]);c.useEffect(()=>{if(P)if(E!=="In-Progress"){if(T.current){if(E==="Error")return x(!1),void(T.current=!1);if(E==="Completed"){x(!1),T.current=!1;const{tenantEmailDomain:i}=l;if(s.state?.message==="triggerBackClick"){const m=Y(s.state?.pathnameStackToGoBack);e(m.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:m.newStack}})}else{const m=v(i);e(m,{state:{pathnameStackToGoBack:w(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else T.current=!0},[P,E,l,s,e]);const $=g(i=>X(i,r)),y=$.fetchState,q=C.getSignedInUser();if(q==null)throw Error("Can't access task detail page without signing in...");if(y==="Error"&&$.error?.code===400){const{tenantEmailDomain:i}=l,m=v(i),te=w(s.state?.pathnameStackToGoBack,s.pathname);return n.jsx(ie,{to:m,state:{pathnameStackToGoBack:te}})}return n.jsxs(n.Fragment,{children:[y==="Completed"?n.jsx(je,{analytics:z,onLoad:i=>(m=>m.trackPageLoaded(we.Event.taskDetailPage))(i)}):null,n.jsxs(Ne,{children:[n.jsx(Ue,{isAppContentDrawerOpen:D,handleDrawerToggle:i=>{I(i)}}),n.jsx(qe,{analytics:z,currentTenant:l,handleZeniLogoClick:()=>{u.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:q,navigate:e,taskGroupId:d,taskId:r,taskDetailFetchState:y,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:S,isTaskRecurringParentEnabled:F,isTaskGroupAssigneesEnabled:G})]})]})}const Ne=Be.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{j as t}from"./liveblocks-CfCKAQeM.js";import i from"./NotFoundScreen-CsEhUGfR.js";import{T as r}from"./TransactionDetailScreen--PMkud8g.js";import"./sentry-131ydzJg.js";import{n as a,o}from"./core-uYqCzel8.js";import"./zeni-epic-state-BmAPZlsC.js";import"./recharts-BUFoogHS.js";import"./index-CeZ7L-BQ.js";import"./mui-CTbUXhla.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.js";import"./useAskAiCfoHostNavButtonProps-D4_eEE1f.js";import"./useFetchSuggestedQuestionsWhenReady-b8cA6qxS.js";import"./decodeURIComponentSafe-DCnYf30M.js";import"./routePaths-vUmlDccC.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="eb8d9915-3f2e-47a0-a713-5db167080b95",e._sentryDebugIdIdentifier="sentry-dbid-eb8d9915-3f2e-47a0-a713-5db167080b95")}catch{}})();function q(){return t.jsxs(a,{children:[t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(o,{path:"/*",element:t.jsx(r,{})})]})}export{q as default};
1
+ import{j as t}from"./liveblocks-CfCKAQeM.js";import i from"./NotFoundScreen-t1ueGvDG.js";import{T as r}from"./TransactionDetailScreen-DRZw6o-C.js";import"./sentry-131ydzJg.js";import{n as a,o}from"./core-uYqCzel8.js";import"./zeni-epic-state-BmAPZlsC.js";import"./recharts-BUFoogHS.js";import"./index-DojfCsv7.js";import"./mui-CTbUXhla.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.js";import"./useAskAiCfoHostNavButtonProps-It-lF7wN.js";import"./useFetchSuggestedQuestionsWhenReady-D9n2AKQx.js";import"./decodeURIComponentSafe-DCnYf30M.js";import"./routePaths-DoAvT9jx.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="eb8d9915-3f2e-47a0-a713-5db167080b95",e._sentryDebugIdIdentifier="sentry-dbid-eb8d9915-3f2e-47a0-a713-5db167080b95")}catch{}})();function q(){return t.jsxs(a,{children:[t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(o,{path:"/*",element:t.jsx(r,{})})]})}export{q as default};
@@ -1,4 +1,4 @@
1
- import{j as I}from"./liveblocks-CfCKAQeM.js";import{a as d}from"./sentry-131ydzJg.js";import{h as j,g as S,u as re,j as le,l as de,N as Oe,k as Re}from"./core-uYqCzel8.js";import{bn as je,eQ as K,cQ as ue,bv as me,pQ as Q,Kq as w,Lr as pe,Ls as Y,KQ as he,jN as fe,Lt as ge,KV as Z,KW as J,kC as Se,Hp as X,Kk as x,jH as ye,jF as Te,jR as Me,Lu as $e,Lv as qe,tM as R,jM as ve,GM as Ee,cV as He,cW as We,Lw as Ke,Kj as Qe,Lx as Ye,tQ as Ze,Ly as Je,Lz as Xe,LA as ea,LB as aa,LC as ta,jQ as na,LD as oa,LE as sa,Kl as ia,LF as ca,LG as ra,LH as la,GG as da,Gu as ua,GY as ma,jS as pa,Hq as ie,GD as ha}from"./zeni-epic-state-BmAPZlsC.js";import{z as De,y as ee,S as _,aK as Ce,m as fa,Z as ga,aL as Sa,G as ya,p as H,c as Ta,aM as va,q as W,d as be,aN as Ea,aq as Da,Y as q}from"./index-CeZ7L-BQ.js";import{n as Ca,S as ba,D as Ia}from"./mui-CTbUXhla.js";import{u as ka}from"./useAskAiCfoHostNavButtonProps-D4_eEE1f.js";import{c as La}from"./useFetchSuggestedQuestionsWhenReady-b8cA6qxS.js";import{d as Ie}from"./decodeURIComponentSafe-DCnYf30M.js";import{h as ke,g as Aa,d as Ua,b as xa}from"./routePaths-vUmlDccC.js";import{t as _a}from"./utils-BkkIzijx.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]="238171c0-37da-4c92-9241-a3f155b0f25e",a._sentryDebugIdIdentifier="sentry-dbid-238171c0-37da-4c92-9241-a3f155b0f25e")}catch{}})();const ae=()=>{const a=De.getSignedInUser(),{useFeatureGate:e}=ee(),{isFeatureEnabled:s}=e(_.isChainOfThoughtEnabled);return d.useMemo(()=>je(a)&&s,[a,s])};function Le(a){if(a!=null){if("customer"in a&&a.customer!=null){const{customer:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in a&&a.vendor!=null){const{vendor:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function Ya(a,e){const s=j(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=S(u=>K(u)),i=o.userRole.includes("charge_card_user")||o.userRole.includes("charge_card_admin"),l=o.userRole!=null&&ue(o.userRole),g=o.userRole!=null&&me(o.userRole),{isFeatureEnabled:y}=t(_.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:b}=t(_.isExpenseAutomationEnabled),{configValue:h}=n(Ce.enableUncategorizedExpenseCategory),f=h?.uncategorized_expense_category_enabled===!0,k=ae(),T=d.useMemo(()=>({id:a,type:Q(e)}),[a,e]),m=S(u=>w(u,T)),C=S(u=>{const N=w(u,T)?.transactionDetailLocalData.vendorUpdates?.id;return N==null?"Not-Started":u.transactionVendorViewState.editVendorStateById[N]?.saveStatus.fetchState??"Not-Started"}),p=d.useMemo(()=>m?.fetchState==="Completed"?Le(m?.transaction):void 0,[m?.fetchState,m?.transaction]),E=S(u=>{if(p!=null)return pe(u.customerIncomeState,u.vendorExpenseState,u.trendState,p,"month")}),L=S(u=>Y(u)),V=S(u=>{if(p!=null)return he(u.trendWithTransactionsState,p,"TransactionDetail")}),M=o.company?.companyInfo.firstMonthOfFY??1,$=S(u=>fe(u.accountState,u.accountListState,"accountList")),[P,B]=d.useState(!1),[F,v]=d.useState(!1),[c,z]=d.useState(!1);d.useEffect(()=>{B(!1),v(!1),z(!1)},[a,e]);const D=d.useCallback(()=>{B(!1),v(!1)},[]),[A,U]=d.useState(!1),G=V?.selectedPeriod?.timePeriod;return d.useEffect(()=>{c||m==null||m.transaction==null||(s(ge({id:m.transaction.id,type:m.transaction.type})),z(!0)),p!=null&&(!i||l&&g===!1)&&(P?F||E==null||(v(!0),s(X(p,"TransactionDetail",{timeframe:"month",timePeriod:G??E}))):(s(Z()),s(J()),B(!0),s(Se(p))))},[s,c,m?.fetchState,m?.transaction,p,i,l,g,P,F,E,G]),d.useEffect(()=>{L.newVendorState?.vendorDetailLocalData?.vendorName!=null?U(!0):U(!1)},[L.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{s(x("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:i,isUserHasDashboardAccess:l,isUserHasInvestorOrBankerAccess:g,isVendorBulkUpdateOnTransactionEnabled:y,isExpenseAutomationEnabled:b,isUncategorizedExpenseCategoryEnabled:f,isChainOfThoughtEnabled:k,selectedTransaction:T,transactionDetail:m,vendorSaveStatus:C,tranEntity:p,defaultTrendTransactionTimePeriod:E,vendorViewDetails:L,uiState:V,firstMonthOfFY:M,uncategorizedAccounts:$,resetTrendIsFetchedStates:D,isCreateVendorDrawerOpen:A,setIsCreateVendorDrawerOpen:U}}const Va={overlayWidth:new ya(100,100,58)},Ba=({isOpen:a,onSaveVendor:e,onSaveSuccess:s,onCancel:t,vendorViewDetails:n})=>{const o=fa(),i=ga(),l=j(),g=S(h=>Y(h)),y=()=>{t()},b={vendorDetailView:n??g,onSaveSuccess:()=>{l(Te()),l(Me("Not-Started")),s()},onSaveVendor:e,onCancelClick:y,saveVendorDetailLocalData:h=>{l(ye({vendorId:void 0,localData:h}))}};return I.jsx(Ia,{anchor:"right",open:a,PaperProps:{style:{width:Va.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:y,children:I.jsx(wa,{onClick:h=>h.stopPropagation(),children:I.jsx(Sa,{...b})})})},wa=Ca(ba)`
1
+ import{j as I}from"./liveblocks-CfCKAQeM.js";import{a as d}from"./sentry-131ydzJg.js";import{h as j,g as S,u as re,j as le,l as de,N as Oe,k as Re}from"./core-uYqCzel8.js";import{bn as je,eQ as K,cQ as ue,bv as me,pQ as Q,Kq as w,Lr as pe,Ls as Y,KQ as he,jN as fe,Lt as ge,KV as Z,KW as J,kC as Se,Hp as X,Kk as x,jH as ye,jF as Te,jR as Me,Lu as $e,Lv as qe,tM as R,jM as ve,GM as Ee,cV as He,cW as We,Lw as Ke,Kj as Qe,Lx as Ye,tQ as Ze,Ly as Je,Lz as Xe,LA as ea,LB as aa,LC as ta,jQ as na,LD as oa,LE as sa,Kl as ia,LF as ca,LG as ra,LH as la,GG as da,Gu as ua,GY as ma,jS as pa,Hq as ie,GD as ha}from"./zeni-epic-state-BmAPZlsC.js";import{z as De,y as ee,S as _,aK as Ce,m as fa,Z as ga,aL as Sa,G as ya,p as H,c as Ta,aM as va,q as W,d as be,aN as Ea,aq as Da,Y as q}from"./index-DojfCsv7.js";import{n as Ca,S as ba,D as Ia}from"./mui-CTbUXhla.js";import{u as ka}from"./useAskAiCfoHostNavButtonProps-It-lF7wN.js";import{c as La}from"./useFetchSuggestedQuestionsWhenReady-D9n2AKQx.js";import{d as Ie}from"./decodeURIComponentSafe-DCnYf30M.js";import{h as ke,g as Aa,d as Ua,b as xa}from"./routePaths-DoAvT9jx.js";import{t as _a}from"./utils-BkkIzijx.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]="238171c0-37da-4c92-9241-a3f155b0f25e",a._sentryDebugIdIdentifier="sentry-dbid-238171c0-37da-4c92-9241-a3f155b0f25e")}catch{}})();const ae=()=>{const a=De.getSignedInUser(),{useFeatureGate:e}=ee(),{isFeatureEnabled:s}=e(_.isChainOfThoughtEnabled);return d.useMemo(()=>je(a)&&s,[a,s])};function Le(a){if(a!=null){if("customer"in a&&a.customer!=null){const{customer:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in a&&a.vendor!=null){const{vendor:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function Ya(a,e){const s=j(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=S(u=>K(u)),i=o.userRole.includes("charge_card_user")||o.userRole.includes("charge_card_admin"),l=o.userRole!=null&&ue(o.userRole),g=o.userRole!=null&&me(o.userRole),{isFeatureEnabled:y}=t(_.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:b}=t(_.isExpenseAutomationEnabled),{configValue:h}=n(Ce.enableUncategorizedExpenseCategory),f=h?.uncategorized_expense_category_enabled===!0,k=ae(),T=d.useMemo(()=>({id:a,type:Q(e)}),[a,e]),m=S(u=>w(u,T)),C=S(u=>{const N=w(u,T)?.transactionDetailLocalData.vendorUpdates?.id;return N==null?"Not-Started":u.transactionVendorViewState.editVendorStateById[N]?.saveStatus.fetchState??"Not-Started"}),p=d.useMemo(()=>m?.fetchState==="Completed"?Le(m?.transaction):void 0,[m?.fetchState,m?.transaction]),E=S(u=>{if(p!=null)return pe(u.customerIncomeState,u.vendorExpenseState,u.trendState,p,"month")}),L=S(u=>Y(u)),V=S(u=>{if(p!=null)return he(u.trendWithTransactionsState,p,"TransactionDetail")}),M=o.company?.companyInfo.firstMonthOfFY??1,$=S(u=>fe(u.accountState,u.accountListState,"accountList")),[P,B]=d.useState(!1),[F,v]=d.useState(!1),[c,z]=d.useState(!1);d.useEffect(()=>{B(!1),v(!1),z(!1)},[a,e]);const D=d.useCallback(()=>{B(!1),v(!1)},[]),[A,U]=d.useState(!1),G=V?.selectedPeriod?.timePeriod;return d.useEffect(()=>{c||m==null||m.transaction==null||(s(ge({id:m.transaction.id,type:m.transaction.type})),z(!0)),p!=null&&(!i||l&&g===!1)&&(P?F||E==null||(v(!0),s(X(p,"TransactionDetail",{timeframe:"month",timePeriod:G??E}))):(s(Z()),s(J()),B(!0),s(Se(p))))},[s,c,m?.fetchState,m?.transaction,p,i,l,g,P,F,E,G]),d.useEffect(()=>{L.newVendorState?.vendorDetailLocalData?.vendorName!=null?U(!0):U(!1)},[L.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{s(x("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:i,isUserHasDashboardAccess:l,isUserHasInvestorOrBankerAccess:g,isVendorBulkUpdateOnTransactionEnabled:y,isExpenseAutomationEnabled:b,isUncategorizedExpenseCategoryEnabled:f,isChainOfThoughtEnabled:k,selectedTransaction:T,transactionDetail:m,vendorSaveStatus:C,tranEntity:p,defaultTrendTransactionTimePeriod:E,vendorViewDetails:L,uiState:V,firstMonthOfFY:M,uncategorizedAccounts:$,resetTrendIsFetchedStates:D,isCreateVendorDrawerOpen:A,setIsCreateVendorDrawerOpen:U}}const Va={overlayWidth:new ya(100,100,58)},Ba=({isOpen:a,onSaveVendor:e,onSaveSuccess:s,onCancel:t,vendorViewDetails:n})=>{const o=fa(),i=ga(),l=j(),g=S(h=>Y(h)),y=()=>{t()},b={vendorDetailView:n??g,onSaveSuccess:()=>{l(Te()),l(Me("Not-Started")),s()},onSaveVendor:e,onCancelClick:y,saveVendorDetailLocalData:h=>{l(ye({vendorId:void 0,localData:h}))}};return I.jsx(Ia,{anchor:"right",open:a,PaperProps:{style:{width:Va.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:y,children:I.jsx(wa,{onClick:h=>h.stopPropagation(),children:I.jsx(Sa,{...b})})})},wa=Ca(ba)`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  flex-direction: column;
@@ -1 +1 @@
1
- import{j as i}from"./liveblocks-CfCKAQeM.js";import{j as q,u as R,h as J,l as H,g as j,N as z,k as Q,n as Ae,o as b}from"./core-uYqCzel8.js";import{eQ as $,i$ as T,OP as Z,Hg as ue,bq as ie,OQ as Se,jC as K,KS as W,OR as se,OS as he,bE as x,Hd as me,OT as ke,OU as re,OV as Ie,OW as pe,OX as be,OY as ve,OZ as de,It as Ye,bn as xe}from"./zeni-epic-state-BmAPZlsC.js";import{D as X,d as M,c6 as ee,q as w,p as te,y as fe,S as N,U as Ee,z as Pe}from"./index-CeZ7L-BQ.js";import"./mui-CTbUXhla.js";import{a as y}from"./sentry-131ydzJg.js";import{w as ae}from"./withTransactionSidePanel-BS7S2wn5.js";import{p as ne,b as ce}from"./routePaths-vUmlDccC.js";import{u as Oe}from"./utils-BkkIzijx.js";import{d as O}from"./decodeURIComponentSafe-DCnYf30M.js";import{Z as je}from"./ZeniAccountStatementScreen-C8feQjoH.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./useAskAiCfoHostNavButtonProps-D4_eEE1f.js";import"./useFetchSuggestedQuestionsWhenReady-b8cA6qxS.js";import"./TransactionDetailScreen--PMkud8g.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]="bb10428a-83e2-420c-8c1c-d73f43c029a0",a._sentryDebugIdIdentifier="sentry-dbid-bb10428a-83e2-420c-8c1c-d73f43c029a0")}catch{}})();const Le=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],G=a=>Oe(a),ze=Q(function(a,e){const t=Se(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,G(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=X.getLocalizedStrings(),s=G(e.selectedAccount.tranListType),r=Be(t,n,c,s,e.bookCloseDate);M.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(se({uiState:{dateRange:r},type:G(e.selectedAccount.tranListType)})),a(ue(s,T(r),!1,s==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(T(r))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(se({uiState:{scrollYOffset:t},type:G(e.selectedAccount.tranListType)}))}}})(ee),_=ae(function({...a}){const e=q(),t=R(),n=J(),c=t.pathname.split("/").find(d=>Le.includes(d)),o=c??"uncategorized-expense",{tenantEmailDomain:s}=H(),r=X.getLocalizedStrings(),{accountType:p,title:A,subTitle:S}=Me(o),h="month",k=j(d=>$(d)),D=k.company?.companyInfo.firstMonthOfFY??1,{dataAvailable:g,initialTimeframeTick:v}=Ce(o,D,k.bookCloseDate),[E,C]=y.useState(!1),[Y,B]=y.useState(void 0),l=y.useMemo(()=>{const d=T(v);return{tranListType:o,accountType:Z(p),title:A,subTitle:S,timeframe:h,period:d}},[o,h,p,g]);y.useEffect(()=>{if(!E&&l!=null){C(!0),M.trackTransactionList(void 0,void 0,void 0,l.title);const d=G(l.tranListType);n(ue(d,l.period,!0,d==="missingReceipts"?r.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[E,l,n]);let P=l;return l!=null&&Y!=null&&(P={...l,period:Y}),c==null||P==null?i.jsx(z,{to:"../"}):i.jsx(ze,{firstMonthOfFY:D,tenantEmailDomain:s,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:g,navigate:e,selectedAccount:P,referrerType:o,bookCloseDate:k.bookCloseDate,onSelectedTimePeriodChange:d=>B(d),...a})}),Me=a=>{let e="",t="";const n=X.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.uncategorizedTransactionList.expense.title;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.uncategorizedTransactionList.missingReceipt.title}return{accountType:e,title:t,subTitle:""}},Ce=(a,e,t)=>{const n=ie();let c=ie().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:ne(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Be=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},Fe=Q(function(a,e){const t=ke(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Te();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),M.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(me(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(ee),_e=ae(function({referrerType:a,...e}){const t=q(),n=R(),c=J(),{tenantEmailDomain:o,accountTypeEncoded:s,accountIdEncoded:r,classIdEncoded:p,timeframe:A,startDate:S,endDate:h,titleEncoded:k}=H(),D=O(s??""),g=O(r??""),v=O(p??""),E=O(k??""),C=j(f=>he(f.transactionListState,g,D,v)),[Y,B]=y.useState(!1),[l,P]=y.useState(void 0),d=j(f=>$(f)),V=d.company?.companyInfo.firstMonthOfFY??1;let u;const m=Ge(D,g,v,A,S,h,E);if(m){const f={startDate:x(S,"YYYY-MM-DD"),endDate:x(h,"YYYY-MM-DD")},U=we(C?.dateRange,f);u={accountId:g,accountType:Z(D),classId:v,title:E,timeframe:A,period:U}}y.useEffect(()=>{Y||u==null||(B(!0),M.trackTransactionList(u.accountId,void 0,a,u.title),c(me(u.accountId,u.accountType,u.classId,u.period)))},[Y,u,c]);let L=u;u!=null&&l!=null&&(L={...u,period:l});const F=[s,r,p,A,S,h,k].filter(f=>f!=null);return m&&L!=null?i.jsx(Fe,{firstMonthOfFY:V,tenantEmailDomain:o,location:n,navigate:t,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:f=>P(f),...e}):i.jsx(z,{to:Te(F.length)})}),Te=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ge=(a,e,t,n,c,o,s)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&x(c,"YYYY-MM-DD").isValid()&&x(o,"YYYY-MM-DD").isValid()&&s!=null,we=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),Re=Q(function(a,e){const t=be(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&ve(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??De();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),M.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(pe(e.selectedAccount.accountId,e.selectedAccount.accountType,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=Ue(e.tenantEmailDomain),n=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ee),le=ae(function({referrerType:a,...e}){const t=q(),n=R(),c=J(),{tenantEmailDomain:o,accountTypeEncoded:s,accountIdEncoded:r,timeframe:p,startDate:A,endDate:S,titleEncoded:h,excludeSubAccounts:k}=H(),D=O(s??""),g=O(r??""),v=O(h??""),E=!(k!=null&&k==="exclude_subaccounts"),C=j(I=>Ie(I.transactionListState,g,D)),[Y,B]=y.useState(!1),[l,P]=y.useState(void 0),d=j(I=>$(I)),V=d.company?.featuresActivationInfo.connectedAccountProvider==="unit",u=d.company?.companyInfo.firstMonthOfFY??1;let m;const L=$e(D,g,p,A,S,v);if(L){const I={startDate:x(A,"YYYY-MM-DD"),endDate:x(S,"YYYY-MM-DD")},ye=Ve(C?.dateRange,I);m={accountId:g,accountType:Z(D),title:v,timeframe:p,period:ye}}let F=m;m!=null&&l!=null&&(F={...m,period:l});const{useFeatureGate:f}=fe(),{isFeatureEnabled:U}=f(N.isTransactionCommentingEnabled),{areTenantIdsInSync:oe}=Ee();y.useEffect(()=>{!Y&&m!=null&&oe&&(B(!0),M.trackTransactionList(m.accountId,void 0,a,m.title),c(pe(m.accountId,m.accountType,m.period,void 0,!1,E)))},[Y,m,c,oe]);const ge=[s,r,p,A,S,h].filter(I=>I!=null);return L&&F!=null?i.jsx(Re,{firstMonthOfFY:u,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:V,isTransactionCommentingEnabled:U,selectedAccount:F,referrerType:a,onSelectedTimePeriodChange:I=>P(I),...e}):i.jsx(z,{to:De(ge.length)})}),De=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},$e=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&x(n,"YYYY-MM-DD").isValid()&&x(c,"YYYY-MM-DD").isValid()&&o!=null,Ve=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),Ue=a=>`/${a}/transactions/${Ye}/statements`;function pt(){const a=R().state?.referrer,e=Pe.getSignedInUser(),t=xe(e),{useFeatureGate:n}=fe(),{isFeatureEnabled:c}=n(N.isExpenseAutomationEnabled),o=j(p=>p.expenseAutomationViewState.selectedPeriodByTenantId)[j(p=>$(p)).tenantId],{isFeatureEnabled:s}=n(N.isExpenseAutomationEnabledV2),r=s||c&&t;return i.jsxs(Ae,{children:[i.jsx(b,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:i.jsx(le,{referrerType:a})}),i.jsx(b,{path:"/zeni-clearing-account/statements",element:i.jsx(je,{})}),i.jsx(b,{path:"/*",element:i.jsx(le,{referrerType:a})}),i.jsx(b,{path:"/uncategorized-income/*",element:i.jsx(_,{})}),i.jsx(b,{path:"/uncategorized-expense/*",element:r?i.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(_,{})}),i.jsx(b,{path:"/miscategorized-income/*",element:i.jsx(_,{})}),i.jsx(b,{path:"/miscategorized-expense/*",element:r?i.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(_,{})}),i.jsx(b,{path:"/missing-receipts/*",element:r?i.jsx(z,{to:`../../month_end_close_checks/review/missing_receipts/${o.month}-${o.year}`}):i.jsx(_,{})}),i.jsx(b,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:i.jsx(_e,{referrerType:a})})]})}export{pt as default};
1
+ import{j as i}from"./liveblocks-CfCKAQeM.js";import{j as q,u as R,h as J,l as H,g as j,N as z,k as Q,n as Ae,o as b}from"./core-uYqCzel8.js";import{eQ as $,i$ as T,OP as Z,Hg as ue,bq as ie,OQ as Se,jC as K,KS as W,OR as se,OS as he,bE as x,Hd as me,OT as ke,OU as re,OV as Ie,OW as pe,OX as be,OY as ve,OZ as de,It as Ye,bn as xe}from"./zeni-epic-state-BmAPZlsC.js";import{D as X,d as M,c6 as ee,q as w,p as te,y as fe,S as N,U as Ee,z as Pe}from"./index-DojfCsv7.js";import"./mui-CTbUXhla.js";import{a as y}from"./sentry-131ydzJg.js";import{w as ae}from"./withTransactionSidePanel-DN0z2FuE.js";import{p as ne,b as ce}from"./routePaths-DoAvT9jx.js";import{u as Oe}from"./utils-BkkIzijx.js";import{d as O}from"./decodeURIComponentSafe-DCnYf30M.js";import{Z as je}from"./ZeniAccountStatementScreen-C_K9i07r.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./useAskAiCfoHostNavButtonProps-It-lF7wN.js";import"./useFetchSuggestedQuestionsWhenReady-D9n2AKQx.js";import"./TransactionDetailScreen-DRZw6o-C.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]="bb10428a-83e2-420c-8c1c-d73f43c029a0",a._sentryDebugIdIdentifier="sentry-dbid-bb10428a-83e2-420c-8c1c-d73f43c029a0")}catch{}})();const Le=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],G=a=>Oe(a),ze=Q(function(a,e){const t=Se(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,G(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=X.getLocalizedStrings(),s=G(e.selectedAccount.tranListType),r=Be(t,n,c,s,e.bookCloseDate);M.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(se({uiState:{dateRange:r},type:G(e.selectedAccount.tranListType)})),a(ue(s,T(r),!1,s==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(T(r))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(se({uiState:{scrollYOffset:t},type:G(e.selectedAccount.tranListType)}))}}})(ee),_=ae(function({...a}){const e=q(),t=R(),n=J(),c=t.pathname.split("/").find(d=>Le.includes(d)),o=c??"uncategorized-expense",{tenantEmailDomain:s}=H(),r=X.getLocalizedStrings(),{accountType:p,title:A,subTitle:S}=Me(o),h="month",k=j(d=>$(d)),D=k.company?.companyInfo.firstMonthOfFY??1,{dataAvailable:g,initialTimeframeTick:v}=Ce(o,D,k.bookCloseDate),[E,C]=y.useState(!1),[Y,B]=y.useState(void 0),l=y.useMemo(()=>{const d=T(v);return{tranListType:o,accountType:Z(p),title:A,subTitle:S,timeframe:h,period:d}},[o,h,p,g]);y.useEffect(()=>{if(!E&&l!=null){C(!0),M.trackTransactionList(void 0,void 0,void 0,l.title);const d=G(l.tranListType);n(ue(d,l.period,!0,d==="missingReceipts"?r.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[E,l,n]);let P=l;return l!=null&&Y!=null&&(P={...l,period:Y}),c==null||P==null?i.jsx(z,{to:"../"}):i.jsx(ze,{firstMonthOfFY:D,tenantEmailDomain:s,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:g,navigate:e,selectedAccount:P,referrerType:o,bookCloseDate:k.bookCloseDate,onSelectedTimePeriodChange:d=>B(d),...a})}),Me=a=>{let e="",t="";const n=X.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.uncategorizedTransactionList.expense.title;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.uncategorizedTransactionList.missingReceipt.title}return{accountType:e,title:t,subTitle:""}},Ce=(a,e,t)=>{const n=ie();let c=ie().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:ne(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Be=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},Fe=Q(function(a,e){const t=ke(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Te();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),M.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(me(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(ee),_e=ae(function({referrerType:a,...e}){const t=q(),n=R(),c=J(),{tenantEmailDomain:o,accountTypeEncoded:s,accountIdEncoded:r,classIdEncoded:p,timeframe:A,startDate:S,endDate:h,titleEncoded:k}=H(),D=O(s??""),g=O(r??""),v=O(p??""),E=O(k??""),C=j(f=>he(f.transactionListState,g,D,v)),[Y,B]=y.useState(!1),[l,P]=y.useState(void 0),d=j(f=>$(f)),V=d.company?.companyInfo.firstMonthOfFY??1;let u;const m=Ge(D,g,v,A,S,h,E);if(m){const f={startDate:x(S,"YYYY-MM-DD"),endDate:x(h,"YYYY-MM-DD")},U=we(C?.dateRange,f);u={accountId:g,accountType:Z(D),classId:v,title:E,timeframe:A,period:U}}y.useEffect(()=>{Y||u==null||(B(!0),M.trackTransactionList(u.accountId,void 0,a,u.title),c(me(u.accountId,u.accountType,u.classId,u.period)))},[Y,u,c]);let L=u;u!=null&&l!=null&&(L={...u,period:l});const F=[s,r,p,A,S,h,k].filter(f=>f!=null);return m&&L!=null?i.jsx(Fe,{firstMonthOfFY:V,tenantEmailDomain:o,location:n,navigate:t,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:f=>P(f),...e}):i.jsx(z,{to:Te(F.length)})}),Te=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ge=(a,e,t,n,c,o,s)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&x(c,"YYYY-MM-DD").isValid()&&x(o,"YYYY-MM-DD").isValid()&&s!=null,we=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),Re=Q(function(a,e){const t=be(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&ve(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??De();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),M.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(pe(e.selectedAccount.accountId,e.selectedAccount.accountType,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=Ue(e.tenantEmailDomain),n=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ee),le=ae(function({referrerType:a,...e}){const t=q(),n=R(),c=J(),{tenantEmailDomain:o,accountTypeEncoded:s,accountIdEncoded:r,timeframe:p,startDate:A,endDate:S,titleEncoded:h,excludeSubAccounts:k}=H(),D=O(s??""),g=O(r??""),v=O(h??""),E=!(k!=null&&k==="exclude_subaccounts"),C=j(I=>Ie(I.transactionListState,g,D)),[Y,B]=y.useState(!1),[l,P]=y.useState(void 0),d=j(I=>$(I)),V=d.company?.featuresActivationInfo.connectedAccountProvider==="unit",u=d.company?.companyInfo.firstMonthOfFY??1;let m;const L=$e(D,g,p,A,S,v);if(L){const I={startDate:x(A,"YYYY-MM-DD"),endDate:x(S,"YYYY-MM-DD")},ye=Ve(C?.dateRange,I);m={accountId:g,accountType:Z(D),title:v,timeframe:p,period:ye}}let F=m;m!=null&&l!=null&&(F={...m,period:l});const{useFeatureGate:f}=fe(),{isFeatureEnabled:U}=f(N.isTransactionCommentingEnabled),{areTenantIdsInSync:oe}=Ee();y.useEffect(()=>{!Y&&m!=null&&oe&&(B(!0),M.trackTransactionList(m.accountId,void 0,a,m.title),c(pe(m.accountId,m.accountType,m.period,void 0,!1,E)))},[Y,m,c,oe]);const ge=[s,r,p,A,S,h].filter(I=>I!=null);return L&&F!=null?i.jsx(Re,{firstMonthOfFY:u,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:V,isTransactionCommentingEnabled:U,selectedAccount:F,referrerType:a,onSelectedTimePeriodChange:I=>P(I),...e}):i.jsx(z,{to:De(ge.length)})}),De=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},$e=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&x(n,"YYYY-MM-DD").isValid()&&x(c,"YYYY-MM-DD").isValid()&&o!=null,Ve=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),Ue=a=>`/${a}/transactions/${Ye}/statements`;function pt(){const a=R().state?.referrer,e=Pe.getSignedInUser(),t=xe(e),{useFeatureGate:n}=fe(),{isFeatureEnabled:c}=n(N.isExpenseAutomationEnabled),o=j(p=>p.expenseAutomationViewState.selectedPeriodByTenantId)[j(p=>$(p)).tenantId],{isFeatureEnabled:s}=n(N.isExpenseAutomationEnabledV2),r=s||c&&t;return i.jsxs(Ae,{children:[i.jsx(b,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:i.jsx(le,{referrerType:a})}),i.jsx(b,{path:"/zeni-clearing-account/statements",element:i.jsx(je,{})}),i.jsx(b,{path:"/*",element:i.jsx(le,{referrerType:a})}),i.jsx(b,{path:"/uncategorized-income/*",element:i.jsx(_,{})}),i.jsx(b,{path:"/uncategorized-expense/*",element:r?i.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(_,{})}),i.jsx(b,{path:"/miscategorized-income/*",element:i.jsx(_,{})}),i.jsx(b,{path:"/miscategorized-expense/*",element:r?i.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(_,{})}),i.jsx(b,{path:"/missing-receipts/*",element:r?i.jsx(z,{to:`../../month_end_close_checks/review/missing_receipts/${o.month}-${o.year}`}):i.jsx(_,{})}),i.jsx(b,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:i.jsx(_e,{referrerType:a})})]})}export{pt as default};
@@ -1,4 +1,4 @@
1
- import{j as e}from"./liveblocks-CfCKAQeM.js";import{j as B,u as L,h as P,l as O,g as f,N as F,k as M,n as xe,o as k}from"./core-uYqCzel8.js";import{cm as V,eQ as v,NA as R,DK as ae,fe as H,Ds as ne,NC as we,DN as Te,Ny as Ie,Nz as se,NR as Ce,BU as ke,sJ as je,NE as Ae,DY as be,NB as re,cP as Z,wP as oe,eU as Ee,eW as De,OM as ve,ON as Ue,Dt as Fe,OO as Be,Du as Le,DD as Pe,bv as Re,bF as Ne,cx as Oe,bG as Me,cl as Ve,fd as ze,bs as _e,Jd as Ge,ck as $e}from"./zeni-epic-state-BmAPZlsC.js";import{c as z,an as We,z as b,A as _,d as j,b$ as He,c0 as Ze,c1 as W,Z as q,m as qe,U as Ke,y as ie,S as D,G as Je,x as Qe,c2 as Ye,aq as K,q as Xe,c3 as et,p as J,c4 as tt,B as Y,c5 as at,a6 as nt}from"./index-CeZ7L-BQ.js";import{D as st,n as N,S as rt}from"./mui-CTbUXhla.js";import ot from"./NotFoundScreen-CsEhUGfR.js";import{S as X}from"./SetupPagesScreen-BMUAJOjI.js";import{a as d}from"./sentry-131ydzJg.js";import{u as it}from"./useAskAiCfoHostNavButtonProps-D4_eEE1f.js";import{c as ct}from"./useFetchSuggestedQuestionsWhenReady-b8cA6qxS.js";import{M as ce}from"./MobileAppDrawer-CNxBiA0K.js";import{F as lt}from"./FeaturePreviewScreen-DPxCLrsp.js";import{a as ee}from"./analyticsHelper-DhD4YoYg.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.js";import"./routePaths-vUmlDccC.js";import"./BusinessVerificationPageScreen-C-d6e6xJ.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]="cfe97a2e-901a-4523-9de9-a04381975f0a",t._sentryDebugIdIdentifier="sentry-dbid-cfe97a2e-901a-4523-9de9-a04381975f0a")}catch{}})();const ut=M(function(t,a){const{companyId:n}=a;return{treasurySetupView:R(t,n),analytics:j}},function(t,a){const{navigate:n,analytics:o,treasurySetupView:p}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=p.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(Te(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(we(r))}}})(He);function dt(){const t=B(),a=L(),n=P(),{tenantEmailDomain:o}=O(),p=z(),r=f(C=>C.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=We(r),s=V(p?.loggedInUserRoleMap),[c,i]=d.useState(!1),[y,I]=d.useState(!1),[u,l]=d.useState(!1),g=f(C=>v(C)),h=b.getSignedInUserTenant(o)?.companyId??g.companyId,w=b.getSignedInUser(),S=f(C=>R(C,h)),T=f(C=>C.treasurySetupViewState.fetchState),x=f(C=>C.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),U=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(()=>{c||T!=="Not-Started"||h==null||(i(!0),n(ae(h,!0,!1)))},[c,T,h,n]),d.useEffect(()=>{u||U!=="Not-Started"||h==null||(l(!0),n(H()))},[u,U,h,n]),d.useEffect(()=>{y||x!=="Not-Started"||h==null||(I(!0),n(ne()))},[y,x,h,n]),d.useEffect(()=>{m==="In-Progress"&&r==="Completed"&&t("../")},[m,r,t]),g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(F,{to:"../promo"});const E=g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||T!=="Completed";return e.jsxs(e.Fragment,{children:[!E&&e.jsx(_,{analytics:j,onLoad:()=>{}}),e.jsx(ut,{navigate:t,location:a,companyId:h,isEditMode:!0,isLoading:E,isReadOnly:!s,treasurySetupView:S,analytics:j})]})}const pt=M(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:Ce(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:R(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{W(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{W(a.analytics,"confirm",r,m,"Transfer"),t(be())},onSaveChangesToLocalStore:s=>{t(Ae(s))},onFetchLinkTokenClick:s=>{t(je("treasury_setup",s))},onEstablishConnectionClick:s=>{t(ke(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(Ze),mt=({isFirstTransfer:t})=>{const a=B(),{tenantEmailDomain:n}=O(),o=P(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[c,i]=d.useState(!1),[y,I]=d.useState(!1),u=f(x=>x.treasurySetupViewState.fetchState),l=f(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),g=f(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),h=f(x=>v(x)),w=b.getSignedInUserTenant(n)?.companyId??h.companyId,S=f(x=>Ie(x)),T=f(x=>R(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(()=>{c||l!=="Not-Started"||w==null||(i(!0),o(H()))},[c,l,w,o]),d.useEffect(()=>{y||g!=="Not-Started"||w==null||(I(!0),o(ne()))},[y,g,w,o]),e.jsxs(e.Fragment,{children:[e.jsx(_,{analytics:j,onLoad:()=>{}}),e.jsx(pt,{analytics:j,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:h,treasurySetupView:T,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{W(j,"review",S.treasuryTransferMoneyLocalData,T.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},ft=N.div`
1
+ import{j as e}from"./liveblocks-CfCKAQeM.js";import{j as B,u as L,h as P,l as O,g as f,N as F,k as M,n as xe,o as k}from"./core-uYqCzel8.js";import{cm as V,eQ as v,NA as R,DK as ae,fe as H,Ds as ne,NC as we,DN as Te,Ny as Ie,Nz as se,NR as Ce,BU as ke,sJ as je,NE as Ae,DY as be,NB as re,cP as Z,wP as oe,eU as Ee,eW as De,OM as ve,ON as Ue,Dt as Fe,OO as Be,Du as Le,DD as Pe,bv as Re,bF as Ne,cx as Oe,bG as Me,cl as Ve,fd as ze,bs as _e,Jd as Ge,ck as $e}from"./zeni-epic-state-BmAPZlsC.js";import{c as z,an as We,z as b,A as _,d as j,b$ as He,c0 as Ze,c1 as W,Z as q,m as qe,U as Ke,y as ie,S as D,G as Je,x as Qe,c2 as Ye,aq as K,q as Xe,c3 as et,p as J,c4 as tt,B as Y,c5 as at,a6 as nt}from"./index-DojfCsv7.js";import{D as st,n as N,S as rt}from"./mui-CTbUXhla.js";import ot from"./NotFoundScreen-t1ueGvDG.js";import{S as X}from"./SetupPagesScreen-D9wDjvOC.js";import{a as d}from"./sentry-131ydzJg.js";import{u as it}from"./useAskAiCfoHostNavButtonProps-It-lF7wN.js";import{c as ct}from"./useFetchSuggestedQuestionsWhenReady-D9n2AKQx.js";import{M as ce}from"./MobileAppDrawer-B3x5wY10.js";import{F as lt}from"./FeaturePreviewScreen-B2O-98_e.js";import{a as ee}from"./analyticsHelper-BunVJ4K_.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.js";import"./routePaths-DoAvT9jx.js";import"./BusinessVerificationPageScreen-CnAB8eUQ.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]="cfe97a2e-901a-4523-9de9-a04381975f0a",t._sentryDebugIdIdentifier="sentry-dbid-cfe97a2e-901a-4523-9de9-a04381975f0a")}catch{}})();const ut=M(function(t,a){const{companyId:n}=a;return{treasurySetupView:R(t,n),analytics:j}},function(t,a){const{navigate:n,analytics:o,treasurySetupView:p}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=p.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(Te(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(we(r))}}})(He);function dt(){const t=B(),a=L(),n=P(),{tenantEmailDomain:o}=O(),p=z(),r=f(C=>C.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=We(r),s=V(p?.loggedInUserRoleMap),[c,i]=d.useState(!1),[y,I]=d.useState(!1),[u,l]=d.useState(!1),g=f(C=>v(C)),h=b.getSignedInUserTenant(o)?.companyId??g.companyId,w=b.getSignedInUser(),S=f(C=>R(C,h)),T=f(C=>C.treasurySetupViewState.fetchState),x=f(C=>C.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),U=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(()=>{c||T!=="Not-Started"||h==null||(i(!0),n(ae(h,!0,!1)))},[c,T,h,n]),d.useEffect(()=>{u||U!=="Not-Started"||h==null||(l(!0),n(H()))},[u,U,h,n]),d.useEffect(()=>{y||x!=="Not-Started"||h==null||(I(!0),n(ne()))},[y,x,h,n]),d.useEffect(()=>{m==="In-Progress"&&r==="Completed"&&t("../")},[m,r,t]),g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(F,{to:"../promo"});const E=g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||T!=="Completed";return e.jsxs(e.Fragment,{children:[!E&&e.jsx(_,{analytics:j,onLoad:()=>{}}),e.jsx(ut,{navigate:t,location:a,companyId:h,isEditMode:!0,isLoading:E,isReadOnly:!s,treasurySetupView:S,analytics:j})]})}const pt=M(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:Ce(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:R(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{W(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{W(a.analytics,"confirm",r,m,"Transfer"),t(be())},onSaveChangesToLocalStore:s=>{t(Ae(s))},onFetchLinkTokenClick:s=>{t(je("treasury_setup",s))},onEstablishConnectionClick:s=>{t(ke(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(Ze),mt=({isFirstTransfer:t})=>{const a=B(),{tenantEmailDomain:n}=O(),o=P(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[c,i]=d.useState(!1),[y,I]=d.useState(!1),u=f(x=>x.treasurySetupViewState.fetchState),l=f(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),g=f(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),h=f(x=>v(x)),w=b.getSignedInUserTenant(n)?.companyId??h.companyId,S=f(x=>Ie(x)),T=f(x=>R(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(()=>{c||l!=="Not-Started"||w==null||(i(!0),o(H()))},[c,l,w,o]),d.useEffect(()=>{y||g!=="Not-Started"||w==null||(I(!0),o(ne()))},[y,g,w,o]),e.jsxs(e.Fragment,{children:[e.jsx(_,{analytics:j,onLoad:()=>{}}),e.jsx(pt,{analytics:j,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:h,treasurySetupView:T,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{W(j,"review",S.treasuryTransferMoneyLocalData,T.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},ft=N.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as l}from"./liveblocks-CfCKAQeM.js";import{a as g}from"./sentry-131ydzJg.js";import{j as K,u as z,l as U,g as S,k as J,h as Y,n as at,o as B,N as G}from"./core-uYqCzel8.js";import{eQ as V,Kg as Ee,Kh as Re,fR as X,cs as Ie,ct as be,vo as St,Ki as nt,vs as Yt,Ik as ee,jC as te,vm as zt,vg as qt,Kj as Me,v8 as Ht,v7 as Wt,v1 as Qt,vd as Zt,vt as Xt,Kk as he,Kl as Ne,v9 as ea,Km as pe,e$ as ft,vI as gt,vB as vt,Kn as xt,oo as Tt,vw as yt,vu as Dt,Ko as Ct,vP as Et,vM as It,vx as bt,vO as Ke,GM as kt,Kp as ta,Kq as aa,cv as na,Kr as sa,Ks as oa,Kt as me,Ku as ie,Kv as ke,Il as Je,w2 as ye,Ij as De,vR as wt,vp as Ge,Kw as la,Im as H,Kx as $e,vj as ia,Ky as ca,Kz as da,KA as Ye,KB as ze,KC as qe,KD as He,vY as we,KE as At,vF as jt,KF as ra,KG as ua,KH as ha,KI as pa,KJ as ma,KK as Sa,KL as fa,KM as ga,sV as va,sW as xa,Hq as je,KN as Ta,KO as ya,i$ as Fe,bq as Da,KP as Ca,KQ as Ea,kA as Ia,kJ as ba,Hp as Le,bE as st,KR as Ft,H5 as Lt,KS as ka,KT as wa,KU as Aa,kL as ja,KV as ot,KW as lt,KX as it,KY as ct,KZ as Fa,kH as La,K_ as Pa,kK as _a,K$ as Va,L0 as Pt,HM as _t,j_ as Ba,L1 as Oa,L2 as Pe,L3 as Vt,HK as Bt,yf as Ua,L4 as Ra,L5 as Ma,ki as Ot,L6 as Na,L7 as Ka,HY as Ja,qu as Ga,L8 as Ut,L9 as dt,HV as _e,La as rt,Lb as $a,H_ as Ya,Lc as za,Ld as qa,Le as Ha,Lf as Wa,Lg as Qa,qx as Za,Lh as Xa,In as en,Li as tn,HD as Ve,gK as an,Lj as nn,Lk as sn,gI as on,Ll as ln,Lm as cn,yj as dn,Ln as rn,Lo as un,Lp as hn,Lq as pn,k2 as mn,bn as Sn,eW as fn,eU as gn}from"./zeni-epic-state-BmAPZlsC.js";import{z as R,an as Be,x as Rt,A as Q,d as j,Y as Z,at as vn,q as N,D as Ce,s as ce,au as We,av as xn,aw as Tn,p as Qe,ax as yn,m as Dn,Z as de,G as Ze,y as ae,S as $,ay as Cn,h as Xe,az as En,aA as Mt,U as In,aB as bn,c as kn,aC as wn,aq as Nt,aD as An,o as W,C as jn,I as Kt,J as Fn,aE as Ln,aF as Pn,f as et,aG as _n,aH as Vn,k as Bn,aI as On,aJ as Un}from"./index-CeZ7L-BQ.js";import{n as M,D as Rn,S as Jt}from"./mui-CTbUXhla.js";import{t as Mn,A as Nn}from"./AddressScreen-ByYpZmgQ.js";import le from"./NotFoundScreen-CsEhUGfR.js";import{F as Kn}from"./FeaturePreviewScreen-DPxCLrsp.js";import{b as q,v as tt,c as Jn}from"./routePaths-vUmlDccC.js";import{p as Gt}from"./pathToGoBack-Y7yporNq.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-D4_eEE1f.js";import{c as fe}from"./useFetchSuggestedQuestionsWhenReady-b8cA6qxS.js";import{M as ge}from"./MobileAppDrawer-CNxBiA0K.js";import{D as Gn}from"./DrawerScreen-AH0ysY6V.js";import{g as $n,m as Yn}from"./accountMappingHelper-D6x0RpVY.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.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]="f2cc3a5c-b21c-41ee-87b5-7daaee8936f5",e._sentryDebugIdIdentifier="sentry-dbid-f2cc3a5c-b21c-41ee-87b5-7daaee8936f5")}catch{}})();const zn=Ce.getLocalizedStrings(),qn=J(function(e,a){const s=Re(e,a.scheduleTab),t=e.tenantState.currentTenantId;return{authParams:{userId:a.signedInUser.userId??"",sessionId:a.signedInUser.zeniSessionId??"",tenantId:t??""},linkBillExpenseView:s.linkBillExpenseView,transactions:s.linkBillExpenseView.transactions}},function(e,a){const{navigate:s,location:t}=a;return{onTransactionSelect(n){e(nt({selectedTransaction:n}))},onBackClick:()=>{s("..",{relative:"path"})},onCancel(){e(nt({selectedTransaction:void 0})),e(Yt()),s("..",{relative:"path"})},onTransactionClick:n=>{const o=`${q(n,a.tenantEmailDomain)}`,c=N(t.state?.pathnameStackToGoBack,t.pathname);s(o,{state:{pathnameStackToGoBack:c}})},onLinkSave(){a.setShouldNavigateBack(!1),e(St(a.scheduleTab,a.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}})(vn),Hn=({setShouldNavigateBack:e})=>{const a=K(),s=z(),{scheduleDetailId:t,tenantEmailDomain:n}=U(),{scheduleType:o}=U();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=R.getSignedInUser();if(h==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const i=S(f=>Re(f,r)),m=i.selectedJELinkRowIndex,d=S(f=>X(f,c.companyId)),u=Be(i.updateStatus.fetchState);g.useEffect(()=>{u==="In-Progress"&&i.updateStatus.fetchState==="Completed"&&a("..",{relative:"path"})},[u,i.updateStatus.fetchState]),g.useEffect(()=>{i.fetchState==="Not-Started"&&a("..",{relative:"path"})},[]),g.useEffect(()=>{i.selectedJEAccruedSchedule!=null&&i.selectedJELinkRowIndex!=null||a("..",{relative:"path"})},[i.selectedJEAccruedSchedule,i.selectedJELinkRowIndex]);const p=i.linkBillExpenseView.fetchState==="Completed";return l.jsx(l.Fragment,{children:i.linkBillExpenseView.fetchState==="In-Progress"?l.jsx(Rt,{fetchState:i.linkBillExpenseView.fetchState}):i.selectedJEAccruedSchedule!=null&&m!=null?l.jsxs(l.Fragment,{children:[p===!0?l.jsx(Q,{analytics:j,onLoad:()=>{Wn(i,r,d)}}):null,l.jsx(qn,{signedInUser:h,attachmentEndPoint:`${Z}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:i.selectedJEAccruedSchedule.vendor.id??"",location:s,tenantEmailDomain:n,scheduleAccruedDetailsView:i,saveFetchState:i.updateStatus.fetchState,scheduleTab:r,navigate:a,analytics:j,controllerUserDetails:d,saveStatus:i.updateStatus.fetchState,jeAccruedSchedule:i.selectedJEAccruedSchedule,localData:i.scheduleAccruedDetailsLocalData.jeScheduleDetails[m]})]}):null})},$t=e=>{const a=zn.dateFormat.analytics.YYYYDashMMDashDDFormat;return{scheduleCreateDate:e.createTime.format(a)??null,scheduleMonthlyAmount:e.recurringAmount??null,startingBalance:e.otherAttributes.startingBalance??null,scheduleAccountCategory:e.jeCredit.account?.accountName??null,description:e.memo,runningBalance:e.balanceAsOfToday??null,currentBalance:e.balanceAsOfToday??null,currentStatus:e.status.label,period:e.period??null,startMonth:e.startDate?.format(a)??null,endMonth:e.endDate?.format(a)??null}},Wn=(e,a,s)=>{const t=e.selectedJEAccruedSchedule,n=e.selectedJELinkRowIndex;let o;n!=null&&t!=null&&(o=t.scheduledJournalEntry[n]);const{transactions:c}=e.linkBillExpenseView,r=c.some(m=>m.isRecommendedTransaction===!0),h=Ie(s.controllers),i=be(s.controllerUserIds);t!=null&&j.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...$t(t)},scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:r,journalEntryPostingStatus:o?.status.label??""},vendorName:t.vendor.name??null,controllerEmails:h,controllerUserIds:i})},Qn=M.div`
1
+ import{j as l}from"./liveblocks-CfCKAQeM.js";import{a as g}from"./sentry-131ydzJg.js";import{j as K,u as z,l as U,g as S,k as J,h as Y,n as at,o as B,N as G}from"./core-uYqCzel8.js";import{eQ as V,Kg as Ee,Kh as Re,fR as X,cs as Ie,ct as be,vo as St,Ki as nt,vs as Yt,Ik as ee,jC as te,vm as zt,vg as qt,Kj as Me,v8 as Ht,v7 as Wt,v1 as Qt,vd as Zt,vt as Xt,Kk as he,Kl as Ne,v9 as ea,Km as pe,e$ as ft,vI as gt,vB as vt,Kn as xt,oo as Tt,vw as yt,vu as Dt,Ko as Ct,vP as Et,vM as It,vx as bt,vO as Ke,GM as kt,Kp as ta,Kq as aa,cv as na,Kr as sa,Ks as oa,Kt as me,Ku as ie,Kv as ke,Il as Je,w2 as ye,Ij as De,vR as wt,vp as Ge,Kw as la,Im as H,Kx as $e,vj as ia,Ky as ca,Kz as da,KA as Ye,KB as ze,KC as qe,KD as He,vY as we,KE as At,vF as jt,KF as ra,KG as ua,KH as ha,KI as pa,KJ as ma,KK as Sa,KL as fa,KM as ga,sV as va,sW as xa,Hq as je,KN as Ta,KO as ya,i$ as Fe,bq as Da,KP as Ca,KQ as Ea,kA as Ia,kJ as ba,Hp as Le,bE as st,KR as Ft,H5 as Lt,KS as ka,KT as wa,KU as Aa,kL as ja,KV as ot,KW as lt,KX as it,KY as ct,KZ as Fa,kH as La,K_ as Pa,kK as _a,K$ as Va,L0 as Pt,HM as _t,j_ as Ba,L1 as Oa,L2 as Pe,L3 as Vt,HK as Bt,yf as Ua,L4 as Ra,L5 as Ma,ki as Ot,L6 as Na,L7 as Ka,HY as Ja,qu as Ga,L8 as Ut,L9 as dt,HV as _e,La as rt,Lb as $a,H_ as Ya,Lc as za,Ld as qa,Le as Ha,Lf as Wa,Lg as Qa,qx as Za,Lh as Xa,In as en,Li as tn,HD as Ve,gK as an,Lj as nn,Lk as sn,gI as on,Ll as ln,Lm as cn,yj as dn,Ln as rn,Lo as un,Lp as hn,Lq as pn,k2 as mn,bn as Sn,eW as fn,eU as gn}from"./zeni-epic-state-BmAPZlsC.js";import{z as R,an as Be,x as Rt,A as Q,d as j,Y as Z,at as vn,q as N,D as Ce,s as ce,au as We,av as xn,aw as Tn,p as Qe,ax as yn,m as Dn,Z as de,G as Ze,y as ae,S as $,ay as Cn,h as Xe,az as En,aA as Mt,U as In,aB as bn,c as kn,aC as wn,aq as Nt,aD as An,o as W,C as jn,I as Kt,J as Fn,aE as Ln,aF as Pn,f as et,aG as _n,aH as Vn,k as Bn,aI as On,aJ as Un}from"./index-DojfCsv7.js";import{n as M,D as Rn,S as Jt}from"./mui-CTbUXhla.js";import{t as Mn,A as Nn}from"./AddressScreen-Bk_munT3.js";import le from"./NotFoundScreen-t1ueGvDG.js";import{F as Kn}from"./FeaturePreviewScreen-B2O-98_e.js";import{b as q,v as tt,c as Jn}from"./routePaths-DoAvT9jx.js";import{p as Gt}from"./pathToGoBack-Y7yporNq.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-It-lF7wN.js";import{c as fe}from"./useFetchSuggestedQuestionsWhenReady-D9n2AKQx.js";import{M as ge}from"./MobileAppDrawer-B3x5wY10.js";import{D as Gn}from"./DrawerScreen-DzkaoOWL.js";import{g as $n,m as Yn}from"./accountMappingHelper-D6x0RpVY.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.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]="f2cc3a5c-b21c-41ee-87b5-7daaee8936f5",e._sentryDebugIdIdentifier="sentry-dbid-f2cc3a5c-b21c-41ee-87b5-7daaee8936f5")}catch{}})();const zn=Ce.getLocalizedStrings(),qn=J(function(e,a){const s=Re(e,a.scheduleTab),t=e.tenantState.currentTenantId;return{authParams:{userId:a.signedInUser.userId??"",sessionId:a.signedInUser.zeniSessionId??"",tenantId:t??""},linkBillExpenseView:s.linkBillExpenseView,transactions:s.linkBillExpenseView.transactions}},function(e,a){const{navigate:s,location:t}=a;return{onTransactionSelect(n){e(nt({selectedTransaction:n}))},onBackClick:()=>{s("..",{relative:"path"})},onCancel(){e(nt({selectedTransaction:void 0})),e(Yt()),s("..",{relative:"path"})},onTransactionClick:n=>{const o=`${q(n,a.tenantEmailDomain)}`,c=N(t.state?.pathnameStackToGoBack,t.pathname);s(o,{state:{pathnameStackToGoBack:c}})},onLinkSave(){a.setShouldNavigateBack(!1),e(St(a.scheduleTab,a.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}})(vn),Hn=({setShouldNavigateBack:e})=>{const a=K(),s=z(),{scheduleDetailId:t,tenantEmailDomain:n}=U(),{scheduleType:o}=U();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=R.getSignedInUser();if(h==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const i=S(f=>Re(f,r)),m=i.selectedJELinkRowIndex,d=S(f=>X(f,c.companyId)),u=Be(i.updateStatus.fetchState);g.useEffect(()=>{u==="In-Progress"&&i.updateStatus.fetchState==="Completed"&&a("..",{relative:"path"})},[u,i.updateStatus.fetchState]),g.useEffect(()=>{i.fetchState==="Not-Started"&&a("..",{relative:"path"})},[]),g.useEffect(()=>{i.selectedJEAccruedSchedule!=null&&i.selectedJELinkRowIndex!=null||a("..",{relative:"path"})},[i.selectedJEAccruedSchedule,i.selectedJELinkRowIndex]);const p=i.linkBillExpenseView.fetchState==="Completed";return l.jsx(l.Fragment,{children:i.linkBillExpenseView.fetchState==="In-Progress"?l.jsx(Rt,{fetchState:i.linkBillExpenseView.fetchState}):i.selectedJEAccruedSchedule!=null&&m!=null?l.jsxs(l.Fragment,{children:[p===!0?l.jsx(Q,{analytics:j,onLoad:()=>{Wn(i,r,d)}}):null,l.jsx(qn,{signedInUser:h,attachmentEndPoint:`${Z}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:i.selectedJEAccruedSchedule.vendor.id??"",location:s,tenantEmailDomain:n,scheduleAccruedDetailsView:i,saveFetchState:i.updateStatus.fetchState,scheduleTab:r,navigate:a,analytics:j,controllerUserDetails:d,saveStatus:i.updateStatus.fetchState,jeAccruedSchedule:i.selectedJEAccruedSchedule,localData:i.scheduleAccruedDetailsLocalData.jeScheduleDetails[m]})]}):null})},$t=e=>{const a=zn.dateFormat.analytics.YYYYDashMMDashDDFormat;return{scheduleCreateDate:e.createTime.format(a)??null,scheduleMonthlyAmount:e.recurringAmount??null,startingBalance:e.otherAttributes.startingBalance??null,scheduleAccountCategory:e.jeCredit.account?.accountName??null,description:e.memo,runningBalance:e.balanceAsOfToday??null,currentBalance:e.balanceAsOfToday??null,currentStatus:e.status.label,period:e.period??null,startMonth:e.startDate?.format(a)??null,endMonth:e.endDate?.format(a)??null}},Wn=(e,a,s)=>{const t=e.selectedJEAccruedSchedule,n=e.selectedJELinkRowIndex;let o;n!=null&&t!=null&&(o=t.scheduledJournalEntry[n]);const{transactions:c}=e.linkBillExpenseView,r=c.some(m=>m.isRecommendedTransaction===!0),h=Ie(s.controllers),i=be(s.controllerUserIds);t!=null&&j.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...$t(t)},scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:r,journalEntryPostingStatus:o?.status.label??""},vendorName:t.vendor.name??null,controllerEmails:h,controllerUserIds:i})},Qn=M.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as o}from"./liveblocks-CfCKAQeM.js";import{a as f}from"./sentry-131ydzJg.js";import{q as u,h,g as b,N as y}from"./core-uYqCzel8.js";import{Jw as I,eR as w,zA as x}from"./zeni-epic-state-BmAPZlsC.js";import{z as l,x as j,I as S,J as D}from"./index-CeZ7L-BQ.js";import{n as g}from"./mui-CTbUXhla.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.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]="66ea4a52-feb8-401f-b169-3be5b1c2ddea",e._sentryDebugIdIdentifier="sentry-dbid-66ea4a52-feb8-401f-b169-3be5b1c2ddea")}catch{}})();const B=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",p=e.get("profileId")??"",[n,c]=f.useState(!1),a=h(),i=b(m=>I(m)),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(y,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect(()=>{n||(c(!0),a(x(t,p,s)))},[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(j,{fetchState:"In-Progress"}))},E=g.div`
1
+ import{j as o}from"./liveblocks-CfCKAQeM.js";import{a as f}from"./sentry-131ydzJg.js";import{q as u,h,g as b,N as y}from"./core-uYqCzel8.js";import{Jw as I,eR as w,zA as x}from"./zeni-epic-state-BmAPZlsC.js";import{z as l,x as j,I as S,J as D}from"./index-DojfCsv7.js";import{n as g}from"./mui-CTbUXhla.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.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]="66ea4a52-feb8-401f-b169-3be5b1c2ddea",e._sentryDebugIdIdentifier="sentry-dbid-66ea4a52-feb8-401f-b169-3be5b1c2ddea")}catch{}})();const B=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",p=e.get("profileId")??"",[n,c]=f.useState(!1),a=h(),i=b(m=>I(m)),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(y,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect(()=>{n||(c(!0),a(x(t,p,s)))},[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(j,{fetchState:"In-Progress"}))},E=g.div`
2
2
  display: flex;
3
3
  width: 100%;
4
4
  height: 100vh;
@@ -1,4 +1,4 @@
1
- import{j as n}from"./liveblocks-CfCKAQeM.js";import{j as K,u as Y,h as z,l as Z,g as w,k as q,N as ne,n as Me,o as k}from"./core-uYqCzel8.js";import{eQ as _,Or as Ce,Os as $e,cl as te,cm as Ne,fd as Ze,wN as ke,A_ as Ge,wH as Tn,Ot as On,Ou as Bn,wK as Fn,wR as fe,wE as Rn,wB as Un,Nd as le,Ov as Ln,Ei as zn,Kj as _n,Ek as Vn,kj as Oe,Ow as Mn,q9 as He,pZ as We,ka as Ke,kd as Be,Kk as Fe,Kl as $n,Ox as Nn,kc as Zn,kz as Gn,k1 as Hn,iA as Wn,iz as Kn,Oy as Yn,Oz as ye,D$ as qn,OA as Jn,OB as Qn,N6 as we,OC as Re,OD as Xn,Ev as et,NR as nt,BU as Ye,sJ as qe,OE as tt,Es as at,OF as Je,cN as Ae,Ez as Qe,fe as ot,eU as Xe,eW as De,Ex as st,BO as rt,Ep as it,OG as en,OH as nn,E1 as tn,Eb as Ue,OI as ct,E5 as lt,OJ as dt,NF as ut,EA as pt,bv as mt,bF as ht,cx as gt,bG as ft,bs as yt,Jd as xt}from"./zeni-epic-state-BmAPZlsC.js";import{c as ae,y as $,z as D,S as O,m as V,x as de,bP as Ct,Y as Ie,Z as M,G as J,p as an,an as kt,ac as Le,d as R,bQ as wt,aq as Se,bR as At,A as ue,bS as Dt,f as be,aK as W,bT as It,U as St,a9 as bt,bU as ze,bV as Et,q as ee,bW as vt,bX as jt,bY as Pt,bZ as Tt,a6 as Ot,o as Bt}from"./index-CeZ7L-BQ.js";import{n as U,D as Q,S as X}from"./mui-CTbUXhla.js";import ce from"./NotFoundScreen-CsEhUGfR.js";import{S as _e}from"./SetupPagesScreen-BMUAJOjI.js";import{F as on}from"./FeaturePreviewScreen-DPxCLrsp.js";import{a as u}from"./sentry-131ydzJg.js";import{M as pe}from"./MobileAppDrawer-CNxBiA0K.js";import{A as Ft,D as Rt,V as Ut}from"./DomesticWireDetailScreen-CzSUYZwn.js";import{A as Lt}from"./AddressScreen-ByYpZmgQ.js";import{u as sn}from"./useAskAiCfoHostNavButtonProps-D4_eEE1f.js";import{c as rn}from"./useFetchSuggestedQuestionsWhenReady-b8cA6qxS.js";import{Z as zt}from"./ZeniAccountStatementScreen-C8feQjoH.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.js";import"./analyticsHelper-DhD4YoYg.js";import"./routePaths-vUmlDccC.js";import"./BusinessVerificationPageScreen-C-d6e6xJ.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]="e8c7e056-cbac-45c5-8675-401b32a71b92",e._sentryDebugIdIdentifier="sentry-dbid-e8c7e056-cbac-45c5-8675-401b32a71b92")}catch{}})();const _t=U.div`
1
+ import{j as n}from"./liveblocks-CfCKAQeM.js";import{j as K,u as Y,h as z,l as Z,g as w,k as q,N as ne,n as Me,o as k}from"./core-uYqCzel8.js";import{eQ as _,Or as Ce,Os as $e,cl as te,cm as Ne,fd as Ze,wN as ke,A_ as Ge,wH as Tn,Ot as On,Ou as Bn,wK as Fn,wR as fe,wE as Rn,wB as Un,Nd as le,Ov as Ln,Ei as zn,Kj as _n,Ek as Vn,kj as Oe,Ow as Mn,q9 as He,pZ as We,ka as Ke,kd as Be,Kk as Fe,Kl as $n,Ox as Nn,kc as Zn,kz as Gn,k1 as Hn,iA as Wn,iz as Kn,Oy as Yn,Oz as ye,D$ as qn,OA as Jn,OB as Qn,N6 as we,OC as Re,OD as Xn,Ev as et,NR as nt,BU as Ye,sJ as qe,OE as tt,Es as at,OF as Je,cN as Ae,Ez as Qe,fe as ot,eU as Xe,eW as De,Ex as st,BO as rt,Ep as it,OG as en,OH as nn,E1 as tn,Eb as Ue,OI as ct,E5 as lt,OJ as dt,NF as ut,EA as pt,bv as mt,bF as ht,cx as gt,bG as ft,bs as yt,Jd as xt}from"./zeni-epic-state-BmAPZlsC.js";import{c as ae,y as $,z as D,S as O,m as V,x as de,bP as Ct,Y as Ie,Z as M,G as J,p as an,an as kt,ac as Le,d as R,bQ as wt,aq as Se,bR as At,A as ue,bS as Dt,f as be,aK as W,bT as It,U as St,a9 as bt,bU as ze,bV as Et,q as ee,bW as vt,bX as jt,bY as Pt,bZ as Tt,a6 as Ot,o as Bt}from"./index-DojfCsv7.js";import{n as U,D as Q,S as X}from"./mui-CTbUXhla.js";import ce from"./NotFoundScreen-t1ueGvDG.js";import{S as _e}from"./SetupPagesScreen-D9wDjvOC.js";import{F as on}from"./FeaturePreviewScreen-B2O-98_e.js";import{a as u}from"./sentry-131ydzJg.js";import{M as pe}from"./MobileAppDrawer-B3x5wY10.js";import{A as Ft,D as Rt,V as Ut}from"./DomesticWireDetailScreen-CWWX1EFM.js";import{A as Lt}from"./AddressScreen-Bk_munT3.js";import{u as sn}from"./useAskAiCfoHostNavButtonProps-It-lF7wN.js";import{c as rn}from"./useFetchSuggestedQuestionsWhenReady-D9n2AKQx.js";import{Z as zt}from"./ZeniAccountStatementScreen-C_K9i07r.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.js";import"./analyticsHelper-BunVJ4K_.js";import"./routePaths-DoAvT9jx.js";import"./BusinessVerificationPageScreen-CnAB8eUQ.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]="e8c7e056-cbac-45c5-8675-401b32a71b92",e._sentryDebugIdIdentifier="sentry-dbid-e8c7e056-cbac-45c5-8675-401b32a71b92")}catch{}})();const _t=U.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as i}from"./liveblocks-CfCKAQeM.js";import{a as u}from"./sentry-131ydzJg.js";import{j as x,h as j,u as $,l as v,g as p}from"./core-uYqCzel8.js";import{It as s,Is as B,OK as C,eQ as L,OL as T}from"./zeni-epic-state-BmAPZlsC.js";import{Z as z,aq as g,m as D,z as E,x as P,b_ as _,p as N}from"./index-CeZ7L-BQ.js";import{n as U}from"./mui-CTbUXhla.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]="bf3731a2-6a49-44d9-8bf9-fbfcc35d52e7",e._sentryDebugIdIdentifier="sentry-dbid-bf3731a2-6a49-44d9-8bf9-fbfcc35d52e7")}catch{}})();const G=U.div`
1
+ import{j as i}from"./liveblocks-CfCKAQeM.js";import{a as u}from"./sentry-131ydzJg.js";import{j as x,h as j,u as $,l as v,g as p}from"./core-uYqCzel8.js";import{It as s,Is as B,OK as C,eQ as L,OL as T}from"./zeni-epic-state-BmAPZlsC.js";import{Z as z,aq as g,m as D,z as E,x as P,b_ as _,p as N}from"./index-DojfCsv7.js";import{n as U}from"./mui-CTbUXhla.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]="bf3731a2-6a49-44d9-8bf9-fbfcc35d52e7",e._sentryDebugIdIdentifier="sentry-dbid-bf3731a2-6a49-44d9-8bf9-fbfcc35d52e7")}catch{}})();const G=U.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{cH as m,cI as l,Jo as _,Jp as d}from"./zeni-epic-state-BmAPZlsC.js";import{d as u}from"./index-CeZ7L-BQ.js";import"./sentry-131ydzJg.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]="2ca98829-59d9-4056-a34d-b83bca90a6ef",e._sentryDebugIdIdentifier="sentry-dbid-2ca98829-59d9-4056-a34d-b83bca90a6ef")}catch{}})();const b=e=>{switch(e){case"this_month_to_date":case"this_week_to_date":case"this_year_to_date":case"last_year":case"last_week":case"last_month":case"last_6_months":case"last_3_months":case"last_12_months":case"free_range":return e;case"month":default:return"months";case"quarter":return"quarters";case"year":return"years"}},h=(e,a,o,i,s)=>{const r=[],c=[];let t=[];s?.forEach(n=>{r.push(n.companyId),c.push(n.companyName),t=t.concat(n.userRole)}),u.identify(e.userId,{tenant_id:a.tenantId,tenant_email_domain:a.tenantEmailDomain,company_id:a.companyId,company_name:a.companyName,user_role:a.userRole,chargebee_customer_id:i,$email:e.userEmail,user_email_domain:e.userEmailDomain,$first_name:e.firstName,$last_name:e.lastName,company_ids:s!=null?r:void 0,company_names:s!=null?c:void 0,user_roles:s!=null?t:void 0,app_type:"web",appearance:o})},g=(e,a)=>m(e,a)?"bill_pay":l(e,a)?"reimbursement":_(e,a)?"zeni_accounts":d(e,a)?"charge_cards":"bill_pay",I=e=>Object.values(e.allocation).map(String).join("-");export{I as a,h as f,g,b as t};
1
+ import{cH as m,cI as l,Jo as _,Jp as d}from"./zeni-epic-state-BmAPZlsC.js";import{d as u}from"./index-DojfCsv7.js";import"./sentry-131ydzJg.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]="2ca98829-59d9-4056-a34d-b83bca90a6ef",e._sentryDebugIdIdentifier="sentry-dbid-2ca98829-59d9-4056-a34d-b83bca90a6ef")}catch{}})();const b=e=>{switch(e){case"this_month_to_date":case"this_week_to_date":case"this_year_to_date":case"last_year":case"last_week":case"last_month":case"last_6_months":case"last_3_months":case"last_12_months":case"free_range":return e;case"month":default:return"months";case"quarter":return"quarters";case"year":return"years"}},h=(e,a,o,i,s)=>{const r=[],c=[];let t=[];s?.forEach(n=>{r.push(n.companyId),c.push(n.companyName),t=t.concat(n.userRole)}),u.identify(e.userId,{tenant_id:a.tenantId,tenant_email_domain:a.tenantEmailDomain,company_id:a.companyId,company_name:a.companyName,user_role:a.userRole,chargebee_customer_id:i,$email:e.userEmail,user_email_domain:e.userEmailDomain,$first_name:e.firstName,$last_name:e.lastName,company_ids:s!=null?r:void 0,company_names:s!=null?c:void 0,user_roles:s!=null?t:void 0,app_type:"web",appearance:o})},g=(e,a)=>m(e,a)?"bill_pay":l(e,a)?"reimbursement":_(e,a)?"zeni_accounts":d(e,a)?"charge_cards":"bill_pay",I=e=>Object.values(e.allocation).map(String).join("-");export{I as a,h as f,g,b as t};
@@ -1 +1 @@
1
- import{i as n}from"./index-CeZ7L-BQ.js";import"./mui-CTbUXhla.js";import"./sentry-131ydzJg.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]="9b1d25c1-f0ca-4ee0-b7c1-2ba41679747b",e._sentryDebugIdIdentifier="sentry-dbid-9b1d25c1-f0ca-4ee0-b7c1-2ba41679747b")}catch{}})();function l(e){if(e.companyLocaleInfo!=null&&e.companyLocaleInfo.languageCode.length>0&&e.companyLocaleInfo.companyIncCountryCode.length>0){const o=`${e.companyLocaleInfo.languageCode.toLowerCase()}-${e.companyLocaleInfo.companyIncCountryCode.toUpperCase()}`;return console.warn(`localeID ${o}`),n(o)??"en"}return"en"}export{l as t};
1
+ import{i as n}from"./index-DojfCsv7.js";import"./mui-CTbUXhla.js";import"./sentry-131ydzJg.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]="9b1d25c1-f0ca-4ee0-b7c1-2ba41679747b",e._sentryDebugIdIdentifier="sentry-dbid-9b1d25c1-f0ca-4ee0-b7c1-2ba41679747b")}catch{}})();function l(e){if(e.companyLocaleInfo!=null&&e.companyLocaleInfo.languageCode.length>0&&e.companyLocaleInfo.companyIncCountryCode.length>0){const o=`${e.companyLocaleInfo.languageCode.toLowerCase()}-${e.companyLocaleInfo.companyIncCountryCode.toUpperCase()}`;return console.warn(`localeID ${o}`),n(o)??"en"}return"en"}export{l as t};